From 505a26c84dddaa4584de4a9c08c5ec028205f851 Mon Sep 17 00:00:00 2001 From: Rim <info@rimmyscorner.com> Date: Sat, 29 Mar 2025 16:05:52 -0400 Subject: [PATCH] chore: update deps --- node_modules/.bin/acorn | 16 - node_modules/.bin/glob | 16 - node_modules/.bin/he | 16 - node_modules/.bin/html-minifier | 16 - node_modules/.bin/mime | 16 - node_modules/.bin/node-which | 16 - node_modules/.bin/nodemon | 16 - node_modules/.bin/nodetouch | 16 - node_modules/.bin/replace-in-file | 16 - node_modules/.bin/semver | 16 - node_modules/.bin/terser | 16 - node_modules/.bin/uglifyjs | 16 - node_modules/.package-lock.json | 1153 +- .../@fastify/busboy/deps/dicer/lib/Dicer.js | 213 - .../busboy/deps/dicer/lib/HeaderParser.js | 100 - .../busboy/deps/dicer/lib/PartStream.js | 13 - .../@fastify/busboy/deps/dicer/lib/dicer.d.ts | 164 - .../@fastify/busboy/deps/streamsearch/sbmh.js | 228 - node_modules/@fastify/busboy/lib/main.d.ts | 196 - node_modules/@fastify/busboy/lib/main.js | 85 - .../@fastify/busboy/lib/types/multipart.js | 306 - .../@fastify/busboy/lib/types/urlencoded.js | 190 - .../@fastify/busboy/lib/utils/Decoder.js | 54 - .../@fastify/busboy/lib/utils/basename.js | 14 - .../@fastify/busboy/lib/utils/decodeText.js | 114 - .../@fastify/busboy/lib/utils/getLimit.js | 16 - .../@fastify/busboy/lib/utils/parseParams.js | 196 - node_modules/@fastify/busboy/package.json | 86 - node_modules/anymatch/index.d.ts | 20 - node_modules/anymatch/index.js | 104 - node_modules/anymatch/package.json | 48 - .../binary-extensions/binary-extensions.json | 263 - .../binary-extensions.json.d.ts | 3 - node_modules/binary-extensions/index.d.ts | 14 - node_modules/binary-extensions/index.js | 1 - node_modules/binary-extensions/package.json | 40 - node_modules/body-parser/index.js | 90 +- node_modules/body-parser/lib/read.js | 49 +- node_modules/body-parser/lib/types/json.js | 65 +- node_modules/body-parser/lib/types/raw.js | 46 +- node_modules/body-parser/lib/types/text.js | 63 +- .../body-parser/lib/types/urlencoded.js | 204 +- node_modules/body-parser/lib/utils.js | 83 + .../node_modules/debug/package.json | 0 .../node_modules/debug/src/browser.js | 0 .../node_modules/debug/src/common.js | 0 .../node_modules/debug/src/index.js | 0 .../node_modules/debug/src/node.js | 0 .../node_modules/media-typer/index.js | 143 + .../node_modules/media-typer/package.json | 33 + .../body-parser/node_modules/mime-db/db.json | 9342 +++++++++++++++++ .../body-parser/node_modules/mime-db/index.js | 12 + .../node_modules/mime-db/package.json | 56 + .../node_modules/mime-types/index.js | 211 + .../node_modules/mime-types/mimeScore.js | 52 + .../node_modules/mime-types/package.json | 45 + .../node_modules/ms/index.js | 0 .../node_modules/ms/package.json | 0 .../body-parser/node_modules/qs/dist/qs.js | 141 + .../node_modules/qs/lib/formats.js | 23 + .../body-parser/node_modules/qs/lib/index.js | 11 + .../body-parser/node_modules/qs/lib/parse.js | 328 + .../node_modules/qs/lib/stringify.js | 356 + .../body-parser/node_modules/qs/lib/utils.js | 268 + .../body-parser/node_modules/qs/package.json | 93 + .../node_modules/qs/test/empty-keys-cases.js | 267 + .../body-parser/node_modules/qs/test/parse.js | 1276 +++ .../node_modules/qs/test/stringify.js | 1306 +++ .../body-parser/node_modules/qs/test/utils.js | 262 + .../body-parser/node_modules/type-is/index.js | 250 + .../node_modules/type-is/package.json | 47 + node_modules/body-parser/package.json | 39 +- node_modules/boolbase/index.js | 8 - node_modules/boolbase/package.json | 23 - node_modules/brace-expansion/index.js | 201 - node_modules/brace-expansion/package.json | 47 - node_modules/braces/index.js | 170 - node_modules/braces/lib/compile.js | 60 - node_modules/braces/lib/constants.js | 57 - node_modules/braces/lib/expand.js | 113 - node_modules/braces/lib/parse.js | 331 - node_modules/braces/lib/stringify.js | 32 - node_modules/braces/lib/utils.js | 122 - node_modules/braces/package.json | 77 - node_modules/call-of-duty-api/dist/index.d.ts | 118 - node_modules/call-of-duty-api/dist/index.js | 766 -- .../call-of-duty-api/dist/index.js.map | 1 - .../dist/wz-data/game-modes.json | 153 - .../dist/wz-data/weapon-ids.json | 236 - node_modules/call-of-duty-api/package.json | 63 - node_modules/chalk/index.d.ts | 415 - .../chalk/node_modules/ansi-styles/index.d.ts | 345 - .../chalk/node_modules/ansi-styles/index.js | 163 - .../node_modules/ansi-styles/package.json | 56 - .../chalk/node_modules/has-flag/index.d.ts | 39 - .../chalk/node_modules/has-flag/index.js | 8 - .../chalk/node_modules/has-flag/package.json | 46 - .../node_modules/supports-color/browser.js | 5 - .../node_modules/supports-color/index.js | 135 - .../node_modules/supports-color/package.json | 53 - node_modules/chalk/package.json | 68 - node_modules/chalk/source/index.js | 229 - node_modules/chalk/source/templates.js | 134 - node_modules/chalk/source/util.js | 39 - .../cheerio-select/lib/esm/helpers.d.ts | 5 - .../cheerio-select/lib/esm/helpers.d.ts.map | 1 - .../cheerio-select/lib/esm/helpers.js | 20 - .../cheerio-select/lib/esm/helpers.js.map | 1 - .../cheerio-select/lib/esm/index.d.ts | 12 - .../cheerio-select/lib/esm/index.d.ts.map | 1 - node_modules/cheerio-select/lib/esm/index.js | 241 - .../cheerio-select/lib/esm/index.js.map | 1 - .../cheerio-select/lib/esm/package.json | 1 - .../cheerio-select/lib/esm/positionals.d.ts | 10 - .../lib/esm/positionals.d.ts.map | 1 - .../cheerio-select/lib/esm/positionals.js | 47 - .../cheerio-select/lib/esm/positionals.js.map | 1 - node_modules/cheerio-select/lib/helpers.d.ts | 5 - .../cheerio-select/lib/helpers.d.ts.map | 1 - node_modules/cheerio-select/lib/helpers.js | 26 - .../cheerio-select/lib/helpers.js.map | 1 - node_modules/cheerio-select/lib/index.d.ts | 12 - .../cheerio-select/lib/index.d.ts.map | 1 - node_modules/cheerio-select/lib/index.js | 302 - node_modules/cheerio-select/lib/index.js.map | 1 - .../cheerio-select/lib/positionals.d.ts | 10 - .../cheerio-select/lib/positionals.d.ts.map | 1 - .../cheerio-select/lib/positionals.js | 52 - .../cheerio-select/lib/positionals.js.map | 1 - node_modules/cheerio-select/package.json | 76 - .../cheerio/dist/browser/api/attributes.d.ts | 385 - .../dist/browser/api/attributes.d.ts.map | 1 - .../cheerio/dist/browser/api/attributes.js | 619 -- .../dist/browser/api/attributes.js.map | 1 - .../cheerio/dist/browser/api/css.d.ts | 42 - .../cheerio/dist/browser/api/css.d.ts.map | 1 - node_modules/cheerio/dist/browser/api/css.js | 116 - .../cheerio/dist/browser/api/css.js.map | 1 - .../cheerio/dist/browser/api/extract.d.ts | 29 - .../cheerio/dist/browser/api/extract.d.ts.map | 1 - .../cheerio/dist/browser/api/extract.js | 42 - .../cheerio/dist/browser/api/extract.js.map | 1 - .../cheerio/dist/browser/api/forms.d.ts | 36 - .../cheerio/dist/browser/api/forms.d.ts.map | 1 - .../cheerio/dist/browser/api/forms.js | 81 - .../cheerio/dist/browser/api/forms.js.map | 1 - .../dist/browser/api/manipulation.d.ts | 528 - .../dist/browser/api/manipulation.d.ts.map | 1 - .../cheerio/dist/browser/api/manipulation.js | 829 -- .../dist/browser/api/manipulation.js.map | 1 - .../cheerio/dist/browser/api/traversing.d.ts | 657 -- .../dist/browser/api/traversing.d.ts.map | 1 - .../cheerio/dist/browser/api/traversing.js | 853 -- .../dist/browser/api/traversing.js.map | 1 - .../cheerio/dist/browser/cheerio.d.ts | 85 - .../cheerio/dist/browser/cheerio.d.ts.map | 1 - node_modules/cheerio/dist/browser/cheerio.js | 58 - .../cheerio/dist/browser/cheerio.js.map | 1 - .../dist/browser/index-browser.d.mts.map | 1 - .../dist/browser/index-browser.mjs.map | 1 - node_modules/cheerio/dist/browser/index.d.ts | 5 - node_modules/cheerio/dist/browser/index.js | 3 - .../cheerio/dist/browser/load-parse.d.ts | 20 - .../cheerio/dist/browser/load-parse.d.ts.map | 1 - .../cheerio/dist/browser/load-parse.js | 28 - .../cheerio/dist/browser/load-parse.js.map | 1 - node_modules/cheerio/dist/browser/load.d.ts | 91 - .../cheerio/dist/browser/load.d.ts.map | 1 - node_modules/cheerio/dist/browser/load.js | 123 - node_modules/cheerio/dist/browser/load.js.map | 1 - .../cheerio/dist/browser/options.d.ts | 95 - .../cheerio/dist/browser/options.d.ts.map | 1 - node_modules/cheerio/dist/browser/options.js | 34 - .../cheerio/dist/browser/options.js.map | 1 - .../cheerio/dist/browser/package.json | 3 - node_modules/cheerio/dist/browser/parse.d.ts | 18 - .../cheerio/dist/browser/parse.d.ts.map | 1 - node_modules/cheerio/dist/browser/parse.js | 73 - .../cheerio/dist/browser/parse.js.map | 1 - .../dist/browser/parsers/parse5-adapter.d.ts | 20 - .../browser/parsers/parse5-adapter.d.ts.map | 1 - .../dist/browser/parsers/parse5-adapter.js | 50 - .../browser/parsers/parse5-adapter.js.map | 1 - node_modules/cheerio/dist/browser/slim.d.ts | 25 - .../cheerio/dist/browser/slim.d.ts.map | 1 - node_modules/cheerio/dist/browser/slim.js | 22 - node_modules/cheerio/dist/browser/slim.js.map | 1 - node_modules/cheerio/dist/browser/static.d.ts | 112 - .../cheerio/dist/browser/static.d.ts.map | 1 - node_modules/cheerio/dist/browser/static.js | 204 - .../cheerio/dist/browser/static.js.map | 1 - node_modules/cheerio/dist/browser/types.d.ts | 21 - .../cheerio/dist/browser/types.d.ts.map | 1 - node_modules/cheerio/dist/browser/types.js | 3 - .../cheerio/dist/browser/types.js.map | 1 - node_modules/cheerio/dist/browser/utils.d.ts | 55 - .../cheerio/dist/browser/utils.d.ts.map | 1 - node_modules/cheerio/dist/browser/utils.js | 81 - .../cheerio/dist/browser/utils.js.map | 1 - .../cheerio/dist/commonjs/api/attributes.d.ts | 385 - .../dist/commonjs/api/attributes.d.ts.map | 1 - .../cheerio/dist/commonjs/api/attributes.js | 630 -- .../dist/commonjs/api/attributes.js.map | 1 - .../cheerio/dist/commonjs/api/css.d.ts | 42 - .../cheerio/dist/commonjs/api/css.d.ts.map | 1 - node_modules/cheerio/dist/commonjs/api/css.js | 119 - .../cheerio/dist/commonjs/api/css.js.map | 1 - .../cheerio/dist/commonjs/api/extract.d.ts | 29 - .../dist/commonjs/api/extract.d.ts.map | 1 - .../cheerio/dist/commonjs/api/extract.js | 45 - .../cheerio/dist/commonjs/api/extract.js.map | 1 - .../cheerio/dist/commonjs/api/forms.d.ts | 36 - .../cheerio/dist/commonjs/api/forms.d.ts.map | 1 - .../cheerio/dist/commonjs/api/forms.js | 85 - .../cheerio/dist/commonjs/api/forms.js.map | 1 - .../dist/commonjs/api/manipulation.d.ts | 528 - .../dist/commonjs/api/manipulation.d.ts.map | 1 - .../cheerio/dist/commonjs/api/manipulation.js | 848 -- .../dist/commonjs/api/manipulation.js.map | 1 - .../cheerio/dist/commonjs/api/traversing.d.ts | 657 -- .../dist/commonjs/api/traversing.d.ts.map | 1 - .../cheerio/dist/commonjs/api/traversing.js | 900 -- .../dist/commonjs/api/traversing.js.map | 1 - .../cheerio/dist/commonjs/cheerio.d.ts | 85 - .../cheerio/dist/commonjs/cheerio.d.ts.map | 1 - node_modules/cheerio/dist/commonjs/cheerio.js | 85 - .../cheerio/dist/commonjs/cheerio.js.map | 1 - node_modules/cheerio/dist/commonjs/index.d.ts | 104 - .../cheerio/dist/commonjs/index.d.ts.map | 1 - node_modules/cheerio/dist/commonjs/index.js | 229 - .../cheerio/dist/commonjs/index.js.map | 1 - .../cheerio/dist/commonjs/load-parse.d.ts | 20 - .../cheerio/dist/commonjs/load-parse.d.ts.map | 1 - .../cheerio/dist/commonjs/load-parse.js | 34 - .../cheerio/dist/commonjs/load-parse.js.map | 1 - node_modules/cheerio/dist/commonjs/load.d.ts | 91 - .../cheerio/dist/commonjs/load.d.ts.map | 1 - node_modules/cheerio/dist/commonjs/load.js | 149 - .../cheerio/dist/commonjs/load.js.map | 1 - .../cheerio/dist/commonjs/options.d.ts | 95 - .../cheerio/dist/commonjs/options.d.ts.map | 1 - node_modules/cheerio/dist/commonjs/options.js | 37 - .../cheerio/dist/commonjs/options.js.map | 1 - .../cheerio/dist/commonjs/package.json | 3 - node_modules/cheerio/dist/commonjs/parse.d.ts | 18 - .../cheerio/dist/commonjs/parse.d.ts.map | 1 - node_modules/cheerio/dist/commonjs/parse.js | 77 - .../cheerio/dist/commonjs/parse.js.map | 1 - .../dist/commonjs/parsers/parse5-adapter.d.ts | 20 - .../commonjs/parsers/parse5-adapter.d.ts.map | 1 - .../dist/commonjs/parsers/parse5-adapter.js | 54 - .../commonjs/parsers/parse5-adapter.js.map | 1 - node_modules/cheerio/dist/commonjs/slim.d.ts | 25 - .../cheerio/dist/commonjs/slim.d.ts.map | 1 - node_modules/cheerio/dist/commonjs/slim.js | 30 - .../cheerio/dist/commonjs/slim.js.map | 1 - .../cheerio/dist/commonjs/static.d.ts | 112 - .../cheerio/dist/commonjs/static.d.ts.map | 1 - node_modules/cheerio/dist/commonjs/static.js | 214 - .../cheerio/dist/commonjs/static.js.map | 1 - node_modules/cheerio/dist/commonjs/types.d.ts | 21 - .../cheerio/dist/commonjs/types.d.ts.map | 1 - node_modules/cheerio/dist/commonjs/types.js | 4 - .../cheerio/dist/commonjs/types.js.map | 1 - node_modules/cheerio/dist/commonjs/utils.d.ts | 55 - .../cheerio/dist/commonjs/utils.d.ts.map | 1 - node_modules/cheerio/dist/commonjs/utils.js | 88 - .../cheerio/dist/commonjs/utils.js.map | 1 - .../cheerio/dist/esm/api/attributes.d.ts | 385 - .../cheerio/dist/esm/api/attributes.d.ts.map | 1 - .../cheerio/dist/esm/api/attributes.js | 619 -- .../cheerio/dist/esm/api/attributes.js.map | 1 - node_modules/cheerio/dist/esm/api/css.d.ts | 42 - .../cheerio/dist/esm/api/css.d.ts.map | 1 - node_modules/cheerio/dist/esm/api/css.js | 116 - node_modules/cheerio/dist/esm/api/css.js.map | 1 - .../cheerio/dist/esm/api/extract.d.ts | 29 - .../cheerio/dist/esm/api/extract.d.ts.map | 1 - node_modules/cheerio/dist/esm/api/extract.js | 42 - .../cheerio/dist/esm/api/extract.js.map | 1 - node_modules/cheerio/dist/esm/api/forms.d.ts | 36 - .../cheerio/dist/esm/api/forms.d.ts.map | 1 - node_modules/cheerio/dist/esm/api/forms.js | 81 - .../cheerio/dist/esm/api/forms.js.map | 1 - .../cheerio/dist/esm/api/manipulation.d.ts | 528 - .../dist/esm/api/manipulation.d.ts.map | 1 - .../cheerio/dist/esm/api/manipulation.js | 829 -- .../cheerio/dist/esm/api/manipulation.js.map | 1 - .../cheerio/dist/esm/api/traversing.d.ts | 657 -- .../cheerio/dist/esm/api/traversing.d.ts.map | 1 - .../cheerio/dist/esm/api/traversing.js | 853 -- .../cheerio/dist/esm/api/traversing.js.map | 1 - node_modules/cheerio/dist/esm/cheerio.d.ts | 85 - .../cheerio/dist/esm/cheerio.d.ts.map | 1 - node_modules/cheerio/dist/esm/cheerio.js | 58 - node_modules/cheerio/dist/esm/cheerio.js.map | 1 - node_modules/cheerio/dist/esm/index.d.ts | 104 - node_modules/cheerio/dist/esm/index.d.ts.map | 1 - node_modules/cheerio/dist/esm/index.js | 191 - node_modules/cheerio/dist/esm/index.js.map | 1 - node_modules/cheerio/dist/esm/load-parse.d.ts | 20 - .../cheerio/dist/esm/load-parse.d.ts.map | 1 - node_modules/cheerio/dist/esm/load-parse.js | 28 - .../cheerio/dist/esm/load-parse.js.map | 1 - node_modules/cheerio/dist/esm/load.d.ts | 91 - node_modules/cheerio/dist/esm/load.d.ts.map | 1 - node_modules/cheerio/dist/esm/load.js | 123 - node_modules/cheerio/dist/esm/load.js.map | 1 - node_modules/cheerio/dist/esm/options.d.ts | 95 - .../cheerio/dist/esm/options.d.ts.map | 1 - node_modules/cheerio/dist/esm/options.js | 34 - node_modules/cheerio/dist/esm/options.js.map | 1 - node_modules/cheerio/dist/esm/package.json | 3 - node_modules/cheerio/dist/esm/parse.d.ts | 18 - node_modules/cheerio/dist/esm/parse.d.ts.map | 1 - node_modules/cheerio/dist/esm/parse.js | 73 - node_modules/cheerio/dist/esm/parse.js.map | 1 - .../dist/esm/parsers/parse5-adapter.d.ts | 20 - .../dist/esm/parsers/parse5-adapter.d.ts.map | 1 - .../dist/esm/parsers/parse5-adapter.js | 50 - .../dist/esm/parsers/parse5-adapter.js.map | 1 - node_modules/cheerio/dist/esm/slim.d.ts | 25 - node_modules/cheerio/dist/esm/slim.d.ts.map | 1 - node_modules/cheerio/dist/esm/slim.js | 22 - node_modules/cheerio/dist/esm/slim.js.map | 1 - node_modules/cheerio/dist/esm/static.d.ts | 112 - node_modules/cheerio/dist/esm/static.d.ts.map | 1 - node_modules/cheerio/dist/esm/static.js | 204 - node_modules/cheerio/dist/esm/static.js.map | 1 - node_modules/cheerio/dist/esm/types.d.ts | 21 - node_modules/cheerio/dist/esm/types.d.ts.map | 1 - node_modules/cheerio/dist/esm/types.js | 3 - node_modules/cheerio/dist/esm/types.js.map | 1 - node_modules/cheerio/dist/esm/utils.d.ts | 55 - node_modules/cheerio/dist/esm/utils.d.ts.map | 1 - node_modules/cheerio/dist/esm/utils.js | 81 - node_modules/cheerio/dist/esm/utils.js.map | 1 - .../node_modules/undici/index-fetch.js | 32 - .../cheerio/node_modules/undici/index.d.ts | 3 - .../cheerio/node_modules/undici/index.js | 169 - .../undici/lib/api/abort-signal.js | 57 - .../undici/lib/api/api-connect.js | 108 - .../undici/lib/api/api-pipeline.js | 251 - .../undici/lib/api/api-request.js | 214 - .../node_modules/undici/lib/api/api-stream.js | 220 - .../undici/lib/api/api-upgrade.js | 108 - .../node_modules/undici/lib/api/index.js | 7 - .../node_modules/undici/lib/api/readable.js | 385 - .../node_modules/undici/lib/api/util.js | 93 - .../node_modules/undici/lib/core/connect.js | 240 - .../node_modules/undici/lib/core/constants.js | 118 - .../undici/lib/core/diagnostics.js | 202 - .../node_modules/undici/lib/core/errors.js | 244 - .../node_modules/undici/lib/core/request.js | 395 - .../node_modules/undici/lib/core/symbols.js | 67 - .../node_modules/undici/lib/core/util.js | 719 -- .../undici/lib/dispatcher/fixed-queue.js | 117 - .../cheerio/node_modules/undici/lib/global.js | 32 - .../undici/lib/handler/decorator-handler.js | 44 - .../undici/lib/interceptor/redirect.js | 24 - .../undici/lib/interceptor/response-error.js | 86 - .../undici/lib/llhttp/constants.js | 278 - .../undici/lib/llhttp/llhttp-wasm.js | 5 - .../undici/lib/llhttp/llhttp_simd-wasm.js | 5 - .../node_modules/undici/lib/llhttp/utils.js | 15 - .../undici/lib/mock/mock-agent.js | 160 - .../undici/lib/mock/mock-client.js | 59 - .../undici/lib/mock/mock-errors.js | 17 - .../undici/lib/mock/mock-interceptor.js | 207 - .../node_modules/undici/lib/mock/mock-pool.js | 59 - .../undici/lib/mock/mock-symbols.js | 23 - .../undici/lib/mock/mock-utils.js | 367 - .../mock/pending-interceptors-formatter.js | 43 - .../undici/lib/mock/pluralizer.js | 29 - .../undici/lib/web/cache/symbols.js | 5 - .../node_modules/undici/lib/web/fetch/file.js | 126 - .../undici/lib/web/fetch/symbols.js | 9 - .../undici/lib/web/fileapi/encoding.js | 290 - .../undici/lib/web/fileapi/filereader.js | 344 - .../undici/lib/web/fileapi/progressevent.js | 78 - .../undici/lib/web/fileapi/symbols.js | 10 - .../undici/lib/web/fileapi/util.js | 391 - .../undici/lib/web/websocket/constants.js | 66 - .../undici/lib/web/websocket/symbols.js | 12 - .../cheerio/node_modules/undici/package.json | 160 - .../node_modules/undici/types/agent.d.ts | 31 - .../node_modules/undici/types/api.d.ts | 43 - .../undici/types/balanced-pool.d.ts | 29 - .../node_modules/undici/types/cache.d.ts | 36 - .../node_modules/undici/types/client.d.ts | 108 - .../node_modules/undici/types/connector.d.ts | 34 - .../undici/types/content-type.d.ts | 21 - .../node_modules/undici/types/cookies.d.ts | 28 - .../undici/types/diagnostics-channel.d.ts | 66 - .../node_modules/undici/types/dispatcher.d.ts | 256 - .../node_modules/undici/types/errors.d.ts | 149 - .../node_modules/undici/types/fetch.d.ts | 209 - .../node_modules/undici/types/file.d.ts | 39 - .../node_modules/undici/types/filereader.d.ts | 54 - .../node_modules/undici/types/formdata.d.ts | 108 - .../undici/types/global-dispatcher.d.ts | 9 - .../undici/types/global-origin.d.ts | 7 - .../node_modules/undici/types/handlers.d.ts | 15 - .../node_modules/undici/types/header.d.ts | 4 - .../node_modules/undici/types/index.d.ts | 71 - .../undici/types/interceptors.d.ts | 32 - .../node_modules/undici/types/mock-agent.d.ts | 50 - .../undici/types/mock-client.d.ts | 25 - .../undici/types/mock-errors.d.ts | 12 - .../undici/types/mock-interceptor.d.ts | 93 - .../node_modules/undici/types/mock-pool.d.ts | 25 - .../node_modules/undici/types/patch.d.ts | 33 - .../node_modules/undici/types/pool-stats.d.ts | 19 - .../node_modules/undici/types/pool.d.ts | 39 - .../undici/types/proxy-agent.d.ts | 28 - .../node_modules/undici/types/readable.d.ts | 65 - .../undici/types/retry-handler.d.ts | 116 - .../node_modules/undici/types/webidl.d.ts | 228 - .../node_modules/undici/types/websocket.d.ts | 150 - node_modules/cheerio/package.json | 178 - .../cheerio/src/__fixtures__/fixtures.ts | 147 - .../cheerio/src/__tests__/deprecated.spec.ts | 266 - .../cheerio/src/__tests__/xml.spec.ts | 66 - .../cheerio/src/api/attributes.spec.ts | 1165 -- node_modules/cheerio/src/api/attributes.ts | 1130 -- node_modules/cheerio/src/api/css.spec.ts | 138 - node_modules/cheerio/src/api/css.ts | 224 - node_modules/cheerio/src/api/extract.spec.ts | 121 - node_modules/cheerio/src/api/extract.ts | 92 - node_modules/cheerio/src/api/forms.spec.ts | 155 - node_modules/cheerio/src/api/forms.ts | 103 - .../cheerio/src/api/manipulation.spec.ts | 1988 ---- node_modules/cheerio/src/api/manipulation.ts | 1111 -- .../cheerio/src/api/traversing.spec.ts | 1677 --- node_modules/cheerio/src/api/traversing.ts | 1171 --- node_modules/cheerio/src/cheerio.spec.ts | 455 - node_modules/cheerio/src/cheerio.ts | 143 - node_modules/cheerio/src/index-browser.mts | 10 - node_modules/cheerio/src/index.spec.ts | 180 - node_modules/cheerio/src/index.ts | 274 - node_modules/cheerio/src/load-parse.ts | 39 - node_modules/cheerio/src/load.spec.ts | 31 - node_modules/cheerio/src/load.ts | 277 - node_modules/cheerio/src/options.ts | 135 - node_modules/cheerio/src/parse.spec.ts | 452 - node_modules/cheerio/src/parse.ts | 105 - .../cheerio/src/parsers/parse5-adapter.ts | 66 - node_modules/cheerio/src/slim.ts | 33 - node_modules/cheerio/src/static.spec.ts | 325 - node_modules/cheerio/src/static.ts | 312 - node_modules/cheerio/src/types.ts | 58 - node_modules/cheerio/src/utils.spec.ts | 32 - node_modules/cheerio/src/utils.ts | 93 - node_modules/chokidar/index.js | 973 -- node_modules/chokidar/lib/constants.js | 66 - node_modules/chokidar/lib/fsevents-handler.js | 526 - node_modules/chokidar/lib/nodefs-handler.js | 654 -- node_modules/chokidar/package.json | 70 - node_modules/chokidar/types/index.d.ts | 192 - node_modules/cliui/build/index.cjs | 302 - node_modules/cliui/build/lib/index.js | 287 - node_modules/cliui/build/lib/string-utils.js | 27 - node_modules/cliui/index.mjs | 13 - .../cliui/node_modules/ansi-regex/index.d.ts | 37 - .../cliui/node_modules/ansi-regex/index.js | 10 - .../node_modules/ansi-regex/package.json | 55 - .../cliui/node_modules/ansi-styles/index.d.ts | 345 - .../cliui/node_modules/ansi-styles/index.js | 163 - .../node_modules/ansi-styles/package.json | 56 - .../node_modules/emoji-regex/es2015/index.js | 6 - .../node_modules/emoji-regex/es2015/text.js | 6 - .../cliui/node_modules/emoji-regex/index.d.ts | 23 - .../cliui/node_modules/emoji-regex/index.js | 6 - .../node_modules/emoji-regex/package.json | 50 - .../cliui/node_modules/emoji-regex/text.js | 6 - .../node_modules/string-width/index.d.ts | 29 - .../cliui/node_modules/string-width/index.js | 47 - .../node_modules/string-width/package.json | 56 - .../cliui/node_modules/strip-ansi/index.d.ts | 17 - .../cliui/node_modules/strip-ansi/index.js | 4 - .../node_modules/strip-ansi/package.json | 54 - .../cliui/node_modules/wrap-ansi/index.js | 216 - .../cliui/node_modules/wrap-ansi/package.json | 62 - node_modules/cliui/package.json | 83 - node_modules/concat-map/example/map.js | 6 - node_modules/concat-map/index.js | 13 - node_modules/concat-map/package.json | 43 - node_modules/css-select/lib/attributes.d.ts | 7 - .../css-select/lib/attributes.d.ts.map | 1 - node_modules/css-select/lib/attributes.js | 236 - node_modules/css-select/lib/attributes.js.map | 1 - node_modules/css-select/lib/compile.d.ts | 13 - node_modules/css-select/lib/compile.d.ts.map | 1 - node_modules/css-select/lib/compile.js | 151 - node_modules/css-select/lib/compile.js.map | 1 - .../css-select/lib/esm/attributes.d.ts | 7 - .../css-select/lib/esm/attributes.d.ts.map | 1 - node_modules/css-select/lib/esm/attributes.js | 222 - .../css-select/lib/esm/attributes.js.map | 1 - node_modules/css-select/lib/esm/compile.d.ts | 13 - .../css-select/lib/esm/compile.d.ts.map | 1 - node_modules/css-select/lib/esm/compile.js | 115 - .../css-select/lib/esm/compile.js.map | 1 - node_modules/css-select/lib/esm/general.d.ts | 3 - .../css-select/lib/esm/general.d.ts.map | 1 - node_modules/css-select/lib/esm/general.js | 144 - .../css-select/lib/esm/general.js.map | 1 - node_modules/css-select/lib/esm/index.d.ts | 50 - .../css-select/lib/esm/index.d.ts.map | 1 - node_modules/css-select/lib/esm/index.js | 115 - node_modules/css-select/lib/esm/index.js.map | 1 - node_modules/css-select/lib/esm/package.json | 1 - .../lib/esm/pseudo-selectors/aliases.d.ts | 5 - .../lib/esm/pseudo-selectors/aliases.d.ts.map | 1 - .../lib/esm/pseudo-selectors/aliases.js | 35 - .../lib/esm/pseudo-selectors/aliases.js.map | 1 - .../lib/esm/pseudo-selectors/filters.d.ts | 4 - .../lib/esm/pseudo-selectors/filters.d.ts.map | 1 - .../lib/esm/pseudo-selectors/filters.js | 143 - .../lib/esm/pseudo-selectors/filters.js.map | 1 - .../lib/esm/pseudo-selectors/index.d.ts | 8 - .../lib/esm/pseudo-selectors/index.d.ts.map | 1 - .../lib/esm/pseudo-selectors/index.js | 40 - .../lib/esm/pseudo-selectors/index.js.map | 1 - .../lib/esm/pseudo-selectors/pseudos.d.ts | 6 - .../lib/esm/pseudo-selectors/pseudos.d.ts.map | 1 - .../lib/esm/pseudo-selectors/pseudos.js | 79 - .../lib/esm/pseudo-selectors/pseudos.js.map | 1 - .../lib/esm/pseudo-selectors/subselects.d.ts | 9 - .../esm/pseudo-selectors/subselects.d.ts.map | 1 - .../lib/esm/pseudo-selectors/subselects.js | 94 - .../esm/pseudo-selectors/subselects.js.map | 1 - node_modules/css-select/lib/esm/sort.d.ts | 12 - node_modules/css-select/lib/esm/sort.d.ts.map | 1 - node_modules/css-select/lib/esm/sort.js | 79 - node_modules/css-select/lib/esm/sort.js.map | 1 - node_modules/css-select/lib/esm/types.d.ts | 167 - .../css-select/lib/esm/types.d.ts.map | 1 - node_modules/css-select/lib/esm/types.js | 2 - node_modules/css-select/lib/esm/types.js.map | 1 - node_modules/css-select/lib/general.d.ts | 3 - node_modules/css-select/lib/general.d.ts.map | 1 - node_modules/css-select/lib/general.js | 148 - node_modules/css-select/lib/general.js.map | 1 - node_modules/css-select/lib/index.d.ts | 50 - node_modules/css-select/lib/index.d.ts.map | 1 - node_modules/css-select/lib/index.js | 154 - node_modules/css-select/lib/index.js.map | 1 - .../lib/pseudo-selectors/aliases.d.ts | 5 - .../lib/pseudo-selectors/aliases.d.ts.map | 1 - .../lib/pseudo-selectors/aliases.js | 34 - .../lib/pseudo-selectors/aliases.js.map | 1 - .../lib/pseudo-selectors/filters.d.ts | 4 - .../lib/pseudo-selectors/filters.d.ts.map | 1 - .../lib/pseudo-selectors/filters.js | 157 - .../lib/pseudo-selectors/filters.js.map | 1 - .../lib/pseudo-selectors/index.d.ts | 8 - .../lib/pseudo-selectors/index.d.ts.map | 1 - .../css-select/lib/pseudo-selectors/index.js | 46 - .../lib/pseudo-selectors/index.js.map | 1 - .../lib/pseudo-selectors/pseudos.d.ts | 6 - .../lib/pseudo-selectors/pseudos.d.ts.map | 1 - .../lib/pseudo-selectors/pseudos.js | 93 - .../lib/pseudo-selectors/pseudos.js.map | 1 - .../lib/pseudo-selectors/subselects.d.ts | 9 - .../lib/pseudo-selectors/subselects.d.ts.map | 1 - .../lib/pseudo-selectors/subselects.js | 112 - .../lib/pseudo-selectors/subselects.js.map | 1 - node_modules/css-select/lib/sort.d.ts | 12 - node_modules/css-select/lib/sort.d.ts.map | 1 - node_modules/css-select/lib/sort.js | 84 - node_modules/css-select/lib/sort.js.map | 1 - node_modules/css-select/lib/types.d.ts | 167 - node_modules/css-select/lib/types.d.ts.map | 1 - node_modules/css-select/lib/types.js | 3 - node_modules/css-select/lib/types.js.map | 1 - node_modules/css-select/package.json | 81 - node_modules/css-what/lib/commonjs/index.d.ts | 4 - .../css-what/lib/commonjs/index.d.ts.map | 1 - node_modules/css-what/lib/commonjs/index.js | 23 - node_modules/css-what/lib/commonjs/parse.d.ts | 20 - .../css-what/lib/commonjs/parse.d.ts.map | 1 - node_modules/css-what/lib/commonjs/parse.js | 425 - .../css-what/lib/commonjs/stringify.d.ts | 8 - .../css-what/lib/commonjs/stringify.d.ts.map | 1 - .../css-what/lib/commonjs/stringify.js | 138 - node_modules/css-what/lib/commonjs/types.d.ts | 70 - .../css-what/lib/commonjs/types.d.ts.map | 1 - node_modules/css-what/lib/commonjs/types.js | 42 - node_modules/css-what/lib/es/index.d.ts | 4 - node_modules/css-what/lib/es/index.d.ts.map | 1 - node_modules/css-what/lib/es/index.js | 3 - node_modules/css-what/lib/es/parse.d.ts | 20 - node_modules/css-what/lib/es/parse.d.ts.map | 1 - node_modules/css-what/lib/es/parse.js | 420 - node_modules/css-what/lib/es/stringify.d.ts | 8 - .../css-what/lib/es/stringify.d.ts.map | 1 - node_modules/css-what/lib/es/stringify.js | 126 - node_modules/css-what/lib/es/types.d.ts | 70 - node_modules/css-what/lib/es/types.d.ts.map | 1 - node_modules/css-what/lib/es/types.js | 39 - node_modules/css-what/package.json | 59 - .../dom-serializer/lib/esm/foreignNames.d.ts | 3 - .../lib/esm/foreignNames.d.ts.map | 1 - .../dom-serializer/lib/esm/foreignNames.js | 100 - .../dom-serializer/lib/esm/index.d.ts | 52 - .../dom-serializer/lib/esm/index.d.ts.map | 1 - node_modules/dom-serializer/lib/esm/index.js | 190 - .../dom-serializer/lib/esm/package.json | 1 - .../dom-serializer/lib/foreignNames.d.ts | 3 - .../dom-serializer/lib/foreignNames.d.ts.map | 1 - .../dom-serializer/lib/foreignNames.js | 103 - node_modules/dom-serializer/lib/index.d.ts | 52 - .../dom-serializer/lib/index.d.ts.map | 1 - node_modules/dom-serializer/lib/index.js | 229 - node_modules/dom-serializer/package.json | 69 - .../domelementtype/lib/esm/index.d.ts | 48 - .../domelementtype/lib/esm/index.d.ts.map | 1 - node_modules/domelementtype/lib/esm/index.js | 51 - .../domelementtype/lib/esm/package.json | 1 - node_modules/domelementtype/lib/index.d.ts | 48 - .../domelementtype/lib/index.d.ts.map | 1 - node_modules/domelementtype/lib/index.js | 55 - node_modules/domelementtype/package.json | 54 - node_modules/domhandler/lib/esm/index.d.ts | 76 - .../domhandler/lib/esm/index.d.ts.map | 1 - node_modules/domhandler/lib/esm/index.js | 146 - node_modules/domhandler/lib/esm/node.d.ts | 245 - node_modules/domhandler/lib/esm/node.d.ts.map | 1 - node_modules/domhandler/lib/esm/node.js | 338 - node_modules/domhandler/lib/esm/package.json | 1 - node_modules/domhandler/lib/index.d.ts | 76 - node_modules/domhandler/lib/index.d.ts.map | 1 - node_modules/domhandler/lib/index.js | 165 - node_modules/domhandler/lib/node.d.ts | 245 - node_modules/domhandler/lib/node.d.ts.map | 1 - node_modules/domhandler/lib/node.js | 474 - node_modules/domhandler/package.json | 73 - node_modules/domutils/lib/esm/feeds.d.ts | 71 - node_modules/domutils/lib/esm/feeds.d.ts.map | 1 - node_modules/domutils/lib/esm/feeds.js | 183 - node_modules/domutils/lib/esm/feeds.js.map | 1 - node_modules/domutils/lib/esm/helpers.d.ts | 59 - .../domutils/lib/esm/helpers.d.ts.map | 1 - node_modules/domutils/lib/esm/helpers.js | 136 - node_modules/domutils/lib/esm/helpers.js.map | 1 - node_modules/domutils/lib/esm/index.d.ts | 10 - node_modules/domutils/lib/esm/index.d.ts.map | 1 - node_modules/domutils/lib/esm/index.js | 10 - node_modules/domutils/lib/esm/index.js.map | 1 - node_modules/domutils/lib/esm/legacy.d.ts | 79 - node_modules/domutils/lib/esm/legacy.d.ts.map | 1 - node_modules/domutils/lib/esm/legacy.js | 152 - node_modules/domutils/lib/esm/legacy.js.map | 1 - .../domutils/lib/esm/manipulation.d.ts | 49 - .../domutils/lib/esm/manipulation.d.ts.map | 1 - node_modules/domutils/lib/esm/manipulation.js | 134 - .../domutils/lib/esm/manipulation.js.map | 1 - node_modules/domutils/lib/esm/package.json | 1 - node_modules/domutils/lib/esm/querying.d.ts | 64 - .../domutils/lib/esm/querying.d.ts.map | 1 - node_modules/domutils/lib/esm/querying.js | 142 - node_modules/domutils/lib/esm/querying.js.map | 1 - node_modules/domutils/lib/esm/stringify.d.ts | 46 - .../domutils/lib/esm/stringify.d.ts.map | 1 - node_modules/domutils/lib/esm/stringify.js | 81 - .../domutils/lib/esm/stringify.js.map | 1 - node_modules/domutils/lib/esm/traversal.d.ts | 67 - .../domutils/lib/esm/traversal.d.ts.map | 1 - node_modules/domutils/lib/esm/traversal.js | 112 - .../domutils/lib/esm/traversal.js.map | 1 - node_modules/domutils/lib/feeds.d.ts | 71 - node_modules/domutils/lib/feeds.d.ts.map | 1 - node_modules/domutils/lib/feeds.js | 190 - node_modules/domutils/lib/feeds.js.map | 1 - node_modules/domutils/lib/helpers.d.ts | 59 - node_modules/domutils/lib/helpers.d.ts.map | 1 - node_modules/domutils/lib/helpers.js | 142 - node_modules/domutils/lib/helpers.js.map | 1 - node_modules/domutils/lib/index.d.ts | 10 - node_modules/domutils/lib/index.d.ts.map | 1 - node_modules/domutils/lib/index.js | 33 - node_modules/domutils/lib/index.js.map | 1 - node_modules/domutils/lib/legacy.d.ts | 79 - node_modules/domutils/lib/legacy.d.ts.map | 1 - node_modules/domutils/lib/legacy.js | 168 - node_modules/domutils/lib/legacy.js.map | 1 - node_modules/domutils/lib/manipulation.d.ts | 49 - .../domutils/lib/manipulation.d.ts.map | 1 - node_modules/domutils/lib/manipulation.js | 142 - node_modules/domutils/lib/manipulation.js.map | 1 - node_modules/domutils/lib/querying.d.ts | 64 - node_modules/domutils/lib/querying.d.ts.map | 1 - node_modules/domutils/lib/querying.js | 155 - node_modules/domutils/lib/querying.js.map | 1 - node_modules/domutils/lib/stringify.d.ts | 46 - node_modules/domutils/lib/stringify.d.ts.map | 1 - node_modules/domutils/lib/stringify.js | 91 - node_modules/domutils/lib/stringify.js.map | 1 - node_modules/domutils/lib/traversal.d.ts | 67 - node_modules/domutils/lib/traversal.d.ts.map | 1 - node_modules/domutils/lib/traversal.js | 125 - node_modules/domutils/lib/traversal.js.map | 1 - node_modules/domutils/package.json | 79 - .../encoding-sniffer/dist/commonjs/index.d.ts | 33 - .../dist/commonjs/index.d.ts.map | 1 - .../encoding-sniffer/dist/commonjs/index.js | 93 - .../dist/commonjs/index.js.map | 1 - .../dist/commonjs/package.json | 3 - .../dist/commonjs/sniffer.d.ts | 148 - .../dist/commonjs/sniffer.d.ts.map | 1 - .../encoding-sniffer/dist/commonjs/sniffer.js | 992 -- .../dist/commonjs/sniffer.js.map | 1 - .../encoding-sniffer/dist/esm/index.d.ts | 33 - .../encoding-sniffer/dist/esm/index.d.ts.map | 1 - .../encoding-sniffer/dist/esm/index.js | 85 - .../encoding-sniffer/dist/esm/index.js.map | 1 - .../encoding-sniffer/dist/esm/package.json | 3 - .../encoding-sniffer/dist/esm/sniffer.d.ts | 148 - .../dist/esm/sniffer.d.ts.map | 1 - .../encoding-sniffer/dist/esm/sniffer.js | 988 -- .../encoding-sniffer/dist/esm/sniffer.js.map | 1 - .../iconv-lite/encodings/dbcs-codec.js | 597 -- .../iconv-lite/encodings/index.js | 23 - .../iconv-lite/encodings/internal.js | 198 - .../encodings/tables/gbk-added.json | 56 - .../node_modules/iconv-lite/lib/index.d.ts | 41 - .../node_modules/iconv-lite/lib/index.js | 180 - .../node_modules/iconv-lite/lib/streams.js | 109 - node_modules/encoding-sniffer/package.json | 108 - node_modules/entities/lib/decode.d.ts | 211 - node_modules/entities/lib/decode.d.ts.map | 1 - node_modules/entities/lib/decode.js | 536 - node_modules/entities/lib/decode.js.map | 1 - .../entities/lib/decode_codepoint.d.ts | 19 - .../entities/lib/decode_codepoint.d.ts.map | 1 - node_modules/entities/lib/decode_codepoint.js | 76 - .../entities/lib/decode_codepoint.js.map | 1 - node_modules/entities/lib/encode.d.ts | 22 - node_modules/entities/lib/encode.d.ts.map | 1 - node_modules/entities/lib/encode.js | 77 - node_modules/entities/lib/encode.js.map | 1 - node_modules/entities/lib/escape.d.ts | 43 - node_modules/entities/lib/escape.d.ts.map | 1 - node_modules/entities/lib/escape.js | 122 - node_modules/entities/lib/escape.js.map | 1 - node_modules/entities/lib/esm/decode.d.ts | 211 - node_modules/entities/lib/esm/decode.d.ts.map | 1 - node_modules/entities/lib/esm/decode.js | 496 - node_modules/entities/lib/esm/decode.js.map | 1 - .../entities/lib/esm/decode_codepoint.d.ts | 19 - .../lib/esm/decode_codepoint.d.ts.map | 1 - .../entities/lib/esm/decode_codepoint.js | 71 - .../entities/lib/esm/decode_codepoint.js.map | 1 - node_modules/entities/lib/esm/encode.d.ts | 22 - node_modules/entities/lib/esm/encode.d.ts.map | 1 - node_modules/entities/lib/esm/encode.js | 69 - node_modules/entities/lib/esm/encode.js.map | 1 - node_modules/entities/lib/esm/escape.d.ts | 43 - node_modules/entities/lib/esm/escape.d.ts.map | 1 - node_modules/entities/lib/esm/escape.js | 116 - node_modules/entities/lib/esm/escape.js.map | 1 - .../lib/esm/generated/decode-data-html.d.ts | 3 - .../esm/generated/decode-data-html.d.ts.map | 1 - .../lib/esm/generated/decode-data-html.js | 7 - .../lib/esm/generated/decode-data-html.js.map | 1 - .../lib/esm/generated/decode-data-xml.d.ts | 3 - .../esm/generated/decode-data-xml.d.ts.map | 1 - .../lib/esm/generated/decode-data-xml.js | 7 - .../lib/esm/generated/decode-data-xml.js.map | 1 - .../lib/esm/generated/encode-html.d.ts | 8 - .../lib/esm/generated/encode-html.d.ts.map | 1 - .../entities/lib/esm/generated/encode-html.js | 10 - .../lib/esm/generated/encode-html.js.map | 1 - node_modules/entities/lib/esm/index.d.ts | 96 - node_modules/entities/lib/esm/index.d.ts.map | 1 - node_modules/entities/lib/esm/index.js | 99 - node_modules/entities/lib/esm/index.js.map | 1 - node_modules/entities/lib/esm/package.json | 1 - .../lib/generated/decode-data-html.d.ts | 3 - .../lib/generated/decode-data-html.d.ts.map | 1 - .../lib/generated/decode-data-html.js | 9 - .../lib/generated/decode-data-html.js.map | 1 - .../lib/generated/decode-data-xml.d.ts | 3 - .../lib/generated/decode-data-xml.d.ts.map | 1 - .../entities/lib/generated/decode-data-xml.js | 9 - .../lib/generated/decode-data-xml.js.map | 1 - .../entities/lib/generated/encode-html.d.ts | 8 - .../lib/generated/encode-html.d.ts.map | 1 - .../entities/lib/generated/encode-html.js | 12 - .../entities/lib/generated/encode-html.js.map | 1 - node_modules/entities/lib/index.d.ts | 96 - node_modules/entities/lib/index.d.ts.map | 1 - node_modules/entities/lib/index.js | 126 - node_modules/entities/lib/index.js.map | 1 - node_modules/entities/package.json | 90 - node_modules/escalade/dist/index.js | 22 - node_modules/escalade/dist/index.mjs | 22 - node_modules/escalade/index.d.mts | 11 - node_modules/escalade/index.d.ts | 15 - node_modules/escalade/package.json | 74 - node_modules/escalade/sync/index.d.mts | 9 - node_modules/escalade/sync/index.d.ts | 13 - node_modules/escalade/sync/index.js | 18 - node_modules/escalade/sync/index.mjs | 18 - .../express/node_modules/body-parser/index.js | 156 + .../node_modules/body-parser/lib/read.js | 205 + .../body-parser/lib/types/json.js | 247 + .../node_modules/body-parser/lib/types/raw.js | 101 + .../body-parser/lib/types/text.js | 121 + .../body-parser/lib/types/urlencoded.js | 307 + .../node_modules/body-parser/package.json | 56 + .../iconv-lite/encodings/dbcs-codec.js | 144 +- .../iconv-lite/encodings/dbcs-data.js | 14 +- .../iconv-lite/encodings/index.js | 3 +- .../iconv-lite/encodings/internal.js | 14 +- .../iconv-lite/encodings/sbcs-codec.js | 0 .../encodings/sbcs-data-generated.js | 0 .../iconv-lite/encodings/sbcs-data.js | 5 - .../encodings/tables/big5-added.json | 0 .../iconv-lite/encodings/tables/cp936.json | 0 .../iconv-lite/encodings/tables/cp949.json | 0 .../iconv-lite/encodings/tables/cp950.json | 0 .../iconv-lite/encodings/tables/eucjp.json | 0 .../encodings/tables/gb18030-ranges.json | 0 .../encodings/tables/gbk-added.json | 5 +- .../iconv-lite/encodings/tables/shiftjis.json | 0 .../iconv-lite/encodings/utf16.js | 92 +- .../node_modules/iconv-lite/encodings/utf7.js | 8 +- .../iconv-lite/lib/bom-handling.js | 0 .../iconv-lite/lib/extend-node.js | 0 .../node_modules/iconv-lite/lib/index.d.ts | 17 - .../node_modules/iconv-lite/lib/index.js | 51 +- .../node_modules/iconv-lite/lib/streams.js | 121 + .../node_modules/iconv-lite/package.json | 26 +- .../express/node_modules/raw-body/index.d.ts | 87 + .../express/node_modules/raw-body/index.js | 336 + .../node_modules/raw-body/package.json | 49 + node_modules/fill-range/index.js | 248 - node_modules/fill-range/package.json | 74 - node_modules/fs.realpath/index.js | 66 - node_modules/fs.realpath/old.js | 303 - node_modules/fs.realpath/package.json | 26 - node_modules/get-caller-file/index.d.ts | 2 - node_modules/get-caller-file/index.js | 22 - node_modules/get-caller-file/index.js.map | 1 - node_modules/get-caller-file/package.json | 42 - node_modules/glob-parent/index.js | 42 - node_modules/glob-parent/package.json | 48 - node_modules/has-flag/index.js | 8 - node_modules/has-flag/package.json | 44 - node_modules/he/man/he.1 | 78 - node_modules/htmlparser2/lib/Parser.d.ts | 198 - node_modules/htmlparser2/lib/Parser.d.ts.map | 1 - node_modules/htmlparser2/lib/Parser.js | 519 - node_modules/htmlparser2/lib/Parser.js.map | 1 - node_modules/htmlparser2/lib/Tokenizer.d.ts | 126 - .../htmlparser2/lib/Tokenizer.d.ts.map | 1 - node_modules/htmlparser2/lib/Tokenizer.js | 791 -- node_modules/htmlparser2/lib/Tokenizer.js.map | 1 - .../htmlparser2/lib/WritableStream.d.ts | 17 - .../htmlparser2/lib/WritableStream.d.ts.map | 1 - .../htmlparser2/lib/WritableStream.js | 54 - .../htmlparser2/lib/WritableStream.js.map | 1 - node_modules/htmlparser2/lib/esm/Parser.d.ts | 198 - .../htmlparser2/lib/esm/Parser.d.ts.map | 1 - node_modules/htmlparser2/lib/esm/Parser.js | 490 - .../htmlparser2/lib/esm/Parser.js.map | 1 - .../htmlparser2/lib/esm/Tokenizer.d.ts | 126 - .../htmlparser2/lib/esm/Tokenizer.d.ts.map | 1 - node_modules/htmlparser2/lib/esm/Tokenizer.js | 784 -- .../htmlparser2/lib/esm/Tokenizer.js.map | 1 - .../htmlparser2/lib/esm/WritableStream.d.ts | 17 - .../lib/esm/WritableStream.d.ts.map | 1 - .../htmlparser2/lib/esm/WritableStream.js | 32 - .../htmlparser2/lib/esm/WritableStream.js.map | 1 - node_modules/htmlparser2/lib/esm/index.d.ts | 54 - .../htmlparser2/lib/esm/index.d.ts.map | 1 - node_modules/htmlparser2/lib/esm/index.js | 74 - node_modules/htmlparser2/lib/esm/index.js.map | 1 - node_modules/htmlparser2/lib/esm/package.json | 1 - node_modules/htmlparser2/lib/index.d.ts | 54 - node_modules/htmlparser2/lib/index.d.ts.map | 1 - node_modules/htmlparser2/lib/index.js | 114 - node_modules/htmlparser2/lib/index.js.map | 1 - node_modules/htmlparser2/package.json | 97 - .../iconv-lite/encodings/dbcs-codec.js | 144 +- .../iconv-lite/encodings/dbcs-data.js | 14 +- node_modules/iconv-lite/encodings/index.js | 3 +- node_modules/iconv-lite/encodings/internal.js | 14 +- .../iconv-lite/encodings/sbcs-data.js | 5 + .../encodings/tables/gbk-added.json | 5 +- node_modules/iconv-lite/encodings/utf16.js | 92 +- .../iconv-lite/encodings/utf32.js | 0 node_modules/iconv-lite/encodings/utf7.js | 8 +- node_modules/iconv-lite/lib/index.d.ts | 17 + node_modules/iconv-lite/lib/index.js | 51 +- node_modules/iconv-lite/lib/streams.js | 208 +- node_modules/iconv-lite/package.json | 26 +- node_modules/ignore-by-default/index.js | 12 - node_modules/ignore-by-default/package.json | 34 - node_modules/inflight/inflight.js | 54 - node_modules/inflight/package.json | 29 - node_modules/is-binary-path/index.d.ts | 17 - node_modules/is-binary-path/index.js | 7 - node_modules/is-binary-path/package.json | 40 - node_modules/is-extglob/index.js | 20 - node_modules/is-extglob/package.json | 69 - node_modules/is-glob/index.js | 150 - node_modules/is-glob/package.json | 81 - node_modules/is-number/index.js | 18 - node_modules/is-number/package.json | 82 - node_modules/minimatch/minimatch.js | 947 -- node_modules/minimatch/package.json | 33 - node_modules/nodemon/bin/nodemon.js | 16 - node_modules/nodemon/index.d.ts | 125 - node_modules/nodemon/jsconfig.json | 7 - node_modules/nodemon/lib/cli/index.js | 49 - node_modules/nodemon/lib/cli/parse.js | 230 - node_modules/nodemon/lib/config/command.js | 43 - node_modules/nodemon/lib/config/defaults.js | 34 - node_modules/nodemon/lib/config/exec.js | 234 - node_modules/nodemon/lib/config/index.js | 93 - node_modules/nodemon/lib/config/load.js | 225 - node_modules/nodemon/lib/help/index.js | 27 - node_modules/nodemon/lib/index.js | 1 - node_modules/nodemon/lib/monitor/index.js | 4 - node_modules/nodemon/lib/monitor/match.js | 287 - node_modules/nodemon/lib/monitor/run.js | 562 - node_modules/nodemon/lib/monitor/signals.js | 34 - node_modules/nodemon/lib/monitor/watch.js | 244 - node_modules/nodemon/lib/nodemon.js | 317 - node_modules/nodemon/lib/rules/add.js | 89 - node_modules/nodemon/lib/rules/index.js | 53 - node_modules/nodemon/lib/rules/parse.js | 43 - node_modules/nodemon/lib/spawn.js | 74 - node_modules/nodemon/lib/utils/bus.js | 44 - node_modules/nodemon/lib/utils/clone.js | 40 - node_modules/nodemon/lib/utils/colour.js | 26 - node_modules/nodemon/lib/utils/index.js | 103 - node_modules/nodemon/lib/utils/log.js | 82 - node_modules/nodemon/lib/utils/merge.js | 47 - node_modules/nodemon/lib/version.js | 100 - node_modules/nodemon/package.json | 75 - node_modules/normalize-path/index.js | 35 - node_modules/normalize-path/package.json | 77 - node_modules/nth-check/lib/compile.d.ts | 55 - node_modules/nth-check/lib/compile.d.ts.map | 1 - node_modules/nth-check/lib/compile.js | 121 - node_modules/nth-check/lib/compile.js.map | 1 - node_modules/nth-check/lib/esm/compile.d.ts | 55 - .../nth-check/lib/esm/compile.d.ts.map | 1 - node_modules/nth-check/lib/esm/compile.js | 113 - node_modules/nth-check/lib/esm/compile.js.map | 1 - node_modules/nth-check/lib/esm/index.d.ts | 59 - node_modules/nth-check/lib/esm/index.d.ts.map | 1 - node_modules/nth-check/lib/esm/index.js | 63 - node_modules/nth-check/lib/esm/index.js.map | 1 - node_modules/nth-check/lib/esm/package.json | 1 - node_modules/nth-check/lib/esm/parse.d.ts | 9 - node_modules/nth-check/lib/esm/parse.d.ts.map | 1 - node_modules/nth-check/lib/esm/parse.js | 73 - node_modules/nth-check/lib/esm/parse.js.map | 1 - node_modules/nth-check/lib/index.d.ts | 59 - node_modules/nth-check/lib/index.d.ts.map | 1 - node_modules/nth-check/lib/index.js | 70 - node_modules/nth-check/lib/index.js.map | 1 - node_modules/nth-check/lib/parse.d.ts | 9 - node_modules/nth-check/lib/parse.d.ts.map | 1 - node_modules/nth-check/lib/parse.js | 77 - node_modules/nth-check/lib/parse.js.map | 1 - node_modules/nth-check/package.json | 78 - node_modules/once/once.js | 42 - node_modules/once/package.json | 33 - .../dist/cjs/index.d.ts | 6 - .../dist/cjs/index.js | 214 - .../dist/cjs/package.json | 1 - .../dist/index.d.ts | 6 - .../dist/index.js | 213 - .../package.json | 40 - .../parse5-parser-stream/dist/cjs/index.d.ts | 85 - .../parse5-parser-stream/dist/cjs/index.js | 90 - .../dist/cjs/package.json | 1 - .../parse5-parser-stream/dist/index.d.ts | 85 - .../parse5-parser-stream/dist/index.js | 86 - .../parse5-parser-stream/package.json | 39 - .../parse5/dist/cjs/common/doctype.d.ts | 4 - .../parse5/dist/cjs/common/doctype.js | 118 - .../parse5/dist/cjs/common/error-codes.d.ts | 67 - .../parse5/dist/cjs/common/error-codes.js | 66 - .../dist/cjs/common/foreign-content.d.ts | 9 - .../parse5/dist/cjs/common/foreign-content.js | 237 - node_modules/parse5/dist/cjs/common/html.d.ts | 289 - node_modules/parse5/dist/cjs/common/html.js | 528 - .../parse5/dist/cjs/common/token.d.ts | 84 - node_modules/parse5/dist/cjs/common/token.js | 24 - .../parse5/dist/cjs/common/unicode.d.ts | 42 - .../parse5/dist/cjs/common/unicode.js | 70 - node_modules/parse5/dist/cjs/index.d.ts | 71 - node_modules/parse5/dist/cjs/index.js | 54 - node_modules/parse5/dist/cjs/package.json | 1 - .../cjs/parser/formatting-element-list.d.ts | 36 - .../cjs/parser/formatting-element-list.js | 114 - .../parse5/dist/cjs/parser/index.d.ts | 221 - node_modules/parse5/dist/cjs/parser/index.js | 3235 ------ .../dist/cjs/parser/open-element-stack.d.ts | 53 - .../dist/cjs/parser/open-element-stack.js | 324 - .../parse5/dist/cjs/serializer/index.d.ts | 60 - .../parse5/dist/cjs/serializer/index.js | 172 - .../parse5/dist/cjs/tokenizer/index.d.ts | 247 - .../parse5/dist/cjs/tokenizer/index.js | 2714 ----- .../dist/cjs/tokenizer/preprocessor.d.ts | 36 - .../parse5/dist/cjs/tokenizer/preprocessor.js | 200 - .../dist/cjs/tree-adapters/default.d.ts | 84 - .../parse5/dist/cjs/tree-adapters/default.js | 176 - .../dist/cjs/tree-adapters/interface.d.ts | 255 - .../dist/cjs/tree-adapters/interface.js | 2 - node_modules/parse5/dist/common/doctype.d.ts | 4 - node_modules/parse5/dist/common/doctype.js | 114 - .../parse5/dist/common/error-codes.d.ts | 67 - .../parse5/dist/common/error-codes.js | 63 - .../parse5/dist/common/foreign-content.d.ts | 9 - .../parse5/dist/common/foreign-content.js | 228 - node_modules/parse5/dist/common/html.d.ts | 289 - node_modules/parse5/dist/common/html.js | 523 - node_modules/parse5/dist/common/token.d.ts | 84 - node_modules/parse5/dist/common/token.js | 20 - node_modules/parse5/dist/common/unicode.d.ts | 42 - node_modules/parse5/dist/common/unicode.js | 62 - node_modules/parse5/dist/index.d.ts | 71 - node_modules/parse5/dist/index.js | 42 - .../dist/parser/formatting-element-list.d.ts | 36 - .../dist/parser/formatting-element-list.js | 110 - node_modules/parse5/dist/parser/index.d.ts | 221 - node_modules/parse5/dist/parser/index.js | 3240 ------ .../dist/parser/open-element-stack.d.ts | 53 - .../parse5/dist/parser/open-element-stack.js | 320 - .../parse5/dist/serializer/index.d.ts | 60 - node_modules/parse5/dist/serializer/index.js | 168 - node_modules/parse5/dist/tokenizer/index.d.ts | 247 - node_modules/parse5/dist/tokenizer/index.js | 2710 ----- .../parse5/dist/tokenizer/preprocessor.d.ts | 36 - .../parse5/dist/tokenizer/preprocessor.js | 196 - .../parse5/dist/tree-adapters/default.d.ts | 84 - .../parse5/dist/tree-adapters/default.js | 173 - .../parse5/dist/tree-adapters/interface.d.ts | 255 - .../parse5/dist/tree-adapters/interface.js | 1 - node_modules/parse5/package.json | 50 - node_modules/path-is-absolute/index.js | 20 - node_modules/path-is-absolute/package.json | 43 - node_modules/picomatch/index.js | 3 - node_modules/picomatch/lib/constants.js | 179 - node_modules/picomatch/lib/parse.js | 1091 -- node_modules/picomatch/lib/picomatch.js | 342 - node_modules/picomatch/lib/scan.js | 391 - node_modules/picomatch/lib/utils.js | 64 - node_modules/picomatch/package.json | 81 - node_modules/pstree.remy/lib/index.js | 37 - node_modules/pstree.remy/lib/tree.js | 37 - node_modules/pstree.remy/lib/utils.js | 53 - node_modules/pstree.remy/package.json | 33 - node_modules/raw-body/index.d.ts | 12 +- node_modules/raw-body/package.json | 17 +- node_modules/readdirp/index.d.ts | 43 - node_modules/readdirp/index.js | 287 - node_modules/readdirp/package.json | 122 - node_modules/replace-in-file/bin/cli.js | 59 - node_modules/replace-in-file/index.js | 1 - .../lib/helpers/combine-config.js | 60 - .../lib/helpers/error-handler.js | 9 - .../lib/helpers/get-paths-async.js | 26 - .../lib/helpers/get-paths-sync.js | 42 - .../replace-in-file/lib/helpers/glob-async.js | 34 - .../lib/helpers/load-config.js | 23 - .../lib/helpers/make-replacements.js | 75 - .../lib/helpers/parse-config.js | 74 - .../lib/helpers/process-async.js | 45 - .../lib/helpers/process-sync.js | 30 - .../lib/helpers/replace-async.js | 45 - .../lib/helpers/replace-sync.js | 30 - .../lib/helpers/run-processors.js | 16 - .../lib/helpers/success-handler.js | 23 - .../replace-in-file/lib/process-file.js | 83 - .../replace-in-file/lib/process-file.spec.js | 751 -- .../replace-in-file/lib/replace-in-file.js | 104 - .../lib/replace-in-file.spec.js | 1172 --- .../node_modules/glob/common.js | 238 - .../replace-in-file/node_modules/glob/glob.js | 790 -- .../node_modules/glob/package.json | 55 - .../replace-in-file/node_modules/glob/sync.js | 486 - node_modules/replace-in-file/package.json | 66 - .../replace-in-file/test/helpers/setup.js | 18 - node_modules/replace-in-file/types/index.d.ts | 42 - node_modules/require-directory/index.js | 86 - node_modules/require-directory/package.json | 40 - node_modules/semver/bin/semver.js | 189 - node_modules/semver/classes/comparator.js | 141 - node_modules/semver/classes/index.js | 5 - node_modules/semver/classes/range.js | 554 - node_modules/semver/classes/semver.js | 318 - node_modules/semver/functions/clean.js | 6 - node_modules/semver/functions/cmp.js | 52 - node_modules/semver/functions/coerce.js | 60 - .../semver/functions/compare-build.js | 7 - .../semver/functions/compare-loose.js | 3 - node_modules/semver/functions/compare.js | 5 - node_modules/semver/functions/diff.js | 58 - node_modules/semver/functions/eq.js | 3 - node_modules/semver/functions/gt.js | 3 - node_modules/semver/functions/gte.js | 3 - node_modules/semver/functions/inc.js | 19 - node_modules/semver/functions/lt.js | 3 - node_modules/semver/functions/lte.js | 3 - node_modules/semver/functions/major.js | 3 - node_modules/semver/functions/minor.js | 3 - node_modules/semver/functions/neq.js | 3 - node_modules/semver/functions/parse.js | 16 - node_modules/semver/functions/patch.js | 3 - node_modules/semver/functions/prerelease.js | 6 - node_modules/semver/functions/rcompare.js | 3 - node_modules/semver/functions/rsort.js | 3 - node_modules/semver/functions/satisfies.js | 10 - node_modules/semver/functions/sort.js | 3 - node_modules/semver/functions/valid.js | 6 - node_modules/semver/index.js | 89 - node_modules/semver/internal/constants.js | 35 - node_modules/semver/internal/debug.js | 9 - node_modules/semver/internal/identifiers.js | 23 - node_modules/semver/internal/lrucache.js | 40 - node_modules/semver/internal/parse-options.js | 15 - node_modules/semver/internal/re.js | 219 - node_modules/semver/package.json | 78 - node_modules/semver/preload.js | 2 - node_modules/semver/ranges/gtr.js | 4 - node_modules/semver/ranges/intersects.js | 7 - node_modules/semver/ranges/ltr.js | 4 - node_modules/semver/ranges/max-satisfying.js | 25 - node_modules/semver/ranges/min-satisfying.js | 24 - node_modules/semver/ranges/min-version.js | 61 - node_modules/semver/ranges/outside.js | 80 - node_modules/semver/ranges/simplify.js | 47 - node_modules/semver/ranges/subset.js | 247 - node_modules/semver/ranges/to-comparators.js | 8 - node_modules/semver/ranges/valid.js | 11 - node_modules/serve-favicon/index.js | 226 + .../serve-favicon/node_modules/ms/index.js | 162 + .../node_modules/ms/package.json | 37 + .../node_modules/safe-buffer/index.js | 62 + .../node_modules/safe-buffer/package.json | 37 + .../node_modules/safe-buffer/test.js | 101 + node_modules/serve-favicon/package.json | 47 + .../simple-update-notifier/build/index.d.ts | 13 - .../simple-update-notifier/build/index.js | 210 - .../simple-update-notifier/package.json | 100 - .../src/borderedText.ts | 12 - .../simple-update-notifier/src/cache.spec.ts | 17 - .../simple-update-notifier/src/cache.ts | 44 - .../src/getDistVersion.spec.ts | 35 - .../src/getDistVersion.ts | 29 - .../src/hasNewVersion.spec.ts | 82 - .../src/hasNewVersion.ts | 40 - .../simple-update-notifier/src/index.spec.ts | 27 - .../simple-update-notifier/src/index.ts | 34 - .../simple-update-notifier/src/isNpmOrYarn.ts | 12 - .../simple-update-notifier/src/types.ts | 8 - node_modules/supports-color/browser.js | 5 - node_modules/supports-color/index.js | 131 - node_modules/supports-color/package.json | 53 - node_modules/to-regex-range/index.js | 288 - node_modules/to-regex-range/package.json | 88 - node_modules/touch/bin/nodetouch.js | 112 - node_modules/touch/index.js | 224 - node_modules/touch/package.json | 25 - node_modules/undefsafe/example.js | 14 - node_modules/undefsafe/lib/undefsafe.js | 125 - node_modules/undefsafe/package.json | 34 - node_modules/undici/index-fetch.js | 34 +- node_modules/undici/index.d.ts | 2 +- node_modules/undici/index.js | 144 +- node_modules/undici/lib/agent.js | 148 - node_modules/undici/lib/api/abort-signal.js | 9 +- node_modules/undici/lib/api/api-connect.js | 18 +- node_modules/undici/lib/api/api-pipeline.js | 25 +- node_modules/undici/lib/api/api-request.js | 115 +- node_modules/undici/lib/api/api-stream.js | 113 +- node_modules/undici/lib/api/api-upgrade.js | 25 +- node_modules/undici/lib/api/readable.js | 500 +- node_modules/undici/lib/api/util.js | 101 +- node_modules/undici/lib/balanced-pool.js | 190 - node_modules/undici/lib/cache/cache.js | 838 -- node_modules/undici/lib/cache/cachestorage.js | 144 - .../undici/lib/cache/memory-cache-store.js | 183 + .../undici/lib/cache/sqlite-cache-store.js | 457 + node_modules/undici/lib/cache/symbols.js | 5 - node_modules/undici/lib/cache/util.js | 49 - node_modules/undici/lib/client.js | 2283 ---- .../undici/lib/compat/dispatcher-weakref.js | 48 - node_modules/undici/lib/cookies/constants.js | 12 - node_modules/undici/lib/cookies/index.js | 184 - node_modules/undici/lib/cookies/parse.js | 317 - node_modules/undici/lib/cookies/util.js | 291 - node_modules/undici/lib/core/connect.js | 125 +- node_modules/undici/lib/core/constants.js | 45 +- node_modules/undici/lib/core/diagnostics.js | 196 + node_modules/undici/lib/core/errors.js | 60 +- node_modules/undici/lib/core/request.js | 306 +- node_modules/undici/lib/core/symbols.js | 19 +- .../node_modules => }/undici/lib/core/tree.js | 10 +- node_modules/undici/lib/core/util.js | 704 +- node_modules/undici/lib/dispatcher-base.js | 192 - node_modules/undici/lib/dispatcher.js | 19 - .../undici/lib/dispatcher/agent.js | 20 +- .../undici/lib/dispatcher/balanced-pool.js | 13 +- .../undici/lib/dispatcher/client-h1.js | 511 +- .../undici/lib/dispatcher/client-h2.js | 279 +- .../undici/lib/dispatcher/client.js | 53 +- .../undici/lib/dispatcher/dispatcher-base.js | 41 +- .../undici/lib/dispatcher/dispatcher.js | 31 +- .../lib/dispatcher/env-http-proxy-agent.js | 9 - .../lib/{node => dispatcher}/fixed-queue.js | 140 +- .../undici/lib/dispatcher/pool-base.js | 0 .../undici/lib/dispatcher/pool-stats.js | 2 + .../undici/lib/dispatcher/pool.js | 11 +- .../undici/lib/dispatcher/proxy-agent.js | 9 +- .../undici/lib/dispatcher/retry-agent.js | 0 node_modules/undici/lib/fetch/body.js | 613 -- node_modules/undici/lib/fetch/constants.js | 151 - node_modules/undici/lib/fetch/dataURL.js | 627 -- node_modules/undici/lib/fetch/file.js | 344 - node_modules/undici/lib/fetch/formdata.js | 265 - node_modules/undici/lib/fetch/global.js | 40 - node_modules/undici/lib/fetch/headers.js | 589 -- node_modules/undici/lib/fetch/index.js | 2148 ---- node_modules/undici/lib/fetch/request.js | 946 -- node_modules/undici/lib/fetch/response.js | 571 - node_modules/undici/lib/fetch/symbols.js | 10 - node_modules/undici/lib/fetch/util.js | 1144 -- node_modules/undici/lib/fetch/webidl.js | 646 -- node_modules/undici/lib/fileapi/encoding.js | 290 - node_modules/undici/lib/fileapi/filereader.js | 344 - .../undici/lib/fileapi/progressevent.js | 78 - node_modules/undici/lib/fileapi/symbols.js | 10 - node_modules/undici/lib/fileapi/util.js | 392 - node_modules/undici/lib/global.js | 2 +- .../undici/lib/handler/DecoratorHandler.js | 35 - .../undici/lib/handler/RedirectHandler.js | 221 - .../undici/lib/handler/RetryHandler.js | 336 - .../undici/lib/handler/cache-handler.js | 448 + .../lib/handler/cache-revalidation-handler.js | 124 + .../undici/lib/handler/decorator-handler.js | 67 + .../undici/lib/handler/redirect-handler.js | 117 +- .../undici/lib/handler/retry-handler.js | 190 +- .../undici/lib/handler/unwrap-handler.js | 96 + .../undici/lib/handler/wrap-handler.js | 95 + node_modules/undici/lib/interceptor/cache.js | 362 + .../undici/lib/interceptor/dns.js | 121 +- .../undici/lib/interceptor/dump.js | 74 +- .../lib/interceptor/redirect.js} | 12 +- .../lib/interceptor/redirectInterceptor.js | 21 - .../undici/lib/interceptor/response-error.js | 95 + .../undici/lib/interceptor/retry.js | 0 node_modules/undici/lib/llhttp/constants.d.ts | 152 +- node_modules/undici/lib/llhttp/constants.js | 604 +- .../undici/lib/llhttp/constants.js.map | 2 +- node_modules/undici/lib/llhttp/llhttp-wasm.js | 16 +- .../undici/lib/llhttp/llhttp_simd-wasm.js | 16 +- node_modules/undici/lib/llhttp/utils.d.ts | 6 +- node_modules/undici/lib/llhttp/utils.js | 18 +- node_modules/undici/lib/llhttp/utils.js.map | 2 +- node_modules/undici/lib/mock/mock-agent.js | 105 +- .../undici/lib/mock/mock-call-history.js | 248 + node_modules/undici/lib/mock/mock-client.js | 17 +- node_modules/undici/lib/mock/mock-errors.js | 4 +- .../undici/lib/mock/mock-interceptor.js | 51 +- node_modules/undici/lib/mock/mock-pool.js | 17 +- node_modules/undici/lib/mock/mock-symbols.js | 9 +- node_modules/undici/lib/mock/mock-utils.js | 96 +- .../mock/pending-interceptors-formatter.js | 9 +- node_modules/undici/lib/mock/pluralizer.js | 29 - node_modules/undici/lib/pool-base.js | 194 - node_modules/undici/lib/pool-stats.js | 34 - node_modules/undici/lib/pool.js | 94 - node_modules/undici/lib/proxy-agent.js | 189 - node_modules/undici/lib/timers.js | 97 - node_modules/undici/lib/util/cache.js | 370 + node_modules/undici/lib/util/date.js | 259 + .../undici/lib/util/timers.js | 0 .../undici/lib/web/cache/cache.js | 45 +- .../undici/lib/web/cache/cachestorage.js | 2 +- .../undici/lib/web/cache/util.js | 0 .../undici/lib/web/cookies/constants.js | 0 .../undici/lib/web/cookies/index.js | 43 +- .../undici/lib/web/cookies/parse.js | 11 +- .../undici/lib/web/cookies/util.js | 0 .../lib/web/eventsource/eventsource-stream.js | 17 +- .../undici/lib/web/eventsource/eventsource.js | 16 +- .../undici/lib/web/eventsource/util.js | 0 .../undici/lib/web/fetch/body.js | 86 +- .../undici/lib/web/fetch/constants.js | 17 +- .../undici/lib/web/fetch/data-url.js | 10 +- .../lib/web/fetch/dispatcher-weakref.js | 0 .../undici/lib/web/fetch/formdata-parser.js | 107 +- .../undici/lib/web/fetch/formdata.js | 119 +- .../undici/lib/web/fetch/global.js | 0 .../undici/lib/web/fetch/headers.js | 204 +- .../undici/lib/web/fetch/index.js | 126 +- .../undici/lib/web/fetch/request.js | 234 +- .../undici/lib/web/fetch/response.js | 143 +- .../undici/lib/web/fetch/util.js | 374 +- .../undici/lib/web/fetch/webidl.js | 181 +- .../undici/lib/web/websocket/connection.js | 230 +- .../undici/lib/web/websocket/constants.js | 126 + .../undici/lib/web/websocket/events.js | 6 +- .../undici/lib/web/websocket/frame.js | 48 +- .../lib/web/websocket/permessage-deflate.js | 0 .../undici/lib/web/websocket/receiver.js | 160 +- .../undici/lib/web/websocket/sender.js | 31 +- .../web/websocket/stream/websocketerror.js | 83 + .../web/websocket/stream/websocketstream.js | 485 + .../undici/lib/web/websocket/util.js | 202 +- .../undici/lib/web/websocket/websocket.js | 370 +- .../undici/lib/websocket/connection.js | 291 - .../undici/lib/websocket/constants.js | 51 - node_modules/undici/lib/websocket/events.js | 303 - node_modules/undici/lib/websocket/frame.js | 73 - node_modules/undici/lib/websocket/receiver.js | 344 - node_modules/undici/lib/websocket/symbols.js | 12 - node_modules/undici/lib/websocket/util.js | 200 - .../undici/lib/websocket/websocket.js | 641 -- node_modules/undici/package.json | 138 +- .../undici/scripts/strip-comments.js | 4 +- node_modules/undici/types/agent.d.ts | 14 +- node_modules/undici/types/api.d.ts | 66 +- node_modules/undici/types/balanced-pool.d.ts | 25 +- .../undici/types/cache-interceptor.d.ts | 172 + node_modules/undici/types/client.d.ts | 26 +- node_modules/undici/types/cookies.d.ts | 2 + .../undici/types/diagnostics-channel.d.ts | 23 +- node_modules/undici/types/dispatcher.d.ts | 218 +- .../undici/types/env-http-proxy-agent.d.ts | 4 +- node_modules/undici/types/errors.d.ts | 121 +- .../undici/types/eventsource.d.ts | 0 node_modules/undici/types/fetch.d.ts | 77 +- node_modules/undici/types/file.d.ts | 39 - node_modules/undici/types/filereader.d.ts | 54 - node_modules/undici/types/formdata.d.ts | 16 +- .../undici/types/global-dispatcher.d.ts | 8 +- node_modules/undici/types/global-origin.d.ts | 10 +- node_modules/undici/types/handlers.d.ts | 16 +- node_modules/undici/types/header.d.ts | 158 +- node_modules/undici/types/index.d.ts | 98 +- node_modules/undici/types/interceptors.d.ts | 35 +- node_modules/undici/types/mock-agent.d.ts | 51 +- .../undici/types/mock-call-history.d.ts | 111 + node_modules/undici/types/mock-client.d.ts | 8 +- node_modules/undici/types/mock-errors.d.ts | 6 +- .../undici/types/mock-interceptor.d.ts | 46 +- node_modules/undici/types/mock-pool.d.ts | 8 +- node_modules/undici/types/patch.d.ts | 42 - node_modules/undici/types/pool-stats.d.ts | 16 +- node_modules/undici/types/pool.d.ts | 25 +- node_modules/undici/types/proxy-agent.d.ts | 10 +- node_modules/undici/types/readable.d.ts | 39 +- .../undici/types/retry-agent.d.ts | 2 +- node_modules/undici/types/retry-handler.d.ts | 20 +- .../node_modules => }/undici/types/util.d.ts | 6 +- node_modules/undici/types/utility.d.ts | 7 + node_modules/undici/types/webidl.d.ts | 74 +- node_modules/undici/types/websocket.d.ts | 60 +- .../whatwg-encoding/lib/labels-to-names.json | 217 - .../whatwg-encoding/lib/supported-names.json | 38 - .../whatwg-encoding/lib/whatwg-encoding.js | 60 - .../iconv-lite/encodings/dbcs-data.js | 188 - .../iconv-lite/encodings/sbcs-codec.js | 72 - .../encodings/sbcs-data-generated.js | 451 - .../iconv-lite/encodings/sbcs-data.js | 179 - .../encodings/tables/big5-added.json | 122 - .../iconv-lite/encodings/tables/cp936.json | 264 - .../iconv-lite/encodings/tables/cp949.json | 273 - .../iconv-lite/encodings/tables/cp950.json | 177 - .../iconv-lite/encodings/tables/eucjp.json | 182 - .../encodings/tables/gb18030-ranges.json | 1 - .../iconv-lite/encodings/tables/shiftjis.json | 125 - .../iconv-lite/encodings/utf16.js | 197 - .../iconv-lite/encodings/utf32.js | 319 - .../node_modules/iconv-lite/encodings/utf7.js | 290 - .../iconv-lite/lib/bom-handling.js | 52 - .../node_modules/iconv-lite/lib/streams.js | 109 - .../node_modules/iconv-lite/package.json | 44 - node_modules/whatwg-encoding/package.json | 32 - .../lib/mime-type-parameters.js | 70 - node_modules/whatwg-mimetype/lib/mime-type.js | 127 - node_modules/whatwg-mimetype/lib/parser.js | 105 - .../whatwg-mimetype/lib/serializer.js | 25 - node_modules/whatwg-mimetype/lib/utils.js | 60 - node_modules/whatwg-mimetype/package.json | 45 - node_modules/wrappy/package.json | 29 - node_modules/wrappy/wrappy.js | 33 - node_modules/y18n/build/index.cjs | 203 - node_modules/y18n/build/lib/cjs.js | 6 - node_modules/y18n/build/lib/index.js | 174 - .../y18n/build/lib/platform-shims/node.js | 19 - node_modules/y18n/index.mjs | 8 - node_modules/y18n/package.json | 70 - node_modules/yargs-parser/browser.js | 29 - node_modules/yargs-parser/build/index.cjs | 1050 -- node_modules/yargs-parser/build/lib/index.js | 62 - .../yargs-parser/build/lib/string-utils.js | 65 - .../build/lib/tokenize-arg-string.js | 40 - .../build/lib/yargs-parser-types.js | 12 - .../yargs-parser/build/lib/yargs-parser.js | 1045 -- node_modules/yargs-parser/package.json | 92 - node_modules/yargs/browser.d.ts | 5 - node_modules/yargs/browser.mjs | 7 - node_modules/yargs/build/index.cjs | 1 - node_modules/yargs/build/lib/argsert.js | 62 - node_modules/yargs/build/lib/command.js | 449 - .../yargs/build/lib/completion-templates.js | 48 - node_modules/yargs/build/lib/completion.js | 243 - node_modules/yargs/build/lib/middleware.js | 88 - node_modules/yargs/build/lib/parse-command.js | 32 - .../yargs/build/lib/typings/common-types.js | 9 - .../build/lib/typings/yargs-parser-types.js | 1 - node_modules/yargs/build/lib/usage.js | 584 -- .../yargs/build/lib/utils/apply-extends.js | 59 - .../yargs/build/lib/utils/is-promise.js | 5 - .../yargs/build/lib/utils/levenshtein.js | 34 - .../build/lib/utils/maybe-async-result.js | 17 - .../yargs/build/lib/utils/obj-filter.js | 10 - .../yargs/build/lib/utils/process-argv.js | 17 - .../yargs/build/lib/utils/set-blocking.js | 12 - .../yargs/build/lib/utils/which-module.js | 10 - node_modules/yargs/build/lib/validation.js | 305 - node_modules/yargs/build/lib/yargs-factory.js | 1512 --- node_modules/yargs/build/lib/yerror.js | 9 - node_modules/yargs/helpers/helpers.mjs | 10 - node_modules/yargs/helpers/index.js | 14 - node_modules/yargs/helpers/package.json | 3 - node_modules/yargs/index.cjs | 53 - node_modules/yargs/index.mjs | 8 - .../yargs/lib/platform-shims/browser.mjs | 95 - node_modules/yargs/lib/platform-shims/esm.mjs | 73 - node_modules/yargs/locales/be.json | 46 - node_modules/yargs/locales/cs.json | 51 - node_modules/yargs/locales/de.json | 46 - node_modules/yargs/locales/en.json | 55 - node_modules/yargs/locales/es.json | 46 - node_modules/yargs/locales/fi.json | 49 - node_modules/yargs/locales/fr.json | 53 - node_modules/yargs/locales/hi.json | 49 - node_modules/yargs/locales/hu.json | 46 - node_modules/yargs/locales/id.json | 50 - node_modules/yargs/locales/it.json | 46 - node_modules/yargs/locales/ja.json | 51 - node_modules/yargs/locales/ko.json | 49 - node_modules/yargs/locales/nb.json | 44 - node_modules/yargs/locales/nl.json | 49 - node_modules/yargs/locales/nn.json | 44 - node_modules/yargs/locales/pirate.json | 13 - node_modules/yargs/locales/pl.json | 49 - node_modules/yargs/locales/pt.json | 45 - node_modules/yargs/locales/pt_BR.json | 48 - node_modules/yargs/locales/ru.json | 51 - node_modules/yargs/locales/th.json | 46 - node_modules/yargs/locales/tr.json | 48 - node_modules/yargs/locales/uk_UA.json | 51 - node_modules/yargs/locales/uz.json | 52 - node_modules/yargs/locales/zh_CN.json | 48 - node_modules/yargs/locales/zh_TW.json | 51 - .../yargs/node_modules/ansi-regex/index.d.ts | 37 - .../yargs/node_modules/ansi-regex/index.js | 10 - .../node_modules/ansi-regex/package.json | 55 - .../node_modules/emoji-regex/es2015/index.js | 6 - .../node_modules/emoji-regex/es2015/text.js | 6 - .../yargs/node_modules/emoji-regex/index.d.ts | 23 - .../yargs/node_modules/emoji-regex/index.js | 6 - .../node_modules/emoji-regex/package.json | 50 - .../yargs/node_modules/emoji-regex/text.js | 6 - .../node_modules/string-width/index.d.ts | 29 - .../yargs/node_modules/string-width/index.js | 47 - .../node_modules/string-width/package.json | 56 - .../yargs/node_modules/strip-ansi/index.d.ts | 17 - .../yargs/node_modules/strip-ansi/index.js | 4 - .../node_modules/strip-ansi/package.json | 54 - node_modules/yargs/package.json | 123 - node_modules/yargs/yargs | 9 - node_modules/yargs/yargs.mjs | 10 - package-lock.json | 1165 +- package.json | 11 + 1489 files changed, 27814 insertions(+), 146817 deletions(-) delete mode 100644 node_modules/.bin/acorn delete mode 100644 node_modules/.bin/glob delete mode 100644 node_modules/.bin/he delete mode 100644 node_modules/.bin/html-minifier delete mode 100644 node_modules/.bin/mime delete mode 100644 node_modules/.bin/node-which delete mode 100644 node_modules/.bin/nodemon delete mode 100644 node_modules/.bin/nodetouch delete mode 100644 node_modules/.bin/replace-in-file delete mode 100644 node_modules/.bin/semver delete mode 100644 node_modules/.bin/terser delete mode 100644 node_modules/.bin/uglifyjs delete mode 100644 node_modules/@fastify/busboy/deps/dicer/lib/Dicer.js delete mode 100644 node_modules/@fastify/busboy/deps/dicer/lib/HeaderParser.js delete mode 100644 node_modules/@fastify/busboy/deps/dicer/lib/PartStream.js delete mode 100644 node_modules/@fastify/busboy/deps/dicer/lib/dicer.d.ts delete mode 100644 node_modules/@fastify/busboy/deps/streamsearch/sbmh.js delete mode 100644 node_modules/@fastify/busboy/lib/main.d.ts delete mode 100644 node_modules/@fastify/busboy/lib/main.js delete mode 100644 node_modules/@fastify/busboy/lib/types/multipart.js delete mode 100644 node_modules/@fastify/busboy/lib/types/urlencoded.js delete mode 100644 node_modules/@fastify/busboy/lib/utils/Decoder.js delete mode 100644 node_modules/@fastify/busboy/lib/utils/basename.js delete mode 100644 node_modules/@fastify/busboy/lib/utils/decodeText.js delete mode 100644 node_modules/@fastify/busboy/lib/utils/getLimit.js delete mode 100644 node_modules/@fastify/busboy/lib/utils/parseParams.js delete mode 100644 node_modules/@fastify/busboy/package.json delete mode 100644 node_modules/anymatch/index.d.ts delete mode 100644 node_modules/anymatch/index.js delete mode 100644 node_modules/anymatch/package.json delete mode 100644 node_modules/binary-extensions/binary-extensions.json delete mode 100644 node_modules/binary-extensions/binary-extensions.json.d.ts delete mode 100644 node_modules/binary-extensions/index.d.ts delete mode 100644 node_modules/binary-extensions/index.js delete mode 100644 node_modules/binary-extensions/package.json create mode 100644 node_modules/body-parser/lib/utils.js rename node_modules/{nodemon => body-parser}/node_modules/debug/package.json (100%) rename node_modules/{nodemon => body-parser}/node_modules/debug/src/browser.js (100%) rename node_modules/{nodemon => body-parser}/node_modules/debug/src/common.js (100%) rename node_modules/{nodemon => body-parser}/node_modules/debug/src/index.js (100%) rename node_modules/{nodemon => body-parser}/node_modules/debug/src/node.js (100%) create mode 100644 node_modules/body-parser/node_modules/media-typer/index.js create mode 100644 node_modules/body-parser/node_modules/media-typer/package.json create mode 100644 node_modules/body-parser/node_modules/mime-db/db.json create mode 100644 node_modules/body-parser/node_modules/mime-db/index.js create mode 100644 node_modules/body-parser/node_modules/mime-db/package.json create mode 100644 node_modules/body-parser/node_modules/mime-types/index.js create mode 100644 node_modules/body-parser/node_modules/mime-types/mimeScore.js create mode 100644 node_modules/body-parser/node_modules/mime-types/package.json rename node_modules/{nodemon => body-parser}/node_modules/ms/index.js (100%) rename node_modules/{nodemon => body-parser}/node_modules/ms/package.json (100%) create mode 100644 node_modules/body-parser/node_modules/qs/dist/qs.js create mode 100644 node_modules/body-parser/node_modules/qs/lib/formats.js create mode 100644 node_modules/body-parser/node_modules/qs/lib/index.js create mode 100644 node_modules/body-parser/node_modules/qs/lib/parse.js create mode 100644 node_modules/body-parser/node_modules/qs/lib/stringify.js create mode 100644 node_modules/body-parser/node_modules/qs/lib/utils.js create mode 100644 node_modules/body-parser/node_modules/qs/package.json create mode 100644 node_modules/body-parser/node_modules/qs/test/empty-keys-cases.js create mode 100644 node_modules/body-parser/node_modules/qs/test/parse.js create mode 100644 node_modules/body-parser/node_modules/qs/test/stringify.js create mode 100644 node_modules/body-parser/node_modules/qs/test/utils.js create mode 100644 node_modules/body-parser/node_modules/type-is/index.js create mode 100644 node_modules/body-parser/node_modules/type-is/package.json delete mode 100644 node_modules/boolbase/index.js delete mode 100644 node_modules/boolbase/package.json delete mode 100644 node_modules/brace-expansion/index.js delete mode 100644 node_modules/brace-expansion/package.json delete mode 100644 node_modules/braces/index.js delete mode 100644 node_modules/braces/lib/compile.js delete mode 100644 node_modules/braces/lib/constants.js delete mode 100644 node_modules/braces/lib/expand.js delete mode 100644 node_modules/braces/lib/parse.js delete mode 100644 node_modules/braces/lib/stringify.js delete mode 100644 node_modules/braces/lib/utils.js delete mode 100644 node_modules/braces/package.json delete mode 100644 node_modules/call-of-duty-api/dist/index.d.ts delete mode 100644 node_modules/call-of-duty-api/dist/index.js delete mode 100644 node_modules/call-of-duty-api/dist/index.js.map delete mode 100644 node_modules/call-of-duty-api/dist/wz-data/game-modes.json delete mode 100644 node_modules/call-of-duty-api/dist/wz-data/weapon-ids.json delete mode 100644 node_modules/call-of-duty-api/package.json delete mode 100644 node_modules/chalk/index.d.ts delete mode 100644 node_modules/chalk/node_modules/ansi-styles/index.d.ts delete mode 100644 node_modules/chalk/node_modules/ansi-styles/index.js delete mode 100644 node_modules/chalk/node_modules/ansi-styles/package.json delete mode 100644 node_modules/chalk/node_modules/has-flag/index.d.ts delete mode 100644 node_modules/chalk/node_modules/has-flag/index.js delete mode 100644 node_modules/chalk/node_modules/has-flag/package.json delete mode 100644 node_modules/chalk/node_modules/supports-color/browser.js delete mode 100644 node_modules/chalk/node_modules/supports-color/index.js delete mode 100644 node_modules/chalk/node_modules/supports-color/package.json delete mode 100644 node_modules/chalk/package.json delete mode 100644 node_modules/chalk/source/index.js delete mode 100644 node_modules/chalk/source/templates.js delete mode 100644 node_modules/chalk/source/util.js delete mode 100644 node_modules/cheerio-select/lib/esm/helpers.d.ts delete mode 100644 node_modules/cheerio-select/lib/esm/helpers.d.ts.map delete mode 100644 node_modules/cheerio-select/lib/esm/helpers.js delete mode 100644 node_modules/cheerio-select/lib/esm/helpers.js.map delete mode 100644 node_modules/cheerio-select/lib/esm/index.d.ts delete mode 100644 node_modules/cheerio-select/lib/esm/index.d.ts.map delete mode 100644 node_modules/cheerio-select/lib/esm/index.js delete mode 100644 node_modules/cheerio-select/lib/esm/index.js.map delete mode 100644 node_modules/cheerio-select/lib/esm/package.json delete mode 100644 node_modules/cheerio-select/lib/esm/positionals.d.ts delete mode 100644 node_modules/cheerio-select/lib/esm/positionals.d.ts.map delete mode 100644 node_modules/cheerio-select/lib/esm/positionals.js delete mode 100644 node_modules/cheerio-select/lib/esm/positionals.js.map delete mode 100644 node_modules/cheerio-select/lib/helpers.d.ts delete mode 100644 node_modules/cheerio-select/lib/helpers.d.ts.map delete mode 100644 node_modules/cheerio-select/lib/helpers.js delete mode 100644 node_modules/cheerio-select/lib/helpers.js.map delete mode 100644 node_modules/cheerio-select/lib/index.d.ts delete mode 100644 node_modules/cheerio-select/lib/index.d.ts.map delete mode 100644 node_modules/cheerio-select/lib/index.js delete mode 100644 node_modules/cheerio-select/lib/index.js.map delete mode 100644 node_modules/cheerio-select/lib/positionals.d.ts delete mode 100644 node_modules/cheerio-select/lib/positionals.d.ts.map delete mode 100644 node_modules/cheerio-select/lib/positionals.js delete mode 100644 node_modules/cheerio-select/lib/positionals.js.map delete mode 100644 node_modules/cheerio-select/package.json delete mode 100644 node_modules/cheerio/dist/browser/api/attributes.d.ts delete mode 100644 node_modules/cheerio/dist/browser/api/attributes.d.ts.map delete mode 100644 node_modules/cheerio/dist/browser/api/attributes.js delete mode 100644 node_modules/cheerio/dist/browser/api/attributes.js.map delete mode 100644 node_modules/cheerio/dist/browser/api/css.d.ts delete mode 100644 node_modules/cheerio/dist/browser/api/css.d.ts.map delete mode 100644 node_modules/cheerio/dist/browser/api/css.js delete mode 100644 node_modules/cheerio/dist/browser/api/css.js.map delete mode 100644 node_modules/cheerio/dist/browser/api/extract.d.ts delete mode 100644 node_modules/cheerio/dist/browser/api/extract.d.ts.map delete mode 100644 node_modules/cheerio/dist/browser/api/extract.js delete mode 100644 node_modules/cheerio/dist/browser/api/extract.js.map delete mode 100644 node_modules/cheerio/dist/browser/api/forms.d.ts delete mode 100644 node_modules/cheerio/dist/browser/api/forms.d.ts.map delete mode 100644 node_modules/cheerio/dist/browser/api/forms.js delete mode 100644 node_modules/cheerio/dist/browser/api/forms.js.map delete mode 100644 node_modules/cheerio/dist/browser/api/manipulation.d.ts delete mode 100644 node_modules/cheerio/dist/browser/api/manipulation.d.ts.map delete mode 100644 node_modules/cheerio/dist/browser/api/manipulation.js delete mode 100644 node_modules/cheerio/dist/browser/api/manipulation.js.map delete mode 100644 node_modules/cheerio/dist/browser/api/traversing.d.ts delete mode 100644 node_modules/cheerio/dist/browser/api/traversing.d.ts.map delete mode 100644 node_modules/cheerio/dist/browser/api/traversing.js delete mode 100644 node_modules/cheerio/dist/browser/api/traversing.js.map delete mode 100644 node_modules/cheerio/dist/browser/cheerio.d.ts delete mode 100644 node_modules/cheerio/dist/browser/cheerio.d.ts.map delete mode 100644 node_modules/cheerio/dist/browser/cheerio.js delete mode 100644 node_modules/cheerio/dist/browser/cheerio.js.map delete mode 100644 node_modules/cheerio/dist/browser/index-browser.d.mts.map delete mode 100644 node_modules/cheerio/dist/browser/index-browser.mjs.map delete mode 100644 node_modules/cheerio/dist/browser/index.d.ts delete mode 100644 node_modules/cheerio/dist/browser/index.js delete mode 100644 node_modules/cheerio/dist/browser/load-parse.d.ts delete mode 100644 node_modules/cheerio/dist/browser/load-parse.d.ts.map delete mode 100644 node_modules/cheerio/dist/browser/load-parse.js delete mode 100644 node_modules/cheerio/dist/browser/load-parse.js.map delete mode 100644 node_modules/cheerio/dist/browser/load.d.ts delete mode 100644 node_modules/cheerio/dist/browser/load.d.ts.map delete mode 100644 node_modules/cheerio/dist/browser/load.js delete mode 100644 node_modules/cheerio/dist/browser/load.js.map delete mode 100644 node_modules/cheerio/dist/browser/options.d.ts delete mode 100644 node_modules/cheerio/dist/browser/options.d.ts.map delete mode 100644 node_modules/cheerio/dist/browser/options.js delete mode 100644 node_modules/cheerio/dist/browser/options.js.map delete mode 100644 node_modules/cheerio/dist/browser/package.json delete mode 100644 node_modules/cheerio/dist/browser/parse.d.ts delete mode 100644 node_modules/cheerio/dist/browser/parse.d.ts.map delete mode 100644 node_modules/cheerio/dist/browser/parse.js delete mode 100644 node_modules/cheerio/dist/browser/parse.js.map delete mode 100644 node_modules/cheerio/dist/browser/parsers/parse5-adapter.d.ts delete mode 100644 node_modules/cheerio/dist/browser/parsers/parse5-adapter.d.ts.map delete mode 100644 node_modules/cheerio/dist/browser/parsers/parse5-adapter.js delete mode 100644 node_modules/cheerio/dist/browser/parsers/parse5-adapter.js.map delete mode 100644 node_modules/cheerio/dist/browser/slim.d.ts delete mode 100644 node_modules/cheerio/dist/browser/slim.d.ts.map delete mode 100644 node_modules/cheerio/dist/browser/slim.js delete mode 100644 node_modules/cheerio/dist/browser/slim.js.map delete mode 100644 node_modules/cheerio/dist/browser/static.d.ts delete mode 100644 node_modules/cheerio/dist/browser/static.d.ts.map delete mode 100644 node_modules/cheerio/dist/browser/static.js delete mode 100644 node_modules/cheerio/dist/browser/static.js.map delete mode 100644 node_modules/cheerio/dist/browser/types.d.ts delete mode 100644 node_modules/cheerio/dist/browser/types.d.ts.map delete mode 100644 node_modules/cheerio/dist/browser/types.js delete mode 100644 node_modules/cheerio/dist/browser/types.js.map delete mode 100644 node_modules/cheerio/dist/browser/utils.d.ts delete mode 100644 node_modules/cheerio/dist/browser/utils.d.ts.map delete mode 100644 node_modules/cheerio/dist/browser/utils.js delete mode 100644 node_modules/cheerio/dist/browser/utils.js.map delete mode 100644 node_modules/cheerio/dist/commonjs/api/attributes.d.ts delete mode 100644 node_modules/cheerio/dist/commonjs/api/attributes.d.ts.map delete mode 100644 node_modules/cheerio/dist/commonjs/api/attributes.js delete mode 100644 node_modules/cheerio/dist/commonjs/api/attributes.js.map delete mode 100644 node_modules/cheerio/dist/commonjs/api/css.d.ts delete mode 100644 node_modules/cheerio/dist/commonjs/api/css.d.ts.map delete mode 100644 node_modules/cheerio/dist/commonjs/api/css.js delete mode 100644 node_modules/cheerio/dist/commonjs/api/css.js.map delete mode 100644 node_modules/cheerio/dist/commonjs/api/extract.d.ts delete mode 100644 node_modules/cheerio/dist/commonjs/api/extract.d.ts.map delete mode 100644 node_modules/cheerio/dist/commonjs/api/extract.js delete mode 100644 node_modules/cheerio/dist/commonjs/api/extract.js.map delete mode 100644 node_modules/cheerio/dist/commonjs/api/forms.d.ts delete mode 100644 node_modules/cheerio/dist/commonjs/api/forms.d.ts.map delete mode 100644 node_modules/cheerio/dist/commonjs/api/forms.js delete mode 100644 node_modules/cheerio/dist/commonjs/api/forms.js.map delete mode 100644 node_modules/cheerio/dist/commonjs/api/manipulation.d.ts delete mode 100644 node_modules/cheerio/dist/commonjs/api/manipulation.d.ts.map delete mode 100644 node_modules/cheerio/dist/commonjs/api/manipulation.js delete mode 100644 node_modules/cheerio/dist/commonjs/api/manipulation.js.map delete mode 100644 node_modules/cheerio/dist/commonjs/api/traversing.d.ts delete mode 100644 node_modules/cheerio/dist/commonjs/api/traversing.d.ts.map delete mode 100644 node_modules/cheerio/dist/commonjs/api/traversing.js delete mode 100644 node_modules/cheerio/dist/commonjs/api/traversing.js.map delete mode 100644 node_modules/cheerio/dist/commonjs/cheerio.d.ts delete mode 100644 node_modules/cheerio/dist/commonjs/cheerio.d.ts.map delete mode 100644 node_modules/cheerio/dist/commonjs/cheerio.js delete mode 100644 node_modules/cheerio/dist/commonjs/cheerio.js.map delete mode 100644 node_modules/cheerio/dist/commonjs/index.d.ts delete mode 100644 node_modules/cheerio/dist/commonjs/index.d.ts.map delete mode 100644 node_modules/cheerio/dist/commonjs/index.js delete mode 100644 node_modules/cheerio/dist/commonjs/index.js.map delete mode 100644 node_modules/cheerio/dist/commonjs/load-parse.d.ts delete mode 100644 node_modules/cheerio/dist/commonjs/load-parse.d.ts.map delete mode 100644 node_modules/cheerio/dist/commonjs/load-parse.js delete mode 100644 node_modules/cheerio/dist/commonjs/load-parse.js.map delete mode 100644 node_modules/cheerio/dist/commonjs/load.d.ts delete mode 100644 node_modules/cheerio/dist/commonjs/load.d.ts.map delete mode 100644 node_modules/cheerio/dist/commonjs/load.js delete mode 100644 node_modules/cheerio/dist/commonjs/load.js.map delete mode 100644 node_modules/cheerio/dist/commonjs/options.d.ts delete mode 100644 node_modules/cheerio/dist/commonjs/options.d.ts.map delete mode 100644 node_modules/cheerio/dist/commonjs/options.js delete mode 100644 node_modules/cheerio/dist/commonjs/options.js.map delete mode 100644 node_modules/cheerio/dist/commonjs/package.json delete mode 100644 node_modules/cheerio/dist/commonjs/parse.d.ts delete mode 100644 node_modules/cheerio/dist/commonjs/parse.d.ts.map delete mode 100644 node_modules/cheerio/dist/commonjs/parse.js delete mode 100644 node_modules/cheerio/dist/commonjs/parse.js.map delete mode 100644 node_modules/cheerio/dist/commonjs/parsers/parse5-adapter.d.ts delete mode 100644 node_modules/cheerio/dist/commonjs/parsers/parse5-adapter.d.ts.map delete mode 100644 node_modules/cheerio/dist/commonjs/parsers/parse5-adapter.js delete mode 100644 node_modules/cheerio/dist/commonjs/parsers/parse5-adapter.js.map delete mode 100644 node_modules/cheerio/dist/commonjs/slim.d.ts delete mode 100644 node_modules/cheerio/dist/commonjs/slim.d.ts.map delete mode 100644 node_modules/cheerio/dist/commonjs/slim.js delete mode 100644 node_modules/cheerio/dist/commonjs/slim.js.map delete mode 100644 node_modules/cheerio/dist/commonjs/static.d.ts delete mode 100644 node_modules/cheerio/dist/commonjs/static.d.ts.map delete mode 100644 node_modules/cheerio/dist/commonjs/static.js delete mode 100644 node_modules/cheerio/dist/commonjs/static.js.map delete mode 100644 node_modules/cheerio/dist/commonjs/types.d.ts delete mode 100644 node_modules/cheerio/dist/commonjs/types.d.ts.map delete mode 100644 node_modules/cheerio/dist/commonjs/types.js delete mode 100644 node_modules/cheerio/dist/commonjs/types.js.map delete mode 100644 node_modules/cheerio/dist/commonjs/utils.d.ts delete mode 100644 node_modules/cheerio/dist/commonjs/utils.d.ts.map delete mode 100644 node_modules/cheerio/dist/commonjs/utils.js delete mode 100644 node_modules/cheerio/dist/commonjs/utils.js.map delete mode 100644 node_modules/cheerio/dist/esm/api/attributes.d.ts delete mode 100644 node_modules/cheerio/dist/esm/api/attributes.d.ts.map delete mode 100644 node_modules/cheerio/dist/esm/api/attributes.js delete mode 100644 node_modules/cheerio/dist/esm/api/attributes.js.map delete mode 100644 node_modules/cheerio/dist/esm/api/css.d.ts delete mode 100644 node_modules/cheerio/dist/esm/api/css.d.ts.map delete mode 100644 node_modules/cheerio/dist/esm/api/css.js delete mode 100644 node_modules/cheerio/dist/esm/api/css.js.map delete mode 100644 node_modules/cheerio/dist/esm/api/extract.d.ts delete mode 100644 node_modules/cheerio/dist/esm/api/extract.d.ts.map delete mode 100644 node_modules/cheerio/dist/esm/api/extract.js delete mode 100644 node_modules/cheerio/dist/esm/api/extract.js.map delete mode 100644 node_modules/cheerio/dist/esm/api/forms.d.ts delete mode 100644 node_modules/cheerio/dist/esm/api/forms.d.ts.map delete mode 100644 node_modules/cheerio/dist/esm/api/forms.js delete mode 100644 node_modules/cheerio/dist/esm/api/forms.js.map delete mode 100644 node_modules/cheerio/dist/esm/api/manipulation.d.ts delete mode 100644 node_modules/cheerio/dist/esm/api/manipulation.d.ts.map delete mode 100644 node_modules/cheerio/dist/esm/api/manipulation.js delete mode 100644 node_modules/cheerio/dist/esm/api/manipulation.js.map delete mode 100644 node_modules/cheerio/dist/esm/api/traversing.d.ts delete mode 100644 node_modules/cheerio/dist/esm/api/traversing.d.ts.map delete mode 100644 node_modules/cheerio/dist/esm/api/traversing.js delete mode 100644 node_modules/cheerio/dist/esm/api/traversing.js.map delete mode 100644 node_modules/cheerio/dist/esm/cheerio.d.ts delete mode 100644 node_modules/cheerio/dist/esm/cheerio.d.ts.map delete mode 100644 node_modules/cheerio/dist/esm/cheerio.js delete mode 100644 node_modules/cheerio/dist/esm/cheerio.js.map delete mode 100644 node_modules/cheerio/dist/esm/index.d.ts delete mode 100644 node_modules/cheerio/dist/esm/index.d.ts.map delete mode 100644 node_modules/cheerio/dist/esm/index.js delete mode 100644 node_modules/cheerio/dist/esm/index.js.map delete mode 100644 node_modules/cheerio/dist/esm/load-parse.d.ts delete mode 100644 node_modules/cheerio/dist/esm/load-parse.d.ts.map delete mode 100644 node_modules/cheerio/dist/esm/load-parse.js delete mode 100644 node_modules/cheerio/dist/esm/load-parse.js.map delete mode 100644 node_modules/cheerio/dist/esm/load.d.ts delete mode 100644 node_modules/cheerio/dist/esm/load.d.ts.map delete mode 100644 node_modules/cheerio/dist/esm/load.js delete mode 100644 node_modules/cheerio/dist/esm/load.js.map delete mode 100644 node_modules/cheerio/dist/esm/options.d.ts delete mode 100644 node_modules/cheerio/dist/esm/options.d.ts.map delete mode 100644 node_modules/cheerio/dist/esm/options.js delete mode 100644 node_modules/cheerio/dist/esm/options.js.map delete mode 100644 node_modules/cheerio/dist/esm/package.json delete mode 100644 node_modules/cheerio/dist/esm/parse.d.ts delete mode 100644 node_modules/cheerio/dist/esm/parse.d.ts.map delete mode 100644 node_modules/cheerio/dist/esm/parse.js delete mode 100644 node_modules/cheerio/dist/esm/parse.js.map delete mode 100644 node_modules/cheerio/dist/esm/parsers/parse5-adapter.d.ts delete mode 100644 node_modules/cheerio/dist/esm/parsers/parse5-adapter.d.ts.map delete mode 100644 node_modules/cheerio/dist/esm/parsers/parse5-adapter.js delete mode 100644 node_modules/cheerio/dist/esm/parsers/parse5-adapter.js.map delete mode 100644 node_modules/cheerio/dist/esm/slim.d.ts delete mode 100644 node_modules/cheerio/dist/esm/slim.d.ts.map delete mode 100644 node_modules/cheerio/dist/esm/slim.js delete mode 100644 node_modules/cheerio/dist/esm/slim.js.map delete mode 100644 node_modules/cheerio/dist/esm/static.d.ts delete mode 100644 node_modules/cheerio/dist/esm/static.d.ts.map delete mode 100644 node_modules/cheerio/dist/esm/static.js delete mode 100644 node_modules/cheerio/dist/esm/static.js.map delete mode 100644 node_modules/cheerio/dist/esm/types.d.ts delete mode 100644 node_modules/cheerio/dist/esm/types.d.ts.map delete mode 100644 node_modules/cheerio/dist/esm/types.js delete mode 100644 node_modules/cheerio/dist/esm/types.js.map delete mode 100644 node_modules/cheerio/dist/esm/utils.d.ts delete mode 100644 node_modules/cheerio/dist/esm/utils.d.ts.map delete mode 100644 node_modules/cheerio/dist/esm/utils.js delete mode 100644 node_modules/cheerio/dist/esm/utils.js.map delete mode 100644 node_modules/cheerio/node_modules/undici/index-fetch.js delete mode 100644 node_modules/cheerio/node_modules/undici/index.d.ts delete mode 100644 node_modules/cheerio/node_modules/undici/index.js delete mode 100644 node_modules/cheerio/node_modules/undici/lib/api/abort-signal.js delete mode 100644 node_modules/cheerio/node_modules/undici/lib/api/api-connect.js delete mode 100644 node_modules/cheerio/node_modules/undici/lib/api/api-pipeline.js delete mode 100644 node_modules/cheerio/node_modules/undici/lib/api/api-request.js delete mode 100644 node_modules/cheerio/node_modules/undici/lib/api/api-stream.js delete mode 100644 node_modules/cheerio/node_modules/undici/lib/api/api-upgrade.js delete mode 100644 node_modules/cheerio/node_modules/undici/lib/api/index.js delete mode 100644 node_modules/cheerio/node_modules/undici/lib/api/readable.js delete mode 100644 node_modules/cheerio/node_modules/undici/lib/api/util.js delete mode 100644 node_modules/cheerio/node_modules/undici/lib/core/connect.js delete mode 100644 node_modules/cheerio/node_modules/undici/lib/core/constants.js delete mode 100644 node_modules/cheerio/node_modules/undici/lib/core/diagnostics.js delete mode 100644 node_modules/cheerio/node_modules/undici/lib/core/errors.js delete mode 100644 node_modules/cheerio/node_modules/undici/lib/core/request.js delete mode 100644 node_modules/cheerio/node_modules/undici/lib/core/symbols.js delete mode 100644 node_modules/cheerio/node_modules/undici/lib/core/util.js delete mode 100644 node_modules/cheerio/node_modules/undici/lib/dispatcher/fixed-queue.js delete mode 100644 node_modules/cheerio/node_modules/undici/lib/global.js delete mode 100644 node_modules/cheerio/node_modules/undici/lib/handler/decorator-handler.js delete mode 100644 node_modules/cheerio/node_modules/undici/lib/interceptor/redirect.js delete mode 100644 node_modules/cheerio/node_modules/undici/lib/interceptor/response-error.js delete mode 100644 node_modules/cheerio/node_modules/undici/lib/llhttp/constants.js delete mode 100644 node_modules/cheerio/node_modules/undici/lib/llhttp/llhttp-wasm.js delete mode 100644 node_modules/cheerio/node_modules/undici/lib/llhttp/llhttp_simd-wasm.js delete mode 100644 node_modules/cheerio/node_modules/undici/lib/llhttp/utils.js delete mode 100644 node_modules/cheerio/node_modules/undici/lib/mock/mock-agent.js delete mode 100644 node_modules/cheerio/node_modules/undici/lib/mock/mock-client.js delete mode 100644 node_modules/cheerio/node_modules/undici/lib/mock/mock-errors.js delete mode 100644 node_modules/cheerio/node_modules/undici/lib/mock/mock-interceptor.js delete mode 100644 node_modules/cheerio/node_modules/undici/lib/mock/mock-pool.js delete mode 100644 node_modules/cheerio/node_modules/undici/lib/mock/mock-symbols.js delete mode 100644 node_modules/cheerio/node_modules/undici/lib/mock/mock-utils.js delete mode 100644 node_modules/cheerio/node_modules/undici/lib/mock/pending-interceptors-formatter.js delete mode 100644 node_modules/cheerio/node_modules/undici/lib/mock/pluralizer.js delete mode 100644 node_modules/cheerio/node_modules/undici/lib/web/cache/symbols.js delete mode 100644 node_modules/cheerio/node_modules/undici/lib/web/fetch/file.js delete mode 100644 node_modules/cheerio/node_modules/undici/lib/web/fetch/symbols.js delete mode 100644 node_modules/cheerio/node_modules/undici/lib/web/fileapi/encoding.js delete mode 100644 node_modules/cheerio/node_modules/undici/lib/web/fileapi/filereader.js delete mode 100644 node_modules/cheerio/node_modules/undici/lib/web/fileapi/progressevent.js delete mode 100644 node_modules/cheerio/node_modules/undici/lib/web/fileapi/symbols.js delete mode 100644 node_modules/cheerio/node_modules/undici/lib/web/fileapi/util.js delete mode 100644 node_modules/cheerio/node_modules/undici/lib/web/websocket/constants.js delete mode 100644 node_modules/cheerio/node_modules/undici/lib/web/websocket/symbols.js delete mode 100644 node_modules/cheerio/node_modules/undici/package.json delete mode 100644 node_modules/cheerio/node_modules/undici/types/agent.d.ts delete mode 100644 node_modules/cheerio/node_modules/undici/types/api.d.ts delete mode 100644 node_modules/cheerio/node_modules/undici/types/balanced-pool.d.ts delete mode 100644 node_modules/cheerio/node_modules/undici/types/cache.d.ts delete mode 100644 node_modules/cheerio/node_modules/undici/types/client.d.ts delete mode 100644 node_modules/cheerio/node_modules/undici/types/connector.d.ts delete mode 100644 node_modules/cheerio/node_modules/undici/types/content-type.d.ts delete mode 100644 node_modules/cheerio/node_modules/undici/types/cookies.d.ts delete mode 100644 node_modules/cheerio/node_modules/undici/types/diagnostics-channel.d.ts delete mode 100644 node_modules/cheerio/node_modules/undici/types/dispatcher.d.ts delete mode 100644 node_modules/cheerio/node_modules/undici/types/errors.d.ts delete mode 100644 node_modules/cheerio/node_modules/undici/types/fetch.d.ts delete mode 100644 node_modules/cheerio/node_modules/undici/types/file.d.ts delete mode 100644 node_modules/cheerio/node_modules/undici/types/filereader.d.ts delete mode 100644 node_modules/cheerio/node_modules/undici/types/formdata.d.ts delete mode 100644 node_modules/cheerio/node_modules/undici/types/global-dispatcher.d.ts delete mode 100644 node_modules/cheerio/node_modules/undici/types/global-origin.d.ts delete mode 100644 node_modules/cheerio/node_modules/undici/types/handlers.d.ts delete mode 100644 node_modules/cheerio/node_modules/undici/types/header.d.ts delete mode 100644 node_modules/cheerio/node_modules/undici/types/index.d.ts delete mode 100644 node_modules/cheerio/node_modules/undici/types/interceptors.d.ts delete mode 100644 node_modules/cheerio/node_modules/undici/types/mock-agent.d.ts delete mode 100644 node_modules/cheerio/node_modules/undici/types/mock-client.d.ts delete mode 100644 node_modules/cheerio/node_modules/undici/types/mock-errors.d.ts delete mode 100644 node_modules/cheerio/node_modules/undici/types/mock-interceptor.d.ts delete mode 100644 node_modules/cheerio/node_modules/undici/types/mock-pool.d.ts delete mode 100644 node_modules/cheerio/node_modules/undici/types/patch.d.ts delete mode 100644 node_modules/cheerio/node_modules/undici/types/pool-stats.d.ts delete mode 100644 node_modules/cheerio/node_modules/undici/types/pool.d.ts delete mode 100644 node_modules/cheerio/node_modules/undici/types/proxy-agent.d.ts delete mode 100644 node_modules/cheerio/node_modules/undici/types/readable.d.ts delete mode 100644 node_modules/cheerio/node_modules/undici/types/retry-handler.d.ts delete mode 100644 node_modules/cheerio/node_modules/undici/types/webidl.d.ts delete mode 100644 node_modules/cheerio/node_modules/undici/types/websocket.d.ts delete mode 100644 node_modules/cheerio/package.json delete mode 100644 node_modules/cheerio/src/__fixtures__/fixtures.ts delete mode 100644 node_modules/cheerio/src/__tests__/deprecated.spec.ts delete mode 100644 node_modules/cheerio/src/__tests__/xml.spec.ts delete mode 100644 node_modules/cheerio/src/api/attributes.spec.ts delete mode 100644 node_modules/cheerio/src/api/attributes.ts delete mode 100644 node_modules/cheerio/src/api/css.spec.ts delete mode 100644 node_modules/cheerio/src/api/css.ts delete mode 100644 node_modules/cheerio/src/api/extract.spec.ts delete mode 100644 node_modules/cheerio/src/api/extract.ts delete mode 100644 node_modules/cheerio/src/api/forms.spec.ts delete mode 100644 node_modules/cheerio/src/api/forms.ts delete mode 100644 node_modules/cheerio/src/api/manipulation.spec.ts delete mode 100644 node_modules/cheerio/src/api/manipulation.ts delete mode 100644 node_modules/cheerio/src/api/traversing.spec.ts delete mode 100644 node_modules/cheerio/src/api/traversing.ts delete mode 100644 node_modules/cheerio/src/cheerio.spec.ts delete mode 100644 node_modules/cheerio/src/cheerio.ts delete mode 100644 node_modules/cheerio/src/index-browser.mts delete mode 100644 node_modules/cheerio/src/index.spec.ts delete mode 100644 node_modules/cheerio/src/index.ts delete mode 100644 node_modules/cheerio/src/load-parse.ts delete mode 100644 node_modules/cheerio/src/load.spec.ts delete mode 100644 node_modules/cheerio/src/load.ts delete mode 100644 node_modules/cheerio/src/options.ts delete mode 100644 node_modules/cheerio/src/parse.spec.ts delete mode 100644 node_modules/cheerio/src/parse.ts delete mode 100644 node_modules/cheerio/src/parsers/parse5-adapter.ts delete mode 100644 node_modules/cheerio/src/slim.ts delete mode 100644 node_modules/cheerio/src/static.spec.ts delete mode 100644 node_modules/cheerio/src/static.ts delete mode 100644 node_modules/cheerio/src/types.ts delete mode 100644 node_modules/cheerio/src/utils.spec.ts delete mode 100644 node_modules/cheerio/src/utils.ts delete mode 100644 node_modules/chokidar/index.js delete mode 100644 node_modules/chokidar/lib/constants.js delete mode 100644 node_modules/chokidar/lib/fsevents-handler.js delete mode 100644 node_modules/chokidar/lib/nodefs-handler.js delete mode 100644 node_modules/chokidar/package.json delete mode 100644 node_modules/chokidar/types/index.d.ts delete mode 100644 node_modules/cliui/build/index.cjs delete mode 100644 node_modules/cliui/build/lib/index.js delete mode 100644 node_modules/cliui/build/lib/string-utils.js delete mode 100644 node_modules/cliui/index.mjs delete mode 100644 node_modules/cliui/node_modules/ansi-regex/index.d.ts delete mode 100644 node_modules/cliui/node_modules/ansi-regex/index.js delete mode 100644 node_modules/cliui/node_modules/ansi-regex/package.json delete mode 100644 node_modules/cliui/node_modules/ansi-styles/index.d.ts delete mode 100644 node_modules/cliui/node_modules/ansi-styles/index.js delete mode 100644 node_modules/cliui/node_modules/ansi-styles/package.json delete mode 100644 node_modules/cliui/node_modules/emoji-regex/es2015/index.js delete mode 100644 node_modules/cliui/node_modules/emoji-regex/es2015/text.js delete mode 100644 node_modules/cliui/node_modules/emoji-regex/index.d.ts delete mode 100644 node_modules/cliui/node_modules/emoji-regex/index.js delete mode 100644 node_modules/cliui/node_modules/emoji-regex/package.json delete mode 100644 node_modules/cliui/node_modules/emoji-regex/text.js delete mode 100644 node_modules/cliui/node_modules/string-width/index.d.ts delete mode 100644 node_modules/cliui/node_modules/string-width/index.js delete mode 100644 node_modules/cliui/node_modules/string-width/package.json delete mode 100644 node_modules/cliui/node_modules/strip-ansi/index.d.ts delete mode 100644 node_modules/cliui/node_modules/strip-ansi/index.js delete mode 100644 node_modules/cliui/node_modules/strip-ansi/package.json delete mode 100644 node_modules/cliui/node_modules/wrap-ansi/index.js delete mode 100644 node_modules/cliui/node_modules/wrap-ansi/package.json delete mode 100644 node_modules/cliui/package.json delete mode 100644 node_modules/concat-map/example/map.js delete mode 100644 node_modules/concat-map/index.js delete mode 100644 node_modules/concat-map/package.json delete mode 100644 node_modules/css-select/lib/attributes.d.ts delete mode 100644 node_modules/css-select/lib/attributes.d.ts.map delete mode 100644 node_modules/css-select/lib/attributes.js delete mode 100644 node_modules/css-select/lib/attributes.js.map delete mode 100644 node_modules/css-select/lib/compile.d.ts delete mode 100644 node_modules/css-select/lib/compile.d.ts.map delete mode 100644 node_modules/css-select/lib/compile.js delete mode 100644 node_modules/css-select/lib/compile.js.map delete mode 100644 node_modules/css-select/lib/esm/attributes.d.ts delete mode 100644 node_modules/css-select/lib/esm/attributes.d.ts.map delete mode 100644 node_modules/css-select/lib/esm/attributes.js delete mode 100644 node_modules/css-select/lib/esm/attributes.js.map delete mode 100644 node_modules/css-select/lib/esm/compile.d.ts delete mode 100644 node_modules/css-select/lib/esm/compile.d.ts.map delete mode 100644 node_modules/css-select/lib/esm/compile.js delete mode 100644 node_modules/css-select/lib/esm/compile.js.map delete mode 100644 node_modules/css-select/lib/esm/general.d.ts delete mode 100644 node_modules/css-select/lib/esm/general.d.ts.map delete mode 100644 node_modules/css-select/lib/esm/general.js delete mode 100644 node_modules/css-select/lib/esm/general.js.map delete mode 100644 node_modules/css-select/lib/esm/index.d.ts delete mode 100644 node_modules/css-select/lib/esm/index.d.ts.map delete mode 100644 node_modules/css-select/lib/esm/index.js delete mode 100644 node_modules/css-select/lib/esm/index.js.map delete mode 100644 node_modules/css-select/lib/esm/package.json delete mode 100644 node_modules/css-select/lib/esm/pseudo-selectors/aliases.d.ts delete mode 100644 node_modules/css-select/lib/esm/pseudo-selectors/aliases.d.ts.map delete mode 100644 node_modules/css-select/lib/esm/pseudo-selectors/aliases.js delete mode 100644 node_modules/css-select/lib/esm/pseudo-selectors/aliases.js.map delete mode 100644 node_modules/css-select/lib/esm/pseudo-selectors/filters.d.ts delete mode 100644 node_modules/css-select/lib/esm/pseudo-selectors/filters.d.ts.map delete mode 100644 node_modules/css-select/lib/esm/pseudo-selectors/filters.js delete mode 100644 node_modules/css-select/lib/esm/pseudo-selectors/filters.js.map delete mode 100644 node_modules/css-select/lib/esm/pseudo-selectors/index.d.ts delete mode 100644 node_modules/css-select/lib/esm/pseudo-selectors/index.d.ts.map delete mode 100644 node_modules/css-select/lib/esm/pseudo-selectors/index.js delete mode 100644 node_modules/css-select/lib/esm/pseudo-selectors/index.js.map delete mode 100644 node_modules/css-select/lib/esm/pseudo-selectors/pseudos.d.ts delete mode 100644 node_modules/css-select/lib/esm/pseudo-selectors/pseudos.d.ts.map delete mode 100644 node_modules/css-select/lib/esm/pseudo-selectors/pseudos.js delete mode 100644 node_modules/css-select/lib/esm/pseudo-selectors/pseudos.js.map delete mode 100644 node_modules/css-select/lib/esm/pseudo-selectors/subselects.d.ts delete mode 100644 node_modules/css-select/lib/esm/pseudo-selectors/subselects.d.ts.map delete mode 100644 node_modules/css-select/lib/esm/pseudo-selectors/subselects.js delete mode 100644 node_modules/css-select/lib/esm/pseudo-selectors/subselects.js.map delete mode 100644 node_modules/css-select/lib/esm/sort.d.ts delete mode 100644 node_modules/css-select/lib/esm/sort.d.ts.map delete mode 100644 node_modules/css-select/lib/esm/sort.js delete mode 100644 node_modules/css-select/lib/esm/sort.js.map delete mode 100644 node_modules/css-select/lib/esm/types.d.ts delete mode 100644 node_modules/css-select/lib/esm/types.d.ts.map delete mode 100644 node_modules/css-select/lib/esm/types.js delete mode 100644 node_modules/css-select/lib/esm/types.js.map delete mode 100644 node_modules/css-select/lib/general.d.ts delete mode 100644 node_modules/css-select/lib/general.d.ts.map delete mode 100644 node_modules/css-select/lib/general.js delete mode 100644 node_modules/css-select/lib/general.js.map delete mode 100644 node_modules/css-select/lib/index.d.ts delete mode 100644 node_modules/css-select/lib/index.d.ts.map delete mode 100644 node_modules/css-select/lib/index.js delete mode 100644 node_modules/css-select/lib/index.js.map delete mode 100644 node_modules/css-select/lib/pseudo-selectors/aliases.d.ts delete mode 100644 node_modules/css-select/lib/pseudo-selectors/aliases.d.ts.map delete mode 100644 node_modules/css-select/lib/pseudo-selectors/aliases.js delete mode 100644 node_modules/css-select/lib/pseudo-selectors/aliases.js.map delete mode 100644 node_modules/css-select/lib/pseudo-selectors/filters.d.ts delete mode 100644 node_modules/css-select/lib/pseudo-selectors/filters.d.ts.map delete mode 100644 node_modules/css-select/lib/pseudo-selectors/filters.js delete mode 100644 node_modules/css-select/lib/pseudo-selectors/filters.js.map delete mode 100644 node_modules/css-select/lib/pseudo-selectors/index.d.ts delete mode 100644 node_modules/css-select/lib/pseudo-selectors/index.d.ts.map delete mode 100644 node_modules/css-select/lib/pseudo-selectors/index.js delete mode 100644 node_modules/css-select/lib/pseudo-selectors/index.js.map delete mode 100644 node_modules/css-select/lib/pseudo-selectors/pseudos.d.ts delete mode 100644 node_modules/css-select/lib/pseudo-selectors/pseudos.d.ts.map delete mode 100644 node_modules/css-select/lib/pseudo-selectors/pseudos.js delete mode 100644 node_modules/css-select/lib/pseudo-selectors/pseudos.js.map delete mode 100644 node_modules/css-select/lib/pseudo-selectors/subselects.d.ts delete mode 100644 node_modules/css-select/lib/pseudo-selectors/subselects.d.ts.map delete mode 100644 node_modules/css-select/lib/pseudo-selectors/subselects.js delete mode 100644 node_modules/css-select/lib/pseudo-selectors/subselects.js.map delete mode 100644 node_modules/css-select/lib/sort.d.ts delete mode 100644 node_modules/css-select/lib/sort.d.ts.map delete mode 100644 node_modules/css-select/lib/sort.js delete mode 100644 node_modules/css-select/lib/sort.js.map delete mode 100644 node_modules/css-select/lib/types.d.ts delete mode 100644 node_modules/css-select/lib/types.d.ts.map delete mode 100644 node_modules/css-select/lib/types.js delete mode 100644 node_modules/css-select/lib/types.js.map delete mode 100644 node_modules/css-select/package.json delete mode 100644 node_modules/css-what/lib/commonjs/index.d.ts delete mode 100644 node_modules/css-what/lib/commonjs/index.d.ts.map delete mode 100644 node_modules/css-what/lib/commonjs/index.js delete mode 100644 node_modules/css-what/lib/commonjs/parse.d.ts delete mode 100644 node_modules/css-what/lib/commonjs/parse.d.ts.map delete mode 100644 node_modules/css-what/lib/commonjs/parse.js delete mode 100644 node_modules/css-what/lib/commonjs/stringify.d.ts delete mode 100644 node_modules/css-what/lib/commonjs/stringify.d.ts.map delete mode 100644 node_modules/css-what/lib/commonjs/stringify.js delete mode 100644 node_modules/css-what/lib/commonjs/types.d.ts delete mode 100644 node_modules/css-what/lib/commonjs/types.d.ts.map delete mode 100644 node_modules/css-what/lib/commonjs/types.js delete mode 100644 node_modules/css-what/lib/es/index.d.ts delete mode 100644 node_modules/css-what/lib/es/index.d.ts.map delete mode 100644 node_modules/css-what/lib/es/index.js delete mode 100644 node_modules/css-what/lib/es/parse.d.ts delete mode 100644 node_modules/css-what/lib/es/parse.d.ts.map delete mode 100644 node_modules/css-what/lib/es/parse.js delete mode 100644 node_modules/css-what/lib/es/stringify.d.ts delete mode 100644 node_modules/css-what/lib/es/stringify.d.ts.map delete mode 100644 node_modules/css-what/lib/es/stringify.js delete mode 100644 node_modules/css-what/lib/es/types.d.ts delete mode 100644 node_modules/css-what/lib/es/types.d.ts.map delete mode 100644 node_modules/css-what/lib/es/types.js delete mode 100644 node_modules/css-what/package.json delete mode 100644 node_modules/dom-serializer/lib/esm/foreignNames.d.ts delete mode 100644 node_modules/dom-serializer/lib/esm/foreignNames.d.ts.map delete mode 100644 node_modules/dom-serializer/lib/esm/foreignNames.js delete mode 100644 node_modules/dom-serializer/lib/esm/index.d.ts delete mode 100644 node_modules/dom-serializer/lib/esm/index.d.ts.map delete mode 100644 node_modules/dom-serializer/lib/esm/index.js delete mode 100644 node_modules/dom-serializer/lib/esm/package.json delete mode 100644 node_modules/dom-serializer/lib/foreignNames.d.ts delete mode 100644 node_modules/dom-serializer/lib/foreignNames.d.ts.map delete mode 100644 node_modules/dom-serializer/lib/foreignNames.js delete mode 100644 node_modules/dom-serializer/lib/index.d.ts delete mode 100644 node_modules/dom-serializer/lib/index.d.ts.map delete mode 100644 node_modules/dom-serializer/lib/index.js delete mode 100644 node_modules/dom-serializer/package.json delete mode 100644 node_modules/domelementtype/lib/esm/index.d.ts delete mode 100644 node_modules/domelementtype/lib/esm/index.d.ts.map delete mode 100644 node_modules/domelementtype/lib/esm/index.js delete mode 100644 node_modules/domelementtype/lib/esm/package.json delete mode 100644 node_modules/domelementtype/lib/index.d.ts delete mode 100644 node_modules/domelementtype/lib/index.d.ts.map delete mode 100644 node_modules/domelementtype/lib/index.js delete mode 100644 node_modules/domelementtype/package.json delete mode 100644 node_modules/domhandler/lib/esm/index.d.ts delete mode 100644 node_modules/domhandler/lib/esm/index.d.ts.map delete mode 100644 node_modules/domhandler/lib/esm/index.js delete mode 100644 node_modules/domhandler/lib/esm/node.d.ts delete mode 100644 node_modules/domhandler/lib/esm/node.d.ts.map delete mode 100644 node_modules/domhandler/lib/esm/node.js delete mode 100644 node_modules/domhandler/lib/esm/package.json delete mode 100644 node_modules/domhandler/lib/index.d.ts delete mode 100644 node_modules/domhandler/lib/index.d.ts.map delete mode 100644 node_modules/domhandler/lib/index.js delete mode 100644 node_modules/domhandler/lib/node.d.ts delete mode 100644 node_modules/domhandler/lib/node.d.ts.map delete mode 100644 node_modules/domhandler/lib/node.js delete mode 100644 node_modules/domhandler/package.json delete mode 100644 node_modules/domutils/lib/esm/feeds.d.ts delete mode 100644 node_modules/domutils/lib/esm/feeds.d.ts.map delete mode 100644 node_modules/domutils/lib/esm/feeds.js delete mode 100644 node_modules/domutils/lib/esm/feeds.js.map delete mode 100644 node_modules/domutils/lib/esm/helpers.d.ts delete mode 100644 node_modules/domutils/lib/esm/helpers.d.ts.map delete mode 100644 node_modules/domutils/lib/esm/helpers.js delete mode 100644 node_modules/domutils/lib/esm/helpers.js.map delete mode 100644 node_modules/domutils/lib/esm/index.d.ts delete mode 100644 node_modules/domutils/lib/esm/index.d.ts.map delete mode 100644 node_modules/domutils/lib/esm/index.js delete mode 100644 node_modules/domutils/lib/esm/index.js.map delete mode 100644 node_modules/domutils/lib/esm/legacy.d.ts delete mode 100644 node_modules/domutils/lib/esm/legacy.d.ts.map delete mode 100644 node_modules/domutils/lib/esm/legacy.js delete mode 100644 node_modules/domutils/lib/esm/legacy.js.map delete mode 100644 node_modules/domutils/lib/esm/manipulation.d.ts delete mode 100644 node_modules/domutils/lib/esm/manipulation.d.ts.map delete mode 100644 node_modules/domutils/lib/esm/manipulation.js delete mode 100644 node_modules/domutils/lib/esm/manipulation.js.map delete mode 100644 node_modules/domutils/lib/esm/package.json delete mode 100644 node_modules/domutils/lib/esm/querying.d.ts delete mode 100644 node_modules/domutils/lib/esm/querying.d.ts.map delete mode 100644 node_modules/domutils/lib/esm/querying.js delete mode 100644 node_modules/domutils/lib/esm/querying.js.map delete mode 100644 node_modules/domutils/lib/esm/stringify.d.ts delete mode 100644 node_modules/domutils/lib/esm/stringify.d.ts.map delete mode 100644 node_modules/domutils/lib/esm/stringify.js delete mode 100644 node_modules/domutils/lib/esm/stringify.js.map delete mode 100644 node_modules/domutils/lib/esm/traversal.d.ts delete mode 100644 node_modules/domutils/lib/esm/traversal.d.ts.map delete mode 100644 node_modules/domutils/lib/esm/traversal.js delete mode 100644 node_modules/domutils/lib/esm/traversal.js.map delete mode 100644 node_modules/domutils/lib/feeds.d.ts delete mode 100644 node_modules/domutils/lib/feeds.d.ts.map delete mode 100644 node_modules/domutils/lib/feeds.js delete mode 100644 node_modules/domutils/lib/feeds.js.map delete mode 100644 node_modules/domutils/lib/helpers.d.ts delete mode 100644 node_modules/domutils/lib/helpers.d.ts.map delete mode 100644 node_modules/domutils/lib/helpers.js delete mode 100644 node_modules/domutils/lib/helpers.js.map delete mode 100644 node_modules/domutils/lib/index.d.ts delete mode 100644 node_modules/domutils/lib/index.d.ts.map delete mode 100644 node_modules/domutils/lib/index.js delete mode 100644 node_modules/domutils/lib/index.js.map delete mode 100644 node_modules/domutils/lib/legacy.d.ts delete mode 100644 node_modules/domutils/lib/legacy.d.ts.map delete mode 100644 node_modules/domutils/lib/legacy.js delete mode 100644 node_modules/domutils/lib/legacy.js.map delete mode 100644 node_modules/domutils/lib/manipulation.d.ts delete mode 100644 node_modules/domutils/lib/manipulation.d.ts.map delete mode 100644 node_modules/domutils/lib/manipulation.js delete mode 100644 node_modules/domutils/lib/manipulation.js.map delete mode 100644 node_modules/domutils/lib/querying.d.ts delete mode 100644 node_modules/domutils/lib/querying.d.ts.map delete mode 100644 node_modules/domutils/lib/querying.js delete mode 100644 node_modules/domutils/lib/querying.js.map delete mode 100644 node_modules/domutils/lib/stringify.d.ts delete mode 100644 node_modules/domutils/lib/stringify.d.ts.map delete mode 100644 node_modules/domutils/lib/stringify.js delete mode 100644 node_modules/domutils/lib/stringify.js.map delete mode 100644 node_modules/domutils/lib/traversal.d.ts delete mode 100644 node_modules/domutils/lib/traversal.d.ts.map delete mode 100644 node_modules/domutils/lib/traversal.js delete mode 100644 node_modules/domutils/lib/traversal.js.map delete mode 100644 node_modules/domutils/package.json delete mode 100644 node_modules/encoding-sniffer/dist/commonjs/index.d.ts delete mode 100644 node_modules/encoding-sniffer/dist/commonjs/index.d.ts.map delete mode 100644 node_modules/encoding-sniffer/dist/commonjs/index.js delete mode 100644 node_modules/encoding-sniffer/dist/commonjs/index.js.map delete mode 100644 node_modules/encoding-sniffer/dist/commonjs/package.json delete mode 100644 node_modules/encoding-sniffer/dist/commonjs/sniffer.d.ts delete mode 100644 node_modules/encoding-sniffer/dist/commonjs/sniffer.d.ts.map delete mode 100644 node_modules/encoding-sniffer/dist/commonjs/sniffer.js delete mode 100644 node_modules/encoding-sniffer/dist/commonjs/sniffer.js.map delete mode 100644 node_modules/encoding-sniffer/dist/esm/index.d.ts delete mode 100644 node_modules/encoding-sniffer/dist/esm/index.d.ts.map delete mode 100644 node_modules/encoding-sniffer/dist/esm/index.js delete mode 100644 node_modules/encoding-sniffer/dist/esm/index.js.map delete mode 100644 node_modules/encoding-sniffer/dist/esm/package.json delete mode 100644 node_modules/encoding-sniffer/dist/esm/sniffer.d.ts delete mode 100644 node_modules/encoding-sniffer/dist/esm/sniffer.d.ts.map delete mode 100644 node_modules/encoding-sniffer/dist/esm/sniffer.js delete mode 100644 node_modules/encoding-sniffer/dist/esm/sniffer.js.map delete mode 100644 node_modules/encoding-sniffer/node_modules/iconv-lite/encodings/dbcs-codec.js delete mode 100644 node_modules/encoding-sniffer/node_modules/iconv-lite/encodings/index.js delete mode 100644 node_modules/encoding-sniffer/node_modules/iconv-lite/encodings/internal.js delete mode 100644 node_modules/encoding-sniffer/node_modules/iconv-lite/encodings/tables/gbk-added.json delete mode 100644 node_modules/encoding-sniffer/node_modules/iconv-lite/lib/index.d.ts delete mode 100644 node_modules/encoding-sniffer/node_modules/iconv-lite/lib/index.js delete mode 100644 node_modules/encoding-sniffer/node_modules/iconv-lite/lib/streams.js delete mode 100644 node_modules/encoding-sniffer/package.json delete mode 100644 node_modules/entities/lib/decode.d.ts delete mode 100644 node_modules/entities/lib/decode.d.ts.map delete mode 100644 node_modules/entities/lib/decode.js delete mode 100644 node_modules/entities/lib/decode.js.map delete mode 100644 node_modules/entities/lib/decode_codepoint.d.ts delete mode 100644 node_modules/entities/lib/decode_codepoint.d.ts.map delete mode 100644 node_modules/entities/lib/decode_codepoint.js delete mode 100644 node_modules/entities/lib/decode_codepoint.js.map delete mode 100644 node_modules/entities/lib/encode.d.ts delete mode 100644 node_modules/entities/lib/encode.d.ts.map delete mode 100644 node_modules/entities/lib/encode.js delete mode 100644 node_modules/entities/lib/encode.js.map delete mode 100644 node_modules/entities/lib/escape.d.ts delete mode 100644 node_modules/entities/lib/escape.d.ts.map delete mode 100644 node_modules/entities/lib/escape.js delete mode 100644 node_modules/entities/lib/escape.js.map delete mode 100644 node_modules/entities/lib/esm/decode.d.ts delete mode 100644 node_modules/entities/lib/esm/decode.d.ts.map delete mode 100644 node_modules/entities/lib/esm/decode.js delete mode 100644 node_modules/entities/lib/esm/decode.js.map delete mode 100644 node_modules/entities/lib/esm/decode_codepoint.d.ts delete mode 100644 node_modules/entities/lib/esm/decode_codepoint.d.ts.map delete mode 100644 node_modules/entities/lib/esm/decode_codepoint.js delete mode 100644 node_modules/entities/lib/esm/decode_codepoint.js.map delete mode 100644 node_modules/entities/lib/esm/encode.d.ts delete mode 100644 node_modules/entities/lib/esm/encode.d.ts.map delete mode 100644 node_modules/entities/lib/esm/encode.js delete mode 100644 node_modules/entities/lib/esm/encode.js.map delete mode 100644 node_modules/entities/lib/esm/escape.d.ts delete mode 100644 node_modules/entities/lib/esm/escape.d.ts.map delete mode 100644 node_modules/entities/lib/esm/escape.js delete mode 100644 node_modules/entities/lib/esm/escape.js.map delete mode 100644 node_modules/entities/lib/esm/generated/decode-data-html.d.ts delete mode 100644 node_modules/entities/lib/esm/generated/decode-data-html.d.ts.map delete mode 100644 node_modules/entities/lib/esm/generated/decode-data-html.js delete mode 100644 node_modules/entities/lib/esm/generated/decode-data-html.js.map delete mode 100644 node_modules/entities/lib/esm/generated/decode-data-xml.d.ts delete mode 100644 node_modules/entities/lib/esm/generated/decode-data-xml.d.ts.map delete mode 100644 node_modules/entities/lib/esm/generated/decode-data-xml.js delete mode 100644 node_modules/entities/lib/esm/generated/decode-data-xml.js.map delete mode 100644 node_modules/entities/lib/esm/generated/encode-html.d.ts delete mode 100644 node_modules/entities/lib/esm/generated/encode-html.d.ts.map delete mode 100644 node_modules/entities/lib/esm/generated/encode-html.js delete mode 100644 node_modules/entities/lib/esm/generated/encode-html.js.map delete mode 100644 node_modules/entities/lib/esm/index.d.ts delete mode 100644 node_modules/entities/lib/esm/index.d.ts.map delete mode 100644 node_modules/entities/lib/esm/index.js delete mode 100644 node_modules/entities/lib/esm/index.js.map delete mode 100644 node_modules/entities/lib/esm/package.json delete mode 100644 node_modules/entities/lib/generated/decode-data-html.d.ts delete mode 100644 node_modules/entities/lib/generated/decode-data-html.d.ts.map delete mode 100644 node_modules/entities/lib/generated/decode-data-html.js delete mode 100644 node_modules/entities/lib/generated/decode-data-html.js.map delete mode 100644 node_modules/entities/lib/generated/decode-data-xml.d.ts delete mode 100644 node_modules/entities/lib/generated/decode-data-xml.d.ts.map delete mode 100644 node_modules/entities/lib/generated/decode-data-xml.js delete mode 100644 node_modules/entities/lib/generated/decode-data-xml.js.map delete mode 100644 node_modules/entities/lib/generated/encode-html.d.ts delete mode 100644 node_modules/entities/lib/generated/encode-html.d.ts.map delete mode 100644 node_modules/entities/lib/generated/encode-html.js delete mode 100644 node_modules/entities/lib/generated/encode-html.js.map delete mode 100644 node_modules/entities/lib/index.d.ts delete mode 100644 node_modules/entities/lib/index.d.ts.map delete mode 100644 node_modules/entities/lib/index.js delete mode 100644 node_modules/entities/lib/index.js.map delete mode 100644 node_modules/entities/package.json delete mode 100644 node_modules/escalade/dist/index.js delete mode 100644 node_modules/escalade/dist/index.mjs delete mode 100644 node_modules/escalade/index.d.mts delete mode 100644 node_modules/escalade/index.d.ts delete mode 100644 node_modules/escalade/package.json delete mode 100644 node_modules/escalade/sync/index.d.mts delete mode 100644 node_modules/escalade/sync/index.d.ts delete mode 100644 node_modules/escalade/sync/index.js delete mode 100644 node_modules/escalade/sync/index.mjs create mode 100644 node_modules/express/node_modules/body-parser/index.js create mode 100644 node_modules/express/node_modules/body-parser/lib/read.js create mode 100644 node_modules/express/node_modules/body-parser/lib/types/json.js create mode 100644 node_modules/express/node_modules/body-parser/lib/types/raw.js create mode 100644 node_modules/express/node_modules/body-parser/lib/types/text.js create mode 100644 node_modules/express/node_modules/body-parser/lib/types/urlencoded.js create mode 100644 node_modules/express/node_modules/body-parser/package.json rename node_modules/{whatwg-encoding => express}/node_modules/iconv-lite/encodings/dbcs-codec.js (82%) rename node_modules/{encoding-sniffer => express}/node_modules/iconv-lite/encodings/dbcs-data.js (87%) rename node_modules/{whatwg-encoding => express}/node_modules/iconv-lite/encodings/index.js (95%) rename node_modules/{whatwg-encoding => express}/node_modules/iconv-lite/encodings/internal.js (95%) rename node_modules/{encoding-sniffer => express}/node_modules/iconv-lite/encodings/sbcs-codec.js (100%) rename node_modules/{encoding-sniffer => express}/node_modules/iconv-lite/encodings/sbcs-data-generated.js (100%) rename node_modules/{encoding-sniffer => express}/node_modules/iconv-lite/encodings/sbcs-data.js (91%) rename node_modules/{encoding-sniffer => express}/node_modules/iconv-lite/encodings/tables/big5-added.json (100%) rename node_modules/{encoding-sniffer => express}/node_modules/iconv-lite/encodings/tables/cp936.json (100%) rename node_modules/{encoding-sniffer => express}/node_modules/iconv-lite/encodings/tables/cp949.json (100%) rename node_modules/{encoding-sniffer => express}/node_modules/iconv-lite/encodings/tables/cp950.json (100%) rename node_modules/{encoding-sniffer => express}/node_modules/iconv-lite/encodings/tables/eucjp.json (100%) rename node_modules/{encoding-sniffer => express}/node_modules/iconv-lite/encodings/tables/gb18030-ranges.json (100%) rename node_modules/{whatwg-encoding => express}/node_modules/iconv-lite/encodings/tables/gbk-added.json (93%) rename node_modules/{encoding-sniffer => express}/node_modules/iconv-lite/encodings/tables/shiftjis.json (100%) rename node_modules/{encoding-sniffer => express}/node_modules/iconv-lite/encodings/utf16.js (57%) rename node_modules/{encoding-sniffer => express}/node_modules/iconv-lite/encodings/utf7.js (95%) rename node_modules/{encoding-sniffer => express}/node_modules/iconv-lite/lib/bom-handling.js (100%) rename node_modules/{ => express/node_modules}/iconv-lite/lib/extend-node.js (100%) rename node_modules/{whatwg-encoding => express}/node_modules/iconv-lite/lib/index.d.ts (70%) rename node_modules/{whatwg-encoding => express}/node_modules/iconv-lite/lib/index.js (68%) create mode 100644 node_modules/express/node_modules/iconv-lite/lib/streams.js rename node_modules/{encoding-sniffer => express}/node_modules/iconv-lite/package.json (63%) create mode 100644 node_modules/express/node_modules/raw-body/index.d.ts create mode 100644 node_modules/express/node_modules/raw-body/index.js create mode 100644 node_modules/express/node_modules/raw-body/package.json delete mode 100644 node_modules/fill-range/index.js delete mode 100644 node_modules/fill-range/package.json delete mode 100644 node_modules/fs.realpath/index.js delete mode 100644 node_modules/fs.realpath/old.js delete mode 100644 node_modules/fs.realpath/package.json delete mode 100644 node_modules/get-caller-file/index.d.ts delete mode 100644 node_modules/get-caller-file/index.js delete mode 100644 node_modules/get-caller-file/index.js.map delete mode 100644 node_modules/get-caller-file/package.json delete mode 100644 node_modules/glob-parent/index.js delete mode 100644 node_modules/glob-parent/package.json delete mode 100644 node_modules/has-flag/index.js delete mode 100644 node_modules/has-flag/package.json delete mode 100644 node_modules/he/man/he.1 delete mode 100644 node_modules/htmlparser2/lib/Parser.d.ts delete mode 100644 node_modules/htmlparser2/lib/Parser.d.ts.map delete mode 100644 node_modules/htmlparser2/lib/Parser.js delete mode 100644 node_modules/htmlparser2/lib/Parser.js.map delete mode 100644 node_modules/htmlparser2/lib/Tokenizer.d.ts delete mode 100644 node_modules/htmlparser2/lib/Tokenizer.d.ts.map delete mode 100644 node_modules/htmlparser2/lib/Tokenizer.js delete mode 100644 node_modules/htmlparser2/lib/Tokenizer.js.map delete mode 100644 node_modules/htmlparser2/lib/WritableStream.d.ts delete mode 100644 node_modules/htmlparser2/lib/WritableStream.d.ts.map delete mode 100644 node_modules/htmlparser2/lib/WritableStream.js delete mode 100644 node_modules/htmlparser2/lib/WritableStream.js.map delete mode 100644 node_modules/htmlparser2/lib/esm/Parser.d.ts delete mode 100644 node_modules/htmlparser2/lib/esm/Parser.d.ts.map delete mode 100644 node_modules/htmlparser2/lib/esm/Parser.js delete mode 100644 node_modules/htmlparser2/lib/esm/Parser.js.map delete mode 100644 node_modules/htmlparser2/lib/esm/Tokenizer.d.ts delete mode 100644 node_modules/htmlparser2/lib/esm/Tokenizer.d.ts.map delete mode 100644 node_modules/htmlparser2/lib/esm/Tokenizer.js delete mode 100644 node_modules/htmlparser2/lib/esm/Tokenizer.js.map delete mode 100644 node_modules/htmlparser2/lib/esm/WritableStream.d.ts delete mode 100644 node_modules/htmlparser2/lib/esm/WritableStream.d.ts.map delete mode 100644 node_modules/htmlparser2/lib/esm/WritableStream.js delete mode 100644 node_modules/htmlparser2/lib/esm/WritableStream.js.map delete mode 100644 node_modules/htmlparser2/lib/esm/index.d.ts delete mode 100644 node_modules/htmlparser2/lib/esm/index.d.ts.map delete mode 100644 node_modules/htmlparser2/lib/esm/index.js delete mode 100644 node_modules/htmlparser2/lib/esm/index.js.map delete mode 100644 node_modules/htmlparser2/lib/esm/package.json delete mode 100644 node_modules/htmlparser2/lib/index.d.ts delete mode 100644 node_modules/htmlparser2/lib/index.d.ts.map delete mode 100644 node_modules/htmlparser2/lib/index.js delete mode 100644 node_modules/htmlparser2/lib/index.js.map delete mode 100644 node_modules/htmlparser2/package.json rename node_modules/{encoding-sniffer/node_modules => }/iconv-lite/encodings/utf32.js (100%) delete mode 100644 node_modules/ignore-by-default/index.js delete mode 100644 node_modules/ignore-by-default/package.json delete mode 100644 node_modules/inflight/inflight.js delete mode 100644 node_modules/inflight/package.json delete mode 100644 node_modules/is-binary-path/index.d.ts delete mode 100644 node_modules/is-binary-path/index.js delete mode 100644 node_modules/is-binary-path/package.json delete mode 100644 node_modules/is-extglob/index.js delete mode 100644 node_modules/is-extglob/package.json delete mode 100644 node_modules/is-glob/index.js delete mode 100644 node_modules/is-glob/package.json delete mode 100644 node_modules/is-number/index.js delete mode 100644 node_modules/is-number/package.json delete mode 100644 node_modules/minimatch/minimatch.js delete mode 100644 node_modules/minimatch/package.json delete mode 100644 node_modules/nodemon/bin/nodemon.js delete mode 100644 node_modules/nodemon/index.d.ts delete mode 100644 node_modules/nodemon/jsconfig.json delete mode 100644 node_modules/nodemon/lib/cli/index.js delete mode 100644 node_modules/nodemon/lib/cli/parse.js delete mode 100644 node_modules/nodemon/lib/config/command.js delete mode 100644 node_modules/nodemon/lib/config/defaults.js delete mode 100644 node_modules/nodemon/lib/config/exec.js delete mode 100644 node_modules/nodemon/lib/config/index.js delete mode 100644 node_modules/nodemon/lib/config/load.js delete mode 100644 node_modules/nodemon/lib/help/index.js delete mode 100644 node_modules/nodemon/lib/index.js delete mode 100644 node_modules/nodemon/lib/monitor/index.js delete mode 100644 node_modules/nodemon/lib/monitor/match.js delete mode 100644 node_modules/nodemon/lib/monitor/run.js delete mode 100644 node_modules/nodemon/lib/monitor/signals.js delete mode 100644 node_modules/nodemon/lib/monitor/watch.js delete mode 100644 node_modules/nodemon/lib/nodemon.js delete mode 100644 node_modules/nodemon/lib/rules/add.js delete mode 100644 node_modules/nodemon/lib/rules/index.js delete mode 100644 node_modules/nodemon/lib/rules/parse.js delete mode 100644 node_modules/nodemon/lib/spawn.js delete mode 100644 node_modules/nodemon/lib/utils/bus.js delete mode 100644 node_modules/nodemon/lib/utils/clone.js delete mode 100644 node_modules/nodemon/lib/utils/colour.js delete mode 100644 node_modules/nodemon/lib/utils/index.js delete mode 100644 node_modules/nodemon/lib/utils/log.js delete mode 100644 node_modules/nodemon/lib/utils/merge.js delete mode 100644 node_modules/nodemon/lib/version.js delete mode 100644 node_modules/nodemon/package.json delete mode 100644 node_modules/normalize-path/index.js delete mode 100644 node_modules/normalize-path/package.json delete mode 100644 node_modules/nth-check/lib/compile.d.ts delete mode 100644 node_modules/nth-check/lib/compile.d.ts.map delete mode 100644 node_modules/nth-check/lib/compile.js delete mode 100644 node_modules/nth-check/lib/compile.js.map delete mode 100644 node_modules/nth-check/lib/esm/compile.d.ts delete mode 100644 node_modules/nth-check/lib/esm/compile.d.ts.map delete mode 100644 node_modules/nth-check/lib/esm/compile.js delete mode 100644 node_modules/nth-check/lib/esm/compile.js.map delete mode 100644 node_modules/nth-check/lib/esm/index.d.ts delete mode 100644 node_modules/nth-check/lib/esm/index.d.ts.map delete mode 100644 node_modules/nth-check/lib/esm/index.js delete mode 100644 node_modules/nth-check/lib/esm/index.js.map delete mode 100644 node_modules/nth-check/lib/esm/package.json delete mode 100644 node_modules/nth-check/lib/esm/parse.d.ts delete mode 100644 node_modules/nth-check/lib/esm/parse.d.ts.map delete mode 100644 node_modules/nth-check/lib/esm/parse.js delete mode 100644 node_modules/nth-check/lib/esm/parse.js.map delete mode 100644 node_modules/nth-check/lib/index.d.ts delete mode 100644 node_modules/nth-check/lib/index.d.ts.map delete mode 100644 node_modules/nth-check/lib/index.js delete mode 100644 node_modules/nth-check/lib/index.js.map delete mode 100644 node_modules/nth-check/lib/parse.d.ts delete mode 100644 node_modules/nth-check/lib/parse.d.ts.map delete mode 100644 node_modules/nth-check/lib/parse.js delete mode 100644 node_modules/nth-check/lib/parse.js.map delete mode 100644 node_modules/nth-check/package.json delete mode 100644 node_modules/once/once.js delete mode 100644 node_modules/once/package.json delete mode 100644 node_modules/parse5-htmlparser2-tree-adapter/dist/cjs/index.d.ts delete mode 100644 node_modules/parse5-htmlparser2-tree-adapter/dist/cjs/index.js delete mode 100644 node_modules/parse5-htmlparser2-tree-adapter/dist/cjs/package.json delete mode 100644 node_modules/parse5-htmlparser2-tree-adapter/dist/index.d.ts delete mode 100644 node_modules/parse5-htmlparser2-tree-adapter/dist/index.js delete mode 100644 node_modules/parse5-htmlparser2-tree-adapter/package.json delete mode 100644 node_modules/parse5-parser-stream/dist/cjs/index.d.ts delete mode 100644 node_modules/parse5-parser-stream/dist/cjs/index.js delete mode 100644 node_modules/parse5-parser-stream/dist/cjs/package.json delete mode 100644 node_modules/parse5-parser-stream/dist/index.d.ts delete mode 100644 node_modules/parse5-parser-stream/dist/index.js delete mode 100644 node_modules/parse5-parser-stream/package.json delete mode 100644 node_modules/parse5/dist/cjs/common/doctype.d.ts delete mode 100644 node_modules/parse5/dist/cjs/common/doctype.js delete mode 100644 node_modules/parse5/dist/cjs/common/error-codes.d.ts delete mode 100644 node_modules/parse5/dist/cjs/common/error-codes.js delete mode 100644 node_modules/parse5/dist/cjs/common/foreign-content.d.ts delete mode 100644 node_modules/parse5/dist/cjs/common/foreign-content.js delete mode 100644 node_modules/parse5/dist/cjs/common/html.d.ts delete mode 100644 node_modules/parse5/dist/cjs/common/html.js delete mode 100644 node_modules/parse5/dist/cjs/common/token.d.ts delete mode 100644 node_modules/parse5/dist/cjs/common/token.js delete mode 100644 node_modules/parse5/dist/cjs/common/unicode.d.ts delete mode 100644 node_modules/parse5/dist/cjs/common/unicode.js delete mode 100644 node_modules/parse5/dist/cjs/index.d.ts delete mode 100644 node_modules/parse5/dist/cjs/index.js delete mode 100644 node_modules/parse5/dist/cjs/package.json delete mode 100644 node_modules/parse5/dist/cjs/parser/formatting-element-list.d.ts delete mode 100644 node_modules/parse5/dist/cjs/parser/formatting-element-list.js delete mode 100644 node_modules/parse5/dist/cjs/parser/index.d.ts delete mode 100644 node_modules/parse5/dist/cjs/parser/index.js delete mode 100644 node_modules/parse5/dist/cjs/parser/open-element-stack.d.ts delete mode 100644 node_modules/parse5/dist/cjs/parser/open-element-stack.js delete mode 100644 node_modules/parse5/dist/cjs/serializer/index.d.ts delete mode 100644 node_modules/parse5/dist/cjs/serializer/index.js delete mode 100644 node_modules/parse5/dist/cjs/tokenizer/index.d.ts delete mode 100644 node_modules/parse5/dist/cjs/tokenizer/index.js delete mode 100644 node_modules/parse5/dist/cjs/tokenizer/preprocessor.d.ts delete mode 100644 node_modules/parse5/dist/cjs/tokenizer/preprocessor.js delete mode 100644 node_modules/parse5/dist/cjs/tree-adapters/default.d.ts delete mode 100644 node_modules/parse5/dist/cjs/tree-adapters/default.js delete mode 100644 node_modules/parse5/dist/cjs/tree-adapters/interface.d.ts delete mode 100644 node_modules/parse5/dist/cjs/tree-adapters/interface.js delete mode 100644 node_modules/parse5/dist/common/doctype.d.ts delete mode 100644 node_modules/parse5/dist/common/doctype.js delete mode 100644 node_modules/parse5/dist/common/error-codes.d.ts delete mode 100644 node_modules/parse5/dist/common/error-codes.js delete mode 100644 node_modules/parse5/dist/common/foreign-content.d.ts delete mode 100644 node_modules/parse5/dist/common/foreign-content.js delete mode 100644 node_modules/parse5/dist/common/html.d.ts delete mode 100644 node_modules/parse5/dist/common/html.js delete mode 100644 node_modules/parse5/dist/common/token.d.ts delete mode 100644 node_modules/parse5/dist/common/token.js delete mode 100644 node_modules/parse5/dist/common/unicode.d.ts delete mode 100644 node_modules/parse5/dist/common/unicode.js delete mode 100644 node_modules/parse5/dist/index.d.ts delete mode 100644 node_modules/parse5/dist/index.js delete mode 100644 node_modules/parse5/dist/parser/formatting-element-list.d.ts delete mode 100644 node_modules/parse5/dist/parser/formatting-element-list.js delete mode 100644 node_modules/parse5/dist/parser/index.d.ts delete mode 100644 node_modules/parse5/dist/parser/index.js delete mode 100644 node_modules/parse5/dist/parser/open-element-stack.d.ts delete mode 100644 node_modules/parse5/dist/parser/open-element-stack.js delete mode 100644 node_modules/parse5/dist/serializer/index.d.ts delete mode 100644 node_modules/parse5/dist/serializer/index.js delete mode 100644 node_modules/parse5/dist/tokenizer/index.d.ts delete mode 100644 node_modules/parse5/dist/tokenizer/index.js delete mode 100644 node_modules/parse5/dist/tokenizer/preprocessor.d.ts delete mode 100644 node_modules/parse5/dist/tokenizer/preprocessor.js delete mode 100644 node_modules/parse5/dist/tree-adapters/default.d.ts delete mode 100644 node_modules/parse5/dist/tree-adapters/default.js delete mode 100644 node_modules/parse5/dist/tree-adapters/interface.d.ts delete mode 100644 node_modules/parse5/dist/tree-adapters/interface.js delete mode 100644 node_modules/parse5/package.json delete mode 100644 node_modules/path-is-absolute/index.js delete mode 100644 node_modules/path-is-absolute/package.json delete mode 100644 node_modules/picomatch/index.js delete mode 100644 node_modules/picomatch/lib/constants.js delete mode 100644 node_modules/picomatch/lib/parse.js delete mode 100644 node_modules/picomatch/lib/picomatch.js delete mode 100644 node_modules/picomatch/lib/scan.js delete mode 100644 node_modules/picomatch/lib/utils.js delete mode 100644 node_modules/picomatch/package.json delete mode 100644 node_modules/pstree.remy/lib/index.js delete mode 100644 node_modules/pstree.remy/lib/tree.js delete mode 100644 node_modules/pstree.remy/lib/utils.js delete mode 100644 node_modules/pstree.remy/package.json delete mode 100644 node_modules/readdirp/index.d.ts delete mode 100644 node_modules/readdirp/index.js delete mode 100644 node_modules/readdirp/package.json delete mode 100644 node_modules/replace-in-file/bin/cli.js delete mode 100644 node_modules/replace-in-file/index.js delete mode 100644 node_modules/replace-in-file/lib/helpers/combine-config.js delete mode 100644 node_modules/replace-in-file/lib/helpers/error-handler.js delete mode 100644 node_modules/replace-in-file/lib/helpers/get-paths-async.js delete mode 100644 node_modules/replace-in-file/lib/helpers/get-paths-sync.js delete mode 100644 node_modules/replace-in-file/lib/helpers/glob-async.js delete mode 100644 node_modules/replace-in-file/lib/helpers/load-config.js delete mode 100644 node_modules/replace-in-file/lib/helpers/make-replacements.js delete mode 100644 node_modules/replace-in-file/lib/helpers/parse-config.js delete mode 100644 node_modules/replace-in-file/lib/helpers/process-async.js delete mode 100644 node_modules/replace-in-file/lib/helpers/process-sync.js delete mode 100644 node_modules/replace-in-file/lib/helpers/replace-async.js delete mode 100644 node_modules/replace-in-file/lib/helpers/replace-sync.js delete mode 100644 node_modules/replace-in-file/lib/helpers/run-processors.js delete mode 100644 node_modules/replace-in-file/lib/helpers/success-handler.js delete mode 100644 node_modules/replace-in-file/lib/process-file.js delete mode 100644 node_modules/replace-in-file/lib/process-file.spec.js delete mode 100644 node_modules/replace-in-file/lib/replace-in-file.js delete mode 100644 node_modules/replace-in-file/lib/replace-in-file.spec.js delete mode 100644 node_modules/replace-in-file/node_modules/glob/common.js delete mode 100644 node_modules/replace-in-file/node_modules/glob/glob.js delete mode 100644 node_modules/replace-in-file/node_modules/glob/package.json delete mode 100644 node_modules/replace-in-file/node_modules/glob/sync.js delete mode 100644 node_modules/replace-in-file/package.json delete mode 100644 node_modules/replace-in-file/test/helpers/setup.js delete mode 100644 node_modules/replace-in-file/types/index.d.ts delete mode 100644 node_modules/require-directory/index.js delete mode 100644 node_modules/require-directory/package.json delete mode 100644 node_modules/semver/bin/semver.js delete mode 100644 node_modules/semver/classes/comparator.js delete mode 100644 node_modules/semver/classes/index.js delete mode 100644 node_modules/semver/classes/range.js delete mode 100644 node_modules/semver/classes/semver.js delete mode 100644 node_modules/semver/functions/clean.js delete mode 100644 node_modules/semver/functions/cmp.js delete mode 100644 node_modules/semver/functions/coerce.js delete mode 100644 node_modules/semver/functions/compare-build.js delete mode 100644 node_modules/semver/functions/compare-loose.js delete mode 100644 node_modules/semver/functions/compare.js delete mode 100644 node_modules/semver/functions/diff.js delete mode 100644 node_modules/semver/functions/eq.js delete mode 100644 node_modules/semver/functions/gt.js delete mode 100644 node_modules/semver/functions/gte.js delete mode 100644 node_modules/semver/functions/inc.js delete mode 100644 node_modules/semver/functions/lt.js delete mode 100644 node_modules/semver/functions/lte.js delete mode 100644 node_modules/semver/functions/major.js delete mode 100644 node_modules/semver/functions/minor.js delete mode 100644 node_modules/semver/functions/neq.js delete mode 100644 node_modules/semver/functions/parse.js delete mode 100644 node_modules/semver/functions/patch.js delete mode 100644 node_modules/semver/functions/prerelease.js delete mode 100644 node_modules/semver/functions/rcompare.js delete mode 100644 node_modules/semver/functions/rsort.js delete mode 100644 node_modules/semver/functions/satisfies.js delete mode 100644 node_modules/semver/functions/sort.js delete mode 100644 node_modules/semver/functions/valid.js delete mode 100644 node_modules/semver/index.js delete mode 100644 node_modules/semver/internal/constants.js delete mode 100644 node_modules/semver/internal/debug.js delete mode 100644 node_modules/semver/internal/identifiers.js delete mode 100644 node_modules/semver/internal/lrucache.js delete mode 100644 node_modules/semver/internal/parse-options.js delete mode 100644 node_modules/semver/internal/re.js delete mode 100644 node_modules/semver/package.json delete mode 100644 node_modules/semver/preload.js delete mode 100644 node_modules/semver/ranges/gtr.js delete mode 100644 node_modules/semver/ranges/intersects.js delete mode 100644 node_modules/semver/ranges/ltr.js delete mode 100644 node_modules/semver/ranges/max-satisfying.js delete mode 100644 node_modules/semver/ranges/min-satisfying.js delete mode 100644 node_modules/semver/ranges/min-version.js delete mode 100644 node_modules/semver/ranges/outside.js delete mode 100644 node_modules/semver/ranges/simplify.js delete mode 100644 node_modules/semver/ranges/subset.js delete mode 100644 node_modules/semver/ranges/to-comparators.js delete mode 100644 node_modules/semver/ranges/valid.js create mode 100644 node_modules/serve-favicon/index.js create mode 100644 node_modules/serve-favicon/node_modules/ms/index.js create mode 100644 node_modules/serve-favicon/node_modules/ms/package.json create mode 100644 node_modules/serve-favicon/node_modules/safe-buffer/index.js create mode 100644 node_modules/serve-favicon/node_modules/safe-buffer/package.json create mode 100644 node_modules/serve-favicon/node_modules/safe-buffer/test.js create mode 100644 node_modules/serve-favicon/package.json delete mode 100644 node_modules/simple-update-notifier/build/index.d.ts delete mode 100644 node_modules/simple-update-notifier/build/index.js delete mode 100644 node_modules/simple-update-notifier/package.json delete mode 100644 node_modules/simple-update-notifier/src/borderedText.ts delete mode 100644 node_modules/simple-update-notifier/src/cache.spec.ts delete mode 100644 node_modules/simple-update-notifier/src/cache.ts delete mode 100644 node_modules/simple-update-notifier/src/getDistVersion.spec.ts delete mode 100644 node_modules/simple-update-notifier/src/getDistVersion.ts delete mode 100644 node_modules/simple-update-notifier/src/hasNewVersion.spec.ts delete mode 100644 node_modules/simple-update-notifier/src/hasNewVersion.ts delete mode 100644 node_modules/simple-update-notifier/src/index.spec.ts delete mode 100644 node_modules/simple-update-notifier/src/index.ts delete mode 100644 node_modules/simple-update-notifier/src/isNpmOrYarn.ts delete mode 100644 node_modules/simple-update-notifier/src/types.ts delete mode 100644 node_modules/supports-color/browser.js delete mode 100644 node_modules/supports-color/index.js delete mode 100644 node_modules/supports-color/package.json delete mode 100644 node_modules/to-regex-range/index.js delete mode 100644 node_modules/to-regex-range/package.json delete mode 100644 node_modules/touch/bin/nodetouch.js delete mode 100644 node_modules/touch/index.js delete mode 100644 node_modules/touch/package.json delete mode 100644 node_modules/undefsafe/example.js delete mode 100644 node_modules/undefsafe/lib/undefsafe.js delete mode 100644 node_modules/undefsafe/package.json delete mode 100644 node_modules/undici/lib/agent.js delete mode 100644 node_modules/undici/lib/balanced-pool.js delete mode 100644 node_modules/undici/lib/cache/cache.js delete mode 100644 node_modules/undici/lib/cache/cachestorage.js create mode 100644 node_modules/undici/lib/cache/memory-cache-store.js create mode 100644 node_modules/undici/lib/cache/sqlite-cache-store.js delete mode 100644 node_modules/undici/lib/cache/symbols.js delete mode 100644 node_modules/undici/lib/cache/util.js delete mode 100644 node_modules/undici/lib/client.js delete mode 100644 node_modules/undici/lib/compat/dispatcher-weakref.js delete mode 100644 node_modules/undici/lib/cookies/constants.js delete mode 100644 node_modules/undici/lib/cookies/index.js delete mode 100644 node_modules/undici/lib/cookies/parse.js delete mode 100644 node_modules/undici/lib/cookies/util.js create mode 100644 node_modules/undici/lib/core/diagnostics.js rename node_modules/{cheerio/node_modules => }/undici/lib/core/tree.js (95%) delete mode 100644 node_modules/undici/lib/dispatcher-base.js delete mode 100644 node_modules/undici/lib/dispatcher.js rename node_modules/{cheerio/node_modules => }/undici/lib/dispatcher/agent.js (79%) rename node_modules/{cheerio/node_modules => }/undici/lib/dispatcher/balanced-pool.js (96%) rename node_modules/{cheerio/node_modules => }/undici/lib/dispatcher/client-h1.js (78%) rename node_modules/{cheerio/node_modules => }/undici/lib/dispatcher/client-h2.js (76%) rename node_modules/{cheerio/node_modules => }/undici/lib/dispatcher/client.js (92%) rename node_modules/{cheerio/node_modules => }/undici/lib/dispatcher/dispatcher-base.js (74%) rename node_modules/{cheerio/node_modules => }/undici/lib/dispatcher/dispatcher.js (68%) rename node_modules/{cheerio/node_modules => }/undici/lib/dispatcher/env-http-proxy-agent.js (94%) rename node_modules/undici/lib/{node => dispatcher}/fixed-queue.js (55%) rename node_modules/{cheerio/node_modules => }/undici/lib/dispatcher/pool-base.js (100%) rename node_modules/{cheerio/node_modules => }/undici/lib/dispatcher/pool-stats.js (97%) rename node_modules/{cheerio/node_modules => }/undici/lib/dispatcher/pool.js (90%) rename node_modules/{cheerio/node_modules => }/undici/lib/dispatcher/proxy-agent.js (96%) rename node_modules/{cheerio/node_modules => }/undici/lib/dispatcher/retry-agent.js (100%) delete mode 100644 node_modules/undici/lib/fetch/body.js delete mode 100644 node_modules/undici/lib/fetch/constants.js delete mode 100644 node_modules/undici/lib/fetch/dataURL.js delete mode 100644 node_modules/undici/lib/fetch/file.js delete mode 100644 node_modules/undici/lib/fetch/formdata.js delete mode 100644 node_modules/undici/lib/fetch/global.js delete mode 100644 node_modules/undici/lib/fetch/headers.js delete mode 100644 node_modules/undici/lib/fetch/index.js delete mode 100644 node_modules/undici/lib/fetch/request.js delete mode 100644 node_modules/undici/lib/fetch/response.js delete mode 100644 node_modules/undici/lib/fetch/symbols.js delete mode 100644 node_modules/undici/lib/fetch/util.js delete mode 100644 node_modules/undici/lib/fetch/webidl.js delete mode 100644 node_modules/undici/lib/fileapi/encoding.js delete mode 100644 node_modules/undici/lib/fileapi/filereader.js delete mode 100644 node_modules/undici/lib/fileapi/progressevent.js delete mode 100644 node_modules/undici/lib/fileapi/symbols.js delete mode 100644 node_modules/undici/lib/fileapi/util.js delete mode 100644 node_modules/undici/lib/handler/DecoratorHandler.js delete mode 100644 node_modules/undici/lib/handler/RedirectHandler.js delete mode 100644 node_modules/undici/lib/handler/RetryHandler.js create mode 100644 node_modules/undici/lib/handler/cache-handler.js create mode 100644 node_modules/undici/lib/handler/cache-revalidation-handler.js create mode 100644 node_modules/undici/lib/handler/decorator-handler.js rename node_modules/{cheerio/node_modules => }/undici/lib/handler/redirect-handler.js (74%) rename node_modules/{cheerio/node_modules => }/undici/lib/handler/retry-handler.js (67%) create mode 100644 node_modules/undici/lib/handler/unwrap-handler.js create mode 100644 node_modules/undici/lib/handler/wrap-handler.js create mode 100644 node_modules/undici/lib/interceptor/cache.js rename node_modules/{cheerio/node_modules => }/undici/lib/interceptor/dns.js (75%) rename node_modules/{cheerio/node_modules => }/undici/lib/interceptor/dump.js (53%) rename node_modules/{cheerio/node_modules/undici/lib/interceptor/redirect-interceptor.js => undici/lib/interceptor/redirect.js} (52%) delete mode 100644 node_modules/undici/lib/interceptor/redirectInterceptor.js create mode 100644 node_modules/undici/lib/interceptor/response-error.js rename node_modules/{cheerio/node_modules => }/undici/lib/interceptor/retry.js (100%) create mode 100644 node_modules/undici/lib/mock/mock-call-history.js delete mode 100644 node_modules/undici/lib/mock/pluralizer.js delete mode 100644 node_modules/undici/lib/pool-base.js delete mode 100644 node_modules/undici/lib/pool-stats.js delete mode 100644 node_modules/undici/lib/pool.js delete mode 100644 node_modules/undici/lib/proxy-agent.js delete mode 100644 node_modules/undici/lib/timers.js create mode 100644 node_modules/undici/lib/util/cache.js create mode 100644 node_modules/undici/lib/util/date.js rename node_modules/{cheerio/node_modules => }/undici/lib/util/timers.js (100%) rename node_modules/{cheerio/node_modules => }/undici/lib/web/cache/cache.js (94%) rename node_modules/{cheerio/node_modules => }/undici/lib/web/cache/cachestorage.js (98%) rename node_modules/{cheerio/node_modules => }/undici/lib/web/cache/util.js (100%) rename node_modules/{cheerio/node_modules => }/undici/lib/web/cookies/constants.js (100%) rename node_modules/{cheerio/node_modules => }/undici/lib/web/cookies/index.js (82%) rename node_modules/{cheerio/node_modules => }/undici/lib/web/cookies/parse.js (95%) rename node_modules/{cheerio/node_modules => }/undici/lib/web/cookies/util.js (100%) rename node_modules/{cheerio/node_modules => }/undici/lib/web/eventsource/eventsource-stream.js (95%) rename node_modules/{cheerio/node_modules => }/undici/lib/web/eventsource/eventsource.js (98%) rename node_modules/{cheerio/node_modules => }/undici/lib/web/eventsource/util.js (100%) rename node_modules/{cheerio/node_modules => }/undici/lib/web/fetch/body.js (88%) rename node_modules/{cheerio/node_modules => }/undici/lib/web/fetch/constants.js (92%) rename node_modules/{cheerio/node_modules => }/undici/lib/web/fetch/data-url.js (99%) rename node_modules/{cheerio/node_modules => }/undici/lib/web/fetch/dispatcher-weakref.js (100%) rename node_modules/{cheerio/node_modules => }/undici/lib/web/fetch/formdata-parser.js (81%) rename node_modules/{cheerio/node_modules => }/undici/lib/web/fetch/formdata.js (68%) rename node_modules/{cheerio/node_modules => }/undici/lib/web/fetch/global.js (100%) rename node_modules/{cheerio/node_modules => }/undici/lib/web/fetch/headers.js (82%) rename node_modules/{cheerio/node_modules => }/undici/lib/web/fetch/index.js (96%) rename node_modules/{cheerio/node_modules => }/undici/lib/web/fetch/request.js (86%) rename node_modules/{cheerio/node_modules => }/undici/lib/web/fetch/response.js (85%) rename node_modules/{cheerio/node_modules => }/undici/lib/web/fetch/util.js (83%) rename node_modules/{cheerio/node_modules => }/undici/lib/web/fetch/webidl.js (83%) rename node_modules/{cheerio/node_modules => }/undici/lib/web/websocket/connection.js (61%) create mode 100644 node_modules/undici/lib/web/websocket/constants.js rename node_modules/{cheerio/node_modules => }/undici/lib/web/websocket/events.js (98%) rename node_modules/{cheerio/node_modules => }/undici/lib/web/websocket/frame.js (63%) rename node_modules/{cheerio/node_modules => }/undici/lib/web/websocket/permessage-deflate.js (100%) rename node_modules/{cheerio/node_modules => }/undici/lib/web/websocket/receiver.js (73%) rename node_modules/{cheerio/node_modules => }/undici/lib/web/websocket/sender.js (72%) create mode 100644 node_modules/undici/lib/web/websocket/stream/websocketerror.js create mode 100644 node_modules/undici/lib/web/websocket/stream/websocketstream.js rename node_modules/{cheerio/node_modules => }/undici/lib/web/websocket/util.js (62%) rename node_modules/{cheerio/node_modules => }/undici/lib/web/websocket/websocket.js (61%) delete mode 100644 node_modules/undici/lib/websocket/connection.js delete mode 100644 node_modules/undici/lib/websocket/constants.js delete mode 100644 node_modules/undici/lib/websocket/events.js delete mode 100644 node_modules/undici/lib/websocket/frame.js delete mode 100644 node_modules/undici/lib/websocket/receiver.js delete mode 100644 node_modules/undici/lib/websocket/symbols.js delete mode 100644 node_modules/undici/lib/websocket/util.js delete mode 100644 node_modules/undici/lib/websocket/websocket.js rename node_modules/{cheerio/node_modules => }/undici/scripts/strip-comments.js (58%) create mode 100644 node_modules/undici/types/cache-interceptor.d.ts rename node_modules/{cheerio/node_modules => }/undici/types/env-http-proxy-agent.d.ts (79%) rename node_modules/{cheerio/node_modules => }/undici/types/eventsource.d.ts (100%) delete mode 100644 node_modules/undici/types/file.d.ts delete mode 100644 node_modules/undici/types/filereader.d.ts create mode 100644 node_modules/undici/types/mock-call-history.d.ts rename node_modules/{cheerio/node_modules => }/undici/types/retry-agent.d.ts (67%) rename node_modules/{cheerio/node_modules => }/undici/types/util.d.ts (77%) create mode 100644 node_modules/undici/types/utility.d.ts delete mode 100644 node_modules/whatwg-encoding/lib/labels-to-names.json delete mode 100644 node_modules/whatwg-encoding/lib/supported-names.json delete mode 100644 node_modules/whatwg-encoding/lib/whatwg-encoding.js delete mode 100644 node_modules/whatwg-encoding/node_modules/iconv-lite/encodings/dbcs-data.js delete mode 100644 node_modules/whatwg-encoding/node_modules/iconv-lite/encodings/sbcs-codec.js delete mode 100644 node_modules/whatwg-encoding/node_modules/iconv-lite/encodings/sbcs-data-generated.js delete mode 100644 node_modules/whatwg-encoding/node_modules/iconv-lite/encodings/sbcs-data.js delete mode 100644 node_modules/whatwg-encoding/node_modules/iconv-lite/encodings/tables/big5-added.json delete mode 100644 node_modules/whatwg-encoding/node_modules/iconv-lite/encodings/tables/cp936.json delete mode 100644 node_modules/whatwg-encoding/node_modules/iconv-lite/encodings/tables/cp949.json delete mode 100644 node_modules/whatwg-encoding/node_modules/iconv-lite/encodings/tables/cp950.json delete mode 100644 node_modules/whatwg-encoding/node_modules/iconv-lite/encodings/tables/eucjp.json delete mode 100644 node_modules/whatwg-encoding/node_modules/iconv-lite/encodings/tables/gb18030-ranges.json delete mode 100644 node_modules/whatwg-encoding/node_modules/iconv-lite/encodings/tables/shiftjis.json delete mode 100644 node_modules/whatwg-encoding/node_modules/iconv-lite/encodings/utf16.js delete mode 100644 node_modules/whatwg-encoding/node_modules/iconv-lite/encodings/utf32.js delete mode 100644 node_modules/whatwg-encoding/node_modules/iconv-lite/encodings/utf7.js delete mode 100644 node_modules/whatwg-encoding/node_modules/iconv-lite/lib/bom-handling.js delete mode 100644 node_modules/whatwg-encoding/node_modules/iconv-lite/lib/streams.js delete mode 100644 node_modules/whatwg-encoding/node_modules/iconv-lite/package.json delete mode 100644 node_modules/whatwg-encoding/package.json delete mode 100644 node_modules/whatwg-mimetype/lib/mime-type-parameters.js delete mode 100644 node_modules/whatwg-mimetype/lib/mime-type.js delete mode 100644 node_modules/whatwg-mimetype/lib/parser.js delete mode 100644 node_modules/whatwg-mimetype/lib/serializer.js delete mode 100644 node_modules/whatwg-mimetype/lib/utils.js delete mode 100644 node_modules/whatwg-mimetype/package.json delete mode 100644 node_modules/wrappy/package.json delete mode 100644 node_modules/wrappy/wrappy.js delete mode 100644 node_modules/y18n/build/index.cjs delete mode 100644 node_modules/y18n/build/lib/cjs.js delete mode 100644 node_modules/y18n/build/lib/index.js delete mode 100644 node_modules/y18n/build/lib/platform-shims/node.js delete mode 100644 node_modules/y18n/index.mjs delete mode 100644 node_modules/y18n/package.json delete mode 100644 node_modules/yargs-parser/browser.js delete mode 100644 node_modules/yargs-parser/build/index.cjs delete mode 100644 node_modules/yargs-parser/build/lib/index.js delete mode 100644 node_modules/yargs-parser/build/lib/string-utils.js delete mode 100644 node_modules/yargs-parser/build/lib/tokenize-arg-string.js delete mode 100644 node_modules/yargs-parser/build/lib/yargs-parser-types.js delete mode 100644 node_modules/yargs-parser/build/lib/yargs-parser.js delete mode 100644 node_modules/yargs-parser/package.json delete mode 100644 node_modules/yargs/browser.d.ts delete mode 100644 node_modules/yargs/browser.mjs delete mode 100644 node_modules/yargs/build/index.cjs delete mode 100644 node_modules/yargs/build/lib/argsert.js delete mode 100644 node_modules/yargs/build/lib/command.js delete mode 100644 node_modules/yargs/build/lib/completion-templates.js delete mode 100644 node_modules/yargs/build/lib/completion.js delete mode 100644 node_modules/yargs/build/lib/middleware.js delete mode 100644 node_modules/yargs/build/lib/parse-command.js delete mode 100644 node_modules/yargs/build/lib/typings/common-types.js delete mode 100644 node_modules/yargs/build/lib/typings/yargs-parser-types.js delete mode 100644 node_modules/yargs/build/lib/usage.js delete mode 100644 node_modules/yargs/build/lib/utils/apply-extends.js delete mode 100644 node_modules/yargs/build/lib/utils/is-promise.js delete mode 100644 node_modules/yargs/build/lib/utils/levenshtein.js delete mode 100644 node_modules/yargs/build/lib/utils/maybe-async-result.js delete mode 100644 node_modules/yargs/build/lib/utils/obj-filter.js delete mode 100644 node_modules/yargs/build/lib/utils/process-argv.js delete mode 100644 node_modules/yargs/build/lib/utils/set-blocking.js delete mode 100644 node_modules/yargs/build/lib/utils/which-module.js delete mode 100644 node_modules/yargs/build/lib/validation.js delete mode 100644 node_modules/yargs/build/lib/yargs-factory.js delete mode 100644 node_modules/yargs/build/lib/yerror.js delete mode 100644 node_modules/yargs/helpers/helpers.mjs delete mode 100644 node_modules/yargs/helpers/index.js delete mode 100644 node_modules/yargs/helpers/package.json delete mode 100644 node_modules/yargs/index.cjs delete mode 100644 node_modules/yargs/index.mjs delete mode 100644 node_modules/yargs/lib/platform-shims/browser.mjs delete mode 100644 node_modules/yargs/lib/platform-shims/esm.mjs delete mode 100644 node_modules/yargs/locales/be.json delete mode 100644 node_modules/yargs/locales/cs.json delete mode 100644 node_modules/yargs/locales/de.json delete mode 100644 node_modules/yargs/locales/en.json delete mode 100644 node_modules/yargs/locales/es.json delete mode 100644 node_modules/yargs/locales/fi.json delete mode 100644 node_modules/yargs/locales/fr.json delete mode 100644 node_modules/yargs/locales/hi.json delete mode 100644 node_modules/yargs/locales/hu.json delete mode 100644 node_modules/yargs/locales/id.json delete mode 100644 node_modules/yargs/locales/it.json delete mode 100644 node_modules/yargs/locales/ja.json delete mode 100644 node_modules/yargs/locales/ko.json delete mode 100644 node_modules/yargs/locales/nb.json delete mode 100644 node_modules/yargs/locales/nl.json delete mode 100644 node_modules/yargs/locales/nn.json delete mode 100644 node_modules/yargs/locales/pirate.json delete mode 100644 node_modules/yargs/locales/pl.json delete mode 100644 node_modules/yargs/locales/pt.json delete mode 100644 node_modules/yargs/locales/pt_BR.json delete mode 100644 node_modules/yargs/locales/ru.json delete mode 100644 node_modules/yargs/locales/th.json delete mode 100644 node_modules/yargs/locales/tr.json delete mode 100644 node_modules/yargs/locales/uk_UA.json delete mode 100644 node_modules/yargs/locales/uz.json delete mode 100644 node_modules/yargs/locales/zh_CN.json delete mode 100644 node_modules/yargs/locales/zh_TW.json delete mode 100644 node_modules/yargs/node_modules/ansi-regex/index.d.ts delete mode 100644 node_modules/yargs/node_modules/ansi-regex/index.js delete mode 100644 node_modules/yargs/node_modules/ansi-regex/package.json delete mode 100644 node_modules/yargs/node_modules/emoji-regex/es2015/index.js delete mode 100644 node_modules/yargs/node_modules/emoji-regex/es2015/text.js delete mode 100644 node_modules/yargs/node_modules/emoji-regex/index.d.ts delete mode 100644 node_modules/yargs/node_modules/emoji-regex/index.js delete mode 100644 node_modules/yargs/node_modules/emoji-regex/package.json delete mode 100644 node_modules/yargs/node_modules/emoji-regex/text.js delete mode 100644 node_modules/yargs/node_modules/string-width/index.d.ts delete mode 100644 node_modules/yargs/node_modules/string-width/index.js delete mode 100644 node_modules/yargs/node_modules/string-width/package.json delete mode 100644 node_modules/yargs/node_modules/strip-ansi/index.d.ts delete mode 100644 node_modules/yargs/node_modules/strip-ansi/index.js delete mode 100644 node_modules/yargs/node_modules/strip-ansi/package.json delete mode 100644 node_modules/yargs/package.json delete mode 100644 node_modules/yargs/yargs delete mode 100644 node_modules/yargs/yargs.mjs diff --git a/node_modules/.bin/acorn b/node_modules/.bin/acorn deleted file mode 100644 index 679bd16..0000000 --- a/node_modules/.bin/acorn +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/sh -basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") - -case `uname` in - *CYGWIN*|*MINGW*|*MSYS*) - if command -v cygpath > /dev/null 2>&1; then - basedir=`cygpath -w "$basedir"` - fi - ;; -esac - -if [ -x "$basedir/node" ]; then - exec "$basedir/node" "$basedir/../acorn/bin/acorn" "$@" -else - exec node "$basedir/../acorn/bin/acorn" "$@" -fi diff --git a/node_modules/.bin/glob b/node_modules/.bin/glob deleted file mode 100644 index 6fbc4bb..0000000 --- a/node_modules/.bin/glob +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/sh -basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") - -case `uname` in - *CYGWIN*|*MINGW*|*MSYS*) - if command -v cygpath > /dev/null 2>&1; then - basedir=`cygpath -w "$basedir"` - fi - ;; -esac - -if [ -x "$basedir/node" ]; then - exec "$basedir/node" "$basedir/../glob/dist/esm/bin.mjs" "$@" -else - exec node "$basedir/../glob/dist/esm/bin.mjs" "$@" -fi diff --git a/node_modules/.bin/he b/node_modules/.bin/he deleted file mode 100644 index 441322a..0000000 --- a/node_modules/.bin/he +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/sh -basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") - -case `uname` in - *CYGWIN*|*MINGW*|*MSYS*) - if command -v cygpath > /dev/null 2>&1; then - basedir=`cygpath -w "$basedir"` - fi - ;; -esac - -if [ -x "$basedir/node" ]; then - exec "$basedir/node" "$basedir/../he/bin/he" "$@" -else - exec node "$basedir/../he/bin/he" "$@" -fi diff --git a/node_modules/.bin/html-minifier b/node_modules/.bin/html-minifier deleted file mode 100644 index 58ab976..0000000 --- a/node_modules/.bin/html-minifier +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/sh -basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") - -case `uname` in - *CYGWIN*|*MINGW*|*MSYS*) - if command -v cygpath > /dev/null 2>&1; then - basedir=`cygpath -w "$basedir"` - fi - ;; -esac - -if [ -x "$basedir/node" ]; then - exec "$basedir/node" "$basedir/../html-minifier/cli.js" "$@" -else - exec node "$basedir/../html-minifier/cli.js" "$@" -fi diff --git a/node_modules/.bin/mime b/node_modules/.bin/mime deleted file mode 100644 index 7751de3..0000000 --- a/node_modules/.bin/mime +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/sh -basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") - -case `uname` in - *CYGWIN*|*MINGW*|*MSYS*) - if command -v cygpath > /dev/null 2>&1; then - basedir=`cygpath -w "$basedir"` - fi - ;; -esac - -if [ -x "$basedir/node" ]; then - exec "$basedir/node" "$basedir/../mime/cli.js" "$@" -else - exec node "$basedir/../mime/cli.js" "$@" -fi diff --git a/node_modules/.bin/node-which b/node_modules/.bin/node-which deleted file mode 100644 index b49b03f..0000000 --- a/node_modules/.bin/node-which +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/sh -basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") - -case `uname` in - *CYGWIN*|*MINGW*|*MSYS*) - if command -v cygpath > /dev/null 2>&1; then - basedir=`cygpath -w "$basedir"` - fi - ;; -esac - -if [ -x "$basedir/node" ]; then - exec "$basedir/node" "$basedir/../which/bin/node-which" "$@" -else - exec node "$basedir/../which/bin/node-which" "$@" -fi diff --git a/node_modules/.bin/nodemon b/node_modules/.bin/nodemon deleted file mode 100644 index c477a18..0000000 --- a/node_modules/.bin/nodemon +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/sh -basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") - -case `uname` in - *CYGWIN*|*MINGW*|*MSYS*) - if command -v cygpath > /dev/null 2>&1; then - basedir=`cygpath -w "$basedir"` - fi - ;; -esac - -if [ -x "$basedir/node" ]; then - exec "$basedir/node" "$basedir/../nodemon/bin/nodemon.js" "$@" -else - exec node "$basedir/../nodemon/bin/nodemon.js" "$@" -fi diff --git a/node_modules/.bin/nodetouch b/node_modules/.bin/nodetouch deleted file mode 100644 index 3e146b4..0000000 --- a/node_modules/.bin/nodetouch +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/sh -basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") - -case `uname` in - *CYGWIN*|*MINGW*|*MSYS*) - if command -v cygpath > /dev/null 2>&1; then - basedir=`cygpath -w "$basedir"` - fi - ;; -esac - -if [ -x "$basedir/node" ]; then - exec "$basedir/node" "$basedir/../touch/bin/nodetouch.js" "$@" -else - exec node "$basedir/../touch/bin/nodetouch.js" "$@" -fi diff --git a/node_modules/.bin/replace-in-file b/node_modules/.bin/replace-in-file deleted file mode 100644 index 96699c1..0000000 --- a/node_modules/.bin/replace-in-file +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/sh -basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") - -case `uname` in - *CYGWIN*|*MINGW*|*MSYS*) - if command -v cygpath > /dev/null 2>&1; then - basedir=`cygpath -w "$basedir"` - fi - ;; -esac - -if [ -x "$basedir/node" ]; then - exec "$basedir/node" "$basedir/../replace-in-file/bin/cli.js" "$@" -else - exec node "$basedir/../replace-in-file/bin/cli.js" "$@" -fi diff --git a/node_modules/.bin/semver b/node_modules/.bin/semver deleted file mode 100644 index 97c5327..0000000 --- a/node_modules/.bin/semver +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/sh -basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") - -case `uname` in - *CYGWIN*|*MINGW*|*MSYS*) - if command -v cygpath > /dev/null 2>&1; then - basedir=`cygpath -w "$basedir"` - fi - ;; -esac - -if [ -x "$basedir/node" ]; then - exec "$basedir/node" "$basedir/../semver/bin/semver.js" "$@" -else - exec node "$basedir/../semver/bin/semver.js" "$@" -fi diff --git a/node_modules/.bin/terser b/node_modules/.bin/terser deleted file mode 100644 index 8456546..0000000 --- a/node_modules/.bin/terser +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/sh -basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") - -case `uname` in - *CYGWIN*|*MINGW*|*MSYS*) - if command -v cygpath > /dev/null 2>&1; then - basedir=`cygpath -w "$basedir"` - fi - ;; -esac - -if [ -x "$basedir/node" ]; then - exec "$basedir/node" "$basedir/../terser/bin/terser" "$@" -else - exec node "$basedir/../terser/bin/terser" "$@" -fi diff --git a/node_modules/.bin/uglifyjs b/node_modules/.bin/uglifyjs deleted file mode 100644 index 5696938..0000000 --- a/node_modules/.bin/uglifyjs +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/sh -basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") - -case `uname` in - *CYGWIN*|*MINGW*|*MSYS*) - if command -v cygpath > /dev/null 2>&1; then - basedir=`cygpath -w "$basedir"` - fi - ;; -esac - -if [ -x "$basedir/node" ]; then - exec "$basedir/node" "$basedir/../uglify-js/bin/uglifyjs" "$@" -else - exec node "$basedir/../uglify-js/bin/uglifyjs" "$@" -fi diff --git a/node_modules/.package-lock.json b/node_modules/.package-lock.json index e278028..8cfdec9 100644 --- a/node_modules/.package-lock.json +++ b/node_modules/.package-lock.json @@ -1,17 +1,9 @@ { - "name": "cod-stats-tracker", + "name": "codtracker-js", "version": "1.0.0", "lockfileVersion": 3, "requires": true, "packages": { - "node_modules/@fastify/busboy": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/@fastify/busboy/-/busboy-2.1.1.tgz", - "integrity": "sha512-vBZP4NlzfOlerQTnba4aqZoMhE/a9HY7HRqoOPaETQcSQuWEIyZMHGfVu6w9wGtGK5fED5qRs2DteVCjOH60sA==", - "engines": { - "node": ">=14" - } - }, "node_modules/@isaacs/cliui": { "version": "8.0.2", "resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz", @@ -135,19 +127,6 @@ "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, - "node_modules/anymatch": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", - "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", - "dev": true, - "dependencies": { - "normalize-path": "^3.0.0", - "picomatch": "^2.0.4" - }, - "engines": { - "node": ">= 8" - } - }, "node_modules/array-flatten": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", @@ -158,66 +137,106 @@ "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==" }, - "node_modules/binary-extensions": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.3.0.tgz", - "integrity": "sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==", - "dev": true, + "node_modules/body-parser": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-2.2.0.tgz", + "integrity": "sha512-02qvAaxv8tp7fBa/mw1ga98OGm+eCbqzJOKoRt70sLmfEEi+jyBYVTDGfCL/k06/4EMk/z01gCe7HoCH/f2LTg==", + "license": "MIT", + "dependencies": { + "bytes": "^3.1.2", + "content-type": "^1.0.5", + "debug": "^4.4.0", + "http-errors": "^2.0.0", + "iconv-lite": "^0.6.3", + "on-finished": "^2.4.1", + "qs": "^6.14.0", + "raw-body": "^3.0.0", + "type-is": "^2.0.0" + }, "engines": { - "node": ">=8" + "node": ">=18" + } + }, + "node_modules/body-parser/node_modules/debug": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.0.tgz", + "integrity": "sha512-6WTZ/IxCY/T6BALoZHaE4ctp9xm+Z5kY/pzYaCHRFeyVhojxlrm+46y68HA6hr0TcwEssoxNiDEUJQjfPZ/RYA==", + "license": "MIT", + "dependencies": { + "ms": "^2.1.3" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/body-parser/node_modules/media-typer": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-1.1.0.tgz", + "integrity": "sha512-aisnrDP4GNe06UcKFnV5bfMNPBUw4jsLGaWwWfnH3v02GnBuXX2MCVn5RbrWo0j3pczUilYblq7fQ7Nw2t5XKw==", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/body-parser/node_modules/mime-db": { + "version": "1.54.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.54.0.tgz", + "integrity": "sha512-aU5EJuIN2WDemCcAp2vFBfp/m4EAhWJnUNSSw0ixs7/kXbd6Pg64EmwJkNdFhB8aWt1sH2CTXrLxo/iAGV3oPQ==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/body-parser/node_modules/mime-types": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-3.0.1.tgz", + "integrity": "sha512-xRc4oEhT6eaBpU1XF7AjpOFD+xQmXNB5OVKwp4tqCuBpHLS/ZbBDrc07mYTDqVMg6PfxUjjNp85O6Cd2Z/5HWA==", + "license": "MIT", + "dependencies": { + "mime-db": "^1.54.0" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/body-parser/node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "license": "MIT" + }, + "node_modules/body-parser/node_modules/qs": { + "version": "6.14.0", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.14.0.tgz", + "integrity": "sha512-YWWTjgABSKcvs/nWBi9PycY/JiPJqOD4JA6o9Sej2AtvSGarXxKC3OQSk4pAarbdQlKAh5D4FCQkJNkW+GAn3w==", + "license": "BSD-3-Clause", + "dependencies": { + "side-channel": "^1.1.0" + }, + "engines": { + "node": ">=0.6" }, "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/body-parser": { - "version": "1.20.3", - "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.3.tgz", - "integrity": "sha512-7rAxByjUMqQ3/bHJy7D6OGXvx/MMc4IqBn/X0fcM1QUcAItpZrBEYhWGem+tzXH90c+G01ypMcYJBO9Y30203g==", + "node_modules/body-parser/node_modules/type-is": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/type-is/-/type-is-2.0.1.tgz", + "integrity": "sha512-OZs6gsjF4vMp32qrCbiVSkrFmXtG/AZhY3t0iAMrMBiAZyV9oALtXO8hsrHbMXF9x6L3grlFuwW2oAz7cav+Gw==", + "license": "MIT", "dependencies": { - "bytes": "3.1.2", - "content-type": "~1.0.5", - "debug": "2.6.9", - "depd": "2.0.0", - "destroy": "1.2.0", - "http-errors": "2.0.0", - "iconv-lite": "0.4.24", - "on-finished": "2.4.1", - "qs": "6.13.0", - "raw-body": "2.5.2", - "type-is": "~1.6.18", - "unpipe": "1.0.0" + "content-type": "^1.0.5", + "media-typer": "^1.1.0", + "mime-types": "^3.0.0" }, "engines": { - "node": ">= 0.8", - "npm": "1.2.8000 || >= 1.4.16" - } - }, - "node_modules/boolbase": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/boolbase/-/boolbase-1.0.0.tgz", - "integrity": "sha512-JZOSA7Mo9sNGB8+UjSgzdLtokWAky1zbztM3WRLCbZ70/3cTANmQmOdR7y2g+J0e2WXywy1yS468tY+IruqEww==", - "license": "ISC" - }, - "node_modules/brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "node_modules/braces": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", - "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", - "dev": true, - "dependencies": { - "fill-range": "^7.1.1" - }, - "engines": { - "node": ">=8" + "node": ">= 0.6" } }, "node_modules/buffer-from": { @@ -230,6 +249,7 @@ "version": "3.1.2", "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz", "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==", + "license": "MIT", "engines": { "node": ">= 0.8" } @@ -261,20 +281,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/call-of-duty-api": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/call-of-duty-api/-/call-of-duty-api-4.1.0.tgz", - "integrity": "sha512-f5DJ6gQru6f406QVBZkkXOv0gUzFu0hykdkyKRa2Am6iWwGRVzcBK7rq+xHpNI6oTq3EFfw0T70kb38rZaezNA==", - "deprecated": "Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.", - "dependencies": { - "tslib": "^2.4.0", - "undici": "^5.12.0" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/Lierrmm" - } - }, "node_modules/camel-case": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/camel-case/-/camel-case-3.0.0.tgz", @@ -285,133 +291,6 @@ "upper-case": "^1.1.1" } }, - "node_modules/chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "license": "MIT", - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "node_modules/chalk/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "license": "MIT", - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/chalk/node_modules/has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/chalk/node_modules/supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "license": "MIT", - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/cheerio": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/cheerio/-/cheerio-1.0.0.tgz", - "integrity": "sha512-quS9HgjQpdaXOvsZz82Oz7uxtXiy6UIsIQcpBj7HRw2M63Skasm9qlDocAM7jNuaxdhpPU7c4kJN+gA5MCu4ww==", - "license": "MIT", - "dependencies": { - "cheerio-select": "^2.1.0", - "dom-serializer": "^2.0.0", - "domhandler": "^5.0.3", - "domutils": "^3.1.0", - "encoding-sniffer": "^0.2.0", - "htmlparser2": "^9.1.0", - "parse5": "^7.1.2", - "parse5-htmlparser2-tree-adapter": "^7.0.0", - "parse5-parser-stream": "^7.1.2", - "undici": "^6.19.5", - "whatwg-mimetype": "^4.0.0" - }, - "engines": { - "node": ">=18.17" - }, - "funding": { - "url": "https://github.com/cheeriojs/cheerio?sponsor=1" - } - }, - "node_modules/cheerio-select": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/cheerio-select/-/cheerio-select-2.1.0.tgz", - "integrity": "sha512-9v9kG0LvzrlcungtnJtpGNxY+fzECQKhK4EGJX2vByejiMX84MFNQw4UxPJl3bFbTMw+Dfs37XaIkCwTZfLh4g==", - "license": "BSD-2-Clause", - "dependencies": { - "boolbase": "^1.0.0", - "css-select": "^5.1.0", - "css-what": "^6.1.0", - "domelementtype": "^2.3.0", - "domhandler": "^5.0.3", - "domutils": "^3.0.1" - }, - "funding": { - "url": "https://github.com/sponsors/fb55" - } - }, - "node_modules/cheerio/node_modules/undici": { - "version": "6.21.2", - "resolved": "https://registry.npmjs.org/undici/-/undici-6.21.2.tgz", - "integrity": "sha512-uROZWze0R0itiAKVPsYhFov9LxrPMHLMEQFszeI2gCN6bnIIZ8twzBCJcN2LJrBBLfrP0t1FW0g+JmKVl8Vk1g==", - "license": "MIT", - "engines": { - "node": ">=18.17" - } - }, - "node_modules/chokidar": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.6.0.tgz", - "integrity": "sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==", - "dev": true, - "dependencies": { - "anymatch": "~3.1.2", - "braces": "~3.0.2", - "glob-parent": "~5.1.2", - "is-binary-path": "~2.1.0", - "is-glob": "~4.0.1", - "normalize-path": "~3.0.0", - "readdirp": "~3.6.0" - }, - "engines": { - "node": ">= 8.10.0" - }, - "funding": { - "url": "https://paulmillr.com/funding/" - }, - "optionalDependencies": { - "fsevents": "~2.3.2" - } - }, "node_modules/clean-css": { "version": "4.2.4", "resolved": "https://registry.npmjs.org/clean-css/-/clean-css-4.2.4.tgz", @@ -424,93 +303,6 @@ "node": ">= 4.0" } }, - "node_modules/cliui": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", - "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", - "license": "ISC", - "dependencies": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.1", - "wrap-ansi": "^7.0.0" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/cliui/node_modules/ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/cliui/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "license": "MIT", - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/cliui/node_modules/emoji-regex": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", - "license": "MIT" - }, - "node_modules/cliui/node_modules/string-width": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", - "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", - "license": "MIT", - "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/cliui/node_modules/strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "license": "MIT", - "dependencies": { - "ansi-regex": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/cliui/node_modules/wrap-ansi": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", - "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", - "license": "MIT", - "dependencies": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/wrap-ansi?sponsor=1" - } - }, "node_modules/color-convert": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", @@ -535,11 +327,6 @@ "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", "license": "MIT" }, - "node_modules/concat-map": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==" - }, "node_modules/content-disposition": { "version": "0.5.4", "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.4.tgz", @@ -586,22 +373,6 @@ "node": ">= 8" } }, - "node_modules/css-select": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/css-select/-/css-select-5.1.0.tgz", - "integrity": "sha512-nwoRF1rvRRnnCqqY7updORDsuqKzqYJ28+oSMaJMMgOauh3fvwHqMS7EZpIPqK8GL+g9mKxF1vP/ZjSeNjEVHg==", - "license": "BSD-2-Clause", - "dependencies": { - "boolbase": "^1.0.0", - "css-what": "^6.1.0", - "domhandler": "^5.0.2", - "domutils": "^3.0.1", - "nth-check": "^2.0.1" - }, - "funding": { - "url": "https://github.com/sponsors/fb55" - } - }, "node_modules/css-tree": { "version": "2.2.1", "resolved": "https://registry.npmjs.org/css-tree/-/css-tree-2.2.1.tgz", @@ -616,18 +387,6 @@ "npm": ">=7.0.0" } }, - "node_modules/css-what": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/css-what/-/css-what-6.1.0.tgz", - "integrity": "sha512-HTUrgRJ7r4dsZKU6GjmpfRK1O76h97Z8MfS1G0FozR+oF2kG6Vfe8JE6zwrkbxigziPHinCJ+gCPjA9EaBDtRw==", - "license": "BSD-2-Clause", - "engines": { - "node": ">= 6" - }, - "funding": { - "url": "https://github.com/sponsors/fb55" - } - }, "node_modules/csso": { "version": "5.0.5", "resolved": "https://registry.npmjs.org/csso/-/csso-5.0.5.tgz", @@ -666,61 +425,6 @@ "npm": "1.2.8000 || >= 1.4.16" } }, - "node_modules/dom-serializer": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-2.0.0.tgz", - "integrity": "sha512-wIkAryiqt/nV5EQKqQpo3SToSOV9J0DnbJqwK7Wv/Trc92zIAYZ4FlMu+JPFW1DfGFt81ZTCGgDEabffXeLyJg==", - "license": "MIT", - "dependencies": { - "domelementtype": "^2.3.0", - "domhandler": "^5.0.2", - "entities": "^4.2.0" - }, - "funding": { - "url": "https://github.com/cheeriojs/dom-serializer?sponsor=1" - } - }, - "node_modules/domelementtype": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-2.3.0.tgz", - "integrity": "sha512-OLETBj6w0OsagBwdXnPdN0cnMfF9opN69co+7ZrbfPGrdpPVNBUj02spi6B1N7wChLQiPn4CSH/zJvXw56gmHw==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/fb55" - } - ], - "license": "BSD-2-Clause" - }, - "node_modules/domhandler": { - "version": "5.0.3", - "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-5.0.3.tgz", - "integrity": "sha512-cgwlv/1iFQiFnU96XXgROh8xTeetsnJiDsTc7TYCLFd9+/WNkIqPTxiM/8pSd8VIrhXGTf1Ny1q1hquVqDJB5w==", - "license": "BSD-2-Clause", - "dependencies": { - "domelementtype": "^2.3.0" - }, - "engines": { - "node": ">= 4" - }, - "funding": { - "url": "https://github.com/fb55/domhandler?sponsor=1" - } - }, - "node_modules/domutils": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/domutils/-/domutils-3.2.2.tgz", - "integrity": "sha512-6kZKyUajlDuqlHKVX1w7gyslj9MPIXzIFiz/rGu35uC1wMi+kMhQwGhl4lt9unC9Vb9INnY9Z3/ZA3+FhASLaw==", - "license": "BSD-2-Clause", - "dependencies": { - "dom-serializer": "^2.0.0", - "domelementtype": "^2.3.0", - "domhandler": "^5.0.3" - }, - "funding": { - "url": "https://github.com/fb55/domutils?sponsor=1" - } - }, "node_modules/dunder-proto": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.1.tgz", @@ -759,43 +463,6 @@ "node": ">= 0.8" } }, - "node_modules/encoding-sniffer": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/encoding-sniffer/-/encoding-sniffer-0.2.0.tgz", - "integrity": "sha512-ju7Wq1kg04I3HtiYIOrUrdfdDvkyO9s5XM8QAj/bN61Yo/Vb4vgJxy5vi4Yxk01gWHbrofpPtpxM8bKger9jhg==", - "license": "MIT", - "dependencies": { - "iconv-lite": "^0.6.3", - "whatwg-encoding": "^3.1.1" - }, - "funding": { - "url": "https://github.com/fb55/encoding-sniffer?sponsor=1" - } - }, - "node_modules/encoding-sniffer/node_modules/iconv-lite": { - "version": "0.6.3", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz", - "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==", - "license": "MIT", - "dependencies": { - "safer-buffer": ">= 2.1.2 < 3.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/entities": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/entities/-/entities-4.5.0.tgz", - "integrity": "sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==", - "license": "BSD-2-Clause", - "engines": { - "node": ">=0.12" - }, - "funding": { - "url": "https://github.com/fb55/entities?sponsor=1" - } - }, "node_modules/es-define-property": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.1.tgz", @@ -823,15 +490,6 @@ "node": ">= 0.4" } }, - "node_modules/escalade": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz", - "integrity": "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==", - "license": "MIT", - "engines": { - "node": ">=6" - } - }, "node_modules/escape-html": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", @@ -849,6 +507,7 @@ "version": "4.21.2", "resolved": "https://registry.npmjs.org/express/-/express-4.21.2.tgz", "integrity": "sha512-28HqgMZAmih1Czt9ny7qr6ek2qddF4FclbMzwhCREB6OFfH+rXAnuNCwo1/wFvrtbgsQDb4kSbX9de9lFbrXnA==", + "license": "MIT", "dependencies": { "accepts": "~1.3.8", "array-flatten": "1.1.1", @@ -890,16 +549,55 @@ "url": "https://opencollective.com/express" } }, - "node_modules/fill-range": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", - "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", - "dev": true, + "node_modules/express/node_modules/body-parser": { + "version": "1.20.3", + "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.3.tgz", + "integrity": "sha512-7rAxByjUMqQ3/bHJy7D6OGXvx/MMc4IqBn/X0fcM1QUcAItpZrBEYhWGem+tzXH90c+G01ypMcYJBO9Y30203g==", + "license": "MIT", "dependencies": { - "to-regex-range": "^5.0.1" + "bytes": "3.1.2", + "content-type": "~1.0.5", + "debug": "2.6.9", + "depd": "2.0.0", + "destroy": "1.2.0", + "http-errors": "2.0.0", + "iconv-lite": "0.4.24", + "on-finished": "2.4.1", + "qs": "6.13.0", + "raw-body": "2.5.2", + "type-is": "~1.6.18", + "unpipe": "1.0.0" }, "engines": { - "node": ">=8" + "node": ">= 0.8", + "npm": "1.2.8000 || >= 1.4.16" + } + }, + "node_modules/express/node_modules/iconv-lite": { + "version": "0.4.24", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", + "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", + "license": "MIT", + "dependencies": { + "safer-buffer": ">= 2.1.2 < 3" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/express/node_modules/raw-body": { + "version": "2.5.2", + "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.2.tgz", + "integrity": "sha512-8zGqypfENjCIqGhgXToC8aB2r7YrBX+AQAfIPs/Mlk+BtPTztOvTS01NRW/3Eh60J+a48lt8qsCzirQ6loCVfA==", + "license": "MIT", + "dependencies": { + "bytes": "3.1.2", + "http-errors": "2.0.0", + "iconv-lite": "0.4.24", + "unpipe": "1.0.0" + }, + "engines": { + "node": ">= 0.8" } }, "node_modules/finalhandler": { @@ -951,12 +649,6 @@ "node": ">= 0.6" } }, - "node_modules/fs.realpath": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", - "license": "ISC" - }, "node_modules/function-bind": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", @@ -965,15 +657,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/get-caller-file": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", - "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", - "license": "ISC", - "engines": { - "node": "6.* || 8.* || >= 10.*" - } - }, "node_modules/get-intrinsic": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.3.0.tgz", @@ -1032,18 +715,6 @@ "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/glob-parent": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", - "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", - "dev": true, - "dependencies": { - "is-glob": "^4.0.1" - }, - "engines": { - "node": ">= 6" - } - }, "node_modules/glob/node_modules/brace-expansion": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", @@ -1079,15 +750,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", - "dev": true, - "engines": { - "node": ">=4" - } - }, "node_modules/has-symbols": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.1.0.tgz", @@ -1140,25 +802,6 @@ "node": ">=6" } }, - "node_modules/htmlparser2": { - "version": "9.1.0", - "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-9.1.0.tgz", - "integrity": "sha512-5zfg6mHUoaer/97TxnGpxmbR7zJtPwIYFMZ/H5ucTlPZhKvtum05yiPK3Mgai3a0DyVxv7qYqoweaEd2nrYQzQ==", - "funding": [ - "https://github.com/fb55/htmlparser2?sponsor=1", - { - "type": "github", - "url": "https://github.com/sponsors/fb55" - } - ], - "license": "MIT", - "dependencies": { - "domelementtype": "^2.3.0", - "domhandler": "^5.0.3", - "domutils": "^3.1.0", - "entities": "^4.5.0" - } - }, "node_modules/http-errors": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz", @@ -1175,33 +818,17 @@ } }, "node_modules/iconv-lite": { - "version": "0.4.24", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", - "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz", + "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==", + "license": "MIT", "dependencies": { - "safer-buffer": ">= 2.1.2 < 3" + "safer-buffer": ">= 2.1.2 < 3.0.0" }, "engines": { "node": ">=0.10.0" } }, - "node_modules/ignore-by-default": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/ignore-by-default/-/ignore-by-default-1.0.1.tgz", - "integrity": "sha512-Ius2VYcGNk7T90CppJqcIkS5ooHUZyIQK+ClZfMfMNFEF9VSE73Fq+906u/CWu92x4gzZMWOwfFYckPObzdEbA==", - "dev": true - }, - "node_modules/inflight": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", - "deprecated": "This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.", - "license": "ISC", - "dependencies": { - "once": "^1.3.0", - "wrappy": "1" - } - }, "node_modules/inherits": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", @@ -1215,27 +842,6 @@ "node": ">= 0.10" } }, - "node_modules/is-binary-path": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", - "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", - "dev": true, - "dependencies": { - "binary-extensions": "^2.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/is-extglob": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", - "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/is-fullwidth-code-point": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", @@ -1245,27 +851,6 @@ "node": ">=8" } }, - "node_modules/is-glob": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", - "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", - "dev": true, - "dependencies": { - "is-extglob": "^2.1.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-number": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", - "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", - "dev": true, - "engines": { - "node": ">=0.12.0" - } - }, "node_modules/isexe": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", @@ -1370,17 +955,6 @@ "node": ">= 0.6" } }, - "node_modules/minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, "node_modules/minipass": { "version": "7.1.2", "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.2.tgz", @@ -1412,78 +986,6 @@ "lower-case": "^1.1.1" } }, - "node_modules/nodemon": { - "version": "3.1.9", - "resolved": "https://registry.npmjs.org/nodemon/-/nodemon-3.1.9.tgz", - "integrity": "sha512-hdr1oIb2p6ZSxu3PB2JWWYS7ZQ0qvaZsc3hK8DR8f02kRzc8rjYmxAIvdz+aYC+8F2IjNaB7HMcSDg8nQpJxyg==", - "dev": true, - "dependencies": { - "chokidar": "^3.5.2", - "debug": "^4", - "ignore-by-default": "^1.0.1", - "minimatch": "^3.1.2", - "pstree.remy": "^1.1.8", - "semver": "^7.5.3", - "simple-update-notifier": "^2.0.0", - "supports-color": "^5.5.0", - "touch": "^3.1.0", - "undefsafe": "^2.0.5" - }, - "bin": { - "nodemon": "bin/nodemon.js" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/nodemon" - } - }, - "node_modules/nodemon/node_modules/debug": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.0.tgz", - "integrity": "sha512-6WTZ/IxCY/T6BALoZHaE4ctp9xm+Z5kY/pzYaCHRFeyVhojxlrm+46y68HA6hr0TcwEssoxNiDEUJQjfPZ/RYA==", - "dev": true, - "dependencies": { - "ms": "^2.1.3" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, - "node_modules/nodemon/node_modules/ms": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", - "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", - "dev": true - }, - "node_modules/normalize-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", - "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/nth-check": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/nth-check/-/nth-check-2.1.1.tgz", - "integrity": "sha512-lqjrjmaOoAnWfMmBPL+XNnynZh2+swxiX3WUE0s4yEHI6m+AwrK2UZOimIRl3X/4QctVqS8AiZjFqyOGrMXb/w==", - "license": "BSD-2-Clause", - "dependencies": { - "boolbase": "^1.0.0" - }, - "funding": { - "url": "https://github.com/fb55/nth-check?sponsor=1" - } - }, "node_modules/object-inspect": { "version": "1.13.4", "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.4.tgz", @@ -1506,15 +1008,6 @@ "node": ">= 0.8" } }, - "node_modules/once": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", - "license": "ISC", - "dependencies": { - "wrappy": "1" - } - }, "node_modules/package-json-from-dist": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/package-json-from-dist/-/package-json-from-dist-1.0.1.tgz", @@ -1530,43 +1023,6 @@ "no-case": "^2.2.0" } }, - "node_modules/parse5": { - "version": "7.2.1", - "resolved": "https://registry.npmjs.org/parse5/-/parse5-7.2.1.tgz", - "integrity": "sha512-BuBYQYlv1ckiPdQi/ohiivi9Sagc9JG+Ozs0r7b/0iK3sKmrb0b9FdWdBbOdx6hBCM/F9Ir82ofnBhtZOjCRPQ==", - "license": "MIT", - "dependencies": { - "entities": "^4.5.0" - }, - "funding": { - "url": "https://github.com/inikulin/parse5?sponsor=1" - } - }, - "node_modules/parse5-htmlparser2-tree-adapter": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/parse5-htmlparser2-tree-adapter/-/parse5-htmlparser2-tree-adapter-7.1.0.tgz", - "integrity": "sha512-ruw5xyKs6lrpo9x9rCZqZZnIUntICjQAd0Wsmp396Ul9lN/h+ifgVV1x1gZHi8euej6wTfpqX8j+BFQxF0NS/g==", - "license": "MIT", - "dependencies": { - "domhandler": "^5.0.3", - "parse5": "^7.0.0" - }, - "funding": { - "url": "https://github.com/inikulin/parse5?sponsor=1" - } - }, - "node_modules/parse5-parser-stream": { - "version": "7.1.2", - "resolved": "https://registry.npmjs.org/parse5-parser-stream/-/parse5-parser-stream-7.1.2.tgz", - "integrity": "sha512-JyeQc9iwFLn5TbvvqACIF/VXG6abODeB3Fwmv/TGdLk2LfbWkaySGY72at4+Ty7EkPZj854u4CrICqNk2qIbow==", - "license": "MIT", - "dependencies": { - "parse5": "^7.0.0" - }, - "funding": { - "url": "https://github.com/inikulin/parse5?sponsor=1" - } - }, "node_modules/parseurl": { "version": "1.3.3", "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", @@ -1575,15 +1031,6 @@ "node": ">= 0.8" } }, - "node_modules/path-is-absolute": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/path-key": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", @@ -1614,18 +1061,6 @@ "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.12.tgz", "integrity": "sha512-RA1GjUVMnvYFxuqovrEqZoxxW5NUZqbwKtYz/Tt7nXerk0LbLblQmrsgdeOxV5SFHf0UDggjS/bSeOZwt1pmEQ==" }, - "node_modules/picomatch": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", - "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", - "dev": true, - "engines": { - "node": ">=8.6" - }, - "funding": { - "url": "https://github.com/sponsors/jonschlinkert" - } - }, "node_modules/proxy-addr": { "version": "2.0.7", "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz", @@ -1638,12 +1073,6 @@ "node": ">= 0.10" } }, - "node_modules/pstree.remy": { - "version": "1.1.8", - "resolved": "https://registry.npmjs.org/pstree.remy/-/pstree.remy-1.1.8.tgz", - "integrity": "sha512-77DZwxQmxKnu3aR542U+X8FypNzbfJ+C5XQDk3uWjWxn6151aIMGthWYRXTqT1E5oJvg+ljaa2OJi+VfvCOQ8w==", - "dev": true - }, "node_modules/qs": { "version": "6.13.0", "resolved": "https://registry.npmjs.org/qs/-/qs-6.13.0.tgz", @@ -1667,31 +1096,20 @@ } }, "node_modules/raw-body": { - "version": "2.5.2", - "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.2.tgz", - "integrity": "sha512-8zGqypfENjCIqGhgXToC8aB2r7YrBX+AQAfIPs/Mlk+BtPTztOvTS01NRW/3Eh60J+a48lt8qsCzirQ6loCVfA==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-3.0.0.tgz", + "integrity": "sha512-RmkhL8CAyCRPXCE28MMH0z2PNWQBNk2Q09ZdxM9IOOXwxwZbN+qbWaatPkdkWIKL2ZVDImrN/pK5HTRz2PcS4g==", + "license": "MIT", "dependencies": { "bytes": "3.1.2", "http-errors": "2.0.0", - "iconv-lite": "0.4.24", + "iconv-lite": "0.6.3", "unpipe": "1.0.0" }, "engines": { "node": ">= 0.8" } }, - "node_modules/readdirp": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", - "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", - "dev": true, - "dependencies": { - "picomatch": "^2.2.1" - }, - "engines": { - "node": ">=8.10.0" - } - }, "node_modules/relateurl": { "version": "0.2.7", "resolved": "https://registry.npmjs.org/relateurl/-/relateurl-0.2.7.tgz", @@ -1701,53 +1119,6 @@ "node": ">= 0.10" } }, - "node_modules/replace-in-file": { - "version": "6.3.5", - "resolved": "https://registry.npmjs.org/replace-in-file/-/replace-in-file-6.3.5.tgz", - "integrity": "sha512-arB9d3ENdKva2fxRnSjwBEXfK1npgyci7ZZuwysgAp7ORjHSyxz6oqIjTEv8R0Ydl4Ll7uOAZXL4vbkhGIizCg==", - "license": "MIT", - "dependencies": { - "chalk": "^4.1.2", - "glob": "^7.2.0", - "yargs": "^17.2.1" - }, - "bin": { - "replace-in-file": "bin/cli.js" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/replace-in-file/node_modules/glob": { - "version": "7.2.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", - "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", - "deprecated": "Glob versions prior to v9 are no longer supported", - "license": "ISC", - "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.1.1", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - }, - "engines": { - "node": "*" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/require-directory": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", - "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/safe-buffer": { "version": "5.2.1", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", @@ -1772,18 +1143,6 @@ "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" }, - "node_modules/semver": { - "version": "7.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.1.tgz", - "integrity": "sha512-hlq8tAfn0m/61p4BVRcPzIGr6LKiMwo4VM6dGi6pt4qcRkmNzTcWq6eCEjEh+qXjkMDvPlOFFSGwQjoEa6gyMA==", - "dev": true, - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/send": { "version": "0.19.0", "resolved": "https://registry.npmjs.org/send/-/send-0.19.0.tgz", @@ -1820,6 +1179,34 @@ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==" }, + "node_modules/serve-favicon": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/serve-favicon/-/serve-favicon-2.5.0.tgz", + "integrity": "sha512-FMW2RvqNr03x+C0WxTyu6sOv21oOjkq5j8tjquWccwa6ScNyGFOGJVpuS1NmTVGBAHS07xnSKotgf2ehQmf9iA==", + "license": "MIT", + "dependencies": { + "etag": "~1.8.1", + "fresh": "0.5.2", + "ms": "2.1.1", + "parseurl": "~1.3.2", + "safe-buffer": "5.1.1" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/serve-favicon/node_modules/ms": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", + "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==", + "license": "MIT" + }, + "node_modules/serve-favicon/node_modules/safe-buffer": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz", + "integrity": "sha512-kKvNJn6Mm93gAczWVJg7wH+wGYWNrDHdWvpUmHyEsgCtIwwo3bqPtV4tR5tuPaUhTOo/kvhVwd8XwwOllGYkbg==", + "license": "MIT" + }, "node_modules/serve-static": { "version": "1.16.2", "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.16.2.tgz", @@ -1940,18 +1327,6 @@ "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/simple-update-notifier": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/simple-update-notifier/-/simple-update-notifier-2.0.0.tgz", - "integrity": "sha512-a2B9Y0KlNXl9u/vsW6sTIu9vGEpfKu2wRV6l1H3XEas/0gUIzGzBoP/IouTcUQbm9JWZLH3COxyn03TYlFax6w==", - "dev": true, - "dependencies": { - "semver": "^7.5.3" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/source-map": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", @@ -2084,18 +1459,6 @@ "node": ">=8" } }, - "node_modules/supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dev": true, - "dependencies": { - "has-flag": "^3.0.0" - }, - "engines": { - "node": ">=4" - } - }, "node_modules/terser": { "version": "5.39.0", "resolved": "https://registry.npmjs.org/terser/-/terser-5.39.0.tgz", @@ -2114,18 +1477,6 @@ "node": ">=10" } }, - "node_modules/to-regex-range": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", - "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", - "dev": true, - "dependencies": { - "is-number": "^7.0.0" - }, - "engines": { - "node": ">=8.0" - } - }, "node_modules/toidentifier": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz", @@ -2134,19 +1485,11 @@ "node": ">=0.6" } }, - "node_modules/touch": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/touch/-/touch-3.1.1.tgz", - "integrity": "sha512-r0eojU4bI8MnHr8c5bNo7lJDdI2qXlWWJk6a9EAFG7vbhTjElYhBVS3/miuE0uOuoLdb8Mc/rVfsmm6eo5o9GA==", - "dev": true, - "bin": { - "nodetouch": "bin/nodetouch.js" - } - }, "node_modules/tslib": { "version": "2.8.1", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", - "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==" + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", + "license": "0BSD" }, "node_modules/type-is": { "version": "1.6.18", @@ -2172,21 +1515,13 @@ "node": ">=0.8.0" } }, - "node_modules/undefsafe": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/undefsafe/-/undefsafe-2.0.5.tgz", - "integrity": "sha512-WxONCrssBM8TSPRqN5EmsjVrsv4A8X12J4ArBiiayv3DyyG3ZlIg6yysuuSYdZsVz3TKcTg2fd//Ujd4CHV1iA==", - "dev": true - }, "node_modules/undici": { - "version": "5.28.5", - "resolved": "https://registry.npmjs.org/undici/-/undici-5.28.5.tgz", - "integrity": "sha512-zICwjrDrcrUE0pyyJc1I2QzBkLM8FINsgOrt6WjA+BgajVq9Nxu2PbFFXUrAggLfDXlZGZBVZYw7WNV5KiBiBA==", - "dependencies": { - "@fastify/busboy": "^2.0.0" - }, + "version": "7.6.0", + "resolved": "https://registry.npmjs.org/undici/-/undici-7.6.0.tgz", + "integrity": "sha512-gaFsbThjrDGvAaD670r81RZro/s6H2PVZF640Qn0p5kZK+/rim7/mmyfp2W7VB5vOMaFM8vuFBJUaMlaZTYHlA==", + "license": "MIT", "engines": { - "node": ">=14.0" + "node": ">=20.18.1" } }, "node_modules/unpipe": { @@ -2219,39 +1554,6 @@ "node": ">= 0.8" } }, - "node_modules/whatwg-encoding": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/whatwg-encoding/-/whatwg-encoding-3.1.1.tgz", - "integrity": "sha512-6qN4hJdMwfYBtE3YBTTHhoeuUrDBPZmbQaxWAqSALV/MeEnR5z1xd8UKud2RAkFoPkmB+hli1TZSnyi84xz1vQ==", - "license": "MIT", - "dependencies": { - "iconv-lite": "0.6.3" - }, - "engines": { - "node": ">=18" - } - }, - "node_modules/whatwg-encoding/node_modules/iconv-lite": { - "version": "0.6.3", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz", - "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==", - "license": "MIT", - "dependencies": { - "safer-buffer": ">= 2.1.2 < 3.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/whatwg-mimetype": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/whatwg-mimetype/-/whatwg-mimetype-4.0.0.tgz", - "integrity": "sha512-QaKxh0eNIi2mE9p2vEdzfagOKHCcj1pJ56EEHGQOVxp8r9/iszLUUV7v89x9O1p/T+NlTM5W7jW6+cz4Fq1YVg==", - "license": "MIT", - "engines": { - "node": ">=18" - } - }, "node_modules/which": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", @@ -2357,89 +1659,6 @@ "engines": { "node": ">=8" } - }, - "node_modules/wrappy": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", - "license": "ISC" - }, - "node_modules/y18n": { - "version": "5.0.8", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", - "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", - "license": "ISC", - "engines": { - "node": ">=10" - } - }, - "node_modules/yargs": { - "version": "17.7.2", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", - "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", - "license": "MIT", - "dependencies": { - "cliui": "^8.0.1", - "escalade": "^3.1.1", - "get-caller-file": "^2.0.5", - "require-directory": "^2.1.1", - "string-width": "^4.2.3", - "y18n": "^5.0.5", - "yargs-parser": "^21.1.1" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/yargs-parser": { - "version": "21.1.1", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", - "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", - "license": "ISC", - "engines": { - "node": ">=12" - } - }, - "node_modules/yargs/node_modules/ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/yargs/node_modules/emoji-regex": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", - "license": "MIT" - }, - "node_modules/yargs/node_modules/string-width": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", - "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", - "license": "MIT", - "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/yargs/node_modules/strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "license": "MIT", - "dependencies": { - "ansi-regex": "^5.0.1" - }, - "engines": { - "node": ">=8" - } } } } diff --git a/node_modules/@fastify/busboy/deps/dicer/lib/Dicer.js b/node_modules/@fastify/busboy/deps/dicer/lib/Dicer.js deleted file mode 100644 index 3c8c081..0000000 --- a/node_modules/@fastify/busboy/deps/dicer/lib/Dicer.js +++ /dev/null @@ -1,213 +0,0 @@ -'use strict' - -const WritableStream = require('node:stream').Writable -const inherits = require('node:util').inherits - -const StreamSearch = require('../../streamsearch/sbmh') - -const PartStream = require('./PartStream') -const HeaderParser = require('./HeaderParser') - -const DASH = 45 -const B_ONEDASH = Buffer.from('-') -const B_CRLF = Buffer.from('\r\n') -const EMPTY_FN = function () {} - -function Dicer (cfg) { - if (!(this instanceof Dicer)) { return new Dicer(cfg) } - WritableStream.call(this, cfg) - - if (!cfg || (!cfg.headerFirst && typeof cfg.boundary !== 'string')) { throw new TypeError('Boundary required') } - - if (typeof cfg.boundary === 'string') { this.setBoundary(cfg.boundary) } else { this._bparser = undefined } - - this._headerFirst = cfg.headerFirst - - this._dashes = 0 - this._parts = 0 - this._finished = false - this._realFinish = false - this._isPreamble = true - this._justMatched = false - this._firstWrite = true - this._inHeader = true - this._part = undefined - this._cb = undefined - this._ignoreData = false - this._partOpts = { highWaterMark: cfg.partHwm } - this._pause = false - - const self = this - this._hparser = new HeaderParser(cfg) - this._hparser.on('header', function (header) { - self._inHeader = false - self._part.emit('header', header) - }) -} -inherits(Dicer, WritableStream) - -Dicer.prototype.emit = function (ev) { - if (ev === 'finish' && !this._realFinish) { - if (!this._finished) { - const self = this - process.nextTick(function () { - self.emit('error', new Error('Unexpected end of multipart data')) - if (self._part && !self._ignoreData) { - const type = (self._isPreamble ? 'Preamble' : 'Part') - self._part.emit('error', new Error(type + ' terminated early due to unexpected end of multipart data')) - self._part.push(null) - process.nextTick(function () { - self._realFinish = true - self.emit('finish') - self._realFinish = false - }) - return - } - self._realFinish = true - self.emit('finish') - self._realFinish = false - }) - } - } else { WritableStream.prototype.emit.apply(this, arguments) } -} - -Dicer.prototype._write = function (data, encoding, cb) { - // ignore unexpected data (e.g. extra trailer data after finished) - if (!this._hparser && !this._bparser) { return cb() } - - if (this._headerFirst && this._isPreamble) { - if (!this._part) { - this._part = new PartStream(this._partOpts) - if (this.listenerCount('preamble') !== 0) { this.emit('preamble', this._part) } else { this._ignore() } - } - const r = this._hparser.push(data) - if (!this._inHeader && r !== undefined && r < data.length) { data = data.slice(r) } else { return cb() } - } - - // allows for "easier" testing - if (this._firstWrite) { - this._bparser.push(B_CRLF) - this._firstWrite = false - } - - this._bparser.push(data) - - if (this._pause) { this._cb = cb } else { cb() } -} - -Dicer.prototype.reset = function () { - this._part = undefined - this._bparser = undefined - this._hparser = undefined -} - -Dicer.prototype.setBoundary = function (boundary) { - const self = this - this._bparser = new StreamSearch('\r\n--' + boundary) - this._bparser.on('info', function (isMatch, data, start, end) { - self._oninfo(isMatch, data, start, end) - }) -} - -Dicer.prototype._ignore = function () { - if (this._part && !this._ignoreData) { - this._ignoreData = true - this._part.on('error', EMPTY_FN) - // we must perform some kind of read on the stream even though we are - // ignoring the data, otherwise node's Readable stream will not emit 'end' - // after pushing null to the stream - this._part.resume() - } -} - -Dicer.prototype._oninfo = function (isMatch, data, start, end) { - let buf; const self = this; let i = 0; let r; let shouldWriteMore = true - - if (!this._part && this._justMatched && data) { - while (this._dashes < 2 && (start + i) < end) { - if (data[start + i] === DASH) { - ++i - ++this._dashes - } else { - if (this._dashes) { buf = B_ONEDASH } - this._dashes = 0 - break - } - } - if (this._dashes === 2) { - if ((start + i) < end && this.listenerCount('trailer') !== 0) { this.emit('trailer', data.slice(start + i, end)) } - this.reset() - this._finished = true - // no more parts will be added - if (self._parts === 0) { - self._realFinish = true - self.emit('finish') - self._realFinish = false - } - } - if (this._dashes) { return } - } - if (this._justMatched) { this._justMatched = false } - if (!this._part) { - this._part = new PartStream(this._partOpts) - this._part._read = function (n) { - self._unpause() - } - if (this._isPreamble && this.listenerCount('preamble') !== 0) { - this.emit('preamble', this._part) - } else if (this._isPreamble !== true && this.listenerCount('part') !== 0) { - this.emit('part', this._part) - } else { - this._ignore() - } - if (!this._isPreamble) { this._inHeader = true } - } - if (data && start < end && !this._ignoreData) { - if (this._isPreamble || !this._inHeader) { - if (buf) { shouldWriteMore = this._part.push(buf) } - shouldWriteMore = this._part.push(data.slice(start, end)) - if (!shouldWriteMore) { this._pause = true } - } else if (!this._isPreamble && this._inHeader) { - if (buf) { this._hparser.push(buf) } - r = this._hparser.push(data.slice(start, end)) - if (!this._inHeader && r !== undefined && r < end) { this._oninfo(false, data, start + r, end) } - } - } - if (isMatch) { - this._hparser.reset() - if (this._isPreamble) { this._isPreamble = false } else { - if (start !== end) { - ++this._parts - this._part.on('end', function () { - if (--self._parts === 0) { - if (self._finished) { - self._realFinish = true - self.emit('finish') - self._realFinish = false - } else { - self._unpause() - } - } - }) - } - } - this._part.push(null) - this._part = undefined - this._ignoreData = false - this._justMatched = true - this._dashes = 0 - } -} - -Dicer.prototype._unpause = function () { - if (!this._pause) { return } - - this._pause = false - if (this._cb) { - const cb = this._cb - this._cb = undefined - cb() - } -} - -module.exports = Dicer diff --git a/node_modules/@fastify/busboy/deps/dicer/lib/HeaderParser.js b/node_modules/@fastify/busboy/deps/dicer/lib/HeaderParser.js deleted file mode 100644 index 65f667b..0000000 --- a/node_modules/@fastify/busboy/deps/dicer/lib/HeaderParser.js +++ /dev/null @@ -1,100 +0,0 @@ -'use strict' - -const EventEmitter = require('node:events').EventEmitter -const inherits = require('node:util').inherits -const getLimit = require('../../../lib/utils/getLimit') - -const StreamSearch = require('../../streamsearch/sbmh') - -const B_DCRLF = Buffer.from('\r\n\r\n') -const RE_CRLF = /\r\n/g -const RE_HDR = /^([^:]+):[ \t]?([\x00-\xFF]+)?$/ // eslint-disable-line no-control-regex - -function HeaderParser (cfg) { - EventEmitter.call(this) - - cfg = cfg || {} - const self = this - this.nread = 0 - this.maxed = false - this.npairs = 0 - this.maxHeaderPairs = getLimit(cfg, 'maxHeaderPairs', 2000) - this.maxHeaderSize = getLimit(cfg, 'maxHeaderSize', 80 * 1024) - this.buffer = '' - this.header = {} - this.finished = false - this.ss = new StreamSearch(B_DCRLF) - this.ss.on('info', function (isMatch, data, start, end) { - if (data && !self.maxed) { - if (self.nread + end - start >= self.maxHeaderSize) { - end = self.maxHeaderSize - self.nread + start - self.nread = self.maxHeaderSize - self.maxed = true - } else { self.nread += (end - start) } - - self.buffer += data.toString('binary', start, end) - } - if (isMatch) { self._finish() } - }) -} -inherits(HeaderParser, EventEmitter) - -HeaderParser.prototype.push = function (data) { - const r = this.ss.push(data) - if (this.finished) { return r } -} - -HeaderParser.prototype.reset = function () { - this.finished = false - this.buffer = '' - this.header = {} - this.ss.reset() -} - -HeaderParser.prototype._finish = function () { - if (this.buffer) { this._parseHeader() } - this.ss.matches = this.ss.maxMatches - const header = this.header - this.header = {} - this.buffer = '' - this.finished = true - this.nread = this.npairs = 0 - this.maxed = false - this.emit('header', header) -} - -HeaderParser.prototype._parseHeader = function () { - if (this.npairs === this.maxHeaderPairs) { return } - - const lines = this.buffer.split(RE_CRLF) - const len = lines.length - let m, h - - for (var i = 0; i < len; ++i) { // eslint-disable-line no-var - if (lines[i].length === 0) { continue } - if (lines[i][0] === '\t' || lines[i][0] === ' ') { - // folded header content - // RFC2822 says to just remove the CRLF and not the whitespace following - // it, so we follow the RFC and include the leading whitespace ... - if (h) { - this.header[h][this.header[h].length - 1] += lines[i] - continue - } - } - - const posColon = lines[i].indexOf(':') - if ( - posColon === -1 || - posColon === 0 - ) { - return - } - m = RE_HDR.exec(lines[i]) - h = m[1].toLowerCase() - this.header[h] = this.header[h] || [] - this.header[h].push((m[2] || '')) - if (++this.npairs === this.maxHeaderPairs) { break } - } -} - -module.exports = HeaderParser diff --git a/node_modules/@fastify/busboy/deps/dicer/lib/PartStream.js b/node_modules/@fastify/busboy/deps/dicer/lib/PartStream.js deleted file mode 100644 index c91da1c..0000000 --- a/node_modules/@fastify/busboy/deps/dicer/lib/PartStream.js +++ /dev/null @@ -1,13 +0,0 @@ -'use strict' - -const inherits = require('node:util').inherits -const ReadableStream = require('node:stream').Readable - -function PartStream (opts) { - ReadableStream.call(this, opts) -} -inherits(PartStream, ReadableStream) - -PartStream.prototype._read = function (n) {} - -module.exports = PartStream diff --git a/node_modules/@fastify/busboy/deps/dicer/lib/dicer.d.ts b/node_modules/@fastify/busboy/deps/dicer/lib/dicer.d.ts deleted file mode 100644 index 3c5b896..0000000 --- a/node_modules/@fastify/busboy/deps/dicer/lib/dicer.d.ts +++ /dev/null @@ -1,164 +0,0 @@ -// Type definitions for dicer 0.2 -// Project: https://github.com/mscdex/dicer -// Definitions by: BendingBender <https://github.com/BendingBender> -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.2 -/// <reference types="node" /> - -import stream = require("stream"); - -// tslint:disable:unified-signatures - -/** - * A very fast streaming multipart parser for node.js. - * Dicer is a WritableStream - * - * Dicer (special) events: - * - on('finish', ()) - Emitted when all parts have been parsed and the Dicer instance has been ended. - * - on('part', (stream: PartStream)) - Emitted when a new part has been found. - * - on('preamble', (stream: PartStream)) - Emitted for preamble if you should happen to need it (can usually be ignored). - * - on('trailer', (data: Buffer)) - Emitted when trailing data was found after the terminating boundary (as with the preamble, this can usually be ignored too). - */ -export class Dicer extends stream.Writable { - /** - * Creates and returns a new Dicer instance with the following valid config settings: - * - * @param config The configuration to use - */ - constructor(config: Dicer.Config); - /** - * Sets the boundary to use for parsing and performs some initialization needed for parsing. - * You should only need to use this if you set headerFirst to true in the constructor and are parsing the boundary from the preamble header. - * - * @param boundary The boundary to use - */ - setBoundary(boundary: string): void; - addListener(event: "finish", listener: () => void): this; - addListener(event: "part", listener: (stream: Dicer.PartStream) => void): this; - addListener(event: "preamble", listener: (stream: Dicer.PartStream) => void): this; - addListener(event: "trailer", listener: (data: 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: "pipe", listener: (src: stream.Readable) => void): this; - addListener(event: "unpipe", listener: (src: stream.Readable) => void): this; - addListener(event: string, listener: (...args: any[]) => void): this; - on(event: "finish", listener: () => void): this; - on(event: "part", listener: (stream: Dicer.PartStream) => void): this; - on(event: "preamble", listener: (stream: Dicer.PartStream) => void): this; - on(event: "trailer", listener: (data: 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: "pipe", listener: (src: stream.Readable) => void): this; - on(event: "unpipe", listener: (src: stream.Readable) => void): this; - on(event: string, listener: (...args: any[]) => void): this; - once(event: "finish", listener: () => void): this; - once(event: "part", listener: (stream: Dicer.PartStream) => void): this; - once(event: "preamble", listener: (stream: Dicer.PartStream) => void): this; - once(event: "trailer", listener: (data: 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: "pipe", listener: (src: stream.Readable) => void): this; - once(event: "unpipe", listener: (src: stream.Readable) => void): this; - once(event: string, listener: (...args: any[]) => void): this; - prependListener(event: "finish", listener: () => void): this; - prependListener(event: "part", listener: (stream: Dicer.PartStream) => void): this; - prependListener(event: "preamble", listener: (stream: Dicer.PartStream) => void): this; - prependListener(event: "trailer", listener: (data: 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: "pipe", listener: (src: stream.Readable) => void): this; - prependListener(event: "unpipe", listener: (src: stream.Readable) => void): this; - prependListener(event: string, listener: (...args: any[]) => void): this; - prependOnceListener(event: "finish", listener: () => void): this; - prependOnceListener(event: "part", listener: (stream: Dicer.PartStream) => void): this; - prependOnceListener(event: "preamble", listener: (stream: Dicer.PartStream) => void): this; - prependOnceListener(event: "trailer", listener: (data: 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: "pipe", listener: (src: stream.Readable) => void): this; - prependOnceListener(event: "unpipe", listener: (src: stream.Readable) => void): this; - prependOnceListener(event: string, listener: (...args: any[]) => void): this; - removeListener(event: "finish", listener: () => void): this; - removeListener(event: "part", listener: (stream: Dicer.PartStream) => void): this; - removeListener(event: "preamble", listener: (stream: Dicer.PartStream) => void): this; - removeListener(event: "trailer", listener: (data: Buffer) => void): this; - removeListener(event: "close", listener: () => void): this; - removeListener(event: "drain", listener: () => void): this; - removeListener(event: "error", listener: (err: Error) => void): this; - removeListener(event: "pipe", listener: (src: stream.Readable) => void): this; - removeListener(event: "unpipe", listener: (src: stream.Readable) => void): this; - removeListener(event: string, listener: (...args: any[]) => void): this; -} - -declare namespace Dicer { - interface Config { - /** - * This is the boundary used to detect the beginning of a new part. - */ - boundary?: string | undefined; - /** - * If true, preamble header parsing will be performed first. - */ - headerFirst?: boolean | undefined; - /** - * The maximum number of header key=>value pairs to parse Default: 2000 (same as node's http). - */ - maxHeaderPairs?: number | undefined; - } - - /** - * PartStream is a _ReadableStream_ - * - * PartStream (special) events: - * - on('header', (header: object)) - An object containing the header for this particular part. Each property value is an array of one or more string values. - */ - interface PartStream extends stream.Readable { - addListener(event: "header", listener: (header: object) => 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, listener: (...args: any[]) => void): this; - on(event: "header", listener: (header: object) => 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, listener: (...args: any[]) => void): this; - once(event: "header", listener: (header: object) => 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, listener: (...args: any[]) => void): this; - prependListener(event: "header", listener: (header: object) => 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, listener: (...args: any[]) => void): this; - prependOnceListener(event: "header", listener: (header: object) => 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, listener: (...args: any[]) => void): this; - removeListener(event: "header", listener: (header: object) => void): this; - removeListener(event: "close", listener: () => void): this; - removeListener(event: "data", listener: (chunk: Buffer | string) => void): this; - removeListener(event: "end", listener: () => void): this; - removeListener(event: "readable", listener: () => void): this; - removeListener(event: "error", listener: (err: Error) => void): this; - removeListener(event: string, listener: (...args: any[]) => void): this; - } -} \ No newline at end of file diff --git a/node_modules/@fastify/busboy/deps/streamsearch/sbmh.js b/node_modules/@fastify/busboy/deps/streamsearch/sbmh.js deleted file mode 100644 index b90c0e8..0000000 --- a/node_modules/@fastify/busboy/deps/streamsearch/sbmh.js +++ /dev/null @@ -1,228 +0,0 @@ -'use strict' - -/** - * Copyright Brian White. All rights reserved. - * - * @see https://github.com/mscdex/streamsearch - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to - * deal in the Software without restriction, including without limitation the - * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - * sell copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS - * IN THE SOFTWARE. - * - * Based heavily on the Streaming Boyer-Moore-Horspool C++ implementation - * by Hongli Lai at: https://github.com/FooBarWidget/boyer-moore-horspool - */ -const EventEmitter = require('node:events').EventEmitter -const inherits = require('node:util').inherits - -function SBMH (needle) { - if (typeof needle === 'string') { - needle = Buffer.from(needle) - } - - if (!Buffer.isBuffer(needle)) { - throw new TypeError('The needle has to be a String or a Buffer.') - } - - const needleLength = needle.length - - if (needleLength === 0) { - throw new Error('The needle cannot be an empty String/Buffer.') - } - - if (needleLength > 256) { - throw new Error('The needle cannot have a length bigger than 256.') - } - - this.maxMatches = Infinity - this.matches = 0 - - this._occ = new Array(256) - .fill(needleLength) // Initialize occurrence table. - this._lookbehind_size = 0 - this._needle = needle - this._bufpos = 0 - - this._lookbehind = Buffer.alloc(needleLength) - - // Populate occurrence table with analysis of the needle, - // ignoring last letter. - for (var i = 0; i < needleLength - 1; ++i) { // eslint-disable-line no-var - this._occ[needle[i]] = needleLength - 1 - i - } -} -inherits(SBMH, EventEmitter) - -SBMH.prototype.reset = function () { - this._lookbehind_size = 0 - this.matches = 0 - this._bufpos = 0 -} - -SBMH.prototype.push = function (chunk, pos) { - if (!Buffer.isBuffer(chunk)) { - chunk = Buffer.from(chunk, 'binary') - } - const chlen = chunk.length - this._bufpos = pos || 0 - let r - while (r !== chlen && this.matches < this.maxMatches) { r = this._sbmh_feed(chunk) } - return r -} - -SBMH.prototype._sbmh_feed = function (data) { - const len = data.length - const needle = this._needle - const needleLength = needle.length - const lastNeedleChar = needle[needleLength - 1] - - // 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[lookbehind_size - 2] - let pos = -this._lookbehind_size - let ch - - 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 <= len - needleLength) { - ch = this._sbmh_lookup_char(data, pos + needleLength - 1) - - if ( - ch === lastNeedleChar && - this._sbmh_memcmp(data, pos, needleLength - 1) - ) { - this._lookbehind_size = 0 - ++this.matches - this.emit('info', true) - - return (this._bufpos = pos + needleLength) - } - pos += this._occ[ch] - } - - // No match. - - if (pos < 0) { - // 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 && !this._sbmh_memcmp(data, pos, len - pos)) { ++pos } - } - - if (pos >= 0) { - // Discard lookbehind buffer. - this.emit('info', false, this._lookbehind, 0, this._lookbehind_size) - this._lookbehind_size = 0 - } else { - // Cut off part of the lookbehind buffer that has - // been processed and append the entire haystack - // into it. - const bytesToCutOff = this._lookbehind_size + pos - if (bytesToCutOff > 0) { - // The cut off data is guaranteed not to contain the needle. - this.emit('info', false, this._lookbehind, 0, bytesToCutOff) - } - - this._lookbehind.copy(this._lookbehind, 0, bytesToCutOff, - this._lookbehind_size - bytesToCutOff) - this._lookbehind_size -= bytesToCutOff - - data.copy(this._lookbehind, this._lookbehind_size) - this._lookbehind_size += len - - this._bufpos = len - return len - } - } - - pos += (pos >= 0) * this._bufpos - - // Lookbehind buffer is now empty. We only need to check if the - // needle is in the haystack. - if (data.indexOf(needle, pos) !== -1) { - pos = data.indexOf(needle, pos) - ++this.matches - if (pos > 0) { this.emit('info', true, data, this._bufpos, pos) } else { this.emit('info', true) } - - return (this._bufpos = pos + needleLength) - } else { - pos = len - needleLength - } - - // 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 && - ( - data[pos] !== needle[0] || - ( - (Buffer.compare( - data.subarray(pos, pos + len - pos), - needle.subarray(0, len - pos) - ) !== 0) - ) - ) - ) { - ++pos - } - if (pos < len) { - data.copy(this._lookbehind, 0, pos, pos + (len - pos)) - this._lookbehind_size = len - pos - } - - // Everything until pos is guaranteed not to contain needle data. - if (pos > 0) { this.emit('info', false, data, this._bufpos, pos < len ? pos : len) } - - this._bufpos = len - return len -} - -SBMH.prototype._sbmh_lookup_char = function (data, pos) { - return (pos < 0) - ? this._lookbehind[this._lookbehind_size + pos] - : data[pos] -} - -SBMH.prototype._sbmh_memcmp = function (data, pos, len) { - for (var i = 0; i < len; ++i) { // eslint-disable-line no-var - if (this._sbmh_lookup_char(data, pos + i) !== this._needle[i]) { return false } - } - return true -} - -module.exports = SBMH diff --git a/node_modules/@fastify/busboy/lib/main.d.ts b/node_modules/@fastify/busboy/lib/main.d.ts deleted file mode 100644 index 91b6448..0000000 --- a/node_modules/@fastify/busboy/lib/main.d.ts +++ /dev/null @@ -1,196 +0,0 @@ -// Definitions by: Jacob Baskin <https://github.com/jacobbaskin> -// BendingBender <https://github.com/BendingBender> -// Igor Savin <https://github.com/kibertoad> - -/// <reference types="node" /> - -import * as http from 'http'; -import { Readable, Writable } from 'stream'; -export { Dicer } from "../deps/dicer/lib/dicer"; - -export const Busboy: BusboyConstructor; -export default Busboy; - -export interface BusboyConfig { - /** - * These are the HTTP headers of the incoming request, which are used by individual parsers. - */ - headers: BusboyHeaders; - /** - * `highWaterMark` to use for this Busboy instance. - * @default WritableStream default. - */ - highWaterMark?: number | undefined; - /** - * highWaterMark to use for file streams. - * @default ReadableStream default. - */ - fileHwm?: number | undefined; - /** - * Default character set to use when one isn't defined. - * @default 'utf8' - */ - defCharset?: string | undefined; - /** - * Detect if a Part is a file. - * - * By default a file is detected if contentType - * is application/octet-stream or fileName is not - * undefined. - * - * Modify this to handle e.g. Blobs. - */ - isPartAFile?: (fieldName: string | undefined, contentType: string | undefined, fileName: string | undefined) => boolean; - /** - * If paths in the multipart 'filename' field shall be preserved. - * @default false - */ - preservePath?: boolean | undefined; - /** - * Various limits on incoming data. - */ - limits?: - | { - /** - * Max field name size (in bytes) - * @default 100 bytes - */ - fieldNameSize?: number | undefined; - /** - * Max field value size (in bytes) - * @default 1MB - */ - fieldSize?: number | undefined; - /** - * Max number of non-file fields - * @default Infinity - */ - fields?: number | undefined; - /** - * For multipart forms, the max file size (in bytes) - * @default Infinity - */ - fileSize?: number | undefined; - /** - * For multipart forms, the max number of file fields - * @default Infinity - */ - files?: number | undefined; - /** - * For multipart forms, the max number of parts (fields + files) - * @default Infinity - */ - parts?: number | undefined; - /** - * For multipart forms, the max number of header key=>value pairs to parse - * @default 2000 - */ - headerPairs?: number | undefined; - - /** - * For multipart forms, the max size of a header part - * @default 81920 - */ - headerSize?: number | undefined; - } - | undefined; -} - -export type BusboyHeaders = { 'content-type': string } & http.IncomingHttpHeaders; - -export interface BusboyFileStream extends - Readable { - - truncated: boolean; - - /** - * The number of bytes that have been read so far. - */ - bytesRead: number; -} - -export interface Busboy extends Writable { - addListener<Event extends keyof BusboyEvents>(event: Event, listener: BusboyEvents[Event]): this; - - addListener(event: string | symbol, listener: (...args: any[]) => void): this; - - on<Event extends keyof BusboyEvents>(event: Event, listener: BusboyEvents[Event]): this; - - on(event: string | symbol, listener: (...args: any[]) => void): this; - - once<Event extends keyof BusboyEvents>(event: Event, listener: BusboyEvents[Event]): this; - - once(event: string | symbol, listener: (...args: any[]) => void): this; - - removeListener<Event extends keyof BusboyEvents>(event: Event, listener: BusboyEvents[Event]): this; - - removeListener(event: string | symbol, listener: (...args: any[]) => void): this; - - off<Event extends keyof BusboyEvents>(event: Event, listener: BusboyEvents[Event]): this; - - off(event: string | symbol, listener: (...args: any[]) => void): this; - - prependListener<Event extends keyof BusboyEvents>(event: Event, listener: BusboyEvents[Event]): this; - - prependListener(event: string | symbol, listener: (...args: any[]) => void): this; - - prependOnceListener<Event extends keyof BusboyEvents>(event: Event, listener: BusboyEvents[Event]): this; - - prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this; -} - -export interface BusboyEvents { - /** - * Emitted for each new file form field found. - * - * * Note: if you listen for this event, you should always handle the `stream` no matter if you care about the - * file contents or not (e.g. you can simply just do `stream.resume();` if you want to discard the contents), - * otherwise the 'finish' event will never fire on the Busboy instance. However, if you don't care about **any** - * incoming files, you can simply not listen for the 'file' event at all and any/all files will be automatically - * and safely discarded (these discarded files do still count towards `files` and `parts` limits). - * * If a configured file size limit was reached, `stream` will both have a boolean property `truncated` - * (best checked at the end of the stream) and emit a 'limit' event to notify you when this happens. - * - * @param listener.transferEncoding Contains the 'Content-Transfer-Encoding' value for the file stream. - * @param listener.mimeType Contains the 'Content-Type' value for the file stream. - */ - file: ( - fieldname: string, - stream: BusboyFileStream, - filename: string, - transferEncoding: string, - mimeType: string, - ) => void; - /** - * Emitted for each new non-file field found. - */ - field: ( - fieldname: string, - value: string, - fieldnameTruncated: boolean, - valueTruncated: boolean, - transferEncoding: string, - mimeType: string, - ) => void; - finish: () => void; - /** - * Emitted when specified `parts` limit has been reached. No more 'file' or 'field' events will be emitted. - */ - partsLimit: () => void; - /** - * Emitted when specified `files` limit has been reached. No more 'file' events will be emitted. - */ - filesLimit: () => void; - /** - * Emitted when specified `fields` limit has been reached. No more 'field' events will be emitted. - */ - fieldsLimit: () => void; - error: (error: unknown) => void; -} - -export interface BusboyConstructor { - (options: BusboyConfig): Busboy; - - new(options: BusboyConfig): Busboy; -} - diff --git a/node_modules/@fastify/busboy/lib/main.js b/node_modules/@fastify/busboy/lib/main.js deleted file mode 100644 index 8794beb..0000000 --- a/node_modules/@fastify/busboy/lib/main.js +++ /dev/null @@ -1,85 +0,0 @@ -'use strict' - -const WritableStream = require('node:stream').Writable -const { inherits } = require('node:util') -const Dicer = require('../deps/dicer/lib/Dicer') - -const MultipartParser = require('./types/multipart') -const UrlencodedParser = require('./types/urlencoded') -const parseParams = require('./utils/parseParams') - -function Busboy (opts) { - if (!(this instanceof Busboy)) { return new Busboy(opts) } - - if (typeof opts !== 'object') { - throw new TypeError('Busboy expected an options-Object.') - } - if (typeof opts.headers !== 'object') { - throw new TypeError('Busboy expected an options-Object with headers-attribute.') - } - if (typeof opts.headers['content-type'] !== 'string') { - throw new TypeError('Missing Content-Type-header.') - } - - const { - headers, - ...streamOptions - } = opts - - this.opts = { - autoDestroy: false, - ...streamOptions - } - WritableStream.call(this, this.opts) - - this._done = false - this._parser = this.getParserByHeaders(headers) - this._finished = false -} -inherits(Busboy, WritableStream) - -Busboy.prototype.emit = function (ev) { - if (ev === 'finish') { - if (!this._done) { - this._parser?.end() - return - } else if (this._finished) { - return - } - this._finished = true - } - WritableStream.prototype.emit.apply(this, arguments) -} - -Busboy.prototype.getParserByHeaders = function (headers) { - const parsed = parseParams(headers['content-type']) - - const cfg = { - defCharset: this.opts.defCharset, - fileHwm: this.opts.fileHwm, - headers, - highWaterMark: this.opts.highWaterMark, - isPartAFile: this.opts.isPartAFile, - limits: this.opts.limits, - parsedConType: parsed, - preservePath: this.opts.preservePath - } - - if (MultipartParser.detect.test(parsed[0])) { - return new MultipartParser(this, cfg) - } - if (UrlencodedParser.detect.test(parsed[0])) { - return new UrlencodedParser(this, cfg) - } - throw new Error('Unsupported Content-Type.') -} - -Busboy.prototype._write = function (chunk, encoding, cb) { - this._parser.write(chunk, cb) -} - -module.exports = Busboy -module.exports.default = Busboy -module.exports.Busboy = Busboy - -module.exports.Dicer = Dicer diff --git a/node_modules/@fastify/busboy/lib/types/multipart.js b/node_modules/@fastify/busboy/lib/types/multipart.js deleted file mode 100644 index d691eca..0000000 --- a/node_modules/@fastify/busboy/lib/types/multipart.js +++ /dev/null @@ -1,306 +0,0 @@ -'use strict' - -// TODO: -// * support 1 nested multipart level -// (see second multipart example here: -// http://www.w3.org/TR/html401/interact/forms.html#didx-multipartform-data) -// * support limits.fieldNameSize -// -- this will require modifications to utils.parseParams - -const { Readable } = require('node:stream') -const { inherits } = require('node:util') - -const Dicer = require('../../deps/dicer/lib/Dicer') - -const parseParams = require('../utils/parseParams') -const decodeText = require('../utils/decodeText') -const basename = require('../utils/basename') -const getLimit = require('../utils/getLimit') - -const RE_BOUNDARY = /^boundary$/i -const RE_FIELD = /^form-data$/i -const RE_CHARSET = /^charset$/i -const RE_FILENAME = /^filename$/i -const RE_NAME = /^name$/i - -Multipart.detect = /^multipart\/form-data/i -function Multipart (boy, cfg) { - let i - let len - const self = this - let boundary - const limits = cfg.limits - const isPartAFile = cfg.isPartAFile || ((fieldName, contentType, fileName) => (contentType === 'application/octet-stream' || fileName !== undefined)) - const parsedConType = cfg.parsedConType || [] - const defCharset = cfg.defCharset || 'utf8' - const preservePath = cfg.preservePath - const fileOpts = { highWaterMark: cfg.fileHwm } - - for (i = 0, len = parsedConType.length; i < len; ++i) { - if (Array.isArray(parsedConType[i]) && - RE_BOUNDARY.test(parsedConType[i][0])) { - boundary = parsedConType[i][1] - break - } - } - - function checkFinished () { - if (nends === 0 && finished && !boy._done) { - finished = false - self.end() - } - } - - if (typeof boundary !== 'string') { throw new Error('Multipart: Boundary not found') } - - const fieldSizeLimit = getLimit(limits, 'fieldSize', 1 * 1024 * 1024) - const fileSizeLimit = getLimit(limits, 'fileSize', Infinity) - const filesLimit = getLimit(limits, 'files', Infinity) - const fieldsLimit = getLimit(limits, 'fields', Infinity) - const partsLimit = getLimit(limits, 'parts', Infinity) - const headerPairsLimit = getLimit(limits, 'headerPairs', 2000) - const headerSizeLimit = getLimit(limits, 'headerSize', 80 * 1024) - - let nfiles = 0 - let nfields = 0 - let nends = 0 - let curFile - let curField - let finished = false - - this._needDrain = false - this._pause = false - this._cb = undefined - this._nparts = 0 - this._boy = boy - - const parserCfg = { - boundary, - maxHeaderPairs: headerPairsLimit, - maxHeaderSize: headerSizeLimit, - partHwm: fileOpts.highWaterMark, - highWaterMark: cfg.highWaterMark - } - - this.parser = new Dicer(parserCfg) - this.parser.on('drain', function () { - self._needDrain = false - if (self._cb && !self._pause) { - const cb = self._cb - self._cb = undefined - cb() - } - }).on('part', function onPart (part) { - if (++self._nparts > partsLimit) { - self.parser.removeListener('part', onPart) - self.parser.on('part', skipPart) - boy.hitPartsLimit = true - boy.emit('partsLimit') - return skipPart(part) - } - - // hack because streams2 _always_ doesn't emit 'end' until nextTick, so let - // us emit 'end' early since we know the part has ended if we are already - // seeing the next part - if (curField) { - const field = curField - field.emit('end') - field.removeAllListeners('end') - } - - part.on('header', function (header) { - let contype - let fieldname - let parsed - let charset - let encoding - let filename - let nsize = 0 - - if (header['content-type']) { - parsed = parseParams(header['content-type'][0]) - if (parsed[0]) { - contype = parsed[0].toLowerCase() - for (i = 0, len = parsed.length; i < len; ++i) { - if (RE_CHARSET.test(parsed[i][0])) { - charset = parsed[i][1].toLowerCase() - break - } - } - } - } - - if (contype === undefined) { contype = 'text/plain' } - if (charset === undefined) { charset = defCharset } - - if (header['content-disposition']) { - parsed = parseParams(header['content-disposition'][0]) - if (!RE_FIELD.test(parsed[0])) { return skipPart(part) } - for (i = 0, len = parsed.length; i < len; ++i) { - if (RE_NAME.test(parsed[i][0])) { - fieldname = parsed[i][1] - } else if (RE_FILENAME.test(parsed[i][0])) { - filename = parsed[i][1] - if (!preservePath) { filename = basename(filename) } - } - } - } else { return skipPart(part) } - - if (header['content-transfer-encoding']) { encoding = header['content-transfer-encoding'][0].toLowerCase() } else { encoding = '7bit' } - - let onData, - onEnd - - if (isPartAFile(fieldname, contype, filename)) { - // file/binary field - if (nfiles === filesLimit) { - if (!boy.hitFilesLimit) { - boy.hitFilesLimit = true - boy.emit('filesLimit') - } - return skipPart(part) - } - - ++nfiles - - if (boy.listenerCount('file') === 0) { - self.parser._ignore() - return - } - - ++nends - const file = new FileStream(fileOpts) - curFile = file - file.on('end', function () { - --nends - self._pause = false - checkFinished() - if (self._cb && !self._needDrain) { - const cb = self._cb - self._cb = undefined - cb() - } - }) - file._read = function (n) { - if (!self._pause) { return } - self._pause = false - if (self._cb && !self._needDrain) { - const cb = self._cb - self._cb = undefined - cb() - } - } - boy.emit('file', fieldname, file, filename, encoding, contype) - - onData = function (data) { - if ((nsize += data.length) > fileSizeLimit) { - const extralen = fileSizeLimit - nsize + data.length - if (extralen > 0) { file.push(data.slice(0, extralen)) } - file.truncated = true - file.bytesRead = fileSizeLimit - part.removeAllListeners('data') - file.emit('limit') - return - } else if (!file.push(data)) { self._pause = true } - - file.bytesRead = nsize - } - - onEnd = function () { - curFile = undefined - file.push(null) - } - } else { - // non-file field - if (nfields === fieldsLimit) { - if (!boy.hitFieldsLimit) { - boy.hitFieldsLimit = true - boy.emit('fieldsLimit') - } - return skipPart(part) - } - - ++nfields - ++nends - let buffer = '' - let truncated = false - curField = part - - onData = function (data) { - if ((nsize += data.length) > fieldSizeLimit) { - const extralen = (fieldSizeLimit - (nsize - data.length)) - buffer += data.toString('binary', 0, extralen) - truncated = true - part.removeAllListeners('data') - } else { buffer += data.toString('binary') } - } - - onEnd = function () { - curField = undefined - if (buffer.length) { buffer = decodeText(buffer, 'binary', charset) } - boy.emit('field', fieldname, buffer, false, truncated, encoding, contype) - --nends - checkFinished() - } - } - - /* As of node@2efe4ab761666 (v0.10.29+/v0.11.14+), busboy had become - broken. Streams2/streams3 is a huge black box of confusion, but - somehow overriding the sync state seems to fix things again (and still - seems to work for previous node versions). - */ - part._readableState.sync = false - - part.on('data', onData) - part.on('end', onEnd) - }).on('error', function (err) { - if (curFile) { curFile.emit('error', err) } - }) - }).on('error', function (err) { - boy.emit('error', err) - }).on('finish', function () { - finished = true - checkFinished() - }) -} - -Multipart.prototype.write = function (chunk, cb) { - const r = this.parser.write(chunk) - if (r && !this._pause) { - cb() - } else { - this._needDrain = !r - this._cb = cb - } -} - -Multipart.prototype.end = function () { - const self = this - - if (self.parser.writable) { - self.parser.end() - } else if (!self._boy._done) { - process.nextTick(function () { - self._boy._done = true - self._boy.emit('finish') - }) - } -} - -function skipPart (part) { - part.resume() -} - -function FileStream (opts) { - Readable.call(this, opts) - - this.bytesRead = 0 - - this.truncated = false -} - -inherits(FileStream, Readable) - -FileStream.prototype._read = function (n) {} - -module.exports = Multipart diff --git a/node_modules/@fastify/busboy/lib/types/urlencoded.js b/node_modules/@fastify/busboy/lib/types/urlencoded.js deleted file mode 100644 index 6f5f784..0000000 --- a/node_modules/@fastify/busboy/lib/types/urlencoded.js +++ /dev/null @@ -1,190 +0,0 @@ -'use strict' - -const Decoder = require('../utils/Decoder') -const decodeText = require('../utils/decodeText') -const getLimit = require('../utils/getLimit') - -const RE_CHARSET = /^charset$/i - -UrlEncoded.detect = /^application\/x-www-form-urlencoded/i -function UrlEncoded (boy, cfg) { - const limits = cfg.limits - const parsedConType = cfg.parsedConType - this.boy = boy - - this.fieldSizeLimit = getLimit(limits, 'fieldSize', 1 * 1024 * 1024) - this.fieldNameSizeLimit = getLimit(limits, 'fieldNameSize', 100) - this.fieldsLimit = getLimit(limits, 'fields', Infinity) - - let charset - for (var i = 0, len = parsedConType.length; i < len; ++i) { // eslint-disable-line no-var - if (Array.isArray(parsedConType[i]) && - RE_CHARSET.test(parsedConType[i][0])) { - charset = parsedConType[i][1].toLowerCase() - break - } - } - - if (charset === undefined) { charset = cfg.defCharset || 'utf8' } - - this.decoder = new Decoder() - this.charset = charset - this._fields = 0 - this._state = 'key' - this._checkingBytes = true - this._bytesKey = 0 - this._bytesVal = 0 - this._key = '' - this._val = '' - this._keyTrunc = false - this._valTrunc = false - this._hitLimit = false -} - -UrlEncoded.prototype.write = function (data, cb) { - if (this._fields === this.fieldsLimit) { - if (!this.boy.hitFieldsLimit) { - this.boy.hitFieldsLimit = true - this.boy.emit('fieldsLimit') - } - return cb() - } - - let idxeq; let idxamp; let i; let p = 0; const len = data.length - - while (p < len) { - if (this._state === 'key') { - idxeq = idxamp = undefined - for (i = p; i < len; ++i) { - if (!this._checkingBytes) { ++p } - if (data[i] === 0x3D/* = */) { - idxeq = i - break - } else if (data[i] === 0x26/* & */) { - idxamp = i - break - } - if (this._checkingBytes && this._bytesKey === this.fieldNameSizeLimit) { - this._hitLimit = true - break - } else if (this._checkingBytes) { ++this._bytesKey } - } - - if (idxeq !== undefined) { - // key with assignment - if (idxeq > p) { this._key += this.decoder.write(data.toString('binary', p, idxeq)) } - this._state = 'val' - - this._hitLimit = false - this._checkingBytes = true - this._val = '' - this._bytesVal = 0 - this._valTrunc = false - this.decoder.reset() - - p = idxeq + 1 - } else if (idxamp !== undefined) { - // key with no assignment - ++this._fields - let key; const keyTrunc = this._keyTrunc - if (idxamp > p) { key = (this._key += this.decoder.write(data.toString('binary', p, idxamp))) } else { key = this._key } - - this._hitLimit = false - this._checkingBytes = true - this._key = '' - this._bytesKey = 0 - this._keyTrunc = false - this.decoder.reset() - - if (key.length) { - this.boy.emit('field', decodeText(key, 'binary', this.charset), - '', - keyTrunc, - false) - } - - p = idxamp + 1 - if (this._fields === this.fieldsLimit) { return cb() } - } else if (this._hitLimit) { - // we may not have hit the actual limit if there are encoded bytes... - if (i > p) { this._key += this.decoder.write(data.toString('binary', p, i)) } - p = i - if ((this._bytesKey = this._key.length) === this.fieldNameSizeLimit) { - // yep, we actually did hit the limit - this._checkingBytes = false - this._keyTrunc = true - } - } else { - if (p < len) { this._key += this.decoder.write(data.toString('binary', p)) } - p = len - } - } else { - idxamp = undefined - for (i = p; i < len; ++i) { - if (!this._checkingBytes) { ++p } - if (data[i] === 0x26/* & */) { - idxamp = i - break - } - if (this._checkingBytes && this._bytesVal === this.fieldSizeLimit) { - this._hitLimit = true - break - } else if (this._checkingBytes) { ++this._bytesVal } - } - - if (idxamp !== undefined) { - ++this._fields - if (idxamp > p) { this._val += this.decoder.write(data.toString('binary', p, idxamp)) } - this.boy.emit('field', decodeText(this._key, 'binary', this.charset), - decodeText(this._val, 'binary', this.charset), - this._keyTrunc, - this._valTrunc) - this._state = 'key' - - this._hitLimit = false - this._checkingBytes = true - this._key = '' - this._bytesKey = 0 - this._keyTrunc = false - this.decoder.reset() - - p = idxamp + 1 - if (this._fields === this.fieldsLimit) { return cb() } - } else if (this._hitLimit) { - // we may not have hit the actual limit if there are encoded bytes... - if (i > p) { this._val += this.decoder.write(data.toString('binary', p, i)) } - p = i - if ((this._val === '' && this.fieldSizeLimit === 0) || - (this._bytesVal = this._val.length) === this.fieldSizeLimit) { - // yep, we actually did hit the limit - this._checkingBytes = false - this._valTrunc = true - } - } else { - if (p < len) { this._val += this.decoder.write(data.toString('binary', p)) } - p = len - } - } - } - cb() -} - -UrlEncoded.prototype.end = function () { - if (this.boy._done) { return } - - if (this._state === 'key' && this._key.length > 0) { - this.boy.emit('field', decodeText(this._key, 'binary', this.charset), - '', - this._keyTrunc, - false) - } else if (this._state === 'val') { - this.boy.emit('field', decodeText(this._key, 'binary', this.charset), - decodeText(this._val, 'binary', this.charset), - this._keyTrunc, - this._valTrunc) - } - this.boy._done = true - this.boy.emit('finish') -} - -module.exports = UrlEncoded diff --git a/node_modules/@fastify/busboy/lib/utils/Decoder.js b/node_modules/@fastify/busboy/lib/utils/Decoder.js deleted file mode 100644 index 7917678..0000000 --- a/node_modules/@fastify/busboy/lib/utils/Decoder.js +++ /dev/null @@ -1,54 +0,0 @@ -'use strict' - -const RE_PLUS = /\+/g - -const HEX = [ - 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, - 0, 1, 1, 1, 1, 1, 1, 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, 1, 1, 1, 1, 1, 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 -] - -function Decoder () { - this.buffer = undefined -} -Decoder.prototype.write = function (str) { - // Replace '+' with ' ' before decoding - str = str.replace(RE_PLUS, ' ') - let res = '' - let i = 0; let p = 0; const len = str.length - for (; i < len; ++i) { - if (this.buffer !== undefined) { - if (!HEX[str.charCodeAt(i)]) { - res += '%' + this.buffer - this.buffer = undefined - --i // retry character - } else { - this.buffer += str[i] - ++p - if (this.buffer.length === 2) { - res += String.fromCharCode(parseInt(this.buffer, 16)) - this.buffer = undefined - } - } - } else if (str[i] === '%') { - if (i > p) { - res += str.substring(p, i) - p = i - } - this.buffer = '' - ++p - } - } - if (p < len && this.buffer === undefined) { res += str.substring(p) } - return res -} -Decoder.prototype.reset = function () { - this.buffer = undefined -} - -module.exports = Decoder diff --git a/node_modules/@fastify/busboy/lib/utils/basename.js b/node_modules/@fastify/busboy/lib/utils/basename.js deleted file mode 100644 index db58819..0000000 --- a/node_modules/@fastify/busboy/lib/utils/basename.js +++ /dev/null @@ -1,14 +0,0 @@ -'use strict' - -module.exports = function basename (path) { - if (typeof path !== 'string') { return '' } - for (var i = path.length - 1; i >= 0; --i) { // eslint-disable-line no-var - switch (path.charCodeAt(i)) { - case 0x2F: // '/' - case 0x5C: // '\' - path = path.slice(i + 1) - return (path === '..' || path === '.' ? '' : path) - } - } - return (path === '..' || path === '.' ? '' : path) -} diff --git a/node_modules/@fastify/busboy/lib/utils/decodeText.js b/node_modules/@fastify/busboy/lib/utils/decodeText.js deleted file mode 100644 index eac7d35..0000000 --- a/node_modules/@fastify/busboy/lib/utils/decodeText.js +++ /dev/null @@ -1,114 +0,0 @@ -'use strict' - -// Node has always utf-8 -const utf8Decoder = new TextDecoder('utf-8') -const textDecoders = new Map([ - ['utf-8', utf8Decoder], - ['utf8', utf8Decoder] -]) - -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, sourceEncoding) => { - if (data.length === 0) { - return '' - } - if (typeof data === 'string') { - data = Buffer.from(data, sourceEncoding) - } - return data.utf8Slice(0, data.length) - }, - - latin1: (data, sourceEncoding) => { - if (data.length === 0) { - return '' - } - if (typeof data === 'string') { - return data - } - return data.latin1Slice(0, data.length) - }, - - utf16le: (data, sourceEncoding) => { - if (data.length === 0) { - return '' - } - if (typeof data === 'string') { - data = Buffer.from(data, sourceEncoding) - } - return data.ucs2Slice(0, data.length) - }, - - base64: (data, sourceEncoding) => { - if (data.length === 0) { - return '' - } - if (typeof data === 'string') { - data = Buffer.from(data, sourceEncoding) - } - return data.base64Slice(0, data.length) - }, - - other: (data, sourceEncoding) => { - if (data.length === 0) { - return '' - } - if (typeof data === 'string') { - data = Buffer.from(data, sourceEncoding) - } - - if (textDecoders.has(this.toString())) { - try { - return textDecoders.get(this).decode(data) - } catch {} - } - return typeof data === 'string' - ? data - : data.toString() - } -} - -function decodeText (text, sourceEncoding, destEncoding) { - if (text) { - return getDecoder(destEncoding)(text, sourceEncoding) - } - return text -} - -module.exports = decodeText diff --git a/node_modules/@fastify/busboy/lib/utils/getLimit.js b/node_modules/@fastify/busboy/lib/utils/getLimit.js deleted file mode 100644 index cb64fd6..0000000 --- a/node_modules/@fastify/busboy/lib/utils/getLimit.js +++ /dev/null @@ -1,16 +0,0 @@ -'use strict' - -module.exports = function getLimit (limits, name, defaultLimit) { - if ( - !limits || - limits[name] === undefined || - limits[name] === null - ) { return defaultLimit } - - if ( - typeof limits[name] !== 'number' || - isNaN(limits[name]) - ) { throw new TypeError('Limit ' + name + ' is not a valid number') } - - return limits[name] -} diff --git a/node_modules/@fastify/busboy/lib/utils/parseParams.js b/node_modules/@fastify/busboy/lib/utils/parseParams.js deleted file mode 100644 index 1698e62..0000000 --- a/node_modules/@fastify/busboy/lib/utils/parseParams.js +++ /dev/null @@ -1,196 +0,0 @@ -/* eslint-disable object-property-newline */ -'use strict' - -const decodeText = require('./decodeText') - -const RE_ENCODED = /%[a-fA-F0-9][a-fA-F0-9]/g - -const EncodedLookup = { - '%00': '\x00', '%01': '\x01', '%02': '\x02', '%03': '\x03', '%04': '\x04', - '%05': '\x05', '%06': '\x06', '%07': '\x07', '%08': '\x08', '%09': '\x09', - '%0a': '\x0a', '%0A': '\x0a', '%0b': '\x0b', '%0B': '\x0b', '%0c': '\x0c', - '%0C': '\x0c', '%0d': '\x0d', '%0D': '\x0d', '%0e': '\x0e', '%0E': '\x0e', - '%0f': '\x0f', '%0F': '\x0f', '%10': '\x10', '%11': '\x11', '%12': '\x12', - '%13': '\x13', '%14': '\x14', '%15': '\x15', '%16': '\x16', '%17': '\x17', - '%18': '\x18', '%19': '\x19', '%1a': '\x1a', '%1A': '\x1a', '%1b': '\x1b', - '%1B': '\x1b', '%1c': '\x1c', '%1C': '\x1c', '%1d': '\x1d', '%1D': '\x1d', - '%1e': '\x1e', '%1E': '\x1e', '%1f': '\x1f', '%1F': '\x1f', '%20': '\x20', - '%21': '\x21', '%22': '\x22', '%23': '\x23', '%24': '\x24', '%25': '\x25', - '%26': '\x26', '%27': '\x27', '%28': '\x28', '%29': '\x29', '%2a': '\x2a', - '%2A': '\x2a', '%2b': '\x2b', '%2B': '\x2b', '%2c': '\x2c', '%2C': '\x2c', - '%2d': '\x2d', '%2D': '\x2d', '%2e': '\x2e', '%2E': '\x2e', '%2f': '\x2f', - '%2F': '\x2f', '%30': '\x30', '%31': '\x31', '%32': '\x32', '%33': '\x33', - '%34': '\x34', '%35': '\x35', '%36': '\x36', '%37': '\x37', '%38': '\x38', - '%39': '\x39', '%3a': '\x3a', '%3A': '\x3a', '%3b': '\x3b', '%3B': '\x3b', - '%3c': '\x3c', '%3C': '\x3c', '%3d': '\x3d', '%3D': '\x3d', '%3e': '\x3e', - '%3E': '\x3e', '%3f': '\x3f', '%3F': '\x3f', '%40': '\x40', '%41': '\x41', - '%42': '\x42', '%43': '\x43', '%44': '\x44', '%45': '\x45', '%46': '\x46', - '%47': '\x47', '%48': '\x48', '%49': '\x49', '%4a': '\x4a', '%4A': '\x4a', - '%4b': '\x4b', '%4B': '\x4b', '%4c': '\x4c', '%4C': '\x4c', '%4d': '\x4d', - '%4D': '\x4d', '%4e': '\x4e', '%4E': '\x4e', '%4f': '\x4f', '%4F': '\x4f', - '%50': '\x50', '%51': '\x51', '%52': '\x52', '%53': '\x53', '%54': '\x54', - '%55': '\x55', '%56': '\x56', '%57': '\x57', '%58': '\x58', '%59': '\x59', - '%5a': '\x5a', '%5A': '\x5a', '%5b': '\x5b', '%5B': '\x5b', '%5c': '\x5c', - '%5C': '\x5c', '%5d': '\x5d', '%5D': '\x5d', '%5e': '\x5e', '%5E': '\x5e', - '%5f': '\x5f', '%5F': '\x5f', '%60': '\x60', '%61': '\x61', '%62': '\x62', - '%63': '\x63', '%64': '\x64', '%65': '\x65', '%66': '\x66', '%67': '\x67', - '%68': '\x68', '%69': '\x69', '%6a': '\x6a', '%6A': '\x6a', '%6b': '\x6b', - '%6B': '\x6b', '%6c': '\x6c', '%6C': '\x6c', '%6d': '\x6d', '%6D': '\x6d', - '%6e': '\x6e', '%6E': '\x6e', '%6f': '\x6f', '%6F': '\x6f', '%70': '\x70', - '%71': '\x71', '%72': '\x72', '%73': '\x73', '%74': '\x74', '%75': '\x75', - '%76': '\x76', '%77': '\x77', '%78': '\x78', '%79': '\x79', '%7a': '\x7a', - '%7A': '\x7a', '%7b': '\x7b', '%7B': '\x7b', '%7c': '\x7c', '%7C': '\x7c', - '%7d': '\x7d', '%7D': '\x7d', '%7e': '\x7e', '%7E': '\x7e', '%7f': '\x7f', - '%7F': '\x7f', '%80': '\x80', '%81': '\x81', '%82': '\x82', '%83': '\x83', - '%84': '\x84', '%85': '\x85', '%86': '\x86', '%87': '\x87', '%88': '\x88', - '%89': '\x89', '%8a': '\x8a', '%8A': '\x8a', '%8b': '\x8b', '%8B': '\x8b', - '%8c': '\x8c', '%8C': '\x8c', '%8d': '\x8d', '%8D': '\x8d', '%8e': '\x8e', - '%8E': '\x8e', '%8f': '\x8f', '%8F': '\x8f', '%90': '\x90', '%91': '\x91', - '%92': '\x92', '%93': '\x93', '%94': '\x94', '%95': '\x95', '%96': '\x96', - '%97': '\x97', '%98': '\x98', '%99': '\x99', '%9a': '\x9a', '%9A': '\x9a', - '%9b': '\x9b', '%9B': '\x9b', '%9c': '\x9c', '%9C': '\x9c', '%9d': '\x9d', - '%9D': '\x9d', '%9e': '\x9e', '%9E': '\x9e', '%9f': '\x9f', '%9F': '\x9f', - '%a0': '\xa0', '%A0': '\xa0', '%a1': '\xa1', '%A1': '\xa1', '%a2': '\xa2', - '%A2': '\xa2', '%a3': '\xa3', '%A3': '\xa3', '%a4': '\xa4', '%A4': '\xa4', - '%a5': '\xa5', '%A5': '\xa5', '%a6': '\xa6', '%A6': '\xa6', '%a7': '\xa7', - '%A7': '\xa7', '%a8': '\xa8', '%A8': '\xa8', '%a9': '\xa9', '%A9': '\xa9', - '%aa': '\xaa', '%Aa': '\xaa', '%aA': '\xaa', '%AA': '\xaa', '%ab': '\xab', - '%Ab': '\xab', '%aB': '\xab', '%AB': '\xab', '%ac': '\xac', '%Ac': '\xac', - '%aC': '\xac', '%AC': '\xac', '%ad': '\xad', '%Ad': '\xad', '%aD': '\xad', - '%AD': '\xad', '%ae': '\xae', '%Ae': '\xae', '%aE': '\xae', '%AE': '\xae', - '%af': '\xaf', '%Af': '\xaf', '%aF': '\xaf', '%AF': '\xaf', '%b0': '\xb0', - '%B0': '\xb0', '%b1': '\xb1', '%B1': '\xb1', '%b2': '\xb2', '%B2': '\xb2', - '%b3': '\xb3', '%B3': '\xb3', '%b4': '\xb4', '%B4': '\xb4', '%b5': '\xb5', - '%B5': '\xb5', '%b6': '\xb6', '%B6': '\xb6', '%b7': '\xb7', '%B7': '\xb7', - '%b8': '\xb8', '%B8': '\xb8', '%b9': '\xb9', '%B9': '\xb9', '%ba': '\xba', - '%Ba': '\xba', '%bA': '\xba', '%BA': '\xba', '%bb': '\xbb', '%Bb': '\xbb', - '%bB': '\xbb', '%BB': '\xbb', '%bc': '\xbc', '%Bc': '\xbc', '%bC': '\xbc', - '%BC': '\xbc', '%bd': '\xbd', '%Bd': '\xbd', '%bD': '\xbd', '%BD': '\xbd', - '%be': '\xbe', '%Be': '\xbe', '%bE': '\xbe', '%BE': '\xbe', '%bf': '\xbf', - '%Bf': '\xbf', '%bF': '\xbf', '%BF': '\xbf', '%c0': '\xc0', '%C0': '\xc0', - '%c1': '\xc1', '%C1': '\xc1', '%c2': '\xc2', '%C2': '\xc2', '%c3': '\xc3', - '%C3': '\xc3', '%c4': '\xc4', '%C4': '\xc4', '%c5': '\xc5', '%C5': '\xc5', - '%c6': '\xc6', '%C6': '\xc6', '%c7': '\xc7', '%C7': '\xc7', '%c8': '\xc8', - '%C8': '\xc8', '%c9': '\xc9', '%C9': '\xc9', '%ca': '\xca', '%Ca': '\xca', - '%cA': '\xca', '%CA': '\xca', '%cb': '\xcb', '%Cb': '\xcb', '%cB': '\xcb', - '%CB': '\xcb', '%cc': '\xcc', '%Cc': '\xcc', '%cC': '\xcc', '%CC': '\xcc', - '%cd': '\xcd', '%Cd': '\xcd', '%cD': '\xcd', '%CD': '\xcd', '%ce': '\xce', - '%Ce': '\xce', '%cE': '\xce', '%CE': '\xce', '%cf': '\xcf', '%Cf': '\xcf', - '%cF': '\xcf', '%CF': '\xcf', '%d0': '\xd0', '%D0': '\xd0', '%d1': '\xd1', - '%D1': '\xd1', '%d2': '\xd2', '%D2': '\xd2', '%d3': '\xd3', '%D3': '\xd3', - '%d4': '\xd4', '%D4': '\xd4', '%d5': '\xd5', '%D5': '\xd5', '%d6': '\xd6', - '%D6': '\xd6', '%d7': '\xd7', '%D7': '\xd7', '%d8': '\xd8', '%D8': '\xd8', - '%d9': '\xd9', '%D9': '\xd9', '%da': '\xda', '%Da': '\xda', '%dA': '\xda', - '%DA': '\xda', '%db': '\xdb', '%Db': '\xdb', '%dB': '\xdb', '%DB': '\xdb', - '%dc': '\xdc', '%Dc': '\xdc', '%dC': '\xdc', '%DC': '\xdc', '%dd': '\xdd', - '%Dd': '\xdd', '%dD': '\xdd', '%DD': '\xdd', '%de': '\xde', '%De': '\xde', - '%dE': '\xde', '%DE': '\xde', '%df': '\xdf', '%Df': '\xdf', '%dF': '\xdf', - '%DF': '\xdf', '%e0': '\xe0', '%E0': '\xe0', '%e1': '\xe1', '%E1': '\xe1', - '%e2': '\xe2', '%E2': '\xe2', '%e3': '\xe3', '%E3': '\xe3', '%e4': '\xe4', - '%E4': '\xe4', '%e5': '\xe5', '%E5': '\xe5', '%e6': '\xe6', '%E6': '\xe6', - '%e7': '\xe7', '%E7': '\xe7', '%e8': '\xe8', '%E8': '\xe8', '%e9': '\xe9', - '%E9': '\xe9', '%ea': '\xea', '%Ea': '\xea', '%eA': '\xea', '%EA': '\xea', - '%eb': '\xeb', '%Eb': '\xeb', '%eB': '\xeb', '%EB': '\xeb', '%ec': '\xec', - '%Ec': '\xec', '%eC': '\xec', '%EC': '\xec', '%ed': '\xed', '%Ed': '\xed', - '%eD': '\xed', '%ED': '\xed', '%ee': '\xee', '%Ee': '\xee', '%eE': '\xee', - '%EE': '\xee', '%ef': '\xef', '%Ef': '\xef', '%eF': '\xef', '%EF': '\xef', - '%f0': '\xf0', '%F0': '\xf0', '%f1': '\xf1', '%F1': '\xf1', '%f2': '\xf2', - '%F2': '\xf2', '%f3': '\xf3', '%F3': '\xf3', '%f4': '\xf4', '%F4': '\xf4', - '%f5': '\xf5', '%F5': '\xf5', '%f6': '\xf6', '%F6': '\xf6', '%f7': '\xf7', - '%F7': '\xf7', '%f8': '\xf8', '%F8': '\xf8', '%f9': '\xf9', '%F9': '\xf9', - '%fa': '\xfa', '%Fa': '\xfa', '%fA': '\xfa', '%FA': '\xfa', '%fb': '\xfb', - '%Fb': '\xfb', '%fB': '\xfb', '%FB': '\xfb', '%fc': '\xfc', '%Fc': '\xfc', - '%fC': '\xfc', '%FC': '\xfc', '%fd': '\xfd', '%Fd': '\xfd', '%fD': '\xfd', - '%FD': '\xfd', '%fe': '\xfe', '%Fe': '\xfe', '%fE': '\xfe', '%FE': '\xfe', - '%ff': '\xff', '%Ff': '\xff', '%fF': '\xff', '%FF': '\xff' -} - -function encodedReplacer (match) { - return EncodedLookup[match] -} - -const STATE_KEY = 0 -const STATE_VALUE = 1 -const STATE_CHARSET = 2 -const STATE_LANG = 3 - -function parseParams (str) { - const res = [] - let state = STATE_KEY - let charset = '' - let inquote = false - let escaping = false - let p = 0 - let tmp = '' - const len = str.length - - for (var i = 0; i < len; ++i) { // eslint-disable-line no-var - const char = str[i] - if (char === '\\' && inquote) { - if (escaping) { escaping = false } else { - escaping = true - continue - } - } else if (char === '"') { - if (!escaping) { - if (inquote) { - inquote = false - state = STATE_KEY - } else { inquote = true } - continue - } else { escaping = false } - } else { - if (escaping && inquote) { tmp += '\\' } - escaping = false - if ((state === STATE_CHARSET || state === STATE_LANG) && char === "'") { - if (state === STATE_CHARSET) { - state = STATE_LANG - charset = tmp.substring(1) - } else { state = STATE_VALUE } - tmp = '' - continue - } else if (state === STATE_KEY && - (char === '*' || char === '=') && - res.length) { - state = char === '*' - ? STATE_CHARSET - : STATE_VALUE - res[p] = [tmp, undefined] - tmp = '' - continue - } else if (!inquote && char === ';') { - state = STATE_KEY - if (charset) { - if (tmp.length) { - tmp = decodeText(tmp.replace(RE_ENCODED, encodedReplacer), - 'binary', - charset) - } - charset = '' - } else if (tmp.length) { - tmp = decodeText(tmp, 'binary', 'utf8') - } - if (res[p] === undefined) { res[p] = tmp } else { res[p][1] = tmp } - tmp = '' - ++p - continue - } else if (!inquote && (char === ' ' || char === '\t')) { continue } - } - tmp += char - } - if (charset && tmp.length) { - tmp = decodeText(tmp.replace(RE_ENCODED, encodedReplacer), - 'binary', - charset) - } else if (tmp) { - tmp = decodeText(tmp, 'binary', 'utf8') - } - - if (res[p] === undefined) { - if (tmp) { res[p] = tmp } - } else { res[p][1] = tmp } - - return res -} - -module.exports = parseParams diff --git a/node_modules/@fastify/busboy/package.json b/node_modules/@fastify/busboy/package.json deleted file mode 100644 index 83693ac..0000000 --- a/node_modules/@fastify/busboy/package.json +++ /dev/null @@ -1,86 +0,0 @@ -{ - "name": "@fastify/busboy", - "version": "2.1.1", - "private": false, - "author": "Brian White <mscdex@mscdex.net>", - "contributors": [ - { - "name": "Igor Savin", - "email": "kibertoad@gmail.com", - "url": "https://github.com/kibertoad" - }, - { - "name": "Aras Abbasi", - "email": "aras.abbasi@gmail.com", - "url": "https://github.com/uzlopak" - } - ], - "description": "A streaming parser for HTML form data for node.js", - "main": "lib/main", - "type": "commonjs", - "types": "lib/main.d.ts", - "scripts": { - "bench:busboy": "cd benchmarks && npm install && npm run benchmark-fastify", - "bench:dicer": "node bench/dicer/dicer-bench-multipart-parser.js", - "coveralls": "nyc report --reporter=lcov", - "lint": "npm run lint:standard", - "lint:everything": "npm run lint && npm run test:types", - "lint:fix": "standard --fix", - "lint:standard": "standard --verbose | snazzy", - "test:mocha": "tap", - "test:types": "tsd", - "test:coverage": "nyc npm run test", - "test": "npm run test:mocha" - }, - "engines": { - "node": ">=14" - }, - "devDependencies": { - "@types/node": "^20.1.0", - "busboy": "^1.0.0", - "photofinish": "^1.8.0", - "snazzy": "^9.0.0", - "standard": "^17.0.0", - "tap": "^16.3.8", - "tinybench": "^2.5.1", - "tsd": "^0.30.0", - "typescript": "^5.0.2" - }, - "keywords": [ - "uploads", - "forms", - "multipart", - "form-data" - ], - "license": "MIT", - "repository": { - "type": "git", - "url": "git+https://github.com/fastify/busboy.git" - }, - "tsd": { - "directory": "test/types", - "compilerOptions": { - "esModuleInterop": false, - "module": "commonjs", - "target": "ES2017" - } - }, - "standard": { - "globals": [ - "describe", - "it" - ], - "ignore": [ - "bench" - ] - }, - "files": [ - "README.md", - "LICENSE", - "lib/*", - "deps/encoding/*", - "deps/dicer/lib", - "deps/streamsearch/", - "deps/dicer/LICENSE" - ] -} diff --git a/node_modules/anymatch/index.d.ts b/node_modules/anymatch/index.d.ts deleted file mode 100644 index 3ef7eaa..0000000 --- a/node_modules/anymatch/index.d.ts +++ /dev/null @@ -1,20 +0,0 @@ -type AnymatchFn = (testString: string) => boolean; -type AnymatchPattern = string|RegExp|AnymatchFn; -type AnymatchMatcher = AnymatchPattern|AnymatchPattern[] -type AnymatchTester = { - (testString: string|any[], returnIndex: true): number; - (testString: string|any[]): boolean; -} - -type PicomatchOptions = {dot: boolean}; - -declare const anymatch: { - (matchers: AnymatchMatcher): AnymatchTester; - (matchers: AnymatchMatcher, testString: null, returnIndex: true | PicomatchOptions): AnymatchTester; - (matchers: AnymatchMatcher, testString: string|any[], returnIndex: true | PicomatchOptions): number; - (matchers: AnymatchMatcher, testString: string|any[]): boolean; -} - -export {AnymatchMatcher as Matcher} -export {AnymatchTester as Tester} -export default anymatch diff --git a/node_modules/anymatch/index.js b/node_modules/anymatch/index.js deleted file mode 100644 index 8eb73e9..0000000 --- a/node_modules/anymatch/index.js +++ /dev/null @@ -1,104 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { value: true }); - -const picomatch = require('picomatch'); -const normalizePath = require('normalize-path'); - -/** - * @typedef {(testString: string) => boolean} AnymatchFn - * @typedef {string|RegExp|AnymatchFn} AnymatchPattern - * @typedef {AnymatchPattern|AnymatchPattern[]} AnymatchMatcher - */ -const BANG = '!'; -const DEFAULT_OPTIONS = {returnIndex: false}; -const arrify = (item) => Array.isArray(item) ? item : [item]; - -/** - * @param {AnymatchPattern} matcher - * @param {object} options - * @returns {AnymatchFn} - */ -const createPattern = (matcher, options) => { - if (typeof matcher === 'function') { - return matcher; - } - if (typeof matcher === 'string') { - const glob = picomatch(matcher, options); - return (string) => matcher === string || glob(string); - } - if (matcher instanceof RegExp) { - return (string) => matcher.test(string); - } - return (string) => false; -}; - -/** - * @param {Array<Function>} patterns - * @param {Array<Function>} negPatterns - * @param {String|Array} args - * @param {Boolean} returnIndex - * @returns {boolean|number} - */ -const matchPatterns = (patterns, negPatterns, args, returnIndex) => { - const isList = Array.isArray(args); - const _path = isList ? args[0] : args; - if (!isList && typeof _path !== 'string') { - throw new TypeError('anymatch: second argument must be a string: got ' + - Object.prototype.toString.call(_path)) - } - const path = normalizePath(_path, false); - - for (let index = 0; index < negPatterns.length; index++) { - const nglob = negPatterns[index]; - if (nglob(path)) { - return returnIndex ? -1 : false; - } - } - - const applied = isList && [path].concat(args.slice(1)); - for (let index = 0; index < patterns.length; index++) { - const pattern = patterns[index]; - if (isList ? pattern(...applied) : pattern(path)) { - return returnIndex ? index : true; - } - } - - return returnIndex ? -1 : false; -}; - -/** - * @param {AnymatchMatcher} matchers - * @param {Array|string} testString - * @param {object} options - * @returns {boolean|number|Function} - */ -const anymatch = (matchers, testString, options = DEFAULT_OPTIONS) => { - if (matchers == null) { - throw new TypeError('anymatch: specify first argument'); - } - const opts = typeof options === 'boolean' ? {returnIndex: options} : options; - const returnIndex = opts.returnIndex || false; - - // Early cache for matchers. - const mtchers = arrify(matchers); - const negatedGlobs = mtchers - .filter(item => typeof item === 'string' && item.charAt(0) === BANG) - .map(item => item.slice(1)) - .map(item => picomatch(item, opts)); - const patterns = mtchers - .filter(item => typeof item !== 'string' || (typeof item === 'string' && item.charAt(0) !== BANG)) - .map(matcher => createPattern(matcher, opts)); - - if (testString == null) { - return (testString, ri = false) => { - const returnIndex = typeof ri === 'boolean' ? ri : false; - return matchPatterns(patterns, negatedGlobs, testString, returnIndex); - } - } - - return matchPatterns(patterns, negatedGlobs, testString, returnIndex); -}; - -anymatch.default = anymatch; -module.exports = anymatch; diff --git a/node_modules/anymatch/package.json b/node_modules/anymatch/package.json deleted file mode 100644 index 2cb2307..0000000 --- a/node_modules/anymatch/package.json +++ /dev/null @@ -1,48 +0,0 @@ -{ - "name": "anymatch", - "version": "3.1.3", - "description": "Matches strings against configurable strings, globs, regular expressions, and/or functions", - "files": [ - "index.js", - "index.d.ts" - ], - "dependencies": { - "normalize-path": "^3.0.0", - "picomatch": "^2.0.4" - }, - "author": { - "name": "Elan Shanker", - "url": "https://github.com/es128" - }, - "license": "ISC", - "homepage": "https://github.com/micromatch/anymatch", - "repository": { - "type": "git", - "url": "https://github.com/micromatch/anymatch" - }, - "keywords": [ - "match", - "any", - "string", - "file", - "fs", - "list", - "glob", - "regex", - "regexp", - "regular", - "expression", - "function" - ], - "scripts": { - "test": "nyc mocha", - "mocha": "mocha" - }, - "devDependencies": { - "mocha": "^6.1.3", - "nyc": "^14.0.0" - }, - "engines": { - "node": ">= 8" - } -} diff --git a/node_modules/binary-extensions/binary-extensions.json b/node_modules/binary-extensions/binary-extensions.json deleted file mode 100644 index ac08048..0000000 --- a/node_modules/binary-extensions/binary-extensions.json +++ /dev/null @@ -1,263 +0,0 @@ -[ - "3dm", - "3ds", - "3g2", - "3gp", - "7z", - "a", - "aac", - "adp", - "afdesign", - "afphoto", - "afpub", - "ai", - "aif", - "aiff", - "alz", - "ape", - "apk", - "appimage", - "ar", - "arj", - "asf", - "au", - "avi", - "bak", - "baml", - "bh", - "bin", - "bk", - "bmp", - "btif", - "bz2", - "bzip2", - "cab", - "caf", - "cgm", - "class", - "cmx", - "cpio", - "cr2", - "cur", - "dat", - "dcm", - "deb", - "dex", - "djvu", - "dll", - "dmg", - "dng", - "doc", - "docm", - "docx", - "dot", - "dotm", - "dra", - "DS_Store", - "dsk", - "dts", - "dtshd", - "dvb", - "dwg", - "dxf", - "ecelp4800", - "ecelp7470", - "ecelp9600", - "egg", - "eol", - "eot", - "epub", - "exe", - "f4v", - "fbs", - "fh", - "fla", - "flac", - "flatpak", - "fli", - "flv", - "fpx", - "fst", - "fvt", - "g3", - "gh", - "gif", - "graffle", - "gz", - "gzip", - "h261", - "h263", - "h264", - "icns", - "ico", - "ief", - "img", - "ipa", - "iso", - "jar", - "jpeg", - "jpg", - "jpgv", - "jpm", - "jxr", - "key", - "ktx", - "lha", - "lib", - "lvp", - "lz", - "lzh", - "lzma", - "lzo", - "m3u", - "m4a", - "m4v", - "mar", - "mdi", - "mht", - "mid", - "midi", - "mj2", - "mka", - "mkv", - "mmr", - "mng", - "mobi", - "mov", - "movie", - "mp3", - "mp4", - "mp4a", - "mpeg", - "mpg", - "mpga", - "mxu", - "nef", - "npx", - "numbers", - "nupkg", - "o", - "odp", - "ods", - "odt", - "oga", - "ogg", - "ogv", - "otf", - "ott", - "pages", - "pbm", - "pcx", - "pdb", - "pdf", - "pea", - "pgm", - "pic", - "png", - "pnm", - "pot", - "potm", - "potx", - "ppa", - "ppam", - "ppm", - "pps", - "ppsm", - "ppsx", - "ppt", - "pptm", - "pptx", - "psd", - "pya", - "pyc", - "pyo", - "pyv", - "qt", - "rar", - "ras", - "raw", - "resources", - "rgb", - "rip", - "rlc", - "rmf", - "rmvb", - "rpm", - "rtf", - "rz", - "s3m", - "s7z", - "scpt", - "sgi", - "shar", - "snap", - "sil", - "sketch", - "slk", - "smv", - "snk", - "so", - "stl", - "suo", - "sub", - "swf", - "tar", - "tbz", - "tbz2", - "tga", - "tgz", - "thmx", - "tif", - "tiff", - "tlz", - "ttc", - "ttf", - "txz", - "udf", - "uvh", - "uvi", - "uvm", - "uvp", - "uvs", - "uvu", - "viv", - "vob", - "war", - "wav", - "wax", - "wbmp", - "wdp", - "weba", - "webm", - "webp", - "whl", - "wim", - "wm", - "wma", - "wmv", - "wmx", - "woff", - "woff2", - "wrm", - "wvx", - "xbm", - "xif", - "xla", - "xlam", - "xls", - "xlsb", - "xlsm", - "xlsx", - "xlt", - "xltm", - "xltx", - "xm", - "xmind", - "xpi", - "xpm", - "xwd", - "xz", - "z", - "zip", - "zipx" -] diff --git a/node_modules/binary-extensions/binary-extensions.json.d.ts b/node_modules/binary-extensions/binary-extensions.json.d.ts deleted file mode 100644 index 94a248c..0000000 --- a/node_modules/binary-extensions/binary-extensions.json.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -declare const binaryExtensionsJson: readonly string[]; - -export = binaryExtensionsJson; diff --git a/node_modules/binary-extensions/index.d.ts b/node_modules/binary-extensions/index.d.ts deleted file mode 100644 index f469ac5..0000000 --- a/node_modules/binary-extensions/index.d.ts +++ /dev/null @@ -1,14 +0,0 @@ -/** -List of binary file extensions. - -@example -``` -import binaryExtensions = require('binary-extensions'); - -console.log(binaryExtensions); -//=> ['3ds', '3g2', …] -``` -*/ -declare const binaryExtensions: readonly string[]; - -export = binaryExtensions; diff --git a/node_modules/binary-extensions/index.js b/node_modules/binary-extensions/index.js deleted file mode 100644 index d46e468..0000000 --- a/node_modules/binary-extensions/index.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./binary-extensions.json'); diff --git a/node_modules/binary-extensions/package.json b/node_modules/binary-extensions/package.json deleted file mode 100644 index 4710c33..0000000 --- a/node_modules/binary-extensions/package.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "name": "binary-extensions", - "version": "2.3.0", - "description": "List of binary file extensions", - "license": "MIT", - "repository": "sindresorhus/binary-extensions", - "funding": "https://github.com/sponsors/sindresorhus", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "https://sindresorhus.com" - }, - "sideEffects": false, - "engines": { - "node": ">=8" - }, - "scripts": { - "test": "xo && ava && tsd" - }, - "files": [ - "index.js", - "index.d.ts", - "binary-extensions.json", - "binary-extensions.json.d.ts" - ], - "keywords": [ - "binary", - "extensions", - "extension", - "file", - "json", - "list", - "array" - ], - "devDependencies": { - "ava": "^1.4.1", - "tsd": "^0.7.2", - "xo": "^0.24.0" - } -} diff --git a/node_modules/body-parser/index.js b/node_modules/body-parser/index.js index bb24d73..d722d0b 100644 --- a/node_modules/body-parser/index.js +++ b/node_modules/body-parser/index.js @@ -6,20 +6,6 @@ 'use strict' -/** - * Module dependencies. - * @private - */ - -var deprecate = require('depd')('body-parser') - -/** - * Cache of loaded parsers. - * @private - */ - -var parsers = Object.create(null) - /** * @typedef Parsers * @type {function} @@ -34,8 +20,7 @@ var parsers = Object.create(null) * @type {Parsers} */ -exports = module.exports = deprecate.function(bodyParser, - 'bodyParser: use individual json/urlencoded middlewares') +exports = module.exports = bodyParser /** * JSON parser. @@ -45,7 +30,7 @@ exports = module.exports = deprecate.function(bodyParser, Object.defineProperty(exports, 'json', { configurable: true, enumerable: true, - get: createParserGetter('json') + get: () => require('./lib/types/json') }) /** @@ -56,7 +41,7 @@ Object.defineProperty(exports, 'json', { Object.defineProperty(exports, 'raw', { configurable: true, enumerable: true, - get: createParserGetter('raw') + get: () => require('./lib/types/raw') }) /** @@ -67,7 +52,7 @@ Object.defineProperty(exports, 'raw', { Object.defineProperty(exports, 'text', { configurable: true, enumerable: true, - get: createParserGetter('text') + get: () => require('./lib/types/text') }) /** @@ -78,7 +63,7 @@ Object.defineProperty(exports, 'text', { Object.defineProperty(exports, 'urlencoded', { configurable: true, enumerable: true, - get: createParserGetter('urlencoded') + get: () => require('./lib/types/urlencoded') }) /** @@ -90,67 +75,6 @@ Object.defineProperty(exports, 'urlencoded', { * @public */ -function bodyParser (options) { - // use default type for parsers - var opts = Object.create(options || null, { - type: { - configurable: true, - enumerable: true, - value: undefined, - writable: true - } - }) - - var _urlencoded = exports.urlencoded(opts) - var _json = exports.json(opts) - - return function bodyParser (req, res, next) { - _json(req, res, function (err) { - if (err) return next(err) - _urlencoded(req, res, next) - }) - } -} - -/** - * Create a getter for loading a parser. - * @private - */ - -function createParserGetter (name) { - return function get () { - return loadParser(name) - } -} - -/** - * Load a parser module. - * @private - */ - -function loadParser (parserName) { - var parser = parsers[parserName] - - if (parser !== undefined) { - return parser - } - - // this uses a switch for static require analysis - switch (parserName) { - case 'json': - parser = require('./lib/types/json') - break - case 'raw': - parser = require('./lib/types/raw') - break - case 'text': - parser = require('./lib/types/text') - break - case 'urlencoded': - parser = require('./lib/types/urlencoded') - break - } - - // store to prevent invoking require() - return (parsers[parserName] = parser) +function bodyParser () { + throw new Error('The bodyParser() generic has been split into individual middleware to use instead.') } diff --git a/node_modules/body-parser/lib/read.js b/node_modules/body-parser/lib/read.js index fce6283..eee8b11 100644 --- a/node_modules/body-parser/lib/read.js +++ b/node_modules/body-parser/lib/read.js @@ -12,12 +12,10 @@ */ var createError = require('http-errors') -var destroy = require('destroy') var getBody = require('raw-body') var iconv = require('iconv-lite') var onFinished = require('on-finished') -var unpipe = require('unpipe') -var zlib = require('zlib') +var zlib = require('node:zlib') /** * Module exports. @@ -42,9 +40,6 @@ function read (req, res, next, parse, debug, options) { var opts = options var stream - // flag as parsed - req._body = true - // read options var encoding = opts.encoding !== null ? opts.encoding @@ -93,8 +88,8 @@ function read (req, res, next, parse, debug, options) { // unpipe from stream and destroy if (stream !== req) { - unpipe(req) - destroy(stream, true) + req.unpipe() + stream.destroy() } // read off entire request @@ -125,7 +120,7 @@ function read (req, res, next, parse, debug, options) { str = typeof body !== 'string' && encoding !== null ? iconv.decode(body, encoding) : body - req.body = parse(str) + req.body = parse(str, encoding) } catch (err) { next(createError(400, err, { body: str, @@ -151,7 +146,6 @@ function read (req, res, next, parse, debug, options) { function contentstream (req, debug, inflate) { var encoding = (req.headers['content-encoding'] || 'identity').toLowerCase() var length = req.headers['content-length'] - var stream debug('content-encoding "%s"', encoding) @@ -162,29 +156,40 @@ function contentstream (req, debug, inflate) { }) } + if (encoding === 'identity') { + req.length = length + return req + } + + var stream = createDecompressionStream(encoding, debug) + req.pipe(stream) + return stream +} + +/** + * Create a decompression stream for the given encoding. + * @param {string} encoding + * @param {function} debug + * @return {object} + * @api private + */ +function createDecompressionStream (encoding, debug) { switch (encoding) { case 'deflate': - stream = zlib.createInflate() debug('inflate body') - req.pipe(stream) - break + return zlib.createInflate() case 'gzip': - stream = zlib.createGunzip() debug('gunzip body') - req.pipe(stream) - break - case 'identity': - stream = req - stream.length = length - break + return zlib.createGunzip() + case 'br': + debug('brotli decompress body') + return zlib.createBrotliDecompress() default: throw createError(415, 'unsupported content encoding "' + encoding + '"', { encoding: encoding, type: 'encoding.unsupported' }) } - - return stream } /** diff --git a/node_modules/body-parser/lib/types/json.js b/node_modules/body-parser/lib/types/json.js index 59f3f7e..078ce71 100644 --- a/node_modules/body-parser/lib/types/json.js +++ b/node_modules/body-parser/lib/types/json.js @@ -12,12 +12,12 @@ * @private */ -var bytes = require('bytes') -var contentType = require('content-type') var createError = require('http-errors') var debug = require('debug')('body-parser:json') +var isFinished = require('on-finished').isFinished var read = require('../read') var typeis = require('type-is') +var { getCharset, normalizeOptions } = require('../utils') /** * Module exports. @@ -51,25 +51,10 @@ var JSON_SYNTAX_REGEXP = /#+/g */ function json (options) { - var opts = options || {} + var { inflate, limit, verify, shouldParse } = normalizeOptions(options, 'application/json') - var limit = typeof opts.limit !== 'number' - ? bytes.parse(opts.limit || '100kb') - : opts.limit - var inflate = opts.inflate !== false - var reviver = opts.reviver - var strict = opts.strict !== false - var type = opts.type || 'application/json' - var verify = opts.verify || false - - if (verify !== false && typeof verify !== 'function') { - throw new TypeError('option verify must be function') - } - - // create the appropriate type checking function - var shouldParse = typeof type !== 'function' - ? typeChecker(type) - : type + var reviver = options?.reviver + var strict = options?.strict !== false function parse (body) { if (body.length === 0) { @@ -99,13 +84,15 @@ function json (options) { } return function jsonParser (req, res, next) { - if (req._body) { + if (isFinished(req)) { debug('body already parsed') next() return } - req.body = req.body || {} + if (!('body' in req)) { + req.body = undefined + } // skip requests without bodies if (!typeis.hasBody(req)) { @@ -137,9 +124,9 @@ function json (options) { // read read(req, res, next, parse, debug, { encoding: charset, - inflate: inflate, - limit: limit, - verify: verify + inflate, + limit, + verify }) } } @@ -193,21 +180,6 @@ function firstchar (str) { : undefined } -/** - * Get the charset of a request. - * - * @param {object} req - * @api private - */ - -function getCharset (req) { - try { - return (contentType.parse(req).parameters.charset || '').toLowerCase() - } catch (e) { - return undefined - } -} - /** * Normalize a SyntaxError for JSON.parse. * @@ -232,16 +204,3 @@ function normalizeJsonSyntaxError (error, obj) { return error } - -/** - * Get the simple type checker. - * - * @param {string} type - * @return {function} - */ - -function typeChecker (type) { - return function checkType (req) { - return Boolean(typeis(req, type)) - } -} diff --git a/node_modules/body-parser/lib/types/raw.js b/node_modules/body-parser/lib/types/raw.js index f5d1b67..3788ff2 100644 --- a/node_modules/body-parser/lib/types/raw.js +++ b/node_modules/body-parser/lib/types/raw.js @@ -10,10 +10,11 @@ * Module dependencies. */ -var bytes = require('bytes') var debug = require('debug')('body-parser:raw') +var isFinished = require('on-finished').isFinished var read = require('../read') var typeis = require('type-is') +var { normalizeOptions } = require('../utils') /** * Module exports. @@ -30,36 +31,22 @@ module.exports = raw */ function raw (options) { - var opts = options || {} - - var inflate = opts.inflate !== false - var limit = typeof opts.limit !== 'number' - ? bytes.parse(opts.limit || '100kb') - : opts.limit - var type = opts.type || 'application/octet-stream' - var verify = opts.verify || false - - if (verify !== false && typeof verify !== 'function') { - throw new TypeError('option verify must be function') - } - - // create the appropriate type checking function - var shouldParse = typeof type !== 'function' - ? typeChecker(type) - : type + var { inflate, limit, verify, shouldParse } = normalizeOptions(options, 'application/octet-stream') function parse (buf) { return buf } return function rawParser (req, res, next) { - if (req._body) { + if (isFinished(req)) { debug('body already parsed') next() return } - req.body = req.body || {} + if (!('body' in req)) { + req.body = undefined + } // skip requests without bodies if (!typeis.hasBody(req)) { @@ -80,22 +67,9 @@ function raw (options) { // read read(req, res, next, parse, debug, { encoding: null, - inflate: inflate, - limit: limit, - verify: verify + inflate, + limit, + verify }) } } - -/** - * Get the simple type checker. - * - * @param {string} type - * @return {function} - */ - -function typeChecker (type) { - return function checkType (req) { - return Boolean(typeis(req, type)) - } -} diff --git a/node_modules/body-parser/lib/types/text.js b/node_modules/body-parser/lib/types/text.js index 083a009..3e0ab1b 100644 --- a/node_modules/body-parser/lib/types/text.js +++ b/node_modules/body-parser/lib/types/text.js @@ -10,11 +10,11 @@ * Module dependencies. */ -var bytes = require('bytes') -var contentType = require('content-type') var debug = require('debug')('body-parser:text') +var isFinished = require('on-finished').isFinished var read = require('../read') var typeis = require('type-is') +var { getCharset, normalizeOptions } = require('../utils') /** * Module exports. @@ -31,37 +31,24 @@ module.exports = text */ function text (options) { - var opts = options || {} + var { inflate, limit, verify, shouldParse } = normalizeOptions(options, 'text/plain') - var defaultCharset = opts.defaultCharset || 'utf-8' - var inflate = opts.inflate !== false - var limit = typeof opts.limit !== 'number' - ? bytes.parse(opts.limit || '100kb') - : opts.limit - var type = opts.type || 'text/plain' - var verify = opts.verify || false - - if (verify !== false && typeof verify !== 'function') { - throw new TypeError('option verify must be function') - } - - // create the appropriate type checking function - var shouldParse = typeof type !== 'function' - ? typeChecker(type) - : type + var defaultCharset = options?.defaultCharset || 'utf-8' function parse (buf) { return buf } return function textParser (req, res, next) { - if (req._body) { + if (isFinished(req)) { debug('body already parsed') next() return } - req.body = req.body || {} + if (!('body' in req)) { + req.body = undefined + } // skip requests without bodies if (!typeis.hasBody(req)) { @@ -85,37 +72,9 @@ function text (options) { // read read(req, res, next, parse, debug, { encoding: charset, - inflate: inflate, - limit: limit, - verify: verify + inflate, + limit, + verify }) } } - -/** - * Get the charset of a request. - * - * @param {object} req - * @api private - */ - -function getCharset (req) { - try { - return (contentType.parse(req).parameters.charset || '').toLowerCase() - } catch (e) { - return undefined - } -} - -/** - * Get the simple type checker. - * - * @param {string} type - * @return {function} - */ - -function typeChecker (type) { - return function checkType (req) { - return Boolean(typeis(req, type)) - } -} diff --git a/node_modules/body-parser/lib/types/urlencoded.js b/node_modules/body-parser/lib/types/urlencoded.js index 2bd4485..f993425 100644 --- a/node_modules/body-parser/lib/types/urlencoded.js +++ b/node_modules/body-parser/lib/types/urlencoded.js @@ -12,13 +12,13 @@ * @private */ -var bytes = require('bytes') -var contentType = require('content-type') var createError = require('http-errors') var debug = require('debug')('body-parser:urlencoded') -var deprecate = require('depd')('body-parser') +var isFinished = require('on-finished').isFinished var read = require('../read') var typeis = require('type-is') +var qs = require('qs') +var { getCharset, normalizeOptions } = require('../utils') /** * Module exports. @@ -26,12 +26,6 @@ var typeis = require('type-is') module.exports = urlencoded -/** - * Cache of parser modules. - */ - -var parsers = Object.create(null) - /** * Create a middleware to parse urlencoded bodies. * @@ -41,52 +35,32 @@ var parsers = Object.create(null) */ function urlencoded (options) { - var opts = options || {} + var { inflate, limit, verify, shouldParse } = normalizeOptions(options, 'application/x-www-form-urlencoded') - // notice because option default will flip in next major - if (opts.extended === undefined) { - deprecate('undefined extended: provide extended option') - } - - var extended = opts.extended !== false - var inflate = opts.inflate !== false - var limit = typeof opts.limit !== 'number' - ? bytes.parse(opts.limit || '100kb') - : opts.limit - var type = opts.type || 'application/x-www-form-urlencoded' - var verify = opts.verify || false - var depth = typeof opts.depth !== 'number' - ? Number(opts.depth || 32) - : opts.depth - - if (verify !== false && typeof verify !== 'function') { - throw new TypeError('option verify must be function') + var defaultCharset = options?.defaultCharset || 'utf-8' + if (defaultCharset !== 'utf-8' && defaultCharset !== 'iso-8859-1') { + throw new TypeError('option defaultCharset must be either utf-8 or iso-8859-1') } // create the appropriate query parser - var queryparse = extended - ? extendedparser(opts) - : simpleparser(opts) + var queryparse = createQueryParser(options) - // create the appropriate type checking function - var shouldParse = typeof type !== 'function' - ? typeChecker(type) - : type - - function parse (body) { + function parse (body, encoding) { return body.length - ? queryparse(body) + ? queryparse(body, encoding) : {} } return function urlencodedParser (req, res, next) { - if (req._body) { + if (isFinished(req)) { debug('body already parsed') next() return } - req.body = req.body || {} + if (!('body' in req)) { + req.body = undefined + } // skip requests without bodies if (!typeis.hasBody(req)) { @@ -105,8 +79,8 @@ function urlencoded (options) { } // assert charset - var charset = getCharset(req) || 'utf-8' - if (charset !== 'utf-8') { + var charset = getCharset(req) || defaultCharset + if (charset !== 'utf-8' && charset !== 'iso-8859-1') { debug('invalid charset') next(createError(415, 'unsupported charset "' + charset.toUpperCase() + '"', { charset: charset, @@ -117,12 +91,10 @@ function urlencoded (options) { // read read(req, res, next, parse, debug, { - debug: debug, encoding: charset, - inflate: inflate, - limit: limit, - verify: verify, - depth: depth + inflate, + limit, + verify }) } } @@ -133,15 +105,14 @@ function urlencoded (options) { * @param {object} options */ -function extendedparser (options) { - var parameterLimit = options.parameterLimit !== undefined - ? options.parameterLimit +function createQueryParser (options) { + var extended = Boolean(options?.extended) + var parameterLimit = options?.parameterLimit !== undefined + ? options?.parameterLimit : 1000 - - var depth = typeof options.depth !== 'number' - ? Number(options.depth || 32) - : options.depth - var parse = parser('qs') + var charsetSentinel = options?.charsetSentinel + var interpretNumericEntities = options?.interpretNumericEntities + var depth = extended ? (options?.depth !== undefined ? options?.depth : 32) : 0 if (isNaN(parameterLimit) || parameterLimit < 1) { throw new TypeError('option parameterLimit must be a positive number') @@ -155,7 +126,7 @@ function extendedparser (options) { parameterLimit = parameterLimit | 0 } - return function queryparse (body) { + return function queryparse (body, encoding) { var paramCount = parameterCount(body, parameterLimit) if (paramCount === undefined) { @@ -165,16 +136,19 @@ function extendedparser (options) { }) } - var arrayLimit = Math.max(100, paramCount) + var arrayLimit = extended ? Math.max(100, paramCount) : 0 - debug('parse extended urlencoding') + debug('parse ' + (extended ? 'extended ' : '') + 'urlencoding') try { - return parse(body, { + return qs.parse(body, { allowPrototypes: true, arrayLimit: arrayLimit, depth: depth, - strictDepth: true, - parameterLimit: parameterLimit + charsetSentinel: charsetSentinel, + interpretNumericEntities: interpretNumericEntities, + charset: encoding, + parameterLimit: parameterLimit, + strictDepth: true }) } catch (err) { if (err instanceof RangeError) { @@ -188,21 +162,6 @@ function extendedparser (options) { } } -/** - * Get the charset of a request. - * - * @param {object} req - * @api private - */ - -function getCharset (req) { - try { - return (contentType.parse(req).parameters.charset || '').toLowerCase() - } catch (e) { - return undefined - } -} - /** * Count the number of parameters, stopping once limit reached * @@ -212,96 +171,7 @@ function getCharset (req) { */ function parameterCount (body, limit) { - var count = 0 - var index = 0 + var len = body.split('&').length - while ((index = body.indexOf('&', index)) !== -1) { - count++ - index++ - - if (count === limit) { - return undefined - } - } - - return count -} - -/** - * Get parser for module name dynamically. - * - * @param {string} name - * @return {function} - * @api private - */ - -function parser (name) { - var mod = parsers[name] - - if (mod !== undefined) { - return mod.parse - } - - // this uses a switch for static require analysis - switch (name) { - case 'qs': - mod = require('qs') - break - case 'querystring': - mod = require('querystring') - break - } - - // store to prevent invoking require() - parsers[name] = mod - - return mod.parse -} - -/** - * Get the simple query parser. - * - * @param {object} options - */ - -function simpleparser (options) { - var parameterLimit = options.parameterLimit !== undefined - ? options.parameterLimit - : 1000 - var parse = parser('querystring') - - if (isNaN(parameterLimit) || parameterLimit < 1) { - throw new TypeError('option parameterLimit must be a positive number') - } - - if (isFinite(parameterLimit)) { - parameterLimit = parameterLimit | 0 - } - - return function queryparse (body) { - var paramCount = parameterCount(body, parameterLimit) - - if (paramCount === undefined) { - debug('too many parameters') - throw createError(413, 'too many parameters', { - type: 'parameters.too.many' - }) - } - - debug('parse urlencoding') - return parse(body, undefined, undefined, { maxKeys: parameterLimit }) - } -} - -/** - * Get the simple type checker. - * - * @param {string} type - * @return {function} - */ - -function typeChecker (type) { - return function checkType (req) { - return Boolean(typeis(req, type)) - } + return len > limit ? undefined : len - 1 } diff --git a/node_modules/body-parser/lib/utils.js b/node_modules/body-parser/lib/utils.js new file mode 100644 index 0000000..eee5d95 --- /dev/null +++ b/node_modules/body-parser/lib/utils.js @@ -0,0 +1,83 @@ +'use strict' + +/** + * Module dependencies. + */ + +var bytes = require('bytes') +var contentType = require('content-type') +var typeis = require('type-is') + +/** + * Module exports. + */ + +module.exports = { + getCharset, + normalizeOptions +} + +/** + * Get the charset of a request. + * + * @param {object} req + * @api private + */ + +function getCharset (req) { + try { + return (contentType.parse(req).parameters.charset || '').toLowerCase() + } catch { + return undefined + } +} + +/** + * Get the simple type checker. + * + * @param {string | string[]} type + * @return {function} + */ + +function typeChecker (type) { + return function checkType (req) { + return Boolean(typeis(req, type)) + } +} + +/** + * Normalizes the common options for all parsers. + * + * @param {object} options options to normalize + * @param {string | string[] | function} defaultType default content type(s) or a function to determine it + * @returns {object} + */ +function normalizeOptions (options, defaultType) { + if (!defaultType) { + // Parsers must define a default content type + throw new TypeError('defaultType must be provided') + } + + var inflate = options?.inflate !== false + var limit = typeof options?.limit !== 'number' + ? bytes.parse(options?.limit || '100kb') + : options?.limit + var type = options?.type || defaultType + var verify = options?.verify || false + + if (verify !== false && typeof verify !== 'function') { + throw new TypeError('option verify must be function') + } + + // create the appropriate type checking function + var shouldParse = typeof type !== 'function' + ? typeChecker(type) + : type + + return { + inflate, + limit, + verify, + shouldParse + } +} diff --git a/node_modules/nodemon/node_modules/debug/package.json b/node_modules/body-parser/node_modules/debug/package.json similarity index 100% rename from node_modules/nodemon/node_modules/debug/package.json rename to node_modules/body-parser/node_modules/debug/package.json diff --git a/node_modules/nodemon/node_modules/debug/src/browser.js b/node_modules/body-parser/node_modules/debug/src/browser.js similarity index 100% rename from node_modules/nodemon/node_modules/debug/src/browser.js rename to node_modules/body-parser/node_modules/debug/src/browser.js diff --git a/node_modules/nodemon/node_modules/debug/src/common.js b/node_modules/body-parser/node_modules/debug/src/common.js similarity index 100% rename from node_modules/nodemon/node_modules/debug/src/common.js rename to node_modules/body-parser/node_modules/debug/src/common.js diff --git a/node_modules/nodemon/node_modules/debug/src/index.js b/node_modules/body-parser/node_modules/debug/src/index.js similarity index 100% rename from node_modules/nodemon/node_modules/debug/src/index.js rename to node_modules/body-parser/node_modules/debug/src/index.js diff --git a/node_modules/nodemon/node_modules/debug/src/node.js b/node_modules/body-parser/node_modules/debug/src/node.js similarity index 100% rename from node_modules/nodemon/node_modules/debug/src/node.js rename to node_modules/body-parser/node_modules/debug/src/node.js diff --git a/node_modules/body-parser/node_modules/media-typer/index.js b/node_modules/body-parser/node_modules/media-typer/index.js new file mode 100644 index 0000000..897cae1 --- /dev/null +++ b/node_modules/body-parser/node_modules/media-typer/index.js @@ -0,0 +1,143 @@ +/*! + * media-typer + * Copyright(c) 2014-2017 Douglas Christopher Wilson + * MIT Licensed + */ + +'use strict' + +/** + * RegExp to match type in RFC 6838 + * + * type-name = restricted-name + * subtype-name = restricted-name + * restricted-name = restricted-name-first *126restricted-name-chars + * restricted-name-first = ALPHA / DIGIT + * restricted-name-chars = ALPHA / DIGIT / "!" / "#" / + * "$" / "&" / "-" / "^" / "_" + * restricted-name-chars =/ "." ; Characters before first dot always + * ; specify a facet name + * restricted-name-chars =/ "+" ; Characters after last plus always + * ; specify a structured syntax suffix + * ALPHA = %x41-5A / %x61-7A ; A-Z / a-z + * DIGIT = %x30-39 ; 0-9 + */ +var SUBTYPE_NAME_REGEXP = /^[A-Za-z0-9][A-Za-z0-9!#$&^_.-]{0,126}$/ +var TYPE_NAME_REGEXP = /^[A-Za-z0-9][A-Za-z0-9!#$&^_-]{0,126}$/ +var TYPE_REGEXP = /^ *([A-Za-z0-9][A-Za-z0-9!#$&^_-]{0,126})\/([A-Za-z0-9][A-Za-z0-9!#$&^_.+-]{0,126}) *$/ + +/** + * Module exports. + */ + +exports.format = format +exports.parse = parse +exports.test = test + +/** + * Format object to media type. + * + * @param {object} obj + * @return {string} + * @public + */ + +function format (obj) { + if (!obj || typeof obj !== 'object') { + throw new TypeError('argument obj is required') + } + + var subtype = obj.subtype + var suffix = obj.suffix + var type = obj.type + + if (!type || !TYPE_NAME_REGEXP.test(type)) { + throw new TypeError('invalid type') + } + + if (!subtype || !SUBTYPE_NAME_REGEXP.test(subtype)) { + throw new TypeError('invalid subtype') + } + + // format as type/subtype + var string = type + '/' + subtype + + // append +suffix + if (suffix) { + if (!TYPE_NAME_REGEXP.test(suffix)) { + throw new TypeError('invalid suffix') + } + + string += '+' + suffix + } + + return string +} + +/** + * Test media type. + * + * @param {string} string + * @return {object} + * @public + */ + +function test (string) { + if (!string) { + throw new TypeError('argument string is required') + } + + if (typeof string !== 'string') { + throw new TypeError('argument string is required to be a string') + } + + return TYPE_REGEXP.test(string.toLowerCase()) +} + +/** + * Parse media type to object. + * + * @param {string} string + * @return {object} + * @public + */ + +function parse (string) { + if (!string) { + throw new TypeError('argument string is required') + } + + if (typeof string !== 'string') { + throw new TypeError('argument string is required to be a string') + } + + var match = TYPE_REGEXP.exec(string.toLowerCase()) + + if (!match) { + throw new TypeError('invalid media type') + } + + var type = match[1] + var subtype = match[2] + var suffix + + // suffix after last + + var index = subtype.lastIndexOf('+') + if (index !== -1) { + suffix = subtype.substr(index + 1) + subtype = subtype.substr(0, index) + } + + return new MediaType(type, subtype, suffix) +} + +/** + * Class for MediaType object. + * @public + */ + +function MediaType (type, subtype, suffix) { + this.type = type + this.subtype = subtype + this.suffix = suffix +} diff --git a/node_modules/body-parser/node_modules/media-typer/package.json b/node_modules/body-parser/node_modules/media-typer/package.json new file mode 100644 index 0000000..1dca712 --- /dev/null +++ b/node_modules/body-parser/node_modules/media-typer/package.json @@ -0,0 +1,33 @@ +{ + "name": "media-typer", + "description": "Simple RFC 6838 media type parser and formatter", + "version": "1.1.0", + "author": "Douglas Christopher Wilson <doug@somethingdoug.com>", + "license": "MIT", + "repository": "jshttp/media-typer", + "devDependencies": { + "eslint": "5.16.0", + "eslint-config-standard": "12.0.0", + "eslint-plugin-import": "2.17.2", + "eslint-plugin-markdown": "1.0.0", + "eslint-plugin-node": "8.0.1", + "eslint-plugin-promise": "4.1.1", + "eslint-plugin-standard": "4.0.0", + "mocha": "6.1.4", + "nyc": "14.0.0" + }, + "files": [ + "LICENSE", + "HISTORY.md", + "index.js" + ], + "engines": { + "node": ">= 0.8" + }, + "scripts": { + "lint": "eslint --plugin markdown --ext js,md .", + "test": "mocha --reporter spec --check-leaks --bail test/", + "test-cov": "nyc --reporter=html --reporter=text npm test", + "test-travis": "nyc --reporter=text npm test" + } +} diff --git a/node_modules/body-parser/node_modules/mime-db/db.json b/node_modules/body-parser/node_modules/mime-db/db.json new file mode 100644 index 0000000..7e74733 --- /dev/null +++ b/node_modules/body-parser/node_modules/mime-db/db.json @@ -0,0 +1,9342 @@ +{ + "application/1d-interleaved-parityfec": { + "source": "iana" + }, + "application/3gpdash-qoe-report+xml": { + "source": "iana", + "charset": "UTF-8", + "compressible": true + }, + "application/3gpp-ims+xml": { + "source": "iana", + "compressible": true + }, + "application/3gpphal+json": { + "source": "iana", + "compressible": true + }, + "application/3gpphalforms+json": { + "source": "iana", + "compressible": true + }, + "application/a2l": { + "source": "iana" + }, + "application/ace+cbor": { + "source": "iana" + }, + "application/ace+json": { + "source": "iana", + "compressible": true + }, + "application/ace-groupcomm+cbor": { + "source": "iana" + }, + "application/ace-trl+cbor": { + "source": "iana" + }, + "application/activemessage": { + "source": "iana" + }, + "application/activity+json": { + "source": "iana", + "compressible": true + }, + "application/aif+cbor": { + "source": "iana" + }, + "application/aif+json": { + "source": "iana", + "compressible": true + }, + "application/alto-cdni+json": { + "source": "iana", + "compressible": true + }, + "application/alto-cdnifilter+json": { + "source": "iana", + "compressible": true + }, + "application/alto-costmap+json": { + "source": "iana", + "compressible": true + }, + "application/alto-costmapfilter+json": { + "source": "iana", + "compressible": true + }, + "application/alto-directory+json": { + "source": "iana", + "compressible": true + }, + "application/alto-endpointcost+json": { + "source": "iana", + "compressible": true + }, + "application/alto-endpointcostparams+json": { + "source": "iana", + "compressible": true + }, + "application/alto-endpointprop+json": { + "source": "iana", + "compressible": true + }, + "application/alto-endpointpropparams+json": { + "source": "iana", + "compressible": true + }, + "application/alto-error+json": { + "source": "iana", + "compressible": true + }, + "application/alto-networkmap+json": { + "source": "iana", + "compressible": true + }, + "application/alto-networkmapfilter+json": { + "source": "iana", + "compressible": true + }, + "application/alto-propmap+json": { + "source": "iana", + "compressible": true + }, + "application/alto-propmapparams+json": { + "source": "iana", + "compressible": true + }, + "application/alto-tips+json": { + "source": "iana", + "compressible": true + }, + "application/alto-tipsparams+json": { + "source": "iana", + "compressible": true + }, + "application/alto-updatestreamcontrol+json": { + "source": "iana", + "compressible": true + }, + "application/alto-updatestreamparams+json": { + "source": "iana", + "compressible": true + }, + "application/aml": { + "source": "iana" + }, + "application/andrew-inset": { + "source": "iana", + "extensions": ["ez"] + }, + "application/appinstaller": { + "compressible": false, + "extensions": ["appinstaller"] + }, + "application/applefile": { + "source": "iana" + }, + "application/applixware": { + "source": "apache", + "extensions": ["aw"] + }, + "application/appx": { + "compressible": false, + "extensions": ["appx"] + }, + "application/appxbundle": { + "compressible": false, + "extensions": ["appxbundle"] + }, + "application/at+jwt": { + "source": "iana" + }, + "application/atf": { + "source": "iana" + }, + "application/atfx": { + "source": "iana" + }, + "application/atom+xml": { + "source": "iana", + "compressible": true, + "extensions": ["atom"] + }, + "application/atomcat+xml": { + "source": "iana", + "compressible": true, + "extensions": ["atomcat"] + }, + "application/atomdeleted+xml": { + "source": "iana", + "compressible": true, + "extensions": ["atomdeleted"] + }, + "application/atomicmail": { + "source": "iana" + }, + "application/atomsvc+xml": { + "source": "iana", + "compressible": true, + "extensions": ["atomsvc"] + }, + "application/atsc-dwd+xml": { + "source": "iana", + "compressible": true, + "extensions": ["dwd"] + }, + "application/atsc-dynamic-event-message": { + "source": "iana" + }, + "application/atsc-held+xml": { + "source": "iana", + "compressible": true, + "extensions": ["held"] + }, + "application/atsc-rdt+json": { + "source": "iana", + "compressible": true + }, + "application/atsc-rsat+xml": { + "source": "iana", + "compressible": true, + "extensions": ["rsat"] + }, + "application/atxml": { + "source": "iana" + }, + "application/auth-policy+xml": { + "source": "iana", + "compressible": true + }, + "application/automationml-aml+xml": { + "source": "iana", + "compressible": true, + "extensions": ["aml"] + }, + "application/automationml-amlx+zip": { + "source": "iana", + "compressible": false, + "extensions": ["amlx"] + }, + "application/bacnet-xdd+zip": { + "source": "iana", + "compressible": false + }, + "application/batch-smtp": { + "source": "iana" + }, + "application/bdoc": { + "compressible": false, + "extensions": ["bdoc"] + }, + "application/beep+xml": { + "source": "iana", + "charset": "UTF-8", + "compressible": true + }, + "application/bufr": { + "source": "iana" + }, + "application/c2pa": { + "source": "iana" + }, + "application/calendar+json": { + "source": "iana", + "compressible": true + }, + "application/calendar+xml": { + "source": "iana", + "compressible": true, + "extensions": ["xcs"] + }, + "application/call-completion": { + "source": "iana" + }, + "application/cals-1840": { + "source": "iana" + }, + "application/captive+json": { + "source": "iana", + "compressible": true + }, + "application/cbor": { + "source": "iana" + }, + "application/cbor-seq": { + "source": "iana" + }, + "application/cccex": { + "source": "iana" + }, + "application/ccmp+xml": { + "source": "iana", + "compressible": true + }, + "application/ccxml+xml": { + "source": "iana", + "compressible": true, + "extensions": ["ccxml"] + }, + "application/cda+xml": { + "source": "iana", + "charset": "UTF-8", + "compressible": true + }, + "application/cdfx+xml": { + "source": "iana", + "compressible": true, + "extensions": ["cdfx"] + }, + "application/cdmi-capability": { + "source": "iana", + "extensions": ["cdmia"] + }, + "application/cdmi-container": { + "source": "iana", + "extensions": ["cdmic"] + }, + "application/cdmi-domain": { + "source": "iana", + "extensions": ["cdmid"] + }, + "application/cdmi-object": { + "source": "iana", + "extensions": ["cdmio"] + }, + "application/cdmi-queue": { + "source": "iana", + "extensions": ["cdmiq"] + }, + "application/cdni": { + "source": "iana" + }, + "application/ce+cbor": { + "source": "iana" + }, + "application/cea": { + "source": "iana" + }, + "application/cea-2018+xml": { + "source": "iana", + "compressible": true + }, + "application/cellml+xml": { + "source": "iana", + "compressible": true + }, + "application/cfw": { + "source": "iana" + }, + "application/cid-edhoc+cbor-seq": { + "source": "iana" + }, + "application/city+json": { + "source": "iana", + "compressible": true + }, + "application/city+json-seq": { + "source": "iana" + }, + "application/clr": { + "source": "iana" + }, + "application/clue+xml": { + "source": "iana", + "compressible": true + }, + "application/clue_info+xml": { + "source": "iana", + "compressible": true + }, + "application/cms": { + "source": "iana" + }, + "application/cnrp+xml": { + "source": "iana", + "compressible": true + }, + "application/coap-eap": { + "source": "iana" + }, + "application/coap-group+json": { + "source": "iana", + "compressible": true + }, + "application/coap-payload": { + "source": "iana" + }, + "application/commonground": { + "source": "iana" + }, + "application/concise-problem-details+cbor": { + "source": "iana" + }, + "application/conference-info+xml": { + "source": "iana", + "compressible": true + }, + "application/cose": { + "source": "iana" + }, + "application/cose-key": { + "source": "iana" + }, + "application/cose-key-set": { + "source": "iana" + }, + "application/cose-x509": { + "source": "iana" + }, + "application/cpl+xml": { + "source": "iana", + "compressible": true, + "extensions": ["cpl"] + }, + "application/csrattrs": { + "source": "iana" + }, + "application/csta+xml": { + "source": "iana", + "compressible": true + }, + "application/cstadata+xml": { + "source": "iana", + "compressible": true + }, + "application/csvm+json": { + "source": "iana", + "compressible": true + }, + "application/cu-seeme": { + "source": "apache", + "extensions": ["cu"] + }, + "application/cwl": { + "source": "iana", + "extensions": ["cwl"] + }, + "application/cwl+json": { + "source": "iana", + "compressible": true + }, + "application/cwl+yaml": { + "source": "iana" + }, + "application/cwt": { + "source": "iana" + }, + "application/cybercash": { + "source": "iana" + }, + "application/dart": { + "compressible": true + }, + "application/dash+xml": { + "source": "iana", + "compressible": true, + "extensions": ["mpd"] + }, + "application/dash-patch+xml": { + "source": "iana", + "compressible": true, + "extensions": ["mpp"] + }, + "application/dashdelta": { + "source": "iana" + }, + "application/davmount+xml": { + "source": "iana", + "compressible": true, + "extensions": ["davmount"] + }, + "application/dca-rft": { + "source": "iana" + }, + "application/dcd": { + "source": "iana" + }, + "application/dec-dx": { + "source": "iana" + }, + "application/dialog-info+xml": { + "source": "iana", + "compressible": true + }, + "application/dicom": { + "source": "iana", + "extensions": ["dcm"] + }, + "application/dicom+json": { + "source": "iana", + "compressible": true + }, + "application/dicom+xml": { + "source": "iana", + "compressible": true + }, + "application/dii": { + "source": "iana" + }, + "application/dit": { + "source": "iana" + }, + "application/dns": { + "source": "iana" + }, + "application/dns+json": { + "source": "iana", + "compressible": true + }, + "application/dns-message": { + "source": "iana" + }, + "application/docbook+xml": { + "source": "apache", + "compressible": true, + "extensions": ["dbk"] + }, + "application/dots+cbor": { + "source": "iana" + }, + "application/dpop+jwt": { + "source": "iana" + }, + "application/dskpp+xml": { + "source": "iana", + "compressible": true + }, + "application/dssc+der": { + "source": "iana", + "extensions": ["dssc"] + }, + "application/dssc+xml": { + "source": "iana", + "compressible": true, + "extensions": ["xdssc"] + }, + "application/dvcs": { + "source": "iana" + }, + "application/eat+cwt": { + "source": "iana" + }, + "application/eat+jwt": { + "source": "iana" + }, + "application/eat-bun+cbor": { + "source": "iana" + }, + "application/eat-bun+json": { + "source": "iana", + "compressible": true + }, + "application/eat-ucs+cbor": { + "source": "iana" + }, + "application/eat-ucs+json": { + "source": "iana", + "compressible": true + }, + "application/ecmascript": { + "source": "apache", + "compressible": true, + "extensions": ["ecma"] + }, + "application/edhoc+cbor-seq": { + "source": "iana" + }, + "application/edi-consent": { + "source": "iana" + }, + "application/edi-x12": { + "source": "iana", + "compressible": false + }, + "application/edifact": { + "source": "iana", + "compressible": false + }, + "application/efi": { + "source": "iana" + }, + "application/elm+json": { + "source": "iana", + "charset": "UTF-8", + "compressible": true + }, + "application/elm+xml": { + "source": "iana", + "compressible": true + }, + "application/emergencycalldata.cap+xml": { + "source": "iana", + "charset": "UTF-8", + "compressible": true + }, + "application/emergencycalldata.comment+xml": { + "source": "iana", + "compressible": true + }, + "application/emergencycalldata.control+xml": { + "source": "iana", + "compressible": true + }, + "application/emergencycalldata.deviceinfo+xml": { + "source": "iana", + "compressible": true + }, + "application/emergencycalldata.ecall.msd": { + "source": "iana" + }, + "application/emergencycalldata.legacyesn+json": { + "source": "iana", + "compressible": true + }, + "application/emergencycalldata.providerinfo+xml": { + "source": "iana", + "compressible": true + }, + "application/emergencycalldata.serviceinfo+xml": { + "source": "iana", + "compressible": true + }, + "application/emergencycalldata.subscriberinfo+xml": { + "source": "iana", + "compressible": true + }, + "application/emergencycalldata.veds+xml": { + "source": "iana", + "compressible": true + }, + "application/emma+xml": { + "source": "iana", + "compressible": true, + "extensions": ["emma"] + }, + "application/emotionml+xml": { + "source": "iana", + "compressible": true, + "extensions": ["emotionml"] + }, + "application/encaprtp": { + "source": "iana" + }, + "application/entity-statement+jwt": { + "source": "iana" + }, + "application/epp+xml": { + "source": "iana", + "compressible": true + }, + "application/epub+zip": { + "source": "iana", + "compressible": false, + "extensions": ["epub"] + }, + "application/eshop": { + "source": "iana" + }, + "application/exi": { + "source": "iana", + "extensions": ["exi"] + }, + "application/expect-ct-report+json": { + "source": "iana", + "compressible": true + }, + "application/express": { + "source": "iana", + "extensions": ["exp"] + }, + "application/fastinfoset": { + "source": "iana" + }, + "application/fastsoap": { + "source": "iana" + }, + "application/fdf": { + "source": "iana", + "extensions": ["fdf"] + }, + "application/fdt+xml": { + "source": "iana", + "compressible": true, + "extensions": ["fdt"] + }, + "application/fhir+json": { + "source": "iana", + "charset": "UTF-8", + "compressible": true + }, + "application/fhir+xml": { + "source": "iana", + "charset": "UTF-8", + "compressible": true + }, + "application/fido.trusted-apps+json": { + "compressible": true + }, + "application/fits": { + "source": "iana" + }, + "application/flexfec": { + "source": "iana" + }, + "application/font-sfnt": { + "source": "iana" + }, + "application/font-tdpfr": { + "source": "iana", + "extensions": ["pfr"] + }, + "application/font-woff": { + "source": "iana", + "compressible": false + }, + "application/framework-attributes+xml": { + "source": "iana", + "compressible": true + }, + "application/geo+json": { + "source": "iana", + "compressible": true, + "extensions": ["geojson"] + }, + "application/geo+json-seq": { + "source": "iana" + }, + "application/geopackage+sqlite3": { + "source": "iana" + }, + "application/geopose+json": { + "source": "iana", + "compressible": true + }, + "application/geoxacml+json": { + "source": "iana", + "compressible": true + }, + "application/geoxacml+xml": { + "source": "iana", + "compressible": true + }, + "application/gltf-buffer": { + "source": "iana" + }, + "application/gml+xml": { + "source": "iana", + "compressible": true, + "extensions": ["gml"] + }, + "application/gnap-binding-jws": { + "source": "iana" + }, + "application/gnap-binding-jwsd": { + "source": "iana" + }, + "application/gnap-binding-rotation-jws": { + "source": "iana" + }, + "application/gnap-binding-rotation-jwsd": { + "source": "iana" + }, + "application/gpx+xml": { + "source": "apache", + "compressible": true, + "extensions": ["gpx"] + }, + "application/grib": { + "source": "iana" + }, + "application/gxf": { + "source": "apache", + "extensions": ["gxf"] + }, + "application/gzip": { + "source": "iana", + "compressible": false, + "extensions": ["gz"] + }, + "application/h224": { + "source": "iana" + }, + "application/held+xml": { + "source": "iana", + "compressible": true + }, + "application/hjson": { + "extensions": ["hjson"] + }, + "application/hl7v2+xml": { + "source": "iana", + "charset": "UTF-8", + "compressible": true + }, + "application/http": { + "source": "iana" + }, + "application/hyperstudio": { + "source": "iana", + "extensions": ["stk"] + }, + "application/ibe-key-request+xml": { + "source": "iana", + "compressible": true + }, + "application/ibe-pkg-reply+xml": { + "source": "iana", + "compressible": true + }, + "application/ibe-pp-data": { + "source": "iana" + }, + "application/iges": { + "source": "iana" + }, + "application/im-iscomposing+xml": { + "source": "iana", + "charset": "UTF-8", + "compressible": true + }, + "application/index": { + "source": "iana" + }, + "application/index.cmd": { + "source": "iana" + }, + "application/index.obj": { + "source": "iana" + }, + "application/index.response": { + "source": "iana" + }, + "application/index.vnd": { + "source": "iana" + }, + "application/inkml+xml": { + "source": "iana", + "compressible": true, + "extensions": ["ink","inkml"] + }, + "application/iotp": { + "source": "iana" + }, + "application/ipfix": { + "source": "iana", + "extensions": ["ipfix"] + }, + "application/ipp": { + "source": "iana" + }, + "application/isup": { + "source": "iana" + }, + "application/its+xml": { + "source": "iana", + "compressible": true, + "extensions": ["its"] + }, + "application/java-archive": { + "source": "iana", + "compressible": false, + "extensions": ["jar","war","ear"] + }, + "application/java-serialized-object": { + "source": "apache", + "compressible": false, + "extensions": ["ser"] + }, + "application/java-vm": { + "source": "apache", + "compressible": false, + "extensions": ["class"] + }, + "application/javascript": { + "source": "apache", + "charset": "UTF-8", + "compressible": true, + "extensions": ["js"] + }, + "application/jf2feed+json": { + "source": "iana", + "compressible": true + }, + "application/jose": { + "source": "iana" + }, + "application/jose+json": { + "source": "iana", + "compressible": true + }, + "application/jrd+json": { + "source": "iana", + "compressible": true + }, + "application/jscalendar+json": { + "source": "iana", + "compressible": true + }, + "application/jscontact+json": { + "source": "iana", + "compressible": true + }, + "application/json": { + "source": "iana", + "charset": "UTF-8", + "compressible": true, + "extensions": ["json","map"] + }, + "application/json-patch+json": { + "source": "iana", + "compressible": true + }, + "application/json-seq": { + "source": "iana" + }, + "application/json5": { + "extensions": ["json5"] + }, + "application/jsonml+json": { + "source": "apache", + "compressible": true, + "extensions": ["jsonml"] + }, + "application/jsonpath": { + "source": "iana" + }, + "application/jwk+json": { + "source": "iana", + "compressible": true + }, + "application/jwk-set+json": { + "source": "iana", + "compressible": true + }, + "application/jwk-set+jwt": { + "source": "iana" + }, + "application/jwt": { + "source": "iana" + }, + "application/kpml-request+xml": { + "source": "iana", + "compressible": true + }, + "application/kpml-response+xml": { + "source": "iana", + "compressible": true + }, + "application/ld+json": { + "source": "iana", + "compressible": true, + "extensions": ["jsonld"] + }, + "application/lgr+xml": { + "source": "iana", + "compressible": true, + "extensions": ["lgr"] + }, + "application/link-format": { + "source": "iana" + }, + "application/linkset": { + "source": "iana" + }, + "application/linkset+json": { + "source": "iana", + "compressible": true + }, + "application/load-control+xml": { + "source": "iana", + "compressible": true + }, + "application/logout+jwt": { + "source": "iana" + }, + "application/lost+xml": { + "source": "iana", + "compressible": true, + "extensions": ["lostxml"] + }, + "application/lostsync+xml": { + "source": "iana", + "compressible": true + }, + "application/lpf+zip": { + "source": "iana", + "compressible": false + }, + "application/lxf": { + "source": "iana" + }, + "application/mac-binhex40": { + "source": "iana", + "extensions": ["hqx"] + }, + "application/mac-compactpro": { + "source": "apache", + "extensions": ["cpt"] + }, + "application/macwriteii": { + "source": "iana" + }, + "application/mads+xml": { + "source": "iana", + "compressible": true, + "extensions": ["mads"] + }, + "application/manifest+json": { + "source": "iana", + "charset": "UTF-8", + "compressible": true, + "extensions": ["webmanifest"] + }, + "application/marc": { + "source": "iana", + "extensions": ["mrc"] + }, + "application/marcxml+xml": { + "source": "iana", + "compressible": true, + "extensions": ["mrcx"] + }, + "application/mathematica": { + "source": "iana", + "extensions": ["ma","nb","mb"] + }, + "application/mathml+xml": { + "source": "iana", + "compressible": true, + "extensions": ["mathml"] + }, + "application/mathml-content+xml": { + "source": "iana", + "compressible": true + }, + "application/mathml-presentation+xml": { + "source": "iana", + "compressible": true + }, + "application/mbms-associated-procedure-description+xml": { + "source": "iana", + "compressible": true + }, + "application/mbms-deregister+xml": { + "source": "iana", + "compressible": true + }, + "application/mbms-envelope+xml": { + "source": "iana", + "compressible": true + }, + "application/mbms-msk+xml": { + "source": "iana", + "compressible": true + }, + "application/mbms-msk-response+xml": { + "source": "iana", + "compressible": true + }, + "application/mbms-protection-description+xml": { + "source": "iana", + "compressible": true + }, + "application/mbms-reception-report+xml": { + "source": "iana", + "compressible": true + }, + "application/mbms-register+xml": { + "source": "iana", + "compressible": true + }, + "application/mbms-register-response+xml": { + "source": "iana", + "compressible": true + }, + "application/mbms-schedule+xml": { + "source": "iana", + "compressible": true + }, + "application/mbms-user-service-description+xml": { + "source": "iana", + "compressible": true + }, + "application/mbox": { + "source": "iana", + "extensions": ["mbox"] + }, + "application/media-policy-dataset+xml": { + "source": "iana", + "compressible": true, + "extensions": ["mpf"] + }, + "application/media_control+xml": { + "source": "iana", + "compressible": true + }, + "application/mediaservercontrol+xml": { + "source": "iana", + "compressible": true, + "extensions": ["mscml"] + }, + "application/merge-patch+json": { + "source": "iana", + "compressible": true + }, + "application/metalink+xml": { + "source": "apache", + "compressible": true, + "extensions": ["metalink"] + }, + "application/metalink4+xml": { + "source": "iana", + "compressible": true, + "extensions": ["meta4"] + }, + "application/mets+xml": { + "source": "iana", + "compressible": true, + "extensions": ["mets"] + }, + "application/mf4": { + "source": "iana" + }, + "application/mikey": { + "source": "iana" + }, + "application/mipc": { + "source": "iana" + }, + "application/missing-blocks+cbor-seq": { + "source": "iana" + }, + "application/mmt-aei+xml": { + "source": "iana", + "compressible": true, + "extensions": ["maei"] + }, + "application/mmt-usd+xml": { + "source": "iana", + "compressible": true, + "extensions": ["musd"] + }, + "application/mods+xml": { + "source": "iana", + "compressible": true, + "extensions": ["mods"] + }, + "application/moss-keys": { + "source": "iana" + }, + "application/moss-signature": { + "source": "iana" + }, + "application/mosskey-data": { + "source": "iana" + }, + "application/mosskey-request": { + "source": "iana" + }, + "application/mp21": { + "source": "iana", + "extensions": ["m21","mp21"] + }, + "application/mp4": { + "source": "iana", + "extensions": ["mp4","mpg4","mp4s","m4p"] + }, + "application/mpeg4-generic": { + "source": "iana" + }, + "application/mpeg4-iod": { + "source": "iana" + }, + "application/mpeg4-iod-xmt": { + "source": "iana" + }, + "application/mrb-consumer+xml": { + "source": "iana", + "compressible": true + }, + "application/mrb-publish+xml": { + "source": "iana", + "compressible": true + }, + "application/msc-ivr+xml": { + "source": "iana", + "charset": "UTF-8", + "compressible": true + }, + "application/msc-mixer+xml": { + "source": "iana", + "charset": "UTF-8", + "compressible": true + }, + "application/msix": { + "compressible": false, + "extensions": ["msix"] + }, + "application/msixbundle": { + "compressible": false, + "extensions": ["msixbundle"] + }, + "application/msword": { + "source": "iana", + "compressible": false, + "extensions": ["doc","dot"] + }, + "application/mud+json": { + "source": "iana", + "compressible": true + }, + "application/multipart-core": { + "source": "iana" + }, + "application/mxf": { + "source": "iana", + "extensions": ["mxf"] + }, + "application/n-quads": { + "source": "iana", + "extensions": ["nq"] + }, + "application/n-triples": { + "source": "iana", + "extensions": ["nt"] + }, + "application/nasdata": { + "source": "iana" + }, + "application/news-checkgroups": { + "source": "iana", + "charset": "US-ASCII" + }, + "application/news-groupinfo": { + "source": "iana", + "charset": "US-ASCII" + }, + "application/news-transmission": { + "source": "iana" + }, + "application/nlsml+xml": { + "source": "iana", + "compressible": true + }, + "application/node": { + "source": "iana", + "extensions": ["cjs"] + }, + "application/nss": { + "source": "iana" + }, + "application/oauth-authz-req+jwt": { + "source": "iana" + }, + "application/oblivious-dns-message": { + "source": "iana" + }, + "application/ocsp-request": { + "source": "iana" + }, + "application/ocsp-response": { + "source": "iana" + }, + "application/octet-stream": { + "source": "iana", + "compressible": true, + "extensions": ["bin","dms","lrf","mar","so","dist","distz","pkg","bpk","dump","elc","deploy","exe","dll","deb","dmg","iso","img","msi","msp","msm","buffer"] + }, + "application/oda": { + "source": "iana", + "extensions": ["oda"] + }, + "application/odm+xml": { + "source": "iana", + "compressible": true + }, + "application/odx": { + "source": "iana" + }, + "application/oebps-package+xml": { + "source": "iana", + "compressible": true, + "extensions": ["opf"] + }, + "application/ogg": { + "source": "iana", + "compressible": false, + "extensions": ["ogx"] + }, + "application/ohttp-keys": { + "source": "iana" + }, + "application/omdoc+xml": { + "source": "apache", + "compressible": true, + "extensions": ["omdoc"] + }, + "application/onenote": { + "source": "apache", + "extensions": ["onetoc","onetoc2","onetmp","onepkg","one","onea"] + }, + "application/opc-nodeset+xml": { + "source": "iana", + "compressible": true + }, + "application/oscore": { + "source": "iana" + }, + "application/oxps": { + "source": "iana", + "extensions": ["oxps"] + }, + "application/p21": { + "source": "iana" + }, + "application/p21+zip": { + "source": "iana", + "compressible": false + }, + "application/p2p-overlay+xml": { + "source": "iana", + "compressible": true, + "extensions": ["relo"] + }, + "application/parityfec": { + "source": "iana" + }, + "application/passport": { + "source": "iana" + }, + "application/patch-ops-error+xml": { + "source": "iana", + "compressible": true, + "extensions": ["xer"] + }, + "application/pdf": { + "source": "iana", + "compressible": false, + "extensions": ["pdf"] + }, + "application/pdx": { + "source": "iana" + }, + "application/pem-certificate-chain": { + "source": "iana" + }, + "application/pgp-encrypted": { + "source": "iana", + "compressible": false, + "extensions": ["pgp"] + }, + "application/pgp-keys": { + "source": "iana", + "extensions": ["asc"] + }, + "application/pgp-signature": { + "source": "iana", + "extensions": ["sig","asc"] + }, + "application/pics-rules": { + "source": "apache", + "extensions": ["prf"] + }, + "application/pidf+xml": { + "source": "iana", + "charset": "UTF-8", + "compressible": true + }, + "application/pidf-diff+xml": { + "source": "iana", + "charset": "UTF-8", + "compressible": true + }, + "application/pkcs10": { + "source": "iana", + "extensions": ["p10"] + }, + "application/pkcs12": { + "source": "iana" + }, + "application/pkcs7-mime": { + "source": "iana", + "extensions": ["p7m","p7c"] + }, + "application/pkcs7-signature": { + "source": "iana", + "extensions": ["p7s"] + }, + "application/pkcs8": { + "source": "iana", + "extensions": ["p8"] + }, + "application/pkcs8-encrypted": { + "source": "iana" + }, + "application/pkix-attr-cert": { + "source": "iana", + "extensions": ["ac"] + }, + "application/pkix-cert": { + "source": "iana", + "extensions": ["cer"] + }, + "application/pkix-crl": { + "source": "iana", + "extensions": ["crl"] + }, + "application/pkix-pkipath": { + "source": "iana", + "extensions": ["pkipath"] + }, + "application/pkixcmp": { + "source": "iana", + "extensions": ["pki"] + }, + "application/pls+xml": { + "source": "iana", + "compressible": true, + "extensions": ["pls"] + }, + "application/poc-settings+xml": { + "source": "iana", + "charset": "UTF-8", + "compressible": true + }, + "application/postscript": { + "source": "iana", + "compressible": true, + "extensions": ["ai","eps","ps"] + }, + "application/ppsp-tracker+json": { + "source": "iana", + "compressible": true + }, + "application/private-token-issuer-directory": { + "source": "iana" + }, + "application/private-token-request": { + "source": "iana" + }, + "application/private-token-response": { + "source": "iana" + }, + "application/problem+json": { + "source": "iana", + "compressible": true + }, + "application/problem+xml": { + "source": "iana", + "compressible": true + }, + "application/provenance+xml": { + "source": "iana", + "compressible": true, + "extensions": ["provx"] + }, + "application/provided-claims+jwt": { + "source": "iana" + }, + "application/prs.alvestrand.titrax-sheet": { + "source": "iana" + }, + "application/prs.cww": { + "source": "iana", + "extensions": ["cww"] + }, + "application/prs.cyn": { + "source": "iana", + "charset": "7-BIT" + }, + "application/prs.hpub+zip": { + "source": "iana", + "compressible": false + }, + "application/prs.implied-document+xml": { + "source": "iana", + "compressible": true + }, + "application/prs.implied-executable": { + "source": "iana" + }, + "application/prs.implied-object+json": { + "source": "iana", + "compressible": true + }, + "application/prs.implied-object+json-seq": { + "source": "iana" + }, + "application/prs.implied-object+yaml": { + "source": "iana" + }, + "application/prs.implied-structure": { + "source": "iana" + }, + "application/prs.mayfile": { + "source": "iana" + }, + "application/prs.nprend": { + "source": "iana" + }, + "application/prs.plucker": { + "source": "iana" + }, + "application/prs.rdf-xml-crypt": { + "source": "iana" + }, + "application/prs.vcfbzip2": { + "source": "iana" + }, + "application/prs.xsf+xml": { + "source": "iana", + "compressible": true, + "extensions": ["xsf"] + }, + "application/pskc+xml": { + "source": "iana", + "compressible": true, + "extensions": ["pskcxml"] + }, + "application/pvd+json": { + "source": "iana", + "compressible": true + }, + "application/qsig": { + "source": "iana" + }, + "application/raml+yaml": { + "compressible": true, + "extensions": ["raml"] + }, + "application/raptorfec": { + "source": "iana" + }, + "application/rdap+json": { + "source": "iana", + "compressible": true + }, + "application/rdf+xml": { + "source": "iana", + "compressible": true, + "extensions": ["rdf","owl"] + }, + "application/reginfo+xml": { + "source": "iana", + "compressible": true, + "extensions": ["rif"] + }, + "application/relax-ng-compact-syntax": { + "source": "iana", + "extensions": ["rnc"] + }, + "application/remote-printing": { + "source": "apache" + }, + "application/reputon+json": { + "source": "iana", + "compressible": true + }, + "application/resolve-response+jwt": { + "source": "iana" + }, + "application/resource-lists+xml": { + "source": "iana", + "compressible": true, + "extensions": ["rl"] + }, + "application/resource-lists-diff+xml": { + "source": "iana", + "compressible": true, + "extensions": ["rld"] + }, + "application/rfc+xml": { + "source": "iana", + "compressible": true + }, + "application/riscos": { + "source": "iana" + }, + "application/rlmi+xml": { + "source": "iana", + "compressible": true + }, + "application/rls-services+xml": { + "source": "iana", + "compressible": true, + "extensions": ["rs"] + }, + "application/route-apd+xml": { + "source": "iana", + "compressible": true, + "extensions": ["rapd"] + }, + "application/route-s-tsid+xml": { + "source": "iana", + "compressible": true, + "extensions": ["sls"] + }, + "application/route-usd+xml": { + "source": "iana", + "compressible": true, + "extensions": ["rusd"] + }, + "application/rpki-checklist": { + "source": "iana" + }, + "application/rpki-ghostbusters": { + "source": "iana", + "extensions": ["gbr"] + }, + "application/rpki-manifest": { + "source": "iana", + "extensions": ["mft"] + }, + "application/rpki-publication": { + "source": "iana" + }, + "application/rpki-roa": { + "source": "iana", + "extensions": ["roa"] + }, + "application/rpki-signed-tal": { + "source": "iana" + }, + "application/rpki-updown": { + "source": "iana" + }, + "application/rsd+xml": { + "source": "apache", + "compressible": true, + "extensions": ["rsd"] + }, + "application/rss+xml": { + "source": "apache", + "compressible": true, + "extensions": ["rss"] + }, + "application/rtf": { + "source": "iana", + "compressible": true, + "extensions": ["rtf"] + }, + "application/rtploopback": { + "source": "iana" + }, + "application/rtx": { + "source": "iana" + }, + "application/samlassertion+xml": { + "source": "iana", + "compressible": true + }, + "application/samlmetadata+xml": { + "source": "iana", + "compressible": true + }, + "application/sarif+json": { + "source": "iana", + "compressible": true + }, + "application/sarif-external-properties+json": { + "source": "iana", + "compressible": true + }, + "application/sbe": { + "source": "iana" + }, + "application/sbml+xml": { + "source": "iana", + "compressible": true, + "extensions": ["sbml"] + }, + "application/scaip+xml": { + "source": "iana", + "compressible": true + }, + "application/scim+json": { + "source": "iana", + "compressible": true + }, + "application/scvp-cv-request": { + "source": "iana", + "extensions": ["scq"] + }, + "application/scvp-cv-response": { + "source": "iana", + "extensions": ["scs"] + }, + "application/scvp-vp-request": { + "source": "iana", + "extensions": ["spq"] + }, + "application/scvp-vp-response": { + "source": "iana", + "extensions": ["spp"] + }, + "application/sdp": { + "source": "iana", + "extensions": ["sdp"] + }, + "application/secevent+jwt": { + "source": "iana" + }, + "application/senml+cbor": { + "source": "iana" + }, + "application/senml+json": { + "source": "iana", + "compressible": true + }, + "application/senml+xml": { + "source": "iana", + "compressible": true, + "extensions": ["senmlx"] + }, + "application/senml-etch+cbor": { + "source": "iana" + }, + "application/senml-etch+json": { + "source": "iana", + "compressible": true + }, + "application/senml-exi": { + "source": "iana" + }, + "application/sensml+cbor": { + "source": "iana" + }, + "application/sensml+json": { + "source": "iana", + "compressible": true + }, + "application/sensml+xml": { + "source": "iana", + "compressible": true, + "extensions": ["sensmlx"] + }, + "application/sensml-exi": { + "source": "iana" + }, + "application/sep+xml": { + "source": "iana", + "compressible": true + }, + "application/sep-exi": { + "source": "iana" + }, + "application/session-info": { + "source": "iana" + }, + "application/set-payment": { + "source": "iana" + }, + "application/set-payment-initiation": { + "source": "iana", + "extensions": ["setpay"] + }, + "application/set-registration": { + "source": "iana" + }, + "application/set-registration-initiation": { + "source": "iana", + "extensions": ["setreg"] + }, + "application/sgml": { + "source": "iana" + }, + "application/sgml-open-catalog": { + "source": "iana" + }, + "application/shf+xml": { + "source": "iana", + "compressible": true, + "extensions": ["shf"] + }, + "application/sieve": { + "source": "iana", + "extensions": ["siv","sieve"] + }, + "application/simple-filter+xml": { + "source": "iana", + "compressible": true + }, + "application/simple-message-summary": { + "source": "iana" + }, + "application/simplesymbolcontainer": { + "source": "iana" + }, + "application/sipc": { + "source": "iana" + }, + "application/slate": { + "source": "iana" + }, + "application/smil": { + "source": "apache" + }, + "application/smil+xml": { + "source": "iana", + "compressible": true, + "extensions": ["smi","smil"] + }, + "application/smpte336m": { + "source": "iana" + }, + "application/soap+fastinfoset": { + "source": "iana" + }, + "application/soap+xml": { + "source": "iana", + "compressible": true + }, + "application/sparql-query": { + "source": "iana", + "extensions": ["rq"] + }, + "application/sparql-results+xml": { + "source": "iana", + "compressible": true, + "extensions": ["srx"] + }, + "application/spdx+json": { + "source": "iana", + "compressible": true + }, + "application/spirits-event+xml": { + "source": "iana", + "compressible": true + }, + "application/sql": { + "source": "iana", + "extensions": ["sql"] + }, + "application/srgs": { + "source": "iana", + "extensions": ["gram"] + }, + "application/srgs+xml": { + "source": "iana", + "compressible": true, + "extensions": ["grxml"] + }, + "application/sru+xml": { + "source": "iana", + "compressible": true, + "extensions": ["sru"] + }, + "application/ssdl+xml": { + "source": "apache", + "compressible": true, + "extensions": ["ssdl"] + }, + "application/sslkeylogfile": { + "source": "iana" + }, + "application/ssml+xml": { + "source": "iana", + "compressible": true, + "extensions": ["ssml"] + }, + "application/st2110-41": { + "source": "iana" + }, + "application/stix+json": { + "source": "iana", + "compressible": true + }, + "application/stratum": { + "source": "iana" + }, + "application/swid+cbor": { + "source": "iana" + }, + "application/swid+xml": { + "source": "iana", + "compressible": true, + "extensions": ["swidtag"] + }, + "application/tamp-apex-update": { + "source": "iana" + }, + "application/tamp-apex-update-confirm": { + "source": "iana" + }, + "application/tamp-community-update": { + "source": "iana" + }, + "application/tamp-community-update-confirm": { + "source": "iana" + }, + "application/tamp-error": { + "source": "iana" + }, + "application/tamp-sequence-adjust": { + "source": "iana" + }, + "application/tamp-sequence-adjust-confirm": { + "source": "iana" + }, + "application/tamp-status-query": { + "source": "iana" + }, + "application/tamp-status-response": { + "source": "iana" + }, + "application/tamp-update": { + "source": "iana" + }, + "application/tamp-update-confirm": { + "source": "iana" + }, + "application/tar": { + "compressible": true + }, + "application/taxii+json": { + "source": "iana", + "compressible": true + }, + "application/td+json": { + "source": "iana", + "compressible": true + }, + "application/tei+xml": { + "source": "iana", + "compressible": true, + "extensions": ["tei","teicorpus"] + }, + "application/tetra_isi": { + "source": "iana" + }, + "application/thraud+xml": { + "source": "iana", + "compressible": true, + "extensions": ["tfi"] + }, + "application/timestamp-query": { + "source": "iana" + }, + "application/timestamp-reply": { + "source": "iana" + }, + "application/timestamped-data": { + "source": "iana", + "extensions": ["tsd"] + }, + "application/tlsrpt+gzip": { + "source": "iana" + }, + "application/tlsrpt+json": { + "source": "iana", + "compressible": true + }, + "application/tm+json": { + "source": "iana", + "compressible": true + }, + "application/tnauthlist": { + "source": "iana" + }, + "application/toc+cbor": { + "source": "iana" + }, + "application/token-introspection+jwt": { + "source": "iana" + }, + "application/toml": { + "source": "iana", + "compressible": true, + "extensions": ["toml"] + }, + "application/trickle-ice-sdpfrag": { + "source": "iana" + }, + "application/trig": { + "source": "iana", + "extensions": ["trig"] + }, + "application/trust-chain+json": { + "source": "iana", + "compressible": true + }, + "application/trust-mark+jwt": { + "source": "iana" + }, + "application/trust-mark-delegation+jwt": { + "source": "iana" + }, + "application/ttml+xml": { + "source": "iana", + "compressible": true, + "extensions": ["ttml"] + }, + "application/tve-trigger": { + "source": "iana" + }, + "application/tzif": { + "source": "iana" + }, + "application/tzif-leap": { + "source": "iana" + }, + "application/ubjson": { + "compressible": false, + "extensions": ["ubj"] + }, + "application/uccs+cbor": { + "source": "iana" + }, + "application/ujcs+json": { + "source": "iana", + "compressible": true + }, + "application/ulpfec": { + "source": "iana" + }, + "application/urc-grpsheet+xml": { + "source": "iana", + "compressible": true + }, + "application/urc-ressheet+xml": { + "source": "iana", + "compressible": true, + "extensions": ["rsheet"] + }, + "application/urc-targetdesc+xml": { + "source": "iana", + "compressible": true, + "extensions": ["td"] + }, + "application/urc-uisocketdesc+xml": { + "source": "iana", + "compressible": true + }, + "application/vc": { + "source": "iana" + }, + "application/vc+cose": { + "source": "iana" + }, + "application/vc+jwt": { + "source": "iana" + }, + "application/vcard+json": { + "source": "iana", + "compressible": true + }, + "application/vcard+xml": { + "source": "iana", + "compressible": true + }, + "application/vemmi": { + "source": "iana" + }, + "application/vividence.scriptfile": { + "source": "apache" + }, + "application/vnd.1000minds.decision-model+xml": { + "source": "iana", + "compressible": true, + "extensions": ["1km"] + }, + "application/vnd.1ob": { + "source": "iana" + }, + "application/vnd.3gpp-prose+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp-prose-pc3a+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp-prose-pc3ach+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp-prose-pc3ch+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp-prose-pc8+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp-v2x-local-service-information": { + "source": "iana" + }, + "application/vnd.3gpp.5gnas": { + "source": "iana" + }, + "application/vnd.3gpp.5gsa2x": { + "source": "iana" + }, + "application/vnd.3gpp.5gsa2x-local-service-information": { + "source": "iana" + }, + "application/vnd.3gpp.5gsv2x": { + "source": "iana" + }, + "application/vnd.3gpp.5gsv2x-local-service-information": { + "source": "iana" + }, + "application/vnd.3gpp.access-transfer-events+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.bsf+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.crs+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.current-location-discovery+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.gmop+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.gtpc": { + "source": "iana" + }, + "application/vnd.3gpp.interworking-data": { + "source": "iana" + }, + "application/vnd.3gpp.lpp": { + "source": "iana" + }, + "application/vnd.3gpp.mc-signalling-ear": { + "source": "iana" + }, + "application/vnd.3gpp.mcdata-affiliation-command+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.mcdata-info+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.mcdata-msgstore-ctrl-request+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.mcdata-payload": { + "source": "iana" + }, + "application/vnd.3gpp.mcdata-regroup+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.mcdata-service-config+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.mcdata-signalling": { + "source": "iana" + }, + "application/vnd.3gpp.mcdata-ue-config+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.mcdata-user-profile+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.mcptt-affiliation-command+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.mcptt-floor-request+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.mcptt-info+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.mcptt-location-info+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.mcptt-mbms-usage-info+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.mcptt-regroup+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.mcptt-service-config+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.mcptt-signed+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.mcptt-ue-config+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.mcptt-ue-init-config+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.mcptt-user-profile+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.mcvideo-affiliation-command+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.mcvideo-info+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.mcvideo-location-info+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.mcvideo-mbms-usage-info+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.mcvideo-regroup+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.mcvideo-service-config+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.mcvideo-transmission-request+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.mcvideo-ue-config+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.mcvideo-user-profile+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.mid-call+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.ngap": { + "source": "iana" + }, + "application/vnd.3gpp.pfcp": { + "source": "iana" + }, + "application/vnd.3gpp.pic-bw-large": { + "source": "iana", + "extensions": ["plb"] + }, + "application/vnd.3gpp.pic-bw-small": { + "source": "iana", + "extensions": ["psb"] + }, + "application/vnd.3gpp.pic-bw-var": { + "source": "iana", + "extensions": ["pvb"] + }, + "application/vnd.3gpp.pinapp-info+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.s1ap": { + "source": "iana" + }, + "application/vnd.3gpp.seal-group-doc+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.seal-info+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.seal-location-info+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.seal-mbms-usage-info+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.seal-network-qos-management-info+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.seal-ue-config-info+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.seal-unicast-info+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.seal-user-profile-info+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.sms": { + "source": "iana" + }, + "application/vnd.3gpp.sms+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.srvcc-ext+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.srvcc-info+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.state-and-event-info+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.ussd+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.v2x": { + "source": "iana" + }, + "application/vnd.3gpp.vae-info+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp2.bcmcsinfo+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp2.sms": { + "source": "iana" + }, + "application/vnd.3gpp2.tcap": { + "source": "iana", + "extensions": ["tcap"] + }, + "application/vnd.3lightssoftware.imagescal": { + "source": "iana" + }, + "application/vnd.3m.post-it-notes": { + "source": "iana", + "extensions": ["pwn"] + }, + "application/vnd.accpac.simply.aso": { + "source": "iana", + "extensions": ["aso"] + }, + "application/vnd.accpac.simply.imp": { + "source": "iana", + "extensions": ["imp"] + }, + "application/vnd.acm.addressxfer+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.acm.chatbot+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.acucobol": { + "source": "iana", + "extensions": ["acu"] + }, + "application/vnd.acucorp": { + "source": "iana", + "extensions": ["atc","acutc"] + }, + "application/vnd.adobe.air-application-installer-package+zip": { + "source": "apache", + "compressible": false, + "extensions": ["air"] + }, + "application/vnd.adobe.flash.movie": { + "source": "iana" + }, + "application/vnd.adobe.formscentral.fcdt": { + "source": "iana", + "extensions": ["fcdt"] + }, + "application/vnd.adobe.fxp": { + "source": "iana", + "extensions": ["fxp","fxpl"] + }, + "application/vnd.adobe.partial-upload": { + "source": "iana" + }, + "application/vnd.adobe.xdp+xml": { + "source": "iana", + "compressible": true, + "extensions": ["xdp"] + }, + "application/vnd.adobe.xfdf": { + "source": "apache", + "extensions": ["xfdf"] + }, + "application/vnd.aether.imp": { + "source": "iana" + }, + "application/vnd.afpc.afplinedata": { + "source": "iana" + }, + "application/vnd.afpc.afplinedata-pagedef": { + "source": "iana" + }, + "application/vnd.afpc.cmoca-cmresource": { + "source": "iana" + }, + "application/vnd.afpc.foca-charset": { + "source": "iana" + }, + "application/vnd.afpc.foca-codedfont": { + "source": "iana" + }, + "application/vnd.afpc.foca-codepage": { + "source": "iana" + }, + "application/vnd.afpc.modca": { + "source": "iana" + }, + "application/vnd.afpc.modca-cmtable": { + "source": "iana" + }, + "application/vnd.afpc.modca-formdef": { + "source": "iana" + }, + "application/vnd.afpc.modca-mediummap": { + "source": "iana" + }, + "application/vnd.afpc.modca-objectcontainer": { + "source": "iana" + }, + "application/vnd.afpc.modca-overlay": { + "source": "iana" + }, + "application/vnd.afpc.modca-pagesegment": { + "source": "iana" + }, + "application/vnd.age": { + "source": "iana", + "extensions": ["age"] + }, + "application/vnd.ah-barcode": { + "source": "apache" + }, + "application/vnd.ahead.space": { + "source": "iana", + "extensions": ["ahead"] + }, + "application/vnd.airzip.filesecure.azf": { + "source": "iana", + "extensions": ["azf"] + }, + "application/vnd.airzip.filesecure.azs": { + "source": "iana", + "extensions": ["azs"] + }, + "application/vnd.amadeus+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.amazon.ebook": { + "source": "apache", + "extensions": ["azw"] + }, + "application/vnd.amazon.mobi8-ebook": { + "source": "iana" + }, + "application/vnd.americandynamics.acc": { + "source": "iana", + "extensions": ["acc"] + }, + "application/vnd.amiga.ami": { + "source": "iana", + "extensions": ["ami"] + }, + "application/vnd.amundsen.maze+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.android.ota": { + "source": "iana" + }, + "application/vnd.android.package-archive": { + "source": "apache", + "compressible": false, + "extensions": ["apk"] + }, + "application/vnd.anki": { + "source": "iana" + }, + "application/vnd.anser-web-certificate-issue-initiation": { + "source": "iana", + "extensions": ["cii"] + }, + "application/vnd.anser-web-funds-transfer-initiation": { + "source": "apache", + "extensions": ["fti"] + }, + "application/vnd.antix.game-component": { + "source": "iana", + "extensions": ["atx"] + }, + "application/vnd.apache.arrow.file": { + "source": "iana" + }, + "application/vnd.apache.arrow.stream": { + "source": "iana" + }, + "application/vnd.apache.parquet": { + "source": "iana" + }, + "application/vnd.apache.thrift.binary": { + "source": "iana" + }, + "application/vnd.apache.thrift.compact": { + "source": "iana" + }, + "application/vnd.apache.thrift.json": { + "source": "iana" + }, + "application/vnd.apexlang": { + "source": "iana" + }, + "application/vnd.api+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.aplextor.warrp+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.apothekende.reservation+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.apple.installer+xml": { + "source": "iana", + "compressible": true, + "extensions": ["mpkg"] + }, + "application/vnd.apple.keynote": { + "source": "iana", + "extensions": ["key"] + }, + "application/vnd.apple.mpegurl": { + "source": "iana", + "extensions": ["m3u8"] + }, + "application/vnd.apple.numbers": { + "source": "iana", + "extensions": ["numbers"] + }, + "application/vnd.apple.pages": { + "source": "iana", + "extensions": ["pages"] + }, + "application/vnd.apple.pkpass": { + "compressible": false, + "extensions": ["pkpass"] + }, + "application/vnd.arastra.swi": { + "source": "apache" + }, + "application/vnd.aristanetworks.swi": { + "source": "iana", + "extensions": ["swi"] + }, + "application/vnd.artisan+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.artsquare": { + "source": "iana" + }, + "application/vnd.astraea-software.iota": { + "source": "iana", + "extensions": ["iota"] + }, + "application/vnd.audiograph": { + "source": "iana", + "extensions": ["aep"] + }, + "application/vnd.autodesk.fbx": { + "extensions": ["fbx"] + }, + "application/vnd.autopackage": { + "source": "iana" + }, + "application/vnd.avalon+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.avistar+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.balsamiq.bmml+xml": { + "source": "iana", + "compressible": true, + "extensions": ["bmml"] + }, + "application/vnd.balsamiq.bmpr": { + "source": "iana" + }, + "application/vnd.banana-accounting": { + "source": "iana" + }, + "application/vnd.bbf.usp.error": { + "source": "iana" + }, + "application/vnd.bbf.usp.msg": { + "source": "iana" + }, + "application/vnd.bbf.usp.msg+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.bekitzur-stech+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.belightsoft.lhzd+zip": { + "source": "iana", + "compressible": false + }, + "application/vnd.belightsoft.lhzl+zip": { + "source": "iana", + "compressible": false + }, + "application/vnd.bint.med-content": { + "source": "iana" + }, + "application/vnd.biopax.rdf+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.blink-idb-value-wrapper": { + "source": "iana" + }, + "application/vnd.blueice.multipass": { + "source": "iana", + "extensions": ["mpm"] + }, + "application/vnd.bluetooth.ep.oob": { + "source": "iana" + }, + "application/vnd.bluetooth.le.oob": { + "source": "iana" + }, + "application/vnd.bmi": { + "source": "iana", + "extensions": ["bmi"] + }, + "application/vnd.bpf": { + "source": "iana" + }, + "application/vnd.bpf3": { + "source": "iana" + }, + "application/vnd.businessobjects": { + "source": "iana", + "extensions": ["rep"] + }, + "application/vnd.byu.uapi+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.bzip3": { + "source": "iana" + }, + "application/vnd.c3voc.schedule+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.cab-jscript": { + "source": "iana" + }, + "application/vnd.canon-cpdl": { + "source": "iana" + }, + "application/vnd.canon-lips": { + "source": "iana" + }, + "application/vnd.capasystems-pg+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.cendio.thinlinc.clientconf": { + "source": "iana" + }, + "application/vnd.century-systems.tcp_stream": { + "source": "iana" + }, + "application/vnd.chemdraw+xml": { + "source": "iana", + "compressible": true, + "extensions": ["cdxml"] + }, + "application/vnd.chess-pgn": { + "source": "iana" + }, + "application/vnd.chipnuts.karaoke-mmd": { + "source": "iana", + "extensions": ["mmd"] + }, + "application/vnd.ciedi": { + "source": "iana" + }, + "application/vnd.cinderella": { + "source": "iana", + "extensions": ["cdy"] + }, + "application/vnd.cirpack.isdn-ext": { + "source": "iana" + }, + "application/vnd.citationstyles.style+xml": { + "source": "iana", + "compressible": true, + "extensions": ["csl"] + }, + "application/vnd.claymore": { + "source": "iana", + "extensions": ["cla"] + }, + "application/vnd.cloanto.rp9": { + "source": "iana", + "extensions": ["rp9"] + }, + "application/vnd.clonk.c4group": { + "source": "iana", + "extensions": ["c4g","c4d","c4f","c4p","c4u"] + }, + "application/vnd.cluetrust.cartomobile-config": { + "source": "iana", + "extensions": ["c11amc"] + }, + "application/vnd.cluetrust.cartomobile-config-pkg": { + "source": "iana", + "extensions": ["c11amz"] + }, + "application/vnd.cncf.helm.chart.content.v1.tar+gzip": { + "source": "iana" + }, + "application/vnd.cncf.helm.chart.provenance.v1.prov": { + "source": "iana" + }, + "application/vnd.cncf.helm.config.v1+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.coffeescript": { + "source": "iana" + }, + "application/vnd.collabio.xodocuments.document": { + "source": "iana" + }, + "application/vnd.collabio.xodocuments.document-template": { + "source": "iana" + }, + "application/vnd.collabio.xodocuments.presentation": { + "source": "iana" + }, + "application/vnd.collabio.xodocuments.presentation-template": { + "source": "iana" + }, + "application/vnd.collabio.xodocuments.spreadsheet": { + "source": "iana" + }, + "application/vnd.collabio.xodocuments.spreadsheet-template": { + "source": "iana" + }, + "application/vnd.collection+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.collection.doc+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.collection.next+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.comicbook+zip": { + "source": "iana", + "compressible": false + }, + "application/vnd.comicbook-rar": { + "source": "iana" + }, + "application/vnd.commerce-battelle": { + "source": "iana" + }, + "application/vnd.commonspace": { + "source": "iana", + "extensions": ["csp"] + }, + "application/vnd.contact.cmsg": { + "source": "iana", + "extensions": ["cdbcmsg"] + }, + "application/vnd.coreos.ignition+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.cosmocaller": { + "source": "iana", + "extensions": ["cmc"] + }, + "application/vnd.crick.clicker": { + "source": "iana", + "extensions": ["clkx"] + }, + "application/vnd.crick.clicker.keyboard": { + "source": "iana", + "extensions": ["clkk"] + }, + "application/vnd.crick.clicker.palette": { + "source": "iana", + "extensions": ["clkp"] + }, + "application/vnd.crick.clicker.template": { + "source": "iana", + "extensions": ["clkt"] + }, + "application/vnd.crick.clicker.wordbank": { + "source": "iana", + "extensions": ["clkw"] + }, + "application/vnd.criticaltools.wbs+xml": { + "source": "iana", + "compressible": true, + "extensions": ["wbs"] + }, + "application/vnd.cryptii.pipe+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.crypto-shade-file": { + "source": "iana" + }, + "application/vnd.cryptomator.encrypted": { + "source": "iana" + }, + "application/vnd.cryptomator.vault": { + "source": "iana" + }, + "application/vnd.ctc-posml": { + "source": "iana", + "extensions": ["pml"] + }, + "application/vnd.ctct.ws+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.cups-pdf": { + "source": "iana" + }, + "application/vnd.cups-postscript": { + "source": "iana" + }, + "application/vnd.cups-ppd": { + "source": "iana", + "extensions": ["ppd"] + }, + "application/vnd.cups-raster": { + "source": "iana" + }, + "application/vnd.cups-raw": { + "source": "iana" + }, + "application/vnd.curl": { + "source": "iana" + }, + "application/vnd.curl.car": { + "source": "apache", + "extensions": ["car"] + }, + "application/vnd.curl.pcurl": { + "source": "apache", + "extensions": ["pcurl"] + }, + "application/vnd.cyan.dean.root+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.cybank": { + "source": "iana" + }, + "application/vnd.cyclonedx+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.cyclonedx+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.d2l.coursepackage1p0+zip": { + "source": "iana", + "compressible": false + }, + "application/vnd.d3m-dataset": { + "source": "iana" + }, + "application/vnd.d3m-problem": { + "source": "iana" + }, + "application/vnd.dart": { + "source": "iana", + "compressible": true, + "extensions": ["dart"] + }, + "application/vnd.data-vision.rdz": { + "source": "iana", + "extensions": ["rdz"] + }, + "application/vnd.datalog": { + "source": "iana" + }, + "application/vnd.datapackage+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.dataresource+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.dbf": { + "source": "iana", + "extensions": ["dbf"] + }, + "application/vnd.dcmp+xml": { + "source": "iana", + "compressible": true, + "extensions": ["dcmp"] + }, + "application/vnd.debian.binary-package": { + "source": "iana" + }, + "application/vnd.dece.data": { + "source": "iana", + "extensions": ["uvf","uvvf","uvd","uvvd"] + }, + "application/vnd.dece.ttml+xml": { + "source": "iana", + "compressible": true, + "extensions": ["uvt","uvvt"] + }, + "application/vnd.dece.unspecified": { + "source": "iana", + "extensions": ["uvx","uvvx"] + }, + "application/vnd.dece.zip": { + "source": "iana", + "extensions": ["uvz","uvvz"] + }, + "application/vnd.denovo.fcselayout-link": { + "source": "iana", + "extensions": ["fe_launch"] + }, + "application/vnd.desmume.movie": { + "source": "iana" + }, + "application/vnd.dir-bi.plate-dl-nosuffix": { + "source": "iana" + }, + "application/vnd.dm.delegation+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.dna": { + "source": "iana", + "extensions": ["dna"] + }, + "application/vnd.document+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.dolby.mlp": { + "source": "apache", + "extensions": ["mlp"] + }, + "application/vnd.dolby.mobile.1": { + "source": "iana" + }, + "application/vnd.dolby.mobile.2": { + "source": "iana" + }, + "application/vnd.doremir.scorecloud-binary-document": { + "source": "iana" + }, + "application/vnd.dpgraph": { + "source": "iana", + "extensions": ["dpg"] + }, + "application/vnd.dreamfactory": { + "source": "iana", + "extensions": ["dfac"] + }, + "application/vnd.drive+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.ds-keypoint": { + "source": "apache", + "extensions": ["kpxx"] + }, + "application/vnd.dtg.local": { + "source": "iana" + }, + "application/vnd.dtg.local.flash": { + "source": "iana" + }, + "application/vnd.dtg.local.html": { + "source": "iana" + }, + "application/vnd.dvb.ait": { + "source": "iana", + "extensions": ["ait"] + }, + "application/vnd.dvb.dvbisl+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.dvb.dvbj": { + "source": "iana" + }, + "application/vnd.dvb.esgcontainer": { + "source": "iana" + }, + "application/vnd.dvb.ipdcdftnotifaccess": { + "source": "iana" + }, + "application/vnd.dvb.ipdcesgaccess": { + "source": "iana" + }, + "application/vnd.dvb.ipdcesgaccess2": { + "source": "iana" + }, + "application/vnd.dvb.ipdcesgpdd": { + "source": "iana" + }, + "application/vnd.dvb.ipdcroaming": { + "source": "iana" + }, + "application/vnd.dvb.iptv.alfec-base": { + "source": "iana" + }, + "application/vnd.dvb.iptv.alfec-enhancement": { + "source": "iana" + }, + "application/vnd.dvb.notif-aggregate-root+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.dvb.notif-container+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.dvb.notif-generic+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.dvb.notif-ia-msglist+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.dvb.notif-ia-registration-request+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.dvb.notif-ia-registration-response+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.dvb.notif-init+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.dvb.pfr": { + "source": "iana" + }, + "application/vnd.dvb.service": { + "source": "iana", + "extensions": ["svc"] + }, + "application/vnd.dxr": { + "source": "iana" + }, + "application/vnd.dynageo": { + "source": "iana", + "extensions": ["geo"] + }, + "application/vnd.dzr": { + "source": "iana" + }, + "application/vnd.easykaraoke.cdgdownload": { + "source": "iana" + }, + "application/vnd.ecdis-update": { + "source": "iana" + }, + "application/vnd.ecip.rlp": { + "source": "iana" + }, + "application/vnd.eclipse.ditto+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.ecowin.chart": { + "source": "iana", + "extensions": ["mag"] + }, + "application/vnd.ecowin.filerequest": { + "source": "iana" + }, + "application/vnd.ecowin.fileupdate": { + "source": "iana" + }, + "application/vnd.ecowin.series": { + "source": "iana" + }, + "application/vnd.ecowin.seriesrequest": { + "source": "iana" + }, + "application/vnd.ecowin.seriesupdate": { + "source": "iana" + }, + "application/vnd.efi.img": { + "source": "iana" + }, + "application/vnd.efi.iso": { + "source": "iana" + }, + "application/vnd.eln+zip": { + "source": "iana", + "compressible": false + }, + "application/vnd.emclient.accessrequest+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.enliven": { + "source": "iana", + "extensions": ["nml"] + }, + "application/vnd.enphase.envoy": { + "source": "iana" + }, + "application/vnd.eprints.data+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.epson.esf": { + "source": "iana", + "extensions": ["esf"] + }, + "application/vnd.epson.msf": { + "source": "iana", + "extensions": ["msf"] + }, + "application/vnd.epson.quickanime": { + "source": "iana", + "extensions": ["qam"] + }, + "application/vnd.epson.salt": { + "source": "iana", + "extensions": ["slt"] + }, + "application/vnd.epson.ssf": { + "source": "iana", + "extensions": ["ssf"] + }, + "application/vnd.ericsson.quickcall": { + "source": "iana" + }, + "application/vnd.erofs": { + "source": "iana" + }, + "application/vnd.espass-espass+zip": { + "source": "iana", + "compressible": false + }, + "application/vnd.eszigno3+xml": { + "source": "iana", + "compressible": true, + "extensions": ["es3","et3"] + }, + "application/vnd.etsi.aoc+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.etsi.asic-e+zip": { + "source": "iana", + "compressible": false + }, + "application/vnd.etsi.asic-s+zip": { + "source": "iana", + "compressible": false + }, + "application/vnd.etsi.cug+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.etsi.iptvcommand+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.etsi.iptvdiscovery+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.etsi.iptvprofile+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.etsi.iptvsad-bc+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.etsi.iptvsad-cod+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.etsi.iptvsad-npvr+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.etsi.iptvservice+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.etsi.iptvsync+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.etsi.iptvueprofile+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.etsi.mcid+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.etsi.mheg5": { + "source": "iana" + }, + "application/vnd.etsi.overload-control-policy-dataset+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.etsi.pstn+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.etsi.sci+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.etsi.simservs+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.etsi.timestamp-token": { + "source": "iana" + }, + "application/vnd.etsi.tsl+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.etsi.tsl.der": { + "source": "iana" + }, + "application/vnd.eu.kasparian.car+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.eudora.data": { + "source": "iana" + }, + "application/vnd.evolv.ecig.profile": { + "source": "iana" + }, + "application/vnd.evolv.ecig.settings": { + "source": "iana" + }, + "application/vnd.evolv.ecig.theme": { + "source": "iana" + }, + "application/vnd.exstream-empower+zip": { + "source": "iana", + "compressible": false + }, + "application/vnd.exstream-package": { + "source": "iana" + }, + "application/vnd.ezpix-album": { + "source": "iana", + "extensions": ["ez2"] + }, + "application/vnd.ezpix-package": { + "source": "iana", + "extensions": ["ez3"] + }, + "application/vnd.f-secure.mobile": { + "source": "iana" + }, + "application/vnd.familysearch.gedcom+zip": { + "source": "iana", + "compressible": false + }, + "application/vnd.fastcopy-disk-image": { + "source": "iana" + }, + "application/vnd.fdf": { + "source": "apache", + "extensions": ["fdf"] + }, + "application/vnd.fdsn.mseed": { + "source": "iana", + "extensions": ["mseed"] + }, + "application/vnd.fdsn.seed": { + "source": "iana", + "extensions": ["seed","dataless"] + }, + "application/vnd.fdsn.stationxml+xml": { + "source": "iana", + "charset": "XML-BASED", + "compressible": true + }, + "application/vnd.ffsns": { + "source": "iana" + }, + "application/vnd.ficlab.flb+zip": { + "source": "iana", + "compressible": false + }, + "application/vnd.filmit.zfc": { + "source": "iana" + }, + "application/vnd.fints": { + "source": "iana" + }, + "application/vnd.firemonkeys.cloudcell": { + "source": "iana" + }, + "application/vnd.flographit": { + "source": "iana", + "extensions": ["gph"] + }, + "application/vnd.fluxtime.clip": { + "source": "iana", + "extensions": ["ftc"] + }, + "application/vnd.font-fontforge-sfd": { + "source": "iana" + }, + "application/vnd.framemaker": { + "source": "iana", + "extensions": ["fm","frame","maker","book"] + }, + "application/vnd.freelog.comic": { + "source": "iana" + }, + "application/vnd.frogans.fnc": { + "source": "apache", + "extensions": ["fnc"] + }, + "application/vnd.frogans.ltf": { + "source": "apache", + "extensions": ["ltf"] + }, + "application/vnd.fsc.weblaunch": { + "source": "iana", + "extensions": ["fsc"] + }, + "application/vnd.fujifilm.fb.docuworks": { + "source": "iana" + }, + "application/vnd.fujifilm.fb.docuworks.binder": { + "source": "iana" + }, + "application/vnd.fujifilm.fb.docuworks.container": { + "source": "iana" + }, + "application/vnd.fujifilm.fb.jfi+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.fujitsu.oasys": { + "source": "iana", + "extensions": ["oas"] + }, + "application/vnd.fujitsu.oasys2": { + "source": "iana", + "extensions": ["oa2"] + }, + "application/vnd.fujitsu.oasys3": { + "source": "iana", + "extensions": ["oa3"] + }, + "application/vnd.fujitsu.oasysgp": { + "source": "iana", + "extensions": ["fg5"] + }, + "application/vnd.fujitsu.oasysprs": { + "source": "iana", + "extensions": ["bh2"] + }, + "application/vnd.fujixerox.art-ex": { + "source": "iana" + }, + "application/vnd.fujixerox.art4": { + "source": "iana" + }, + "application/vnd.fujixerox.ddd": { + "source": "iana", + "extensions": ["ddd"] + }, + "application/vnd.fujixerox.docuworks": { + "source": "iana", + "extensions": ["xdw"] + }, + "application/vnd.fujixerox.docuworks.binder": { + "source": "iana", + "extensions": ["xbd"] + }, + "application/vnd.fujixerox.docuworks.container": { + "source": "iana" + }, + "application/vnd.fujixerox.hbpl": { + "source": "iana" + }, + "application/vnd.fut-misnet": { + "source": "iana" + }, + "application/vnd.futoin+cbor": { + "source": "iana" + }, + "application/vnd.futoin+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.fuzzysheet": { + "source": "iana", + "extensions": ["fzs"] + }, + "application/vnd.ga4gh.passport+jwt": { + "source": "iana" + }, + "application/vnd.genomatix.tuxedo": { + "source": "iana", + "extensions": ["txd"] + }, + "application/vnd.genozip": { + "source": "iana" + }, + "application/vnd.gentics.grd+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.gentoo.catmetadata+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.gentoo.ebuild": { + "source": "iana" + }, + "application/vnd.gentoo.eclass": { + "source": "iana" + }, + "application/vnd.gentoo.gpkg": { + "source": "iana" + }, + "application/vnd.gentoo.manifest": { + "source": "iana" + }, + "application/vnd.gentoo.pkgmetadata+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.gentoo.xpak": { + "source": "iana" + }, + "application/vnd.geo+json": { + "source": "apache", + "compressible": true + }, + "application/vnd.geocube+xml": { + "source": "apache", + "compressible": true + }, + "application/vnd.geogebra.file": { + "source": "iana", + "extensions": ["ggb"] + }, + "application/vnd.geogebra.pinboard": { + "source": "iana" + }, + "application/vnd.geogebra.slides": { + "source": "iana", + "extensions": ["ggs"] + }, + "application/vnd.geogebra.tool": { + "source": "iana", + "extensions": ["ggt"] + }, + "application/vnd.geometry-explorer": { + "source": "iana", + "extensions": ["gex","gre"] + }, + "application/vnd.geonext": { + "source": "iana", + "extensions": ["gxt"] + }, + "application/vnd.geoplan": { + "source": "iana", + "extensions": ["g2w"] + }, + "application/vnd.geospace": { + "source": "iana", + "extensions": ["g3w"] + }, + "application/vnd.gerber": { + "source": "iana" + }, + "application/vnd.globalplatform.card-content-mgt": { + "source": "iana" + }, + "application/vnd.globalplatform.card-content-mgt-response": { + "source": "iana" + }, + "application/vnd.gmx": { + "source": "iana", + "extensions": ["gmx"] + }, + "application/vnd.gnu.taler.exchange+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.gnu.taler.merchant+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.google-apps.audio": {}, + "application/vnd.google-apps.document": { + "compressible": false, + "extensions": ["gdoc"] + }, + "application/vnd.google-apps.drawing": { + "compressible": false, + "extensions": ["gdraw"] + }, + "application/vnd.google-apps.drive-sdk": { + "compressible": false + }, + "application/vnd.google-apps.file": {}, + "application/vnd.google-apps.folder": { + "compressible": false + }, + "application/vnd.google-apps.form": { + "compressible": false, + "extensions": ["gform"] + }, + "application/vnd.google-apps.fusiontable": {}, + "application/vnd.google-apps.jam": { + "compressible": false, + "extensions": ["gjam"] + }, + "application/vnd.google-apps.mail-layout": {}, + "application/vnd.google-apps.map": { + "compressible": false, + "extensions": ["gmap"] + }, + "application/vnd.google-apps.photo": {}, + "application/vnd.google-apps.presentation": { + "compressible": false, + "extensions": ["gslides"] + }, + "application/vnd.google-apps.script": { + "compressible": false, + "extensions": ["gscript"] + }, + "application/vnd.google-apps.shortcut": {}, + "application/vnd.google-apps.site": { + "compressible": false, + "extensions": ["gsite"] + }, + "application/vnd.google-apps.spreadsheet": { + "compressible": false, + "extensions": ["gsheet"] + }, + "application/vnd.google-apps.unknown": {}, + "application/vnd.google-apps.video": {}, + "application/vnd.google-earth.kml+xml": { + "source": "iana", + "compressible": true, + "extensions": ["kml"] + }, + "application/vnd.google-earth.kmz": { + "source": "iana", + "compressible": false, + "extensions": ["kmz"] + }, + "application/vnd.gov.sk.e-form+xml": { + "source": "apache", + "compressible": true + }, + "application/vnd.gov.sk.e-form+zip": { + "source": "iana", + "compressible": false + }, + "application/vnd.gov.sk.xmldatacontainer+xml": { + "source": "iana", + "compressible": true, + "extensions": ["xdcf"] + }, + "application/vnd.gpxsee.map+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.grafeq": { + "source": "iana", + "extensions": ["gqf","gqs"] + }, + "application/vnd.gridmp": { + "source": "iana" + }, + "application/vnd.groove-account": { + "source": "iana", + "extensions": ["gac"] + }, + "application/vnd.groove-help": { + "source": "iana", + "extensions": ["ghf"] + }, + "application/vnd.groove-identity-message": { + "source": "iana", + "extensions": ["gim"] + }, + "application/vnd.groove-injector": { + "source": "iana", + "extensions": ["grv"] + }, + "application/vnd.groove-tool-message": { + "source": "iana", + "extensions": ["gtm"] + }, + "application/vnd.groove-tool-template": { + "source": "iana", + "extensions": ["tpl"] + }, + "application/vnd.groove-vcard": { + "source": "iana", + "extensions": ["vcg"] + }, + "application/vnd.hal+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.hal+xml": { + "source": "iana", + "compressible": true, + "extensions": ["hal"] + }, + "application/vnd.handheld-entertainment+xml": { + "source": "iana", + "compressible": true, + "extensions": ["zmm"] + }, + "application/vnd.hbci": { + "source": "iana", + "extensions": ["hbci"] + }, + "application/vnd.hc+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.hcl-bireports": { + "source": "iana" + }, + "application/vnd.hdt": { + "source": "iana" + }, + "application/vnd.heroku+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.hhe.lesson-player": { + "source": "iana", + "extensions": ["les"] + }, + "application/vnd.hp-hpgl": { + "source": "iana", + "extensions": ["hpgl"] + }, + "application/vnd.hp-hpid": { + "source": "iana", + "extensions": ["hpid"] + }, + "application/vnd.hp-hps": { + "source": "iana", + "extensions": ["hps"] + }, + "application/vnd.hp-jlyt": { + "source": "iana", + "extensions": ["jlt"] + }, + "application/vnd.hp-pcl": { + "source": "iana", + "extensions": ["pcl"] + }, + "application/vnd.hp-pclxl": { + "source": "iana", + "extensions": ["pclxl"] + }, + "application/vnd.hsl": { + "source": "iana" + }, + "application/vnd.httphone": { + "source": "iana" + }, + "application/vnd.hydrostatix.sof-data": { + "source": "iana", + "extensions": ["sfd-hdstx"] + }, + "application/vnd.hyper+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.hyper-item+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.hyperdrive+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.hzn-3d-crossword": { + "source": "iana" + }, + "application/vnd.ibm.afplinedata": { + "source": "apache" + }, + "application/vnd.ibm.electronic-media": { + "source": "iana" + }, + "application/vnd.ibm.minipay": { + "source": "iana", + "extensions": ["mpy"] + }, + "application/vnd.ibm.modcap": { + "source": "apache", + "extensions": ["afp","listafp","list3820"] + }, + "application/vnd.ibm.rights-management": { + "source": "iana", + "extensions": ["irm"] + }, + "application/vnd.ibm.secure-container": { + "source": "iana", + "extensions": ["sc"] + }, + "application/vnd.iccprofile": { + "source": "iana", + "extensions": ["icc","icm"] + }, + "application/vnd.ieee.1905": { + "source": "iana" + }, + "application/vnd.igloader": { + "source": "iana", + "extensions": ["igl"] + }, + "application/vnd.imagemeter.folder+zip": { + "source": "iana", + "compressible": false + }, + "application/vnd.imagemeter.image+zip": { + "source": "iana", + "compressible": false + }, + "application/vnd.immervision-ivp": { + "source": "iana", + "extensions": ["ivp"] + }, + "application/vnd.immervision-ivu": { + "source": "iana", + "extensions": ["ivu"] + }, + "application/vnd.ims.imsccv1p1": { + "source": "iana" + }, + "application/vnd.ims.imsccv1p2": { + "source": "iana" + }, + "application/vnd.ims.imsccv1p3": { + "source": "iana" + }, + "application/vnd.ims.lis.v2.result+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.ims.lti.v2.toolconsumerprofile+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.ims.lti.v2.toolproxy+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.ims.lti.v2.toolproxy.id+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.ims.lti.v2.toolsettings+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.ims.lti.v2.toolsettings.simple+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.informedcontrol.rms+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.informix-visionary": { + "source": "apache" + }, + "application/vnd.infotech.project": { + "source": "iana" + }, + "application/vnd.infotech.project+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.innopath.wamp.notification": { + "source": "iana" + }, + "application/vnd.insors.igm": { + "source": "iana", + "extensions": ["igm"] + }, + "application/vnd.intercon.formnet": { + "source": "iana", + "extensions": ["xpw","xpx"] + }, + "application/vnd.intergeo": { + "source": "iana", + "extensions": ["i2g"] + }, + "application/vnd.intertrust.digibox": { + "source": "iana" + }, + "application/vnd.intertrust.nncp": { + "source": "iana" + }, + "application/vnd.intu.qbo": { + "source": "iana", + "extensions": ["qbo"] + }, + "application/vnd.intu.qfx": { + "source": "iana", + "extensions": ["qfx"] + }, + "application/vnd.ipfs.ipns-record": { + "source": "iana" + }, + "application/vnd.ipld.car": { + "source": "iana" + }, + "application/vnd.ipld.dag-cbor": { + "source": "iana" + }, + "application/vnd.ipld.dag-json": { + "source": "iana" + }, + "application/vnd.ipld.raw": { + "source": "iana" + }, + "application/vnd.iptc.g2.catalogitem+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.iptc.g2.conceptitem+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.iptc.g2.knowledgeitem+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.iptc.g2.newsitem+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.iptc.g2.newsmessage+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.iptc.g2.packageitem+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.iptc.g2.planningitem+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.ipunplugged.rcprofile": { + "source": "iana", + "extensions": ["rcprofile"] + }, + "application/vnd.irepository.package+xml": { + "source": "iana", + "compressible": true, + "extensions": ["irp"] + }, + "application/vnd.is-xpr": { + "source": "iana", + "extensions": ["xpr"] + }, + "application/vnd.isac.fcs": { + "source": "iana", + "extensions": ["fcs"] + }, + "application/vnd.iso11783-10+zip": { + "source": "iana", + "compressible": false + }, + "application/vnd.jam": { + "source": "iana", + "extensions": ["jam"] + }, + "application/vnd.japannet-directory-service": { + "source": "iana" + }, + "application/vnd.japannet-jpnstore-wakeup": { + "source": "iana" + }, + "application/vnd.japannet-payment-wakeup": { + "source": "iana" + }, + "application/vnd.japannet-registration": { + "source": "iana" + }, + "application/vnd.japannet-registration-wakeup": { + "source": "iana" + }, + "application/vnd.japannet-setstore-wakeup": { + "source": "iana" + }, + "application/vnd.japannet-verification": { + "source": "iana" + }, + "application/vnd.japannet-verification-wakeup": { + "source": "iana" + }, + "application/vnd.jcp.javame.midlet-rms": { + "source": "iana", + "extensions": ["rms"] + }, + "application/vnd.jisp": { + "source": "iana", + "extensions": ["jisp"] + }, + "application/vnd.joost.joda-archive": { + "source": "iana", + "extensions": ["joda"] + }, + "application/vnd.jsk.isdn-ngn": { + "source": "iana" + }, + "application/vnd.kahootz": { + "source": "iana", + "extensions": ["ktz","ktr"] + }, + "application/vnd.kde.karbon": { + "source": "iana", + "extensions": ["karbon"] + }, + "application/vnd.kde.kchart": { + "source": "iana", + "extensions": ["chrt"] + }, + "application/vnd.kde.kformula": { + "source": "iana", + "extensions": ["kfo"] + }, + "application/vnd.kde.kivio": { + "source": "iana", + "extensions": ["flw"] + }, + "application/vnd.kde.kontour": { + "source": "iana", + "extensions": ["kon"] + }, + "application/vnd.kde.kpresenter": { + "source": "iana", + "extensions": ["kpr","kpt"] + }, + "application/vnd.kde.kspread": { + "source": "iana", + "extensions": ["ksp"] + }, + "application/vnd.kde.kword": { + "source": "iana", + "extensions": ["kwd","kwt"] + }, + "application/vnd.kdl": { + "source": "iana" + }, + "application/vnd.kenameaapp": { + "source": "iana", + "extensions": ["htke"] + }, + "application/vnd.keyman.kmp+zip": { + "source": "iana", + "compressible": false + }, + "application/vnd.keyman.kmx": { + "source": "iana" + }, + "application/vnd.kidspiration": { + "source": "iana", + "extensions": ["kia"] + }, + "application/vnd.kinar": { + "source": "iana", + "extensions": ["kne","knp"] + }, + "application/vnd.koan": { + "source": "iana", + "extensions": ["skp","skd","skt","skm"] + }, + "application/vnd.kodak-descriptor": { + "source": "iana", + "extensions": ["sse"] + }, + "application/vnd.las": { + "source": "iana" + }, + "application/vnd.las.las+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.las.las+xml": { + "source": "iana", + "compressible": true, + "extensions": ["lasxml"] + }, + "application/vnd.laszip": { + "source": "iana" + }, + "application/vnd.ldev.productlicensing": { + "source": "iana" + }, + "application/vnd.leap+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.liberty-request+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.llamagraphics.life-balance.desktop": { + "source": "iana", + "extensions": ["lbd"] + }, + "application/vnd.llamagraphics.life-balance.exchange+xml": { + "source": "iana", + "compressible": true, + "extensions": ["lbe"] + }, + "application/vnd.logipipe.circuit+zip": { + "source": "iana", + "compressible": false + }, + "application/vnd.loom": { + "source": "iana" + }, + "application/vnd.lotus-1-2-3": { + "source": "iana", + "extensions": ["123"] + }, + "application/vnd.lotus-approach": { + "source": "iana", + "extensions": ["apr"] + }, + "application/vnd.lotus-freelance": { + "source": "iana", + "extensions": ["pre"] + }, + "application/vnd.lotus-notes": { + "source": "iana", + "extensions": ["nsf"] + }, + "application/vnd.lotus-organizer": { + "source": "iana", + "extensions": ["org"] + }, + "application/vnd.lotus-screencam": { + "source": "iana", + "extensions": ["scm"] + }, + "application/vnd.lotus-wordpro": { + "source": "iana", + "extensions": ["lwp"] + }, + "application/vnd.macports.portpkg": { + "source": "iana", + "extensions": ["portpkg"] + }, + "application/vnd.mapbox-vector-tile": { + "source": "iana", + "extensions": ["mvt"] + }, + "application/vnd.marlin.drm.actiontoken+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.marlin.drm.conftoken+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.marlin.drm.license+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.marlin.drm.mdcf": { + "source": "iana" + }, + "application/vnd.mason+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.maxar.archive.3tz+zip": { + "source": "iana", + "compressible": false + }, + "application/vnd.maxmind.maxmind-db": { + "source": "iana" + }, + "application/vnd.mcd": { + "source": "iana", + "extensions": ["mcd"] + }, + "application/vnd.mdl": { + "source": "iana" + }, + "application/vnd.mdl-mbsdf": { + "source": "iana" + }, + "application/vnd.medcalcdata": { + "source": "iana", + "extensions": ["mc1"] + }, + "application/vnd.mediastation.cdkey": { + "source": "iana", + "extensions": ["cdkey"] + }, + "application/vnd.medicalholodeck.recordxr": { + "source": "iana" + }, + "application/vnd.meridian-slingshot": { + "source": "iana" + }, + "application/vnd.mermaid": { + "source": "iana" + }, + "application/vnd.mfer": { + "source": "iana", + "extensions": ["mwf"] + }, + "application/vnd.mfmp": { + "source": "iana", + "extensions": ["mfm"] + }, + "application/vnd.micro+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.micrografx.flo": { + "source": "iana", + "extensions": ["flo"] + }, + "application/vnd.micrografx.igx": { + "source": "iana", + "extensions": ["igx"] + }, + "application/vnd.microsoft.portable-executable": { + "source": "iana" + }, + "application/vnd.microsoft.windows.thumbnail-cache": { + "source": "iana" + }, + "application/vnd.miele+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.mif": { + "source": "iana", + "extensions": ["mif"] + }, + "application/vnd.minisoft-hp3000-save": { + "source": "iana" + }, + "application/vnd.mitsubishi.misty-guard.trustweb": { + "source": "iana" + }, + "application/vnd.mobius.daf": { + "source": "iana", + "extensions": ["daf"] + }, + "application/vnd.mobius.dis": { + "source": "iana", + "extensions": ["dis"] + }, + "application/vnd.mobius.mbk": { + "source": "iana", + "extensions": ["mbk"] + }, + "application/vnd.mobius.mqy": { + "source": "iana", + "extensions": ["mqy"] + }, + "application/vnd.mobius.msl": { + "source": "iana", + "extensions": ["msl"] + }, + "application/vnd.mobius.plc": { + "source": "iana", + "extensions": ["plc"] + }, + "application/vnd.mobius.txf": { + "source": "iana", + "extensions": ["txf"] + }, + "application/vnd.modl": { + "source": "iana" + }, + "application/vnd.mophun.application": { + "source": "iana", + "extensions": ["mpn"] + }, + "application/vnd.mophun.certificate": { + "source": "iana", + "extensions": ["mpc"] + }, + "application/vnd.motorola.flexsuite": { + "source": "iana" + }, + "application/vnd.motorola.flexsuite.adsi": { + "source": "iana" + }, + "application/vnd.motorola.flexsuite.fis": { + "source": "iana" + }, + "application/vnd.motorola.flexsuite.gotap": { + "source": "iana" + }, + "application/vnd.motorola.flexsuite.kmr": { + "source": "iana" + }, + "application/vnd.motorola.flexsuite.ttc": { + "source": "iana" + }, + "application/vnd.motorola.flexsuite.wem": { + "source": "iana" + }, + "application/vnd.motorola.iprm": { + "source": "iana" + }, + "application/vnd.mozilla.xul+xml": { + "source": "iana", + "compressible": true, + "extensions": ["xul"] + }, + "application/vnd.ms-3mfdocument": { + "source": "iana" + }, + "application/vnd.ms-artgalry": { + "source": "iana", + "extensions": ["cil"] + }, + "application/vnd.ms-asf": { + "source": "iana" + }, + "application/vnd.ms-cab-compressed": { + "source": "iana", + "extensions": ["cab"] + }, + "application/vnd.ms-color.iccprofile": { + "source": "apache" + }, + "application/vnd.ms-excel": { + "source": "iana", + "compressible": false, + "extensions": ["xls","xlm","xla","xlc","xlt","xlw"] + }, + "application/vnd.ms-excel.addin.macroenabled.12": { + "source": "iana", + "extensions": ["xlam"] + }, + "application/vnd.ms-excel.sheet.binary.macroenabled.12": { + "source": "iana", + "extensions": ["xlsb"] + }, + "application/vnd.ms-excel.sheet.macroenabled.12": { + "source": "iana", + "extensions": ["xlsm"] + }, + "application/vnd.ms-excel.template.macroenabled.12": { + "source": "iana", + "extensions": ["xltm"] + }, + "application/vnd.ms-fontobject": { + "source": "iana", + "compressible": true, + "extensions": ["eot"] + }, + "application/vnd.ms-htmlhelp": { + "source": "iana", + "extensions": ["chm"] + }, + "application/vnd.ms-ims": { + "source": "iana", + "extensions": ["ims"] + }, + "application/vnd.ms-lrm": { + "source": "iana", + "extensions": ["lrm"] + }, + "application/vnd.ms-office.activex+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.ms-officetheme": { + "source": "iana", + "extensions": ["thmx"] + }, + "application/vnd.ms-opentype": { + "source": "apache", + "compressible": true + }, + "application/vnd.ms-outlook": { + "compressible": false, + "extensions": ["msg"] + }, + "application/vnd.ms-package.obfuscated-opentype": { + "source": "apache" + }, + "application/vnd.ms-pki.seccat": { + "source": "apache", + "extensions": ["cat"] + }, + "application/vnd.ms-pki.stl": { + "source": "apache", + "extensions": ["stl"] + }, + "application/vnd.ms-playready.initiator+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.ms-powerpoint": { + "source": "iana", + "compressible": false, + "extensions": ["ppt","pps","pot"] + }, + "application/vnd.ms-powerpoint.addin.macroenabled.12": { + "source": "iana", + "extensions": ["ppam"] + }, + "application/vnd.ms-powerpoint.presentation.macroenabled.12": { + "source": "iana", + "extensions": ["pptm"] + }, + "application/vnd.ms-powerpoint.slide.macroenabled.12": { + "source": "iana", + "extensions": ["sldm"] + }, + "application/vnd.ms-powerpoint.slideshow.macroenabled.12": { + "source": "iana", + "extensions": ["ppsm"] + }, + "application/vnd.ms-powerpoint.template.macroenabled.12": { + "source": "iana", + "extensions": ["potm"] + }, + "application/vnd.ms-printdevicecapabilities+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.ms-printing.printticket+xml": { + "source": "apache", + "compressible": true + }, + "application/vnd.ms-printschematicket+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.ms-project": { + "source": "iana", + "extensions": ["mpp","mpt"] + }, + "application/vnd.ms-tnef": { + "source": "iana" + }, + "application/vnd.ms-visio.viewer": { + "extensions": ["vdx"] + }, + "application/vnd.ms-windows.devicepairing": { + "source": "iana" + }, + "application/vnd.ms-windows.nwprinting.oob": { + "source": "iana" + }, + "application/vnd.ms-windows.printerpairing": { + "source": "iana" + }, + "application/vnd.ms-windows.wsd.oob": { + "source": "iana" + }, + "application/vnd.ms-wmdrm.lic-chlg-req": { + "source": "iana" + }, + "application/vnd.ms-wmdrm.lic-resp": { + "source": "iana" + }, + "application/vnd.ms-wmdrm.meter-chlg-req": { + "source": "iana" + }, + "application/vnd.ms-wmdrm.meter-resp": { + "source": "iana" + }, + "application/vnd.ms-word.document.macroenabled.12": { + "source": "iana", + "extensions": ["docm"] + }, + "application/vnd.ms-word.template.macroenabled.12": { + "source": "iana", + "extensions": ["dotm"] + }, + "application/vnd.ms-works": { + "source": "iana", + "extensions": ["wps","wks","wcm","wdb"] + }, + "application/vnd.ms-wpl": { + "source": "iana", + "extensions": ["wpl"] + }, + "application/vnd.ms-xpsdocument": { + "source": "iana", + "compressible": false, + "extensions": ["xps"] + }, + "application/vnd.msa-disk-image": { + "source": "iana" + }, + "application/vnd.mseq": { + "source": "iana", + "extensions": ["mseq"] + }, + "application/vnd.msgpack": { + "source": "iana" + }, + "application/vnd.msign": { + "source": "iana" + }, + "application/vnd.multiad.creator": { + "source": "iana" + }, + "application/vnd.multiad.creator.cif": { + "source": "iana" + }, + "application/vnd.music-niff": { + "source": "iana" + }, + "application/vnd.musician": { + "source": "iana", + "extensions": ["mus"] + }, + "application/vnd.muvee.style": { + "source": "iana", + "extensions": ["msty"] + }, + "application/vnd.mynfc": { + "source": "iana", + "extensions": ["taglet"] + }, + "application/vnd.nacamar.ybrid+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.nato.bindingdataobject+cbor": { + "source": "iana" + }, + "application/vnd.nato.bindingdataobject+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.nato.bindingdataobject+xml": { + "source": "iana", + "compressible": true, + "extensions": ["bdo"] + }, + "application/vnd.nato.openxmlformats-package.iepd+zip": { + "source": "iana", + "compressible": false + }, + "application/vnd.ncd.control": { + "source": "iana" + }, + "application/vnd.ncd.reference": { + "source": "iana" + }, + "application/vnd.nearst.inv+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.nebumind.line": { + "source": "iana" + }, + "application/vnd.nervana": { + "source": "iana" + }, + "application/vnd.netfpx": { + "source": "iana" + }, + "application/vnd.neurolanguage.nlu": { + "source": "iana", + "extensions": ["nlu"] + }, + "application/vnd.nimn": { + "source": "iana" + }, + "application/vnd.nintendo.nitro.rom": { + "source": "iana" + }, + "application/vnd.nintendo.snes.rom": { + "source": "iana" + }, + "application/vnd.nitf": { + "source": "iana", + "extensions": ["ntf","nitf"] + }, + "application/vnd.noblenet-directory": { + "source": "iana", + "extensions": ["nnd"] + }, + "application/vnd.noblenet-sealer": { + "source": "iana", + "extensions": ["nns"] + }, + "application/vnd.noblenet-web": { + "source": "iana", + "extensions": ["nnw"] + }, + "application/vnd.nokia.catalogs": { + "source": "iana" + }, + "application/vnd.nokia.conml+wbxml": { + "source": "iana" + }, + "application/vnd.nokia.conml+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.nokia.iptv.config+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.nokia.isds-radio-presets": { + "source": "iana" + }, + "application/vnd.nokia.landmark+wbxml": { + "source": "iana" + }, + "application/vnd.nokia.landmark+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.nokia.landmarkcollection+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.nokia.n-gage.ac+xml": { + "source": "iana", + "compressible": true, + "extensions": ["ac"] + }, + "application/vnd.nokia.n-gage.data": { + "source": "iana", + "extensions": ["ngdat"] + }, + "application/vnd.nokia.n-gage.symbian.install": { + "source": "apache", + "extensions": ["n-gage"] + }, + "application/vnd.nokia.ncd": { + "source": "iana" + }, + "application/vnd.nokia.pcd+wbxml": { + "source": "iana" + }, + "application/vnd.nokia.pcd+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.nokia.radio-preset": { + "source": "iana", + "extensions": ["rpst"] + }, + "application/vnd.nokia.radio-presets": { + "source": "iana", + "extensions": ["rpss"] + }, + "application/vnd.novadigm.edm": { + "source": "iana", + "extensions": ["edm"] + }, + "application/vnd.novadigm.edx": { + "source": "iana", + "extensions": ["edx"] + }, + "application/vnd.novadigm.ext": { + "source": "iana", + "extensions": ["ext"] + }, + "application/vnd.ntt-local.content-share": { + "source": "iana" + }, + "application/vnd.ntt-local.file-transfer": { + "source": "iana" + }, + "application/vnd.ntt-local.ogw_remote-access": { + "source": "iana" + }, + "application/vnd.ntt-local.sip-ta_remote": { + "source": "iana" + }, + "application/vnd.ntt-local.sip-ta_tcp_stream": { + "source": "iana" + }, + "application/vnd.oai.workflows": { + "source": "iana" + }, + "application/vnd.oai.workflows+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.oai.workflows+yaml": { + "source": "iana" + }, + "application/vnd.oasis.opendocument.base": { + "source": "iana" + }, + "application/vnd.oasis.opendocument.chart": { + "source": "iana", + "extensions": ["odc"] + }, + "application/vnd.oasis.opendocument.chart-template": { + "source": "iana", + "extensions": ["otc"] + }, + "application/vnd.oasis.opendocument.database": { + "source": "apache", + "extensions": ["odb"] + }, + "application/vnd.oasis.opendocument.formula": { + "source": "iana", + "extensions": ["odf"] + }, + "application/vnd.oasis.opendocument.formula-template": { + "source": "iana", + "extensions": ["odft"] + }, + "application/vnd.oasis.opendocument.graphics": { + "source": "iana", + "compressible": false, + "extensions": ["odg"] + }, + "application/vnd.oasis.opendocument.graphics-template": { + "source": "iana", + "extensions": ["otg"] + }, + "application/vnd.oasis.opendocument.image": { + "source": "iana", + "extensions": ["odi"] + }, + "application/vnd.oasis.opendocument.image-template": { + "source": "iana", + "extensions": ["oti"] + }, + "application/vnd.oasis.opendocument.presentation": { + "source": "iana", + "compressible": false, + "extensions": ["odp"] + }, + "application/vnd.oasis.opendocument.presentation-template": { + "source": "iana", + "extensions": ["otp"] + }, + "application/vnd.oasis.opendocument.spreadsheet": { + "source": "iana", + "compressible": false, + "extensions": ["ods"] + }, + "application/vnd.oasis.opendocument.spreadsheet-template": { + "source": "iana", + "extensions": ["ots"] + }, + "application/vnd.oasis.opendocument.text": { + "source": "iana", + "compressible": false, + "extensions": ["odt"] + }, + "application/vnd.oasis.opendocument.text-master": { + "source": "iana", + "extensions": ["odm"] + }, + "application/vnd.oasis.opendocument.text-master-template": { + "source": "iana" + }, + "application/vnd.oasis.opendocument.text-template": { + "source": "iana", + "extensions": ["ott"] + }, + "application/vnd.oasis.opendocument.text-web": { + "source": "iana", + "extensions": ["oth"] + }, + "application/vnd.obn": { + "source": "iana" + }, + "application/vnd.ocf+cbor": { + "source": "iana" + }, + "application/vnd.oci.image.manifest.v1+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.oftn.l10n+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.oipf.contentaccessdownload+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oipf.contentaccessstreaming+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oipf.cspg-hexbinary": { + "source": "iana" + }, + "application/vnd.oipf.dae.svg+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oipf.dae.xhtml+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oipf.mippvcontrolmessage+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oipf.pae.gem": { + "source": "iana" + }, + "application/vnd.oipf.spdiscovery+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oipf.spdlist+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oipf.ueprofile+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oipf.userprofile+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.olpc-sugar": { + "source": "iana", + "extensions": ["xo"] + }, + "application/vnd.oma-scws-config": { + "source": "iana" + }, + "application/vnd.oma-scws-http-request": { + "source": "iana" + }, + "application/vnd.oma-scws-http-response": { + "source": "iana" + }, + "application/vnd.oma.bcast.associated-procedure-parameter+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oma.bcast.drm-trigger+xml": { + "source": "apache", + "compressible": true + }, + "application/vnd.oma.bcast.imd+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oma.bcast.ltkm": { + "source": "iana" + }, + "application/vnd.oma.bcast.notification+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oma.bcast.provisioningtrigger": { + "source": "iana" + }, + "application/vnd.oma.bcast.sgboot": { + "source": "iana" + }, + "application/vnd.oma.bcast.sgdd+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oma.bcast.sgdu": { + "source": "iana" + }, + "application/vnd.oma.bcast.simple-symbol-container": { + "source": "iana" + }, + "application/vnd.oma.bcast.smartcard-trigger+xml": { + "source": "apache", + "compressible": true + }, + "application/vnd.oma.bcast.sprov+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oma.bcast.stkm": { + "source": "iana" + }, + "application/vnd.oma.cab-address-book+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oma.cab-feature-handler+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oma.cab-pcc+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oma.cab-subs-invite+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oma.cab-user-prefs+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oma.dcd": { + "source": "iana" + }, + "application/vnd.oma.dcdc": { + "source": "iana" + }, + "application/vnd.oma.dd2+xml": { + "source": "iana", + "compressible": true, + "extensions": ["dd2"] + }, + "application/vnd.oma.drm.risd+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oma.group-usage-list+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oma.lwm2m+cbor": { + "source": "iana" + }, + "application/vnd.oma.lwm2m+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.oma.lwm2m+tlv": { + "source": "iana" + }, + "application/vnd.oma.pal+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oma.poc.detailed-progress-report+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oma.poc.final-report+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oma.poc.groups+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oma.poc.invocation-descriptor+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oma.poc.optimized-progress-report+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oma.push": { + "source": "iana" + }, + "application/vnd.oma.scidm.messages+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oma.xcap-directory+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.omads-email+xml": { + "source": "iana", + "charset": "UTF-8", + "compressible": true + }, + "application/vnd.omads-file+xml": { + "source": "iana", + "charset": "UTF-8", + "compressible": true + }, + "application/vnd.omads-folder+xml": { + "source": "iana", + "charset": "UTF-8", + "compressible": true + }, + "application/vnd.omaloc-supl-init": { + "source": "iana" + }, + "application/vnd.onepager": { + "source": "iana" + }, + "application/vnd.onepagertamp": { + "source": "iana" + }, + "application/vnd.onepagertamx": { + "source": "iana" + }, + "application/vnd.onepagertat": { + "source": "iana" + }, + "application/vnd.onepagertatp": { + "source": "iana" + }, + "application/vnd.onepagertatx": { + "source": "iana" + }, + "application/vnd.onvif.metadata": { + "source": "iana" + }, + "application/vnd.openblox.game+xml": { + "source": "iana", + "compressible": true, + "extensions": ["obgx"] + }, + "application/vnd.openblox.game-binary": { + "source": "iana" + }, + "application/vnd.openeye.oeb": { + "source": "iana" + }, + "application/vnd.openofficeorg.extension": { + "source": "apache", + "extensions": ["oxt"] + }, + "application/vnd.openstreetmap.data+xml": { + "source": "iana", + "compressible": true, + "extensions": ["osm"] + }, + "application/vnd.opentimestamps.ots": { + "source": "iana" + }, + "application/vnd.openvpi.dspx+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.custom-properties+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.customxmlproperties+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.drawing+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.drawingml.chart+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.drawingml.chartshapes+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.drawingml.diagramcolors+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.drawingml.diagramdata+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.drawingml.diagramlayout+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.drawingml.diagramstyle+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.extended-properties+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.presentationml.commentauthors+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.presentationml.comments+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.presentationml.handoutmaster+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.presentationml.notesmaster+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.presentationml.notesslide+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.presentationml.presentation": { + "source": "iana", + "compressible": false, + "extensions": ["pptx"] + }, + "application/vnd.openxmlformats-officedocument.presentationml.presentation.main+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.presentationml.presprops+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.presentationml.slide": { + "source": "iana", + "extensions": ["sldx"] + }, + "application/vnd.openxmlformats-officedocument.presentationml.slide+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.presentationml.slidelayout+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.presentationml.slidemaster+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.presentationml.slideshow": { + "source": "iana", + "extensions": ["ppsx"] + }, + "application/vnd.openxmlformats-officedocument.presentationml.slideshow.main+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.presentationml.slideupdateinfo+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.presentationml.tablestyles+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.presentationml.tags+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.presentationml.template": { + "source": "iana", + "extensions": ["potx"] + }, + "application/vnd.openxmlformats-officedocument.presentationml.template.main+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.presentationml.viewprops+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.calcchain+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.chartsheet+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.connections+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.dialogsheet+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.externallink+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcachedefinition+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcacherecords+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.pivottable+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.querytable+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.revisionheaders+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.revisionlog+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.sharedstrings+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": { + "source": "iana", + "compressible": false, + "extensions": ["xlsx"] + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.sheetmetadata+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.tablesinglecells+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.template": { + "source": "iana", + "extensions": ["xltx"] + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.template.main+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.usernames+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.volatiledependencies+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.theme+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.themeoverride+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.vmldrawing": { + "source": "iana" + }, + "application/vnd.openxmlformats-officedocument.wordprocessingml.comments+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.wordprocessingml.document": { + "source": "iana", + "compressible": false, + "extensions": ["docx"] + }, + "application/vnd.openxmlformats-officedocument.wordprocessingml.document.glossary+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.wordprocessingml.endnotes+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.wordprocessingml.fonttable+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.wordprocessingml.footer+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.wordprocessingml.footnotes+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.wordprocessingml.numbering+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.wordprocessingml.settings+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.wordprocessingml.styles+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.wordprocessingml.template": { + "source": "iana", + "extensions": ["dotx"] + }, + "application/vnd.openxmlformats-officedocument.wordprocessingml.template.main+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.wordprocessingml.websettings+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-package.core-properties+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-package.digital-signature-xmlsignature+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-package.relationships+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oracle.resource+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.orange.indata": { + "source": "iana" + }, + "application/vnd.osa.netdeploy": { + "source": "iana" + }, + "application/vnd.osgeo.mapguide.package": { + "source": "iana", + "extensions": ["mgp"] + }, + "application/vnd.osgi.bundle": { + "source": "iana" + }, + "application/vnd.osgi.dp": { + "source": "iana", + "extensions": ["dp"] + }, + "application/vnd.osgi.subsystem": { + "source": "iana", + "extensions": ["esa"] + }, + "application/vnd.otps.ct-kip+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oxli.countgraph": { + "source": "iana" + }, + "application/vnd.pagerduty+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.palm": { + "source": "iana", + "extensions": ["pdb","pqa","oprc"] + }, + "application/vnd.panoply": { + "source": "iana" + }, + "application/vnd.paos.xml": { + "source": "iana" + }, + "application/vnd.patentdive": { + "source": "iana" + }, + "application/vnd.patientecommsdoc": { + "source": "iana" + }, + "application/vnd.pawaafile": { + "source": "iana", + "extensions": ["paw"] + }, + "application/vnd.pcos": { + "source": "iana" + }, + "application/vnd.pg.format": { + "source": "iana", + "extensions": ["str"] + }, + "application/vnd.pg.osasli": { + "source": "iana", + "extensions": ["ei6"] + }, + "application/vnd.piaccess.application-licence": { + "source": "iana" + }, + "application/vnd.picsel": { + "source": "iana", + "extensions": ["efif"] + }, + "application/vnd.pmi.widget": { + "source": "iana", + "extensions": ["wg"] + }, + "application/vnd.poc.group-advertisement+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.pocketlearn": { + "source": "iana", + "extensions": ["plf"] + }, + "application/vnd.powerbuilder6": { + "source": "iana", + "extensions": ["pbd"] + }, + "application/vnd.powerbuilder6-s": { + "source": "iana" + }, + "application/vnd.powerbuilder7": { + "source": "iana" + }, + "application/vnd.powerbuilder7-s": { + "source": "iana" + }, + "application/vnd.powerbuilder75": { + "source": "iana" + }, + "application/vnd.powerbuilder75-s": { + "source": "iana" + }, + "application/vnd.preminet": { + "source": "iana" + }, + "application/vnd.previewsystems.box": { + "source": "iana", + "extensions": ["box"] + }, + "application/vnd.procrate.brushset": { + "extensions": ["brushset"] + }, + "application/vnd.procreate.brush": { + "extensions": ["brush"] + }, + "application/vnd.procreate.dream": { + "extensions": ["drm"] + }, + "application/vnd.proteus.magazine": { + "source": "iana", + "extensions": ["mgz"] + }, + "application/vnd.psfs": { + "source": "iana" + }, + "application/vnd.pt.mundusmundi": { + "source": "iana" + }, + "application/vnd.publishare-delta-tree": { + "source": "iana", + "extensions": ["qps"] + }, + "application/vnd.pvi.ptid1": { + "source": "iana", + "extensions": ["ptid"] + }, + "application/vnd.pwg-multiplexed": { + "source": "iana" + }, + "application/vnd.pwg-xhtml-print+xml": { + "source": "iana", + "compressible": true, + "extensions": ["xhtm"] + }, + "application/vnd.qualcomm.brew-app-res": { + "source": "iana" + }, + "application/vnd.quarantainenet": { + "source": "iana" + }, + "application/vnd.quark.quarkxpress": { + "source": "iana", + "extensions": ["qxd","qxt","qwd","qwt","qxl","qxb"] + }, + "application/vnd.quobject-quoxdocument": { + "source": "iana" + }, + "application/vnd.radisys.moml+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.radisys.msml+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.radisys.msml-audit+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.radisys.msml-audit-conf+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.radisys.msml-audit-conn+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.radisys.msml-audit-dialog+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.radisys.msml-audit-stream+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.radisys.msml-conf+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.radisys.msml-dialog+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.radisys.msml-dialog-base+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.radisys.msml-dialog-fax-detect+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.radisys.msml-dialog-fax-sendrecv+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.radisys.msml-dialog-group+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.radisys.msml-dialog-speech+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.radisys.msml-dialog-transform+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.rainstor.data": { + "source": "iana" + }, + "application/vnd.rapid": { + "source": "iana" + }, + "application/vnd.rar": { + "source": "iana", + "extensions": ["rar"] + }, + "application/vnd.realvnc.bed": { + "source": "iana", + "extensions": ["bed"] + }, + "application/vnd.recordare.musicxml": { + "source": "iana", + "extensions": ["mxl"] + }, + "application/vnd.recordare.musicxml+xml": { + "source": "iana", + "compressible": true, + "extensions": ["musicxml"] + }, + "application/vnd.relpipe": { + "source": "iana" + }, + "application/vnd.renlearn.rlprint": { + "source": "iana" + }, + "application/vnd.resilient.logic": { + "source": "iana" + }, + "application/vnd.restful+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.rig.cryptonote": { + "source": "iana", + "extensions": ["cryptonote"] + }, + "application/vnd.rim.cod": { + "source": "apache", + "extensions": ["cod"] + }, + "application/vnd.rn-realmedia": { + "source": "apache", + "extensions": ["rm"] + }, + "application/vnd.rn-realmedia-vbr": { + "source": "apache", + "extensions": ["rmvb"] + }, + "application/vnd.route66.link66+xml": { + "source": "iana", + "compressible": true, + "extensions": ["link66"] + }, + "application/vnd.rs-274x": { + "source": "iana" + }, + "application/vnd.ruckus.download": { + "source": "iana" + }, + "application/vnd.s3sms": { + "source": "iana" + }, + "application/vnd.sailingtracker.track": { + "source": "iana", + "extensions": ["st"] + }, + "application/vnd.sar": { + "source": "iana" + }, + "application/vnd.sbm.cid": { + "source": "iana" + }, + "application/vnd.sbm.mid2": { + "source": "iana" + }, + "application/vnd.scribus": { + "source": "iana" + }, + "application/vnd.sealed.3df": { + "source": "iana" + }, + "application/vnd.sealed.csf": { + "source": "iana" + }, + "application/vnd.sealed.doc": { + "source": "iana" + }, + "application/vnd.sealed.eml": { + "source": "iana" + }, + "application/vnd.sealed.mht": { + "source": "iana" + }, + "application/vnd.sealed.net": { + "source": "iana" + }, + "application/vnd.sealed.ppt": { + "source": "iana" + }, + "application/vnd.sealed.tiff": { + "source": "iana" + }, + "application/vnd.sealed.xls": { + "source": "iana" + }, + "application/vnd.sealedmedia.softseal.html": { + "source": "iana" + }, + "application/vnd.sealedmedia.softseal.pdf": { + "source": "iana" + }, + "application/vnd.seemail": { + "source": "iana", + "extensions": ["see"] + }, + "application/vnd.seis+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.sema": { + "source": "iana", + "extensions": ["sema"] + }, + "application/vnd.semd": { + "source": "iana", + "extensions": ["semd"] + }, + "application/vnd.semf": { + "source": "iana", + "extensions": ["semf"] + }, + "application/vnd.shade-save-file": { + "source": "iana" + }, + "application/vnd.shana.informed.formdata": { + "source": "iana", + "extensions": ["ifm"] + }, + "application/vnd.shana.informed.formtemplate": { + "source": "iana", + "extensions": ["itp"] + }, + "application/vnd.shana.informed.interchange": { + "source": "iana", + "extensions": ["iif"] + }, + "application/vnd.shana.informed.package": { + "source": "iana", + "extensions": ["ipk"] + }, + "application/vnd.shootproof+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.shopkick+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.shp": { + "source": "iana" + }, + "application/vnd.shx": { + "source": "iana" + }, + "application/vnd.sigrok.session": { + "source": "iana" + }, + "application/vnd.simtech-mindmapper": { + "source": "iana", + "extensions": ["twd","twds"] + }, + "application/vnd.siren+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.sketchometry": { + "source": "iana" + }, + "application/vnd.smaf": { + "source": "iana", + "extensions": ["mmf"] + }, + "application/vnd.smart.notebook": { + "source": "iana" + }, + "application/vnd.smart.teacher": { + "source": "iana", + "extensions": ["teacher"] + }, + "application/vnd.smintio.portals.archive": { + "source": "iana" + }, + "application/vnd.snesdev-page-table": { + "source": "iana" + }, + "application/vnd.software602.filler.form+xml": { + "source": "iana", + "compressible": true, + "extensions": ["fo"] + }, + "application/vnd.software602.filler.form-xml-zip": { + "source": "iana" + }, + "application/vnd.solent.sdkm+xml": { + "source": "iana", + "compressible": true, + "extensions": ["sdkm","sdkd"] + }, + "application/vnd.spotfire.dxp": { + "source": "iana", + "extensions": ["dxp"] + }, + "application/vnd.spotfire.sfs": { + "source": "iana", + "extensions": ["sfs"] + }, + "application/vnd.sqlite3": { + "source": "iana" + }, + "application/vnd.sss-cod": { + "source": "iana" + }, + "application/vnd.sss-dtf": { + "source": "iana" + }, + "application/vnd.sss-ntf": { + "source": "iana" + }, + "application/vnd.stardivision.calc": { + "source": "apache", + "extensions": ["sdc"] + }, + "application/vnd.stardivision.draw": { + "source": "apache", + "extensions": ["sda"] + }, + "application/vnd.stardivision.impress": { + "source": "apache", + "extensions": ["sdd"] + }, + "application/vnd.stardivision.math": { + "source": "apache", + "extensions": ["smf"] + }, + "application/vnd.stardivision.writer": { + "source": "apache", + "extensions": ["sdw","vor"] + }, + "application/vnd.stardivision.writer-global": { + "source": "apache", + "extensions": ["sgl"] + }, + "application/vnd.stepmania.package": { + "source": "iana", + "extensions": ["smzip"] + }, + "application/vnd.stepmania.stepchart": { + "source": "iana", + "extensions": ["sm"] + }, + "application/vnd.street-stream": { + "source": "iana" + }, + "application/vnd.sun.wadl+xml": { + "source": "iana", + "compressible": true, + "extensions": ["wadl"] + }, + "application/vnd.sun.xml.calc": { + "source": "apache", + "extensions": ["sxc"] + }, + "application/vnd.sun.xml.calc.template": { + "source": "apache", + "extensions": ["stc"] + }, + "application/vnd.sun.xml.draw": { + "source": "apache", + "extensions": ["sxd"] + }, + "application/vnd.sun.xml.draw.template": { + "source": "apache", + "extensions": ["std"] + }, + "application/vnd.sun.xml.impress": { + "source": "apache", + "extensions": ["sxi"] + }, + "application/vnd.sun.xml.impress.template": { + "source": "apache", + "extensions": ["sti"] + }, + "application/vnd.sun.xml.math": { + "source": "apache", + "extensions": ["sxm"] + }, + "application/vnd.sun.xml.writer": { + "source": "apache", + "extensions": ["sxw"] + }, + "application/vnd.sun.xml.writer.global": { + "source": "apache", + "extensions": ["sxg"] + }, + "application/vnd.sun.xml.writer.template": { + "source": "apache", + "extensions": ["stw"] + }, + "application/vnd.sus-calendar": { + "source": "iana", + "extensions": ["sus","susp"] + }, + "application/vnd.svd": { + "source": "iana", + "extensions": ["svd"] + }, + "application/vnd.swiftview-ics": { + "source": "iana" + }, + "application/vnd.sybyl.mol2": { + "source": "iana" + }, + "application/vnd.sycle+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.syft+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.symbian.install": { + "source": "apache", + "extensions": ["sis","sisx"] + }, + "application/vnd.syncml+xml": { + "source": "iana", + "charset": "UTF-8", + "compressible": true, + "extensions": ["xsm"] + }, + "application/vnd.syncml.dm+wbxml": { + "source": "iana", + "charset": "UTF-8", + "extensions": ["bdm"] + }, + "application/vnd.syncml.dm+xml": { + "source": "iana", + "charset": "UTF-8", + "compressible": true, + "extensions": ["xdm"] + }, + "application/vnd.syncml.dm.notification": { + "source": "iana" + }, + "application/vnd.syncml.dmddf+wbxml": { + "source": "iana" + }, + "application/vnd.syncml.dmddf+xml": { + "source": "iana", + "charset": "UTF-8", + "compressible": true, + "extensions": ["ddf"] + }, + "application/vnd.syncml.dmtnds+wbxml": { + "source": "iana" + }, + "application/vnd.syncml.dmtnds+xml": { + "source": "iana", + "charset": "UTF-8", + "compressible": true + }, + "application/vnd.syncml.ds.notification": { + "source": "iana" + }, + "application/vnd.tableschema+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.tao.intent-module-archive": { + "source": "iana", + "extensions": ["tao"] + }, + "application/vnd.tcpdump.pcap": { + "source": "iana", + "extensions": ["pcap","cap","dmp"] + }, + "application/vnd.think-cell.ppttc+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.tmd.mediaflex.api+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.tml": { + "source": "iana" + }, + "application/vnd.tmobile-livetv": { + "source": "iana", + "extensions": ["tmo"] + }, + "application/vnd.tri.onesource": { + "source": "iana" + }, + "application/vnd.trid.tpt": { + "source": "iana", + "extensions": ["tpt"] + }, + "application/vnd.triscape.mxs": { + "source": "iana", + "extensions": ["mxs"] + }, + "application/vnd.trueapp": { + "source": "iana", + "extensions": ["tra"] + }, + "application/vnd.truedoc": { + "source": "iana" + }, + "application/vnd.ubisoft.webplayer": { + "source": "iana" + }, + "application/vnd.ufdl": { + "source": "iana", + "extensions": ["ufd","ufdl"] + }, + "application/vnd.uic.osdm+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.uiq.theme": { + "source": "iana", + "extensions": ["utz"] + }, + "application/vnd.umajin": { + "source": "iana", + "extensions": ["umj"] + }, + "application/vnd.unity": { + "source": "iana", + "extensions": ["unityweb"] + }, + "application/vnd.uoml+xml": { + "source": "iana", + "compressible": true, + "extensions": ["uoml","uo"] + }, + "application/vnd.uplanet.alert": { + "source": "iana" + }, + "application/vnd.uplanet.alert-wbxml": { + "source": "iana" + }, + "application/vnd.uplanet.bearer-choice": { + "source": "iana" + }, + "application/vnd.uplanet.bearer-choice-wbxml": { + "source": "iana" + }, + "application/vnd.uplanet.cacheop": { + "source": "iana" + }, + "application/vnd.uplanet.cacheop-wbxml": { + "source": "iana" + }, + "application/vnd.uplanet.channel": { + "source": "iana" + }, + "application/vnd.uplanet.channel-wbxml": { + "source": "iana" + }, + "application/vnd.uplanet.list": { + "source": "iana" + }, + "application/vnd.uplanet.list-wbxml": { + "source": "iana" + }, + "application/vnd.uplanet.listcmd": { + "source": "iana" + }, + "application/vnd.uplanet.listcmd-wbxml": { + "source": "iana" + }, + "application/vnd.uplanet.signal": { + "source": "iana" + }, + "application/vnd.uri-map": { + "source": "iana" + }, + "application/vnd.valve.source.material": { + "source": "iana" + }, + "application/vnd.vcx": { + "source": "iana", + "extensions": ["vcx"] + }, + "application/vnd.vd-study": { + "source": "iana" + }, + "application/vnd.vectorworks": { + "source": "iana" + }, + "application/vnd.vel+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.veraison.tsm-report+cbor": { + "source": "iana" + }, + "application/vnd.veraison.tsm-report+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.verimatrix.vcas": { + "source": "iana" + }, + "application/vnd.veritone.aion+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.veryant.thin": { + "source": "iana" + }, + "application/vnd.ves.encrypted": { + "source": "iana" + }, + "application/vnd.vidsoft.vidconference": { + "source": "iana" + }, + "application/vnd.visio": { + "source": "iana", + "extensions": ["vsd","vst","vss","vsw","vsdx","vtx"] + }, + "application/vnd.visionary": { + "source": "iana", + "extensions": ["vis"] + }, + "application/vnd.vividence.scriptfile": { + "source": "iana" + }, + "application/vnd.vocalshaper.vsp4": { + "source": "iana" + }, + "application/vnd.vsf": { + "source": "iana", + "extensions": ["vsf"] + }, + "application/vnd.wap.sic": { + "source": "iana" + }, + "application/vnd.wap.slc": { + "source": "iana" + }, + "application/vnd.wap.wbxml": { + "source": "iana", + "charset": "UTF-8", + "extensions": ["wbxml"] + }, + "application/vnd.wap.wmlc": { + "source": "iana", + "extensions": ["wmlc"] + }, + "application/vnd.wap.wmlscriptc": { + "source": "iana", + "extensions": ["wmlsc"] + }, + "application/vnd.wasmflow.wafl": { + "source": "iana" + }, + "application/vnd.webturbo": { + "source": "iana", + "extensions": ["wtb"] + }, + "application/vnd.wfa.dpp": { + "source": "iana" + }, + "application/vnd.wfa.p2p": { + "source": "iana" + }, + "application/vnd.wfa.wsc": { + "source": "iana" + }, + "application/vnd.windows.devicepairing": { + "source": "iana" + }, + "application/vnd.wmc": { + "source": "iana" + }, + "application/vnd.wmf.bootstrap": { + "source": "iana" + }, + "application/vnd.wolfram.mathematica": { + "source": "iana" + }, + "application/vnd.wolfram.mathematica.package": { + "source": "iana" + }, + "application/vnd.wolfram.player": { + "source": "iana", + "extensions": ["nbp"] + }, + "application/vnd.wordlift": { + "source": "iana" + }, + "application/vnd.wordperfect": { + "source": "iana", + "extensions": ["wpd"] + }, + "application/vnd.wqd": { + "source": "iana", + "extensions": ["wqd"] + }, + "application/vnd.wrq-hp3000-labelled": { + "source": "iana" + }, + "application/vnd.wt.stf": { + "source": "iana", + "extensions": ["stf"] + }, + "application/vnd.wv.csp+wbxml": { + "source": "iana" + }, + "application/vnd.wv.csp+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.wv.ssp+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.xacml+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.xara": { + "source": "iana", + "extensions": ["xar"] + }, + "application/vnd.xarin.cpj": { + "source": "iana" + }, + "application/vnd.xecrets-encrypted": { + "source": "iana" + }, + "application/vnd.xfdl": { + "source": "iana", + "extensions": ["xfdl"] + }, + "application/vnd.xfdl.webform": { + "source": "iana" + }, + "application/vnd.xmi+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.xmpie.cpkg": { + "source": "iana" + }, + "application/vnd.xmpie.dpkg": { + "source": "iana" + }, + "application/vnd.xmpie.plan": { + "source": "iana" + }, + "application/vnd.xmpie.ppkg": { + "source": "iana" + }, + "application/vnd.xmpie.xlim": { + "source": "iana" + }, + "application/vnd.yamaha.hv-dic": { + "source": "iana", + "extensions": ["hvd"] + }, + "application/vnd.yamaha.hv-script": { + "source": "iana", + "extensions": ["hvs"] + }, + "application/vnd.yamaha.hv-voice": { + "source": "iana", + "extensions": ["hvp"] + }, + "application/vnd.yamaha.openscoreformat": { + "source": "iana", + "extensions": ["osf"] + }, + "application/vnd.yamaha.openscoreformat.osfpvg+xml": { + "source": "iana", + "compressible": true, + "extensions": ["osfpvg"] + }, + "application/vnd.yamaha.remote-setup": { + "source": "iana" + }, + "application/vnd.yamaha.smaf-audio": { + "source": "iana", + "extensions": ["saf"] + }, + "application/vnd.yamaha.smaf-phrase": { + "source": "iana", + "extensions": ["spf"] + }, + "application/vnd.yamaha.through-ngn": { + "source": "iana" + }, + "application/vnd.yamaha.tunnel-udpencap": { + "source": "iana" + }, + "application/vnd.yaoweme": { + "source": "iana" + }, + "application/vnd.yellowriver-custom-menu": { + "source": "iana", + "extensions": ["cmp"] + }, + "application/vnd.zul": { + "source": "iana", + "extensions": ["zir","zirz"] + }, + "application/vnd.zzazz.deck+xml": { + "source": "iana", + "compressible": true, + "extensions": ["zaz"] + }, + "application/voicexml+xml": { + "source": "iana", + "compressible": true, + "extensions": ["vxml"] + }, + "application/voucher-cms+json": { + "source": "iana", + "compressible": true + }, + "application/voucher-jws+json": { + "source": "iana", + "compressible": true + }, + "application/vp": { + "source": "iana" + }, + "application/vp+cose": { + "source": "iana" + }, + "application/vp+jwt": { + "source": "iana" + }, + "application/vq-rtcpxr": { + "source": "iana" + }, + "application/wasm": { + "source": "iana", + "compressible": true, + "extensions": ["wasm"] + }, + "application/watcherinfo+xml": { + "source": "iana", + "compressible": true, + "extensions": ["wif"] + }, + "application/webpush-options+json": { + "source": "iana", + "compressible": true + }, + "application/whoispp-query": { + "source": "iana" + }, + "application/whoispp-response": { + "source": "iana" + }, + "application/widget": { + "source": "iana", + "extensions": ["wgt"] + }, + "application/winhlp": { + "source": "apache", + "extensions": ["hlp"] + }, + "application/wita": { + "source": "iana" + }, + "application/wordperfect5.1": { + "source": "iana" + }, + "application/wsdl+xml": { + "source": "iana", + "compressible": true, + "extensions": ["wsdl"] + }, + "application/wspolicy+xml": { + "source": "iana", + "compressible": true, + "extensions": ["wspolicy"] + }, + "application/x-7z-compressed": { + "source": "apache", + "compressible": false, + "extensions": ["7z"] + }, + "application/x-abiword": { + "source": "apache", + "extensions": ["abw"] + }, + "application/x-ace-compressed": { + "source": "apache", + "extensions": ["ace"] + }, + "application/x-amf": { + "source": "apache" + }, + "application/x-apple-diskimage": { + "source": "apache", + "extensions": ["dmg"] + }, + "application/x-arj": { + "compressible": false, + "extensions": ["arj"] + }, + "application/x-authorware-bin": { + "source": "apache", + "extensions": ["aab","x32","u32","vox"] + }, + "application/x-authorware-map": { + "source": "apache", + "extensions": ["aam"] + }, + "application/x-authorware-seg": { + "source": "apache", + "extensions": ["aas"] + }, + "application/x-bcpio": { + "source": "apache", + "extensions": ["bcpio"] + }, + "application/x-bdoc": { + "compressible": false, + "extensions": ["bdoc"] + }, + "application/x-bittorrent": { + "source": "apache", + "extensions": ["torrent"] + }, + "application/x-blender": { + "extensions": ["blend"] + }, + "application/x-blorb": { + "source": "apache", + "extensions": ["blb","blorb"] + }, + "application/x-bzip": { + "source": "apache", + "compressible": false, + "extensions": ["bz"] + }, + "application/x-bzip2": { + "source": "apache", + "compressible": false, + "extensions": ["bz2","boz"] + }, + "application/x-cbr": { + "source": "apache", + "extensions": ["cbr","cba","cbt","cbz","cb7"] + }, + "application/x-cdlink": { + "source": "apache", + "extensions": ["vcd"] + }, + "application/x-cfs-compressed": { + "source": "apache", + "extensions": ["cfs"] + }, + "application/x-chat": { + "source": "apache", + "extensions": ["chat"] + }, + "application/x-chess-pgn": { + "source": "apache", + "extensions": ["pgn"] + }, + "application/x-chrome-extension": { + "extensions": ["crx"] + }, + "application/x-cocoa": { + "source": "nginx", + "extensions": ["cco"] + }, + "application/x-compress": { + "source": "apache" + }, + "application/x-compressed": { + "extensions": ["rar"] + }, + "application/x-conference": { + "source": "apache", + "extensions": ["nsc"] + }, + "application/x-cpio": { + "source": "apache", + "extensions": ["cpio"] + }, + "application/x-csh": { + "source": "apache", + "extensions": ["csh"] + }, + "application/x-deb": { + "compressible": false + }, + "application/x-debian-package": { + "source": "apache", + "extensions": ["deb","udeb"] + }, + "application/x-dgc-compressed": { + "source": "apache", + "extensions": ["dgc"] + }, + "application/x-director": { + "source": "apache", + "extensions": ["dir","dcr","dxr","cst","cct","cxt","w3d","fgd","swa"] + }, + "application/x-doom": { + "source": "apache", + "extensions": ["wad"] + }, + "application/x-dtbncx+xml": { + "source": "apache", + "compressible": true, + "extensions": ["ncx"] + }, + "application/x-dtbook+xml": { + "source": "apache", + "compressible": true, + "extensions": ["dtb"] + }, + "application/x-dtbresource+xml": { + "source": "apache", + "compressible": true, + "extensions": ["res"] + }, + "application/x-dvi": { + "source": "apache", + "compressible": false, + "extensions": ["dvi"] + }, + "application/x-envoy": { + "source": "apache", + "extensions": ["evy"] + }, + "application/x-eva": { + "source": "apache", + "extensions": ["eva"] + }, + "application/x-font-bdf": { + "source": "apache", + "extensions": ["bdf"] + }, + "application/x-font-dos": { + "source": "apache" + }, + "application/x-font-framemaker": { + "source": "apache" + }, + "application/x-font-ghostscript": { + "source": "apache", + "extensions": ["gsf"] + }, + "application/x-font-libgrx": { + "source": "apache" + }, + "application/x-font-linux-psf": { + "source": "apache", + "extensions": ["psf"] + }, + "application/x-font-pcf": { + "source": "apache", + "extensions": ["pcf"] + }, + "application/x-font-snf": { + "source": "apache", + "extensions": ["snf"] + }, + "application/x-font-speedo": { + "source": "apache" + }, + "application/x-font-sunos-news": { + "source": "apache" + }, + "application/x-font-type1": { + "source": "apache", + "extensions": ["pfa","pfb","pfm","afm"] + }, + "application/x-font-vfont": { + "source": "apache" + }, + "application/x-freearc": { + "source": "apache", + "extensions": ["arc"] + }, + "application/x-futuresplash": { + "source": "apache", + "extensions": ["spl"] + }, + "application/x-gca-compressed": { + "source": "apache", + "extensions": ["gca"] + }, + "application/x-glulx": { + "source": "apache", + "extensions": ["ulx"] + }, + "application/x-gnumeric": { + "source": "apache", + "extensions": ["gnumeric"] + }, + "application/x-gramps-xml": { + "source": "apache", + "extensions": ["gramps"] + }, + "application/x-gtar": { + "source": "apache", + "extensions": ["gtar"] + }, + "application/x-gzip": { + "source": "apache" + }, + "application/x-hdf": { + "source": "apache", + "extensions": ["hdf"] + }, + "application/x-httpd-php": { + "compressible": true, + "extensions": ["php"] + }, + "application/x-install-instructions": { + "source": "apache", + "extensions": ["install"] + }, + "application/x-ipynb+json": { + "compressible": true, + "extensions": ["ipynb"] + }, + "application/x-iso9660-image": { + "source": "apache", + "extensions": ["iso"] + }, + "application/x-iwork-keynote-sffkey": { + "extensions": ["key"] + }, + "application/x-iwork-numbers-sffnumbers": { + "extensions": ["numbers"] + }, + "application/x-iwork-pages-sffpages": { + "extensions": ["pages"] + }, + "application/x-java-archive-diff": { + "source": "nginx", + "extensions": ["jardiff"] + }, + "application/x-java-jnlp-file": { + "source": "apache", + "compressible": false, + "extensions": ["jnlp"] + }, + "application/x-javascript": { + "compressible": true + }, + "application/x-keepass2": { + "extensions": ["kdbx"] + }, + "application/x-latex": { + "source": "apache", + "compressible": false, + "extensions": ["latex"] + }, + "application/x-lua-bytecode": { + "extensions": ["luac"] + }, + "application/x-lzh-compressed": { + "source": "apache", + "extensions": ["lzh","lha"] + }, + "application/x-makeself": { + "source": "nginx", + "extensions": ["run"] + }, + "application/x-mie": { + "source": "apache", + "extensions": ["mie"] + }, + "application/x-mobipocket-ebook": { + "source": "apache", + "extensions": ["prc","mobi"] + }, + "application/x-mpegurl": { + "compressible": false + }, + "application/x-ms-application": { + "source": "apache", + "extensions": ["application"] + }, + "application/x-ms-shortcut": { + "source": "apache", + "extensions": ["lnk"] + }, + "application/x-ms-wmd": { + "source": "apache", + "extensions": ["wmd"] + }, + "application/x-ms-wmz": { + "source": "apache", + "extensions": ["wmz"] + }, + "application/x-ms-xbap": { + "source": "apache", + "extensions": ["xbap"] + }, + "application/x-msaccess": { + "source": "apache", + "extensions": ["mdb"] + }, + "application/x-msbinder": { + "source": "apache", + "extensions": ["obd"] + }, + "application/x-mscardfile": { + "source": "apache", + "extensions": ["crd"] + }, + "application/x-msclip": { + "source": "apache", + "extensions": ["clp"] + }, + "application/x-msdos-program": { + "extensions": ["exe"] + }, + "application/x-msdownload": { + "source": "apache", + "extensions": ["exe","dll","com","bat","msi"] + }, + "application/x-msmediaview": { + "source": "apache", + "extensions": ["mvb","m13","m14"] + }, + "application/x-msmetafile": { + "source": "apache", + "extensions": ["wmf","wmz","emf","emz"] + }, + "application/x-msmoney": { + "source": "apache", + "extensions": ["mny"] + }, + "application/x-mspublisher": { + "source": "apache", + "extensions": ["pub"] + }, + "application/x-msschedule": { + "source": "apache", + "extensions": ["scd"] + }, + "application/x-msterminal": { + "source": "apache", + "extensions": ["trm"] + }, + "application/x-mswrite": { + "source": "apache", + "extensions": ["wri"] + }, + "application/x-netcdf": { + "source": "apache", + "extensions": ["nc","cdf"] + }, + "application/x-ns-proxy-autoconfig": { + "compressible": true, + "extensions": ["pac"] + }, + "application/x-nzb": { + "source": "apache", + "extensions": ["nzb"] + }, + "application/x-perl": { + "source": "nginx", + "extensions": ["pl","pm"] + }, + "application/x-pilot": { + "source": "nginx", + "extensions": ["prc","pdb"] + }, + "application/x-pkcs12": { + "source": "apache", + "compressible": false, + "extensions": ["p12","pfx"] + }, + "application/x-pkcs7-certificates": { + "source": "apache", + "extensions": ["p7b","spc"] + }, + "application/x-pkcs7-certreqresp": { + "source": "apache", + "extensions": ["p7r"] + }, + "application/x-pki-message": { + "source": "iana" + }, + "application/x-rar-compressed": { + "source": "apache", + "compressible": false, + "extensions": ["rar"] + }, + "application/x-redhat-package-manager": { + "source": "nginx", + "extensions": ["rpm"] + }, + "application/x-research-info-systems": { + "source": "apache", + "extensions": ["ris"] + }, + "application/x-sea": { + "source": "nginx", + "extensions": ["sea"] + }, + "application/x-sh": { + "source": "apache", + "compressible": true, + "extensions": ["sh"] + }, + "application/x-shar": { + "source": "apache", + "extensions": ["shar"] + }, + "application/x-shockwave-flash": { + "source": "apache", + "compressible": false, + "extensions": ["swf"] + }, + "application/x-silverlight-app": { + "source": "apache", + "extensions": ["xap"] + }, + "application/x-sql": { + "source": "apache", + "extensions": ["sql"] + }, + "application/x-stuffit": { + "source": "apache", + "compressible": false, + "extensions": ["sit"] + }, + "application/x-stuffitx": { + "source": "apache", + "extensions": ["sitx"] + }, + "application/x-subrip": { + "source": "apache", + "extensions": ["srt"] + }, + "application/x-sv4cpio": { + "source": "apache", + "extensions": ["sv4cpio"] + }, + "application/x-sv4crc": { + "source": "apache", + "extensions": ["sv4crc"] + }, + "application/x-t3vm-image": { + "source": "apache", + "extensions": ["t3"] + }, + "application/x-tads": { + "source": "apache", + "extensions": ["gam"] + }, + "application/x-tar": { + "source": "apache", + "compressible": true, + "extensions": ["tar"] + }, + "application/x-tcl": { + "source": "apache", + "extensions": ["tcl","tk"] + }, + "application/x-tex": { + "source": "apache", + "extensions": ["tex"] + }, + "application/x-tex-tfm": { + "source": "apache", + "extensions": ["tfm"] + }, + "application/x-texinfo": { + "source": "apache", + "extensions": ["texinfo","texi"] + }, + "application/x-tgif": { + "source": "apache", + "extensions": ["obj"] + }, + "application/x-ustar": { + "source": "apache", + "extensions": ["ustar"] + }, + "application/x-virtualbox-hdd": { + "compressible": true, + "extensions": ["hdd"] + }, + "application/x-virtualbox-ova": { + "compressible": true, + "extensions": ["ova"] + }, + "application/x-virtualbox-ovf": { + "compressible": true, + "extensions": ["ovf"] + }, + "application/x-virtualbox-vbox": { + "compressible": true, + "extensions": ["vbox"] + }, + "application/x-virtualbox-vbox-extpack": { + "compressible": false, + "extensions": ["vbox-extpack"] + }, + "application/x-virtualbox-vdi": { + "compressible": true, + "extensions": ["vdi"] + }, + "application/x-virtualbox-vhd": { + "compressible": true, + "extensions": ["vhd"] + }, + "application/x-virtualbox-vmdk": { + "compressible": true, + "extensions": ["vmdk"] + }, + "application/x-wais-source": { + "source": "apache", + "extensions": ["src"] + }, + "application/x-web-app-manifest+json": { + "compressible": true, + "extensions": ["webapp"] + }, + "application/x-www-form-urlencoded": { + "source": "iana", + "compressible": true + }, + "application/x-x509-ca-cert": { + "source": "iana", + "extensions": ["der","crt","pem"] + }, + "application/x-x509-ca-ra-cert": { + "source": "iana" + }, + "application/x-x509-next-ca-cert": { + "source": "iana" + }, + "application/x-xfig": { + "source": "apache", + "extensions": ["fig"] + }, + "application/x-xliff+xml": { + "source": "apache", + "compressible": true, + "extensions": ["xlf"] + }, + "application/x-xpinstall": { + "source": "apache", + "compressible": false, + "extensions": ["xpi"] + }, + "application/x-xz": { + "source": "apache", + "extensions": ["xz"] + }, + "application/x-zip-compressed": { + "extensions": ["zip"] + }, + "application/x-zmachine": { + "source": "apache", + "extensions": ["z1","z2","z3","z4","z5","z6","z7","z8"] + }, + "application/x400-bp": { + "source": "iana" + }, + "application/xacml+xml": { + "source": "iana", + "compressible": true + }, + "application/xaml+xml": { + "source": "apache", + "compressible": true, + "extensions": ["xaml"] + }, + "application/xcap-att+xml": { + "source": "iana", + "compressible": true, + "extensions": ["xav"] + }, + "application/xcap-caps+xml": { + "source": "iana", + "compressible": true, + "extensions": ["xca"] + }, + "application/xcap-diff+xml": { + "source": "iana", + "compressible": true, + "extensions": ["xdf"] + }, + "application/xcap-el+xml": { + "source": "iana", + "compressible": true, + "extensions": ["xel"] + }, + "application/xcap-error+xml": { + "source": "iana", + "compressible": true + }, + "application/xcap-ns+xml": { + "source": "iana", + "compressible": true, + "extensions": ["xns"] + }, + "application/xcon-conference-info+xml": { + "source": "iana", + "compressible": true + }, + "application/xcon-conference-info-diff+xml": { + "source": "iana", + "compressible": true + }, + "application/xenc+xml": { + "source": "iana", + "compressible": true, + "extensions": ["xenc"] + }, + "application/xfdf": { + "source": "iana", + "extensions": ["xfdf"] + }, + "application/xhtml+xml": { + "source": "iana", + "compressible": true, + "extensions": ["xhtml","xht"] + }, + "application/xhtml-voice+xml": { + "source": "apache", + "compressible": true + }, + "application/xliff+xml": { + "source": "iana", + "compressible": true, + "extensions": ["xlf"] + }, + "application/xml": { + "source": "iana", + "compressible": true, + "extensions": ["xml","xsl","xsd","rng"] + }, + "application/xml-dtd": { + "source": "iana", + "compressible": true, + "extensions": ["dtd"] + }, + "application/xml-external-parsed-entity": { + "source": "iana" + }, + "application/xml-patch+xml": { + "source": "iana", + "compressible": true + }, + "application/xmpp+xml": { + "source": "iana", + "compressible": true + }, + "application/xop+xml": { + "source": "iana", + "compressible": true, + "extensions": ["xop"] + }, + "application/xproc+xml": { + "source": "apache", + "compressible": true, + "extensions": ["xpl"] + }, + "application/xslt+xml": { + "source": "iana", + "compressible": true, + "extensions": ["xsl","xslt"] + }, + "application/xspf+xml": { + "source": "apache", + "compressible": true, + "extensions": ["xspf"] + }, + "application/xv+xml": { + "source": "iana", + "compressible": true, + "extensions": ["mxml","xhvml","xvml","xvm"] + }, + "application/yaml": { + "source": "iana" + }, + "application/yang": { + "source": "iana", + "extensions": ["yang"] + }, + "application/yang-data+cbor": { + "source": "iana" + }, + "application/yang-data+json": { + "source": "iana", + "compressible": true + }, + "application/yang-data+xml": { + "source": "iana", + "compressible": true + }, + "application/yang-patch+json": { + "source": "iana", + "compressible": true + }, + "application/yang-patch+xml": { + "source": "iana", + "compressible": true + }, + "application/yang-sid+json": { + "source": "iana", + "compressible": true + }, + "application/yin+xml": { + "source": "iana", + "compressible": true, + "extensions": ["yin"] + }, + "application/zip": { + "source": "iana", + "compressible": false, + "extensions": ["zip"] + }, + "application/zip+dotlottie": { + "extensions": ["lottie"] + }, + "application/zlib": { + "source": "iana" + }, + "application/zstd": { + "source": "iana" + }, + "audio/1d-interleaved-parityfec": { + "source": "iana" + }, + "audio/32kadpcm": { + "source": "iana" + }, + "audio/3gpp": { + "source": "iana", + "compressible": false, + "extensions": ["3gpp"] + }, + "audio/3gpp2": { + "source": "iana" + }, + "audio/aac": { + "source": "iana", + "extensions": ["adts","aac"] + }, + "audio/ac3": { + "source": "iana" + }, + "audio/adpcm": { + "source": "apache", + "extensions": ["adp"] + }, + "audio/amr": { + "source": "iana", + "extensions": ["amr"] + }, + "audio/amr-wb": { + "source": "iana" + }, + "audio/amr-wb+": { + "source": "iana" + }, + "audio/aptx": { + "source": "iana" + }, + "audio/asc": { + "source": "iana" + }, + "audio/atrac-advanced-lossless": { + "source": "iana" + }, + "audio/atrac-x": { + "source": "iana" + }, + "audio/atrac3": { + "source": "iana" + }, + "audio/basic": { + "source": "iana", + "compressible": false, + "extensions": ["au","snd"] + }, + "audio/bv16": { + "source": "iana" + }, + "audio/bv32": { + "source": "iana" + }, + "audio/clearmode": { + "source": "iana" + }, + "audio/cn": { + "source": "iana" + }, + "audio/dat12": { + "source": "iana" + }, + "audio/dls": { + "source": "iana" + }, + "audio/dsr-es201108": { + "source": "iana" + }, + "audio/dsr-es202050": { + "source": "iana" + }, + "audio/dsr-es202211": { + "source": "iana" + }, + "audio/dsr-es202212": { + "source": "iana" + }, + "audio/dv": { + "source": "iana" + }, + "audio/dvi4": { + "source": "iana" + }, + "audio/eac3": { + "source": "iana" + }, + "audio/encaprtp": { + "source": "iana" + }, + "audio/evrc": { + "source": "iana" + }, + "audio/evrc-qcp": { + "source": "iana" + }, + "audio/evrc0": { + "source": "iana" + }, + "audio/evrc1": { + "source": "iana" + }, + "audio/evrcb": { + "source": "iana" + }, + "audio/evrcb0": { + "source": "iana" + }, + "audio/evrcb1": { + "source": "iana" + }, + "audio/evrcnw": { + "source": "iana" + }, + "audio/evrcnw0": { + "source": "iana" + }, + "audio/evrcnw1": { + "source": "iana" + }, + "audio/evrcwb": { + "source": "iana" + }, + "audio/evrcwb0": { + "source": "iana" + }, + "audio/evrcwb1": { + "source": "iana" + }, + "audio/evs": { + "source": "iana" + }, + "audio/flac": { + "source": "iana" + }, + "audio/flexfec": { + "source": "iana" + }, + "audio/fwdred": { + "source": "iana" + }, + "audio/g711-0": { + "source": "iana" + }, + "audio/g719": { + "source": "iana" + }, + "audio/g722": { + "source": "iana" + }, + "audio/g7221": { + "source": "iana" + }, + "audio/g723": { + "source": "iana" + }, + "audio/g726-16": { + "source": "iana" + }, + "audio/g726-24": { + "source": "iana" + }, + "audio/g726-32": { + "source": "iana" + }, + "audio/g726-40": { + "source": "iana" + }, + "audio/g728": { + "source": "iana" + }, + "audio/g729": { + "source": "iana" + }, + "audio/g7291": { + "source": "iana" + }, + "audio/g729d": { + "source": "iana" + }, + "audio/g729e": { + "source": "iana" + }, + "audio/gsm": { + "source": "iana" + }, + "audio/gsm-efr": { + "source": "iana" + }, + "audio/gsm-hr-08": { + "source": "iana" + }, + "audio/ilbc": { + "source": "iana" + }, + "audio/ip-mr_v2.5": { + "source": "iana" + }, + "audio/isac": { + "source": "apache" + }, + "audio/l16": { + "source": "iana" + }, + "audio/l20": { + "source": "iana" + }, + "audio/l24": { + "source": "iana", + "compressible": false + }, + "audio/l8": { + "source": "iana" + }, + "audio/lpc": { + "source": "iana" + }, + "audio/matroska": { + "source": "iana" + }, + "audio/melp": { + "source": "iana" + }, + "audio/melp1200": { + "source": "iana" + }, + "audio/melp2400": { + "source": "iana" + }, + "audio/melp600": { + "source": "iana" + }, + "audio/mhas": { + "source": "iana" + }, + "audio/midi": { + "source": "apache", + "extensions": ["mid","midi","kar","rmi"] + }, + "audio/midi-clip": { + "source": "iana" + }, + "audio/mobile-xmf": { + "source": "iana", + "extensions": ["mxmf"] + }, + "audio/mp3": { + "compressible": false, + "extensions": ["mp3"] + }, + "audio/mp4": { + "source": "iana", + "compressible": false, + "extensions": ["m4a","mp4a","m4b"] + }, + "audio/mp4a-latm": { + "source": "iana" + }, + "audio/mpa": { + "source": "iana" + }, + "audio/mpa-robust": { + "source": "iana" + }, + "audio/mpeg": { + "source": "iana", + "compressible": false, + "extensions": ["mpga","mp2","mp2a","mp3","m2a","m3a"] + }, + "audio/mpeg4-generic": { + "source": "iana" + }, + "audio/musepack": { + "source": "apache" + }, + "audio/ogg": { + "source": "iana", + "compressible": false, + "extensions": ["oga","ogg","spx","opus"] + }, + "audio/opus": { + "source": "iana" + }, + "audio/parityfec": { + "source": "iana" + }, + "audio/pcma": { + "source": "iana" + }, + "audio/pcma-wb": { + "source": "iana" + }, + "audio/pcmu": { + "source": "iana" + }, + "audio/pcmu-wb": { + "source": "iana" + }, + "audio/prs.sid": { + "source": "iana" + }, + "audio/qcelp": { + "source": "iana" + }, + "audio/raptorfec": { + "source": "iana" + }, + "audio/red": { + "source": "iana" + }, + "audio/rtp-enc-aescm128": { + "source": "iana" + }, + "audio/rtp-midi": { + "source": "iana" + }, + "audio/rtploopback": { + "source": "iana" + }, + "audio/rtx": { + "source": "iana" + }, + "audio/s3m": { + "source": "apache", + "extensions": ["s3m"] + }, + "audio/scip": { + "source": "iana" + }, + "audio/silk": { + "source": "apache", + "extensions": ["sil"] + }, + "audio/smv": { + "source": "iana" + }, + "audio/smv-qcp": { + "source": "iana" + }, + "audio/smv0": { + "source": "iana" + }, + "audio/sofa": { + "source": "iana" + }, + "audio/sp-midi": { + "source": "iana" + }, + "audio/speex": { + "source": "iana" + }, + "audio/t140c": { + "source": "iana" + }, + "audio/t38": { + "source": "iana" + }, + "audio/telephone-event": { + "source": "iana" + }, + "audio/tetra_acelp": { + "source": "iana" + }, + "audio/tetra_acelp_bb": { + "source": "iana" + }, + "audio/tone": { + "source": "iana" + }, + "audio/tsvcis": { + "source": "iana" + }, + "audio/uemclip": { + "source": "iana" + }, + "audio/ulpfec": { + "source": "iana" + }, + "audio/usac": { + "source": "iana" + }, + "audio/vdvi": { + "source": "iana" + }, + "audio/vmr-wb": { + "source": "iana" + }, + "audio/vnd.3gpp.iufp": { + "source": "iana" + }, + "audio/vnd.4sb": { + "source": "iana" + }, + "audio/vnd.audiokoz": { + "source": "iana" + }, + "audio/vnd.celp": { + "source": "iana" + }, + "audio/vnd.cisco.nse": { + "source": "iana" + }, + "audio/vnd.cmles.radio-events": { + "source": "iana" + }, + "audio/vnd.cns.anp1": { + "source": "iana" + }, + "audio/vnd.cns.inf1": { + "source": "iana" + }, + "audio/vnd.dece.audio": { + "source": "iana", + "extensions": ["uva","uvva"] + }, + "audio/vnd.digital-winds": { + "source": "iana", + "extensions": ["eol"] + }, + "audio/vnd.dlna.adts": { + "source": "iana" + }, + "audio/vnd.dolby.heaac.1": { + "source": "iana" + }, + "audio/vnd.dolby.heaac.2": { + "source": "iana" + }, + "audio/vnd.dolby.mlp": { + "source": "iana" + }, + "audio/vnd.dolby.mps": { + "source": "iana" + }, + "audio/vnd.dolby.pl2": { + "source": "iana" + }, + "audio/vnd.dolby.pl2x": { + "source": "iana" + }, + "audio/vnd.dolby.pl2z": { + "source": "iana" + }, + "audio/vnd.dolby.pulse.1": { + "source": "iana" + }, + "audio/vnd.dra": { + "source": "iana", + "extensions": ["dra"] + }, + "audio/vnd.dts": { + "source": "iana", + "extensions": ["dts"] + }, + "audio/vnd.dts.hd": { + "source": "iana", + "extensions": ["dtshd"] + }, + "audio/vnd.dts.uhd": { + "source": "iana" + }, + "audio/vnd.dvb.file": { + "source": "iana" + }, + "audio/vnd.everad.plj": { + "source": "iana" + }, + "audio/vnd.hns.audio": { + "source": "iana" + }, + "audio/vnd.lucent.voice": { + "source": "iana", + "extensions": ["lvp"] + }, + "audio/vnd.ms-playready.media.pya": { + "source": "iana", + "extensions": ["pya"] + }, + "audio/vnd.nokia.mobile-xmf": { + "source": "iana" + }, + "audio/vnd.nortel.vbk": { + "source": "iana" + }, + "audio/vnd.nuera.ecelp4800": { + "source": "iana", + "extensions": ["ecelp4800"] + }, + "audio/vnd.nuera.ecelp7470": { + "source": "iana", + "extensions": ["ecelp7470"] + }, + "audio/vnd.nuera.ecelp9600": { + "source": "iana", + "extensions": ["ecelp9600"] + }, + "audio/vnd.octel.sbc": { + "source": "iana" + }, + "audio/vnd.presonus.multitrack": { + "source": "iana" + }, + "audio/vnd.qcelp": { + "source": "apache" + }, + "audio/vnd.rhetorex.32kadpcm": { + "source": "iana" + }, + "audio/vnd.rip": { + "source": "iana", + "extensions": ["rip"] + }, + "audio/vnd.rn-realaudio": { + "compressible": false + }, + "audio/vnd.sealedmedia.softseal.mpeg": { + "source": "iana" + }, + "audio/vnd.vmx.cvsd": { + "source": "iana" + }, + "audio/vnd.wave": { + "compressible": false + }, + "audio/vorbis": { + "source": "iana", + "compressible": false + }, + "audio/vorbis-config": { + "source": "iana" + }, + "audio/wav": { + "compressible": false, + "extensions": ["wav"] + }, + "audio/wave": { + "compressible": false, + "extensions": ["wav"] + }, + "audio/webm": { + "source": "apache", + "compressible": false, + "extensions": ["weba"] + }, + "audio/x-aac": { + "source": "apache", + "compressible": false, + "extensions": ["aac"] + }, + "audio/x-aiff": { + "source": "apache", + "extensions": ["aif","aiff","aifc"] + }, + "audio/x-caf": { + "source": "apache", + "compressible": false, + "extensions": ["caf"] + }, + "audio/x-flac": { + "source": "apache", + "extensions": ["flac"] + }, + "audio/x-m4a": { + "source": "nginx", + "extensions": ["m4a"] + }, + "audio/x-matroska": { + "source": "apache", + "extensions": ["mka"] + }, + "audio/x-mpegurl": { + "source": "apache", + "extensions": ["m3u"] + }, + "audio/x-ms-wax": { + "source": "apache", + "extensions": ["wax"] + }, + "audio/x-ms-wma": { + "source": "apache", + "extensions": ["wma"] + }, + "audio/x-pn-realaudio": { + "source": "apache", + "extensions": ["ram","ra"] + }, + "audio/x-pn-realaudio-plugin": { + "source": "apache", + "extensions": ["rmp"] + }, + "audio/x-realaudio": { + "source": "nginx", + "extensions": ["ra"] + }, + "audio/x-tta": { + "source": "apache" + }, + "audio/x-wav": { + "source": "apache", + "extensions": ["wav"] + }, + "audio/xm": { + "source": "apache", + "extensions": ["xm"] + }, + "chemical/x-cdx": { + "source": "apache", + "extensions": ["cdx"] + }, + "chemical/x-cif": { + "source": "apache", + "extensions": ["cif"] + }, + "chemical/x-cmdf": { + "source": "apache", + "extensions": ["cmdf"] + }, + "chemical/x-cml": { + "source": "apache", + "extensions": ["cml"] + }, + "chemical/x-csml": { + "source": "apache", + "extensions": ["csml"] + }, + "chemical/x-pdb": { + "source": "apache" + }, + "chemical/x-xyz": { + "source": "apache", + "extensions": ["xyz"] + }, + "font/collection": { + "source": "iana", + "extensions": ["ttc"] + }, + "font/otf": { + "source": "iana", + "compressible": true, + "extensions": ["otf"] + }, + "font/sfnt": { + "source": "iana" + }, + "font/ttf": { + "source": "iana", + "compressible": true, + "extensions": ["ttf"] + }, + "font/woff": { + "source": "iana", + "extensions": ["woff"] + }, + "font/woff2": { + "source": "iana", + "extensions": ["woff2"] + }, + "image/aces": { + "source": "iana", + "extensions": ["exr"] + }, + "image/apng": { + "source": "iana", + "compressible": false, + "extensions": ["apng"] + }, + "image/avci": { + "source": "iana", + "extensions": ["avci"] + }, + "image/avcs": { + "source": "iana", + "extensions": ["avcs"] + }, + "image/avif": { + "source": "iana", + "compressible": false, + "extensions": ["avif"] + }, + "image/bmp": { + "source": "iana", + "compressible": true, + "extensions": ["bmp","dib"] + }, + "image/cgm": { + "source": "iana", + "extensions": ["cgm"] + }, + "image/dicom-rle": { + "source": "iana", + "extensions": ["drle"] + }, + "image/dpx": { + "source": "iana", + "extensions": ["dpx"] + }, + "image/emf": { + "source": "iana", + "extensions": ["emf"] + }, + "image/fits": { + "source": "iana", + "extensions": ["fits"] + }, + "image/g3fax": { + "source": "iana", + "extensions": ["g3"] + }, + "image/gif": { + "source": "iana", + "compressible": false, + "extensions": ["gif"] + }, + "image/heic": { + "source": "iana", + "extensions": ["heic"] + }, + "image/heic-sequence": { + "source": "iana", + "extensions": ["heics"] + }, + "image/heif": { + "source": "iana", + "extensions": ["heif"] + }, + "image/heif-sequence": { + "source": "iana", + "extensions": ["heifs"] + }, + "image/hej2k": { + "source": "iana", + "extensions": ["hej2"] + }, + "image/ief": { + "source": "iana", + "extensions": ["ief"] + }, + "image/j2c": { + "source": "iana" + }, + "image/jaii": { + "source": "iana", + "extensions": ["jaii"] + }, + "image/jais": { + "source": "iana", + "extensions": ["jais"] + }, + "image/jls": { + "source": "iana", + "extensions": ["jls"] + }, + "image/jp2": { + "source": "iana", + "compressible": false, + "extensions": ["jp2","jpg2"] + }, + "image/jpeg": { + "source": "iana", + "compressible": false, + "extensions": ["jpg","jpeg","jpe"] + }, + "image/jph": { + "source": "iana", + "extensions": ["jph"] + }, + "image/jphc": { + "source": "iana", + "extensions": ["jhc"] + }, + "image/jpm": { + "source": "iana", + "compressible": false, + "extensions": ["jpm","jpgm"] + }, + "image/jpx": { + "source": "iana", + "compressible": false, + "extensions": ["jpx","jpf"] + }, + "image/jxl": { + "source": "iana", + "extensions": ["jxl"] + }, + "image/jxr": { + "source": "iana", + "extensions": ["jxr"] + }, + "image/jxra": { + "source": "iana", + "extensions": ["jxra"] + }, + "image/jxrs": { + "source": "iana", + "extensions": ["jxrs"] + }, + "image/jxs": { + "source": "iana", + "extensions": ["jxs"] + }, + "image/jxsc": { + "source": "iana", + "extensions": ["jxsc"] + }, + "image/jxsi": { + "source": "iana", + "extensions": ["jxsi"] + }, + "image/jxss": { + "source": "iana", + "extensions": ["jxss"] + }, + "image/ktx": { + "source": "iana", + "extensions": ["ktx"] + }, + "image/ktx2": { + "source": "iana", + "extensions": ["ktx2"] + }, + "image/naplps": { + "source": "iana" + }, + "image/pjpeg": { + "compressible": false, + "extensions": ["jfif"] + }, + "image/png": { + "source": "iana", + "compressible": false, + "extensions": ["png"] + }, + "image/prs.btif": { + "source": "iana", + "extensions": ["btif","btf"] + }, + "image/prs.pti": { + "source": "iana", + "extensions": ["pti"] + }, + "image/pwg-raster": { + "source": "iana" + }, + "image/sgi": { + "source": "apache", + "extensions": ["sgi"] + }, + "image/svg+xml": { + "source": "iana", + "compressible": true, + "extensions": ["svg","svgz"] + }, + "image/t38": { + "source": "iana", + "extensions": ["t38"] + }, + "image/tiff": { + "source": "iana", + "compressible": false, + "extensions": ["tif","tiff"] + }, + "image/tiff-fx": { + "source": "iana", + "extensions": ["tfx"] + }, + "image/vnd.adobe.photoshop": { + "source": "iana", + "compressible": true, + "extensions": ["psd"] + }, + "image/vnd.airzip.accelerator.azv": { + "source": "iana", + "extensions": ["azv"] + }, + "image/vnd.clip": { + "source": "iana" + }, + "image/vnd.cns.inf2": { + "source": "iana" + }, + "image/vnd.dece.graphic": { + "source": "iana", + "extensions": ["uvi","uvvi","uvg","uvvg"] + }, + "image/vnd.djvu": { + "source": "iana", + "extensions": ["djvu","djv"] + }, + "image/vnd.dvb.subtitle": { + "source": "iana", + "extensions": ["sub"] + }, + "image/vnd.dwg": { + "source": "iana", + "extensions": ["dwg"] + }, + "image/vnd.dxf": { + "source": "iana", + "extensions": ["dxf"] + }, + "image/vnd.fastbidsheet": { + "source": "iana", + "extensions": ["fbs"] + }, + "image/vnd.fpx": { + "source": "iana", + "extensions": ["fpx"] + }, + "image/vnd.fst": { + "source": "iana", + "extensions": ["fst"] + }, + "image/vnd.fujixerox.edmics-mmr": { + "source": "iana", + "extensions": ["mmr"] + }, + "image/vnd.fujixerox.edmics-rlc": { + "source": "iana", + "extensions": ["rlc"] + }, + "image/vnd.globalgraphics.pgb": { + "source": "iana" + }, + "image/vnd.microsoft.icon": { + "source": "iana", + "compressible": true, + "extensions": ["ico"] + }, + "image/vnd.mix": { + "source": "iana" + }, + "image/vnd.mozilla.apng": { + "source": "iana" + }, + "image/vnd.ms-dds": { + "compressible": true, + "extensions": ["dds"] + }, + "image/vnd.ms-modi": { + "source": "iana", + "extensions": ["mdi"] + }, + "image/vnd.ms-photo": { + "source": "apache", + "extensions": ["wdp"] + }, + "image/vnd.net-fpx": { + "source": "iana", + "extensions": ["npx"] + }, + "image/vnd.pco.b16": { + "source": "iana", + "extensions": ["b16"] + }, + "image/vnd.radiance": { + "source": "iana" + }, + "image/vnd.sealed.png": { + "source": "iana" + }, + "image/vnd.sealedmedia.softseal.gif": { + "source": "iana" + }, + "image/vnd.sealedmedia.softseal.jpg": { + "source": "iana" + }, + "image/vnd.svf": { + "source": "iana" + }, + "image/vnd.tencent.tap": { + "source": "iana", + "extensions": ["tap"] + }, + "image/vnd.valve.source.texture": { + "source": "iana", + "extensions": ["vtf"] + }, + "image/vnd.wap.wbmp": { + "source": "iana", + "extensions": ["wbmp"] + }, + "image/vnd.xiff": { + "source": "iana", + "extensions": ["xif"] + }, + "image/vnd.zbrush.pcx": { + "source": "iana", + "extensions": ["pcx"] + }, + "image/webp": { + "source": "iana", + "extensions": ["webp"] + }, + "image/wmf": { + "source": "iana", + "extensions": ["wmf"] + }, + "image/x-3ds": { + "source": "apache", + "extensions": ["3ds"] + }, + "image/x-adobe-dng": { + "extensions": ["dng"] + }, + "image/x-cmu-raster": { + "source": "apache", + "extensions": ["ras"] + }, + "image/x-cmx": { + "source": "apache", + "extensions": ["cmx"] + }, + "image/x-emf": { + "source": "iana" + }, + "image/x-freehand": { + "source": "apache", + "extensions": ["fh","fhc","fh4","fh5","fh7"] + }, + "image/x-icon": { + "source": "apache", + "compressible": true, + "extensions": ["ico"] + }, + "image/x-jng": { + "source": "nginx", + "extensions": ["jng"] + }, + "image/x-mrsid-image": { + "source": "apache", + "extensions": ["sid"] + }, + "image/x-ms-bmp": { + "source": "nginx", + "compressible": true, + "extensions": ["bmp"] + }, + "image/x-pcx": { + "source": "apache", + "extensions": ["pcx"] + }, + "image/x-pict": { + "source": "apache", + "extensions": ["pic","pct"] + }, + "image/x-portable-anymap": { + "source": "apache", + "extensions": ["pnm"] + }, + "image/x-portable-bitmap": { + "source": "apache", + "extensions": ["pbm"] + }, + "image/x-portable-graymap": { + "source": "apache", + "extensions": ["pgm"] + }, + "image/x-portable-pixmap": { + "source": "apache", + "extensions": ["ppm"] + }, + "image/x-rgb": { + "source": "apache", + "extensions": ["rgb"] + }, + "image/x-tga": { + "source": "apache", + "extensions": ["tga"] + }, + "image/x-wmf": { + "source": "iana" + }, + "image/x-xbitmap": { + "source": "apache", + "extensions": ["xbm"] + }, + "image/x-xcf": { + "compressible": false + }, + "image/x-xpixmap": { + "source": "apache", + "extensions": ["xpm"] + }, + "image/x-xwindowdump": { + "source": "apache", + "extensions": ["xwd"] + }, + "message/bhttp": { + "source": "iana" + }, + "message/cpim": { + "source": "iana" + }, + "message/delivery-status": { + "source": "iana" + }, + "message/disposition-notification": { + "source": "iana", + "extensions": [ + "disposition-notification" + ] + }, + "message/external-body": { + "source": "iana" + }, + "message/feedback-report": { + "source": "iana" + }, + "message/global": { + "source": "iana", + "extensions": ["u8msg"] + }, + "message/global-delivery-status": { + "source": "iana", + "extensions": ["u8dsn"] + }, + "message/global-disposition-notification": { + "source": "iana", + "extensions": ["u8mdn"] + }, + "message/global-headers": { + "source": "iana", + "extensions": ["u8hdr"] + }, + "message/http": { + "source": "iana", + "compressible": false + }, + "message/imdn+xml": { + "source": "iana", + "compressible": true + }, + "message/mls": { + "source": "iana" + }, + "message/news": { + "source": "apache" + }, + "message/ohttp-req": { + "source": "iana" + }, + "message/ohttp-res": { + "source": "iana" + }, + "message/partial": { + "source": "iana", + "compressible": false + }, + "message/rfc822": { + "source": "iana", + "compressible": true, + "extensions": ["eml","mime","mht","mhtml"] + }, + "message/s-http": { + "source": "apache" + }, + "message/sip": { + "source": "iana" + }, + "message/sipfrag": { + "source": "iana" + }, + "message/tracking-status": { + "source": "iana" + }, + "message/vnd.si.simp": { + "source": "apache" + }, + "message/vnd.wfa.wsc": { + "source": "iana", + "extensions": ["wsc"] + }, + "model/3mf": { + "source": "iana", + "extensions": ["3mf"] + }, + "model/e57": { + "source": "iana" + }, + "model/gltf+json": { + "source": "iana", + "compressible": true, + "extensions": ["gltf"] + }, + "model/gltf-binary": { + "source": "iana", + "compressible": true, + "extensions": ["glb"] + }, + "model/iges": { + "source": "iana", + "compressible": false, + "extensions": ["igs","iges"] + }, + "model/jt": { + "source": "iana", + "extensions": ["jt"] + }, + "model/mesh": { + "source": "iana", + "compressible": false, + "extensions": ["msh","mesh","silo"] + }, + "model/mtl": { + "source": "iana", + "extensions": ["mtl"] + }, + "model/obj": { + "source": "iana", + "extensions": ["obj"] + }, + "model/prc": { + "source": "iana", + "extensions": ["prc"] + }, + "model/step": { + "source": "iana", + "extensions": ["step","stp","stpnc","p21","210"] + }, + "model/step+xml": { + "source": "iana", + "compressible": true, + "extensions": ["stpx"] + }, + "model/step+zip": { + "source": "iana", + "compressible": false, + "extensions": ["stpz"] + }, + "model/step-xml+zip": { + "source": "iana", + "compressible": false, + "extensions": ["stpxz"] + }, + "model/stl": { + "source": "iana", + "extensions": ["stl"] + }, + "model/u3d": { + "source": "iana", + "extensions": ["u3d"] + }, + "model/vnd.bary": { + "source": "iana", + "extensions": ["bary"] + }, + "model/vnd.cld": { + "source": "iana", + "extensions": ["cld"] + }, + "model/vnd.collada+xml": { + "source": "iana", + "compressible": true, + "extensions": ["dae"] + }, + "model/vnd.dwf": { + "source": "iana", + "extensions": ["dwf"] + }, + "model/vnd.flatland.3dml": { + "source": "iana" + }, + "model/vnd.gdl": { + "source": "iana", + "extensions": ["gdl"] + }, + "model/vnd.gs-gdl": { + "source": "apache" + }, + "model/vnd.gs.gdl": { + "source": "iana" + }, + "model/vnd.gtw": { + "source": "iana", + "extensions": ["gtw"] + }, + "model/vnd.moml+xml": { + "source": "iana", + "compressible": true + }, + "model/vnd.mts": { + "source": "iana", + "extensions": ["mts"] + }, + "model/vnd.opengex": { + "source": "iana", + "extensions": ["ogex"] + }, + "model/vnd.parasolid.transmit.binary": { + "source": "iana", + "extensions": ["x_b"] + }, + "model/vnd.parasolid.transmit.text": { + "source": "iana", + "extensions": ["x_t"] + }, + "model/vnd.pytha.pyox": { + "source": "iana", + "extensions": ["pyo","pyox"] + }, + "model/vnd.rosette.annotated-data-model": { + "source": "iana" + }, + "model/vnd.sap.vds": { + "source": "iana", + "extensions": ["vds"] + }, + "model/vnd.usda": { + "source": "iana", + "extensions": ["usda"] + }, + "model/vnd.usdz+zip": { + "source": "iana", + "compressible": false, + "extensions": ["usdz"] + }, + "model/vnd.valve.source.compiled-map": { + "source": "iana", + "extensions": ["bsp"] + }, + "model/vnd.vtu": { + "source": "iana", + "extensions": ["vtu"] + }, + "model/vrml": { + "source": "iana", + "compressible": false, + "extensions": ["wrl","vrml"] + }, + "model/x3d+binary": { + "source": "apache", + "compressible": false, + "extensions": ["x3db","x3dbz"] + }, + "model/x3d+fastinfoset": { + "source": "iana", + "extensions": ["x3db"] + }, + "model/x3d+vrml": { + "source": "apache", + "compressible": false, + "extensions": ["x3dv","x3dvz"] + }, + "model/x3d+xml": { + "source": "iana", + "compressible": true, + "extensions": ["x3d","x3dz"] + }, + "model/x3d-vrml": { + "source": "iana", + "extensions": ["x3dv"] + }, + "multipart/alternative": { + "source": "iana", + "compressible": false + }, + "multipart/appledouble": { + "source": "iana" + }, + "multipart/byteranges": { + "source": "iana" + }, + "multipart/digest": { + "source": "iana" + }, + "multipart/encrypted": { + "source": "iana", + "compressible": false + }, + "multipart/form-data": { + "source": "iana", + "compressible": false + }, + "multipart/header-set": { + "source": "iana" + }, + "multipart/mixed": { + "source": "iana" + }, + "multipart/multilingual": { + "source": "iana" + }, + "multipart/parallel": { + "source": "iana" + }, + "multipart/related": { + "source": "iana", + "compressible": false + }, + "multipart/report": { + "source": "iana" + }, + "multipart/signed": { + "source": "iana", + "compressible": false + }, + "multipart/vnd.bint.med-plus": { + "source": "iana" + }, + "multipart/voice-message": { + "source": "iana" + }, + "multipart/x-mixed-replace": { + "source": "iana" + }, + "text/1d-interleaved-parityfec": { + "source": "iana" + }, + "text/cache-manifest": { + "source": "iana", + "compressible": true, + "extensions": ["appcache","manifest"] + }, + "text/calendar": { + "source": "iana", + "extensions": ["ics","ifb"] + }, + "text/calender": { + "compressible": true + }, + "text/cmd": { + "compressible": true + }, + "text/coffeescript": { + "extensions": ["coffee","litcoffee"] + }, + "text/cql": { + "source": "iana" + }, + "text/cql-expression": { + "source": "iana" + }, + "text/cql-identifier": { + "source": "iana" + }, + "text/css": { + "source": "iana", + "charset": "UTF-8", + "compressible": true, + "extensions": ["css"] + }, + "text/csv": { + "source": "iana", + "compressible": true, + "extensions": ["csv"] + }, + "text/csv-schema": { + "source": "iana" + }, + "text/directory": { + "source": "iana" + }, + "text/dns": { + "source": "iana" + }, + "text/ecmascript": { + "source": "apache" + }, + "text/encaprtp": { + "source": "iana" + }, + "text/enriched": { + "source": "iana" + }, + "text/fhirpath": { + "source": "iana" + }, + "text/flexfec": { + "source": "iana" + }, + "text/fwdred": { + "source": "iana" + }, + "text/gff3": { + "source": "iana" + }, + "text/grammar-ref-list": { + "source": "iana" + }, + "text/hl7v2": { + "source": "iana" + }, + "text/html": { + "source": "iana", + "compressible": true, + "extensions": ["html","htm","shtml"] + }, + "text/jade": { + "extensions": ["jade"] + }, + "text/javascript": { + "source": "iana", + "charset": "UTF-8", + "compressible": true, + "extensions": ["js","mjs"] + }, + "text/jcr-cnd": { + "source": "iana" + }, + "text/jsx": { + "compressible": true, + "extensions": ["jsx"] + }, + "text/less": { + "compressible": true, + "extensions": ["less"] + }, + "text/markdown": { + "source": "iana", + "compressible": true, + "extensions": ["md","markdown"] + }, + "text/mathml": { + "source": "nginx", + "extensions": ["mml"] + }, + "text/mdx": { + "compressible": true, + "extensions": ["mdx"] + }, + "text/mizar": { + "source": "iana" + }, + "text/n3": { + "source": "iana", + "charset": "UTF-8", + "compressible": true, + "extensions": ["n3"] + }, + "text/parameters": { + "source": "iana", + "charset": "UTF-8" + }, + "text/parityfec": { + "source": "iana" + }, + "text/plain": { + "source": "iana", + "compressible": true, + "extensions": ["txt","text","conf","def","list","log","in","ini"] + }, + "text/provenance-notation": { + "source": "iana", + "charset": "UTF-8" + }, + "text/prs.fallenstein.rst": { + "source": "iana" + }, + "text/prs.lines.tag": { + "source": "iana", + "extensions": ["dsc"] + }, + "text/prs.prop.logic": { + "source": "iana" + }, + "text/prs.texi": { + "source": "iana" + }, + "text/raptorfec": { + "source": "iana" + }, + "text/red": { + "source": "iana" + }, + "text/rfc822-headers": { + "source": "iana" + }, + "text/richtext": { + "source": "iana", + "compressible": true, + "extensions": ["rtx"] + }, + "text/rtf": { + "source": "iana", + "compressible": true, + "extensions": ["rtf"] + }, + "text/rtp-enc-aescm128": { + "source": "iana" + }, + "text/rtploopback": { + "source": "iana" + }, + "text/rtx": { + "source": "iana" + }, + "text/sgml": { + "source": "iana", + "extensions": ["sgml","sgm"] + }, + "text/shaclc": { + "source": "iana" + }, + "text/shex": { + "source": "iana", + "extensions": ["shex"] + }, + "text/slim": { + "extensions": ["slim","slm"] + }, + "text/spdx": { + "source": "iana", + "extensions": ["spdx"] + }, + "text/strings": { + "source": "iana" + }, + "text/stylus": { + "extensions": ["stylus","styl"] + }, + "text/t140": { + "source": "iana" + }, + "text/tab-separated-values": { + "source": "iana", + "compressible": true, + "extensions": ["tsv"] + }, + "text/troff": { + "source": "iana", + "extensions": ["t","tr","roff","man","me","ms"] + }, + "text/turtle": { + "source": "iana", + "charset": "UTF-8", + "extensions": ["ttl"] + }, + "text/ulpfec": { + "source": "iana" + }, + "text/uri-list": { + "source": "iana", + "compressible": true, + "extensions": ["uri","uris","urls"] + }, + "text/vcard": { + "source": "iana", + "compressible": true, + "extensions": ["vcard"] + }, + "text/vnd.a": { + "source": "iana" + }, + "text/vnd.abc": { + "source": "iana" + }, + "text/vnd.ascii-art": { + "source": "iana" + }, + "text/vnd.curl": { + "source": "iana", + "extensions": ["curl"] + }, + "text/vnd.curl.dcurl": { + "source": "apache", + "extensions": ["dcurl"] + }, + "text/vnd.curl.mcurl": { + "source": "apache", + "extensions": ["mcurl"] + }, + "text/vnd.curl.scurl": { + "source": "apache", + "extensions": ["scurl"] + }, + "text/vnd.debian.copyright": { + "source": "iana", + "charset": "UTF-8" + }, + "text/vnd.dmclientscript": { + "source": "iana" + }, + "text/vnd.dvb.subtitle": { + "source": "iana", + "extensions": ["sub"] + }, + "text/vnd.esmertec.theme-descriptor": { + "source": "iana", + "charset": "UTF-8" + }, + "text/vnd.exchangeable": { + "source": "iana" + }, + "text/vnd.familysearch.gedcom": { + "source": "iana", + "extensions": ["ged"] + }, + "text/vnd.ficlab.flt": { + "source": "iana" + }, + "text/vnd.fly": { + "source": "iana", + "extensions": ["fly"] + }, + "text/vnd.fmi.flexstor": { + "source": "iana", + "extensions": ["flx"] + }, + "text/vnd.gml": { + "source": "iana" + }, + "text/vnd.graphviz": { + "source": "iana", + "extensions": ["gv"] + }, + "text/vnd.hans": { + "source": "iana" + }, + "text/vnd.hgl": { + "source": "iana" + }, + "text/vnd.in3d.3dml": { + "source": "iana", + "extensions": ["3dml"] + }, + "text/vnd.in3d.spot": { + "source": "iana", + "extensions": ["spot"] + }, + "text/vnd.iptc.newsml": { + "source": "iana" + }, + "text/vnd.iptc.nitf": { + "source": "iana" + }, + "text/vnd.latex-z": { + "source": "iana" + }, + "text/vnd.motorola.reflex": { + "source": "iana" + }, + "text/vnd.ms-mediapackage": { + "source": "iana" + }, + "text/vnd.net2phone.commcenter.command": { + "source": "iana" + }, + "text/vnd.radisys.msml-basic-layout": { + "source": "iana" + }, + "text/vnd.senx.warpscript": { + "source": "iana" + }, + "text/vnd.si.uricatalogue": { + "source": "apache" + }, + "text/vnd.sosi": { + "source": "iana" + }, + "text/vnd.sun.j2me.app-descriptor": { + "source": "iana", + "charset": "UTF-8", + "extensions": ["jad"] + }, + "text/vnd.trolltech.linguist": { + "source": "iana", + "charset": "UTF-8" + }, + "text/vnd.vcf": { + "source": "iana" + }, + "text/vnd.wap.si": { + "source": "iana" + }, + "text/vnd.wap.sl": { + "source": "iana" + }, + "text/vnd.wap.wml": { + "source": "iana", + "extensions": ["wml"] + }, + "text/vnd.wap.wmlscript": { + "source": "iana", + "extensions": ["wmls"] + }, + "text/vnd.zoo.kcl": { + "source": "iana" + }, + "text/vtt": { + "source": "iana", + "charset": "UTF-8", + "compressible": true, + "extensions": ["vtt"] + }, + "text/wgsl": { + "source": "iana", + "extensions": ["wgsl"] + }, + "text/x-asm": { + "source": "apache", + "extensions": ["s","asm"] + }, + "text/x-c": { + "source": "apache", + "extensions": ["c","cc","cxx","cpp","h","hh","dic"] + }, + "text/x-component": { + "source": "nginx", + "extensions": ["htc"] + }, + "text/x-fortran": { + "source": "apache", + "extensions": ["f","for","f77","f90"] + }, + "text/x-gwt-rpc": { + "compressible": true + }, + "text/x-handlebars-template": { + "extensions": ["hbs"] + }, + "text/x-java-source": { + "source": "apache", + "extensions": ["java"] + }, + "text/x-jquery-tmpl": { + "compressible": true + }, + "text/x-lua": { + "extensions": ["lua"] + }, + "text/x-markdown": { + "compressible": true, + "extensions": ["mkd"] + }, + "text/x-nfo": { + "source": "apache", + "extensions": ["nfo"] + }, + "text/x-opml": { + "source": "apache", + "extensions": ["opml"] + }, + "text/x-org": { + "compressible": true, + "extensions": ["org"] + }, + "text/x-pascal": { + "source": "apache", + "extensions": ["p","pas"] + }, + "text/x-processing": { + "compressible": true, + "extensions": ["pde"] + }, + "text/x-sass": { + "extensions": ["sass"] + }, + "text/x-scss": { + "extensions": ["scss"] + }, + "text/x-setext": { + "source": "apache", + "extensions": ["etx"] + }, + "text/x-sfv": { + "source": "apache", + "extensions": ["sfv"] + }, + "text/x-suse-ymp": { + "compressible": true, + "extensions": ["ymp"] + }, + "text/x-uuencode": { + "source": "apache", + "extensions": ["uu"] + }, + "text/x-vcalendar": { + "source": "apache", + "extensions": ["vcs"] + }, + "text/x-vcard": { + "source": "apache", + "extensions": ["vcf"] + }, + "text/xml": { + "source": "iana", + "compressible": true, + "extensions": ["xml"] + }, + "text/xml-external-parsed-entity": { + "source": "iana" + }, + "text/yaml": { + "compressible": true, + "extensions": ["yaml","yml"] + }, + "video/1d-interleaved-parityfec": { + "source": "iana" + }, + "video/3gpp": { + "source": "iana", + "extensions": ["3gp","3gpp"] + }, + "video/3gpp-tt": { + "source": "iana" + }, + "video/3gpp2": { + "source": "iana", + "extensions": ["3g2"] + }, + "video/av1": { + "source": "iana" + }, + "video/bmpeg": { + "source": "iana" + }, + "video/bt656": { + "source": "iana" + }, + "video/celb": { + "source": "iana" + }, + "video/dv": { + "source": "iana" + }, + "video/encaprtp": { + "source": "iana" + }, + "video/evc": { + "source": "iana" + }, + "video/ffv1": { + "source": "iana" + }, + "video/flexfec": { + "source": "iana" + }, + "video/h261": { + "source": "iana", + "extensions": ["h261"] + }, + "video/h263": { + "source": "iana", + "extensions": ["h263"] + }, + "video/h263-1998": { + "source": "iana" + }, + "video/h263-2000": { + "source": "iana" + }, + "video/h264": { + "source": "iana", + "extensions": ["h264"] + }, + "video/h264-rcdo": { + "source": "iana" + }, + "video/h264-svc": { + "source": "iana" + }, + "video/h265": { + "source": "iana" + }, + "video/h266": { + "source": "iana" + }, + "video/iso.segment": { + "source": "iana", + "extensions": ["m4s"] + }, + "video/jpeg": { + "source": "iana", + "extensions": ["jpgv"] + }, + "video/jpeg2000": { + "source": "iana" + }, + "video/jpm": { + "source": "apache", + "extensions": ["jpm","jpgm"] + }, + "video/jxsv": { + "source": "iana" + }, + "video/lottie+json": { + "source": "iana", + "compressible": true + }, + "video/matroska": { + "source": "iana" + }, + "video/matroska-3d": { + "source": "iana" + }, + "video/mj2": { + "source": "iana", + "extensions": ["mj2","mjp2"] + }, + "video/mp1s": { + "source": "iana" + }, + "video/mp2p": { + "source": "iana" + }, + "video/mp2t": { + "source": "iana", + "extensions": ["ts","m2t","m2ts","mts"] + }, + "video/mp4": { + "source": "iana", + "compressible": false, + "extensions": ["mp4","mp4v","mpg4"] + }, + "video/mp4v-es": { + "source": "iana" + }, + "video/mpeg": { + "source": "iana", + "compressible": false, + "extensions": ["mpeg","mpg","mpe","m1v","m2v"] + }, + "video/mpeg4-generic": { + "source": "iana" + }, + "video/mpv": { + "source": "iana" + }, + "video/nv": { + "source": "iana" + }, + "video/ogg": { + "source": "iana", + "compressible": false, + "extensions": ["ogv"] + }, + "video/parityfec": { + "source": "iana" + }, + "video/pointer": { + "source": "iana" + }, + "video/quicktime": { + "source": "iana", + "compressible": false, + "extensions": ["qt","mov"] + }, + "video/raptorfec": { + "source": "iana" + }, + "video/raw": { + "source": "iana" + }, + "video/rtp-enc-aescm128": { + "source": "iana" + }, + "video/rtploopback": { + "source": "iana" + }, + "video/rtx": { + "source": "iana" + }, + "video/scip": { + "source": "iana" + }, + "video/smpte291": { + "source": "iana" + }, + "video/smpte292m": { + "source": "iana" + }, + "video/ulpfec": { + "source": "iana" + }, + "video/vc1": { + "source": "iana" + }, + "video/vc2": { + "source": "iana" + }, + "video/vnd.cctv": { + "source": "iana" + }, + "video/vnd.dece.hd": { + "source": "iana", + "extensions": ["uvh","uvvh"] + }, + "video/vnd.dece.mobile": { + "source": "iana", + "extensions": ["uvm","uvvm"] + }, + "video/vnd.dece.mp4": { + "source": "iana" + }, + "video/vnd.dece.pd": { + "source": "iana", + "extensions": ["uvp","uvvp"] + }, + "video/vnd.dece.sd": { + "source": "iana", + "extensions": ["uvs","uvvs"] + }, + "video/vnd.dece.video": { + "source": "iana", + "extensions": ["uvv","uvvv"] + }, + "video/vnd.directv.mpeg": { + "source": "iana" + }, + "video/vnd.directv.mpeg-tts": { + "source": "iana" + }, + "video/vnd.dlna.mpeg-tts": { + "source": "iana" + }, + "video/vnd.dvb.file": { + "source": "iana", + "extensions": ["dvb"] + }, + "video/vnd.fvt": { + "source": "iana", + "extensions": ["fvt"] + }, + "video/vnd.hns.video": { + "source": "iana" + }, + "video/vnd.iptvforum.1dparityfec-1010": { + "source": "iana" + }, + "video/vnd.iptvforum.1dparityfec-2005": { + "source": "iana" + }, + "video/vnd.iptvforum.2dparityfec-1010": { + "source": "iana" + }, + "video/vnd.iptvforum.2dparityfec-2005": { + "source": "iana" + }, + "video/vnd.iptvforum.ttsavc": { + "source": "iana" + }, + "video/vnd.iptvforum.ttsmpeg2": { + "source": "iana" + }, + "video/vnd.motorola.video": { + "source": "iana" + }, + "video/vnd.motorola.videop": { + "source": "iana" + }, + "video/vnd.mpegurl": { + "source": "iana", + "extensions": ["mxu","m4u"] + }, + "video/vnd.ms-playready.media.pyv": { + "source": "iana", + "extensions": ["pyv"] + }, + "video/vnd.nokia.interleaved-multimedia": { + "source": "iana" + }, + "video/vnd.nokia.mp4vr": { + "source": "iana" + }, + "video/vnd.nokia.videovoip": { + "source": "iana" + }, + "video/vnd.objectvideo": { + "source": "iana" + }, + "video/vnd.planar": { + "source": "iana" + }, + "video/vnd.radgamettools.bink": { + "source": "iana" + }, + "video/vnd.radgamettools.smacker": { + "source": "apache" + }, + "video/vnd.sealed.mpeg1": { + "source": "iana" + }, + "video/vnd.sealed.mpeg4": { + "source": "iana" + }, + "video/vnd.sealed.swf": { + "source": "iana" + }, + "video/vnd.sealedmedia.softseal.mov": { + "source": "iana" + }, + "video/vnd.uvvu.mp4": { + "source": "iana", + "extensions": ["uvu","uvvu"] + }, + "video/vnd.vivo": { + "source": "iana", + "extensions": ["viv"] + }, + "video/vnd.youtube.yt": { + "source": "iana" + }, + "video/vp8": { + "source": "iana" + }, + "video/vp9": { + "source": "iana" + }, + "video/webm": { + "source": "apache", + "compressible": false, + "extensions": ["webm"] + }, + "video/x-f4v": { + "source": "apache", + "extensions": ["f4v"] + }, + "video/x-fli": { + "source": "apache", + "extensions": ["fli"] + }, + "video/x-flv": { + "source": "apache", + "compressible": false, + "extensions": ["flv"] + }, + "video/x-m4v": { + "source": "apache", + "extensions": ["m4v"] + }, + "video/x-matroska": { + "source": "apache", + "compressible": false, + "extensions": ["mkv","mk3d","mks"] + }, + "video/x-mng": { + "source": "apache", + "extensions": ["mng"] + }, + "video/x-ms-asf": { + "source": "apache", + "extensions": ["asf","asx"] + }, + "video/x-ms-vob": { + "source": "apache", + "extensions": ["vob"] + }, + "video/x-ms-wm": { + "source": "apache", + "extensions": ["wm"] + }, + "video/x-ms-wmv": { + "source": "apache", + "compressible": false, + "extensions": ["wmv"] + }, + "video/x-ms-wmx": { + "source": "apache", + "extensions": ["wmx"] + }, + "video/x-ms-wvx": { + "source": "apache", + "extensions": ["wvx"] + }, + "video/x-msvideo": { + "source": "apache", + "extensions": ["avi"] + }, + "video/x-sgi-movie": { + "source": "apache", + "extensions": ["movie"] + }, + "video/x-smv": { + "source": "apache", + "extensions": ["smv"] + }, + "x-conference/x-cooltalk": { + "source": "apache", + "extensions": ["ice"] + }, + "x-shader/x-fragment": { + "compressible": true + }, + "x-shader/x-vertex": { + "compressible": true + } +} diff --git a/node_modules/body-parser/node_modules/mime-db/index.js b/node_modules/body-parser/node_modules/mime-db/index.js new file mode 100644 index 0000000..ec2be30 --- /dev/null +++ b/node_modules/body-parser/node_modules/mime-db/index.js @@ -0,0 +1,12 @@ +/*! + * mime-db + * Copyright(c) 2014 Jonathan Ong + * Copyright(c) 2015-2022 Douglas Christopher Wilson + * MIT Licensed + */ + +/** + * Module exports. + */ + +module.exports = require('./db.json') diff --git a/node_modules/body-parser/node_modules/mime-db/package.json b/node_modules/body-parser/node_modules/mime-db/package.json new file mode 100644 index 0000000..289a370 --- /dev/null +++ b/node_modules/body-parser/node_modules/mime-db/package.json @@ -0,0 +1,56 @@ +{ + "name": "mime-db", + "description": "Media Type Database", + "version": "1.54.0", + "contributors": [ + "Douglas Christopher Wilson <doug@somethingdoug.com>", + "Jonathan Ong <me@jongleberry.com> (http://jongleberry.com)", + "Robert Kieffer <robert@broofa.com> (http://github.com/broofa)" + ], + "license": "MIT", + "keywords": [ + "mime", + "db", + "type", + "types", + "database", + "charset", + "charsets" + ], + "repository": "jshttp/mime-db", + "devDependencies": { + "csv-parse": "4.16.3", + "eslint": "8.32.0", + "eslint-config-standard": "15.0.1", + "eslint-plugin-import": "2.27.5", + "eslint-plugin-markdown": "3.0.0", + "eslint-plugin-node": "11.1.0", + "eslint-plugin-promise": "6.1.1", + "eslint-plugin-standard": "4.1.0", + "media-typer": "1.1.0", + "mocha": "10.2.0", + "nyc": "15.1.0", + "stream-to-array": "2.3.0", + "undici": "7.1.0" + }, + "files": [ + "HISTORY.md", + "LICENSE", + "README.md", + "db.json", + "index.js" + ], + "engines": { + "node": ">= 0.6" + }, + "scripts": { + "build": "node scripts/build", + "fetch": "node scripts/fetch-apache && node scripts/fetch-iana && node scripts/fetch-nginx", + "lint": "eslint .", + "test": "mocha --reporter spec --check-leaks test/", + "test-ci": "nyc --reporter=lcovonly --reporter=text npm test", + "test-cov": "nyc --reporter=html --reporter=text npm test", + "update": "npm run fetch && npm run build", + "version": "node scripts/version-history.js && git add HISTORY.md" + } +} diff --git a/node_modules/body-parser/node_modules/mime-types/index.js b/node_modules/body-parser/node_modules/mime-types/index.js new file mode 100644 index 0000000..c348cb6 --- /dev/null +++ b/node_modules/body-parser/node_modules/mime-types/index.js @@ -0,0 +1,211 @@ +/*! + * mime-types + * Copyright(c) 2014 Jonathan Ong + * Copyright(c) 2015 Douglas Christopher Wilson + * MIT Licensed + */ + +'use strict' + +/** + * Module dependencies. + * @private + */ + +var db = require('mime-db') +var extname = require('path').extname +var mimeScore = require('./mimeScore') + +/** + * Module variables. + * @private + */ + +var EXTRACT_TYPE_REGEXP = /^\s*([^;\s]*)(?:;|\s|$)/ +var TEXT_TYPE_REGEXP = /^text\//i + +/** + * Module exports. + * @public + */ + +exports.charset = charset +exports.charsets = { lookup: charset } +exports.contentType = contentType +exports.extension = extension +exports.extensions = Object.create(null) +exports.lookup = lookup +exports.types = Object.create(null) +exports._extensionConflicts = [] + +// Populate the extensions/types maps +populateMaps(exports.extensions, exports.types) + +/** + * Get the default charset for a MIME type. + * + * @param {string} type + * @return {boolean|string} + */ + +function charset (type) { + if (!type || typeof type !== 'string') { + return false + } + + // TODO: use media-typer + var match = EXTRACT_TYPE_REGEXP.exec(type) + var mime = match && db[match[1].toLowerCase()] + + if (mime && mime.charset) { + return mime.charset + } + + // default text/* to utf-8 + if (match && TEXT_TYPE_REGEXP.test(match[1])) { + return 'UTF-8' + } + + return false +} + +/** + * Create a full Content-Type header given a MIME type or extension. + * + * @param {string} str + * @return {boolean|string} + */ + +function contentType (str) { + // TODO: should this even be in this module? + if (!str || typeof str !== 'string') { + return false + } + + var mime = str.indexOf('/') === -1 ? exports.lookup(str) : str + + if (!mime) { + return false + } + + // TODO: use content-type or other module + if (mime.indexOf('charset') === -1) { + var charset = exports.charset(mime) + if (charset) mime += '; charset=' + charset.toLowerCase() + } + + return mime +} + +/** + * Get the default extension for a MIME type. + * + * @param {string} type + * @return {boolean|string} + */ + +function extension (type) { + if (!type || typeof type !== 'string') { + return false + } + + // TODO: use media-typer + var match = EXTRACT_TYPE_REGEXP.exec(type) + + // get extensions + var exts = match && exports.extensions[match[1].toLowerCase()] + + if (!exts || !exts.length) { + return false + } + + return exts[0] +} + +/** + * Lookup the MIME type for a file path/extension. + * + * @param {string} path + * @return {boolean|string} + */ + +function lookup (path) { + if (!path || typeof path !== 'string') { + return false + } + + // get the extension ("ext" or ".ext" or full path) + var extension = extname('x.' + path) + .toLowerCase() + .slice(1) + + if (!extension) { + return false + } + + return exports.types[extension] || false +} + +/** + * Populate the extensions and types maps. + * @private + */ + +function populateMaps (extensions, types) { + Object.keys(db).forEach(function forEachMimeType (type) { + var mime = db[type] + var exts = mime.extensions + + if (!exts || !exts.length) { + return + } + + // mime -> extensions + extensions[type] = exts + + // extension -> mime + for (var i = 0; i < exts.length; i++) { + var extension = exts[i] + types[extension] = _preferredType(extension, types[extension], type) + + // DELETE (eventually): Capture extension->type maps that change as a + // result of switching to mime-score. This is just to help make reviewing + // PR #119 easier, and can be removed once that PR is approved. + const legacyType = _preferredTypeLegacy( + extension, + types[extension], + type + ) + if (legacyType !== types[extension]) { + exports._extensionConflicts.push([extension, legacyType, types[extension]]) + } + } + }) +} + +// Resolve type conflict using mime-score +function _preferredType (ext, type0, type1) { + var score0 = type0 ? mimeScore(type0, db[type0].source) : 0 + var score1 = type1 ? mimeScore(type1, db[type1].source) : 0 + + return score0 > score1 ? type0 : type1 +} + +// Resolve type conflict using pre-mime-score logic +function _preferredTypeLegacy (ext, type0, type1) { + var SOURCE_RANK = ['nginx', 'apache', undefined, 'iana'] + + var score0 = type0 ? SOURCE_RANK.indexOf(db[type0].source) : 0 + var score1 = type1 ? SOURCE_RANK.indexOf(db[type1].source) : 0 + + if ( + exports.types[extension] !== 'application/octet-stream' && + (score0 > score1 || + (score0 === score1 && + exports.types[extension]?.slice(0, 12) === 'application/')) + ) { + return type0 + } + + return score0 > score1 ? type0 : type1 +} diff --git a/node_modules/body-parser/node_modules/mime-types/mimeScore.js b/node_modules/body-parser/node_modules/mime-types/mimeScore.js new file mode 100644 index 0000000..e2ecc66 --- /dev/null +++ b/node_modules/body-parser/node_modules/mime-types/mimeScore.js @@ -0,0 +1,52 @@ +// 'mime-score' back-ported to CommonJS + +// Score RFC facets (see https://tools.ietf.org/html/rfc6838#section-3) +var FACET_SCORES = { + 'prs.': 100, + 'x-': 200, + 'x.': 300, + 'vnd.': 400, + default: 900 +} + +// Score mime source (Logic originally from `jshttp/mime-types` module) +var SOURCE_SCORES = { + nginx: 10, + apache: 20, + iana: 40, + default: 30 // definitions added by `jshttp/mime-db` project? +} + +var TYPE_SCORES = { + // prefer application/xml over text/xml + // prefer application/rtf over text/rtf + application: 1, + + // prefer font/woff over application/font-woff + font: 2, + + default: 0 +} + +/** + * Get each component of the score for a mime type. The sum of these is the + * total score. The higher the score, the more "official" the type. + */ +module.exports = function mimeScore (mimeType, source = 'default') { + if (mimeType === 'application/octet-stream') { + return 0 + } + + const [type, subtype] = mimeType.split('/') + + const facet = subtype.replace(/(\.|x-).*/, '$1') + + const facetScore = FACET_SCORES[facet] || FACET_SCORES.default + const sourceScore = SOURCE_SCORES[source] || SOURCE_SCORES.default + const typeScore = TYPE_SCORES[type] || TYPE_SCORES.default + + // All else being equal prefer shorter types + const lengthScore = 1 - mimeType.length / 100 + + return facetScore + sourceScore + typeScore + lengthScore +} diff --git a/node_modules/body-parser/node_modules/mime-types/package.json b/node_modules/body-parser/node_modules/mime-types/package.json new file mode 100644 index 0000000..79481ae --- /dev/null +++ b/node_modules/body-parser/node_modules/mime-types/package.json @@ -0,0 +1,45 @@ +{ + "name": "mime-types", + "description": "The ultimate javascript content-type utility.", + "version": "3.0.1", + "contributors": [ + "Douglas Christopher Wilson <doug@somethingdoug.com>", + "Jeremiah Senkpiel <fishrock123@rocketmail.com> (https://searchbeam.jit.su)", + "Jonathan Ong <me@jongleberry.com> (http://jongleberry.com)" + ], + "license": "MIT", + "keywords": [ + "mime", + "types" + ], + "repository": "jshttp/mime-types", + "dependencies": { + "mime-db": "^1.54.0" + }, + "devDependencies": { + "eslint": "8.33.0", + "eslint-config-standard": "14.1.1", + "eslint-plugin-import": "2.27.5", + "eslint-plugin-markdown": "3.0.0", + "eslint-plugin-node": "11.1.0", + "eslint-plugin-promise": "6.1.1", + "eslint-plugin-standard": "4.1.0", + "mocha": "10.2.0", + "nyc": "15.1.0" + }, + "files": [ + "HISTORY.md", + "LICENSE", + "index.js", + "mimeScore.js" + ], + "engines": { + "node": ">= 0.6" + }, + "scripts": { + "lint": "eslint .", + "test": "mocha --reporter spec test/test.js", + "test-ci": "nyc --reporter=lcov --reporter=text npm test", + "test-cov": "nyc --reporter=html --reporter=text npm test" + } +} diff --git a/node_modules/nodemon/node_modules/ms/index.js b/node_modules/body-parser/node_modules/ms/index.js similarity index 100% rename from node_modules/nodemon/node_modules/ms/index.js rename to node_modules/body-parser/node_modules/ms/index.js diff --git a/node_modules/nodemon/node_modules/ms/package.json b/node_modules/body-parser/node_modules/ms/package.json similarity index 100% rename from node_modules/nodemon/node_modules/ms/package.json rename to node_modules/body-parser/node_modules/ms/package.json diff --git a/node_modules/body-parser/node_modules/qs/dist/qs.js b/node_modules/body-parser/node_modules/qs/dist/qs.js new file mode 100644 index 0000000..f37989a --- /dev/null +++ b/node_modules/body-parser/node_modules/qs/dist/qs.js @@ -0,0 +1,141 @@ +(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.Qs = f()}})(function(){var define,module,exports;return (function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r})()({1:[function(require,module,exports){ +"use strict";var replace=String.prototype.replace,percentTwenties=/%20/g,Format={RFC1738:"RFC1738",RFC3986:"RFC3986"};module.exports={default:Format.RFC3986,formatters:{RFC1738:function(e){return replace.call(e,percentTwenties,"+")},RFC3986:function(e){return String(e)}},RFC1738:Format.RFC1738,RFC3986:Format.RFC3986}; + +},{}],2:[function(require,module,exports){ +"use strict";var stringify=require(4),parse=require(3),formats=require(1);module.exports={formats:formats,parse:parse,stringify:stringify}; + +},{"1":1,"3":3,"4":4}],3:[function(require,module,exports){ +"use strict";var utils=require(5),has=Object.prototype.hasOwnProperty,isArray=Array.isArray,defaults={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:utils.decode,delimiter:"&",depth:5,duplicates:"combine",ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictDepth:!1,strictNullHandling:!1,throwOnLimitExceeded:!1},interpretNumericEntities=function(e){return e.replace(/&#(\d+);/g,(function(e,t){return String.fromCharCode(parseInt(t,10))}))},parseArrayValue=function(e,t,r){if(e&&"string"==typeof e&&t.comma&&e.indexOf(",")>-1)return e.split(",");if(t.throwOnLimitExceeded&&r>=t.arrayLimit)throw new RangeError("Array limit exceeded. Only "+t.arrayLimit+" element"+(1===t.arrayLimit?"":"s")+" allowed in an array.");return e},isoSentinel="utf8=%26%2310003%3B",charsetSentinel="utf8=%E2%9C%93",parseValues=function parseQueryStringValues(e,t){var r={__proto__:null},i=t.ignoreQueryPrefix?e.replace(/^\?/,""):e;i=i.replace(/%5B/gi,"[").replace(/%5D/gi,"]");var a=t.parameterLimit===1/0?void 0:t.parameterLimit,o=i.split(t.delimiter,t.throwOnLimitExceeded?a+1:a);if(t.throwOnLimitExceeded&&o.length>a)throw new RangeError("Parameter limit exceeded. Only "+a+" parameter"+(1===a?"":"s")+" allowed.");var l,n=-1,s=t.charset;if(t.charsetSentinel)for(l=0;l<o.length;++l)0===o[l].indexOf("utf8=")&&(o[l]===charsetSentinel?s="utf-8":o[l]===isoSentinel&&(s="iso-8859-1"),n=l,l=o.length);for(l=0;l<o.length;++l)if(l!==n){var d,p,c=o[l],u=c.indexOf("]="),y=-1===u?c.indexOf("="):u+1;-1===y?(d=t.decoder(c,defaults.decoder,s,"key"),p=t.strictNullHandling?null:""):(d=t.decoder(c.slice(0,y),defaults.decoder,s,"key"),p=utils.maybeMap(parseArrayValue(c.slice(y+1),t,isArray(r[d])?r[d].length:0),(function(e){return t.decoder(e,defaults.decoder,s,"value")}))),p&&t.interpretNumericEntities&&"iso-8859-1"===s&&(p=interpretNumericEntities(String(p))),c.indexOf("[]=")>-1&&(p=isArray(p)?[p]:p);var f=has.call(r,d);f&&"combine"===t.duplicates?r[d]=utils.combine(r[d],p):f&&"last"!==t.duplicates||(r[d]=p)}return r},parseObject=function(e,t,r,i){var a=0;if(e.length>0&&"[]"===e[e.length-1]){var o=e.slice(0,-1).join("");a=Array.isArray(t)&&t[o]?t[o].length:0}for(var l=i?t:parseArrayValue(t,r,a),n=e.length-1;n>=0;--n){var s,d=e[n];if("[]"===d&&r.parseArrays)s=r.allowEmptyArrays&&(""===l||r.strictNullHandling&&null===l)?[]:utils.combine([],l);else{s=r.plainObjects?{__proto__:null}:{};var p="["===d.charAt(0)&&"]"===d.charAt(d.length-1)?d.slice(1,-1):d,c=r.decodeDotInKeys?p.replace(/%2E/g,"."):p,u=parseInt(c,10);r.parseArrays||""!==c?!isNaN(u)&&d!==c&&String(u)===c&&u>=0&&r.parseArrays&&u<=r.arrayLimit?(s=[])[u]=l:"__proto__"!==c&&(s[c]=l):s={0:l}}l=s}return l},parseKeys=function parseQueryStringKeys(e,t,r,i){if(e){var a=r.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,o=/(\[[^[\]]*])/g,l=r.depth>0&&/(\[[^[\]]*])/.exec(a),n=l?a.slice(0,l.index):a,s=[];if(n){if(!r.plainObjects&&has.call(Object.prototype,n)&&!r.allowPrototypes)return;s.push(n)}for(var d=0;r.depth>0&&null!==(l=o.exec(a))&&d<r.depth;){if(d+=1,!r.plainObjects&&has.call(Object.prototype,l[1].slice(1,-1))&&!r.allowPrototypes)return;s.push(l[1])}if(l){if(!0===r.strictDepth)throw new RangeError("Input depth exceeded depth option of "+r.depth+" and strictDepth is true");s.push("["+a.slice(l.index)+"]")}return parseObject(s,t,r,i)}},normalizeParseOptions=function normalizeParseOptions(e){if(!e)return defaults;if(void 0!==e.allowEmptyArrays&&"boolean"!=typeof e.allowEmptyArrays)throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(void 0!==e.decodeDotInKeys&&"boolean"!=typeof e.decodeDotInKeys)throw new TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided");if(null!==e.decoder&&void 0!==e.decoder&&"function"!=typeof e.decoder)throw new TypeError("Decoder has to be a function.");if(void 0!==e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");if(void 0!==e.throwOnLimitExceeded&&"boolean"!=typeof e.throwOnLimitExceeded)throw new TypeError("`throwOnLimitExceeded` option must be a boolean");var t=void 0===e.charset?defaults.charset:e.charset,r=void 0===e.duplicates?defaults.duplicates:e.duplicates;if("combine"!==r&&"first"!==r&&"last"!==r)throw new TypeError("The duplicates option must be either combine, first, or last");return{allowDots:void 0===e.allowDots?!0===e.decodeDotInKeys||defaults.allowDots:!!e.allowDots,allowEmptyArrays:"boolean"==typeof e.allowEmptyArrays?!!e.allowEmptyArrays:defaults.allowEmptyArrays,allowPrototypes:"boolean"==typeof e.allowPrototypes?e.allowPrototypes:defaults.allowPrototypes,allowSparse:"boolean"==typeof e.allowSparse?e.allowSparse:defaults.allowSparse,arrayLimit:"number"==typeof e.arrayLimit?e.arrayLimit:defaults.arrayLimit,charset:t,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:defaults.charsetSentinel,comma:"boolean"==typeof e.comma?e.comma:defaults.comma,decodeDotInKeys:"boolean"==typeof e.decodeDotInKeys?e.decodeDotInKeys:defaults.decodeDotInKeys,decoder:"function"==typeof e.decoder?e.decoder:defaults.decoder,delimiter:"string"==typeof e.delimiter||utils.isRegExp(e.delimiter)?e.delimiter:defaults.delimiter,depth:"number"==typeof e.depth||!1===e.depth?+e.depth:defaults.depth,duplicates:r,ignoreQueryPrefix:!0===e.ignoreQueryPrefix,interpretNumericEntities:"boolean"==typeof e.interpretNumericEntities?e.interpretNumericEntities:defaults.interpretNumericEntities,parameterLimit:"number"==typeof e.parameterLimit?e.parameterLimit:defaults.parameterLimit,parseArrays:!1!==e.parseArrays,plainObjects:"boolean"==typeof e.plainObjects?e.plainObjects:defaults.plainObjects,strictDepth:"boolean"==typeof e.strictDepth?!!e.strictDepth:defaults.strictDepth,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:defaults.strictNullHandling,throwOnLimitExceeded:"boolean"==typeof e.throwOnLimitExceeded&&e.throwOnLimitExceeded}};module.exports=function(e,t){var r=normalizeParseOptions(t);if(""===e||null==e)return r.plainObjects?{__proto__:null}:{};for(var i="string"==typeof e?parseValues(e,r):e,a=r.plainObjects?{__proto__:null}:{},o=Object.keys(i),l=0;l<o.length;++l){var n=o[l],s=parseKeys(n,i[n],r,"string"==typeof e);a=utils.merge(a,s,r)}return!0===r.allowSparse?a:utils.compact(a)}; + +},{"5":5}],4:[function(require,module,exports){ +"use strict";var getSideChannel=require(46),utils=require(5),formats=require(1),has=Object.prototype.hasOwnProperty,arrayPrefixGenerators={brackets:function brackets(e){return e+"[]"},comma:"comma",indices:function indices(e,r){return e+"["+r+"]"},repeat:function repeat(e){return e}},isArray=Array.isArray,push=Array.prototype.push,pushToArray=function(e,r){push.apply(e,isArray(r)?r:[r])},toISO=Date.prototype.toISOString,defaultFormat=formats.default,defaults={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset:"utf-8",charsetSentinel:!1,commaRoundTrip:!1,delimiter:"&",encode:!0,encodeDotInKeys:!1,encoder:utils.encode,encodeValuesOnly:!1,filter:void 0,format:defaultFormat,formatter:formats.formatters[defaultFormat],indices:!1,serializeDate:function serializeDate(e){return toISO.call(e)},skipNulls:!1,strictNullHandling:!1},isNonNullishPrimitive=function isNonNullishPrimitive(e){return"string"==typeof e||"number"==typeof e||"boolean"==typeof e||"symbol"==typeof e||"bigint"==typeof e},sentinel={},stringify=function stringify(e,r,t,o,a,n,i,l,s,f,u,d,y,c,p,m,h,v){for(var g=e,w=v,b=0,A=!1;void 0!==(w=w.get(sentinel))&&!A;){var D=w.get(e);if(b+=1,void 0!==D){if(D===b)throw new RangeError("Cyclic object value");A=!0}void 0===w.get(sentinel)&&(b=0)}if("function"==typeof f?g=f(r,g):g instanceof Date?g=y(g):"comma"===t&&isArray(g)&&(g=utils.maybeMap(g,(function(e){return e instanceof Date?y(e):e}))),null===g){if(n)return s&&!m?s(r,defaults.encoder,h,"key",c):r;g=""}if(isNonNullishPrimitive(g)||utils.isBuffer(g))return s?[p(m?r:s(r,defaults.encoder,h,"key",c))+"="+p(s(g,defaults.encoder,h,"value",c))]:[p(r)+"="+p(String(g))];var S,E=[];if(void 0===g)return E;if("comma"===t&&isArray(g))m&&s&&(g=utils.maybeMap(g,s)),S=[{value:g.length>0?g.join(",")||null:void 0}];else if(isArray(f))S=f;else{var N=Object.keys(g);S=u?N.sort(u):N}var T=l?String(r).replace(/\./g,"%2E"):String(r),O=o&&isArray(g)&&1===g.length?T+"[]":T;if(a&&isArray(g)&&0===g.length)return O+"[]";for(var k=0;k<S.length;++k){var I=S[k],P="object"==typeof I&&I&&void 0!==I.value?I.value:g[I];if(!i||null!==P){var x=d&&l?String(I).replace(/\./g,"%2E"):String(I),z=isArray(g)?"function"==typeof t?t(O,x):O:O+(d?"."+x:"["+x+"]");v.set(e,b);var K=getSideChannel();K.set(sentinel,v),pushToArray(E,stringify(P,z,t,o,a,n,i,l,"comma"===t&&m&&isArray(g)?null:s,f,u,d,y,c,p,m,h,K))}}return E},normalizeStringifyOptions=function normalizeStringifyOptions(e){if(!e)return defaults;if(void 0!==e.allowEmptyArrays&&"boolean"!=typeof e.allowEmptyArrays)throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(void 0!==e.encodeDotInKeys&&"boolean"!=typeof e.encodeDotInKeys)throw new TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");if(null!==e.encoder&&void 0!==e.encoder&&"function"!=typeof e.encoder)throw new TypeError("Encoder has to be a function.");var r=e.charset||defaults.charset;if(void 0!==e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var t=formats.default;if(void 0!==e.format){if(!has.call(formats.formatters,e.format))throw new TypeError("Unknown format option provided.");t=e.format}var o,a=formats.formatters[t],n=defaults.filter;if(("function"==typeof e.filter||isArray(e.filter))&&(n=e.filter),o=e.arrayFormat in arrayPrefixGenerators?e.arrayFormat:"indices"in e?e.indices?"indices":"repeat":defaults.arrayFormat,"commaRoundTrip"in e&&"boolean"!=typeof e.commaRoundTrip)throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var i=void 0===e.allowDots?!0===e.encodeDotInKeys||defaults.allowDots:!!e.allowDots;return{addQueryPrefix:"boolean"==typeof e.addQueryPrefix?e.addQueryPrefix:defaults.addQueryPrefix,allowDots:i,allowEmptyArrays:"boolean"==typeof e.allowEmptyArrays?!!e.allowEmptyArrays:defaults.allowEmptyArrays,arrayFormat:o,charset:r,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:defaults.charsetSentinel,commaRoundTrip:!!e.commaRoundTrip,delimiter:void 0===e.delimiter?defaults.delimiter:e.delimiter,encode:"boolean"==typeof e.encode?e.encode:defaults.encode,encodeDotInKeys:"boolean"==typeof e.encodeDotInKeys?e.encodeDotInKeys:defaults.encodeDotInKeys,encoder:"function"==typeof e.encoder?e.encoder:defaults.encoder,encodeValuesOnly:"boolean"==typeof e.encodeValuesOnly?e.encodeValuesOnly:defaults.encodeValuesOnly,filter:n,format:t,formatter:a,serializeDate:"function"==typeof e.serializeDate?e.serializeDate:defaults.serializeDate,skipNulls:"boolean"==typeof e.skipNulls?e.skipNulls:defaults.skipNulls,sort:"function"==typeof e.sort?e.sort:null,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:defaults.strictNullHandling}};module.exports=function(e,r){var t,o=e,a=normalizeStringifyOptions(r);"function"==typeof a.filter?o=(0,a.filter)("",o):isArray(a.filter)&&(t=a.filter);var n=[];if("object"!=typeof o||null===o)return"";var i=arrayPrefixGenerators[a.arrayFormat],l="comma"===i&&a.commaRoundTrip;t||(t=Object.keys(o)),a.sort&&t.sort(a.sort);for(var s=getSideChannel(),f=0;f<t.length;++f){var u=t[f],d=o[u];a.skipNulls&&null===d||pushToArray(n,stringify(d,u,i,l,a.allowEmptyArrays,a.strictNullHandling,a.skipNulls,a.encodeDotInKeys,a.encode?a.encoder:null,a.filter,a.sort,a.allowDots,a.serializeDate,a.format,a.formatter,a.encodeValuesOnly,a.charset,s))}var y=n.join(a.delimiter),c=!0===a.addQueryPrefix?"?":"";return a.charsetSentinel&&("iso-8859-1"===a.charset?c+="utf8=%26%2310003%3B&":c+="utf8=%E2%9C%93&"),y.length>0?c+y:""}; + +},{"1":1,"46":46,"5":5}],5:[function(require,module,exports){ +"use strict";var formats=require(1),has=Object.prototype.hasOwnProperty,isArray=Array.isArray,hexTable=function(){for(var e=[],r=0;r<256;++r)e.push("%"+((r<16?"0":"")+r.toString(16)).toUpperCase());return e}(),compactQueue=function compactQueue(e){for(;e.length>1;){var r=e.pop(),t=r.obj[r.prop];if(isArray(t)){for(var o=[],n=0;n<t.length;++n)void 0!==t[n]&&o.push(t[n]);r.obj[r.prop]=o}}},arrayToObject=function arrayToObject(e,r){for(var t=r&&r.plainObjects?{__proto__:null}:{},o=0;o<e.length;++o)void 0!==e[o]&&(t[o]=e[o]);return t},merge=function merge(e,r,t){if(!r)return e;if("object"!=typeof r&&"function"!=typeof r){if(isArray(e))e.push(r);else{if(!e||"object"!=typeof e)return[e,r];(t&&(t.plainObjects||t.allowPrototypes)||!has.call(Object.prototype,r))&&(e[r]=!0)}return e}if(!e||"object"!=typeof e)return[e].concat(r);var o=e;return isArray(e)&&!isArray(r)&&(o=arrayToObject(e,t)),isArray(e)&&isArray(r)?(r.forEach((function(r,o){if(has.call(e,o)){var n=e[o];n&&"object"==typeof n&&r&&"object"==typeof r?e[o]=merge(n,r,t):e.push(r)}else e[o]=r})),e):Object.keys(r).reduce((function(e,o){var n=r[o];return has.call(e,o)?e[o]=merge(e[o],n,t):e[o]=n,e}),o)},assign=function assignSingleSource(e,r){return Object.keys(r).reduce((function(e,t){return e[t]=r[t],e}),e)},decode=function(e,r,t){var o=e.replace(/\+/g," ");if("iso-8859-1"===t)return o.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(o)}catch(e){return o}},limit=1024,encode=function encode(e,r,t,o,n){if(0===e.length)return e;var a=e;if("symbol"==typeof e?a=Symbol.prototype.toString.call(e):"string"!=typeof e&&(a=String(e)),"iso-8859-1"===t)return escape(a).replace(/%u[0-9a-f]{4}/gi,(function(e){return"%26%23"+parseInt(e.slice(2),16)+"%3B"}));for(var c="",i=0;i<a.length;i+=limit){for(var u=a.length>=limit?a.slice(i,i+limit):a,p=[],f=0;f<u.length;++f){var s=u.charCodeAt(f);45===s||46===s||95===s||126===s||s>=48&&s<=57||s>=65&&s<=90||s>=97&&s<=122||n===formats.RFC1738&&(40===s||41===s)?p[p.length]=u.charAt(f):s<128?p[p.length]=hexTable[s]:s<2048?p[p.length]=hexTable[192|s>>6]+hexTable[128|63&s]:s<55296||s>=57344?p[p.length]=hexTable[224|s>>12]+hexTable[128|s>>6&63]+hexTable[128|63&s]:(f+=1,s=65536+((1023&s)<<10|1023&u.charCodeAt(f)),p[p.length]=hexTable[240|s>>18]+hexTable[128|s>>12&63]+hexTable[128|s>>6&63]+hexTable[128|63&s])}c+=p.join("")}return c},compact=function compact(e){for(var r=[{obj:{o:e},prop:"o"}],t=[],o=0;o<r.length;++o)for(var n=r[o],a=n.obj[n.prop],c=Object.keys(a),i=0;i<c.length;++i){var u=c[i],p=a[u];"object"==typeof p&&null!==p&&-1===t.indexOf(p)&&(r.push({obj:a,prop:u}),t.push(p))}return compactQueue(r),e},isRegExp=function isRegExp(e){return"[object RegExp]"===Object.prototype.toString.call(e)},isBuffer=function isBuffer(e){return!(!e||"object"!=typeof e||!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e)))},combine=function combine(e,r){return[].concat(e,r)},maybeMap=function maybeMap(e,r){if(isArray(e)){for(var t=[],o=0;o<e.length;o+=1)t.push(r(e[o]));return t}return r(e)};module.exports={/* common-shake removed: arrayToObject:arrayToObject *//* common-shake removed: assign:assign */combine:combine,compact:compact,decode:decode,encode:encode,isBuffer:isBuffer,isRegExp:isRegExp,maybeMap:maybeMap,merge:merge}; + +},{"1":1}],46:[function(require,module,exports){ +"use strict";var $TypeError=require(20),inspect=require(42),getSideChannelList=require(43),getSideChannelMap=require(44),getSideChannelWeakMap=require(45),makeChannel=getSideChannelWeakMap||getSideChannelMap||getSideChannelList;module.exports=function getSideChannel(){var e,n={assert:function(e){if(!n.has(e))throw new $TypeError("Side channel does not contain "+inspect(e))},delete:function(n){return!!e&&e.delete(n)},get:function(n){return e&&e.get(n)},has:function(n){return!!e&&e.has(n)},set:function(n,t){e||(e=makeChannel()),e.set(n,t)}};return n}; + +},{"20":20,"42":42,"43":43,"44":44,"45":45}],6:[function(require,module,exports){ + +},{}],7:[function(require,module,exports){ +"use strict";var bind=require(24),$apply=require(8),$call=require(9),$reflectApply=require(11);module.exports=$reflectApply||bind.call($call,$apply); + +},{"11":11,"24":24,"8":8,"9":9}],8:[function(require,module,exports){ +"use strict";module.exports=Function.prototype.apply; + +},{}],9:[function(require,module,exports){ +"use strict";module.exports=Function.prototype.call; + +},{}],24:[function(require,module,exports){ +"use strict";var implementation=require(23);module.exports=Function.prototype.bind||implementation; + +},{"23":23}],11:[function(require,module,exports){ +"use strict";module.exports="undefined"!=typeof Reflect&&Reflect&&Reflect.apply; + +},{}],10:[function(require,module,exports){ +"use strict";var bind=require(24),$TypeError=require(20),$call=require(9),$actualApply=require(7);module.exports=function callBindBasic(r){if(r.length<1||"function"!=typeof r[0])throw new $TypeError("a function is required");return $actualApply(bind,$call,r)}; + +},{"20":20,"24":24,"7":7,"9":9}],20:[function(require,module,exports){ +"use strict";module.exports=TypeError; + +},{}],12:[function(require,module,exports){ +"use strict";var GetIntrinsic=require(25),callBindBasic=require(10),$indexOf=callBindBasic([GetIntrinsic("%String.prototype.indexOf%")]);module.exports=function callBoundIntrinsic(i,n){var t=GetIntrinsic(i,!!n);return"function"==typeof t&&$indexOf(i,".prototype.")>-1?callBindBasic([t]):t}; + +},{"10":10,"25":25}],25:[function(require,module,exports){ +"use strict";var undefined,$Object=require(22),$Error=require(16),$EvalError=require(15),$RangeError=require(17),$ReferenceError=require(18),$SyntaxError=require(19),$TypeError=require(20),$URIError=require(21),abs=require(34),floor=require(35),max=require(37),min=require(38),pow=require(39),round=require(40),sign=require(41),$Function=Function,getEvalledConstructor=function(r){try{return $Function('"use strict"; return ('+r+").constructor;")()}catch(r){}},$gOPD=require(30),$defineProperty=require(14),throwTypeError=function(){throw new $TypeError},ThrowTypeError=$gOPD?function(){try{return throwTypeError}catch(r){try{return $gOPD(arguments,"callee").get}catch(r){return throwTypeError}}}():throwTypeError,hasSymbols=require(31)(),getProto=require(28),$ObjectGPO=require(26),$ReflectGPO=require(27),$apply=require(8),$call=require(9),needsEval={},TypedArray="undefined"!=typeof Uint8Array&&getProto?getProto(Uint8Array):undefined,INTRINSICS={__proto__:null,"%AggregateError%":"undefined"==typeof AggregateError?undefined:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?undefined:ArrayBuffer,"%ArrayIteratorPrototype%":hasSymbols&&getProto?getProto([][Symbol.iterator]()):undefined,"%AsyncFromSyncIteratorPrototype%":undefined,"%AsyncFunction%":needsEval,"%AsyncGenerator%":needsEval,"%AsyncGeneratorFunction%":needsEval,"%AsyncIteratorPrototype%":needsEval,"%Atomics%":"undefined"==typeof Atomics?undefined:Atomics,"%BigInt%":"undefined"==typeof BigInt?undefined:BigInt,"%BigInt64Array%":"undefined"==typeof BigInt64Array?undefined:BigInt64Array,"%BigUint64Array%":"undefined"==typeof BigUint64Array?undefined:BigUint64Array,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?undefined:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":$Error,"%eval%":eval,"%EvalError%":$EvalError,"%Float32Array%":"undefined"==typeof Float32Array?undefined:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?undefined:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?undefined:FinalizationRegistry,"%Function%":$Function,"%GeneratorFunction%":needsEval,"%Int8Array%":"undefined"==typeof Int8Array?undefined:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?undefined:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?undefined:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":hasSymbols&&getProto?getProto(getProto([][Symbol.iterator]())):undefined,"%JSON%":"object"==typeof JSON?JSON:undefined,"%Map%":"undefined"==typeof Map?undefined:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&hasSymbols&&getProto?getProto((new Map)[Symbol.iterator]()):undefined,"%Math%":Math,"%Number%":Number,"%Object%":$Object,"%Object.getOwnPropertyDescriptor%":$gOPD,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?undefined:Promise,"%Proxy%":"undefined"==typeof Proxy?undefined:Proxy,"%RangeError%":$RangeError,"%ReferenceError%":$ReferenceError,"%Reflect%":"undefined"==typeof Reflect?undefined:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?undefined:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&hasSymbols&&getProto?getProto((new Set)[Symbol.iterator]()):undefined,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?undefined:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":hasSymbols&&getProto?getProto(""[Symbol.iterator]()):undefined,"%Symbol%":hasSymbols?Symbol:undefined,"%SyntaxError%":$SyntaxError,"%ThrowTypeError%":ThrowTypeError,"%TypedArray%":TypedArray,"%TypeError%":$TypeError,"%Uint8Array%":"undefined"==typeof Uint8Array?undefined:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?undefined:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?undefined:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?undefined:Uint32Array,"%URIError%":$URIError,"%WeakMap%":"undefined"==typeof WeakMap?undefined:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?undefined:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?undefined:WeakSet,"%Function.prototype.call%":$call,"%Function.prototype.apply%":$apply,"%Object.defineProperty%":$defineProperty,"%Object.getPrototypeOf%":$ObjectGPO,"%Math.abs%":abs,"%Math.floor%":floor,"%Math.max%":max,"%Math.min%":min,"%Math.pow%":pow,"%Math.round%":round,"%Math.sign%":sign,"%Reflect.getPrototypeOf%":$ReflectGPO};if(getProto)try{null.error}catch(r){var errorProto=getProto(getProto(r));INTRINSICS["%Error.prototype%"]=errorProto}var doEval=function doEval(r){var e;if("%AsyncFunction%"===r)e=getEvalledConstructor("async function () {}");else if("%GeneratorFunction%"===r)e=getEvalledConstructor("function* () {}");else if("%AsyncGeneratorFunction%"===r)e=getEvalledConstructor("async function* () {}");else if("%AsyncGenerator%"===r){var t=doEval("%AsyncGeneratorFunction%");t&&(e=t.prototype)}else if("%AsyncIteratorPrototype%"===r){var o=doEval("%AsyncGenerator%");o&&getProto&&(e=getProto(o.prototype))}return INTRINSICS[r]=e,e},LEGACY_ALIASES={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},bind=require(24),hasOwn=require(33),$concat=bind.call($call,Array.prototype.concat),$spliceApply=bind.call($apply,Array.prototype.splice),$replace=bind.call($call,String.prototype.replace),$strSlice=bind.call($call,String.prototype.slice),$exec=bind.call($call,RegExp.prototype.exec),rePropName=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,reEscapeChar=/\\(\\)?/g,stringToPath=function stringToPath(r){var e=$strSlice(r,0,1),t=$strSlice(r,-1);if("%"===e&&"%"!==t)throw new $SyntaxError("invalid intrinsic syntax, expected closing `%`");if("%"===t&&"%"!==e)throw new $SyntaxError("invalid intrinsic syntax, expected opening `%`");var o=[];return $replace(r,rePropName,(function(r,e,t,n){o[o.length]=t?$replace(n,reEscapeChar,"$1"):e||r})),o},getBaseIntrinsic=function getBaseIntrinsic(r,e){var t,o=r;if(hasOwn(LEGACY_ALIASES,o)&&(o="%"+(t=LEGACY_ALIASES[o])[0]+"%"),hasOwn(INTRINSICS,o)){var n=INTRINSICS[o];if(n===needsEval&&(n=doEval(o)),void 0===n&&!e)throw new $TypeError("intrinsic "+r+" exists, but is not available. Please file an issue!");return{alias:t,name:o,value:n}}throw new $SyntaxError("intrinsic "+r+" does not exist!")};module.exports=function GetIntrinsic(r,e){if("string"!=typeof r||0===r.length)throw new $TypeError("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof e)throw new $TypeError('"allowMissing" argument must be a boolean');if(null===$exec(/^%?[^%]*%?$/,r))throw new $SyntaxError("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var t=stringToPath(r),o=t.length>0?t[0]:"",n=getBaseIntrinsic("%"+o+"%",e),a=n.name,i=n.value,y=!1,p=n.alias;p&&(o=p[0],$spliceApply(t,$concat([0,1],p)));for(var s=1,d=!0;s<t.length;s+=1){var f=t[s],l=$strSlice(f,0,1),u=$strSlice(f,-1);if(('"'===l||"'"===l||"`"===l||'"'===u||"'"===u||"`"===u)&&l!==u)throw new $SyntaxError("property names with quotes must have matching quotes");if("constructor"!==f&&d||(y=!0),hasOwn(INTRINSICS,a="%"+(o+="."+f)+"%"))i=INTRINSICS[a];else if(null!=i){if(!(f in i)){if(!e)throw new $TypeError("base intrinsic for "+r+" exists, but the property is not available.");return}if($gOPD&&s+1>=t.length){var c=$gOPD(i,f);i=(d=!!c)&&"get"in c&&!("originalValue"in c.get)?c.get:i[f]}else d=hasOwn(i,f),i=i[f];d&&!y&&(INTRINSICS[a]=i)}}return i}; + +},{"14":14,"15":15,"16":16,"17":17,"18":18,"19":19,"20":20,"21":21,"22":22,"24":24,"26":26,"27":27,"28":28,"30":30,"31":31,"33":33,"34":34,"35":35,"37":37,"38":38,"39":39,"40":40,"41":41,"8":8,"9":9}],13:[function(require,module,exports){ +"use strict";var hasProtoAccessor,callBind=require(10),gOPD=require(30);try{hasProtoAccessor=[].__proto__===Array.prototype}catch(t){if(!t||"object"!=typeof t||!("code"in t)||"ERR_PROTO_ACCESS"!==t.code)throw t}var desc=!!hasProtoAccessor&&gOPD&&gOPD(Object.prototype,"__proto__"),$Object=Object,$getPrototypeOf=$Object.getPrototypeOf;module.exports=desc&&"function"==typeof desc.get?callBind([desc.get]):"function"==typeof $getPrototypeOf&&function getDunder(t){return $getPrototypeOf(null==t?t:$Object(t))}; + +},{"10":10,"30":30}],30:[function(require,module,exports){ +"use strict";var $gOPD=require(29);if($gOPD)try{$gOPD([],"length")}catch(g){$gOPD=null}module.exports=$gOPD; + +},{"29":29}],14:[function(require,module,exports){ +"use strict";var $defineProperty=Object.defineProperty||!1;if($defineProperty)try{$defineProperty({},"a",{value:1})}catch(e){$defineProperty=!1}module.exports=$defineProperty; + +},{}],15:[function(require,module,exports){ +"use strict";module.exports=EvalError; + +},{}],16:[function(require,module,exports){ +"use strict";module.exports=Error; + +},{}],17:[function(require,module,exports){ +"use strict";module.exports=RangeError; + +},{}],18:[function(require,module,exports){ +"use strict";module.exports=ReferenceError; + +},{}],19:[function(require,module,exports){ +"use strict";module.exports=SyntaxError; + +},{}],21:[function(require,module,exports){ +"use strict";module.exports=URIError; + +},{}],22:[function(require,module,exports){ +"use strict";module.exports=Object; + +},{}],23:[function(require,module,exports){ +"use strict";var ERROR_MESSAGE="Function.prototype.bind called on incompatible ",toStr=Object.prototype.toString,max=Math.max,funcType="[object Function]",concatty=function concatty(t,n){for(var r=[],o=0;o<t.length;o+=1)r[o]=t[o];for(var e=0;e<n.length;e+=1)r[e+t.length]=n[e];return r},slicy=function slicy(t,n){for(var r=[],o=n||0,e=0;o<t.length;o+=1,e+=1)r[e]=t[o];return r},joiny=function(t,n){for(var r="",o=0;o<t.length;o+=1)r+=t[o],o+1<t.length&&(r+=n);return r};module.exports=function bind(t){var n=this;if("function"!=typeof n||toStr.apply(n)!==funcType)throw new TypeError(ERROR_MESSAGE+n);for(var r,o=slicy(arguments,1),e=max(0,n.length-o.length),i=[],c=0;c<e;c++)i[c]="$"+c;if(r=Function("binder","return function ("+joiny(i,",")+"){ return binder.apply(this,arguments); }")((function(){if(this instanceof r){var e=n.apply(this,concatty(o,arguments));return Object(e)===e?e:this}return n.apply(t,concatty(o,arguments))})),n.prototype){var p=function Empty(){};p.prototype=n.prototype,r.prototype=new p,p.prototype=null}return r}; + +},{}],35:[function(require,module,exports){ +"use strict";module.exports=Math.floor; + +},{}],37:[function(require,module,exports){ +"use strict";module.exports=Math.max; + +},{}],39:[function(require,module,exports){ +"use strict";module.exports=Math.pow; + +},{}],34:[function(require,module,exports){ +"use strict";module.exports=Math.abs; + +},{}],40:[function(require,module,exports){ +"use strict";module.exports=Math.round; + +},{}],38:[function(require,module,exports){ +"use strict";module.exports=Math.min; + +},{}],27:[function(require,module,exports){ +"use strict";module.exports="undefined"!=typeof Reflect&&Reflect.getPrototypeOf||null; + +},{}],26:[function(require,module,exports){ +"use strict";var $Object=require(22);module.exports=$Object.getPrototypeOf||null; + +},{"22":22}],33:[function(require,module,exports){ +"use strict";var call=Function.prototype.call,$hasOwn=Object.prototype.hasOwnProperty,bind=require(24);module.exports=bind.call(call,$hasOwn); + +},{"24":24}],41:[function(require,module,exports){ +"use strict";var $isNaN=require(36);module.exports=function sign(i){return $isNaN(i)||0===i?i:i<0?-1:1}; + +},{"36":36}],31:[function(require,module,exports){ +"use strict";var origSymbol="undefined"!=typeof Symbol&&Symbol,hasSymbolSham=require(32);module.exports=function hasNativeSymbols(){return"function"==typeof origSymbol&&"function"==typeof Symbol&&"symbol"==typeof origSymbol("foo")&&"symbol"==typeof Symbol("bar")&&hasSymbolSham()}; + +},{"32":32}],28:[function(require,module,exports){ +"use strict";var reflectGetProto=require(27),originalGetProto=require(26),getDunderProto=require(13);module.exports=reflectGetProto?function getProto(t){return reflectGetProto(t)}:originalGetProto?function getProto(t){if(!t||"object"!=typeof t&&"function"!=typeof t)throw new TypeError("getProto: not an object");return originalGetProto(t)}:getDunderProto?function getProto(t){return getDunderProto(t)}:null; + +},{"13":13,"26":26,"27":27}],29:[function(require,module,exports){ +"use strict";module.exports=Object.getOwnPropertyDescriptor; + +},{}],32:[function(require,module,exports){ +"use strict";module.exports=function hasSymbols(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var t={},e=Symbol("test"),r=Object(e);if("string"==typeof e)return!1;if("[object Symbol]"!==Object.prototype.toString.call(e))return!1;if("[object Symbol]"!==Object.prototype.toString.call(r))return!1;for(var o in t[e]=42,t)return!1;if("function"==typeof Object.keys&&0!==Object.keys(t).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(t).length)return!1;var n=Object.getOwnPropertySymbols(t);if(1!==n.length||n[0]!==e)return!1;if(!Object.prototype.propertyIsEnumerable.call(t,e))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var y=Object.getOwnPropertyDescriptor(t,e);if(42!==y.value||!0!==y.enumerable)return!1}return!0}; + +},{}],36:[function(require,module,exports){ +"use strict";module.exports=Number.isNaN||function isNaN(e){return e!=e}; + +},{}],42:[function(require,module,exports){ +(function (global){(function (){ +var hasMap="function"==typeof Map&&Map.prototype,mapSizeDescriptor=Object.getOwnPropertyDescriptor&&hasMap?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,mapSize=hasMap&&mapSizeDescriptor&&"function"==typeof mapSizeDescriptor.get?mapSizeDescriptor.get:null,mapForEach=hasMap&&Map.prototype.forEach,hasSet="function"==typeof Set&&Set.prototype,setSizeDescriptor=Object.getOwnPropertyDescriptor&&hasSet?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,setSize=hasSet&&setSizeDescriptor&&"function"==typeof setSizeDescriptor.get?setSizeDescriptor.get:null,setForEach=hasSet&&Set.prototype.forEach,hasWeakMap="function"==typeof WeakMap&&WeakMap.prototype,weakMapHas=hasWeakMap?WeakMap.prototype.has:null,hasWeakSet="function"==typeof WeakSet&&WeakSet.prototype,weakSetHas=hasWeakSet?WeakSet.prototype.has:null,hasWeakRef="function"==typeof WeakRef&&WeakRef.prototype,weakRefDeref=hasWeakRef?WeakRef.prototype.deref:null,booleanValueOf=Boolean.prototype.valueOf,objectToString=Object.prototype.toString,functionToString=Function.prototype.toString,$match=String.prototype.match,$slice=String.prototype.slice,$replace=String.prototype.replace,$toUpperCase=String.prototype.toUpperCase,$toLowerCase=String.prototype.toLowerCase,$test=RegExp.prototype.test,$concat=Array.prototype.concat,$join=Array.prototype.join,$arrSlice=Array.prototype.slice,$floor=Math.floor,bigIntValueOf="function"==typeof BigInt?BigInt.prototype.valueOf:null,gOPS=Object.getOwnPropertySymbols,symToString="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?Symbol.prototype.toString:null,hasShammedSymbols="function"==typeof Symbol&&"object"==typeof Symbol.iterator,toStringTag="function"==typeof Symbol&&Symbol.toStringTag&&(Symbol.toStringTag,1)?Symbol.toStringTag:null,isEnumerable=Object.prototype.propertyIsEnumerable,gPO=("function"==typeof Reflect?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(t){return t.__proto__}:null);function addNumericSeparator(t,e){if(t===1/0||t===-1/0||t!=t||t&&t>-1e3&&t<1e3||$test.call(/e/,e))return e;var r=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if("number"==typeof t){var n=t<0?-$floor(-t):$floor(t);if(n!==t){var o=String(n),i=$slice.call(e,o.length+1);return $replace.call(o,r,"$&_")+"."+$replace.call($replace.call(i,/([0-9]{3})/g,"$&_"),/_$/,"")}}return $replace.call(e,r,"$&_")}var utilInspect=require(6),inspectCustom=utilInspect.custom,inspectSymbol=isSymbol(inspectCustom)?inspectCustom:null,quotes={__proto__:null,double:'"',single:"'"},quoteREs={__proto__:null,double:/(["\\])/g,single:/(['\\])/g};function wrapQuotes(t,e,r){var n=r.quoteStyle||e,o=quotes[n];return o+t+o}function quote(t){return $replace.call(String(t),/"/g,""")}function isArray(t){return!("[object Array]"!==toStr(t)||toStringTag&&"object"==typeof t&&toStringTag in t)}function isDate(t){return!("[object Date]"!==toStr(t)||toStringTag&&"object"==typeof t&&toStringTag in t)}function isRegExp(t){return!("[object RegExp]"!==toStr(t)||toStringTag&&"object"==typeof t&&toStringTag in t)}function isError(t){return!("[object Error]"!==toStr(t)||toStringTag&&"object"==typeof t&&toStringTag in t)}function isString(t){return!("[object String]"!==toStr(t)||toStringTag&&"object"==typeof t&&toStringTag in t)}function isNumber(t){return!("[object Number]"!==toStr(t)||toStringTag&&"object"==typeof t&&toStringTag in t)}function isBoolean(t){return!("[object Boolean]"!==toStr(t)||toStringTag&&"object"==typeof t&&toStringTag in t)}function isSymbol(t){if(hasShammedSymbols)return t&&"object"==typeof t&&t instanceof Symbol;if("symbol"==typeof t)return!0;if(!t||"object"!=typeof t||!symToString)return!1;try{return symToString.call(t),!0}catch(t){}return!1}function isBigInt(t){if(!t||"object"!=typeof t||!bigIntValueOf)return!1;try{return bigIntValueOf.call(t),!0}catch(t){}return!1}module.exports=function inspect_(t,e,r,n){var o=e||{};if(has(o,"quoteStyle")&&!has(quotes,o.quoteStyle))throw new TypeError('option "quoteStyle" must be "single" or "double"');if(has(o,"maxStringLength")&&("number"==typeof o.maxStringLength?o.maxStringLength<0&&o.maxStringLength!==1/0:null!==o.maxStringLength))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var i=!has(o,"customInspect")||o.customInspect;if("boolean"!=typeof i&&"symbol"!==i)throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(has(o,"indent")&&null!==o.indent&&"\t"!==o.indent&&!(parseInt(o.indent,10)===o.indent&&o.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(has(o,"numericSeparator")&&"boolean"!=typeof o.numericSeparator)throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var a=o.numericSeparator;if(void 0===t)return"undefined";if(null===t)return"null";if("boolean"==typeof t)return t?"true":"false";if("string"==typeof t)return inspectString(t,o);if("number"==typeof t){if(0===t)return 1/0/t>0?"0":"-0";var c=String(t);return a?addNumericSeparator(t,c):c}if("bigint"==typeof t){var l=String(t)+"n";return a?addNumericSeparator(t,l):l}var p=void 0===o.depth?5:o.depth;if(void 0===r&&(r=0),r>=p&&p>0&&"object"==typeof t)return isArray(t)?"[Array]":"[Object]";var u=getIndent(o,r);if(void 0===n)n=[];else if(indexOf(n,t)>=0)return"[Circular]";function inspect(t,e,i){if(e&&(n=$arrSlice.call(n)).push(e),i){var a={depth:o.depth};return has(o,"quoteStyle")&&(a.quoteStyle=o.quoteStyle),inspect_(t,a,r+1,n)}return inspect_(t,o,r+1,n)}if("function"==typeof t&&!isRegExp(t)){var s=nameOf(t),f=arrObjKeys(t,inspect);return"[Function"+(s?": "+s:" (anonymous)")+"]"+(f.length>0?" { "+$join.call(f,", ")+" }":"")}if(isSymbol(t)){var y=hasShammedSymbols?$replace.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):symToString.call(t);return"object"!=typeof t||hasShammedSymbols?y:markBoxed(y)}if(isElement(t)){for(var S="<"+$toLowerCase.call(String(t.nodeName)),g=t.attributes||[],b=0;b<g.length;b++)S+=" "+g[b].name+"="+wrapQuotes(quote(g[b].value),"double",o);return S+=">",t.childNodes&&t.childNodes.length&&(S+="..."),S+"</"+$toLowerCase.call(String(t.nodeName))+">"}if(isArray(t)){if(0===t.length)return"[]";var m=arrObjKeys(t,inspect);return u&&!singleLineValues(m)?"["+indentedJoin(m,u)+"]":"[ "+$join.call(m,", ")+" ]"}if(isError(t)){var h=arrObjKeys(t,inspect);return"cause"in Error.prototype||!("cause"in t)||isEnumerable.call(t,"cause")?0===h.length?"["+String(t)+"]":"{ ["+String(t)+"] "+$join.call(h,", ")+" }":"{ ["+String(t)+"] "+$join.call($concat.call("[cause]: "+inspect(t.cause),h),", ")+" }"}if("object"==typeof t&&i){if(inspectSymbol&&"function"==typeof t[inspectSymbol]&&utilInspect)return utilInspect(t,{depth:p-r});if("symbol"!==i&&"function"==typeof t.inspect)return t.inspect()}if(isMap(t)){var d=[];return mapForEach&&mapForEach.call(t,(function(e,r){d.push(inspect(r,t,!0)+" => "+inspect(e,t))})),collectionOf("Map",mapSize.call(t),d,u)}if(isSet(t)){var j=[];return setForEach&&setForEach.call(t,(function(e){j.push(inspect(e,t))})),collectionOf("Set",setSize.call(t),j,u)}if(isWeakMap(t))return weakCollectionOf("WeakMap");if(isWeakSet(t))return weakCollectionOf("WeakSet");if(isWeakRef(t))return weakCollectionOf("WeakRef");if(isNumber(t))return markBoxed(inspect(Number(t)));if(isBigInt(t))return markBoxed(inspect(bigIntValueOf.call(t)));if(isBoolean(t))return markBoxed(booleanValueOf.call(t));if(isString(t))return markBoxed(inspect(String(t)));if("undefined"!=typeof window&&t===window)return"{ [object Window] }";if("undefined"!=typeof globalThis&&t===globalThis||"undefined"!=typeof global&&t===global)return"{ [object globalThis] }";if(!isDate(t)&&!isRegExp(t)){var O=arrObjKeys(t,inspect),w=gPO?gPO(t)===Object.prototype:t instanceof Object||t.constructor===Object,$=t instanceof Object?"":"null prototype",k=!w&&toStringTag&&Object(t)===t&&toStringTag in t?$slice.call(toStr(t),8,-1):$?"Object":"",v=(w||"function"!=typeof t.constructor?"":t.constructor.name?t.constructor.name+" ":"")+(k||$?"["+$join.call($concat.call([],k||[],$||[]),": ")+"] ":"");return 0===O.length?v+"{}":u?v+"{"+indentedJoin(O,u)+"}":v+"{ "+$join.call(O,", ")+" }"}return String(t)};var hasOwn=Object.prototype.hasOwnProperty||function(t){return t in this};function has(t,e){return hasOwn.call(t,e)}function toStr(t){return objectToString.call(t)}function nameOf(t){if(t.name)return t.name;var e=$match.call(functionToString.call(t),/^function\s*([\w$]+)/);return e?e[1]:null}function indexOf(t,e){if(t.indexOf)return t.indexOf(e);for(var r=0,n=t.length;r<n;r++)if(t[r]===e)return r;return-1}function isMap(t){if(!mapSize||!t||"object"!=typeof t)return!1;try{mapSize.call(t);try{setSize.call(t)}catch(t){return!0}return t instanceof Map}catch(t){}return!1}function isWeakMap(t){if(!weakMapHas||!t||"object"!=typeof t)return!1;try{weakMapHas.call(t,weakMapHas);try{weakSetHas.call(t,weakSetHas)}catch(t){return!0}return t instanceof WeakMap}catch(t){}return!1}function isWeakRef(t){if(!weakRefDeref||!t||"object"!=typeof t)return!1;try{return weakRefDeref.call(t),!0}catch(t){}return!1}function isSet(t){if(!setSize||!t||"object"!=typeof t)return!1;try{setSize.call(t);try{mapSize.call(t)}catch(t){return!0}return t instanceof Set}catch(t){}return!1}function isWeakSet(t){if(!weakSetHas||!t||"object"!=typeof t)return!1;try{weakSetHas.call(t,weakSetHas);try{weakMapHas.call(t,weakMapHas)}catch(t){return!0}return t instanceof WeakSet}catch(t){}return!1}function isElement(t){return!(!t||"object"!=typeof t)&&("undefined"!=typeof HTMLElement&&t instanceof HTMLElement||"string"==typeof t.nodeName&&"function"==typeof t.getAttribute)}function inspectString(t,e){if(t.length>e.maxStringLength){var r=t.length-e.maxStringLength,n="... "+r+" more character"+(r>1?"s":"");return inspectString($slice.call(t,0,e.maxStringLength),e)+n}var o=quoteREs[e.quoteStyle||"single"];return o.lastIndex=0,wrapQuotes($replace.call($replace.call(t,o,"\\$1"),/[\x00-\x1f]/g,lowbyte),"single",e)}function lowbyte(t){var e=t.charCodeAt(0),r={8:"b",9:"t",10:"n",12:"f",13:"r"}[e];return r?"\\"+r:"\\x"+(e<16?"0":"")+$toUpperCase.call(e.toString(16))}function markBoxed(t){return"Object("+t+")"}function weakCollectionOf(t){return t+" { ? }"}function collectionOf(t,e,r,n){return t+" ("+e+") {"+(n?indentedJoin(r,n):$join.call(r,", "))+"}"}function singleLineValues(t){for(var e=0;e<t.length;e++)if(indexOf(t[e],"\n")>=0)return!1;return!0}function getIndent(t,e){var r;if("\t"===t.indent)r="\t";else{if(!("number"==typeof t.indent&&t.indent>0))return null;r=$join.call(Array(t.indent+1)," ")}return{base:r,prev:$join.call(Array(e+1),r)}}function indentedJoin(t,e){if(0===t.length)return"";var r="\n"+e.prev+e.base;return r+$join.call(t,","+r)+"\n"+e.prev}function arrObjKeys(t,e){var r=isArray(t),n=[];if(r){n.length=t.length;for(var o=0;o<t.length;o++)n[o]=has(t,o)?e(t[o],t):""}var i,a="function"==typeof gOPS?gOPS(t):[];if(hasShammedSymbols){i={};for(var c=0;c<a.length;c++)i["$"+a[c]]=a[c]}for(var l in t)has(t,l)&&(r&&String(Number(l))===l&&l<t.length||hasShammedSymbols&&i["$"+l]instanceof Symbol||($test.call(/[^\w$]/,l)?n.push(e(l,t)+": "+e(t[l],t)):n.push(l+": "+e(t[l],t))));if("function"==typeof gOPS)for(var p=0;p<a.length;p++)isEnumerable.call(t,a[p])&&n.push("["+e(a[p])+"]: "+e(t[a[p]],t));return n} + +}).call(this)}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) +},{"6":6}],43:[function(require,module,exports){ +"use strict";var inspect=require(42),$TypeError=require(20),listGetNode=function(e,t,n){for(var i,r=e;null!=(i=r.next);r=i)if(i.key===t)return r.next=i.next,n||(i.next=e.next,e.next=i),i},listGet=function(e,t){if(e){var n=listGetNode(e,t);return n&&n.value}},listSet=function(e,t,n){var i=listGetNode(e,t);i?i.value=n:e.next={key:t,next:e.next,value:n}},listHas=function(e,t){return!!e&&!!listGetNode(e,t)},listDelete=function(e,t){if(e)return listGetNode(e,t,!0)};module.exports=function getSideChannelList(){var e,t={assert:function(e){if(!t.has(e))throw new $TypeError("Side channel does not contain "+inspect(e))},delete:function(t){var n=e&&e.next,i=listDelete(e,t);return i&&n&&n===i&&(e=void 0),!!i},get:function(t){return listGet(e,t)},has:function(t){return listHas(e,t)},set:function(t,n){e||(e={next:void 0}),listSet(e,t,n)}};return t}; + +},{"20":20,"42":42}],44:[function(require,module,exports){ +"use strict";var GetIntrinsic=require(25),callBound=require(12),inspect=require(42),$TypeError=require(20),$Map=GetIntrinsic("%Map%",!0),$mapGet=callBound("Map.prototype.get",!0),$mapSet=callBound("Map.prototype.set",!0),$mapHas=callBound("Map.prototype.has",!0),$mapDelete=callBound("Map.prototype.delete",!0),$mapSize=callBound("Map.prototype.size",!0);module.exports=!!$Map&&function getSideChannelMap(){var e,t={assert:function(e){if(!t.has(e))throw new $TypeError("Side channel does not contain "+inspect(e))},delete:function(t){if(e){var n=$mapDelete(e,t);return 0===$mapSize(e)&&(e=void 0),n}return!1},get:function(t){if(e)return $mapGet(e,t)},has:function(t){return!!e&&$mapHas(e,t)},set:function(t,n){e||(e=new $Map),$mapSet(e,t,n)}};return t}; + +},{"12":12,"20":20,"25":25,"42":42}],45:[function(require,module,exports){ +"use strict";var GetIntrinsic=require(25),callBound=require(12),inspect=require(42),getSideChannelMap=require(44),$TypeError=require(20),$WeakMap=GetIntrinsic("%WeakMap%",!0),$weakMapGet=callBound("WeakMap.prototype.get",!0),$weakMapSet=callBound("WeakMap.prototype.set",!0),$weakMapHas=callBound("WeakMap.prototype.has",!0),$weakMapDelete=callBound("WeakMap.prototype.delete",!0);module.exports=$WeakMap?function getSideChannelWeakMap(){var e,t,a={assert:function(e){if(!a.has(e))throw new $TypeError("Side channel does not contain "+inspect(e))},delete:function(a){if($WeakMap&&a&&("object"==typeof a||"function"==typeof a)){if(e)return $weakMapDelete(e,a)}else if(getSideChannelMap&&t)return t.delete(a);return!1},get:function(a){return $WeakMap&&a&&("object"==typeof a||"function"==typeof a)&&e?$weakMapGet(e,a):t&&t.get(a)},has:function(a){return $WeakMap&&a&&("object"==typeof a||"function"==typeof a)&&e?$weakMapHas(e,a):!!t&&t.has(a)},set:function(a,n){$WeakMap&&a&&("object"==typeof a||"function"==typeof a)?(e||(e=new $WeakMap),$weakMapSet(e,a,n)):getSideChannelMap&&(t||(t=getSideChannelMap()),t.set(a,n))}};return a}:getSideChannelMap; + +},{"12":12,"20":20,"25":25,"42":42,"44":44}]},{},[2])(2) +}); diff --git a/node_modules/body-parser/node_modules/qs/lib/formats.js b/node_modules/body-parser/node_modules/qs/lib/formats.js new file mode 100644 index 0000000..f36cf20 --- /dev/null +++ b/node_modules/body-parser/node_modules/qs/lib/formats.js @@ -0,0 +1,23 @@ +'use strict'; + +var replace = String.prototype.replace; +var percentTwenties = /%20/g; + +var Format = { + RFC1738: 'RFC1738', + RFC3986: 'RFC3986' +}; + +module.exports = { + 'default': Format.RFC3986, + formatters: { + RFC1738: function (value) { + return replace.call(value, percentTwenties, '+'); + }, + RFC3986: function (value) { + return String(value); + } + }, + RFC1738: Format.RFC1738, + RFC3986: Format.RFC3986 +}; diff --git a/node_modules/body-parser/node_modules/qs/lib/index.js b/node_modules/body-parser/node_modules/qs/lib/index.js new file mode 100644 index 0000000..0d6a97d --- /dev/null +++ b/node_modules/body-parser/node_modules/qs/lib/index.js @@ -0,0 +1,11 @@ +'use strict'; + +var stringify = require('./stringify'); +var parse = require('./parse'); +var formats = require('./formats'); + +module.exports = { + formats: formats, + parse: parse, + stringify: stringify +}; diff --git a/node_modules/body-parser/node_modules/qs/lib/parse.js b/node_modules/body-parser/node_modules/qs/lib/parse.js new file mode 100644 index 0000000..d25be00 --- /dev/null +++ b/node_modules/body-parser/node_modules/qs/lib/parse.js @@ -0,0 +1,328 @@ +'use strict'; + +var utils = require('./utils'); + +var has = Object.prototype.hasOwnProperty; +var isArray = Array.isArray; + +var defaults = { + allowDots: false, + allowEmptyArrays: false, + allowPrototypes: false, + allowSparse: false, + arrayLimit: 20, + charset: 'utf-8', + charsetSentinel: false, + comma: false, + decodeDotInKeys: false, + decoder: utils.decode, + delimiter: '&', + depth: 5, + duplicates: 'combine', + ignoreQueryPrefix: false, + interpretNumericEntities: false, + parameterLimit: 1000, + parseArrays: true, + plainObjects: false, + strictDepth: false, + strictNullHandling: false, + throwOnLimitExceeded: false +}; + +var interpretNumericEntities = function (str) { + return str.replace(/&#(\d+);/g, function ($0, numberStr) { + return String.fromCharCode(parseInt(numberStr, 10)); + }); +}; + +var parseArrayValue = function (val, options, currentArrayLength) { + if (val && typeof val === 'string' && options.comma && val.indexOf(',') > -1) { + return val.split(','); + } + + if (options.throwOnLimitExceeded && currentArrayLength >= options.arrayLimit) { + throw new RangeError('Array limit exceeded. Only ' + options.arrayLimit + ' element' + (options.arrayLimit === 1 ? '' : 's') + ' allowed in an array.'); + } + + return val; +}; + +// This is what browsers will submit when the ✓ character occurs in an +// application/x-www-form-urlencoded body and the encoding of the page containing +// the form is iso-8859-1, or when the submitted form has an accept-charset +// attribute of iso-8859-1. Presumably also with other charsets that do not contain +// the ✓ character, such as us-ascii. +var isoSentinel = 'utf8=%26%2310003%3B'; // encodeURIComponent('✓') + +// These are the percent-encoded utf-8 octets representing a checkmark, indicating that the request actually is utf-8 encoded. +var charsetSentinel = 'utf8=%E2%9C%93'; // encodeURIComponent('✓') + +var parseValues = function parseQueryStringValues(str, options) { + var obj = { __proto__: null }; + + var cleanStr = options.ignoreQueryPrefix ? str.replace(/^\?/, '') : str; + cleanStr = cleanStr.replace(/%5B/gi, '[').replace(/%5D/gi, ']'); + + var limit = options.parameterLimit === Infinity ? undefined : options.parameterLimit; + var parts = cleanStr.split( + options.delimiter, + options.throwOnLimitExceeded ? limit + 1 : limit + ); + + if (options.throwOnLimitExceeded && parts.length > limit) { + throw new RangeError('Parameter limit exceeded. Only ' + limit + ' parameter' + (limit === 1 ? '' : 's') + ' allowed.'); + } + + var skipIndex = -1; // Keep track of where the utf8 sentinel was found + var i; + + var charset = options.charset; + if (options.charsetSentinel) { + for (i = 0; i < parts.length; ++i) { + if (parts[i].indexOf('utf8=') === 0) { + if (parts[i] === charsetSentinel) { + charset = 'utf-8'; + } else if (parts[i] === isoSentinel) { + charset = 'iso-8859-1'; + } + skipIndex = i; + i = parts.length; // The eslint settings do not allow break; + } + } + } + + for (i = 0; i < parts.length; ++i) { + if (i === skipIndex) { + continue; + } + var part = parts[i]; + + var bracketEqualsPos = part.indexOf(']='); + var pos = bracketEqualsPos === -1 ? part.indexOf('=') : bracketEqualsPos + 1; + + var key; + var val; + if (pos === -1) { + key = options.decoder(part, defaults.decoder, charset, 'key'); + val = options.strictNullHandling ? null : ''; + } else { + key = options.decoder(part.slice(0, pos), defaults.decoder, charset, 'key'); + + val = utils.maybeMap( + parseArrayValue( + part.slice(pos + 1), + options, + isArray(obj[key]) ? obj[key].length : 0 + ), + function (encodedVal) { + return options.decoder(encodedVal, defaults.decoder, charset, 'value'); + } + ); + } + + if (val && options.interpretNumericEntities && charset === 'iso-8859-1') { + val = interpretNumericEntities(String(val)); + } + + if (part.indexOf('[]=') > -1) { + val = isArray(val) ? [val] : val; + } + + var existing = has.call(obj, key); + if (existing && options.duplicates === 'combine') { + obj[key] = utils.combine(obj[key], val); + } else if (!existing || options.duplicates === 'last') { + obj[key] = val; + } + } + + return obj; +}; + +var parseObject = function (chain, val, options, valuesParsed) { + var currentArrayLength = 0; + if (chain.length > 0 && chain[chain.length - 1] === '[]') { + var parentKey = chain.slice(0, -1).join(''); + currentArrayLength = Array.isArray(val) && val[parentKey] ? val[parentKey].length : 0; + } + + var leaf = valuesParsed ? val : parseArrayValue(val, options, currentArrayLength); + + for (var i = chain.length - 1; i >= 0; --i) { + var obj; + var root = chain[i]; + + if (root === '[]' && options.parseArrays) { + obj = options.allowEmptyArrays && (leaf === '' || (options.strictNullHandling && leaf === null)) + ? [] + : utils.combine([], leaf); + } else { + obj = options.plainObjects ? { __proto__: null } : {}; + var cleanRoot = root.charAt(0) === '[' && root.charAt(root.length - 1) === ']' ? root.slice(1, -1) : root; + var decodedRoot = options.decodeDotInKeys ? cleanRoot.replace(/%2E/g, '.') : cleanRoot; + var index = parseInt(decodedRoot, 10); + if (!options.parseArrays && decodedRoot === '') { + obj = { 0: leaf }; + } else if ( + !isNaN(index) + && root !== decodedRoot + && String(index) === decodedRoot + && index >= 0 + && (options.parseArrays && index <= options.arrayLimit) + ) { + obj = []; + obj[index] = leaf; + } else if (decodedRoot !== '__proto__') { + obj[decodedRoot] = leaf; + } + } + + leaf = obj; + } + + return leaf; +}; + +var parseKeys = function parseQueryStringKeys(givenKey, val, options, valuesParsed) { + if (!givenKey) { + return; + } + + // Transform dot notation to bracket notation + var key = options.allowDots ? givenKey.replace(/\.([^.[]+)/g, '[$1]') : givenKey; + + // The regex chunks + + var brackets = /(\[[^[\]]*])/; + var child = /(\[[^[\]]*])/g; + + // Get the parent + + var segment = options.depth > 0 && brackets.exec(key); + var parent = segment ? key.slice(0, segment.index) : key; + + // Stash the parent if it exists + + var keys = []; + if (parent) { + // If we aren't using plain objects, optionally prefix keys that would overwrite object prototype properties + if (!options.plainObjects && has.call(Object.prototype, parent)) { + if (!options.allowPrototypes) { + return; + } + } + + keys.push(parent); + } + + // Loop through children appending to the array until we hit depth + + var i = 0; + while (options.depth > 0 && (segment = child.exec(key)) !== null && i < options.depth) { + i += 1; + if (!options.plainObjects && has.call(Object.prototype, segment[1].slice(1, -1))) { + if (!options.allowPrototypes) { + return; + } + } + keys.push(segment[1]); + } + + // If there's a remainder, check strictDepth option for throw, else just add whatever is left + + if (segment) { + if (options.strictDepth === true) { + throw new RangeError('Input depth exceeded depth option of ' + options.depth + ' and strictDepth is true'); + } + keys.push('[' + key.slice(segment.index) + ']'); + } + + return parseObject(keys, val, options, valuesParsed); +}; + +var normalizeParseOptions = function normalizeParseOptions(opts) { + if (!opts) { + return defaults; + } + + if (typeof opts.allowEmptyArrays !== 'undefined' && typeof opts.allowEmptyArrays !== 'boolean') { + throw new TypeError('`allowEmptyArrays` option can only be `true` or `false`, when provided'); + } + + if (typeof opts.decodeDotInKeys !== 'undefined' && typeof opts.decodeDotInKeys !== 'boolean') { + throw new TypeError('`decodeDotInKeys` option can only be `true` or `false`, when provided'); + } + + if (opts.decoder !== null && typeof opts.decoder !== 'undefined' && typeof opts.decoder !== 'function') { + throw new TypeError('Decoder has to be a function.'); + } + + if (typeof opts.charset !== 'undefined' && opts.charset !== 'utf-8' && opts.charset !== 'iso-8859-1') { + throw new TypeError('The charset option must be either utf-8, iso-8859-1, or undefined'); + } + + if (typeof opts.throwOnLimitExceeded !== 'undefined' && typeof opts.throwOnLimitExceeded !== 'boolean') { + throw new TypeError('`throwOnLimitExceeded` option must be a boolean'); + } + + var charset = typeof opts.charset === 'undefined' ? defaults.charset : opts.charset; + + var duplicates = typeof opts.duplicates === 'undefined' ? defaults.duplicates : opts.duplicates; + + if (duplicates !== 'combine' && duplicates !== 'first' && duplicates !== 'last') { + throw new TypeError('The duplicates option must be either combine, first, or last'); + } + + var allowDots = typeof opts.allowDots === 'undefined' ? opts.decodeDotInKeys === true ? true : defaults.allowDots : !!opts.allowDots; + + return { + allowDots: allowDots, + allowEmptyArrays: typeof opts.allowEmptyArrays === 'boolean' ? !!opts.allowEmptyArrays : defaults.allowEmptyArrays, + allowPrototypes: typeof opts.allowPrototypes === 'boolean' ? opts.allowPrototypes : defaults.allowPrototypes, + allowSparse: typeof opts.allowSparse === 'boolean' ? opts.allowSparse : defaults.allowSparse, + arrayLimit: typeof opts.arrayLimit === 'number' ? opts.arrayLimit : defaults.arrayLimit, + charset: charset, + charsetSentinel: typeof opts.charsetSentinel === 'boolean' ? opts.charsetSentinel : defaults.charsetSentinel, + comma: typeof opts.comma === 'boolean' ? opts.comma : defaults.comma, + decodeDotInKeys: typeof opts.decodeDotInKeys === 'boolean' ? opts.decodeDotInKeys : defaults.decodeDotInKeys, + decoder: typeof opts.decoder === 'function' ? opts.decoder : defaults.decoder, + delimiter: typeof opts.delimiter === 'string' || utils.isRegExp(opts.delimiter) ? opts.delimiter : defaults.delimiter, + // eslint-disable-next-line no-implicit-coercion, no-extra-parens + depth: (typeof opts.depth === 'number' || opts.depth === false) ? +opts.depth : defaults.depth, + duplicates: duplicates, + ignoreQueryPrefix: opts.ignoreQueryPrefix === true, + interpretNumericEntities: typeof opts.interpretNumericEntities === 'boolean' ? opts.interpretNumericEntities : defaults.interpretNumericEntities, + parameterLimit: typeof opts.parameterLimit === 'number' ? opts.parameterLimit : defaults.parameterLimit, + parseArrays: opts.parseArrays !== false, + plainObjects: typeof opts.plainObjects === 'boolean' ? opts.plainObjects : defaults.plainObjects, + strictDepth: typeof opts.strictDepth === 'boolean' ? !!opts.strictDepth : defaults.strictDepth, + strictNullHandling: typeof opts.strictNullHandling === 'boolean' ? opts.strictNullHandling : defaults.strictNullHandling, + throwOnLimitExceeded: typeof opts.throwOnLimitExceeded === 'boolean' ? opts.throwOnLimitExceeded : false + }; +}; + +module.exports = function (str, opts) { + var options = normalizeParseOptions(opts); + + if (str === '' || str === null || typeof str === 'undefined') { + return options.plainObjects ? { __proto__: null } : {}; + } + + var tempObj = typeof str === 'string' ? parseValues(str, options) : str; + var obj = options.plainObjects ? { __proto__: null } : {}; + + // Iterate over the keys and setup the new object + + var keys = Object.keys(tempObj); + for (var i = 0; i < keys.length; ++i) { + var key = keys[i]; + var newObj = parseKeys(key, tempObj[key], options, typeof str === 'string'); + obj = utils.merge(obj, newObj, options); + } + + if (options.allowSparse === true) { + return obj; + } + + return utils.compact(obj); +}; diff --git a/node_modules/body-parser/node_modules/qs/lib/stringify.js b/node_modules/body-parser/node_modules/qs/lib/stringify.js new file mode 100644 index 0000000..2666eaf --- /dev/null +++ b/node_modules/body-parser/node_modules/qs/lib/stringify.js @@ -0,0 +1,356 @@ +'use strict'; + +var getSideChannel = require('side-channel'); +var utils = require('./utils'); +var formats = require('./formats'); +var has = Object.prototype.hasOwnProperty; + +var arrayPrefixGenerators = { + brackets: function brackets(prefix) { + return prefix + '[]'; + }, + comma: 'comma', + indices: function indices(prefix, key) { + return prefix + '[' + key + ']'; + }, + repeat: function repeat(prefix) { + return prefix; + } +}; + +var isArray = Array.isArray; +var push = Array.prototype.push; +var pushToArray = function (arr, valueOrArray) { + push.apply(arr, isArray(valueOrArray) ? valueOrArray : [valueOrArray]); +}; + +var toISO = Date.prototype.toISOString; + +var defaultFormat = formats['default']; +var defaults = { + addQueryPrefix: false, + allowDots: false, + allowEmptyArrays: false, + arrayFormat: 'indices', + charset: 'utf-8', + charsetSentinel: false, + commaRoundTrip: false, + delimiter: '&', + encode: true, + encodeDotInKeys: false, + encoder: utils.encode, + encodeValuesOnly: false, + filter: void undefined, + format: defaultFormat, + formatter: formats.formatters[defaultFormat], + // deprecated + indices: false, + serializeDate: function serializeDate(date) { + return toISO.call(date); + }, + skipNulls: false, + strictNullHandling: false +}; + +var isNonNullishPrimitive = function isNonNullishPrimitive(v) { + return typeof v === 'string' + || typeof v === 'number' + || typeof v === 'boolean' + || typeof v === 'symbol' + || typeof v === 'bigint'; +}; + +var sentinel = {}; + +var stringify = function stringify( + object, + prefix, + generateArrayPrefix, + commaRoundTrip, + allowEmptyArrays, + strictNullHandling, + skipNulls, + encodeDotInKeys, + encoder, + filter, + sort, + allowDots, + serializeDate, + format, + formatter, + encodeValuesOnly, + charset, + sideChannel +) { + var obj = object; + + var tmpSc = sideChannel; + var step = 0; + var findFlag = false; + while ((tmpSc = tmpSc.get(sentinel)) !== void undefined && !findFlag) { + // Where object last appeared in the ref tree + var pos = tmpSc.get(object); + step += 1; + if (typeof pos !== 'undefined') { + if (pos === step) { + throw new RangeError('Cyclic object value'); + } else { + findFlag = true; // Break while + } + } + if (typeof tmpSc.get(sentinel) === 'undefined') { + step = 0; + } + } + + if (typeof filter === 'function') { + obj = filter(prefix, obj); + } else if (obj instanceof Date) { + obj = serializeDate(obj); + } else if (generateArrayPrefix === 'comma' && isArray(obj)) { + obj = utils.maybeMap(obj, function (value) { + if (value instanceof Date) { + return serializeDate(value); + } + return value; + }); + } + + if (obj === null) { + if (strictNullHandling) { + return encoder && !encodeValuesOnly ? encoder(prefix, defaults.encoder, charset, 'key', format) : prefix; + } + + obj = ''; + } + + if (isNonNullishPrimitive(obj) || utils.isBuffer(obj)) { + if (encoder) { + var keyValue = encodeValuesOnly ? prefix : encoder(prefix, defaults.encoder, charset, 'key', format); + return [formatter(keyValue) + '=' + formatter(encoder(obj, defaults.encoder, charset, 'value', format))]; + } + return [formatter(prefix) + '=' + formatter(String(obj))]; + } + + var values = []; + + if (typeof obj === 'undefined') { + return values; + } + + var objKeys; + if (generateArrayPrefix === 'comma' && isArray(obj)) { + // we need to join elements in + if (encodeValuesOnly && encoder) { + obj = utils.maybeMap(obj, encoder); + } + objKeys = [{ value: obj.length > 0 ? obj.join(',') || null : void undefined }]; + } else if (isArray(filter)) { + objKeys = filter; + } else { + var keys = Object.keys(obj); + objKeys = sort ? keys.sort(sort) : keys; + } + + var encodedPrefix = encodeDotInKeys ? String(prefix).replace(/\./g, '%2E') : String(prefix); + + var adjustedPrefix = commaRoundTrip && isArray(obj) && obj.length === 1 ? encodedPrefix + '[]' : encodedPrefix; + + if (allowEmptyArrays && isArray(obj) && obj.length === 0) { + return adjustedPrefix + '[]'; + } + + for (var j = 0; j < objKeys.length; ++j) { + var key = objKeys[j]; + var value = typeof key === 'object' && key && typeof key.value !== 'undefined' + ? key.value + : obj[key]; + + if (skipNulls && value === null) { + continue; + } + + var encodedKey = allowDots && encodeDotInKeys ? String(key).replace(/\./g, '%2E') : String(key); + var keyPrefix = isArray(obj) + ? typeof generateArrayPrefix === 'function' ? generateArrayPrefix(adjustedPrefix, encodedKey) : adjustedPrefix + : adjustedPrefix + (allowDots ? '.' + encodedKey : '[' + encodedKey + ']'); + + sideChannel.set(object, step); + var valueSideChannel = getSideChannel(); + valueSideChannel.set(sentinel, sideChannel); + pushToArray(values, stringify( + value, + keyPrefix, + generateArrayPrefix, + commaRoundTrip, + allowEmptyArrays, + strictNullHandling, + skipNulls, + encodeDotInKeys, + generateArrayPrefix === 'comma' && encodeValuesOnly && isArray(obj) ? null : encoder, + filter, + sort, + allowDots, + serializeDate, + format, + formatter, + encodeValuesOnly, + charset, + valueSideChannel + )); + } + + return values; +}; + +var normalizeStringifyOptions = function normalizeStringifyOptions(opts) { + if (!opts) { + return defaults; + } + + if (typeof opts.allowEmptyArrays !== 'undefined' && typeof opts.allowEmptyArrays !== 'boolean') { + throw new TypeError('`allowEmptyArrays` option can only be `true` or `false`, when provided'); + } + + if (typeof opts.encodeDotInKeys !== 'undefined' && typeof opts.encodeDotInKeys !== 'boolean') { + throw new TypeError('`encodeDotInKeys` option can only be `true` or `false`, when provided'); + } + + if (opts.encoder !== null && typeof opts.encoder !== 'undefined' && typeof opts.encoder !== 'function') { + throw new TypeError('Encoder has to be a function.'); + } + + var charset = opts.charset || defaults.charset; + if (typeof opts.charset !== 'undefined' && opts.charset !== 'utf-8' && opts.charset !== 'iso-8859-1') { + throw new TypeError('The charset option must be either utf-8, iso-8859-1, or undefined'); + } + + var format = formats['default']; + if (typeof opts.format !== 'undefined') { + if (!has.call(formats.formatters, opts.format)) { + throw new TypeError('Unknown format option provided.'); + } + format = opts.format; + } + var formatter = formats.formatters[format]; + + var filter = defaults.filter; + if (typeof opts.filter === 'function' || isArray(opts.filter)) { + filter = opts.filter; + } + + var arrayFormat; + if (opts.arrayFormat in arrayPrefixGenerators) { + arrayFormat = opts.arrayFormat; + } else if ('indices' in opts) { + arrayFormat = opts.indices ? 'indices' : 'repeat'; + } else { + arrayFormat = defaults.arrayFormat; + } + + if ('commaRoundTrip' in opts && typeof opts.commaRoundTrip !== 'boolean') { + throw new TypeError('`commaRoundTrip` must be a boolean, or absent'); + } + + var allowDots = typeof opts.allowDots === 'undefined' ? opts.encodeDotInKeys === true ? true : defaults.allowDots : !!opts.allowDots; + + return { + addQueryPrefix: typeof opts.addQueryPrefix === 'boolean' ? opts.addQueryPrefix : defaults.addQueryPrefix, + allowDots: allowDots, + allowEmptyArrays: typeof opts.allowEmptyArrays === 'boolean' ? !!opts.allowEmptyArrays : defaults.allowEmptyArrays, + arrayFormat: arrayFormat, + charset: charset, + charsetSentinel: typeof opts.charsetSentinel === 'boolean' ? opts.charsetSentinel : defaults.charsetSentinel, + commaRoundTrip: !!opts.commaRoundTrip, + delimiter: typeof opts.delimiter === 'undefined' ? defaults.delimiter : opts.delimiter, + encode: typeof opts.encode === 'boolean' ? opts.encode : defaults.encode, + encodeDotInKeys: typeof opts.encodeDotInKeys === 'boolean' ? opts.encodeDotInKeys : defaults.encodeDotInKeys, + encoder: typeof opts.encoder === 'function' ? opts.encoder : defaults.encoder, + encodeValuesOnly: typeof opts.encodeValuesOnly === 'boolean' ? opts.encodeValuesOnly : defaults.encodeValuesOnly, + filter: filter, + format: format, + formatter: formatter, + serializeDate: typeof opts.serializeDate === 'function' ? opts.serializeDate : defaults.serializeDate, + skipNulls: typeof opts.skipNulls === 'boolean' ? opts.skipNulls : defaults.skipNulls, + sort: typeof opts.sort === 'function' ? opts.sort : null, + strictNullHandling: typeof opts.strictNullHandling === 'boolean' ? opts.strictNullHandling : defaults.strictNullHandling + }; +}; + +module.exports = function (object, opts) { + var obj = object; + var options = normalizeStringifyOptions(opts); + + var objKeys; + var filter; + + if (typeof options.filter === 'function') { + filter = options.filter; + obj = filter('', obj); + } else if (isArray(options.filter)) { + filter = options.filter; + objKeys = filter; + } + + var keys = []; + + if (typeof obj !== 'object' || obj === null) { + return ''; + } + + var generateArrayPrefix = arrayPrefixGenerators[options.arrayFormat]; + var commaRoundTrip = generateArrayPrefix === 'comma' && options.commaRoundTrip; + + if (!objKeys) { + objKeys = Object.keys(obj); + } + + if (options.sort) { + objKeys.sort(options.sort); + } + + var sideChannel = getSideChannel(); + for (var i = 0; i < objKeys.length; ++i) { + var key = objKeys[i]; + var value = obj[key]; + + if (options.skipNulls && value === null) { + continue; + } + pushToArray(keys, stringify( + value, + key, + generateArrayPrefix, + commaRoundTrip, + options.allowEmptyArrays, + options.strictNullHandling, + options.skipNulls, + options.encodeDotInKeys, + options.encode ? options.encoder : null, + options.filter, + options.sort, + options.allowDots, + options.serializeDate, + options.format, + options.formatter, + options.encodeValuesOnly, + options.charset, + sideChannel + )); + } + + var joined = keys.join(options.delimiter); + var prefix = options.addQueryPrefix === true ? '?' : ''; + + if (options.charsetSentinel) { + if (options.charset === 'iso-8859-1') { + // encodeURIComponent('✓'), the "numeric entity" representation of a checkmark + prefix += 'utf8=%26%2310003%3B&'; + } else { + // encodeURIComponent('✓') + prefix += 'utf8=%E2%9C%93&'; + } + } + + return joined.length > 0 ? prefix + joined : ''; +}; diff --git a/node_modules/body-parser/node_modules/qs/lib/utils.js b/node_modules/body-parser/node_modules/qs/lib/utils.js new file mode 100644 index 0000000..2905ff0 --- /dev/null +++ b/node_modules/body-parser/node_modules/qs/lib/utils.js @@ -0,0 +1,268 @@ +'use strict'; + +var formats = require('./formats'); + +var has = Object.prototype.hasOwnProperty; +var isArray = Array.isArray; + +var hexTable = (function () { + var array = []; + for (var i = 0; i < 256; ++i) { + array.push('%' + ((i < 16 ? '0' : '') + i.toString(16)).toUpperCase()); + } + + return array; +}()); + +var compactQueue = function compactQueue(queue) { + while (queue.length > 1) { + var item = queue.pop(); + var obj = item.obj[item.prop]; + + if (isArray(obj)) { + var compacted = []; + + for (var j = 0; j < obj.length; ++j) { + if (typeof obj[j] !== 'undefined') { + compacted.push(obj[j]); + } + } + + item.obj[item.prop] = compacted; + } + } +}; + +var arrayToObject = function arrayToObject(source, options) { + var obj = options && options.plainObjects ? { __proto__: null } : {}; + for (var i = 0; i < source.length; ++i) { + if (typeof source[i] !== 'undefined') { + obj[i] = source[i]; + } + } + + return obj; +}; + +var merge = function merge(target, source, options) { + /* eslint no-param-reassign: 0 */ + if (!source) { + return target; + } + + if (typeof source !== 'object' && typeof source !== 'function') { + if (isArray(target)) { + target.push(source); + } else if (target && typeof target === 'object') { + if ( + (options && (options.plainObjects || options.allowPrototypes)) + || !has.call(Object.prototype, source) + ) { + target[source] = true; + } + } else { + return [target, source]; + } + + return target; + } + + if (!target || typeof target !== 'object') { + return [target].concat(source); + } + + var mergeTarget = target; + if (isArray(target) && !isArray(source)) { + mergeTarget = arrayToObject(target, options); + } + + if (isArray(target) && isArray(source)) { + source.forEach(function (item, i) { + if (has.call(target, i)) { + var targetItem = target[i]; + if (targetItem && typeof targetItem === 'object' && item && typeof item === 'object') { + target[i] = merge(targetItem, item, options); + } else { + target.push(item); + } + } else { + target[i] = item; + } + }); + return target; + } + + return Object.keys(source).reduce(function (acc, key) { + var value = source[key]; + + if (has.call(acc, key)) { + acc[key] = merge(acc[key], value, options); + } else { + acc[key] = value; + } + return acc; + }, mergeTarget); +}; + +var assign = function assignSingleSource(target, source) { + return Object.keys(source).reduce(function (acc, key) { + acc[key] = source[key]; + return acc; + }, target); +}; + +var decode = function (str, defaultDecoder, charset) { + var strWithoutPlus = str.replace(/\+/g, ' '); + if (charset === 'iso-8859-1') { + // unescape never throws, no try...catch needed: + return strWithoutPlus.replace(/%[0-9a-f]{2}/gi, unescape); + } + // utf-8 + try { + return decodeURIComponent(strWithoutPlus); + } catch (e) { + return strWithoutPlus; + } +}; + +var limit = 1024; + +/* eslint operator-linebreak: [2, "before"] */ + +var encode = function encode(str, defaultEncoder, charset, kind, format) { + // This code was originally written by Brian White (mscdex) for the io.js core querystring library. + // It has been adapted here for stricter adherence to RFC 3986 + if (str.length === 0) { + return str; + } + + var string = str; + if (typeof str === 'symbol') { + string = Symbol.prototype.toString.call(str); + } else if (typeof str !== 'string') { + string = String(str); + } + + if (charset === 'iso-8859-1') { + return escape(string).replace(/%u[0-9a-f]{4}/gi, function ($0) { + return '%26%23' + parseInt($0.slice(2), 16) + '%3B'; + }); + } + + var out = ''; + for (var j = 0; j < string.length; j += limit) { + var segment = string.length >= limit ? string.slice(j, j + limit) : string; + var arr = []; + + for (var i = 0; i < segment.length; ++i) { + var c = segment.charCodeAt(i); + if ( + c === 0x2D // - + || c === 0x2E // . + || c === 0x5F // _ + || c === 0x7E // ~ + || (c >= 0x30 && c <= 0x39) // 0-9 + || (c >= 0x41 && c <= 0x5A) // a-z + || (c >= 0x61 && c <= 0x7A) // A-Z + || (format === formats.RFC1738 && (c === 0x28 || c === 0x29)) // ( ) + ) { + arr[arr.length] = segment.charAt(i); + continue; + } + + if (c < 0x80) { + arr[arr.length] = hexTable[c]; + continue; + } + + if (c < 0x800) { + arr[arr.length] = hexTable[0xC0 | (c >> 6)] + + hexTable[0x80 | (c & 0x3F)]; + continue; + } + + if (c < 0xD800 || c >= 0xE000) { + arr[arr.length] = hexTable[0xE0 | (c >> 12)] + + hexTable[0x80 | ((c >> 6) & 0x3F)] + + hexTable[0x80 | (c & 0x3F)]; + continue; + } + + i += 1; + c = 0x10000 + (((c & 0x3FF) << 10) | (segment.charCodeAt(i) & 0x3FF)); + + arr[arr.length] = hexTable[0xF0 | (c >> 18)] + + hexTable[0x80 | ((c >> 12) & 0x3F)] + + hexTable[0x80 | ((c >> 6) & 0x3F)] + + hexTable[0x80 | (c & 0x3F)]; + } + + out += arr.join(''); + } + + return out; +}; + +var compact = function compact(value) { + var queue = [{ obj: { o: value }, prop: 'o' }]; + var refs = []; + + for (var i = 0; i < queue.length; ++i) { + var item = queue[i]; + var obj = item.obj[item.prop]; + + var keys = Object.keys(obj); + for (var j = 0; j < keys.length; ++j) { + var key = keys[j]; + var val = obj[key]; + if (typeof val === 'object' && val !== null && refs.indexOf(val) === -1) { + queue.push({ obj: obj, prop: key }); + refs.push(val); + } + } + } + + compactQueue(queue); + + return value; +}; + +var isRegExp = function isRegExp(obj) { + return Object.prototype.toString.call(obj) === '[object RegExp]'; +}; + +var isBuffer = function isBuffer(obj) { + if (!obj || typeof obj !== 'object') { + return false; + } + + return !!(obj.constructor && obj.constructor.isBuffer && obj.constructor.isBuffer(obj)); +}; + +var combine = function combine(a, b) { + return [].concat(a, b); +}; + +var maybeMap = function maybeMap(val, fn) { + if (isArray(val)) { + var mapped = []; + for (var i = 0; i < val.length; i += 1) { + mapped.push(fn(val[i])); + } + return mapped; + } + return fn(val); +}; + +module.exports = { + arrayToObject: arrayToObject, + assign: assign, + combine: combine, + compact: compact, + decode: decode, + encode: encode, + isBuffer: isBuffer, + isRegExp: isRegExp, + maybeMap: maybeMap, + merge: merge +}; diff --git a/node_modules/body-parser/node_modules/qs/package.json b/node_modules/body-parser/node_modules/qs/package.json new file mode 100644 index 0000000..e4144d0 --- /dev/null +++ b/node_modules/body-parser/node_modules/qs/package.json @@ -0,0 +1,93 @@ +{ + "name": "qs", + "description": "A querystring parser that supports nesting and arrays, with a depth limit", + "homepage": "https://github.com/ljharb/qs", + "version": "6.14.0", + "repository": { + "type": "git", + "url": "https://github.com/ljharb/qs.git" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + }, + "main": "lib/index.js", + "sideEffects": false, + "contributors": [ + { + "name": "Jordan Harband", + "email": "ljharb@gmail.com", + "url": "http://ljharb.codes" + } + ], + "keywords": [ + "querystring", + "qs", + "query", + "url", + "parse", + "stringify" + ], + "engines": { + "node": ">=0.6" + }, + "dependencies": { + "side-channel": "^1.1.0" + }, + "devDependencies": { + "@browserify/envify": "^6.0.0", + "@browserify/uglifyify": "^6.0.0", + "@ljharb/eslint-config": "^21.1.1", + "browserify": "^16.5.2", + "bundle-collapser": "^1.4.0", + "common-shakeify": "~1.0.0", + "eclint": "^2.8.1", + "es-value-fixtures": "^1.7.0", + "eslint": "=8.8.0", + "evalmd": "^0.0.19", + "for-each": "^0.3.3", + "glob": "=10.3.7", + "has-bigints": "^1.1.0", + "has-override-mistake": "^1.0.1", + "has-property-descriptors": "^1.0.2", + "has-proto": "^1.2.0", + "has-symbols": "^1.1.0", + "iconv-lite": "^0.5.1", + "in-publish": "^2.0.1", + "jackspeak": "=2.1.1", + "mkdirp": "^0.5.5", + "mock-property": "^1.1.0", + "module-deps": "^6.2.3", + "npmignore": "^0.3.1", + "nyc": "^10.3.2", + "object-inspect": "^1.13.3", + "qs-iconv": "^1.0.4", + "safe-publish-latest": "^2.0.0", + "safer-buffer": "^2.1.2", + "tape": "^5.9.0", + "unassertify": "^3.0.1" + }, + "scripts": { + "prepack": "npmignore --auto --commentLines=autogenerated && npm run dist", + "prepublishOnly": "safe-publish-latest", + "prepublish": "not-in-publish || npm run prepublishOnly", + "pretest": "npm run --silent readme && npm run --silent lint", + "test": "npm run tests-only", + "tests-only": "nyc tape 'test/**/*.js'", + "posttest": "npx npm@'>=10.2' audit --production", + "readme": "evalmd README.md", + "postlint": "eclint check $(git ls-files | xargs find 2> /dev/null | grep -vE 'node_modules|\\.git' | grep -v dist/)", + "lint": "eslint --ext=js,mjs .", + "dist": "mkdirp dist && browserify --standalone Qs -g unassertify -g @browserify/envify -g [@browserify/uglifyify --mangle.keep_fnames --compress.keep_fnames --format.indent_level=1 --compress.arrows=false --compress.passes=4 --compress.typeofs=false] -p common-shakeify -p bundle-collapser/plugin lib/index.js > dist/qs.js" + }, + "license": "BSD-3-Clause", + "publishConfig": { + "ignore": [ + "!dist/*", + "bower.json", + "component.json", + ".github/workflows", + "logos", + "tea.yaml" + ] + } +} diff --git a/node_modules/body-parser/node_modules/qs/test/empty-keys-cases.js b/node_modules/body-parser/node_modules/qs/test/empty-keys-cases.js new file mode 100644 index 0000000..2b1190e --- /dev/null +++ b/node_modules/body-parser/node_modules/qs/test/empty-keys-cases.js @@ -0,0 +1,267 @@ +'use strict'; + +module.exports = { + emptyTestCases: [ + { + input: '&', + withEmptyKeys: {}, + stringifyOutput: { + brackets: '', + indices: '', + repeat: '' + }, + noEmptyKeys: {} + }, + { + input: '&&', + withEmptyKeys: {}, + stringifyOutput: { + brackets: '', + indices: '', + repeat: '' + }, + noEmptyKeys: {} + }, + { + input: '&=', + withEmptyKeys: { '': '' }, + stringifyOutput: { + brackets: '=', + indices: '=', + repeat: '=' + }, + noEmptyKeys: {} + }, + { + input: '&=&', + withEmptyKeys: { '': '' }, + stringifyOutput: { + brackets: '=', + indices: '=', + repeat: '=' + }, + noEmptyKeys: {} + }, + { + input: '&=&=', + withEmptyKeys: { '': ['', ''] }, + stringifyOutput: { + brackets: '[]=&[]=', + indices: '[0]=&[1]=', + repeat: '=&=' + }, + noEmptyKeys: {} + }, + { + input: '&=&=&', + withEmptyKeys: { '': ['', ''] }, + stringifyOutput: { + brackets: '[]=&[]=', + indices: '[0]=&[1]=', + repeat: '=&=' + }, + noEmptyKeys: {} + }, + { + input: '=', + withEmptyKeys: { '': '' }, + noEmptyKeys: {}, + stringifyOutput: { + brackets: '=', + indices: '=', + repeat: '=' + } + }, + { + input: '=&', + withEmptyKeys: { '': '' }, + stringifyOutput: { + brackets: '=', + indices: '=', + repeat: '=' + }, + noEmptyKeys: {} + }, + { + input: '=&&&', + withEmptyKeys: { '': '' }, + stringifyOutput: { + brackets: '=', + indices: '=', + repeat: '=' + }, + noEmptyKeys: {} + }, + { + input: '=&=&=&', + withEmptyKeys: { '': ['', '', ''] }, + stringifyOutput: { + brackets: '[]=&[]=&[]=', + indices: '[0]=&[1]=&[2]=', + repeat: '=&=&=' + }, + noEmptyKeys: {} + }, + { + input: '=&a[]=b&a[1]=c', + withEmptyKeys: { '': '', a: ['b', 'c'] }, + stringifyOutput: { + brackets: '=&a[]=b&a[]=c', + indices: '=&a[0]=b&a[1]=c', + repeat: '=&a=b&a=c' + }, + noEmptyKeys: { a: ['b', 'c'] } + }, + { + input: '=a', + withEmptyKeys: { '': 'a' }, + noEmptyKeys: {}, + stringifyOutput: { + brackets: '=a', + indices: '=a', + repeat: '=a' + } + }, + { + input: 'a==a', + withEmptyKeys: { a: '=a' }, + noEmptyKeys: { a: '=a' }, + stringifyOutput: { + brackets: 'a==a', + indices: 'a==a', + repeat: 'a==a' + } + }, + { + input: '=&a[]=b', + withEmptyKeys: { '': '', a: ['b'] }, + stringifyOutput: { + brackets: '=&a[]=b', + indices: '=&a[0]=b', + repeat: '=&a=b' + }, + noEmptyKeys: { a: ['b'] } + }, + { + input: '=&a[]=b&a[]=c&a[2]=d', + withEmptyKeys: { '': '', a: ['b', 'c', 'd'] }, + stringifyOutput: { + brackets: '=&a[]=b&a[]=c&a[]=d', + indices: '=&a[0]=b&a[1]=c&a[2]=d', + repeat: '=&a=b&a=c&a=d' + }, + noEmptyKeys: { a: ['b', 'c', 'd'] } + }, + { + input: '=a&=b', + withEmptyKeys: { '': ['a', 'b'] }, + stringifyOutput: { + brackets: '[]=a&[]=b', + indices: '[0]=a&[1]=b', + repeat: '=a&=b' + }, + noEmptyKeys: {} + }, + { + input: '=a&foo=b', + withEmptyKeys: { '': 'a', foo: 'b' }, + noEmptyKeys: { foo: 'b' }, + stringifyOutput: { + brackets: '=a&foo=b', + indices: '=a&foo=b', + repeat: '=a&foo=b' + } + }, + { + input: 'a[]=b&a=c&=', + withEmptyKeys: { '': '', a: ['b', 'c'] }, + stringifyOutput: { + brackets: '=&a[]=b&a[]=c', + indices: '=&a[0]=b&a[1]=c', + repeat: '=&a=b&a=c' + }, + noEmptyKeys: { a: ['b', 'c'] } + }, + { + input: 'a[]=b&a=c&=', + withEmptyKeys: { '': '', a: ['b', 'c'] }, + stringifyOutput: { + brackets: '=&a[]=b&a[]=c', + indices: '=&a[0]=b&a[1]=c', + repeat: '=&a=b&a=c' + }, + noEmptyKeys: { a: ['b', 'c'] } + }, + { + input: 'a[0]=b&a=c&=', + withEmptyKeys: { '': '', a: ['b', 'c'] }, + stringifyOutput: { + brackets: '=&a[]=b&a[]=c', + indices: '=&a[0]=b&a[1]=c', + repeat: '=&a=b&a=c' + }, + noEmptyKeys: { a: ['b', 'c'] } + }, + { + input: 'a=b&a[]=c&=', + withEmptyKeys: { '': '', a: ['b', 'c'] }, + stringifyOutput: { + brackets: '=&a[]=b&a[]=c', + indices: '=&a[0]=b&a[1]=c', + repeat: '=&a=b&a=c' + }, + noEmptyKeys: { a: ['b', 'c'] } + }, + { + input: 'a=b&a[0]=c&=', + withEmptyKeys: { '': '', a: ['b', 'c'] }, + stringifyOutput: { + brackets: '=&a[]=b&a[]=c', + indices: '=&a[0]=b&a[1]=c', + repeat: '=&a=b&a=c' + }, + noEmptyKeys: { a: ['b', 'c'] } + }, + { + input: '[]=a&[]=b& []=1', + withEmptyKeys: { '': ['a', 'b'], ' ': ['1'] }, + stringifyOutput: { + brackets: '[]=a&[]=b& []=1', + indices: '[0]=a&[1]=b& [0]=1', + repeat: '=a&=b& =1' + }, + noEmptyKeys: { 0: 'a', 1: 'b', ' ': ['1'] } + }, + { + input: '[0]=a&[1]=b&a[0]=1&a[1]=2', + withEmptyKeys: { '': ['a', 'b'], a: ['1', '2'] }, + noEmptyKeys: { 0: 'a', 1: 'b', a: ['1', '2'] }, + stringifyOutput: { + brackets: '[]=a&[]=b&a[]=1&a[]=2', + indices: '[0]=a&[1]=b&a[0]=1&a[1]=2', + repeat: '=a&=b&a=1&a=2' + } + }, + { + input: '[deep]=a&[deep]=2', + withEmptyKeys: { '': { deep: ['a', '2'] } + }, + stringifyOutput: { + brackets: '[deep][]=a&[deep][]=2', + indices: '[deep][0]=a&[deep][1]=2', + repeat: '[deep]=a&[deep]=2' + }, + noEmptyKeys: { deep: ['a', '2'] } + }, + { + input: '%5B0%5D=a&%5B1%5D=b', + withEmptyKeys: { '': ['a', 'b'] }, + stringifyOutput: { + brackets: '[]=a&[]=b', + indices: '[0]=a&[1]=b', + repeat: '=a&=b' + }, + noEmptyKeys: { 0: 'a', 1: 'b' } + } + ] +}; diff --git a/node_modules/body-parser/node_modules/qs/test/parse.js b/node_modules/body-parser/node_modules/qs/test/parse.js new file mode 100644 index 0000000..32cdfd8 --- /dev/null +++ b/node_modules/body-parser/node_modules/qs/test/parse.js @@ -0,0 +1,1276 @@ +'use strict'; + +var test = require('tape'); +var hasPropertyDescriptors = require('has-property-descriptors')(); +var iconv = require('iconv-lite'); +var mockProperty = require('mock-property'); +var hasOverrideMistake = require('has-override-mistake')(); +var SaferBuffer = require('safer-buffer').Buffer; +var v = require('es-value-fixtures'); +var inspect = require('object-inspect'); +var emptyTestCases = require('./empty-keys-cases').emptyTestCases; +var hasProto = require('has-proto')(); + +var qs = require('../'); +var utils = require('../lib/utils'); + +test('parse()', function (t) { + t.test('parses a simple string', function (st) { + st.deepEqual(qs.parse('0=foo'), { 0: 'foo' }); + st.deepEqual(qs.parse('foo=c++'), { foo: 'c ' }); + st.deepEqual(qs.parse('a[>=]=23'), { a: { '>=': '23' } }); + st.deepEqual(qs.parse('a[<=>]==23'), { a: { '<=>': '=23' } }); + st.deepEqual(qs.parse('a[==]=23'), { a: { '==': '23' } }); + st.deepEqual(qs.parse('foo', { strictNullHandling: true }), { foo: null }); + st.deepEqual(qs.parse('foo'), { foo: '' }); + st.deepEqual(qs.parse('foo='), { foo: '' }); + st.deepEqual(qs.parse('foo=bar'), { foo: 'bar' }); + st.deepEqual(qs.parse(' foo = bar = baz '), { ' foo ': ' bar = baz ' }); + st.deepEqual(qs.parse('foo=bar=baz'), { foo: 'bar=baz' }); + st.deepEqual(qs.parse('foo=bar&bar=baz'), { foo: 'bar', bar: 'baz' }); + st.deepEqual(qs.parse('foo2=bar2&baz2='), { foo2: 'bar2', baz2: '' }); + st.deepEqual(qs.parse('foo=bar&baz', { strictNullHandling: true }), { foo: 'bar', baz: null }); + st.deepEqual(qs.parse('foo=bar&baz'), { foo: 'bar', baz: '' }); + st.deepEqual(qs.parse('cht=p3&chd=t:60,40&chs=250x100&chl=Hello|World'), { + cht: 'p3', + chd: 't:60,40', + chs: '250x100', + chl: 'Hello|World' + }); + st.end(); + }); + + t.test('comma: false', function (st) { + st.deepEqual(qs.parse('a[]=b&a[]=c'), { a: ['b', 'c'] }); + st.deepEqual(qs.parse('a[0]=b&a[1]=c'), { a: ['b', 'c'] }); + st.deepEqual(qs.parse('a=b,c'), { a: 'b,c' }); + st.deepEqual(qs.parse('a=b&a=c'), { a: ['b', 'c'] }); + st.end(); + }); + + t.test('comma: true', function (st) { + st.deepEqual(qs.parse('a[]=b&a[]=c', { comma: true }), { a: ['b', 'c'] }); + st.deepEqual(qs.parse('a[0]=b&a[1]=c', { comma: true }), { a: ['b', 'c'] }); + st.deepEqual(qs.parse('a=b,c', { comma: true }), { a: ['b', 'c'] }); + st.deepEqual(qs.parse('a=b&a=c', { comma: true }), { a: ['b', 'c'] }); + st.end(); + }); + + t.test('allows enabling dot notation', function (st) { + st.deepEqual(qs.parse('a.b=c'), { 'a.b': 'c' }); + st.deepEqual(qs.parse('a.b=c', { allowDots: true }), { a: { b: 'c' } }); + + st.end(); + }); + + t.test('decode dot keys correctly', function (st) { + st.deepEqual( + qs.parse('name%252Eobj.first=John&name%252Eobj.last=Doe', { allowDots: false, decodeDotInKeys: false }), + { 'name%2Eobj.first': 'John', 'name%2Eobj.last': 'Doe' }, + 'with allowDots false and decodeDotInKeys false' + ); + st.deepEqual( + qs.parse('name.obj.first=John&name.obj.last=Doe', { allowDots: true, decodeDotInKeys: false }), + { name: { obj: { first: 'John', last: 'Doe' } } }, + 'with allowDots false and decodeDotInKeys false' + ); + st.deepEqual( + qs.parse('name%252Eobj.first=John&name%252Eobj.last=Doe', { allowDots: true, decodeDotInKeys: false }), + { 'name%2Eobj': { first: 'John', last: 'Doe' } }, + 'with allowDots true and decodeDotInKeys false' + ); + st.deepEqual( + qs.parse('name%252Eobj.first=John&name%252Eobj.last=Doe', { allowDots: true, decodeDotInKeys: true }), + { 'name.obj': { first: 'John', last: 'Doe' } }, + 'with allowDots true and decodeDotInKeys true' + ); + + st.deepEqual( + qs.parse( + 'name%252Eobj%252Esubobject.first%252Egodly%252Ename=John&name%252Eobj%252Esubobject.last=Doe', + { allowDots: false, decodeDotInKeys: false } + ), + { 'name%2Eobj%2Esubobject.first%2Egodly%2Ename': 'John', 'name%2Eobj%2Esubobject.last': 'Doe' }, + 'with allowDots false and decodeDotInKeys false' + ); + st.deepEqual( + qs.parse( + 'name.obj.subobject.first.godly.name=John&name.obj.subobject.last=Doe', + { allowDots: true, decodeDotInKeys: false } + ), + { name: { obj: { subobject: { first: { godly: { name: 'John' } }, last: 'Doe' } } } }, + 'with allowDots true and decodeDotInKeys false' + ); + st.deepEqual( + qs.parse( + 'name%252Eobj%252Esubobject.first%252Egodly%252Ename=John&name%252Eobj%252Esubobject.last=Doe', + { allowDots: true, decodeDotInKeys: true } + ), + { 'name.obj.subobject': { 'first.godly.name': 'John', last: 'Doe' } }, + 'with allowDots true and decodeDotInKeys true' + ); + st.deepEqual( + qs.parse('name%252Eobj.first=John&name%252Eobj.last=Doe'), + { 'name%2Eobj.first': 'John', 'name%2Eobj.last': 'Doe' }, + 'with allowDots and decodeDotInKeys undefined' + ); + + st.end(); + }); + + t.test('decodes dot in key of object, and allow enabling dot notation when decodeDotInKeys is set to true and allowDots is undefined', function (st) { + st.deepEqual( + qs.parse( + 'name%252Eobj%252Esubobject.first%252Egodly%252Ename=John&name%252Eobj%252Esubobject.last=Doe', + { decodeDotInKeys: true } + ), + { 'name.obj.subobject': { 'first.godly.name': 'John', last: 'Doe' } }, + 'with allowDots undefined and decodeDotInKeys true' + ); + + st.end(); + }); + + t.test('throws when decodeDotInKeys is not of type boolean', function (st) { + st['throws']( + function () { qs.parse('foo[]&bar=baz', { decodeDotInKeys: 'foobar' }); }, + TypeError + ); + + st['throws']( + function () { qs.parse('foo[]&bar=baz', { decodeDotInKeys: 0 }); }, + TypeError + ); + st['throws']( + function () { qs.parse('foo[]&bar=baz', { decodeDotInKeys: NaN }); }, + TypeError + ); + + st['throws']( + function () { qs.parse('foo[]&bar=baz', { decodeDotInKeys: null }); }, + TypeError + ); + + st.end(); + }); + + t.test('allows empty arrays in obj values', function (st) { + st.deepEqual(qs.parse('foo[]&bar=baz', { allowEmptyArrays: true }), { foo: [], bar: 'baz' }); + st.deepEqual(qs.parse('foo[]&bar=baz', { allowEmptyArrays: false }), { foo: [''], bar: 'baz' }); + + st.end(); + }); + + t.test('throws when allowEmptyArrays is not of type boolean', function (st) { + st['throws']( + function () { qs.parse('foo[]&bar=baz', { allowEmptyArrays: 'foobar' }); }, + TypeError + ); + + st['throws']( + function () { qs.parse('foo[]&bar=baz', { allowEmptyArrays: 0 }); }, + TypeError + ); + st['throws']( + function () { qs.parse('foo[]&bar=baz', { allowEmptyArrays: NaN }); }, + TypeError + ); + + st['throws']( + function () { qs.parse('foo[]&bar=baz', { allowEmptyArrays: null }); }, + TypeError + ); + + st.end(); + }); + + t.test('allowEmptyArrays + strictNullHandling', function (st) { + st.deepEqual( + qs.parse('testEmptyArray[]', { strictNullHandling: true, allowEmptyArrays: true }), + { testEmptyArray: [] } + ); + + st.end(); + }); + + t.deepEqual(qs.parse('a[b]=c'), { a: { b: 'c' } }, 'parses a single nested string'); + t.deepEqual(qs.parse('a[b][c]=d'), { a: { b: { c: 'd' } } }, 'parses a double nested string'); + t.deepEqual( + qs.parse('a[b][c][d][e][f][g][h]=i'), + { a: { b: { c: { d: { e: { f: { '[g][h]': 'i' } } } } } } }, + 'defaults to a depth of 5' + ); + + t.test('only parses one level when depth = 1', function (st) { + st.deepEqual(qs.parse('a[b][c]=d', { depth: 1 }), { a: { b: { '[c]': 'd' } } }); + st.deepEqual(qs.parse('a[b][c][d]=e', { depth: 1 }), { a: { b: { '[c][d]': 'e' } } }); + st.end(); + }); + + t.test('uses original key when depth = 0', function (st) { + st.deepEqual(qs.parse('a[0]=b&a[1]=c', { depth: 0 }), { 'a[0]': 'b', 'a[1]': 'c' }); + st.deepEqual(qs.parse('a[0][0]=b&a[0][1]=c&a[1]=d&e=2', { depth: 0 }), { 'a[0][0]': 'b', 'a[0][1]': 'c', 'a[1]': 'd', e: '2' }); + st.end(); + }); + + t.test('uses original key when depth = false', function (st) { + st.deepEqual(qs.parse('a[0]=b&a[1]=c', { depth: false }), { 'a[0]': 'b', 'a[1]': 'c' }); + st.deepEqual(qs.parse('a[0][0]=b&a[0][1]=c&a[1]=d&e=2', { depth: false }), { 'a[0][0]': 'b', 'a[0][1]': 'c', 'a[1]': 'd', e: '2' }); + st.end(); + }); + + t.deepEqual(qs.parse('a=b&a=c'), { a: ['b', 'c'] }, 'parses a simple array'); + + t.test('parses an explicit array', function (st) { + st.deepEqual(qs.parse('a[]=b'), { a: ['b'] }); + st.deepEqual(qs.parse('a[]=b&a[]=c'), { a: ['b', 'c'] }); + st.deepEqual(qs.parse('a[]=b&a[]=c&a[]=d'), { a: ['b', 'c', 'd'] }); + st.end(); + }); + + t.test('parses a mix of simple and explicit arrays', function (st) { + st.deepEqual(qs.parse('a=b&a[]=c'), { a: ['b', 'c'] }); + st.deepEqual(qs.parse('a[]=b&a=c'), { a: ['b', 'c'] }); + st.deepEqual(qs.parse('a[0]=b&a=c'), { a: ['b', 'c'] }); + st.deepEqual(qs.parse('a=b&a[0]=c'), { a: ['b', 'c'] }); + + st.deepEqual(qs.parse('a[1]=b&a=c', { arrayLimit: 20 }), { a: ['b', 'c'] }); + st.deepEqual(qs.parse('a[]=b&a=c', { arrayLimit: 0 }), { a: ['b', 'c'] }); + st.deepEqual(qs.parse('a[]=b&a=c'), { a: ['b', 'c'] }); + + st.deepEqual(qs.parse('a=b&a[1]=c', { arrayLimit: 20 }), { a: ['b', 'c'] }); + st.deepEqual(qs.parse('a=b&a[]=c', { arrayLimit: 0 }), { a: ['b', 'c'] }); + st.deepEqual(qs.parse('a=b&a[]=c'), { a: ['b', 'c'] }); + + st.end(); + }); + + t.test('parses a nested array', function (st) { + st.deepEqual(qs.parse('a[b][]=c&a[b][]=d'), { a: { b: ['c', 'd'] } }); + st.deepEqual(qs.parse('a[>=]=25'), { a: { '>=': '25' } }); + st.end(); + }); + + t.test('allows to specify array indices', function (st) { + st.deepEqual(qs.parse('a[1]=c&a[0]=b&a[2]=d'), { a: ['b', 'c', 'd'] }); + st.deepEqual(qs.parse('a[1]=c&a[0]=b'), { a: ['b', 'c'] }); + st.deepEqual(qs.parse('a[1]=c', { arrayLimit: 20 }), { a: ['c'] }); + st.deepEqual(qs.parse('a[1]=c', { arrayLimit: 0 }), { a: { 1: 'c' } }); + st.deepEqual(qs.parse('a[1]=c'), { a: ['c'] }); + st.end(); + }); + + t.test('limits specific array indices to arrayLimit', function (st) { + st.deepEqual(qs.parse('a[20]=a', { arrayLimit: 20 }), { a: ['a'] }); + st.deepEqual(qs.parse('a[21]=a', { arrayLimit: 20 }), { a: { 21: 'a' } }); + + st.deepEqual(qs.parse('a[20]=a'), { a: ['a'] }); + st.deepEqual(qs.parse('a[21]=a'), { a: { 21: 'a' } }); + st.end(); + }); + + t.deepEqual(qs.parse('a[12b]=c'), { a: { '12b': 'c' } }, 'supports keys that begin with a number'); + + t.test('supports encoded = signs', function (st) { + st.deepEqual(qs.parse('he%3Dllo=th%3Dere'), { 'he=llo': 'th=ere' }); + st.end(); + }); + + t.test('is ok with url encoded strings', function (st) { + st.deepEqual(qs.parse('a[b%20c]=d'), { a: { 'b c': 'd' } }); + st.deepEqual(qs.parse('a[b]=c%20d'), { a: { b: 'c d' } }); + st.end(); + }); + + t.test('allows brackets in the value', function (st) { + st.deepEqual(qs.parse('pets=["tobi"]'), { pets: '["tobi"]' }); + st.deepEqual(qs.parse('operators=[">=", "<="]'), { operators: '[">=", "<="]' }); + st.end(); + }); + + t.test('allows empty values', function (st) { + st.deepEqual(qs.parse(''), {}); + st.deepEqual(qs.parse(null), {}); + st.deepEqual(qs.parse(undefined), {}); + st.end(); + }); + + t.test('transforms arrays to objects', function (st) { + st.deepEqual(qs.parse('foo[0]=bar&foo[bad]=baz'), { foo: { 0: 'bar', bad: 'baz' } }); + st.deepEqual(qs.parse('foo[bad]=baz&foo[0]=bar'), { foo: { bad: 'baz', 0: 'bar' } }); + st.deepEqual(qs.parse('foo[bad]=baz&foo[]=bar'), { foo: { bad: 'baz', 0: 'bar' } }); + st.deepEqual(qs.parse('foo[]=bar&foo[bad]=baz'), { foo: { 0: 'bar', bad: 'baz' } }); + st.deepEqual(qs.parse('foo[bad]=baz&foo[]=bar&foo[]=foo'), { foo: { bad: 'baz', 0: 'bar', 1: 'foo' } }); + st.deepEqual(qs.parse('foo[0][a]=a&foo[0][b]=b&foo[1][a]=aa&foo[1][b]=bb'), { foo: [{ a: 'a', b: 'b' }, { a: 'aa', b: 'bb' }] }); + + st.deepEqual(qs.parse('a[]=b&a[t]=u&a[hasOwnProperty]=c', { allowPrototypes: false }), { a: { 0: 'b', t: 'u' } }); + st.deepEqual(qs.parse('a[]=b&a[t]=u&a[hasOwnProperty]=c', { allowPrototypes: true }), { a: { 0: 'b', t: 'u', hasOwnProperty: 'c' } }); + st.deepEqual(qs.parse('a[]=b&a[hasOwnProperty]=c&a[x]=y', { allowPrototypes: false }), { a: { 0: 'b', x: 'y' } }); + st.deepEqual(qs.parse('a[]=b&a[hasOwnProperty]=c&a[x]=y', { allowPrototypes: true }), { a: { 0: 'b', hasOwnProperty: 'c', x: 'y' } }); + st.end(); + }); + + t.test('transforms arrays to objects (dot notation)', function (st) { + st.deepEqual(qs.parse('foo[0].baz=bar&fool.bad=baz', { allowDots: true }), { foo: [{ baz: 'bar' }], fool: { bad: 'baz' } }); + st.deepEqual(qs.parse('foo[0].baz=bar&fool.bad.boo=baz', { allowDots: true }), { foo: [{ baz: 'bar' }], fool: { bad: { boo: 'baz' } } }); + st.deepEqual(qs.parse('foo[0][0].baz=bar&fool.bad=baz', { allowDots: true }), { foo: [[{ baz: 'bar' }]], fool: { bad: 'baz' } }); + st.deepEqual(qs.parse('foo[0].baz[0]=15&foo[0].bar=2', { allowDots: true }), { foo: [{ baz: ['15'], bar: '2' }] }); + st.deepEqual(qs.parse('foo[0].baz[0]=15&foo[0].baz[1]=16&foo[0].bar=2', { allowDots: true }), { foo: [{ baz: ['15', '16'], bar: '2' }] }); + st.deepEqual(qs.parse('foo.bad=baz&foo[0]=bar', { allowDots: true }), { foo: { bad: 'baz', 0: 'bar' } }); + st.deepEqual(qs.parse('foo.bad=baz&foo[]=bar', { allowDots: true }), { foo: { bad: 'baz', 0: 'bar' } }); + st.deepEqual(qs.parse('foo[]=bar&foo.bad=baz', { allowDots: true }), { foo: { 0: 'bar', bad: 'baz' } }); + st.deepEqual(qs.parse('foo.bad=baz&foo[]=bar&foo[]=foo', { allowDots: true }), { foo: { bad: 'baz', 0: 'bar', 1: 'foo' } }); + st.deepEqual(qs.parse('foo[0].a=a&foo[0].b=b&foo[1].a=aa&foo[1].b=bb', { allowDots: true }), { foo: [{ a: 'a', b: 'b' }, { a: 'aa', b: 'bb' }] }); + st.end(); + }); + + t.test('correctly prunes undefined values when converting an array to an object', function (st) { + st.deepEqual(qs.parse('a[2]=b&a[99999999]=c'), { a: { 2: 'b', 99999999: 'c' } }); + st.end(); + }); + + t.test('supports malformed uri characters', function (st) { + st.deepEqual(qs.parse('{%:%}', { strictNullHandling: true }), { '{%:%}': null }); + st.deepEqual(qs.parse('{%:%}='), { '{%:%}': '' }); + st.deepEqual(qs.parse('foo=%:%}'), { foo: '%:%}' }); + st.end(); + }); + + t.test('doesn\'t produce empty keys', function (st) { + st.deepEqual(qs.parse('_r=1&'), { _r: '1' }); + st.end(); + }); + + t.test('cannot access Object prototype', function (st) { + qs.parse('constructor[prototype][bad]=bad'); + qs.parse('bad[constructor][prototype][bad]=bad'); + st.equal(typeof Object.prototype.bad, 'undefined'); + st.end(); + }); + + t.test('parses arrays of objects', function (st) { + st.deepEqual(qs.parse('a[][b]=c'), { a: [{ b: 'c' }] }); + st.deepEqual(qs.parse('a[0][b]=c'), { a: [{ b: 'c' }] }); + st.end(); + }); + + t.test('allows for empty strings in arrays', function (st) { + st.deepEqual(qs.parse('a[]=b&a[]=&a[]=c'), { a: ['b', '', 'c'] }); + + st.deepEqual( + qs.parse('a[0]=b&a[1]&a[2]=c&a[19]=', { strictNullHandling: true, arrayLimit: 20 }), + { a: ['b', null, 'c', ''] }, + 'with arrayLimit 20 + array indices: null then empty string works' + ); + st.deepEqual( + qs.parse('a[]=b&a[]&a[]=c&a[]=', { strictNullHandling: true, arrayLimit: 0 }), + { a: ['b', null, 'c', ''] }, + 'with arrayLimit 0 + array brackets: null then empty string works' + ); + + st.deepEqual( + qs.parse('a[0]=b&a[1]=&a[2]=c&a[19]', { strictNullHandling: true, arrayLimit: 20 }), + { a: ['b', '', 'c', null] }, + 'with arrayLimit 20 + array indices: empty string then null works' + ); + st.deepEqual( + qs.parse('a[]=b&a[]=&a[]=c&a[]', { strictNullHandling: true, arrayLimit: 0 }), + { a: ['b', '', 'c', null] }, + 'with arrayLimit 0 + array brackets: empty string then null works' + ); + + st.deepEqual( + qs.parse('a[]=&a[]=b&a[]=c'), + { a: ['', 'b', 'c'] }, + 'array brackets: empty strings work' + ); + st.end(); + }); + + t.test('compacts sparse arrays', function (st) { + st.deepEqual(qs.parse('a[10]=1&a[2]=2', { arrayLimit: 20 }), { a: ['2', '1'] }); + st.deepEqual(qs.parse('a[1][b][2][c]=1', { arrayLimit: 20 }), { a: [{ b: [{ c: '1' }] }] }); + st.deepEqual(qs.parse('a[1][2][3][c]=1', { arrayLimit: 20 }), { a: [[[{ c: '1' }]]] }); + st.deepEqual(qs.parse('a[1][2][3][c][1]=1', { arrayLimit: 20 }), { a: [[[{ c: ['1'] }]]] }); + st.end(); + }); + + t.test('parses sparse arrays', function (st) { + /* eslint no-sparse-arrays: 0 */ + st.deepEqual(qs.parse('a[4]=1&a[1]=2', { allowSparse: true }), { a: [, '2', , , '1'] }); + st.deepEqual(qs.parse('a[1][b][2][c]=1', { allowSparse: true }), { a: [, { b: [, , { c: '1' }] }] }); + st.deepEqual(qs.parse('a[1][2][3][c]=1', { allowSparse: true }), { a: [, [, , [, , , { c: '1' }]]] }); + st.deepEqual(qs.parse('a[1][2][3][c][1]=1', { allowSparse: true }), { a: [, [, , [, , , { c: [, '1'] }]]] }); + st.end(); + }); + + t.test('parses semi-parsed strings', function (st) { + st.deepEqual(qs.parse({ 'a[b]': 'c' }), { a: { b: 'c' } }); + st.deepEqual(qs.parse({ 'a[b]': 'c', 'a[d]': 'e' }), { a: { b: 'c', d: 'e' } }); + st.end(); + }); + + t.test('parses buffers correctly', function (st) { + var b = SaferBuffer.from('test'); + st.deepEqual(qs.parse({ a: b }), { a: b }); + st.end(); + }); + + t.test('parses jquery-param strings', function (st) { + // readable = 'filter[0][]=int1&filter[0][]==&filter[0][]=77&filter[]=and&filter[2][]=int2&filter[2][]==&filter[2][]=8' + var encoded = 'filter%5B0%5D%5B%5D=int1&filter%5B0%5D%5B%5D=%3D&filter%5B0%5D%5B%5D=77&filter%5B%5D=and&filter%5B2%5D%5B%5D=int2&filter%5B2%5D%5B%5D=%3D&filter%5B2%5D%5B%5D=8'; + var expected = { filter: [['int1', '=', '77'], 'and', ['int2', '=', '8']] }; + st.deepEqual(qs.parse(encoded), expected); + st.end(); + }); + + t.test('continues parsing when no parent is found', function (st) { + st.deepEqual(qs.parse('[]=&a=b'), { 0: '', a: 'b' }); + st.deepEqual(qs.parse('[]&a=b', { strictNullHandling: true }), { 0: null, a: 'b' }); + st.deepEqual(qs.parse('[foo]=bar'), { foo: 'bar' }); + st.end(); + }); + + t.test('does not error when parsing a very long array', function (st) { + var str = 'a[]=a'; + while (Buffer.byteLength(str) < 128 * 1024) { + str = str + '&' + str; + } + + st.doesNotThrow(function () { + qs.parse(str); + }); + + st.end(); + }); + + t.test('does not throw when a native prototype has an enumerable property', function (st) { + st.intercept(Object.prototype, 'crash', { value: '' }); + st.intercept(Array.prototype, 'crash', { value: '' }); + + st.doesNotThrow(qs.parse.bind(null, 'a=b')); + st.deepEqual(qs.parse('a=b'), { a: 'b' }); + st.doesNotThrow(qs.parse.bind(null, 'a[][b]=c')); + st.deepEqual(qs.parse('a[][b]=c'), { a: [{ b: 'c' }] }); + + st.end(); + }); + + t.test('parses a string with an alternative string delimiter', function (st) { + st.deepEqual(qs.parse('a=b;c=d', { delimiter: ';' }), { a: 'b', c: 'd' }); + st.end(); + }); + + t.test('parses a string with an alternative RegExp delimiter', function (st) { + st.deepEqual(qs.parse('a=b; c=d', { delimiter: /[;,] */ }), { a: 'b', c: 'd' }); + st.end(); + }); + + t.test('does not use non-splittable objects as delimiters', function (st) { + st.deepEqual(qs.parse('a=b&c=d', { delimiter: true }), { a: 'b', c: 'd' }); + st.end(); + }); + + t.test('allows overriding parameter limit', function (st) { + st.deepEqual(qs.parse('a=b&c=d', { parameterLimit: 1 }), { a: 'b' }); + st.end(); + }); + + t.test('allows setting the parameter limit to Infinity', function (st) { + st.deepEqual(qs.parse('a=b&c=d', { parameterLimit: Infinity }), { a: 'b', c: 'd' }); + st.end(); + }); + + t.test('allows overriding array limit', function (st) { + st.deepEqual(qs.parse('a[0]=b', { arrayLimit: -1 }), { a: { 0: 'b' } }); + st.deepEqual(qs.parse('a[0]=b', { arrayLimit: 0 }), { a: ['b'] }); + + st.deepEqual(qs.parse('a[-1]=b', { arrayLimit: -1 }), { a: { '-1': 'b' } }); + st.deepEqual(qs.parse('a[-1]=b', { arrayLimit: 0 }), { a: { '-1': 'b' } }); + + st.deepEqual(qs.parse('a[0]=b&a[1]=c', { arrayLimit: -1 }), { a: { 0: 'b', 1: 'c' } }); + st.deepEqual(qs.parse('a[0]=b&a[1]=c', { arrayLimit: 0 }), { a: { 0: 'b', 1: 'c' } }); + + st.end(); + }); + + t.test('allows disabling array parsing', function (st) { + var indices = qs.parse('a[0]=b&a[1]=c', { parseArrays: false }); + st.deepEqual(indices, { a: { 0: 'b', 1: 'c' } }); + st.equal(Array.isArray(indices.a), false, 'parseArrays:false, indices case is not an array'); + + var emptyBrackets = qs.parse('a[]=b', { parseArrays: false }); + st.deepEqual(emptyBrackets, { a: { 0: 'b' } }); + st.equal(Array.isArray(emptyBrackets.a), false, 'parseArrays:false, empty brackets case is not an array'); + + st.end(); + }); + + t.test('allows for query string prefix', function (st) { + st.deepEqual(qs.parse('?foo=bar', { ignoreQueryPrefix: true }), { foo: 'bar' }); + st.deepEqual(qs.parse('foo=bar', { ignoreQueryPrefix: true }), { foo: 'bar' }); + st.deepEqual(qs.parse('?foo=bar', { ignoreQueryPrefix: false }), { '?foo': 'bar' }); + + st.end(); + }); + + t.test('parses an object', function (st) { + var input = { + 'user[name]': { 'pop[bob]': 3 }, + 'user[email]': null + }; + + var expected = { + user: { + name: { 'pop[bob]': 3 }, + email: null + } + }; + + var result = qs.parse(input); + + st.deepEqual(result, expected); + st.end(); + }); + + t.test('parses string with comma as array divider', function (st) { + st.deepEqual(qs.parse('foo=bar,tee', { comma: true }), { foo: ['bar', 'tee'] }); + st.deepEqual(qs.parse('foo[bar]=coffee,tee', { comma: true }), { foo: { bar: ['coffee', 'tee'] } }); + st.deepEqual(qs.parse('foo=', { comma: true }), { foo: '' }); + st.deepEqual(qs.parse('foo', { comma: true }), { foo: '' }); + st.deepEqual(qs.parse('foo', { comma: true, strictNullHandling: true }), { foo: null }); + + // test cases inversed from from stringify tests + st.deepEqual(qs.parse('a[0]=c'), { a: ['c'] }); + st.deepEqual(qs.parse('a[]=c'), { a: ['c'] }); + st.deepEqual(qs.parse('a[]=c', { comma: true }), { a: ['c'] }); + + st.deepEqual(qs.parse('a[0]=c&a[1]=d'), { a: ['c', 'd'] }); + st.deepEqual(qs.parse('a[]=c&a[]=d'), { a: ['c', 'd'] }); + st.deepEqual(qs.parse('a=c,d', { comma: true }), { a: ['c', 'd'] }); + + st.end(); + }); + + t.test('parses values with comma as array divider', function (st) { + st.deepEqual(qs.parse({ foo: 'bar,tee' }, { comma: false }), { foo: 'bar,tee' }); + st.deepEqual(qs.parse({ foo: 'bar,tee' }, { comma: true }), { foo: ['bar', 'tee'] }); + st.end(); + }); + + t.test('use number decoder, parses string that has one number with comma option enabled', function (st) { + var decoder = function (str, defaultDecoder, charset, type) { + if (!isNaN(Number(str))) { + return parseFloat(str); + } + return defaultDecoder(str, defaultDecoder, charset, type); + }; + + st.deepEqual(qs.parse('foo=1', { comma: true, decoder: decoder }), { foo: 1 }); + st.deepEqual(qs.parse('foo=0', { comma: true, decoder: decoder }), { foo: 0 }); + + st.end(); + }); + + t.test('parses brackets holds array of arrays when having two parts of strings with comma as array divider', function (st) { + st.deepEqual(qs.parse('foo[]=1,2,3&foo[]=4,5,6', { comma: true }), { foo: [['1', '2', '3'], ['4', '5', '6']] }); + st.deepEqual(qs.parse('foo[]=1,2,3&foo[]=', { comma: true }), { foo: [['1', '2', '3'], ''] }); + st.deepEqual(qs.parse('foo[]=1,2,3&foo[]=,', { comma: true }), { foo: [['1', '2', '3'], ['', '']] }); + st.deepEqual(qs.parse('foo[]=1,2,3&foo[]=a', { comma: true }), { foo: [['1', '2', '3'], 'a'] }); + + st.end(); + }); + + t.test('parses url-encoded brackets holds array of arrays when having two parts of strings with comma as array divider', function (st) { + st.deepEqual(qs.parse('foo%5B%5D=1,2,3&foo%5B%5D=4,5,6', { comma: true }), { foo: [['1', '2', '3'], ['4', '5', '6']] }); + st.deepEqual(qs.parse('foo%5B%5D=1,2,3&foo%5B%5D=', { comma: true }), { foo: [['1', '2', '3'], ''] }); + st.deepEqual(qs.parse('foo%5B%5D=1,2,3&foo%5B%5D=,', { comma: true }), { foo: [['1', '2', '3'], ['', '']] }); + st.deepEqual(qs.parse('foo%5B%5D=1,2,3&foo%5B%5D=a', { comma: true }), { foo: [['1', '2', '3'], 'a'] }); + + st.end(); + }); + + t.test('parses comma delimited array while having percent-encoded comma treated as normal text', function (st) { + st.deepEqual(qs.parse('foo=a%2Cb', { comma: true }), { foo: 'a,b' }); + st.deepEqual(qs.parse('foo=a%2C%20b,d', { comma: true }), { foo: ['a, b', 'd'] }); + st.deepEqual(qs.parse('foo=a%2C%20b,c%2C%20d', { comma: true }), { foo: ['a, b', 'c, d'] }); + + st.end(); + }); + + t.test('parses an object in dot notation', function (st) { + var input = { + 'user.name': { 'pop[bob]': 3 }, + 'user.email.': null + }; + + var expected = { + user: { + name: { 'pop[bob]': 3 }, + email: null + } + }; + + var result = qs.parse(input, { allowDots: true }); + + st.deepEqual(result, expected); + st.end(); + }); + + t.test('parses an object and not child values', function (st) { + var input = { + 'user[name]': { 'pop[bob]': { test: 3 } }, + 'user[email]': null + }; + + var expected = { + user: { + name: { 'pop[bob]': { test: 3 } }, + email: null + } + }; + + var result = qs.parse(input); + + st.deepEqual(result, expected); + st.end(); + }); + + t.test('does not blow up when Buffer global is missing', function (st) { + var restore = mockProperty(global, 'Buffer', { 'delete': true }); + + var result = qs.parse('a=b&c=d'); + + restore(); + + st.deepEqual(result, { a: 'b', c: 'd' }); + st.end(); + }); + + t.test('does not crash when parsing circular references', function (st) { + var a = {}; + a.b = a; + + var parsed; + + st.doesNotThrow(function () { + parsed = qs.parse({ 'foo[bar]': 'baz', 'foo[baz]': a }); + }); + + st.equal('foo' in parsed, true, 'parsed has "foo" property'); + st.equal('bar' in parsed.foo, true); + st.equal('baz' in parsed.foo, true); + st.equal(parsed.foo.bar, 'baz'); + st.deepEqual(parsed.foo.baz, a); + st.end(); + }); + + t.test('does not crash when parsing deep objects', function (st) { + var parsed; + var str = 'foo'; + + for (var i = 0; i < 5000; i++) { + str += '[p]'; + } + + str += '=bar'; + + st.doesNotThrow(function () { + parsed = qs.parse(str, { depth: 5000 }); + }); + + st.equal('foo' in parsed, true, 'parsed has "foo" property'); + + var depth = 0; + var ref = parsed.foo; + while ((ref = ref.p)) { + depth += 1; + } + + st.equal(depth, 5000, 'parsed is 5000 properties deep'); + + st.end(); + }); + + t.test('parses null objects correctly', { skip: !hasProto }, function (st) { + var a = { __proto__: null, b: 'c' }; + + st.deepEqual(qs.parse(a), { b: 'c' }); + var result = qs.parse({ a: a }); + st.equal('a' in result, true, 'result has "a" property'); + st.deepEqual(result.a, a); + st.end(); + }); + + t.test('parses dates correctly', function (st) { + var now = new Date(); + st.deepEqual(qs.parse({ a: now }), { a: now }); + st.end(); + }); + + t.test('parses regular expressions correctly', function (st) { + var re = /^test$/; + st.deepEqual(qs.parse({ a: re }), { a: re }); + st.end(); + }); + + t.test('does not allow overwriting prototype properties', function (st) { + st.deepEqual(qs.parse('a[hasOwnProperty]=b', { allowPrototypes: false }), {}); + st.deepEqual(qs.parse('hasOwnProperty=b', { allowPrototypes: false }), {}); + + st.deepEqual( + qs.parse('toString', { allowPrototypes: false }), + {}, + 'bare "toString" results in {}' + ); + + st.end(); + }); + + t.test('can allow overwriting prototype properties', function (st) { + st.deepEqual(qs.parse('a[hasOwnProperty]=b', { allowPrototypes: true }), { a: { hasOwnProperty: 'b' } }); + st.deepEqual(qs.parse('hasOwnProperty=b', { allowPrototypes: true }), { hasOwnProperty: 'b' }); + + st.deepEqual( + qs.parse('toString', { allowPrototypes: true }), + { toString: '' }, + 'bare "toString" results in { toString: "" }' + ); + + st.end(); + }); + + t.test('does not crash when the global Object prototype is frozen', { skip: !hasPropertyDescriptors || !hasOverrideMistake }, function (st) { + // We can't actually freeze the global Object prototype as that will interfere with other tests, and once an object is frozen, it + // can't be unfrozen. Instead, we add a new non-writable property to simulate this. + st.teardown(mockProperty(Object.prototype, 'frozenProp', { value: 'foo', nonWritable: true, nonEnumerable: true })); + + st['throws']( + function () { + var obj = {}; + obj.frozenProp = 'bar'; + }, + // node < 6 has a different error message + /^TypeError: Cannot assign to read only property 'frozenProp' of (?:object '#<Object>'|#<Object>)/, + 'regular assignment of an inherited non-writable property throws' + ); + + var parsed; + st.doesNotThrow( + function () { + parsed = qs.parse('frozenProp', { allowPrototypes: false }); + }, + 'parsing a nonwritable Object.prototype property does not throw' + ); + + st.deepEqual(parsed, {}, 'bare "frozenProp" results in {}'); + + st.end(); + }); + + t.test('params starting with a closing bracket', function (st) { + st.deepEqual(qs.parse(']=toString'), { ']': 'toString' }); + st.deepEqual(qs.parse(']]=toString'), { ']]': 'toString' }); + st.deepEqual(qs.parse(']hello]=toString'), { ']hello]': 'toString' }); + st.end(); + }); + + t.test('params starting with a starting bracket', function (st) { + st.deepEqual(qs.parse('[=toString'), { '[': 'toString' }); + st.deepEqual(qs.parse('[[=toString'), { '[[': 'toString' }); + st.deepEqual(qs.parse('[hello[=toString'), { '[hello[': 'toString' }); + st.end(); + }); + + t.test('add keys to objects', function (st) { + st.deepEqual( + qs.parse('a[b]=c&a=d'), + { a: { b: 'c', d: true } }, + 'can add keys to objects' + ); + + st.deepEqual( + qs.parse('a[b]=c&a=toString'), + { a: { b: 'c' } }, + 'can not overwrite prototype' + ); + + st.deepEqual( + qs.parse('a[b]=c&a=toString', { allowPrototypes: true }), + { a: { b: 'c', toString: true } }, + 'can overwrite prototype with allowPrototypes true' + ); + + st.deepEqual( + qs.parse('a[b]=c&a=toString', { plainObjects: true }), + { __proto__: null, a: { __proto__: null, b: 'c', toString: true } }, + 'can overwrite prototype with plainObjects true' + ); + + st.end(); + }); + + t.test('dunder proto is ignored', function (st) { + var payload = 'categories[__proto__]=login&categories[__proto__]&categories[length]=42'; + var result = qs.parse(payload, { allowPrototypes: true }); + + st.deepEqual( + result, + { + categories: { + length: '42' + } + }, + 'silent [[Prototype]] payload' + ); + + var plainResult = qs.parse(payload, { allowPrototypes: true, plainObjects: true }); + + st.deepEqual( + plainResult, + { + __proto__: null, + categories: { + __proto__: null, + length: '42' + } + }, + 'silent [[Prototype]] payload: plain objects' + ); + + var query = qs.parse('categories[__proto__]=cats&categories[__proto__]=dogs&categories[some][json]=toInject', { allowPrototypes: true }); + + st.notOk(Array.isArray(query.categories), 'is not an array'); + st.notOk(query.categories instanceof Array, 'is not instanceof an array'); + st.deepEqual(query.categories, { some: { json: 'toInject' } }); + st.equal(JSON.stringify(query.categories), '{"some":{"json":"toInject"}}', 'stringifies as a non-array'); + + st.deepEqual( + qs.parse('foo[__proto__][hidden]=value&foo[bar]=stuffs', { allowPrototypes: true }), + { + foo: { + bar: 'stuffs' + } + }, + 'hidden values' + ); + + st.deepEqual( + qs.parse('foo[__proto__][hidden]=value&foo[bar]=stuffs', { allowPrototypes: true, plainObjects: true }), + { + __proto__: null, + foo: { + __proto__: null, + bar: 'stuffs' + } + }, + 'hidden values: plain objects' + ); + + st.end(); + }); + + t.test('can return null objects', { skip: !hasProto }, function (st) { + var expected = { + __proto__: null, + a: { + __proto__: null, + b: 'c', + hasOwnProperty: 'd' + } + }; + st.deepEqual(qs.parse('a[b]=c&a[hasOwnProperty]=d', { plainObjects: true }), expected); + st.deepEqual(qs.parse(null, { plainObjects: true }), { __proto__: null }); + var expectedArray = { + __proto__: null, + a: { + __proto__: null, + 0: 'b', + c: 'd' + } + }; + st.deepEqual(qs.parse('a[]=b&a[c]=d', { plainObjects: true }), expectedArray); + st.end(); + }); + + t.test('can parse with custom encoding', function (st) { + st.deepEqual(qs.parse('%8c%a7=%91%e5%8d%e3%95%7b', { + decoder: function (str) { + var reg = /%([0-9A-F]{2})/ig; + var result = []; + var parts = reg.exec(str); + while (parts) { + result.push(parseInt(parts[1], 16)); + parts = reg.exec(str); + } + return String(iconv.decode(SaferBuffer.from(result), 'shift_jis')); + } + }), { 県: '大阪府' }); + st.end(); + }); + + t.test('receives the default decoder as a second argument', function (st) { + st.plan(1); + qs.parse('a', { + decoder: function (str, defaultDecoder) { + st.equal(defaultDecoder, utils.decode); + } + }); + st.end(); + }); + + t.test('throws error with wrong decoder', function (st) { + st['throws'](function () { + qs.parse({}, { decoder: 'string' }); + }, new TypeError('Decoder has to be a function.')); + st.end(); + }); + + t.test('does not mutate the options argument', function (st) { + var options = {}; + qs.parse('a[b]=true', options); + st.deepEqual(options, {}); + st.end(); + }); + + t.test('throws if an invalid charset is specified', function (st) { + st['throws'](function () { + qs.parse('a=b', { charset: 'foobar' }); + }, new TypeError('The charset option must be either utf-8, iso-8859-1, or undefined')); + st.end(); + }); + + t.test('parses an iso-8859-1 string if asked to', function (st) { + st.deepEqual(qs.parse('%A2=%BD', { charset: 'iso-8859-1' }), { '¢': '½' }); + st.end(); + }); + + var urlEncodedCheckmarkInUtf8 = '%E2%9C%93'; + var urlEncodedOSlashInUtf8 = '%C3%B8'; + var urlEncodedNumCheckmark = '%26%2310003%3B'; + var urlEncodedNumSmiley = '%26%239786%3B'; + + t.test('prefers an utf-8 charset specified by the utf8 sentinel to a default charset of iso-8859-1', function (st) { + st.deepEqual(qs.parse('utf8=' + urlEncodedCheckmarkInUtf8 + '&' + urlEncodedOSlashInUtf8 + '=' + urlEncodedOSlashInUtf8, { charsetSentinel: true, charset: 'iso-8859-1' }), { ø: 'ø' }); + st.end(); + }); + + t.test('prefers an iso-8859-1 charset specified by the utf8 sentinel to a default charset of utf-8', function (st) { + st.deepEqual(qs.parse('utf8=' + urlEncodedNumCheckmark + '&' + urlEncodedOSlashInUtf8 + '=' + urlEncodedOSlashInUtf8, { charsetSentinel: true, charset: 'utf-8' }), { 'ø': 'ø' }); + st.end(); + }); + + t.test('does not require the utf8 sentinel to be defined before the parameters whose decoding it affects', function (st) { + st.deepEqual(qs.parse('a=' + urlEncodedOSlashInUtf8 + '&utf8=' + urlEncodedNumCheckmark, { charsetSentinel: true, charset: 'utf-8' }), { a: 'ø' }); + st.end(); + }); + + t.test('ignores an utf8 sentinel with an unknown value', function (st) { + st.deepEqual(qs.parse('utf8=foo&' + urlEncodedOSlashInUtf8 + '=' + urlEncodedOSlashInUtf8, { charsetSentinel: true, charset: 'utf-8' }), { ø: 'ø' }); + st.end(); + }); + + t.test('uses the utf8 sentinel to switch to utf-8 when no default charset is given', function (st) { + st.deepEqual(qs.parse('utf8=' + urlEncodedCheckmarkInUtf8 + '&' + urlEncodedOSlashInUtf8 + '=' + urlEncodedOSlashInUtf8, { charsetSentinel: true }), { ø: 'ø' }); + st.end(); + }); + + t.test('uses the utf8 sentinel to switch to iso-8859-1 when no default charset is given', function (st) { + st.deepEqual(qs.parse('utf8=' + urlEncodedNumCheckmark + '&' + urlEncodedOSlashInUtf8 + '=' + urlEncodedOSlashInUtf8, { charsetSentinel: true }), { 'ø': 'ø' }); + st.end(); + }); + + t.test('interprets numeric entities in iso-8859-1 when `interpretNumericEntities`', function (st) { + st.deepEqual(qs.parse('foo=' + urlEncodedNumSmiley, { charset: 'iso-8859-1', interpretNumericEntities: true }), { foo: '☺' }); + st.end(); + }); + + t.test('handles a custom decoder returning `null`, in the `iso-8859-1` charset, when `interpretNumericEntities`', function (st) { + st.deepEqual(qs.parse('foo=&bar=' + urlEncodedNumSmiley, { + charset: 'iso-8859-1', + decoder: function (str, defaultDecoder, charset) { + return str ? defaultDecoder(str, defaultDecoder, charset) : null; + }, + interpretNumericEntities: true + }), { foo: null, bar: '☺' }); + st.end(); + }); + + t.test('does not interpret numeric entities in iso-8859-1 when `interpretNumericEntities` is absent', function (st) { + st.deepEqual(qs.parse('foo=' + urlEncodedNumSmiley, { charset: 'iso-8859-1' }), { foo: '☺' }); + st.end(); + }); + + t.test('does not interpret numeric entities when the charset is utf-8, even when `interpretNumericEntities`', function (st) { + st.deepEqual(qs.parse('foo=' + urlEncodedNumSmiley, { charset: 'utf-8', interpretNumericEntities: true }), { foo: '☺' }); + st.end(); + }); + + t.test('interpretNumericEntities with comma:true and iso charset does not crash', function (st) { + st.deepEqual( + qs.parse('b&a[]=1,' + urlEncodedNumSmiley, { comma: true, charset: 'iso-8859-1', interpretNumericEntities: true }), + { b: '', a: ['1,☺'] } + ); + + st.end(); + }); + + t.test('does not interpret %uXXXX syntax in iso-8859-1 mode', function (st) { + st.deepEqual(qs.parse('%u263A=%u263A', { charset: 'iso-8859-1' }), { '%u263A': '%u263A' }); + st.end(); + }); + + t.test('allows for decoding keys and values differently', function (st) { + var decoder = function (str, defaultDecoder, charset, type) { + if (type === 'key') { + return defaultDecoder(str, defaultDecoder, charset, type).toLowerCase(); + } + if (type === 'value') { + return defaultDecoder(str, defaultDecoder, charset, type).toUpperCase(); + } + throw 'this should never happen! type: ' + type; + }; + + st.deepEqual(qs.parse('KeY=vAlUe', { decoder: decoder }), { key: 'VALUE' }); + st.end(); + }); + + t.test('parameter limit tests', function (st) { + st.test('does not throw error when within parameter limit', function (sst) { + var result = qs.parse('a=1&b=2&c=3', { parameterLimit: 5, throwOnLimitExceeded: true }); + sst.deepEqual(result, { a: '1', b: '2', c: '3' }, 'parses without errors'); + sst.end(); + }); + + st.test('throws error when throwOnLimitExceeded is present but not boolean', function (sst) { + sst['throws']( + function () { + qs.parse('a=1&b=2&c=3&d=4&e=5&f=6', { parameterLimit: 3, throwOnLimitExceeded: 'true' }); + }, + new TypeError('`throwOnLimitExceeded` option must be a boolean'), + 'throws error when throwOnLimitExceeded is present and not boolean' + ); + sst.end(); + }); + + st.test('throws error when parameter limit exceeded', function (sst) { + sst['throws']( + function () { + qs.parse('a=1&b=2&c=3&d=4&e=5&f=6', { parameterLimit: 3, throwOnLimitExceeded: true }); + }, + new RangeError('Parameter limit exceeded. Only 3 parameters allowed.'), + 'throws error when parameter limit is exceeded' + ); + sst.end(); + }); + + st.test('silently truncates when throwOnLimitExceeded is not given', function (sst) { + var result = qs.parse('a=1&b=2&c=3&d=4&e=5', { parameterLimit: 3 }); + sst.deepEqual(result, { a: '1', b: '2', c: '3' }, 'parses and truncates silently'); + sst.end(); + }); + + st.test('silently truncates when parameter limit exceeded without error', function (sst) { + var result = qs.parse('a=1&b=2&c=3&d=4&e=5', { parameterLimit: 3, throwOnLimitExceeded: false }); + sst.deepEqual(result, { a: '1', b: '2', c: '3' }, 'parses and truncates silently'); + sst.end(); + }); + + st.test('allows unlimited parameters when parameterLimit set to Infinity', function (sst) { + var result = qs.parse('a=1&b=2&c=3&d=4&e=5&f=6', { parameterLimit: Infinity }); + sst.deepEqual(result, { a: '1', b: '2', c: '3', d: '4', e: '5', f: '6' }, 'parses all parameters without truncation'); + sst.end(); + }); + + st.end(); + }); + + t.test('array limit tests', function (st) { + st.test('does not throw error when array is within limit', function (sst) { + var result = qs.parse('a[]=1&a[]=2&a[]=3', { arrayLimit: 5, throwOnLimitExceeded: true }); + sst.deepEqual(result, { a: ['1', '2', '3'] }, 'parses array without errors'); + sst.end(); + }); + + st.test('throws error when throwOnLimitExceeded is present but not boolean for array limit', function (sst) { + sst['throws']( + function () { + qs.parse('a[]=1&a[]=2&a[]=3&a[]=4', { arrayLimit: 3, throwOnLimitExceeded: 'true' }); + }, + new TypeError('`throwOnLimitExceeded` option must be a boolean'), + 'throws error when throwOnLimitExceeded is present and not boolean for array limit' + ); + sst.end(); + }); + + st.test('throws error when array limit exceeded', function (sst) { + sst['throws']( + function () { + qs.parse('a[]=1&a[]=2&a[]=3&a[]=4', { arrayLimit: 3, throwOnLimitExceeded: true }); + }, + new RangeError('Array limit exceeded. Only 3 elements allowed in an array.'), + 'throws error when array limit is exceeded' + ); + sst.end(); + }); + + st.test('converts array to object if length is greater than limit', function (sst) { + var result = qs.parse('a[1]=1&a[2]=2&a[3]=3&a[4]=4&a[5]=5&a[6]=6', { arrayLimit: 5 }); + + sst.deepEqual(result, { a: { 1: '1', 2: '2', 3: '3', 4: '4', 5: '5', 6: '6' } }, 'parses into object if array length is greater than limit'); + sst.end(); + }); + + st.end(); + }); + + t.end(); +}); + +test('parses empty keys', function (t) { + emptyTestCases.forEach(function (testCase) { + t.test('skips empty string key with ' + testCase.input, function (st) { + st.deepEqual(qs.parse(testCase.input), testCase.noEmptyKeys); + + st.end(); + }); + }); +}); + +test('`duplicates` option', function (t) { + v.nonStrings.concat('not a valid option').forEach(function (invalidOption) { + if (typeof invalidOption !== 'undefined') { + t['throws']( + function () { qs.parse('', { duplicates: invalidOption }); }, + TypeError, + 'throws on invalid option: ' + inspect(invalidOption) + ); + } + }); + + t.deepEqual( + qs.parse('foo=bar&foo=baz'), + { foo: ['bar', 'baz'] }, + 'duplicates: default, combine' + ); + + t.deepEqual( + qs.parse('foo=bar&foo=baz', { duplicates: 'combine' }), + { foo: ['bar', 'baz'] }, + 'duplicates: combine' + ); + + t.deepEqual( + qs.parse('foo=bar&foo=baz', { duplicates: 'first' }), + { foo: 'bar' }, + 'duplicates: first' + ); + + t.deepEqual( + qs.parse('foo=bar&foo=baz', { duplicates: 'last' }), + { foo: 'baz' }, + 'duplicates: last' + ); + + t.end(); +}); + +test('qs strictDepth option - throw cases', function (t) { + t.test('throws an exception when depth exceeds the limit with strictDepth: true', function (st) { + st['throws']( + function () { + qs.parse('a[b][c][d][e][f][g][h][i]=j', { depth: 1, strictDepth: true }); + }, + RangeError, + 'throws RangeError' + ); + st.end(); + }); + + t.test('throws an exception for multiple nested arrays with strictDepth: true', function (st) { + st['throws']( + function () { + qs.parse('a[0][1][2][3][4]=b', { depth: 3, strictDepth: true }); + }, + RangeError, + 'throws RangeError' + ); + st.end(); + }); + + t.test('throws an exception for nested objects and arrays with strictDepth: true', function (st) { + st['throws']( + function () { + qs.parse('a[b][c][0][d][e]=f', { depth: 3, strictDepth: true }); + }, + RangeError, + 'throws RangeError' + ); + st.end(); + }); + + t.test('throws an exception for different types of values with strictDepth: true', function (st) { + st['throws']( + function () { + qs.parse('a[b][c][d][e]=true&a[b][c][d][f]=42', { depth: 3, strictDepth: true }); + }, + RangeError, + 'throws RangeError' + ); + st.end(); + }); + +}); + +test('qs strictDepth option - non-throw cases', function (t) { + t.test('when depth is 0 and strictDepth true, do not throw', function (st) { + st.doesNotThrow( + function () { + qs.parse('a[b][c][d][e]=true&a[b][c][d][f]=42', { depth: 0, strictDepth: true }); + }, + RangeError, + 'does not throw RangeError' + ); + st.end(); + }); + + t.test('parses successfully when depth is within the limit with strictDepth: true', function (st) { + st.doesNotThrow( + function () { + var result = qs.parse('a[b]=c', { depth: 1, strictDepth: true }); + st.deepEqual(result, { a: { b: 'c' } }, 'parses correctly'); + } + ); + st.end(); + }); + + t.test('does not throw an exception when depth exceeds the limit with strictDepth: false', function (st) { + st.doesNotThrow( + function () { + var result = qs.parse('a[b][c][d][e][f][g][h][i]=j', { depth: 1 }); + st.deepEqual(result, { a: { b: { '[c][d][e][f][g][h][i]': 'j' } } }, 'parses with depth limit'); + } + ); + st.end(); + }); + + t.test('parses successfully when depth is within the limit with strictDepth: false', function (st) { + st.doesNotThrow( + function () { + var result = qs.parse('a[b]=c', { depth: 1 }); + st.deepEqual(result, { a: { b: 'c' } }, 'parses correctly'); + } + ); + st.end(); + }); + + t.test('does not throw when depth is exactly at the limit with strictDepth: true', function (st) { + st.doesNotThrow( + function () { + var result = qs.parse('a[b][c]=d', { depth: 2, strictDepth: true }); + st.deepEqual(result, { a: { b: { c: 'd' } } }, 'parses correctly'); + } + ); + st.end(); + }); +}); diff --git a/node_modules/body-parser/node_modules/qs/test/stringify.js b/node_modules/body-parser/node_modules/qs/test/stringify.js new file mode 100644 index 0000000..7253144 --- /dev/null +++ b/node_modules/body-parser/node_modules/qs/test/stringify.js @@ -0,0 +1,1306 @@ +'use strict'; + +var test = require('tape'); +var qs = require('../'); +var utils = require('../lib/utils'); +var iconv = require('iconv-lite'); +var SaferBuffer = require('safer-buffer').Buffer; +var hasSymbols = require('has-symbols'); +var mockProperty = require('mock-property'); +var emptyTestCases = require('./empty-keys-cases').emptyTestCases; +var hasProto = require('has-proto')(); +var hasBigInt = require('has-bigints')(); + +test('stringify()', function (t) { + t.test('stringifies a querystring object', function (st) { + st.equal(qs.stringify({ a: 'b' }), 'a=b'); + st.equal(qs.stringify({ a: 1 }), 'a=1'); + st.equal(qs.stringify({ a: 1, b: 2 }), 'a=1&b=2'); + st.equal(qs.stringify({ a: 'A_Z' }), 'a=A_Z'); + st.equal(qs.stringify({ a: '€' }), 'a=%E2%82%AC'); + st.equal(qs.stringify({ a: '' }), 'a=%EE%80%80'); + st.equal(qs.stringify({ a: 'א' }), 'a=%D7%90'); + st.equal(qs.stringify({ a: '𐐷' }), 'a=%F0%90%90%B7'); + st.end(); + }); + + t.test('stringifies falsy values', function (st) { + st.equal(qs.stringify(undefined), ''); + st.equal(qs.stringify(null), ''); + st.equal(qs.stringify(null, { strictNullHandling: true }), ''); + st.equal(qs.stringify(false), ''); + st.equal(qs.stringify(0), ''); + st.end(); + }); + + t.test('stringifies symbols', { skip: !hasSymbols() }, function (st) { + st.equal(qs.stringify(Symbol.iterator), ''); + st.equal(qs.stringify([Symbol.iterator]), '0=Symbol%28Symbol.iterator%29'); + st.equal(qs.stringify({ a: Symbol.iterator }), 'a=Symbol%28Symbol.iterator%29'); + st.equal( + qs.stringify({ a: [Symbol.iterator] }, { encodeValuesOnly: true, arrayFormat: 'brackets' }), + 'a[]=Symbol%28Symbol.iterator%29' + ); + st.end(); + }); + + t.test('stringifies bigints', { skip: !hasBigInt }, function (st) { + var three = BigInt(3); + var encodeWithN = function (value, defaultEncoder, charset) { + var result = defaultEncoder(value, defaultEncoder, charset); + return typeof value === 'bigint' ? result + 'n' : result; + }; + st.equal(qs.stringify(three), ''); + st.equal(qs.stringify([three]), '0=3'); + st.equal(qs.stringify([three], { encoder: encodeWithN }), '0=3n'); + st.equal(qs.stringify({ a: three }), 'a=3'); + st.equal(qs.stringify({ a: three }, { encoder: encodeWithN }), 'a=3n'); + st.equal( + qs.stringify({ a: [three] }, { encodeValuesOnly: true, arrayFormat: 'brackets' }), + 'a[]=3' + ); + st.equal( + qs.stringify({ a: [three] }, { encodeValuesOnly: true, encoder: encodeWithN, arrayFormat: 'brackets' }), + 'a[]=3n' + ); + st.end(); + }); + + t.test('encodes dot in key of object when encodeDotInKeys and allowDots is provided', function (st) { + st.equal( + qs.stringify( + { 'name.obj': { first: 'John', last: 'Doe' } }, + { allowDots: false, encodeDotInKeys: false } + ), + 'name.obj%5Bfirst%5D=John&name.obj%5Blast%5D=Doe', + 'with allowDots false and encodeDotInKeys false' + ); + st.equal( + qs.stringify( + { 'name.obj': { first: 'John', last: 'Doe' } }, + { allowDots: true, encodeDotInKeys: false } + ), + 'name.obj.first=John&name.obj.last=Doe', + 'with allowDots true and encodeDotInKeys false' + ); + st.equal( + qs.stringify( + { 'name.obj': { first: 'John', last: 'Doe' } }, + { allowDots: false, encodeDotInKeys: true } + ), + 'name%252Eobj%5Bfirst%5D=John&name%252Eobj%5Blast%5D=Doe', + 'with allowDots false and encodeDotInKeys true' + ); + st.equal( + qs.stringify( + { 'name.obj': { first: 'John', last: 'Doe' } }, + { allowDots: true, encodeDotInKeys: true } + ), + 'name%252Eobj.first=John&name%252Eobj.last=Doe', + 'with allowDots true and encodeDotInKeys true' + ); + + st.equal( + qs.stringify( + { 'name.obj.subobject': { 'first.godly.name': 'John', last: 'Doe' } }, + { allowDots: false, encodeDotInKeys: false } + ), + 'name.obj.subobject%5Bfirst.godly.name%5D=John&name.obj.subobject%5Blast%5D=Doe', + 'with allowDots false and encodeDotInKeys false' + ); + st.equal( + qs.stringify( + { 'name.obj.subobject': { 'first.godly.name': 'John', last: 'Doe' } }, + { allowDots: true, encodeDotInKeys: false } + ), + 'name.obj.subobject.first.godly.name=John&name.obj.subobject.last=Doe', + 'with allowDots false and encodeDotInKeys false' + ); + st.equal( + qs.stringify( + { 'name.obj.subobject': { 'first.godly.name': 'John', last: 'Doe' } }, + { allowDots: false, encodeDotInKeys: true } + ), + 'name%252Eobj%252Esubobject%5Bfirst.godly.name%5D=John&name%252Eobj%252Esubobject%5Blast%5D=Doe', + 'with allowDots false and encodeDotInKeys true' + ); + st.equal( + qs.stringify( + { 'name.obj.subobject': { 'first.godly.name': 'John', last: 'Doe' } }, + { allowDots: true, encodeDotInKeys: true } + ), + 'name%252Eobj%252Esubobject.first%252Egodly%252Ename=John&name%252Eobj%252Esubobject.last=Doe', + 'with allowDots true and encodeDotInKeys true' + ); + + st.end(); + }); + + t.test('should encode dot in key of object, and automatically set allowDots to `true` when encodeDotInKeys is true and allowDots in undefined', function (st) { + st.equal( + qs.stringify( + { 'name.obj.subobject': { 'first.godly.name': 'John', last: 'Doe' } }, + { encodeDotInKeys: true } + ), + 'name%252Eobj%252Esubobject.first%252Egodly%252Ename=John&name%252Eobj%252Esubobject.last=Doe', + 'with allowDots undefined and encodeDotInKeys true' + ); + st.end(); + }); + + t.test('should encode dot in key of object when encodeDotInKeys and allowDots is provided, and nothing else when encodeValuesOnly is provided', function (st) { + st.equal( + qs.stringify({ 'name.obj': { first: 'John', last: 'Doe' } }, { + encodeDotInKeys: true, allowDots: true, encodeValuesOnly: true + }), + 'name%2Eobj.first=John&name%2Eobj.last=Doe' + ); + + st.equal( + qs.stringify({ 'name.obj.subobject': { 'first.godly.name': 'John', last: 'Doe' } }, { allowDots: true, encodeDotInKeys: true, encodeValuesOnly: true }), + 'name%2Eobj%2Esubobject.first%2Egodly%2Ename=John&name%2Eobj%2Esubobject.last=Doe' + ); + + st.end(); + }); + + t.test('throws when `commaRoundTrip` is not a boolean', function (st) { + st['throws']( + function () { qs.stringify({}, { commaRoundTrip: 'not a boolean' }); }, + TypeError, + 'throws when `commaRoundTrip` is not a boolean' + ); + + st.end(); + }); + + t.test('throws when `encodeDotInKeys` is not a boolean', function (st) { + st['throws']( + function () { qs.stringify({ a: [], b: 'zz' }, { encodeDotInKeys: 'foobar' }); }, + TypeError + ); + + st['throws']( + function () { qs.stringify({ a: [], b: 'zz' }, { encodeDotInKeys: 0 }); }, + TypeError + ); + + st['throws']( + function () { qs.stringify({ a: [], b: 'zz' }, { encodeDotInKeys: NaN }); }, + TypeError + ); + + st['throws']( + function () { qs.stringify({ a: [], b: 'zz' }, { encodeDotInKeys: null }); }, + TypeError + ); + + st.end(); + }); + + t.test('adds query prefix', function (st) { + st.equal(qs.stringify({ a: 'b' }, { addQueryPrefix: true }), '?a=b'); + st.end(); + }); + + t.test('with query prefix, outputs blank string given an empty object', function (st) { + st.equal(qs.stringify({}, { addQueryPrefix: true }), ''); + st.end(); + }); + + t.test('stringifies nested falsy values', function (st) { + st.equal(qs.stringify({ a: { b: { c: null } } }), 'a%5Bb%5D%5Bc%5D='); + st.equal(qs.stringify({ a: { b: { c: null } } }, { strictNullHandling: true }), 'a%5Bb%5D%5Bc%5D'); + st.equal(qs.stringify({ a: { b: { c: false } } }), 'a%5Bb%5D%5Bc%5D=false'); + st.end(); + }); + + t.test('stringifies a nested object', function (st) { + st.equal(qs.stringify({ a: { b: 'c' } }), 'a%5Bb%5D=c'); + st.equal(qs.stringify({ a: { b: { c: { d: 'e' } } } }), 'a%5Bb%5D%5Bc%5D%5Bd%5D=e'); + st.end(); + }); + + t.test('`allowDots` option: stringifies a nested object with dots notation', function (st) { + st.equal(qs.stringify({ a: { b: 'c' } }, { allowDots: true }), 'a.b=c'); + st.equal(qs.stringify({ a: { b: { c: { d: 'e' } } } }, { allowDots: true }), 'a.b.c.d=e'); + st.end(); + }); + + t.test('stringifies an array value', function (st) { + st.equal( + qs.stringify({ a: ['b', 'c', 'd'] }, { arrayFormat: 'indices' }), + 'a%5B0%5D=b&a%5B1%5D=c&a%5B2%5D=d', + 'indices => indices' + ); + st.equal( + qs.stringify({ a: ['b', 'c', 'd'] }, { arrayFormat: 'brackets' }), + 'a%5B%5D=b&a%5B%5D=c&a%5B%5D=d', + 'brackets => brackets' + ); + st.equal( + qs.stringify({ a: ['b', 'c', 'd'] }, { arrayFormat: 'comma' }), + 'a=b%2Cc%2Cd', + 'comma => comma' + ); + st.equal( + qs.stringify({ a: ['b', 'c', 'd'] }, { arrayFormat: 'comma', commaRoundTrip: true }), + 'a=b%2Cc%2Cd', + 'comma round trip => comma' + ); + st.equal( + qs.stringify({ a: ['b', 'c', 'd'] }), + 'a%5B0%5D=b&a%5B1%5D=c&a%5B2%5D=d', + 'default => indices' + ); + st.end(); + }); + + t.test('`skipNulls` option', function (st) { + st.equal( + qs.stringify({ a: 'b', c: null }, { skipNulls: true }), + 'a=b', + 'omits nulls when asked' + ); + + st.equal( + qs.stringify({ a: { b: 'c', d: null } }, { skipNulls: true }), + 'a%5Bb%5D=c', + 'omits nested nulls when asked' + ); + + st.end(); + }); + + t.test('omits array indices when asked', function (st) { + st.equal(qs.stringify({ a: ['b', 'c', 'd'] }, { indices: false }), 'a=b&a=c&a=d'); + + st.end(); + }); + + t.test('omits object key/value pair when value is empty array', function (st) { + st.equal(qs.stringify({ a: [], b: 'zz' }), 'b=zz'); + + st.end(); + }); + + t.test('should not omit object key/value pair when value is empty array and when asked', function (st) { + st.equal(qs.stringify({ a: [], b: 'zz' }), 'b=zz'); + st.equal(qs.stringify({ a: [], b: 'zz' }, { allowEmptyArrays: false }), 'b=zz'); + st.equal(qs.stringify({ a: [], b: 'zz' }, { allowEmptyArrays: true }), 'a[]&b=zz'); + + st.end(); + }); + + t.test('should throw when allowEmptyArrays is not of type boolean', function (st) { + st['throws']( + function () { qs.stringify({ a: [], b: 'zz' }, { allowEmptyArrays: 'foobar' }); }, + TypeError + ); + + st['throws']( + function () { qs.stringify({ a: [], b: 'zz' }, { allowEmptyArrays: 0 }); }, + TypeError + ); + + st['throws']( + function () { qs.stringify({ a: [], b: 'zz' }, { allowEmptyArrays: NaN }); }, + TypeError + ); + + st['throws']( + function () { qs.stringify({ a: [], b: 'zz' }, { allowEmptyArrays: null }); }, + TypeError + ); + + st.end(); + }); + + t.test('allowEmptyArrays + strictNullHandling', function (st) { + st.equal( + qs.stringify( + { testEmptyArray: [] }, + { strictNullHandling: true, allowEmptyArrays: true } + ), + 'testEmptyArray[]' + ); + + st.end(); + }); + + t.test('stringifies an array value with one item vs multiple items', function (st) { + st.test('non-array item', function (s2t) { + s2t.equal(qs.stringify({ a: 'c' }, { encodeValuesOnly: true, arrayFormat: 'indices' }), 'a=c'); + s2t.equal(qs.stringify({ a: 'c' }, { encodeValuesOnly: true, arrayFormat: 'brackets' }), 'a=c'); + s2t.equal(qs.stringify({ a: 'c' }, { encodeValuesOnly: true, arrayFormat: 'comma' }), 'a=c'); + s2t.equal(qs.stringify({ a: 'c' }, { encodeValuesOnly: true }), 'a=c'); + + s2t.end(); + }); + + st.test('array with a single item', function (s2t) { + s2t.equal(qs.stringify({ a: ['c'] }, { encodeValuesOnly: true, arrayFormat: 'indices' }), 'a[0]=c'); + s2t.equal(qs.stringify({ a: ['c'] }, { encodeValuesOnly: true, arrayFormat: 'brackets' }), 'a[]=c'); + s2t.equal(qs.stringify({ a: ['c'] }, { encodeValuesOnly: true, arrayFormat: 'comma' }), 'a=c'); + s2t.equal(qs.stringify({ a: ['c'] }, { encodeValuesOnly: true, arrayFormat: 'comma', commaRoundTrip: true }), 'a[]=c'); // so it parses back as an array + s2t.equal(qs.stringify({ a: ['c'] }, { encodeValuesOnly: true }), 'a[0]=c'); + + s2t.end(); + }); + + st.test('array with multiple items', function (s2t) { + s2t.equal(qs.stringify({ a: ['c', 'd'] }, { encodeValuesOnly: true, arrayFormat: 'indices' }), 'a[0]=c&a[1]=d'); + s2t.equal(qs.stringify({ a: ['c', 'd'] }, { encodeValuesOnly: true, arrayFormat: 'brackets' }), 'a[]=c&a[]=d'); + s2t.equal(qs.stringify({ a: ['c', 'd'] }, { encodeValuesOnly: true, arrayFormat: 'comma' }), 'a=c,d'); + s2t.equal(qs.stringify({ a: ['c', 'd'] }, { encodeValuesOnly: true, arrayFormat: 'comma', commaRoundTrip: true }), 'a=c,d'); + s2t.equal(qs.stringify({ a: ['c', 'd'] }, { encodeValuesOnly: true }), 'a[0]=c&a[1]=d'); + + s2t.end(); + }); + + st.test('array with multiple items with a comma inside', function (s2t) { + s2t.equal(qs.stringify({ a: ['c,d', 'e'] }, { encodeValuesOnly: true, arrayFormat: 'comma' }), 'a=c%2Cd,e'); + s2t.equal(qs.stringify({ a: ['c,d', 'e'] }, { arrayFormat: 'comma' }), 'a=c%2Cd%2Ce'); + + s2t.equal(qs.stringify({ a: ['c,d', 'e'] }, { encodeValuesOnly: true, arrayFormat: 'comma', commaRoundTrip: true }), 'a=c%2Cd,e'); + s2t.equal(qs.stringify({ a: ['c,d', 'e'] }, { arrayFormat: 'comma', commaRoundTrip: true }), 'a=c%2Cd%2Ce'); + + s2t.end(); + }); + + st.end(); + }); + + t.test('stringifies a nested array value', function (st) { + st.equal(qs.stringify({ a: { b: ['c', 'd'] } }, { encodeValuesOnly: true, arrayFormat: 'indices' }), 'a[b][0]=c&a[b][1]=d'); + st.equal(qs.stringify({ a: { b: ['c', 'd'] } }, { encodeValuesOnly: true, arrayFormat: 'brackets' }), 'a[b][]=c&a[b][]=d'); + st.equal(qs.stringify({ a: { b: ['c', 'd'] } }, { encodeValuesOnly: true, arrayFormat: 'comma' }), 'a[b]=c,d'); + st.equal(qs.stringify({ a: { b: ['c', 'd'] } }, { encodeValuesOnly: true }), 'a[b][0]=c&a[b][1]=d'); + st.end(); + }); + + t.test('stringifies comma and empty array values', function (st) { + st.equal(qs.stringify({ a: [',', '', 'c,d%'] }, { encode: false, arrayFormat: 'indices' }), 'a[0]=,&a[1]=&a[2]=c,d%'); + st.equal(qs.stringify({ a: [',', '', 'c,d%'] }, { encode: false, arrayFormat: 'brackets' }), 'a[]=,&a[]=&a[]=c,d%'); + st.equal(qs.stringify({ a: [',', '', 'c,d%'] }, { encode: false, arrayFormat: 'comma' }), 'a=,,,c,d%'); + st.equal(qs.stringify({ a: [',', '', 'c,d%'] }, { encode: false, arrayFormat: 'repeat' }), 'a=,&a=&a=c,d%'); + + st.equal(qs.stringify({ a: [',', '', 'c,d%'] }, { encode: true, encodeValuesOnly: true, arrayFormat: 'indices' }), 'a[0]=%2C&a[1]=&a[2]=c%2Cd%25'); + st.equal(qs.stringify({ a: [',', '', 'c,d%'] }, { encode: true, encodeValuesOnly: true, arrayFormat: 'brackets' }), 'a[]=%2C&a[]=&a[]=c%2Cd%25'); + st.equal(qs.stringify({ a: [',', '', 'c,d%'] }, { encode: true, encodeValuesOnly: true, arrayFormat: 'comma' }), 'a=%2C,,c%2Cd%25'); + st.equal(qs.stringify({ a: [',', '', 'c,d%'] }, { encode: true, encodeValuesOnly: true, arrayFormat: 'repeat' }), 'a=%2C&a=&a=c%2Cd%25'); + + st.equal(qs.stringify({ a: [',', '', 'c,d%'] }, { encode: true, encodeValuesOnly: false, arrayFormat: 'indices' }), 'a%5B0%5D=%2C&a%5B1%5D=&a%5B2%5D=c%2Cd%25'); + st.equal(qs.stringify({ a: [',', '', 'c,d%'] }, { encode: true, encodeValuesOnly: false, arrayFormat: 'brackets' }), 'a%5B%5D=%2C&a%5B%5D=&a%5B%5D=c%2Cd%25'); + st.equal(qs.stringify({ a: [',', '', 'c,d%'] }, { encode: true, encodeValuesOnly: false, arrayFormat: 'comma' }), 'a=%2C%2C%2Cc%2Cd%25'); + st.equal(qs.stringify({ a: [',', '', 'c,d%'] }, { encode: true, encodeValuesOnly: false, arrayFormat: 'repeat' }), 'a=%2C&a=&a=c%2Cd%25'); + + st.end(); + }); + + t.test('stringifies comma and empty non-array values', function (st) { + st.equal(qs.stringify({ a: ',', b: '', c: 'c,d%' }, { encode: false, arrayFormat: 'indices' }), 'a=,&b=&c=c,d%'); + st.equal(qs.stringify({ a: ',', b: '', c: 'c,d%' }, { encode: false, arrayFormat: 'brackets' }), 'a=,&b=&c=c,d%'); + st.equal(qs.stringify({ a: ',', b: '', c: 'c,d%' }, { encode: false, arrayFormat: 'comma' }), 'a=,&b=&c=c,d%'); + st.equal(qs.stringify({ a: ',', b: '', c: 'c,d%' }, { encode: false, arrayFormat: 'repeat' }), 'a=,&b=&c=c,d%'); + + st.equal(qs.stringify({ a: ',', b: '', c: 'c,d%' }, { encode: true, encodeValuesOnly: true, arrayFormat: 'indices' }), 'a=%2C&b=&c=c%2Cd%25'); + st.equal(qs.stringify({ a: ',', b: '', c: 'c,d%' }, { encode: true, encodeValuesOnly: true, arrayFormat: 'brackets' }), 'a=%2C&b=&c=c%2Cd%25'); + st.equal(qs.stringify({ a: ',', b: '', c: 'c,d%' }, { encode: true, encodeValuesOnly: true, arrayFormat: 'comma' }), 'a=%2C&b=&c=c%2Cd%25'); + st.equal(qs.stringify({ a: ',', b: '', c: 'c,d%' }, { encode: true, encodeValuesOnly: true, arrayFormat: 'repeat' }), 'a=%2C&b=&c=c%2Cd%25'); + + st.equal(qs.stringify({ a: ',', b: '', c: 'c,d%' }, { encode: true, encodeValuesOnly: false, arrayFormat: 'indices' }), 'a=%2C&b=&c=c%2Cd%25'); + st.equal(qs.stringify({ a: ',', b: '', c: 'c,d%' }, { encode: true, encodeValuesOnly: false, arrayFormat: 'brackets' }), 'a=%2C&b=&c=c%2Cd%25'); + st.equal(qs.stringify({ a: ',', b: '', c: 'c,d%' }, { encode: true, encodeValuesOnly: false, arrayFormat: 'comma' }), 'a=%2C&b=&c=c%2Cd%25'); + st.equal(qs.stringify({ a: ',', b: '', c: 'c,d%' }, { encode: true, encodeValuesOnly: false, arrayFormat: 'repeat' }), 'a=%2C&b=&c=c%2Cd%25'); + + st.end(); + }); + + t.test('stringifies a nested array value with dots notation', function (st) { + st.equal( + qs.stringify( + { a: { b: ['c', 'd'] } }, + { allowDots: true, encodeValuesOnly: true, arrayFormat: 'indices' } + ), + 'a.b[0]=c&a.b[1]=d', + 'indices: stringifies with dots + indices' + ); + st.equal( + qs.stringify( + { a: { b: ['c', 'd'] } }, + { allowDots: true, encodeValuesOnly: true, arrayFormat: 'brackets' } + ), + 'a.b[]=c&a.b[]=d', + 'brackets: stringifies with dots + brackets' + ); + st.equal( + qs.stringify( + { a: { b: ['c', 'd'] } }, + { allowDots: true, encodeValuesOnly: true, arrayFormat: 'comma' } + ), + 'a.b=c,d', + 'comma: stringifies with dots + comma' + ); + st.equal( + qs.stringify( + { a: { b: ['c', 'd'] } }, + { allowDots: true, encodeValuesOnly: true } + ), + 'a.b[0]=c&a.b[1]=d', + 'default: stringifies with dots + indices' + ); + st.end(); + }); + + t.test('stringifies an object inside an array', function (st) { + st.equal( + qs.stringify({ a: [{ b: 'c' }] }, { arrayFormat: 'indices', encodeValuesOnly: true }), + 'a[0][b]=c', + 'indices => indices' + ); + st.equal( + qs.stringify({ a: [{ b: 'c' }] }, { arrayFormat: 'repeat', encodeValuesOnly: true }), + 'a[b]=c', + 'repeat => repeat' + ); + st.equal( + qs.stringify({ a: [{ b: 'c' }] }, { arrayFormat: 'brackets', encodeValuesOnly: true }), + 'a[][b]=c', + 'brackets => brackets' + ); + st.equal( + qs.stringify({ a: [{ b: 'c' }] }, { encodeValuesOnly: true }), + 'a[0][b]=c', + 'default => indices' + ); + + st.equal( + qs.stringify({ a: [{ b: { c: [1] } }] }, { arrayFormat: 'indices', encodeValuesOnly: true }), + 'a[0][b][c][0]=1', + 'indices => indices' + ); + st.equal( + qs.stringify({ a: [{ b: { c: [1] } }] }, { arrayFormat: 'repeat', encodeValuesOnly: true }), + 'a[b][c]=1', + 'repeat => repeat' + ); + st.equal( + qs.stringify({ a: [{ b: { c: [1] } }] }, { arrayFormat: 'brackets', encodeValuesOnly: true }), + 'a[][b][c][]=1', + 'brackets => brackets' + ); + st.equal( + qs.stringify({ a: [{ b: { c: [1] } }] }, { encodeValuesOnly: true }), + 'a[0][b][c][0]=1', + 'default => indices' + ); + + st.end(); + }); + + t.test('stringifies an array with mixed objects and primitives', function (st) { + st.equal( + qs.stringify({ a: [{ b: 1 }, 2, 3] }, { encodeValuesOnly: true, arrayFormat: 'indices' }), + 'a[0][b]=1&a[1]=2&a[2]=3', + 'indices => indices' + ); + st.equal( + qs.stringify({ a: [{ b: 1 }, 2, 3] }, { encodeValuesOnly: true, arrayFormat: 'brackets' }), + 'a[][b]=1&a[]=2&a[]=3', + 'brackets => brackets' + ); + st.equal( + qs.stringify({ a: [{ b: 1 }, 2, 3] }, { encodeValuesOnly: true, arrayFormat: 'comma' }), + '???', + 'brackets => brackets', + { skip: 'TODO: figure out what this should do' } + ); + st.equal( + qs.stringify({ a: [{ b: 1 }, 2, 3] }, { encodeValuesOnly: true }), + 'a[0][b]=1&a[1]=2&a[2]=3', + 'default => indices' + ); + + st.end(); + }); + + t.test('stringifies an object inside an array with dots notation', function (st) { + st.equal( + qs.stringify( + { a: [{ b: 'c' }] }, + { allowDots: true, encode: false, arrayFormat: 'indices' } + ), + 'a[0].b=c', + 'indices => indices' + ); + st.equal( + qs.stringify( + { a: [{ b: 'c' }] }, + { allowDots: true, encode: false, arrayFormat: 'brackets' } + ), + 'a[].b=c', + 'brackets => brackets' + ); + st.equal( + qs.stringify( + { a: [{ b: 'c' }] }, + { allowDots: true, encode: false } + ), + 'a[0].b=c', + 'default => indices' + ); + + st.equal( + qs.stringify( + { a: [{ b: { c: [1] } }] }, + { allowDots: true, encode: false, arrayFormat: 'indices' } + ), + 'a[0].b.c[0]=1', + 'indices => indices' + ); + st.equal( + qs.stringify( + { a: [{ b: { c: [1] } }] }, + { allowDots: true, encode: false, arrayFormat: 'brackets' } + ), + 'a[].b.c[]=1', + 'brackets => brackets' + ); + st.equal( + qs.stringify( + { a: [{ b: { c: [1] } }] }, + { allowDots: true, encode: false } + ), + 'a[0].b.c[0]=1', + 'default => indices' + ); + + st.end(); + }); + + t.test('does not omit object keys when indices = false', function (st) { + st.equal(qs.stringify({ a: [{ b: 'c' }] }, { indices: false }), 'a%5Bb%5D=c'); + st.end(); + }); + + t.test('uses indices notation for arrays when indices=true', function (st) { + st.equal(qs.stringify({ a: ['b', 'c'] }, { indices: true }), 'a%5B0%5D=b&a%5B1%5D=c'); + st.end(); + }); + + t.test('uses indices notation for arrays when no arrayFormat is specified', function (st) { + st.equal(qs.stringify({ a: ['b', 'c'] }), 'a%5B0%5D=b&a%5B1%5D=c'); + st.end(); + }); + + t.test('uses indices notation for arrays when arrayFormat=indices', function (st) { + st.equal(qs.stringify({ a: ['b', 'c'] }, { arrayFormat: 'indices' }), 'a%5B0%5D=b&a%5B1%5D=c'); + st.end(); + }); + + t.test('uses repeat notation for arrays when arrayFormat=repeat', function (st) { + st.equal(qs.stringify({ a: ['b', 'c'] }, { arrayFormat: 'repeat' }), 'a=b&a=c'); + st.end(); + }); + + t.test('uses brackets notation for arrays when arrayFormat=brackets', function (st) { + st.equal(qs.stringify({ a: ['b', 'c'] }, { arrayFormat: 'brackets' }), 'a%5B%5D=b&a%5B%5D=c'); + st.end(); + }); + + t.test('stringifies a complicated object', function (st) { + st.equal(qs.stringify({ a: { b: 'c', d: 'e' } }), 'a%5Bb%5D=c&a%5Bd%5D=e'); + st.end(); + }); + + t.test('stringifies an empty value', function (st) { + st.equal(qs.stringify({ a: '' }), 'a='); + st.equal(qs.stringify({ a: null }, { strictNullHandling: true }), 'a'); + + st.equal(qs.stringify({ a: '', b: '' }), 'a=&b='); + st.equal(qs.stringify({ a: null, b: '' }, { strictNullHandling: true }), 'a&b='); + + st.equal(qs.stringify({ a: { b: '' } }), 'a%5Bb%5D='); + st.equal(qs.stringify({ a: { b: null } }, { strictNullHandling: true }), 'a%5Bb%5D'); + st.equal(qs.stringify({ a: { b: null } }, { strictNullHandling: false }), 'a%5Bb%5D='); + + st.end(); + }); + + t.test('stringifies an empty array in different arrayFormat', function (st) { + st.equal(qs.stringify({ a: [], b: [null], c: 'c' }, { encode: false }), 'b[0]=&c=c'); + // arrayFormat default + st.equal(qs.stringify({ a: [], b: [null], c: 'c' }, { encode: false, arrayFormat: 'indices' }), 'b[0]=&c=c'); + st.equal(qs.stringify({ a: [], b: [null], c: 'c' }, { encode: false, arrayFormat: 'brackets' }), 'b[]=&c=c'); + st.equal(qs.stringify({ a: [], b: [null], c: 'c' }, { encode: false, arrayFormat: 'repeat' }), 'b=&c=c'); + st.equal(qs.stringify({ a: [], b: [null], c: 'c' }, { encode: false, arrayFormat: 'comma' }), 'b=&c=c'); + st.equal(qs.stringify({ a: [], b: [null], c: 'c' }, { encode: false, arrayFormat: 'comma', commaRoundTrip: true }), 'b[]=&c=c'); + // with strictNullHandling + st.equal(qs.stringify({ a: [], b: [null], c: 'c' }, { encode: false, arrayFormat: 'indices', strictNullHandling: true }), 'b[0]&c=c'); + st.equal(qs.stringify({ a: [], b: [null], c: 'c' }, { encode: false, arrayFormat: 'brackets', strictNullHandling: true }), 'b[]&c=c'); + st.equal(qs.stringify({ a: [], b: [null], c: 'c' }, { encode: false, arrayFormat: 'repeat', strictNullHandling: true }), 'b&c=c'); + st.equal(qs.stringify({ a: [], b: [null], c: 'c' }, { encode: false, arrayFormat: 'comma', strictNullHandling: true }), 'b&c=c'); + st.equal(qs.stringify({ a: [], b: [null], c: 'c' }, { encode: false, arrayFormat: 'comma', strictNullHandling: true, commaRoundTrip: true }), 'b[]&c=c'); + // with skipNulls + st.equal(qs.stringify({ a: [], b: [null], c: 'c' }, { encode: false, arrayFormat: 'indices', skipNulls: true }), 'c=c'); + st.equal(qs.stringify({ a: [], b: [null], c: 'c' }, { encode: false, arrayFormat: 'brackets', skipNulls: true }), 'c=c'); + st.equal(qs.stringify({ a: [], b: [null], c: 'c' }, { encode: false, arrayFormat: 'repeat', skipNulls: true }), 'c=c'); + st.equal(qs.stringify({ a: [], b: [null], c: 'c' }, { encode: false, arrayFormat: 'comma', skipNulls: true }), 'c=c'); + + st.end(); + }); + + t.test('stringifies a null object', { skip: !hasProto }, function (st) { + st.equal(qs.stringify({ __proto__: null, a: 'b' }), 'a=b'); + st.end(); + }); + + t.test('returns an empty string for invalid input', function (st) { + st.equal(qs.stringify(undefined), ''); + st.equal(qs.stringify(false), ''); + st.equal(qs.stringify(null), ''); + st.equal(qs.stringify(''), ''); + st.end(); + }); + + t.test('stringifies an object with a null object as a child', { skip: !hasProto }, function (st) { + st.equal(qs.stringify({ a: { __proto__: null, b: 'c' } }), 'a%5Bb%5D=c'); + st.end(); + }); + + t.test('drops keys with a value of undefined', function (st) { + st.equal(qs.stringify({ a: undefined }), ''); + + st.equal(qs.stringify({ a: { b: undefined, c: null } }, { strictNullHandling: true }), 'a%5Bc%5D'); + st.equal(qs.stringify({ a: { b: undefined, c: null } }, { strictNullHandling: false }), 'a%5Bc%5D='); + st.equal(qs.stringify({ a: { b: undefined, c: '' } }), 'a%5Bc%5D='); + st.end(); + }); + + t.test('url encodes values', function (st) { + st.equal(qs.stringify({ a: 'b c' }), 'a=b%20c'); + st.end(); + }); + + t.test('stringifies a date', function (st) { + var now = new Date(); + var str = 'a=' + encodeURIComponent(now.toISOString()); + st.equal(qs.stringify({ a: now }), str); + st.end(); + }); + + t.test('stringifies the weird object from qs', function (st) { + st.equal(qs.stringify({ 'my weird field': '~q1!2"\'w$5&7/z8)?' }), 'my%20weird%20field=~q1%212%22%27w%245%267%2Fz8%29%3F'); + st.end(); + }); + + t.test('skips properties that are part of the object prototype', function (st) { + st.intercept(Object.prototype, 'crash', { value: 'test' }); + + st.equal(qs.stringify({ a: 'b' }), 'a=b'); + st.equal(qs.stringify({ a: { b: 'c' } }), 'a%5Bb%5D=c'); + + st.end(); + }); + + t.test('stringifies boolean values', function (st) { + st.equal(qs.stringify({ a: true }), 'a=true'); + st.equal(qs.stringify({ a: { b: true } }), 'a%5Bb%5D=true'); + st.equal(qs.stringify({ b: false }), 'b=false'); + st.equal(qs.stringify({ b: { c: false } }), 'b%5Bc%5D=false'); + st.end(); + }); + + t.test('stringifies buffer values', function (st) { + st.equal(qs.stringify({ a: SaferBuffer.from('test') }), 'a=test'); + st.equal(qs.stringify({ a: { b: SaferBuffer.from('test') } }), 'a%5Bb%5D=test'); + st.end(); + }); + + t.test('stringifies an object using an alternative delimiter', function (st) { + st.equal(qs.stringify({ a: 'b', c: 'd' }, { delimiter: ';' }), 'a=b;c=d'); + st.end(); + }); + + t.test('does not blow up when Buffer global is missing', function (st) { + var restore = mockProperty(global, 'Buffer', { 'delete': true }); + + var result = qs.stringify({ a: 'b', c: 'd' }); + + restore(); + + st.equal(result, 'a=b&c=d'); + st.end(); + }); + + t.test('does not crash when parsing circular references', function (st) { + var a = {}; + a.b = a; + + st['throws']( + function () { qs.stringify({ 'foo[bar]': 'baz', 'foo[baz]': a }); }, + /RangeError: Cyclic object value/, + 'cyclic values throw' + ); + + var circular = { + a: 'value' + }; + circular.a = circular; + st['throws']( + function () { qs.stringify(circular); }, + /RangeError: Cyclic object value/, + 'cyclic values throw' + ); + + var arr = ['a']; + st.doesNotThrow( + function () { qs.stringify({ x: arr, y: arr }); }, + 'non-cyclic values do not throw' + ); + + st.end(); + }); + + t.test('non-circular duplicated references can still work', function (st) { + var hourOfDay = { + 'function': 'hour_of_day' + }; + + var p1 = { + 'function': 'gte', + arguments: [hourOfDay, 0] + }; + var p2 = { + 'function': 'lte', + arguments: [hourOfDay, 23] + }; + + st.equal( + qs.stringify({ filters: { $and: [p1, p2] } }, { encodeValuesOnly: true, arrayFormat: 'indices' }), + 'filters[$and][0][function]=gte&filters[$and][0][arguments][0][function]=hour_of_day&filters[$and][0][arguments][1]=0&filters[$and][1][function]=lte&filters[$and][1][arguments][0][function]=hour_of_day&filters[$and][1][arguments][1]=23' + ); + st.equal( + qs.stringify({ filters: { $and: [p1, p2] } }, { encodeValuesOnly: true, arrayFormat: 'brackets' }), + 'filters[$and][][function]=gte&filters[$and][][arguments][][function]=hour_of_day&filters[$and][][arguments][]=0&filters[$and][][function]=lte&filters[$and][][arguments][][function]=hour_of_day&filters[$and][][arguments][]=23' + ); + st.equal( + qs.stringify({ filters: { $and: [p1, p2] } }, { encodeValuesOnly: true, arrayFormat: 'repeat' }), + 'filters[$and][function]=gte&filters[$and][arguments][function]=hour_of_day&filters[$and][arguments]=0&filters[$and][function]=lte&filters[$and][arguments][function]=hour_of_day&filters[$and][arguments]=23' + ); + + st.end(); + }); + + t.test('selects properties when filter=array', function (st) { + st.equal(qs.stringify({ a: 'b' }, { filter: ['a'] }), 'a=b'); + st.equal(qs.stringify({ a: 1 }, { filter: [] }), ''); + + st.equal( + qs.stringify( + { a: { b: [1, 2, 3, 4], c: 'd' }, c: 'f' }, + { filter: ['a', 'b', 0, 2], arrayFormat: 'indices' } + ), + 'a%5Bb%5D%5B0%5D=1&a%5Bb%5D%5B2%5D=3', + 'indices => indices' + ); + st.equal( + qs.stringify( + { a: { b: [1, 2, 3, 4], c: 'd' }, c: 'f' }, + { filter: ['a', 'b', 0, 2], arrayFormat: 'brackets' } + ), + 'a%5Bb%5D%5B%5D=1&a%5Bb%5D%5B%5D=3', + 'brackets => brackets' + ); + st.equal( + qs.stringify( + { a: { b: [1, 2, 3, 4], c: 'd' }, c: 'f' }, + { filter: ['a', 'b', 0, 2] } + ), + 'a%5Bb%5D%5B0%5D=1&a%5Bb%5D%5B2%5D=3', + 'default => indices' + ); + + st.end(); + }); + + t.test('supports custom representations when filter=function', function (st) { + var calls = 0; + var obj = { a: 'b', c: 'd', e: { f: new Date(1257894000000) } }; + var filterFunc = function (prefix, value) { + calls += 1; + if (calls === 1) { + st.equal(prefix, '', 'prefix is empty'); + st.equal(value, obj); + } else if (prefix === 'c') { + return void 0; + } else if (value instanceof Date) { + st.equal(prefix, 'e[f]'); + return value.getTime(); + } + return value; + }; + + st.equal(qs.stringify(obj, { filter: filterFunc }), 'a=b&e%5Bf%5D=1257894000000'); + st.equal(calls, 5); + st.end(); + }); + + t.test('can disable uri encoding', function (st) { + st.equal(qs.stringify({ a: 'b' }, { encode: false }), 'a=b'); + st.equal(qs.stringify({ a: { b: 'c' } }, { encode: false }), 'a[b]=c'); + st.equal(qs.stringify({ a: 'b', c: null }, { strictNullHandling: true, encode: false }), 'a=b&c'); + st.end(); + }); + + t.test('can sort the keys', function (st) { + var sort = function (a, b) { + return a.localeCompare(b); + }; + st.equal(qs.stringify({ a: 'c', z: 'y', b: 'f' }, { sort: sort }), 'a=c&b=f&z=y'); + st.equal(qs.stringify({ a: 'c', z: { j: 'a', i: 'b' }, b: 'f' }, { sort: sort }), 'a=c&b=f&z%5Bi%5D=b&z%5Bj%5D=a'); + st.end(); + }); + + t.test('can sort the keys at depth 3 or more too', function (st) { + var sort = function (a, b) { + return a.localeCompare(b); + }; + st.equal( + qs.stringify( + { a: 'a', z: { zj: { zjb: 'zjb', zja: 'zja' }, zi: { zib: 'zib', zia: 'zia' } }, b: 'b' }, + { sort: sort, encode: false } + ), + 'a=a&b=b&z[zi][zia]=zia&z[zi][zib]=zib&z[zj][zja]=zja&z[zj][zjb]=zjb' + ); + st.equal( + qs.stringify( + { a: 'a', z: { zj: { zjb: 'zjb', zja: 'zja' }, zi: { zib: 'zib', zia: 'zia' } }, b: 'b' }, + { sort: null, encode: false } + ), + 'a=a&z[zj][zjb]=zjb&z[zj][zja]=zja&z[zi][zib]=zib&z[zi][zia]=zia&b=b' + ); + st.end(); + }); + + t.test('can stringify with custom encoding', function (st) { + st.equal(qs.stringify({ 県: '大阪府', '': '' }, { + encoder: function (str) { + if (str.length === 0) { + return ''; + } + var buf = iconv.encode(str, 'shiftjis'); + var result = []; + for (var i = 0; i < buf.length; ++i) { + result.push(buf.readUInt8(i).toString(16)); + } + return '%' + result.join('%'); + } + }), '%8c%a7=%91%e5%8d%e3%95%7b&='); + st.end(); + }); + + t.test('receives the default encoder as a second argument', function (st) { + st.plan(8); + + qs.stringify({ a: 1, b: new Date(), c: true, d: [1] }, { + encoder: function (str) { + st.match(typeof str, /^(?:string|number|boolean)$/); + return ''; + } + }); + + st.end(); + }); + + t.test('receives the default encoder as a second argument', function (st) { + st.plan(2); + + qs.stringify({ a: 1 }, { + encoder: function (str, defaultEncoder) { + st.equal(defaultEncoder, utils.encode); + } + }); + + st.end(); + }); + + t.test('throws error with wrong encoder', function (st) { + st['throws'](function () { + qs.stringify({}, { encoder: 'string' }); + }, new TypeError('Encoder has to be a function.')); + st.end(); + }); + + t.test('can use custom encoder for a buffer object', { skip: typeof Buffer === 'undefined' }, function (st) { + st.equal(qs.stringify({ a: SaferBuffer.from([1]) }, { + encoder: function (buffer) { + if (typeof buffer === 'string') { + return buffer; + } + return String.fromCharCode(buffer.readUInt8(0) + 97); + } + }), 'a=b'); + + st.equal(qs.stringify({ a: SaferBuffer.from('a b') }, { + encoder: function (buffer) { + return buffer; + } + }), 'a=a b'); + st.end(); + }); + + t.test('serializeDate option', function (st) { + var date = new Date(); + st.equal( + qs.stringify({ a: date }), + 'a=' + date.toISOString().replace(/:/g, '%3A'), + 'default is toISOString' + ); + + var mutatedDate = new Date(); + mutatedDate.toISOString = function () { + throw new SyntaxError(); + }; + st['throws'](function () { + mutatedDate.toISOString(); + }, SyntaxError); + st.equal( + qs.stringify({ a: mutatedDate }), + 'a=' + Date.prototype.toISOString.call(mutatedDate).replace(/:/g, '%3A'), + 'toISOString works even when method is not locally present' + ); + + var specificDate = new Date(6); + st.equal( + qs.stringify( + { a: specificDate }, + { serializeDate: function (d) { return d.getTime() * 7; } } + ), + 'a=42', + 'custom serializeDate function called' + ); + + st.equal( + qs.stringify( + { a: [date] }, + { + serializeDate: function (d) { return d.getTime(); }, + arrayFormat: 'comma' + } + ), + 'a=' + date.getTime(), + 'works with arrayFormat comma' + ); + st.equal( + qs.stringify( + { a: [date] }, + { + serializeDate: function (d) { return d.getTime(); }, + arrayFormat: 'comma', + commaRoundTrip: true + } + ), + 'a%5B%5D=' + date.getTime(), + 'works with arrayFormat comma' + ); + + st.end(); + }); + + t.test('RFC 1738 serialization', function (st) { + st.equal(qs.stringify({ a: 'b c' }, { format: qs.formats.RFC1738 }), 'a=b+c'); + st.equal(qs.stringify({ 'a b': 'c d' }, { format: qs.formats.RFC1738 }), 'a+b=c+d'); + st.equal(qs.stringify({ 'a b': SaferBuffer.from('a b') }, { format: qs.formats.RFC1738 }), 'a+b=a+b'); + + st.equal(qs.stringify({ 'foo(ref)': 'bar' }, { format: qs.formats.RFC1738 }), 'foo(ref)=bar'); + + st.end(); + }); + + t.test('RFC 3986 spaces serialization', function (st) { + st.equal(qs.stringify({ a: 'b c' }, { format: qs.formats.RFC3986 }), 'a=b%20c'); + st.equal(qs.stringify({ 'a b': 'c d' }, { format: qs.formats.RFC3986 }), 'a%20b=c%20d'); + st.equal(qs.stringify({ 'a b': SaferBuffer.from('a b') }, { format: qs.formats.RFC3986 }), 'a%20b=a%20b'); + + st.end(); + }); + + t.test('Backward compatibility to RFC 3986', function (st) { + st.equal(qs.stringify({ a: 'b c' }), 'a=b%20c'); + st.equal(qs.stringify({ 'a b': SaferBuffer.from('a b') }), 'a%20b=a%20b'); + + st.end(); + }); + + t.test('Edge cases and unknown formats', function (st) { + ['UFO1234', false, 1234, null, {}, []].forEach(function (format) { + st['throws']( + function () { + qs.stringify({ a: 'b c' }, { format: format }); + }, + new TypeError('Unknown format option provided.') + ); + }); + st.end(); + }); + + t.test('encodeValuesOnly', function (st) { + st.equal( + qs.stringify( + { a: 'b', c: ['d', 'e=f'], f: [['g'], ['h']] }, + { encodeValuesOnly: true, arrayFormat: 'indices' } + ), + 'a=b&c[0]=d&c[1]=e%3Df&f[0][0]=g&f[1][0]=h', + 'encodeValuesOnly + indices' + ); + st.equal( + qs.stringify( + { a: 'b', c: ['d', 'e=f'], f: [['g'], ['h']] }, + { encodeValuesOnly: true, arrayFormat: 'brackets' } + ), + 'a=b&c[]=d&c[]=e%3Df&f[][]=g&f[][]=h', + 'encodeValuesOnly + brackets' + ); + st.equal( + qs.stringify( + { a: 'b', c: ['d', 'e=f'], f: [['g'], ['h']] }, + { encodeValuesOnly: true, arrayFormat: 'repeat' } + ), + 'a=b&c=d&c=e%3Df&f=g&f=h', + 'encodeValuesOnly + repeat' + ); + + st.equal( + qs.stringify( + { a: 'b', c: ['d', 'e'], f: [['g'], ['h']] }, + { arrayFormat: 'indices' } + ), + 'a=b&c%5B0%5D=d&c%5B1%5D=e&f%5B0%5D%5B0%5D=g&f%5B1%5D%5B0%5D=h', + 'no encodeValuesOnly + indices' + ); + st.equal( + qs.stringify( + { a: 'b', c: ['d', 'e'], f: [['g'], ['h']] }, + { arrayFormat: 'brackets' } + ), + 'a=b&c%5B%5D=d&c%5B%5D=e&f%5B%5D%5B%5D=g&f%5B%5D%5B%5D=h', + 'no encodeValuesOnly + brackets' + ); + st.equal( + qs.stringify( + { a: 'b', c: ['d', 'e'], f: [['g'], ['h']] }, + { arrayFormat: 'repeat' } + ), + 'a=b&c=d&c=e&f=g&f=h', + 'no encodeValuesOnly + repeat' + ); + + st.end(); + }); + + t.test('encodeValuesOnly - strictNullHandling', function (st) { + st.equal( + qs.stringify( + { a: { b: null } }, + { encodeValuesOnly: true, strictNullHandling: true } + ), + 'a[b]' + ); + st.end(); + }); + + t.test('throws if an invalid charset is specified', function (st) { + st['throws'](function () { + qs.stringify({ a: 'b' }, { charset: 'foobar' }); + }, new TypeError('The charset option must be either utf-8, iso-8859-1, or undefined')); + st.end(); + }); + + t.test('respects a charset of iso-8859-1', function (st) { + st.equal(qs.stringify({ æ: 'æ' }, { charset: 'iso-8859-1' }), '%E6=%E6'); + st.end(); + }); + + t.test('encodes unrepresentable chars as numeric entities in iso-8859-1 mode', function (st) { + st.equal(qs.stringify({ a: '☺' }, { charset: 'iso-8859-1' }), 'a=%26%239786%3B'); + st.end(); + }); + + t.test('respects an explicit charset of utf-8 (the default)', function (st) { + st.equal(qs.stringify({ a: 'æ' }, { charset: 'utf-8' }), 'a=%C3%A6'); + st.end(); + }); + + t.test('`charsetSentinel` option', function (st) { + st.equal( + qs.stringify({ a: 'æ' }, { charsetSentinel: true, charset: 'utf-8' }), + 'utf8=%E2%9C%93&a=%C3%A6', + 'adds the right sentinel when instructed to and the charset is utf-8' + ); + + st.equal( + qs.stringify({ a: 'æ' }, { charsetSentinel: true, charset: 'iso-8859-1' }), + 'utf8=%26%2310003%3B&a=%E6', + 'adds the right sentinel when instructed to and the charset is iso-8859-1' + ); + + st.end(); + }); + + t.test('does not mutate the options argument', function (st) { + var options = {}; + qs.stringify({}, options); + st.deepEqual(options, {}); + st.end(); + }); + + t.test('strictNullHandling works with custom filter', function (st) { + var filter = function (prefix, value) { + return value; + }; + + var options = { strictNullHandling: true, filter: filter }; + st.equal(qs.stringify({ key: null }, options), 'key'); + st.end(); + }); + + t.test('strictNullHandling works with null serializeDate', function (st) { + var serializeDate = function () { + return null; + }; + var options = { strictNullHandling: true, serializeDate: serializeDate }; + var date = new Date(); + st.equal(qs.stringify({ key: date }, options), 'key'); + st.end(); + }); + + t.test('allows for encoding keys and values differently', function (st) { + var encoder = function (str, defaultEncoder, charset, type) { + if (type === 'key') { + return defaultEncoder(str, defaultEncoder, charset, type).toLowerCase(); + } + if (type === 'value') { + return defaultEncoder(str, defaultEncoder, charset, type).toUpperCase(); + } + throw 'this should never happen! type: ' + type; + }; + + st.deepEqual(qs.stringify({ KeY: 'vAlUe' }, { encoder: encoder }), 'key=VALUE'); + st.end(); + }); + + t.test('objects inside arrays', function (st) { + var obj = { a: { b: { c: 'd', e: 'f' } } }; + var withArray = { a: { b: [{ c: 'd', e: 'f' }] } }; + + st.equal(qs.stringify(obj, { encode: false }), 'a[b][c]=d&a[b][e]=f', 'no array, no arrayFormat'); + st.equal(qs.stringify(obj, { encode: false, arrayFormat: 'brackets' }), 'a[b][c]=d&a[b][e]=f', 'no array, bracket'); + st.equal(qs.stringify(obj, { encode: false, arrayFormat: 'indices' }), 'a[b][c]=d&a[b][e]=f', 'no array, indices'); + st.equal(qs.stringify(obj, { encode: false, arrayFormat: 'repeat' }), 'a[b][c]=d&a[b][e]=f', 'no array, repeat'); + st.equal(qs.stringify(obj, { encode: false, arrayFormat: 'comma' }), 'a[b][c]=d&a[b][e]=f', 'no array, comma'); + + st.equal(qs.stringify(withArray, { encode: false }), 'a[b][0][c]=d&a[b][0][e]=f', 'array, no arrayFormat'); + st.equal(qs.stringify(withArray, { encode: false, arrayFormat: 'brackets' }), 'a[b][][c]=d&a[b][][e]=f', 'array, bracket'); + st.equal(qs.stringify(withArray, { encode: false, arrayFormat: 'indices' }), 'a[b][0][c]=d&a[b][0][e]=f', 'array, indices'); + st.equal(qs.stringify(withArray, { encode: false, arrayFormat: 'repeat' }), 'a[b][c]=d&a[b][e]=f', 'array, repeat'); + st.equal( + qs.stringify(withArray, { encode: false, arrayFormat: 'comma' }), + '???', + 'array, comma', + { skip: 'TODO: figure out what this should do' } + ); + + st.end(); + }); + + t.test('stringifies sparse arrays', function (st) { + /* eslint no-sparse-arrays: 0 */ + st.equal(qs.stringify({ a: [, '2', , , '1'] }, { encodeValuesOnly: true, arrayFormat: 'indices' }), 'a[1]=2&a[4]=1'); + st.equal(qs.stringify({ a: [, '2', , , '1'] }, { encodeValuesOnly: true, arrayFormat: 'brackets' }), 'a[]=2&a[]=1'); + st.equal(qs.stringify({ a: [, '2', , , '1'] }, { encodeValuesOnly: true, arrayFormat: 'repeat' }), 'a=2&a=1'); + + st.equal(qs.stringify({ a: [, { b: [, , { c: '1' }] }] }, { encodeValuesOnly: true, arrayFormat: 'indices' }), 'a[1][b][2][c]=1'); + st.equal(qs.stringify({ a: [, { b: [, , { c: '1' }] }] }, { encodeValuesOnly: true, arrayFormat: 'brackets' }), 'a[][b][][c]=1'); + st.equal(qs.stringify({ a: [, { b: [, , { c: '1' }] }] }, { encodeValuesOnly: true, arrayFormat: 'repeat' }), 'a[b][c]=1'); + + st.equal(qs.stringify({ a: [, [, , [, , , { c: '1' }]]] }, { encodeValuesOnly: true, arrayFormat: 'indices' }), 'a[1][2][3][c]=1'); + st.equal(qs.stringify({ a: [, [, , [, , , { c: '1' }]]] }, { encodeValuesOnly: true, arrayFormat: 'brackets' }), 'a[][][][c]=1'); + st.equal(qs.stringify({ a: [, [, , [, , , { c: '1' }]]] }, { encodeValuesOnly: true, arrayFormat: 'repeat' }), 'a[c]=1'); + + st.equal(qs.stringify({ a: [, [, , [, , , { c: [, '1'] }]]] }, { encodeValuesOnly: true, arrayFormat: 'indices' }), 'a[1][2][3][c][1]=1'); + st.equal(qs.stringify({ a: [, [, , [, , , { c: [, '1'] }]]] }, { encodeValuesOnly: true, arrayFormat: 'brackets' }), 'a[][][][c][]=1'); + st.equal(qs.stringify({ a: [, [, , [, , , { c: [, '1'] }]]] }, { encodeValuesOnly: true, arrayFormat: 'repeat' }), 'a[c]=1'); + + st.end(); + }); + + t.test('encodes a very long string', function (st) { + var chars = []; + var expected = []; + for (var i = 0; i < 5e3; i++) { + chars.push(' ' + i); + + expected.push('%20' + i); + } + + var obj = { + foo: chars.join('') + }; + + st.equal( + qs.stringify(obj, { arrayFormat: 'brackets', charset: 'utf-8' }), + 'foo=' + expected.join('') + ); + + st.end(); + }); + + t.end(); +}); + +test('stringifies empty keys', function (t) { + emptyTestCases.forEach(function (testCase) { + t.test('stringifies an object with empty string key with ' + testCase.input, function (st) { + st.deepEqual( + qs.stringify(testCase.withEmptyKeys, { encode: false, arrayFormat: 'indices' }), + testCase.stringifyOutput.indices, + 'test case: ' + testCase.input + ', indices' + ); + st.deepEqual( + qs.stringify(testCase.withEmptyKeys, { encode: false, arrayFormat: 'brackets' }), + testCase.stringifyOutput.brackets, + 'test case: ' + testCase.input + ', brackets' + ); + st.deepEqual( + qs.stringify(testCase.withEmptyKeys, { encode: false, arrayFormat: 'repeat' }), + testCase.stringifyOutput.repeat, + 'test case: ' + testCase.input + ', repeat' + ); + + st.end(); + }); + }); + + t.test('edge case with object/arrays', function (st) { + st.deepEqual(qs.stringify({ '': { '': [2, 3] } }, { encode: false }), '[][0]=2&[][1]=3'); + st.deepEqual(qs.stringify({ '': { '': [2, 3], a: 2 } }, { encode: false }), '[][0]=2&[][1]=3&[a]=2'); + st.deepEqual(qs.stringify({ '': { '': [2, 3] } }, { encode: false, arrayFormat: 'indices' }), '[][0]=2&[][1]=3'); + st.deepEqual(qs.stringify({ '': { '': [2, 3], a: 2 } }, { encode: false, arrayFormat: 'indices' }), '[][0]=2&[][1]=3&[a]=2'); + + st.end(); + }); + + t.test('stringifies non-string keys', function (st) { + var actual = qs.stringify({ a: 'b', 'false': {} }, { + filter: ['a', false, null], + allowDots: true, + encodeDotInKeys: true + }); + + st.equal(actual, 'a=b', 'stringifies correctly'); + + st.end(); + }); +}); diff --git a/node_modules/body-parser/node_modules/qs/test/utils.js b/node_modules/body-parser/node_modules/qs/test/utils.js new file mode 100644 index 0000000..3933516 --- /dev/null +++ b/node_modules/body-parser/node_modules/qs/test/utils.js @@ -0,0 +1,262 @@ +'use strict'; + +var test = require('tape'); +var inspect = require('object-inspect'); +var SaferBuffer = require('safer-buffer').Buffer; +var forEach = require('for-each'); +var v = require('es-value-fixtures'); + +var utils = require('../lib/utils'); + +test('merge()', function (t) { + t.deepEqual(utils.merge(null, true), [null, true], 'merges true into null'); + + t.deepEqual(utils.merge(null, [42]), [null, 42], 'merges null into an array'); + + t.deepEqual(utils.merge({ a: 'b' }, { a: 'c' }), { a: ['b', 'c'] }, 'merges two objects with the same key'); + + var oneMerged = utils.merge({ foo: 'bar' }, { foo: { first: '123' } }); + t.deepEqual(oneMerged, { foo: ['bar', { first: '123' }] }, 'merges a standalone and an object into an array'); + + var twoMerged = utils.merge({ foo: ['bar', { first: '123' }] }, { foo: { second: '456' } }); + t.deepEqual(twoMerged, { foo: { 0: 'bar', 1: { first: '123' }, second: '456' } }, 'merges a standalone and two objects into an array'); + + var sandwiched = utils.merge({ foo: ['bar', { first: '123', second: '456' }] }, { foo: 'baz' }); + t.deepEqual(sandwiched, { foo: ['bar', { first: '123', second: '456' }, 'baz'] }, 'merges an object sandwiched by two standalones into an array'); + + var nestedArrays = utils.merge({ foo: ['baz'] }, { foo: ['bar', 'xyzzy'] }); + t.deepEqual(nestedArrays, { foo: ['baz', 'bar', 'xyzzy'] }); + + var noOptionsNonObjectSource = utils.merge({ foo: 'baz' }, 'bar'); + t.deepEqual(noOptionsNonObjectSource, { foo: 'baz', bar: true }); + + var func = function f() {}; + t.deepEqual( + utils.merge(func, { foo: 'bar' }), + [func, { foo: 'bar' }], + 'functions can not be merged into' + ); + + func.bar = 'baz'; + t.deepEqual( + utils.merge({ foo: 'bar' }, func), + { foo: 'bar', bar: 'baz' }, + 'functions can be merge sources' + ); + + t.test( + 'avoids invoking array setters unnecessarily', + { skip: typeof Object.defineProperty !== 'function' }, + function (st) { + var setCount = 0; + var getCount = 0; + var observed = []; + Object.defineProperty(observed, 0, { + get: function () { + getCount += 1; + return { bar: 'baz' }; + }, + set: function () { setCount += 1; } + }); + utils.merge(observed, [null]); + st.equal(setCount, 0); + st.equal(getCount, 1); + observed[0] = observed[0]; // eslint-disable-line no-self-assign + st.equal(setCount, 1); + st.equal(getCount, 2); + st.end(); + } + ); + + t.end(); +}); + +test('assign()', function (t) { + var target = { a: 1, b: 2 }; + var source = { b: 3, c: 4 }; + var result = utils.assign(target, source); + + t.equal(result, target, 'returns the target'); + t.deepEqual(target, { a: 1, b: 3, c: 4 }, 'target and source are merged'); + t.deepEqual(source, { b: 3, c: 4 }, 'source is untouched'); + + t.end(); +}); + +test('combine()', function (t) { + t.test('both arrays', function (st) { + var a = [1]; + var b = [2]; + var combined = utils.combine(a, b); + + st.deepEqual(a, [1], 'a is not mutated'); + st.deepEqual(b, [2], 'b is not mutated'); + st.notEqual(a, combined, 'a !== combined'); + st.notEqual(b, combined, 'b !== combined'); + st.deepEqual(combined, [1, 2], 'combined is a + b'); + + st.end(); + }); + + t.test('one array, one non-array', function (st) { + var aN = 1; + var a = [aN]; + var bN = 2; + var b = [bN]; + + var combinedAnB = utils.combine(aN, b); + st.deepEqual(b, [bN], 'b is not mutated'); + st.notEqual(aN, combinedAnB, 'aN + b !== aN'); + st.notEqual(a, combinedAnB, 'aN + b !== a'); + st.notEqual(bN, combinedAnB, 'aN + b !== bN'); + st.notEqual(b, combinedAnB, 'aN + b !== b'); + st.deepEqual([1, 2], combinedAnB, 'first argument is array-wrapped when not an array'); + + var combinedABn = utils.combine(a, bN); + st.deepEqual(a, [aN], 'a is not mutated'); + st.notEqual(aN, combinedABn, 'a + bN !== aN'); + st.notEqual(a, combinedABn, 'a + bN !== a'); + st.notEqual(bN, combinedABn, 'a + bN !== bN'); + st.notEqual(b, combinedABn, 'a + bN !== b'); + st.deepEqual([1, 2], combinedABn, 'second argument is array-wrapped when not an array'); + + st.end(); + }); + + t.test('neither is an array', function (st) { + var combined = utils.combine(1, 2); + st.notEqual(1, combined, '1 + 2 !== 1'); + st.notEqual(2, combined, '1 + 2 !== 2'); + st.deepEqual([1, 2], combined, 'both arguments are array-wrapped when not an array'); + + st.end(); + }); + + t.end(); +}); + +test('decode', function (t) { + t.equal( + utils.decode('a+b'), + 'a b', + 'decodes + to space' + ); + + t.equal( + utils.decode('name%2Eobj'), + 'name.obj', + 'decodes a string' + ); + t.equal( + utils.decode('name%2Eobj%2Efoo', null, 'iso-8859-1'), + 'name.obj.foo', + 'decodes a string in iso-8859-1' + ); + + t.end(); +}); + +test('encode', function (t) { + forEach(v.nullPrimitives, function (nullish) { + t['throws']( + function () { utils.encode(nullish); }, + TypeError, + inspect(nullish) + ' is not a string' + ); + }); + + t.equal(utils.encode(''), '', 'empty string returns itself'); + t.deepEqual(utils.encode([]), [], 'empty array returns itself'); + t.deepEqual(utils.encode({ length: 0 }), { length: 0 }, 'empty arraylike returns itself'); + + t.test('symbols', { skip: !v.hasSymbols }, function (st) { + st.equal(utils.encode(Symbol('x')), 'Symbol%28x%29', 'symbol is encoded'); + + st.end(); + }); + + t.equal( + utils.encode('(abc)'), + '%28abc%29', + 'encodes parentheses' + ); + t.equal( + utils.encode({ toString: function () { return '(abc)'; } }), + '%28abc%29', + 'toStrings and encodes parentheses' + ); + + t.equal( + utils.encode('abc 123 💩', null, 'iso-8859-1'), + 'abc%20123%20%26%2355357%3B%26%2356489%3B', + 'encodes in iso-8859-1' + ); + + var longString = ''; + var expectedString = ''; + for (var i = 0; i < 1500; i++) { + longString += ' '; + expectedString += '%20'; + } + + t.equal( + utils.encode(longString), + expectedString, + 'encodes a long string' + ); + + t.equal( + utils.encode('\x28\x29'), + '%28%29', + 'encodes parens normally' + ); + t.equal( + utils.encode('\x28\x29', null, null, null, 'RFC1738'), + '()', + 'does not encode parens in RFC1738' + ); + + // todo RFC1738 format + + t.equal( + utils.encode('Āက豈'), + '%C4%80%E1%80%80%EF%A4%80', + 'encodes multibyte chars' + ); + + t.equal( + utils.encode('\uD83D \uDCA9'), + '%F0%9F%90%A0%F0%BA%90%80', + 'encodes lone surrogates' + ); + + t.end(); +}); + +test('isBuffer()', function (t) { + forEach([null, undefined, true, false, '', 'abc', 42, 0, NaN, {}, [], function () {}, /a/g], function (x) { + t.equal(utils.isBuffer(x), false, inspect(x) + ' is not a buffer'); + }); + + var fakeBuffer = { constructor: Buffer }; + t.equal(utils.isBuffer(fakeBuffer), false, 'fake buffer is not a buffer'); + + var saferBuffer = SaferBuffer.from('abc'); + t.equal(utils.isBuffer(saferBuffer), true, 'SaferBuffer instance is a buffer'); + + var buffer = Buffer.from && Buffer.alloc ? Buffer.from('abc') : new Buffer('abc'); + t.equal(utils.isBuffer(buffer), true, 'real Buffer instance is a buffer'); + t.end(); +}); + +test('isRegExp()', function (t) { + t.equal(utils.isRegExp(/a/g), true, 'RegExp is a RegExp'); + t.equal(utils.isRegExp(new RegExp('a', 'g')), true, 'new RegExp is a RegExp'); + t.equal(utils.isRegExp(new Date()), false, 'Date is not a RegExp'); + + forEach(v.primitives, function (primitive) { + t.equal(utils.isRegExp(primitive), false, inspect(primitive) + ' is not a RegExp'); + }); + + t.end(); +}); diff --git a/node_modules/body-parser/node_modules/type-is/index.js b/node_modules/body-parser/node_modules/type-is/index.js new file mode 100644 index 0000000..e773845 --- /dev/null +++ b/node_modules/body-parser/node_modules/type-is/index.js @@ -0,0 +1,250 @@ +/*! + * type-is + * Copyright(c) 2014 Jonathan Ong + * Copyright(c) 2014-2015 Douglas Christopher Wilson + * MIT Licensed + */ + +'use strict' + +/** + * Module dependencies. + * @private + */ + +var contentType = require('content-type') +var mime = require('mime-types') +var typer = require('media-typer') + +/** + * Module exports. + * @public + */ + +module.exports = typeofrequest +module.exports.is = typeis +module.exports.hasBody = hasbody +module.exports.normalize = normalize +module.exports.match = mimeMatch + +/** + * Compare a `value` content-type with `types`. + * Each `type` can be an extension like `html`, + * a special shortcut like `multipart` or `urlencoded`, + * or a mime type. + * + * If no types match, `false` is returned. + * Otherwise, the first `type` that matches is returned. + * + * @param {String} value + * @param {Array} types + * @public + */ + +function typeis (value, types_) { + var i + var types = types_ + + // remove parameters and normalize + var val = tryNormalizeType(value) + + // no type or invalid + if (!val) { + return false + } + + // support flattened arguments + if (types && !Array.isArray(types)) { + types = new Array(arguments.length - 1) + for (i = 0; i < types.length; i++) { + types[i] = arguments[i + 1] + } + } + + // no types, return the content type + if (!types || !types.length) { + return val + } + + var type + for (i = 0; i < types.length; i++) { + if (mimeMatch(normalize(type = types[i]), val)) { + return type[0] === '+' || type.indexOf('*') !== -1 + ? val + : type + } + } + + // no matches + return false +} + +/** + * Check if a request has a request body. + * A request with a body __must__ either have `transfer-encoding` + * or `content-length` headers set. + * http://www.w3.org/Protocols/rfc2616/rfc2616-sec4.html#sec4.3 + * + * @param {Object} request + * @return {Boolean} + * @public + */ + +function hasbody (req) { + return req.headers['transfer-encoding'] !== undefined || + !isNaN(req.headers['content-length']) +} + +/** + * Check if the incoming request contains the "Content-Type" + * header field, and it contains any of the give mime `type`s. + * If there is no request body, `null` is returned. + * If there is no content type, `false` is returned. + * Otherwise, it returns the first `type` that matches. + * + * Examples: + * + * // With Content-Type: text/html; charset=utf-8 + * this.is('html'); // => 'html' + * this.is('text/html'); // => 'text/html' + * this.is('text/*', 'application/json'); // => 'text/html' + * + * // When Content-Type is application/json + * this.is('json', 'urlencoded'); // => 'json' + * this.is('application/json'); // => 'application/json' + * this.is('html', 'application/*'); // => 'application/json' + * + * this.is('html'); // => false + * + * @param {Object} req + * @param {(String|Array)} types... + * @return {(String|false|null)} + * @public + */ + +function typeofrequest (req, types_) { + // no body + if (!hasbody(req)) return null + // support flattened arguments + var types = arguments.length > 2 + ? Array.prototype.slice.call(arguments, 1) + : types_ + // request content type + var value = req.headers['content-type'] + + return typeis(value, types) +} + +/** + * Normalize a mime type. + * If it's a shorthand, expand it to a valid mime type. + * + * In general, you probably want: + * + * var type = is(req, ['urlencoded', 'json', 'multipart']); + * + * Then use the appropriate body parsers. + * These three are the most common request body types + * and are thus ensured to work. + * + * @param {String} type + * @return {String|false|null} + * @public + */ + +function normalize (type) { + if (typeof type !== 'string') { + // invalid type + return false + } + + switch (type) { + case 'urlencoded': + return 'application/x-www-form-urlencoded' + case 'multipart': + return 'multipart/*' + } + + if (type[0] === '+') { + // "+json" -> "*/*+json" expando + return '*/*' + type + } + + return type.indexOf('/') === -1 + ? mime.lookup(type) + : type +} + +/** + * Check if `expected` mime type + * matches `actual` mime type with + * wildcard and +suffix support. + * + * @param {String} expected + * @param {String} actual + * @return {Boolean} + * @public + */ + +function mimeMatch (expected, actual) { + // invalid type + if (expected === false) { + return false + } + + // split types + var actualParts = actual.split('/') + var expectedParts = expected.split('/') + + // invalid format + if (actualParts.length !== 2 || expectedParts.length !== 2) { + return false + } + + // validate type + if (expectedParts[0] !== '*' && expectedParts[0] !== actualParts[0]) { + return false + } + + // validate suffix wildcard + if (expectedParts[1].slice(0, 2) === '*+') { + return expectedParts[1].length <= actualParts[1].length + 1 && + expectedParts[1].slice(1) === actualParts[1].slice(1 - expectedParts[1].length) + } + + // validate subtype + if (expectedParts[1] !== '*' && expectedParts[1] !== actualParts[1]) { + return false + } + + return true +} + +/** + * Normalize a type and remove parameters. + * + * @param {string} value + * @return {(string|null)} + * @private + */ +function normalizeType (value) { + // Parse the type + var type = contentType.parse(value).type + + return typer.test(type) ? type : null +} + +/** + * Try to normalize a type and remove parameters. + * + * @param {string} value + * @return {(string|null)} + * @private + */ +function tryNormalizeType (value) { + try { + return value ? normalizeType(value) : null + } catch (err) { + return null + } +} diff --git a/node_modules/body-parser/node_modules/type-is/package.json b/node_modules/body-parser/node_modules/type-is/package.json new file mode 100644 index 0000000..08586d2 --- /dev/null +++ b/node_modules/body-parser/node_modules/type-is/package.json @@ -0,0 +1,47 @@ +{ + "name": "type-is", + "description": "Infer the content-type of a request.", + "version": "2.0.1", + "contributors": [ + "Douglas Christopher Wilson <doug@somethingdoug.com>", + "Jonathan Ong <me@jongleberry.com> (http://jongleberry.com)" + ], + "license": "MIT", + "repository": "jshttp/type-is", + "dependencies": { + "content-type": "^1.0.5", + "media-typer": "^1.1.0", + "mime-types": "^3.0.0" + }, + "devDependencies": { + "eslint": "7.32.0", + "eslint-config-standard": "14.1.1", + "eslint-plugin-import": "2.25.4", + "eslint-plugin-markdown": "2.2.1", + "eslint-plugin-node": "11.1.0", + "eslint-plugin-promise": "5.2.0", + "eslint-plugin-standard": "4.1.0", + "mocha": "9.2.1", + "nyc": "15.1.0" + }, + "engines": { + "node": ">= 0.6" + }, + "files": [ + "LICENSE", + "HISTORY.md", + "index.js" + ], + "scripts": { + "lint": "eslint .", + "test": "mocha --reporter spec --check-leaks --bail test/", + "test:debug": "mocha --reporter spec --check-leaks --inspect --inspect-brk test/", + "test-ci": "nyc --reporter=lcovonly --reporter=text npm test", + "test-cov": "nyc --reporter=html --reporter=text npm test" + }, + "keywords": [ + "content", + "type", + "checking" + ] +} diff --git a/node_modules/body-parser/package.json b/node_modules/body-parser/package.json index 3c9926f..e7f763b 100644 --- a/node_modules/body-parser/package.json +++ b/node_modules/body-parser/package.json @@ -1,7 +1,7 @@ { "name": "body-parser", "description": "Node.js body parsing middleware", - "version": "1.20.3", + "version": "2.2.0", "contributors": [ "Douglas Christopher Wilson <doug@somethingdoug.com>", "Jonathan Ong <me@jongleberry.com> (http://jongleberry.com)" @@ -9,18 +9,15 @@ "license": "MIT", "repository": "expressjs/body-parser", "dependencies": { - "bytes": "3.1.2", - "content-type": "~1.0.5", - "debug": "2.6.9", - "depd": "2.0.0", - "destroy": "1.2.0", - "http-errors": "2.0.0", - "iconv-lite": "0.4.24", - "on-finished": "2.4.1", - "qs": "6.13.0", - "raw-body": "2.5.2", - "type-is": "~1.6.18", - "unpipe": "1.0.0" + "bytes": "^3.1.2", + "content-type": "^1.0.5", + "debug": "^4.4.0", + "http-errors": "^2.0.0", + "iconv-lite": "^0.6.3", + "on-finished": "^2.4.1", + "qs": "^6.14.0", + "raw-body": "^3.0.0", + "type-is": "^2.0.0" }, "devDependencies": { "eslint": "8.34.0", @@ -30,27 +27,23 @@ "eslint-plugin-node": "11.1.0", "eslint-plugin-promise": "6.1.1", "eslint-plugin-standard": "4.1.0", - "methods": "1.1.2", - "mocha": "10.2.0", - "nyc": "15.1.0", - "safe-buffer": "5.2.1", - "supertest": "6.3.3" + "mocha": "^11.1.0", + "nyc": "^17.1.0", + "supertest": "^7.0.0" }, "files": [ "lib/", "LICENSE", "HISTORY.md", - "SECURITY.md", "index.js" ], "engines": { - "node": ">= 0.8", - "npm": "1.2.8000 || >= 1.4.16" + "node": ">=18" }, "scripts": { "lint": "eslint .", - "test": "mocha --require test/support/env --reporter spec --check-leaks --bail test/", - "test-ci": "nyc --reporter=lcov --reporter=text npm test", + "test": "mocha --reporter spec --check-leaks test/", + "test-ci": "nyc --reporter=lcovonly --reporter=text npm test", "test-cov": "nyc --reporter=html --reporter=text npm test" } } diff --git a/node_modules/boolbase/index.js b/node_modules/boolbase/index.js deleted file mode 100644 index 8799fd9..0000000 --- a/node_modules/boolbase/index.js +++ /dev/null @@ -1,8 +0,0 @@ -module.exports = { - trueFunc: function trueFunc(){ - return true; - }, - falseFunc: function falseFunc(){ - return false; - } -}; \ No newline at end of file diff --git a/node_modules/boolbase/package.json b/node_modules/boolbase/package.json deleted file mode 100644 index 78330a8..0000000 --- a/node_modules/boolbase/package.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "name": "boolbase", - "version": "1.0.0", - "description": "two functions: One that returns true, one that returns false", - "main": "index.js", - "scripts": { - "test": "echo \"Error: no test specified\" && exit 1" - }, - "repository": { - "type": "git", - "url": "https://github.com/fb55/boolbase" - }, - "keywords": [ - "boolean", - "function" - ], - "author": "Felix Boehm <me@feedic.com>", - "license": "ISC", - "bugs": { - "url": "https://github.com/fb55/boolbase/issues" - }, - "homepage": "https://github.com/fb55/boolbase" -} diff --git a/node_modules/brace-expansion/index.js b/node_modules/brace-expansion/index.js deleted file mode 100644 index 0478be8..0000000 --- a/node_modules/brace-expansion/index.js +++ /dev/null @@ -1,201 +0,0 @@ -var concatMap = require('concat-map'); -var balanced = require('balanced-match'); - -module.exports = expandTop; - -var escSlash = '\0SLASH'+Math.random()+'\0'; -var escOpen = '\0OPEN'+Math.random()+'\0'; -var escClose = '\0CLOSE'+Math.random()+'\0'; -var escComma = '\0COMMA'+Math.random()+'\0'; -var escPeriod = '\0PERIOD'+Math.random()+'\0'; - -function numeric(str) { - return parseInt(str, 10) == str - ? parseInt(str, 10) - : str.charCodeAt(0); -} - -function escapeBraces(str) { - return str.split('\\\\').join(escSlash) - .split('\\{').join(escOpen) - .split('\\}').join(escClose) - .split('\\,').join(escComma) - .split('\\.').join(escPeriod); -} - -function unescapeBraces(str) { - return str.split(escSlash).join('\\') - .split(escOpen).join('{') - .split(escClose).join('}') - .split(escComma).join(',') - .split(escPeriod).join('.'); -} - - -// Basically just str.split(","), but handling cases -// where we have nested braced sections, which should be -// treated as individual members, like {a,{b,c},d} -function parseCommaParts(str) { - if (!str) - return ['']; - - var parts = []; - var m = balanced('{', '}', str); - - if (!m) - return str.split(','); - - var pre = m.pre; - var body = m.body; - var post = m.post; - var p = pre.split(','); - - p[p.length-1] += '{' + body + '}'; - var postParts = parseCommaParts(post); - if (post.length) { - p[p.length-1] += postParts.shift(); - p.push.apply(p, postParts); - } - - parts.push.apply(parts, p); - - return parts; -} - -function expandTop(str) { - if (!str) - return []; - - // I don't know why Bash 4.3 does this, but it does. - // Anything starting with {} will have the first two bytes preserved - // but *only* at the top level, so {},a}b will not expand to anything, - // but a{},b}c will be expanded to [a}c,abc]. - // One could argue that this is a bug in Bash, but since the goal of - // this module is to match Bash's rules, we escape a leading {} - if (str.substr(0, 2) === '{}') { - str = '\\{\\}' + str.substr(2); - } - - return expand(escapeBraces(str), true).map(unescapeBraces); -} - -function identity(e) { - return e; -} - -function embrace(str) { - return '{' + str + '}'; -} -function isPadded(el) { - return /^-?0\d/.test(el); -} - -function lte(i, y) { - return i <= y; -} -function gte(i, y) { - return i >= y; -} - -function expand(str, isTop) { - var expansions = []; - - var m = balanced('{', '}', str); - if (!m || /\$$/.test(m.pre)) return [str]; - - var isNumericSequence = /^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(m.body); - var isAlphaSequence = /^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(m.body); - var isSequence = isNumericSequence || isAlphaSequence; - var isOptions = m.body.indexOf(',') >= 0; - if (!isSequence && !isOptions) { - // {a},b} - if (m.post.match(/,.*\}/)) { - str = m.pre + '{' + m.body + escClose + m.post; - return expand(str); - } - return [str]; - } - - var n; - if (isSequence) { - n = m.body.split(/\.\./); - } else { - n = parseCommaParts(m.body); - if (n.length === 1) { - // x{{a,b}}y ==> x{a}y x{b}y - n = expand(n[0], false).map(embrace); - if (n.length === 1) { - var post = m.post.length - ? expand(m.post, false) - : ['']; - return post.map(function(p) { - return m.pre + n[0] + p; - }); - } - } - } - - // at this point, n is the parts, and we know it's not a comma set - // with a single entry. - - // no need to expand pre, since it is guaranteed to be free of brace-sets - var pre = m.pre; - var post = m.post.length - ? expand(m.post, false) - : ['']; - - var N; - - if (isSequence) { - var x = numeric(n[0]); - var y = numeric(n[1]); - var width = Math.max(n[0].length, n[1].length) - var incr = n.length == 3 - ? Math.abs(numeric(n[2])) - : 1; - var test = lte; - var reverse = y < x; - if (reverse) { - incr *= -1; - test = gte; - } - var pad = n.some(isPadded); - - N = []; - - for (var i = x; test(i, y); i += incr) { - var c; - if (isAlphaSequence) { - c = String.fromCharCode(i); - if (c === '\\') - c = ''; - } else { - c = String(i); - if (pad) { - var need = width - c.length; - if (need > 0) { - var z = new Array(need + 1).join('0'); - if (i < 0) - c = '-' + z + c.slice(1); - else - c = z + c; - } - } - } - N.push(c); - } - } else { - N = concatMap(n, function(el) { return expand(el, false) }); - } - - for (var j = 0; j < N.length; j++) { - for (var k = 0; k < post.length; k++) { - var expansion = pre + N[j] + post[k]; - if (!isTop || isSequence || expansion) - expansions.push(expansion); - } - } - - return expansions; -} - diff --git a/node_modules/brace-expansion/package.json b/node_modules/brace-expansion/package.json deleted file mode 100644 index a18faa8..0000000 --- a/node_modules/brace-expansion/package.json +++ /dev/null @@ -1,47 +0,0 @@ -{ - "name": "brace-expansion", - "description": "Brace expansion as known from sh/bash", - "version": "1.1.11", - "repository": { - "type": "git", - "url": "git://github.com/juliangruber/brace-expansion.git" - }, - "homepage": "https://github.com/juliangruber/brace-expansion", - "main": "index.js", - "scripts": { - "test": "tape test/*.js", - "gentest": "bash test/generate.sh", - "bench": "matcha test/perf/bench.js" - }, - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - }, - "devDependencies": { - "matcha": "^0.7.0", - "tape": "^4.6.0" - }, - "keywords": [], - "author": { - "name": "Julian Gruber", - "email": "mail@juliangruber.com", - "url": "http://juliangruber.com" - }, - "license": "MIT", - "testling": { - "files": "test/*.js", - "browsers": [ - "ie/8..latest", - "firefox/20..latest", - "firefox/nightly", - "chrome/25..latest", - "chrome/canary", - "opera/12..latest", - "opera/next", - "safari/5.1..latest", - "ipad/6.0..latest", - "iphone/6.0..latest", - "android-browser/4.2..latest" - ] - } -} diff --git a/node_modules/braces/index.js b/node_modules/braces/index.js deleted file mode 100644 index d222c13..0000000 --- a/node_modules/braces/index.js +++ /dev/null @@ -1,170 +0,0 @@ -'use strict'; - -const stringify = require('./lib/stringify'); -const compile = require('./lib/compile'); -const expand = require('./lib/expand'); -const parse = require('./lib/parse'); - -/** - * Expand the given pattern or create a regex-compatible string. - * - * ```js - * const braces = require('braces'); - * console.log(braces('{a,b,c}', { compile: true })); //=> ['(a|b|c)'] - * console.log(braces('{a,b,c}')); //=> ['a', 'b', 'c'] - * ``` - * @param {String} `str` - * @param {Object} `options` - * @return {String} - * @api public - */ - -const braces = (input, options = {}) => { - let output = []; - - if (Array.isArray(input)) { - for (const pattern of input) { - const result = braces.create(pattern, options); - if (Array.isArray(result)) { - output.push(...result); - } else { - output.push(result); - } - } - } else { - output = [].concat(braces.create(input, options)); - } - - if (options && options.expand === true && options.nodupes === true) { - output = [...new Set(output)]; - } - return output; -}; - -/** - * Parse the given `str` with the given `options`. - * - * ```js - * // braces.parse(pattern, [, options]); - * const ast = braces.parse('a/{b,c}/d'); - * console.log(ast); - * ``` - * @param {String} pattern Brace pattern to parse - * @param {Object} options - * @return {Object} Returns an AST - * @api public - */ - -braces.parse = (input, options = {}) => parse(input, options); - -/** - * Creates a braces string from an AST, or an AST node. - * - * ```js - * const braces = require('braces'); - * let ast = braces.parse('foo/{a,b}/bar'); - * console.log(stringify(ast.nodes[2])); //=> '{a,b}' - * ``` - * @param {String} `input` Brace pattern or AST. - * @param {Object} `options` - * @return {Array} Returns an array of expanded values. - * @api public - */ - -braces.stringify = (input, options = {}) => { - if (typeof input === 'string') { - return stringify(braces.parse(input, options), options); - } - return stringify(input, options); -}; - -/** - * Compiles a brace pattern into a regex-compatible, optimized string. - * This method is called by the main [braces](#braces) function by default. - * - * ```js - * const braces = require('braces'); - * console.log(braces.compile('a/{b,c}/d')); - * //=> ['a/(b|c)/d'] - * ``` - * @param {String} `input` Brace pattern or AST. - * @param {Object} `options` - * @return {Array} Returns an array of expanded values. - * @api public - */ - -braces.compile = (input, options = {}) => { - if (typeof input === 'string') { - input = braces.parse(input, options); - } - return compile(input, options); -}; - -/** - * Expands a brace pattern into an array. This method is called by the - * main [braces](#braces) function when `options.expand` is true. Before - * using this method it's recommended that you read the [performance notes](#performance)) - * and advantages of using [.compile](#compile) instead. - * - * ```js - * const braces = require('braces'); - * console.log(braces.expand('a/{b,c}/d')); - * //=> ['a/b/d', 'a/c/d']; - * ``` - * @param {String} `pattern` Brace pattern - * @param {Object} `options` - * @return {Array} Returns an array of expanded values. - * @api public - */ - -braces.expand = (input, options = {}) => { - if (typeof input === 'string') { - input = braces.parse(input, options); - } - - let result = expand(input, options); - - // filter out empty strings if specified - if (options.noempty === true) { - result = result.filter(Boolean); - } - - // filter out duplicates if specified - if (options.nodupes === true) { - result = [...new Set(result)]; - } - - return result; -}; - -/** - * Processes a brace pattern and returns either an expanded array - * (if `options.expand` is true), a highly optimized regex-compatible string. - * This method is called by the main [braces](#braces) function. - * - * ```js - * const braces = require('braces'); - * console.log(braces.create('user-{200..300}/project-{a,b,c}-{1..10}')) - * //=> 'user-(20[0-9]|2[1-9][0-9]|300)/project-(a|b|c)-([1-9]|10)' - * ``` - * @param {String} `pattern` Brace pattern - * @param {Object} `options` - * @return {Array} Returns an array of expanded values. - * @api public - */ - -braces.create = (input, options = {}) => { - if (input === '' || input.length < 3) { - return [input]; - } - - return options.expand !== true - ? braces.compile(input, options) - : braces.expand(input, options); -}; - -/** - * Expose "braces" - */ - -module.exports = braces; diff --git a/node_modules/braces/lib/compile.js b/node_modules/braces/lib/compile.js deleted file mode 100644 index dce69be..0000000 --- a/node_modules/braces/lib/compile.js +++ /dev/null @@ -1,60 +0,0 @@ -'use strict'; - -const fill = require('fill-range'); -const utils = require('./utils'); - -const compile = (ast, options = {}) => { - const walk = (node, parent = {}) => { - const invalidBlock = utils.isInvalidBrace(parent); - const invalidNode = node.invalid === true && options.escapeInvalid === true; - const invalid = invalidBlock === true || invalidNode === true; - const prefix = options.escapeInvalid === true ? '\\' : ''; - let output = ''; - - if (node.isOpen === true) { - return prefix + node.value; - } - - if (node.isClose === true) { - console.log('node.isClose', prefix, node.value); - return prefix + node.value; - } - - if (node.type === 'open') { - return invalid ? prefix + node.value : '('; - } - - if (node.type === 'close') { - return invalid ? prefix + node.value : ')'; - } - - if (node.type === 'comma') { - return node.prev.type === 'comma' ? '' : invalid ? node.value : '|'; - } - - if (node.value) { - return node.value; - } - - if (node.nodes && node.ranges > 0) { - const args = utils.reduce(node.nodes); - const range = fill(...args, { ...options, wrap: false, toRegex: true, strictZeros: true }); - - if (range.length !== 0) { - return args.length > 1 && range.length > 1 ? `(${range})` : range; - } - } - - if (node.nodes) { - for (const child of node.nodes) { - output += walk(child, node); - } - } - - return output; - }; - - return walk(ast); -}; - -module.exports = compile; diff --git a/node_modules/braces/lib/constants.js b/node_modules/braces/lib/constants.js deleted file mode 100644 index 2bb3b88..0000000 --- a/node_modules/braces/lib/constants.js +++ /dev/null @@ -1,57 +0,0 @@ -'use strict'; - -module.exports = { - MAX_LENGTH: 10000, - - // Digits - CHAR_0: '0', /* 0 */ - CHAR_9: '9', /* 9 */ - - // Alphabet chars. - CHAR_UPPERCASE_A: 'A', /* A */ - CHAR_LOWERCASE_A: 'a', /* a */ - CHAR_UPPERCASE_Z: 'Z', /* Z */ - CHAR_LOWERCASE_Z: 'z', /* z */ - - CHAR_LEFT_PARENTHESES: '(', /* ( */ - CHAR_RIGHT_PARENTHESES: ')', /* ) */ - - CHAR_ASTERISK: '*', /* * */ - - // Non-alphabetic chars. - CHAR_AMPERSAND: '&', /* & */ - CHAR_AT: '@', /* @ */ - CHAR_BACKSLASH: '\\', /* \ */ - CHAR_BACKTICK: '`', /* ` */ - CHAR_CARRIAGE_RETURN: '\r', /* \r */ - CHAR_CIRCUMFLEX_ACCENT: '^', /* ^ */ - CHAR_COLON: ':', /* : */ - CHAR_COMMA: ',', /* , */ - CHAR_DOLLAR: '$', /* . */ - CHAR_DOT: '.', /* . */ - CHAR_DOUBLE_QUOTE: '"', /* " */ - CHAR_EQUAL: '=', /* = */ - CHAR_EXCLAMATION_MARK: '!', /* ! */ - CHAR_FORM_FEED: '\f', /* \f */ - CHAR_FORWARD_SLASH: '/', /* / */ - CHAR_HASH: '#', /* # */ - CHAR_HYPHEN_MINUS: '-', /* - */ - CHAR_LEFT_ANGLE_BRACKET: '<', /* < */ - CHAR_LEFT_CURLY_BRACE: '{', /* { */ - CHAR_LEFT_SQUARE_BRACKET: '[', /* [ */ - CHAR_LINE_FEED: '\n', /* \n */ - CHAR_NO_BREAK_SPACE: '\u00A0', /* \u00A0 */ - CHAR_PERCENT: '%', /* % */ - CHAR_PLUS: '+', /* + */ - CHAR_QUESTION_MARK: '?', /* ? */ - CHAR_RIGHT_ANGLE_BRACKET: '>', /* > */ - CHAR_RIGHT_CURLY_BRACE: '}', /* } */ - CHAR_RIGHT_SQUARE_BRACKET: ']', /* ] */ - CHAR_SEMICOLON: ';', /* ; */ - CHAR_SINGLE_QUOTE: '\'', /* ' */ - CHAR_SPACE: ' ', /* */ - CHAR_TAB: '\t', /* \t */ - CHAR_UNDERSCORE: '_', /* _ */ - CHAR_VERTICAL_LINE: '|', /* | */ - CHAR_ZERO_WIDTH_NOBREAK_SPACE: '\uFEFF' /* \uFEFF */ -}; diff --git a/node_modules/braces/lib/expand.js b/node_modules/braces/lib/expand.js deleted file mode 100644 index 35b2c41..0000000 --- a/node_modules/braces/lib/expand.js +++ /dev/null @@ -1,113 +0,0 @@ -'use strict'; - -const fill = require('fill-range'); -const stringify = require('./stringify'); -const utils = require('./utils'); - -const append = (queue = '', stash = '', enclose = false) => { - const result = []; - - queue = [].concat(queue); - stash = [].concat(stash); - - if (!stash.length) return queue; - if (!queue.length) { - return enclose ? utils.flatten(stash).map(ele => `{${ele}}`) : stash; - } - - for (const item of queue) { - if (Array.isArray(item)) { - for (const value of item) { - result.push(append(value, stash, enclose)); - } - } else { - for (let ele of stash) { - if (enclose === true && typeof ele === 'string') ele = `{${ele}}`; - result.push(Array.isArray(ele) ? append(item, ele, enclose) : item + ele); - } - } - } - return utils.flatten(result); -}; - -const expand = (ast, options = {}) => { - const rangeLimit = options.rangeLimit === undefined ? 1000 : options.rangeLimit; - - const walk = (node, parent = {}) => { - node.queue = []; - - let p = parent; - let q = parent.queue; - - while (p.type !== 'brace' && p.type !== 'root' && p.parent) { - p = p.parent; - q = p.queue; - } - - if (node.invalid || node.dollar) { - q.push(append(q.pop(), stringify(node, options))); - return; - } - - if (node.type === 'brace' && node.invalid !== true && node.nodes.length === 2) { - q.push(append(q.pop(), ['{}'])); - return; - } - - if (node.nodes && node.ranges > 0) { - const args = utils.reduce(node.nodes); - - if (utils.exceedsLimit(...args, options.step, rangeLimit)) { - throw new RangeError('expanded array length exceeds range limit. Use options.rangeLimit to increase or disable the limit.'); - } - - let range = fill(...args, options); - if (range.length === 0) { - range = stringify(node, options); - } - - q.push(append(q.pop(), range)); - node.nodes = []; - return; - } - - const enclose = utils.encloseBrace(node); - let queue = node.queue; - let block = node; - - while (block.type !== 'brace' && block.type !== 'root' && block.parent) { - block = block.parent; - queue = block.queue; - } - - for (let i = 0; i < node.nodes.length; i++) { - const child = node.nodes[i]; - - if (child.type === 'comma' && node.type === 'brace') { - if (i === 1) queue.push(''); - queue.push(''); - continue; - } - - if (child.type === 'close') { - q.push(append(q.pop(), queue, enclose)); - continue; - } - - if (child.value && child.type !== 'open') { - queue.push(append(queue.pop(), child.value)); - continue; - } - - if (child.nodes) { - walk(child, node); - } - } - - return queue; - }; - - return utils.flatten(walk(ast)); -}; - -module.exports = expand; diff --git a/node_modules/braces/lib/parse.js b/node_modules/braces/lib/parse.js deleted file mode 100644 index 3a6988e..0000000 --- a/node_modules/braces/lib/parse.js +++ /dev/null @@ -1,331 +0,0 @@ -'use strict'; - -const stringify = require('./stringify'); - -/** - * Constants - */ - -const { - MAX_LENGTH, - CHAR_BACKSLASH, /* \ */ - CHAR_BACKTICK, /* ` */ - CHAR_COMMA, /* , */ - CHAR_DOT, /* . */ - CHAR_LEFT_PARENTHESES, /* ( */ - CHAR_RIGHT_PARENTHESES, /* ) */ - CHAR_LEFT_CURLY_BRACE, /* { */ - CHAR_RIGHT_CURLY_BRACE, /* } */ - CHAR_LEFT_SQUARE_BRACKET, /* [ */ - CHAR_RIGHT_SQUARE_BRACKET, /* ] */ - CHAR_DOUBLE_QUOTE, /* " */ - CHAR_SINGLE_QUOTE, /* ' */ - CHAR_NO_BREAK_SPACE, - CHAR_ZERO_WIDTH_NOBREAK_SPACE -} = require('./constants'); - -/** - * parse - */ - -const parse = (input, options = {}) => { - if (typeof input !== 'string') { - throw new TypeError('Expected a string'); - } - - const opts = options || {}; - const max = typeof opts.maxLength === 'number' ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH; - if (input.length > max) { - throw new SyntaxError(`Input length (${input.length}), exceeds max characters (${max})`); - } - - const ast = { type: 'root', input, nodes: [] }; - const stack = [ast]; - let block = ast; - let prev = ast; - let brackets = 0; - const length = input.length; - let index = 0; - let depth = 0; - let value; - - /** - * Helpers - */ - - const advance = () => input[index++]; - const push = node => { - if (node.type === 'text' && prev.type === 'dot') { - prev.type = 'text'; - } - - if (prev && prev.type === 'text' && node.type === 'text') { - prev.value += node.value; - return; - } - - block.nodes.push(node); - node.parent = block; - node.prev = prev; - prev = node; - return node; - }; - - push({ type: 'bos' }); - - while (index < length) { - block = stack[stack.length - 1]; - value = advance(); - - /** - * Invalid chars - */ - - if (value === CHAR_ZERO_WIDTH_NOBREAK_SPACE || value === CHAR_NO_BREAK_SPACE) { - continue; - } - - /** - * Escaped chars - */ - - if (value === CHAR_BACKSLASH) { - push({ type: 'text', value: (options.keepEscaping ? value : '') + advance() }); - continue; - } - - /** - * Right square bracket (literal): ']' - */ - - if (value === CHAR_RIGHT_SQUARE_BRACKET) { - push({ type: 'text', value: '\\' + value }); - continue; - } - - /** - * Left square bracket: '[' - */ - - if (value === CHAR_LEFT_SQUARE_BRACKET) { - brackets++; - - let next; - - while (index < length && (next = advance())) { - value += next; - - if (next === CHAR_LEFT_SQUARE_BRACKET) { - brackets++; - continue; - } - - if (next === CHAR_BACKSLASH) { - value += advance(); - continue; - } - - if (next === CHAR_RIGHT_SQUARE_BRACKET) { - brackets--; - - if (brackets === 0) { - break; - } - } - } - - push({ type: 'text', value }); - continue; - } - - /** - * Parentheses - */ - - if (value === CHAR_LEFT_PARENTHESES) { - block = push({ type: 'paren', nodes: [] }); - stack.push(block); - push({ type: 'text', value }); - continue; - } - - if (value === CHAR_RIGHT_PARENTHESES) { - if (block.type !== 'paren') { - push({ type: 'text', value }); - continue; - } - block = stack.pop(); - push({ type: 'text', value }); - block = stack[stack.length - 1]; - continue; - } - - /** - * Quotes: '|"|` - */ - - if (value === CHAR_DOUBLE_QUOTE || value === CHAR_SINGLE_QUOTE || value === CHAR_BACKTICK) { - const open = value; - let next; - - if (options.keepQuotes !== true) { - value = ''; - } - - while (index < length && (next = advance())) { - if (next === CHAR_BACKSLASH) { - value += next + advance(); - continue; - } - - if (next === open) { - if (options.keepQuotes === true) value += next; - break; - } - - value += next; - } - - push({ type: 'text', value }); - continue; - } - - /** - * Left curly brace: '{' - */ - - if (value === CHAR_LEFT_CURLY_BRACE) { - depth++; - - const dollar = prev.value && prev.value.slice(-1) === '$' || block.dollar === true; - const brace = { - type: 'brace', - open: true, - close: false, - dollar, - depth, - commas: 0, - ranges: 0, - nodes: [] - }; - - block = push(brace); - stack.push(block); - push({ type: 'open', value }); - continue; - } - - /** - * Right curly brace: '}' - */ - - if (value === CHAR_RIGHT_CURLY_BRACE) { - if (block.type !== 'brace') { - push({ type: 'text', value }); - continue; - } - - const type = 'close'; - block = stack.pop(); - block.close = true; - - push({ type, value }); - depth--; - - block = stack[stack.length - 1]; - continue; - } - - /** - * Comma: ',' - */ - - if (value === CHAR_COMMA && depth > 0) { - if (block.ranges > 0) { - block.ranges = 0; - const open = block.nodes.shift(); - block.nodes = [open, { type: 'text', value: stringify(block) }]; - } - - push({ type: 'comma', value }); - block.commas++; - continue; - } - - /** - * Dot: '.' - */ - - if (value === CHAR_DOT && depth > 0 && block.commas === 0) { - const siblings = block.nodes; - - if (depth === 0 || siblings.length === 0) { - push({ type: 'text', value }); - continue; - } - - if (prev.type === 'dot') { - block.range = []; - prev.value += value; - prev.type = 'range'; - - if (block.nodes.length !== 3 && block.nodes.length !== 5) { - block.invalid = true; - block.ranges = 0; - prev.type = 'text'; - continue; - } - - block.ranges++; - block.args = []; - continue; - } - - if (prev.type === 'range') { - siblings.pop(); - - const before = siblings[siblings.length - 1]; - before.value += prev.value + value; - prev = before; - block.ranges--; - continue; - } - - push({ type: 'dot', value }); - continue; - } - - /** - * Text - */ - - push({ type: 'text', value }); - } - - // Mark imbalanced braces and brackets as invalid - do { - block = stack.pop(); - - if (block.type !== 'root') { - block.nodes.forEach(node => { - if (!node.nodes) { - if (node.type === 'open') node.isOpen = true; - if (node.type === 'close') node.isClose = true; - if (!node.nodes) node.type = 'text'; - node.invalid = true; - } - }); - - // get the location of the block on parent.nodes (block's siblings) - const parent = stack[stack.length - 1]; - const index = parent.nodes.indexOf(block); - // replace the (invalid) block with it's nodes - parent.nodes.splice(index, 1, ...block.nodes); - } - } while (stack.length > 0); - - push({ type: 'eos' }); - return ast; -}; - -module.exports = parse; diff --git a/node_modules/braces/lib/stringify.js b/node_modules/braces/lib/stringify.js deleted file mode 100644 index 8bcf872..0000000 --- a/node_modules/braces/lib/stringify.js +++ /dev/null @@ -1,32 +0,0 @@ -'use strict'; - -const utils = require('./utils'); - -module.exports = (ast, options = {}) => { - const stringify = (node, parent = {}) => { - const invalidBlock = options.escapeInvalid && utils.isInvalidBrace(parent); - const invalidNode = node.invalid === true && options.escapeInvalid === true; - let output = ''; - - if (node.value) { - if ((invalidBlock || invalidNode) && utils.isOpenOrClose(node)) { - return '\\' + node.value; - } - return node.value; - } - - if (node.value) { - return node.value; - } - - if (node.nodes) { - for (const child of node.nodes) { - output += stringify(child); - } - } - return output; - }; - - return stringify(ast); -}; - diff --git a/node_modules/braces/lib/utils.js b/node_modules/braces/lib/utils.js deleted file mode 100644 index d19311f..0000000 --- a/node_modules/braces/lib/utils.js +++ /dev/null @@ -1,122 +0,0 @@ -'use strict'; - -exports.isInteger = num => { - if (typeof num === 'number') { - return Number.isInteger(num); - } - if (typeof num === 'string' && num.trim() !== '') { - return Number.isInteger(Number(num)); - } - return false; -}; - -/** - * Find a node of the given type - */ - -exports.find = (node, type) => node.nodes.find(node => node.type === type); - -/** - * Find a node of the given type - */ - -exports.exceedsLimit = (min, max, step = 1, limit) => { - if (limit === false) return false; - if (!exports.isInteger(min) || !exports.isInteger(max)) return false; - return ((Number(max) - Number(min)) / Number(step)) >= limit; -}; - -/** - * Escape the given node with '\\' before node.value - */ - -exports.escapeNode = (block, n = 0, type) => { - const node = block.nodes[n]; - if (!node) return; - - if ((type && node.type === type) || node.type === 'open' || node.type === 'close') { - if (node.escaped !== true) { - node.value = '\\' + node.value; - node.escaped = true; - } - } -}; - -/** - * Returns true if the given brace node should be enclosed in literal braces - */ - -exports.encloseBrace = node => { - if (node.type !== 'brace') return false; - if ((node.commas >> 0 + node.ranges >> 0) === 0) { - node.invalid = true; - return true; - } - return false; -}; - -/** - * Returns true if a brace node is invalid. - */ - -exports.isInvalidBrace = block => { - if (block.type !== 'brace') return false; - if (block.invalid === true || block.dollar) return true; - if ((block.commas >> 0 + block.ranges >> 0) === 0) { - block.invalid = true; - return true; - } - if (block.open !== true || block.close !== true) { - block.invalid = true; - return true; - } - return false; -}; - -/** - * Returns true if a node is an open or close node - */ - -exports.isOpenOrClose = node => { - if (node.type === 'open' || node.type === 'close') { - return true; - } - return node.open === true || node.close === true; -}; - -/** - * Reduce an array of text nodes. - */ - -exports.reduce = nodes => nodes.reduce((acc, node) => { - if (node.type === 'text') acc.push(node.value); - if (node.type === 'range') node.type = 'text'; - return acc; -}, []); - -/** - * Flatten an array - */ - -exports.flatten = (...args) => { - const result = []; - - const flat = arr => { - for (let i = 0; i < arr.length; i++) { - const ele = arr[i]; - - if (Array.isArray(ele)) { - flat(ele); - continue; - } - - if (ele !== undefined) { - result.push(ele); - } - } - return result; - }; - - flat(args); - return result; -}; diff --git a/node_modules/braces/package.json b/node_modules/braces/package.json deleted file mode 100644 index c3c056e..0000000 --- a/node_modules/braces/package.json +++ /dev/null @@ -1,77 +0,0 @@ -{ - "name": "braces", - "description": "Bash-like brace expansion, implemented in JavaScript. Safer than other brace expansion libs, with complete support for the Bash 4.3 braces specification, without sacrificing speed.", - "version": "3.0.3", - "homepage": "https://github.com/micromatch/braces", - "author": "Jon Schlinkert (https://github.com/jonschlinkert)", - "contributors": [ - "Brian Woodward (https://twitter.com/doowb)", - "Elan Shanker (https://github.com/es128)", - "Eugene Sharygin (https://github.com/eush77)", - "hemanth.hm (http://h3manth.com)", - "Jon Schlinkert (http://twitter.com/jonschlinkert)" - ], - "repository": "micromatch/braces", - "bugs": { - "url": "https://github.com/micromatch/braces/issues" - }, - "license": "MIT", - "files": [ - "index.js", - "lib" - ], - "main": "index.js", - "engines": { - "node": ">=8" - }, - "scripts": { - "test": "mocha", - "benchmark": "node benchmark" - }, - "dependencies": { - "fill-range": "^7.1.1" - }, - "devDependencies": { - "ansi-colors": "^3.2.4", - "bash-path": "^2.0.1", - "gulp-format-md": "^2.0.0", - "mocha": "^6.1.1" - }, - "keywords": [ - "alpha", - "alphabetical", - "bash", - "brace", - "braces", - "expand", - "expansion", - "filepath", - "fill", - "fs", - "glob", - "globbing", - "letter", - "match", - "matches", - "matching", - "number", - "numerical", - "path", - "range", - "ranges", - "sh" - ], - "verb": { - "toc": false, - "layout": "default", - "tasks": [ - "readme" - ], - "lint": { - "reflinks": true - }, - "plugins": [ - "gulp-format-md" - ] - } -} diff --git a/node_modules/call-of-duty-api/dist/index.d.ts b/node_modules/call-of-duty-api/dist/index.d.ts deleted file mode 100644 index a36a135..0000000 --- a/node_modules/call-of-duty-api/dist/index.d.ts +++ /dev/null @@ -1,118 +0,0 @@ -declare enum platforms { - All = "all", - Activision = "acti", - Battlenet = "battle", - PSN = "psn", - Steam = "steam", - Uno = "uno", - XBOX = "xbl", - ios = "ios", - NULL = "_" -} -declare enum games { - ModernWarfare = "mw", - ModernWarfare2 = "mw2", - Vanguard = "vg", - ColdWar = "cw", - NULL = "_" -} -declare enum friendActions { - Invite = "invite", - Uninvite = "uninvite", - Remove = "remove", - Block = "block", - Unblock = "unblock" -} -declare const enableDebugMode: () => boolean; -declare const disableDebugMode: () => boolean; -declare const login: (ssoToken: string) => boolean; -declare const telescopeLogin: (username: string, password: string) => Promise<boolean>; -declare class WZ { - fullData: (gamertag: string, platform: platforms) => Promise<unknown>; - combatHistory: (gamertag: string, platform: platforms) => Promise<unknown>; - combatHistoryWithDate: (gamertag: string, startTime: number, endTime: number, platform: platforms) => Promise<unknown>; - breakdown: (gamertag: string, platform: platforms) => Promise<unknown>; - breakdownWithDate: (gamertag: string, startTime: number, endTime: number, platform: platforms) => Promise<unknown>; - matchInfo: (matchId: string, platform: platforms) => Promise<unknown>; - cleanGameMode: (mode: string) => Promise<string>; -} -declare class MW { - fullData: (gamertag: string, platform: platforms) => Promise<unknown>; - combatHistory: (gamertag: string, platform: platforms) => Promise<unknown>; - combatHistoryWithDate: (gamertag: string, startTime: number, endTime: number, platform: platforms) => Promise<unknown>; - breakdown: (gamertag: string, platform: platforms) => Promise<unknown>; - breakdownWithDate: (gamertag: string, startTime: number, endTime: number, platform: platforms) => Promise<unknown>; - matchInfo: (matchId: string, platform: platforms) => Promise<unknown>; - seasonloot: (gamertag: string, platform: platforms) => Promise<unknown>; - mapList: (platform: platforms) => Promise<unknown>; -} -declare class MW2 { - fullData: (unoId: string) => Promise<unknown>; - matches: (unoId: string) => Promise<unknown>; - matchInfo: (unoId: string, matchId: string) => Promise<unknown>; -} -declare class WZ2 { - fullData: (unoId: string) => Promise<unknown>; - matches: (unoId: string) => Promise<unknown>; - matchInfo: (unoId: string, matchId: string) => Promise<unknown>; -} -declare class MW3 { - fullData: (unoId: string) => Promise<unknown>; - matches: (unoId: string) => Promise<unknown>; - matchInfo: (unoId: string, matchId: string) => Promise<unknown>; -} -declare class WZM { - fullData: (unoId: string) => Promise<unknown>; - matches: (unoId: string) => Promise<unknown>; - matchInfo: (unoId: string, matchId: string) => Promise<unknown>; -} -declare class CW { - fullData: (gamertag: string, platform: platforms) => Promise<unknown>; - combatHistory: (gamertag: string, platform: platforms) => Promise<unknown>; - combatHistoryWithDate: (gamertag: string, startTime: number, endTime: number, platform: platforms) => Promise<unknown>; - breakdown: (gamertag: string, platform: platforms) => Promise<unknown>; - breakdownWithDate: (gamertag: string, startTime: number, endTime: number, platform: platforms) => Promise<unknown>; - seasonloot: (gamertag: string, platform: platforms) => Promise<unknown>; - mapList: (platform: platforms) => Promise<unknown>; - matchInfo: (matchId: string, platform: platforms) => Promise<unknown>; -} -declare class VG { - fullData: (gamertag: string, platform: platforms) => Promise<unknown>; - combatHistory: (gamertag: string, platform: platforms) => Promise<unknown>; - combatHistoryWithDate: (gamertag: string, startTime: number, endTime: number, platform: platforms) => Promise<unknown>; - breakdown: (gamertag: string, platform: platforms) => Promise<unknown>; - breakdownWithDate: (gamertag: string, startTime: number, endTime: number, platform: platforms) => Promise<unknown>; - seasonloot: (gamertag: string, platform: platforms) => Promise<unknown>; - mapList: (platform: platforms) => Promise<unknown>; - matchInfo: (matchId: string, platform: platforms) => Promise<unknown>; -} -declare class SHOP { - purchasableItems: (gameId: string) => Promise<unknown>; - bundleInformation: (title: string, bundleId: string) => Promise<unknown>; - battlePassLoot: (title: games, season: number, platform: platforms) => Promise<unknown>; -} -declare class USER { - friendFeed: (gamertag: string, platform: platforms) => Promise<unknown>; - eventFeed: () => Promise<unknown>; - loggedInIdentities: () => Promise<unknown>; - codPoints: (gamertag: string, platform: platforms) => Promise<unknown>; - connectedAccounts: (gamertag: string, platform: platforms) => Promise<unknown>; - settings: (gamertag: string, platform: platforms) => Promise<unknown>; - friendAction: (gamertag: string, platform: platforms, action: friendActions) => Promise<unknown>; -} -declare class ALT { - search: (gamertag: string, platform: platforms) => Promise<unknown>; - cleanWeapon: (weapon: string) => Promise<string>; -} -declare const Warzone: WZ; -declare const ModernWarfare: MW; -declare const ModernWarfare2: MW2; -declare const Warzone2: WZ2; -declare const ModernWarfare3: MW3; -declare const WarzoneMobile: WZM; -declare const ColdWar: CW; -declare const Vanguard: VG; -declare const Store: SHOP; -declare const Me: USER; -declare const Misc: ALT; -export { login, telescopeLogin, platforms, friendActions, Warzone, ModernWarfare, ModernWarfare2, ModernWarfare3, WarzoneMobile, Warzone2, ColdWar, Vanguard, Store, Me, Misc, enableDebugMode, disableDebugMode, }; diff --git a/node_modules/call-of-duty-api/dist/index.js b/node_modules/call-of-duty-api/dist/index.js deleted file mode 100644 index 6c56463..0000000 --- a/node_modules/call-of-duty-api/dist/index.js +++ /dev/null @@ -1,766 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.disableDebugMode = exports.enableDebugMode = exports.Misc = exports.Me = exports.Store = exports.Vanguard = exports.ColdWar = exports.Warzone2 = exports.WarzoneMobile = exports.ModernWarfare3 = exports.ModernWarfare2 = exports.ModernWarfare = exports.Warzone = exports.friendActions = exports.platforms = exports.telescopeLogin = exports.login = void 0; -const tslib_1 = require("tslib"); -const undici_1 = require("undici"); -const weapon_ids_json_1 = tslib_1.__importDefault(require("./wz-data/weapon-ids.json")); -const game_modes_json_1 = tslib_1.__importDefault(require("./wz-data/game-modes.json")); -const userAgent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.169 Safari/537.36"; -let baseCookie = "new_SiteId=cod;ACT_SSO_LOCALE=en_US;country=US;"; -let baseSsoToken = ""; -let debugMode = false; -let baseHeaders = { - "content-type": "application/json", - cookie: baseCookie, - "user-agent": userAgent, -}; -let baseTelescopeHeaders = { - accept: "application/json, text/plain, */*", - "accept-language": "en-GB,en;q=0.9,en-US;q=0.8,fr;q=0.7,nl;q=0.6,et;q=0.5", - "cache-control": "no-cache", - pragma: "no-cache", - "sec-ch-ua": '"Chromium";v="118", "Microsoft Edge";v="118", "Not=A?Brand";v="99"', - "sec-ch-ua-mobile": "?0", - "sec-ch-ua-platform": '"Windows"', - "sec-fetch-dest": "empty", - "sec-fetch-mode": "cors", - "sec-fetch-site": "same-site", -}; -let basePostHeaders = { - "content-type": "text/plain", - cookie: baseCookie, - "user-agent": userAgent, -}; -let baseUrl = "https://my.callofduty.com"; -let apiPath = "/api/papi-client"; -let baseTelescopeUrl = "https://telescope.callofduty.com"; -let apiTelescopePath = "/api/ts-api"; -let loggedIn = false; -var platforms; -(function (platforms) { - platforms["All"] = "all"; - platforms["Activision"] = "acti"; - platforms["Battlenet"] = "battle"; - platforms["PSN"] = "psn"; - platforms["Steam"] = "steam"; - platforms["Uno"] = "uno"; - platforms["XBOX"] = "xbl"; - platforms["ios"] = "ios"; - platforms["NULL"] = "_"; -})(platforms || (platforms = {})); -exports.platforms = platforms; -var games; -(function (games) { - games["ModernWarfare"] = "mw"; - games["ModernWarfare2"] = "mw2"; - games["Vanguard"] = "vg"; - games["ColdWar"] = "cw"; - games["NULL"] = "_"; -})(games || (games = {})); -var telescopeGames; -(function (telescopeGames) { - telescopeGames["ModernWarfare2"] = "mw2"; - telescopeGames["Warzone2"] = "wz2"; - telescopeGames["ModernWarfare3"] = "jup"; - telescopeGames["Mobile"] = "mgl"; -})(telescopeGames || (telescopeGames = {})); -var modes; -(function (modes) { - modes["Multiplayer"] = "mp"; - modes["Warzone"] = "wz"; - modes["Warzone2"] = "wz2"; - modes["NULL"] = "_"; -})(modes || (modes = {})); -var telescopeModes; -(function (telescopeModes) { - telescopeModes["Multiplayer"] = "mp"; - telescopeModes["Outbreak"] = "ob"; -})(telescopeModes || (telescopeModes = {})); -var friendActions; -(function (friendActions) { - friendActions["Invite"] = "invite"; - friendActions["Uninvite"] = "uninvite"; - friendActions["Remove"] = "remove"; - friendActions["Block"] = "block"; - friendActions["Unblock"] = "unblock"; -})(friendActions || (friendActions = {})); -exports.friendActions = friendActions; -var generics; -(function (generics) { - generics["STEAM_UNSUPPORTED"] = "Steam platform not supported by this game. Try `battle` instead."; - generics["UNO_NO_NUMERICAL_ID"] = "You must use a numerical ID when using the platform 'uno'.\nIf using an Activision ID, please use the platform 'acti'."; -})(generics || (generics = {})); -let telescopeUnoToken = ""; -const enableDebugMode = () => (debugMode = true); -exports.enableDebugMode = enableDebugMode; -const disableDebugMode = () => (debugMode = false); -exports.disableDebugMode = disableDebugMode; -const sendTelescopeRequest = (url) => tslib_1.__awaiter(void 0, void 0, void 0, function* () { - try { - if (!loggedIn) - throw new Error("Not Logged In!"); - let requestUrl = `${baseTelescopeUrl}${apiTelescopePath}${url}`; - if (debugMode) - console.log(`[DEBUG]`, `Request Uri: ${requestUrl}`); - baseTelescopeHeaders.authorization = `Bearer ${telescopeUnoToken}`; - const { body, statusCode } = yield (0, undici_1.request)(requestUrl, { - headers: baseTelescopeHeaders, - }); - if (statusCode >= 500) - throw new Error(`Received status code: '${statusCode}'. Route may be down or not exist.`); - let response = yield body.json(); - return response; - } - catch (exception) { - throw exception; - } -}); -const sendRequest = (url) => tslib_1.__awaiter(void 0, void 0, void 0, function* () { - try { - if (!loggedIn) - throw new Error("Not Logged In."); - let requestUrl = `${baseUrl}${apiPath}${url}`; - if (debugMode) - console.log(`[DEBUG]`, `Request Uri: ${requestUrl}`); - if (debugMode) - console.time("Round Trip"); - const { body, statusCode } = yield (0, undici_1.request)(requestUrl, { - headers: baseHeaders, - }); - if (debugMode) - console.timeEnd("Round Trip"); - if (statusCode >= 500) - throw new Error(`Received status code: '${statusCode}'. Route may be down or not exist.`); - let response = yield body.json(); - if (debugMode) - console.log(`[DEBUG]`, `Body Size: ${JSON.stringify(response).length} bytes.`); - return response; - } - catch (exception) { - throw exception; - } -}); -const sendPostRequest = (url, data) => tslib_1.__awaiter(void 0, void 0, void 0, function* () { - try { - if (!loggedIn) - throw new Error("Not Logged In."); - let requestUrl = `${baseUrl}${apiPath}${url}`; - const { body, statusCode } = yield (0, undici_1.request)(requestUrl, { - method: "POST", - headers: basePostHeaders, - body: data, - }); - if (statusCode >= 500) - throw new Error(`Received status code: '${statusCode}'. Route may be down or not exist.`); - let response = yield body.json(); - return response; - } - catch (exception) { - throw exception; - } -}); -const cleanClientName = (gamertag) => { - return encodeURIComponent(gamertag); -}; -const login = (ssoToken) => { - if (!ssoToken || ssoToken.trim().length <= 0) - return false; - let fakeXSRF = "68e8b62e-1d9d-4ce1-b93f-cbe5ff31a041"; - baseHeaders["X-XSRF-TOKEN"] = fakeXSRF; - baseHeaders["X-CSRF-TOKEN"] = fakeXSRF; - baseHeaders["Atvi-Auth"] = ssoToken; - baseHeaders["ACT_SSO_COOKIE"] = ssoToken; - baseHeaders["atkn"] = ssoToken; - baseHeaders["cookie"] = `${baseCookie}ACT_SSO_COOKIE=${ssoToken};XSRF-TOKEN=${fakeXSRF};API_CSRF_TOKEN=${fakeXSRF};ACT_SSO_EVENT="LOGIN_SUCCESS:1644346543228";ACT_SSO_COOKIE_EXPIRY=1645556143194;comid=cod;ssoDevId=63025d09c69f47dfa2b8d5520b5b73e4;tfa_enrollment_seen=true;gtm.custom.bot.flag=human;`; - baseSsoToken = ssoToken; - basePostHeaders["X-XSRF-TOKEN"] = fakeXSRF; - basePostHeaders["X-CSRF-TOKEN"] = fakeXSRF; - basePostHeaders["Atvi-Auth"] = ssoToken; - basePostHeaders["ACT_SSO_COOKIE"] = ssoToken; - basePostHeaders["atkn"] = ssoToken; - basePostHeaders["cookie"] = `${baseCookie}ACT_SSO_COOKIE=${ssoToken};XSRF-TOKEN=${fakeXSRF};API_CSRF_TOKEN=${fakeXSRF};ACT_SSO_EVENT="LOGIN_SUCCESS:1644346543228";ACT_SSO_COOKIE_EXPIRY=1645556143194;comid=cod;ssoDevId=63025d09c69f47dfa2b8d5520b5b73e4;tfa_enrollment_seen=true;gtm.custom.bot.flag=human;`; - loggedIn = true; - return loggedIn; -}; -exports.login = login; -const telescope_login_endpoint = "https://wzm-ios-loginservice.prod.demonware.net/v1/login/uno/?titleID=7100&client=shg-cod-jup-bnet"; -const telescopeLogin = (username, password) => tslib_1.__awaiter(void 0, void 0, void 0, function* () { - if (!username || !password) - return false; - const { body, statusCode } = yield (0, undici_1.request)(telescope_login_endpoint, { - method: "POST", - headers: baseHeaders, - body: JSON.stringify({ - platform: "ios", - hardwareType: "ios", - auth: { - email: username, - password: password, - }, - version: 1492, - }), - }); - if (statusCode === 200) { - let response = (yield body.json()); - let unoToken = response.umbrella.accessToken; - telescopeUnoToken = unoToken; - } - else if (statusCode === 403) { - let errorResponse = (yield body.json()); - console.error("Error Logging In:", errorResponse.error.msg); - } - loggedIn = statusCode == 200; - return loggedIn; -}); -exports.telescopeLogin = telescopeLogin; -const handleLookupType = (platform) => { - return platform === platforms.Uno ? "id" : "gamer"; -}; -const checkForValidPlatform = (platform, gamertag) => { - if (!Object.values(platforms).includes(platform)) - throw new Error(`Platform '${platform}' is not valid.\nTry one of the following:\n${JSON.stringify(Object.values(platforms), null, 2)}`); - if (gamertag && isNaN(Number(gamertag)) && platform === platforms.Uno) - throw new Error(generics.UNO_NO_NUMERICAL_ID); -}; -const mapGamertagToPlatform = (gamertag, platform, steamSupport = false) => { - checkForValidPlatform(platform, gamertag); - const lookupType = handleLookupType(platform); - if (!steamSupport && platform === platforms.Steam) - throw new Error(generics.STEAM_UNSUPPORTED); - if (platform == platforms.Battlenet || - platform == platforms.Activision || - platform == platforms.Uno) - if (gamertag && gamertag.length > 0) - gamertag = cleanClientName(gamertag); - if (platform === platforms.Uno || platform === platforms.Activision) - platform = platforms.Uno; - return { gamertag, _platform: platform, lookupType }; -}; -class Endpoints { - constructor(game, gamertag, platform, mode, lookupType) { - this.fullData = () => `/stats/cod/v1/title/${this.game}/platform/${this.platform}/${this.lookupType}/${this.gamertag}/profile/type/${this.mode}`; - this.combatHistory = () => `/crm/cod/v2/title/${this.game}/platform/${this.platform}/${this.lookupType}/${this.gamertag}/matches/${this.mode}/start/0/end/0/details`; - this.combatHistoryWithDate = (startTime, endTime) => `/crm/cod/v2/title/${this.game}/platform/${this.platform}/${this.lookupType}/${this.gamertag}/matches/${this.mode}/start/${startTime}/end/${endTime}/details`; - this.breakdown = () => `/crm/cod/v2/title/${this.game}/platform/${this.platform}/${this.lookupType}/${this.gamertag}/matches/${this.mode}/start/0/end/0`; - this.breakdownWithDate = (startTime, endTime) => `/crm/cod/v2/title/${this.game}/platform/${this.platform}/${this.lookupType}/${this.gamertag}/matches/${this.mode}/start/${startTime}/end/${endTime}`; - this.matchInfo = (matchId) => `/crm/cod/v2/title/${this.game}/platform/${this.platform}/fullMatch/wz/${matchId}/en`; - this.seasonLoot = () => `/loot/title/${this.game}/platform/${this.platform}/${this.lookupType}/${this.gamertag}/status/en`; - this.mapList = () => `/ce/v1/title/${this.game}/platform/${this.platform}/gameType/${this.mode}/communityMapData/availability`; - this.purchasableItems = (gameId) => `/inventory/v1/title/${gameId}/platform/psn/purchasable/public/en`; - this.bundleInformation = (gameId, bundleId) => `/inventory/v1/title/${gameId}/bundle/${bundleId}/en`; - this.battlePassLoot = (season) => `/loot/title/${this.game}/platform/${this.platform}/list/loot_season_${season}/en`; - this.friendFeed = () => `/userfeed/v1/friendFeed/platform/${this.platform}/${this.lookupType}/${this.gamertag}/friendFeedEvents/en`; - this.eventFeed = () => `/userfeed/v1/friendFeed/rendered/en/${baseSsoToken}`; - this.loggedInIdentities = () => `/crm/cod/v2/identities/${baseSsoToken}`; - this.codPoints = () => `/inventory/v1/title/mw/platform/${this.platform}/${this.lookupType}/${this.gamertag}/currency`; - this.connectedAccounts = () => `/crm/cod/v2/accounts/platform/${this.platform}/${this.lookupType}/${this.gamertag}`; - this.settings = () => `/preferences/v1/platform/${this.platform}/${this.lookupType}/${this.gamertag}/list`; - this.friendAction = (action) => `/codfriends/v1/${action}/${this.platform}/${this.lookupType}/${this.gamertag}`; - this.search = () => `/crm/cod/v2/platform/${this.platform}/username/${this.gamertag}/search`; - this.game = game; - this.gamertag = gamertag; - this.platform = platform; - this.lookupType = lookupType; - this.mode = mode; - } -} -class TelescopeEndpoints { - constructor(game, unoId, mode) { - this.lifeTime = () => `/cr/v1/title/${this.game}/lifetime?language=english&unoId=${this.unoId}`; - this.matches = () => `/cr/v1/title/${this.game}/matches?language=english&unoId=${this.unoId}`; - this.match = (matchId) => `/cr/v1/title/${this.game}/match/${matchId}?language=english&unoId=${this.unoId}`; - this.game = game; - this.unoId = unoId; - this.mode = mode; - } -} -class WZ { - constructor() { - this.fullData = (gamertag, platform) => { var gamertag, platform, lookupType; return tslib_1.__awaiter(this, void 0, void 0, function* () { - ({ - gamertag, - _platform: platform, - lookupType - } = mapGamertagToPlatform(gamertag, platform)); - const endpoint = new Endpoints(games.ModernWarfare, gamertag, platform, modes.Warzone, lookupType); - return yield sendRequest(endpoint.fullData()); - }); }; - this.combatHistory = (gamertag, platform) => { var gamertag, platform, lookupType; return tslib_1.__awaiter(this, void 0, void 0, function* () { - ({ - gamertag, - _platform: platform, - lookupType - } = mapGamertagToPlatform(gamertag, platform)); - const endpoint = new Endpoints(games.ModernWarfare, gamertag, platform, modes.Warzone, lookupType); - return yield sendRequest(endpoint.combatHistory()); - }); }; - this.combatHistoryWithDate = (gamertag, startTime, endTime, platform) => { var gamertag, platform, lookupType; return tslib_1.__awaiter(this, void 0, void 0, function* () { - ({ - gamertag, - _platform: platform, - lookupType - } = mapGamertagToPlatform(gamertag, platform)); - const endpoint = new Endpoints(games.ModernWarfare, gamertag, platform, modes.Warzone, lookupType); - return yield sendRequest(endpoint.combatHistoryWithDate(startTime, endTime)); - }); }; - this.breakdown = (gamertag, platform) => { var gamertag, platform, lookupType; return tslib_1.__awaiter(this, void 0, void 0, function* () { - ({ - gamertag, - _platform: platform, - lookupType - } = mapGamertagToPlatform(gamertag, platform)); - const endpoint = new Endpoints(games.ModernWarfare, gamertag, platform, modes.Warzone, lookupType); - return yield sendRequest(endpoint.breakdown()); - }); }; - this.breakdownWithDate = (gamertag, startTime, endTime, platform) => { var gamertag, platform, lookupType; return tslib_1.__awaiter(this, void 0, void 0, function* () { - ({ - gamertag, - _platform: platform, - lookupType - } = mapGamertagToPlatform(gamertag, platform)); - const endpoint = new Endpoints(games.ModernWarfare, gamertag, platform, modes.Warzone, lookupType); - return yield sendRequest(endpoint.breakdownWithDate(startTime, endTime)); - }); }; - this.matchInfo = (matchId, platform) => { var gamertag, platform, lookupType; return tslib_1.__awaiter(this, void 0, void 0, function* () { - ({ - gamertag, - _platform: platform, - lookupType - } = mapGamertagToPlatform("", platform)); - const endpoint = new Endpoints(games.ModernWarfare, gamertag, platform, modes.Warzone, lookupType); - return yield sendRequest(endpoint.matchInfo(matchId)); - }); }; - this.cleanGameMode = (mode) => tslib_1.__awaiter(this, void 0, void 0, function* () { - //@ts-ignore - const foundMode = game_modes_json_1.default["modes"][mode]; - if (!foundMode) - return mode; - return foundMode; - }); - } -} -class MW { - constructor() { - this.fullData = (gamertag, platform) => { var gamertag, platform, lookupType; return tslib_1.__awaiter(this, void 0, void 0, function* () { - ({ - gamertag, - _platform: platform, - lookupType - } = mapGamertagToPlatform(gamertag, platform)); - const endpoint = new Endpoints(games.ModernWarfare, gamertag, platform, modes.Multiplayer, lookupType); - return yield sendRequest(endpoint.fullData()); - }); }; - this.combatHistory = (gamertag, platform) => { var gamertag, platform, lookupType; return tslib_1.__awaiter(this, void 0, void 0, function* () { - ({ - gamertag, - _platform: platform, - lookupType - } = mapGamertagToPlatform(gamertag, platform)); - const endpoint = new Endpoints(games.ModernWarfare, gamertag, platform, modes.Multiplayer, lookupType); - return yield sendRequest(endpoint.combatHistory()); - }); }; - this.combatHistoryWithDate = (gamertag, startTime, endTime, platform) => { var gamertag, platform, lookupType; return tslib_1.__awaiter(this, void 0, void 0, function* () { - ({ - gamertag, - _platform: platform, - lookupType - } = mapGamertagToPlatform(gamertag, platform)); - const endpoint = new Endpoints(games.ModernWarfare, gamertag, platform, modes.Multiplayer, lookupType); - return yield sendRequest(endpoint.combatHistoryWithDate(startTime, endTime)); - }); }; - this.breakdown = (gamertag, platform) => { var gamertag, platform, lookupType; return tslib_1.__awaiter(this, void 0, void 0, function* () { - ({ - gamertag, - _platform: platform, - lookupType - } = mapGamertagToPlatform(gamertag, platform)); - const endpoint = new Endpoints(games.ModernWarfare, gamertag, platform, modes.Multiplayer, lookupType); - return yield sendRequest(endpoint.breakdown()); - }); }; - this.breakdownWithDate = (gamertag, startTime, endTime, platform) => { var gamertag, platform, lookupType; return tslib_1.__awaiter(this, void 0, void 0, function* () { - ({ - gamertag, - _platform: platform, - lookupType - } = mapGamertagToPlatform(gamertag, platform)); - const endpoint = new Endpoints(games.ModernWarfare, gamertag, platform, modes.Multiplayer, lookupType); - return yield sendRequest(endpoint.breakdownWithDate(startTime, endTime)); - }); }; - this.matchInfo = (matchId, platform) => { var gamertag, platform, lookupType; return tslib_1.__awaiter(this, void 0, void 0, function* () { - ({ - gamertag, - _platform: platform, - lookupType - } = mapGamertagToPlatform("", platform)); - const endpoint = new Endpoints(games.ModernWarfare, gamertag, platform, modes.Multiplayer, lookupType); - return yield sendRequest(endpoint.matchInfo(matchId)); - }); }; - this.seasonloot = (gamertag, platform) => { var gamertag, platform, lookupType; return tslib_1.__awaiter(this, void 0, void 0, function* () { - ({ - gamertag, - _platform: platform, - lookupType - } = mapGamertagToPlatform(gamertag, platform)); - const endpoint = new Endpoints(games.ModernWarfare, gamertag, platform, modes.Multiplayer, lookupType); - return yield sendRequest(endpoint.seasonLoot()); - }); }; - this.mapList = (platform) => { var gamertag, platform, lookupType; return tslib_1.__awaiter(this, void 0, void 0, function* () { - ({ - gamertag, - _platform: platform, - lookupType - } = mapGamertagToPlatform("", platform)); - const endpoint = new Endpoints(games.ModernWarfare, gamertag, platform, modes.Multiplayer, lookupType); - return yield sendRequest(endpoint.mapList()); - }); }; - } -} -class MW2 { - constructor() { - this.fullData = (unoId) => tslib_1.__awaiter(this, void 0, void 0, function* () { - var { gamertag } = mapGamertagToPlatform(unoId, platforms.Uno, true); - const endpoint = new TelescopeEndpoints(telescopeGames.ModernWarfare2, gamertag, telescopeModes.Multiplayer); - return yield sendTelescopeRequest(endpoint.lifeTime()); - }); - this.matches = (unoId) => tslib_1.__awaiter(this, void 0, void 0, function* () { - var { gamertag } = mapGamertagToPlatform(unoId, platforms.Uno, true); - const endpoint = new TelescopeEndpoints(telescopeGames.ModernWarfare2, gamertag, telescopeModes.Multiplayer); - return yield sendTelescopeRequest(endpoint.matches()); - }); - this.matchInfo = (unoId, matchId) => tslib_1.__awaiter(this, void 0, void 0, function* () { - var { gamertag } = mapGamertagToPlatform(unoId, platforms.Uno, true); - const endpoint = new TelescopeEndpoints(telescopeGames.ModernWarfare2, gamertag, telescopeModes.Multiplayer); - return yield sendTelescopeRequest(endpoint.match(matchId)); - }); - } -} -class WZ2 { - constructor() { - this.fullData = (unoId) => tslib_1.__awaiter(this, void 0, void 0, function* () { - var { gamertag } = mapGamertagToPlatform(unoId, platforms.Uno, true); - const endpoint = new TelescopeEndpoints(telescopeGames.Warzone2, gamertag, telescopeModes.Multiplayer); - return yield sendTelescopeRequest(endpoint.lifeTime()); - }); - this.matches = (unoId) => tslib_1.__awaiter(this, void 0, void 0, function* () { - var { gamertag } = mapGamertagToPlatform(unoId, platforms.Uno, true); - const endpoint = new TelescopeEndpoints(telescopeGames.Warzone2, gamertag, telescopeModes.Multiplayer); - return yield sendTelescopeRequest(endpoint.matches()); - }); - this.matchInfo = (unoId, matchId) => tslib_1.__awaiter(this, void 0, void 0, function* () { - var { gamertag } = mapGamertagToPlatform(unoId, platforms.Uno, true); - const endpoint = new TelescopeEndpoints(telescopeGames.Warzone2, gamertag, telescopeModes.Multiplayer); - return yield sendTelescopeRequest(endpoint.match(matchId)); - }); - } -} -class MW3 { - constructor() { - this.fullData = (unoId) => tslib_1.__awaiter(this, void 0, void 0, function* () { - var { gamertag } = mapGamertagToPlatform(unoId, platforms.Uno, true); - const endpoint = new TelescopeEndpoints(telescopeGames.ModernWarfare3, gamertag, telescopeModes.Multiplayer); - return yield sendTelescopeRequest(endpoint.lifeTime()); - }); - this.matches = (unoId) => tslib_1.__awaiter(this, void 0, void 0, function* () { - var { gamertag } = mapGamertagToPlatform(unoId, platforms.Uno, true); - const endpoint = new TelescopeEndpoints(telescopeGames.ModernWarfare3, gamertag, telescopeModes.Multiplayer); - return yield sendTelescopeRequest(endpoint.matches()); - }); - this.matchInfo = (unoId, matchId) => tslib_1.__awaiter(this, void 0, void 0, function* () { - var { gamertag } = mapGamertagToPlatform(unoId, platforms.Uno, true); - const endpoint = new TelescopeEndpoints(telescopeGames.ModernWarfare3, gamertag, telescopeModes.Multiplayer); - return yield sendTelescopeRequest(endpoint.match(matchId)); - }); - } -} -class WZM { - constructor() { - this.fullData = (unoId) => tslib_1.__awaiter(this, void 0, void 0, function* () { - var { gamertag } = mapGamertagToPlatform(unoId, platforms.Uno, true); - const endpoint = new TelescopeEndpoints(telescopeGames.Mobile, gamertag, telescopeModes.Multiplayer); - return yield sendTelescopeRequest(endpoint.lifeTime()); - }); - this.matches = (unoId) => tslib_1.__awaiter(this, void 0, void 0, function* () { - var { gamertag } = mapGamertagToPlatform(unoId, platforms.Uno, true); - const endpoint = new TelescopeEndpoints(telescopeGames.Mobile, gamertag, telescopeModes.Multiplayer); - return yield sendTelescopeRequest(endpoint.matches()); - }); - this.matchInfo = (unoId, matchId) => tslib_1.__awaiter(this, void 0, void 0, function* () { - var { gamertag } = mapGamertagToPlatform(unoId, platforms.Uno, true); - const endpoint = new TelescopeEndpoints(telescopeGames.Mobile, gamertag, telescopeModes.Multiplayer); - return yield sendTelescopeRequest(endpoint.match(matchId)); - }); - } -} -class CW { - constructor() { - this.fullData = (gamertag, platform) => { var gamertag, platform, lookupType; return tslib_1.__awaiter(this, void 0, void 0, function* () { - ({ - gamertag, - _platform: platform, - lookupType - } = mapGamertagToPlatform(gamertag, platform)); - const endpoint = new Endpoints(games.ColdWar, gamertag, platform, modes.Multiplayer, lookupType); - return yield sendRequest(endpoint.fullData()); - }); }; - this.combatHistory = (gamertag, platform) => { var gamertag, platform, lookupType; return tslib_1.__awaiter(this, void 0, void 0, function* () { - ({ - gamertag, - _platform: platform, - lookupType - } = mapGamertagToPlatform(gamertag, platform)); - const endpoint = new Endpoints(games.ColdWar, gamertag, platform, modes.Multiplayer, lookupType); - return yield sendRequest(endpoint.combatHistory()); - }); }; - this.combatHistoryWithDate = (gamertag, startTime, endTime, platform) => { var gamertag, platform, lookupType; return tslib_1.__awaiter(this, void 0, void 0, function* () { - ({ - gamertag, - _platform: platform, - lookupType - } = mapGamertagToPlatform(gamertag, platform)); - const endpoint = new Endpoints(games.ColdWar, gamertag, platform, modes.Multiplayer, lookupType); - return yield sendRequest(endpoint.combatHistoryWithDate(startTime, endTime)); - }); }; - this.breakdown = (gamertag, platform) => { var gamertag, platform, lookupType; return tslib_1.__awaiter(this, void 0, void 0, function* () { - ({ - gamertag, - _platform: platform, - lookupType - } = mapGamertagToPlatform(gamertag, platform)); - const endpoint = new Endpoints(games.ColdWar, gamertag, platform, modes.Multiplayer, lookupType); - return yield sendRequest(endpoint.breakdown()); - }); }; - this.breakdownWithDate = (gamertag, startTime, endTime, platform) => { var gamertag, platform, lookupType; return tslib_1.__awaiter(this, void 0, void 0, function* () { - ({ - gamertag, - _platform: platform, - lookupType - } = mapGamertagToPlatform(gamertag, platform)); - const endpoint = new Endpoints(games.ColdWar, gamertag, platform, modes.Multiplayer, lookupType); - return yield sendRequest(endpoint.breakdownWithDate(startTime, endTime)); - }); }; - this.seasonloot = (gamertag, platform) => { var gamertag, platform, lookupType; return tslib_1.__awaiter(this, void 0, void 0, function* () { - ({ - gamertag, - _platform: platform, - lookupType - } = mapGamertagToPlatform(gamertag, platform)); - const endpoint = new Endpoints(games.ColdWar, gamertag, platform, modes.Multiplayer, lookupType); - return yield sendRequest(endpoint.seasonLoot()); - }); }; - this.mapList = (platform) => { var gamertag, platform, lookupType; return tslib_1.__awaiter(this, void 0, void 0, function* () { - ({ - gamertag, - _platform: platform, - lookupType - } = mapGamertagToPlatform("", platform)); - const endpoint = new Endpoints(games.ColdWar, gamertag, platform, modes.Multiplayer, lookupType); - return yield sendRequest(endpoint.mapList()); - }); }; - this.matchInfo = (matchId, platform) => { var gamertag, platform, lookupType; return tslib_1.__awaiter(this, void 0, void 0, function* () { - ({ - gamertag, - _platform: platform, - lookupType - } = mapGamertagToPlatform("", platform)); - const endpoint = new Endpoints(games.ColdWar, gamertag, platform, modes.Multiplayer, lookupType); - return yield sendRequest(endpoint.matchInfo(matchId)); - }); }; - } -} -class VG { - constructor() { - this.fullData = (gamertag, platform) => { var gamertag, platform, lookupType; return tslib_1.__awaiter(this, void 0, void 0, function* () { - ({ - gamertag, - _platform: platform, - lookupType - } = mapGamertagToPlatform(gamertag, platform)); - const endpoint = new Endpoints(games.Vanguard, gamertag, platform, modes.Multiplayer, lookupType); - return yield sendRequest(endpoint.fullData()); - }); }; - this.combatHistory = (gamertag, platform) => { var gamertag, platform, lookupType; return tslib_1.__awaiter(this, void 0, void 0, function* () { - ({ - gamertag, - _platform: platform, - lookupType - } = mapGamertagToPlatform(gamertag, platform)); - const endpoint = new Endpoints(games.Vanguard, gamertag, platform, modes.Multiplayer, lookupType); - return yield sendRequest(endpoint.combatHistory()); - }); }; - this.combatHistoryWithDate = (gamertag, startTime, endTime, platform) => { var gamertag, platform, lookupType; return tslib_1.__awaiter(this, void 0, void 0, function* () { - ({ - gamertag, - _platform: platform, - lookupType - } = mapGamertagToPlatform(gamertag, platform)); - const endpoint = new Endpoints(games.Vanguard, gamertag, platform, modes.Multiplayer, lookupType); - return yield sendRequest(endpoint.combatHistoryWithDate(startTime, endTime)); - }); }; - this.breakdown = (gamertag, platform) => { var gamertag, platform, lookupType; return tslib_1.__awaiter(this, void 0, void 0, function* () { - ({ - gamertag, - _platform: platform, - lookupType - } = mapGamertagToPlatform(gamertag, platform)); - const endpoint = new Endpoints(games.Vanguard, gamertag, platform, modes.Multiplayer, lookupType); - return yield sendRequest(endpoint.breakdown()); - }); }; - this.breakdownWithDate = (gamertag, startTime, endTime, platform) => { var gamertag, platform, lookupType; return tslib_1.__awaiter(this, void 0, void 0, function* () { - ({ - gamertag, - _platform: platform, - lookupType - } = mapGamertagToPlatform(gamertag, platform)); - const endpoint = new Endpoints(games.Vanguard, gamertag, platform, modes.Multiplayer, lookupType); - return yield sendRequest(endpoint.breakdownWithDate(startTime, endTime)); - }); }; - this.seasonloot = (gamertag, platform) => { var gamertag, platform, lookupType; return tslib_1.__awaiter(this, void 0, void 0, function* () { - ({ - gamertag, - _platform: platform, - lookupType - } = mapGamertagToPlatform(gamertag, platform)); - const endpoint = new Endpoints(games.Vanguard, gamertag, platform, modes.Multiplayer, lookupType); - return yield sendRequest(endpoint.seasonLoot()); - }); }; - this.mapList = (platform) => { var gamertag, platform, lookupType; return tslib_1.__awaiter(this, void 0, void 0, function* () { - ({ - gamertag, - _platform: platform, - lookupType - } = mapGamertagToPlatform("", platform)); - const endpoint = new Endpoints(games.Vanguard, gamertag, platform, modes.Multiplayer, lookupType); - return yield sendRequest(endpoint.mapList()); - }); }; - this.matchInfo = (matchId, platform) => { var gamertag, platform, lookupType; return tslib_1.__awaiter(this, void 0, void 0, function* () { - ({ - gamertag, - _platform: platform, - lookupType - } = mapGamertagToPlatform("", platform)); - const endpoint = new Endpoints(games.Vanguard, gamertag, platform, modes.Multiplayer, lookupType); - return yield sendRequest(endpoint.matchInfo(matchId)); - }); }; - } -} -class SHOP { - constructor() { - this.purchasableItems = (gameId) => tslib_1.__awaiter(this, void 0, void 0, function* () { - const endpoint = new Endpoints(games.NULL, "", platforms.NULL, modes.NULL, ""); - return yield sendRequest(endpoint.purchasableItems(gameId)); - }); - this.bundleInformation = (title, bundleId) => tslib_1.__awaiter(this, void 0, void 0, function* () { - const endpoint = new Endpoints(games.NULL, "", platforms.NULL, modes.NULL, ""); - return yield sendRequest(endpoint.bundleInformation(title, bundleId)); - }); - this.battlePassLoot = (title, season, platform) => { var gamertag, platform, lookupType; return tslib_1.__awaiter(this, void 0, void 0, function* () { - ({ - gamertag, - _platform: platform, - lookupType - } = mapGamertagToPlatform("", platform)); - const endpoint = new Endpoints(title, gamertag, platform, modes.NULL, lookupType); - return yield sendRequest(endpoint.battlePassLoot(season)); - }); }; - } -} -class USER { - constructor() { - this.friendFeed = (gamertag, platform) => { var gamertag, platform, lookupType; return tslib_1.__awaiter(this, void 0, void 0, function* () { - ({ - gamertag, - _platform: platform, - lookupType - } = mapGamertagToPlatform(gamertag, platform)); - const endpoint = new Endpoints(games.NULL, gamertag, platform, modes.NULL, lookupType); - return yield sendRequest(endpoint.friendFeed()); - }); }; - this.eventFeed = () => tslib_1.__awaiter(this, void 0, void 0, function* () { - const endpoint = new Endpoints(games.NULL, "", platforms.NULL, modes.NULL, ""); - return yield sendRequest(endpoint.eventFeed()); - }); - this.loggedInIdentities = () => tslib_1.__awaiter(this, void 0, void 0, function* () { - const endpoint = new Endpoints(games.NULL, "", platforms.NULL, modes.NULL, ""); - return yield sendRequest(endpoint.loggedInIdentities()); - }); - this.codPoints = (gamertag, platform) => { var gamertag, platform, lookupType; return tslib_1.__awaiter(this, void 0, void 0, function* () { - ({ - gamertag, - _platform: platform, - lookupType - } = mapGamertagToPlatform(gamertag, platform)); - const endpoint = new Endpoints(games.NULL, gamertag, platform, modes.NULL, lookupType); - return yield sendRequest(endpoint.codPoints()); - }); }; - this.connectedAccounts = (gamertag, platform) => { var gamertag, platform, lookupType; return tslib_1.__awaiter(this, void 0, void 0, function* () { - ({ - gamertag, - _platform: platform, - lookupType - } = mapGamertagToPlatform(gamertag, platform)); - const endpoint = new Endpoints(games.NULL, gamertag, platform, modes.NULL, lookupType); - return yield sendRequest(endpoint.connectedAccounts()); - }); }; - this.settings = (gamertag, platform) => { var gamertag, platform, lookupType; return tslib_1.__awaiter(this, void 0, void 0, function* () { - ({ - gamertag, - _platform: platform, - lookupType - } = mapGamertagToPlatform(gamertag, platform)); - const endpoint = new Endpoints(games.NULL, gamertag, platform, modes.NULL, lookupType); - return yield sendRequest(endpoint.settings()); - }); }; - this.friendAction = (gamertag, platform, action) => { var gamertag, platform, lookupType; return tslib_1.__awaiter(this, void 0, void 0, function* () { - ({ - gamertag, - _platform: platform, - lookupType - } = mapGamertagToPlatform(gamertag, platform)); - const endpoint = new Endpoints(games.NULL, gamertag, platform, modes.NULL, lookupType); - return yield sendPostRequest(endpoint.friendAction(action), "{}"); - }); }; - } -} -class ALT { - constructor() { - this.search = (gamertag, platform) => { var gamertag, platform, lookupType; return tslib_1.__awaiter(this, void 0, void 0, function* () { - ({ - gamertag, - _platform: platform, - lookupType - } = mapGamertagToPlatform(gamertag, platform, true)); - const endpoint = new Endpoints(games.NULL, gamertag, platform, modes.NULL, lookupType); - return yield sendRequest(endpoint.search()); - }); }; - this.cleanWeapon = (weapon) => tslib_1.__awaiter(this, void 0, void 0, function* () { - //@ts-ignore - const foundWeapon = weapon_ids_json_1.default["All Weapons"][weapon]; - if (!foundWeapon) - return weapon; - return foundWeapon; - }); - } -} -const Warzone = new WZ(); -exports.Warzone = Warzone; -const ModernWarfare = new MW(); -exports.ModernWarfare = ModernWarfare; -const ModernWarfare2 = new MW2(); -exports.ModernWarfare2 = ModernWarfare2; -const Warzone2 = new WZ2(); -exports.Warzone2 = Warzone2; -const ModernWarfare3 = new MW3(); -exports.ModernWarfare3 = ModernWarfare3; -const WarzoneMobile = new WZM(); -exports.WarzoneMobile = WarzoneMobile; -const ColdWar = new CW(); -exports.ColdWar = ColdWar; -const Vanguard = new VG(); -exports.Vanguard = Vanguard; -const Store = new SHOP(); -exports.Store = Store; -const Me = new USER(); -exports.Me = Me; -const Misc = new ALT(); -exports.Misc = Misc; -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/call-of-duty-api/dist/index.js.map b/node_modules/call-of-duty-api/dist/index.js.map deleted file mode 100644 index 6e5ad99..0000000 --- a/node_modules/call-of-duty-api/dist/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;AACA,mCAAiC;AACjC,wFAAuD;AACvD,wFAAmD;AAEnD,MAAM,SAAS,GACb,qHAAqH,CAAC;AACxH,IAAI,UAAU,GAAW,iDAAiD,CAA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,IAAI,GAAG,EAAE,CAAC;AAmBzB,4BAAQ;AAlBV,MAAM,cAAc,GAAG,IAAI,GAAG,EAAE,CAAC;AAgB/B,wCAAc;AAfhB,MAAM,aAAa,GAAG,IAAI,GAAG,EAAE,CAAC;AAgB9B,sCAAa;AAff,MAAM,OAAO,GAAG,IAAI,EAAE,EAAE,CAAC;AAiBvB,0BAAO;AAhBT,MAAM,QAAQ,GAAG,IAAI,EAAE,EAAE,CAAC;AAiBxB,4BAAQ;AAhBV,MAAM,KAAK,GAAG,IAAI,IAAI,EAAE,CAAC;AAiBvB,sBAAK;AAhBP,MAAM,EAAE,GAAG,IAAI,IAAI,EAAE,CAAC;AAiBpB,gBAAE;AAhBJ,MAAM,IAAI,GAAG,IAAI,GAAG,EAAE,CAAC;AAiBrB,oBAAI"} \ No newline at end of file diff --git a/node_modules/call-of-duty-api/dist/wz-data/game-modes.json b/node_modules/call-of-duty-api/dist/wz-data/game-modes.json deleted file mode 100644 index c113a63..0000000 --- a/node_modules/call-of-duty-api/dist/wz-data/game-modes.json +++ /dev/null @@ -1,153 +0,0 @@ -{ - "br_25": "BR Trios", - "br_dmz_38": "Plunder Quads", - "br_71": "BR Solos", - "br_74": "BR Trios", - "br_dmz_76": "Plunder Quads", - "br_77": "BR Scopes & Scatterguns", - "br_dmz_85": "Plunder Duos", - "br_86": "Realism Battle Royale", - "br_87": "BR Solos", - "br_88": "BR Duos", - "br_89": "BR Quads", - "br_dmz_104": "Blood Money", - "brtdm_113": "Warzone Rumble", - "brtdm_rmbl": "Warzone Rumble", - "br_brsolo": "BR Solos", - "br_brduos": "BR Duos", - "br_brtrios": "BR Trios", - "br_brquads": "BR Quads", - "br_br_real": "Realism Battle Royale", - "br_dmz_plnbld": "Plunder Blood Money", - "br_brthquad": "BR 200 Quads", - "br_brduostim_name2": "BR Stimulus Duos", - "br_brtriostim_name2": "BR Stimulus Trios", - "br_dmz_pluntrios": "Plunder Trios", - "br_dmz_plunquad": "Plunder Quads", - "br_jugg_brtriojugr": "Juggernaut Royal Trios", - "br_jugg_brquadjugr": "Juggernaut Royal Quads", - "br_mini_miniroyale": "Mini Royale", - "br_brbbsolo": "BR Buyback Solos", - "br_brbbduo": "BR Buyback Duos", - "br_brbbtrio": "BR Buyback Trios", - "br_brbbquad": "BR Buyback Quads", - "br_miniroyale": "Mini Royale", - "br_kingslayer_kingsltrios": "King Slayer Trios", - "br_truckwar_trwarsquads": "Armored Royale", - "br_dmz_plndtrios": "Plunder Trios", - "br_dmz_plndquad": "Plunder Quads", - "br_zxp_zmbroy": "Zombie Royale", - "br_jugg_jugpmpkn": "Juggourdnaut Royale", - "br_brsolohwn": "BR Solo Survivor", - "br_brduohwn": "BR Duo Die", - "br_brhwntrios": "BR Trick-Or-Trios", - "br_brhwnquad": "BR Monster Quads", - "br_dmz_plndcndy": "Plunder: Candy Collector", - "br_dmz_bldmnytrio": "Blood Money Trios", - "br_dmz_bldmnyquad": "Blood Money Quads", - "br_rebirth_rbrthduos": "Rebirth Duos", - "br_rebirth_rbrthtrios": "Rebirth Trios", - "br_rebirth_rbrthquad": "Rebirth Quads", - "br_mini_rebirth_mini_royale_solo": "Rebirth Mini Royale Solos", - "br_mini_rebirth_mini_royale_duos": "Rebirth Mini Royale Duos", - "br_mini_rebirth_mini_royale_trios": "Rebirth Mini Royale Trios", - "br_mini_rebirth_mini_royale_quads": "Rebirth Mini Royale Quads", - "brtdm_wzrumval2": "Warzone Rumble in the Sheets", - "br_dmz_plndval1": "Love And Plunder", - "br_rebirth_rbrthex": "Resurgence Extreme", - "br_exfiltrios": "Exfiltration Trios", - "br_rbrthduos": "Rebirth Resurgence Duos", - "br_rbrthquad": "Rebirth Resurgence Quads", - "br_brz_brduos": "BR Duos (Containment Protocol Event)", - "br_brz_brtrios": "BR Trios (Containment Protocol Event)", - "br_brz_brquads": "BR Quads (Containment Protocol Event)", - "br_kingslayer_rebirth_king_slayer": "Rebirth King Slayer", - "br_reveal_dov": "Destruction Of Verdansk Part 1", - "br_reveal_2_dov2": "Destruction Of Verdansk Part 2", - "br_brdov_dov2": "Destruction Of Verdansk Part 2 Verdansk '84", - "br_rebirth_resurgence_trios": "Verdansk Resurgence Trios", - "br_bodycount_pwergrb": "Power Grab", - "br_rebirth_resurgence_mini": "Verdansk Resurgence Mini", - "br_plnbld": "Blood Money", - "br_plndtrios": "Plunder Trios", - "br_payload_payload": "Payload", - "br_x2_br_reveal_x2_event/event_title_x2": "Battle of Verdansk", - "br_rumble_lua_menu_mp/clash": "Rebirth Payload", - "br_rumble_clash": "Clash", - "br_dbd_dbd": "Iron Trials '84", - "br_rebirth_rebirth_rex": "Rebirth Extreme", - "br_rebirth_shsnp_name3": "Rebirth Scopes & Scatterguns", - "br_payload_pay_prom": "Payload - Promenade", - "br_gxp_gov": "Ghosts Of Verdansk", - "br_dbd_iron_trials_solos": "Iron Trials Solos", - "br_dbd_iron_trials_duos": "Iron Trials Duos", - "br_dbd_iron_trials_trios": "Iron Trials Trios", - "br_dbd_iron_trials_quads": "Iron Trials Quads", - "br_buy_back_solo": "BR Buy Back Solos", - "br_buy_back_duos": "BR Buy Back Duos", - "br_buy_back_trios": "BR Buy Back Trios", - "br_buy_back_quads": "BR Buy Back Quads", - "br_rebirth_rust_1v1": "Rebirth Resurgence Duos", - "br_vov_op_flash": "Operation: Flashback", - "br_lep_br_lep_event/ltm_gamemode": "Final Hours of Verdansk", - "br_vg_royale_solo": "Vanguard Royale Solos", - "br_vg_royale_duos": "Vanguard Royale Duos", - "br_vg_royale_trios": "Vanguard Royale Trios", - "br_vg_royale_quads": "Vanguard Royale Quads", - "br_br_solo": "BR Solos", - "br_br_duos": "BR Duos", - "br_br_trios": "BR Trios", - "br_br_quads": "BR Quads", - "br_rebirth_vg_res_44": "Vanguard Resurgence", - "br_rebirth_cal_res_royale": "Caldera Resurgence Quads", - "br_dmz_plnduo": "Plunder Duos", - "br_dmz_vg_pln_trios": "Vanguard Plunder Trios", - "br_dmz_vg_pln_quads": "Vanguard Plunder Quads", - "br_rumble_clash_caldera": "Caldera Clash", - "br_dbd_playlist_wz320/rbrthdbd_solos": "Iron Trials Rebirth Solos", - "br_dbd_playlist_wz320/rbrthdbd_duos": "Iron Trials Rebirth Duos", - "br_dbd_playlist_wz320/rbrthdbd_trios": "Iron Trials Rebirth Trios", - "br_dbd_playlist_wz320/rbrthdbd_quads": "Iron Trials Rebirth Quads", - "br_rebirth_calderaresurgence": "Caldera Resurgence", - "br_rebirth_reverse_playlist_wz325/rbrthsolos": "Rebirth Resurgence Solos", - "br_payload_playlist_wz325/rbrthpayload": "Rebirth Payload", - "br_rebirth_cdl_resurgence_rebirth_quads": "CDL Resurgence Rebirth Quads", - "br_dmz_playlist_wz325/rbrthbmo_quads": "Rebirth Blood Money Quads", - "br_playlist_wz325/br_aprl_fool_name4": "Totally Normal BR", - "br_rebirth_playlist_wz325/afd_resurgence": "Totally Normal Rebirth", - "br_dbd_playlist_wz330/cal_iron_solos": "Iron Trials Solos", - "br_dbd_playlist_wz330/cal_iron_duos": "Iron Trials Duos", - "br_dbd_playlist_wz330/cal_iron_trios": "Iron Trials Trios", - "br_dbd_playlist_wz330/cal_iron_quads": "Iron Trials Quads", - "br_mendota_playlist_wz330/op_mon": "Operation Monarch", - "br_respect_playlist_wz335/respect": "Champions of Caldera", - "br_playlist_wz335/rebirthexfilttrios": "Rebirth Exfiltration Trios", - "br_rebirth_cal_res_trios": "Caldera Resurgence Trios", - "br_rebirth_cal_res_quads": "Caldera Resurgence Quads", - "br_rebirth_reverse_playlist_wz340/fortkeep_res_solo": "Fortunes Keep Resurgence Solos", - "br_rebirth_playlist_wz340/fortkeep_res_duos": "Fortunes Keep Resurgence Duos", - "br_rebirth_playlist_wz340/fortkeep_res_trios": "Fortunes Keep Resurgence Trios", - "br_rebirth_playlist_wz340/fortkeep_res_quad": "Fortunes Keep Resurgence Quads", - "br_gold_war_playlist_wz340/gld_pldr": "Golden Plunder", - "br_tdbd_playlist_wz345/cal_titanium_solo": "Titanium Trials Solos", - "br_tdbd_playlist_wz345/cal_titanium_duos": "Titanium Trials Duos", - "br_tdbd_playlist_wz345/cal_titanium_trios": "Titanium Trials Trios", - "br_tdbd_playlist_wz345/cal_titanium_quads": "Titanium Trials Quads", - "br_rebirth_playlist_wz340/fortkeep_extreme": "Fortunes Keep Extreme", - "br_rumble_playlist_wz340/storage_town_clash_title": "Storage Town Clash", - "br_zxp_playlist_wz345/rxp": "Rebirth Of The Dead", - "br_respect_playlist_wz345/respect_solo": "Champion of Caldera Solos", - "br_respect_playlist_wz345/respect_trios": "Champion Of Caldera Trios", - "br_wsow_br_trios": "World Series Of Warzone Battle Royale Trios", - "br_olaride_playlist_wz350/olaride": "Operation: Last Call", - "br_mmp_playlist_wz350/mmp": "Sticks & Stones", - "br_rebirth_cdlr:_fortune's_keep_trios": "CDLR: Fortune's Keep Trios", - "br_mini_minibrsolo": "Mini Royale Solos", - "br_mini_minibrduos": "Mini Royale Duos", - "br_mini_minibrtrios": "Mini Royale Trios", - "br_mini_minibrquads": "Mini Royale Quads", - "br_rebirth_dbd_reverse_playlist_wz355/res_trials_solos": "Rebirth Supreme Solos", - "br_rebirth_dbd_playlist_wz355/res_trials_duos": "Rebirth Supreme Duos", - "br_rebirth_dbd_playlist_wz355/res_trials_trios": "Rebirth Supreme Trios", - "br_rebirth_dbd_playlist_wz355/res_trials_quads": "Rebirth Supreme Quads" -} diff --git a/node_modules/call-of-duty-api/dist/wz-data/weapon-ids.json b/node_modules/call-of-duty-api/dist/wz-data/weapon-ids.json deleted file mode 100644 index affb910..0000000 --- a/node_modules/call-of-duty-api/dist/wz-data/weapon-ids.json +++ /dev/null @@ -1,236 +0,0 @@ -{ - "_MODERN WARFARE WEAPONS_": "iw8_", - "iw8_pi_golf21": "Pistol_X16", - "iw8_pi_papa320": "Pistol_M19", - "iw8_pi_decho": "Pistol_.50 GS", - "iw8_pi_mike1911": "Pistol_1911", - "iw8_pi_cpapa": "Pistol_.357 Magnum", - "iw8_pi_mike9": "Pistol_Renetti", - "iw8_pi_mike": "Pistol_Sykov", - "iw8_sm_mpapa5": "SMG_MP5", - "iw8_sm_beta": "SMG_PP19 Bizon", - "iw8_sm_augolf": "SMG_AUG", - "iw8_sm_papa90": "SMG_P90", - "iw8_sm_mpapa7": "SMG_MP7", - "iw8_sm_uzulu": "SMG_UZI", - "iw8_sm_charlie9": "SMG_CX-9", - "iw8_sm_smgolf45": "SMG_Striker 45", - "iw8_sm_victor": "SMG_Fennec", - "iw8_sm_secho": "SMG_ISO", - "iw8_me_riotshield": "Special_Riot Shield", - "iw8_knife": "Special_Knife", - "iw8_me_akimboblades": "Special_Dual Kodachis", - "iw8_me_akimboblunt": "Special_Kali Sticks", - "iw8_fists": "Special_Fists", - "iw8_knifestab": "Special_Combat Knife", - "iw8_fists_mp_zmb": "Special_Fists", - "iw8_ar_mike4": "AR_M4A1", - "iw8_ar_akilo47": "AR_AK-47", - "iw8_ar_asierra12": "AR_Oden", - "iw8_ar_falpha": "AR_FR 5.56", - "iw8_ar_mcharlie": "AR_M13", - "iw8_ar_kilo433": "AR_Kilo 141", - "iw8_ar_falima": "AR_FAL", - "iw8_ar_scharlie": "AR_FN Scar 17", - "iw8_ar_tango21": "AR_RAM-7", - "iw8_ar_sierra552": "AR_Grau 5.56", - "iw8_ar_galima": "AR_CR-56 AMAX", - "iw8_ar_anovember94": "AR_AN-94", - "iw8_ar_valpha": "AR_AS VAL", - "iw8_la_rpapa7": "Launcher_RPG-7", - "iw8_la_gromeo": "Launcher_PILA", - "iw8_la_juliet": "Launcher_JOKR", - "iw8_la_kgolf": "Launcher_Strela-P", - "iw8_la_mike32": "Launcher_MGL-32 Grenade Launcher", - "iw8_sn_mike14": "Marksman_EBR-14", - "iw8_sn_kilo98": "Marksman_Kar98k", - "iw8_sn_sbeta": "Marksman_MK2 Carbine", - "iw8_sn_golf28": "Marksman_SP-R 208", - "iw8_sn_crossbow": "Marksman_Crossbow", - "iw8_sn_sksierra": "Marksman_SKS", - "iw8_sn_romeo700": "Sniper_SP-R 208", - "iw8_sn_alpha50": "Sniper_AX-50", - "iw8_sn_delta": "Sniper_Dragunov", - "iw8_sn_hdromeo": "Sniper_HDR", - "iw8_sn_xmike109": "Sniper_Rytec AMR", - "iw8_sh_dpapa12": "Shotgun_R9-0", - "iw8_sh_oscar12": "Shotgun_Origin 12", - "iw8_sh_charlie725": "Shotgun_725", - "iw8_sh_romeo870": "Shotgun_Model 680", - "iw8_sh_mike26": "Shotgun_VLK Rogue", - "iw8_sh_aalpha12": "Shotgun_JAK-12", - "iw8_lm_kilo121": "LMG_M91", - "iw8_lm_pkilo": "LMG_PKM", - "iw8_lm_lima86": "LMG_SA87", - "iw8_lm_mgolf34": "LMG_MG34", - "iw8_lm_mgolf36": "LMG_Holger-26", - "iw8_lm_mkilo3": "LMG_Bruen Mk9", - "iw8_lm_sierrax": "LMG_FiNN LMG", - "iw8_lm_dblmg": "LMG_Minigun", - "iw8_lm_slima": "LMG_RAAL MG", - "_COLD WAR WEAPONS_": "iw8_t9", - "iw8_sn_t9quickscope": "Sniper_Pelington 703", - "iw8_sn_t9standard": "Sniper_LW3 - Tundra", - "iw8_sn_t9powersemi": "Sniper_M82", - "iw8_sn_t9damagesemi": "Sniper_Type 63", - "iw8_sn_t9precisionsemi": "Sniper_DMR 14", - "iw8_sn_t9cannon": "Sniper_ZRG 20mm", - "iw8_sn_t9crossbow": "Sniper_Crossbow", - "iw8_sn_t9accurate": "Sniper_Swiss K31", - "iw8_sn_t9explosivebow": "Sniper_Explosive Tip Crossbow", - "iw8_pi_t9burst": "Pistol_Diamatti", - "iw8_pi_t9revolver": "Pistol_Magnum", - "iw8_pi_t9semiauto": "Pistol_1911", - "iw8_pi_t9fullauto": "Pistol_AMP63", - "iw8_sm_t9standard": "SMG_MP5", - "iw8_sm_t9handling": "SMG_Milano 821", - "iw8_sm_t9heavy": "SMG_AK-74u", - "iw8_sm_t9fastfire": "SMG_MAC-10", - "iw8_sm_t9burst": "SMG_KSP 45", - "iw8_sm_t9capacity": "SMG_Bullfrog", - "iw8_sm_t9powerburst": "SMG_AUG", - "iw8_sm_t9accurate": "SMG_LC10", - "iw8_sm_t9spray": "SMG_PPsh-41", - "iw8_sm_t9nailgun": "SMG_Nailgun", - "iw8_ar_t9standard": "AR_XM4", - "iw8_ar_t9damage": "AR_AK-47", - "iw8_ar_t9accurate": "AR_Krig 6", - "iw8_ar_t9mobility": "AR_QBZ-83", - "iw8_ar_t9longburst": "AR_M16", - "iw8_ar_t9fasthandling": "AR_Groza", - "iw8_ar_t9fastfire": "AR_FFAR", - "iw8_ar_t9slowhandling": "AR_Fara 83", - "iw8_ar_t9slowfire": "AR_C58", - "iw8_ar_t9soviet": "AR_Vargo-S", - "iw8_sh_t9pump": "Shotgun_Hauer 77", - "iw8_sh_t9semiauto": "Shotgun_Gallo SA12", - "iw8_sh_t9fullauto": "Shotgun_Streetsweeper", - "iw8_lm_t9accurate": "LMG_Stoner 63", - "iw8_lm_t9slowfire": "LMG_M60", - "iw8_lm_t9light": "LMG_RPD", - "iw8_lm_t9fastfire": "LMG_Ameli", - "iw8_la_t9standard": "Launcher_Cigma 2", - "iw8_la_t9freefire": "Launcher_RPG-7", - "iw8_la_t9launcher": "Launcher_M79", - "iw8_me_t9sledgehammer": "Special_Sledgehammer", - "iw8_me_t9wakizashi": "Special_Wakizashi", - "iw8_me_t9loadout": "Special_Knife", - "iw8_me_t9machete": "Special_Machete", - "iw8_me_t9etool": "Special_Shovel", - "iw8_me_t9ballisticknife": "Special_Ballistic Knife", - "iw8_me_t9bat": "Special_Baseball Bat", - "_VANGUARD WEAPONS_": "s4_", - "s4_mr_moscar": "Sniper_3-Line Rifle", - "s4_mr_kalpha98": "Sniper_Kar98k", - "s4_mr_aromeo99": "Sniper_Type 99", - "s4_mr_ptango41": "Sniper_Gorenko Anti-Tank Rifle", - "s4_pi_malpha96": "Pistol_Machine Pistol", - "s4_pi_ttango33": "Pistol_RATT", - "s4_pi_mike1911": "Pistol_1911", - "s4_pi_wecho": "Pistol_Top Break", - "s4_pi_luniform08": "Pistol_Klauser", - "s4_sm_thotel": "SMG_M1928", - "s4_sm_stango5": "SMG_Sten", - "s4_sm_mpapa40": "SMG_Mp-40", - "s4_sm_ppapa41": "SMG_PPsh-41", - "s4_sm_owhiskey": "SMG_Owen Gun", - "s4_sm_tyankee100": "SMG_Type 100", - "s4_sm_wecho43": "SMG_Welgun", - "s4_sm_fromeo57": "SMG_Marco 5", - "s4_sm_guniform45": "SMG_H4 Blixen", - "s4_sm_aromeo43": "SMG_Armaguerra 43", - "s4_sm_salpha26": "SMG_RA 225", - "s4_ar_stango44": "AR_STG-44", - "s4_ar_bromeopg": "AR_ITRA Burst", - "s4_ar_balpha": "AR_BAR", - "s4_ar_chotel41": "AR_NZ-41", - "s4_ar_voscar": "AR_Volkssturmgewehr", - "s4_ar_asierra44": "AR_AS-44", - "s4_ar_fecho": "AR_Automaton", - "s4_ar_hyankee44": "AR_Cooper Carbine", - "s4_ar_kgolf40": "AR_KG M40", - "s4_ar_promeo45": "AR_Nikita AVT", - "s4_ar_emike1": "AR_EX1", - "s4_sh_becho": "Shotgun_Einhorn Revolving", - "s4_sh_bromeo5": "Shotgun_Gracey Auto", - "s4_sh_mike97": "Shotgun_Combat Shotgun", - "s4_sh_lindia98": "Shotgun_Double Barrel", - "s4_mg_mgolf42": "LMG_MG42", - "s4_mg_dpapa27": "LMG_DP27", - "s4_mg_bromeo37": "LMG_Bren", - "s4_mg_tyankee11": "LMG_Type11", - "s4_mg_malpha7": "LMG_Whitley", - "s4_mg_aalpha52": "LMG_UGM-8", - "s4_la_m1bravo": "Launcher_M1 Bazooka", - "s4_la_palpha": "Launcher_Panzerschreck", - "s4_la_palpha42": "Launcher_Panzerfaust", - "s4_la_mkilo1": "Launcher_Mk11 Launcher", - "s4_me_rindigo": "Melee_Combat Shield", - "s4_me_knife": "Melee_FS Fighting Knife", - "s4_me_leiomano": "Melee_Sawtooth", - "s4_me_katana": "Melee_Katanah", - "s4_me_axe": "Melee_Skål Crusher", - "s4_me_sledgehammer": "Melee_Sledgehammer", - "s4_mr_m1golf": "Marksman_M1 Grand", - "s4_mr_svictor40": "Marksman_SVT-40", - "s4_mr_gecho43": "Marksman_G-43", - "s4_mr_kalpha98": "Marksman_M1916", - "_Modern Warfare 2_": "iw9_", - "iw9_ar_mike4_mp": "AR_M4", - "iw9_ar_golf3_mp": "AR_Lachman-545", - "iw9_ar_mike4": "AR_M4 Variant", - "iw9_ar_kilo53_mp": "AR_Lachman-556", - "iw9_ar_schotel_mp": "AR_TAQ-V", - "iw9_ar_akilo74": "AR_Kastov-74U", - "iw9_ar_augolf": "AR_STB 556", - "iw9_ar_akilo": "AR_Kastov 762", - "iw9_ar_mike16": "AR_M16", - "iw9_ar_scharlie": "AR_TAQ-56", - "iw9_ar_scharlie_mp": "AR_TAQ-56", - "iw9_ar_akilo105": "AR_Kastov 545", - "iw9_sm_mpapa7_mp": "SMG_Vel 46", - "iw9_sm_victor_mp": "SMG_Fennec 45", - "iw9_sm_aviktor_mp": "SMG_Vaznev-9K", - "iw9_sm_alpha57_mp": "SMG_FSS Hurricane", - "iw9_sm_papa90_mp": "SMG_SMG_PDSW 528", - "iw9_sm_beta_mp": "SMG_Minibak", - "iw9_sm_apapa_mp": "SMG_MX9", - "iw9_sm_mpapa5_mp": "SMG_Lachmann 764", - "iw9_sh_mike1014": "Shotgun_Expedite 12", - "iw9_sh_charlie725_mp": "Shotgun_Lockwood 300", - "iw9_sh_mbravo_mp": "Shotgun_Bryson 800", - "iw9_sh_mviktor_mp": "Shotgun_Bryson 890", - "iw9_sn_mromeo": "Sniper_MCPR-300", - "iw9_sn_limax": "Sniper_Signal 50", - "iw9_sn_xmike2010": "Sniper_SP-X 80", - "iw9_dm_sbeta_mp": "Sniper_Lockwood MK2", - "iw9_dm_mike24_mp": "Sniper_SP-R 208", - "iw9_pi_papa220_mp": "Pistol_P890", - "iw9_pi_golf18": "Pistol_X13", - "iw9_pi_decho_mp": "Pistol_.50 GS", - "iw9_pi_golf17_mp": "Pistol_X12", - "iw9_pi_swhiskey_mp": "Pistol_Basilisk", - "iw9_me_climbfists": "Melee_Fists", - "iw9_me_riotshield_mp": "Melee_Riot Shield", - "throwingknife_mp": "Melee_Throwing Knife", - "iw9_la_juliet_mp": "Launcher_JOKR", - "iw9_la_gromeo_mp": "Launcher_PILA", - "iw9_la_rpapa7_mp": "Launcher_RPG-7", - "iw9_la_kgolf_mp": "Launcher_Strella-P", - "iw9_lm_rkilo_mp": "LMG_RPK", - "iw9_lm_rkilo": "LMG_RPK", - "iw9_lm_ahotel_mp": "LMG_HCR 56", - "iw9_lm_slima_mp": "LMG_RAAL MG", - "iw9_lm_slima": "LMG_RAAL MG", - "iw9_lm_ngolf7_mp": "LMG_SAKIN MG38", - "iw9_lm_rkilo21_mp": "LMG_Rapp H", - "iw9_lm_foxtrot": "LMG_556 Icarus", - "iw9_br_msecho_mp": "BR_FTac Recon", - "iw9_br_msecho": "BR_FTac Recon", - "iw9_br_soscar14": "BR_SO-14", - "iw9_dm_pgolf1_mp": "DMR_LM-S", - "iw9_dm_la700": "DMR_LA-B 330", - "iw9_dm_sa700": "DMR_SA-B 50", - "iw9_dm_scromeo": "DMR_TAQ-M", - "iw9_dm_mike14": "DMR_ERB-14" -} diff --git a/node_modules/call-of-duty-api/package.json b/node_modules/call-of-duty-api/package.json deleted file mode 100644 index 4bc5bb2..0000000 --- a/node_modules/call-of-duty-api/package.json +++ /dev/null @@ -1,63 +0,0 @@ -{ - "name": "call-of-duty-api", - "version": "4.1.0", - "description": "NodeJS Wrapper for the Call Of Duty API.", - "main": "dist/index", - "types": "dist/index", - "files": [ - "dist" - ], - "scripts": { - "prebuild": "rimraf dist", - "build": "tsc", - "prepublishOnly": "npm run build" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/Lierrmm/Node-CallOfDuty.git" - }, - "keywords": [ - "br", - "warzone", - "call-of-duty", - "call of duty", - "modern warfare", - "black ops", - "iw", - "battle royale", - "Cold War", - "cw", - "3arc", - "vanguard", - "Treyarch", - "Infinity Ward", - "Sledgehammer", - "Raven", - "Modern Warfare 2", - "Modern Warfare 3", - "Warzone 2", - "Blue Moon", - "Beenox", - "Warzone Mobile", - "WZM" - ], - "bugs": { - "url": "https://github.com/Lierrmm/Node-CallOfDuty/issues" - }, - "homepage": "https://codapi.dev", - "funding": { - "type": "github", - "url": "https://github.com/sponsors/Lierrmm" - }, - "author": "Liam Gaskell", - "license": "MIT", - "devDependencies": { - "@types/node": "^18.11.4", - "rimraf": "^3.0.2", - "typescript": "^4.8.4" - }, - "dependencies": { - "tslib": "^2.4.0", - "undici": "^5.12.0" - } -} diff --git a/node_modules/chalk/index.d.ts b/node_modules/chalk/index.d.ts deleted file mode 100644 index 9cd88f3..0000000 --- a/node_modules/chalk/index.d.ts +++ /dev/null @@ -1,415 +0,0 @@ -/** -Basic foreground colors. - -[More colors here.](https://github.com/chalk/chalk/blob/master/readme.md#256-and-truecolor-color-support) -*/ -declare type ForegroundColor = - | 'black' - | 'red' - | 'green' - | 'yellow' - | 'blue' - | 'magenta' - | 'cyan' - | 'white' - | 'gray' - | 'grey' - | 'blackBright' - | 'redBright' - | 'greenBright' - | 'yellowBright' - | 'blueBright' - | 'magentaBright' - | 'cyanBright' - | 'whiteBright'; - -/** -Basic background colors. - -[More colors here.](https://github.com/chalk/chalk/blob/master/readme.md#256-and-truecolor-color-support) -*/ -declare type BackgroundColor = - | 'bgBlack' - | 'bgRed' - | 'bgGreen' - | 'bgYellow' - | 'bgBlue' - | 'bgMagenta' - | 'bgCyan' - | 'bgWhite' - | 'bgGray' - | 'bgGrey' - | 'bgBlackBright' - | 'bgRedBright' - | 'bgGreenBright' - | 'bgYellowBright' - | 'bgBlueBright' - | 'bgMagentaBright' - | 'bgCyanBright' - | 'bgWhiteBright'; - -/** -Basic colors. - -[More colors here.](https://github.com/chalk/chalk/blob/master/readme.md#256-and-truecolor-color-support) -*/ -declare type Color = ForegroundColor | BackgroundColor; - -declare type Modifiers = - | 'reset' - | 'bold' - | 'dim' - | 'italic' - | 'underline' - | 'inverse' - | 'hidden' - | 'strikethrough' - | 'visible'; - -declare namespace chalk { - /** - Levels: - - `0` - All colors disabled. - - `1` - Basic 16 colors support. - - `2` - ANSI 256 colors support. - - `3` - Truecolor 16 million colors support. - */ - type Level = 0 | 1 | 2 | 3; - - interface Options { - /** - Specify the color support for Chalk. - - By default, color support is automatically detected based on the environment. - - Levels: - - `0` - All colors disabled. - - `1` - Basic 16 colors support. - - `2` - ANSI 256 colors support. - - `3` - Truecolor 16 million colors support. - */ - level?: Level; - } - - /** - Return a new Chalk instance. - */ - type Instance = new (options?: Options) => Chalk; - - /** - Detect whether the terminal supports color. - */ - interface ColorSupport { - /** - The color level used by Chalk. - */ - level: Level; - - /** - Return whether Chalk supports basic 16 colors. - */ - hasBasic: boolean; - - /** - Return whether Chalk supports ANSI 256 colors. - */ - has256: boolean; - - /** - Return whether Chalk supports Truecolor 16 million colors. - */ - has16m: boolean; - } - - interface ChalkFunction { - /** - Use a template string. - - @remarks Template literals are unsupported for nested calls (see [issue #341](https://github.com/chalk/chalk/issues/341)) - - @example - ``` - import chalk = require('chalk'); - - log(chalk` - CPU: {red ${cpu.totalPercent}%} - RAM: {green ${ram.used / ram.total * 100}%} - DISK: {rgb(255,131,0) ${disk.used / disk.total * 100}%} - `); - ``` - - @example - ``` - import chalk = require('chalk'); - - log(chalk.red.bgBlack`2 + 3 = {bold ${2 + 3}}`) - ``` - */ - (text: TemplateStringsArray, ...placeholders: unknown[]): string; - - (...text: unknown[]): string; - } - - interface Chalk extends ChalkFunction { - /** - Return a new Chalk instance. - */ - Instance: Instance; - - /** - The color support for Chalk. - - By default, color support is automatically detected based on the environment. - - Levels: - - `0` - All colors disabled. - - `1` - Basic 16 colors support. - - `2` - ANSI 256 colors support. - - `3` - Truecolor 16 million colors support. - */ - level: Level; - - /** - Use HEX value to set text color. - - @param color - Hexadecimal value representing the desired color. - - @example - ``` - import chalk = require('chalk'); - - chalk.hex('#DEADED'); - ``` - */ - hex(color: string): Chalk; - - /** - Use keyword color value to set text color. - - @param color - Keyword value representing the desired color. - - @example - ``` - import chalk = require('chalk'); - - chalk.keyword('orange'); - ``` - */ - keyword(color: string): Chalk; - - /** - Use RGB values to set text color. - */ - rgb(red: number, green: number, blue: number): Chalk; - - /** - Use HSL values to set text color. - */ - hsl(hue: number, saturation: number, lightness: number): Chalk; - - /** - Use HSV values to set text color. - */ - hsv(hue: number, saturation: number, value: number): Chalk; - - /** - Use HWB values to set text color. - */ - hwb(hue: number, whiteness: number, blackness: number): Chalk; - - /** - Use a [Select/Set Graphic Rendition](https://en.wikipedia.org/wiki/ANSI_escape_code#SGR_parameters) (SGR) [color code number](https://en.wikipedia.org/wiki/ANSI_escape_code#3/4_bit) to set text color. - - 30 <= code && code < 38 || 90 <= code && code < 98 - For example, 31 for red, 91 for redBright. - */ - ansi(code: number): Chalk; - - /** - Use a [8-bit unsigned number](https://en.wikipedia.org/wiki/ANSI_escape_code#8-bit) to set text color. - */ - ansi256(index: number): Chalk; - - /** - Use HEX value to set background color. - - @param color - Hexadecimal value representing the desired color. - - @example - ``` - import chalk = require('chalk'); - - chalk.bgHex('#DEADED'); - ``` - */ - bgHex(color: string): Chalk; - - /** - Use keyword color value to set background color. - - @param color - Keyword value representing the desired color. - - @example - ``` - import chalk = require('chalk'); - - chalk.bgKeyword('orange'); - ``` - */ - bgKeyword(color: string): Chalk; - - /** - Use RGB values to set background color. - */ - bgRgb(red: number, green: number, blue: number): Chalk; - - /** - Use HSL values to set background color. - */ - bgHsl(hue: number, saturation: number, lightness: number): Chalk; - - /** - Use HSV values to set background color. - */ - bgHsv(hue: number, saturation: number, value: number): Chalk; - - /** - Use HWB values to set background color. - */ - bgHwb(hue: number, whiteness: number, blackness: number): Chalk; - - /** - Use a [Select/Set Graphic Rendition](https://en.wikipedia.org/wiki/ANSI_escape_code#SGR_parameters) (SGR) [color code number](https://en.wikipedia.org/wiki/ANSI_escape_code#3/4_bit) to set background color. - - 30 <= code && code < 38 || 90 <= code && code < 98 - For example, 31 for red, 91 for redBright. - Use the foreground code, not the background code (for example, not 41, nor 101). - */ - bgAnsi(code: number): Chalk; - - /** - Use a [8-bit unsigned number](https://en.wikipedia.org/wiki/ANSI_escape_code#8-bit) to set background color. - */ - bgAnsi256(index: number): Chalk; - - /** - Modifier: Resets the current color chain. - */ - readonly reset: Chalk; - - /** - Modifier: Make text bold. - */ - readonly bold: Chalk; - - /** - Modifier: Emitting only a small amount of light. - */ - readonly dim: Chalk; - - /** - Modifier: Make text italic. (Not widely supported) - */ - readonly italic: Chalk; - - /** - Modifier: Make text underline. (Not widely supported) - */ - readonly underline: Chalk; - - /** - Modifier: Inverse background and foreground colors. - */ - readonly inverse: Chalk; - - /** - Modifier: Prints the text, but makes it invisible. - */ - readonly hidden: Chalk; - - /** - Modifier: Puts a horizontal line through the center of the text. (Not widely supported) - */ - readonly strikethrough: Chalk; - - /** - Modifier: Prints the text only when Chalk has a color support level > 0. - Can be useful for things that are purely cosmetic. - */ - readonly visible: Chalk; - - readonly black: Chalk; - readonly red: Chalk; - readonly green: Chalk; - readonly yellow: Chalk; - readonly blue: Chalk; - readonly magenta: Chalk; - readonly cyan: Chalk; - readonly white: Chalk; - - /* - Alias for `blackBright`. - */ - readonly gray: Chalk; - - /* - Alias for `blackBright`. - */ - readonly grey: Chalk; - - readonly blackBright: Chalk; - readonly redBright: Chalk; - readonly greenBright: Chalk; - readonly yellowBright: Chalk; - readonly blueBright: Chalk; - readonly magentaBright: Chalk; - readonly cyanBright: Chalk; - readonly whiteBright: Chalk; - - readonly bgBlack: Chalk; - readonly bgRed: Chalk; - readonly bgGreen: Chalk; - readonly bgYellow: Chalk; - readonly bgBlue: Chalk; - readonly bgMagenta: Chalk; - readonly bgCyan: Chalk; - readonly bgWhite: Chalk; - - /* - Alias for `bgBlackBright`. - */ - readonly bgGray: Chalk; - - /* - Alias for `bgBlackBright`. - */ - readonly bgGrey: Chalk; - - readonly bgBlackBright: Chalk; - readonly bgRedBright: Chalk; - readonly bgGreenBright: Chalk; - readonly bgYellowBright: Chalk; - readonly bgBlueBright: Chalk; - readonly bgMagentaBright: Chalk; - readonly bgCyanBright: Chalk; - readonly bgWhiteBright: Chalk; - } -} - -/** -Main Chalk object that allows to chain styles together. -Call the last one as a method with a string argument. -Order doesn't matter, and later styles take precedent in case of a conflict. -This simply means that `chalk.red.yellow.green` is equivalent to `chalk.green`. -*/ -declare const chalk: chalk.Chalk & chalk.ChalkFunction & { - supportsColor: chalk.ColorSupport | false; - Level: chalk.Level; - Color: Color; - ForegroundColor: ForegroundColor; - BackgroundColor: BackgroundColor; - Modifiers: Modifiers; - stderr: chalk.Chalk & {supportsColor: chalk.ColorSupport | false}; -}; - -export = chalk; diff --git a/node_modules/chalk/node_modules/ansi-styles/index.d.ts b/node_modules/chalk/node_modules/ansi-styles/index.d.ts deleted file mode 100644 index 44a907e..0000000 --- a/node_modules/chalk/node_modules/ansi-styles/index.d.ts +++ /dev/null @@ -1,345 +0,0 @@ -declare type CSSColor = - | 'aliceblue' - | 'antiquewhite' - | 'aqua' - | 'aquamarine' - | 'azure' - | 'beige' - | 'bisque' - | 'black' - | 'blanchedalmond' - | 'blue' - | 'blueviolet' - | 'brown' - | 'burlywood' - | 'cadetblue' - | 'chartreuse' - | 'chocolate' - | 'coral' - | 'cornflowerblue' - | 'cornsilk' - | 'crimson' - | 'cyan' - | 'darkblue' - | 'darkcyan' - | 'darkgoldenrod' - | 'darkgray' - | 'darkgreen' - | 'darkgrey' - | 'darkkhaki' - | 'darkmagenta' - | 'darkolivegreen' - | 'darkorange' - | 'darkorchid' - | 'darkred' - | 'darksalmon' - | 'darkseagreen' - | 'darkslateblue' - | 'darkslategray' - | 'darkslategrey' - | 'darkturquoise' - | 'darkviolet' - | 'deeppink' - | 'deepskyblue' - | 'dimgray' - | 'dimgrey' - | 'dodgerblue' - | 'firebrick' - | 'floralwhite' - | 'forestgreen' - | 'fuchsia' - | 'gainsboro' - | 'ghostwhite' - | 'gold' - | 'goldenrod' - | 'gray' - | 'green' - | 'greenyellow' - | 'grey' - | 'honeydew' - | 'hotpink' - | 'indianred' - | 'indigo' - | 'ivory' - | 'khaki' - | 'lavender' - | 'lavenderblush' - | 'lawngreen' - | 'lemonchiffon' - | 'lightblue' - | 'lightcoral' - | 'lightcyan' - | 'lightgoldenrodyellow' - | 'lightgray' - | 'lightgreen' - | 'lightgrey' - | 'lightpink' - | 'lightsalmon' - | 'lightseagreen' - | 'lightskyblue' - | 'lightslategray' - | 'lightslategrey' - | 'lightsteelblue' - | 'lightyellow' - | 'lime' - | 'limegreen' - | 'linen' - | 'magenta' - | 'maroon' - | 'mediumaquamarine' - | 'mediumblue' - | 'mediumorchid' - | 'mediumpurple' - | 'mediumseagreen' - | 'mediumslateblue' - | 'mediumspringgreen' - | 'mediumturquoise' - | 'mediumvioletred' - | 'midnightblue' - | 'mintcream' - | 'mistyrose' - | 'moccasin' - | 'navajowhite' - | 'navy' - | 'oldlace' - | 'olive' - | 'olivedrab' - | 'orange' - | 'orangered' - | 'orchid' - | 'palegoldenrod' - | 'palegreen' - | 'paleturquoise' - | 'palevioletred' - | 'papayawhip' - | 'peachpuff' - | 'peru' - | 'pink' - | 'plum' - | 'powderblue' - | 'purple' - | 'rebeccapurple' - | 'red' - | 'rosybrown' - | 'royalblue' - | 'saddlebrown' - | 'salmon' - | 'sandybrown' - | 'seagreen' - | 'seashell' - | 'sienna' - | 'silver' - | 'skyblue' - | 'slateblue' - | 'slategray' - | 'slategrey' - | 'snow' - | 'springgreen' - | 'steelblue' - | 'tan' - | 'teal' - | 'thistle' - | 'tomato' - | 'turquoise' - | 'violet' - | 'wheat' - | 'white' - | 'whitesmoke' - | 'yellow' - | 'yellowgreen'; - -declare namespace ansiStyles { - interface ColorConvert { - /** - The RGB color space. - - @param red - (`0`-`255`) - @param green - (`0`-`255`) - @param blue - (`0`-`255`) - */ - rgb(red: number, green: number, blue: number): string; - - /** - The RGB HEX color space. - - @param hex - A hexadecimal string containing RGB data. - */ - hex(hex: string): string; - - /** - @param keyword - A CSS color name. - */ - keyword(keyword: CSSColor): string; - - /** - The HSL color space. - - @param hue - (`0`-`360`) - @param saturation - (`0`-`100`) - @param lightness - (`0`-`100`) - */ - hsl(hue: number, saturation: number, lightness: number): string; - - /** - The HSV color space. - - @param hue - (`0`-`360`) - @param saturation - (`0`-`100`) - @param value - (`0`-`100`) - */ - hsv(hue: number, saturation: number, value: number): string; - - /** - The HSV color space. - - @param hue - (`0`-`360`) - @param whiteness - (`0`-`100`) - @param blackness - (`0`-`100`) - */ - hwb(hue: number, whiteness: number, blackness: number): string; - - /** - Use a [4-bit unsigned number](https://en.wikipedia.org/wiki/ANSI_escape_code#3/4-bit) to set text color. - */ - ansi(ansi: number): string; - - /** - Use an [8-bit unsigned number](https://en.wikipedia.org/wiki/ANSI_escape_code#8-bit) to set text color. - */ - ansi256(ansi: number): string; - } - - interface CSPair { - /** - The ANSI terminal control sequence for starting this style. - */ - readonly open: string; - - /** - The ANSI terminal control sequence for ending this style. - */ - readonly close: string; - } - - interface ColorBase { - readonly ansi: ColorConvert; - readonly ansi256: ColorConvert; - readonly ansi16m: ColorConvert; - - /** - The ANSI terminal control sequence for ending this color. - */ - readonly close: string; - } - - interface Modifier { - /** - Resets the current color chain. - */ - readonly reset: CSPair; - - /** - Make text bold. - */ - readonly bold: CSPair; - - /** - Emitting only a small amount of light. - */ - readonly dim: CSPair; - - /** - Make text italic. (Not widely supported) - */ - readonly italic: CSPair; - - /** - Make text underline. (Not widely supported) - */ - readonly underline: CSPair; - - /** - Inverse background and foreground colors. - */ - readonly inverse: CSPair; - - /** - Prints the text, but makes it invisible. - */ - readonly hidden: CSPair; - - /** - Puts a horizontal line through the center of the text. (Not widely supported) - */ - readonly strikethrough: CSPair; - } - - interface ForegroundColor { - readonly black: CSPair; - readonly red: CSPair; - readonly green: CSPair; - readonly yellow: CSPair; - readonly blue: CSPair; - readonly cyan: CSPair; - readonly magenta: CSPair; - readonly white: CSPair; - - /** - Alias for `blackBright`. - */ - readonly gray: CSPair; - - /** - Alias for `blackBright`. - */ - readonly grey: CSPair; - - readonly blackBright: CSPair; - readonly redBright: CSPair; - readonly greenBright: CSPair; - readonly yellowBright: CSPair; - readonly blueBright: CSPair; - readonly cyanBright: CSPair; - readonly magentaBright: CSPair; - readonly whiteBright: CSPair; - } - - interface BackgroundColor { - readonly bgBlack: CSPair; - readonly bgRed: CSPair; - readonly bgGreen: CSPair; - readonly bgYellow: CSPair; - readonly bgBlue: CSPair; - readonly bgCyan: CSPair; - readonly bgMagenta: CSPair; - readonly bgWhite: CSPair; - - /** - Alias for `bgBlackBright`. - */ - readonly bgGray: CSPair; - - /** - Alias for `bgBlackBright`. - */ - readonly bgGrey: CSPair; - - readonly bgBlackBright: CSPair; - readonly bgRedBright: CSPair; - readonly bgGreenBright: CSPair; - readonly bgYellowBright: CSPair; - readonly bgBlueBright: CSPair; - readonly bgCyanBright: CSPair; - readonly bgMagentaBright: CSPair; - readonly bgWhiteBright: CSPair; - } -} - -declare const ansiStyles: { - readonly modifier: ansiStyles.Modifier; - readonly color: ansiStyles.ForegroundColor & ansiStyles.ColorBase; - readonly bgColor: ansiStyles.BackgroundColor & ansiStyles.ColorBase; - readonly codes: ReadonlyMap<number, number>; -} & ansiStyles.BackgroundColor & ansiStyles.ForegroundColor & ansiStyles.Modifier; - -export = ansiStyles; diff --git a/node_modules/chalk/node_modules/ansi-styles/index.js b/node_modules/chalk/node_modules/ansi-styles/index.js deleted file mode 100644 index 5d82581..0000000 --- a/node_modules/chalk/node_modules/ansi-styles/index.js +++ /dev/null @@ -1,163 +0,0 @@ -'use strict'; - -const wrapAnsi16 = (fn, offset) => (...args) => { - const code = fn(...args); - return `\u001B[${code + offset}m`; -}; - -const wrapAnsi256 = (fn, offset) => (...args) => { - const code = fn(...args); - return `\u001B[${38 + offset};5;${code}m`; -}; - -const wrapAnsi16m = (fn, offset) => (...args) => { - const rgb = fn(...args); - return `\u001B[${38 + offset};2;${rgb[0]};${rgb[1]};${rgb[2]}m`; -}; - -const ansi2ansi = n => n; -const rgb2rgb = (r, g, b) => [r, g, b]; - -const setLazyProperty = (object, property, get) => { - Object.defineProperty(object, property, { - get: () => { - const value = get(); - - Object.defineProperty(object, property, { - value, - enumerable: true, - configurable: true - }); - - return value; - }, - enumerable: true, - configurable: true - }); -}; - -/** @type {typeof import('color-convert')} */ -let colorConvert; -const makeDynamicStyles = (wrap, targetSpace, identity, isBackground) => { - if (colorConvert === undefined) { - colorConvert = require('color-convert'); - } - - const offset = isBackground ? 10 : 0; - const styles = {}; - - for (const [sourceSpace, suite] of Object.entries(colorConvert)) { - const name = sourceSpace === 'ansi16' ? 'ansi' : sourceSpace; - if (sourceSpace === targetSpace) { - styles[name] = wrap(identity, offset); - } else if (typeof suite === 'object') { - styles[name] = wrap(suite[targetSpace], offset); - } - } - - return styles; -}; - -function assembleStyles() { - const codes = new Map(); - const styles = { - modifier: { - reset: [0, 0], - // 21 isn't widely supported and 22 does the same thing - bold: [1, 22], - dim: [2, 22], - italic: [3, 23], - underline: [4, 24], - inverse: [7, 27], - hidden: [8, 28], - strikethrough: [9, 29] - }, - color: { - black: [30, 39], - red: [31, 39], - green: [32, 39], - yellow: [33, 39], - blue: [34, 39], - magenta: [35, 39], - cyan: [36, 39], - white: [37, 39], - - // Bright color - blackBright: [90, 39], - redBright: [91, 39], - greenBright: [92, 39], - yellowBright: [93, 39], - blueBright: [94, 39], - magentaBright: [95, 39], - cyanBright: [96, 39], - whiteBright: [97, 39] - }, - bgColor: { - bgBlack: [40, 49], - bgRed: [41, 49], - bgGreen: [42, 49], - bgYellow: [43, 49], - bgBlue: [44, 49], - bgMagenta: [45, 49], - bgCyan: [46, 49], - bgWhite: [47, 49], - - // Bright color - bgBlackBright: [100, 49], - bgRedBright: [101, 49], - bgGreenBright: [102, 49], - bgYellowBright: [103, 49], - bgBlueBright: [104, 49], - bgMagentaBright: [105, 49], - bgCyanBright: [106, 49], - bgWhiteBright: [107, 49] - } - }; - - // Alias bright black as gray (and grey) - styles.color.gray = styles.color.blackBright; - styles.bgColor.bgGray = styles.bgColor.bgBlackBright; - styles.color.grey = styles.color.blackBright; - styles.bgColor.bgGrey = styles.bgColor.bgBlackBright; - - for (const [groupName, group] of Object.entries(styles)) { - for (const [styleName, style] of Object.entries(group)) { - styles[styleName] = { - open: `\u001B[${style[0]}m`, - close: `\u001B[${style[1]}m` - }; - - group[styleName] = styles[styleName]; - - codes.set(style[0], style[1]); - } - - Object.defineProperty(styles, groupName, { - value: group, - enumerable: false - }); - } - - Object.defineProperty(styles, 'codes', { - value: codes, - enumerable: false - }); - - styles.color.close = '\u001B[39m'; - styles.bgColor.close = '\u001B[49m'; - - setLazyProperty(styles.color, 'ansi', () => makeDynamicStyles(wrapAnsi16, 'ansi16', ansi2ansi, false)); - setLazyProperty(styles.color, 'ansi256', () => makeDynamicStyles(wrapAnsi256, 'ansi256', ansi2ansi, false)); - setLazyProperty(styles.color, 'ansi16m', () => makeDynamicStyles(wrapAnsi16m, 'rgb', rgb2rgb, false)); - setLazyProperty(styles.bgColor, 'ansi', () => makeDynamicStyles(wrapAnsi16, 'ansi16', ansi2ansi, true)); - setLazyProperty(styles.bgColor, 'ansi256', () => makeDynamicStyles(wrapAnsi256, 'ansi256', ansi2ansi, true)); - setLazyProperty(styles.bgColor, 'ansi16m', () => makeDynamicStyles(wrapAnsi16m, 'rgb', rgb2rgb, true)); - - return styles; -} - -// Make the export immutable -Object.defineProperty(module, 'exports', { - enumerable: true, - get: assembleStyles -}); diff --git a/node_modules/chalk/node_modules/ansi-styles/package.json b/node_modules/chalk/node_modules/ansi-styles/package.json deleted file mode 100644 index 7539328..0000000 --- a/node_modules/chalk/node_modules/ansi-styles/package.json +++ /dev/null @@ -1,56 +0,0 @@ -{ - "name": "ansi-styles", - "version": "4.3.0", - "description": "ANSI escape codes for styling strings in the terminal", - "license": "MIT", - "repository": "chalk/ansi-styles", - "funding": "https://github.com/chalk/ansi-styles?sponsor=1", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "engines": { - "node": ">=8" - }, - "scripts": { - "test": "xo && ava && tsd", - "screenshot": "svg-term --command='node screenshot' --out=screenshot.svg --padding=3 --width=55 --height=3 --at=1000 --no-cursor" - }, - "files": [ - "index.js", - "index.d.ts" - ], - "keywords": [ - "ansi", - "styles", - "color", - "colour", - "colors", - "terminal", - "console", - "cli", - "string", - "tty", - "escape", - "formatting", - "rgb", - "256", - "shell", - "xterm", - "log", - "logging", - "command-line", - "text" - ], - "dependencies": { - "color-convert": "^2.0.1" - }, - "devDependencies": { - "@types/color-convert": "^1.9.0", - "ava": "^2.3.0", - "svg-term-cli": "^2.1.1", - "tsd": "^0.11.0", - "xo": "^0.25.3" - } -} diff --git a/node_modules/chalk/node_modules/has-flag/index.d.ts b/node_modules/chalk/node_modules/has-flag/index.d.ts deleted file mode 100644 index a0a48c8..0000000 --- a/node_modules/chalk/node_modules/has-flag/index.d.ts +++ /dev/null @@ -1,39 +0,0 @@ -/** -Check if [`argv`](https://nodejs.org/docs/latest/api/process.html#process_process_argv) has a specific flag. - -@param flag - CLI flag to look for. The `--` prefix is optional. -@param argv - CLI arguments. Default: `process.argv`. -@returns Whether the flag exists. - -@example -``` -// $ ts-node foo.ts -f --unicorn --foo=bar -- --rainbow - -// foo.ts -import hasFlag = require('has-flag'); - -hasFlag('unicorn'); -//=> true - -hasFlag('--unicorn'); -//=> true - -hasFlag('f'); -//=> true - -hasFlag('-f'); -//=> true - -hasFlag('foo=bar'); -//=> true - -hasFlag('foo'); -//=> false - -hasFlag('rainbow'); -//=> false -``` -*/ -declare function hasFlag(flag: string, argv?: string[]): boolean; - -export = hasFlag; diff --git a/node_modules/chalk/node_modules/has-flag/index.js b/node_modules/chalk/node_modules/has-flag/index.js deleted file mode 100644 index b6f80b1..0000000 --- a/node_modules/chalk/node_modules/has-flag/index.js +++ /dev/null @@ -1,8 +0,0 @@ -'use strict'; - -module.exports = (flag, argv = process.argv) => { - const prefix = flag.startsWith('-') ? '' : (flag.length === 1 ? '-' : '--'); - const position = argv.indexOf(prefix + flag); - const terminatorPosition = argv.indexOf('--'); - return position !== -1 && (terminatorPosition === -1 || position < terminatorPosition); -}; diff --git a/node_modules/chalk/node_modules/has-flag/package.json b/node_modules/chalk/node_modules/has-flag/package.json deleted file mode 100644 index a9cba4b..0000000 --- a/node_modules/chalk/node_modules/has-flag/package.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "name": "has-flag", - "version": "4.0.0", - "description": "Check if argv has a specific flag", - "license": "MIT", - "repository": "sindresorhus/has-flag", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "engines": { - "node": ">=8" - }, - "scripts": { - "test": "xo && ava && tsd" - }, - "files": [ - "index.js", - "index.d.ts" - ], - "keywords": [ - "has", - "check", - "detect", - "contains", - "find", - "flag", - "cli", - "command-line", - "argv", - "process", - "arg", - "args", - "argument", - "arguments", - "getopt", - "minimist", - "optimist" - ], - "devDependencies": { - "ava": "^1.4.1", - "tsd": "^0.7.2", - "xo": "^0.24.0" - } -} diff --git a/node_modules/chalk/node_modules/supports-color/browser.js b/node_modules/chalk/node_modules/supports-color/browser.js deleted file mode 100644 index 62afa3a..0000000 --- a/node_modules/chalk/node_modules/supports-color/browser.js +++ /dev/null @@ -1,5 +0,0 @@ -'use strict'; -module.exports = { - stdout: false, - stderr: false -}; diff --git a/node_modules/chalk/node_modules/supports-color/index.js b/node_modules/chalk/node_modules/supports-color/index.js deleted file mode 100644 index 6fada39..0000000 --- a/node_modules/chalk/node_modules/supports-color/index.js +++ /dev/null @@ -1,135 +0,0 @@ -'use strict'; -const os = require('os'); -const tty = require('tty'); -const hasFlag = require('has-flag'); - -const {env} = process; - -let forceColor; -if (hasFlag('no-color') || - hasFlag('no-colors') || - hasFlag('color=false') || - hasFlag('color=never')) { - forceColor = 0; -} else if (hasFlag('color') || - hasFlag('colors') || - hasFlag('color=true') || - hasFlag('color=always')) { - forceColor = 1; -} - -if ('FORCE_COLOR' in env) { - if (env.FORCE_COLOR === 'true') { - forceColor = 1; - } else if (env.FORCE_COLOR === 'false') { - forceColor = 0; - } else { - forceColor = env.FORCE_COLOR.length === 0 ? 1 : Math.min(parseInt(env.FORCE_COLOR, 10), 3); - } -} - -function translateLevel(level) { - if (level === 0) { - return false; - } - - return { - level, - hasBasic: true, - has256: level >= 2, - has16m: level >= 3 - }; -} - -function supportsColor(haveStream, streamIsTTY) { - if (forceColor === 0) { - return 0; - } - - if (hasFlag('color=16m') || - hasFlag('color=full') || - hasFlag('color=truecolor')) { - return 3; - } - - if (hasFlag('color=256')) { - return 2; - } - - if (haveStream && !streamIsTTY && forceColor === undefined) { - return 0; - } - - const min = forceColor || 0; - - if (env.TERM === 'dumb') { - return min; - } - - if (process.platform === 'win32') { - // Windows 10 build 10586 is the first Windows release that supports 256 colors. - // Windows 10 build 14931 is the first release that supports 16m/TrueColor. - const osRelease = os.release().split('.'); - if ( - Number(osRelease[0]) >= 10 && - Number(osRelease[2]) >= 10586 - ) { - return Number(osRelease[2]) >= 14931 ? 3 : 2; - } - - return 1; - } - - if ('CI' in env) { - if (['TRAVIS', 'CIRCLECI', 'APPVEYOR', 'GITLAB_CI', 'GITHUB_ACTIONS', 'BUILDKITE'].some(sign => sign in env) || env.CI_NAME === 'codeship') { - return 1; - } - - return min; - } - - if ('TEAMCITY_VERSION' in env) { - return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0; - } - - if (env.COLORTERM === 'truecolor') { - return 3; - } - - if ('TERM_PROGRAM' in env) { - const version = parseInt((env.TERM_PROGRAM_VERSION || '').split('.')[0], 10); - - switch (env.TERM_PROGRAM) { - case 'iTerm.app': - return version >= 3 ? 3 : 2; - case 'Apple_Terminal': - return 2; - // No default - } - } - - if (/-256(color)?$/i.test(env.TERM)) { - return 2; - } - - if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) { - return 1; - } - - if ('COLORTERM' in env) { - return 1; - } - - return min; -} - -function getSupportLevel(stream) { - const level = supportsColor(stream, stream && stream.isTTY); - return translateLevel(level); -} - -module.exports = { - supportsColor: getSupportLevel, - stdout: translateLevel(supportsColor(true, tty.isatty(1))), - stderr: translateLevel(supportsColor(true, tty.isatty(2))) -}; diff --git a/node_modules/chalk/node_modules/supports-color/package.json b/node_modules/chalk/node_modules/supports-color/package.json deleted file mode 100644 index f7182ed..0000000 --- a/node_modules/chalk/node_modules/supports-color/package.json +++ /dev/null @@ -1,53 +0,0 @@ -{ - "name": "supports-color", - "version": "7.2.0", - "description": "Detect whether a terminal supports color", - "license": "MIT", - "repository": "chalk/supports-color", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "engines": { - "node": ">=8" - }, - "scripts": { - "test": "xo && ava" - }, - "files": [ - "index.js", - "browser.js" - ], - "keywords": [ - "color", - "colour", - "colors", - "terminal", - "console", - "cli", - "ansi", - "styles", - "tty", - "rgb", - "256", - "shell", - "xterm", - "command-line", - "support", - "supports", - "capability", - "detect", - "truecolor", - "16m" - ], - "dependencies": { - "has-flag": "^4.0.0" - }, - "devDependencies": { - "ava": "^1.4.1", - "import-fresh": "^3.0.0", - "xo": "^0.24.0" - }, - "browser": "browser.js" -} diff --git a/node_modules/chalk/package.json b/node_modules/chalk/package.json deleted file mode 100644 index 47c23f2..0000000 --- a/node_modules/chalk/package.json +++ /dev/null @@ -1,68 +0,0 @@ -{ - "name": "chalk", - "version": "4.1.2", - "description": "Terminal string styling done right", - "license": "MIT", - "repository": "chalk/chalk", - "funding": "https://github.com/chalk/chalk?sponsor=1", - "main": "source", - "engines": { - "node": ">=10" - }, - "scripts": { - "test": "xo && nyc ava && tsd", - "bench": "matcha benchmark.js" - }, - "files": [ - "source", - "index.d.ts" - ], - "keywords": [ - "color", - "colour", - "colors", - "terminal", - "console", - "cli", - "string", - "str", - "ansi", - "style", - "styles", - "tty", - "formatting", - "rgb", - "256", - "shell", - "xterm", - "log", - "logging", - "command-line", - "text" - ], - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "devDependencies": { - "ava": "^2.4.0", - "coveralls": "^3.0.7", - "execa": "^4.0.0", - "import-fresh": "^3.1.0", - "matcha": "^0.7.0", - "nyc": "^15.0.0", - "resolve-from": "^5.0.0", - "tsd": "^0.7.4", - "xo": "^0.28.2" - }, - "xo": { - "rules": { - "unicorn/prefer-string-slice": "off", - "unicorn/prefer-includes": "off", - "@typescript-eslint/member-ordering": "off", - "no-redeclare": "off", - "unicorn/string-content": "off", - "unicorn/better-regex": "off" - } - } -} diff --git a/node_modules/chalk/source/index.js b/node_modules/chalk/source/index.js deleted file mode 100644 index 75ec663..0000000 --- a/node_modules/chalk/source/index.js +++ /dev/null @@ -1,229 +0,0 @@ -'use strict'; -const ansiStyles = require('ansi-styles'); -const {stdout: stdoutColor, stderr: stderrColor} = require('supports-color'); -const { - stringReplaceAll, - stringEncaseCRLFWithFirstIndex -} = require('./util'); - -const {isArray} = Array; - -// `supportsColor.level` → `ansiStyles.color[name]` mapping -const levelMapping = [ - 'ansi', - 'ansi', - 'ansi256', - 'ansi16m' -]; - -const styles = Object.create(null); - -const applyOptions = (object, options = {}) => { - if (options.level && !(Number.isInteger(options.level) && options.level >= 0 && options.level <= 3)) { - throw new Error('The `level` option should be an integer from 0 to 3'); - } - - // Detect level if not set manually - const colorLevel = stdoutColor ? stdoutColor.level : 0; - object.level = options.level === undefined ? colorLevel : options.level; -}; - -class ChalkClass { - constructor(options) { - // eslint-disable-next-line no-constructor-return - return chalkFactory(options); - } -} - -const chalkFactory = options => { - const chalk = {}; - applyOptions(chalk, options); - - chalk.template = (...arguments_) => chalkTag(chalk.template, ...arguments_); - - Object.setPrototypeOf(chalk, Chalk.prototype); - Object.setPrototypeOf(chalk.template, chalk); - - chalk.template.constructor = () => { - throw new Error('`chalk.constructor()` is deprecated. Use `new chalk.Instance()` instead.'); - }; - - chalk.template.Instance = ChalkClass; - - return chalk.template; -}; - -function Chalk(options) { - return chalkFactory(options); -} - -for (const [styleName, style] of Object.entries(ansiStyles)) { - styles[styleName] = { - get() { - const builder = createBuilder(this, createStyler(style.open, style.close, this._styler), this._isEmpty); - Object.defineProperty(this, styleName, {value: builder}); - return builder; - } - }; -} - -styles.visible = { - get() { - const builder = createBuilder(this, this._styler, true); - Object.defineProperty(this, 'visible', {value: builder}); - return builder; - } -}; - -const usedModels = ['rgb', 'hex', 'keyword', 'hsl', 'hsv', 'hwb', 'ansi', 'ansi256']; - -for (const model of usedModels) { - styles[model] = { - get() { - const {level} = this; - return function (...arguments_) { - const styler = createStyler(ansiStyles.color[levelMapping[level]][model](...arguments_), ansiStyles.color.close, this._styler); - return createBuilder(this, styler, this._isEmpty); - }; - } - }; -} - -for (const model of usedModels) { - const bgModel = 'bg' + model[0].toUpperCase() + model.slice(1); - styles[bgModel] = { - get() { - const {level} = this; - return function (...arguments_) { - const styler = createStyler(ansiStyles.bgColor[levelMapping[level]][model](...arguments_), ansiStyles.bgColor.close, this._styler); - return createBuilder(this, styler, this._isEmpty); - }; - } - }; -} - -const proto = Object.defineProperties(() => {}, { - ...styles, - level: { - enumerable: true, - get() { - return this._generator.level; - }, - set(level) { - this._generator.level = level; - } - } -}); - -const createStyler = (open, close, parent) => { - let openAll; - let closeAll; - if (parent === undefined) { - openAll = open; - closeAll = close; - } else { - openAll = parent.openAll + open; - closeAll = close + parent.closeAll; - } - - return { - open, - close, - openAll, - closeAll, - parent - }; -}; - -const createBuilder = (self, _styler, _isEmpty) => { - const builder = (...arguments_) => { - if (isArray(arguments_[0]) && isArray(arguments_[0].raw)) { - // Called as a template literal, for example: chalk.red`2 + 3 = {bold ${2+3}}` - return applyStyle(builder, chalkTag(builder, ...arguments_)); - } - - // Single argument is hot path, implicit coercion is faster than anything - // eslint-disable-next-line no-implicit-coercion - return applyStyle(builder, (arguments_.length === 1) ? ('' + arguments_[0]) : arguments_.join(' ')); - }; - - // We alter the prototype because we must return a function, but there is - // no way to create a function with a different prototype - Object.setPrototypeOf(builder, proto); - - builder._generator = self; - builder._styler = _styler; - builder._isEmpty = _isEmpty; - - return builder; -}; - -const applyStyle = (self, string) => { - if (self.level <= 0 || !string) { - return self._isEmpty ? '' : string; - } - - let styler = self._styler; - - if (styler === undefined) { - return string; - } - - const {openAll, closeAll} = styler; - if (string.indexOf('\u001B') !== -1) { - while (styler !== undefined) { - // Replace any instances already present with a re-opening code - // otherwise only the part of the string until said closing code - // will be colored, and the rest will simply be 'plain'. - string = stringReplaceAll(string, styler.close, styler.open); - - styler = styler.parent; - } - } - - // We can move both next actions out of loop, because remaining actions in loop won't have - // any/visible effect on parts we add here. Close the styling before a linebreak and reopen - // after next line to fix a bleed issue on macOS: https://github.com/chalk/chalk/pull/92 - const lfIndex = string.indexOf('\n'); - if (lfIndex !== -1) { - string = stringEncaseCRLFWithFirstIndex(string, closeAll, openAll, lfIndex); - } - - return openAll + string + closeAll; -}; - -let template; -const chalkTag = (chalk, ...strings) => { - const [firstString] = strings; - - if (!isArray(firstString) || !isArray(firstString.raw)) { - // If chalk() was called by itself or with a string, - // return the string itself as a string. - return strings.join(' '); - } - - const arguments_ = strings.slice(1); - const parts = [firstString.raw[0]]; - - for (let i = 1; i < firstString.length; i++) { - parts.push( - String(arguments_[i - 1]).replace(/[{}\\]/g, '\\$&'), - String(firstString.raw[i]) - ); - } - - if (template === undefined) { - template = require('./templates'); - } - - return template(chalk, parts.join('')); -}; - -Object.defineProperties(Chalk.prototype, styles); - -const chalk = Chalk(); // eslint-disable-line new-cap -chalk.supportsColor = stdoutColor; -chalk.stderr = Chalk({level: stderrColor ? stderrColor.level : 0}); // eslint-disable-line new-cap -chalk.stderr.supportsColor = stderrColor; - -module.exports = chalk; diff --git a/node_modules/chalk/source/templates.js b/node_modules/chalk/source/templates.js deleted file mode 100644 index b130949..0000000 --- a/node_modules/chalk/source/templates.js +++ /dev/null @@ -1,134 +0,0 @@ -'use strict'; -const TEMPLATE_REGEX = /(?:\\(u(?:[a-f\d]{4}|\{[a-f\d]{1,6}\})|x[a-f\d]{2}|.))|(?:\{(~)?(\w+(?:\([^)]*\))?(?:\.\w+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(\})|((?:.|[\r\n\f])+?)/gi; -const STYLE_REGEX = /(?:^|\.)(\w+)(?:\(([^)]*)\))?/g; -const STRING_REGEX = /^(['"])((?:\\.|(?!\1)[^\\])*)\1$/; -const ESCAPE_REGEX = /\\(u(?:[a-f\d]{4}|{[a-f\d]{1,6}})|x[a-f\d]{2}|.)|([^\\])/gi; - -const ESCAPES = new Map([ - ['n', '\n'], - ['r', '\r'], - ['t', '\t'], - ['b', '\b'], - ['f', '\f'], - ['v', '\v'], - ['0', '\0'], - ['\\', '\\'], - ['e', '\u001B'], - ['a', '\u0007'] -]); - -function unescape(c) { - const u = c[0] === 'u'; - const bracket = c[1] === '{'; - - if ((u && !bracket && c.length === 5) || (c[0] === 'x' && c.length === 3)) { - return String.fromCharCode(parseInt(c.slice(1), 16)); - } - - if (u && bracket) { - return String.fromCodePoint(parseInt(c.slice(2, -1), 16)); - } - - return ESCAPES.get(c) || c; -} - -function parseArguments(name, arguments_) { - const results = []; - const chunks = arguments_.trim().split(/\s*,\s*/g); - let matches; - - for (const chunk of chunks) { - const number = Number(chunk); - if (!Number.isNaN(number)) { - results.push(number); - } else if ((matches = chunk.match(STRING_REGEX))) { - results.push(matches[2].replace(ESCAPE_REGEX, (m, escape, character) => escape ? unescape(escape) : character)); - } else { - throw new Error(`Invalid Chalk template style argument: ${chunk} (in style '${name}')`); - } - } - - return results; -} - -function parseStyle(style) { - STYLE_REGEX.lastIndex = 0; - - const results = []; - let matches; - - while ((matches = STYLE_REGEX.exec(style)) !== null) { - const name = matches[1]; - - if (matches[2]) { - const args = parseArguments(name, matches[2]); - results.push([name].concat(args)); - } else { - results.push([name]); - } - } - - return results; -} - -function buildStyle(chalk, styles) { - const enabled = {}; - - for (const layer of styles) { - for (const style of layer.styles) { - enabled[style[0]] = layer.inverse ? null : style.slice(1); - } - } - - let current = chalk; - for (const [styleName, styles] of Object.entries(enabled)) { - if (!Array.isArray(styles)) { - continue; - } - - if (!(styleName in current)) { - throw new Error(`Unknown Chalk style: ${styleName}`); - } - - current = styles.length > 0 ? current[styleName](...styles) : current[styleName]; - } - - return current; -} - -module.exports = (chalk, temporary) => { - const styles = []; - const chunks = []; - let chunk = []; - - // eslint-disable-next-line max-params - temporary.replace(TEMPLATE_REGEX, (m, escapeCharacter, inverse, style, close, character) => { - if (escapeCharacter) { - chunk.push(unescape(escapeCharacter)); - } else if (style) { - const string = chunk.join(''); - chunk = []; - chunks.push(styles.length === 0 ? string : buildStyle(chalk, styles)(string)); - styles.push({inverse, styles: parseStyle(style)}); - } else if (close) { - if (styles.length === 0) { - throw new Error('Found extraneous } in Chalk template literal'); - } - - chunks.push(buildStyle(chalk, styles)(chunk.join(''))); - chunk = []; - styles.pop(); - } else { - chunk.push(character); - } - }); - - chunks.push(chunk.join('')); - - if (styles.length > 0) { - const errMessage = `Chalk template literal is missing ${styles.length} closing bracket${styles.length === 1 ? '' : 's'} (\`}\`)`; - throw new Error(errMessage); - } - - return chunks.join(''); -}; diff --git a/node_modules/chalk/source/util.js b/node_modules/chalk/source/util.js deleted file mode 100644 index ca466fd..0000000 --- a/node_modules/chalk/source/util.js +++ /dev/null @@ -1,39 +0,0 @@ -'use strict'; - -const stringReplaceAll = (string, substring, replacer) => { - let index = string.indexOf(substring); - if (index === -1) { - return string; - } - - const substringLength = substring.length; - let endIndex = 0; - let returnValue = ''; - do { - returnValue += string.substr(endIndex, index - endIndex) + substring + replacer; - endIndex = index + substringLength; - index = string.indexOf(substring, endIndex); - } while (index !== -1); - - returnValue += string.substr(endIndex); - return returnValue; -}; - -const stringEncaseCRLFWithFirstIndex = (string, prefix, postfix, index) => { - let endIndex = 0; - let returnValue = ''; - do { - const gotCR = string[index - 1] === '\r'; - returnValue += string.substr(endIndex, (gotCR ? index - 1 : index) - endIndex) + prefix + (gotCR ? '\r\n' : '\n') + postfix; - endIndex = index + 1; - index = string.indexOf('\n', endIndex); - } while (index !== -1); - - returnValue += string.substr(endIndex); - return returnValue; -}; - -module.exports = { - stringReplaceAll, - stringEncaseCRLFWithFirstIndex -}; diff --git a/node_modules/cheerio-select/lib/esm/helpers.d.ts b/node_modules/cheerio-select/lib/esm/helpers.d.ts deleted file mode 100644 index 13dba26..0000000 --- a/node_modules/cheerio-select/lib/esm/helpers.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -import type { AnyNode } from "domhandler"; -import type { Selector } from "css-what"; -export declare function getDocumentRoot(node: AnyNode): AnyNode; -export declare function groupSelectors(selectors: Selector[][]): [plain: Selector[][], filtered: Selector[][]]; -//# sourceMappingURL=helpers.d.ts.map \ No newline at end of file diff --git a/node_modules/cheerio-select/lib/esm/helpers.d.ts.map b/node_modules/cheerio-select/lib/esm/helpers.d.ts.map deleted file mode 100644 index 689bf8d..0000000 --- a/node_modules/cheerio-select/lib/esm/helpers.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"helpers.d.ts","sourceRoot":"https://raw.githubusercontent.com/cheeriojs/cheerio-select/ef063a6ca4c3f0d02d2fc3505e750b6fb81c448d/src/","sources":["helpers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAC1C,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AAGzC,wBAAgB,eAAe,CAAC,IAAI,EAAE,OAAO,GAAG,OAAO,CAGtD;AAED,wBAAgB,cAAc,CAC1B,SAAS,EAAE,QAAQ,EAAE,EAAE,GACxB,CAAC,KAAK,EAAE,QAAQ,EAAE,EAAE,EAAE,QAAQ,EAAE,QAAQ,EAAE,EAAE,CAAC,CAa/C"} \ No newline at end of file diff --git a/node_modules/cheerio-select/lib/esm/helpers.js b/node_modules/cheerio-select/lib/esm/helpers.js deleted file mode 100644 index 1e5c8d5..0000000 --- a/node_modules/cheerio-select/lib/esm/helpers.js +++ /dev/null @@ -1,20 +0,0 @@ -import { isFilter } from "./positionals.js"; -export function getDocumentRoot(node) { - while (node.parent) - node = node.parent; - return node; -} -export function groupSelectors(selectors) { - const filteredSelectors = []; - const plainSelectors = []; - for (const selector of selectors) { - if (selector.some(isFilter)) { - filteredSelectors.push(selector); - } - else { - plainSelectors.push(selector); - } - } - return [plainSelectors, filteredSelectors]; -} -//# sourceMappingURL=helpers.js.map \ No newline at end of file diff --git a/node_modules/cheerio-select/lib/esm/helpers.js.map b/node_modules/cheerio-select/lib/esm/helpers.js.map deleted file mode 100644 index 2ad294d..0000000 --- a/node_modules/cheerio-select/lib/esm/helpers.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"helpers.js","sourceRoot":"https://raw.githubusercontent.com/cheeriojs/cheerio-select/ef063a6ca4c3f0d02d2fc3505e750b6fb81c448d/src/","sources":["helpers.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAE5C,MAAM,UAAU,eAAe,CAAC,IAAa;IACzC,OAAO,IAAI,CAAC,MAAM;QAAE,IAAI,GAAG,IAAI,CAAC,MAAM,CAAC;IACvC,OAAO,IAAI,CAAC;AAChB,CAAC;AAED,MAAM,UAAU,cAAc,CAC1B,SAAuB;IAEvB,MAAM,iBAAiB,GAAiB,EAAE,CAAC;IAC3C,MAAM,cAAc,GAAiB,EAAE,CAAC;IAExC,KAAK,MAAM,QAAQ,IAAI,SAAS,EAAE;QAC9B,IAAI,QAAQ,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAE;YACzB,iBAAiB,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;SACpC;aAAM;YACH,cAAc,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;SACjC;KACJ;IAED,OAAO,CAAC,cAAc,EAAE,iBAAiB,CAAC,CAAC;AAC/C,CAAC"} \ No newline at end of file diff --git a/node_modules/cheerio-select/lib/esm/index.d.ts b/node_modules/cheerio-select/lib/esm/index.d.ts deleted file mode 100644 index 9b6baff..0000000 --- a/node_modules/cheerio-select/lib/esm/index.d.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { type Options as CSSSelectOptions } from "css-select"; -import type { Element, AnyNode, Document } from "domhandler"; -export { filters, pseudos, aliases } from "css-select"; -export interface Options extends CSSSelectOptions<AnyNode, Element> { - /** Optional reference to the root of the document. If not set, this will be computed when needed. */ - root?: Document; -} -export declare function is(element: Element, selector: string | ((el: Element) => boolean), options?: Options): boolean; -export declare function some(elements: Element[], selector: string | ((el: Element) => boolean), options?: Options): boolean; -export declare function filter(selector: string, elements: AnyNode[], options?: Options): Element[]; -export declare function select(selector: string | ((el: Element) => boolean), root: AnyNode | AnyNode[], options?: Options, limit?: number): Element[]; -//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/cheerio-select/lib/esm/index.d.ts.map b/node_modules/cheerio-select/lib/esm/index.d.ts.map deleted file mode 100644 index 4127f83..0000000 --- a/node_modules/cheerio-select/lib/esm/index.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"https://raw.githubusercontent.com/cheeriojs/cheerio-select/ef063a6ca4c3f0d02d2fc3505e750b6fb81c448d/src/","sources":["index.ts"],"names":[],"mappings":"AACA,OAAO,EAEH,KAAK,OAAO,IAAI,gBAAgB,EAEnC,MAAM,YAAY,CAAC;AAGpB,OAAO,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAU7D,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAYvD,MAAM,WAAW,OAAQ,SAAQ,gBAAgB,CAAC,OAAO,EAAE,OAAO,CAAC;IAC/D,qGAAqG;IACrG,IAAI,CAAC,EAAE,QAAQ,CAAC;CACnB;AAED,wBAAgB,EAAE,CACd,OAAO,EAAE,OAAO,EAChB,QAAQ,EAAE,MAAM,GAAG,CAAC,CAAC,EAAE,EAAE,OAAO,KAAK,OAAO,CAAC,EAC7C,OAAO,GAAE,OAAY,GACtB,OAAO,CAET;AAED,wBAAgB,IAAI,CAChB,QAAQ,EAAE,OAAO,EAAE,EACnB,QAAQ,EAAE,MAAM,GAAG,CAAC,CAAC,EAAE,EAAE,OAAO,KAAK,OAAO,CAAC,EAC7C,OAAO,GAAE,OAAY,GACtB,OAAO,CAWT;AAsCD,wBAAgB,MAAM,CAClB,QAAQ,EAAE,MAAM,EAChB,QAAQ,EAAE,OAAO,EAAE,EACnB,OAAO,GAAE,OAAY,GACtB,OAAO,EAAE,CAEX;AAoGD,wBAAgB,MAAM,CAClB,QAAQ,EAAE,MAAM,GAAG,CAAC,CAAC,EAAE,EAAE,OAAO,KAAK,OAAO,CAAC,EAC7C,IAAI,EAAE,OAAO,GAAG,OAAO,EAAE,EACzB,OAAO,GAAE,OAAY,EACrB,KAAK,SAAW,GACjB,OAAO,EAAE,CA2BX"} \ No newline at end of file diff --git a/node_modules/cheerio-select/lib/esm/index.js b/node_modules/cheerio-select/lib/esm/index.js deleted file mode 100644 index ea6c7f0..0000000 --- a/node_modules/cheerio-select/lib/esm/index.js +++ /dev/null @@ -1,241 +0,0 @@ -import { parse, SelectorType, isTraversal } from "css-what"; -import { _compileToken as compileToken, prepareContext, } from "css-select"; -import * as DomUtils from "domutils"; -import * as boolbase from "boolbase"; -import { getDocumentRoot, groupSelectors } from "./helpers.js"; -import { isFilter, getLimit, } from "./positionals.js"; -// Re-export pseudo extension points -export { filters, pseudos, aliases } from "css-select"; -const UNIVERSAL_SELECTOR = { - type: SelectorType.Universal, - namespace: null, -}; -const SCOPE_PSEUDO = { - type: SelectorType.Pseudo, - name: "scope", - data: null, -}; -export function is(element, selector, options = {}) { - return some([element], selector, options); -} -export function some(elements, selector, options = {}) { - if (typeof selector === "function") - return elements.some(selector); - const [plain, filtered] = groupSelectors(parse(selector)); - return ((plain.length > 0 && elements.some(compileToken(plain, options))) || - filtered.some((sel) => filterBySelector(sel, elements, options).length > 0)); -} -function filterByPosition(filter, elems, data, options) { - const num = typeof data === "string" ? parseInt(data, 10) : NaN; - switch (filter) { - case "first": - case "lt": - // Already done in `getLimit` - return elems; - case "last": - return elems.length > 0 ? [elems[elems.length - 1]] : elems; - case "nth": - case "eq": - return isFinite(num) && Math.abs(num) < elems.length - ? [num < 0 ? elems[elems.length + num] : elems[num]] - : []; - case "gt": - return isFinite(num) ? elems.slice(num + 1) : []; - case "even": - return elems.filter((_, i) => i % 2 === 0); - case "odd": - return elems.filter((_, i) => i % 2 === 1); - case "not": { - const filtered = new Set(filterParsed(data, elems, options)); - return elems.filter((e) => !filtered.has(e)); - } - } -} -export function filter(selector, elements, options = {}) { - return filterParsed(parse(selector), elements, options); -} -/** - * Filter a set of elements by a selector. - * - * Will return elements in the original order. - * - * @param selector Selector to filter by. - * @param elements Elements to filter. - * @param options Options for selector. - */ -function filterParsed(selector, elements, options) { - if (elements.length === 0) - return []; - const [plainSelectors, filteredSelectors] = groupSelectors(selector); - let found; - if (plainSelectors.length) { - const filtered = filterElements(elements, plainSelectors, options); - // If there are no filters, just return - if (filteredSelectors.length === 0) { - return filtered; - } - // Otherwise, we have to do some filtering - if (filtered.length) { - found = new Set(filtered); - } - } - for (let i = 0; i < filteredSelectors.length && (found === null || found === void 0 ? void 0 : found.size) !== elements.length; i++) { - const filteredSelector = filteredSelectors[i]; - const missing = found - ? elements.filter((e) => DomUtils.isTag(e) && !found.has(e)) - : elements; - if (missing.length === 0) - break; - const filtered = filterBySelector(filteredSelector, elements, options); - if (filtered.length) { - if (!found) { - /* - * If we haven't found anything before the last selector, - * just return what we found now. - */ - if (i === filteredSelectors.length - 1) { - return filtered; - } - found = new Set(filtered); - } - else { - filtered.forEach((el) => found.add(el)); - } - } - } - return typeof found !== "undefined" - ? (found.size === elements.length - ? elements - : // Filter elements to preserve order - elements.filter((el) => found.has(el))) - : []; -} -function filterBySelector(selector, elements, options) { - var _a; - if (selector.some(isTraversal)) { - /* - * Get root node, run selector with the scope - * set to all of our nodes. - */ - const root = (_a = options.root) !== null && _a !== void 0 ? _a : getDocumentRoot(elements[0]); - const opts = { ...options, context: elements, relativeSelector: false }; - selector.push(SCOPE_PSEUDO); - return findFilterElements(root, selector, opts, true, elements.length); - } - // Performance optimization: If we don't have to traverse, just filter set. - return findFilterElements(elements, selector, options, false, elements.length); -} -export function select(selector, root, options = {}, limit = Infinity) { - if (typeof selector === "function") { - return find(root, selector); - } - const [plain, filtered] = groupSelectors(parse(selector)); - const results = filtered.map((sel) => findFilterElements(root, sel, options, true, limit)); - // Plain selectors can be queried in a single go - if (plain.length) { - results.push(findElements(root, plain, options, limit)); - } - if (results.length === 0) { - return []; - } - // If there was only a single selector, just return the result - if (results.length === 1) { - return results[0]; - } - // Sort results, filtering for duplicates - return DomUtils.uniqueSort(results.reduce((a, b) => [...a, ...b])); -} -/** - * - * @param root Element(s) to search from. - * @param selector Selector to look for. - * @param options Options for querying. - * @param queryForSelector Query multiple levels deep for the initial selector, even if it doesn't contain a traversal. - */ -function findFilterElements(root, selector, options, queryForSelector, totalLimit) { - const filterIndex = selector.findIndex(isFilter); - const sub = selector.slice(0, filterIndex); - const filter = selector[filterIndex]; - // If we are at the end of the selector, we can limit the number of elements to retrieve. - const partLimit = selector.length - 1 === filterIndex ? totalLimit : Infinity; - /* - * Set the number of elements to retrieve. - * Eg. for :first, we only have to get a single element. - */ - const limit = getLimit(filter.name, filter.data, partLimit); - if (limit === 0) - return []; - /* - * Skip `findElements` call if our selector starts with a positional - * pseudo. - */ - const elemsNoLimit = sub.length === 0 && !Array.isArray(root) - ? DomUtils.getChildren(root).filter(DomUtils.isTag) - : sub.length === 0 - ? (Array.isArray(root) ? root : [root]).filter(DomUtils.isTag) - : queryForSelector || sub.some(isTraversal) - ? findElements(root, [sub], options, limit) - : filterElements(root, [sub], options); - const elems = elemsNoLimit.slice(0, limit); - let result = filterByPosition(filter.name, elems, filter.data, options); - if (result.length === 0 || selector.length === filterIndex + 1) { - return result; - } - const remainingSelector = selector.slice(filterIndex + 1); - const remainingHasTraversal = remainingSelector.some(isTraversal); - if (remainingHasTraversal) { - if (isTraversal(remainingSelector[0])) { - const { type } = remainingSelector[0]; - if (type === SelectorType.Sibling || - type === SelectorType.Adjacent) { - // If we have a sibling traversal, we need to also look at the siblings. - result = prepareContext(result, DomUtils, true); - } - // Avoid a traversal-first selector error. - remainingSelector.unshift(UNIVERSAL_SELECTOR); - } - options = { - ...options, - // Avoid absolutizing the selector - relativeSelector: false, - /* - * Add a custom root func, to make sure traversals don't match elements - * that aren't a part of the considered tree. - */ - rootFunc: (el) => result.includes(el), - }; - } - else if (options.rootFunc && options.rootFunc !== boolbase.trueFunc) { - options = { ...options, rootFunc: boolbase.trueFunc }; - } - /* - * If we have another filter, recursively call `findFilterElements`, - * with the `recursive` flag disabled. We only have to look for more - * elements when we see a traversal. - * - * Otherwise, - */ - return remainingSelector.some(isFilter) - ? findFilterElements(result, remainingSelector, options, false, totalLimit) - : remainingHasTraversal - ? // Query existing elements to resolve traversal. - findElements(result, [remainingSelector], options, totalLimit) - : // If we don't have any more traversals, simply filter elements. - filterElements(result, [remainingSelector], options); -} -function findElements(root, sel, options, limit) { - const query = compileToken(sel, options, root); - return find(root, query, limit); -} -function find(root, query, limit = Infinity) { - const elems = prepareContext(root, DomUtils, query.shouldTestNextSiblings); - return DomUtils.find((node) => DomUtils.isTag(node) && query(node), elems, true, limit); -} -function filterElements(elements, sel, options) { - const els = (Array.isArray(elements) ? elements : [elements]).filter(DomUtils.isTag); - if (els.length === 0) - return els; - const query = compileToken(sel, options); - return query === boolbase.trueFunc ? els : els.filter(query); -} -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/cheerio-select/lib/esm/index.js.map b/node_modules/cheerio-select/lib/esm/index.js.map deleted file mode 100644 index ed9f158..0000000 --- a/node_modules/cheerio-select/lib/esm/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sourceRoot":"https://raw.githubusercontent.com/cheeriojs/cheerio-select/ef063a6ca4c3f0d02d2fc3505e750b6fb81c448d/src/","sources":["index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAiB,YAAY,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAC3E,OAAO,EACH,aAAa,IAAI,YAAY,EAE7B,cAAc,GACjB,MAAM,YAAY,CAAC;AACpB,OAAO,KAAK,QAAQ,MAAM,UAAU,CAAC;AACrC,OAAO,KAAK,QAAQ,MAAM,UAAU,CAAC;AAErC,OAAO,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAC/D,OAAO,EAEH,QAAQ,EAER,QAAQ,GACX,MAAM,kBAAkB,CAAC;AAE1B,oCAAoC;AACpC,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAEvD,MAAM,kBAAkB,GAAa;IACjC,IAAI,EAAE,YAAY,CAAC,SAAS;IAC5B,SAAS,EAAE,IAAI;CAClB,CAAC;AACF,MAAM,YAAY,GAAa;IAC3B,IAAI,EAAE,YAAY,CAAC,MAAM;IACzB,IAAI,EAAE,OAAO;IACb,IAAI,EAAE,IAAI;CACb,CAAC;AAOF,MAAM,UAAU,EAAE,CACd,OAAgB,EAChB,QAA6C,EAC7C,UAAmB,EAAE;IAErB,OAAO,IAAI,CAAC,CAAC,OAAO,CAAC,EAAE,QAAQ,EAAE,OAAO,CAAC,CAAC;AAC9C,CAAC;AAED,MAAM,UAAU,IAAI,CAChB,QAAmB,EACnB,QAA6C,EAC7C,UAAmB,EAAE;IAErB,IAAI,OAAO,QAAQ,KAAK,UAAU;QAAE,OAAO,QAAQ,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IAEnE,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,cAAc,CAAC,KAAK,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EACP,IAAI,CACP,CAAC;IAEF,OAAO,IAAI,CAAC,IAAI,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC;AACpC,CAAC;AAED,SAAS,IAAI,CACT,IAAyB,EACzB,KAAoB,EACpB,KAAK,GAAG,QAAQ;IAEhB,MAAM,KAAK,GAAG,cAAc,CACxB,IAAI,EACJ,QAAQ,EACR,KAAK,CAAC,sBAAsB,CAC/B,CAAC;IAEF,OAAO,QAAQ,CAAC,IAAI,CAChB,CAAC,IAAa,EAAE,EAAE,CAAC,QAAQ,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,KAAK,CAAC,IAAI,CAAC,EACtD,KAAK,EACL,IAAI,EACJ,KAAK,CACK,CAAC;AACnB,CAAC;AAED,SAAS,cAAc,CACnB,QAA6B,EAC7B,GAAiB,EACjB,OAAgB;IAEhB,MAAM,GAAG,GAAG,CAAC,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,CAChE,QAAQ,CAAC,KAAK,CACjB,CAAC;IAEF,IAAI,GAAG,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,GAAG,CAAC;IAEjC,MAAM,KAAK,GAAG,YAAY,CAAmB,GAAG,EAAE,OAAO,CAAC,CAAC;IAC3D,OAAO,KAAK,KAAK,QAAQ,CAAC,QAAQ,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;AACjE,CAAC"} \ No newline at end of file diff --git a/node_modules/cheerio-select/lib/esm/package.json b/node_modules/cheerio-select/lib/esm/package.json deleted file mode 100644 index 089153b..0000000 --- a/node_modules/cheerio-select/lib/esm/package.json +++ /dev/null @@ -1 +0,0 @@ -{"type":"module"} diff --git a/node_modules/cheerio-select/lib/esm/positionals.d.ts b/node_modules/cheerio-select/lib/esm/positionals.d.ts deleted file mode 100644 index 5315dd3..0000000 --- a/node_modules/cheerio-select/lib/esm/positionals.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -import type { Selector, PseudoSelector } from "css-what"; -export declare type Filter = "first" | "last" | "eq" | "nth" | "gt" | "lt" | "even" | "odd" | "not"; -export declare const filterNames: Set<string>; -export interface CheerioSelector extends PseudoSelector { - name: Filter; - data: string | null; -} -export declare function isFilter(s: Selector): s is CheerioSelector; -export declare function getLimit(filter: Filter, data: string | null, partLimit: number): number; -//# sourceMappingURL=positionals.d.ts.map \ No newline at end of file diff --git a/node_modules/cheerio-select/lib/esm/positionals.d.ts.map b/node_modules/cheerio-select/lib/esm/positionals.d.ts.map deleted file mode 100644 index 0e0db37..0000000 --- a/node_modules/cheerio-select/lib/esm/positionals.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"positionals.d.ts","sourceRoot":"https://raw.githubusercontent.com/cheeriojs/cheerio-select/ef063a6ca4c3f0d02d2fc3505e750b6fb81c448d/src/","sources":["positionals.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAEzD,oBAAY,MAAM,GACZ,OAAO,GACP,MAAM,GACN,IAAI,GACJ,KAAK,GACL,IAAI,GACJ,IAAI,GACJ,MAAM,GACN,KAAK,GACL,KAAK,CAAC;AACZ,eAAO,MAAM,WAAW,EAAE,GAAG,CAAC,MAAM,CASlC,CAAC;AAEH,MAAM,WAAW,eAAgB,SAAQ,cAAc;IACnD,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;CACvB;AAED,wBAAgB,QAAQ,CAAC,CAAC,EAAE,QAAQ,GAAG,CAAC,IAAI,eAAe,CAS1D;AAED,wBAAgB,QAAQ,CACpB,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,MAAM,GAAG,IAAI,EACnB,SAAS,EAAE,MAAM,GAClB,MAAM,CAyBR"} \ No newline at end of file diff --git a/node_modules/cheerio-select/lib/esm/positionals.js b/node_modules/cheerio-select/lib/esm/positionals.js deleted file mode 100644 index 61f5d6e..0000000 --- a/node_modules/cheerio-select/lib/esm/positionals.js +++ /dev/null @@ -1,47 +0,0 @@ -export const filterNames = new Set([ - "first", - "last", - "eq", - "gt", - "nth", - "lt", - "even", - "odd", -]); -export function isFilter(s) { - if (s.type !== "pseudo") - return false; - if (filterNames.has(s.name)) - return true; - if (s.name === "not" && Array.isArray(s.data)) { - // Only consider `:not` with embedded filters - return s.data.some((s) => s.some(isFilter)); - } - return false; -} -export function getLimit(filter, data, partLimit) { - const num = data != null ? parseInt(data, 10) : NaN; - switch (filter) { - case "first": - return 1; - case "nth": - case "eq": - return isFinite(num) ? (num >= 0 ? num + 1 : Infinity) : 0; - case "lt": - return isFinite(num) - ? num >= 0 - ? Math.min(num, partLimit) - : Infinity - : 0; - case "gt": - return isFinite(num) ? Infinity : 0; - case "odd": - return 2 * partLimit; - case "even": - return 2 * partLimit - 1; - case "last": - case "not": - return Infinity; - } -} -//# sourceMappingURL=positionals.js.map \ No newline at end of file diff --git a/node_modules/cheerio-select/lib/esm/positionals.js.map b/node_modules/cheerio-select/lib/esm/positionals.js.map deleted file mode 100644 index 0b26c24..0000000 --- a/node_modules/cheerio-select/lib/esm/positionals.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"positionals.js","sourceRoot":"https://raw.githubusercontent.com/cheeriojs/cheerio-select/ef063a6ca4c3f0d02d2fc3505e750b6fb81c448d/src/","sources":["positionals.ts"],"names":[],"mappings":"AAYA,MAAM,CAAC,MAAM,WAAW,GAAgB,IAAI,GAAG,CAAS;IACpD,OAAO;IACP,MAAM;IACN,IAAI;IACJ,IAAI;IACJ,KAAK;IACL,IAAI;IACJ,MAAM;IACN,KAAK;CACR,CAAC,CAAC;AAOH,MAAM,UAAU,QAAQ,CAAC,CAAW;IAChC,IAAI,CAAC,CAAC,IAAI,KAAK,QAAQ;QAAE,OAAO,KAAK,CAAC;IACtC,I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AM;YACP,OAAO,CAAC,GAAG,SAAS,GAAG,CAAC,CAAC;QAC7B,KAAK,MAAM,CAAC;QACZ,KAAK,KAAK;YACN,OAAO,QAAQ,CAAC;KACvB;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/cheerio-select/lib/helpers.d.ts b/node_modules/cheerio-select/lib/helpers.d.ts deleted file mode 100644 index 13dba26..0000000 --- a/node_modules/cheerio-select/lib/helpers.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -import type { AnyNode } from "domhandler"; -import type { Selector } from "css-what"; -export declare function getDocumentRoot(node: AnyNode): AnyNode; -export declare function groupSelectors(selectors: Selector[][]): [plain: Selector[][], filtered: Selector[][]]; -//# sourceMappingURL=helpers.d.ts.map \ No newline at end of file diff --git a/node_modules/cheerio-select/lib/helpers.d.ts.map b/node_modules/cheerio-select/lib/helpers.d.ts.map deleted file mode 100644 index 689bf8d..0000000 --- a/node_modules/cheerio-select/lib/helpers.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"helpers.d.ts","sourceRoot":"https://raw.githubusercontent.com/cheeriojs/cheerio-select/ef063a6ca4c3f0d02d2fc3505e750b6fb81c448d/src/","sources":["helpers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAC1C,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AAGzC,wBAAgB,eAAe,CAAC,IAAI,EAAE,OAAO,GAAG,OAAO,CAGtD;AAED,wBAAgB,cAAc,CAC1B,SAAS,EAAE,QAAQ,EAAE,EAAE,GACxB,CAAC,KAAK,EAAE,QAAQ,EAAE,EAAE,EAAE,QAAQ,EAAE,QAAQ,EAAE,EAAE,CAAC,CAa/C"} \ No newline at end of file diff --git a/node_modules/cheerio-select/lib/helpers.js b/node_modules/cheerio-select/lib/helpers.js deleted file mode 100644 index f996a6c..0000000 --- a/node_modules/cheerio-select/lib/helpers.js +++ /dev/null @@ -1,26 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.groupSelectors = exports.getDocumentRoot = void 0; -var positionals_js_1 = require("./positionals.js"); -function getDocumentRoot(node) { - while (node.parent) - node = node.parent; - return node; -} -exports.getDocumentRoot = getDocumentRoot; -function groupSelectors(selectors) { - var filteredSelectors = []; - var plainSelectors = []; - for (var _i = 0, selectors_1 = selectors; _i < selectors_1.length; _i++) { - var selector = selectors_1[_i]; - if (selector.some(positionals_js_1.isFilter)) { - filteredSelectors.push(selector); - } - else { - plainSelectors.push(selector); - } - } - return [plainSelectors, filteredSelectors]; -} -exports.groupSelectors = groupSelectors; -//# sourceMappingURL=helpers.js.map \ No newline at end of file diff --git a/node_modules/cheerio-select/lib/helpers.js.map b/node_modules/cheerio-select/lib/helpers.js.map deleted file mode 100644 index 95bf143..0000000 --- a/node_modules/cheerio-select/lib/helpers.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"helpers.js","sourceRoot":"https://raw.githubusercontent.com/cheeriojs/cheerio-select/ef063a6ca4c3f0d02d2fc3505e750b6fb81c448d/src/","sources":["helpers.ts"],"names":[],"mappings":";;;AAEA,mDAA4C;AAE5C,SAAgB,eAAe,CAAC,IAAa;IACzC,OAAO,IAAI,CAAC,MAAM;QAAE,IAAI,GAAG,IAAI,CAAC,MAAM,CAAC;IACvC,OAAO,IAAI,CAAC;AAChB,CAAC;AAHD,0CAGC;AAED,SAAgB,cAAc,CAC1B,SAAuB;IAEvB,IAAM,iBAAiB,GAAiB,EAAE,CAAC;IAC3C,IAAM,cAAc,GAAiB,EAAE,CAAC;IAExC,KAAuB,UAAS,EAAT,uBAAS,EAAT,uBAAS,EAAT,IAAS,EAAE;QAA7B,IAAM,QAAQ,kBAAA;QACf,IAAI,QAAQ,CAAC,IAAI,CAAC,yBAAQ,CAAC,EAAE;YACzB,iBAAiB,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;SACpC;aAAM;YACH,cAAc,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;SACjC;KACJ;IAED,OAAO,CAAC,cAAc,EAAE,iBAAiB,CAAC,CAAC;AAC/C,CAAC;AAfD,wCAeC"} \ No newline at end of file diff --git a/node_modules/cheerio-select/lib/index.d.ts b/node_modules/cheerio-select/lib/index.d.ts deleted file mode 100644 index 9b6baff..0000000 --- a/node_modules/cheerio-select/lib/index.d.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { type Options as CSSSelectOptions } from "css-select"; -import type { Element, AnyNode, Document } from "domhandler"; -export { filters, pseudos, aliases } from "css-select"; -export interface Options extends CSSSelectOptions<AnyNode, Element> { - /** Optional reference to the root of the document. If not set, this will be computed when needed. */ - root?: Document; -} -export declare function is(element: Element, selector: string | ((el: Element) => boolean), options?: Options): boolean; -export declare function some(elements: Element[], selector: string | ((el: Element) => boolean), options?: Options): boolean; -export declare function filter(selector: string, elements: AnyNode[], options?: Options): Element[]; -export declare function select(selector: string | ((el: Element) => boolean), root: AnyNode | AnyNode[], options?: Options, limit?: number): Element[]; -//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/cheerio-select/lib/index.d.ts.map b/node_modules/cheerio-select/lib/index.d.ts.map deleted file mode 100644 index 4127f83..0000000 --- a/node_modules/cheerio-select/lib/index.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"https://raw.githubusercontent.com/cheeriojs/cheerio-select/ef063a6ca4c3f0d02d2fc3505e750b6fb81c448d/src/","sources":["index.ts"],"names":[],"mappings":"AACA,OAAO,EAEH,KAAK,OAAO,IAAI,gBAAgB,EAEnC,MAAM,YAAY,CAAC;AAGpB,OAAO,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAU7D,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAYvD,MAAM,WAAW,OAAQ,SAAQ,gBAAgB,CAAC,OAAO,EAAE,OAAO,CAAC;IAC/D,qGAAqG;IACrG,IAAI,CAAC,EAAE,QAAQ,CAAC;CACnB;AAED,wBAAgB,EAAE,CACd,OAAO,EAAE,OAAO,EAChB,QAAQ,EAAE,MAAM,GAAG,CAAC,CAAC,EAAE,EAAE,OAAO,KAAK,OAAO,CAAC,EAC7C,OAAO,GAAE,OAAY,GACtB,OAAO,CAET;AAED,wBAAgB,IAAI,CAChB,QAAQ,EAAE,OAAO,EAAE,EACnB,QAAQ,EAAE,MAAM,GAAG,CAAC,CAAC,EAAE,EAAE,OAAO,KAAK,OAAO,CAAC,EAC7C,OAAO,GAAE,OAAY,GACtB,OAAO,CAWT;AAsCD,wBAAgB,MAAM,CAClB,QAAQ,EAAE,MAAM,EAChB,QAAQ,EAAE,OAAO,EAAE,EACnB,OAAO,GAAE,OAAY,GACtB,OAAO,EAAE,CAEX;AAoGD,wBAAgB,MAAM,CAClB,QAAQ,EAAE,MAAM,GAAG,CAAC,CAAC,EAAE,EAAE,OAAO,KAAK,OAAO,CAAC,EAC7C,IAAI,EAAE,OAAO,GAAG,OAAO,EAAE,EACzB,OAAO,GAAE,OAAY,EACrB,KAAK,SAAW,GACjB,OAAO,EAAE,CA2BX"} \ No newline at end of file diff --git a/node_modules/cheerio-select/lib/index.js b/node_modules/cheerio-select/lib/index.js deleted file mode 100644 index 9366d71..0000000 --- a/node_modules/cheerio-select/lib/index.js +++ /dev/null @@ -1,302 +0,0 @@ -"use strict"; -var __assign = (this && this.__assign) || function () { - __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; - }; - return __assign.apply(this, arguments); -}; -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 __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}); -var __importStar = (this && this.__importStar) || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; -}; -var __spreadArray = (this && this.__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)); -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.select = exports.filter = exports.some = exports.is = exports.aliases = exports.pseudos = exports.filters = void 0; -var css_what_1 = require("css-what"); -var css_select_1 = require("css-select"); -var DomUtils = __importStar(require("domutils")); -var boolbase = __importStar(require("boolbase")); -var helpers_js_1 = require("./helpers.js"); -var positionals_js_1 = require("./positionals.js"); -// Re-export pseudo extension points -var css_select_2 = require("css-select"); -Object.defineProperty(exports, "filters", { enumerable: true, get: function () { return css_select_2.filters; } }); -Object.defineProperty(exports, "pseudos", { enumerable: true, get: function () { return css_select_2.pseudos; } }); -Object.defineProperty(exports, "aliases", { enumerable: true, get: function () { return css_select_2.aliases; } }); -var UNIVERSAL_SELECTOR = { - type: css_what_1.SelectorType.Universal, - namespace: null, -}; -var SCOPE_PSEUDO = { - type: css_what_1.SelectorType.Pseudo, - name: "scope", - data: null, -}; -function is(element, selector, options) { - if (options === void 0) { options = {}; } - return some([element], selector, options); -} -exports.is = is; -function some(elements, selector, options) { - if (options === void 0) { options = {}; } - if (typeof selector === "function") - return elements.some(selector); - var _a = (0, helpers_js_1.groupSelectors)((0, css_what_1.parse)(selector)), plain = _a[0], filtered = _a[1]; - return ((plain.length > 0 && elements.some((0, css_select_1._compileToken)(plain, options))) || - filtered.some(function (sel) { return filterBySelector(sel, elements, options).length > 0; })); -} -exports.some = some; -function filterByPosition(filter, elems, data, options) { - var num = typeof data === "string" ? parseInt(data, 10) : NaN; - switch (filter) { - case "first": - case "lt": - // Already done in `getLimit` - return elems; - case "last": - return elems.length > 0 ? [elems[elems.length - 1]] : elems; - case "nth": - case "eq": - return isFinite(num) && Math.abs(num) < elems.length - ? [num < 0 ? elems[elems.length + num] : elems[num]] - : []; - case "gt": - return isFinite(num) ? elems.slice(num + 1) : []; - case "even": - return elems.filter(function (_, i) { return i % 2 === 0; }); - case "odd": - return elems.filter(function (_, i) { return i % 2 === 1; }); - case "not": { - var filtered_1 = new Set(filterParsed(data, elems, options)); - return elems.filter(function (e) { return !filtered_1.has(e); }); - } - } -} -function filter(selector, elements, options) { - if (options === void 0) { options = {}; } - return filterParsed((0, css_what_1.parse)(selector), elements, options); -} -exports.filter = filter; -/** - * Filter a set of elements by a selector. - * - * Will return elements in the original order. - * - * @param selector Selector to filter by. - * @param elements Elements to filter. - * @param options Options for selector. - */ -function filterParsed(selector, elements, options) { - if (elements.length === 0) - return []; - var _a = (0, helpers_js_1.groupSelectors)(selector), plainSelectors = _a[0], filteredSelectors = _a[1]; - var found; - if (plainSelectors.length) { - var filtered = filterElements(elements, plainSelectors, options); - // If there are no filters, just return - if (filteredSelectors.length === 0) { - return filtered; - } - // Otherwise, we have to do some filtering - if (filtered.length) { - found = new Set(filtered); - } - } - for (var i = 0; i < filteredSelectors.length && (found === null || found === void 0 ? void 0 : found.size) !== elements.length; i++) { - var filteredSelector = filteredSelectors[i]; - var missing = found - ? elements.filter(function (e) { return DomUtils.isTag(e) && !found.has(e); }) - : elements; - if (missing.length === 0) - break; - var filtered = filterBySelector(filteredSelector, elements, options); - if (filtered.length) { - if (!found) { - /* - * If we haven't found anything before the last selector, - * just return what we found now. - */ - if (i === filteredSelectors.length - 1) { - return filtered; - } - found = new Set(filtered); - } - else { - filtered.forEach(function (el) { return found.add(el); }); - } - } - } - return typeof found !== "undefined" - ? (found.size === elements.length - ? elements - : // Filter elements to preserve order - elements.filter(function (el) { - return found.has(el); - })) - : []; -} -function filterBySelector(selector, elements, options) { - var _a; - if (selector.some(css_what_1.isTraversal)) { - /* - * Get root node, run selector with the scope - * set to all of our nodes. - */ - var root = (_a = options.root) !== null && _a !== void 0 ? _a : (0, helpers_js_1.getDocumentRoot)(elements[0]); - var opts = __assign(__assign({}, options), { context: elements, relativeSelector: false }); - selector.push(SCOPE_PSEUDO); - return findFilterElements(root, selector, opts, true, elements.length); - } - // Performance optimization: If we don't have to traverse, just filter set. - return findFilterElements(elements, selector, options, false, elements.length); -} -function select(selector, root, options, limit) { - if (options === void 0) { options = {}; } - if (limit === void 0) { limit = Infinity; } - if (typeof selector === "function") { - return find(root, selector); - } - var _a = (0, helpers_js_1.groupSelectors)((0, css_what_1.parse)(selector)), plain = _a[0], filtered = _a[1]; - var results = filtered.map(function (sel) { - return findFilterElements(root, sel, options, true, limit); - }); - // Plain selectors can be queried in a single go - if (plain.length) { - results.push(findElements(root, plain, options, limit)); - } - if (results.length === 0) { - return []; - } - // If there was only a single selector, just return the result - if (results.length === 1) { - return results[0]; - } - // Sort results, filtering for duplicates - return DomUtils.uniqueSort(results.reduce(function (a, b) { return __spreadArray(__spreadArray([], a, true), b, true); })); -} -exports.select = select; -/** - * - * @param root Element(s) to search from. - * @param selector Selector to look for. - * @param options Options for querying. - * @param queryForSelector Query multiple levels deep for the initial selector, even if it doesn't contain a traversal. - */ -function findFilterElements(root, selector, options, queryForSelector, totalLimit) { - var filterIndex = selector.findIndex(positionals_js_1.isFilter); - var sub = selector.slice(0, filterIndex); - var filter = selector[filterIndex]; - // If we are at the end of the selector, we can limit the number of elements to retrieve. - var partLimit = selector.length - 1 === filterIndex ? totalLimit : Infinity; - /* - * Set the number of elements to retrieve. - * Eg. for :first, we only have to get a single element. - */ - var limit = (0, positionals_js_1.getLimit)(filter.name, filter.data, partLimit); - if (limit === 0) - return []; - /* - * Skip `findElements` call if our selector starts with a positional - * pseudo. - */ - var elemsNoLimit = sub.length === 0 && !Array.isArray(root) - ? DomUtils.getChildren(root).filter(DomUtils.isTag) - : sub.length === 0 - ? (Array.isArray(root) ? root : [root]).filter(DomUtils.isTag) - : queryForSelector || sub.some(css_what_1.isTraversal) - ? findElements(root, [sub], options, limit) - : filterElements(root, [sub], options); - var elems = elemsNoLimit.slice(0, limit); - var result = filterByPosition(filter.name, elems, filter.data, options); - if (result.length === 0 || selector.length === filterIndex + 1) { - return result; - } - var remainingSelector = selector.slice(filterIndex + 1); - var remainingHasTraversal = remainingSelector.some(css_what_1.isTraversal); - if (remainingHasTraversal) { - if ((0, css_what_1.isTraversal)(remainingSelector[0])) { - var type = remainingSelector[0].type; - if (type === css_what_1.SelectorType.Sibling || - type === css_what_1.SelectorType.Adjacent) { - // If we have a sibling traversal, we need to also look at the siblings. - result = (0, css_select_1.prepareContext)(result, DomUtils, true); - } - // Avoid a traversal-first selector error. - remainingSelector.unshift(UNIVERSAL_SELECTOR); - } - options = __assign(__assign({}, options), { - // Avoid absolutizing the selector - relativeSelector: false, - /* - * Add a custom root func, to make sure traversals don't match elements - * that aren't a part of the considered tree. - */ - rootFunc: function (el) { return result.includes(el); } }); - } - else if (options.rootFunc && options.rootFunc !== boolbase.trueFunc) { - options = __assign(__assign({}, options), { rootFunc: boolbase.trueFunc }); - } - /* - * If we have another filter, recursively call `findFilterElements`, - * with the `recursive` flag disabled. We only have to look for more - * elements when we see a traversal. - * - * Otherwise, - */ - return remainingSelector.some(positionals_js_1.isFilter) - ? findFilterElements(result, remainingSelector, options, false, totalLimit) - : remainingHasTraversal - ? // Query existing elements to resolve traversal. - findElements(result, [remainingSelector], options, totalLimit) - : // If we don't have any more traversals, simply filter elements. - filterElements(result, [remainingSelector], options); -} -function findElements(root, sel, options, limit) { - var query = (0, css_select_1._compileToken)(sel, options, root); - return find(root, query, limit); -} -function find(root, query, limit) { - if (limit === void 0) { limit = Infinity; } - var elems = (0, css_select_1.prepareContext)(root, DomUtils, query.shouldTestNextSiblings); - return DomUtils.find(function (node) { return DomUtils.isTag(node) && query(node); }, elems, true, limit); -} -function filterElements(elements, sel, options) { - var els = (Array.isArray(elements) ? elements : [elements]).filter(DomUtils.isTag); - if (els.length === 0) - return els; - var query = (0, css_select_1._compileToken)(sel, options); - return query === boolbase.trueFunc ? els : els.filter(query); -} -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/cheerio-select/lib/index.js.map b/node_modules/cheerio-select/lib/index.js.map deleted file mode 100644 index 19a157e..0000000 --- a/node_modules/cheerio-select/lib/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sourceRoot":"https://raw.githubusercontent.com/cheeriojs/cheerio-select/ef063a6ca4c3f0d02d2fc3505e750b6fb81c448d/src/","sources":["index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,qCAA2E;AAC3E,yCAIoB;AACpB,iDAAqC;AACrC,iDAAqC;AAErC,2CAA+D;AAC/D,mDAK0B;AAE1B,oCAAoC;AACpC,yCAAuD;AAA9C,qGAAA,OAAO,OAAA;AAAE,qGAAA,OAAO,OAAA;AAAE,qGAAA,OAAO,OAAA;AAElC,IAAM,kBAAkB,GAAa;IACjC,IAAI,EAAE,uBAAY,CAAC,SAAS;IAC5B,SAAS,EAAE,IAAI;CAClB,CAAC;AACF,IAAM,YAAY,GAAa;IAC3B,IAAI,EAAE,uBAAY,CAAC,MAAM;IACzB,IAAI,EAAE,OAAO;IACb,IAAI,EAAE,IAAI;CACb,CAAC;AAOF,SAAgB,EAAE,CACd,OAAgB,EAChB,QAA6C,EAC7C,OAAqB;IAArB,wBAAA,EAAA,YAAqB;IAErB,OAAO,IAAI,CAAC,CAAC,OAAO,CAA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AC,MAAM,CAChE,QAAQ,CAAC,KAAK,CACjB,CAAC;IAEF,IAAI,GAAG,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,GAAG,CAAC;IAEjC,IAAM,KAAK,GAAG,IAAA,0BAAY,EAAmB,GAAG,EAAE,OAAO,CAAC,CAAC;IAC3D,OAAO,KAAK,KAAK,QAAQ,CAAC,QAAQ,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;AACjE,CAAC"} \ No newline at end of file diff --git a/node_modules/cheerio-select/lib/positionals.d.ts b/node_modules/cheerio-select/lib/positionals.d.ts deleted file mode 100644 index 5315dd3..0000000 --- a/node_modules/cheerio-select/lib/positionals.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -import type { Selector, PseudoSelector } from "css-what"; -export declare type Filter = "first" | "last" | "eq" | "nth" | "gt" | "lt" | "even" | "odd" | "not"; -export declare const filterNames: Set<string>; -export interface CheerioSelector extends PseudoSelector { - name: Filter; - data: string | null; -} -export declare function isFilter(s: Selector): s is CheerioSelector; -export declare function getLimit(filter: Filter, data: string | null, partLimit: number): number; -//# sourceMappingURL=positionals.d.ts.map \ No newline at end of file diff --git a/node_modules/cheerio-select/lib/positionals.d.ts.map b/node_modules/cheerio-select/lib/positionals.d.ts.map deleted file mode 100644 index 0e0db37..0000000 --- a/node_modules/cheerio-select/lib/positionals.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"positionals.d.ts","sourceRoot":"https://raw.githubusercontent.com/cheeriojs/cheerio-select/ef063a6ca4c3f0d02d2fc3505e750b6fb81c448d/src/","sources":["positionals.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAEzD,oBAAY,MAAM,GACZ,OAAO,GACP,MAAM,GACN,IAAI,GACJ,KAAK,GACL,IAAI,GACJ,IAAI,GACJ,MAAM,GACN,KAAK,GACL,KAAK,CAAC;AACZ,eAAO,MAAM,WAAW,EAAE,GAAG,CAAC,MAAM,CASlC,CAAC;AAEH,MAAM,WAAW,eAAgB,SAAQ,cAAc;IACnD,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;CACvB;AAED,wBAAgB,QAAQ,CAAC,CAAC,EAAE,QAAQ,GAAG,CAAC,IAAI,eAAe,CAS1D;AAED,wBAAgB,QAAQ,CACpB,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,MAAM,GAAG,IAAI,EACnB,SAAS,EAAE,MAAM,GAClB,MAAM,CAyBR"} \ No newline at end of file diff --git a/node_modules/cheerio-select/lib/positionals.js b/node_modules/cheerio-select/lib/positionals.js deleted file mode 100644 index 754bb25..0000000 --- a/node_modules/cheerio-select/lib/positionals.js +++ /dev/null @@ -1,52 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.getLimit = exports.isFilter = exports.filterNames = void 0; -exports.filterNames = new Set([ - "first", - "last", - "eq", - "gt", - "nth", - "lt", - "even", - "odd", -]); -function isFilter(s) { - if (s.type !== "pseudo") - return false; - if (exports.filterNames.has(s.name)) - return true; - if (s.name === "not" && Array.isArray(s.data)) { - // Only consider `:not` with embedded filters - return s.data.some(function (s) { return s.some(isFilter); }); - } - return false; -} -exports.isFilter = isFilter; -function getLimit(filter, data, partLimit) { - var num = data != null ? parseInt(data, 10) : NaN; - switch (filter) { - case "first": - return 1; - case "nth": - case "eq": - return isFinite(num) ? (num >= 0 ? num + 1 : Infinity) : 0; - case "lt": - return isFinite(num) - ? num >= 0 - ? Math.min(num, partLimit) - : Infinity - : 0; - case "gt": - return isFinite(num) ? Infinity : 0; - case "odd": - return 2 * partLimit; - case "even": - return 2 * partLimit - 1; - case "last": - case "not": - return Infinity; - } -} -exports.getLimit = getLimit; -//# sourceMappingURL=positionals.js.map \ No newline at end of file diff --git a/node_modules/cheerio-select/lib/positionals.js.map b/node_modules/cheerio-select/lib/positionals.js.map deleted file mode 100644 index eed1e88..0000000 --- a/node_modules/cheerio-select/lib/positionals.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"positionals.js","sourceRoot":"https://raw.githubusercontent.com/cheeriojs/cheerio-select/ef063a6ca4c3f0d02d2fc3505e750b6fb81c448d/src/","sources":["positionals.ts"],"names":[],"mappings":";;;AAYa,QAAA,WAAW,GAAgB,IAAI,GAAG,CAAS;IACpD,OAAO;IACP,MAAM;IACN,IAAI;IACJ,IAAI;IACJ,KAAK;IACL,IAAI;IACJ,MAAM;IACN,KAAK;CACR,CAAC,CAAC;AAOH,SAAgB,QAAQ,CAAC,CAAW;IAChC,IAAI,CAAC,CAAC,IAAI,KAAK,QAAQ;QAAE,OAAO,KAAK,CAAC;IACtC,IAAI,mBAAW,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC;QAAE,OAAO,IAAI,CAAC;IACzC,IAAI,CAAC,CAAC,IAAI,KAAK,KAAK,IAAI,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE;QAC3C,6CAA6C;QAC7C,OAAO,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,UAAC,CAAC,IAAK,OAAA,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAhB,CAAgB,CAAC,CAAC;KAC/C;IAED,OAAO,KAAK,CAAC;AACjB,CAAC;AATD,4BASC;AAED,SAAgB,QAAQ,CACpB,MAAc,EACd,IAAmB,EACnB,SAAiB;IAEjB,IAAM,GAAG,GAAG,IAAI,IAAI,IAAI,CAAC,CAAC,CAAC,QAAQ,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC;IAEpD,QAAQ,MAAM,EAAE;QACZ,KAAK,OAAO;YACR,OAAO,CAAC,CAAC;QACb,KAAK,KAAK,CAAC;QACX,KAAK,IAAI;YACL,OAAO,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAC/D,KAAK,IAAI;YACL,OAAO,QAAQ,CAAC,GAAG,CAAC;gBAChB,CAAC,CAAC,GAAG,IAAI,CAAC;oBACN,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,SAAS,CAAC;oBAC1B,CAAC,CAAC,QAAQ;gBACd,CAAC,CAAC,CAAC,CAAC;QACZ,KAAK,IAAI;YACL,OAAO,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC;QACxC,KAAK,KAAK;YACN,OAAO,CAAC,GAAG,SAAS,CAAC;QACzB,KAAK,MAAM;YACP,OAAO,CAAC,GAAG,SAAS,GAAG,CAAC,CAAC;QAC7B,KAAK,MAAM,CAAC;QACZ,KAAK,KAAK;YACN,OAAO,QAAQ,CAAC;KACvB;AACL,CAAC;AA7BD,4BA6BC"} \ No newline at end of file diff --git a/node_modules/cheerio-select/package.json b/node_modules/cheerio-select/package.json deleted file mode 100644 index 96b34cb..0000000 --- a/node_modules/cheerio-select/package.json +++ /dev/null @@ -1,76 +0,0 @@ -{ - "name": "cheerio-select", - "description": "CSS selector engine supporting jQuery selectors", - "version": "2.1.0", - "author": "Felix Boehm <me@feedic.com>", - "funding": { - "url": "https://github.com/sponsors/fb55" - }, - "license": "BSD-2-Clause", - "sideEffects": false, - "repository": { - "type": "git", - "url": "git://github.com/cheeriojs/cheerio-select.git" - }, - "directories": { - "lib": "lib/" - }, - "main": "lib/index.js", - "types": "lib/index.d.ts", - "module": "lib/esm/index.js", - "exports": { - "require": "./lib/index.js", - "import": "./lib/esm/index.js" - }, - "files": [ - "lib/**/*" - ], - "scripts": { - "test": "npm run test:jest && npm run lint", - "test:jest": "jest", - "lint": "npm run lint:es && npm run lint:prettier", - "lint:es": "eslint src", - "lint:prettier": "npm run format:prettier:raw -- --check", - "format": "npm run format:es && npm run format:prettier", - "format:es": "npm run lint:es -- --fix", - "format:prettier": "npm run format:prettier:raw -- --write", - "format:prettier:raw": "prettier '**/*.{ts,md,json,yml}'", - "build": "npm run build:cjs && npm run build:esm", - "build:cjs": "tsc --sourceRoot https://raw.githubusercontent.com/cheeriojs/cheerio-select/$(git rev-parse HEAD)/src/", - "build:esm": "npm run build:cjs -- --module esnext --target es2019 --outDir lib/esm && echo '{\"type\":\"module\"}' > lib/esm/package.json", - "prepare": "npm run build" - }, - "dependencies": { - "boolbase": "^1.0.0", - "css-select": "^5.1.0", - "css-what": "^6.1.0", - "domelementtype": "^2.3.0", - "domhandler": "^5.0.3", - "domutils": "^3.0.1" - }, - "devDependencies": { - "@types/boolbase": "^1.0.1", - "@types/jest": "^27.5.0", - "@types/node": "^17.0.33", - "@typescript-eslint/eslint-plugin": "^5.23.0", - "@typescript-eslint/parser": "^5.23.0", - "eslint": "^8.15.0", - "eslint-config-prettier": "^8.5.0", - "htmlparser2": "^8.0.1", - "jest": "^27.5.1", - "prettier": "^2.6.2", - "ts-jest": "^27.1.4", - "typescript": "^4.6.4" - }, - "jest": { - "preset": "ts-jest", - "testEnvironment": "node", - "coverageProvider": "v8", - "moduleNameMapper": { - "^(.*)\\.js$": "$1" - } - }, - "prettier": { - "tabWidth": 4 - } -} diff --git a/node_modules/cheerio/dist/browser/api/attributes.d.ts b/node_modules/cheerio/dist/browser/api/attributes.d.ts deleted file mode 100644 index a358044..0000000 --- a/node_modules/cheerio/dist/browser/api/attributes.d.ts +++ /dev/null @@ -1,385 +0,0 @@ -/** - * Methods for getting and modifying attributes. - * - * @module cheerio/attributes - */ -import { type AnyNode, type Element } from 'domhandler'; -import type { Cheerio } from '../cheerio.js'; -/** - * Method for getting attributes. Gets the attribute value for only the first - * element in the matched set. - * - * @category Attributes - * @example - * - * ```js - * $('ul').attr('id'); - * //=> fruits - * ``` - * - * @param name - Name of the attribute. - * @returns The attribute's value. - * @see {@link https://api.jquery.com/attr/} - */ -export declare function attr<T extends AnyNode>(this: Cheerio<T>, name: string): string | undefined; -/** - * Method for getting all attributes and their values of the first element in - * the matched set. - * - * @category Attributes - * @example - * - * ```js - * $('ul').attr(); - * //=> { id: 'fruits' } - * ``` - * - * @returns The attribute's values. - * @see {@link https://api.jquery.com/attr/} - */ -export declare function attr<T extends AnyNode>(this: Cheerio<T>): Record<string, string> | undefined; -/** - * Method for setting attributes. Sets the attribute value for only the first - * element in the matched set. If you set an attribute's value to `null`, you - * remove that attribute. You may also pass a `map` and `function`. - * - * @category Attributes - * @example - * - * ```js - * $('.apple').attr('id', 'favorite').html(); - * //=> <li class="apple" id="favorite">Apple</li> - * ``` - * - * @param name - Name of the attribute. - * @param value - The new value of the attribute. - * @returns The instance itself. - * @see {@link https://api.jquery.com/attr/} - */ -export declare function attr<T extends AnyNode>(this: Cheerio<T>, name: string, value?: string | null | ((this: Element, i: number, attrib: string) => string | null)): Cheerio<T>; -/** - * Method for setting multiple attributes at once. Sets the attribute value for - * only the first element in the matched set. If you set an attribute's value to - * `null`, you remove that attribute. - * - * @category Attributes - * @example - * - * ```js - * $('.apple').attr({ id: 'favorite' }).html(); - * //=> <li class="apple" id="favorite">Apple</li> - * ``` - * - * @param values - Map of attribute names and values. - * @returns The instance itself. - * @see {@link https://api.jquery.com/attr/} - */ -export declare function attr<T extends AnyNode>(this: Cheerio<T>, values: Record<string, string | null>): Cheerio<T>; -interface StyleProp { - length: number; - [key: string]: string | number; - [index: number]: string; -} -/** - * Method for getting and setting properties. Gets the property value for only - * the first element in the matched set. - * - * @category Attributes - * @example - * - * ```js - * $('input[type="checkbox"]').prop('checked'); - * //=> false - * - * $('input[type="checkbox"]').prop('checked', true).val(); - * //=> ok - * ``` - * - * @param name - Name of the property. - * @returns If `value` is specified the instance itself, otherwise the prop's - * value. - * @see {@link https://api.jquery.com/prop/} - */ -export declare function prop<T extends AnyNode>(this: Cheerio<T>, name: 'tagName' | 'nodeName'): string | undefined; -export declare function prop<T extends AnyNode>(this: Cheerio<T>, name: 'innerHTML' | 'outerHTML' | 'innerText' | 'textContent'): string | null; -/** - * Get a parsed CSS style object. - * - * @param name - Name of the property. - * @returns The style object, or `undefined` if the element has no `style` - * attribute. - */ -export declare function prop<T extends AnyNode>(this: Cheerio<T>, name: 'style'): StyleProp | undefined; -/** - * Resolve `href` or `src` of supported elements. Requires the `baseURI` option - * to be set, and a global `URL` object to be part of the environment. - * - * @example With `baseURI` set to `'https://example.com'`: - * - * ```js - * $('<img src="image.png">').prop('src'); - * //=> 'https://example.com/image.png' - * ``` - * - * @param name - Name of the property. - * @returns The resolved URL, or `undefined` if the element is not supported. - */ -export declare function prop<T extends AnyNode>(this: Cheerio<T>, name: 'href' | 'src'): string | undefined; -/** - * Get a property of an element. - * - * @param name - Name of the property. - * @returns The property's value. - */ -export declare function prop<T extends AnyNode, K extends keyof Element>(this: Cheerio<T>, name: K): Element[K]; -/** - * Set a property of an element. - * - * @param name - Name of the property. - * @param value - Value to set the property to. - * @returns The instance itself. - */ -export declare function prop<T extends AnyNode, K extends keyof Element>(this: Cheerio<T>, name: K, value: Element[K] | ((this: Element, i: number, prop: K) => Element[keyof Element])): Cheerio<T>; -/** - * Set multiple properties of an element. - * - * @example - * - * ```js - * $('input[type="checkbox"]').prop({ - * checked: true, - * disabled: false, - * }); - * ``` - * - * @param map - Object of properties to set. - * @returns The instance itself. - */ -export declare function prop<T extends AnyNode>(this: Cheerio<T>, map: Record<string, string | Element[keyof Element] | boolean>): Cheerio<T>; -/** - * Set a property of an element. - * - * @param name - Name of the property. - * @param value - Value to set the property to. - * @returns The instance itself. - */ -export declare function prop<T extends AnyNode>(this: Cheerio<T>, name: string, value: string | boolean | null | ((this: Element, i: number, prop: string) => string | boolean)): Cheerio<T>; -/** - * Get a property of an element. - * - * @param name - The property's name. - * @returns The property's value. - */ -export declare function prop<T extends AnyNode>(this: Cheerio<T>, name: string): string; -/** - * Method for getting data attributes, for only the first element in the matched - * set. - * - * @category Attributes - * @example - * - * ```js - * $('<div data-apple-color="red"></div>').data('apple-color'); - * //=> 'red' - * ``` - * - * @param name - Name of the data attribute. - * @returns The data attribute's value, or `undefined` if the attribute does not - * exist. - * @see {@link https://api.jquery.com/data/} - */ -export declare function data<T extends AnyNode>(this: Cheerio<T>, name: string): unknown | undefined; -/** - * Method for getting all of an element's data attributes, for only the first - * element in the matched set. - * - * @category Attributes - * @example - * - * ```js - * $('<div data-apple-color="red"></div>').data(); - * //=> { appleColor: 'red' } - * ``` - * - * @returns A map with all of the data attributes. - * @see {@link https://api.jquery.com/data/} - */ -export declare function data<T extends AnyNode>(this: Cheerio<T>): Record<string, unknown>; -/** - * Method for setting data attributes, for only the first element in the matched - * set. - * - * @category Attributes - * @example - * - * ```js - * const apple = $('.apple').data('kind', 'mac'); - * - * apple.data('kind'); - * //=> 'mac' - * ``` - * - * @param name - Name of the data attribute. - * @param value - The new value. - * @returns The instance itself. - * @see {@link https://api.jquery.com/data/} - */ -export declare function data<T extends AnyNode>(this: Cheerio<T>, name: string, value: unknown): Cheerio<T>; -/** - * Method for setting multiple data attributes at once, for only the first - * element in the matched set. - * - * @category Attributes - * @example - * - * ```js - * const apple = $('.apple').data({ kind: 'mac' }); - * - * apple.data('kind'); - * //=> 'mac' - * ``` - * - * @param values - Map of names to values. - * @returns The instance itself. - * @see {@link https://api.jquery.com/data/} - */ -export declare function data<T extends AnyNode>(this: Cheerio<T>, values: Record<string, unknown>): Cheerio<T>; -/** - * Method for getting the value of input, select, and textarea. Note: Support - * for `map`, and `function` has not been added yet. - * - * @category Attributes - * @example - * - * ```js - * $('input[type="text"]').val(); - * //=> input_text - * ``` - * - * @returns The value. - * @see {@link https://api.jquery.com/val/} - */ -export declare function val<T extends AnyNode>(this: Cheerio<T>): string | undefined | string[]; -/** - * Method for setting the value of input, select, and textarea. Note: Support - * for `map`, and `function` has not been added yet. - * - * @category Attributes - * @example - * - * ```js - * $('input[type="text"]').val('test').html(); - * //=> <input type="text" value="test"/> - * ``` - * - * @param value - The new value. - * @returns The instance itself. - * @see {@link https://api.jquery.com/val/} - */ -export declare function val<T extends AnyNode>(this: Cheerio<T>, value: string | string[]): Cheerio<T>; -/** - * Method for removing attributes by `name`. - * - * @category Attributes - * @example - * - * ```js - * $('.pear').removeAttr('class').html(); - * //=> <li>Pear</li> - * - * $('.apple').attr('id', 'favorite'); - * $('.apple').removeAttr('id class').html(); - * //=> <li>Apple</li> - * ``` - * - * @param name - Name of the attribute. - * @returns The instance itself. - * @see {@link https://api.jquery.com/removeAttr/} - */ -export declare function removeAttr<T extends AnyNode>(this: Cheerio<T>, name: string): Cheerio<T>; -/** - * Check to see if _any_ of the matched elements have the given `className`. - * - * @category Attributes - * @example - * - * ```js - * $('.pear').hasClass('pear'); - * //=> true - * - * $('apple').hasClass('fruit'); - * //=> false - * - * $('li').hasClass('pear'); - * //=> true - * ``` - * - * @param className - Name of the class. - * @returns Indicates if an element has the given `className`. - * @see {@link https://api.jquery.com/hasClass/} - */ -export declare function hasClass<T extends AnyNode>(this: Cheerio<T>, className: string): boolean; -/** - * Adds class(es) to all of the matched elements. Also accepts a `function`. - * - * @category Attributes - * @example - * - * ```js - * $('.pear').addClass('fruit').html(); - * //=> <li class="pear fruit">Pear</li> - * - * $('.apple').addClass('fruit red').html(); - * //=> <li class="apple fruit red">Apple</li> - * ``` - * - * @param value - Name of new class. - * @returns The instance itself. - * @see {@link https://api.jquery.com/addClass/} - */ -export declare function addClass<T extends AnyNode, R extends ArrayLike<T>>(this: R, value?: string | ((this: Element, i: number, className: string) => string | undefined)): R; -/** - * Removes one or more space-separated classes from the selected elements. If no - * `className` is defined, all classes will be removed. Also accepts a - * `function`. - * - * @category Attributes - * @example - * - * ```js - * $('.pear').removeClass('pear').html(); - * //=> <li class="">Pear</li> - * - * $('.apple').addClass('red').removeClass().html(); - * //=> <li class="">Apple</li> - * ``` - * - * @param name - Name of the class. If not specified, removes all elements. - * @returns The instance itself. - * @see {@link https://api.jquery.com/removeClass/} - */ -export declare function removeClass<T extends AnyNode, R extends ArrayLike<T>>(this: R, name?: string | ((this: Element, i: number, className: string) => string | undefined)): R; -/** - * Add or remove class(es) from the matched elements, depending on either the - * class's presence or the value of the switch argument. Also accepts a - * `function`. - * - * @category Attributes - * @example - * - * ```js - * $('.apple.green').toggleClass('fruit green red').html(); - * //=> <li class="apple fruit red">Apple</li> - * - * $('.apple.green').toggleClass('fruit green red', true).html(); - * //=> <li class="apple green fruit red">Apple</li> - * ``` - * - * @param value - Name of the class. Can also be a function. - * @param stateVal - If specified the state of the class. - * @returns The instance itself. - * @see {@link https://api.jquery.com/toggleClass/} - */ -export declare function toggleClass<T extends AnyNode, R extends ArrayLike<T>>(this: R, value?: string | ((this: Element, i: number, className: string, stateVal?: boolean) => string), stateVal?: boolean): R; -export {}; -//# sourceMappingURL=attributes.d.ts.map \ No newline at end of file diff --git a/node_modules/cheerio/dist/browser/api/attributes.d.ts.map b/node_modules/cheerio/dist/browser/api/attributes.d.ts.map deleted file mode 100644 index 1e09a61..0000000 --- a/node_modules/cheerio/dist/browser/api/attributes.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"attributes.d.ts","sourceRoot":"","sources":["../../../src/api/attributes.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,OAAO,EAAS,KAAK,OAAO,EAAE,KAAK,OAAO,EAAE,MAAM,YAAY,CAAC;AAC/D,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAwF7C;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,IAAI,CAAC,CAAC,SAAS,OAAO,EACpC,IAAI,EAAE,OAAO,CAAC,CAAC,CAAC,EAChB,IAAI,EAAE,MAAM,GACX,MAAM,GAAG,SAAS,CAAC;AACtB;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,IAAI,CAAC,CAAC,SAAS,OAAO,EACpC,IAAI,EAAE,OAAO,CAAC,CAAC,CAAC,GACf,MAAM,CAAC,MAAM,EAAE,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AM,GACN,CAAC,CACC,IAAI,EAAE,OAAO,EACb,CAAC,EAAE,MAAM,EACT,SAAS,EAAE,MAAM,EACjB,QAAQ,CAAC,EAAE,OAAO,KACf,MAAM,CAAC,EAChB,QAAQ,CAAC,EAAE,OAAO,GACjB,CAAC,CA+CH"} \ No newline at end of file diff --git a/node_modules/cheerio/dist/browser/api/attributes.js b/node_modules/cheerio/dist/browser/api/attributes.js deleted file mode 100644 index 0782b5b..0000000 --- a/node_modules/cheerio/dist/browser/api/attributes.js +++ /dev/null @@ -1,619 +0,0 @@ -/** - * Methods for getting and modifying attributes. - * - * @module cheerio/attributes - */ -import { text } from '../static.js'; -import { domEach, camelCase, cssCase } from '../utils.js'; -import { isTag } from 'domhandler'; -import { innerText, textContent } from 'domutils'; -const hasOwn = Object.prototype.hasOwnProperty; -const rspace = /\s+/; -const dataAttrPrefix = 'data-'; -// Attributes that are booleans -const rboolean = /^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i; -// Matches strings that look like JSON objects or arrays -const rbrace = /^{[^]*}$|^\[[^]*]$/; -function getAttr(elem, name, xmlMode) { - var _a; - if (!elem || !isTag(elem)) - return undefined; - (_a = elem.attribs) !== null && _a !== void 0 ? _a : (elem.attribs = {}); - // Return the entire attribs object if no attribute specified - if (!name) { - return elem.attribs; - } - if (hasOwn.call(elem.attribs, name)) { - // Get the (decoded) attribute - return !xmlMode && rboolean.test(name) ? name : elem.attribs[name]; - } - // Mimic the DOM and return text content as value for `option's` - if (elem.name === 'option' && name === 'value') { - return text(elem.children); - } - // Mimic DOM with default value for radios/checkboxes - if (elem.name === 'input' && - (elem.attribs['type'] === 'radio' || elem.attribs['type'] === 'checkbox') && - name === 'value') { - return 'on'; - } - return undefined; -} -/** - * Sets the value of an attribute. The attribute will be deleted if the value is - * `null`. - * - * @private - * @param el - The element to set the attribute on. - * @param name - The attribute's name. - * @param value - The attribute's value. - */ -function setAttr(el, name, value) { - if (value === null) { - removeAttribute(el, name); - } - else { - el.attribs[name] = `${value}`; - } -} -export function attr(name, value) { - // Set the value (with attr map support) - if (typeof name === 'object' || value !== undefined) { - if (typeof value === 'function') { - if (typeof name !== 'string') { - { - throw new Error('Bad combination of arguments.'); - } - } - return domEach(this, (el, i) => { - if (isTag(el)) - setAttr(el, name, value.call(el, i, el.attribs[name])); - }); - } - return domEach(this, (el) => { - if (!isTag(el)) - return; - if (typeof name === 'object') { - for (const objName of Object.keys(name)) { - const objValue = name[objName]; - setAttr(el, objName, objValue); - } - } - else { - setAttr(el, name, value); - } - }); - } - return arguments.length > 1 - ? this - : getAttr(this[0], name, this.options.xmlMode); -} -/** - * Gets a node's prop. - * - * @private - * @category Attributes - * @param el - Element to get the prop of. - * @param name - Name of the prop. - * @param xmlMode - Disable handling of special HTML attributes. - * @returns The prop's value. - */ -function getProp(el, name, xmlMode) { - return name in el - ? // @ts-expect-error TS doesn't like us accessing the value directly here. - el[name] - : !xmlMode && rboolean.test(name) - ? getAttr(el, name, false) !== undefined - : getAttr(el, name, xmlMode); -} -/** - * Sets the value of a prop. - * - * @private - * @param el - The element to set the prop on. - * @param name - The prop's name. - * @param value - The prop's value. - * @param xmlMode - Disable handling of special HTML attributes. - */ -function setProp(el, name, value, xmlMode) { - if (name in el) { - // @ts-expect-error Overriding value - el[name] = value; - } - else { - setAttr(el, name, !xmlMode && rboolean.test(name) ? (value ? '' : null) : `${value}`); - } -} -export function prop(name, value) { - var _a; - if (typeof name === 'string' && value === undefined) { - const el = this[0]; - if (!el || !isTag(el)) - return undefined; - switch (name) { - case 'style': { - const property = this.css(); - const keys = Object.keys(property); - for (let i = 0; i < keys.length; i++) { - property[i] = keys[i]; - } - property.length = keys.length; - return property; - } - case 'tagName': - case 'nodeName': { - return el.name.toUpperCase(); - } - case 'href': - case 'src': { - const prop = (_a = el.attribs) === null || _a === void 0 ? void 0 : _a[name]; - if (typeof URL !== 'undefined' && - ((name === 'href' && (el.tagName === 'a' || el.tagName === 'link')) || - (name === 'src' && - (el.tagName === 'img' || - el.tagName === 'iframe' || - el.tagName === 'audio' || - el.tagName === 'video' || - el.tagName === 'source'))) && - prop !== undefined && - this.options.baseURI) { - return new URL(prop, this.options.baseURI).href; - } - return prop; - } - case 'innerText': { - return innerText(el); - } - case 'textContent': { - return textContent(el); - } - case 'outerHTML': { - return this.clone().wrap('<container />').parent().html(); - } - case 'innerHTML': { - return this.html(); - } - default: { - return getProp(el, name, this.options.xmlMode); - } - } - } - if (typeof name === 'object' || value !== undefined) { - if (typeof value === 'function') { - if (typeof name === 'object') { - throw new TypeError('Bad combination of arguments.'); - } - return domEach(this, (el, i) => { - if (isTag(el)) { - setProp(el, name, value.call(el, i, getProp(el, name, this.options.xmlMode)), this.options.xmlMode); - } - }); - } - return domEach(this, (el) => { - if (!isTag(el)) - return; - if (typeof name === 'object') { - for (const key of Object.keys(name)) { - const val = name[key]; - setProp(el, key, val, this.options.xmlMode); - } - } - else { - setProp(el, name, value, this.options.xmlMode); - } - }); - } - return undefined; -} -/** - * Sets the value of a data attribute. - * - * @private - * @param elem - The element to set the data attribute on. - * @param name - The data attribute's name. - * @param value - The data attribute's value. - */ -function setData(elem, name, value) { - var _a; - (_a = elem.data) !== null && _a !== void 0 ? _a : (elem.data = {}); - if (typeof name === 'object') - Object.assign(elem.data, name); - else if (typeof name === 'string' && value !== undefined) { - elem.data[name] = value; - } -} -/** - * Read _all_ HTML5 `data-*` attributes from the equivalent HTML5 `data-*` - * attribute, and cache the value in the node's internal data store. - * - * @private - * @category Attributes - * @param el - Element to get the data attribute of. - * @returns A map with all of the data attributes. - */ -function readAllData(el) { - for (const domName of Object.keys(el.attribs)) { - if (!domName.startsWith(dataAttrPrefix)) { - continue; - } - const jsName = camelCase(domName.slice(dataAttrPrefix.length)); - if (!hasOwn.call(el.data, jsName)) { - el.data[jsName] = parseDataValue(el.attribs[domName]); - } - } - return el.data; -} -/** - * Read the specified attribute from the equivalent HTML5 `data-*` attribute, - * and (if present) cache the value in the node's internal data store. - * - * @private - * @category Attributes - * @param el - Element to get the data attribute of. - * @param name - Name of the data attribute. - * @returns The data attribute's value. - */ -function readData(el, name) { - const domName = dataAttrPrefix + cssCase(name); - const data = el.data; - if (hasOwn.call(data, name)) { - return data[name]; - } - if (hasOwn.call(el.attribs, domName)) { - return (data[name] = parseDataValue(el.attribs[domName])); - } - return undefined; -} -/** - * Coerce string data-* attributes to their corresponding JavaScript primitives. - * - * @private - * @category Attributes - * @param value - The value to parse. - * @returns The parsed value. - */ -function parseDataValue(value) { - if (value === 'null') - return null; - if (value === 'true') - return true; - if (value === 'false') - return false; - const num = Number(value); - if (value === String(num)) - return num; - if (rbrace.test(value)) { - try { - return JSON.parse(value); - } - catch { - /* Ignore */ - } - } - return value; -} -export function data(name, value) { - var _a; - const elem = this[0]; - if (!elem || !isTag(elem)) - return; - const dataEl = elem; - (_a = dataEl.data) !== null && _a !== void 0 ? _a : (dataEl.data = {}); - // Return the entire data object if no data specified - if (name == null) { - return readAllData(dataEl); - } - // Set the value (with attr map support) - if (typeof name === 'object' || value !== undefined) { - domEach(this, (el) => { - if (isTag(el)) { - if (typeof name === 'object') - setData(el, name); - else - setData(el, name, value); - } - }); - return this; - } - return readData(dataEl, name); -} -export function val(value) { - const querying = arguments.length === 0; - const element = this[0]; - if (!element || !isTag(element)) - return querying ? undefined : this; - switch (element.name) { - case 'textarea': { - return this.text(value); - } - case 'select': { - const option = this.find('option:selected'); - if (!querying) { - if (this.attr('multiple') == null && typeof value === 'object') { - return this; - } - this.find('option').removeAttr('selected'); - const values = typeof value === 'object' ? value : [value]; - for (const val of values) { - this.find(`option[value="${val}"]`).attr('selected', ''); - } - return this; - } - return this.attr('multiple') - ? option.toArray().map((el) => text(el.children)) - : option.attr('value'); - } - case 'input': - case 'option': { - return querying - ? this.attr('value') - : this.attr('value', value); - } - } - return undefined; -} -/** - * Remove an attribute. - * - * @private - * @param elem - Node to remove attribute from. - * @param name - Name of the attribute to remove. - */ -function removeAttribute(elem, name) { - if (!elem.attribs || !hasOwn.call(elem.attribs, name)) - return; - delete elem.attribs[name]; -} -/** - * Splits a space-separated list of names to individual names. - * - * @category Attributes - * @param names - Names to split. - * @returns - Split names. - */ -function splitNames(names) { - return names ? names.trim().split(rspace) : []; -} -/** - * Method for removing attributes by `name`. - * - * @category Attributes - * @example - * - * ```js - * $('.pear').removeAttr('class').html(); - * //=> <li>Pear</li> - * - * $('.apple').attr('id', 'favorite'); - * $('.apple').removeAttr('id class').html(); - * //=> <li>Apple</li> - * ``` - * - * @param name - Name of the attribute. - * @returns The instance itself. - * @see {@link https://api.jquery.com/removeAttr/} - */ -export function removeAttr(name) { - const attrNames = splitNames(name); - for (const attrName of attrNames) { - domEach(this, (elem) => { - if (isTag(elem)) - removeAttribute(elem, attrName); - }); - } - return this; -} -/** - * Check to see if _any_ of the matched elements have the given `className`. - * - * @category Attributes - * @example - * - * ```js - * $('.pear').hasClass('pear'); - * //=> true - * - * $('apple').hasClass('fruit'); - * //=> false - * - * $('li').hasClass('pear'); - * //=> true - * ``` - * - * @param className - Name of the class. - * @returns Indicates if an element has the given `className`. - * @see {@link https://api.jquery.com/hasClass/} - */ -export function hasClass(className) { - return this.toArray().some((elem) => { - const clazz = isTag(elem) && elem.attribs['class']; - let idx = -1; - if (clazz && className.length > 0) { - while ((idx = clazz.indexOf(className, idx + 1)) > -1) { - const end = idx + className.length; - if ((idx === 0 || rspace.test(clazz[idx - 1])) && - (end === clazz.length || rspace.test(clazz[end]))) { - return true; - } - } - } - return false; - }); -} -/** - * Adds class(es) to all of the matched elements. Also accepts a `function`. - * - * @category Attributes - * @example - * - * ```js - * $('.pear').addClass('fruit').html(); - * //=> <li class="pear fruit">Pear</li> - * - * $('.apple').addClass('fruit red').html(); - * //=> <li class="apple fruit red">Apple</li> - * ``` - * - * @param value - Name of new class. - * @returns The instance itself. - * @see {@link https://api.jquery.com/addClass/} - */ -export function addClass(value) { - // Support functions - if (typeof value === 'function') { - return domEach(this, (el, i) => { - if (isTag(el)) { - const className = el.attribs['class'] || ''; - addClass.call([el], value.call(el, i, className)); - } - }); - } - // Return if no value or not a string or function - if (!value || typeof value !== 'string') - return this; - const classNames = value.split(rspace); - const numElements = this.length; - for (let i = 0; i < numElements; i++) { - const el = this[i]; - // If selected element isn't a tag, move on - if (!isTag(el)) - continue; - // If we don't already have classes — always set xmlMode to false here, as it doesn't matter for classes - const className = getAttr(el, 'class', false); - if (className) { - let setClass = ` ${className} `; - // Check if class already exists - for (const cn of classNames) { - const appendClass = `${cn} `; - if (!setClass.includes(` ${appendClass}`)) - setClass += appendClass; - } - setAttr(el, 'class', setClass.trim()); - } - else { - setAttr(el, 'class', classNames.join(' ').trim()); - } - } - return this; -} -/** - * Removes one or more space-separated classes from the selected elements. If no - * `className` is defined, all classes will be removed. Also accepts a - * `function`. - * - * @category Attributes - * @example - * - * ```js - * $('.pear').removeClass('pear').html(); - * //=> <li class="">Pear</li> - * - * $('.apple').addClass('red').removeClass().html(); - * //=> <li class="">Apple</li> - * ``` - * - * @param name - Name of the class. If not specified, removes all elements. - * @returns The instance itself. - * @see {@link https://api.jquery.com/removeClass/} - */ -export function removeClass(name) { - // Handle if value is a function - if (typeof name === 'function') { - return domEach(this, (el, i) => { - if (isTag(el)) { - removeClass.call([el], name.call(el, i, el.attribs['class'] || '')); - } - }); - } - const classes = splitNames(name); - const numClasses = classes.length; - const removeAll = arguments.length === 0; - return domEach(this, (el) => { - if (!isTag(el)) - return; - if (removeAll) { - // Short circuit the remove all case as this is the nice one - el.attribs['class'] = ''; - } - else { - const elClasses = splitNames(el.attribs['class']); - let changed = false; - for (let j = 0; j < numClasses; j++) { - const index = elClasses.indexOf(classes[j]); - if (index >= 0) { - elClasses.splice(index, 1); - changed = true; - /* - * We have to do another pass to ensure that there are not duplicate - * classes listed - */ - j--; - } - } - if (changed) { - el.attribs['class'] = elClasses.join(' '); - } - } - }); -} -/** - * Add or remove class(es) from the matched elements, depending on either the - * class's presence or the value of the switch argument. Also accepts a - * `function`. - * - * @category Attributes - * @example - * - * ```js - * $('.apple.green').toggleClass('fruit green red').html(); - * //=> <li class="apple fruit red">Apple</li> - * - * $('.apple.green').toggleClass('fruit green red', true).html(); - * //=> <li class="apple green fruit red">Apple</li> - * ``` - * - * @param value - Name of the class. Can also be a function. - * @param stateVal - If specified the state of the class. - * @returns The instance itself. - * @see {@link https://api.jquery.com/toggleClass/} - */ -export function toggleClass(value, stateVal) { - // Support functions - if (typeof value === 'function') { - return domEach(this, (el, i) => { - if (isTag(el)) { - toggleClass.call([el], value.call(el, i, el.attribs['class'] || '', stateVal), stateVal); - } - }); - } - // Return if no value or not a string or function - if (!value || typeof value !== 'string') - return this; - const classNames = value.split(rspace); - const numClasses = classNames.length; - const state = typeof stateVal === 'boolean' ? (stateVal ? 1 : -1) : 0; - const numElements = this.length; - for (let i = 0; i < numElements; i++) { - const el = this[i]; - // If selected element isn't a tag, move on - if (!isTag(el)) - continue; - const elementClasses = splitNames(el.attribs['class']); - // Check if class already exists - for (let j = 0; j < numClasses; j++) { - // Check if the class name is currently defined - const index = elementClasses.indexOf(classNames[j]); - // Add if stateValue === true or we are toggling and there is no value - if (state >= 0 && index < 0) { - elementClasses.push(classNames[j]); - } - else if (state <= 0 && index >= 0) { - // Otherwise remove but only if the item exists - elementClasses.splice(index, 1); - } - } - el.attribs['class'] = elementClasses.join(' '); - } - return this; -} -//# sourceMappingURL=attributes.js.map \ No newline at end of file diff --git a/node_modules/cheerio/dist/browser/api/attributes.js.map b/node_modules/cheerio/dist/browser/api/attributes.js.map deleted file mode 100644 index 1c70ce1..0000000 --- a/node_modules/cheerio/dist/browser/api/attributes.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"attributes.js","sourceRoot":"","sources":["../../../src/api/attributes.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AACpC,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,aAAa,C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/C,cAAc,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC;YAClC,CAAC;QACH,CAAC;QAED,EAAE,CAAC,OAAO,CAAC,OAAO,CAAC,GAAG,cAAc,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IACjD,CAAC;IAED,OAAO,IAAI,CAAC;AACd,CAAC"} \ No newline at end of file diff --git a/node_modules/cheerio/dist/browser/api/css.d.ts b/node_modules/cheerio/dist/browser/api/css.d.ts deleted file mode 100644 index 9997f34..0000000 --- a/node_modules/cheerio/dist/browser/api/css.d.ts +++ /dev/null @@ -1,42 +0,0 @@ -import { type Element, type AnyNode } from 'domhandler'; -import type { Cheerio } from '../cheerio.js'; -/** - * Get the value of a style property for the first element in the set of matched - * elements. - * - * @category CSS - * @param names - Optionally the names of the properties of interest. - * @returns A map of all of the style properties. - * @see {@link https://api.jquery.com/css/} - */ -export declare function css<T extends AnyNode>(this: Cheerio<T>, names?: string[]): Record<string, string> | undefined; -/** - * Get the value of a style property for the first element in the set of matched - * elements. - * - * @category CSS - * @param name - The name of the property. - * @returns The property value for the given name. - * @see {@link https://api.jquery.com/css/} - */ -export declare function css<T extends AnyNode>(this: Cheerio<T>, name: string): string | undefined; -/** - * Set one CSS property for every matched element. - * - * @category CSS - * @param prop - The name of the property. - * @param val - The new value. - * @returns The instance itself. - * @see {@link https://api.jquery.com/css/} - */ -export declare function css<T extends AnyNode>(this: Cheerio<T>, prop: string, val: string | ((this: Element, i: number, style: string) => string | undefined)): Cheerio<T>; -/** - * Set multiple CSS properties for every matched element. - * - * @category CSS - * @param map - A map of property names and values. - * @returns The instance itself. - * @see {@link https://api.jquery.com/css/} - */ -export declare function css<T extends AnyNode>(this: Cheerio<T>, map: Record<string, string>): Cheerio<T>; -//# sourceMappingURL=css.d.ts.map \ No newline at end of file diff --git a/node_modules/cheerio/dist/browser/api/css.d.ts.map b/node_modules/cheerio/dist/browser/api/css.d.ts.map deleted file mode 100644 index 06bff02..0000000 --- a/node_modules/cheerio/dist/browser/api/css.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"css.d.ts","sourceRoot":"","sources":["../../../src/api/css.ts"],"names":[],"mappings":"AACA,OAAO,EAAS,KAAK,OAAO,EAAE,KAAK,OAAO,EAAE,MAAM,YAAY,CAAC;AAC/D,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAE7C;;;;;;;;GAQG;AACH,wBAAgB,GAAG,CAAC,CAAC,SAAS,OAAO,EACnC,IAAI,EAAE,OAAO,CAAC,CAAC,CAAC,EAChB,KAAK,CAAC,EAAE,MAAM,EAAE,GACf,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,SAAS,CAAC;AACtC;;;;;;;;GAQG;AACH,wBAAgB,GAAG,CAAC,CAAC,SAAS,OAAO,EACnC,IAAI,EAAE,OAAO,CAAC,CAAC,CAAC,EAChB,IAAI,EAAE,MAAM,GACX,MAAM,GAAG,SAAS,CAAC;AACtB;;;;;;;;GAQG;AACH,wBAAgB,GAAG,CAAC,CAAC,SAAS,OAAO,EACnC,IAAI,EAAE,OAAO,CAAC,CAAC,CAAC,EAChB,IAAI,EAAE,MAAM,EACZ,GAAG,EACC,MAAM,GACN,CAAC,CAAC,IAAI,EAAE,OAAO,EAAE,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,KAAK,MAAM,GAAG,SAAS,CAAC,GACpE,OAAO,CAAC,CAAC,CAAC,CAAC;AACd;;;;;;;GAOG;AACH,wBAAgB,GAAG,CAAC,CAAC,SAAS,OAAO,EACnC,IAAI,EAAE,OAAO,CAAC,CAAC,CAAC,EAChB,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAC1B,OAAO,CAAC,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/cheerio/dist/browser/api/css.js b/node_modules/cheerio/dist/browser/api/css.js deleted file mode 100644 index 0c000ec..0000000 --- a/node_modules/cheerio/dist/browser/api/css.js +++ /dev/null @@ -1,116 +0,0 @@ -import { domEach } from '../utils.js'; -import { isTag } from 'domhandler'; -/** - * Set multiple CSS properties for every matched element. - * - * @category CSS - * @param prop - The names of the properties. - * @param val - The new values. - * @returns The instance itself. - * @see {@link https://api.jquery.com/css/} - */ -export function css(prop, val) { - if ((prop != null && val != null) || - // When `prop` is a "plain" object - (typeof prop === 'object' && !Array.isArray(prop))) { - return domEach(this, (el, i) => { - if (isTag(el)) { - // `prop` can't be an array here anymore. - setCss(el, prop, val, i); - } - }); - } - if (this.length === 0) { - return undefined; - } - return getCss(this[0], prop); -} -/** - * Set styles of all elements. - * - * @private - * @param el - Element to set style of. - * @param prop - Name of property. - * @param value - Value to set property to. - * @param idx - Optional index within the selection. - */ -function setCss(el, prop, value, idx) { - if (typeof prop === 'string') { - const styles = getCss(el); - const val = typeof value === 'function' ? value.call(el, idx, styles[prop]) : value; - if (val === '') { - delete styles[prop]; - } - else if (val != null) { - styles[prop] = val; - } - el.attribs['style'] = stringify(styles); - } - else if (typeof prop === 'object') { - const keys = Object.keys(prop); - for (let i = 0; i < keys.length; i++) { - const k = keys[i]; - setCss(el, k, prop[k], i); - } - } -} -function getCss(el, prop) { - if (!el || !isTag(el)) - return; - const styles = parse(el.attribs['style']); - if (typeof prop === 'string') { - return styles[prop]; - } - if (Array.isArray(prop)) { - const newStyles = {}; - for (const item of prop) { - if (styles[item] != null) { - newStyles[item] = styles[item]; - } - } - return newStyles; - } - return styles; -} -/** - * Stringify `obj` to styles. - * - * @private - * @category CSS - * @param obj - Object to stringify. - * @returns The serialized styles. - */ -function stringify(obj) { - return Object.keys(obj).reduce((str, prop) => `${str}${str ? ' ' : ''}${prop}: ${obj[prop]};`, ''); -} -/** - * Parse `styles`. - * - * @private - * @category CSS - * @param styles - Styles to be parsed. - * @returns The parsed styles. - */ -function parse(styles) { - styles = (styles || '').trim(); - if (!styles) - return {}; - const obj = {}; - let key; - for (const str of styles.split(';')) { - const n = str.indexOf(':'); - // If there is no :, or if it is the first/last character, add to the previous item's value - if (n < 1 || n === str.length - 1) { - const trimmed = str.trimEnd(); - if (trimmed.length > 0 && key !== undefined) { - obj[key] += `;${trimmed}`; - } - } - else { - key = str.slice(0, n).trim(); - obj[key] = str.slice(n + 1).trim(); - } - } - return obj; -} -//# sourceMappingURL=css.js.map \ No newline at end of file diff --git a/node_modules/cheerio/dist/browser/api/css.js.map b/node_modules/cheerio/dist/browser/api/css.js.map deleted file mode 100644 index d09cdaf..0000000 --- a/node_modules/cheerio/dist/browser/api/css.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"css.js","sourceRoot":"","sources":["../../../src/api/css.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AACtC,OAAO,EAAE,KAAK,EAA8B,MAAM,YAAY,CAAC;AAyD/D;;;;;;;;GAQG;AACH,MAAM,UAAU,GAAG,CAEjB,IAAiD,EACjD,GAEqE;IAErE,IACE,CAAC,IAAI,IAAI,IAAI,IAAI,GAAG,IAAI,IAAI,CAAC;QAC7B,kCAAkC;QAClC,CAAC,OAAO,IAAI,KAAK,QAAQ,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,EAClD,CAAC;QACD,OAAO,OAAO,CAAC,IAAI,EAAE,CAAC,EAAE,EAAE,CAAC,EAAE,EAAE;YAC7B,IAAI,KAAK,CAAC,EAAE,CAAC,EAAE,CAAC;gBACd,yCAAyC;gBACzC,MAAM,CAAC,EAAE,EAAE,IAAc,EAAE,GAAG,EAAE,CAAC,CAAC,CAAC;YACrC,CAAC;QACH,CAAC,CAAC,CAAC;IACL,CAAC;IAED,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACtB,OAAO,SAAS,CAAC;IACnB,CAAC;IAED,OAAO,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,IAAc,CAAC,CAAC;AACzC,CAAC;AAED;;;;;;;;GAQG;AACH,SAAS,MAA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GAAG,CAAC,EAAE,CAAC;YAClC,MAAM,OAAO,GAAG,GAAG,CAAC,OAAO,EAAE,CAAC;YAC9B,IAAI,OAAO,CAAC,MAAM,GAAG,CAAC,IAAI,GAAG,KAAK,SAAS,EAAE,CAAC;gBAC5C,GAAG,CAAC,GAAG,CAAC,IAAI,IAAI,OAAO,EAAE,CAAC;YAC5B,CAAC;QACH,CAAC;aAAM,CAAC;YACN,GAAG,GAAG,GAAG,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;YAC7B,GAAG,CAAC,GAAG,CAAC,GAAG,GAAG,CAAC,KAAK,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;QACrC,CAAC;IACH,CAAC;IAED,OAAO,GAAG,CAAC;AACb,CAAC"} \ No newline at end of file diff --git a/node_modules/cheerio/dist/browser/api/extract.d.ts b/node_modules/cheerio/dist/browser/api/extract.d.ts deleted file mode 100644 index b8d73a7..0000000 --- a/node_modules/cheerio/dist/browser/api/extract.d.ts +++ /dev/null @@ -1,29 +0,0 @@ -import type { AnyNode, Element } from 'domhandler'; -import type { Cheerio } from '../cheerio.js'; -import type { prop } from './attributes.js'; -type ExtractDescriptorFn = (el: Element, key: string, obj: Record<string, unknown>) => unknown; -interface ExtractDescriptor { - selector: string; - value?: string | ExtractDescriptorFn | ExtractMap; -} -type ExtractValue = string | ExtractDescriptor | [string | ExtractDescriptor]; -export interface ExtractMap { - [key: string]: ExtractValue; -} -type ExtractedValue<V extends ExtractValue, M extends ExtractMap> = V extends [ - string | ExtractDescriptor -] ? NonNullable<ExtractedValue<V[0], M>>[] : V extends string ? string | undefined : V extends ExtractDescriptor ? V['value'] extends ExtractMap ? ExtractedMap<V['value']> | undefined : V['value'] extends ExtractDescriptorFn ? ReturnType<V['value']> | undefined : ReturnType<typeof prop> | undefined : never; -export type ExtractedMap<M extends ExtractMap> = { - [key in keyof M]: ExtractedValue<M[key], M>; -}; -/** - * Extract multiple values from a document, and store them in an object. - * - * @param map - An object containing key-value pairs. The keys are the names of - * the properties to be created on the object, and the values are the - * selectors to be used to extract the values. - * @returns An object containing the extracted values. - */ -export declare function extract<M extends ExtractMap, T extends AnyNode>(this: Cheerio<T>, map: M): ExtractedMap<M>; -export {}; -//# sourceMappingURL=extract.d.ts.map \ No newline at end of file diff --git a/node_modules/cheerio/dist/browser/api/extract.d.ts.map b/node_modules/cheerio/dist/browser/api/extract.d.ts.map deleted file mode 100644 index 8bbe7ab..0000000 --- a/node_modules/cheerio/dist/browser/api/extract.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"extract.d.ts","sourceRoot":"","sources":["../../../src/api/extract.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACnD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AAE5C,KAAK,mBAAmB,GAAG,CACzB,EAAE,EAAE,OAAO,EACX,GAAG,EAAE,MAAM,EAEX,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KACzB,OAAO,CAAC;AAEb,UAAU,iBAAiB;IACzB,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,GAAG,mBAAmB,GAAG,UAAU,CAAC;CACnD;AAED,KAAK,YAAY,GAAG,MAAM,GAAG,iBAAiB,GAAG,CAAC,MAAM,GAAG,iBAAiB,CAAC,CAAC;AAE9E,MAAM,WAAW,UAAU;IACzB,CAAC,GAAG,EAAE,MAAM,GAAG,YAAY,CAAC;CAC7B;AAED,KAAK,cAAc,CAAC,CAAC,SAAS,YAAY,EAAE,CAAC,SAAS,UAAU,IAAI,CAAC,SAAS;IAC5E,MAAM,GAAG,iBAAiB;CAC3B,GACG,WAAW,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,GACtC,CAAC,SAAS,MAAM,GACd,MAAM,GAAG,SAAS,GAClB,CAAC,SAAS,iBAAiB,GACzB,CAAC,CAAC,OAAO,CAAC,SAAS,UAAU,GAC3B,YAAY,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,GAAG,SAAS,GACpC,CAAC,CAAC,OAAO,CAAC,SAAS,mBAAmB,GACpC,UAAU,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,GAAG,SAAS,GAClC,UAAU,CAAC,OAAO,IAAI,CAAC,GAAG,SAAS,GACvC,KAAK,CAAC;AAEd,MAAM,MAAM,YAAY,CAAC,CAAC,SAAS,UAAU,IAAI;KAC9C,GAAG,IAAI,MAAM,CAAC,GAAG,cAAc,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;CAC5C,CAAC;AAeF;;;;;;;GAOG;AACH,wBAAgB,OAAO,CAAC,CAAC,SAAS,UAAU,EAAE,CAAC,SAAS,OAAO,EAC7D,IAAI,EAAE,OAAO,CAAC,CAAC,CAAC,EAChB,GAAG,EAAE,CAAC,GACL,YAAY,CAAC,CAAC,CAAC,CA2BjB"} \ No newline at end of file diff --git a/node_modules/cheerio/dist/browser/api/extract.js b/node_modules/cheerio/dist/browser/api/extract.js deleted file mode 100644 index 7203789..0000000 --- a/node_modules/cheerio/dist/browser/api/extract.js +++ /dev/null @@ -1,42 +0,0 @@ -function getExtractDescr(descr) { - var _a; - if (typeof descr === 'string') { - return { selector: descr, value: 'textContent' }; - } - return { - selector: descr.selector, - value: (_a = descr.value) !== null && _a !== void 0 ? _a : 'textContent', - }; -} -/** - * Extract multiple values from a document, and store them in an object. - * - * @param map - An object containing key-value pairs. The keys are the names of - * the properties to be created on the object, and the values are the - * selectors to be used to extract the values. - * @returns An object containing the extracted values. - */ -export function extract(map) { - const ret = {}; - for (const key in map) { - const descr = map[key]; - const isArray = Array.isArray(descr); - const { selector, value } = getExtractDescr(isArray ? descr[0] : descr); - const fn = typeof value === 'function' - ? value - : typeof value === 'string' - ? (el) => this._make(el).prop(value) - : (el) => this._make(el).extract(value); - if (isArray) { - ret[key] = this._findBySelector(selector, Number.POSITIVE_INFINITY) - .map((_, el) => fn(el, key, ret)) - .get(); - } - else { - const $ = this._findBySelector(selector, 1); - ret[key] = $.length > 0 ? fn($[0], key, ret) : undefined; - } - } - return ret; -} -//# sourceMappingURL=extract.js.map \ No newline at end of file diff --git a/node_modules/cheerio/dist/browser/api/extract.js.map b/node_modules/cheerio/dist/browser/api/extract.js.map deleted file mode 100644 index b6cd793..0000000 --- a/node_modules/cheerio/dist/browser/api/extract.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"extract.js","sourceRoot":"","sources":["../../../src/api/extract.ts"],"names":[],"mappings":"AAwCA,SAAS,eAAe,CACtB,KAAiC;;IAEjC,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;QAC9B,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,KAAK,EAAE,aAAa,EAAE,CAAC;IACnD,CAAC;IAED,OAAO;QACL,QAAQ,EAAE,KAAK,CAAC,QAAQ;QACxB,KAAK,EAAE,MAAA,KAAK,CAAC,KAAK,mCAAI,aAAa;KACpC,CAAC;AACJ,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,OAAO,CAErB,GAAM;IAEN,MAAM,GAAG,GAA4B,EAAE,CAAC;IAExC,KAAK,MAAM,GAAG,IAAI,GAAG,EAAE,CAAC;QACtB,MAAM,KAAK,GAAG,GAAG,CAAC,GAAG,CAAC,CAAC;QACvB,MAAM,OAAO,GAAG,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;QAErC,MAAM,EAAE,QAAQ,EAAE,KAAK,EAAE,GAAG,eAAe,CAAC,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;QAExE,MAAM,EAAE,GACN,OAAO,KAAK,KAAK,UAAU;YACzB,CAAC,CAAC,KAAK;YACP,CAAC,CAAC,OAAO,KAAK,KAAK,QAAQ;gBACzB,CAAC,CAAC,CAAC,EAAW,EAAE,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC;gBAC7C,CAAC,CAAC,CAAC,EAAW,EAAE,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;QAEvD,IAAI,OAAO,EAAE,CAAC;YACZ,GAAG,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC,eAAe,CAAC,QAAQ,EAAE,MAAM,CAAC,iBAAiB,CAAC;iBAChE,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,EAAE,EAAE,CAAC,EAAE,CAAC,EAAE,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC;iBAChC,GAAG,EAAE,CAAC;QACX,CAAC;aAAM,CAAC;YACN,MAAM,CAAC,GAAG,IAAI,CAAC,eAAe,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC;YAC5C,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;QAC3D,CAAC;IACH,CAAC;IAED,OAAO,GAAsB,CAAC;AAChC,CAAC"} \ No newline at end of file diff --git a/node_modules/cheerio/dist/browser/api/forms.d.ts b/node_modules/cheerio/dist/browser/api/forms.d.ts deleted file mode 100644 index dbec41e..0000000 --- a/node_modules/cheerio/dist/browser/api/forms.d.ts +++ /dev/null @@ -1,36 +0,0 @@ -import { type AnyNode } from 'domhandler'; -import type { Cheerio } from '../cheerio.js'; -/** - * Encode a set of form elements as a string for submission. - * - * @category Forms - * @example - * - * ```js - * $('<form><input name="foo" value="bar" /></form>').serialize(); - * //=> 'foo=bar' - * ``` - * - * @returns The serialized form. - * @see {@link https://api.jquery.com/serialize/} - */ -export declare function serialize<T extends AnyNode>(this: Cheerio<T>): string; -/** - * Encode a set of form elements as an array of names and values. - * - * @category Forms - * @example - * - * ```js - * $('<form><input name="foo" value="bar" /></form>').serializeArray(); - * //=> [ { name: 'foo', value: 'bar' } ] - * ``` - * - * @returns The serialized form. - * @see {@link https://api.jquery.com/serializeArray/} - */ -export declare function serializeArray<T extends AnyNode>(this: Cheerio<T>): { - name: string; - value: string; -}[]; -//# sourceMappingURL=forms.d.ts.map \ No newline at end of file diff --git a/node_modules/cheerio/dist/browser/api/forms.d.ts.map b/node_modules/cheerio/dist/browser/api/forms.d.ts.map deleted file mode 100644 index 2ea55e4..0000000 --- a/node_modules/cheerio/dist/browser/api/forms.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"forms.d.ts","sourceRoot":"","sources":["../../../src/api/forms.ts"],"names":[],"mappings":"AAAA,OAAO,EAAS,KAAK,OAAO,EAAE,MAAM,YAAY,CAAC;AACjD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAU7C;;;;;;;;;;;;;GAaG;AACH,wBAAgB,SAAS,CAAC,CAAC,SAAS,OAAO,EAAE,IAAI,EAAE,OAAO,CAAC,CAAC,CAAC,GAAG,MAAM,CAYrE;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,cAAc,CAAC,CAAC,SAAS,OAAO,EAC9C,IAAI,EAAE,OAAO,CAAC,CAAC,CAAC,GACf;IACD,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;CACf,EAAE,CA4CF"} \ No newline at end of file diff --git a/node_modules/cheerio/dist/browser/api/forms.js b/node_modules/cheerio/dist/browser/api/forms.js deleted file mode 100644 index 30853e1..0000000 --- a/node_modules/cheerio/dist/browser/api/forms.js +++ /dev/null @@ -1,81 +0,0 @@ -import { isTag } from 'domhandler'; -/* - * https://github.com/jquery/jquery/blob/2.1.3/src/manipulation/var/rcheckableType.js - * https://github.com/jquery/jquery/blob/2.1.3/src/serialize.js - */ -const submittableSelector = 'input,select,textarea,keygen'; -const r20 = /%20/g; -const rCRLF = /\r?\n/g; -/** - * Encode a set of form elements as a string for submission. - * - * @category Forms - * @example - * - * ```js - * $('<form><input name="foo" value="bar" /></form>').serialize(); - * //=> 'foo=bar' - * ``` - * - * @returns The serialized form. - * @see {@link https://api.jquery.com/serialize/} - */ -export function serialize() { - // Convert form elements into name/value objects - const arr = this.serializeArray(); - // Serialize each element into a key/value string - const retArr = arr.map((data) => `${encodeURIComponent(data.name)}=${encodeURIComponent(data.value)}`); - // Return the resulting serialization - return retArr.join('&').replace(r20, '+'); -} -/** - * Encode a set of form elements as an array of names and values. - * - * @category Forms - * @example - * - * ```js - * $('<form><input name="foo" value="bar" /></form>').serializeArray(); - * //=> [ { name: 'foo', value: 'bar' } ] - * ``` - * - * @returns The serialized form. - * @see {@link https://api.jquery.com/serializeArray/} - */ -export function serializeArray() { - // Resolve all form elements from either forms or collections of form elements - return this.map((_, elem) => { - const $elem = this._make(elem); - if (isTag(elem) && elem.name === 'form') { - return $elem.find(submittableSelector).toArray(); - } - return $elem.filter(submittableSelector).toArray(); - }) - .filter( - // Verify elements have a name (`attr.name`) and are not disabled (`:enabled`) - '[name!=""]:enabled' + - // And cannot be clicked (`[type=submit]`) or are used in `x-www-form-urlencoded` (`[type=file]`) - ':not(:submit, :button, :image, :reset, :file)' + - // And are either checked/don't have a checkable state - ':matches([checked], :not(:checkbox, :radio))') - .map((_, elem) => { - var _a; - const $elem = this._make(elem); - const name = $elem.attr('name'); // We have filtered for elements with a name before. - // If there is no value set (e.g. `undefined`, `null`), then default value to empty - const value = (_a = $elem.val()) !== null && _a !== void 0 ? _a : ''; - // If we have an array of values (e.g. `<select multiple>`), return an array of key/value pairs - if (Array.isArray(value)) { - return value.map((val) => - /* - * We trim replace any line endings (e.g. `\r` or `\r\n` with `\r\n`) to guarantee consistency across platforms - * These can occur inside of `<textarea>'s` - */ - ({ name, value: val.replace(rCRLF, '\r\n') })); - } - // Otherwise (e.g. `<input type="text">`, return only one key/value pair - return { name, value: value.replace(rCRLF, '\r\n') }; - }) - .toArray(); -} -//# sourceMappingURL=forms.js.map \ No newline at end of file diff --git a/node_modules/cheerio/dist/browser/api/forms.js.map b/node_modules/cheerio/dist/browser/api/forms.js.map deleted file mode 100644 index 5f7e882..0000000 --- a/node_modules/cheerio/dist/browser/api/forms.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"forms.js","sourceRoot":"","sources":["../../../src/api/forms.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAgB,MAAM,YAAY,CAAC;AAGjD;;;GAGG;AACH,MAAM,mBAAmB,GAAG,8BAA8B,CAAC;AAC3D,MAAM,GAAG,GAAG,MAAM,CAAC;AACnB,MAAM,KAAK,GAAG,QAAQ,CAAC;AAEvB;;;;;;;;;;;;;GAaG;AACH,MAAM,UAAU,SAAS;IACvB,gDAAgD;IAChD,MAAM,GAAG,GAAG,IAAI,CAAC,cAAc,EAAE,CAAC;IAElC,iDAAiD;IACjD,MAAM,MAAM,GAAG,GAAG,CAAC,GAAG,CACpB,CAAC,IAAI,EAAE,EAAE,CACP,GAAG,kBAAkB,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,kBAAkB,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CACvE,CAAC;IAEF,qCAAqC;IACrC,OAAO,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;AAC5C,CAAC;AAED;;;;;;;;;;;;;GAaG;AACH,MAAM,UAAU,cAAc;IAM5B,8EAA8E;IAC9E,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,EAAE;QAC1B,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;QAC/B,IAAI,KAAK,CAAC,IAAI,CAAC,IAAI,IAAI,CAAC,IAAI,KAAK,MAAM,EAAE,CAAC;YACxC,OAAO,KAAK,CAAC,IAAI,CAAC,mBAAmB,CAAC,CAAC,OAAO,EAAE,CAAC;QACnD,CAAC;QACD,OAAO,KAAK,CAAC,MAAM,CAAC,mBAAmB,CAAC,CAAC,OAAO,EAAE,CAAC;IACrD,CAAC,CAAC;SACC,MAAM;IACL,8EAA8E;IAC9E,oBAAoB;QAClB,iGAAiG;QACjG,+CAA+C;QAC/C,sDAAsD;QACtD,8CAA8C,CAEjD;SACA,GAAG,CAMF,CAAC,CAAC,EAAE,IAAI,EAAE,EAAE;;QACZ,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;QAC/B,MAAM,IAAI,GAAG,KAAK,CAAC,IAAI,CAAC,MAAM,CAAW,CAAC,CAAC,oDAAoD;QAC/F,mFAAmF;QACnF,MAAM,KAAK,GAAG,MAAA,KAAK,CAAC,GAAG,EAAE,mCAAI,EAAE,CAAC;QAEhC,+FAA+F;QAC/F,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC;YACzB,OAAO,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE;YACvB;;;eAGG;YACH,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,CAAC,OAAO,CAAC,KAAK,EAAE,MAAM,CAAC,EAAE,CAAC,CAC9C,CAAC;QACJ,CAAC;QACD,wEAAwE;QACxE,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,CAAC,OAAO,CAAC,KAAK,EAAE,MAAM,CAAC,EAAE,CAAC;IACvD,CAAC,CAAC;SACD,OAAO,EAAE,CAAC;AACf,CAAC"} \ No newline at end of file diff --git a/node_modules/cheerio/dist/browser/api/manipulation.d.ts b/node_modules/cheerio/dist/browser/api/manipulation.d.ts deleted file mode 100644 index 620043b..0000000 --- a/node_modules/cheerio/dist/browser/api/manipulation.d.ts +++ /dev/null @@ -1,528 +0,0 @@ -/** - * Methods for modifying the DOM structure. - * - * @module cheerio/manipulation - */ -import { type AnyNode } from 'domhandler'; -import type { Cheerio } from '../cheerio.js'; -import type { BasicAcceptedElems, AcceptedElems } from '../types.js'; -/** - * Create an array of nodes, recursing into arrays and parsing strings if - * necessary. - * - * @private - * @category Manipulation - * @param elem - Elements to make an array of. - * @param clone - Optionally clone nodes. - * @returns The array of nodes. - */ -export declare function _makeDomArray<T extends AnyNode>(this: Cheerio<T>, elem?: BasicAcceptedElems<AnyNode> | BasicAcceptedElems<AnyNode>[], clone?: boolean): AnyNode[]; -/** - * Insert every element in the set of matched elements to the end of the target. - * - * @category Manipulation - * @example - * - * ```js - * $('<li class="plum">Plum</li>').appendTo('#fruits'); - * $.html(); - * //=> <ul id="fruits"> - * // <li class="apple">Apple</li> - * // <li class="orange">Orange</li> - * // <li class="pear">Pear</li> - * // <li class="plum">Plum</li> - * // </ul> - * ``` - * - * @param target - Element to append elements to. - * @returns The instance itself. - * @see {@link https://api.jquery.com/appendTo/} - */ -export declare function appendTo<T extends AnyNode>(this: Cheerio<T>, target: BasicAcceptedElems<AnyNode>): Cheerio<T>; -/** - * Insert every element in the set of matched elements to the beginning of the - * target. - * - * @category Manipulation - * @example - * - * ```js - * $('<li class="plum">Plum</li>').prependTo('#fruits'); - * $.html(); - * //=> <ul id="fruits"> - * // <li class="plum">Plum</li> - * // <li class="apple">Apple</li> - * // <li class="orange">Orange</li> - * // <li class="pear">Pear</li> - * // </ul> - * ``` - * - * @param target - Element to prepend elements to. - * @returns The instance itself. - * @see {@link https://api.jquery.com/prependTo/} - */ -export declare function prependTo<T extends AnyNode>(this: Cheerio<T>, target: BasicAcceptedElems<AnyNode>): Cheerio<T>; -/** - * Inserts content as the _last_ child of each of the selected elements. - * - * @category Manipulation - * @example - * - * ```js - * $('ul').append('<li class="plum">Plum</li>'); - * $.html(); - * //=> <ul id="fruits"> - * // <li class="apple">Apple</li> - * // <li class="orange">Orange</li> - * // <li class="pear">Pear</li> - * // <li class="plum">Plum</li> - * // </ul> - * ``` - * - * @see {@link https://api.jquery.com/append/} - */ -export declare const append: <T extends AnyNode>(this: Cheerio<T>, ...elems: [(this: AnyNode, i: number, html: string) => BasicAcceptedElems<AnyNode>] | BasicAcceptedElems<AnyNode>[]) => Cheerio<T>; -/** - * Inserts content as the _first_ child of each of the selected elements. - * - * @category Manipulation - * @example - * - * ```js - * $('ul').prepend('<li class="plum">Plum</li>'); - * $.html(); - * //=> <ul id="fruits"> - * // <li class="plum">Plum</li> - * // <li class="apple">Apple</li> - * // <li class="orange">Orange</li> - * // <li class="pear">Pear</li> - * // </ul> - * ``` - * - * @see {@link https://api.jquery.com/prepend/} - */ -export declare const prepend: <T extends AnyNode>(this: Cheerio<T>, ...elems: [(this: AnyNode, i: number, html: string) => BasicAcceptedElems<AnyNode>] | BasicAcceptedElems<AnyNode>[]) => Cheerio<T>; -/** - * The .wrap() function can take any string or object that could be passed to - * the $() factory function to specify a DOM structure. This structure may be - * nested several levels deep, but should contain only one inmost element. A - * copy of this structure will be wrapped around each of the elements in the set - * of matched elements. This method returns the original set of elements for - * chaining purposes. - * - * @category Manipulation - * @example - * - * ```js - * const redFruit = $('<div class="red-fruit"></div>'); - * $('.apple').wrap(redFruit); - * - * //=> <ul id="fruits"> - * // <div class="red-fruit"> - * // <li class="apple">Apple</li> - * // </div> - * // <li class="orange">Orange</li> - * // <li class="plum">Plum</li> - * // </ul> - * - * const healthy = $('<div class="healthy"></div>'); - * $('li').wrap(healthy); - * - * //=> <ul id="fruits"> - * // <div class="healthy"> - * // <li class="apple">Apple</li> - * // </div> - * // <div class="healthy"> - * // <li class="orange">Orange</li> - * // </div> - * // <div class="healthy"> - * // <li class="plum">Plum</li> - * // </div> - * // </ul> - * ``` - * - * @param wrapper - The DOM structure to wrap around each element in the - * selection. - * @see {@link https://api.jquery.com/wrap/} - */ -export declare const wrap: <T extends AnyNode>(this: Cheerio<T>, wrapper: AcceptedElems<AnyNode>) => Cheerio<T>; -/** - * The .wrapInner() function can take any string or object that could be passed - * to the $() factory function to specify a DOM structure. This structure may be - * nested several levels deep, but should contain only one inmost element. The - * structure will be wrapped around the content of each of the elements in the - * set of matched elements. - * - * @category Manipulation - * @example - * - * ```js - * const redFruit = $('<div class="red-fruit"></div>'); - * $('.apple').wrapInner(redFruit); - * - * //=> <ul id="fruits"> - * // <li class="apple"> - * // <div class="red-fruit">Apple</div> - * // </li> - * // <li class="orange">Orange</li> - * // <li class="pear">Pear</li> - * // </ul> - * - * const healthy = $('<div class="healthy"></div>'); - * $('li').wrapInner(healthy); - * - * //=> <ul id="fruits"> - * // <li class="apple"> - * // <div class="healthy">Apple</div> - * // </li> - * // <li class="orange"> - * // <div class="healthy">Orange</div> - * // </li> - * // <li class="pear"> - * // <div class="healthy">Pear</div> - * // </li> - * // </ul> - * ``` - * - * @param wrapper - The DOM structure to wrap around the content of each element - * in the selection. - * @returns The instance itself, for chaining. - * @see {@link https://api.jquery.com/wrapInner/} - */ -export declare const wrapInner: <T extends AnyNode>(this: Cheerio<T>, wrapper: AcceptedElems<AnyNode>) => Cheerio<T>; -/** - * The .unwrap() function, removes the parents of the set of matched elements - * from the DOM, leaving the matched elements in their place. - * - * @category Manipulation - * @example <caption>without selector</caption> - * - * ```js - * const $ = cheerio.load( - * '<div id=test>\n <div><p>Hello</p></div>\n <div><p>World</p></div>\n</div>', - * ); - * $('#test p').unwrap(); - * - * //=> <div id=test> - * // <p>Hello</p> - * // <p>World</p> - * // </div> - * ``` - * - * @example <caption>with selector</caption> - * - * ```js - * const $ = cheerio.load( - * '<div id=test>\n <p>Hello</p>\n <b><p>World</p></b>\n</div>', - * ); - * $('#test p').unwrap('b'); - * - * //=> <div id=test> - * // <p>Hello</p> - * // <p>World</p> - * // </div> - * ``` - * - * @param selector - A selector to check the parent element against. If an - * element's parent does not match the selector, the element won't be - * unwrapped. - * @returns The instance itself, for chaining. - * @see {@link https://api.jquery.com/unwrap/} - */ -export declare function unwrap<T extends AnyNode>(this: Cheerio<T>, selector?: string): Cheerio<T>; -/** - * The .wrapAll() function can take any string or object that could be passed to - * the $() function to specify a DOM structure. This structure may be nested - * several levels deep, but should contain only one inmost element. The - * structure will be wrapped around all of the elements in the set of matched - * elements, as a single group. - * - * @category Manipulation - * @example <caption>With markup passed to `wrapAll`</caption> - * - * ```js - * const $ = cheerio.load( - * '<div class="container"><div class="inner">First</div><div class="inner">Second</div></div>', - * ); - * $('.inner').wrapAll("<div class='new'></div>"); - * - * //=> <div class="container"> - * // <div class='new'> - * // <div class="inner">First</div> - * // <div class="inner">Second</div> - * // </div> - * // </div> - * ``` - * - * @example <caption>With an existing cheerio instance</caption> - * - * ```js - * const $ = cheerio.load( - * '<span>Span 1</span><strong>Strong</strong><span>Span 2</span>', - * ); - * const wrap = $('<div><p><em><b></b></em></p></div>'); - * $('span').wrapAll(wrap); - * - * //=> <div> - * // <p> - * // <em> - * // <b> - * // <span>Span 1</span> - * // <span>Span 2</span> - * // </b> - * // </em> - * // </p> - * // </div> - * // <strong>Strong</strong> - * ``` - * - * @param wrapper - The DOM structure to wrap around all matched elements in the - * selection. - * @returns The instance itself. - * @see {@link https://api.jquery.com/wrapAll/} - */ -export declare function wrapAll<T extends AnyNode>(this: Cheerio<T>, wrapper: AcceptedElems<T>): Cheerio<T>; -/** - * Insert content next to each element in the set of matched elements. - * - * @category Manipulation - * @example - * - * ```js - * $('.apple').after('<li class="plum">Plum</li>'); - * $.html(); - * //=> <ul id="fruits"> - * // <li class="apple">Apple</li> - * // <li class="plum">Plum</li> - * // <li class="orange">Orange</li> - * // <li class="pear">Pear</li> - * // </ul> - * ``` - * - * @param elems - HTML string, DOM element, array of DOM elements or Cheerio to - * insert after each element in the set of matched elements. - * @returns The instance itself. - * @see {@link https://api.jquery.com/after/} - */ -export declare function after<T extends AnyNode>(this: Cheerio<T>, ...elems: [(this: AnyNode, i: number, html: string) => BasicAcceptedElems<AnyNode>] | BasicAcceptedElems<AnyNode>[]): Cheerio<T>; -/** - * Insert every element in the set of matched elements after the target. - * - * @category Manipulation - * @example - * - * ```js - * $('<li class="plum">Plum</li>').insertAfter('.apple'); - * $.html(); - * //=> <ul id="fruits"> - * // <li class="apple">Apple</li> - * // <li class="plum">Plum</li> - * // <li class="orange">Orange</li> - * // <li class="pear">Pear</li> - * // </ul> - * ``` - * - * @param target - Element to insert elements after. - * @returns The set of newly inserted elements. - * @see {@link https://api.jquery.com/insertAfter/} - */ -export declare function insertAfter<T extends AnyNode>(this: Cheerio<T>, target: BasicAcceptedElems<AnyNode>): Cheerio<T>; -/** - * Insert content previous to each element in the set of matched elements. - * - * @category Manipulation - * @example - * - * ```js - * $('.apple').before('<li class="plum">Plum</li>'); - * $.html(); - * //=> <ul id="fruits"> - * // <li class="plum">Plum</li> - * // <li class="apple">Apple</li> - * // <li class="orange">Orange</li> - * // <li class="pear">Pear</li> - * // </ul> - * ``` - * - * @param elems - HTML string, DOM element, array of DOM elements or Cheerio to - * insert before each element in the set of matched elements. - * @returns The instance itself. - * @see {@link https://api.jquery.com/before/} - */ -export declare function before<T extends AnyNode>(this: Cheerio<T>, ...elems: [(this: AnyNode, i: number, html: string) => BasicAcceptedElems<AnyNode>] | BasicAcceptedElems<AnyNode>[]): Cheerio<T>; -/** - * Insert every element in the set of matched elements before the target. - * - * @category Manipulation - * @example - * - * ```js - * $('<li class="plum">Plum</li>').insertBefore('.apple'); - * $.html(); - * //=> <ul id="fruits"> - * // <li class="plum">Plum</li> - * // <li class="apple">Apple</li> - * // <li class="orange">Orange</li> - * // <li class="pear">Pear</li> - * // </ul> - * ``` - * - * @param target - Element to insert elements before. - * @returns The set of newly inserted elements. - * @see {@link https://api.jquery.com/insertBefore/} - */ -export declare function insertBefore<T extends AnyNode>(this: Cheerio<T>, target: BasicAcceptedElems<AnyNode>): Cheerio<T>; -/** - * Removes the set of matched elements from the DOM and all their children. - * `selector` filters the set of matched elements to be removed. - * - * @category Manipulation - * @example - * - * ```js - * $('.pear').remove(); - * $.html(); - * //=> <ul id="fruits"> - * // <li class="apple">Apple</li> - * // <li class="orange">Orange</li> - * // </ul> - * ``` - * - * @param selector - Optional selector for elements to remove. - * @returns The instance itself. - * @see {@link https://api.jquery.com/remove/} - */ -export declare function remove<T extends AnyNode>(this: Cheerio<T>, selector?: string): Cheerio<T>; -/** - * Replaces matched elements with `content`. - * - * @category Manipulation - * @example - * - * ```js - * const plum = $('<li class="plum">Plum</li>'); - * $('.pear').replaceWith(plum); - * $.html(); - * //=> <ul id="fruits"> - * // <li class="apple">Apple</li> - * // <li class="orange">Orange</li> - * // <li class="plum">Plum</li> - * // </ul> - * ``` - * - * @param content - Replacement for matched elements. - * @returns The instance itself. - * @see {@link https://api.jquery.com/replaceWith/} - */ -export declare function replaceWith<T extends AnyNode>(this: Cheerio<T>, content: AcceptedElems<AnyNode>): Cheerio<T>; -/** - * Removes all children from each item in the selection. Text nodes and comment - * nodes are left as is. - * - * @category Manipulation - * @example - * - * ```js - * $('ul').empty(); - * $.html(); - * //=> <ul id="fruits"></ul> - * ``` - * - * @returns The instance itself. - * @see {@link https://api.jquery.com/empty/} - */ -export declare function empty<T extends AnyNode>(this: Cheerio<T>): Cheerio<T>; -/** - * Gets an HTML content string from the first selected element. - * - * @category Manipulation - * @example - * - * ```js - * $('.orange').html(); - * //=> Orange - * - * $('#fruits').html('<li class="mango">Mango</li>').html(); - * //=> <li class="mango">Mango</li> - * ``` - * - * @returns The HTML content string. - * @see {@link https://api.jquery.com/html/} - */ -export declare function html<T extends AnyNode>(this: Cheerio<T>): string | null; -/** - * Replaces each selected element's content with the specified content. - * - * @category Manipulation - * @example - * - * ```js - * $('.orange').html('<li class="mango">Mango</li>').html(); - * //=> <li class="mango">Mango</li> - * ``` - * - * @param str - The content to replace selection's contents with. - * @returns The instance itself. - * @see {@link https://api.jquery.com/html/} - */ -export declare function html<T extends AnyNode>(this: Cheerio<T>, str: string | Cheerio<T>): Cheerio<T>; -/** - * Turns the collection to a string. Alias for `.html()`. - * - * @category Manipulation - * @returns The rendered document. - */ -export declare function toString<T extends AnyNode>(this: Cheerio<T>): string; -/** - * Get the combined text contents of each element in the set of matched - * elements, including their descendants. - * - * @category Manipulation - * @example - * - * ```js - * $('.orange').text(); - * //=> Orange - * - * $('ul').text(); - * //=> Apple - * // Orange - * // Pear - * ``` - * - * @returns The text contents of the collection. - * @see {@link https://api.jquery.com/text/} - */ -export declare function text<T extends AnyNode>(this: Cheerio<T>): string; -/** - * Set the content of each element in the set of matched elements to the - * specified text. - * - * @category Manipulation - * @example - * - * ```js - * $('.orange').text('Orange'); - * //=> <div class="orange">Orange</div> - * ``` - * - * @param str - The text to set as the content of each matched element. - * @returns The instance itself. - * @see {@link https://api.jquery.com/text/} - */ -export declare function text<T extends AnyNode>(this: Cheerio<T>, str: string | ((this: AnyNode, i: number, text: string) => string)): Cheerio<T>; -/** - * Clone the cheerio object. - * - * @category Manipulation - * @example - * - * ```js - * const moreFruit = $('#fruits').clone(); - * ``` - * - * @returns The cloned object. - * @see {@link https://api.jquery.com/clone/} - */ -export declare function clone<T extends AnyNode>(this: Cheerio<T>): Cheerio<T>; -//# sourceMappingURL=manipulation.d.ts.map \ No newline at end of file diff --git a/node_modules/cheerio/dist/browser/api/manipulation.d.ts.map b/node_modules/cheerio/dist/browser/api/manipulation.d.ts.map deleted file mode 100644 index 4e14eba..0000000 --- a/node_modules/cheerio/dist/browser/api/manipulation.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"manipulation.d.ts","sourceRoot":"","sources":["../../../src/api/manipulation.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAOL,KAAK,OAAO,EAEb,MAAM,YAAY,CAAC;AAKpB,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,KAAK,EAAE,kBAAkB,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAErE;;;;;;;;;GASG;AACH,wBAAgB,aAAa,CAAC,CA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/browser/api/manipulation.js b/node_modules/cheerio/dist/browser/api/manipulation.js deleted file mode 100644 index 7935544..0000000 --- a/node_modules/cheerio/dist/browser/api/manipulation.js +++ /dev/null @@ -1,829 +0,0 @@ -/** - * Methods for modifying the DOM structure. - * - * @module cheerio/manipulation - */ -import { isTag, Text, hasChildren, cloneNode, Document, } from 'domhandler'; -import { update as updateDOM } from '../parse.js'; -import { text as staticText } from '../static.js'; -import { domEach, isHtml, isCheerio } from '../utils.js'; -import { removeElement } from 'domutils'; -/** - * Create an array of nodes, recursing into arrays and parsing strings if - * necessary. - * - * @private - * @category Manipulation - * @param elem - Elements to make an array of. - * @param clone - Optionally clone nodes. - * @returns The array of nodes. - */ -export function _makeDomArray(elem, clone) { - if (elem == null) { - return []; - } - if (typeof elem === 'string') { - return this._parse(elem, this.options, false, null).children.slice(0); - } - if ('length' in elem) { - if (elem.length === 1) { - return this._makeDomArray(elem[0], clone); - } - const result = []; - for (let i = 0; i < elem.length; i++) { - const el = elem[i]; - if (typeof el === 'object') { - if (el == null) { - continue; - } - if (!('length' in el)) { - result.push(clone ? cloneNode(el, true) : el); - continue; - } - } - result.push(...this._makeDomArray(el, clone)); - } - return result; - } - return [clone ? cloneNode(elem, true) : elem]; -} -function _insert(concatenator) { - return function (...elems) { - const lastIdx = this.length - 1; - return domEach(this, (el, i) => { - if (!hasChildren(el)) - return; - const domSrc = typeof elems[0] === 'function' - ? elems[0].call(el, i, this._render(el.children)) - : elems; - const dom = this._makeDomArray(domSrc, i < lastIdx); - concatenator(dom, el.children, el); - }); - }; -} -/** - * Modify an array in-place, removing some number of elements and adding new - * elements directly following them. - * - * @private - * @category Manipulation - * @param array - Target array to splice. - * @param spliceIdx - Index at which to begin changing the array. - * @param spliceCount - Number of elements to remove from the array. - * @param newElems - Elements to insert into the array. - * @param parent - The parent of the node. - * @returns The spliced array. - */ -function uniqueSplice(array, spliceIdx, spliceCount, newElems, parent) { - var _a, _b; - const spliceArgs = [ - spliceIdx, - spliceCount, - ...newElems, - ]; - const prev = spliceIdx === 0 ? null : array[spliceIdx - 1]; - const next = spliceIdx + spliceCount >= array.length - ? null - : array[spliceIdx + spliceCount]; - /* - * Before splicing in new elements, ensure they do not already appear in the - * current array. - */ - for (let idx = 0; idx < newElems.length; ++idx) { - const node = newElems[idx]; - const oldParent = node.parent; - if (oldParent) { - const oldSiblings = oldParent.children; - const prevIdx = oldSiblings.indexOf(node); - if (prevIdx > -1) { - oldParent.children.splice(prevIdx, 1); - if (parent === oldParent && spliceIdx > prevIdx) { - spliceArgs[0]--; - } - } - } - node.parent = parent; - if (node.prev) { - node.prev.next = (_a = node.next) !== null && _a !== void 0 ? _a : null; - } - if (node.next) { - node.next.prev = (_b = node.prev) !== null && _b !== void 0 ? _b : null; - } - node.prev = idx === 0 ? prev : newElems[idx - 1]; - node.next = idx === newElems.length - 1 ? next : newElems[idx + 1]; - } - if (prev) { - prev.next = newElems[0]; - } - if (next) { - next.prev = newElems[newElems.length - 1]; - } - return array.splice(...spliceArgs); -} -/** - * Insert every element in the set of matched elements to the end of the target. - * - * @category Manipulation - * @example - * - * ```js - * $('<li class="plum">Plum</li>').appendTo('#fruits'); - * $.html(); - * //=> <ul id="fruits"> - * // <li class="apple">Apple</li> - * // <li class="orange">Orange</li> - * // <li class="pear">Pear</li> - * // <li class="plum">Plum</li> - * // </ul> - * ``` - * - * @param target - Element to append elements to. - * @returns The instance itself. - * @see {@link https://api.jquery.com/appendTo/} - */ -export function appendTo(target) { - const appendTarget = isCheerio(target) ? target : this._make(target); - appendTarget.append(this); - return this; -} -/** - * Insert every element in the set of matched elements to the beginning of the - * target. - * - * @category Manipulation - * @example - * - * ```js - * $('<li class="plum">Plum</li>').prependTo('#fruits'); - * $.html(); - * //=> <ul id="fruits"> - * // <li class="plum">Plum</li> - * // <li class="apple">Apple</li> - * // <li class="orange">Orange</li> - * // <li class="pear">Pear</li> - * // </ul> - * ``` - * - * @param target - Element to prepend elements to. - * @returns The instance itself. - * @see {@link https://api.jquery.com/prependTo/} - */ -export function prependTo(target) { - const prependTarget = isCheerio(target) ? target : this._make(target); - prependTarget.prepend(this); - return this; -} -/** - * Inserts content as the _last_ child of each of the selected elements. - * - * @category Manipulation - * @example - * - * ```js - * $('ul').append('<li class="plum">Plum</li>'); - * $.html(); - * //=> <ul id="fruits"> - * // <li class="apple">Apple</li> - * // <li class="orange">Orange</li> - * // <li class="pear">Pear</li> - * // <li class="plum">Plum</li> - * // </ul> - * ``` - * - * @see {@link https://api.jquery.com/append/} - */ -export const append = _insert((dom, children, parent) => { - uniqueSplice(children, children.length, 0, dom, parent); -}); -/** - * Inserts content as the _first_ child of each of the selected elements. - * - * @category Manipulation - * @example - * - * ```js - * $('ul').prepend('<li class="plum">Plum</li>'); - * $.html(); - * //=> <ul id="fruits"> - * // <li class="plum">Plum</li> - * // <li class="apple">Apple</li> - * // <li class="orange">Orange</li> - * // <li class="pear">Pear</li> - * // </ul> - * ``` - * - * @see {@link https://api.jquery.com/prepend/} - */ -export const prepend = _insert((dom, children, parent) => { - uniqueSplice(children, 0, 0, dom, parent); -}); -function _wrap(insert) { - return function (wrapper) { - const lastIdx = this.length - 1; - const lastParent = this.parents().last(); - for (let i = 0; i < this.length; i++) { - const el = this[i]; - const wrap = typeof wrapper === 'function' - ? wrapper.call(el, i, el) - : typeof wrapper === 'string' && !isHtml(wrapper) - ? lastParent.find(wrapper).clone() - : wrapper; - const [wrapperDom] = this._makeDomArray(wrap, i < lastIdx); - if (!wrapperDom || !hasChildren(wrapperDom)) - continue; - let elInsertLocation = wrapperDom; - /* - * Find the deepest child. Only consider the first tag child of each node - * (ignore text); stop if no children are found. - */ - let j = 0; - while (j < elInsertLocation.children.length) { - const child = elInsertLocation.children[j]; - if (isTag(child)) { - elInsertLocation = child; - j = 0; - } - else { - j++; - } - } - insert(el, elInsertLocation, [wrapperDom]); - } - return this; - }; -} -/** - * The .wrap() function can take any string or object that could be passed to - * the $() factory function to specify a DOM structure. This structure may be - * nested several levels deep, but should contain only one inmost element. A - * copy of this structure will be wrapped around each of the elements in the set - * of matched elements. This method returns the original set of elements for - * chaining purposes. - * - * @category Manipulation - * @example - * - * ```js - * const redFruit = $('<div class="red-fruit"></div>'); - * $('.apple').wrap(redFruit); - * - * //=> <ul id="fruits"> - * // <div class="red-fruit"> - * // <li class="apple">Apple</li> - * // </div> - * // <li class="orange">Orange</li> - * // <li class="plum">Plum</li> - * // </ul> - * - * const healthy = $('<div class="healthy"></div>'); - * $('li').wrap(healthy); - * - * //=> <ul id="fruits"> - * // <div class="healthy"> - * // <li class="apple">Apple</li> - * // </div> - * // <div class="healthy"> - * // <li class="orange">Orange</li> - * // </div> - * // <div class="healthy"> - * // <li class="plum">Plum</li> - * // </div> - * // </ul> - * ``` - * - * @param wrapper - The DOM structure to wrap around each element in the - * selection. - * @see {@link https://api.jquery.com/wrap/} - */ -export const wrap = _wrap((el, elInsertLocation, wrapperDom) => { - const { parent } = el; - if (!parent) - return; - const siblings = parent.children; - const index = siblings.indexOf(el); - updateDOM([el], elInsertLocation); - /* - * The previous operation removed the current element from the `siblings` - * array, so the `dom` array can be inserted without removing any - * additional elements. - */ - uniqueSplice(siblings, index, 0, wrapperDom, parent); -}); -/** - * The .wrapInner() function can take any string or object that could be passed - * to the $() factory function to specify a DOM structure. This structure may be - * nested several levels deep, but should contain only one inmost element. The - * structure will be wrapped around the content of each of the elements in the - * set of matched elements. - * - * @category Manipulation - * @example - * - * ```js - * const redFruit = $('<div class="red-fruit"></div>'); - * $('.apple').wrapInner(redFruit); - * - * //=> <ul id="fruits"> - * // <li class="apple"> - * // <div class="red-fruit">Apple</div> - * // </li> - * // <li class="orange">Orange</li> - * // <li class="pear">Pear</li> - * // </ul> - * - * const healthy = $('<div class="healthy"></div>'); - * $('li').wrapInner(healthy); - * - * //=> <ul id="fruits"> - * // <li class="apple"> - * // <div class="healthy">Apple</div> - * // </li> - * // <li class="orange"> - * // <div class="healthy">Orange</div> - * // </li> - * // <li class="pear"> - * // <div class="healthy">Pear</div> - * // </li> - * // </ul> - * ``` - * - * @param wrapper - The DOM structure to wrap around the content of each element - * in the selection. - * @returns The instance itself, for chaining. - * @see {@link https://api.jquery.com/wrapInner/} - */ -export const wrapInner = _wrap((el, elInsertLocation, wrapperDom) => { - if (!hasChildren(el)) - return; - updateDOM(el.children, elInsertLocation); - updateDOM(wrapperDom, el); -}); -/** - * The .unwrap() function, removes the parents of the set of matched elements - * from the DOM, leaving the matched elements in their place. - * - * @category Manipulation - * @example <caption>without selector</caption> - * - * ```js - * const $ = cheerio.load( - * '<div id=test>\n <div><p>Hello</p></div>\n <div><p>World</p></div>\n</div>', - * ); - * $('#test p').unwrap(); - * - * //=> <div id=test> - * // <p>Hello</p> - * // <p>World</p> - * // </div> - * ``` - * - * @example <caption>with selector</caption> - * - * ```js - * const $ = cheerio.load( - * '<div id=test>\n <p>Hello</p>\n <b><p>World</p></b>\n</div>', - * ); - * $('#test p').unwrap('b'); - * - * //=> <div id=test> - * // <p>Hello</p> - * // <p>World</p> - * // </div> - * ``` - * - * @param selector - A selector to check the parent element against. If an - * element's parent does not match the selector, the element won't be - * unwrapped. - * @returns The instance itself, for chaining. - * @see {@link https://api.jquery.com/unwrap/} - */ -export function unwrap(selector) { - this.parent(selector) - .not('body') - .each((_, el) => { - this._make(el).replaceWith(el.children); - }); - return this; -} -/** - * The .wrapAll() function can take any string or object that could be passed to - * the $() function to specify a DOM structure. This structure may be nested - * several levels deep, but should contain only one inmost element. The - * structure will be wrapped around all of the elements in the set of matched - * elements, as a single group. - * - * @category Manipulation - * @example <caption>With markup passed to `wrapAll`</caption> - * - * ```js - * const $ = cheerio.load( - * '<div class="container"><div class="inner">First</div><div class="inner">Second</div></div>', - * ); - * $('.inner').wrapAll("<div class='new'></div>"); - * - * //=> <div class="container"> - * // <div class='new'> - * // <div class="inner">First</div> - * // <div class="inner">Second</div> - * // </div> - * // </div> - * ``` - * - * @example <caption>With an existing cheerio instance</caption> - * - * ```js - * const $ = cheerio.load( - * '<span>Span 1</span><strong>Strong</strong><span>Span 2</span>', - * ); - * const wrap = $('<div><p><em><b></b></em></p></div>'); - * $('span').wrapAll(wrap); - * - * //=> <div> - * // <p> - * // <em> - * // <b> - * // <span>Span 1</span> - * // <span>Span 2</span> - * // </b> - * // </em> - * // </p> - * // </div> - * // <strong>Strong</strong> - * ``` - * - * @param wrapper - The DOM structure to wrap around all matched elements in the - * selection. - * @returns The instance itself. - * @see {@link https://api.jquery.com/wrapAll/} - */ -export function wrapAll(wrapper) { - const el = this[0]; - if (el) { - const wrap = this._make(typeof wrapper === 'function' ? wrapper.call(el, 0, el) : wrapper).insertBefore(el); - // If html is given as wrapper, wrap may contain text elements - let elInsertLocation; - for (let i = 0; i < wrap.length; i++) { - if (wrap[i].type === 'tag') - elInsertLocation = wrap[i]; - } - let j = 0; - /* - * Find the deepest child. Only consider the first tag child of each node - * (ignore text); stop if no children are found. - */ - while (elInsertLocation && j < elInsertLocation.children.length) { - const child = elInsertLocation.children[j]; - if (child.type === 'tag') { - elInsertLocation = child; - j = 0; - } - else { - j++; - } - } - if (elInsertLocation) - this._make(elInsertLocation).append(this); - } - return this; -} -/** - * Insert content next to each element in the set of matched elements. - * - * @category Manipulation - * @example - * - * ```js - * $('.apple').after('<li class="plum">Plum</li>'); - * $.html(); - * //=> <ul id="fruits"> - * // <li class="apple">Apple</li> - * // <li class="plum">Plum</li> - * // <li class="orange">Orange</li> - * // <li class="pear">Pear</li> - * // </ul> - * ``` - * - * @param elems - HTML string, DOM element, array of DOM elements or Cheerio to - * insert after each element in the set of matched elements. - * @returns The instance itself. - * @see {@link https://api.jquery.com/after/} - */ -export function after(...elems) { - const lastIdx = this.length - 1; - return domEach(this, (el, i) => { - if (!hasChildren(el) || !el.parent) { - return; - } - const siblings = el.parent.children; - const index = siblings.indexOf(el); - // If not found, move on - /* istanbul ignore next */ - if (index < 0) - return; - const domSrc = typeof elems[0] === 'function' - ? elems[0].call(el, i, this._render(el.children)) - : elems; - const dom = this._makeDomArray(domSrc, i < lastIdx); - // Add element after `this` element - uniqueSplice(siblings, index + 1, 0, dom, el.parent); - }); -} -/** - * Insert every element in the set of matched elements after the target. - * - * @category Manipulation - * @example - * - * ```js - * $('<li class="plum">Plum</li>').insertAfter('.apple'); - * $.html(); - * //=> <ul id="fruits"> - * // <li class="apple">Apple</li> - * // <li class="plum">Plum</li> - * // <li class="orange">Orange</li> - * // <li class="pear">Pear</li> - * // </ul> - * ``` - * - * @param target - Element to insert elements after. - * @returns The set of newly inserted elements. - * @see {@link https://api.jquery.com/insertAfter/} - */ -export function insertAfter(target) { - if (typeof target === 'string') { - target = this._make(target); - } - this.remove(); - const clones = []; - for (const el of this._makeDomArray(target)) { - const clonedSelf = this.clone().toArray(); - const { parent } = el; - if (!parent) { - continue; - } - const siblings = parent.children; - const index = siblings.indexOf(el); - // If not found, move on - /* istanbul ignore next */ - if (index < 0) - continue; - // Add cloned `this` element(s) after target element - uniqueSplice(siblings, index + 1, 0, clonedSelf, parent); - clones.push(...clonedSelf); - } - return this._make(clones); -} -/** - * Insert content previous to each element in the set of matched elements. - * - * @category Manipulation - * @example - * - * ```js - * $('.apple').before('<li class="plum">Plum</li>'); - * $.html(); - * //=> <ul id="fruits"> - * // <li class="plum">Plum</li> - * // <li class="apple">Apple</li> - * // <li class="orange">Orange</li> - * // <li class="pear">Pear</li> - * // </ul> - * ``` - * - * @param elems - HTML string, DOM element, array of DOM elements or Cheerio to - * insert before each element in the set of matched elements. - * @returns The instance itself. - * @see {@link https://api.jquery.com/before/} - */ -export function before(...elems) { - const lastIdx = this.length - 1; - return domEach(this, (el, i) => { - if (!hasChildren(el) || !el.parent) { - return; - } - const siblings = el.parent.children; - const index = siblings.indexOf(el); - // If not found, move on - /* istanbul ignore next */ - if (index < 0) - return; - const domSrc = typeof elems[0] === 'function' - ? elems[0].call(el, i, this._render(el.children)) - : elems; - const dom = this._makeDomArray(domSrc, i < lastIdx); - // Add element before `el` element - uniqueSplice(siblings, index, 0, dom, el.parent); - }); -} -/** - * Insert every element in the set of matched elements before the target. - * - * @category Manipulation - * @example - * - * ```js - * $('<li class="plum">Plum</li>').insertBefore('.apple'); - * $.html(); - * //=> <ul id="fruits"> - * // <li class="plum">Plum</li> - * // <li class="apple">Apple</li> - * // <li class="orange">Orange</li> - * // <li class="pear">Pear</li> - * // </ul> - * ``` - * - * @param target - Element to insert elements before. - * @returns The set of newly inserted elements. - * @see {@link https://api.jquery.com/insertBefore/} - */ -export function insertBefore(target) { - const targetArr = this._make(target); - this.remove(); - const clones = []; - domEach(targetArr, (el) => { - const clonedSelf = this.clone().toArray(); - const { parent } = el; - if (!parent) { - return; - } - const siblings = parent.children; - const index = siblings.indexOf(el); - // If not found, move on - /* istanbul ignore next */ - if (index < 0) - return; - // Add cloned `this` element(s) after target element - uniqueSplice(siblings, index, 0, clonedSelf, parent); - clones.push(...clonedSelf); - }); - return this._make(clones); -} -/** - * Removes the set of matched elements from the DOM and all their children. - * `selector` filters the set of matched elements to be removed. - * - * @category Manipulation - * @example - * - * ```js - * $('.pear').remove(); - * $.html(); - * //=> <ul id="fruits"> - * // <li class="apple">Apple</li> - * // <li class="orange">Orange</li> - * // </ul> - * ``` - * - * @param selector - Optional selector for elements to remove. - * @returns The instance itself. - * @see {@link https://api.jquery.com/remove/} - */ -export function remove(selector) { - // Filter if we have selector - const elems = selector ? this.filter(selector) : this; - domEach(elems, (el) => { - removeElement(el); - el.prev = el.next = el.parent = null; - }); - return this; -} -/** - * Replaces matched elements with `content`. - * - * @category Manipulation - * @example - * - * ```js - * const plum = $('<li class="plum">Plum</li>'); - * $('.pear').replaceWith(plum); - * $.html(); - * //=> <ul id="fruits"> - * // <li class="apple">Apple</li> - * // <li class="orange">Orange</li> - * // <li class="plum">Plum</li> - * // </ul> - * ``` - * - * @param content - Replacement for matched elements. - * @returns The instance itself. - * @see {@link https://api.jquery.com/replaceWith/} - */ -export function replaceWith(content) { - return domEach(this, (el, i) => { - const { parent } = el; - if (!parent) { - return; - } - const siblings = parent.children; - const cont = typeof content === 'function' ? content.call(el, i, el) : content; - const dom = this._makeDomArray(cont); - /* - * In the case that `dom` contains nodes that already exist in other - * structures, ensure those nodes are properly removed. - */ - updateDOM(dom, null); - const index = siblings.indexOf(el); - // Completely remove old element - uniqueSplice(siblings, index, 1, dom, parent); - if (!dom.includes(el)) { - el.parent = el.prev = el.next = null; - } - }); -} -/** - * Removes all children from each item in the selection. Text nodes and comment - * nodes are left as is. - * - * @category Manipulation - * @example - * - * ```js - * $('ul').empty(); - * $.html(); - * //=> <ul id="fruits"></ul> - * ``` - * - * @returns The instance itself. - * @see {@link https://api.jquery.com/empty/} - */ -export function empty() { - return domEach(this, (el) => { - if (!hasChildren(el)) - return; - for (const child of el.children) { - child.next = child.prev = child.parent = null; - } - el.children.length = 0; - }); -} -export function html(str) { - if (str === undefined) { - const el = this[0]; - if (!el || !hasChildren(el)) - return null; - return this._render(el.children); - } - return domEach(this, (el) => { - if (!hasChildren(el)) - return; - for (const child of el.children) { - child.next = child.prev = child.parent = null; - } - const content = isCheerio(str) - ? str.toArray() - : this._parse(`${str}`, this.options, false, el).children; - updateDOM(content, el); - }); -} -/** - * Turns the collection to a string. Alias for `.html()`. - * - * @category Manipulation - * @returns The rendered document. - */ -export function toString() { - return this._render(this); -} -export function text(str) { - // If `str` is undefined, act as a "getter" - if (str === undefined) { - return staticText(this); - } - if (typeof str === 'function') { - // Function support - return domEach(this, (el, i) => this._make(el).text(str.call(el, i, staticText([el])))); - } - // Append text node to each selected elements - return domEach(this, (el) => { - if (!hasChildren(el)) - return; - for (const child of el.children) { - child.next = child.prev = child.parent = null; - } - const textNode = new Text(`${str}`); - updateDOM(textNode, el); - }); -} -/** - * Clone the cheerio object. - * - * @category Manipulation - * @example - * - * ```js - * const moreFruit = $('#fruits').clone(); - * ``` - * - * @returns The cloned object. - * @see {@link https://api.jquery.com/clone/} - */ -export function clone() { - const clone = Array.prototype.map.call(this.get(), (el) => cloneNode(el, true)); - // Add a root node around the cloned nodes - const root = new Document(clone); - for (const node of clone) { - node.parent = root; - } - return this._make(clone); -} -//# sourceMappingURL=manipulation.js.map \ No newline at end of file diff --git a/node_modules/cheerio/dist/browser/api/manipulation.js.map b/node_modules/cheerio/dist/browser/api/manipulation.js.map deleted file mode 100644 index 343f230..0000000 --- a/node_modules/cheerio/dist/browser/api/manipulation.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"manipulation.js","sourceRoot":"","sources":["../../../src/api/manipulation.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EACL,KAAK,EACL,IAAI,EACJ,WAAW,EACX,SAAS,EACT,QAAQ,GAIT,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,MAAM,IAAI,SAAS,EAAE,MAAM,aAAa,CAAC;AAClD,OAAO,EAAE,IAAI,IAAI,UAAU,EAAE,MAAM,cAAc,CAAC;AAClD,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACzD,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAIzC;;;;;;;;;GASG;AACH,MAAM,UAAU,aAAa,CAE3B,IAAkE,EAClE,KAAe;IAEf,IAAI,IAAI,IAAI,IAAI,EAAE,CAAC;QACjB,OAAO,EAAE,CAAC;IACZ,CAAC;IAED,IAAI,OAAO,IAAI,KAAK,QAAQ,EAAE,CAAC;QAC7B,OAAO,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE,IAAI,CAAC,OAAO,EAAE,KAAK,EAAE,IAAI,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;IACxE,CAAC;IAED,IAAI,QAAQ,IAAI,IAAI,EAAE,CAAC;QACrB,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YACtB,OAAO,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC;QAC5C,CAAC;QAED,MAAM,MAAM,GAAc,EAAE,CAAC;QAE7B,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,EAAE,EAAE,CAAC,CAAC;IAC1B,CAAC,CAAC,CAAC;AACL,CAAC;AAED;;;;;;;;;;;;GAYG;AACH,MAAM,UAAU,KAAK;IACnB,MAAM,KAAK,GAAG,KAAK,CAAC,SAAS,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,EAAE,CAAC,EAAE,EAAE,EAAE,CACxD,SAAS,CAAC,EAAE,EAAE,IAAI,CAAC,CACb,CAAC;IAET,0CAA0C;IAC1C,MAAM,IAAI,GAAG,IAAI,QAAQ,CAAC,KAAK,CAAC,CAAC;IACjC,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;QACzB,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC;IACrB,CAAC;IAED,OAAO,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;AAC3B,CAAC"} \ No newline at end of file diff --git a/node_modules/cheerio/dist/browser/api/traversing.d.ts b/node_modules/cheerio/dist/browser/api/traversing.d.ts deleted file mode 100644 index 3961e38..0000000 --- a/node_modules/cheerio/dist/browser/api/traversing.d.ts +++ /dev/null @@ -1,657 +0,0 @@ -/** - * Methods for traversing the DOM structure. - * - * @module cheerio/traversing - */ -import { type AnyNode, type Element, type Document } from 'domhandler'; -import type { Cheerio } from '../cheerio.js'; -import type { AcceptedFilters } from '../types.js'; -/** - * Get the descendants of each element in the current set of matched elements, - * filtered by a selector, jQuery object, or element. - * - * @category Traversing - * @example - * - * ```js - * $('#fruits').find('li').length; - * //=> 3 - * $('#fruits').find($('.apple')).length; - * //=> 1 - * ``` - * - * @param selectorOrHaystack - Element to look for. - * @returns The found elements. - * @see {@link https://api.jquery.com/find/} - */ -export declare function find<T extends AnyNode>(this: Cheerio<T>, selectorOrHaystack?: string | Cheerio<Element> | Element): Cheerio<Element>; -/** - * Find elements by a specific selector. - * - * @private - * @category Traversing - * @param selector - Selector to filter by. - * @param limit - Maximum number of elements to match. - * @returns The found elements. - */ -export declare function _findBySelector<T extends AnyNode>(this: Cheerio<T>, selector: string, limit: number): Cheerio<Element>; -/** - * Get the parent of each element in the current set of matched elements, - * optionally filtered by a selector. - * - * @category Traversing - * @example - * - * ```js - * $('.pear').parent().attr('id'); - * //=> fruits - * ``` - * - * @param selector - If specified filter for parent. - * @returns The parents. - * @see {@link https://api.jquery.com/parent/} - */ -export declare const parent: <T extends AnyNode>(this: Cheerio<T>, selector?: AcceptedFilters<Element>) => Cheerio<Element>; -/** - * Get a set of parents filtered by `selector` of each element in the current - * set of match elements. - * - * @category Traversing - * @example - * - * ```js - * $('.orange').parents().length; - * //=> 2 - * $('.orange').parents('#fruits').length; - * //=> 1 - * ``` - * - * @param selector - If specified filter for parents. - * @returns The parents. - * @see {@link https://api.jquery.com/parents/} - */ -export declare const parents: <T extends AnyNode>(this: Cheerio<T>, selector?: AcceptedFilters<Element>) => Cheerio<Element>; -/** - * Get the ancestors of each element in the current set of matched elements, up - * to but not including the element matched by the selector, DOM node, or - * cheerio object. - * - * @category Traversing - * @example - * - * ```js - * $('.orange').parentsUntil('#food').length; - * //=> 1 - * ``` - * - * @param selector - Selector for element to stop at. - * @param filterSelector - Optional filter for parents. - * @returns The parents. - * @see {@link https://api.jquery.com/parentsUntil/} - */ -export declare const parentsUntil: <T extends AnyNode>(this: Cheerio<T>, selector?: AcceptedFilters<Element> | null, filterSelector?: AcceptedFilters<Element>) => Cheerio<Element>; -/** - * For each element in the set, get the first element that matches the selector - * by testing the element itself and traversing up through its ancestors in the - * DOM tree. - * - * @category Traversing - * @example - * - * ```js - * $('.orange').closest(); - * //=> [] - * - * $('.orange').closest('.apple'); - * // => [] - * - * $('.orange').closest('li'); - * //=> [<li class="orange">Orange</li>] - * - * $('.orange').closest('#fruits'); - * //=> [<ul id="fruits"> ... </ul>] - * ``` - * - * @param selector - Selector for the element to find. - * @returns The closest nodes. - * @see {@link https://api.jquery.com/closest/} - */ -export declare function closest<T extends AnyNode>(this: Cheerio<T>, selector?: AcceptedFilters<Element>): Cheerio<AnyNode>; -/** - * Gets the next sibling of each selected element, optionally filtered by a - * selector. - * - * @category Traversing - * @example - * - * ```js - * $('.apple').next().hasClass('orange'); - * //=> true - * ``` - * - * @param selector - If specified filter for sibling. - * @returns The next nodes. - * @see {@link https://api.jquery.com/next/} - */ -export declare const next: <T extends AnyNode>(this: Cheerio<T>, selector?: AcceptedFilters<Element>) => Cheerio<Element>; -/** - * Gets all the following siblings of the each selected element, optionally - * filtered by a selector. - * - * @category Traversing - * @example - * - * ```js - * $('.apple').nextAll(); - * //=> [<li class="orange">Orange</li>, <li class="pear">Pear</li>] - * $('.apple').nextAll('.orange'); - * //=> [<li class="orange">Orange</li>] - * ``` - * - * @param selector - If specified filter for siblings. - * @returns The next nodes. - * @see {@link https://api.jquery.com/nextAll/} - */ -export declare const nextAll: <T extends AnyNode>(this: Cheerio<T>, selector?: AcceptedFilters<Element>) => Cheerio<Element>; -/** - * Gets all the following siblings up to but not including the element matched - * by the selector, optionally filtered by another selector. - * - * @category Traversing - * @example - * - * ```js - * $('.apple').nextUntil('.pear'); - * //=> [<li class="orange">Orange</li>] - * ``` - * - * @param selector - Selector for element to stop at. - * @param filterSelector - If specified filter for siblings. - * @returns The next nodes. - * @see {@link https://api.jquery.com/nextUntil/} - */ -export declare const nextUntil: <T extends AnyNode>(this: Cheerio<T>, selector?: AcceptedFilters<Element> | null, filterSelector?: AcceptedFilters<Element>) => Cheerio<Element>; -/** - * Gets the previous sibling of each selected element optionally filtered by a - * selector. - * - * @category Traversing - * @example - * - * ```js - * $('.orange').prev().hasClass('apple'); - * //=> true - * ``` - * - * @param selector - If specified filter for siblings. - * @returns The previous nodes. - * @see {@link https://api.jquery.com/prev/} - */ -export declare const prev: <T extends AnyNode>(this: Cheerio<T>, selector?: AcceptedFilters<Element>) => Cheerio<Element>; -/** - * Gets all the preceding siblings of each selected element, optionally filtered - * by a selector. - * - * @category Traversing - * @example - * - * ```js - * $('.pear').prevAll(); - * //=> [<li class="orange">Orange</li>, <li class="apple">Apple</li>] - * - * $('.pear').prevAll('.orange'); - * //=> [<li class="orange">Orange</li>] - * ``` - * - * @param selector - If specified filter for siblings. - * @returns The previous nodes. - * @see {@link https://api.jquery.com/prevAll/} - */ -export declare const prevAll: <T extends AnyNode>(this: Cheerio<T>, selector?: AcceptedFilters<Element>) => Cheerio<Element>; -/** - * Gets all the preceding siblings up to but not including the element matched - * by the selector, optionally filtered by another selector. - * - * @category Traversing - * @example - * - * ```js - * $('.pear').prevUntil('.apple'); - * //=> [<li class="orange">Orange</li>] - * ``` - * - * @param selector - Selector for element to stop at. - * @param filterSelector - If specified filter for siblings. - * @returns The previous nodes. - * @see {@link https://api.jquery.com/prevUntil/} - */ -export declare const prevUntil: <T extends AnyNode>(this: Cheerio<T>, selector?: AcceptedFilters<Element> | null, filterSelector?: AcceptedFilters<Element>) => Cheerio<Element>; -/** - * Get the siblings of each element (excluding the element) in the set of - * matched elements, optionally filtered by a selector. - * - * @category Traversing - * @example - * - * ```js - * $('.pear').siblings().length; - * //=> 2 - * - * $('.pear').siblings('.orange').length; - * //=> 1 - * ``` - * - * @param selector - If specified filter for siblings. - * @returns The siblings. - * @see {@link https://api.jquery.com/siblings/} - */ -export declare const siblings: <T extends AnyNode>(this: Cheerio<T>, selector?: AcceptedFilters<Element>) => Cheerio<Element>; -/** - * Gets the element children of each element in the set of matched elements. - * - * @category Traversing - * @example - * - * ```js - * $('#fruits').children().length; - * //=> 3 - * - * $('#fruits').children('.pear').text(); - * //=> Pear - * ``` - * - * @param selector - If specified filter for children. - * @returns The children. - * @see {@link https://api.jquery.com/children/} - */ -export declare const children: <T extends AnyNode>(this: Cheerio<T>, selector?: AcceptedFilters<Element>) => Cheerio<Element>; -/** - * Gets the children of each element in the set of matched elements, including - * text and comment nodes. - * - * @category Traversing - * @example - * - * ```js - * $('#fruits').contents().length; - * //=> 3 - * ``` - * - * @returns The children. - * @see {@link https://api.jquery.com/contents/} - */ -export declare function contents<T extends AnyNode>(this: Cheerio<T>): Cheerio<AnyNode>; -/** - * Iterates over a cheerio object, executing a function for each matched - * element. When the callback is fired, the function is fired in the context of - * the DOM element, so `this` refers to the current element, which is equivalent - * to the function parameter `element`. To break out of the `each` loop early, - * return with `false`. - * - * @category Traversing - * @example - * - * ```js - * const fruits = []; - * - * $('li').each(function (i, elem) { - * fruits[i] = $(this).text(); - * }); - * - * fruits.join(', '); - * //=> Apple, Orange, Pear - * ``` - * - * @param fn - Function to execute. - * @returns The instance itself, useful for chaining. - * @see {@link https://api.jquery.com/each/} - */ -export declare function each<T>(this: Cheerio<T>, fn: (this: T, i: number, el: T) => void | boolean): Cheerio<T>; -/** - * Pass each element in the current matched set through a function, producing a - * new Cheerio object containing the return values. The function can return an - * individual data item or an array of data items to be inserted into the - * resulting set. If an array is returned, the elements inside the array are - * inserted into the set. If the function returns null or undefined, no element - * will be inserted. - * - * @category Traversing - * @example - * - * ```js - * $('li') - * .map(function (i, el) { - * // this === el - * return $(this).text(); - * }) - * .toArray() - * .join(' '); - * //=> "apple orange pear" - * ``` - * - * @param fn - Function to execute. - * @returns The mapped elements, wrapped in a Cheerio collection. - * @see {@link https://api.jquery.com/map/} - */ -export declare function map<T, M>(this: Cheerio<T>, fn: (this: T, i: number, el: T) => M[] | M | null | undefined): Cheerio<M>; -/** - * Iterates over a cheerio object, reducing the set of selector elements to - * those that match the selector or pass the function's test. - * - * This is the definition for using type guards; have a look below for other - * ways to invoke this method. The function is executed in the context of the - * selected element, so `this` refers to the current element. - * - * @category Traversing - * @example <caption>Function</caption> - * - * ```js - * $('li') - * .filter(function (i, el) { - * // this === el - * return $(this).attr('class') === 'orange'; - * }) - * .attr('class'); //=> orange - * ``` - * - * @param match - Value to look for, following the rules above. - * @returns The filtered collection. - * @see {@link https://api.jquery.com/filter/} - */ -export declare function filter<T, S extends T>(this: Cheerio<T>, match: (this: T, index: number, value: T) => value is S): Cheerio<S>; -/** - * Iterates over a cheerio object, reducing the set of selector elements to - * those that match the selector or pass the function's test. - * - * - When a Cheerio selection is specified, return only the elements contained in - * that selection. - * - When an element is specified, return only that element (if it is contained in - * the original selection). - * - If using the function method, the function is executed in the context of the - * selected element, so `this` refers to the current element. - * - * @category Traversing - * @example <caption>Selector</caption> - * - * ```js - * $('li').filter('.orange').attr('class'); - * //=> orange - * ``` - * - * @example <caption>Function</caption> - * - * ```js - * $('li') - * .filter(function (i, el) { - * // this === el - * return $(this).attr('class') === 'orange'; - * }) - * .attr('class'); //=> orange - * ``` - * - * @param match - Value to look for, following the rules above. See - * {@link AcceptedFilters}. - * @returns The filtered collection. - * @see {@link https://api.jquery.com/filter/} - */ -export declare function filter<T, S extends AcceptedFilters<T>>(this: Cheerio<T>, match: S): Cheerio<S extends string ? Element : T>; -export declare function filterArray<T>(nodes: T[], match: AcceptedFilters<T>, xmlMode?: boolean, root?: Document): Element[] | T[]; -/** - * Checks the current list of elements and returns `true` if _any_ of the - * elements match the selector. If using an element or Cheerio selection, - * returns `true` if _any_ of the elements match. If using a predicate function, - * the function is executed in the context of the selected element, so `this` - * refers to the current element. - * - * @category Traversing - * @param selector - Selector for the selection. - * @returns Whether or not the selector matches an element of the instance. - * @see {@link https://api.jquery.com/is/} - */ -export declare function is<T>(this: Cheerio<T>, selector?: AcceptedFilters<T>): boolean; -/** - * Remove elements from the set of matched elements. Given a Cheerio object that - * represents a set of DOM elements, the `.not()` method constructs a new - * Cheerio object from a subset of the matching elements. The supplied selector - * is tested against each element; the elements that don't match the selector - * will be included in the result. - * - * The `.not()` method can take a function as its argument in the same way that - * `.filter()` does. Elements for which the function returns `true` are excluded - * from the filtered set; all other elements are included. - * - * @category Traversing - * @example <caption>Selector</caption> - * - * ```js - * $('li').not('.apple').length; - * //=> 2 - * ``` - * - * @example <caption>Function</caption> - * - * ```js - * $('li').not(function (i, el) { - * // this === el - * return $(this).attr('class') === 'orange'; - * }).length; //=> 2 - * ``` - * - * @param match - Value to look for, following the rules above. - * @returns The filtered collection. - * @see {@link https://api.jquery.com/not/} - */ -export declare function not<T extends AnyNode>(this: Cheerio<T>, match: AcceptedFilters<T>): Cheerio<T>; -/** - * Filters the set of matched elements to only those which have the given DOM - * element as a descendant or which have a descendant that matches the given - * selector. Equivalent to `.filter(':has(selector)')`. - * - * @category Traversing - * @example <caption>Selector</caption> - * - * ```js - * $('ul').has('.pear').attr('id'); - * //=> fruits - * ``` - * - * @example <caption>Element</caption> - * - * ```js - * $('ul').has($('.pear')[0]).attr('id'); - * //=> fruits - * ``` - * - * @param selectorOrHaystack - Element to look for. - * @returns The filtered collection. - * @see {@link https://api.jquery.com/has/} - */ -export declare function has(this: Cheerio<AnyNode | Element>, selectorOrHaystack: string | Cheerio<Element> | Element): Cheerio<AnyNode | Element>; -/** - * Will select the first element of a cheerio object. - * - * @category Traversing - * @example - * - * ```js - * $('#fruits').children().first().text(); - * //=> Apple - * ``` - * - * @returns The first element. - * @see {@link https://api.jquery.com/first/} - */ -export declare function first<T extends AnyNode>(this: Cheerio<T>): Cheerio<T>; -/** - * Will select the last element of a cheerio object. - * - * @category Traversing - * @example - * - * ```js - * $('#fruits').children().last().text(); - * //=> Pear - * ``` - * - * @returns The last element. - * @see {@link https://api.jquery.com/last/} - */ -export declare function last<T>(this: Cheerio<T>): Cheerio<T>; -/** - * Reduce the set of matched elements to the one at the specified index. Use - * `.eq(-i)` to count backwards from the last selected element. - * - * @category Traversing - * @example - * - * ```js - * $('li').eq(0).text(); - * //=> Apple - * - * $('li').eq(-1).text(); - * //=> Pear - * ``` - * - * @param i - Index of the element to select. - * @returns The element at the `i`th position. - * @see {@link https://api.jquery.com/eq/} - */ -export declare function eq<T>(this: Cheerio<T>, i: number): Cheerio<T>; -/** - * Retrieve one of the elements matched by the Cheerio object, at the `i`th - * position. - * - * @category Traversing - * @example - * - * ```js - * $('li').get(0).tagName; - * //=> li - * ``` - * - * @param i - Element to retrieve. - * @returns The element at the `i`th position. - * @see {@link https://api.jquery.com/get/} - */ -export declare function get<T>(this: Cheerio<T>, i: number): T | undefined; -/** - * Retrieve all elements matched by the Cheerio object, as an array. - * - * @category Traversing - * @example - * - * ```js - * $('li').get().length; - * //=> 3 - * ``` - * - * @returns All elements matched by the Cheerio object. - * @see {@link https://api.jquery.com/get/} - */ -export declare function get<T>(this: Cheerio<T>): T[]; -/** - * Retrieve all the DOM elements contained in the jQuery set as an array. - * - * @example - * - * ```js - * $('li').toArray(); - * //=> [ {...}, {...}, {...} ] - * ``` - * - * @returns The contained items. - */ -export declare function toArray<T>(this: Cheerio<T>): T[]; -/** - * Search for a given element from among the matched elements. - * - * @category Traversing - * @example - * - * ```js - * $('.pear').index(); - * //=> 2 $('.orange').index('li'); - * //=> 1 - * $('.apple').index($('#fruit, li')); - * //=> 1 - * ``` - * - * @param selectorOrNeedle - Element to look for. - * @returns The index of the element. - * @see {@link https://api.jquery.com/index/} - */ -export declare function index<T extends AnyNode>(this: Cheerio<T>, selectorOrNeedle?: string | Cheerio<AnyNode> | AnyNode): number; -/** - * Gets the elements matching the specified range (0-based position). - * - * @category Traversing - * @example - * - * ```js - * $('li').slice(1).eq(0).text(); - * //=> 'Orange' - * - * $('li').slice(1, 2).length; - * //=> 1 - * ``` - * - * @param start - A position at which the elements begin to be selected. If - * negative, it indicates an offset from the end of the set. - * @param end - A position at which the elements stop being selected. If - * negative, it indicates an offset from the end of the set. If omitted, the - * range continues until the end of the set. - * @returns The elements matching the specified range. - * @see {@link https://api.jquery.com/slice/} - */ -export declare function slice<T>(this: Cheerio<T>, start?: number, end?: number): Cheerio<T>; -/** - * End the most recent filtering operation in the current chain and return the - * set of matched elements to its previous state. - * - * @category Traversing - * @example - * - * ```js - * $('li').eq(0).end().length; - * //=> 3 - * ``` - * - * @returns The previous state of the set of matched elements. - * @see {@link https://api.jquery.com/end/} - */ -export declare function end<T>(this: Cheerio<T>): Cheerio<AnyNode>; -/** - * Add elements to the set of matched elements. - * - * @category Traversing - * @example - * - * ```js - * $('.apple').add('.orange').length; - * //=> 2 - * ``` - * - * @param other - Elements to add. - * @param context - Optionally the context of the new selection. - * @returns The combined set. - * @see {@link https://api.jquery.com/add/} - */ -export declare function add<S extends AnyNode, T extends AnyNode>(this: Cheerio<T>, other: string | Cheerio<S> | S | S[], context?: Cheerio<S> | string): Cheerio<S | T>; -/** - * Add the previous set of elements on the stack to the current set, optionally - * filtered by a selector. - * - * @category Traversing - * @example - * - * ```js - * $('li').eq(0).addBack('.orange').length; - * //=> 2 - * ``` - * - * @param selector - Selector for the elements to add. - * @returns The combined set. - * @see {@link https://api.jquery.com/addBack/} - */ -export declare function addBack<T extends AnyNode>(this: Cheerio<T>, selector?: string): Cheerio<AnyNode>; -//# sourceMappingURL=traversing.d.ts.map \ No newline at end of file diff --git a/node_modules/cheerio/dist/browser/api/traversing.d.ts.map b/node_modules/cheerio/dist/browser/api/traversing.d.ts.map deleted file mode 100644 index 15411d1..0000000 --- a/node_modules/cheerio/dist/browser/api/traversing.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"traversing.d.ts","sourceRoot":"","sources":["../../../src/api/traversing.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAEL,KAAK,OAAO,EACZ,KAAK,OAAO,EAGZ,KAAK,QAAQ,EACd,MAAM,YAAY,CAAC;AACpB,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAW7C,OAAO,KAAK,EAAkB,eAAe,EAAE,MAAM,aAAa,CAAC;AAGnE;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,IAAI,CAAC,CAAC,SAAS,OAAO,EACpC,IAAI,EAAE,OAAO,CAAC,CAAC,CAAC,EAChB,kBAAkB,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,GAAG,OAAO,GACvD,OAAO,CAAC,OAAO,CAAC,CAkBlB;AAED;;;;;;;;GAQG;AACH,wBAAgB,eAAe,CAAC,CAAC,SAAS,OAAO,EAC/C,IAAI,EAAE,OAAO,CAAC,CAAC,CAAC,EAChB,QAAQ,EAAE,MAAM,EAChB,KAAK,EAAE,MAAM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;;;;;;;;GAcG;AACH,wBAAgB,GAAG,CAAC,CAAC,EAAE,IAAI,EAAE,OAAO,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,OAAO,CAAC,CAEzD;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,GAAG,CAAC,CAAC,SAAS,OAAO,EAAE,CAAC,SAAS,OAAO,EACtD,IAAI,EAAE,OAAO,CAAC,CAAC,CAAC,EAChB,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,EACpC,OAAO,CAAC,EAAE,OAAO,CAAC,CAAC,CAAC,GAAG,MAAM,GAC5B,OAAO,CAAC,CAAC,GAAG,CAAC,CAAC,CAIhB;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,OAAO,CAAC,CAAC,SAAS,OAAO,EACvC,IAAI,EAAE,OAAO,CAAC,CAAC,CAAC,EAChB,QAAQ,CAAC,EAAE,MAAM,GAChB,OAAO,CAAC,OAAO,CAAC,CAIlB"} \ No newline at end of file diff --git a/node_modules/cheerio/dist/browser/api/traversing.js b/node_modules/cheerio/dist/browser/api/traversing.js deleted file mode 100644 index 33ef5ab..0000000 --- a/node_modules/cheerio/dist/browser/api/traversing.js +++ /dev/null @@ -1,853 +0,0 @@ -/** - * Methods for traversing the DOM structure. - * - * @module cheerio/traversing - */ -import { isTag, hasChildren, isDocument, } from 'domhandler'; -import * as select from 'cheerio-select'; -import { domEach, isCheerio } from '../utils.js'; -import { contains } from '../static.js'; -import { getChildren, getSiblings, nextElementSibling, prevElementSibling, uniqueSort, } from 'domutils'; -const reSiblingSelector = /^\s*[+~]/; -/** - * Get the descendants of each element in the current set of matched elements, - * filtered by a selector, jQuery object, or element. - * - * @category Traversing - * @example - * - * ```js - * $('#fruits').find('li').length; - * //=> 3 - * $('#fruits').find($('.apple')).length; - * //=> 1 - * ``` - * - * @param selectorOrHaystack - Element to look for. - * @returns The found elements. - * @see {@link https://api.jquery.com/find/} - */ -export function find(selectorOrHaystack) { - if (!selectorOrHaystack) { - return this._make([]); - } - if (typeof selectorOrHaystack !== 'string') { - const haystack = isCheerio(selectorOrHaystack) - ? selectorOrHaystack.toArray() - : [selectorOrHaystack]; - const context = this.toArray(); - return this._make(haystack.filter((elem) => context.some((node) => contains(node, elem)))); - } - return this._findBySelector(selectorOrHaystack, Number.POSITIVE_INFINITY); -} -/** - * Find elements by a specific selector. - * - * @private - * @category Traversing - * @param selector - Selector to filter by. - * @param limit - Maximum number of elements to match. - * @returns The found elements. - */ -export function _findBySelector(selector, limit) { - var _a; - const context = this.toArray(); - const elems = reSiblingSelector.test(selector) - ? context - : this.children().toArray(); - const options = { - context, - root: (_a = this._root) === null || _a === void 0 ? void 0 : _a[0], - // Pass options that are recognized by `cheerio-select` - xmlMode: this.options.xmlMode, - lowerCaseTags: this.options.lowerCaseTags, - lowerCaseAttributeNames: this.options.lowerCaseAttributeNames, - pseudos: this.options.pseudos, - quirksMode: this.options.quirksMode, - }; - return this._make(select.select(selector, elems, options, limit)); -} -/** - * Creates a matcher, using a particular mapping function. Matchers provide a - * function that finds elements using a generating function, supporting - * filtering. - * - * @private - * @param matchMap - Mapping function. - * @returns - Function for wrapping generating functions. - */ -function _getMatcher(matchMap) { - return function (fn, ...postFns) { - return function (selector) { - var _a; - let matched = matchMap(fn, this); - if (selector) { - matched = filterArray(matched, selector, this.options.xmlMode, (_a = this._root) === null || _a === void 0 ? void 0 : _a[0]); - } - return this._make( - // Post processing is only necessary if there is more than one element. - this.length > 1 && matched.length > 1 - ? postFns.reduce((elems, fn) => fn(elems), matched) - : matched); - }; - }; -} -/** Matcher that adds multiple elements for each entry in the input. */ -const _matcher = _getMatcher((fn, elems) => { - let ret = []; - for (let i = 0; i < elems.length; i++) { - const value = fn(elems[i]); - if (value.length > 0) - ret = ret.concat(value); - } - return ret; -}); -/** Matcher that adds at most one element for each entry in the input. */ -const _singleMatcher = _getMatcher((fn, elems) => { - const ret = []; - for (let i = 0; i < elems.length; i++) { - const value = fn(elems[i]); - if (value !== null) { - ret.push(value); - } - } - return ret; -}); -/** - * Matcher that supports traversing until a condition is met. - * - * @param nextElem - Function that returns the next element. - * @param postFns - Post processing functions. - * @returns A function usable for `*Until` methods. - */ -function _matchUntil(nextElem, ...postFns) { - // We use a variable here that is used from within the matcher. - let matches = null; - const innerMatcher = _getMatcher((nextElem, elems) => { - const matched = []; - domEach(elems, (elem) => { - for (let next; (next = nextElem(elem)); elem = next) { - // FIXME: `matched` might contain duplicates here and the index is too large. - if (matches === null || matches === void 0 ? void 0 : matches(next, matched.length)) - break; - matched.push(next); - } - }); - return matched; - })(nextElem, ...postFns); - return function (selector, filterSelector) { - // Override `matches` variable with the new target. - matches = - typeof selector === 'string' - ? (elem) => select.is(elem, selector, this.options) - : selector - ? getFilterFn(selector) - : null; - const ret = innerMatcher.call(this, filterSelector); - // Set `matches` to `null`, so we don't waste memory. - matches = null; - return ret; - }; -} -function _removeDuplicates(elems) { - return elems.length > 1 ? Array.from(new Set(elems)) : elems; -} -/** - * Get the parent of each element in the current set of matched elements, - * optionally filtered by a selector. - * - * @category Traversing - * @example - * - * ```js - * $('.pear').parent().attr('id'); - * //=> fruits - * ``` - * - * @param selector - If specified filter for parent. - * @returns The parents. - * @see {@link https://api.jquery.com/parent/} - */ -export const parent = _singleMatcher(({ parent }) => (parent && !isDocument(parent) ? parent : null), _removeDuplicates); -/** - * Get a set of parents filtered by `selector` of each element in the current - * set of match elements. - * - * @category Traversing - * @example - * - * ```js - * $('.orange').parents().length; - * //=> 2 - * $('.orange').parents('#fruits').length; - * //=> 1 - * ``` - * - * @param selector - If specified filter for parents. - * @returns The parents. - * @see {@link https://api.jquery.com/parents/} - */ -export const parents = _matcher((elem) => { - const matched = []; - while (elem.parent && !isDocument(elem.parent)) { - matched.push(elem.parent); - elem = elem.parent; - } - return matched; -}, uniqueSort, (elems) => elems.reverse()); -/** - * Get the ancestors of each element in the current set of matched elements, up - * to but not including the element matched by the selector, DOM node, or - * cheerio object. - * - * @category Traversing - * @example - * - * ```js - * $('.orange').parentsUntil('#food').length; - * //=> 1 - * ``` - * - * @param selector - Selector for element to stop at. - * @param filterSelector - Optional filter for parents. - * @returns The parents. - * @see {@link https://api.jquery.com/parentsUntil/} - */ -export const parentsUntil = _matchUntil(({ parent }) => (parent && !isDocument(parent) ? parent : null), uniqueSort, (elems) => elems.reverse()); -/** - * For each element in the set, get the first element that matches the selector - * by testing the element itself and traversing up through its ancestors in the - * DOM tree. - * - * @category Traversing - * @example - * - * ```js - * $('.orange').closest(); - * //=> [] - * - * $('.orange').closest('.apple'); - * // => [] - * - * $('.orange').closest('li'); - * //=> [<li class="orange">Orange</li>] - * - * $('.orange').closest('#fruits'); - * //=> [<ul id="fruits"> ... </ul>] - * ``` - * - * @param selector - Selector for the element to find. - * @returns The closest nodes. - * @see {@link https://api.jquery.com/closest/} - */ -export function closest(selector) { - var _a; - const set = []; - if (!selector) { - return this._make(set); - } - const selectOpts = { - xmlMode: this.options.xmlMode, - root: (_a = this._root) === null || _a === void 0 ? void 0 : _a[0], - }; - const selectFn = typeof selector === 'string' - ? (elem) => select.is(elem, selector, selectOpts) - : getFilterFn(selector); - domEach(this, (elem) => { - if (elem && !isDocument(elem) && !isTag(elem)) { - elem = elem.parent; - } - while (elem && isTag(elem)) { - if (selectFn(elem, 0)) { - // Do not add duplicate elements to the set - if (!set.includes(elem)) { - set.push(elem); - } - break; - } - elem = elem.parent; - } - }); - return this._make(set); -} -/** - * Gets the next sibling of each selected element, optionally filtered by a - * selector. - * - * @category Traversing - * @example - * - * ```js - * $('.apple').next().hasClass('orange'); - * //=> true - * ``` - * - * @param selector - If specified filter for sibling. - * @returns The next nodes. - * @see {@link https://api.jquery.com/next/} - */ -export const next = _singleMatcher((elem) => nextElementSibling(elem)); -/** - * Gets all the following siblings of the each selected element, optionally - * filtered by a selector. - * - * @category Traversing - * @example - * - * ```js - * $('.apple').nextAll(); - * //=> [<li class="orange">Orange</li>, <li class="pear">Pear</li>] - * $('.apple').nextAll('.orange'); - * //=> [<li class="orange">Orange</li>] - * ``` - * - * @param selector - If specified filter for siblings. - * @returns The next nodes. - * @see {@link https://api.jquery.com/nextAll/} - */ -export const nextAll = _matcher((elem) => { - const matched = []; - while (elem.next) { - elem = elem.next; - if (isTag(elem)) - matched.push(elem); - } - return matched; -}, _removeDuplicates); -/** - * Gets all the following siblings up to but not including the element matched - * by the selector, optionally filtered by another selector. - * - * @category Traversing - * @example - * - * ```js - * $('.apple').nextUntil('.pear'); - * //=> [<li class="orange">Orange</li>] - * ``` - * - * @param selector - Selector for element to stop at. - * @param filterSelector - If specified filter for siblings. - * @returns The next nodes. - * @see {@link https://api.jquery.com/nextUntil/} - */ -export const nextUntil = _matchUntil((el) => nextElementSibling(el), _removeDuplicates); -/** - * Gets the previous sibling of each selected element optionally filtered by a - * selector. - * - * @category Traversing - * @example - * - * ```js - * $('.orange').prev().hasClass('apple'); - * //=> true - * ``` - * - * @param selector - If specified filter for siblings. - * @returns The previous nodes. - * @see {@link https://api.jquery.com/prev/} - */ -export const prev = _singleMatcher((elem) => prevElementSibling(elem)); -/** - * Gets all the preceding siblings of each selected element, optionally filtered - * by a selector. - * - * @category Traversing - * @example - * - * ```js - * $('.pear').prevAll(); - * //=> [<li class="orange">Orange</li>, <li class="apple">Apple</li>] - * - * $('.pear').prevAll('.orange'); - * //=> [<li class="orange">Orange</li>] - * ``` - * - * @param selector - If specified filter for siblings. - * @returns The previous nodes. - * @see {@link https://api.jquery.com/prevAll/} - */ -export const prevAll = _matcher((elem) => { - const matched = []; - while (elem.prev) { - elem = elem.prev; - if (isTag(elem)) - matched.push(elem); - } - return matched; -}, _removeDuplicates); -/** - * Gets all the preceding siblings up to but not including the element matched - * by the selector, optionally filtered by another selector. - * - * @category Traversing - * @example - * - * ```js - * $('.pear').prevUntil('.apple'); - * //=> [<li class="orange">Orange</li>] - * ``` - * - * @param selector - Selector for element to stop at. - * @param filterSelector - If specified filter for siblings. - * @returns The previous nodes. - * @see {@link https://api.jquery.com/prevUntil/} - */ -export const prevUntil = _matchUntil((el) => prevElementSibling(el), _removeDuplicates); -/** - * Get the siblings of each element (excluding the element) in the set of - * matched elements, optionally filtered by a selector. - * - * @category Traversing - * @example - * - * ```js - * $('.pear').siblings().length; - * //=> 2 - * - * $('.pear').siblings('.orange').length; - * //=> 1 - * ``` - * - * @param selector - If specified filter for siblings. - * @returns The siblings. - * @see {@link https://api.jquery.com/siblings/} - */ -export const siblings = _matcher((elem) => getSiblings(elem).filter((el) => isTag(el) && el !== elem), uniqueSort); -/** - * Gets the element children of each element in the set of matched elements. - * - * @category Traversing - * @example - * - * ```js - * $('#fruits').children().length; - * //=> 3 - * - * $('#fruits').children('.pear').text(); - * //=> Pear - * ``` - * - * @param selector - If specified filter for children. - * @returns The children. - * @see {@link https://api.jquery.com/children/} - */ -export const children = _matcher((elem) => getChildren(elem).filter(isTag), _removeDuplicates); -/** - * Gets the children of each element in the set of matched elements, including - * text and comment nodes. - * - * @category Traversing - * @example - * - * ```js - * $('#fruits').contents().length; - * //=> 3 - * ``` - * - * @returns The children. - * @see {@link https://api.jquery.com/contents/} - */ -export function contents() { - const elems = this.toArray().reduce((newElems, elem) => hasChildren(elem) ? newElems.concat(elem.children) : newElems, []); - return this._make(elems); -} -/** - * Iterates over a cheerio object, executing a function for each matched - * element. When the callback is fired, the function is fired in the context of - * the DOM element, so `this` refers to the current element, which is equivalent - * to the function parameter `element`. To break out of the `each` loop early, - * return with `false`. - * - * @category Traversing - * @example - * - * ```js - * const fruits = []; - * - * $('li').each(function (i, elem) { - * fruits[i] = $(this).text(); - * }); - * - * fruits.join(', '); - * //=> Apple, Orange, Pear - * ``` - * - * @param fn - Function to execute. - * @returns The instance itself, useful for chaining. - * @see {@link https://api.jquery.com/each/} - */ -export function each(fn) { - let i = 0; - const len = this.length; - while (i < len && fn.call(this[i], i, this[i]) !== false) - ++i; - return this; -} -/** - * Pass each element in the current matched set through a function, producing a - * new Cheerio object containing the return values. The function can return an - * individual data item or an array of data items to be inserted into the - * resulting set. If an array is returned, the elements inside the array are - * inserted into the set. If the function returns null or undefined, no element - * will be inserted. - * - * @category Traversing - * @example - * - * ```js - * $('li') - * .map(function (i, el) { - * // this === el - * return $(this).text(); - * }) - * .toArray() - * .join(' '); - * //=> "apple orange pear" - * ``` - * - * @param fn - Function to execute. - * @returns The mapped elements, wrapped in a Cheerio collection. - * @see {@link https://api.jquery.com/map/} - */ -export function map(fn) { - let elems = []; - for (let i = 0; i < this.length; i++) { - const el = this[i]; - const val = fn.call(el, i, el); - if (val != null) { - elems = elems.concat(val); - } - } - return this._make(elems); -} -/** - * Creates a function to test if a filter is matched. - * - * @param match - A filter. - * @returns A function that determines if a filter has been matched. - */ -function getFilterFn(match) { - if (typeof match === 'function') { - return (el, i) => match.call(el, i, el); - } - if (isCheerio(match)) { - return (el) => Array.prototype.includes.call(match, el); - } - return function (el) { - return match === el; - }; -} -export function filter(match) { - var _a; - return this._make(filterArray(this.toArray(), match, this.options.xmlMode, (_a = this._root) === null || _a === void 0 ? void 0 : _a[0])); -} -export function filterArray(nodes, match, xmlMode, root) { - return typeof match === 'string' - ? select.filter(match, nodes, { xmlMode, root }) - : nodes.filter(getFilterFn(match)); -} -/** - * Checks the current list of elements and returns `true` if _any_ of the - * elements match the selector. If using an element or Cheerio selection, - * returns `true` if _any_ of the elements match. If using a predicate function, - * the function is executed in the context of the selected element, so `this` - * refers to the current element. - * - * @category Traversing - * @param selector - Selector for the selection. - * @returns Whether or not the selector matches an element of the instance. - * @see {@link https://api.jquery.com/is/} - */ -export function is(selector) { - const nodes = this.toArray(); - return typeof selector === 'string' - ? select.some(nodes.filter(isTag), selector, this.options) - : selector - ? nodes.some(getFilterFn(selector)) - : false; -} -/** - * Remove elements from the set of matched elements. Given a Cheerio object that - * represents a set of DOM elements, the `.not()` method constructs a new - * Cheerio object from a subset of the matching elements. The supplied selector - * is tested against each element; the elements that don't match the selector - * will be included in the result. - * - * The `.not()` method can take a function as its argument in the same way that - * `.filter()` does. Elements for which the function returns `true` are excluded - * from the filtered set; all other elements are included. - * - * @category Traversing - * @example <caption>Selector</caption> - * - * ```js - * $('li').not('.apple').length; - * //=> 2 - * ``` - * - * @example <caption>Function</caption> - * - * ```js - * $('li').not(function (i, el) { - * // this === el - * return $(this).attr('class') === 'orange'; - * }).length; //=> 2 - * ``` - * - * @param match - Value to look for, following the rules above. - * @returns The filtered collection. - * @see {@link https://api.jquery.com/not/} - */ -export function not(match) { - let nodes = this.toArray(); - if (typeof match === 'string') { - const matches = new Set(select.filter(match, nodes, this.options)); - nodes = nodes.filter((el) => !matches.has(el)); - } - else { - const filterFn = getFilterFn(match); - nodes = nodes.filter((el, i) => !filterFn(el, i)); - } - return this._make(nodes); -} -/** - * Filters the set of matched elements to only those which have the given DOM - * element as a descendant or which have a descendant that matches the given - * selector. Equivalent to `.filter(':has(selector)')`. - * - * @category Traversing - * @example <caption>Selector</caption> - * - * ```js - * $('ul').has('.pear').attr('id'); - * //=> fruits - * ``` - * - * @example <caption>Element</caption> - * - * ```js - * $('ul').has($('.pear')[0]).attr('id'); - * //=> fruits - * ``` - * - * @param selectorOrHaystack - Element to look for. - * @returns The filtered collection. - * @see {@link https://api.jquery.com/has/} - */ -export function has(selectorOrHaystack) { - return this.filter(typeof selectorOrHaystack === 'string' - ? // Using the `:has` selector here short-circuits searches. - `:has(${selectorOrHaystack})` - : (_, el) => this._make(el).find(selectorOrHaystack).length > 0); -} -/** - * Will select the first element of a cheerio object. - * - * @category Traversing - * @example - * - * ```js - * $('#fruits').children().first().text(); - * //=> Apple - * ``` - * - * @returns The first element. - * @see {@link https://api.jquery.com/first/} - */ -export function first() { - return this.length > 1 ? this._make(this[0]) : this; -} -/** - * Will select the last element of a cheerio object. - * - * @category Traversing - * @example - * - * ```js - * $('#fruits').children().last().text(); - * //=> Pear - * ``` - * - * @returns The last element. - * @see {@link https://api.jquery.com/last/} - */ -export function last() { - return this.length > 0 ? this._make(this[this.length - 1]) : this; -} -/** - * Reduce the set of matched elements to the one at the specified index. Use - * `.eq(-i)` to count backwards from the last selected element. - * - * @category Traversing - * @example - * - * ```js - * $('li').eq(0).text(); - * //=> Apple - * - * $('li').eq(-1).text(); - * //=> Pear - * ``` - * - * @param i - Index of the element to select. - * @returns The element at the `i`th position. - * @see {@link https://api.jquery.com/eq/} - */ -export function eq(i) { - var _a; - i = +i; - // Use the first identity optimization if possible - if (i === 0 && this.length <= 1) - return this; - if (i < 0) - i = this.length + i; - return this._make((_a = this[i]) !== null && _a !== void 0 ? _a : []); -} -export function get(i) { - if (i == null) { - return this.toArray(); - } - return this[i < 0 ? this.length + i : i]; -} -/** - * Retrieve all the DOM elements contained in the jQuery set as an array. - * - * @example - * - * ```js - * $('li').toArray(); - * //=> [ {...}, {...}, {...} ] - * ``` - * - * @returns The contained items. - */ -export function toArray() { - return Array.prototype.slice.call(this); -} -/** - * Search for a given element from among the matched elements. - * - * @category Traversing - * @example - * - * ```js - * $('.pear').index(); - * //=> 2 $('.orange').index('li'); - * //=> 1 - * $('.apple').index($('#fruit, li')); - * //=> 1 - * ``` - * - * @param selectorOrNeedle - Element to look for. - * @returns The index of the element. - * @see {@link https://api.jquery.com/index/} - */ -export function index(selectorOrNeedle) { - let $haystack; - let needle; - if (selectorOrNeedle == null) { - $haystack = this.parent().children(); - needle = this[0]; - } - else if (typeof selectorOrNeedle === 'string') { - $haystack = this._make(selectorOrNeedle); - needle = this[0]; - } - else { - // eslint-disable-next-line @typescript-eslint/no-this-alias, unicorn/no-this-assignment - $haystack = this; - needle = isCheerio(selectorOrNeedle) - ? selectorOrNeedle[0] - : selectorOrNeedle; - } - return Array.prototype.indexOf.call($haystack, needle); -} -/** - * Gets the elements matching the specified range (0-based position). - * - * @category Traversing - * @example - * - * ```js - * $('li').slice(1).eq(0).text(); - * //=> 'Orange' - * - * $('li').slice(1, 2).length; - * //=> 1 - * ``` - * - * @param start - A position at which the elements begin to be selected. If - * negative, it indicates an offset from the end of the set. - * @param end - A position at which the elements stop being selected. If - * negative, it indicates an offset from the end of the set. If omitted, the - * range continues until the end of the set. - * @returns The elements matching the specified range. - * @see {@link https://api.jquery.com/slice/} - */ -export function slice(start, end) { - return this._make(Array.prototype.slice.call(this, start, end)); -} -/** - * End the most recent filtering operation in the current chain and return the - * set of matched elements to its previous state. - * - * @category Traversing - * @example - * - * ```js - * $('li').eq(0).end().length; - * //=> 3 - * ``` - * - * @returns The previous state of the set of matched elements. - * @see {@link https://api.jquery.com/end/} - */ -export function end() { - var _a; - return (_a = this.prevObject) !== null && _a !== void 0 ? _a : this._make([]); -} -/** - * Add elements to the set of matched elements. - * - * @category Traversing - * @example - * - * ```js - * $('.apple').add('.orange').length; - * //=> 2 - * ``` - * - * @param other - Elements to add. - * @param context - Optionally the context of the new selection. - * @returns The combined set. - * @see {@link https://api.jquery.com/add/} - */ -export function add(other, context) { - const selection = this._make(other, context); - const contents = uniqueSort([...this.get(), ...selection.get()]); - return this._make(contents); -} -/** - * Add the previous set of elements on the stack to the current set, optionally - * filtered by a selector. - * - * @category Traversing - * @example - * - * ```js - * $('li').eq(0).addBack('.orange').length; - * //=> 2 - * ``` - * - * @param selector - Selector for the elements to add. - * @returns The combined set. - * @see {@link https://api.jquery.com/addBack/} - */ -export function addBack(selector) { - return this.prevObject - ? this.add(selector ? this.prevObject.filter(selector) : this.prevObject) - : this; -} -//# sourceMappingURL=traversing.js.map \ No newline at end of file diff --git a/node_modules/cheerio/dist/browser/api/traversing.js.map b/node_modules/cheerio/dist/browser/api/traversing.js.map deleted file mode 100644 index 5bc2645..0000000 --- a/node_modules/cheerio/dist/browser/api/traversing.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"traversing.js","sourceRoot":"","sources":["../../../src/api/traversing.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EACL,KAAK,EAGL,WAAW,EACX,UAAU,GAEX,MAAM,YAAY,CAAC;AAEpB,OAAO,KAAK,MAAM,MAAM,gBAAgB,CAAC;AACzC,OAA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AAU,KAAK,CAEnB,KAAc,EACd,GAAY;IAEZ,OAAO,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,SAAS,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,EAAE,KAAK,EAAE,GAAG,CAAC,CAAC,CAAC;AAClE,CAAC;AAED;;;;;;;;;;;;;;GAcG;AACH,MAAM,UAAU,GAAG;;IACjB,OAAO,MAAA,IAAI,CAAC,UAAU,mCAAI,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;AAC3C,CAAC;AAED;;;;;;;;;;;;;;;GAeG;AACH,MAAM,UAAU,GAAG,CAEjB,KAAoC,EACpC,OAA6B;IAE7B,MAAM,SAAS,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC;IAC7C,MAAM,QAAQ,GAAG,UAAU,CAAC,CAAC,GAAG,IAAI,CAAC,GAAG,EAAE,EAAE,GAAG,SAAS,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC;IACjE,OAAO,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;AAC9B,CAAC;AAED;;;;;;;;;;;;;;;GAeG;AACH,MAAM,UAAU,OAAO,CAErB,QAAiB;IAEjB,OAAO,IAAI,CAAC,UAAU;QACpB,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC;QACzE,CAAC,CAAC,IAAI,CAAC;AACX,CAAC"} \ No newline at end of file diff --git a/node_modules/cheerio/dist/browser/cheerio.d.ts b/node_modules/cheerio/dist/browser/cheerio.d.ts deleted file mode 100644 index 8a39fe6..0000000 --- a/node_modules/cheerio/dist/browser/cheerio.d.ts +++ /dev/null @@ -1,85 +0,0 @@ -import type { InternalOptions } from './options.js'; -import type { AnyNode, Document, ParentNode } from 'domhandler'; -import type { BasicAcceptedElems } from './types.js'; -import * as Attributes from './api/attributes.js'; -import * as Traversing from './api/traversing.js'; -import * as Manipulation from './api/manipulation.js'; -import * as Css from './api/css.js'; -import * as Forms from './api/forms.js'; -import * as Extract from './api/extract.js'; -type MethodsType = typeof Attributes & typeof Traversing & typeof Manipulation & typeof Css & typeof Forms & typeof Extract; -/** - * The cheerio class is the central class of the library. It wraps a set of - * elements and provides an API for traversing, modifying, and interacting with - * the set. - * - * Loading a document will return the Cheerio class bound to the root element of - * the document. The class will be instantiated when querying the document (when - * calling `$('selector')`). - * - * @example This is the HTML markup we will be using in all of the API examples: - * - * ```html - * <ul id="fruits"> - * <li class="apple">Apple</li> - * <li class="orange">Orange</li> - * <li class="pear">Pear</li> - * </ul> - * ``` - */ -export declare abstract class Cheerio<T> implements ArrayLike<T> { - length: number; - [index: number]: T; - options: InternalOptions; - /** - * The root of the document. Can be set by using the `root` argument of the - * constructor. - * - * @private - */ - _root: Cheerio<Document> | null; - /** - * Instance of cheerio. Methods are specified in the modules. Usage of this - * constructor is not recommended. Please use `$.load` instead. - * - * @private - * @param elements - The new selection. - * @param root - Sets the root node. - * @param options - Options for the instance. - */ - constructor(elements: ArrayLike<T> | undefined, root: Cheerio<Document> | null, options: InternalOptions); - prevObject: Cheerio<any> | undefined; - /** - * Make a cheerio object. - * - * @private - * @param dom - The contents of the new object. - * @param context - The context of the new object. - * @returns The new cheerio object. - */ - abstract _make<T>(dom: ArrayLike<T> | T | string, context?: BasicAcceptedElems<AnyNode>): Cheerio<T>; - /** - * Parses some content. - * - * @private - * @param content - Content to parse. - * @param options - Options for parsing. - * @param isDocument - Allows parser to be switched to fragment mode. - * @returns A document containing the `content`. - */ - abstract _parse(content: string | Document | AnyNode | AnyNode[] | Buffer, options: InternalOptions, isDocument: boolean, context: ParentNode | null): Document; - /** - * Render an element or a set of elements. - * - * @private - * @param dom - DOM to render. - * @returns The rendered DOM. - */ - abstract _render(dom: AnyNode | ArrayLike<AnyNode>): string; -} -export interface Cheerio<T> extends MethodsType, Iterable<T> { - cheerio: '[cheerio object]'; - splice: typeof Array.prototype.splice; -} -export {}; -//# sourceMappingURL=cheerio.d.ts.map \ No newline at end of file diff --git a/node_modules/cheerio/dist/browser/cheerio.d.ts.map b/node_modules/cheerio/dist/browser/cheerio.d.ts.map deleted file mode 100644 index b949c21..0000000 --- a/node_modules/cheerio/dist/browser/cheerio.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"cheerio.d.ts","sourceRoot":"","sources":["../../src/cheerio.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AACpD,OAAO,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAChE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAErD,OAAO,KAAK,UAAU,MAAM,qBAAqB,CAAC;AAClD,OAAO,KAAK,UAAU,MAAM,qBAAqB,CAAC;AAClD,OAAO,KAAK,YAAY,MAAM,uBAAuB,CAAC;AACtD,OAAO,KAAK,GAAG,MAAM,cAAc,CAAC;AACpC,OAAO,KAAK,KAAK,MAAM,gBAAgB,CAAC;AACxC,OAAO,KAAK,OAAO,MAAM,kBAAkB,CAAC;AAE5C,KAAK,WAAW,GAAG,OAAO,UAAU,GAClC,OAAO,UAAU,GACjB,OAAO,YAAY,GACnB,OAAO,GAAG,GACV,OAAO,KAAK,GACZ,OAAO,OAAO,CAAC;AAEjB;;;;;;;;;;;;;;;;;;GAkBG;AACH,8BAAsB,OAAO,CAAC,CAAC,CAAE,YAAW,SAAS,CAAC,CAAC,CAAC;IACtD,MAAM,SAAK;IACX,CAAC,KAAK,EAAE,MAAM,GAAG,CAAC,CAAC;IAEnB,OAAO,EAAE,eAAe,CAAC;IACzB;;;;;OAKG;IACH,KAAK,EAAE,OAAO,CAAC,QAAQ,CAAC,GAAG,IAAI,CAAC;IAEhC;;;;;;;;OAQG;gBAED,QAAQ,EAAE,SAAS,CAAC,CAAC,CAAC,GAAG,SAAS,EAClC,IAAI,EAAE,OAAO,CAAC,QAAQ,CAAC,GAAG,IAAI,EAC9B,OAAO,EAAE,eAAe;IAa1B,UAAU,EAAE,OAAO,CAAC,GAAG,CAAC,GAAG,SAAS,CAAC;IACrC;;;;;;;OAOG;IACH,QAAQ,CAAC,KAAK,CAAC,CAAC,EACd,GAAG,EAAE,SAAS,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,MAAM,EAC9B,OAAO,CAAC,EAAE,kBAAkB,CAAC,OAAO,CAAC,GACpC,OAAO,CAAC,CAAC,CAAC;IAEb;;;;;;;;OAQG;IACH,QAAQ,CAAC,MAAM,CACb,OAAO,EAAE,MAAM,GAAG,QAAQ,GAAG,OAAO,GAAG,OAAO,EAAE,GAAG,MAAM,EACzD,OAAO,EAAE,eAAe,EACxB,UAAU,EAAE,OAAO,EACnB,OAAO,EAAE,UAAU,GAAG,IAAI,GACzB,QAAQ;IAEX;;;;;;OAMG;IACH,QAAQ,CAAC,OAAO,CAAC,GAAG,EAAE,OAAO,GAAG,SAAS,CAAC,OAAO,CAAC,GAAG,MAAM;CAC5D;AAED,MAAM,WAAW,OAAO,CAAC,CAAC,CAAE,SAAQ,WAAW,EAAE,QAAQ,CAAC,CAAC,CAAC;IAC1D,OAAO,EAAE,kBAAkB,CAAC;IAE5B,MAAM,EAAE,OAAO,KAAK,CAAC,SAAS,CAAC,MAAM,CAAC;CACvC"} \ No newline at end of file diff --git a/node_modules/cheerio/dist/browser/cheerio.js b/node_modules/cheerio/dist/browser/cheerio.js deleted file mode 100644 index dde9ab0..0000000 --- a/node_modules/cheerio/dist/browser/cheerio.js +++ /dev/null @@ -1,58 +0,0 @@ -import * as Attributes from './api/attributes.js'; -import * as Traversing from './api/traversing.js'; -import * as Manipulation from './api/manipulation.js'; -import * as Css from './api/css.js'; -import * as Forms from './api/forms.js'; -import * as Extract from './api/extract.js'; -/** - * The cheerio class is the central class of the library. It wraps a set of - * elements and provides an API for traversing, modifying, and interacting with - * the set. - * - * Loading a document will return the Cheerio class bound to the root element of - * the document. The class will be instantiated when querying the document (when - * calling `$('selector')`). - * - * @example This is the HTML markup we will be using in all of the API examples: - * - * ```html - * <ul id="fruits"> - * <li class="apple">Apple</li> - * <li class="orange">Orange</li> - * <li class="pear">Pear</li> - * </ul> - * ``` - */ -export class Cheerio { - /** - * Instance of cheerio. Methods are specified in the modules. Usage of this - * constructor is not recommended. Please use `$.load` instead. - * - * @private - * @param elements - The new selection. - * @param root - Sets the root node. - * @param options - Options for the instance. - */ - constructor(elements, root, options) { - this.length = 0; - this.options = options; - this._root = root; - if (elements) { - for (let idx = 0; idx < elements.length; idx++) { - this[idx] = elements[idx]; - } - this.length = elements.length; - } - } -} -/** Set a signature of the object. */ -Cheerio.prototype.cheerio = '[cheerio object]'; -/* - * Make cheerio an array-like object - */ -Cheerio.prototype.splice = Array.prototype.splice; -// Support for (const element of $(...)) iteration: -Cheerio.prototype[Symbol.iterator] = Array.prototype[Symbol.iterator]; -// Plug in the API -Object.assign(Cheerio.prototype, Attributes, Traversing, Manipulation, Css, Forms, Extract); -//# sourceMappingURL=cheerio.js.map \ No newline at end of file diff --git a/node_modules/cheerio/dist/browser/cheerio.js.map b/node_modules/cheerio/dist/browser/cheerio.js.map deleted file mode 100644 index e4649b3..0000000 --- a/node_modules/cheerio/dist/browser/cheerio.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"cheerio.js","sourceRoot":"","sources":["../../src/cheerio.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,UAAU,MAAM,qBAAqB,CAAC;AAClD,OAAO,KAAK,UAAU,MAAM,qBAAqB,CAAC;AAClD,OAAO,KAAK,YAAY,MAAM,uBAAuB,CAAC;AACtD,OAAO,KAAK,GAAG,MAAM,cAAc,CAAC;AACpC,OAAO,KAAK,KAAK,MAAM,gBAAgB,CAAC;AACxC,OAAO,KAAK,OAAO,MAAM,kBAAkB,CAAC;AAS5C;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,OAAgB,OAAO;IAa3B;;;;;;;;OAQG;IACH,YACE,QAAkC,EAClC,IAA8B,EAC9B,OAAwB;QAxB1B,WAAM,GAAG,CAAC,CAAC;QA0BT,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC;QAElB,IAAI,QAAQ,EAAE,CAAC;YACb,KAAK,IAAI,GAAG,GAAG,CAAC,EAAE,GAAG,GAAG,QAAQ,CAAC,MAAM,EAAE,GAAG,EAAE,EAAE,CAAC;gBAC/C,IAAI,CAAC,GAAG,CAAC,GAAG,QAAQ,CAAC,GAAG,CAAC,CAAC;YAC5B,CAAC;YACD,IAAI,CAAC,MAAM,GAAG,QAAQ,CAAC,MAAM,CAAC;QAChC,CAAC;IACH,CAAC;CAwCF;AAQD,qCAAqC;AACrC,OAAO,CAAC,SAAS,CAAC,OAAO,GAAG,kBAAkB,CAAC;AAE/C;;GAEG;AACH,OAAO,CAAC,SAAS,CAAC,MAAM,GAAG,KAAK,CAAC,SAAS,CAAC,MAAM,CAAC;AAElD,mDAAmD;AACnD,OAAO,CAAC,SAAS,CAAC,MAAM,CAAC,QAAQ,CAAC,GAAG,KAAK,CAAC,SAAS,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;AAEtE,kBAAkB;AAClB,MAAM,CAAC,MAAM,CACX,OAAO,CAAC,SAAS,EACjB,UAAU,EACV,UAAU,EACV,YAAY,EACZ,GAAG,EACH,KAAK,EACL,OAAO,CACR,CAAC"} \ No newline at end of file diff --git a/node_modules/cheerio/dist/browser/index-browser.d.mts.map b/node_modules/cheerio/dist/browser/index-browser.d.mts.map deleted file mode 100644 index 2f5fd7b..0000000 --- a/node_modules/cheerio/dist/browser/index-browser.d.mts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index-browser.d.mts","sourceRoot":"","sources":["../../src/index-browser.mts"],"names":[],"mappings":"AAAA,mBAAmB,YAAY,CAAC;AAChC,YAAY,EACV,OAAO,EACP,UAAU,EACV,cAAc,EACd,kBAAkB,GACnB,MAAM,WAAW,CAAC;AACnB,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAE9C,cAAc,iBAAiB,CAAC"} \ No newline at end of file diff --git a/node_modules/cheerio/dist/browser/index-browser.mjs.map b/node_modules/cheerio/dist/browser/index-browser.mjs.map deleted file mode 100644 index 1954ba3..0000000 --- a/node_modules/cheerio/dist/browser/index-browser.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index-browser.mjs","sourceRoot":"","sources":["../../src/index-browser.mts"],"names":[],"mappings":"AAOA,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAE9C,cAAc,iBAAiB,CAAC"} \ No newline at end of file diff --git a/node_modules/cheerio/dist/browser/index.d.ts b/node_modules/cheerio/dist/browser/index.d.ts deleted file mode 100644 index eb3d031..0000000 --- a/node_modules/cheerio/dist/browser/index.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -export type * from './types.js'; -export type { Cheerio, CheerioAPI, CheerioOptions, HTMLParser2Options, } from './slim.js'; -export { contains, merge } from './static.js'; -export * from './load-parse.js'; -//# sourceMappingURL=index-browser.d.mts.map \ No newline at end of file diff --git a/node_modules/cheerio/dist/browser/index.js b/node_modules/cheerio/dist/browser/index.js deleted file mode 100644 index 8c38eb0..0000000 --- a/node_modules/cheerio/dist/browser/index.js +++ /dev/null @@ -1,3 +0,0 @@ -export { contains, merge } from './static.js'; -export * from './load-parse.js'; -//# sourceMappingURL=index-browser.mjs.map \ No newline at end of file diff --git a/node_modules/cheerio/dist/browser/load-parse.d.ts b/node_modules/cheerio/dist/browser/load-parse.d.ts deleted file mode 100644 index f884d14..0000000 --- a/node_modules/cheerio/dist/browser/load-parse.d.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { type CheerioAPI } from './load.js'; -import type { CheerioOptions } from './options.js'; -import type { AnyNode } from 'domhandler'; -/** - * Create a querying function, bound to a document created from the provided - * markup. - * - * Note that similar to web browser contexts, this operation may introduce - * `<html>`, `<head>`, and `<body>` elements; set `isDocument` to `false` to - * switch to fragment mode and disable this. - * - * @category Loading - * @param content - Markup to be loaded. - * @param options - Options for the created instance. - * @param isDocument - Allows parser to be switched to fragment mode. - * @returns The loaded document. - * @see {@link https://cheerio.js.org#loading} for additional usage information. - */ -export declare const load: (content: string | AnyNode | AnyNode[] | Buffer, options?: CheerioOptions | null, isDocument?: boolean) => CheerioAPI; -//# sourceMappingURL=load-parse.d.ts.map \ No newline at end of file diff --git a/node_modules/cheerio/dist/browser/load-parse.d.ts.map b/node_modules/cheerio/dist/browser/load-parse.d.ts.map deleted file mode 100644 index 4696c84..0000000 --- a/node_modules/cheerio/dist/browser/load-parse.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"load-parse.d.ts","sourceRoot":"","sources":["../../src/load-parse.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,UAAU,EAAW,MAAM,WAAW,CAAC;AAGrD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAGnD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAS1C;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,IAAI,EAAE,CACjB,OAAO,EAAE,MAAM,GAAG,OAAO,GAAG,OAAO,EAAE,GAAG,MAAM,EAC9C,OAAO,CAAC,EAAE,cAAc,GAAG,IAAI,EAC/B,UAAU,CAAC,EAAE,OAAO,KACjB,UAIJ,CAAC"} \ No newline at end of file diff --git a/node_modules/cheerio/dist/browser/load-parse.js b/node_modules/cheerio/dist/browser/load-parse.js deleted file mode 100644 index db7ae5f..0000000 --- a/node_modules/cheerio/dist/browser/load-parse.js +++ /dev/null @@ -1,28 +0,0 @@ -import { getLoad } from './load.js'; -import { getParse } from './parse.js'; -import { renderWithParse5, parseWithParse5 } from './parsers/parse5-adapter.js'; -import renderWithHtmlparser2 from 'dom-serializer'; -import { parseDocument as parseWithHtmlparser2 } from 'htmlparser2'; -const parse = getParse((content, options, isDocument, context) => options._useHtmlParser2 - ? parseWithHtmlparser2(content, options) - : parseWithParse5(content, options, isDocument, context)); -// Duplicate docs due to https://github.com/TypeStrong/typedoc/issues/1616 -/** - * Create a querying function, bound to a document created from the provided - * markup. - * - * Note that similar to web browser contexts, this operation may introduce - * `<html>`, `<head>`, and `<body>` elements; set `isDocument` to `false` to - * switch to fragment mode and disable this. - * - * @category Loading - * @param content - Markup to be loaded. - * @param options - Options for the created instance. - * @param isDocument - Allows parser to be switched to fragment mode. - * @returns The loaded document. - * @see {@link https://cheerio.js.org#loading} for additional usage information. - */ -export const load = getLoad(parse, (dom, options) => options._useHtmlParser2 - ? renderWithHtmlparser2(dom, options) - : renderWithParse5(dom)); -//# sourceMappingURL=load-parse.js.map \ No newline at end of file diff --git a/node_modules/cheerio/dist/browser/load-parse.js.map b/node_modules/cheerio/dist/browser/load-parse.js.map deleted file mode 100644 index 43e0389..0000000 --- a/node_modules/cheerio/dist/browser/load-parse.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"load-parse.js","sourceRoot":"","sources":["../../src/load-parse.ts"],"names":[],"mappings":"AAAA,OAAO,EAAmB,OAAO,EAAE,MAAM,WAAW,CAAC;AACrD,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAEhF,OAAO,qBAAqB,MAAM,gBAAgB,CAAC;AACnD,OAAO,EAAE,aAAa,IAAI,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAGpE,MAAM,KAAK,GAAG,QAAQ,CAAC,CAAC,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,EAAE,CAC/D,OAAO,CAAC,eAAe;IACrB,CAAC,CAAC,oBAAoB,CAAC,OAAO,EAAE,OAAO,CAAC;IACxC,CAAC,CAAC,eAAe,CAAC,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,OAAO,CAAC,CAC3D,CAAC;AAEF,0EAA0E;AAC1E;;;;;;;;;;;;;;GAcG;AACH,MAAM,CAAC,MAAM,IAAI,GAIC,OAAO,CAAC,KAAK,EAAE,CAAC,GAAG,EAAE,OAAO,EAAE,EAAE,CAChD,OAAO,CAAC,eAAe;IACrB,CAAC,CAAC,qBAAqB,CAAC,GAAG,EAAE,OAAO,CAAC;IACrC,CAAC,CAAC,gBAAgB,CAAC,GAAG,CAAC,CAC1B,CAAC"} \ No newline at end of file diff --git a/node_modules/cheerio/dist/browser/load.d.ts b/node_modules/cheerio/dist/browser/load.d.ts deleted file mode 100644 index 43ff318..0000000 --- a/node_modules/cheerio/dist/browser/load.d.ts +++ /dev/null @@ -1,91 +0,0 @@ -import { type CheerioOptions, type InternalOptions } from './options.js'; -import * as staticMethods from './static.js'; -import { Cheerio } from './cheerio.js'; -import type { AnyNode, Document, Element } from 'domhandler'; -import type { SelectorType, BasicAcceptedElems } from './types.js'; -type StaticType = typeof staticMethods; -/** - * A querying function, bound to a document created from the provided markup. - * - * Also provides several helper methods for dealing with the document as a - * whole. - */ -export interface CheerioAPI extends StaticType { - /** - * This selector method is the starting point for traversing and manipulating - * the document. Like jQuery, it's the primary method for selecting elements - * in the document. - * - * `selector` searches within the `context` scope, which searches within the - * `root` scope. - * - * @example - * - * ```js - * $('ul .pear').attr('class'); - * //=> pear - * - * $('li[class=orange]').html(); - * //=> Orange - * - * $('.apple', '#fruits').text(); - * //=> Apple - * ``` - * - * Optionally, you can also load HTML by passing the string as the selector: - * - * ```js - * $('<ul id="fruits">...</ul>'); - * ``` - * - * Or the context: - * - * ```js - * $('ul', '<ul id="fruits">...</ul>'); - * ``` - * - * Or as the root: - * - * ```js - * $('li', 'ul', '<ul id="fruits">...</ul>'); - * ``` - * - * @param selector - Either a selector to look for within the document, or the - * contents of a new Cheerio instance. - * @param context - Either a selector to look for within the root, or the - * contents of the document to query. - * @param root - Optional HTML document string. - */ - <T extends AnyNode, S extends string>(selector?: S | BasicAcceptedElems<T>, context?: BasicAcceptedElems<AnyNode> | null, root?: BasicAcceptedElems<Document>, options?: CheerioOptions): Cheerio<S extends SelectorType ? Element : T>; - /** - * The root the document was originally loaded with. - * - * @private - */ - _root: Document; - /** - * The options the document was originally loaded with. - * - * @private - */ - _options: InternalOptions; - /** Mimic jQuery's prototype alias for plugin authors. */ - fn: typeof Cheerio.prototype; - /** - * The `.load` static method defined on the "loaded" Cheerio factory function - * is deprecated. Users are encouraged to instead use the `load` function - * exported by the Cheerio module. - * - * @deprecated Use the `load` function exported by the Cheerio module. - * @category Deprecated - * @example - * - * ```js - * const $ = cheerio.load('<h1>Hello, <span>world</span>.</h1>'); - * ``` - */ - load: ReturnType<typeof getLoad>; -} -export declare function getLoad(parse: typeof Cheerio.prototype._parse, render: (dom: AnyNode | ArrayLike<AnyNode>, options: InternalOptions) => string): (content: string | AnyNode | AnyNode[] | Buffer, options?: CheerioOptions | null, isDocument?: boolean) => CheerioAPI; -export {}; -//# sourceMappingURL=load.d.ts.map \ No newline at end of file diff --git a/node_modules/cheerio/dist/browser/load.d.ts.map b/node_modules/cheerio/dist/browser/load.d.ts.map deleted file mode 100644 index 11729d5..0000000 --- a/node_modules/cheerio/dist/browser/load.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"load.d.ts","sourceRoot":"","sources":["../../src/load.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,cAAc,EACnB,KAAK,eAAe,EAErB,MAAM,cAAc,CAAC;AACtB,OAAO,KAAK,aAAa,MAAM,aAAa,CAAC;AAC7C,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAEvC,OAAO,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAc,MAAM,YAAY,CAAC;AACzE,OAAO,KAAK,EAAE,YAAY,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAEnE,KAAK,UAAU,GAAG,OAAO,aAAa,CAAC;AAEvC;;;;;GAKG;AACH,MAAM,WAAW,UAAW,SAAQ,UAAU;IAC5C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA4CG;IACH,CAAC,CAAC,SAAS,OAAO,EAAE,CAAC,SAAS,MAAM,EAClC,QAAQ,CAAC,EAAE,CAAC,GAAG,kBAAkB,CAAC,CAAC,CAAC,EACpC,OAAO,CAAC,EAAE,kBAAkB,CAAC,OAAO,CAAC,GAAG,IAAI,EAC5C,IAAI,CAAC,EAAE,kBAAkB,CAAC,QAAQ,CAAC,EACnC,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,CAAC,SAAS,YAAY,GAAG,OAAO,GAAG,CAAC,CAAC,CAAC;IAEjD;;;;OAIG;IACH,KAAK,EAAE,QAAQ,CAAC;IAEhB;;;;OAIG;IACH,QAAQ,EAAE,eAAe,CAAC;IAE1B,yDAAyD;IACzD,EAAE,EAAE,OAAO,OAAO,CAAC,SAAS,CAAC;IAE7B;;;;;;;;;;;;OAYG;IACH,IAAI,EAAE,UAAU,CAAC,OAAO,OAAO,CAAC,CAAC;CAClC;AAED,wBAAgB,OAAO,CACrB,KAAK,EAAE,OAAO,OAAO,CAAC,SAAS,CAAC,MAAM,EACtC,MAAM,EAAE,CACN,GAAG,EAAE,OAAO,GAAG,SAAS,CAAC,OAAO,CAAC,EACjC,OAAO,EAAE,eAAe,KACrB,MAAM,aAiBA,MAAM,GAAG,OAAO,GAAG,OAAO,EAAE,GAAG,MAAM,YACpC,cAAc,GAAG,IAAI,2BAE9B,UAAU,CAyId"} \ No newline at end of file diff --git a/node_modules/cheerio/dist/browser/load.js b/node_modules/cheerio/dist/browser/load.js deleted file mode 100644 index 837ce8b..0000000 --- a/node_modules/cheerio/dist/browser/load.js +++ /dev/null @@ -1,123 +0,0 @@ -import { flattenOptions, } from './options.js'; -import * as staticMethods from './static.js'; -import { Cheerio } from './cheerio.js'; -import { isHtml, isCheerio } from './utils.js'; -export function getLoad(parse, render) { - /** - * Create a querying function, bound to a document created from the provided - * markup. - * - * Note that similar to web browser contexts, this operation may introduce - * `<html>`, `<head>`, and `<body>` elements; set `isDocument` to `false` to - * switch to fragment mode and disable this. - * - * @param content - Markup to be loaded. - * @param options - Options for the created instance. - * @param isDocument - Allows parser to be switched to fragment mode. - * @returns The loaded document. - * @see {@link https://cheerio.js.org#loading} for additional usage information. - */ - return function load(content, options, isDocument = true) { - if (content == null) { - throw new Error('cheerio.load() expects a string'); - } - const internalOpts = flattenOptions(options); - const initialRoot = parse(content, internalOpts, isDocument, null); - /** - * Create an extended class here, so that extensions only live on one - * instance. - */ - class LoadedCheerio extends Cheerio { - _make(selector, context) { - const cheerio = initialize(selector, context); - cheerio.prevObject = this; - return cheerio; - } - _parse(content, options, isDocument, context) { - return parse(content, options, isDocument, context); - } - _render(dom) { - return render(dom, this.options); - } - } - function initialize(selector, context, root = initialRoot, opts) { - // $($) - if (selector && isCheerio(selector)) - return selector; - const options = flattenOptions(opts, internalOpts); - const r = typeof root === 'string' - ? [parse(root, options, false, null)] - : 'length' in root - ? root - : [root]; - const rootInstance = isCheerio(r) - ? r - : new LoadedCheerio(r, null, options); - // Add a cyclic reference, so that calling methods on `_root` never fails. - rootInstance._root = rootInstance; - // $(), $(null), $(undefined), $(false) - if (!selector) { - return new LoadedCheerio(undefined, rootInstance, options); - } - const elements = typeof selector === 'string' && isHtml(selector) - ? // $(<html>) - parse(selector, options, false, null).children - : isNode(selector) - ? // $(dom) - [selector] - : Array.isArray(selector) - ? // $([dom]) - selector - : undefined; - const instance = new LoadedCheerio(elements, rootInstance, options); - if (elements) { - return instance; - } - if (typeof selector !== 'string') { - throw new TypeError('Unexpected type of selector'); - } - // We know that our selector is a string now. - let search = selector; - const searchContext = context - ? // If we don't have a context, maybe we have a root, from loading - typeof context === 'string' - ? isHtml(context) - ? // $('li', '<ul>...</ul>') - new LoadedCheerio([parse(context, options, false, null)], rootInstance, options) - : // $('li', 'ul') - ((search = `${context} ${search}`), rootInstance) - : isCheerio(context) - ? // $('li', $) - context - : // $('li', node), $('li', [nodes]) - new LoadedCheerio(Array.isArray(context) ? context : [context], rootInstance, options) - : rootInstance; - // If we still don't have a context, return - if (!searchContext) - return instance; - /* - * #id, .class, tag - */ - return searchContext.find(search); - } - // Add in static methods & properties - Object.assign(initialize, staticMethods, { - load, - // `_root` and `_options` are used in static methods. - _root: initialRoot, - _options: internalOpts, - // Add `fn` for plugins - fn: LoadedCheerio.prototype, - // Add the prototype here to maintain `instanceof` behavior. - prototype: LoadedCheerio.prototype, - }); - return initialize; - }; -} -function isNode(obj) { - return (!!obj.name || - obj.type === 'root' || - obj.type === 'text' || - obj.type === 'comment'); -} -//# sourceMappingURL=load.js.map \ No newline at end of file diff --git a/node_modules/cheerio/dist/browser/load.js.map b/node_modules/cheerio/dist/browser/load.js.map deleted file mode 100644 index d7a19a9..0000000 --- a/node_modules/cheerio/dist/browser/load.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"load.js","sourceRoot":"","sources":["../../src/load.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,cAAc,GACf,MAAM,cAAc,CAAC;AACtB,OAAO,KAAK,aAAa,MAAM,aAAa,CAAC;AAC7C,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAkG/C,MAAM,UAAU,OAAO,CACrB,KAAsC,EACtC,MAGW;IAEX;;;;;;;;;;;;;OAaG;IACH,OAAO,SAAS,IAAI,CAClB,OAA8C,EAC9C,OAA+B,EAC/B,UAAU,GAAG,IAAI;QAEjB,IAAK,OAAyB,IAAI,IAAI,EAAE,CAAC;YACvC,MAAM,IAAI,KAAK,CAAC,iCAAiC,CAAC,CAAC;QACrD,CAAC;QAED,MAAM,YAAY,GAAG,cAAc,CAAC,OAAO,CAAC,CAAC;QAC7C,MAAM,WAA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AC,MAAM,GAAG,GAAG,OAAO,IAAI,MAAM,EAAO,CAAC,EAAE,YAAY,CAAC;wBAC1D,CAAC,CAAC,SAAS,CAAU,OAAO,CAAC;4BAC3B,CAAC,CAAC,aAAa;gCACb,OAAO;4BACT,CAAC,CAAC,kCAAkC;gCAClC,IAAI,aAAa,CACf,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,EAC5C,YAAY,EACZ,OAAO,CACR;gBACP,CAAC,CAAC,YAAY,CAAC;YAEjB,2CAA2C;YAC3C,IAAI,CAAC,aAAa;gBAAE,OAAO,QAAe,CAAC;YAE3C;;eAEG;YACH,OAAO,aAAa,CAAC,IAAI,CAAC,MAAM,CAAoB,CAAC;QACvD,CAAC;QAED,qCAAqC;QACrC,MAAM,CAAC,MAAM,CAAC,UAAU,EAAE,aAAa,EAAE;YACvC,IAAI;YACJ,qDAAqD;YACrD,KAAK,EAAE,WAAW;YAClB,QAAQ,EAAE,YAAY;YACtB,uBAAuB;YACvB,EAAE,EAAE,aAAa,CAAC,SAAS;YAC3B,4DAA4D;YAC5D,SAAS,EAAE,aAAa,CAAC,SAAS;SACnC,CAAC,CAAC;QAEH,OAAO,UAAwB,CAAC;IAClC,CAAC,CAAC;AACJ,CAAC;AAED,SAAS,MAAM,CAAC,GAAQ;IACtB,OAAO,CACL,CAAC,CAAC,GAAG,CAAC,IAAI;QACV,GAAG,CAAC,IAAI,KAAK,MAAM;QACnB,GAAG,CAAC,IAAI,KAAK,MAAM;QACnB,GAAG,CAAC,IAAI,KAAK,SAAS,CACvB,CAAC;AACJ,CAAC"} \ No newline at end of file diff --git a/node_modules/cheerio/dist/browser/options.d.ts b/node_modules/cheerio/dist/browser/options.d.ts deleted file mode 100644 index c3650d6..0000000 --- a/node_modules/cheerio/dist/browser/options.d.ts +++ /dev/null @@ -1,95 +0,0 @@ -import type { DomHandlerOptions } from 'domhandler'; -import type { ParserOptions as HTMLParser2ParserOptions } from 'htmlparser2'; -import type { ParserOptions as Parse5ParserOptions } from 'parse5'; -import type { Htmlparser2TreeAdapterMap } from 'parse5-htmlparser2-tree-adapter'; -import type { Options as SelectOptions } from 'cheerio-select'; -/** - * Options accepted by htmlparser2, the default parser for XML. - * - * @see https://github.com/fb55/htmlparser2/wiki/Parser-options - */ -export interface HTMLParser2Options extends DomHandlerOptions, HTMLParser2ParserOptions { -} -/** - * Options accepted by Cheerio. - * - * Please note that parser-specific options are _only recognized_ if the - * relevant parser is used. - */ -export interface CheerioOptions extends Parse5ParserOptions<Htmlparser2TreeAdapterMap> { - /** - * Recommended way of configuring htmlparser2 when wanting to parse XML. - * - * This will switch Cheerio to use htmlparser2. - * - * @default false - */ - xml?: HTMLParser2Options | boolean; - /** - * Enable xml mode, which will switch Cheerio to use htmlparser2. - * - * @deprecated Please use the `xml` option instead. - * @default false - */ - xmlMode?: boolean; - /** The base URI for the document. Used to resolve the `href` and `src` props. */ - baseURI?: string | URL; - /** - * Is the document in quirks mode? - * - * This will lead to `.className` and `#id` being case-insensitive. - * - * @default false - */ - quirksMode?: SelectOptions['quirksMode']; - /** - * Extension point for pseudo-classes. - * - * Maps from names to either strings of functions. - * - * - A string value is a selector that the element must match to be selected. - * - A function is called with the element as its first argument, and optional - * parameters second. If it returns true, the element is selected. - * - * @example - * - * ```js - * const $ = cheerio.load( - * '<div class="foo"></div><div data-bar="boo"></div>', - * { - * pseudos: { - * // `:foo` is an alias for `div.foo` - * foo: 'div.foo', - * // `:bar(val)` is equivalent to `[data-bar=val s]` - * bar: (el, val) => el.attribs['data-bar'] === val, - * }, - * }, - * ); - * - * $(':foo').length; // 1 - * $('div:bar(boo)').length; // 1 - * $('div:bar(baz)').length; // 0 - * ``` - */ - pseudos?: SelectOptions['pseudos']; -} -/** Internal options for Cheerio. */ -export interface InternalOptions extends HTMLParser2Options, Omit<CheerioOptions, 'xml'> { - /** - * Whether to use htmlparser2. - * - * This is set to true if `xml` is set to true. - */ - _useHtmlParser2?: boolean; -} -/** - * Flatten the options for Cheerio. - * - * This will set `_useHtmlParser2` to true if `xml` is set to true. - * - * @param options - The options to flatten. - * @param baseOptions - The base options to use. - * @returns The flattened options. - */ -export declare function flattenOptions(options?: CheerioOptions | null, baseOptions?: InternalOptions): InternalOptions; -//# sourceMappingURL=options.d.ts.map \ No newline at end of file diff --git a/node_modules/cheerio/dist/browser/options.d.ts.map b/node_modules/cheerio/dist/browser/options.d.ts.map deleted file mode 100644 index 70b44c4..0000000 --- a/node_modules/cheerio/dist/browser/options.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"options.d.ts","sourceRoot":"","sources":["../../src/options.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AACpD,OAAO,KAAK,EAAE,aAAa,IAAI,wBAAwB,EAAE,MAAM,aAAa,CAAC;AAC7E,OAAO,KAAK,EAAE,aAAa,IAAI,mBAAmB,EAAE,MAAM,QAAQ,CAAC;AACnE,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,iCAAiC,CAAC;AACjF,OAAO,KAAK,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAE/D;;;;GAIG;AACH,MAAM,WAAW,kBACf,SAAQ,iBAAiB,EACvB,wBAAwB;CAAG;AAE/B;;;;;GAKG;AACH,MAAM,WAAW,cACf,SAAQ,mBAAmB,CAAC,yBAAyB,CAAC;IACtD;;;;;;OAMG;IACH,GAAG,CAAC,EAAE,kBAAkB,GAAG,OAAO,CAAC;IAEnC;;;;;OAKG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAElB,iFAAiF;IACjF,OAAO,CAAC,EAAE,MAAM,GAAG,GAAG,CAAC;IAEvB;;;;;;OAMG;IACH,UAAU,CAAC,EAAE,aAAa,CAAC,YAAY,CAAC,CAAC;IACzC;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA4BG;IACH,OAAO,CAAC,EAAE,aAAa,CAAC,SAAS,CAAC,CAAC;CACpC;AAED,oCAAoC;AACpC,MAAM,WAAW,eACf,SAAQ,kBAAkB,EACxB,IAAI,CAAC,cAAc,EAAE,KAAK,CAAC;IAC7B;;;;OAIG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B;AAMD;;;;;;;;GAQG;AACH,wBAAgB,cAAc,CAC5B,OAAO,CAAC,EAAE,cAAc,GAAG,IAAI,EAC/B,WAAW,CAAC,EAAE,eAAe,GAC5B,eAAe,CAuBjB"} \ No newline at end of file diff --git a/node_modules/cheerio/dist/browser/options.js b/node_modules/cheerio/dist/browser/options.js deleted file mode 100644 index 41867a5..0000000 --- a/node_modules/cheerio/dist/browser/options.js +++ /dev/null @@ -1,34 +0,0 @@ -const defaultOpts = { - _useHtmlParser2: false, -}; -/** - * Flatten the options for Cheerio. - * - * This will set `_useHtmlParser2` to true if `xml` is set to true. - * - * @param options - The options to flatten. - * @param baseOptions - The base options to use. - * @returns The flattened options. - */ -export function flattenOptions(options, baseOptions) { - if (!options) { - return baseOptions !== null && baseOptions !== void 0 ? baseOptions : defaultOpts; - } - const opts = { - _useHtmlParser2: !!options.xmlMode, - ...baseOptions, - ...options, - }; - if (options.xml) { - opts._useHtmlParser2 = true; - opts.xmlMode = true; - if (options.xml !== true) { - Object.assign(opts, options.xml); - } - } - else if (options.xmlMode) { - opts._useHtmlParser2 = true; - } - return opts; -} -//# sourceMappingURL=options.js.map \ No newline at end of file diff --git a/node_modules/cheerio/dist/browser/options.js.map b/node_modules/cheerio/dist/browser/options.js.map deleted file mode 100644 index b1c37d6..0000000 --- a/node_modules/cheerio/dist/browser/options.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"options.js","sourceRoot":"","sources":["../../src/options.ts"],"names":[],"mappings":"AA+FA,MAAM,WAAW,GAAoB;IACnC,eAAe,EAAE,KAAK;CACvB,CAAC;AAEF;;;;;;;;GAQG;AACH,MAAM,UAAU,cAAc,CAC5B,OAA+B,EAC/B,WAA6B;IAE7B,IAAI,CAAC,OAAO,EAAE,CAAC;QACb,OAAO,WAAW,aAAX,WAAW,cAAX,WAAW,GAAI,WAAW,CAAC;IACpC,CAAC;IAED,MAAM,IAAI,GAAoB;QAC5B,eAAe,EAAE,CAAC,CAAC,OAAO,CAAC,OAAO;QAClC,GAAG,WAAW;QACd,GAAG,OAAO;KACX,CAAC;IAEF,IAAI,OAAO,CAAC,GAAG,EAAE,CAAC;QAChB,IAAI,CAAC,eAAe,GAAG,IAAI,CAAC;QAC5B,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC;QAEpB,IAAI,OAAO,CAAC,GAAG,KAAK,IAAI,EAAE,CAAC;YACzB,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,GAAG,CAAC,CAAC;QACnC,CAAC;IACH,CAAC;SAAM,IAAI,OAAO,CAAC,OAAO,EAAE,CAAC;QAC3B,IAAI,CAAC,eAAe,GAAG,IAAI,CAAC;IAC9B,CAAC;IAED,OAAO,IAAI,CAAC;AACd,CAAC"} \ No newline at end of file diff --git a/node_modules/cheerio/dist/browser/package.json b/node_modules/cheerio/dist/browser/package.json deleted file mode 100644 index 3dbc1ca..0000000 --- a/node_modules/cheerio/dist/browser/package.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "type": "module" -} diff --git a/node_modules/cheerio/dist/browser/parse.d.ts b/node_modules/cheerio/dist/browser/parse.d.ts deleted file mode 100644 index 646f763..0000000 --- a/node_modules/cheerio/dist/browser/parse.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { type AnyNode, Document, type ParentNode } from 'domhandler'; -import type { InternalOptions } from './options.js'; -/** - * Get the parse function with options. - * - * @param parser - The parser function. - * @returns The parse function with options. - */ -export declare function getParse(parser: (content: string, options: InternalOptions, isDocument: boolean, context: ParentNode | null) => Document): (content: string | Document | AnyNode | AnyNode[] | Buffer, options: InternalOptions, isDocument: boolean, context: ParentNode | null) => Document; -/** - * Update the dom structure, for one changed layer. - * - * @param newChilds - The new children. - * @param parent - The new parent. - * @returns The parent node. - */ -export declare function update(newChilds: AnyNode[] | AnyNode, parent: ParentNode | null): ParentNode | null; -//# sourceMappingURL=parse.d.ts.map \ No newline at end of file diff --git a/node_modules/cheerio/dist/browser/parse.d.ts.map b/node_modules/cheerio/dist/browser/parse.d.ts.map deleted file mode 100644 index 8470d5d..0000000 --- a/node_modules/cheerio/dist/browser/parse.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"parse.d.ts","sourceRoot":"","sources":["../../src/parse.ts"],"names":[],"mappings":"AACA,OAAO,EACL,KAAK,OAAO,EACZ,QAAQ,EACR,KAAK,UAAU,EAEhB,MAAM,YAAY,CAAC;AACpB,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAEpD;;;;;GAKG;AACH,wBAAgB,QAAQ,CACtB,MAAM,EAAE,CACN,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,eAAe,EACxB,UAAU,EAAE,OAAO,EACnB,OAAO,EAAE,UAAU,GAAG,IAAI,KACvB,QAAQ,aAYF,MAAM,GAAG,QAAQ,GAAG,OAAO,GAAG,OAAO,EAAE,GAAG,MAAM,WAChD,eAAe,cACZ,OAAO,WACV,UAAU,GAAG,IAAI,KACzB,QAAQ,CAwBZ;AAED;;;;;;GAMG;AACH,wBAAgB,MAAM,CACpB,SAAS,EAAE,OAAO,EAAE,GAAG,OAAO,EAC9B,MAAM,EAAE,UAAU,GAAG,IAAI,GACxB,UAAU,GAAG,IAAI,CA+BnB"} \ No newline at end of file diff --git a/node_modules/cheerio/dist/browser/parse.js b/node_modules/cheerio/dist/browser/parse.js deleted file mode 100644 index 781d6a4..0000000 --- a/node_modules/cheerio/dist/browser/parse.js +++ /dev/null @@ -1,73 +0,0 @@ -import { removeElement } from 'domutils'; -import { Document, isDocument as checkIsDocument, } from 'domhandler'; -/** - * Get the parse function with options. - * - * @param parser - The parser function. - * @returns The parse function with options. - */ -export function getParse(parser) { - /** - * Parse a HTML string or a node. - * - * @param content - The HTML string or node. - * @param options - The parser options. - * @param isDocument - If `content` is a document. - * @param context - The context node in the DOM tree. - * @returns The parsed document node. - */ - return function parse(content, options, isDocument, context) { - if (typeof Buffer !== 'undefined' && Buffer.isBuffer(content)) { - content = content.toString(); - } - if (typeof content === 'string') { - return parser(content, options, isDocument, context); - } - const doc = content; - if (!Array.isArray(doc) && checkIsDocument(doc)) { - // If `doc` is already a root, just return it - return doc; - } - // Add conent to new root element - const root = new Document([]); - // Update the DOM using the root - update(doc, root); - return root; - }; -} -/** - * Update the dom structure, for one changed layer. - * - * @param newChilds - The new children. - * @param parent - The new parent. - * @returns The parent node. - */ -export function update(newChilds, parent) { - // Normalize - const arr = Array.isArray(newChilds) ? newChilds : [newChilds]; - // Update parent - if (parent) { - parent.children = arr; - } - else { - parent = null; - } - // Update neighbors - for (let i = 0; i < arr.length; i++) { - const node = arr[i]; - // Cleanly remove existing nodes from their previous structures. - if (node.parent && node.parent.children !== arr) { - removeElement(node); - } - if (parent) { - node.prev = arr[i - 1] || null; - node.next = arr[i + 1] || null; - } - else { - node.prev = node.next = null; - } - node.parent = parent; - } - return parent; -} -//# sourceMappingURL=parse.js.map \ No newline at end of file diff --git a/node_modules/cheerio/dist/browser/parse.js.map b/node_modules/cheerio/dist/browser/parse.js.map deleted file mode 100644 index 6c80b35..0000000 --- a/node_modules/cheerio/dist/browser/parse.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"parse.js","sourceRoot":"","sources":["../../src/parse.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EAEL,QAAQ,EAER,UAAU,IAAI,eAAe,GAC9B,MAAM,YAAY,CAAC;AAGpB;;;;;GAKG;AACH,MAAM,UAAU,QAAQ,CACtB,MAKa;IAEb;;;;;;;;OAQG;IACH,OAAO,SAAS,KAAK,CACnB,OAAyD,EACzD,OAAwB,EACxB,UAAm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AChE,IAAI,IAAI,CAAC,MAAM,IAAI,IAAI,CAAC,MAAM,CAAC,QAAQ,KAAK,GAAG,EAAE,CAAC;YAChD,aAAa,CAAC,IAAI,CAAC,CAAC;QACtB,CAAC;QAED,IAAI,MAAM,EAAE,CAAC;YACX,IAAI,CAAC,IAAI,GAAG,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,IAAI,CAAC;YAC/B,IAAI,CAAC,IAAI,GAAG,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,IAAI,CAAC;QACjC,CAAC;aAAM,CAAC;YACN,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QAC/B,CAAC;QAED,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED,OAAO,MAAM,CAAC;AAChB,CAAC"} \ No newline at end of file diff --git a/node_modules/cheerio/dist/browser/parsers/parse5-adapter.d.ts b/node_modules/cheerio/dist/browser/parsers/parse5-adapter.d.ts deleted file mode 100644 index c7a2d60..0000000 --- a/node_modules/cheerio/dist/browser/parsers/parse5-adapter.d.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { type AnyNode, type Document, type ParentNode } from 'domhandler'; -import type { InternalOptions } from '../options.js'; -/** - * Parse the content with `parse5` in the context of the given `ParentNode`. - * - * @param content - The content to parse. - * @param options - A set of options to use to parse. - * @param isDocument - Whether to parse the content as a full HTML document. - * @param context - The context in which to parse the content. - * @returns The parsed content. - */ -export declare function parseWithParse5(content: string, options: InternalOptions, isDocument: boolean, context: ParentNode | null): Document; -/** - * Renders the given DOM tree with `parse5` and returns the result as a string. - * - * @param dom - The DOM tree to render. - * @returns The rendered document. - */ -export declare function renderWithParse5(dom: AnyNode | ArrayLike<AnyNode>): string; -//# sourceMappingURL=parse5-adapter.d.ts.map \ No newline at end of file diff --git a/node_modules/cheerio/dist/browser/parsers/parse5-adapter.d.ts.map b/node_modules/cheerio/dist/browser/parsers/parse5-adapter.d.ts.map deleted file mode 100644 index d18dac2..0000000 --- a/node_modules/cheerio/dist/browser/parsers/parse5-adapter.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"parse5-adapter.d.ts","sourceRoot":"","sources":["../../../src/parsers/parse5-adapter.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,OAAO,EACZ,KAAK,QAAQ,EACb,KAAK,UAAU,EAEhB,MAAM,YAAY,CAAC;AAGpB,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAErD;;;;;;;;GAQG;AACH,wBAAgB,eAAe,CAC7B,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,eAAe,EACxB,UAAU,EAAE,OAAO,EACnB,OAAO,EAAE,UAAU,GAAG,IAAI,GACzB,QAAQ,CAUV;AAID;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,OAAO,GAAG,SAAS,CAAC,OAAO,CAAC,GAAG,MAAM,CAqB1E"} \ No newline at end of file diff --git a/node_modules/cheerio/dist/browser/parsers/parse5-adapter.js b/node_modules/cheerio/dist/browser/parsers/parse5-adapter.js deleted file mode 100644 index 0578369..0000000 --- a/node_modules/cheerio/dist/browser/parsers/parse5-adapter.js +++ /dev/null @@ -1,50 +0,0 @@ -import { isDocument, } from 'domhandler'; -import { parse as parseDocument, parseFragment, serializeOuter } from 'parse5'; -import { adapter as htmlparser2Adapter } from 'parse5-htmlparser2-tree-adapter'; -/** - * Parse the content with `parse5` in the context of the given `ParentNode`. - * - * @param content - The content to parse. - * @param options - A set of options to use to parse. - * @param isDocument - Whether to parse the content as a full HTML document. - * @param context - The context in which to parse the content. - * @returns The parsed content. - */ -export function parseWithParse5(content, options, isDocument, context) { - var _a; - (_a = options.treeAdapter) !== null && _a !== void 0 ? _a : (options.treeAdapter = htmlparser2Adapter); - if (options.scriptingEnabled !== false) { - options.scriptingEnabled = true; - } - return isDocument - ? parseDocument(content, options) - : parseFragment(context, content, options); -} -const renderOpts = { treeAdapter: htmlparser2Adapter }; -/** - * Renders the given DOM tree with `parse5` and returns the result as a string. - * - * @param dom - The DOM tree to render. - * @returns The rendered document. - */ -export function renderWithParse5(dom) { - /* - * `dom-serializer` passes over the special "root" node and renders the - * node's children in its place. To mimic this behavior with `parse5`, an - * equivalent operation must be applied to the input array. - */ - const nodes = 'length' in dom ? dom : [dom]; - for (let index = 0; index < nodes.length; index += 1) { - const node = nodes[index]; - if (isDocument(node)) { - Array.prototype.splice.call(nodes, index, 1, ...node.children); - } - } - let result = ''; - for (let index = 0; index < nodes.length; index += 1) { - const node = nodes[index]; - result += serializeOuter(node, renderOpts); - } - return result; -} -//# sourceMappingURL=parse5-adapter.js.map \ No newline at end of file diff --git a/node_modules/cheerio/dist/browser/parsers/parse5-adapter.js.map b/node_modules/cheerio/dist/browser/parsers/parse5-adapter.js.map deleted file mode 100644 index 9d98770..0000000 --- a/node_modules/cheerio/dist/browser/parsers/parse5-adapter.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"parse5-adapter.js","sourceRoot":"","sources":["../../../src/parsers/parse5-adapter.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,UAAU,GACX,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,KAAK,IAAI,aAAa,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,QAAQ,CAAC;AAC/E,OAAO,EAAE,OAAO,IAAI,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AAGhF;;;;;;;;GAQG;AACH,MAAM,UAAU,eAAe,CAC7B,OAAe,EACf,OAAwB,EACxB,UAAmB,EACnB,OAA0B;;IAE1B,MAAA,OAAO,CAAC,WAAW,oCAAnB,OAAO,CAAC,WAAW,GAAK,kBAAkB,EAAC;IAE3C,IAAI,OAAO,CAAC,gBAAgB,KAAK,KAAK,EAAE,CAAC;QACvC,OAAO,CAAC,gBAAgB,GAAG,IAAI,CAAC;IAClC,CAAC;IAED,OAAO,UAAU;QACf,CAAC,CAAC,aAAa,CAAC,OAAO,EAAE,OAAO,CAAC;QACjC,CAAC,CAAC,aAAa,CAAC,OAAO,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;AAC/C,CAAC;AAED,MAAM,UAAU,GAAG,EAAE,WAAW,EAAE,kBAAkB,EAAE,CAAC;AAEvD;;;;;GAKG;AACH,MAAM,UAAU,gBAAgB,CAAC,GAAiC;IAChE;;;;OAIG;IACH,MAAM,KAAK,GAAG,QAAQ,IAAI,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;IAC5C,KAAK,IAAI,KAAK,GAAG,CAAC,EAAE,KAAK,GAAG,KAAK,CAAC,MAAM,EAAE,KAAK,IAAI,CAAC,EAAE,CAAC;QACrD,MAAM,IAAI,GAAG,KAAK,CAAC,KAAK,CAAC,CAAC;QAC1B,IAAI,UAAU,CAAC,IAAI,CAAC,EAAE,CAAC;YACrB,KAAK,CAAC,SAAS,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,EAAE,KAAK,EAAE,CAAC,EAAE,GAAG,IAAI,CAAC,QAAQ,CAAC,CAAC;QACjE,CAAC;IACH,CAAC;IAED,IAAI,MAAM,GAAG,EAAE,CAAC;IAChB,KAAK,IAAI,KAAK,GAAG,CAAC,EAAE,KAAK,GAAG,KAAK,CAAC,MAAM,EAAE,KAAK,IAAI,CAAC,EAAE,CAAC;QACrD,MAAM,IAAI,GAAG,KAAK,CAAC,KAAK,CAAC,CAAC;QAC1B,MAAM,IAAI,cAAc,CAAC,IAAI,EAAE,UAAU,CAAC,CAAC;IAC7C,CAAC;IAED,OAAO,MAAM,CAAC;AAChB,CAAC"} \ No newline at end of file diff --git a/node_modules/cheerio/dist/browser/slim.d.ts b/node_modules/cheerio/dist/browser/slim.d.ts deleted file mode 100644 index d00f24a..0000000 --- a/node_modules/cheerio/dist/browser/slim.d.ts +++ /dev/null @@ -1,25 +0,0 @@ -/** - * @file Alternative entry point for Cheerio that always uses htmlparser2. This - * way, parse5 won't be loaded, saving some memory. - */ -import { type CheerioAPI } from './load.js'; -import { type CheerioOptions } from './options.js'; -import type { AnyNode } from 'domhandler'; -export { contains, merge } from './static.js'; -export type * from './types.js'; -export type { Cheerio } from './cheerio.js'; -export type { CheerioOptions, HTMLParser2Options } from './options.js'; -export type { CheerioAPI } from './load.js'; -/** - * Create a querying function, bound to a document created from the provided - * markup. - * - * @param content - Markup to be loaded. - * @param options - Options for the created instance. - * @param isDocument - Always `false` here, as we are always using - * `htmlparser2`. - * @returns The loaded document. - * @see {@link https://cheerio.js.org#loading} for additional usage information. - */ -export declare const load: (content: string | AnyNode | AnyNode[] | Buffer, options?: CheerioOptions | null, isDocument?: boolean) => CheerioAPI; -//# sourceMappingURL=slim.d.ts.map \ No newline at end of file diff --git a/node_modules/cheerio/dist/browser/slim.d.ts.map b/node_modules/cheerio/dist/browser/slim.d.ts.map deleted file mode 100644 index 0efbb21..0000000 --- a/node_modules/cheerio/dist/browser/slim.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"slim.d.ts","sourceRoot":"","sources":["../../src/slim.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAAE,KAAK,UAAU,EAAW,MAAM,WAAW,CAAC;AACrD,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,cAAc,CAAC;AAEnD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAI1C,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAC9C,mBAAmB,YAAY,CAAC;AAChC,YAAY,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAC5C,YAAY,EAAE,cAAc,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AACvE,YAAY,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAE5C;;;;;;;;;;GAUG;AACH,eAAO,MAAM,IAAI,EAAE,CACjB,OAAO,EAAE,MAAM,GAAG,OAAO,GAAG,OAAO,EAAE,GAAG,MAAM,EAC9C,OAAO,CAAC,EAAE,cAAc,GAAG,IAAI,EAC/B,UAAU,CAAC,EAAE,OAAO,KACjB,UAAqD,CAAC"} \ No newline at end of file diff --git a/node_modules/cheerio/dist/browser/slim.js b/node_modules/cheerio/dist/browser/slim.js deleted file mode 100644 index 52e73e3..0000000 --- a/node_modules/cheerio/dist/browser/slim.js +++ /dev/null @@ -1,22 +0,0 @@ -/** - * @file Alternative entry point for Cheerio that always uses htmlparser2. This - * way, parse5 won't be loaded, saving some memory. - */ -import { getLoad } from './load.js'; -import { getParse } from './parse.js'; -import render from 'dom-serializer'; -import { parseDocument } from 'htmlparser2'; -export { contains, merge } from './static.js'; -/** - * Create a querying function, bound to a document created from the provided - * markup. - * - * @param content - Markup to be loaded. - * @param options - Options for the created instance. - * @param isDocument - Always `false` here, as we are always using - * `htmlparser2`. - * @returns The loaded document. - * @see {@link https://cheerio.js.org#loading} for additional usage information. - */ -export const load = getLoad(getParse(parseDocument), render); -//# sourceMappingURL=slim.js.map \ No newline at end of file diff --git a/node_modules/cheerio/dist/browser/slim.js.map b/node_modules/cheerio/dist/browser/slim.js.map deleted file mode 100644 index 675df45..0000000 --- a/node_modules/cheerio/dist/browser/slim.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"slim.js","sourceRoot":"","sources":["../../src/slim.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAAmB,OAAO,EAAE,MAAM,WAAW,CAAC;AAErD,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEtC,OAAO,MAAM,MAAM,gBAAgB,CAAC;AACpC,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAE5C,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAM9C;;;;;;;;;;GAUG;AACH,MAAM,CAAC,MAAM,IAAI,GAIC,OAAO,CAAC,QAAQ,CAAC,aAAa,CAAC,EAAE,MAAM,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/cheerio/dist/browser/static.d.ts b/node_modules/cheerio/dist/browser/static.d.ts deleted file mode 100644 index 849a5ed..0000000 --- a/node_modules/cheerio/dist/browser/static.d.ts +++ /dev/null @@ -1,112 +0,0 @@ -import type { BasicAcceptedElems } from './types.js'; -import type { CheerioAPI } from './load.js'; -import type { Cheerio } from './cheerio.js'; -import type { AnyNode, Document } from 'domhandler'; -import { type CheerioOptions } from './options.js'; -import type { ExtractedMap, ExtractMap } from './api/extract.js'; -/** - * Renders the document. - * - * @category Static - * @param options - Options for the renderer. - * @returns The rendered document. - */ -export declare function html(this: CheerioAPI, options?: CheerioOptions): string; -/** - * Renders the document. - * - * @category Static - * @param dom - Element to render. - * @param options - Options for the renderer. - * @returns The rendered document. - */ -export declare function html(this: CheerioAPI, dom?: BasicAcceptedElems<AnyNode>, options?: CheerioOptions): string; -/** - * Render the document as XML. - * - * @category Static - * @param dom - Element to render. - * @returns THe rendered document. - */ -export declare function xml(this: CheerioAPI, dom?: BasicAcceptedElems<AnyNode>): string; -/** - * Render the document as text. - * - * This returns the `textContent` of the passed elements. The result will - * include the contents of `<script>` and `<style>` elements. To avoid this, use - * `.prop('innerText')` instead. - * - * @category Static - * @param elements - Elements to render. - * @returns The rendered document. - */ -export declare function text(this: CheerioAPI | void, elements?: ArrayLike<AnyNode>): string; -/** - * Parses a string into an array of DOM nodes. The `context` argument has no - * meaning for Cheerio, but it is maintained for API compatibility with jQuery. - * - * @category Static - * @param data - Markup that will be parsed. - * @param context - Will be ignored. If it is a boolean it will be used as the - * value of `keepScripts`. - * @param keepScripts - If false all scripts will be removed. - * @returns The parsed DOM. - * @alias Cheerio.parseHTML - * @see {@link https://api.jquery.com/jQuery.parseHTML/} - */ -export declare function parseHTML(this: CheerioAPI, data: string, context?: unknown | boolean, keepScripts?: boolean): AnyNode[]; -export declare function parseHTML(this: CheerioAPI, data?: '' | null): null; -/** - * Sometimes you need to work with the top-level root element. To query it, you - * can use `$.root()`. - * - * @category Static - * @example - * - * ```js - * $.root().append('<ul id="vegetables"></ul>').html(); - * //=> <ul id="fruits">...</ul><ul id="vegetables"></ul> - * ``` - * - * @returns Cheerio instance wrapping the root node. - * @alias Cheerio.root - */ -export declare function root(this: CheerioAPI): Cheerio<Document>; -/** - * Checks to see if the `contained` DOM element is a descendant of the - * `container` DOM element. - * - * @category Static - * @param container - Potential parent node. - * @param contained - Potential child node. - * @returns Indicates if the nodes contain one another. - * @alias Cheerio.contains - * @see {@link https://api.jquery.com/jQuery.contains/} - */ -export declare function contains(container: AnyNode, contained: AnyNode): boolean; -/** - * Extract multiple values from a document, and store them in an object. - * - * @category Static - * @param map - An object containing key-value pairs. The keys are the names of - * the properties to be created on the object, and the values are the - * selectors to be used to extract the values. - * @returns An object containing the extracted values. - */ -export declare function extract<M extends ExtractMap>(this: CheerioAPI, map: M): ExtractedMap<M>; -type Writable<T> = { - -readonly [P in keyof T]: T[P]; -}; -/** - * $.merge(). - * - * @category Static - * @param arr1 - First array. - * @param arr2 - Second array. - * @returns `arr1`, with elements of `arr2` inserted. - * @alias Cheerio.merge - * @see {@link https://api.jquery.com/jQuery.merge/} - */ -export declare function merge<T>(arr1: Writable<ArrayLike<T>>, arr2: ArrayLike<T>): ArrayLike<T> | undefined; -export {}; -//# sourceMappingURL=static.d.ts.map \ No newline at end of file diff --git a/node_modules/cheerio/dist/browser/static.d.ts.map b/node_modules/cheerio/dist/browser/static.d.ts.map deleted file mode 100644 index ebe63f7..0000000 --- a/node_modules/cheerio/dist/browser/static.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"static.d.ts","sourceRoot":"","sources":["../../src/static.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AACrD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAC5C,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAC5C,OAAO,KAAK,EAAE,OAAO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;;;;;;;GAQG;AACH,wBAAgB,OAAO,CAAC,CAAC,SAAS,UAAU,EAC1C,IAAI,EAAE,UAAU,EAChB,GAAG,EAAE,CAAC,GACL,YAAY,CAAC,CAAC,CAAC,CAEjB;AAED,KAAK,QAAQ,CAAC,CAAC,IAAI;IAAE,CAAC,UAAU,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAE,CAAC;AAEtD;;;;;;;;;GASG;AACH,wBAAgB,KAAK,CAAC,CAAC,EACrB,IAAI,EAAE,QAAQ,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,EAC5B,IAAI,EAAE,SAAS,CAAC,CAAC,CAAC,GACjB,SAAS,CAAC,CAAC,CAAC,GAAG,SAAS,CAY1B"} \ No newline at end of file diff --git a/node_modules/cheerio/dist/browser/static.js b/node_modules/cheerio/dist/browser/static.js deleted file mode 100644 index 8c3a88d..0000000 --- a/node_modules/cheerio/dist/browser/static.js +++ /dev/null @@ -1,204 +0,0 @@ -import { textContent } from 'domutils'; -import { flattenOptions as flattenOptions, } from './options.js'; -/** - * Helper function to render a DOM. - * - * @param that - Cheerio instance to render. - * @param dom - The DOM to render. Defaults to `that`'s root. - * @param options - Options for rendering. - * @returns The rendered document. - */ -function render(that, dom, options) { - if (!that) - return ''; - return that(dom !== null && dom !== void 0 ? dom : that._root.children, null, undefined, options).toString(); -} -/** - * Checks if a passed object is an options object. - * - * @param dom - Object to check if it is an options object. - * @param options - Options object. - * @returns Whether the object is an options object. - */ -function isOptions(dom, options) { - return (!options && - typeof dom === 'object' && - dom != null && - !('length' in dom) && - !('type' in dom)); -} -export function html(dom, options) { - /* - * Be flexible about parameters, sometimes we call html(), - * with options as only parameter - * check dom argument for dom element specific properties - * assume there is no 'length' or 'type' properties in the options object - */ - const toRender = isOptions(dom) ? ((options = dom), undefined) : dom; - /* - * Sometimes `$.html()` is used without preloading html, - * so fallback non-existing options to the default ones. - */ - const opts = { - ...this === null || this === void 0 ? void 0 : this._options, - ...flattenOptions(options), - }; - return render(this, toRender, opts); -} -/** - * Render the document as XML. - * - * @category Static - * @param dom - Element to render. - * @returns THe rendered document. - */ -export function xml(dom) { - const options = { ...this._options, xmlMode: true }; - return render(this, dom, options); -} -/** - * Render the document as text. - * - * This returns the `textContent` of the passed elements. The result will - * include the contents of `<script>` and `<style>` elements. To avoid this, use - * `.prop('innerText')` instead. - * - * @category Static - * @param elements - Elements to render. - * @returns The rendered document. - */ -export function text(elements) { - const elems = elements !== null && elements !== void 0 ? elements : (this ? this.root() : []); - let ret = ''; - for (let i = 0; i < elems.length; i++) { - ret += textContent(elems[i]); - } - return ret; -} -export function parseHTML(data, context, keepScripts = typeof context === 'boolean' ? context : false) { - if (!data || typeof data !== 'string') { - return null; - } - if (typeof context === 'boolean') { - keepScripts = context; - } - const parsed = this.load(data, this._options, false); - if (!keepScripts) { - parsed('script').remove(); - } - /* - * The `children` array is used by Cheerio internally to group elements that - * share the same parents. When nodes created through `parseHTML` are - * inserted into previously-existing DOM structures, they will be removed - * from the `children` array. The results of `parseHTML` should remain - * constant across these operations, so a shallow copy should be returned. - */ - return [...parsed.root()[0].children]; -} -/** - * Sometimes you need to work with the top-level root element. To query it, you - * can use `$.root()`. - * - * @category Static - * @example - * - * ```js - * $.root().append('<ul id="vegetables"></ul>').html(); - * //=> <ul id="fruits">...</ul><ul id="vegetables"></ul> - * ``` - * - * @returns Cheerio instance wrapping the root node. - * @alias Cheerio.root - */ -export function root() { - return this(this._root); -} -/** - * Checks to see if the `contained` DOM element is a descendant of the - * `container` DOM element. - * - * @category Static - * @param container - Potential parent node. - * @param contained - Potential child node. - * @returns Indicates if the nodes contain one another. - * @alias Cheerio.contains - * @see {@link https://api.jquery.com/jQuery.contains/} - */ -export function contains(container, contained) { - // According to the jQuery API, an element does not "contain" itself - if (contained === container) { - return false; - } - /* - * Step up the descendants, stopping when the root element is reached - * (signaled by `.parent` returning a reference to the same object) - */ - let next = contained; - while (next && next !== next.parent) { - next = next.parent; - if (next === container) { - return true; - } - } - return false; -} -/** - * Extract multiple values from a document, and store them in an object. - * - * @category Static - * @param map - An object containing key-value pairs. The keys are the names of - * the properties to be created on the object, and the values are the - * selectors to be used to extract the values. - * @returns An object containing the extracted values. - */ -export function extract(map) { - return this.root().extract(map); -} -/** - * $.merge(). - * - * @category Static - * @param arr1 - First array. - * @param arr2 - Second array. - * @returns `arr1`, with elements of `arr2` inserted. - * @alias Cheerio.merge - * @see {@link https://api.jquery.com/jQuery.merge/} - */ -export function merge(arr1, arr2) { - if (!isArrayLike(arr1) || !isArrayLike(arr2)) { - return; - } - let newLength = arr1.length; - const len = +arr2.length; - for (let i = 0; i < len; i++) { - arr1[newLength++] = arr2[i]; - } - arr1.length = newLength; - return arr1; -} -/** - * Checks if an object is array-like. - * - * @category Static - * @param item - Item to check. - * @returns Indicates if the item is array-like. - */ -function isArrayLike(item) { - if (Array.isArray(item)) { - return true; - } - if (typeof item !== 'object' || - item === null || - !('length' in item) || - typeof item.length !== 'number' || - item.length < 0) { - return false; - } - for (let i = 0; i < item.length; i++) { - if (!(i in item)) { - return false; - } - } - return true; -} -//# sourceMappingURL=static.js.map \ No newline at end of file diff --git a/node_modules/cheerio/dist/browser/static.js.map b/node_modules/cheerio/dist/browser/static.js.map deleted file mode 100644 index ddcddbe..0000000 --- a/node_modules/cheerio/dist/browser/static.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"static.js","sourceRoot":"","sources":["../../src/static.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AACvC,OAAO,EAGL,cAAc,IAAI,cAAc,GACjC,MAAM,cAAc,CAAC;AAGtB;;;;;;;GAOG;AACH,SAAS,MAAM,CACb,IAAgB,EAChB,GAA4C,EAC5C,OAAwB;IAExB,IAAI,CAAC,IAAI;QAAE,OAAO,EAAE,CAAC;IAErB,OAAO,IAAI,CAAC,GAAG,aAAH,GAAG,cAAH,GAAG,GAAI,IAAI,CAAC,KAAK,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AG,CAAC,EACf,CAAC;QACD,OAAO,KAAK,CAAC;IACf,CAAC;IAED,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;QACrC,IAAI,CAAC,CAAC,CAAC,IAAI,IAAI,CAAC,EAAE,CAAC;YACjB,OAAO,KAAK,CAAC;QACf,CAAC;IACH,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC"} \ No newline at end of file diff --git a/node_modules/cheerio/dist/browser/types.d.ts b/node_modules/cheerio/dist/browser/types.d.ts deleted file mode 100644 index 52289cc..0000000 --- a/node_modules/cheerio/dist/browser/types.d.ts +++ /dev/null @@ -1,21 +0,0 @@ -/** @file Types used in signatures of Cheerio methods. */ -type LowercaseLetters = 'a' | 'b' | 'c' | 'd' | 'e' | 'f' | 'g' | 'h' | 'i' | 'j' | 'k' | 'l' | 'm' | 'n' | 'o' | 'p' | 'q' | 'r' | 's' | 't' | 'u' | 'v' | 'w' | 'x' | 'y' | 'z'; -type AlphaNumeric = LowercaseLetters | Uppercase<LowercaseLetters> | `${number}`; -type SelectorSpecial = '.' | '#' | ':' | '|' | '>' | '+' | '~' | '['; -/** - * Type for identifying selectors. Allows us to "upgrade" queries using - * selectors to return `Element`s. - */ -export type SelectorType = `${SelectorSpecial}${AlphaNumeric}${string}` | `${AlphaNumeric}${string}`; -import type { Cheerio } from './cheerio.js'; -import type { AnyNode } from 'domhandler'; -/** Elements that can be passed to manipulation methods. */ -export type BasicAcceptedElems<T extends AnyNode> = ArrayLike<T> | T | string; -/** Elements that can be passed to manipulation methods, including functions. */ -export type AcceptedElems<T extends AnyNode> = BasicAcceptedElems<T> | ((this: T, i: number, el: T) => BasicAcceptedElems<T>); -/** Function signature, for traversal methods. */ -export type FilterFunction<T> = (this: T, i: number, el: T) => boolean; -/** Supported filter types, for traversal methods. */ -export type AcceptedFilters<T> = string | FilterFunction<T> | T | Cheerio<T>; -export {}; -//# sourceMappingURL=types.d.ts.map \ No newline at end of file diff --git a/node_modules/cheerio/dist/browser/types.d.ts.map b/node_modules/cheerio/dist/browser/types.d.ts.map deleted file mode 100644 index a343d31..0000000 --- a/node_modules/cheerio/dist/browser/types.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"AAAA,yDAAyD;AAEzD,KAAK,gBAAgB,GACjB,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,CAAC;AAER,KAAK,YAAY,GACb,gBAAgB,GAChB,SAAS,CAAC,gBAAgB,CAAC,GAC3B,GAAG,MAAM,EAAE,CAAC;AAEhB,KAAK,eAAe,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,CAAC;AACrE;;;GAGG;AACH,MAAM,MAAM,YAAY,GACpB,GAAG,eAAe,GAAG,YAAY,GAAG,MAAM,EAAE,GAC5C,GAAG,YAAY,GAAG,MAAM,EAAE,CAAC;AAE/B,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAC5C,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAE1C,2DAA2D;AAC3D,MAAM,MAAM,kBAAkB,CAAC,CAAC,SAAS,OAAO,IAAI,SAAS,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,MAAM,CAAC;AAC9E,gFAAgF;AAChF,MAAM,MAAM,aAAa,CAAC,CAAC,SAAS,OAAO,IACvC,kBAAkB,CAAC,CAAC,CAAC,GACrB,CAAC,CAAC,IAAI,EAAE,CAAC,EAAE,CAAC,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC,KAAK,kBAAkB,CAAC,CAAC,CAAC,CAAC,CAAC;AAE3D,iDAAiD;AACjD,MAAM,MAAM,cAAc,CAAC,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,EAAE,CAAC,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC,KAAK,OAAO,CAAC;AACvE,qDAAqD;AACrD,MAAM,MAAM,eAAe,CAAC,CAAC,IAAI,MAAM,GAAG,cAAc,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/cheerio/dist/browser/types.js b/node_modules/cheerio/dist/browser/types.js deleted file mode 100644 index 9bc98ac..0000000 --- a/node_modules/cheerio/dist/browser/types.js +++ /dev/null @@ -1,3 +0,0 @@ -/** @file Types used in signatures of Cheerio methods. */ -export {}; -//# sourceMappingURL=types.js.map \ No newline at end of file diff --git a/node_modules/cheerio/dist/browser/types.js.map b/node_modules/cheerio/dist/browser/types.js.map deleted file mode 100644 index cd18b94..0000000 --- a/node_modules/cheerio/dist/browser/types.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"AAAA,yDAAyD"} \ No newline at end of file diff --git a/node_modules/cheerio/dist/browser/utils.d.ts b/node_modules/cheerio/dist/browser/utils.d.ts deleted file mode 100644 index cbe8a22..0000000 --- a/node_modules/cheerio/dist/browser/utils.d.ts +++ /dev/null @@ -1,55 +0,0 @@ -import type { AnyNode } from 'domhandler'; -import type { Cheerio } from './cheerio.js'; -/** - * Checks if an object is a Cheerio instance. - * - * @category Utils - * @param maybeCheerio - The object to check. - * @returns Whether the object is a Cheerio instance. - */ -export declare function isCheerio<T>(maybeCheerio: any): maybeCheerio is Cheerio<T>; -/** - * Convert a string to camel case notation. - * - * @private - * @category Utils - * @param str - The string to be converted. - * @returns String in camel case notation. - */ -export declare function camelCase(str: string): string; -/** - * Convert a string from camel case to "CSS case", where word boundaries are - * described by hyphens ("-") and all characters are lower-case. - * - * @private - * @category Utils - * @param str - The string to be converted. - * @returns String in "CSS case". - */ -export declare function cssCase(str: string): string; -/** - * Iterate over each DOM element without creating intermediary Cheerio - * instances. - * - * This is indented for use internally to avoid otherwise unnecessary memory - * pressure introduced by _make. - * - * @category Utils - * @param array - The array to iterate over. - * @param fn - Function to call. - * @returns The original instance. - */ -export declare function domEach<T extends AnyNode, Arr extends ArrayLike<T> = Cheerio<T>>(array: Arr, fn: (elem: T, index: number) => void): Arr; -/** - * Check if string is HTML. - * - * Tests for a `<` within a string, immediate followed by a letter and - * eventually followed by a `>`. - * - * @private - * @category Utils - * @param str - The string to check. - * @returns Indicates if `str` is HTML. - */ -export declare function isHtml(str: string): boolean; -//# sourceMappingURL=utils.d.ts.map \ No newline at end of file diff --git a/node_modules/cheerio/dist/browser/utils.d.ts.map b/node_modules/cheerio/dist/browser/utils.d.ts.map deleted file mode 100644 index 6fe0a6e..0000000 --- a/node_modules/cheerio/dist/browser/utils.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAC1C,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAE5C;;;;;;GAMG;AACH,wBAAgB,SAAS,CAAC,CAAC,EAAE,YAAY,EAAE,GAAG,GAAG,YAAY,IAAI,OAAO,CAAC,CAAC,CAAC,CAE1E;AAED;;;;;;;GAOG;AACH,wBAAgB,SAAS,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAE7C;AAED;;;;;;;;GAQG;AACH,wBAAgB,OAAO,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAE3C;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,OAAO,CACrB,CAAC,SAAS,OAAO,EACjB,GAAG,SAAS,SAAS,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,EACrC,KAAK,EAAE,GAAG,EAAE,EAAE,EAAE,CAAC,IAAI,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,GAAG,GAAG,CAIvD;AAUD;;;;;;;;;;GAUG;AACH,wBAAgB,MAAM,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAa3C"} \ No newline at end of file diff --git a/node_modules/cheerio/dist/browser/utils.js b/node_modules/cheerio/dist/browser/utils.js deleted file mode 100644 index 6dc873a..0000000 --- a/node_modules/cheerio/dist/browser/utils.js +++ /dev/null @@ -1,81 +0,0 @@ -/** - * Checks if an object is a Cheerio instance. - * - * @category Utils - * @param maybeCheerio - The object to check. - * @returns Whether the object is a Cheerio instance. - */ -export function isCheerio(maybeCheerio) { - return maybeCheerio.cheerio != null; -} -/** - * Convert a string to camel case notation. - * - * @private - * @category Utils - * @param str - The string to be converted. - * @returns String in camel case notation. - */ -export function camelCase(str) { - return str.replace(/[._-](\w|$)/g, (_, x) => x.toUpperCase()); -} -/** - * Convert a string from camel case to "CSS case", where word boundaries are - * described by hyphens ("-") and all characters are lower-case. - * - * @private - * @category Utils - * @param str - The string to be converted. - * @returns String in "CSS case". - */ -export function cssCase(str) { - return str.replace(/[A-Z]/g, '-$&').toLowerCase(); -} -/** - * Iterate over each DOM element without creating intermediary Cheerio - * instances. - * - * This is indented for use internally to avoid otherwise unnecessary memory - * pressure introduced by _make. - * - * @category Utils - * @param array - The array to iterate over. - * @param fn - Function to call. - * @returns The original instance. - */ -export function domEach(array, fn) { - const len = array.length; - for (let i = 0; i < len; i++) - fn(array[i], i); - return array; -} -var CharacterCodes; -(function (CharacterCodes) { - CharacterCodes[CharacterCodes["LowerA"] = 97] = "LowerA"; - CharacterCodes[CharacterCodes["LowerZ"] = 122] = "LowerZ"; - CharacterCodes[CharacterCodes["UpperA"] = 65] = "UpperA"; - CharacterCodes[CharacterCodes["UpperZ"] = 90] = "UpperZ"; - CharacterCodes[CharacterCodes["Exclamation"] = 33] = "Exclamation"; -})(CharacterCodes || (CharacterCodes = {})); -/** - * Check if string is HTML. - * - * Tests for a `<` within a string, immediate followed by a letter and - * eventually followed by a `>`. - * - * @private - * @category Utils - * @param str - The string to check. - * @returns Indicates if `str` is HTML. - */ -export function isHtml(str) { - const tagStart = str.indexOf('<'); - if (tagStart < 0 || tagStart > str.length - 3) - return false; - const tagChar = str.charCodeAt(tagStart + 1); - return (((tagChar >= CharacterCodes.LowerA && tagChar <= CharacterCodes.LowerZ) || - (tagChar >= CharacterCodes.UpperA && tagChar <= CharacterCodes.UpperZ) || - tagChar === CharacterCodes.Exclamation) && - str.includes('>', tagStart + 2)); -} -//# sourceMappingURL=utils.js.map \ No newline at end of file diff --git a/node_modules/cheerio/dist/browser/utils.js.map b/node_modules/cheerio/dist/browser/utils.js.map deleted file mode 100644 index 763925f..0000000 --- a/node_modules/cheerio/dist/browser/utils.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../src/utils.ts"],"names":[],"mappings":"AAGA;;;;;;GAMG;AACH,MAAM,UAAU,SAAS,CAAI,YAAiB;IAC5C,OAAO,YAAY,CAAC,OAAO,IAAI,IAAI,CAAC;AACtC,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,SAAS,CAAC,GAAW;IACnC,OAAO,GAAG,CAAC,OAAO,CAAC,cAAc,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC,CAAC;AAChE,CAAC;AAED;;;;;;;;GAQG;AACH,MAAM,UAAU,OAAO,CAAC,GAAW;IACjC,OAAO,GAAG,CAAC,OAAO,CAAC,QAAQ,EAAE,KAAK,CAAC,CAAC,WAAW,EAAE,CAAC;AACpD,CAAC;AAED;;;;;;;;;;;GAWG;AACH,MAAM,UAAU,OAAO,CAGrB,KAAU,EAAE,EAAoC;IAChD,MAAM,GAAG,GAAG,KAAK,CAAC,MAAM,CAAC;IACzB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,GAAG,EAAE,CAAC,EAAE;QAAE,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;IAC9C,OAAO,KAAK,CAAC;AACf,CAAC;AAED,IAAW,cAMV;AAND,WAAW,cAAc;IACvB,wDAAW,CAAA;IACX,yDAAY,CAAA;IACZ,wDAAW,CAAA;IACX,wDAAW,CAAA;IACX,kEAAgB,CAAA;AAClB,CAAC,EANU,cAAc,KAAd,cAAc,QAMxB;AAED;;;;;;;;;;GAUG;AACH,MAAM,UAAU,MAAM,CAAC,GAAW;IAChC,MAAM,QAAQ,GAAG,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;IAElC,IAAI,QAAQ,GAAG,CAAC,IAAI,QAAQ,GAAG,GAAG,CAAC,MAAM,GAAG,CAAC;QAAE,OAAO,KAAK,CAAC;IAE5D,MAAM,OAAO,GAAG,GAAG,CAAC,UAAU,CAAC,QAAQ,GAAG,CAAC,CAAC,CAAC;IAE7C,OAAO,CACL,CAAC,CAAC,OAAO,IAAI,cAAc,CAAC,MAAM,IAAI,OAAO,IAAI,cAAc,CAAC,MAAM,CAAC;QACrE,CAAC,OAAO,IAAI,cAAc,CAAC,MAAM,IAAI,OAAO,IAAI,cAAc,CAAC,MAAM,CAAC;QACtE,OAAO,KAAK,cAAc,CAAC,WAAW,CAAC;QACzC,GAAG,CAAC,QAAQ,CAAC,GAAG,EAAE,QAAQ,GAAG,CAAC,CAAC,CAChC,CAAC;AACJ,CAAC"} \ No newline at end of file diff --git a/node_modules/cheerio/dist/commonjs/api/attributes.d.ts b/node_modules/cheerio/dist/commonjs/api/attributes.d.ts deleted file mode 100644 index a358044..0000000 --- a/node_modules/cheerio/dist/commonjs/api/attributes.d.ts +++ /dev/null @@ -1,385 +0,0 @@ -/** - * Methods for getting and modifying attributes. - * - * @module cheerio/attributes - */ -import { type AnyNode, type Element } from 'domhandler'; -import type { Cheerio } from '../cheerio.js'; -/** - * Method for getting attributes. Gets the attribute value for only the first - * element in the matched set. - * - * @category Attributes - * @example - * - * ```js - * $('ul').attr('id'); - * //=> fruits - * ``` - * - * @param name - Name of the attribute. - * @returns The attribute's value. - * @see {@link https://api.jquery.com/attr/} - */ -export declare function attr<T extends AnyNode>(this: Cheerio<T>, name: string): string | undefined; -/** - * Method for getting all attributes and their values of the first element in - * the matched set. - * - * @category Attributes - * @example - * - * ```js - * $('ul').attr(); - * //=> { id: 'fruits' } - * ``` - * - * @returns The attribute's values. - * @see {@link https://api.jquery.com/attr/} - */ -export declare function attr<T extends AnyNode>(this: Cheerio<T>): Record<string, string> | undefined; -/** - * Method for setting attributes. Sets the attribute value for only the first - * element in the matched set. If you set an attribute's value to `null`, you - * remove that attribute. You may also pass a `map` and `function`. - * - * @category Attributes - * @example - * - * ```js - * $('.apple').attr('id', 'favorite').html(); - * //=> <li class="apple" id="favorite">Apple</li> - * ``` - * - * @param name - Name of the attribute. - * @param value - The new value of the attribute. - * @returns The instance itself. - * @see {@link https://api.jquery.com/attr/} - */ -export declare function attr<T extends AnyNode>(this: Cheerio<T>, name: string, value?: string | null | ((this: Element, i: number, attrib: string) => string | null)): Cheerio<T>; -/** - * Method for setting multiple attributes at once. Sets the attribute value for - * only the first element in the matched set. If you set an attribute's value to - * `null`, you remove that attribute. - * - * @category Attributes - * @example - * - * ```js - * $('.apple').attr({ id: 'favorite' }).html(); - * //=> <li class="apple" id="favorite">Apple</li> - * ``` - * - * @param values - Map of attribute names and values. - * @returns The instance itself. - * @see {@link https://api.jquery.com/attr/} - */ -export declare function attr<T extends AnyNode>(this: Cheerio<T>, values: Record<string, string | null>): Cheerio<T>; -interface StyleProp { - length: number; - [key: string]: string | number; - [index: number]: string; -} -/** - * Method for getting and setting properties. Gets the property value for only - * the first element in the matched set. - * - * @category Attributes - * @example - * - * ```js - * $('input[type="checkbox"]').prop('checked'); - * //=> false - * - * $('input[type="checkbox"]').prop('checked', true).val(); - * //=> ok - * ``` - * - * @param name - Name of the property. - * @returns If `value` is specified the instance itself, otherwise the prop's - * value. - * @see {@link https://api.jquery.com/prop/} - */ -export declare function prop<T extends AnyNode>(this: Cheerio<T>, name: 'tagName' | 'nodeName'): string | undefined; -export declare function prop<T extends AnyNode>(this: Cheerio<T>, name: 'innerHTML' | 'outerHTML' | 'innerText' | 'textContent'): string | null; -/** - * Get a parsed CSS style object. - * - * @param name - Name of the property. - * @returns The style object, or `undefined` if the element has no `style` - * attribute. - */ -export declare function prop<T extends AnyNode>(this: Cheerio<T>, name: 'style'): StyleProp | undefined; -/** - * Resolve `href` or `src` of supported elements. Requires the `baseURI` option - * to be set, and a global `URL` object to be part of the environment. - * - * @example With `baseURI` set to `'https://example.com'`: - * - * ```js - * $('<img src="image.png">').prop('src'); - * //=> 'https://example.com/image.png' - * ``` - * - * @param name - Name of the property. - * @returns The resolved URL, or `undefined` if the element is not supported. - */ -export declare function prop<T extends AnyNode>(this: Cheerio<T>, name: 'href' | 'src'): string | undefined; -/** - * Get a property of an element. - * - * @param name - Name of the property. - * @returns The property's value. - */ -export declare function prop<T extends AnyNode, K extends keyof Element>(this: Cheerio<T>, name: K): Element[K]; -/** - * Set a property of an element. - * - * @param name - Name of the property. - * @param value - Value to set the property to. - * @returns The instance itself. - */ -export declare function prop<T extends AnyNode, K extends keyof Element>(this: Cheerio<T>, name: K, value: Element[K] | ((this: Element, i: number, prop: K) => Element[keyof Element])): Cheerio<T>; -/** - * Set multiple properties of an element. - * - * @example - * - * ```js - * $('input[type="checkbox"]').prop({ - * checked: true, - * disabled: false, - * }); - * ``` - * - * @param map - Object of properties to set. - * @returns The instance itself. - */ -export declare function prop<T extends AnyNode>(this: Cheerio<T>, map: Record<string, string | Element[keyof Element] | boolean>): Cheerio<T>; -/** - * Set a property of an element. - * - * @param name - Name of the property. - * @param value - Value to set the property to. - * @returns The instance itself. - */ -export declare function prop<T extends AnyNode>(this: Cheerio<T>, name: string, value: string | boolean | null | ((this: Element, i: number, prop: string) => string | boolean)): Cheerio<T>; -/** - * Get a property of an element. - * - * @param name - The property's name. - * @returns The property's value. - */ -export declare function prop<T extends AnyNode>(this: Cheerio<T>, name: string): string; -/** - * Method for getting data attributes, for only the first element in the matched - * set. - * - * @category Attributes - * @example - * - * ```js - * $('<div data-apple-color="red"></div>').data('apple-color'); - * //=> 'red' - * ``` - * - * @param name - Name of the data attribute. - * @returns The data attribute's value, or `undefined` if the attribute does not - * exist. - * @see {@link https://api.jquery.com/data/} - */ -export declare function data<T extends AnyNode>(this: Cheerio<T>, name: string): unknown | undefined; -/** - * Method for getting all of an element's data attributes, for only the first - * element in the matched set. - * - * @category Attributes - * @example - * - * ```js - * $('<div data-apple-color="red"></div>').data(); - * //=> { appleColor: 'red' } - * ``` - * - * @returns A map with all of the data attributes. - * @see {@link https://api.jquery.com/data/} - */ -export declare function data<T extends AnyNode>(this: Cheerio<T>): Record<string, unknown>; -/** - * Method for setting data attributes, for only the first element in the matched - * set. - * - * @category Attributes - * @example - * - * ```js - * const apple = $('.apple').data('kind', 'mac'); - * - * apple.data('kind'); - * //=> 'mac' - * ``` - * - * @param name - Name of the data attribute. - * @param value - The new value. - * @returns The instance itself. - * @see {@link https://api.jquery.com/data/} - */ -export declare function data<T extends AnyNode>(this: Cheerio<T>, name: string, value: unknown): Cheerio<T>; -/** - * Method for setting multiple data attributes at once, for only the first - * element in the matched set. - * - * @category Attributes - * @example - * - * ```js - * const apple = $('.apple').data({ kind: 'mac' }); - * - * apple.data('kind'); - * //=> 'mac' - * ``` - * - * @param values - Map of names to values. - * @returns The instance itself. - * @see {@link https://api.jquery.com/data/} - */ -export declare function data<T extends AnyNode>(this: Cheerio<T>, values: Record<string, unknown>): Cheerio<T>; -/** - * Method for getting the value of input, select, and textarea. Note: Support - * for `map`, and `function` has not been added yet. - * - * @category Attributes - * @example - * - * ```js - * $('input[type="text"]').val(); - * //=> input_text - * ``` - * - * @returns The value. - * @see {@link https://api.jquery.com/val/} - */ -export declare function val<T extends AnyNode>(this: Cheerio<T>): string | undefined | string[]; -/** - * Method for setting the value of input, select, and textarea. Note: Support - * for `map`, and `function` has not been added yet. - * - * @category Attributes - * @example - * - * ```js - * $('input[type="text"]').val('test').html(); - * //=> <input type="text" value="test"/> - * ``` - * - * @param value - The new value. - * @returns The instance itself. - * @see {@link https://api.jquery.com/val/} - */ -export declare function val<T extends AnyNode>(this: Cheerio<T>, value: string | string[]): Cheerio<T>; -/** - * Method for removing attributes by `name`. - * - * @category Attributes - * @example - * - * ```js - * $('.pear').removeAttr('class').html(); - * //=> <li>Pear</li> - * - * $('.apple').attr('id', 'favorite'); - * $('.apple').removeAttr('id class').html(); - * //=> <li>Apple</li> - * ``` - * - * @param name - Name of the attribute. - * @returns The instance itself. - * @see {@link https://api.jquery.com/removeAttr/} - */ -export declare function removeAttr<T extends AnyNode>(this: Cheerio<T>, name: string): Cheerio<T>; -/** - * Check to see if _any_ of the matched elements have the given `className`. - * - * @category Attributes - * @example - * - * ```js - * $('.pear').hasClass('pear'); - * //=> true - * - * $('apple').hasClass('fruit'); - * //=> false - * - * $('li').hasClass('pear'); - * //=> true - * ``` - * - * @param className - Name of the class. - * @returns Indicates if an element has the given `className`. - * @see {@link https://api.jquery.com/hasClass/} - */ -export declare function hasClass<T extends AnyNode>(this: Cheerio<T>, className: string): boolean; -/** - * Adds class(es) to all of the matched elements. Also accepts a `function`. - * - * @category Attributes - * @example - * - * ```js - * $('.pear').addClass('fruit').html(); - * //=> <li class="pear fruit">Pear</li> - * - * $('.apple').addClass('fruit red').html(); - * //=> <li class="apple fruit red">Apple</li> - * ``` - * - * @param value - Name of new class. - * @returns The instance itself. - * @see {@link https://api.jquery.com/addClass/} - */ -export declare function addClass<T extends AnyNode, R extends ArrayLike<T>>(this: R, value?: string | ((this: Element, i: number, className: string) => string | undefined)): R; -/** - * Removes one or more space-separated classes from the selected elements. If no - * `className` is defined, all classes will be removed. Also accepts a - * `function`. - * - * @category Attributes - * @example - * - * ```js - * $('.pear').removeClass('pear').html(); - * //=> <li class="">Pear</li> - * - * $('.apple').addClass('red').removeClass().html(); - * //=> <li class="">Apple</li> - * ``` - * - * @param name - Name of the class. If not specified, removes all elements. - * @returns The instance itself. - * @see {@link https://api.jquery.com/removeClass/} - */ -export declare function removeClass<T extends AnyNode, R extends ArrayLike<T>>(this: R, name?: string | ((this: Element, i: number, className: string) => string | undefined)): R; -/** - * Add or remove class(es) from the matched elements, depending on either the - * class's presence or the value of the switch argument. Also accepts a - * `function`. - * - * @category Attributes - * @example - * - * ```js - * $('.apple.green').toggleClass('fruit green red').html(); - * //=> <li class="apple fruit red">Apple</li> - * - * $('.apple.green').toggleClass('fruit green red', true).html(); - * //=> <li class="apple green fruit red">Apple</li> - * ``` - * - * @param value - Name of the class. Can also be a function. - * @param stateVal - If specified the state of the class. - * @returns The instance itself. - * @see {@link https://api.jquery.com/toggleClass/} - */ -export declare function toggleClass<T extends AnyNode, R extends ArrayLike<T>>(this: R, value?: string | ((this: Element, i: number, className: string, stateVal?: boolean) => string), stateVal?: boolean): R; -export {}; -//# sourceMappingURL=attributes.d.ts.map \ No newline at end of file diff --git a/node_modules/cheerio/dist/commonjs/api/attributes.d.ts.map b/node_modules/cheerio/dist/commonjs/api/attributes.d.ts.map deleted file mode 100644 index 1e09a61..0000000 --- a/node_modules/cheerio/dist/commonjs/api/attributes.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"attributes.d.ts","sourceRoot":"","sources":["../../../src/api/attributes.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,OAAO,EAAS,KAAK,OAAO,EAAE,KAAK,OAAO,EAAE,MAAM,YAAY,CAAC;AAC/D,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAwF7C;;;;;;;;;;;;;;;GAeG;AACH,wBAAg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AO,EAAE,CAAC,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,KAAK,MAAM,GAAG,SAAS,CAAC,GACxE,CAAC,CA2CH;AAED;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,WAAW,CAAC,CAAC,SAAS,OAAO,EAAE,CAAC,SAAS,SAAS,CAAC,CAAC,CAAC,EACnE,IAAI,EAAE,CAAC,EACP,KAAK,CAAC,EACF,MAAM,GACN,CAAC,CACC,IAAI,EAAE,OAAO,EACb,CAAC,EAAE,MAAM,EACT,SAAS,EAAE,MAAM,EACjB,QAAQ,CAAC,EAAE,OAAO,KACf,MAAM,CAAC,EAChB,QAAQ,CAAC,EAAE,OAAO,GACjB,CAAC,CA+CH"} \ No newline at end of file diff --git a/node_modules/cheerio/dist/commonjs/api/attributes.js b/node_modules/cheerio/dist/commonjs/api/attributes.js deleted file mode 100644 index 28c1682..0000000 --- a/node_modules/cheerio/dist/commonjs/api/attributes.js +++ /dev/null @@ -1,630 +0,0 @@ -"use strict"; -/** - * Methods for getting and modifying attributes. - * - * @module cheerio/attributes - */ -Object.defineProperty(exports, "__esModule", { value: true }); -exports.attr = attr; -exports.prop = prop; -exports.data = data; -exports.val = val; -exports.removeAttr = removeAttr; -exports.hasClass = hasClass; -exports.addClass = addClass; -exports.removeClass = removeClass; -exports.toggleClass = toggleClass; -const static_js_1 = require("../static.js"); -const utils_js_1 = require("../utils.js"); -const domhandler_1 = require("domhandler"); -const domutils_1 = require("domutils"); -const hasOwn = Object.prototype.hasOwnProperty; -const rspace = /\s+/; -const dataAttrPrefix = 'data-'; -// Attributes that are booleans -const rboolean = /^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i; -// Matches strings that look like JSON objects or arrays -const rbrace = /^{[^]*}$|^\[[^]*]$/; -function getAttr(elem, name, xmlMode) { - var _a; - if (!elem || !(0, domhandler_1.isTag)(elem)) - return undefined; - (_a = elem.attribs) !== null && _a !== void 0 ? _a : (elem.attribs = {}); - // Return the entire attribs object if no attribute specified - if (!name) { - return elem.attribs; - } - if (hasOwn.call(elem.attribs, name)) { - // Get the (decoded) attribute - return !xmlMode && rboolean.test(name) ? name : elem.attribs[name]; - } - // Mimic the DOM and return text content as value for `option's` - if (elem.name === 'option' && name === 'value') { - return (0, static_js_1.text)(elem.children); - } - // Mimic DOM with default value for radios/checkboxes - if (elem.name === 'input' && - (elem.attribs['type'] === 'radio' || elem.attribs['type'] === 'checkbox') && - name === 'value') { - return 'on'; - } - return undefined; -} -/** - * Sets the value of an attribute. The attribute will be deleted if the value is - * `null`. - * - * @private - * @param el - The element to set the attribute on. - * @param name - The attribute's name. - * @param value - The attribute's value. - */ -function setAttr(el, name, value) { - if (value === null) { - removeAttribute(el, name); - } - else { - el.attribs[name] = `${value}`; - } -} -function attr(name, value) { - // Set the value (with attr map support) - if (typeof name === 'object' || value !== undefined) { - if (typeof value === 'function') { - if (typeof name !== 'string') { - { - throw new Error('Bad combination of arguments.'); - } - } - return (0, utils_js_1.domEach)(this, (el, i) => { - if ((0, domhandler_1.isTag)(el)) - setAttr(el, name, value.call(el, i, el.attribs[name])); - }); - } - return (0, utils_js_1.domEach)(this, (el) => { - if (!(0, domhandler_1.isTag)(el)) - return; - if (typeof name === 'object') { - for (const objName of Object.keys(name)) { - const objValue = name[objName]; - setAttr(el, objName, objValue); - } - } - else { - setAttr(el, name, value); - } - }); - } - return arguments.length > 1 - ? this - : getAttr(this[0], name, this.options.xmlMode); -} -/** - * Gets a node's prop. - * - * @private - * @category Attributes - * @param el - Element to get the prop of. - * @param name - Name of the prop. - * @param xmlMode - Disable handling of special HTML attributes. - * @returns The prop's value. - */ -function getProp(el, name, xmlMode) { - return name in el - ? // @ts-expect-error TS doesn't like us accessing the value directly here. - el[name] - : !xmlMode && rboolean.test(name) - ? getAttr(el, name, false) !== undefined - : getAttr(el, name, xmlMode); -} -/** - * Sets the value of a prop. - * - * @private - * @param el - The element to set the prop on. - * @param name - The prop's name. - * @param value - The prop's value. - * @param xmlMode - Disable handling of special HTML attributes. - */ -function setProp(el, name, value, xmlMode) { - if (name in el) { - // @ts-expect-error Overriding value - el[name] = value; - } - else { - setAttr(el, name, !xmlMode && rboolean.test(name) ? (value ? '' : null) : `${value}`); - } -} -function prop(name, value) { - var _a; - if (typeof name === 'string' && value === undefined) { - const el = this[0]; - if (!el || !(0, domhandler_1.isTag)(el)) - return undefined; - switch (name) { - case 'style': { - const property = this.css(); - const keys = Object.keys(property); - for (let i = 0; i < keys.length; i++) { - property[i] = keys[i]; - } - property.length = keys.length; - return property; - } - case 'tagName': - case 'nodeName': { - return el.name.toUpperCase(); - } - case 'href': - case 'src': { - const prop = (_a = el.attribs) === null || _a === void 0 ? void 0 : _a[name]; - if (typeof URL !== 'undefined' && - ((name === 'href' && (el.tagName === 'a' || el.tagName === 'link')) || - (name === 'src' && - (el.tagName === 'img' || - el.tagName === 'iframe' || - el.tagName === 'audio' || - el.tagName === 'video' || - el.tagName === 'source'))) && - prop !== undefined && - this.options.baseURI) { - return new URL(prop, this.options.baseURI).href; - } - return prop; - } - case 'innerText': { - return (0, domutils_1.innerText)(el); - } - case 'textContent': { - return (0, domutils_1.textContent)(el); - } - case 'outerHTML': { - return this.clone().wrap('<container />').parent().html(); - } - case 'innerHTML': { - return this.html(); - } - default: { - return getProp(el, name, this.options.xmlMode); - } - } - } - if (typeof name === 'object' || value !== undefined) { - if (typeof value === 'function') { - if (typeof name === 'object') { - throw new TypeError('Bad combination of arguments.'); - } - return (0, utils_js_1.domEach)(this, (el, i) => { - if ((0, domhandler_1.isTag)(el)) { - setProp(el, name, value.call(el, i, getProp(el, name, this.options.xmlMode)), this.options.xmlMode); - } - }); - } - return (0, utils_js_1.domEach)(this, (el) => { - if (!(0, domhandler_1.isTag)(el)) - return; - if (typeof name === 'object') { - for (const key of Object.keys(name)) { - const val = name[key]; - setProp(el, key, val, this.options.xmlMode); - } - } - else { - setProp(el, name, value, this.options.xmlMode); - } - }); - } - return undefined; -} -/** - * Sets the value of a data attribute. - * - * @private - * @param elem - The element to set the data attribute on. - * @param name - The data attribute's name. - * @param value - The data attribute's value. - */ -function setData(elem, name, value) { - var _a; - (_a = elem.data) !== null && _a !== void 0 ? _a : (elem.data = {}); - if (typeof name === 'object') - Object.assign(elem.data, name); - else if (typeof name === 'string' && value !== undefined) { - elem.data[name] = value; - } -} -/** - * Read _all_ HTML5 `data-*` attributes from the equivalent HTML5 `data-*` - * attribute, and cache the value in the node's internal data store. - * - * @private - * @category Attributes - * @param el - Element to get the data attribute of. - * @returns A map with all of the data attributes. - */ -function readAllData(el) { - for (const domName of Object.keys(el.attribs)) { - if (!domName.startsWith(dataAttrPrefix)) { - continue; - } - const jsName = (0, utils_js_1.camelCase)(domName.slice(dataAttrPrefix.length)); - if (!hasOwn.call(el.data, jsName)) { - el.data[jsName] = parseDataValue(el.attribs[domName]); - } - } - return el.data; -} -/** - * Read the specified attribute from the equivalent HTML5 `data-*` attribute, - * and (if present) cache the value in the node's internal data store. - * - * @private - * @category Attributes - * @param el - Element to get the data attribute of. - * @param name - Name of the data attribute. - * @returns The data attribute's value. - */ -function readData(el, name) { - const domName = dataAttrPrefix + (0, utils_js_1.cssCase)(name); - const data = el.data; - if (hasOwn.call(data, name)) { - return data[name]; - } - if (hasOwn.call(el.attribs, domName)) { - return (data[name] = parseDataValue(el.attribs[domName])); - } - return undefined; -} -/** - * Coerce string data-* attributes to their corresponding JavaScript primitives. - * - * @private - * @category Attributes - * @param value - The value to parse. - * @returns The parsed value. - */ -function parseDataValue(value) { - if (value === 'null') - return null; - if (value === 'true') - return true; - if (value === 'false') - return false; - const num = Number(value); - if (value === String(num)) - return num; - if (rbrace.test(value)) { - try { - return JSON.parse(value); - } - catch { - /* Ignore */ - } - } - return value; -} -function data(name, value) { - var _a; - const elem = this[0]; - if (!elem || !(0, domhandler_1.isTag)(elem)) - return; - const dataEl = elem; - (_a = dataEl.data) !== null && _a !== void 0 ? _a : (dataEl.data = {}); - // Return the entire data object if no data specified - if (name == null) { - return readAllData(dataEl); - } - // Set the value (with attr map support) - if (typeof name === 'object' || value !== undefined) { - (0, utils_js_1.domEach)(this, (el) => { - if ((0, domhandler_1.isTag)(el)) { - if (typeof name === 'object') - setData(el, name); - else - setData(el, name, value); - } - }); - return this; - } - return readData(dataEl, name); -} -function val(value) { - const querying = arguments.length === 0; - const element = this[0]; - if (!element || !(0, domhandler_1.isTag)(element)) - return querying ? undefined : this; - switch (element.name) { - case 'textarea': { - return this.text(value); - } - case 'select': { - const option = this.find('option:selected'); - if (!querying) { - if (this.attr('multiple') == null && typeof value === 'object') { - return this; - } - this.find('option').removeAttr('selected'); - const values = typeof value === 'object' ? value : [value]; - for (const val of values) { - this.find(`option[value="${val}"]`).attr('selected', ''); - } - return this; - } - return this.attr('multiple') - ? option.toArray().map((el) => (0, static_js_1.text)(el.children)) - : option.attr('value'); - } - case 'input': - case 'option': { - return querying - ? this.attr('value') - : this.attr('value', value); - } - } - return undefined; -} -/** - * Remove an attribute. - * - * @private - * @param elem - Node to remove attribute from. - * @param name - Name of the attribute to remove. - */ -function removeAttribute(elem, name) { - if (!elem.attribs || !hasOwn.call(elem.attribs, name)) - return; - delete elem.attribs[name]; -} -/** - * Splits a space-separated list of names to individual names. - * - * @category Attributes - * @param names - Names to split. - * @returns - Split names. - */ -function splitNames(names) { - return names ? names.trim().split(rspace) : []; -} -/** - * Method for removing attributes by `name`. - * - * @category Attributes - * @example - * - * ```js - * $('.pear').removeAttr('class').html(); - * //=> <li>Pear</li> - * - * $('.apple').attr('id', 'favorite'); - * $('.apple').removeAttr('id class').html(); - * //=> <li>Apple</li> - * ``` - * - * @param name - Name of the attribute. - * @returns The instance itself. - * @see {@link https://api.jquery.com/removeAttr/} - */ -function removeAttr(name) { - const attrNames = splitNames(name); - for (const attrName of attrNames) { - (0, utils_js_1.domEach)(this, (elem) => { - if ((0, domhandler_1.isTag)(elem)) - removeAttribute(elem, attrName); - }); - } - return this; -} -/** - * Check to see if _any_ of the matched elements have the given `className`. - * - * @category Attributes - * @example - * - * ```js - * $('.pear').hasClass('pear'); - * //=> true - * - * $('apple').hasClass('fruit'); - * //=> false - * - * $('li').hasClass('pear'); - * //=> true - * ``` - * - * @param className - Name of the class. - * @returns Indicates if an element has the given `className`. - * @see {@link https://api.jquery.com/hasClass/} - */ -function hasClass(className) { - return this.toArray().some((elem) => { - const clazz = (0, domhandler_1.isTag)(elem) && elem.attribs['class']; - let idx = -1; - if (clazz && className.length > 0) { - while ((idx = clazz.indexOf(className, idx + 1)) > -1) { - const end = idx + className.length; - if ((idx === 0 || rspace.test(clazz[idx - 1])) && - (end === clazz.length || rspace.test(clazz[end]))) { - return true; - } - } - } - return false; - }); -} -/** - * Adds class(es) to all of the matched elements. Also accepts a `function`. - * - * @category Attributes - * @example - * - * ```js - * $('.pear').addClass('fruit').html(); - * //=> <li class="pear fruit">Pear</li> - * - * $('.apple').addClass('fruit red').html(); - * //=> <li class="apple fruit red">Apple</li> - * ``` - * - * @param value - Name of new class. - * @returns The instance itself. - * @see {@link https://api.jquery.com/addClass/} - */ -function addClass(value) { - // Support functions - if (typeof value === 'function') { - return (0, utils_js_1.domEach)(this, (el, i) => { - if ((0, domhandler_1.isTag)(el)) { - const className = el.attribs['class'] || ''; - addClass.call([el], value.call(el, i, className)); - } - }); - } - // Return if no value or not a string or function - if (!value || typeof value !== 'string') - return this; - const classNames = value.split(rspace); - const numElements = this.length; - for (let i = 0; i < numElements; i++) { - const el = this[i]; - // If selected element isn't a tag, move on - if (!(0, domhandler_1.isTag)(el)) - continue; - // If we don't already have classes — always set xmlMode to false here, as it doesn't matter for classes - const className = getAttr(el, 'class', false); - if (className) { - let setClass = ` ${className} `; - // Check if class already exists - for (const cn of classNames) { - const appendClass = `${cn} `; - if (!setClass.includes(` ${appendClass}`)) - setClass += appendClass; - } - setAttr(el, 'class', setClass.trim()); - } - else { - setAttr(el, 'class', classNames.join(' ').trim()); - } - } - return this; -} -/** - * Removes one or more space-separated classes from the selected elements. If no - * `className` is defined, all classes will be removed. Also accepts a - * `function`. - * - * @category Attributes - * @example - * - * ```js - * $('.pear').removeClass('pear').html(); - * //=> <li class="">Pear</li> - * - * $('.apple').addClass('red').removeClass().html(); - * //=> <li class="">Apple</li> - * ``` - * - * @param name - Name of the class. If not specified, removes all elements. - * @returns The instance itself. - * @see {@link https://api.jquery.com/removeClass/} - */ -function removeClass(name) { - // Handle if value is a function - if (typeof name === 'function') { - return (0, utils_js_1.domEach)(this, (el, i) => { - if ((0, domhandler_1.isTag)(el)) { - removeClass.call([el], name.call(el, i, el.attribs['class'] || '')); - } - }); - } - const classes = splitNames(name); - const numClasses = classes.length; - const removeAll = arguments.length === 0; - return (0, utils_js_1.domEach)(this, (el) => { - if (!(0, domhandler_1.isTag)(el)) - return; - if (removeAll) { - // Short circuit the remove all case as this is the nice one - el.attribs['class'] = ''; - } - else { - const elClasses = splitNames(el.attribs['class']); - let changed = false; - for (let j = 0; j < numClasses; j++) { - const index = elClasses.indexOf(classes[j]); - if (index >= 0) { - elClasses.splice(index, 1); - changed = true; - /* - * We have to do another pass to ensure that there are not duplicate - * classes listed - */ - j--; - } - } - if (changed) { - el.attribs['class'] = elClasses.join(' '); - } - } - }); -} -/** - * Add or remove class(es) from the matched elements, depending on either the - * class's presence or the value of the switch argument. Also accepts a - * `function`. - * - * @category Attributes - * @example - * - * ```js - * $('.apple.green').toggleClass('fruit green red').html(); - * //=> <li class="apple fruit red">Apple</li> - * - * $('.apple.green').toggleClass('fruit green red', true).html(); - * //=> <li class="apple green fruit red">Apple</li> - * ``` - * - * @param value - Name of the class. Can also be a function. - * @param stateVal - If specified the state of the class. - * @returns The instance itself. - * @see {@link https://api.jquery.com/toggleClass/} - */ -function toggleClass(value, stateVal) { - // Support functions - if (typeof value === 'function') { - return (0, utils_js_1.domEach)(this, (el, i) => { - if ((0, domhandler_1.isTag)(el)) { - toggleClass.call([el], value.call(el, i, el.attribs['class'] || '', stateVal), stateVal); - } - }); - } - // Return if no value or not a string or function - if (!value || typeof value !== 'string') - return this; - const classNames = value.split(rspace); - const numClasses = classNames.length; - const state = typeof stateVal === 'boolean' ? (stateVal ? 1 : -1) : 0; - const numElements = this.length; - for (let i = 0; i < numElements; i++) { - const el = this[i]; - // If selected element isn't a tag, move on - if (!(0, domhandler_1.isTag)(el)) - continue; - const elementClasses = splitNames(el.attribs['class']); - // Check if class already exists - for (let j = 0; j < numClasses; j++) { - // Check if the class name is currently defined - const index = elementClasses.indexOf(classNames[j]); - // Add if stateValue === true or we are toggling and there is no value - if (state >= 0 && index < 0) { - elementClasses.push(classNames[j]); - } - else if (state <= 0 && index >= 0) { - // Otherwise remove but only if the item exists - elementClasses.splice(index, 1); - } - } - el.attribs['class'] = elementClasses.join(' '); - } - return this; -} -//# sourceMappingURL=attributes.js.map \ No newline at end of file diff --git a/node_modules/cheerio/dist/commonjs/api/attributes.js.map b/node_modules/cheerio/dist/commonjs/api/attributes.js.map deleted file mode 100644 index 487e5f1..0000000 --- a/node_modules/cheerio/dist/commonjs/api/attributes.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"attributes.js","sourceRoot":"","sources":["../../../src/api/attributes.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;AAkLH,oBAqCC;AAgLD,oBA6GC;AAgMD,oBA6BC;AAwCD,kBA2CC;AA6CD,gCAaC;AAuBD,4BAuBC;AAoBD,4BA8CC;AAsBD,kCAgDC;AAuBD,kCA0DC;AAnmCD,4CAAoC;AACpC,0CAA0D;AAC1D,2CAA+D;AAE/D,uCAAkD;AAClD,MAAM,MAAM,GAAG,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC;AAC/C,MAAM,MAAM,GAAG,KAAK,CAAC;AACrB,MAAM,cAAc,GAAG,OAAO,CAAC;AAE/B,+BAA+B;AAC/B,MAAM,QAAQ,GACZ,6HAA6H,CAAC;AAChI,wDAAwD;AACxD,MAAM,MAAM,GAAG,oBAAoB,CAAC;AAyBpC,SAAS,OAAO,CACd,IAAa,EACb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AAC;AACd,CAAC"} \ No newline at end of file diff --git a/node_modules/cheerio/dist/commonjs/api/css.d.ts b/node_modules/cheerio/dist/commonjs/api/css.d.ts deleted file mode 100644 index 9997f34..0000000 --- a/node_modules/cheerio/dist/commonjs/api/css.d.ts +++ /dev/null @@ -1,42 +0,0 @@ -import { type Element, type AnyNode } from 'domhandler'; -import type { Cheerio } from '../cheerio.js'; -/** - * Get the value of a style property for the first element in the set of matched - * elements. - * - * @category CSS - * @param names - Optionally the names of the properties of interest. - * @returns A map of all of the style properties. - * @see {@link https://api.jquery.com/css/} - */ -export declare function css<T extends AnyNode>(this: Cheerio<T>, names?: string[]): Record<string, string> | undefined; -/** - * Get the value of a style property for the first element in the set of matched - * elements. - * - * @category CSS - * @param name - The name of the property. - * @returns The property value for the given name. - * @see {@link https://api.jquery.com/css/} - */ -export declare function css<T extends AnyNode>(this: Cheerio<T>, name: string): string | undefined; -/** - * Set one CSS property for every matched element. - * - * @category CSS - * @param prop - The name of the property. - * @param val - The new value. - * @returns The instance itself. - * @see {@link https://api.jquery.com/css/} - */ -export declare function css<T extends AnyNode>(this: Cheerio<T>, prop: string, val: string | ((this: Element, i: number, style: string) => string | undefined)): Cheerio<T>; -/** - * Set multiple CSS properties for every matched element. - * - * @category CSS - * @param map - A map of property names and values. - * @returns The instance itself. - * @see {@link https://api.jquery.com/css/} - */ -export declare function css<T extends AnyNode>(this: Cheerio<T>, map: Record<string, string>): Cheerio<T>; -//# sourceMappingURL=css.d.ts.map \ No newline at end of file diff --git a/node_modules/cheerio/dist/commonjs/api/css.d.ts.map b/node_modules/cheerio/dist/commonjs/api/css.d.ts.map deleted file mode 100644 index 06bff02..0000000 --- a/node_modules/cheerio/dist/commonjs/api/css.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"css.d.ts","sourceRoot":"","sources":["../../../src/api/css.ts"],"names":[],"mappings":"AACA,OAAO,EAAS,KAAK,OAAO,EAAE,KAAK,OAAO,EAAE,MAAM,YAAY,CAAC;AAC/D,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAE7C;;;;;;;;GAQG;AACH,wBAAgB,GAAG,CAAC,CAAC,SAAS,OAAO,EACnC,IAAI,EAAE,OAAO,CAAC,CAAC,CAAC,EAChB,KAAK,CAAC,EAAE,MAAM,EAAE,GACf,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,SAAS,CAAC;AACtC;;;;;;;;GAQG;AACH,wBAAgB,GAAG,CAAC,CAAC,SAAS,OAAO,EACnC,IAAI,EAAE,OAAO,CAAC,CAAC,CAAC,EAChB,IAAI,EAAE,MAAM,GACX,MAAM,GAAG,SAAS,CAAC;AACtB;;;;;;;;GAQG;AACH,wBAAgB,GAAG,CAAC,CAAC,SAAS,OAAO,EACnC,IAAI,EAAE,OAAO,CAAC,CAAC,CAAC,EAChB,IAAI,EAAE,MAAM,EACZ,GAAG,EACC,MAAM,GACN,CAAC,CAAC,IAAI,EAAE,OAAO,EAAE,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,KAAK,MAAM,GAAG,SAAS,CAAC,GACpE,OAAO,CAAC,CAAC,CAAC,CAAC;AACd;;;;;;;GAOG;AACH,wBAAgB,GAAG,CAAC,CAAC,SAAS,OAAO,EACnC,IAAI,EAAE,OAAO,CAAC,CAAC,CAAC,EAChB,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAC1B,OAAO,CAAC,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/cheerio/dist/commonjs/api/css.js b/node_modules/cheerio/dist/commonjs/api/css.js deleted file mode 100644 index f5c8c32..0000000 --- a/node_modules/cheerio/dist/commonjs/api/css.js +++ /dev/null @@ -1,119 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.css = css; -const utils_js_1 = require("../utils.js"); -const domhandler_1 = require("domhandler"); -/** - * Set multiple CSS properties for every matched element. - * - * @category CSS - * @param prop - The names of the properties. - * @param val - The new values. - * @returns The instance itself. - * @see {@link https://api.jquery.com/css/} - */ -function css(prop, val) { - if ((prop != null && val != null) || - // When `prop` is a "plain" object - (typeof prop === 'object' && !Array.isArray(prop))) { - return (0, utils_js_1.domEach)(this, (el, i) => { - if ((0, domhandler_1.isTag)(el)) { - // `prop` can't be an array here anymore. - setCss(el, prop, val, i); - } - }); - } - if (this.length === 0) { - return undefined; - } - return getCss(this[0], prop); -} -/** - * Set styles of all elements. - * - * @private - * @param el - Element to set style of. - * @param prop - Name of property. - * @param value - Value to set property to. - * @param idx - Optional index within the selection. - */ -function setCss(el, prop, value, idx) { - if (typeof prop === 'string') { - const styles = getCss(el); - const val = typeof value === 'function' ? value.call(el, idx, styles[prop]) : value; - if (val === '') { - delete styles[prop]; - } - else if (val != null) { - styles[prop] = val; - } - el.attribs['style'] = stringify(styles); - } - else if (typeof prop === 'object') { - const keys = Object.keys(prop); - for (let i = 0; i < keys.length; i++) { - const k = keys[i]; - setCss(el, k, prop[k], i); - } - } -} -function getCss(el, prop) { - if (!el || !(0, domhandler_1.isTag)(el)) - return; - const styles = parse(el.attribs['style']); - if (typeof prop === 'string') { - return styles[prop]; - } - if (Array.isArray(prop)) { - const newStyles = {}; - for (const item of prop) { - if (styles[item] != null) { - newStyles[item] = styles[item]; - } - } - return newStyles; - } - return styles; -} -/** - * Stringify `obj` to styles. - * - * @private - * @category CSS - * @param obj - Object to stringify. - * @returns The serialized styles. - */ -function stringify(obj) { - return Object.keys(obj).reduce((str, prop) => `${str}${str ? ' ' : ''}${prop}: ${obj[prop]};`, ''); -} -/** - * Parse `styles`. - * - * @private - * @category CSS - * @param styles - Styles to be parsed. - * @returns The parsed styles. - */ -function parse(styles) { - styles = (styles || '').trim(); - if (!styles) - return {}; - const obj = {}; - let key; - for (const str of styles.split(';')) { - const n = str.indexOf(':'); - // If there is no :, or if it is the first/last character, add to the previous item's value - if (n < 1 || n === str.length - 1) { - const trimmed = str.trimEnd(); - if (trimmed.length > 0 && key !== undefined) { - obj[key] += `;${trimmed}`; - } - } - else { - key = str.slice(0, n).trim(); - obj[key] = str.slice(n + 1).trim(); - } - } - return obj; -} -//# sourceMappingURL=css.js.map \ No newline at end of file diff --git a/node_modules/cheerio/dist/commonjs/api/css.js.map b/node_modules/cheerio/dist/commonjs/api/css.js.map deleted file mode 100644 index 94ab724..0000000 --- a/node_modules/cheerio/dist/commonjs/api/css.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"css.js","sourceRoot":"","sources":["../../../src/api/css.ts"],"names":[],"mappings":";;AAmEA,kBAyBC;AA5FD,0CAAsC;AACtC,2CAA+D;AAyD/D;;;;;;;;GAQG;AACH,SAAgB,GAAG,CAEjB,IAAiD,EACjD,GAEqE;IAErE,IACE,CAAC,IAAI,IAAI,IAAI,IAAI,GAAG,IAAI,IAAI,CAAC;QAC7B,kCAAkC;QAClC,CAAC,OAAO,IAAI,KAAK,QAAQ,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,EAClD,CAAC;QACD,OAAO,IAAA,kBAAO,EAAC,IAAI,EAAE,CAAC,EAAE,EAAE,CAAC,EAAE,EAAE;YAC7B,IAAI,IAAA,kBAAK,EAAC,EAAE,CAAC,EAAE,CAAC;gBACd,yCAAyC;gBACzC,MAAM,CAAC,EAAE,EAAE,IAAc,EAAE,GAAG,EAAE,CAAC,CAAC,CAAC;YACrC,CAAC;QACH,CAAC,CAAC,CAAC;IACL,CAAC;IAED,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACtB,OAAO,SAAS,CAAC;IACnB,CAAC;IAED,OAAO,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,IAAc,CAAC,CAAC;AACzC,CAAC;AAED;;;;;;;;GAQG;AACH,SAAS,MAAM,CACb,EAAW,EACX,IAAqC,EACrC,KAGa,EACb,GAAW;IAEX,IAAI,OAAO,IAAI,KAAK,QAAQ,EAAE,CAAC;QAC7B,MAAM,MAAM,GAA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G,CAAC,IAAI,GAAG,KAAK,SAAS,EAAE,CAAC;gBAC5C,GAAG,CAAC,GAAG,CAAC,IAAI,IAAI,OAAO,EAAE,CAAC;YAC5B,CAAC;QACH,CAAC;aAAM,CAAC;YACN,GAAG,GAAG,GAAG,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;YAC7B,GAAG,CAAC,GAAG,CAAC,GAAG,GAAG,CAAC,KAAK,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;QACrC,CAAC;IACH,CAAC;IAED,OAAO,GAAG,CAAC;AACb,CAAC"} \ No newline at end of file diff --git a/node_modules/cheerio/dist/commonjs/api/extract.d.ts b/node_modules/cheerio/dist/commonjs/api/extract.d.ts deleted file mode 100644 index b8d73a7..0000000 --- a/node_modules/cheerio/dist/commonjs/api/extract.d.ts +++ /dev/null @@ -1,29 +0,0 @@ -import type { AnyNode, Element } from 'domhandler'; -import type { Cheerio } from '../cheerio.js'; -import type { prop } from './attributes.js'; -type ExtractDescriptorFn = (el: Element, key: string, obj: Record<string, unknown>) => unknown; -interface ExtractDescriptor { - selector: string; - value?: string | ExtractDescriptorFn | ExtractMap; -} -type ExtractValue = string | ExtractDescriptor | [string | ExtractDescriptor]; -export interface ExtractMap { - [key: string]: ExtractValue; -} -type ExtractedValue<V extends ExtractValue, M extends ExtractMap> = V extends [ - string | ExtractDescriptor -] ? NonNullable<ExtractedValue<V[0], M>>[] : V extends string ? string | undefined : V extends ExtractDescriptor ? V['value'] extends ExtractMap ? ExtractedMap<V['value']> | undefined : V['value'] extends ExtractDescriptorFn ? ReturnType<V['value']> | undefined : ReturnType<typeof prop> | undefined : never; -export type ExtractedMap<M extends ExtractMap> = { - [key in keyof M]: ExtractedValue<M[key], M>; -}; -/** - * Extract multiple values from a document, and store them in an object. - * - * @param map - An object containing key-value pairs. The keys are the names of - * the properties to be created on the object, and the values are the - * selectors to be used to extract the values. - * @returns An object containing the extracted values. - */ -export declare function extract<M extends ExtractMap, T extends AnyNode>(this: Cheerio<T>, map: M): ExtractedMap<M>; -export {}; -//# sourceMappingURL=extract.d.ts.map \ No newline at end of file diff --git a/node_modules/cheerio/dist/commonjs/api/extract.d.ts.map b/node_modules/cheerio/dist/commonjs/api/extract.d.ts.map deleted file mode 100644 index 8bbe7ab..0000000 --- a/node_modules/cheerio/dist/commonjs/api/extract.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"extract.d.ts","sourceRoot":"","sources":["../../../src/api/extract.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACnD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AAE5C,KAAK,mBAAmB,GAAG,CACzB,EAAE,EAAE,OAAO,EACX,GAAG,EAAE,MAAM,EAEX,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KACzB,OAAO,CAAC;AAEb,UAAU,iBAAiB;IACzB,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,GAAG,mBAAmB,GAAG,UAAU,CAAC;CACnD;AAED,KAAK,YAAY,GAAG,MAAM,GAAG,iBAAiB,GAAG,CAAC,MAAM,GAAG,iBAAiB,CAAC,CAAC;AAE9E,MAAM,WAAW,UAAU;IACzB,CAAC,GAAG,EAAE,MAAM,GAAG,YAAY,CAAC;CAC7B;AAED,KAAK,cAAc,CAAC,CAAC,SAAS,YAAY,EAAE,CAAC,SAAS,UAAU,IAAI,CAAC,SAAS;IAC5E,MAAM,GAAG,iBAAiB;CAC3B,GACG,WAAW,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,GACtC,CAAC,SAAS,MAAM,GACd,MAAM,GAAG,SAAS,GAClB,CAAC,SAAS,iBAAiB,GACzB,CAAC,CAAC,OAAO,CAAC,SAAS,UAAU,GAC3B,YAAY,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,GAAG,SAAS,GACpC,CAAC,CAAC,OAAO,CAAC,SAAS,mBAAmB,GACpC,UAAU,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,GAAG,SAAS,GAClC,UAAU,CAAC,OAAO,IAAI,CAAC,GAAG,SAAS,GACvC,KAAK,CAAC;AAEd,MAAM,MAAM,YAAY,CAAC,CAAC,SAAS,UAAU,IAAI;KAC9C,GAAG,IAAI,MAAM,CAAC,GAAG,cAAc,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;CAC5C,CAAC;AAeF;;;;;;;GAOG;AACH,wBAAgB,OAAO,CAAC,CAAC,SAAS,UAAU,EAAE,CAAC,SAAS,OAAO,EAC7D,IAAI,EAAE,OAAO,CAAC,CAAC,CAAC,EAChB,GAAG,EAAE,CAAC,GACL,YAAY,CAAC,CAAC,CAAC,CA2BjB"} \ No newline at end of file diff --git a/node_modules/cheerio/dist/commonjs/api/extract.js b/node_modules/cheerio/dist/commonjs/api/extract.js deleted file mode 100644 index 8160840..0000000 --- a/node_modules/cheerio/dist/commonjs/api/extract.js +++ /dev/null @@ -1,45 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.extract = extract; -function getExtractDescr(descr) { - var _a; - if (typeof descr === 'string') { - return { selector: descr, value: 'textContent' }; - } - return { - selector: descr.selector, - value: (_a = descr.value) !== null && _a !== void 0 ? _a : 'textContent', - }; -} -/** - * Extract multiple values from a document, and store them in an object. - * - * @param map - An object containing key-value pairs. The keys are the names of - * the properties to be created on the object, and the values are the - * selectors to be used to extract the values. - * @returns An object containing the extracted values. - */ -function extract(map) { - const ret = {}; - for (const key in map) { - const descr = map[key]; - const isArray = Array.isArray(descr); - const { selector, value } = getExtractDescr(isArray ? descr[0] : descr); - const fn = typeof value === 'function' - ? value - : typeof value === 'string' - ? (el) => this._make(el).prop(value) - : (el) => this._make(el).extract(value); - if (isArray) { - ret[key] = this._findBySelector(selector, Number.POSITIVE_INFINITY) - .map((_, el) => fn(el, key, ret)) - .get(); - } - else { - const $ = this._findBySelector(selector, 1); - ret[key] = $.length > 0 ? fn($[0], key, ret) : undefined; - } - } - return ret; -} -//# sourceMappingURL=extract.js.map \ No newline at end of file diff --git a/node_modules/cheerio/dist/commonjs/api/extract.js.map b/node_modules/cheerio/dist/commonjs/api/extract.js.map deleted file mode 100644 index 4c98fd1..0000000 --- a/node_modules/cheerio/dist/commonjs/api/extract.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"extract.js","sourceRoot":"","sources":["../../../src/api/extract.ts"],"names":[],"mappings":";;AA6DA,0BA8BC;AAnDD,SAAS,eAAe,CACtB,KAAiC;;IAEjC,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;QAC9B,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,KAAK,EAAE,aAAa,EAAE,CAAC;IACnD,CAAC;IAED,OAAO;QACL,QAAQ,EAAE,KAAK,CAAC,QAAQ;QACxB,KAAK,EAAE,MAAA,KAAK,CAAC,KAAK,mCAAI,aAAa;KACpC,CAAC;AACJ,CAAC;AAED;;;;;;;GAOG;AACH,SAAgB,OAAO,CAErB,GAAM;IAEN,MAAM,GAAG,GAA4B,EAAE,CAAC;IAExC,KAAK,MAAM,GAAG,IAAI,GAAG,EAAE,CAAC;QACtB,MAAM,KAAK,GAAG,GAAG,CAAC,GAAG,CAAC,CAAC;QACvB,MAAM,OAAO,GAAG,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;QAErC,MAAM,EAAE,QAAQ,EAAE,KAAK,EAAE,GAAG,eAAe,CAAC,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;QAExE,MAAM,EAAE,GACN,OAAO,KAAK,KAAK,UAAU;YACzB,CAAC,CAAC,KAAK;YACP,CAAC,CAAC,OAAO,KAAK,KAAK,QAAQ;gBACzB,CAAC,CAAC,CAAC,EAAW,EAAE,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC;gBAC7C,CAAC,CAAC,CAAC,EAAW,EAAE,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;QAEvD,IAAI,OAAO,EAAE,CAAC;YACZ,GAAG,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC,eAAe,CAAC,QAAQ,EAAE,MAAM,CAAC,iBAAiB,CAAC;iBAChE,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,EAAE,EAAE,CAAC,EAAE,CAAC,EAAE,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC;iBAChC,GAAG,EAAE,CAAC;QACX,CAAC;aAAM,CAAC;YACN,MAAM,CAAC,GAAG,IAAI,CAAC,eAAe,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC;YAC5C,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;QAC3D,CAAC;IACH,CAAC;IAED,OAAO,GAAsB,CAAC;AAChC,CAAC"} \ No newline at end of file diff --git a/node_modules/cheerio/dist/commonjs/api/forms.d.ts b/node_modules/cheerio/dist/commonjs/api/forms.d.ts deleted file mode 100644 index dbec41e..0000000 --- a/node_modules/cheerio/dist/commonjs/api/forms.d.ts +++ /dev/null @@ -1,36 +0,0 @@ -import { type AnyNode } from 'domhandler'; -import type { Cheerio } from '../cheerio.js'; -/** - * Encode a set of form elements as a string for submission. - * - * @category Forms - * @example - * - * ```js - * $('<form><input name="foo" value="bar" /></form>').serialize(); - * //=> 'foo=bar' - * ``` - * - * @returns The serialized form. - * @see {@link https://api.jquery.com/serialize/} - */ -export declare function serialize<T extends AnyNode>(this: Cheerio<T>): string; -/** - * Encode a set of form elements as an array of names and values. - * - * @category Forms - * @example - * - * ```js - * $('<form><input name="foo" value="bar" /></form>').serializeArray(); - * //=> [ { name: 'foo', value: 'bar' } ] - * ``` - * - * @returns The serialized form. - * @see {@link https://api.jquery.com/serializeArray/} - */ -export declare function serializeArray<T extends AnyNode>(this: Cheerio<T>): { - name: string; - value: string; -}[]; -//# sourceMappingURL=forms.d.ts.map \ No newline at end of file diff --git a/node_modules/cheerio/dist/commonjs/api/forms.d.ts.map b/node_modules/cheerio/dist/commonjs/api/forms.d.ts.map deleted file mode 100644 index 2ea55e4..0000000 --- a/node_modules/cheerio/dist/commonjs/api/forms.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"forms.d.ts","sourceRoot":"","sources":["../../../src/api/forms.ts"],"names":[],"mappings":"AAAA,OAAO,EAAS,KAAK,OAAO,EAAE,MAAM,YAAY,CAAC;AACjD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAU7C;;;;;;;;;;;;;GAaG;AACH,wBAAgB,SAAS,CAAC,CAAC,SAAS,OAAO,EAAE,IAAI,EAAE,OAAO,CAAC,CAAC,CAAC,GAAG,MAAM,CAYrE;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,cAAc,CAAC,CAAC,SAAS,OAAO,EAC9C,IAAI,EAAE,OAAO,CAAC,CAAC,CAAC,GACf;IACD,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;CACf,EAAE,CA4CF"} \ No newline at end of file diff --git a/node_modules/cheerio/dist/commonjs/api/forms.js b/node_modules/cheerio/dist/commonjs/api/forms.js deleted file mode 100644 index 28ce65b..0000000 --- a/node_modules/cheerio/dist/commonjs/api/forms.js +++ /dev/null @@ -1,85 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.serialize = serialize; -exports.serializeArray = serializeArray; -const domhandler_1 = require("domhandler"); -/* - * https://github.com/jquery/jquery/blob/2.1.3/src/manipulation/var/rcheckableType.js - * https://github.com/jquery/jquery/blob/2.1.3/src/serialize.js - */ -const submittableSelector = 'input,select,textarea,keygen'; -const r20 = /%20/g; -const rCRLF = /\r?\n/g; -/** - * Encode a set of form elements as a string for submission. - * - * @category Forms - * @example - * - * ```js - * $('<form><input name="foo" value="bar" /></form>').serialize(); - * //=> 'foo=bar' - * ``` - * - * @returns The serialized form. - * @see {@link https://api.jquery.com/serialize/} - */ -function serialize() { - // Convert form elements into name/value objects - const arr = this.serializeArray(); - // Serialize each element into a key/value string - const retArr = arr.map((data) => `${encodeURIComponent(data.name)}=${encodeURIComponent(data.value)}`); - // Return the resulting serialization - return retArr.join('&').replace(r20, '+'); -} -/** - * Encode a set of form elements as an array of names and values. - * - * @category Forms - * @example - * - * ```js - * $('<form><input name="foo" value="bar" /></form>').serializeArray(); - * //=> [ { name: 'foo', value: 'bar' } ] - * ``` - * - * @returns The serialized form. - * @see {@link https://api.jquery.com/serializeArray/} - */ -function serializeArray() { - // Resolve all form elements from either forms or collections of form elements - return this.map((_, elem) => { - const $elem = this._make(elem); - if ((0, domhandler_1.isTag)(elem) && elem.name === 'form') { - return $elem.find(submittableSelector).toArray(); - } - return $elem.filter(submittableSelector).toArray(); - }) - .filter( - // Verify elements have a name (`attr.name`) and are not disabled (`:enabled`) - '[name!=""]:enabled' + - // And cannot be clicked (`[type=submit]`) or are used in `x-www-form-urlencoded` (`[type=file]`) - ':not(:submit, :button, :image, :reset, :file)' + - // And are either checked/don't have a checkable state - ':matches([checked], :not(:checkbox, :radio))') - .map((_, elem) => { - var _a; - const $elem = this._make(elem); - const name = $elem.attr('name'); // We have filtered for elements with a name before. - // If there is no value set (e.g. `undefined`, `null`), then default value to empty - const value = (_a = $elem.val()) !== null && _a !== void 0 ? _a : ''; - // If we have an array of values (e.g. `<select multiple>`), return an array of key/value pairs - if (Array.isArray(value)) { - return value.map((val) => - /* - * We trim replace any line endings (e.g. `\r` or `\r\n` with `\r\n`) to guarantee consistency across platforms - * These can occur inside of `<textarea>'s` - */ - ({ name, value: val.replace(rCRLF, '\r\n') })); - } - // Otherwise (e.g. `<input type="text">`, return only one key/value pair - return { name, value: value.replace(rCRLF, '\r\n') }; - }) - .toArray(); -} -//# sourceMappingURL=forms.js.map \ No newline at end of file diff --git a/node_modules/cheerio/dist/commonjs/api/forms.js.map b/node_modules/cheerio/dist/commonjs/api/forms.js.map deleted file mode 100644 index 6248987..0000000 --- a/node_modules/cheerio/dist/commonjs/api/forms.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"forms.js","sourceRoot":"","sources":["../../../src/api/forms.ts"],"names":[],"mappings":";;AAyBA,8BAYC;AAgBD,wCAiDC;AAtGD,2CAAiD;AAGjD;;;GAGG;AACH,MAAM,mBAAmB,GAAG,8BAA8B,CAAC;AAC3D,MAAM,GAAG,GAAG,MAAM,CAAC;AACnB,MAAM,KAAK,GAAG,QAAQ,CAAC;AAEvB;;;;;;;;;;;;;GAaG;AACH,SAAgB,SAAS;IACvB,gDAAgD;IAChD,MAAM,GAAG,GAAG,IAAI,CAAC,cAAc,EAAE,CAAC;IAElC,iDAAiD;IACjD,MAAM,MAAM,GAAG,GAAG,CAAC,GAAG,CACpB,CAAC,IAAI,EAAE,EAAE,CACP,GAAG,kBAAkB,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,kBAAkB,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CACvE,CAAC;IAEF,qCAAqC;IACrC,OAAO,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;AAC5C,CAAC;AAED;;;;;;;;;;;;;GAaG;AACH,SAAgB,cAAc;IAM5B,8EAA8E;IAC9E,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,IAAI,EAA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manipulation.d.ts b/node_modules/cheerio/dist/commonjs/api/manipulation.d.ts deleted file mode 100644 index 620043b..0000000 --- a/node_modules/cheerio/dist/commonjs/api/manipulation.d.ts +++ /dev/null @@ -1,528 +0,0 @@ -/** - * Methods for modifying the DOM structure. - * - * @module cheerio/manipulation - */ -import { type AnyNode } from 'domhandler'; -import type { Cheerio } from '../cheerio.js'; -import type { BasicAcceptedElems, AcceptedElems } from '../types.js'; -/** - * Create an array of nodes, recursing into arrays and parsing strings if - * necessary. - * - * @private - * @category Manipulation - * @param elem - Elements to make an array of. - * @param clone - Optionally clone nodes. - * @returns The array of nodes. - */ -export declare function _makeDomArray<T extends AnyNode>(this: Cheerio<T>, elem?: BasicAcceptedElems<AnyNode> | BasicAcceptedElems<AnyNode>[], clone?: boolean): AnyNode[]; -/** - * Insert every element in the set of matched elements to the end of the target. - * - * @category Manipulation - * @example - * - * ```js - * $('<li class="plum">Plum</li>').appendTo('#fruits'); - * $.html(); - * //=> <ul id="fruits"> - * // <li class="apple">Apple</li> - * // <li class="orange">Orange</li> - * // <li class="pear">Pear</li> - * // <li class="plum">Plum</li> - * // </ul> - * ``` - * - * @param target - Element to append elements to. - * @returns The instance itself. - * @see {@link https://api.jquery.com/appendTo/} - */ -export declare function appendTo<T extends AnyNode>(this: Cheerio<T>, target: BasicAcceptedElems<AnyNode>): Cheerio<T>; -/** - * Insert every element in the set of matched elements to the beginning of the - * target. - * - * @category Manipulation - * @example - * - * ```js - * $('<li class="plum">Plum</li>').prependTo('#fruits'); - * $.html(); - * //=> <ul id="fruits"> - * // <li class="plum">Plum</li> - * // <li class="apple">Apple</li> - * // <li class="orange">Orange</li> - * // <li class="pear">Pear</li> - * // </ul> - * ``` - * - * @param target - Element to prepend elements to. - * @returns The instance itself. - * @see {@link https://api.jquery.com/prependTo/} - */ -export declare function prependTo<T extends AnyNode>(this: Cheerio<T>, target: BasicAcceptedElems<AnyNode>): Cheerio<T>; -/** - * Inserts content as the _last_ child of each of the selected elements. - * - * @category Manipulation - * @example - * - * ```js - * $('ul').append('<li class="plum">Plum</li>'); - * $.html(); - * //=> <ul id="fruits"> - * // <li class="apple">Apple</li> - * // <li class="orange">Orange</li> - * // <li class="pear">Pear</li> - * // <li class="plum">Plum</li> - * // </ul> - * ``` - * - * @see {@link https://api.jquery.com/append/} - */ -export declare const append: <T extends AnyNode>(this: Cheerio<T>, ...elems: [(this: AnyNode, i: number, html: string) => BasicAcceptedElems<AnyNode>] | BasicAcceptedElems<AnyNode>[]) => Cheerio<T>; -/** - * Inserts content as the _first_ child of each of the selected elements. - * - * @category Manipulation - * @example - * - * ```js - * $('ul').prepend('<li class="plum">Plum</li>'); - * $.html(); - * //=> <ul id="fruits"> - * // <li class="plum">Plum</li> - * // <li class="apple">Apple</li> - * // <li class="orange">Orange</li> - * // <li class="pear">Pear</li> - * // </ul> - * ``` - * - * @see {@link https://api.jquery.com/prepend/} - */ -export declare const prepend: <T extends AnyNode>(this: Cheerio<T>, ...elems: [(this: AnyNode, i: number, html: string) => BasicAcceptedElems<AnyNode>] | BasicAcceptedElems<AnyNode>[]) => Cheerio<T>; -/** - * The .wrap() function can take any string or object that could be passed to - * the $() factory function to specify a DOM structure. This structure may be - * nested several levels deep, but should contain only one inmost element. A - * copy of this structure will be wrapped around each of the elements in the set - * of matched elements. This method returns the original set of elements for - * chaining purposes. - * - * @category Manipulation - * @example - * - * ```js - * const redFruit = $('<div class="red-fruit"></div>'); - * $('.apple').wrap(redFruit); - * - * //=> <ul id="fruits"> - * // <div class="red-fruit"> - * // <li class="apple">Apple</li> - * // </div> - * // <li class="orange">Orange</li> - * // <li class="plum">Plum</li> - * // </ul> - * - * const healthy = $('<div class="healthy"></div>'); - * $('li').wrap(healthy); - * - * //=> <ul id="fruits"> - * // <div class="healthy"> - * // <li class="apple">Apple</li> - * // </div> - * // <div class="healthy"> - * // <li class="orange">Orange</li> - * // </div> - * // <div class="healthy"> - * // <li class="plum">Plum</li> - * // </div> - * // </ul> - * ``` - * - * @param wrapper - The DOM structure to wrap around each element in the - * selection. - * @see {@link https://api.jquery.com/wrap/} - */ -export declare const wrap: <T extends AnyNode>(this: Cheerio<T>, wrapper: AcceptedElems<AnyNode>) => Cheerio<T>; -/** - * The .wrapInner() function can take any string or object that could be passed - * to the $() factory function to specify a DOM structure. This structure may be - * nested several levels deep, but should contain only one inmost element. The - * structure will be wrapped around the content of each of the elements in the - * set of matched elements. - * - * @category Manipulation - * @example - * - * ```js - * const redFruit = $('<div class="red-fruit"></div>'); - * $('.apple').wrapInner(redFruit); - * - * //=> <ul id="fruits"> - * // <li class="apple"> - * // <div class="red-fruit">Apple</div> - * // </li> - * // <li class="orange">Orange</li> - * // <li class="pear">Pear</li> - * // </ul> - * - * const healthy = $('<div class="healthy"></div>'); - * $('li').wrapInner(healthy); - * - * //=> <ul id="fruits"> - * // <li class="apple"> - * // <div class="healthy">Apple</div> - * // </li> - * // <li class="orange"> - * // <div class="healthy">Orange</div> - * // </li> - * // <li class="pear"> - * // <div class="healthy">Pear</div> - * // </li> - * // </ul> - * ``` - * - * @param wrapper - The DOM structure to wrap around the content of each element - * in the selection. - * @returns The instance itself, for chaining. - * @see {@link https://api.jquery.com/wrapInner/} - */ -export declare const wrapInner: <T extends AnyNode>(this: Cheerio<T>, wrapper: AcceptedElems<AnyNode>) => Cheerio<T>; -/** - * The .unwrap() function, removes the parents of the set of matched elements - * from the DOM, leaving the matched elements in their place. - * - * @category Manipulation - * @example <caption>without selector</caption> - * - * ```js - * const $ = cheerio.load( - * '<div id=test>\n <div><p>Hello</p></div>\n <div><p>World</p></div>\n</div>', - * ); - * $('#test p').unwrap(); - * - * //=> <div id=test> - * // <p>Hello</p> - * // <p>World</p> - * // </div> - * ``` - * - * @example <caption>with selector</caption> - * - * ```js - * const $ = cheerio.load( - * '<div id=test>\n <p>Hello</p>\n <b><p>World</p></b>\n</div>', - * ); - * $('#test p').unwrap('b'); - * - * //=> <div id=test> - * // <p>Hello</p> - * // <p>World</p> - * // </div> - * ``` - * - * @param selector - A selector to check the parent element against. If an - * element's parent does not match the selector, the element won't be - * unwrapped. - * @returns The instance itself, for chaining. - * @see {@link https://api.jquery.com/unwrap/} - */ -export declare function unwrap<T extends AnyNode>(this: Cheerio<T>, selector?: string): Cheerio<T>; -/** - * The .wrapAll() function can take any string or object that could be passed to - * the $() function to specify a DOM structure. This structure may be nested - * several levels deep, but should contain only one inmost element. The - * structure will be wrapped around all of the elements in the set of matched - * elements, as a single group. - * - * @category Manipulation - * @example <caption>With markup passed to `wrapAll`</caption> - * - * ```js - * const $ = cheerio.load( - * '<div class="container"><div class="inner">First</div><div class="inner">Second</div></div>', - * ); - * $('.inner').wrapAll("<div class='new'></div>"); - * - * //=> <div class="container"> - * // <div class='new'> - * // <div class="inner">First</div> - * // <div class="inner">Second</div> - * // </div> - * // </div> - * ``` - * - * @example <caption>With an existing cheerio instance</caption> - * - * ```js - * const $ = cheerio.load( - * '<span>Span 1</span><strong>Strong</strong><span>Span 2</span>', - * ); - * const wrap = $('<div><p><em><b></b></em></p></div>'); - * $('span').wrapAll(wrap); - * - * //=> <div> - * // <p> - * // <em> - * // <b> - * // <span>Span 1</span> - * // <span>Span 2</span> - * // </b> - * // </em> - * // </p> - * // </div> - * // <strong>Strong</strong> - * ``` - * - * @param wrapper - The DOM structure to wrap around all matched elements in the - * selection. - * @returns The instance itself. - * @see {@link https://api.jquery.com/wrapAll/} - */ -export declare function wrapAll<T extends AnyNode>(this: Cheerio<T>, wrapper: AcceptedElems<T>): Cheerio<T>; -/** - * Insert content next to each element in the set of matched elements. - * - * @category Manipulation - * @example - * - * ```js - * $('.apple').after('<li class="plum">Plum</li>'); - * $.html(); - * //=> <ul id="fruits"> - * // <li class="apple">Apple</li> - * // <li class="plum">Plum</li> - * // <li class="orange">Orange</li> - * // <li class="pear">Pear</li> - * // </ul> - * ``` - * - * @param elems - HTML string, DOM element, array of DOM elements or Cheerio to - * insert after each element in the set of matched elements. - * @returns The instance itself. - * @see {@link https://api.jquery.com/after/} - */ -export declare function after<T extends AnyNode>(this: Cheerio<T>, ...elems: [(this: AnyNode, i: number, html: string) => BasicAcceptedElems<AnyNode>] | BasicAcceptedElems<AnyNode>[]): Cheerio<T>; -/** - * Insert every element in the set of matched elements after the target. - * - * @category Manipulation - * @example - * - * ```js - * $('<li class="plum">Plum</li>').insertAfter('.apple'); - * $.html(); - * //=> <ul id="fruits"> - * // <li class="apple">Apple</li> - * // <li class="plum">Plum</li> - * // <li class="orange">Orange</li> - * // <li class="pear">Pear</li> - * // </ul> - * ``` - * - * @param target - Element to insert elements after. - * @returns The set of newly inserted elements. - * @see {@link https://api.jquery.com/insertAfter/} - */ -export declare function insertAfter<T extends AnyNode>(this: Cheerio<T>, target: BasicAcceptedElems<AnyNode>): Cheerio<T>; -/** - * Insert content previous to each element in the set of matched elements. - * - * @category Manipulation - * @example - * - * ```js - * $('.apple').before('<li class="plum">Plum</li>'); - * $.html(); - * //=> <ul id="fruits"> - * // <li class="plum">Plum</li> - * // <li class="apple">Apple</li> - * // <li class="orange">Orange</li> - * // <li class="pear">Pear</li> - * // </ul> - * ``` - * - * @param elems - HTML string, DOM element, array of DOM elements or Cheerio to - * insert before each element in the set of matched elements. - * @returns The instance itself. - * @see {@link https://api.jquery.com/before/} - */ -export declare function before<T extends AnyNode>(this: Cheerio<T>, ...elems: [(this: AnyNode, i: number, html: string) => BasicAcceptedElems<AnyNode>] | BasicAcceptedElems<AnyNode>[]): Cheerio<T>; -/** - * Insert every element in the set of matched elements before the target. - * - * @category Manipulation - * @example - * - * ```js - * $('<li class="plum">Plum</li>').insertBefore('.apple'); - * $.html(); - * //=> <ul id="fruits"> - * // <li class="plum">Plum</li> - * // <li class="apple">Apple</li> - * // <li class="orange">Orange</li> - * // <li class="pear">Pear</li> - * // </ul> - * ``` - * - * @param target - Element to insert elements before. - * @returns The set of newly inserted elements. - * @see {@link https://api.jquery.com/insertBefore/} - */ -export declare function insertBefore<T extends AnyNode>(this: Cheerio<T>, target: BasicAcceptedElems<AnyNode>): Cheerio<T>; -/** - * Removes the set of matched elements from the DOM and all their children. - * `selector` filters the set of matched elements to be removed. - * - * @category Manipulation - * @example - * - * ```js - * $('.pear').remove(); - * $.html(); - * //=> <ul id="fruits"> - * // <li class="apple">Apple</li> - * // <li class="orange">Orange</li> - * // </ul> - * ``` - * - * @param selector - Optional selector for elements to remove. - * @returns The instance itself. - * @see {@link https://api.jquery.com/remove/} - */ -export declare function remove<T extends AnyNode>(this: Cheerio<T>, selector?: string): Cheerio<T>; -/** - * Replaces matched elements with `content`. - * - * @category Manipulation - * @example - * - * ```js - * const plum = $('<li class="plum">Plum</li>'); - * $('.pear').replaceWith(plum); - * $.html(); - * //=> <ul id="fruits"> - * // <li class="apple">Apple</li> - * // <li class="orange">Orange</li> - * // <li class="plum">Plum</li> - * // </ul> - * ``` - * - * @param content - Replacement for matched elements. - * @returns The instance itself. - * @see {@link https://api.jquery.com/replaceWith/} - */ -export declare function replaceWith<T extends AnyNode>(this: Cheerio<T>, content: AcceptedElems<AnyNode>): Cheerio<T>; -/** - * Removes all children from each item in the selection. Text nodes and comment - * nodes are left as is. - * - * @category Manipulation - * @example - * - * ```js - * $('ul').empty(); - * $.html(); - * //=> <ul id="fruits"></ul> - * ``` - * - * @returns The instance itself. - * @see {@link https://api.jquery.com/empty/} - */ -export declare function empty<T extends AnyNode>(this: Cheerio<T>): Cheerio<T>; -/** - * Gets an HTML content string from the first selected element. - * - * @category Manipulation - * @example - * - * ```js - * $('.orange').html(); - * //=> Orange - * - * $('#fruits').html('<li class="mango">Mango</li>').html(); - * //=> <li class="mango">Mango</li> - * ``` - * - * @returns The HTML content string. - * @see {@link https://api.jquery.com/html/} - */ -export declare function html<T extends AnyNode>(this: Cheerio<T>): string | null; -/** - * Replaces each selected element's content with the specified content. - * - * @category Manipulation - * @example - * - * ```js - * $('.orange').html('<li class="mango">Mango</li>').html(); - * //=> <li class="mango">Mango</li> - * ``` - * - * @param str - The content to replace selection's contents with. - * @returns The instance itself. - * @see {@link https://api.jquery.com/html/} - */ -export declare function html<T extends AnyNode>(this: Cheerio<T>, str: string | Cheerio<T>): Cheerio<T>; -/** - * Turns the collection to a string. Alias for `.html()`. - * - * @category Manipulation - * @returns The rendered document. - */ -export declare function toString<T extends AnyNode>(this: Cheerio<T>): string; -/** - * Get the combined text contents of each element in the set of matched - * elements, including their descendants. - * - * @category Manipulation - * @example - * - * ```js - * $('.orange').text(); - * //=> Orange - * - * $('ul').text(); - * //=> Apple - * // Orange - * // Pear - * ``` - * - * @returns The text contents of the collection. - * @see {@link https://api.jquery.com/text/} - */ -export declare function text<T extends AnyNode>(this: Cheerio<T>): string; -/** - * Set the content of each element in the set of matched elements to the - * specified text. - * - * @category Manipulation - * @example - * - * ```js - * $('.orange').text('Orange'); - * //=> <div class="orange">Orange</div> - * ``` - * - * @param str - The text to set as the content of each matched element. - * @returns The instance itself. - * @see {@link https://api.jquery.com/text/} - */ -export declare function text<T extends AnyNode>(this: Cheerio<T>, str: string | ((this: AnyNode, i: number, text: string) => string)): Cheerio<T>; -/** - * Clone the cheerio object. - * - * @category Manipulation - * @example - * - * ```js - * const moreFruit = $('#fruits').clone(); - * ``` - * - * @returns The cloned object. - * @see {@link https://api.jquery.com/clone/} - */ -export declare function clone<T extends AnyNode>(this: Cheerio<T>): Cheerio<T>; -//# sourceMappingURL=manipulation.d.ts.map \ No newline at end of file diff --git a/node_modules/cheerio/dist/commonjs/api/manipulation.d.ts.map b/node_modules/cheerio/dist/commonjs/api/manipulation.d.ts.map deleted file mode 100644 index 4e14eba..0000000 --- a/node_modules/cheerio/dist/commonjs/api/manipulation.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"manipulation.d.ts","sourceRoot":"","sources":["../../../src/api/manipulation.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAOL,KAAK,OAAO,EAEb,MAAM,YAAY,CAAC;AAKpB,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,KA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,EAAE,OAAO,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,CAYrE"} \ No newline at end of file diff --git a/node_modules/cheerio/dist/commonjs/api/manipulation.js b/node_modules/cheerio/dist/commonjs/api/manipulation.js deleted file mode 100644 index a14d6e8..0000000 --- a/node_modules/cheerio/dist/commonjs/api/manipulation.js +++ /dev/null @@ -1,848 +0,0 @@ -"use strict"; -/** - * Methods for modifying the DOM structure. - * - * @module cheerio/manipulation - */ -Object.defineProperty(exports, "__esModule", { value: true }); -exports.wrapInner = exports.wrap = exports.prepend = exports.append = void 0; -exports._makeDomArray = _makeDomArray; -exports.appendTo = appendTo; -exports.prependTo = prependTo; -exports.unwrap = unwrap; -exports.wrapAll = wrapAll; -exports.after = after; -exports.insertAfter = insertAfter; -exports.before = before; -exports.insertBefore = insertBefore; -exports.remove = remove; -exports.replaceWith = replaceWith; -exports.empty = empty; -exports.html = html; -exports.toString = toString; -exports.text = text; -exports.clone = clone; -const domhandler_1 = require("domhandler"); -const parse_js_1 = require("../parse.js"); -const static_js_1 = require("../static.js"); -const utils_js_1 = require("../utils.js"); -const domutils_1 = require("domutils"); -/** - * Create an array of nodes, recursing into arrays and parsing strings if - * necessary. - * - * @private - * @category Manipulation - * @param elem - Elements to make an array of. - * @param clone - Optionally clone nodes. - * @returns The array of nodes. - */ -function _makeDomArray(elem, clone) { - if (elem == null) { - return []; - } - if (typeof elem === 'string') { - return this._parse(elem, this.options, false, null).children.slice(0); - } - if ('length' in elem) { - if (elem.length === 1) { - return this._makeDomArray(elem[0], clone); - } - const result = []; - for (let i = 0; i < elem.length; i++) { - const el = elem[i]; - if (typeof el === 'object') { - if (el == null) { - continue; - } - if (!('length' in el)) { - result.push(clone ? (0, domhandler_1.cloneNode)(el, true) : el); - continue; - } - } - result.push(...this._makeDomArray(el, clone)); - } - return result; - } - return [clone ? (0, domhandler_1.cloneNode)(elem, true) : elem]; -} -function _insert(concatenator) { - return function (...elems) { - const lastIdx = this.length - 1; - return (0, utils_js_1.domEach)(this, (el, i) => { - if (!(0, domhandler_1.hasChildren)(el)) - return; - const domSrc = typeof elems[0] === 'function' - ? elems[0].call(el, i, this._render(el.children)) - : elems; - const dom = this._makeDomArray(domSrc, i < lastIdx); - concatenator(dom, el.children, el); - }); - }; -} -/** - * Modify an array in-place, removing some number of elements and adding new - * elements directly following them. - * - * @private - * @category Manipulation - * @param array - Target array to splice. - * @param spliceIdx - Index at which to begin changing the array. - * @param spliceCount - Number of elements to remove from the array. - * @param newElems - Elements to insert into the array. - * @param parent - The parent of the node. - * @returns The spliced array. - */ -function uniqueSplice(array, spliceIdx, spliceCount, newElems, parent) { - var _a, _b; - const spliceArgs = [ - spliceIdx, - spliceCount, - ...newElems, - ]; - const prev = spliceIdx === 0 ? null : array[spliceIdx - 1]; - const next = spliceIdx + spliceCount >= array.length - ? null - : array[spliceIdx + spliceCount]; - /* - * Before splicing in new elements, ensure they do not already appear in the - * current array. - */ - for (let idx = 0; idx < newElems.length; ++idx) { - const node = newElems[idx]; - const oldParent = node.parent; - if (oldParent) { - const oldSiblings = oldParent.children; - const prevIdx = oldSiblings.indexOf(node); - if (prevIdx > -1) { - oldParent.children.splice(prevIdx, 1); - if (parent === oldParent && spliceIdx > prevIdx) { - spliceArgs[0]--; - } - } - } - node.parent = parent; - if (node.prev) { - node.prev.next = (_a = node.next) !== null && _a !== void 0 ? _a : null; - } - if (node.next) { - node.next.prev = (_b = node.prev) !== null && _b !== void 0 ? _b : null; - } - node.prev = idx === 0 ? prev : newElems[idx - 1]; - node.next = idx === newElems.length - 1 ? next : newElems[idx + 1]; - } - if (prev) { - prev.next = newElems[0]; - } - if (next) { - next.prev = newElems[newElems.length - 1]; - } - return array.splice(...spliceArgs); -} -/** - * Insert every element in the set of matched elements to the end of the target. - * - * @category Manipulation - * @example - * - * ```js - * $('<li class="plum">Plum</li>').appendTo('#fruits'); - * $.html(); - * //=> <ul id="fruits"> - * // <li class="apple">Apple</li> - * // <li class="orange">Orange</li> - * // <li class="pear">Pear</li> - * // <li class="plum">Plum</li> - * // </ul> - * ``` - * - * @param target - Element to append elements to. - * @returns The instance itself. - * @see {@link https://api.jquery.com/appendTo/} - */ -function appendTo(target) { - const appendTarget = (0, utils_js_1.isCheerio)(target) ? target : this._make(target); - appendTarget.append(this); - return this; -} -/** - * Insert every element in the set of matched elements to the beginning of the - * target. - * - * @category Manipulation - * @example - * - * ```js - * $('<li class="plum">Plum</li>').prependTo('#fruits'); - * $.html(); - * //=> <ul id="fruits"> - * // <li class="plum">Plum</li> - * // <li class="apple">Apple</li> - * // <li class="orange">Orange</li> - * // <li class="pear">Pear</li> - * // </ul> - * ``` - * - * @param target - Element to prepend elements to. - * @returns The instance itself. - * @see {@link https://api.jquery.com/prependTo/} - */ -function prependTo(target) { - const prependTarget = (0, utils_js_1.isCheerio)(target) ? target : this._make(target); - prependTarget.prepend(this); - return this; -} -/** - * Inserts content as the _last_ child of each of the selected elements. - * - * @category Manipulation - * @example - * - * ```js - * $('ul').append('<li class="plum">Plum</li>'); - * $.html(); - * //=> <ul id="fruits"> - * // <li class="apple">Apple</li> - * // <li class="orange">Orange</li> - * // <li class="pear">Pear</li> - * // <li class="plum">Plum</li> - * // </ul> - * ``` - * - * @see {@link https://api.jquery.com/append/} - */ -exports.append = _insert((dom, children, parent) => { - uniqueSplice(children, children.length, 0, dom, parent); -}); -/** - * Inserts content as the _first_ child of each of the selected elements. - * - * @category Manipulation - * @example - * - * ```js - * $('ul').prepend('<li class="plum">Plum</li>'); - * $.html(); - * //=> <ul id="fruits"> - * // <li class="plum">Plum</li> - * // <li class="apple">Apple</li> - * // <li class="orange">Orange</li> - * // <li class="pear">Pear</li> - * // </ul> - * ``` - * - * @see {@link https://api.jquery.com/prepend/} - */ -exports.prepend = _insert((dom, children, parent) => { - uniqueSplice(children, 0, 0, dom, parent); -}); -function _wrap(insert) { - return function (wrapper) { - const lastIdx = this.length - 1; - const lastParent = this.parents().last(); - for (let i = 0; i < this.length; i++) { - const el = this[i]; - const wrap = typeof wrapper === 'function' - ? wrapper.call(el, i, el) - : typeof wrapper === 'string' && !(0, utils_js_1.isHtml)(wrapper) - ? lastParent.find(wrapper).clone() - : wrapper; - const [wrapperDom] = this._makeDomArray(wrap, i < lastIdx); - if (!wrapperDom || !(0, domhandler_1.hasChildren)(wrapperDom)) - continue; - let elInsertLocation = wrapperDom; - /* - * Find the deepest child. Only consider the first tag child of each node - * (ignore text); stop if no children are found. - */ - let j = 0; - while (j < elInsertLocation.children.length) { - const child = elInsertLocation.children[j]; - if ((0, domhandler_1.isTag)(child)) { - elInsertLocation = child; - j = 0; - } - else { - j++; - } - } - insert(el, elInsertLocation, [wrapperDom]); - } - return this; - }; -} -/** - * The .wrap() function can take any string or object that could be passed to - * the $() factory function to specify a DOM structure. This structure may be - * nested several levels deep, but should contain only one inmost element. A - * copy of this structure will be wrapped around each of the elements in the set - * of matched elements. This method returns the original set of elements for - * chaining purposes. - * - * @category Manipulation - * @example - * - * ```js - * const redFruit = $('<div class="red-fruit"></div>'); - * $('.apple').wrap(redFruit); - * - * //=> <ul id="fruits"> - * // <div class="red-fruit"> - * // <li class="apple">Apple</li> - * // </div> - * // <li class="orange">Orange</li> - * // <li class="plum">Plum</li> - * // </ul> - * - * const healthy = $('<div class="healthy"></div>'); - * $('li').wrap(healthy); - * - * //=> <ul id="fruits"> - * // <div class="healthy"> - * // <li class="apple">Apple</li> - * // </div> - * // <div class="healthy"> - * // <li class="orange">Orange</li> - * // </div> - * // <div class="healthy"> - * // <li class="plum">Plum</li> - * // </div> - * // </ul> - * ``` - * - * @param wrapper - The DOM structure to wrap around each element in the - * selection. - * @see {@link https://api.jquery.com/wrap/} - */ -exports.wrap = _wrap((el, elInsertLocation, wrapperDom) => { - const { parent } = el; - if (!parent) - return; - const siblings = parent.children; - const index = siblings.indexOf(el); - (0, parse_js_1.update)([el], elInsertLocation); - /* - * The previous operation removed the current element from the `siblings` - * array, so the `dom` array can be inserted without removing any - * additional elements. - */ - uniqueSplice(siblings, index, 0, wrapperDom, parent); -}); -/** - * The .wrapInner() function can take any string or object that could be passed - * to the $() factory function to specify a DOM structure. This structure may be - * nested several levels deep, but should contain only one inmost element. The - * structure will be wrapped around the content of each of the elements in the - * set of matched elements. - * - * @category Manipulation - * @example - * - * ```js - * const redFruit = $('<div class="red-fruit"></div>'); - * $('.apple').wrapInner(redFruit); - * - * //=> <ul id="fruits"> - * // <li class="apple"> - * // <div class="red-fruit">Apple</div> - * // </li> - * // <li class="orange">Orange</li> - * // <li class="pear">Pear</li> - * // </ul> - * - * const healthy = $('<div class="healthy"></div>'); - * $('li').wrapInner(healthy); - * - * //=> <ul id="fruits"> - * // <li class="apple"> - * // <div class="healthy">Apple</div> - * // </li> - * // <li class="orange"> - * // <div class="healthy">Orange</div> - * // </li> - * // <li class="pear"> - * // <div class="healthy">Pear</div> - * // </li> - * // </ul> - * ``` - * - * @param wrapper - The DOM structure to wrap around the content of each element - * in the selection. - * @returns The instance itself, for chaining. - * @see {@link https://api.jquery.com/wrapInner/} - */ -exports.wrapInner = _wrap((el, elInsertLocation, wrapperDom) => { - if (!(0, domhandler_1.hasChildren)(el)) - return; - (0, parse_js_1.update)(el.children, elInsertLocation); - (0, parse_js_1.update)(wrapperDom, el); -}); -/** - * The .unwrap() function, removes the parents of the set of matched elements - * from the DOM, leaving the matched elements in their place. - * - * @category Manipulation - * @example <caption>without selector</caption> - * - * ```js - * const $ = cheerio.load( - * '<div id=test>\n <div><p>Hello</p></div>\n <div><p>World</p></div>\n</div>', - * ); - * $('#test p').unwrap(); - * - * //=> <div id=test> - * // <p>Hello</p> - * // <p>World</p> - * // </div> - * ``` - * - * @example <caption>with selector</caption> - * - * ```js - * const $ = cheerio.load( - * '<div id=test>\n <p>Hello</p>\n <b><p>World</p></b>\n</div>', - * ); - * $('#test p').unwrap('b'); - * - * //=> <div id=test> - * // <p>Hello</p> - * // <p>World</p> - * // </div> - * ``` - * - * @param selector - A selector to check the parent element against. If an - * element's parent does not match the selector, the element won't be - * unwrapped. - * @returns The instance itself, for chaining. - * @see {@link https://api.jquery.com/unwrap/} - */ -function unwrap(selector) { - this.parent(selector) - .not('body') - .each((_, el) => { - this._make(el).replaceWith(el.children); - }); - return this; -} -/** - * The .wrapAll() function can take any string or object that could be passed to - * the $() function to specify a DOM structure. This structure may be nested - * several levels deep, but should contain only one inmost element. The - * structure will be wrapped around all of the elements in the set of matched - * elements, as a single group. - * - * @category Manipulation - * @example <caption>With markup passed to `wrapAll`</caption> - * - * ```js - * const $ = cheerio.load( - * '<div class="container"><div class="inner">First</div><div class="inner">Second</div></div>', - * ); - * $('.inner').wrapAll("<div class='new'></div>"); - * - * //=> <div class="container"> - * // <div class='new'> - * // <div class="inner">First</div> - * // <div class="inner">Second</div> - * // </div> - * // </div> - * ``` - * - * @example <caption>With an existing cheerio instance</caption> - * - * ```js - * const $ = cheerio.load( - * '<span>Span 1</span><strong>Strong</strong><span>Span 2</span>', - * ); - * const wrap = $('<div><p><em><b></b></em></p></div>'); - * $('span').wrapAll(wrap); - * - * //=> <div> - * // <p> - * // <em> - * // <b> - * // <span>Span 1</span> - * // <span>Span 2</span> - * // </b> - * // </em> - * // </p> - * // </div> - * // <strong>Strong</strong> - * ``` - * - * @param wrapper - The DOM structure to wrap around all matched elements in the - * selection. - * @returns The instance itself. - * @see {@link https://api.jquery.com/wrapAll/} - */ -function wrapAll(wrapper) { - const el = this[0]; - if (el) { - const wrap = this._make(typeof wrapper === 'function' ? wrapper.call(el, 0, el) : wrapper).insertBefore(el); - // If html is given as wrapper, wrap may contain text elements - let elInsertLocation; - for (let i = 0; i < wrap.length; i++) { - if (wrap[i].type === 'tag') - elInsertLocation = wrap[i]; - } - let j = 0; - /* - * Find the deepest child. Only consider the first tag child of each node - * (ignore text); stop if no children are found. - */ - while (elInsertLocation && j < elInsertLocation.children.length) { - const child = elInsertLocation.children[j]; - if (child.type === 'tag') { - elInsertLocation = child; - j = 0; - } - else { - j++; - } - } - if (elInsertLocation) - this._make(elInsertLocation).append(this); - } - return this; -} -/** - * Insert content next to each element in the set of matched elements. - * - * @category Manipulation - * @example - * - * ```js - * $('.apple').after('<li class="plum">Plum</li>'); - * $.html(); - * //=> <ul id="fruits"> - * // <li class="apple">Apple</li> - * // <li class="plum">Plum</li> - * // <li class="orange">Orange</li> - * // <li class="pear">Pear</li> - * // </ul> - * ``` - * - * @param elems - HTML string, DOM element, array of DOM elements or Cheerio to - * insert after each element in the set of matched elements. - * @returns The instance itself. - * @see {@link https://api.jquery.com/after/} - */ -function after(...elems) { - const lastIdx = this.length - 1; - return (0, utils_js_1.domEach)(this, (el, i) => { - if (!(0, domhandler_1.hasChildren)(el) || !el.parent) { - return; - } - const siblings = el.parent.children; - const index = siblings.indexOf(el); - // If not found, move on - /* istanbul ignore next */ - if (index < 0) - return; - const domSrc = typeof elems[0] === 'function' - ? elems[0].call(el, i, this._render(el.children)) - : elems; - const dom = this._makeDomArray(domSrc, i < lastIdx); - // Add element after `this` element - uniqueSplice(siblings, index + 1, 0, dom, el.parent); - }); -} -/** - * Insert every element in the set of matched elements after the target. - * - * @category Manipulation - * @example - * - * ```js - * $('<li class="plum">Plum</li>').insertAfter('.apple'); - * $.html(); - * //=> <ul id="fruits"> - * // <li class="apple">Apple</li> - * // <li class="plum">Plum</li> - * // <li class="orange">Orange</li> - * // <li class="pear">Pear</li> - * // </ul> - * ``` - * - * @param target - Element to insert elements after. - * @returns The set of newly inserted elements. - * @see {@link https://api.jquery.com/insertAfter/} - */ -function insertAfter(target) { - if (typeof target === 'string') { - target = this._make(target); - } - this.remove(); - const clones = []; - for (const el of this._makeDomArray(target)) { - const clonedSelf = this.clone().toArray(); - const { parent } = el; - if (!parent) { - continue; - } - const siblings = parent.children; - const index = siblings.indexOf(el); - // If not found, move on - /* istanbul ignore next */ - if (index < 0) - continue; - // Add cloned `this` element(s) after target element - uniqueSplice(siblings, index + 1, 0, clonedSelf, parent); - clones.push(...clonedSelf); - } - return this._make(clones); -} -/** - * Insert content previous to each element in the set of matched elements. - * - * @category Manipulation - * @example - * - * ```js - * $('.apple').before('<li class="plum">Plum</li>'); - * $.html(); - * //=> <ul id="fruits"> - * // <li class="plum">Plum</li> - * // <li class="apple">Apple</li> - * // <li class="orange">Orange</li> - * // <li class="pear">Pear</li> - * // </ul> - * ``` - * - * @param elems - HTML string, DOM element, array of DOM elements or Cheerio to - * insert before each element in the set of matched elements. - * @returns The instance itself. - * @see {@link https://api.jquery.com/before/} - */ -function before(...elems) { - const lastIdx = this.length - 1; - return (0, utils_js_1.domEach)(this, (el, i) => { - if (!(0, domhandler_1.hasChildren)(el) || !el.parent) { - return; - } - const siblings = el.parent.children; - const index = siblings.indexOf(el); - // If not found, move on - /* istanbul ignore next */ - if (index < 0) - return; - const domSrc = typeof elems[0] === 'function' - ? elems[0].call(el, i, this._render(el.children)) - : elems; - const dom = this._makeDomArray(domSrc, i < lastIdx); - // Add element before `el` element - uniqueSplice(siblings, index, 0, dom, el.parent); - }); -} -/** - * Insert every element in the set of matched elements before the target. - * - * @category Manipulation - * @example - * - * ```js - * $('<li class="plum">Plum</li>').insertBefore('.apple'); - * $.html(); - * //=> <ul id="fruits"> - * // <li class="plum">Plum</li> - * // <li class="apple">Apple</li> - * // <li class="orange">Orange</li> - * // <li class="pear">Pear</li> - * // </ul> - * ``` - * - * @param target - Element to insert elements before. - * @returns The set of newly inserted elements. - * @see {@link https://api.jquery.com/insertBefore/} - */ -function insertBefore(target) { - const targetArr = this._make(target); - this.remove(); - const clones = []; - (0, utils_js_1.domEach)(targetArr, (el) => { - const clonedSelf = this.clone().toArray(); - const { parent } = el; - if (!parent) { - return; - } - const siblings = parent.children; - const index = siblings.indexOf(el); - // If not found, move on - /* istanbul ignore next */ - if (index < 0) - return; - // Add cloned `this` element(s) after target element - uniqueSplice(siblings, index, 0, clonedSelf, parent); - clones.push(...clonedSelf); - }); - return this._make(clones); -} -/** - * Removes the set of matched elements from the DOM and all their children. - * `selector` filters the set of matched elements to be removed. - * - * @category Manipulation - * @example - * - * ```js - * $('.pear').remove(); - * $.html(); - * //=> <ul id="fruits"> - * // <li class="apple">Apple</li> - * // <li class="orange">Orange</li> - * // </ul> - * ``` - * - * @param selector - Optional selector for elements to remove. - * @returns The instance itself. - * @see {@link https://api.jquery.com/remove/} - */ -function remove(selector) { - // Filter if we have selector - const elems = selector ? this.filter(selector) : this; - (0, utils_js_1.domEach)(elems, (el) => { - (0, domutils_1.removeElement)(el); - el.prev = el.next = el.parent = null; - }); - return this; -} -/** - * Replaces matched elements with `content`. - * - * @category Manipulation - * @example - * - * ```js - * const plum = $('<li class="plum">Plum</li>'); - * $('.pear').replaceWith(plum); - * $.html(); - * //=> <ul id="fruits"> - * // <li class="apple">Apple</li> - * // <li class="orange">Orange</li> - * // <li class="plum">Plum</li> - * // </ul> - * ``` - * - * @param content - Replacement for matched elements. - * @returns The instance itself. - * @see {@link https://api.jquery.com/replaceWith/} - */ -function replaceWith(content) { - return (0, utils_js_1.domEach)(this, (el, i) => { - const { parent } = el; - if (!parent) { - return; - } - const siblings = parent.children; - const cont = typeof content === 'function' ? content.call(el, i, el) : content; - const dom = this._makeDomArray(cont); - /* - * In the case that `dom` contains nodes that already exist in other - * structures, ensure those nodes are properly removed. - */ - (0, parse_js_1.update)(dom, null); - const index = siblings.indexOf(el); - // Completely remove old element - uniqueSplice(siblings, index, 1, dom, parent); - if (!dom.includes(el)) { - el.parent = el.prev = el.next = null; - } - }); -} -/** - * Removes all children from each item in the selection. Text nodes and comment - * nodes are left as is. - * - * @category Manipulation - * @example - * - * ```js - * $('ul').empty(); - * $.html(); - * //=> <ul id="fruits"></ul> - * ``` - * - * @returns The instance itself. - * @see {@link https://api.jquery.com/empty/} - */ -function empty() { - return (0, utils_js_1.domEach)(this, (el) => { - if (!(0, domhandler_1.hasChildren)(el)) - return; - for (const child of el.children) { - child.next = child.prev = child.parent = null; - } - el.children.length = 0; - }); -} -function html(str) { - if (str === undefined) { - const el = this[0]; - if (!el || !(0, domhandler_1.hasChildren)(el)) - return null; - return this._render(el.children); - } - return (0, utils_js_1.domEach)(this, (el) => { - if (!(0, domhandler_1.hasChildren)(el)) - return; - for (const child of el.children) { - child.next = child.prev = child.parent = null; - } - const content = (0, utils_js_1.isCheerio)(str) - ? str.toArray() - : this._parse(`${str}`, this.options, false, el).children; - (0, parse_js_1.update)(content, el); - }); -} -/** - * Turns the collection to a string. Alias for `.html()`. - * - * @category Manipulation - * @returns The rendered document. - */ -function toString() { - return this._render(this); -} -function text(str) { - // If `str` is undefined, act as a "getter" - if (str === undefined) { - return (0, static_js_1.text)(this); - } - if (typeof str === 'function') { - // Function support - return (0, utils_js_1.domEach)(this, (el, i) => this._make(el).text(str.call(el, i, (0, static_js_1.text)([el])))); - } - // Append text node to each selected elements - return (0, utils_js_1.domEach)(this, (el) => { - if (!(0, domhandler_1.hasChildren)(el)) - return; - for (const child of el.children) { - child.next = child.prev = child.parent = null; - } - const textNode = new domhandler_1.Text(`${str}`); - (0, parse_js_1.update)(textNode, el); - }); -} -/** - * Clone the cheerio object. - * - * @category Manipulation - * @example - * - * ```js - * const moreFruit = $('#fruits').clone(); - * ``` - * - * @returns The cloned object. - * @see {@link https://api.jquery.com/clone/} - */ -function clone() { - const clone = Array.prototype.map.call(this.get(), (el) => (0, domhandler_1.cloneNode)(el, true)); - // Add a root node around the cloned nodes - const root = new domhandler_1.Document(clone); - for (const node of clone) { - node.parent = root; - } - return this._make(clone); -} -//# sourceMappingURL=manipulation.js.map \ No newline at end of file diff --git a/node_modules/cheerio/dist/commonjs/api/manipulation.js.map b/node_modules/cheerio/dist/commonjs/api/manipulation.js.map deleted file mode 100644 index 8bdd336..0000000 --- a/node_modules/cheerio/dist/commonjs/api/manipulation.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"manipulation.js","sourceRoot":"","sources":["../../../src/api/manipulation.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;AA6BH,sCAyCC;AAoID,4BASC;AAwBD,8BASC;AAyQD,wBAUC;AAqDD,0BAoCC;AAwB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AAC,CACb,CAAC;IAET,0CAA0C;IAC1C,MAAM,IAAI,GAAG,IAAI,qBAAQ,CAAC,KAAK,CAAC,CAAC;IACjC,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;QACzB,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC;IACrB,CAAC;IAED,OAAO,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;AAC3B,CAAC"} \ No newline at end of file diff --git a/node_modules/cheerio/dist/commonjs/api/traversing.d.ts b/node_modules/cheerio/dist/commonjs/api/traversing.d.ts deleted file mode 100644 index 3961e38..0000000 --- a/node_modules/cheerio/dist/commonjs/api/traversing.d.ts +++ /dev/null @@ -1,657 +0,0 @@ -/** - * Methods for traversing the DOM structure. - * - * @module cheerio/traversing - */ -import { type AnyNode, type Element, type Document } from 'domhandler'; -import type { Cheerio } from '../cheerio.js'; -import type { AcceptedFilters } from '../types.js'; -/** - * Get the descendants of each element in the current set of matched elements, - * filtered by a selector, jQuery object, or element. - * - * @category Traversing - * @example - * - * ```js - * $('#fruits').find('li').length; - * //=> 3 - * $('#fruits').find($('.apple')).length; - * //=> 1 - * ``` - * - * @param selectorOrHaystack - Element to look for. - * @returns The found elements. - * @see {@link https://api.jquery.com/find/} - */ -export declare function find<T extends AnyNode>(this: Cheerio<T>, selectorOrHaystack?: string | Cheerio<Element> | Element): Cheerio<Element>; -/** - * Find elements by a specific selector. - * - * @private - * @category Traversing - * @param selector - Selector to filter by. - * @param limit - Maximum number of elements to match. - * @returns The found elements. - */ -export declare function _findBySelector<T extends AnyNode>(this: Cheerio<T>, selector: string, limit: number): Cheerio<Element>; -/** - * Get the parent of each element in the current set of matched elements, - * optionally filtered by a selector. - * - * @category Traversing - * @example - * - * ```js - * $('.pear').parent().attr('id'); - * //=> fruits - * ``` - * - * @param selector - If specified filter for parent. - * @returns The parents. - * @see {@link https://api.jquery.com/parent/} - */ -export declare const parent: <T extends AnyNode>(this: Cheerio<T>, selector?: AcceptedFilters<Element>) => Cheerio<Element>; -/** - * Get a set of parents filtered by `selector` of each element in the current - * set of match elements. - * - * @category Traversing - * @example - * - * ```js - * $('.orange').parents().length; - * //=> 2 - * $('.orange').parents('#fruits').length; - * //=> 1 - * ``` - * - * @param selector - If specified filter for parents. - * @returns The parents. - * @see {@link https://api.jquery.com/parents/} - */ -export declare const parents: <T extends AnyNode>(this: Cheerio<T>, selector?: AcceptedFilters<Element>) => Cheerio<Element>; -/** - * Get the ancestors of each element in the current set of matched elements, up - * to but not including the element matched by the selector, DOM node, or - * cheerio object. - * - * @category Traversing - * @example - * - * ```js - * $('.orange').parentsUntil('#food').length; - * //=> 1 - * ``` - * - * @param selector - Selector for element to stop at. - * @param filterSelector - Optional filter for parents. - * @returns The parents. - * @see {@link https://api.jquery.com/parentsUntil/} - */ -export declare const parentsUntil: <T extends AnyNode>(this: Cheerio<T>, selector?: AcceptedFilters<Element> | null, filterSelector?: AcceptedFilters<Element>) => Cheerio<Element>; -/** - * For each element in the set, get the first element that matches the selector - * by testing the element itself and traversing up through its ancestors in the - * DOM tree. - * - * @category Traversing - * @example - * - * ```js - * $('.orange').closest(); - * //=> [] - * - * $('.orange').closest('.apple'); - * // => [] - * - * $('.orange').closest('li'); - * //=> [<li class="orange">Orange</li>] - * - * $('.orange').closest('#fruits'); - * //=> [<ul id="fruits"> ... </ul>] - * ``` - * - * @param selector - Selector for the element to find. - * @returns The closest nodes. - * @see {@link https://api.jquery.com/closest/} - */ -export declare function closest<T extends AnyNode>(this: Cheerio<T>, selector?: AcceptedFilters<Element>): Cheerio<AnyNode>; -/** - * Gets the next sibling of each selected element, optionally filtered by a - * selector. - * - * @category Traversing - * @example - * - * ```js - * $('.apple').next().hasClass('orange'); - * //=> true - * ``` - * - * @param selector - If specified filter for sibling. - * @returns The next nodes. - * @see {@link https://api.jquery.com/next/} - */ -export declare const next: <T extends AnyNode>(this: Cheerio<T>, selector?: AcceptedFilters<Element>) => Cheerio<Element>; -/** - * Gets all the following siblings of the each selected element, optionally - * filtered by a selector. - * - * @category Traversing - * @example - * - * ```js - * $('.apple').nextAll(); - * //=> [<li class="orange">Orange</li>, <li class="pear">Pear</li>] - * $('.apple').nextAll('.orange'); - * //=> [<li class="orange">Orange</li>] - * ``` - * - * @param selector - If specified filter for siblings. - * @returns The next nodes. - * @see {@link https://api.jquery.com/nextAll/} - */ -export declare const nextAll: <T extends AnyNode>(this: Cheerio<T>, selector?: AcceptedFilters<Element>) => Cheerio<Element>; -/** - * Gets all the following siblings up to but not including the element matched - * by the selector, optionally filtered by another selector. - * - * @category Traversing - * @example - * - * ```js - * $('.apple').nextUntil('.pear'); - * //=> [<li class="orange">Orange</li>] - * ``` - * - * @param selector - Selector for element to stop at. - * @param filterSelector - If specified filter for siblings. - * @returns The next nodes. - * @see {@link https://api.jquery.com/nextUntil/} - */ -export declare const nextUntil: <T extends AnyNode>(this: Cheerio<T>, selector?: AcceptedFilters<Element> | null, filterSelector?: AcceptedFilters<Element>) => Cheerio<Element>; -/** - * Gets the previous sibling of each selected element optionally filtered by a - * selector. - * - * @category Traversing - * @example - * - * ```js - * $('.orange').prev().hasClass('apple'); - * //=> true - * ``` - * - * @param selector - If specified filter for siblings. - * @returns The previous nodes. - * @see {@link https://api.jquery.com/prev/} - */ -export declare const prev: <T extends AnyNode>(this: Cheerio<T>, selector?: AcceptedFilters<Element>) => Cheerio<Element>; -/** - * Gets all the preceding siblings of each selected element, optionally filtered - * by a selector. - * - * @category Traversing - * @example - * - * ```js - * $('.pear').prevAll(); - * //=> [<li class="orange">Orange</li>, <li class="apple">Apple</li>] - * - * $('.pear').prevAll('.orange'); - * //=> [<li class="orange">Orange</li>] - * ``` - * - * @param selector - If specified filter for siblings. - * @returns The previous nodes. - * @see {@link https://api.jquery.com/prevAll/} - */ -export declare const prevAll: <T extends AnyNode>(this: Cheerio<T>, selector?: AcceptedFilters<Element>) => Cheerio<Element>; -/** - * Gets all the preceding siblings up to but not including the element matched - * by the selector, optionally filtered by another selector. - * - * @category Traversing - * @example - * - * ```js - * $('.pear').prevUntil('.apple'); - * //=> [<li class="orange">Orange</li>] - * ``` - * - * @param selector - Selector for element to stop at. - * @param filterSelector - If specified filter for siblings. - * @returns The previous nodes. - * @see {@link https://api.jquery.com/prevUntil/} - */ -export declare const prevUntil: <T extends AnyNode>(this: Cheerio<T>, selector?: AcceptedFilters<Element> | null, filterSelector?: AcceptedFilters<Element>) => Cheerio<Element>; -/** - * Get the siblings of each element (excluding the element) in the set of - * matched elements, optionally filtered by a selector. - * - * @category Traversing - * @example - * - * ```js - * $('.pear').siblings().length; - * //=> 2 - * - * $('.pear').siblings('.orange').length; - * //=> 1 - * ``` - * - * @param selector - If specified filter for siblings. - * @returns The siblings. - * @see {@link https://api.jquery.com/siblings/} - */ -export declare const siblings: <T extends AnyNode>(this: Cheerio<T>, selector?: AcceptedFilters<Element>) => Cheerio<Element>; -/** - * Gets the element children of each element in the set of matched elements. - * - * @category Traversing - * @example - * - * ```js - * $('#fruits').children().length; - * //=> 3 - * - * $('#fruits').children('.pear').text(); - * //=> Pear - * ``` - * - * @param selector - If specified filter for children. - * @returns The children. - * @see {@link https://api.jquery.com/children/} - */ -export declare const children: <T extends AnyNode>(this: Cheerio<T>, selector?: AcceptedFilters<Element>) => Cheerio<Element>; -/** - * Gets the children of each element in the set of matched elements, including - * text and comment nodes. - * - * @category Traversing - * @example - * - * ```js - * $('#fruits').contents().length; - * //=> 3 - * ``` - * - * @returns The children. - * @see {@link https://api.jquery.com/contents/} - */ -export declare function contents<T extends AnyNode>(this: Cheerio<T>): Cheerio<AnyNode>; -/** - * Iterates over a cheerio object, executing a function for each matched - * element. When the callback is fired, the function is fired in the context of - * the DOM element, so `this` refers to the current element, which is equivalent - * to the function parameter `element`. To break out of the `each` loop early, - * return with `false`. - * - * @category Traversing - * @example - * - * ```js - * const fruits = []; - * - * $('li').each(function (i, elem) { - * fruits[i] = $(this).text(); - * }); - * - * fruits.join(', '); - * //=> Apple, Orange, Pear - * ``` - * - * @param fn - Function to execute. - * @returns The instance itself, useful for chaining. - * @see {@link https://api.jquery.com/each/} - */ -export declare function each<T>(this: Cheerio<T>, fn: (this: T, i: number, el: T) => void | boolean): Cheerio<T>; -/** - * Pass each element in the current matched set through a function, producing a - * new Cheerio object containing the return values. The function can return an - * individual data item or an array of data items to be inserted into the - * resulting set. If an array is returned, the elements inside the array are - * inserted into the set. If the function returns null or undefined, no element - * will be inserted. - * - * @category Traversing - * @example - * - * ```js - * $('li') - * .map(function (i, el) { - * // this === el - * return $(this).text(); - * }) - * .toArray() - * .join(' '); - * //=> "apple orange pear" - * ``` - * - * @param fn - Function to execute. - * @returns The mapped elements, wrapped in a Cheerio collection. - * @see {@link https://api.jquery.com/map/} - */ -export declare function map<T, M>(this: Cheerio<T>, fn: (this: T, i: number, el: T) => M[] | M | null | undefined): Cheerio<M>; -/** - * Iterates over a cheerio object, reducing the set of selector elements to - * those that match the selector or pass the function's test. - * - * This is the definition for using type guards; have a look below for other - * ways to invoke this method. The function is executed in the context of the - * selected element, so `this` refers to the current element. - * - * @category Traversing - * @example <caption>Function</caption> - * - * ```js - * $('li') - * .filter(function (i, el) { - * // this === el - * return $(this).attr('class') === 'orange'; - * }) - * .attr('class'); //=> orange - * ``` - * - * @param match - Value to look for, following the rules above. - * @returns The filtered collection. - * @see {@link https://api.jquery.com/filter/} - */ -export declare function filter<T, S extends T>(this: Cheerio<T>, match: (this: T, index: number, value: T) => value is S): Cheerio<S>; -/** - * Iterates over a cheerio object, reducing the set of selector elements to - * those that match the selector or pass the function's test. - * - * - When a Cheerio selection is specified, return only the elements contained in - * that selection. - * - When an element is specified, return only that element (if it is contained in - * the original selection). - * - If using the function method, the function is executed in the context of the - * selected element, so `this` refers to the current element. - * - * @category Traversing - * @example <caption>Selector</caption> - * - * ```js - * $('li').filter('.orange').attr('class'); - * //=> orange - * ``` - * - * @example <caption>Function</caption> - * - * ```js - * $('li') - * .filter(function (i, el) { - * // this === el - * return $(this).attr('class') === 'orange'; - * }) - * .attr('class'); //=> orange - * ``` - * - * @param match - Value to look for, following the rules above. See - * {@link AcceptedFilters}. - * @returns The filtered collection. - * @see {@link https://api.jquery.com/filter/} - */ -export declare function filter<T, S extends AcceptedFilters<T>>(this: Cheerio<T>, match: S): Cheerio<S extends string ? Element : T>; -export declare function filterArray<T>(nodes: T[], match: AcceptedFilters<T>, xmlMode?: boolean, root?: Document): Element[] | T[]; -/** - * Checks the current list of elements and returns `true` if _any_ of the - * elements match the selector. If using an element or Cheerio selection, - * returns `true` if _any_ of the elements match. If using a predicate function, - * the function is executed in the context of the selected element, so `this` - * refers to the current element. - * - * @category Traversing - * @param selector - Selector for the selection. - * @returns Whether or not the selector matches an element of the instance. - * @see {@link https://api.jquery.com/is/} - */ -export declare function is<T>(this: Cheerio<T>, selector?: AcceptedFilters<T>): boolean; -/** - * Remove elements from the set of matched elements. Given a Cheerio object that - * represents a set of DOM elements, the `.not()` method constructs a new - * Cheerio object from a subset of the matching elements. The supplied selector - * is tested against each element; the elements that don't match the selector - * will be included in the result. - * - * The `.not()` method can take a function as its argument in the same way that - * `.filter()` does. Elements for which the function returns `true` are excluded - * from the filtered set; all other elements are included. - * - * @category Traversing - * @example <caption>Selector</caption> - * - * ```js - * $('li').not('.apple').length; - * //=> 2 - * ``` - * - * @example <caption>Function</caption> - * - * ```js - * $('li').not(function (i, el) { - * // this === el - * return $(this).attr('class') === 'orange'; - * }).length; //=> 2 - * ``` - * - * @param match - Value to look for, following the rules above. - * @returns The filtered collection. - * @see {@link https://api.jquery.com/not/} - */ -export declare function not<T extends AnyNode>(this: Cheerio<T>, match: AcceptedFilters<T>): Cheerio<T>; -/** - * Filters the set of matched elements to only those which have the given DOM - * element as a descendant or which have a descendant that matches the given - * selector. Equivalent to `.filter(':has(selector)')`. - * - * @category Traversing - * @example <caption>Selector</caption> - * - * ```js - * $('ul').has('.pear').attr('id'); - * //=> fruits - * ``` - * - * @example <caption>Element</caption> - * - * ```js - * $('ul').has($('.pear')[0]).attr('id'); - * //=> fruits - * ``` - * - * @param selectorOrHaystack - Element to look for. - * @returns The filtered collection. - * @see {@link https://api.jquery.com/has/} - */ -export declare function has(this: Cheerio<AnyNode | Element>, selectorOrHaystack: string | Cheerio<Element> | Element): Cheerio<AnyNode | Element>; -/** - * Will select the first element of a cheerio object. - * - * @category Traversing - * @example - * - * ```js - * $('#fruits').children().first().text(); - * //=> Apple - * ``` - * - * @returns The first element. - * @see {@link https://api.jquery.com/first/} - */ -export declare function first<T extends AnyNode>(this: Cheerio<T>): Cheerio<T>; -/** - * Will select the last element of a cheerio object. - * - * @category Traversing - * @example - * - * ```js - * $('#fruits').children().last().text(); - * //=> Pear - * ``` - * - * @returns The last element. - * @see {@link https://api.jquery.com/last/} - */ -export declare function last<T>(this: Cheerio<T>): Cheerio<T>; -/** - * Reduce the set of matched elements to the one at the specified index. Use - * `.eq(-i)` to count backwards from the last selected element. - * - * @category Traversing - * @example - * - * ```js - * $('li').eq(0).text(); - * //=> Apple - * - * $('li').eq(-1).text(); - * //=> Pear - * ``` - * - * @param i - Index of the element to select. - * @returns The element at the `i`th position. - * @see {@link https://api.jquery.com/eq/} - */ -export declare function eq<T>(this: Cheerio<T>, i: number): Cheerio<T>; -/** - * Retrieve one of the elements matched by the Cheerio object, at the `i`th - * position. - * - * @category Traversing - * @example - * - * ```js - * $('li').get(0).tagName; - * //=> li - * ``` - * - * @param i - Element to retrieve. - * @returns The element at the `i`th position. - * @see {@link https://api.jquery.com/get/} - */ -export declare function get<T>(this: Cheerio<T>, i: number): T | undefined; -/** - * Retrieve all elements matched by the Cheerio object, as an array. - * - * @category Traversing - * @example - * - * ```js - * $('li').get().length; - * //=> 3 - * ``` - * - * @returns All elements matched by the Cheerio object. - * @see {@link https://api.jquery.com/get/} - */ -export declare function get<T>(this: Cheerio<T>): T[]; -/** - * Retrieve all the DOM elements contained in the jQuery set as an array. - * - * @example - * - * ```js - * $('li').toArray(); - * //=> [ {...}, {...}, {...} ] - * ``` - * - * @returns The contained items. - */ -export declare function toArray<T>(this: Cheerio<T>): T[]; -/** - * Search for a given element from among the matched elements. - * - * @category Traversing - * @example - * - * ```js - * $('.pear').index(); - * //=> 2 $('.orange').index('li'); - * //=> 1 - * $('.apple').index($('#fruit, li')); - * //=> 1 - * ``` - * - * @param selectorOrNeedle - Element to look for. - * @returns The index of the element. - * @see {@link https://api.jquery.com/index/} - */ -export declare function index<T extends AnyNode>(this: Cheerio<T>, selectorOrNeedle?: string | Cheerio<AnyNode> | AnyNode): number; -/** - * Gets the elements matching the specified range (0-based position). - * - * @category Traversing - * @example - * - * ```js - * $('li').slice(1).eq(0).text(); - * //=> 'Orange' - * - * $('li').slice(1, 2).length; - * //=> 1 - * ``` - * - * @param start - A position at which the elements begin to be selected. If - * negative, it indicates an offset from the end of the set. - * @param end - A position at which the elements stop being selected. If - * negative, it indicates an offset from the end of the set. If omitted, the - * range continues until the end of the set. - * @returns The elements matching the specified range. - * @see {@link https://api.jquery.com/slice/} - */ -export declare function slice<T>(this: Cheerio<T>, start?: number, end?: number): Cheerio<T>; -/** - * End the most recent filtering operation in the current chain and return the - * set of matched elements to its previous state. - * - * @category Traversing - * @example - * - * ```js - * $('li').eq(0).end().length; - * //=> 3 - * ``` - * - * @returns The previous state of the set of matched elements. - * @see {@link https://api.jquery.com/end/} - */ -export declare function end<T>(this: Cheerio<T>): Cheerio<AnyNode>; -/** - * Add elements to the set of matched elements. - * - * @category Traversing - * @example - * - * ```js - * $('.apple').add('.orange').length; - * //=> 2 - * ``` - * - * @param other - Elements to add. - * @param context - Optionally the context of the new selection. - * @returns The combined set. - * @see {@link https://api.jquery.com/add/} - */ -export declare function add<S extends AnyNode, T extends AnyNode>(this: Cheerio<T>, other: string | Cheerio<S> | S | S[], context?: Cheerio<S> | string): Cheerio<S | T>; -/** - * Add the previous set of elements on the stack to the current set, optionally - * filtered by a selector. - * - * @category Traversing - * @example - * - * ```js - * $('li').eq(0).addBack('.orange').length; - * //=> 2 - * ``` - * - * @param selector - Selector for the elements to add. - * @returns The combined set. - * @see {@link https://api.jquery.com/addBack/} - */ -export declare function addBack<T extends AnyNode>(this: Cheerio<T>, selector?: string): Cheerio<AnyNode>; -//# sourceMappingURL=traversing.d.ts.map \ No newline at end of file diff --git a/node_modules/cheerio/dist/commonjs/api/traversing.d.ts.map b/node_modules/cheerio/dist/commonjs/api/traversing.d.ts.map deleted file mode 100644 index 15411d1..0000000 --- a/node_modules/cheerio/dist/commonjs/api/traversing.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"traversing.d.ts","sourceRoot":"","sources":["../../../src/api/traversing.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAEL,KAAK,OAAO,EACZ,KAAK,OAAO,EAGZ,KAAK,QAAQ,EACd,MAAM,YAAY,CAAC;AACpB,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAW7C,OAAO,KAAK,EAAkB,eAAe,EAAE,MAAM,aAAa,CAAC;AAGnE;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,IAAI,CAAC,CAAC,SAAS,OAAO,EACpC,IAAI,EAAE,OAAO,CAAC,CAAC,CAAC,EAChB,kBAAkB,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,GAAG,OAAO,GACvD,OAAO,CAAC,OAAO,CAAC,CAkBlB;AAED;;;;;;;;GAQG;AACH,wBAAgB,eAAe,CAAC,CAAC,SAAS,OAAO,EAC/C,IAAI,EAAE,OAAO,CAAC,CAAC,CAAC,EAChB,QAAQ,EAAE,MAAM,EAChB,KAAK,EAAE,MAAM,GACZ,OAAO,CAAC,OAAO,CAAC,CAoBlB;AA8HD;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,MAAM,EAAE,CAAC,CAAC,SAAS,OAAO,EACrC,IAAI,EAAE,OAAO,CAAC,CAAC,CAAC,EAChB,QAAQ,CAAC,EAAE,eAAe,CAAC,OAAO,CAAC,KAChC,OAAO,CAAC,OAAO,CAGnB,CAAC;AAEF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,CAAC,EAChB,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,EACpC,OAAO,CAAC,EAAE,OAAO,CAAC,CAAC,CAAC,GAAG,MAAM,GAC5B,OAAO,CAAC,CAAC,GAAG,CAAC,CAAC,CAIhB;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,OAAO,CAAC,CAAC,SAAS,OAAO,EACvC,IAAI,EAAE,OAAO,CAAC,CAAC,CAAC,EAChB,QAAQ,CAAC,EAAE,MAAM,GAChB,OAAO,CAAC,OAAO,CAAC,CAIlB"} \ No newline at end of file diff --git a/node_modules/cheerio/dist/commonjs/api/traversing.js b/node_modules/cheerio/dist/commonjs/api/traversing.js deleted file mode 100644 index 773ece6..0000000 --- a/node_modules/cheerio/dist/commonjs/api/traversing.js +++ /dev/null @@ -1,900 +0,0 @@ -"use strict"; -/** - * Methods for traversing the DOM structure. - * - * @module cheerio/traversing - */ -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 __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}); -var __importStar = (this && this.__importStar) || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.children = exports.siblings = exports.prevUntil = exports.prevAll = exports.prev = exports.nextUntil = exports.nextAll = exports.next = exports.parentsUntil = exports.parents = exports.parent = void 0; -exports.find = find; -exports._findBySelector = _findBySelector; -exports.closest = closest; -exports.contents = contents; -exports.each = each; -exports.map = map; -exports.filter = filter; -exports.filterArray = filterArray; -exports.is = is; -exports.not = not; -exports.has = has; -exports.first = first; -exports.last = last; -exports.eq = eq; -exports.get = get; -exports.toArray = toArray; -exports.index = index; -exports.slice = slice; -exports.end = end; -exports.add = add; -exports.addBack = addBack; -const domhandler_1 = require("domhandler"); -const select = __importStar(require("cheerio-select")); -const utils_js_1 = require("../utils.js"); -const static_js_1 = require("../static.js"); -const domutils_1 = require("domutils"); -const reSiblingSelector = /^\s*[+~]/; -/** - * Get the descendants of each element in the current set of matched elements, - * filtered by a selector, jQuery object, or element. - * - * @category Traversing - * @example - * - * ```js - * $('#fruits').find('li').length; - * //=> 3 - * $('#fruits').find($('.apple')).length; - * //=> 1 - * ``` - * - * @param selectorOrHaystack - Element to look for. - * @returns The found elements. - * @see {@link https://api.jquery.com/find/} - */ -function find(selectorOrHaystack) { - if (!selectorOrHaystack) { - return this._make([]); - } - if (typeof selectorOrHaystack !== 'string') { - const haystack = (0, utils_js_1.isCheerio)(selectorOrHaystack) - ? selectorOrHaystack.toArray() - : [selectorOrHaystack]; - const context = this.toArray(); - return this._make(haystack.filter((elem) => context.some((node) => (0, static_js_1.contains)(node, elem)))); - } - return this._findBySelector(selectorOrHaystack, Number.POSITIVE_INFINITY); -} -/** - * Find elements by a specific selector. - * - * @private - * @category Traversing - * @param selector - Selector to filter by. - * @param limit - Maximum number of elements to match. - * @returns The found elements. - */ -function _findBySelector(selector, limit) { - var _a; - const context = this.toArray(); - const elems = reSiblingSelector.test(selector) - ? context - : this.children().toArray(); - const options = { - context, - root: (_a = this._root) === null || _a === void 0 ? void 0 : _a[0], - // Pass options that are recognized by `cheerio-select` - xmlMode: this.options.xmlMode, - lowerCaseTags: this.options.lowerCaseTags, - lowerCaseAttributeNames: this.options.lowerCaseAttributeNames, - pseudos: this.options.pseudos, - quirksMode: this.options.quirksMode, - }; - return this._make(select.select(selector, elems, options, limit)); -} -/** - * Creates a matcher, using a particular mapping function. Matchers provide a - * function that finds elements using a generating function, supporting - * filtering. - * - * @private - * @param matchMap - Mapping function. - * @returns - Function for wrapping generating functions. - */ -function _getMatcher(matchMap) { - return function (fn, ...postFns) { - return function (selector) { - var _a; - let matched = matchMap(fn, this); - if (selector) { - matched = filterArray(matched, selector, this.options.xmlMode, (_a = this._root) === null || _a === void 0 ? void 0 : _a[0]); - } - return this._make( - // Post processing is only necessary if there is more than one element. - this.length > 1 && matched.length > 1 - ? postFns.reduce((elems, fn) => fn(elems), matched) - : matched); - }; - }; -} -/** Matcher that adds multiple elements for each entry in the input. */ -const _matcher = _getMatcher((fn, elems) => { - let ret = []; - for (let i = 0; i < elems.length; i++) { - const value = fn(elems[i]); - if (value.length > 0) - ret = ret.concat(value); - } - return ret; -}); -/** Matcher that adds at most one element for each entry in the input. */ -const _singleMatcher = _getMatcher((fn, elems) => { - const ret = []; - for (let i = 0; i < elems.length; i++) { - const value = fn(elems[i]); - if (value !== null) { - ret.push(value); - } - } - return ret; -}); -/** - * Matcher that supports traversing until a condition is met. - * - * @param nextElem - Function that returns the next element. - * @param postFns - Post processing functions. - * @returns A function usable for `*Until` methods. - */ -function _matchUntil(nextElem, ...postFns) { - // We use a variable here that is used from within the matcher. - let matches = null; - const innerMatcher = _getMatcher((nextElem, elems) => { - const matched = []; - (0, utils_js_1.domEach)(elems, (elem) => { - for (let next; (next = nextElem(elem)); elem = next) { - // FIXME: `matched` might contain duplicates here and the index is too large. - if (matches === null || matches === void 0 ? void 0 : matches(next, matched.length)) - break; - matched.push(next); - } - }); - return matched; - })(nextElem, ...postFns); - return function (selector, filterSelector) { - // Override `matches` variable with the new target. - matches = - typeof selector === 'string' - ? (elem) => select.is(elem, selector, this.options) - : selector - ? getFilterFn(selector) - : null; - const ret = innerMatcher.call(this, filterSelector); - // Set `matches` to `null`, so we don't waste memory. - matches = null; - return ret; - }; -} -function _removeDuplicates(elems) { - return elems.length > 1 ? Array.from(new Set(elems)) : elems; -} -/** - * Get the parent of each element in the current set of matched elements, - * optionally filtered by a selector. - * - * @category Traversing - * @example - * - * ```js - * $('.pear').parent().attr('id'); - * //=> fruits - * ``` - * - * @param selector - If specified filter for parent. - * @returns The parents. - * @see {@link https://api.jquery.com/parent/} - */ -exports.parent = _singleMatcher(({ parent }) => (parent && !(0, domhandler_1.isDocument)(parent) ? parent : null), _removeDuplicates); -/** - * Get a set of parents filtered by `selector` of each element in the current - * set of match elements. - * - * @category Traversing - * @example - * - * ```js - * $('.orange').parents().length; - * //=> 2 - * $('.orange').parents('#fruits').length; - * //=> 1 - * ``` - * - * @param selector - If specified filter for parents. - * @returns The parents. - * @see {@link https://api.jquery.com/parents/} - */ -exports.parents = _matcher((elem) => { - const matched = []; - while (elem.parent && !(0, domhandler_1.isDocument)(elem.parent)) { - matched.push(elem.parent); - elem = elem.parent; - } - return matched; -}, domutils_1.uniqueSort, (elems) => elems.reverse()); -/** - * Get the ancestors of each element in the current set of matched elements, up - * to but not including the element matched by the selector, DOM node, or - * cheerio object. - * - * @category Traversing - * @example - * - * ```js - * $('.orange').parentsUntil('#food').length; - * //=> 1 - * ``` - * - * @param selector - Selector for element to stop at. - * @param filterSelector - Optional filter for parents. - * @returns The parents. - * @see {@link https://api.jquery.com/parentsUntil/} - */ -exports.parentsUntil = _matchUntil(({ parent }) => (parent && !(0, domhandler_1.isDocument)(parent) ? parent : null), domutils_1.uniqueSort, (elems) => elems.reverse()); -/** - * For each element in the set, get the first element that matches the selector - * by testing the element itself and traversing up through its ancestors in the - * DOM tree. - * - * @category Traversing - * @example - * - * ```js - * $('.orange').closest(); - * //=> [] - * - * $('.orange').closest('.apple'); - * // => [] - * - * $('.orange').closest('li'); - * //=> [<li class="orange">Orange</li>] - * - * $('.orange').closest('#fruits'); - * //=> [<ul id="fruits"> ... </ul>] - * ``` - * - * @param selector - Selector for the element to find. - * @returns The closest nodes. - * @see {@link https://api.jquery.com/closest/} - */ -function closest(selector) { - var _a; - const set = []; - if (!selector) { - return this._make(set); - } - const selectOpts = { - xmlMode: this.options.xmlMode, - root: (_a = this._root) === null || _a === void 0 ? void 0 : _a[0], - }; - const selectFn = typeof selector === 'string' - ? (elem) => select.is(elem, selector, selectOpts) - : getFilterFn(selector); - (0, utils_js_1.domEach)(this, (elem) => { - if (elem && !(0, domhandler_1.isDocument)(elem) && !(0, domhandler_1.isTag)(elem)) { - elem = elem.parent; - } - while (elem && (0, domhandler_1.isTag)(elem)) { - if (selectFn(elem, 0)) { - // Do not add duplicate elements to the set - if (!set.includes(elem)) { - set.push(elem); - } - break; - } - elem = elem.parent; - } - }); - return this._make(set); -} -/** - * Gets the next sibling of each selected element, optionally filtered by a - * selector. - * - * @category Traversing - * @example - * - * ```js - * $('.apple').next().hasClass('orange'); - * //=> true - * ``` - * - * @param selector - If specified filter for sibling. - * @returns The next nodes. - * @see {@link https://api.jquery.com/next/} - */ -exports.next = _singleMatcher((elem) => (0, domutils_1.nextElementSibling)(elem)); -/** - * Gets all the following siblings of the each selected element, optionally - * filtered by a selector. - * - * @category Traversing - * @example - * - * ```js - * $('.apple').nextAll(); - * //=> [<li class="orange">Orange</li>, <li class="pear">Pear</li>] - * $('.apple').nextAll('.orange'); - * //=> [<li class="orange">Orange</li>] - * ``` - * - * @param selector - If specified filter for siblings. - * @returns The next nodes. - * @see {@link https://api.jquery.com/nextAll/} - */ -exports.nextAll = _matcher((elem) => { - const matched = []; - while (elem.next) { - elem = elem.next; - if ((0, domhandler_1.isTag)(elem)) - matched.push(elem); - } - return matched; -}, _removeDuplicates); -/** - * Gets all the following siblings up to but not including the element matched - * by the selector, optionally filtered by another selector. - * - * @category Traversing - * @example - * - * ```js - * $('.apple').nextUntil('.pear'); - * //=> [<li class="orange">Orange</li>] - * ``` - * - * @param selector - Selector for element to stop at. - * @param filterSelector - If specified filter for siblings. - * @returns The next nodes. - * @see {@link https://api.jquery.com/nextUntil/} - */ -exports.nextUntil = _matchUntil((el) => (0, domutils_1.nextElementSibling)(el), _removeDuplicates); -/** - * Gets the previous sibling of each selected element optionally filtered by a - * selector. - * - * @category Traversing - * @example - * - * ```js - * $('.orange').prev().hasClass('apple'); - * //=> true - * ``` - * - * @param selector - If specified filter for siblings. - * @returns The previous nodes. - * @see {@link https://api.jquery.com/prev/} - */ -exports.prev = _singleMatcher((elem) => (0, domutils_1.prevElementSibling)(elem)); -/** - * Gets all the preceding siblings of each selected element, optionally filtered - * by a selector. - * - * @category Traversing - * @example - * - * ```js - * $('.pear').prevAll(); - * //=> [<li class="orange">Orange</li>, <li class="apple">Apple</li>] - * - * $('.pear').prevAll('.orange'); - * //=> [<li class="orange">Orange</li>] - * ``` - * - * @param selector - If specified filter for siblings. - * @returns The previous nodes. - * @see {@link https://api.jquery.com/prevAll/} - */ -exports.prevAll = _matcher((elem) => { - const matched = []; - while (elem.prev) { - elem = elem.prev; - if ((0, domhandler_1.isTag)(elem)) - matched.push(elem); - } - return matched; -}, _removeDuplicates); -/** - * Gets all the preceding siblings up to but not including the element matched - * by the selector, optionally filtered by another selector. - * - * @category Traversing - * @example - * - * ```js - * $('.pear').prevUntil('.apple'); - * //=> [<li class="orange">Orange</li>] - * ``` - * - * @param selector - Selector for element to stop at. - * @param filterSelector - If specified filter for siblings. - * @returns The previous nodes. - * @see {@link https://api.jquery.com/prevUntil/} - */ -exports.prevUntil = _matchUntil((el) => (0, domutils_1.prevElementSibling)(el), _removeDuplicates); -/** - * Get the siblings of each element (excluding the element) in the set of - * matched elements, optionally filtered by a selector. - * - * @category Traversing - * @example - * - * ```js - * $('.pear').siblings().length; - * //=> 2 - * - * $('.pear').siblings('.orange').length; - * //=> 1 - * ``` - * - * @param selector - If specified filter for siblings. - * @returns The siblings. - * @see {@link https://api.jquery.com/siblings/} - */ -exports.siblings = _matcher((elem) => (0, domutils_1.getSiblings)(elem).filter((el) => (0, domhandler_1.isTag)(el) && el !== elem), domutils_1.uniqueSort); -/** - * Gets the element children of each element in the set of matched elements. - * - * @category Traversing - * @example - * - * ```js - * $('#fruits').children().length; - * //=> 3 - * - * $('#fruits').children('.pear').text(); - * //=> Pear - * ``` - * - * @param selector - If specified filter for children. - * @returns The children. - * @see {@link https://api.jquery.com/children/} - */ -exports.children = _matcher((elem) => (0, domutils_1.getChildren)(elem).filter(domhandler_1.isTag), _removeDuplicates); -/** - * Gets the children of each element in the set of matched elements, including - * text and comment nodes. - * - * @category Traversing - * @example - * - * ```js - * $('#fruits').contents().length; - * //=> 3 - * ``` - * - * @returns The children. - * @see {@link https://api.jquery.com/contents/} - */ -function contents() { - const elems = this.toArray().reduce((newElems, elem) => (0, domhandler_1.hasChildren)(elem) ? newElems.concat(elem.children) : newElems, []); - return this._make(elems); -} -/** - * Iterates over a cheerio object, executing a function for each matched - * element. When the callback is fired, the function is fired in the context of - * the DOM element, so `this` refers to the current element, which is equivalent - * to the function parameter `element`. To break out of the `each` loop early, - * return with `false`. - * - * @category Traversing - * @example - * - * ```js - * const fruits = []; - * - * $('li').each(function (i, elem) { - * fruits[i] = $(this).text(); - * }); - * - * fruits.join(', '); - * //=> Apple, Orange, Pear - * ``` - * - * @param fn - Function to execute. - * @returns The instance itself, useful for chaining. - * @see {@link https://api.jquery.com/each/} - */ -function each(fn) { - let i = 0; - const len = this.length; - while (i < len && fn.call(this[i], i, this[i]) !== false) - ++i; - return this; -} -/** - * Pass each element in the current matched set through a function, producing a - * new Cheerio object containing the return values. The function can return an - * individual data item or an array of data items to be inserted into the - * resulting set. If an array is returned, the elements inside the array are - * inserted into the set. If the function returns null or undefined, no element - * will be inserted. - * - * @category Traversing - * @example - * - * ```js - * $('li') - * .map(function (i, el) { - * // this === el - * return $(this).text(); - * }) - * .toArray() - * .join(' '); - * //=> "apple orange pear" - * ``` - * - * @param fn - Function to execute. - * @returns The mapped elements, wrapped in a Cheerio collection. - * @see {@link https://api.jquery.com/map/} - */ -function map(fn) { - let elems = []; - for (let i = 0; i < this.length; i++) { - const el = this[i]; - const val = fn.call(el, i, el); - if (val != null) { - elems = elems.concat(val); - } - } - return this._make(elems); -} -/** - * Creates a function to test if a filter is matched. - * - * @param match - A filter. - * @returns A function that determines if a filter has been matched. - */ -function getFilterFn(match) { - if (typeof match === 'function') { - return (el, i) => match.call(el, i, el); - } - if ((0, utils_js_1.isCheerio)(match)) { - return (el) => Array.prototype.includes.call(match, el); - } - return function (el) { - return match === el; - }; -} -function filter(match) { - var _a; - return this._make(filterArray(this.toArray(), match, this.options.xmlMode, (_a = this._root) === null || _a === void 0 ? void 0 : _a[0])); -} -function filterArray(nodes, match, xmlMode, root) { - return typeof match === 'string' - ? select.filter(match, nodes, { xmlMode, root }) - : nodes.filter(getFilterFn(match)); -} -/** - * Checks the current list of elements and returns `true` if _any_ of the - * elements match the selector. If using an element or Cheerio selection, - * returns `true` if _any_ of the elements match. If using a predicate function, - * the function is executed in the context of the selected element, so `this` - * refers to the current element. - * - * @category Traversing - * @param selector - Selector for the selection. - * @returns Whether or not the selector matches an element of the instance. - * @see {@link https://api.jquery.com/is/} - */ -function is(selector) { - const nodes = this.toArray(); - return typeof selector === 'string' - ? select.some(nodes.filter(domhandler_1.isTag), selector, this.options) - : selector - ? nodes.some(getFilterFn(selector)) - : false; -} -/** - * Remove elements from the set of matched elements. Given a Cheerio object that - * represents a set of DOM elements, the `.not()` method constructs a new - * Cheerio object from a subset of the matching elements. The supplied selector - * is tested against each element; the elements that don't match the selector - * will be included in the result. - * - * The `.not()` method can take a function as its argument in the same way that - * `.filter()` does. Elements for which the function returns `true` are excluded - * from the filtered set; all other elements are included. - * - * @category Traversing - * @example <caption>Selector</caption> - * - * ```js - * $('li').not('.apple').length; - * //=> 2 - * ``` - * - * @example <caption>Function</caption> - * - * ```js - * $('li').not(function (i, el) { - * // this === el - * return $(this).attr('class') === 'orange'; - * }).length; //=> 2 - * ``` - * - * @param match - Value to look for, following the rules above. - * @returns The filtered collection. - * @see {@link https://api.jquery.com/not/} - */ -function not(match) { - let nodes = this.toArray(); - if (typeof match === 'string') { - const matches = new Set(select.filter(match, nodes, this.options)); - nodes = nodes.filter((el) => !matches.has(el)); - } - else { - const filterFn = getFilterFn(match); - nodes = nodes.filter((el, i) => !filterFn(el, i)); - } - return this._make(nodes); -} -/** - * Filters the set of matched elements to only those which have the given DOM - * element as a descendant or which have a descendant that matches the given - * selector. Equivalent to `.filter(':has(selector)')`. - * - * @category Traversing - * @example <caption>Selector</caption> - * - * ```js - * $('ul').has('.pear').attr('id'); - * //=> fruits - * ``` - * - * @example <caption>Element</caption> - * - * ```js - * $('ul').has($('.pear')[0]).attr('id'); - * //=> fruits - * ``` - * - * @param selectorOrHaystack - Element to look for. - * @returns The filtered collection. - * @see {@link https://api.jquery.com/has/} - */ -function has(selectorOrHaystack) { - return this.filter(typeof selectorOrHaystack === 'string' - ? // Using the `:has` selector here short-circuits searches. - `:has(${selectorOrHaystack})` - : (_, el) => this._make(el).find(selectorOrHaystack).length > 0); -} -/** - * Will select the first element of a cheerio object. - * - * @category Traversing - * @example - * - * ```js - * $('#fruits').children().first().text(); - * //=> Apple - * ``` - * - * @returns The first element. - * @see {@link https://api.jquery.com/first/} - */ -function first() { - return this.length > 1 ? this._make(this[0]) : this; -} -/** - * Will select the last element of a cheerio object. - * - * @category Traversing - * @example - * - * ```js - * $('#fruits').children().last().text(); - * //=> Pear - * ``` - * - * @returns The last element. - * @see {@link https://api.jquery.com/last/} - */ -function last() { - return this.length > 0 ? this._make(this[this.length - 1]) : this; -} -/** - * Reduce the set of matched elements to the one at the specified index. Use - * `.eq(-i)` to count backwards from the last selected element. - * - * @category Traversing - * @example - * - * ```js - * $('li').eq(0).text(); - * //=> Apple - * - * $('li').eq(-1).text(); - * //=> Pear - * ``` - * - * @param i - Index of the element to select. - * @returns The element at the `i`th position. - * @see {@link https://api.jquery.com/eq/} - */ -function eq(i) { - var _a; - i = +i; - // Use the first identity optimization if possible - if (i === 0 && this.length <= 1) - return this; - if (i < 0) - i = this.length + i; - return this._make((_a = this[i]) !== null && _a !== void 0 ? _a : []); -} -function get(i) { - if (i == null) { - return this.toArray(); - } - return this[i < 0 ? this.length + i : i]; -} -/** - * Retrieve all the DOM elements contained in the jQuery set as an array. - * - * @example - * - * ```js - * $('li').toArray(); - * //=> [ {...}, {...}, {...} ] - * ``` - * - * @returns The contained items. - */ -function toArray() { - return Array.prototype.slice.call(this); -} -/** - * Search for a given element from among the matched elements. - * - * @category Traversing - * @example - * - * ```js - * $('.pear').index(); - * //=> 2 $('.orange').index('li'); - * //=> 1 - * $('.apple').index($('#fruit, li')); - * //=> 1 - * ``` - * - * @param selectorOrNeedle - Element to look for. - * @returns The index of the element. - * @see {@link https://api.jquery.com/index/} - */ -function index(selectorOrNeedle) { - let $haystack; - let needle; - if (selectorOrNeedle == null) { - $haystack = this.parent().children(); - needle = this[0]; - } - else if (typeof selectorOrNeedle === 'string') { - $haystack = this._make(selectorOrNeedle); - needle = this[0]; - } - else { - // eslint-disable-next-line @typescript-eslint/no-this-alias, unicorn/no-this-assignment - $haystack = this; - needle = (0, utils_js_1.isCheerio)(selectorOrNeedle) - ? selectorOrNeedle[0] - : selectorOrNeedle; - } - return Array.prototype.indexOf.call($haystack, needle); -} -/** - * Gets the elements matching the specified range (0-based position). - * - * @category Traversing - * @example - * - * ```js - * $('li').slice(1).eq(0).text(); - * //=> 'Orange' - * - * $('li').slice(1, 2).length; - * //=> 1 - * ``` - * - * @param start - A position at which the elements begin to be selected. If - * negative, it indicates an offset from the end of the set. - * @param end - A position at which the elements stop being selected. If - * negative, it indicates an offset from the end of the set. If omitted, the - * range continues until the end of the set. - * @returns The elements matching the specified range. - * @see {@link https://api.jquery.com/slice/} - */ -function slice(start, end) { - return this._make(Array.prototype.slice.call(this, start, end)); -} -/** - * End the most recent filtering operation in the current chain and return the - * set of matched elements to its previous state. - * - * @category Traversing - * @example - * - * ```js - * $('li').eq(0).end().length; - * //=> 3 - * ``` - * - * @returns The previous state of the set of matched elements. - * @see {@link https://api.jquery.com/end/} - */ -function end() { - var _a; - return (_a = this.prevObject) !== null && _a !== void 0 ? _a : this._make([]); -} -/** - * Add elements to the set of matched elements. - * - * @category Traversing - * @example - * - * ```js - * $('.apple').add('.orange').length; - * //=> 2 - * ``` - * - * @param other - Elements to add. - * @param context - Optionally the context of the new selection. - * @returns The combined set. - * @see {@link https://api.jquery.com/add/} - */ -function add(other, context) { - const selection = this._make(other, context); - const contents = (0, domutils_1.uniqueSort)([...this.get(), ...selection.get()]); - return this._make(contents); -} -/** - * Add the previous set of elements on the stack to the current set, optionally - * filtered by a selector. - * - * @category Traversing - * @example - * - * ```js - * $('li').eq(0).addBack('.orange').length; - * //=> 2 - * ``` - * - * @param selector - Selector for the elements to add. - * @returns The combined set. - * @see {@link https://api.jquery.com/addBack/} - */ -function addBack(selector) { - return this.prevObject - ? this.add(selector ? this.prevObject.filter(selector) : this.prevObject) - : this; -} -//# sourceMappingURL=traversing.js.map \ No newline at end of file diff --git a/node_modules/cheerio/dist/commonjs/api/traversing.js.map b/node_modules/cheerio/dist/commonjs/api/traversing.js.map deleted file mode 100644 index 725ba7a..0000000 --- a/node_modules/cheerio/dist/commonjs/api/traversing.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"traversing.js","sourceRoot":"","sources":["../../../src/api/traversing.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;;;;;;;;;;;;;;;;;;;;;;;;AA0CH,oBAqBC;AAWD,0CAwBC;AA8OD,0BAqCC;AAkOD,4BASC;AA2BD,oBAQC;AA4BD,kBAaC;AAyFD,wBAOC;AAED,kCASC;AAcD,gBAcC;AAkCD,kBAeC;AA0BD,kBAUC;AAgBD,sBAEC;AAgBD,oBAEC;AAqBD,gBAQC;AAkCD,kBAKC;AAcD,0BAEC;AAoBD,sBAsBC;AAwBD,sBAMC;AAiBD,kBAEC;AAkBD,kBAQC;AAkBD,0BAOC;AA5oCD,2CAOoB;AAEpB,uDAAyC;AACzC,0CAAiD;AACjD,4CAAwC;AACxC,uCAMkB;AAElB,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,mCAAI,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;AAC3C,CAAC;AAED;;;;;;;;;;;;;;;GAeG;AACH,SAAgB,GAAG,CAEjB,KAAoC,EACpC,OAA6B;IAE7B,MAAM,SAAS,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC;IAC7C,MAAM,QAAQ,GAAG,IAAA,qBAAU,EAAC,CAAC,GAAG,IAAI,CAAC,GAAG,EAAE,EAAE,GAAG,SAAS,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC;IACjE,OAAO,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;AAC9B,CAAC;AAED;;;;;;;;;;;;;;;GAeG;AACH,SAAgB,OAAO,CAErB,QAAiB;IAEjB,OAAO,IAAI,CAAC,UAAU;QACpB,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC;QACzE,CAAC,CAAC,IAAI,CAAC;AACX,CAAC"} \ No newline at end of file diff --git a/node_modules/cheerio/dist/commonjs/cheerio.d.ts b/node_modules/cheerio/dist/commonjs/cheerio.d.ts deleted file mode 100644 index 8a39fe6..0000000 --- a/node_modules/cheerio/dist/commonjs/cheerio.d.ts +++ /dev/null @@ -1,85 +0,0 @@ -import type { InternalOptions } from './options.js'; -import type { AnyNode, Document, ParentNode } from 'domhandler'; -import type { BasicAcceptedElems } from './types.js'; -import * as Attributes from './api/attributes.js'; -import * as Traversing from './api/traversing.js'; -import * as Manipulation from './api/manipulation.js'; -import * as Css from './api/css.js'; -import * as Forms from './api/forms.js'; -import * as Extract from './api/extract.js'; -type MethodsType = typeof Attributes & typeof Traversing & typeof Manipulation & typeof Css & typeof Forms & typeof Extract; -/** - * The cheerio class is the central class of the library. It wraps a set of - * elements and provides an API for traversing, modifying, and interacting with - * the set. - * - * Loading a document will return the Cheerio class bound to the root element of - * the document. The class will be instantiated when querying the document (when - * calling `$('selector')`). - * - * @example This is the HTML markup we will be using in all of the API examples: - * - * ```html - * <ul id="fruits"> - * <li class="apple">Apple</li> - * <li class="orange">Orange</li> - * <li class="pear">Pear</li> - * </ul> - * ``` - */ -export declare abstract class Cheerio<T> implements ArrayLike<T> { - length: number; - [index: number]: T; - options: InternalOptions; - /** - * The root of the document. Can be set by using the `root` argument of the - * constructor. - * - * @private - */ - _root: Cheerio<Document> | null; - /** - * Instance of cheerio. Methods are specified in the modules. Usage of this - * constructor is not recommended. Please use `$.load` instead. - * - * @private - * @param elements - The new selection. - * @param root - Sets the root node. - * @param options - Options for the instance. - */ - constructor(elements: ArrayLike<T> | undefined, root: Cheerio<Document> | null, options: InternalOptions); - prevObject: Cheerio<any> | undefined; - /** - * Make a cheerio object. - * - * @private - * @param dom - The contents of the new object. - * @param context - The context of the new object. - * @returns The new cheerio object. - */ - abstract _make<T>(dom: ArrayLike<T> | T | string, context?: BasicAcceptedElems<AnyNode>): Cheerio<T>; - /** - * Parses some content. - * - * @private - * @param content - Content to parse. - * @param options - Options for parsing. - * @param isDocument - Allows parser to be switched to fragment mode. - * @returns A document containing the `content`. - */ - abstract _parse(content: string | Document | AnyNode | AnyNode[] | Buffer, options: InternalOptions, isDocument: boolean, context: ParentNode | null): Document; - /** - * Render an element or a set of elements. - * - * @private - * @param dom - DOM to render. - * @returns The rendered DOM. - */ - abstract _render(dom: AnyNode | ArrayLike<AnyNode>): string; -} -export interface Cheerio<T> extends MethodsType, Iterable<T> { - cheerio: '[cheerio object]'; - splice: typeof Array.prototype.splice; -} -export {}; -//# sourceMappingURL=cheerio.d.ts.map \ No newline at end of file diff --git a/node_modules/cheerio/dist/commonjs/cheerio.d.ts.map b/node_modules/cheerio/dist/commonjs/cheerio.d.ts.map deleted file mode 100644 index b949c21..0000000 --- a/node_modules/cheerio/dist/commonjs/cheerio.d.ts.map +++ /dev/null @@ -1 +0,0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,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,MAAM,EAC9B,OAAO,CAAC,EAAE,kBAAkB,CAAC,OAAO,CAAC,GACpC,OAAO,CAAC,CAAC,CAAC;IAEb;;;;;;;;OAQG;IACH,QAAQ,CAAC,MAAM,CACb,OAAO,EAAE,MAAM,GAAG,QAAQ,GAAG,OAAO,GAAG,OAAO,EAAE,GAAG,MAAM,EACzD,OAAO,EAAE,eAAe,EACxB,UAAU,EAAE,OAAO,EACnB,OAAO,EAAE,UAAU,GAAG,IAAI,GACzB,QAAQ;IAEX;;;;;;OAMG;IACH,QAAQ,CAAC,OAAO,CAAC,GAAG,EAAE,OAAO,GAAG,SAAS,CAAC,OAAO,CAAC,GAAG,MAAM;CAC5D;AAED,MAAM,WAAW,OAAO,CAAC,CAAC,CAAE,SAAQ,WAAW,EAAE,QAAQ,CAAC,CAAC,CAAC;IAC1D,OAAO,EAAE,kBAAkB,CAAC;IAE5B,MAAM,EAAE,OAAO,KAAK,CAAC,SAAS,CAAC,MAAM,CAAC;CACvC"} \ No newline at end of file diff --git a/node_modules/cheerio/dist/commonjs/cheerio.js b/node_modules/cheerio/dist/commonjs/cheerio.js deleted file mode 100644 index deb3ca0..0000000 --- a/node_modules/cheerio/dist/commonjs/cheerio.js +++ /dev/null @@ -1,85 +0,0 @@ -"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 __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}); -var __importStar = (this && this.__importStar) || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.Cheerio = void 0; -const Attributes = __importStar(require("./api/attributes.js")); -const Traversing = __importStar(require("./api/traversing.js")); -const Manipulation = __importStar(require("./api/manipulation.js")); -const Css = __importStar(require("./api/css.js")); -const Forms = __importStar(require("./api/forms.js")); -const Extract = __importStar(require("./api/extract.js")); -/** - * The cheerio class is the central class of the library. It wraps a set of - * elements and provides an API for traversing, modifying, and interacting with - * the set. - * - * Loading a document will return the Cheerio class bound to the root element of - * the document. The class will be instantiated when querying the document (when - * calling `$('selector')`). - * - * @example This is the HTML markup we will be using in all of the API examples: - * - * ```html - * <ul id="fruits"> - * <li class="apple">Apple</li> - * <li class="orange">Orange</li> - * <li class="pear">Pear</li> - * </ul> - * ``` - */ -class Cheerio { - /** - * Instance of cheerio. Methods are specified in the modules. Usage of this - * constructor is not recommended. Please use `$.load` instead. - * - * @private - * @param elements - The new selection. - * @param root - Sets the root node. - * @param options - Options for the instance. - */ - constructor(elements, root, options) { - this.length = 0; - this.options = options; - this._root = root; - if (elements) { - for (let idx = 0; idx < elements.length; idx++) { - this[idx] = elements[idx]; - } - this.length = elements.length; - } - } -} -exports.Cheerio = Cheerio; -/** Set a signature of the object. */ -Cheerio.prototype.cheerio = '[cheerio object]'; -/* - * Make cheerio an array-like object - */ -Cheerio.prototype.splice = Array.prototype.splice; -// Support for (const element of $(...)) iteration: -Cheerio.prototype[Symbol.iterator] = Array.prototype[Symbol.iterator]; -// Plug in the API -Object.assign(Cheerio.prototype, Attributes, Traversing, Manipulation, Css, Forms, Extract); -//# sourceMappingURL=cheerio.js.map \ No newline at end of file diff --git a/node_modules/cheerio/dist/commonjs/cheerio.js.map b/node_modules/cheerio/dist/commonjs/cheerio.js.map deleted file mode 100644 index 4024bd6..0000000 --- a/node_modules/cheerio/dist/commonjs/cheerio.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"cheerio.js","sourceRoot":"","sources":["../../src/cheerio.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAKA,gEAAkD;AAClD,gEAAkD;AAClD,oEAAsD;AACtD,kDAAoC;AACpC,sDAAwC;AACxC,0DAA4C;AAS5C;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAsB,OAAO;IAa3B;;;;;;;;OAQG;IACH,YACE,QAAkC,EAClC,IAA8B,EAC9B,OAAwB;QAxB1B,WAAM,GAAG,CAAC,CAAC;QA0BT,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC;QAElB,IAAI,QAAQ,EAAE,CAAC;YACb,KAAK,IAAI,GAAG,GAAG,CAAC,EAAE,GAAG,GAAG,QAAQ,CAAC,MAAM,EAAE,GAAG,EAAE,EAAE,CAAC;gBAC/C,IAAI,CAAC,GAAG,CAAC,GAAG,QAAQ,CAAC,GAAG,CAAC,CAAC;YAC5B,CAAC;YACD,IAAI,CAAC,MAAM,GAAG,QAAQ,CAAC,MAAM,CAAC;QAChC,CAAC;IACH,CAAC;CAwCF;AA5ED,0BA4EC;AAQD,qCAAqC;AACrC,OAAO,CAAC,SAAS,CAAC,OAAO,GAAG,kBAAkB,CAAC;AAE/C;;GAEG;AACH,OAAO,CAAC,SAAS,CAAC,MAAM,GAAG,KAAK,CAAC,SAAS,CAAC,MAAM,CAAC;AAElD,mDAAmD;AACnD,OAAO,CAAC,SAAS,CAAC,MAAM,CAAC,QAAQ,CAAC,GAAG,KAAK,CAAC,SAAS,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;AAEtE,kBAAkB;AAClB,MAAM,CAAC,MAAM,CACX,OAAO,CAAC,SAAS,EACjB,UAAU,EACV,UAAU,EACV,YAAY,EACZ,GAAG,EACH,KAAK,EACL,OAAO,CACR,CAAC"} \ No newline at end of file diff --git a/node_modules/cheerio/dist/commonjs/index.d.ts b/node_modules/cheerio/dist/commonjs/index.d.ts deleted file mode 100644 index 9c4746c..0000000 --- a/node_modules/cheerio/dist/commonjs/index.d.ts +++ /dev/null @@ -1,104 +0,0 @@ -/** - * @file Batteries-included version of Cheerio. This module includes several - * convenience methods for loading documents from various sources. - */ -export * from './load-parse.js'; -export { contains, merge } from './static.js'; -export type * from './types.js'; -export type { Cheerio, CheerioAPI, CheerioOptions, HTMLParser2Options, } from './slim.js'; -import { type SnifferOptions } from 'encoding-sniffer'; -import * as undici from 'undici'; -import { Writable } from 'node:stream'; -import type { CheerioAPI } from './load.js'; -import { type CheerioOptions } from './options.js'; -/** - * Sniffs the encoding of a buffer, then creates a querying function bound to a - * document created from the buffer. - * - * @category Loading - * @example - * - * ```js - * import * as cheerio from 'cheerio'; - * - * const buffer = fs.readFileSync('index.html'); - * const $ = cheerio.fromBuffer(buffer); - * ``` - * - * @param buffer - The buffer to sniff the encoding of. - * @param options - The options to pass to Cheerio. - * @returns The loaded document. - */ -export declare function loadBuffer(buffer: Buffer, options?: DecodeStreamOptions): CheerioAPI; -/** - * Creates a stream that parses a sequence of strings into a document. - * - * The stream is a `Writable` stream that accepts strings. When the stream is - * finished, the callback is called with the loaded document. - * - * @category Loading - * @example - * - * ```js - * import * as cheerio from 'cheerio'; - * import * as fs from 'fs'; - * - * const writeStream = cheerio.stringStream({}, (err, $) => { - * if (err) { - * // Handle error - * } - * - * console.log($('h1').text()); - * // Output: Hello, world! - * }); - * - * fs.createReadStream('my-document.html', { encoding: 'utf8' }).pipe( - * writeStream, - * ); - * ``` - * - * @param options - The options to pass to Cheerio. - * @param cb - The callback to call when the stream is finished. - * @returns The writable stream. - */ -export declare function stringStream(options: CheerioOptions, cb: (err: Error | null | undefined, $: CheerioAPI) => void): Writable; -export interface DecodeStreamOptions extends CheerioOptions { - encoding?: SnifferOptions; -} -/** - * Parses a stream of buffers into a document. - * - * The stream is a `Writable` stream that accepts buffers. When the stream is - * finished, the callback is called with the loaded document. - * - * @category Loading - * @param options - The options to pass to Cheerio. - * @param cb - The callback to call when the stream is finished. - * @returns The writable stream. - */ -export declare function decodeStream(options: DecodeStreamOptions, cb: (err: Error | null | undefined, $: CheerioAPI) => void): Writable; -type UndiciStreamOptions = Parameters<typeof undici.stream>[1]; -export interface CheerioRequestOptions extends DecodeStreamOptions { - /** The options passed to `undici`'s `stream` method. */ - requestOptions?: UndiciStreamOptions; -} -/** - * `fromURL` loads a document from a URL. - * - * By default, redirects are allowed and non-2xx responses are rejected. - * - * @category Loading - * @example - * - * ```js - * import * as cheerio from 'cheerio'; - * - * const $ = await cheerio.fromURL('https://example.com'); - * ``` - * - * @param url - The URL to load the document from. - * @param options - The options to pass to Cheerio. - * @returns The loaded document. - */ -export declare function fromURL(url: string | URL, options?: CheerioRequestOptions): Promise<CheerioAPI>; -//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/cheerio/dist/commonjs/index.d.ts.map b/node_modules/cheerio/dist/commonjs/index.d.ts.map deleted file mode 100644 index b8add6a..0000000 --- a/node_modules/cheerio/dist/commonjs/index.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,cAAc,iBAAiB,CAAC;AAChC,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAC9C,mBAAmB,YAAY,CAAC;AAChC,YAAY,EACV,OAAO,EACP,UAAU,EACV,cAAc,EACd,kBAAkB,GACnB,MAAM,WAAW,CAAC;AAKnB,OAAO,EAGL,KAAK,cAAc,EACpB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,KAAK,MAAM,MAAM,QAAQ,CAAC;AAEjC,OAAO,EAAE,QAAQ,EAAY,MAAM,aAAa,CAAC;AACjD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAC5C,OAAO,EAGL,KAAK,cAAc,EACpB,MAAM,cAAc,CAAC;AAGtB;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,UAAU,CACxB,MAAM,EAAE,MAAM,EACd,OAAO,GAAE,mBAAwB,GAChC,UAAU,CAQZ;AA2CD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,wBAAgB,YAAY,CAC1B,OAAO,EAAE,cAAc,EACvB,EAAE,EAAE,CAAC,GAAG,EAAE,KAAK,GAAG,IAAI,GAAG,SAAS,EAAE,CAAC,EAAE,UAAU,KAAK,IAAI,GACzD,QAAQ,CAEV;AAED,MAAM,WAAW,mBAAoB,SAAQ,cAAc;IACzD,QAAQ,CAAC,EAAE,cAAc,CAAC;CAC3B;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,YAAY,CAC1B,OAAO,EAAE,mBAAmB,EAC5B,EAAE,EAAE,CAAC,GAAG,EAAE,KAAK,GAAG,IAAI,GAAG,SAAS,EAAE,CAAC,EAAE,UAAU,KAAK,IAAI,GACzD,QAAQ,CAaV;AAED,KAAK,mBAAmB,GAAG,UAAU,CAAC,OAAO,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;AAE/D,MAAM,WAAW,qBAAsB,SAAQ,mBAAmB;IAChE,wDAAwD;IACxD,cAAc,CAAC,EAAE,mBAAmB,CAAC;CACtC;AAcD;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAsB,OAAO,CAC3B,GAAG,EAAE,MAAM,GAAG,GAAG,EACjB,OAAO,GAAE,qBAA0B,GAClC,OAAO,CAAC,UAAU,CAAC,CAwDrB"} \ No newline at end of file diff --git a/node_modules/cheerio/dist/commonjs/index.js b/node_modules/cheerio/dist/commonjs/index.js deleted file mode 100644 index 88d8c4f..0000000 --- a/node_modules/cheerio/dist/commonjs/index.js +++ /dev/null @@ -1,229 +0,0 @@ -"use strict"; -/** - * @file Batteries-included version of Cheerio. This module includes several - * convenience methods for loading documents from various sources. - */ -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 __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}); -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); -}; -var __importStar = (this && this.__importStar) || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; -}; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.merge = exports.contains = void 0; -exports.loadBuffer = loadBuffer; -exports.stringStream = stringStream; -exports.decodeStream = decodeStream; -exports.fromURL = fromURL; -__exportStar(require("./load-parse.js"), exports); -var static_js_1 = require("./static.js"); -Object.defineProperty(exports, "contains", { enumerable: true, get: function () { return static_js_1.contains; } }); -Object.defineProperty(exports, "merge", { enumerable: true, get: function () { return static_js_1.merge; } }); -const parse5_htmlparser2_tree_adapter_1 = require("parse5-htmlparser2-tree-adapter"); -const htmlparser2 = __importStar(require("htmlparser2")); -const parse5_parser_stream_1 = require("parse5-parser-stream"); -const encoding_sniffer_1 = require("encoding-sniffer"); -const undici = __importStar(require("undici")); -const whatwg_mimetype_1 = __importDefault(require("whatwg-mimetype")); -const node_stream_1 = require("node:stream"); -const options_js_1 = require("./options.js"); -const load_parse_js_1 = require("./load-parse.js"); -/** - * Sniffs the encoding of a buffer, then creates a querying function bound to a - * document created from the buffer. - * - * @category Loading - * @example - * - * ```js - * import * as cheerio from 'cheerio'; - * - * const buffer = fs.readFileSync('index.html'); - * const $ = cheerio.fromBuffer(buffer); - * ``` - * - * @param buffer - The buffer to sniff the encoding of. - * @param options - The options to pass to Cheerio. - * @returns The loaded document. - */ -function loadBuffer(buffer, options = {}) { - const opts = (0, options_js_1.flattenOptions)(options); - const str = (0, encoding_sniffer_1.decodeBuffer)(buffer, { - defaultEncoding: (opts === null || opts === void 0 ? void 0 : opts.xmlMode) ? 'utf8' : 'windows-1252', - ...options.encoding, - }); - return (0, load_parse_js_1.load)(str, opts); -} -function _stringStream(options, cb) { - var _a; - if (options === null || options === void 0 ? void 0 : options._useHtmlParser2) { - const parser = htmlparser2.createDocumentStream((err, document) => cb(err, (0, load_parse_js_1.load)(document)), options); - return new node_stream_1.Writable({ - decodeStrings: false, - write(chunk, _encoding, callback) { - if (typeof chunk !== 'string') { - throw new TypeError('Expected a string'); - } - parser.write(chunk); - callback(); - }, - final(callback) { - parser.end(); - callback(); - }, - }); - } - options !== null && options !== void 0 ? options : (options = {}); - (_a = options.treeAdapter) !== null && _a !== void 0 ? _a : (options.treeAdapter = parse5_htmlparser2_tree_adapter_1.adapter); - if (options.scriptingEnabled !== false) { - options.scriptingEnabled = true; - } - const stream = new parse5_parser_stream_1.ParserStream(options); - (0, node_stream_1.finished)(stream, (err) => cb(err, (0, load_parse_js_1.load)(stream.document))); - return stream; -} -/** - * Creates a stream that parses a sequence of strings into a document. - * - * The stream is a `Writable` stream that accepts strings. When the stream is - * finished, the callback is called with the loaded document. - * - * @category Loading - * @example - * - * ```js - * import * as cheerio from 'cheerio'; - * import * as fs from 'fs'; - * - * const writeStream = cheerio.stringStream({}, (err, $) => { - * if (err) { - * // Handle error - * } - * - * console.log($('h1').text()); - * // Output: Hello, world! - * }); - * - * fs.createReadStream('my-document.html', { encoding: 'utf8' }).pipe( - * writeStream, - * ); - * ``` - * - * @param options - The options to pass to Cheerio. - * @param cb - The callback to call when the stream is finished. - * @returns The writable stream. - */ -function stringStream(options, cb) { - return _stringStream((0, options_js_1.flattenOptions)(options), cb); -} -/** - * Parses a stream of buffers into a document. - * - * The stream is a `Writable` stream that accepts buffers. When the stream is - * finished, the callback is called with the loaded document. - * - * @category Loading - * @param options - The options to pass to Cheerio. - * @param cb - The callback to call when the stream is finished. - * @returns The writable stream. - */ -function decodeStream(options, cb) { - var _a; - const { encoding = {}, ...cheerioOptions } = options; - const opts = (0, options_js_1.flattenOptions)(cheerioOptions); - // Set the default encoding to UTF-8 for XML mode - (_a = encoding.defaultEncoding) !== null && _a !== void 0 ? _a : (encoding.defaultEncoding = (opts === null || opts === void 0 ? void 0 : opts.xmlMode) ? 'utf8' : 'windows-1252'); - const decodeStream = new encoding_sniffer_1.DecodeStream(encoding); - const loadStream = _stringStream(opts, cb); - decodeStream.pipe(loadStream); - return decodeStream; -} -const defaultRequestOptions = { - method: 'GET', - // Allow redirects by default - maxRedirections: 5, - // NOTE: `throwOnError` currently doesn't work https://github.com/nodejs/undici/issues/1753 - throwOnError: true, - // Set an Accept header - headers: { - accept: 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8', - }, -}; -/** - * `fromURL` loads a document from a URL. - * - * By default, redirects are allowed and non-2xx responses are rejected. - * - * @category Loading - * @example - * - * ```js - * import * as cheerio from 'cheerio'; - * - * const $ = await cheerio.fromURL('https://example.com'); - * ``` - * - * @param url - The URL to load the document from. - * @param options - The options to pass to Cheerio. - * @returns The loaded document. - */ -async function fromURL(url, options = {}) { - var _a; - const { requestOptions = defaultRequestOptions, encoding = {}, ...cheerioOptions } = options; - let undiciStream; - // Add headers if none were supplied. - (_a = requestOptions.headers) !== null && _a !== void 0 ? _a : (requestOptions.headers = defaultRequestOptions.headers); - const promise = new Promise((resolve, reject) => { - undiciStream = undici.stream(url, requestOptions, (res) => { - var _a, _b; - const contentType = (_a = res.headers['content-type']) !== null && _a !== void 0 ? _a : 'text/html'; - const mimeType = new whatwg_mimetype_1.default(Array.isArray(contentType) ? contentType[0] : contentType); - if (!mimeType.isHTML() && !mimeType.isXML()) { - throw new RangeError(`The content-type "${contentType}" is neither HTML nor XML.`); - } - // Forward the charset from the header to the decodeStream. - encoding.transportLayerEncodingLabel = mimeType.parameters.get('charset'); - /* - * If we allow redirects, we will have entries in the history. - * The last entry will be the final URL. - */ - const history = (_b = res.context) === null || _b === void 0 ? void 0 : _b.history; - const opts = { - encoding, - // Set XML mode based on the MIME type. - xmlMode: mimeType.isXML(), - // Set the `baseURL` to the final URL. - baseURL: history ? history[history.length - 1] : url, - ...cheerioOptions, - }; - return decodeStream(opts, (err, $) => (err ? reject(err) : resolve($))); - }); - }); - // Let's make sure the request is completed before returning the promise. - await undiciStream; - return promise; -} -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/cheerio/dist/commonjs/index.js.map b/node_modules/cheerio/dist/commonjs/index.js.map deleted file mode 100644 index 10ee7a3..0000000 --- a/node_modules/cheerio/dist/commonjs/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiDH,gCAWC;AA0ED,oCAKC;AAiBD,oCAgBC;AAuCD,0BA2DC;AA5QD,kDAAgC;AAChC,yCAA8C;AAArC,qGAAA,QAAQ,OAAA;AAAE,kGAAA,KAAK,OAAA;AASxB,qFAAgF;AAChF,yDAA2C;AAC3C,+DAAoE;AACpE,uDAI0B;AAC1B,+CAAiC;AACjC,sEAAuC;AACvC,6CAAiD;AAEjD,6CAIsB;AACtB,mDAAuC;AAEvC;;;;;;;;;;;;;;;;;GAiBG;AACH,SAAgB,UAAU,CACxB,MAAc,EACd,UAA+B,EAAE;IAEjC,MAAM,IAAI,GAAG,IAAA,2BAAc,EAAC,OAAO,CAAC,CAAC;IAC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gBACvC,OAAO,EAAE,QAAQ,CAAC,KAAK,EAAE;gBACzB,sCAAsC;gBACtC,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG;gBACpD,GAAG,cAAc;aAClB,CAAC;YAEF,OAAO,YAAY,CAAC,IAAI,EAAE,CAAC,GAAG,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAC1E,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;IAEH,yEAAyE;IACzE,MAAM,YAAY,CAAC;IAEnB,OAAO,OAAO,CAAC;AACjB,CAAC"} \ No newline at end of file diff --git a/node_modules/cheerio/dist/commonjs/load-parse.d.ts b/node_modules/cheerio/dist/commonjs/load-parse.d.ts deleted file mode 100644 index f884d14..0000000 --- a/node_modules/cheerio/dist/commonjs/load-parse.d.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { type CheerioAPI } from './load.js'; -import type { CheerioOptions } from './options.js'; -import type { AnyNode } from 'domhandler'; -/** - * Create a querying function, bound to a document created from the provided - * markup. - * - * Note that similar to web browser contexts, this operation may introduce - * `<html>`, `<head>`, and `<body>` elements; set `isDocument` to `false` to - * switch to fragment mode and disable this. - * - * @category Loading - * @param content - Markup to be loaded. - * @param options - Options for the created instance. - * @param isDocument - Allows parser to be switched to fragment mode. - * @returns The loaded document. - * @see {@link https://cheerio.js.org#loading} for additional usage information. - */ -export declare const load: (content: string | AnyNode | AnyNode[] | Buffer, options?: CheerioOptions | null, isDocument?: boolean) => CheerioAPI; -//# sourceMappingURL=load-parse.d.ts.map \ No newline at end of file diff --git a/node_modules/cheerio/dist/commonjs/load-parse.d.ts.map b/node_modules/cheerio/dist/commonjs/load-parse.d.ts.map deleted file mode 100644 index 4696c84..0000000 --- a/node_modules/cheerio/dist/commonjs/load-parse.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"load-parse.d.ts","sourceRoot":"","sources":["../../src/load-parse.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,UAAU,EAAW,MAAM,WAAW,CAAC;AAGrD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAGnD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAS1C;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,IAAI,EAAE,CACjB,OAAO,EAAE,MAAM,GAAG,OAAO,GAAG,OAAO,EAAE,GAAG,MAAM,EAC9C,OAAO,CAAC,EAAE,cAAc,GAAG,IAAI,EAC/B,UAAU,CAAC,EAAE,OAAO,KACjB,UAIJ,CAAC"} \ No newline at end of file diff --git a/node_modules/cheerio/dist/commonjs/load-parse.js b/node_modules/cheerio/dist/commonjs/load-parse.js deleted file mode 100644 index c43a41e..0000000 --- a/node_modules/cheerio/dist/commonjs/load-parse.js +++ /dev/null @@ -1,34 +0,0 @@ -"use strict"; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.load = void 0; -const load_js_1 = require("./load.js"); -const parse_js_1 = require("./parse.js"); -const parse5_adapter_js_1 = require("./parsers/parse5-adapter.js"); -const dom_serializer_1 = __importDefault(require("dom-serializer")); -const htmlparser2_1 = require("htmlparser2"); -const parse = (0, parse_js_1.getParse)((content, options, isDocument, context) => options._useHtmlParser2 - ? (0, htmlparser2_1.parseDocument)(content, options) - : (0, parse5_adapter_js_1.parseWithParse5)(content, options, isDocument, context)); -// Duplicate docs due to https://github.com/TypeStrong/typedoc/issues/1616 -/** - * Create a querying function, bound to a document created from the provided - * markup. - * - * Note that similar to web browser contexts, this operation may introduce - * `<html>`, `<head>`, and `<body>` elements; set `isDocument` to `false` to - * switch to fragment mode and disable this. - * - * @category Loading - * @param content - Markup to be loaded. - * @param options - Options for the created instance. - * @param isDocument - Allows parser to be switched to fragment mode. - * @returns The loaded document. - * @see {@link https://cheerio.js.org#loading} for additional usage information. - */ -exports.load = (0, load_js_1.getLoad)(parse, (dom, options) => options._useHtmlParser2 - ? (0, dom_serializer_1.default)(dom, options) - : (0, parse5_adapter_js_1.renderWithParse5)(dom)); -//# sourceMappingURL=load-parse.js.map \ No newline at end of file diff --git a/node_modules/cheerio/dist/commonjs/load-parse.js.map b/node_modules/cheerio/dist/commonjs/load-parse.js.map deleted file mode 100644 index 86e10c1..0000000 --- a/node_modules/cheerio/dist/commonjs/load-parse.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"load-parse.js","sourceRoot":"","sources":["../../src/load-parse.ts"],"names":[],"mappings":";;;;;;AAAA,uCAAqD;AACrD,yCAAsC;AACtC,mEAAgF;AAEhF,oEAAmD;AACnD,6CAAoE;AAGpE,MAAM,KAAK,GAAG,IAAA,mBAAQ,EAAC,CAAC,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,EAAE,CAC/D,OAAO,CAAC,eAAe;IACrB,CAAC,CAAC,IAAA,2BAAoB,EAAC,OAAO,EAAE,OAAO,CAAC;IACxC,CAAC,CAAC,IAAA,mCAAe,EAAC,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,OAAO,CAAC,CAC3D,CAAC;AAEF,0EAA0E;AAC1E;;;;;;;;;;;;;;GAcG;AACU,QAAA,IAAI,GAIC,IAAA,iBAAO,EAAC,KAAK,EAAE,CAAC,GAAG,EAAE,OAAO,EAAE,EAAE,CAChD,OAAO,CAAC,eAAe;IACrB,CAAC,CAAC,IAAA,wBAAqB,EAAC,GAAG,EAAE,OAAO,CAAC;IACrC,CAAC,CAAC,IAAA,oCAAgB,EAAC,GAAG,CAAC,CAC1B,CAAC"} \ No newline at end of file diff --git a/node_modules/cheerio/dist/commonjs/load.d.ts b/node_modules/cheerio/dist/commonjs/load.d.ts deleted file mode 100644 index 43ff318..0000000 --- a/node_modules/cheerio/dist/commonjs/load.d.ts +++ /dev/null @@ -1,91 +0,0 @@ -import { type CheerioOptions, type InternalOptions } from './options.js'; -import * as staticMethods from './static.js'; -import { Cheerio } from './cheerio.js'; -import type { AnyNode, Document, Element } from 'domhandler'; -import type { SelectorType, BasicAcceptedElems } from './types.js'; -type StaticType = typeof staticMethods; -/** - * A querying function, bound to a document created from the provided markup. - * - * Also provides several helper methods for dealing with the document as a - * whole. - */ -export interface CheerioAPI extends StaticType { - /** - * This selector method is the starting point for traversing and manipulating - * the document. Like jQuery, it's the primary method for selecting elements - * in the document. - * - * `selector` searches within the `context` scope, which searches within the - * `root` scope. - * - * @example - * - * ```js - * $('ul .pear').attr('class'); - * //=> pear - * - * $('li[class=orange]').html(); - * //=> Orange - * - * $('.apple', '#fruits').text(); - * //=> Apple - * ``` - * - * Optionally, you can also load HTML by passing the string as the selector: - * - * ```js - * $('<ul id="fruits">...</ul>'); - * ``` - * - * Or the context: - * - * ```js - * $('ul', '<ul id="fruits">...</ul>'); - * ``` - * - * Or as the root: - * - * ```js - * $('li', 'ul', '<ul id="fruits">...</ul>'); - * ``` - * - * @param selector - Either a selector to look for within the document, or the - * contents of a new Cheerio instance. - * @param context - Either a selector to look for within the root, or the - * contents of the document to query. - * @param root - Optional HTML document string. - */ - <T extends AnyNode, S extends string>(selector?: S | BasicAcceptedElems<T>, context?: BasicAcceptedElems<AnyNode> | null, root?: BasicAcceptedElems<Document>, options?: CheerioOptions): Cheerio<S extends SelectorType ? Element : T>; - /** - * The root the document was originally loaded with. - * - * @private - */ - _root: Document; - /** - * The options the document was originally loaded with. - * - * @private - */ - _options: InternalOptions; - /** Mimic jQuery's prototype alias for plugin authors. */ - fn: typeof Cheerio.prototype; - /** - * The `.load` static method defined on the "loaded" Cheerio factory function - * is deprecated. Users are encouraged to instead use the `load` function - * exported by the Cheerio module. - * - * @deprecated Use the `load` function exported by the Cheerio module. - * @category Deprecated - * @example - * - * ```js - * const $ = cheerio.load('<h1>Hello, <span>world</span>.</h1>'); - * ``` - */ - load: ReturnType<typeof getLoad>; -} -export declare function getLoad(parse: typeof Cheerio.prototype._parse, render: (dom: AnyNode | ArrayLike<AnyNode>, options: InternalOptions) => string): (content: string | AnyNode | AnyNode[] | Buffer, options?: CheerioOptions | null, isDocument?: boolean) => CheerioAPI; -export {}; -//# sourceMappingURL=load.d.ts.map \ No newline at end of file diff --git a/node_modules/cheerio/dist/commonjs/load.d.ts.map b/node_modules/cheerio/dist/commonjs/load.d.ts.map deleted file mode 100644 index 11729d5..0000000 --- a/node_modules/cheerio/dist/commonjs/load.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"load.d.ts","sourceRoot":"","sources":["../../src/load.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,cAAc,EACnB,KAAK,eAAe,EAErB,MAAM,cAAc,CAAC;AACtB,OAAO,KAAK,aAAa,MAAM,aAAa,CAAC;AAC7C,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAEvC,OAAO,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAc,MAAM,YAAY,CAAC;AACzE,OAAO,KAAK,EAAE,YAAY,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAEnE,KAAK,UAAU,GAAG,OAAO,aAAa,CAAC;AAEvC;;;;;GAKG;AACH,MAAM,WAAW,UAAW,SAAQ,UAAU;IAC5C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA4CG;IACH,CAAC,CAAC,SAAS,OAAO,EAAE,CAAC,SAAS,MAAM,EAClC,QAAQ,CAAC,EAAE,CAAC,GAAG,kBAAkB,CAAC,CAAC,CAAC,EACpC,OAAO,CAAC,EAAE,kBAAkB,CAAC,OAAO,CAAC,GAAG,IAAI,EAC5C,IAAI,CAAC,EAAE,kBAAkB,CAAC,QAAQ,CAAC,EACnC,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,CAAC,SAAS,YAAY,GAAG,OAAO,GAAG,CAAC,CAAC,CAAC;IAEjD;;;;OAIG;IACH,KAAK,EAAE,QAAQ,CAAC;IAEhB;;;;OAIG;IACH,QAAQ,EAAE,eAAe,CAAC;IAE1B,yDAAyD;IACzD,EAAE,EAAE,OAAO,OAAO,CAAC,SAAS,CAAC;IAE7B;;;;;;;;;;;;OAYG;IACH,IAAI,EAAE,UAAU,CAAC,OAAO,OAAO,CAAC,CAAC;CAClC;AAED,wBAAgB,OAAO,CACrB,KAAK,EAAE,OAAO,OAAO,CAAC,SAAS,CAAC,MAAM,EACtC,MAAM,EAAE,CACN,GAAG,EAAE,OAAO,GAAG,SAAS,CAAC,OAAO,CAAC,EACjC,OAAO,EAAE,eAAe,KACrB,MAAM,aAiBA,MAAM,GAAG,OAAO,GAAG,OAAO,EAAE,GAAG,MAAM,YACpC,cAAc,GAAG,IAAI,2BAE9B,UAAU,CAyId"} \ No newline at end of file diff --git a/node_modules/cheerio/dist/commonjs/load.js b/node_modules/cheerio/dist/commonjs/load.js deleted file mode 100644 index 2f9219a..0000000 --- a/node_modules/cheerio/dist/commonjs/load.js +++ /dev/null @@ -1,149 +0,0 @@ -"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 __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}); -var __importStar = (this && this.__importStar) || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.getLoad = getLoad; -const options_js_1 = require("./options.js"); -const staticMethods = __importStar(require("./static.js")); -const cheerio_js_1 = require("./cheerio.js"); -const utils_js_1 = require("./utils.js"); -function getLoad(parse, render) { - /** - * Create a querying function, bound to a document created from the provided - * markup. - * - * Note that similar to web browser contexts, this operation may introduce - * `<html>`, `<head>`, and `<body>` elements; set `isDocument` to `false` to - * switch to fragment mode and disable this. - * - * @param content - Markup to be loaded. - * @param options - Options for the created instance. - * @param isDocument - Allows parser to be switched to fragment mode. - * @returns The loaded document. - * @see {@link https://cheerio.js.org#loading} for additional usage information. - */ - return function load(content, options, isDocument = true) { - if (content == null) { - throw new Error('cheerio.load() expects a string'); - } - const internalOpts = (0, options_js_1.flattenOptions)(options); - const initialRoot = parse(content, internalOpts, isDocument, null); - /** - * Create an extended class here, so that extensions only live on one - * instance. - */ - class LoadedCheerio extends cheerio_js_1.Cheerio { - _make(selector, context) { - const cheerio = initialize(selector, context); - cheerio.prevObject = this; - return cheerio; - } - _parse(content, options, isDocument, context) { - return parse(content, options, isDocument, context); - } - _render(dom) { - return render(dom, this.options); - } - } - function initialize(selector, context, root = initialRoot, opts) { - // $($) - if (selector && (0, utils_js_1.isCheerio)(selector)) - return selector; - const options = (0, options_js_1.flattenOptions)(opts, internalOpts); - const r = typeof root === 'string' - ? [parse(root, options, false, null)] - : 'length' in root - ? root - : [root]; - const rootInstance = (0, utils_js_1.isCheerio)(r) - ? r - : new LoadedCheerio(r, null, options); - // Add a cyclic reference, so that calling methods on `_root` never fails. - rootInstance._root = rootInstance; - // $(), $(null), $(undefined), $(false) - if (!selector) { - return new LoadedCheerio(undefined, rootInstance, options); - } - const elements = typeof selector === 'string' && (0, utils_js_1.isHtml)(selector) - ? // $(<html>) - parse(selector, options, false, null).children - : isNode(selector) - ? // $(dom) - [selector] - : Array.isArray(selector) - ? // $([dom]) - selector - : undefined; - const instance = new LoadedCheerio(elements, rootInstance, options); - if (elements) { - return instance; - } - if (typeof selector !== 'string') { - throw new TypeError('Unexpected type of selector'); - } - // We know that our selector is a string now. - let search = selector; - const searchContext = context - ? // If we don't have a context, maybe we have a root, from loading - typeof context === 'string' - ? (0, utils_js_1.isHtml)(context) - ? // $('li', '<ul>...</ul>') - new LoadedCheerio([parse(context, options, false, null)], rootInstance, options) - : // $('li', 'ul') - ((search = `${context} ${search}`), rootInstance) - : (0, utils_js_1.isCheerio)(context) - ? // $('li', $) - context - : // $('li', node), $('li', [nodes]) - new LoadedCheerio(Array.isArray(context) ? context : [context], rootInstance, options) - : rootInstance; - // If we still don't have a context, return - if (!searchContext) - return instance; - /* - * #id, .class, tag - */ - return searchContext.find(search); - } - // Add in static methods & properties - Object.assign(initialize, staticMethods, { - load, - // `_root` and `_options` are used in static methods. - _root: initialRoot, - _options: internalOpts, - // Add `fn` for plugins - fn: LoadedCheerio.prototype, - // Add the prototype here to maintain `instanceof` behavior. - prototype: LoadedCheerio.prototype, - }); - return initialize; - }; -} -function isNode(obj) { - return (!!obj.name || - obj.type === 'root' || - obj.type === 'text' || - obj.type === 'comment'); -} -//# sourceMappingURL=load.js.map \ No newline at end of file diff --git a/node_modules/cheerio/dist/commonjs/load.js.map b/node_modules/cheerio/dist/commonjs/load.js.map deleted file mode 100644 index e682253..0000000 --- a/node_modules/cheerio/dist/commonjs/load.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"load.js","sourceRoot":"","sources":["../../src/load.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAyGA,0BAkKC;AA3QD,6CAIsB;AACtB,2DAA6C;AAC7C,6CAAuC;AACvC,yCAA+C;AAkG/C,SAAgB,OAAO,CACrB,KAAsC,EACtC,MAGW;IAEX;;;;;;;;;;;;;OAaG;IACH,OAAO,SAAS,IAAI,CAClB,OAA8C,EAC9C,OAA+B,EAC/B,UA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AAC,IAAI,KAAK,SAAS,CACvB,CAAC;AACJ,CAAC"} \ No newline at end of file diff --git a/node_modules/cheerio/dist/commonjs/options.d.ts b/node_modules/cheerio/dist/commonjs/options.d.ts deleted file mode 100644 index c3650d6..0000000 --- a/node_modules/cheerio/dist/commonjs/options.d.ts +++ /dev/null @@ -1,95 +0,0 @@ -import type { DomHandlerOptions } from 'domhandler'; -import type { ParserOptions as HTMLParser2ParserOptions } from 'htmlparser2'; -import type { ParserOptions as Parse5ParserOptions } from 'parse5'; -import type { Htmlparser2TreeAdapterMap } from 'parse5-htmlparser2-tree-adapter'; -import type { Options as SelectOptions } from 'cheerio-select'; -/** - * Options accepted by htmlparser2, the default parser for XML. - * - * @see https://github.com/fb55/htmlparser2/wiki/Parser-options - */ -export interface HTMLParser2Options extends DomHandlerOptions, HTMLParser2ParserOptions { -} -/** - * Options accepted by Cheerio. - * - * Please note that parser-specific options are _only recognized_ if the - * relevant parser is used. - */ -export interface CheerioOptions extends Parse5ParserOptions<Htmlparser2TreeAdapterMap> { - /** - * Recommended way of configuring htmlparser2 when wanting to parse XML. - * - * This will switch Cheerio to use htmlparser2. - * - * @default false - */ - xml?: HTMLParser2Options | boolean; - /** - * Enable xml mode, which will switch Cheerio to use htmlparser2. - * - * @deprecated Please use the `xml` option instead. - * @default false - */ - xmlMode?: boolean; - /** The base URI for the document. Used to resolve the `href` and `src` props. */ - baseURI?: string | URL; - /** - * Is the document in quirks mode? - * - * This will lead to `.className` and `#id` being case-insensitive. - * - * @default false - */ - quirksMode?: SelectOptions['quirksMode']; - /** - * Extension point for pseudo-classes. - * - * Maps from names to either strings of functions. - * - * - A string value is a selector that the element must match to be selected. - * - A function is called with the element as its first argument, and optional - * parameters second. If it returns true, the element is selected. - * - * @example - * - * ```js - * const $ = cheerio.load( - * '<div class="foo"></div><div data-bar="boo"></div>', - * { - * pseudos: { - * // `:foo` is an alias for `div.foo` - * foo: 'div.foo', - * // `:bar(val)` is equivalent to `[data-bar=val s]` - * bar: (el, val) => el.attribs['data-bar'] === val, - * }, - * }, - * ); - * - * $(':foo').length; // 1 - * $('div:bar(boo)').length; // 1 - * $('div:bar(baz)').length; // 0 - * ``` - */ - pseudos?: SelectOptions['pseudos']; -} -/** Internal options for Cheerio. */ -export interface InternalOptions extends HTMLParser2Options, Omit<CheerioOptions, 'xml'> { - /** - * Whether to use htmlparser2. - * - * This is set to true if `xml` is set to true. - */ - _useHtmlParser2?: boolean; -} -/** - * Flatten the options for Cheerio. - * - * This will set `_useHtmlParser2` to true if `xml` is set to true. - * - * @param options - The options to flatten. - * @param baseOptions - The base options to use. - * @returns The flattened options. - */ -export declare function flattenOptions(options?: CheerioOptions | null, baseOptions?: InternalOptions): InternalOptions; -//# sourceMappingURL=options.d.ts.map \ No newline at end of file diff --git a/node_modules/cheerio/dist/commonjs/options.d.ts.map b/node_modules/cheerio/dist/commonjs/options.d.ts.map deleted file mode 100644 index 70b44c4..0000000 --- a/node_modules/cheerio/dist/commonjs/options.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"options.d.ts","sourceRoot":"","sources":["../../src/options.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AACpD,OAAO,KAAK,EAAE,aAAa,IAAI,wBAAwB,EAAE,MAAM,aAAa,CAAC;AAC7E,OAAO,KAAK,EAAE,aAAa,IAAI,mBAAmB,EAAE,MAAM,QAAQ,CAAC;AACnE,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,iCAAiC,CAAC;AACjF,OAAO,KAAK,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAE/D;;;;GAIG;AACH,MAAM,WAAW,kBACf,SAAQ,iBAAiB,EACvB,wBAAwB;CAAG;AAE/B;;;;;GAKG;AACH,MAAM,WAAW,cACf,SAAQ,mBAAmB,CAAC,yBAAyB,CAAC;IACtD;;;;;;OAMG;IACH,GAAG,CAAC,EAAE,kBAAkB,GAAG,OAAO,CAAC;IAEnC;;;;;OAKG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAElB,iFAAiF;IACjF,OAAO,CAAC,EAAE,MAAM,GAAG,GAAG,CAAC;IAEvB;;;;;;OAMG;IACH,UAAU,CAAC,EAAE,aAAa,CAAC,YAAY,CAAC,CAAC;IACzC;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA4BG;IACH,OAAO,CAAC,EAAE,aAAa,CAAC,SAAS,CAAC,CAAC;CACpC;AAED,oCAAoC;AACpC,MAAM,WAAW,eACf,SAAQ,kBAAkB,EACxB,IAAI,CAAC,cAAc,EAAE,KAAK,CAAC;IAC7B;;;;OAIG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B;AAMD;;;;;;;;GAQG;AACH,wBAAgB,cAAc,CAC5B,OAAO,CAAC,EAAE,cAAc,GAAG,IAAI,EAC/B,WAAW,CAAC,EAAE,eAAe,GAC5B,eAAe,CAuBjB"} \ No newline at end of file diff --git a/node_modules/cheerio/dist/commonjs/options.js b/node_modules/cheerio/dist/commonjs/options.js deleted file mode 100644 index 55cb7ab..0000000 --- a/node_modules/cheerio/dist/commonjs/options.js +++ /dev/null @@ -1,37 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.flattenOptions = flattenOptions; -const defaultOpts = { - _useHtmlParser2: false, -}; -/** - * Flatten the options for Cheerio. - * - * This will set `_useHtmlParser2` to true if `xml` is set to true. - * - * @param options - The options to flatten. - * @param baseOptions - The base options to use. - * @returns The flattened options. - */ -function flattenOptions(options, baseOptions) { - if (!options) { - return baseOptions !== null && baseOptions !== void 0 ? baseOptions : defaultOpts; - } - const opts = { - _useHtmlParser2: !!options.xmlMode, - ...baseOptions, - ...options, - }; - if (options.xml) { - opts._useHtmlParser2 = true; - opts.xmlMode = true; - if (options.xml !== true) { - Object.assign(opts, options.xml); - } - } - else if (options.xmlMode) { - opts._useHtmlParser2 = true; - } - return opts; -} -//# sourceMappingURL=options.js.map \ No newline at end of file diff --git a/node_modules/cheerio/dist/commonjs/options.js.map b/node_modules/cheerio/dist/commonjs/options.js.map deleted file mode 100644 index c6ff285..0000000 --- a/node_modules/cheerio/dist/commonjs/options.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"options.js","sourceRoot":"","sources":["../../src/options.ts"],"names":[],"mappings":";;AA4GA,wCA0BC;AAvCD,MAAM,WAAW,GAAoB;IACnC,eAAe,EAAE,KAAK;CACvB,CAAC;AAEF;;;;;;;;GAQG;AACH,SAAgB,cAAc,CAC5B,OAA+B,EAC/B,WAA6B;IAE7B,IAAI,CAAC,OAAO,EAAE,CAAC;QACb,OAAO,WAAW,aAAX,WAAW,cAAX,WAAW,GAAI,WAAW,CAAC;IACpC,CAAC;IAED,MAAM,IAAI,GAAoB;QAC5B,eAAe,EAAE,CAAC,CAAC,OAAO,CAAC,OAAO;QAClC,GAAG,WAAW;QACd,GAAG,OAAO;KACX,CAAC;IAEF,IAAI,OAAO,CAAC,GAAG,EAAE,CAAC;QAChB,IAAI,CAAC,eAAe,GAAG,IAAI,CAAC;QAC5B,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC;QAEpB,IAAI,OAAO,CAAC,GAAG,KAAK,IAAI,EAAE,CAAC;YACzB,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,GAAG,CAAC,CAAC;QACnC,CAAC;IACH,CAAC;SAAM,IAAI,OAAO,CAAC,OAAO,EAAE,CAAC;QAC3B,IAAI,CAAC,eAAe,GAAG,IAAI,CAAC;IAC9B,CAAC;IAED,OAAO,IAAI,CAAC;AACd,CAAC"} \ No newline at end of file diff --git a/node_modules/cheerio/dist/commonjs/package.json b/node_modules/cheerio/dist/commonjs/package.json deleted file mode 100644 index 5bbefff..0000000 --- a/node_modules/cheerio/dist/commonjs/package.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "type": "commonjs" -} diff --git a/node_modules/cheerio/dist/commonjs/parse.d.ts b/node_modules/cheerio/dist/commonjs/parse.d.ts deleted file mode 100644 index 646f763..0000000 --- a/node_modules/cheerio/dist/commonjs/parse.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { type AnyNode, Document, type ParentNode } from 'domhandler'; -import type { InternalOptions } from './options.js'; -/** - * Get the parse function with options. - * - * @param parser - The parser function. - * @returns The parse function with options. - */ -export declare function getParse(parser: (content: string, options: InternalOptions, isDocument: boolean, context: ParentNode | null) => Document): (content: string | Document | AnyNode | AnyNode[] | Buffer, options: InternalOptions, isDocument: boolean, context: ParentNode | null) => Document; -/** - * Update the dom structure, for one changed layer. - * - * @param newChilds - The new children. - * @param parent - The new parent. - * @returns The parent node. - */ -export declare function update(newChilds: AnyNode[] | AnyNode, parent: ParentNode | null): ParentNode | null; -//# sourceMappingURL=parse.d.ts.map \ No newline at end of file diff --git a/node_modules/cheerio/dist/commonjs/parse.d.ts.map b/node_modules/cheerio/dist/commonjs/parse.d.ts.map deleted file mode 100644 index 8470d5d..0000000 --- a/node_modules/cheerio/dist/commonjs/parse.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"parse.d.ts","sourceRoot":"","sources":["../../src/parse.ts"],"names":[],"mappings":"AACA,OAAO,EACL,KAAK,OAAO,EACZ,QAAQ,EACR,KAAK,UAAU,EAEhB,MAAM,YAAY,CAAC;AACpB,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAEpD;;;;;GAKG;AACH,wBAAgB,QAAQ,CACtB,MAAM,EAAE,CACN,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,eAAe,EACxB,UAAU,EAAE,OAAO,EACnB,OAAO,EAAE,UAAU,GAAG,IAAI,KACvB,QAAQ,aAYF,MAAM,GAAG,QAAQ,GAAG,OAAO,GAAG,OAAO,EAAE,GAAG,MAAM,WAChD,eAAe,cACZ,OAAO,WACV,UAAU,GAAG,IAAI,KACzB,QAAQ,CAwBZ;AAED;;;;;;GAMG;AACH,wBAAgB,MAAM,CACpB,SAAS,EAAE,OAAO,EAAE,GAAG,OAAO,EAC9B,MAAM,EAAE,UAAU,GAAG,IAAI,GACxB,UAAU,GAAG,IAAI,CA+BnB"} \ No newline at end of file diff --git a/node_modules/cheerio/dist/commonjs/parse.js b/node_modules/cheerio/dist/commonjs/parse.js deleted file mode 100644 index 0c1d54f..0000000 --- a/node_modules/cheerio/dist/commonjs/parse.js +++ /dev/null @@ -1,77 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.getParse = getParse; -exports.update = update; -const domutils_1 = require("domutils"); -const domhandler_1 = require("domhandler"); -/** - * Get the parse function with options. - * - * @param parser - The parser function. - * @returns The parse function with options. - */ -function getParse(parser) { - /** - * Parse a HTML string or a node. - * - * @param content - The HTML string or node. - * @param options - The parser options. - * @param isDocument - If `content` is a document. - * @param context - The context node in the DOM tree. - * @returns The parsed document node. - */ - return function parse(content, options, isDocument, context) { - if (typeof Buffer !== 'undefined' && Buffer.isBuffer(content)) { - content = content.toString(); - } - if (typeof content === 'string') { - return parser(content, options, isDocument, context); - } - const doc = content; - if (!Array.isArray(doc) && (0, domhandler_1.isDocument)(doc)) { - // If `doc` is already a root, just return it - return doc; - } - // Add conent to new root element - const root = new domhandler_1.Document([]); - // Update the DOM using the root - update(doc, root); - return root; - }; -} -/** - * Update the dom structure, for one changed layer. - * - * @param newChilds - The new children. - * @param parent - The new parent. - * @returns The parent node. - */ -function update(newChilds, parent) { - // Normalize - const arr = Array.isArray(newChilds) ? newChilds : [newChilds]; - // Update parent - if (parent) { - parent.children = arr; - } - else { - parent = null; - } - // Update neighbors - for (let i = 0; i < arr.length; i++) { - const node = arr[i]; - // Cleanly remove existing nodes from their previous structures. - if (node.parent && node.parent.children !== arr) { - (0, domutils_1.removeElement)(node); - } - if (parent) { - node.prev = arr[i - 1] || null; - node.next = arr[i + 1] || null; - } - else { - node.prev = node.next = null; - } - node.parent = parent; - } - return parent; -} -//# sourceMappingURL=parse.js.map \ No newline at end of file diff --git a/node_modules/cheerio/dist/commonjs/parse.js.map b/node_modules/cheerio/dist/commonjs/parse.js.map deleted file mode 100644 index 901a5c4..0000000 --- a/node_modules/cheerio/dist/commonjs/parse.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"parse.js","sourceRoot":"","sources":["../../src/parse.ts"],"names":[],"mappings":";;AAeA,4BA8CC;AASD,wBAkCC;AAxGD,uCAAyC;AACzC,2CAKoB;AAGpB;;;;;GAKG;AACH,SAAgB,QAAQ,CACtB,MAKa;IAEb;;;;;;;;OAQG;IACH,OAAO,SAAS,KAAK,CACnB,OAAyD,EACzD,OAAwB,EACxB,UAAmB,EACnB,OAA0B;QAE1B,IAAI,OAAO,MAAM,KAAK,WAAW,IAAI,MAAM,CAAC,QAAQ,CAAC,OAAO,CAAC,EAAE,CAAC;YAC9D,OAAO,GAAG,OAAO,CAAC,QAAQ,EAAE,CAAC;QAC/B,CAAC;QAED,IAAI,OAAO,OAAO,KAAK,QAAQ,EAAE,CAAC;YAChC,OAAO,MAAM,CAAC,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,OAAO,CAAC,CAAC;QACvD,CAAC;QAED,MAAM,GAAG,GAAG,OAAyC,CAAC;QAEtD,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,IAAA,uBAAe,EAAC,GAAG,CAAC,EAAE,CAAC;YAChD,6CAA6C;YAC7C,OAAO,GAAG,CAAC;QACb,CAAC;QAED,iCAAiC;QACjC,MAAM,IAAI,GAAG,IAAI,qBAAQ,CAAC,EAAE,CAAC,CAAC;QAE9B,gCAAgC;QAChC,MAAM,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC;QAElB,OAAO,IAAI,CAAC;IACd,CAAC,CAAC;AACJ,CAAC;AAED;;;;;;GAMG;AACH,SAAgB,MAAM,CACpB,SAA8B,EAC9B,MAAyB;IAEzB,YAAY;IACZ,MAAM,GAAG,GAAG,KAAK,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC;IAE/D,gBAAgB;IAChB,IAAI,MAAM,EAAE,CAAC;QACX,MAAM,CAAC,QAAQ,GAAG,GAAG,CAAC;IACxB,CAAC;SAAM,CAAC;QACN,MAAM,GAAG,IAAI,CAAC;IAChB,CAAC;IAED,mBAAmB;IACnB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,GAAG,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;QACpC,MAAM,IAAI,GAAG,GAAG,CAAC,CAAC,CAAC,CAAC;QAEpB,gEAAgE;QAChE,IAAI,IAAI,CAAC,MAAM,IAAI,IAAI,CAAC,MAAM,CAAC,QAAQ,KAAK,GAAG,EAAE,CAAC;YAChD,IAAA,wBAAa,EAAC,IAAI,CAAC,CAAC;QACtB,CAAC;QAED,IAAI,MAAM,EAAE,CAAC;YACX,IAAI,CAAC,IAAI,GAAG,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,IAAI,CAAC;YAC/B,IAAI,CAAC,IAAI,GAAG,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,IAAI,CAAC;QACjC,CAAC;aAAM,CAAC;YACN,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QAC/B,CAAC;QAED,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED,OAAO,MAAM,CAAC;AAChB,CAAC"} \ No newline at end of file diff --git a/node_modules/cheerio/dist/commonjs/parsers/parse5-adapter.d.ts b/node_modules/cheerio/dist/commonjs/parsers/parse5-adapter.d.ts deleted file mode 100644 index c7a2d60..0000000 --- a/node_modules/cheerio/dist/commonjs/parsers/parse5-adapter.d.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { type AnyNode, type Document, type ParentNode } from 'domhandler'; -import type { InternalOptions } from '../options.js'; -/** - * Parse the content with `parse5` in the context of the given `ParentNode`. - * - * @param content - The content to parse. - * @param options - A set of options to use to parse. - * @param isDocument - Whether to parse the content as a full HTML document. - * @param context - The context in which to parse the content. - * @returns The parsed content. - */ -export declare function parseWithParse5(content: string, options: InternalOptions, isDocument: boolean, context: ParentNode | null): Document; -/** - * Renders the given DOM tree with `parse5` and returns the result as a string. - * - * @param dom - The DOM tree to render. - * @returns The rendered document. - */ -export declare function renderWithParse5(dom: AnyNode | ArrayLike<AnyNode>): string; -//# sourceMappingURL=parse5-adapter.d.ts.map \ No newline at end of file diff --git a/node_modules/cheerio/dist/commonjs/parsers/parse5-adapter.d.ts.map b/node_modules/cheerio/dist/commonjs/parsers/parse5-adapter.d.ts.map deleted file mode 100644 index d18dac2..0000000 --- a/node_modules/cheerio/dist/commonjs/parsers/parse5-adapter.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"parse5-adapter.d.ts","sourceRoot":"","sources":["../../../src/parsers/parse5-adapter.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,OAAO,EACZ,KAAK,QAAQ,EACb,KAAK,UAAU,EAEhB,MAAM,YAAY,CAAC;AAGpB,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAErD;;;;;;;;GAQG;AACH,wBAAgB,eAAe,CAC7B,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,eAAe,EACxB,UAAU,EAAE,OAAO,EACnB,OAAO,EAAE,UAAU,GAAG,IAAI,GACzB,QAAQ,CAUV;AAID;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,OAAO,GAAG,SAAS,CAAC,OAAO,CAAC,GAAG,MAAM,CAqB1E"} \ No newline at end of file diff --git a/node_modules/cheerio/dist/commonjs/parsers/parse5-adapter.js b/node_modules/cheerio/dist/commonjs/parsers/parse5-adapter.js deleted file mode 100644 index 1d72016..0000000 --- a/node_modules/cheerio/dist/commonjs/parsers/parse5-adapter.js +++ /dev/null @@ -1,54 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.parseWithParse5 = parseWithParse5; -exports.renderWithParse5 = renderWithParse5; -const domhandler_1 = require("domhandler"); -const parse5_1 = require("parse5"); -const parse5_htmlparser2_tree_adapter_1 = require("parse5-htmlparser2-tree-adapter"); -/** - * Parse the content with `parse5` in the context of the given `ParentNode`. - * - * @param content - The content to parse. - * @param options - A set of options to use to parse. - * @param isDocument - Whether to parse the content as a full HTML document. - * @param context - The context in which to parse the content. - * @returns The parsed content. - */ -function parseWithParse5(content, options, isDocument, context) { - var _a; - (_a = options.treeAdapter) !== null && _a !== void 0 ? _a : (options.treeAdapter = parse5_htmlparser2_tree_adapter_1.adapter); - if (options.scriptingEnabled !== false) { - options.scriptingEnabled = true; - } - return isDocument - ? (0, parse5_1.parse)(content, options) - : (0, parse5_1.parseFragment)(context, content, options); -} -const renderOpts = { treeAdapter: parse5_htmlparser2_tree_adapter_1.adapter }; -/** - * Renders the given DOM tree with `parse5` and returns the result as a string. - * - * @param dom - The DOM tree to render. - * @returns The rendered document. - */ -function renderWithParse5(dom) { - /* - * `dom-serializer` passes over the special "root" node and renders the - * node's children in its place. To mimic this behavior with `parse5`, an - * equivalent operation must be applied to the input array. - */ - const nodes = 'length' in dom ? dom : [dom]; - for (let index = 0; index < nodes.length; index += 1) { - const node = nodes[index]; - if ((0, domhandler_1.isDocument)(node)) { - Array.prototype.splice.call(nodes, index, 1, ...node.children); - } - } - let result = ''; - for (let index = 0; index < nodes.length; index += 1) { - const node = nodes[index]; - result += (0, parse5_1.serializeOuter)(node, renderOpts); - } - return result; -} -//# sourceMappingURL=parse5-adapter.js.map \ No newline at end of file diff --git a/node_modules/cheerio/dist/commonjs/parsers/parse5-adapter.js.map b/node_modules/cheerio/dist/commonjs/parsers/parse5-adapter.js.map deleted file mode 100644 index ad96cb6..0000000 --- a/node_modules/cheerio/dist/commonjs/parsers/parse5-adapter.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"parse5-adapter.js","sourceRoot":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I,KAAK,GAAG,CAAC,EAAE,KAAK,GAAG,KAAK,CAAC,MAAM,EAAE,KAAK,IAAI,CAAC,EAAE,CAAC;QACrD,MAAM,IAAI,GAAG,KAAK,CAAC,KAAK,CAAC,CAAC;QAC1B,MAAM,IAAI,IAAA,uBAAc,EAAC,IAAI,EAAE,UAAU,CAAC,CAAC;IAC7C,CAAC;IAED,OAAO,MAAM,CAAC;AAChB,CAAC"} \ No newline at end of file diff --git a/node_modules/cheerio/dist/commonjs/slim.d.ts b/node_modules/cheerio/dist/commonjs/slim.d.ts deleted file mode 100644 index d00f24a..0000000 --- a/node_modules/cheerio/dist/commonjs/slim.d.ts +++ /dev/null @@ -1,25 +0,0 @@ -/** - * @file Alternative entry point for Cheerio that always uses htmlparser2. This - * way, parse5 won't be loaded, saving some memory. - */ -import { type CheerioAPI } from './load.js'; -import { type CheerioOptions } from './options.js'; -import type { AnyNode } from 'domhandler'; -export { contains, merge } from './static.js'; -export type * from './types.js'; -export type { Cheerio } from './cheerio.js'; -export type { CheerioOptions, HTMLParser2Options } from './options.js'; -export type { CheerioAPI } from './load.js'; -/** - * Create a querying function, bound to a document created from the provided - * markup. - * - * @param content - Markup to be loaded. - * @param options - Options for the created instance. - * @param isDocument - Always `false` here, as we are always using - * `htmlparser2`. - * @returns The loaded document. - * @see {@link https://cheerio.js.org#loading} for additional usage information. - */ -export declare const load: (content: string | AnyNode | AnyNode[] | Buffer, options?: CheerioOptions | null, isDocument?: boolean) => CheerioAPI; -//# sourceMappingURL=slim.d.ts.map \ No newline at end of file diff --git a/node_modules/cheerio/dist/commonjs/slim.d.ts.map b/node_modules/cheerio/dist/commonjs/slim.d.ts.map deleted file mode 100644 index 0efbb21..0000000 --- a/node_modules/cheerio/dist/commonjs/slim.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"slim.d.ts","sourceRoot":"","sources":["../../src/slim.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAAE,KAAK,UAAU,EAAW,MAAM,WAAW,CAAC;AACrD,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,cAAc,CAAC;AAEnD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAI1C,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAC9C,mBAAmB,YAAY,CAAC;AAChC,YAAY,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAC5C,YAAY,EAAE,cAAc,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AACvE,YAAY,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAE5C;;;;;;;;;;GAUG;AACH,eAAO,MAAM,IAAI,EAAE,CACjB,OAAO,EAAE,MAAM,GAAG,OAAO,GAAG,OAAO,EAAE,GAAG,MAAM,EAC9C,OAAO,CAAC,EAAE,cAAc,GAAG,IAAI,EAC/B,UAAU,CAAC,EAAE,OAAO,KACjB,UAAqD,CAAC"} \ No newline at end of file diff --git a/node_modules/cheerio/dist/commonjs/slim.js b/node_modules/cheerio/dist/commonjs/slim.js deleted file mode 100644 index 10f6334..0000000 --- a/node_modules/cheerio/dist/commonjs/slim.js +++ /dev/null @@ -1,30 +0,0 @@ -"use strict"; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.load = exports.merge = exports.contains = void 0; -/** - * @file Alternative entry point for Cheerio that always uses htmlparser2. This - * way, parse5 won't be loaded, saving some memory. - */ -const load_js_1 = require("./load.js"); -const parse_js_1 = require("./parse.js"); -const dom_serializer_1 = __importDefault(require("dom-serializer")); -const htmlparser2_1 = require("htmlparser2"); -var static_js_1 = require("./static.js"); -Object.defineProperty(exports, "contains", { enumerable: true, get: function () { return static_js_1.contains; } }); -Object.defineProperty(exports, "merge", { enumerable: true, get: function () { return static_js_1.merge; } }); -/** - * Create a querying function, bound to a document created from the provided - * markup. - * - * @param content - Markup to be loaded. - * @param options - Options for the created instance. - * @param isDocument - Always `false` here, as we are always using - * `htmlparser2`. - * @returns The loaded document. - * @see {@link https://cheerio.js.org#loading} for additional usage information. - */ -exports.load = (0, load_js_1.getLoad)((0, parse_js_1.getParse)(htmlparser2_1.parseDocument), dom_serializer_1.default); -//# sourceMappingURL=slim.js.map \ No newline at end of file diff --git a/node_modules/cheerio/dist/commonjs/slim.js.map b/node_modules/cheerio/dist/commonjs/slim.js.map deleted file mode 100644 index 8efad96..0000000 --- a/node_modules/cheerio/dist/commonjs/slim.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"slim.js","sourceRoot":"","sources":["../../src/slim.ts"],"names":[],"mappings":";;;;;;AAAA;;;GAGG;AACH,uCAAqD;AAErD,yCAAsC;AAEtC,oEAAoC;AACpC,6CAA4C;AAE5C,yCAA8C;AAArC,qGAAA,QAAQ,OAAA;AAAE,kGAAA,KAAK,OAAA;AAMxB;;;;;;;;;;GAUG;AACU,QAAA,IAAI,GAIC,IAAA,iBAAO,EAAC,IAAA,mBAAQ,EAAC,2BAAa,CAAC,EAAE,wBAAM,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/cheerio/dist/commonjs/static.d.ts b/node_modules/cheerio/dist/commonjs/static.d.ts deleted file mode 100644 index 849a5ed..0000000 --- a/node_modules/cheerio/dist/commonjs/static.d.ts +++ /dev/null @@ -1,112 +0,0 @@ -import type { BasicAcceptedElems } from './types.js'; -import type { CheerioAPI } from './load.js'; -import type { Cheerio } from './cheerio.js'; -import type { AnyNode, Document } from 'domhandler'; -import { type CheerioOptions } from './options.js'; -import type { ExtractedMap, ExtractMap } from './api/extract.js'; -/** - * Renders the document. - * - * @category Static - * @param options - Options for the renderer. - * @returns The rendered document. - */ -export declare function html(this: CheerioAPI, options?: CheerioOptions): string; -/** - * Renders the document. - * - * @category Static - * @param dom - Element to render. - * @param options - Options for the renderer. - * @returns The rendered document. - */ -export declare function html(this: CheerioAPI, dom?: BasicAcceptedElems<AnyNode>, options?: CheerioOptions): string; -/** - * Render the document as XML. - * - * @category Static - * @param dom - Element to render. - * @returns THe rendered document. - */ -export declare function xml(this: CheerioAPI, dom?: BasicAcceptedElems<AnyNode>): string; -/** - * Render the document as text. - * - * This returns the `textContent` of the passed elements. The result will - * include the contents of `<script>` and `<style>` elements. To avoid this, use - * `.prop('innerText')` instead. - * - * @category Static - * @param elements - Elements to render. - * @returns The rendered document. - */ -export declare function text(this: CheerioAPI | void, elements?: ArrayLike<AnyNode>): string; -/** - * Parses a string into an array of DOM nodes. The `context` argument has no - * meaning for Cheerio, but it is maintained for API compatibility with jQuery. - * - * @category Static - * @param data - Markup that will be parsed. - * @param context - Will be ignored. If it is a boolean it will be used as the - * value of `keepScripts`. - * @param keepScripts - If false all scripts will be removed. - * @returns The parsed DOM. - * @alias Cheerio.parseHTML - * @see {@link https://api.jquery.com/jQuery.parseHTML/} - */ -export declare function parseHTML(this: CheerioAPI, data: string, context?: unknown | boolean, keepScripts?: boolean): AnyNode[]; -export declare function parseHTML(this: CheerioAPI, data?: '' | null): null; -/** - * Sometimes you need to work with the top-level root element. To query it, you - * can use `$.root()`. - * - * @category Static - * @example - * - * ```js - * $.root().append('<ul id="vegetables"></ul>').html(); - * //=> <ul id="fruits">...</ul><ul id="vegetables"></ul> - * ``` - * - * @returns Cheerio instance wrapping the root node. - * @alias Cheerio.root - */ -export declare function root(this: CheerioAPI): Cheerio<Document>; -/** - * Checks to see if the `contained` DOM element is a descendant of the - * `container` DOM element. - * - * @category Static - * @param container - Potential parent node. - * @param contained - Potential child node. - * @returns Indicates if the nodes contain one another. - * @alias Cheerio.contains - * @see {@link https://api.jquery.com/jQuery.contains/} - */ -export declare function contains(container: AnyNode, contained: AnyNode): boolean; -/** - * Extract multiple values from a document, and store them in an object. - * - * @category Static - * @param map - An object containing key-value pairs. The keys are the names of - * the properties to be created on the object, and the values are the - * selectors to be used to extract the values. - * @returns An object containing the extracted values. - */ -export declare function extract<M extends ExtractMap>(this: CheerioAPI, map: M): ExtractedMap<M>; -type Writable<T> = { - -readonly [P in keyof T]: T[P]; -}; -/** - * $.merge(). - * - * @category Static - * @param arr1 - First array. - * @param arr2 - Second array. - * @returns `arr1`, with elements of `arr2` inserted. - * @alias Cheerio.merge - * @see {@link https://api.jquery.com/jQuery.merge/} - */ -export declare function merge<T>(arr1: Writable<ArrayLike<T>>, arr2: ArrayLike<T>): ArrayLike<T> | undefined; -export {}; -//# sourceMappingURL=static.d.ts.map \ No newline at end of file diff --git a/node_modules/cheerio/dist/commonjs/static.d.ts.map b/node_modules/cheerio/dist/commonjs/static.d.ts.map deleted file mode 100644 index ebe63f7..0000000 --- a/node_modules/cheerio/dist/commonjs/static.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"static.d.ts","sourceRoot":"","sources":["../../src/static.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AACrD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAC5C,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAC5C,OAAO,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEpD,OAAO,EAEL,KAAK,cAAc,EAEpB,MAAM,cAAc,CAAC;AACtB,OAAO,KAAK,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAwCjE;;;;;;GAMG;AACH,wBAAgB,IAAI,CAAC,IAAI,EAAE,UAAU,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,MAAM,CAAC;AACzE;;;;;;;GAOG;AACH,wBAAgB,IAAI,CAClB,IAAI,EAAE,UAAU,EAChB,GAAG,CAAC,EAAE,kBAAkB,CAAC,OAAO,CAAC,EACjC,OAAO,CAAC,EAAE,cAAc,GACvB,MAAM,CAAC;AA0BV;;;;;;GAMG;AACH,wBAAgB,GAAG,CACjB,IAAI,EAAE,UAAU,EAChB,GAAG,C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.js b/node_modules/cheerio/dist/commonjs/static.js deleted file mode 100644 index 9e93c23..0000000 --- a/node_modules/cheerio/dist/commonjs/static.js +++ /dev/null @@ -1,214 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.html = html; -exports.xml = xml; -exports.text = text; -exports.parseHTML = parseHTML; -exports.root = root; -exports.contains = contains; -exports.extract = extract; -exports.merge = merge; -const domutils_1 = require("domutils"); -const options_js_1 = require("./options.js"); -/** - * Helper function to render a DOM. - * - * @param that - Cheerio instance to render. - * @param dom - The DOM to render. Defaults to `that`'s root. - * @param options - Options for rendering. - * @returns The rendered document. - */ -function render(that, dom, options) { - if (!that) - return ''; - return that(dom !== null && dom !== void 0 ? dom : that._root.children, null, undefined, options).toString(); -} -/** - * Checks if a passed object is an options object. - * - * @param dom - Object to check if it is an options object. - * @param options - Options object. - * @returns Whether the object is an options object. - */ -function isOptions(dom, options) { - return (!options && - typeof dom === 'object' && - dom != null && - !('length' in dom) && - !('type' in dom)); -} -function html(dom, options) { - /* - * Be flexible about parameters, sometimes we call html(), - * with options as only parameter - * check dom argument for dom element specific properties - * assume there is no 'length' or 'type' properties in the options object - */ - const toRender = isOptions(dom) ? ((options = dom), undefined) : dom; - /* - * Sometimes `$.html()` is used without preloading html, - * so fallback non-existing options to the default ones. - */ - const opts = { - ...this === null || this === void 0 ? void 0 : this._options, - ...(0, options_js_1.flattenOptions)(options), - }; - return render(this, toRender, opts); -} -/** - * Render the document as XML. - * - * @category Static - * @param dom - Element to render. - * @returns THe rendered document. - */ -function xml(dom) { - const options = { ...this._options, xmlMode: true }; - return render(this, dom, options); -} -/** - * Render the document as text. - * - * This returns the `textContent` of the passed elements. The result will - * include the contents of `<script>` and `<style>` elements. To avoid this, use - * `.prop('innerText')` instead. - * - * @category Static - * @param elements - Elements to render. - * @returns The rendered document. - */ -function text(elements) { - const elems = elements !== null && elements !== void 0 ? elements : (this ? this.root() : []); - let ret = ''; - for (let i = 0; i < elems.length; i++) { - ret += (0, domutils_1.textContent)(elems[i]); - } - return ret; -} -function parseHTML(data, context, keepScripts = typeof context === 'boolean' ? context : false) { - if (!data || typeof data !== 'string') { - return null; - } - if (typeof context === 'boolean') { - keepScripts = context; - } - const parsed = this.load(data, this._options, false); - if (!keepScripts) { - parsed('script').remove(); - } - /* - * The `children` array is used by Cheerio internally to group elements that - * share the same parents. When nodes created through `parseHTML` are - * inserted into previously-existing DOM structures, they will be removed - * from the `children` array. The results of `parseHTML` should remain - * constant across these operations, so a shallow copy should be returned. - */ - return [...parsed.root()[0].children]; -} -/** - * Sometimes you need to work with the top-level root element. To query it, you - * can use `$.root()`. - * - * @category Static - * @example - * - * ```js - * $.root().append('<ul id="vegetables"></ul>').html(); - * //=> <ul id="fruits">...</ul><ul id="vegetables"></ul> - * ``` - * - * @returns Cheerio instance wrapping the root node. - * @alias Cheerio.root - */ -function root() { - return this(this._root); -} -/** - * Checks to see if the `contained` DOM element is a descendant of the - * `container` DOM element. - * - * @category Static - * @param container - Potential parent node. - * @param contained - Potential child node. - * @returns Indicates if the nodes contain one another. - * @alias Cheerio.contains - * @see {@link https://api.jquery.com/jQuery.contains/} - */ -function contains(container, contained) { - // According to the jQuery API, an element does not "contain" itself - if (contained === container) { - return false; - } - /* - * Step up the descendants, stopping when the root element is reached - * (signaled by `.parent` returning a reference to the same object) - */ - let next = contained; - while (next && next !== next.parent) { - next = next.parent; - if (next === container) { - return true; - } - } - return false; -} -/** - * Extract multiple values from a document, and store them in an object. - * - * @category Static - * @param map - An object containing key-value pairs. The keys are the names of - * the properties to be created on the object, and the values are the - * selectors to be used to extract the values. - * @returns An object containing the extracted values. - */ -function extract(map) { - return this.root().extract(map); -} -/** - * $.merge(). - * - * @category Static - * @param arr1 - First array. - * @param arr2 - Second array. - * @returns `arr1`, with elements of `arr2` inserted. - * @alias Cheerio.merge - * @see {@link https://api.jquery.com/jQuery.merge/} - */ -function merge(arr1, arr2) { - if (!isArrayLike(arr1) || !isArrayLike(arr2)) { - return; - } - let newLength = arr1.length; - const len = +arr2.length; - for (let i = 0; i < len; i++) { - arr1[newLength++] = arr2[i]; - } - arr1.length = newLength; - return arr1; -} -/** - * Checks if an object is array-like. - * - * @category Static - * @param item - Item to check. - * @returns Indicates if the item is array-like. - */ -function isArrayLike(item) { - if (Array.isArray(item)) { - return true; - } - if (typeof item !== 'object' || - item === null || - !('length' in item) || - typeof item.length !== 'number' || - item.length < 0) { - return false; - } - for (let i = 0; i < item.length; i++) { - if (!(i in item)) { - return false; - } - } - return true; -} -//# sourceMappingURL=static.js.map \ No newline at end of file diff --git a/node_modules/cheerio/dist/commonjs/static.js.map b/node_modules/cheerio/dist/commonjs/static.js.map deleted file mode 100644 index c9433e9..0000000 --- a/node_modules/cheerio/dist/commonjs/static.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"static.js","sourceRoot":"","sources":["../../src/static.ts"],"names":[],"mappings":";;AAuEA,oBAuBC;AASD,kBAOC;AAaD,oBAaC;AAsBD,8BA2BC;AAiBD,oBAEC;AAaD,4BAmBC;AAWD,0BAKC;AAcD,sBAeC;AArRD,uCAAuC;AACvC,6CAIsB;AAGtB;;;;;;;GAOG;AACH,SAAS,MAAM,CACb,IAAgB,EAChB,GAA4C,EAC5C,OAAwB;IAExB,IAAI,CAAC,IAAI;QAAE,OAAO,EAAE,CAAC;IAErB,OAAO,IAAI,CAAC,GAAG,aAAH,GAAG,cAAH,GAAG,GAAI,IAAI,CAAC,KAAK,CAAC,QAAQ,EAAE,IAAI,EAAE,SAAS,EAAE,OAAO,CAAC,CAAC,QAAQ,EAAE,CAAC;AAC/E,CAAC;AAED;;;;;;GAMG;AACH,SAAS,SAAS,CAChB,GAAyD,EACzD,OAAwB;IAExB,OAAO,CACL,CAAC,OAAO;QACR,OAAO,GAAG,KAAK,QAAQ;QACvB,GAAG,IAAI,IAAI;QACX,CAAC,CAAC,QAAQ,IAAI,GAAG,CAAC;QAClB,CAAC,CAAC,MAAM,IAAI,GAAG,CAAC,CACjB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/cheerio/dist/commonjs/types.d.ts deleted file mode 100644 index 52289cc..0000000 --- a/node_modules/cheerio/dist/commonjs/types.d.ts +++ /dev/null @@ -1,21 +0,0 @@ -/** @file Types used in signatures of Cheerio methods. */ -type LowercaseLetters = 'a' | 'b' | 'c' | 'd' | 'e' | 'f' | 'g' | 'h' | 'i' | 'j' | 'k' | 'l' | 'm' | 'n' | 'o' | 'p' | 'q' | 'r' | 's' | 't' | 'u' | 'v' | 'w' | 'x' | 'y' | 'z'; -type AlphaNumeric = LowercaseLetters | Uppercase<LowercaseLetters> | `${number}`; -type SelectorSpecial = '.' | '#' | ':' | '|' | '>' | '+' | '~' | '['; -/** - * Type for identifying selectors. Allows us to "upgrade" queries using - * selectors to return `Element`s. - */ -export type SelectorType = `${SelectorSpecial}${AlphaNumeric}${string}` | `${AlphaNumeric}${string}`; -import type { Cheerio } from './cheerio.js'; -import type { AnyNode } from 'domhandler'; -/** Elements that can be passed to manipulation methods. */ -export type BasicAcceptedElems<T extends AnyNode> = ArrayLike<T> | T | string; -/** Elements that can be passed to manipulation methods, including functions. */ -export type AcceptedElems<T extends AnyNode> = BasicAcceptedElems<T> | ((this: T, i: number, el: T) => BasicAcceptedElems<T>); -/** Function signature, for traversal methods. */ -export type FilterFunction<T> = (this: T, i: number, el: T) => boolean; -/** Supported filter types, for traversal methods. */ -export type AcceptedFilters<T> = string | FilterFunction<T> | T | Cheerio<T>; -export {}; -//# sourceMappingURL=types.d.ts.map \ No newline at end of file diff --git a/node_modules/cheerio/dist/commonjs/types.d.ts.map b/node_modules/cheerio/dist/commonjs/types.d.ts.map deleted file mode 100644 index a343d31..0000000 --- a/node_modules/cheerio/dist/commonjs/types.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"AAAA,yDAAyD;AAEzD,KAAK,gBAAgB,GACjB,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH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AC,IAAI,MAAM,GAAG,cAAc,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/cheerio/dist/commonjs/types.js b/node_modules/cheerio/dist/commonjs/types.js deleted file mode 100644 index c47d49e..0000000 --- a/node_modules/cheerio/dist/commonjs/types.js +++ /dev/null @@ -1,4 +0,0 @@ -"use strict"; -/** @file Types used in signatures of Cheerio methods. */ -Object.defineProperty(exports, "__esModule", { value: true }); -//# sourceMappingURL=types.js.map \ No newline at end of file diff --git a/node_modules/cheerio/dist/commonjs/types.js.map b/node_modules/cheerio/dist/commonjs/types.js.map deleted file mode 100644 index 43d531f..0000000 --- a/node_modules/cheerio/dist/commonjs/types.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":";AAAA,yDAAyD"} \ No newline at end of file diff --git a/node_modules/cheerio/dist/commonjs/utils.d.ts b/node_modules/cheerio/dist/commonjs/utils.d.ts deleted file mode 100644 index cbe8a22..0000000 --- a/node_modules/cheerio/dist/commonjs/utils.d.ts +++ /dev/null @@ -1,55 +0,0 @@ -import type { AnyNode } from 'domhandler'; -import type { Cheerio } from './cheerio.js'; -/** - * Checks if an object is a Cheerio instance. - * - * @category Utils - * @param maybeCheerio - The object to check. - * @returns Whether the object is a Cheerio instance. - */ -export declare function isCheerio<T>(maybeCheerio: any): maybeCheerio is Cheerio<T>; -/** - * Convert a string to camel case notation. - * - * @private - * @category Utils - * @param str - The string to be converted. - * @returns String in camel case notation. - */ -export declare function camelCase(str: string): string; -/** - * Convert a string from camel case to "CSS case", where word boundaries are - * described by hyphens ("-") and all characters are lower-case. - * - * @private - * @category Utils - * @param str - The string to be converted. - * @returns String in "CSS case". - */ -export declare function cssCase(str: string): string; -/** - * Iterate over each DOM element without creating intermediary Cheerio - * instances. - * - * This is indented for use internally to avoid otherwise unnecessary memory - * pressure introduced by _make. - * - * @category Utils - * @param array - The array to iterate over. - * @param fn - Function to call. - * @returns The original instance. - */ -export declare function domEach<T extends AnyNode, Arr extends ArrayLike<T> = Cheerio<T>>(array: Arr, fn: (elem: T, index: number) => void): Arr; -/** - * Check if string is HTML. - * - * Tests for a `<` within a string, immediate followed by a letter and - * eventually followed by a `>`. - * - * @private - * @category Utils - * @param str - The string to check. - * @returns Indicates if `str` is HTML. - */ -export declare function isHtml(str: string): boolean; -//# sourceMappingURL=utils.d.ts.map \ No newline at end of file diff --git a/node_modules/cheerio/dist/commonjs/utils.d.ts.map b/node_modules/cheerio/dist/commonjs/utils.d.ts.map deleted file mode 100644 index 6fe0a6e..0000000 --- a/node_modules/cheerio/dist/commonjs/utils.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAC1C,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAE5C;;;;;;GAMG;AACH,wBAAgB,SAAS,CAAC,CAAC,EAAE,YAAY,EAAE,GAAG,GAAG,YAAY,IAAI,OAAO,CAAC,CAAC,CAAC,CAE1E;AAED;;;;;;;GAOG;AACH,wBAAgB,SAAS,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAE7C;AAED;;;;;;;;GAQG;AACH,wBAAgB,OAAO,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAE3C;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,OAAO,CACrB,CAAC,SAAS,OAAO,EACjB,GAAG,SAAS,SAAS,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,EACrC,KAAK,EAAE,GAAG,EAAE,EAAE,EAAE,CAAC,IAAI,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,GAAG,GAAG,CAIvD;AAUD;;;;;;;;;;GAUG;AACH,wBAAgB,MAAM,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAa3C"} \ No newline at end of file diff --git a/node_modules/cheerio/dist/commonjs/utils.js b/node_modules/cheerio/dist/commonjs/utils.js deleted file mode 100644 index 75a3cca..0000000 --- a/node_modules/cheerio/dist/commonjs/utils.js +++ /dev/null @@ -1,88 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.isCheerio = isCheerio; -exports.camelCase = camelCase; -exports.cssCase = cssCase; -exports.domEach = domEach; -exports.isHtml = isHtml; -/** - * Checks if an object is a Cheerio instance. - * - * @category Utils - * @param maybeCheerio - The object to check. - * @returns Whether the object is a Cheerio instance. - */ -function isCheerio(maybeCheerio) { - return maybeCheerio.cheerio != null; -} -/** - * Convert a string to camel case notation. - * - * @private - * @category Utils - * @param str - The string to be converted. - * @returns String in camel case notation. - */ -function camelCase(str) { - return str.replace(/[._-](\w|$)/g, (_, x) => x.toUpperCase()); -} -/** - * Convert a string from camel case to "CSS case", where word boundaries are - * described by hyphens ("-") and all characters are lower-case. - * - * @private - * @category Utils - * @param str - The string to be converted. - * @returns String in "CSS case". - */ -function cssCase(str) { - return str.replace(/[A-Z]/g, '-$&').toLowerCase(); -} -/** - * Iterate over each DOM element without creating intermediary Cheerio - * instances. - * - * This is indented for use internally to avoid otherwise unnecessary memory - * pressure introduced by _make. - * - * @category Utils - * @param array - The array to iterate over. - * @param fn - Function to call. - * @returns The original instance. - */ -function domEach(array, fn) { - const len = array.length; - for (let i = 0; i < len; i++) - fn(array[i], i); - return array; -} -var CharacterCodes; -(function (CharacterCodes) { - CharacterCodes[CharacterCodes["LowerA"] = 97] = "LowerA"; - CharacterCodes[CharacterCodes["LowerZ"] = 122] = "LowerZ"; - CharacterCodes[CharacterCodes["UpperA"] = 65] = "UpperA"; - CharacterCodes[CharacterCodes["UpperZ"] = 90] = "UpperZ"; - CharacterCodes[CharacterCodes["Exclamation"] = 33] = "Exclamation"; -})(CharacterCodes || (CharacterCodes = {})); -/** - * Check if string is HTML. - * - * Tests for a `<` within a string, immediate followed by a letter and - * eventually followed by a `>`. - * - * @private - * @category Utils - * @param str - The string to check. - * @returns Indicates if `str` is HTML. - */ -function isHtml(str) { - const tagStart = str.indexOf('<'); - if (tagStart < 0 || tagStart > str.length - 3) - return false; - const tagChar = str.charCodeAt(tagStart + 1); - return (((tagChar >= CharacterCodes.LowerA && tagChar <= CharacterCodes.LowerZ) || - (tagChar >= CharacterCodes.UpperA && tagChar <= CharacterCodes.UpperZ) || - tagChar === CharacterCodes.Exclamation) && - str.includes('>', tagStart + 2)); -} -//# sourceMappingURL=utils.js.map \ No newline at end of file diff --git a/node_modules/cheerio/dist/commonjs/utils.js.map b/node_modules/cheerio/dist/commonjs/utils.js.map deleted file mode 100644 index 571db39..0000000 --- a/node_modules/cheerio/dist/commonjs/utils.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../src/utils.ts"],"names":[],"mappings":";;AAUA,8BAEC;AAUD,8BAEC;AAWD,0BAEC;AAcD,0BAOC;AAqBD,wBAaC;AAzFD;;;;;;GAMG;AACH,SAAgB,SAAS,CAAI,YAAiB;IAC5C,OAAO,YAAY,CAAC,OAAO,IAAI,IAAI,CAAC;AACtC,CAAC;AAED;;;;;;;GAOG;AACH,SAAgB,SAAS,CAAC,GAAW;IACnC,OAAO,GAAG,CAAC,OAAO,CAAC,cAAc,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC,CAAC;AAChE,CAAC;AAED;;;;;;;;GAQG;AACH,SAAgB,OAAO,CAAC,GAAW;IACjC,OAAO,GAAG,CAAC,OAAO,CAAC,QAAQ,EAAE,KAAK,CAAC,CAAC,WAAW,EAAE,CAAC;AACpD,CAAC;AAED;;;;;;;;;;;GAWG;AACH,SAAgB,OAAO,CAGrB,KAAU,EAAE,EAAoC;IAChD,MAAM,GAAG,GAAG,KAAK,CAAC,MAAM,CAAC;IACzB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,GAAG,EAAE,CAAC,EAAE;QAAE,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;IAC9C,OAAO,KAAK,CAAC;AACf,CAAC;AAED,IAAW,cAMV;AAND,WAAW,cAAc;IACvB,wDAAW,CAAA;IACX,yDAAY,CAAA;IACZ,wDAAW,CAAA;IACX,wDAAW,CAAA;IACX,kEAAgB,CAAA;AAClB,CAAC,EANU,cAAc,KAAd,cAAc,QAMxB;AAED;;;;;;;;;;GAUG;AACH,SAAgB,MAAM,CAAC,GAAW;IAChC,MAAM,QAAQ,GAAG,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;IAElC,IAAI,QAAQ,GAAG,CAAC,IAAI,QAAQ,GAAG,GAAG,CAAC,MAAM,GAAG,CAAC;QAAE,OAAO,KAAK,CAAC;IAE5D,MAAM,OAAO,GAAG,GAAG,CAAC,UAAU,CAAC,QAAQ,GAAG,CAAC,CAAC,CAAC;IAE7C,OAAO,CACL,CAAC,CAAC,OAAO,IAAI,cAAc,CAAC,MAAM,IAAI,OAAO,IAAI,cAAc,CAAC,MAAM,CAAC;QACrE,CAAC,OAAO,IAAI,cAAc,CAAC,MAAM,IAAI,OAAO,IAAI,cAAc,CAAC,MAAM,CAAC;QACtE,OAAO,KAAK,cAAc,CAAC,WAAW,CAAC;QACzC,GAAG,CAAC,QAAQ,CAAC,GAAG,EAAE,QAAQ,GAAG,CAAC,CAAC,CAChC,CAAC;AACJ,CAAC"} \ No newline at end of file diff --git a/node_modules/cheerio/dist/esm/api/attributes.d.ts b/node_modules/cheerio/dist/esm/api/attributes.d.ts deleted file mode 100644 index a358044..0000000 --- a/node_modules/cheerio/dist/esm/api/attributes.d.ts +++ /dev/null @@ -1,385 +0,0 @@ -/** - * Methods for getting and modifying attributes. - * - * @module cheerio/attributes - */ -import { type AnyNode, type Element } from 'domhandler'; -import type { Cheerio } from '../cheerio.js'; -/** - * Method for getting attributes. Gets the attribute value for only the first - * element in the matched set. - * - * @category Attributes - * @example - * - * ```js - * $('ul').attr('id'); - * //=> fruits - * ``` - * - * @param name - Name of the attribute. - * @returns The attribute's value. - * @see {@link https://api.jquery.com/attr/} - */ -export declare function attr<T extends AnyNode>(this: Cheerio<T>, name: string): string | undefined; -/** - * Method for getting all attributes and their values of the first element in - * the matched set. - * - * @category Attributes - * @example - * - * ```js - * $('ul').attr(); - * //=> { id: 'fruits' } - * ``` - * - * @returns The attribute's values. - * @see {@link https://api.jquery.com/attr/} - */ -export declare function attr<T extends AnyNode>(this: Cheerio<T>): Record<string, string> | undefined; -/** - * Method for setting attributes. Sets the attribute value for only the first - * element in the matched set. If you set an attribute's value to `null`, you - * remove that attribute. You may also pass a `map` and `function`. - * - * @category Attributes - * @example - * - * ```js - * $('.apple').attr('id', 'favorite').html(); - * //=> <li class="apple" id="favorite">Apple</li> - * ``` - * - * @param name - Name of the attribute. - * @param value - The new value of the attribute. - * @returns The instance itself. - * @see {@link https://api.jquery.com/attr/} - */ -export declare function attr<T extends AnyNode>(this: Cheerio<T>, name: string, value?: string | null | ((this: Element, i: number, attrib: string) => string | null)): Cheerio<T>; -/** - * Method for setting multiple attributes at once. Sets the attribute value for - * only the first element in the matched set. If you set an attribute's value to - * `null`, you remove that attribute. - * - * @category Attributes - * @example - * - * ```js - * $('.apple').attr({ id: 'favorite' }).html(); - * //=> <li class="apple" id="favorite">Apple</li> - * ``` - * - * @param values - Map of attribute names and values. - * @returns The instance itself. - * @see {@link https://api.jquery.com/attr/} - */ -export declare function attr<T extends AnyNode>(this: Cheerio<T>, values: Record<string, string | null>): Cheerio<T>; -interface StyleProp { - length: number; - [key: string]: string | number; - [index: number]: string; -} -/** - * Method for getting and setting properties. Gets the property value for only - * the first element in the matched set. - * - * @category Attributes - * @example - * - * ```js - * $('input[type="checkbox"]').prop('checked'); - * //=> false - * - * $('input[type="checkbox"]').prop('checked', true).val(); - * //=> ok - * ``` - * - * @param name - Name of the property. - * @returns If `value` is specified the instance itself, otherwise the prop's - * value. - * @see {@link https://api.jquery.com/prop/} - */ -export declare function prop<T extends AnyNode>(this: Cheerio<T>, name: 'tagName' | 'nodeName'): string | undefined; -export declare function prop<T extends AnyNode>(this: Cheerio<T>, name: 'innerHTML' | 'outerHTML' | 'innerText' | 'textContent'): string | null; -/** - * Get a parsed CSS style object. - * - * @param name - Name of the property. - * @returns The style object, or `undefined` if the element has no `style` - * attribute. - */ -export declare function prop<T extends AnyNode>(this: Cheerio<T>, name: 'style'): StyleProp | undefined; -/** - * Resolve `href` or `src` of supported elements. Requires the `baseURI` option - * to be set, and a global `URL` object to be part of the environment. - * - * @example With `baseURI` set to `'https://example.com'`: - * - * ```js - * $('<img src="image.png">').prop('src'); - * //=> 'https://example.com/image.png' - * ``` - * - * @param name - Name of the property. - * @returns The resolved URL, or `undefined` if the element is not supported. - */ -export declare function prop<T extends AnyNode>(this: Cheerio<T>, name: 'href' | 'src'): string | undefined; -/** - * Get a property of an element. - * - * @param name - Name of the property. - * @returns The property's value. - */ -export declare function prop<T extends AnyNode, K extends keyof Element>(this: Cheerio<T>, name: K): Element[K]; -/** - * Set a property of an element. - * - * @param name - Name of the property. - * @param value - Value to set the property to. - * @returns The instance itself. - */ -export declare function prop<T extends AnyNode, K extends keyof Element>(this: Cheerio<T>, name: K, value: Element[K] | ((this: Element, i: number, prop: K) => Element[keyof Element])): Cheerio<T>; -/** - * Set multiple properties of an element. - * - * @example - * - * ```js - * $('input[type="checkbox"]').prop({ - * checked: true, - * disabled: false, - * }); - * ``` - * - * @param map - Object of properties to set. - * @returns The instance itself. - */ -export declare function prop<T extends AnyNode>(this: Cheerio<T>, map: Record<string, string | Element[keyof Element] | boolean>): Cheerio<T>; -/** - * Set a property of an element. - * - * @param name - Name of the property. - * @param value - Value to set the property to. - * @returns The instance itself. - */ -export declare function prop<T extends AnyNode>(this: Cheerio<T>, name: string, value: string | boolean | null | ((this: Element, i: number, prop: string) => string | boolean)): Cheerio<T>; -/** - * Get a property of an element. - * - * @param name - The property's name. - * @returns The property's value. - */ -export declare function prop<T extends AnyNode>(this: Cheerio<T>, name: string): string; -/** - * Method for getting data attributes, for only the first element in the matched - * set. - * - * @category Attributes - * @example - * - * ```js - * $('<div data-apple-color="red"></div>').data('apple-color'); - * //=> 'red' - * ``` - * - * @param name - Name of the data attribute. - * @returns The data attribute's value, or `undefined` if the attribute does not - * exist. - * @see {@link https://api.jquery.com/data/} - */ -export declare function data<T extends AnyNode>(this: Cheerio<T>, name: string): unknown | undefined; -/** - * Method for getting all of an element's data attributes, for only the first - * element in the matched set. - * - * @category Attributes - * @example - * - * ```js - * $('<div data-apple-color="red"></div>').data(); - * //=> { appleColor: 'red' } - * ``` - * - * @returns A map with all of the data attributes. - * @see {@link https://api.jquery.com/data/} - */ -export declare function data<T extends AnyNode>(this: Cheerio<T>): Record<string, unknown>; -/** - * Method for setting data attributes, for only the first element in the matched - * set. - * - * @category Attributes - * @example - * - * ```js - * const apple = $('.apple').data('kind', 'mac'); - * - * apple.data('kind'); - * //=> 'mac' - * ``` - * - * @param name - Name of the data attribute. - * @param value - The new value. - * @returns The instance itself. - * @see {@link https://api.jquery.com/data/} - */ -export declare function data<T extends AnyNode>(this: Cheerio<T>, name: string, value: unknown): Cheerio<T>; -/** - * Method for setting multiple data attributes at once, for only the first - * element in the matched set. - * - * @category Attributes - * @example - * - * ```js - * const apple = $('.apple').data({ kind: 'mac' }); - * - * apple.data('kind'); - * //=> 'mac' - * ``` - * - * @param values - Map of names to values. - * @returns The instance itself. - * @see {@link https://api.jquery.com/data/} - */ -export declare function data<T extends AnyNode>(this: Cheerio<T>, values: Record<string, unknown>): Cheerio<T>; -/** - * Method for getting the value of input, select, and textarea. Note: Support - * for `map`, and `function` has not been added yet. - * - * @category Attributes - * @example - * - * ```js - * $('input[type="text"]').val(); - * //=> input_text - * ``` - * - * @returns The value. - * @see {@link https://api.jquery.com/val/} - */ -export declare function val<T extends AnyNode>(this: Cheerio<T>): string | undefined | string[]; -/** - * Method for setting the value of input, select, and textarea. Note: Support - * for `map`, and `function` has not been added yet. - * - * @category Attributes - * @example - * - * ```js - * $('input[type="text"]').val('test').html(); - * //=> <input type="text" value="test"/> - * ``` - * - * @param value - The new value. - * @returns The instance itself. - * @see {@link https://api.jquery.com/val/} - */ -export declare function val<T extends AnyNode>(this: Cheerio<T>, value: string | string[]): Cheerio<T>; -/** - * Method for removing attributes by `name`. - * - * @category Attributes - * @example - * - * ```js - * $('.pear').removeAttr('class').html(); - * //=> <li>Pear</li> - * - * $('.apple').attr('id', 'favorite'); - * $('.apple').removeAttr('id class').html(); - * //=> <li>Apple</li> - * ``` - * - * @param name - Name of the attribute. - * @returns The instance itself. - * @see {@link https://api.jquery.com/removeAttr/} - */ -export declare function removeAttr<T extends AnyNode>(this: Cheerio<T>, name: string): Cheerio<T>; -/** - * Check to see if _any_ of the matched elements have the given `className`. - * - * @category Attributes - * @example - * - * ```js - * $('.pear').hasClass('pear'); - * //=> true - * - * $('apple').hasClass('fruit'); - * //=> false - * - * $('li').hasClass('pear'); - * //=> true - * ``` - * - * @param className - Name of the class. - * @returns Indicates if an element has the given `className`. - * @see {@link https://api.jquery.com/hasClass/} - */ -export declare function hasClass<T extends AnyNode>(this: Cheerio<T>, className: string): boolean; -/** - * Adds class(es) to all of the matched elements. Also accepts a `function`. - * - * @category Attributes - * @example - * - * ```js - * $('.pear').addClass('fruit').html(); - * //=> <li class="pear fruit">Pear</li> - * - * $('.apple').addClass('fruit red').html(); - * //=> <li class="apple fruit red">Apple</li> - * ``` - * - * @param value - Name of new class. - * @returns The instance itself. - * @see {@link https://api.jquery.com/addClass/} - */ -export declare function addClass<T extends AnyNode, R extends ArrayLike<T>>(this: R, value?: string | ((this: Element, i: number, className: string) => string | undefined)): R; -/** - * Removes one or more space-separated classes from the selected elements. If no - * `className` is defined, all classes will be removed. Also accepts a - * `function`. - * - * @category Attributes - * @example - * - * ```js - * $('.pear').removeClass('pear').html(); - * //=> <li class="">Pear</li> - * - * $('.apple').addClass('red').removeClass().html(); - * //=> <li class="">Apple</li> - * ``` - * - * @param name - Name of the class. If not specified, removes all elements. - * @returns The instance itself. - * @see {@link https://api.jquery.com/removeClass/} - */ -export declare function removeClass<T extends AnyNode, R extends ArrayLike<T>>(this: R, name?: string | ((this: Element, i: number, className: string) => string | undefined)): R; -/** - * Add or remove class(es) from the matched elements, depending on either the - * class's presence or the value of the switch argument. Also accepts a - * `function`. - * - * @category Attributes - * @example - * - * ```js - * $('.apple.green').toggleClass('fruit green red').html(); - * //=> <li class="apple fruit red">Apple</li> - * - * $('.apple.green').toggleClass('fruit green red', true).html(); - * //=> <li class="apple green fruit red">Apple</li> - * ``` - * - * @param value - Name of the class. Can also be a function. - * @param stateVal - If specified the state of the class. - * @returns The instance itself. - * @see {@link https://api.jquery.com/toggleClass/} - */ -export declare function toggleClass<T extends AnyNode, R extends ArrayLike<T>>(this: R, value?: string | ((this: Element, i: number, className: string, stateVal?: boolean) => string), stateVal?: boolean): R; -export {}; -//# sourceMappingURL=attributes.d.ts.map \ No newline at end of file diff --git a/node_modules/cheerio/dist/esm/api/attributes.d.ts.map b/node_modules/cheerio/dist/esm/api/attributes.d.ts.map deleted file mode 100644 index 1e09a61..0000000 --- a/node_modules/cheerio/dist/esm/api/attributes.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"attributes.d.ts","sourceRoot":"","sources":["../../../src/api/attributes.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,OAAO,EAAS,KAAK,OAAO,EAAE,KAAK,OAAO,EAAE,MAAM,YAAY,CAAC;AAC/D,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAwF7C;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,IAAI,CAAC,CAAC,SAAS,OAAO,EACpC,IAAI,EAAE,OAAO,CAAC,CAAC,CAAC,EAChB,IAAI,EAAE,MAAM,GACX,MAAM,GAAG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;;;;;;;;;;;;GAoBG;AACH,wBAAgB,WAAW,CAAC,CAAC,SAAS,OAAO,EAAE,CAAC,SAAS,SAAS,CAAC,CAAC,CAAC,EACnE,IAAI,EAAE,CAAC,EACP,KAAK,CAAC,EACF,MAAM,GACN,CAAC,CACC,IAAI,EAAE,OAAO,EACb,CAAC,EAAE,MAAM,EACT,SAAS,EAAE,MAAM,EACjB,QAAQ,CAAC,EAAE,OAAO,KACf,MAAM,CAAC,EAChB,QAAQ,CAAC,EAAE,OAAO,GACjB,CAAC,CA+CH"} \ No newline at end of file diff --git a/node_modules/cheerio/dist/esm/api/attributes.js b/node_modules/cheerio/dist/esm/api/attributes.js deleted file mode 100644 index 0782b5b..0000000 --- a/node_modules/cheerio/dist/esm/api/attributes.js +++ /dev/null @@ -1,619 +0,0 @@ -/** - * Methods for getting and modifying attributes. - * - * @module cheerio/attributes - */ -import { text } from '../static.js'; -import { domEach, camelCase, cssCase } from '../utils.js'; -import { isTag } from 'domhandler'; -import { innerText, textContent } from 'domutils'; -const hasOwn = Object.prototype.hasOwnProperty; -const rspace = /\s+/; -const dataAttrPrefix = 'data-'; -// Attributes that are booleans -const rboolean = /^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i; -// Matches strings that look like JSON objects or arrays -const rbrace = /^{[^]*}$|^\[[^]*]$/; -function getAttr(elem, name, xmlMode) { - var _a; - if (!elem || !isTag(elem)) - return undefined; - (_a = elem.attribs) !== null && _a !== void 0 ? _a : (elem.attribs = {}); - // Return the entire attribs object if no attribute specified - if (!name) { - return elem.attribs; - } - if (hasOwn.call(elem.attribs, name)) { - // Get the (decoded) attribute - return !xmlMode && rboolean.test(name) ? name : elem.attribs[name]; - } - // Mimic the DOM and return text content as value for `option's` - if (elem.name === 'option' && name === 'value') { - return text(elem.children); - } - // Mimic DOM with default value for radios/checkboxes - if (elem.name === 'input' && - (elem.attribs['type'] === 'radio' || elem.attribs['type'] === 'checkbox') && - name === 'value') { - return 'on'; - } - return undefined; -} -/** - * Sets the value of an attribute. The attribute will be deleted if the value is - * `null`. - * - * @private - * @param el - The element to set the attribute on. - * @param name - The attribute's name. - * @param value - The attribute's value. - */ -function setAttr(el, name, value) { - if (value === null) { - removeAttribute(el, name); - } - else { - el.attribs[name] = `${value}`; - } -} -export function attr(name, value) { - // Set the value (with attr map support) - if (typeof name === 'object' || value !== undefined) { - if (typeof value === 'function') { - if (typeof name !== 'string') { - { - throw new Error('Bad combination of arguments.'); - } - } - return domEach(this, (el, i) => { - if (isTag(el)) - setAttr(el, name, value.call(el, i, el.attribs[name])); - }); - } - return domEach(this, (el) => { - if (!isTag(el)) - return; - if (typeof name === 'object') { - for (const objName of Object.keys(name)) { - const objValue = name[objName]; - setAttr(el, objName, objValue); - } - } - else { - setAttr(el, name, value); - } - }); - } - return arguments.length > 1 - ? this - : getAttr(this[0], name, this.options.xmlMode); -} -/** - * Gets a node's prop. - * - * @private - * @category Attributes - * @param el - Element to get the prop of. - * @param name - Name of the prop. - * @param xmlMode - Disable handling of special HTML attributes. - * @returns The prop's value. - */ -function getProp(el, name, xmlMode) { - return name in el - ? // @ts-expect-error TS doesn't like us accessing the value directly here. - el[name] - : !xmlMode && rboolean.test(name) - ? getAttr(el, name, false) !== undefined - : getAttr(el, name, xmlMode); -} -/** - * Sets the value of a prop. - * - * @private - * @param el - The element to set the prop on. - * @param name - The prop's name. - * @param value - The prop's value. - * @param xmlMode - Disable handling of special HTML attributes. - */ -function setProp(el, name, value, xmlMode) { - if (name in el) { - // @ts-expect-error Overriding value - el[name] = value; - } - else { - setAttr(el, name, !xmlMode && rboolean.test(name) ? (value ? '' : null) : `${value}`); - } -} -export function prop(name, value) { - var _a; - if (typeof name === 'string' && value === undefined) { - const el = this[0]; - if (!el || !isTag(el)) - return undefined; - switch (name) { - case 'style': { - const property = this.css(); - const keys = Object.keys(property); - for (let i = 0; i < keys.length; i++) { - property[i] = keys[i]; - } - property.length = keys.length; - return property; - } - case 'tagName': - case 'nodeName': { - return el.name.toUpperCase(); - } - case 'href': - case 'src': { - const prop = (_a = el.attribs) === null || _a === void 0 ? void 0 : _a[name]; - if (typeof URL !== 'undefined' && - ((name === 'href' && (el.tagName === 'a' || el.tagName === 'link')) || - (name === 'src' && - (el.tagName === 'img' || - el.tagName === 'iframe' || - el.tagName === 'audio' || - el.tagName === 'video' || - el.tagName === 'source'))) && - prop !== undefined && - this.options.baseURI) { - return new URL(prop, this.options.baseURI).href; - } - return prop; - } - case 'innerText': { - return innerText(el); - } - case 'textContent': { - return textContent(el); - } - case 'outerHTML': { - return this.clone().wrap('<container />').parent().html(); - } - case 'innerHTML': { - return this.html(); - } - default: { - return getProp(el, name, this.options.xmlMode); - } - } - } - if (typeof name === 'object' || value !== undefined) { - if (typeof value === 'function') { - if (typeof name === 'object') { - throw new TypeError('Bad combination of arguments.'); - } - return domEach(this, (el, i) => { - if (isTag(el)) { - setProp(el, name, value.call(el, i, getProp(el, name, this.options.xmlMode)), this.options.xmlMode); - } - }); - } - return domEach(this, (el) => { - if (!isTag(el)) - return; - if (typeof name === 'object') { - for (const key of Object.keys(name)) { - const val = name[key]; - setProp(el, key, val, this.options.xmlMode); - } - } - else { - setProp(el, name, value, this.options.xmlMode); - } - }); - } - return undefined; -} -/** - * Sets the value of a data attribute. - * - * @private - * @param elem - The element to set the data attribute on. - * @param name - The data attribute's name. - * @param value - The data attribute's value. - */ -function setData(elem, name, value) { - var _a; - (_a = elem.data) !== null && _a !== void 0 ? _a : (elem.data = {}); - if (typeof name === 'object') - Object.assign(elem.data, name); - else if (typeof name === 'string' && value !== undefined) { - elem.data[name] = value; - } -} -/** - * Read _all_ HTML5 `data-*` attributes from the equivalent HTML5 `data-*` - * attribute, and cache the value in the node's internal data store. - * - * @private - * @category Attributes - * @param el - Element to get the data attribute of. - * @returns A map with all of the data attributes. - */ -function readAllData(el) { - for (const domName of Object.keys(el.attribs)) { - if (!domName.startsWith(dataAttrPrefix)) { - continue; - } - const jsName = camelCase(domName.slice(dataAttrPrefix.length)); - if (!hasOwn.call(el.data, jsName)) { - el.data[jsName] = parseDataValue(el.attribs[domName]); - } - } - return el.data; -} -/** - * Read the specified attribute from the equivalent HTML5 `data-*` attribute, - * and (if present) cache the value in the node's internal data store. - * - * @private - * @category Attributes - * @param el - Element to get the data attribute of. - * @param name - Name of the data attribute. - * @returns The data attribute's value. - */ -function readData(el, name) { - const domName = dataAttrPrefix + cssCase(name); - const data = el.data; - if (hasOwn.call(data, name)) { - return data[name]; - } - if (hasOwn.call(el.attribs, domName)) { - return (data[name] = parseDataValue(el.attribs[domName])); - } - return undefined; -} -/** - * Coerce string data-* attributes to their corresponding JavaScript primitives. - * - * @private - * @category Attributes - * @param value - The value to parse. - * @returns The parsed value. - */ -function parseDataValue(value) { - if (value === 'null') - return null; - if (value === 'true') - return true; - if (value === 'false') - return false; - const num = Number(value); - if (value === String(num)) - return num; - if (rbrace.test(value)) { - try { - return JSON.parse(value); - } - catch { - /* Ignore */ - } - } - return value; -} -export function data(name, value) { - var _a; - const elem = this[0]; - if (!elem || !isTag(elem)) - return; - const dataEl = elem; - (_a = dataEl.data) !== null && _a !== void 0 ? _a : (dataEl.data = {}); - // Return the entire data object if no data specified - if (name == null) { - return readAllData(dataEl); - } - // Set the value (with attr map support) - if (typeof name === 'object' || value !== undefined) { - domEach(this, (el) => { - if (isTag(el)) { - if (typeof name === 'object') - setData(el, name); - else - setData(el, name, value); - } - }); - return this; - } - return readData(dataEl, name); -} -export function val(value) { - const querying = arguments.length === 0; - const element = this[0]; - if (!element || !isTag(element)) - return querying ? undefined : this; - switch (element.name) { - case 'textarea': { - return this.text(value); - } - case 'select': { - const option = this.find('option:selected'); - if (!querying) { - if (this.attr('multiple') == null && typeof value === 'object') { - return this; - } - this.find('option').removeAttr('selected'); - const values = typeof value === 'object' ? value : [value]; - for (const val of values) { - this.find(`option[value="${val}"]`).attr('selected', ''); - } - return this; - } - return this.attr('multiple') - ? option.toArray().map((el) => text(el.children)) - : option.attr('value'); - } - case 'input': - case 'option': { - return querying - ? this.attr('value') - : this.attr('value', value); - } - } - return undefined; -} -/** - * Remove an attribute. - * - * @private - * @param elem - Node to remove attribute from. - * @param name - Name of the attribute to remove. - */ -function removeAttribute(elem, name) { - if (!elem.attribs || !hasOwn.call(elem.attribs, name)) - return; - delete elem.attribs[name]; -} -/** - * Splits a space-separated list of names to individual names. - * - * @category Attributes - * @param names - Names to split. - * @returns - Split names. - */ -function splitNames(names) { - return names ? names.trim().split(rspace) : []; -} -/** - * Method for removing attributes by `name`. - * - * @category Attributes - * @example - * - * ```js - * $('.pear').removeAttr('class').html(); - * //=> <li>Pear</li> - * - * $('.apple').attr('id', 'favorite'); - * $('.apple').removeAttr('id class').html(); - * //=> <li>Apple</li> - * ``` - * - * @param name - Name of the attribute. - * @returns The instance itself. - * @see {@link https://api.jquery.com/removeAttr/} - */ -export function removeAttr(name) { - const attrNames = splitNames(name); - for (const attrName of attrNames) { - domEach(this, (elem) => { - if (isTag(elem)) - removeAttribute(elem, attrName); - }); - } - return this; -} -/** - * Check to see if _any_ of the matched elements have the given `className`. - * - * @category Attributes - * @example - * - * ```js - * $('.pear').hasClass('pear'); - * //=> true - * - * $('apple').hasClass('fruit'); - * //=> false - * - * $('li').hasClass('pear'); - * //=> true - * ``` - * - * @param className - Name of the class. - * @returns Indicates if an element has the given `className`. - * @see {@link https://api.jquery.com/hasClass/} - */ -export function hasClass(className) { - return this.toArray().some((elem) => { - const clazz = isTag(elem) && elem.attribs['class']; - let idx = -1; - if (clazz && className.length > 0) { - while ((idx = clazz.indexOf(className, idx + 1)) > -1) { - const end = idx + className.length; - if ((idx === 0 || rspace.test(clazz[idx - 1])) && - (end === clazz.length || rspace.test(clazz[end]))) { - return true; - } - } - } - return false; - }); -} -/** - * Adds class(es) to all of the matched elements. Also accepts a `function`. - * - * @category Attributes - * @example - * - * ```js - * $('.pear').addClass('fruit').html(); - * //=> <li class="pear fruit">Pear</li> - * - * $('.apple').addClass('fruit red').html(); - * //=> <li class="apple fruit red">Apple</li> - * ``` - * - * @param value - Name of new class. - * @returns The instance itself. - * @see {@link https://api.jquery.com/addClass/} - */ -export function addClass(value) { - // Support functions - if (typeof value === 'function') { - return domEach(this, (el, i) => { - if (isTag(el)) { - const className = el.attribs['class'] || ''; - addClass.call([el], value.call(el, i, className)); - } - }); - } - // Return if no value or not a string or function - if (!value || typeof value !== 'string') - return this; - const classNames = value.split(rspace); - const numElements = this.length; - for (let i = 0; i < numElements; i++) { - const el = this[i]; - // If selected element isn't a tag, move on - if (!isTag(el)) - continue; - // If we don't already have classes — always set xmlMode to false here, as it doesn't matter for classes - const className = getAttr(el, 'class', false); - if (className) { - let setClass = ` ${className} `; - // Check if class already exists - for (const cn of classNames) { - const appendClass = `${cn} `; - if (!setClass.includes(` ${appendClass}`)) - setClass += appendClass; - } - setAttr(el, 'class', setClass.trim()); - } - else { - setAttr(el, 'class', classNames.join(' ').trim()); - } - } - return this; -} -/** - * Removes one or more space-separated classes from the selected elements. If no - * `className` is defined, all classes will be removed. Also accepts a - * `function`. - * - * @category Attributes - * @example - * - * ```js - * $('.pear').removeClass('pear').html(); - * //=> <li class="">Pear</li> - * - * $('.apple').addClass('red').removeClass().html(); - * //=> <li class="">Apple</li> - * ``` - * - * @param name - Name of the class. If not specified, removes all elements. - * @returns The instance itself. - * @see {@link https://api.jquery.com/removeClass/} - */ -export function removeClass(name) { - // Handle if value is a function - if (typeof name === 'function') { - return domEach(this, (el, i) => { - if (isTag(el)) { - removeClass.call([el], name.call(el, i, el.attribs['class'] || '')); - } - }); - } - const classes = splitNames(name); - const numClasses = classes.length; - const removeAll = arguments.length === 0; - return domEach(this, (el) => { - if (!isTag(el)) - return; - if (removeAll) { - // Short circuit the remove all case as this is the nice one - el.attribs['class'] = ''; - } - else { - const elClasses = splitNames(el.attribs['class']); - let changed = false; - for (let j = 0; j < numClasses; j++) { - const index = elClasses.indexOf(classes[j]); - if (index >= 0) { - elClasses.splice(index, 1); - changed = true; - /* - * We have to do another pass to ensure that there are not duplicate - * classes listed - */ - j--; - } - } - if (changed) { - el.attribs['class'] = elClasses.join(' '); - } - } - }); -} -/** - * Add or remove class(es) from the matched elements, depending on either the - * class's presence or the value of the switch argument. Also accepts a - * `function`. - * - * @category Attributes - * @example - * - * ```js - * $('.apple.green').toggleClass('fruit green red').html(); - * //=> <li class="apple fruit red">Apple</li> - * - * $('.apple.green').toggleClass('fruit green red', true).html(); - * //=> <li class="apple green fruit red">Apple</li> - * ``` - * - * @param value - Name of the class. Can also be a function. - * @param stateVal - If specified the state of the class. - * @returns The instance itself. - * @see {@link https://api.jquery.com/toggleClass/} - */ -export function toggleClass(value, stateVal) { - // Support functions - if (typeof value === 'function') { - return domEach(this, (el, i) => { - if (isTag(el)) { - toggleClass.call([el], value.call(el, i, el.attribs['class'] || '', stateVal), stateVal); - } - }); - } - // Return if no value or not a string or function - if (!value || typeof value !== 'string') - return this; - const classNames = value.split(rspace); - const numClasses = classNames.length; - const state = typeof stateVal === 'boolean' ? (stateVal ? 1 : -1) : 0; - const numElements = this.length; - for (let i = 0; i < numElements; i++) { - const el = this[i]; - // If selected element isn't a tag, move on - if (!isTag(el)) - continue; - const elementClasses = splitNames(el.attribs['class']); - // Check if class already exists - for (let j = 0; j < numClasses; j++) { - // Check if the class name is currently defined - const index = elementClasses.indexOf(classNames[j]); - // Add if stateValue === true or we are toggling and there is no value - if (state >= 0 && index < 0) { - elementClasses.push(classNames[j]); - } - else if (state <= 0 && index >= 0) { - // Otherwise remove but only if the item exists - elementClasses.splice(index, 1); - } - } - el.attribs['class'] = elementClasses.join(' '); - } - return this; -} -//# sourceMappingURL=attributes.js.map \ No newline at end of file diff --git a/node_modules/cheerio/dist/esm/api/attributes.js.map b/node_modules/cheerio/dist/esm/api/attributes.js.map deleted file mode 100644 index 1c70ce1..0000000 --- a/node_modules/cheerio/dist/esm/api/attributes.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"attributes.js","sourceRoot":"","sources":["../../../src/api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,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC;YACrC,CAAC;iBAAM,IAAI,KAAK,IAAI,CAAC,IAAI,KAAK,IAAI,CAAC,EAAE,CAAC;gBACpC,+CAA+C;gBAC/C,cAAc,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC;YAClC,CAAC;QACH,CAAC;QAED,EAAE,CAAC,OAAO,CAAC,OAAO,CAAC,GAAG,cAAc,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IACjD,CAAC;IAED,OAAO,IAAI,CAAC;AACd,CAAC"} \ No newline at end of file diff --git a/node_modules/cheerio/dist/esm/api/css.d.ts b/node_modules/cheerio/dist/esm/api/css.d.ts deleted file mode 100644 index 9997f34..0000000 --- a/node_modules/cheerio/dist/esm/api/css.d.ts +++ /dev/null @@ -1,42 +0,0 @@ -import { type Element, type AnyNode } from 'domhandler'; -import type { Cheerio } from '../cheerio.js'; -/** - * Get the value of a style property for the first element in the set of matched - * elements. - * - * @category CSS - * @param names - Optionally the names of the properties of interest. - * @returns A map of all of the style properties. - * @see {@link https://api.jquery.com/css/} - */ -export declare function css<T extends AnyNode>(this: Cheerio<T>, names?: string[]): Record<string, string> | undefined; -/** - * Get the value of a style property for the first element in the set of matched - * elements. - * - * @category CSS - * @param name - The name of the property. - * @returns The property value for the given name. - * @see {@link https://api.jquery.com/css/} - */ -export declare function css<T extends AnyNode>(this: Cheerio<T>, name: string): string | undefined; -/** - * Set one CSS property for every matched element. - * - * @category CSS - * @param prop - The name of the property. - * @param val - The new value. - * @returns The instance itself. - * @see {@link https://api.jquery.com/css/} - */ -export declare function css<T extends AnyNode>(this: Cheerio<T>, prop: string, val: string | ((this: Element, i: number, style: string) => string | undefined)): Cheerio<T>; -/** - * Set multiple CSS properties for every matched element. - * - * @category CSS - * @param map - A map of property names and values. - * @returns The instance itself. - * @see {@link https://api.jquery.com/css/} - */ -export declare function css<T extends AnyNode>(this: Cheerio<T>, map: Record<string, string>): Cheerio<T>; -//# sourceMappingURL=css.d.ts.map \ No newline at end of file diff --git a/node_modules/cheerio/dist/esm/api/css.d.ts.map b/node_modules/cheerio/dist/esm/api/css.d.ts.map deleted file mode 100644 index 06bff02..0000000 --- a/node_modules/cheerio/dist/esm/api/css.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"css.d.ts","sourceRoot":"","sources":["../../../src/api/css.ts"],"names":[],"mappings":"AACA,OAAO,EAAS,KAAK,OAAO,EAAE,KAAK,OAAO,EAAE,MAAM,YAAY,CAAC;AAC/D,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAE7C;;;;;;;;GAQG;AACH,wBAAgB,GAAG,CAAC,CAAC,SAAS,OAAO,EACnC,IAAI,EAAE,OAAO,CAAC,CAAC,CAAC,EAChB,KAAK,CAAC,EAAE,MAAM,EAAE,GACf,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,SAAS,CAAC;AACtC;;;;;;;;GAQG;AACH,wBAAgB,GAAG,CAAC,CAAC,SAAS,OAAO,EACnC,IAAI,EAAE,OAAO,CAAC,CAAC,CAAC,EAChB,IAAI,EAAE,MAAM,GACX,MAAM,GAAG,SAAS,CAAC;AACtB;;;;;;;;GAQG;AACH,wBAAgB,GAAG,CAAC,CAAC,SAAS,OAAO,EACnC,IAAI,EAAE,OAAO,CAAC,CAAC,CAAC,EAChB,IAAI,EAAE,MAAM,EACZ,GAAG,EACC,MAAM,GACN,CAAC,CAAC,IAAI,EAAE,OAAO,EAAE,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,KAAK,MAAM,GAAG,SAAS,CAAC,GACpE,OAAO,CAAC,CAAC,CAAC,CAAC;AACd;;;;;;;GAOG;AACH,wBAAgB,GAAG,CAAC,CAAC,SAAS,OAAO,EACnC,IAAI,EAAE,OAAO,CAAC,CAAC,CAAC,EAChB,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAC1B,OAAO,CAAC,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/cheerio/dist/esm/api/css.js b/node_modules/cheerio/dist/esm/api/css.js deleted file mode 100644 index 0c000ec..0000000 --- a/node_modules/cheerio/dist/esm/api/css.js +++ /dev/null @@ -1,116 +0,0 @@ -import { domEach } from '../utils.js'; -import { isTag } from 'domhandler'; -/** - * Set multiple CSS properties for every matched element. - * - * @category CSS - * @param prop - The names of the properties. - * @param val - The new values. - * @returns The instance itself. - * @see {@link https://api.jquery.com/css/} - */ -export function css(prop, val) { - if ((prop != null && val != null) || - // When `prop` is a "plain" object - (typeof prop === 'object' && !Array.isArray(prop))) { - return domEach(this, (el, i) => { - if (isTag(el)) { - // `prop` can't be an array here anymore. - setCss(el, prop, val, i); - } - }); - } - if (this.length === 0) { - return undefined; - } - return getCss(this[0], prop); -} -/** - * Set styles of all elements. - * - * @private - * @param el - Element to set style of. - * @param prop - Name of property. - * @param value - Value to set property to. - * @param idx - Optional index within the selection. - */ -function setCss(el, prop, value, idx) { - if (typeof prop === 'string') { - const styles = getCss(el); - const val = typeof value === 'function' ? value.call(el, idx, styles[prop]) : value; - if (val === '') { - delete styles[prop]; - } - else if (val != null) { - styles[prop] = val; - } - el.attribs['style'] = stringify(styles); - } - else if (typeof prop === 'object') { - const keys = Object.keys(prop); - for (let i = 0; i < keys.length; i++) { - const k = keys[i]; - setCss(el, k, prop[k], i); - } - } -} -function getCss(el, prop) { - if (!el || !isTag(el)) - return; - const styles = parse(el.attribs['style']); - if (typeof prop === 'string') { - return styles[prop]; - } - if (Array.isArray(prop)) { - const newStyles = {}; - for (const item of prop) { - if (styles[item] != null) { - newStyles[item] = styles[item]; - } - } - return newStyles; - } - return styles; -} -/** - * Stringify `obj` to styles. - * - * @private - * @category CSS - * @param obj - Object to stringify. - * @returns The serialized styles. - */ -function stringify(obj) { - return Object.keys(obj).reduce((str, prop) => `${str}${str ? ' ' : ''}${prop}: ${obj[prop]};`, ''); -} -/** - * Parse `styles`. - * - * @private - * @category CSS - * @param styles - Styles to be parsed. - * @returns The parsed styles. - */ -function parse(styles) { - styles = (styles || '').trim(); - if (!styles) - return {}; - const obj = {}; - let key; - for (const str of styles.split(';')) { - const n = str.indexOf(':'); - // If there is no :, or if it is the first/last character, add to the previous item's value - if (n < 1 || n === str.length - 1) { - const trimmed = str.trimEnd(); - if (trimmed.length > 0 && key !== undefined) { - obj[key] += `;${trimmed}`; - } - } - else { - key = str.slice(0, n).trim(); - obj[key] = str.slice(n + 1).trim(); - } - } - return obj; -} -//# sourceMappingURL=css.js.map \ No newline at end of file diff --git a/node_modules/cheerio/dist/esm/api/css.js.map b/node_modules/cheerio/dist/esm/api/css.js.map deleted file mode 100644 index d09cdaf..0000000 --- a/node_modules/cheerio/dist/esm/api/css.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"css.js","sourceRoot":"","sources":["../../../src/api/css.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AACtC,OAAO,EAAE,KAAK,EAA8B,MAAM,YAAY,CAAC;AAyD/D;;;;;;;;GAQG;AACH,MAAM,UAAU,GAAG,CAEjB,IAAiD,EACjD,GAEqE;IAErE,IACE,CAAC,IAAI,IAAI,IAAI,IAAI,GAAG,IAAI,IAAI,CAAC;QAC7B,kCAAkC;QAClC,CAAC,OAAO,IAAI,KAAK,QAAQ,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,EAClD,CAAC;QACD,OAAO,OAAO,CAAC,IAAI,EAAE,CAAC,EAAE,EAAE,CAAC,EAAE,EAAE;YAC7B,IAAI,KAAK,CAAC,EAAE,CAAC,EAAE,CAAC;gBACd,yCAAyC;gBACzC,MAAM,CAAC,EAAE,EAAE,IAAc,EAAE,GAAG,EAAE,CAAC,CAAC,CAAC;YACrC,CAAC;QACH,CAAC,CAAC,CAAC;IACL,CAAC;IAED,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC,EAAE,CAA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CAAC;QACpC,MAAM,CAAC,GAAG,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;QAC3B,2FAA2F;QAC3F,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,KAAK,GAAG,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YAClC,MAAM,OAAO,GAAG,GAAG,CAAC,OAAO,EAAE,CAAC;YAC9B,IAAI,OAAO,CAAC,MAAM,GAAG,CAAC,IAAI,GAAG,KAAK,SAAS,EAAE,CAAC;gBAC5C,GAAG,CAAC,GAAG,CAAC,IAAI,IAAI,OAAO,EAAE,CAAC;YAC5B,CAAC;QACH,CAAC;aAAM,CAAC;YACN,GAAG,GAAG,GAAG,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;YAC7B,GAAG,CAAC,GAAG,CAAC,GAAG,GAAG,CAAC,KAAK,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;QACrC,CAAC;IACH,CAAC;IAED,OAAO,GAAG,CAAC;AACb,CAAC"} \ No newline at end of file diff --git a/node_modules/cheerio/dist/esm/api/extract.d.ts b/node_modules/cheerio/dist/esm/api/extract.d.ts deleted file mode 100644 index b8d73a7..0000000 --- a/node_modules/cheerio/dist/esm/api/extract.d.ts +++ /dev/null @@ -1,29 +0,0 @@ -import type { AnyNode, Element } from 'domhandler'; -import type { Cheerio } from '../cheerio.js'; -import type { prop } from './attributes.js'; -type ExtractDescriptorFn = (el: Element, key: string, obj: Record<string, unknown>) => unknown; -interface ExtractDescriptor { - selector: string; - value?: string | ExtractDescriptorFn | ExtractMap; -} -type ExtractValue = string | ExtractDescriptor | [string | ExtractDescriptor]; -export interface ExtractMap { - [key: string]: ExtractValue; -} -type ExtractedValue<V extends ExtractValue, M extends ExtractMap> = V extends [ - string | ExtractDescriptor -] ? NonNullable<ExtractedValue<V[0], M>>[] : V extends string ? string | undefined : V extends ExtractDescriptor ? V['value'] extends ExtractMap ? ExtractedMap<V['value']> | undefined : V['value'] extends ExtractDescriptorFn ? ReturnType<V['value']> | undefined : ReturnType<typeof prop> | undefined : never; -export type ExtractedMap<M extends ExtractMap> = { - [key in keyof M]: ExtractedValue<M[key], M>; -}; -/** - * Extract multiple values from a document, and store them in an object. - * - * @param map - An object containing key-value pairs. The keys are the names of - * the properties to be created on the object, and the values are the - * selectors to be used to extract the values. - * @returns An object containing the extracted values. - */ -export declare function extract<M extends ExtractMap, T extends AnyNode>(this: Cheerio<T>, map: M): ExtractedMap<M>; -export {}; -//# sourceMappingURL=extract.d.ts.map \ No newline at end of file diff --git a/node_modules/cheerio/dist/esm/api/extract.d.ts.map b/node_modules/cheerio/dist/esm/api/extract.d.ts.map deleted file mode 100644 index 8bbe7ab..0000000 --- a/node_modules/cheerio/dist/esm/api/extract.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"extract.d.ts","sourceRoot":"","sources":["../../../src/api/extract.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACnD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AAE5C,KAAK,mBAAmB,GAAG,CACzB,EAAE,EAAE,OAAO,EACX,GAAG,EAAE,MAAM,EAEX,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KACzB,OAAO,CAAC;AAEb,UAAU,iBAAiB;IACzB,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,GAAG,mBAAmB,GAAG,UAAU,CAAC;CACnD;AAED,KAAK,YAAY,GAAG,MAAM,GAAG,iBAAiB,GAAG,CAAC,MAAM,GAAG,iBAAiB,CAAC,CAAC;AAE9E,MAAM,WAAW,UAAU;IACzB,CAAC,GAAG,EAAE,MAAM,GAAG,YAAY,CAAC;CAC7B;AAED,KAAK,cAAc,CAAC,CAAC,SAAS,YAAY,EAAE,CAAC,SAAS,UAAU,IAAI,CAAC,SAAS;IAC5E,MAAM,GAAG,iBAAiB;CAC3B,GACG,WAAW,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,GACtC,CAAC,SAAS,MAAM,GACd,MAAM,GAAG,SAAS,GAClB,CAAC,SAAS,iBAAiB,GACzB,CAAC,CAAC,OAAO,CAAC,SAAS,UAAU,GAC3B,YAAY,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,GAAG,SAAS,GACpC,CAAC,CAAC,OAAO,CAAC,SAAS,mBAAmB,GACpC,UAAU,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,GAAG,SAAS,GAClC,UAAU,CAAC,OAAO,IAAI,CAAC,GAAG,SAAS,GACvC,KAAK,CAAC;AAEd,MAAM,MAAM,YAAY,CAAC,CAAC,SAAS,UAAU,IAAI;KAC9C,GAAG,IAAI,MAAM,CAAC,GAAG,cAAc,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;CAC5C,CAAC;AAeF;;;;;;;GAOG;AACH,wBAAgB,OAAO,CAAC,CAAC,SAAS,UAAU,EAAE,CAAC,SAAS,OAAO,EAC7D,IAAI,EAAE,OAAO,CAAC,CAAC,CAAC,EAChB,GAAG,EAAE,CAAC,GACL,YAAY,CAAC,CAAC,CAAC,CA2BjB"} \ No newline at end of file diff --git a/node_modules/cheerio/dist/esm/api/extract.js b/node_modules/cheerio/dist/esm/api/extract.js deleted file mode 100644 index 7203789..0000000 --- a/node_modules/cheerio/dist/esm/api/extract.js +++ /dev/null @@ -1,42 +0,0 @@ -function getExtractDescr(descr) { - var _a; - if (typeof descr === 'string') { - return { selector: descr, value: 'textContent' }; - } - return { - selector: descr.selector, - value: (_a = descr.value) !== null && _a !== void 0 ? _a : 'textContent', - }; -} -/** - * Extract multiple values from a document, and store them in an object. - * - * @param map - An object containing key-value pairs. The keys are the names of - * the properties to be created on the object, and the values are the - * selectors to be used to extract the values. - * @returns An object containing the extracted values. - */ -export function extract(map) { - const ret = {}; - for (const key in map) { - const descr = map[key]; - const isArray = Array.isArray(descr); - const { selector, value } = getExtractDescr(isArray ? descr[0] : descr); - const fn = typeof value === 'function' - ? value - : typeof value === 'string' - ? (el) => this._make(el).prop(value) - : (el) => this._make(el).extract(value); - if (isArray) { - ret[key] = this._findBySelector(selector, Number.POSITIVE_INFINITY) - .map((_, el) => fn(el, key, ret)) - .get(); - } - else { - const $ = this._findBySelector(selector, 1); - ret[key] = $.length > 0 ? fn($[0], key, ret) : undefined; - } - } - return ret; -} -//# sourceMappingURL=extract.js.map \ No newline at end of file diff --git a/node_modules/cheerio/dist/esm/api/extract.js.map b/node_modules/cheerio/dist/esm/api/extract.js.map deleted file mode 100644 index b6cd793..0000000 --- a/node_modules/cheerio/dist/esm/api/extract.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"extract.js","sourceRoot":"","sources":["../../../src/api/extract.ts"],"names":[],"mappings":"AAwCA,SAAS,eAAe,CACtB,KAAiC;;IAEjC,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;QAC9B,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,KAAK,EAAE,aAAa,EAAE,CAAC;IACnD,CAAC;IAED,OAAO;QACL,QAAQ,EAAE,KAAK,CAAC,QAAQ;QACxB,KAAK,EAAE,MAAA,KAAK,CAAC,KAAK,mCAAI,aAAa;KACpC,CAAC;AACJ,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,OAAO,CAErB,GAAM;IAEN,MAAM,GAAG,GAA4B,EAAE,CAAC;IAExC,KAAK,MAAM,GAAG,IAAI,GAAG,EAAE,CAAC;QACtB,MAAM,KAAK,GAAG,GAAG,CAAC,GAAG,CAAC,CAAC;QACvB,MAAM,OAAO,GAAG,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;QAErC,MAAM,EAAE,QAAQ,EAAE,KAAK,EAAE,GAAG,eAAe,CAAC,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;QAExE,MAAM,EAAE,GACN,OAAO,KAAK,KAAK,UAAU;YACzB,CAAC,CAAC,KAAK;YACP,CAAC,CAAC,OAAO,KAAK,KAAK,QAAQ;gBACzB,CAAC,CAAC,CAAC,EAAW,EAAE,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC;gBAC7C,CAAC,CAAC,CAAC,EAAW,EAAE,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;QAEvD,IAAI,OAAO,EAAE,CAAC;YACZ,GAAG,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC,eAAe,CAAC,QAAQ,EAAE,MAAM,CAAC,iBAAiB,CAAC;iBAChE,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,EAAE,EAAE,CAAC,EAAE,CAAC,EAAE,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC;iBAChC,GAAG,EAAE,CAAC;QACX,CAAC;aAAM,CAAC;YACN,MAAM,CAAC,GAAG,IAAI,CAAC,eAAe,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC;YAC5C,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;QAC3D,CAAC;IACH,CAAC;IAED,OAAO,GAAsB,CAAC;AAChC,CAAC"} \ No newline at end of file diff --git a/node_modules/cheerio/dist/esm/api/forms.d.ts b/node_modules/cheerio/dist/esm/api/forms.d.ts deleted file mode 100644 index dbec41e..0000000 --- a/node_modules/cheerio/dist/esm/api/forms.d.ts +++ /dev/null @@ -1,36 +0,0 @@ -import { type AnyNode } from 'domhandler'; -import type { Cheerio } from '../cheerio.js'; -/** - * Encode a set of form elements as a string for submission. - * - * @category Forms - * @example - * - * ```js - * $('<form><input name="foo" value="bar" /></form>').serialize(); - * //=> 'foo=bar' - * ``` - * - * @returns The serialized form. - * @see {@link https://api.jquery.com/serialize/} - */ -export declare function serialize<T extends AnyNode>(this: Cheerio<T>): string; -/** - * Encode a set of form elements as an array of names and values. - * - * @category Forms - * @example - * - * ```js - * $('<form><input name="foo" value="bar" /></form>').serializeArray(); - * //=> [ { name: 'foo', value: 'bar' } ] - * ``` - * - * @returns The serialized form. - * @see {@link https://api.jquery.com/serializeArray/} - */ -export declare function serializeArray<T extends AnyNode>(this: Cheerio<T>): { - name: string; - value: string; -}[]; -//# sourceMappingURL=forms.d.ts.map \ No newline at end of file diff --git a/node_modules/cheerio/dist/esm/api/forms.d.ts.map b/node_modules/cheerio/dist/esm/api/forms.d.ts.map deleted file mode 100644 index 2ea55e4..0000000 --- a/node_modules/cheerio/dist/esm/api/forms.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"forms.d.ts","sourceRoot":"","sources":["../../../src/api/forms.ts"],"names":[],"mappings":"AAAA,OAAO,EAAS,KAAK,OAAO,EAAE,MAAM,YAAY,CAAC;AACjD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAU7C;;;;;;;;;;;;;GAaG;AACH,wBAAgB,SAAS,CAAC,CAAC,SAAS,OAAO,EAAE,IAAI,EAAE,OAAO,CAAC,CAAC,CAAC,GAAG,MAAM,CAYrE;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,cAAc,CAAC,CAAC,SAAS,OAAO,EAC9C,IAAI,EAAE,OAAO,CAAC,CAAC,CAAC,GACf;IACD,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;CACf,EAAE,CA4CF"} \ No newline at end of file diff --git a/node_modules/cheerio/dist/esm/api/forms.js b/node_modules/cheerio/dist/esm/api/forms.js deleted file mode 100644 index 30853e1..0000000 --- a/node_modules/cheerio/dist/esm/api/forms.js +++ /dev/null @@ -1,81 +0,0 @@ -import { isTag } from 'domhandler'; -/* - * https://github.com/jquery/jquery/blob/2.1.3/src/manipulation/var/rcheckableType.js - * https://github.com/jquery/jquery/blob/2.1.3/src/serialize.js - */ -const submittableSelector = 'input,select,textarea,keygen'; -const r20 = /%20/g; -const rCRLF = /\r?\n/g; -/** - * Encode a set of form elements as a string for submission. - * - * @category Forms - * @example - * - * ```js - * $('<form><input name="foo" value="bar" /></form>').serialize(); - * //=> 'foo=bar' - * ``` - * - * @returns The serialized form. - * @see {@link https://api.jquery.com/serialize/} - */ -export function serialize() { - // Convert form elements into name/value objects - const arr = this.serializeArray(); - // Serialize each element into a key/value string - const retArr = arr.map((data) => `${encodeURIComponent(data.name)}=${encodeURIComponent(data.value)}`); - // Return the resulting serialization - return retArr.join('&').replace(r20, '+'); -} -/** - * Encode a set of form elements as an array of names and values. - * - * @category Forms - * @example - * - * ```js - * $('<form><input name="foo" value="bar" /></form>').serializeArray(); - * //=> [ { name: 'foo', value: 'bar' } ] - * ``` - * - * @returns The serialized form. - * @see {@link https://api.jquery.com/serializeArray/} - */ -export function serializeArray() { - // Resolve all form elements from either forms or collections of form elements - return this.map((_, elem) => { - const $elem = this._make(elem); - if (isTag(elem) && elem.name === 'form') { - return $elem.find(submittableSelector).toArray(); - } - return $elem.filter(submittableSelector).toArray(); - }) - .filter( - // Verify elements have a name (`attr.name`) and are not disabled (`:enabled`) - '[name!=""]:enabled' + - // And cannot be clicked (`[type=submit]`) or are used in `x-www-form-urlencoded` (`[type=file]`) - ':not(:submit, :button, :image, :reset, :file)' + - // And are either checked/don't have a checkable state - ':matches([checked], :not(:checkbox, :radio))') - .map((_, elem) => { - var _a; - const $elem = this._make(elem); - const name = $elem.attr('name'); // We have filtered for elements with a name before. - // If there is no value set (e.g. `undefined`, `null`), then default value to empty - const value = (_a = $elem.val()) !== null && _a !== void 0 ? _a : ''; - // If we have an array of values (e.g. `<select multiple>`), return an array of key/value pairs - if (Array.isArray(value)) { - return value.map((val) => - /* - * We trim replace any line endings (e.g. `\r` or `\r\n` with `\r\n`) to guarantee consistency across platforms - * These can occur inside of `<textarea>'s` - */ - ({ name, value: val.replace(rCRLF, '\r\n') })); - } - // Otherwise (e.g. `<input type="text">`, return only one key/value pair - return { name, value: value.replace(rCRLF, '\r\n') }; - }) - .toArray(); -} -//# sourceMappingURL=forms.js.map \ No newline at end of file diff --git a/node_modules/cheerio/dist/esm/api/forms.js.map b/node_modules/cheerio/dist/esm/api/forms.js.map deleted file mode 100644 index 5f7e882..0000000 --- a/node_modules/cheerio/dist/esm/api/forms.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"forms.js","sourceRoot":"","sources":["../../../src/api/forms.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAgB,MAAM,YAAY,CAAC;AAGjD;;;GAGG;AACH,MAAM,mBAAmB,GAAG,8BAA8B,CAAC;AAC3D,MAAM,GAAG,GAAG,MAAM,CAAC;AACnB,MAAM,KAAK,GAAG,QAAQ,CAAC;AAEvB;;;;;;;;;;;;;GAaG;AACH,MAAM,UAAU,SAAS;IACvB,gDAAgD;IAChD,MAAM,GAAG,GAAG,IAAI,CAAC,cAAc,EAAE,CAAC;IAElC,iDAAiD;IACjD,MAAM,MAAM,GAAG,GAAG,CAAC,GAAG,CACpB,CAAC,IAAI,EAAE,EAAE,CACP,GAAG,kBAAkB,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,kBAAkB,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CACvE,CAAC;IAEF,qCAAqC;IACrC,OAAO,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;AAC5C,CAAC;AAED;;;;;;;;;;;;;GAaG;AACH,MAAM,UAAU,cAAc;IAM5B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,EAAE,CAAC;AACf,CAAC"} \ No newline at end of file diff --git a/node_modules/cheerio/dist/esm/api/manipulation.d.ts b/node_modules/cheerio/dist/esm/api/manipulation.d.ts deleted file mode 100644 index 620043b..0000000 --- a/node_modules/cheerio/dist/esm/api/manipulation.d.ts +++ /dev/null @@ -1,528 +0,0 @@ -/** - * Methods for modifying the DOM structure. - * - * @module cheerio/manipulation - */ -import { type AnyNode } from 'domhandler'; -import type { Cheerio } from '../cheerio.js'; -import type { BasicAcceptedElems, AcceptedElems } from '../types.js'; -/** - * Create an array of nodes, recursing into arrays and parsing strings if - * necessary. - * - * @private - * @category Manipulation - * @param elem - Elements to make an array of. - * @param clone - Optionally clone nodes. - * @returns The array of nodes. - */ -export declare function _makeDomArray<T extends AnyNode>(this: Cheerio<T>, elem?: BasicAcceptedElems<AnyNode> | BasicAcceptedElems<AnyNode>[], clone?: boolean): AnyNode[]; -/** - * Insert every element in the set of matched elements to the end of the target. - * - * @category Manipulation - * @example - * - * ```js - * $('<li class="plum">Plum</li>').appendTo('#fruits'); - * $.html(); - * //=> <ul id="fruits"> - * // <li class="apple">Apple</li> - * // <li class="orange">Orange</li> - * // <li class="pear">Pear</li> - * // <li class="plum">Plum</li> - * // </ul> - * ``` - * - * @param target - Element to append elements to. - * @returns The instance itself. - * @see {@link https://api.jquery.com/appendTo/} - */ -export declare function appendTo<T extends AnyNode>(this: Cheerio<T>, target: BasicAcceptedElems<AnyNode>): Cheerio<T>; -/** - * Insert every element in the set of matched elements to the beginning of the - * target. - * - * @category Manipulation - * @example - * - * ```js - * $('<li class="plum">Plum</li>').prependTo('#fruits'); - * $.html(); - * //=> <ul id="fruits"> - * // <li class="plum">Plum</li> - * // <li class="apple">Apple</li> - * // <li class="orange">Orange</li> - * // <li class="pear">Pear</li> - * // </ul> - * ``` - * - * @param target - Element to prepend elements to. - * @returns The instance itself. - * @see {@link https://api.jquery.com/prependTo/} - */ -export declare function prependTo<T extends AnyNode>(this: Cheerio<T>, target: BasicAcceptedElems<AnyNode>): Cheerio<T>; -/** - * Inserts content as the _last_ child of each of the selected elements. - * - * @category Manipulation - * @example - * - * ```js - * $('ul').append('<li class="plum">Plum</li>'); - * $.html(); - * //=> <ul id="fruits"> - * // <li class="apple">Apple</li> - * // <li class="orange">Orange</li> - * // <li class="pear">Pear</li> - * // <li class="plum">Plum</li> - * // </ul> - * ``` - * - * @see {@link https://api.jquery.com/append/} - */ -export declare const append: <T extends AnyNode>(this: Cheerio<T>, ...elems: [(this: AnyNode, i: number, html: string) => BasicAcceptedElems<AnyNode>] | BasicAcceptedElems<AnyNode>[]) => Cheerio<T>; -/** - * Inserts content as the _first_ child of each of the selected elements. - * - * @category Manipulation - * @example - * - * ```js - * $('ul').prepend('<li class="plum">Plum</li>'); - * $.html(); - * //=> <ul id="fruits"> - * // <li class="plum">Plum</li> - * // <li class="apple">Apple</li> - * // <li class="orange">Orange</li> - * // <li class="pear">Pear</li> - * // </ul> - * ``` - * - * @see {@link https://api.jquery.com/prepend/} - */ -export declare const prepend: <T extends AnyNode>(this: Cheerio<T>, ...elems: [(this: AnyNode, i: number, html: string) => BasicAcceptedElems<AnyNode>] | BasicAcceptedElems<AnyNode>[]) => Cheerio<T>; -/** - * The .wrap() function can take any string or object that could be passed to - * the $() factory function to specify a DOM structure. This structure may be - * nested several levels deep, but should contain only one inmost element. A - * copy of this structure will be wrapped around each of the elements in the set - * of matched elements. This method returns the original set of elements for - * chaining purposes. - * - * @category Manipulation - * @example - * - * ```js - * const redFruit = $('<div class="red-fruit"></div>'); - * $('.apple').wrap(redFruit); - * - * //=> <ul id="fruits"> - * // <div class="red-fruit"> - * // <li class="apple">Apple</li> - * // </div> - * // <li class="orange">Orange</li> - * // <li class="plum">Plum</li> - * // </ul> - * - * const healthy = $('<div class="healthy"></div>'); - * $('li').wrap(healthy); - * - * //=> <ul id="fruits"> - * // <div class="healthy"> - * // <li class="apple">Apple</li> - * // </div> - * // <div class="healthy"> - * // <li class="orange">Orange</li> - * // </div> - * // <div class="healthy"> - * // <li class="plum">Plum</li> - * // </div> - * // </ul> - * ``` - * - * @param wrapper - The DOM structure to wrap around each element in the - * selection. - * @see {@link https://api.jquery.com/wrap/} - */ -export declare const wrap: <T extends AnyNode>(this: Cheerio<T>, wrapper: AcceptedElems<AnyNode>) => Cheerio<T>; -/** - * The .wrapInner() function can take any string or object that could be passed - * to the $() factory function to specify a DOM structure. This structure may be - * nested several levels deep, but should contain only one inmost element. The - * structure will be wrapped around the content of each of the elements in the - * set of matched elements. - * - * @category Manipulation - * @example - * - * ```js - * const redFruit = $('<div class="red-fruit"></div>'); - * $('.apple').wrapInner(redFruit); - * - * //=> <ul id="fruits"> - * // <li class="apple"> - * // <div class="red-fruit">Apple</div> - * // </li> - * // <li class="orange">Orange</li> - * // <li class="pear">Pear</li> - * // </ul> - * - * const healthy = $('<div class="healthy"></div>'); - * $('li').wrapInner(healthy); - * - * //=> <ul id="fruits"> - * // <li class="apple"> - * // <div class="healthy">Apple</div> - * // </li> - * // <li class="orange"> - * // <div class="healthy">Orange</div> - * // </li> - * // <li class="pear"> - * // <div class="healthy">Pear</div> - * // </li> - * // </ul> - * ``` - * - * @param wrapper - The DOM structure to wrap around the content of each element - * in the selection. - * @returns The instance itself, for chaining. - * @see {@link https://api.jquery.com/wrapInner/} - */ -export declare const wrapInner: <T extends AnyNode>(this: Cheerio<T>, wrapper: AcceptedElems<AnyNode>) => Cheerio<T>; -/** - * The .unwrap() function, removes the parents of the set of matched elements - * from the DOM, leaving the matched elements in their place. - * - * @category Manipulation - * @example <caption>without selector</caption> - * - * ```js - * const $ = cheerio.load( - * '<div id=test>\n <div><p>Hello</p></div>\n <div><p>World</p></div>\n</div>', - * ); - * $('#test p').unwrap(); - * - * //=> <div id=test> - * // <p>Hello</p> - * // <p>World</p> - * // </div> - * ``` - * - * @example <caption>with selector</caption> - * - * ```js - * const $ = cheerio.load( - * '<div id=test>\n <p>Hello</p>\n <b><p>World</p></b>\n</div>', - * ); - * $('#test p').unwrap('b'); - * - * //=> <div id=test> - * // <p>Hello</p> - * // <p>World</p> - * // </div> - * ``` - * - * @param selector - A selector to check the parent element against. If an - * element's parent does not match the selector, the element won't be - * unwrapped. - * @returns The instance itself, for chaining. - * @see {@link https://api.jquery.com/unwrap/} - */ -export declare function unwrap<T extends AnyNode>(this: Cheerio<T>, selector?: string): Cheerio<T>; -/** - * The .wrapAll() function can take any string or object that could be passed to - * the $() function to specify a DOM structure. This structure may be nested - * several levels deep, but should contain only one inmost element. The - * structure will be wrapped around all of the elements in the set of matched - * elements, as a single group. - * - * @category Manipulation - * @example <caption>With markup passed to `wrapAll`</caption> - * - * ```js - * const $ = cheerio.load( - * '<div class="container"><div class="inner">First</div><div class="inner">Second</div></div>', - * ); - * $('.inner').wrapAll("<div class='new'></div>"); - * - * //=> <div class="container"> - * // <div class='new'> - * // <div class="inner">First</div> - * // <div class="inner">Second</div> - * // </div> - * // </div> - * ``` - * - * @example <caption>With an existing cheerio instance</caption> - * - * ```js - * const $ = cheerio.load( - * '<span>Span 1</span><strong>Strong</strong><span>Span 2</span>', - * ); - * const wrap = $('<div><p><em><b></b></em></p></div>'); - * $('span').wrapAll(wrap); - * - * //=> <div> - * // <p> - * // <em> - * // <b> - * // <span>Span 1</span> - * // <span>Span 2</span> - * // </b> - * // </em> - * // </p> - * // </div> - * // <strong>Strong</strong> - * ``` - * - * @param wrapper - The DOM structure to wrap around all matched elements in the - * selection. - * @returns The instance itself. - * @see {@link https://api.jquery.com/wrapAll/} - */ -export declare function wrapAll<T extends AnyNode>(this: Cheerio<T>, wrapper: AcceptedElems<T>): Cheerio<T>; -/** - * Insert content next to each element in the set of matched elements. - * - * @category Manipulation - * @example - * - * ```js - * $('.apple').after('<li class="plum">Plum</li>'); - * $.html(); - * //=> <ul id="fruits"> - * // <li class="apple">Apple</li> - * // <li class="plum">Plum</li> - * // <li class="orange">Orange</li> - * // <li class="pear">Pear</li> - * // </ul> - * ``` - * - * @param elems - HTML string, DOM element, array of DOM elements or Cheerio to - * insert after each element in the set of matched elements. - * @returns The instance itself. - * @see {@link https://api.jquery.com/after/} - */ -export declare function after<T extends AnyNode>(this: Cheerio<T>, ...elems: [(this: AnyNode, i: number, html: string) => BasicAcceptedElems<AnyNode>] | BasicAcceptedElems<AnyNode>[]): Cheerio<T>; -/** - * Insert every element in the set of matched elements after the target. - * - * @category Manipulation - * @example - * - * ```js - * $('<li class="plum">Plum</li>').insertAfter('.apple'); - * $.html(); - * //=> <ul id="fruits"> - * // <li class="apple">Apple</li> - * // <li class="plum">Plum</li> - * // <li class="orange">Orange</li> - * // <li class="pear">Pear</li> - * // </ul> - * ``` - * - * @param target - Element to insert elements after. - * @returns The set of newly inserted elements. - * @see {@link https://api.jquery.com/insertAfter/} - */ -export declare function insertAfter<T extends AnyNode>(this: Cheerio<T>, target: BasicAcceptedElems<AnyNode>): Cheerio<T>; -/** - * Insert content previous to each element in the set of matched elements. - * - * @category Manipulation - * @example - * - * ```js - * $('.apple').before('<li class="plum">Plum</li>'); - * $.html(); - * //=> <ul id="fruits"> - * // <li class="plum">Plum</li> - * // <li class="apple">Apple</li> - * // <li class="orange">Orange</li> - * // <li class="pear">Pear</li> - * // </ul> - * ``` - * - * @param elems - HTML string, DOM element, array of DOM elements or Cheerio to - * insert before each element in the set of matched elements. - * @returns The instance itself. - * @see {@link https://api.jquery.com/before/} - */ -export declare function before<T extends AnyNode>(this: Cheerio<T>, ...elems: [(this: AnyNode, i: number, html: string) => BasicAcceptedElems<AnyNode>] | BasicAcceptedElems<AnyNode>[]): Cheerio<T>; -/** - * Insert every element in the set of matched elements before the target. - * - * @category Manipulation - * @example - * - * ```js - * $('<li class="plum">Plum</li>').insertBefore('.apple'); - * $.html(); - * //=> <ul id="fruits"> - * // <li class="plum">Plum</li> - * // <li class="apple">Apple</li> - * // <li class="orange">Orange</li> - * // <li class="pear">Pear</li> - * // </ul> - * ``` - * - * @param target - Element to insert elements before. - * @returns The set of newly inserted elements. - * @see {@link https://api.jquery.com/insertBefore/} - */ -export declare function insertBefore<T extends AnyNode>(this: Cheerio<T>, target: BasicAcceptedElems<AnyNode>): Cheerio<T>; -/** - * Removes the set of matched elements from the DOM and all their children. - * `selector` filters the set of matched elements to be removed. - * - * @category Manipulation - * @example - * - * ```js - * $('.pear').remove(); - * $.html(); - * //=> <ul id="fruits"> - * // <li class="apple">Apple</li> - * // <li class="orange">Orange</li> - * // </ul> - * ``` - * - * @param selector - Optional selector for elements to remove. - * @returns The instance itself. - * @see {@link https://api.jquery.com/remove/} - */ -export declare function remove<T extends AnyNode>(this: Cheerio<T>, selector?: string): Cheerio<T>; -/** - * Replaces matched elements with `content`. - * - * @category Manipulation - * @example - * - * ```js - * const plum = $('<li class="plum">Plum</li>'); - * $('.pear').replaceWith(plum); - * $.html(); - * //=> <ul id="fruits"> - * // <li class="apple">Apple</li> - * // <li class="orange">Orange</li> - * // <li class="plum">Plum</li> - * // </ul> - * ``` - * - * @param content - Replacement for matched elements. - * @returns The instance itself. - * @see {@link https://api.jquery.com/replaceWith/} - */ -export declare function replaceWith<T extends AnyNode>(this: Cheerio<T>, content: AcceptedElems<AnyNode>): Cheerio<T>; -/** - * Removes all children from each item in the selection. Text nodes and comment - * nodes are left as is. - * - * @category Manipulation - * @example - * - * ```js - * $('ul').empty(); - * $.html(); - * //=> <ul id="fruits"></ul> - * ``` - * - * @returns The instance itself. - * @see {@link https://api.jquery.com/empty/} - */ -export declare function empty<T extends AnyNode>(this: Cheerio<T>): Cheerio<T>; -/** - * Gets an HTML content string from the first selected element. - * - * @category Manipulation - * @example - * - * ```js - * $('.orange').html(); - * //=> Orange - * - * $('#fruits').html('<li class="mango">Mango</li>').html(); - * //=> <li class="mango">Mango</li> - * ``` - * - * @returns The HTML content string. - * @see {@link https://api.jquery.com/html/} - */ -export declare function html<T extends AnyNode>(this: Cheerio<T>): string | null; -/** - * Replaces each selected element's content with the specified content. - * - * @category Manipulation - * @example - * - * ```js - * $('.orange').html('<li class="mango">Mango</li>').html(); - * //=> <li class="mango">Mango</li> - * ``` - * - * @param str - The content to replace selection's contents with. - * @returns The instance itself. - * @see {@link https://api.jquery.com/html/} - */ -export declare function html<T extends AnyNode>(this: Cheerio<T>, str: string | Cheerio<T>): Cheerio<T>; -/** - * Turns the collection to a string. Alias for `.html()`. - * - * @category Manipulation - * @returns The rendered document. - */ -export declare function toString<T extends AnyNode>(this: Cheerio<T>): string; -/** - * Get the combined text contents of each element in the set of matched - * elements, including their descendants. - * - * @category Manipulation - * @example - * - * ```js - * $('.orange').text(); - * //=> Orange - * - * $('ul').text(); - * //=> Apple - * // Orange - * // Pear - * ``` - * - * @returns The text contents of the collection. - * @see {@link https://api.jquery.com/text/} - */ -export declare function text<T extends AnyNode>(this: Cheerio<T>): string; -/** - * Set the content of each element in the set of matched elements to the - * specified text. - * - * @category Manipulation - * @example - * - * ```js - * $('.orange').text('Orange'); - * //=> <div class="orange">Orange</div> - * ``` - * - * @param str - The text to set as the content of each matched element. - * @returns The instance itself. - * @see {@link https://api.jquery.com/text/} - */ -export declare function text<T extends AnyNode>(this: Cheerio<T>, str: string | ((this: AnyNode, i: number, text: string) => string)): Cheerio<T>; -/** - * Clone the cheerio object. - * - * @category Manipulation - * @example - * - * ```js - * const moreFruit = $('#fruits').clone(); - * ``` - * - * @returns The cloned object. - * @see {@link https://api.jquery.com/clone/} - */ -export declare function clone<T extends AnyNode>(this: Cheerio<T>): Cheerio<T>; -//# sourceMappingURL=manipulation.d.ts.map \ No newline at end of file diff --git a/node_modules/cheerio/dist/esm/api/manipulation.d.ts.map b/node_modules/cheerio/dist/esm/api/manipulation.d.ts.map deleted file mode 100644 index 4e14eba..0000000 --- a/node_modules/cheerio/dist/esm/api/manipulation.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"manipulation.d.ts","sourceRoot":"","sources":["../../../src/api/manipulation.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAOL,KAAK,OAAO,EAEb,MAAM,YAAY,CAAC;AAKpB,OAAO,KAAK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ACH,wBAAgB,KAAK,CAAC,CAAC,SAAS,OAAO,EAAE,IAAI,EAAE,OAAO,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,CAYrE"} \ No newline at end of file diff --git a/node_modules/cheerio/dist/esm/api/manipulation.js b/node_modules/cheerio/dist/esm/api/manipulation.js deleted file mode 100644 index 7935544..0000000 --- a/node_modules/cheerio/dist/esm/api/manipulation.js +++ /dev/null @@ -1,829 +0,0 @@ -/** - * Methods for modifying the DOM structure. - * - * @module cheerio/manipulation - */ -import { isTag, Text, hasChildren, cloneNode, Document, } from 'domhandler'; -import { update as updateDOM } from '../parse.js'; -import { text as staticText } from '../static.js'; -import { domEach, isHtml, isCheerio } from '../utils.js'; -import { removeElement } from 'domutils'; -/** - * Create an array of nodes, recursing into arrays and parsing strings if - * necessary. - * - * @private - * @category Manipulation - * @param elem - Elements to make an array of. - * @param clone - Optionally clone nodes. - * @returns The array of nodes. - */ -export function _makeDomArray(elem, clone) { - if (elem == null) { - return []; - } - if (typeof elem === 'string') { - return this._parse(elem, this.options, false, null).children.slice(0); - } - if ('length' in elem) { - if (elem.length === 1) { - return this._makeDomArray(elem[0], clone); - } - const result = []; - for (let i = 0; i < elem.length; i++) { - const el = elem[i]; - if (typeof el === 'object') { - if (el == null) { - continue; - } - if (!('length' in el)) { - result.push(clone ? cloneNode(el, true) : el); - continue; - } - } - result.push(...this._makeDomArray(el, clone)); - } - return result; - } - return [clone ? cloneNode(elem, true) : elem]; -} -function _insert(concatenator) { - return function (...elems) { - const lastIdx = this.length - 1; - return domEach(this, (el, i) => { - if (!hasChildren(el)) - return; - const domSrc = typeof elems[0] === 'function' - ? elems[0].call(el, i, this._render(el.children)) - : elems; - const dom = this._makeDomArray(domSrc, i < lastIdx); - concatenator(dom, el.children, el); - }); - }; -} -/** - * Modify an array in-place, removing some number of elements and adding new - * elements directly following them. - * - * @private - * @category Manipulation - * @param array - Target array to splice. - * @param spliceIdx - Index at which to begin changing the array. - * @param spliceCount - Number of elements to remove from the array. - * @param newElems - Elements to insert into the array. - * @param parent - The parent of the node. - * @returns The spliced array. - */ -function uniqueSplice(array, spliceIdx, spliceCount, newElems, parent) { - var _a, _b; - const spliceArgs = [ - spliceIdx, - spliceCount, - ...newElems, - ]; - const prev = spliceIdx === 0 ? null : array[spliceIdx - 1]; - const next = spliceIdx + spliceCount >= array.length - ? null - : array[spliceIdx + spliceCount]; - /* - * Before splicing in new elements, ensure they do not already appear in the - * current array. - */ - for (let idx = 0; idx < newElems.length; ++idx) { - const node = newElems[idx]; - const oldParent = node.parent; - if (oldParent) { - const oldSiblings = oldParent.children; - const prevIdx = oldSiblings.indexOf(node); - if (prevIdx > -1) { - oldParent.children.splice(prevIdx, 1); - if (parent === oldParent && spliceIdx > prevIdx) { - spliceArgs[0]--; - } - } - } - node.parent = parent; - if (node.prev) { - node.prev.next = (_a = node.next) !== null && _a !== void 0 ? _a : null; - } - if (node.next) { - node.next.prev = (_b = node.prev) !== null && _b !== void 0 ? _b : null; - } - node.prev = idx === 0 ? prev : newElems[idx - 1]; - node.next = idx === newElems.length - 1 ? next : newElems[idx + 1]; - } - if (prev) { - prev.next = newElems[0]; - } - if (next) { - next.prev = newElems[newElems.length - 1]; - } - return array.splice(...spliceArgs); -} -/** - * Insert every element in the set of matched elements to the end of the target. - * - * @category Manipulation - * @example - * - * ```js - * $('<li class="plum">Plum</li>').appendTo('#fruits'); - * $.html(); - * //=> <ul id="fruits"> - * // <li class="apple">Apple</li> - * // <li class="orange">Orange</li> - * // <li class="pear">Pear</li> - * // <li class="plum">Plum</li> - * // </ul> - * ``` - * - * @param target - Element to append elements to. - * @returns The instance itself. - * @see {@link https://api.jquery.com/appendTo/} - */ -export function appendTo(target) { - const appendTarget = isCheerio(target) ? target : this._make(target); - appendTarget.append(this); - return this; -} -/** - * Insert every element in the set of matched elements to the beginning of the - * target. - * - * @category Manipulation - * @example - * - * ```js - * $('<li class="plum">Plum</li>').prependTo('#fruits'); - * $.html(); - * //=> <ul id="fruits"> - * // <li class="plum">Plum</li> - * // <li class="apple">Apple</li> - * // <li class="orange">Orange</li> - * // <li class="pear">Pear</li> - * // </ul> - * ``` - * - * @param target - Element to prepend elements to. - * @returns The instance itself. - * @see {@link https://api.jquery.com/prependTo/} - */ -export function prependTo(target) { - const prependTarget = isCheerio(target) ? target : this._make(target); - prependTarget.prepend(this); - return this; -} -/** - * Inserts content as the _last_ child of each of the selected elements. - * - * @category Manipulation - * @example - * - * ```js - * $('ul').append('<li class="plum">Plum</li>'); - * $.html(); - * //=> <ul id="fruits"> - * // <li class="apple">Apple</li> - * // <li class="orange">Orange</li> - * // <li class="pear">Pear</li> - * // <li class="plum">Plum</li> - * // </ul> - * ``` - * - * @see {@link https://api.jquery.com/append/} - */ -export const append = _insert((dom, children, parent) => { - uniqueSplice(children, children.length, 0, dom, parent); -}); -/** - * Inserts content as the _first_ child of each of the selected elements. - * - * @category Manipulation - * @example - * - * ```js - * $('ul').prepend('<li class="plum">Plum</li>'); - * $.html(); - * //=> <ul id="fruits"> - * // <li class="plum">Plum</li> - * // <li class="apple">Apple</li> - * // <li class="orange">Orange</li> - * // <li class="pear">Pear</li> - * // </ul> - * ``` - * - * @see {@link https://api.jquery.com/prepend/} - */ -export const prepend = _insert((dom, children, parent) => { - uniqueSplice(children, 0, 0, dom, parent); -}); -function _wrap(insert) { - return function (wrapper) { - const lastIdx = this.length - 1; - const lastParent = this.parents().last(); - for (let i = 0; i < this.length; i++) { - const el = this[i]; - const wrap = typeof wrapper === 'function' - ? wrapper.call(el, i, el) - : typeof wrapper === 'string' && !isHtml(wrapper) - ? lastParent.find(wrapper).clone() - : wrapper; - const [wrapperDom] = this._makeDomArray(wrap, i < lastIdx); - if (!wrapperDom || !hasChildren(wrapperDom)) - continue; - let elInsertLocation = wrapperDom; - /* - * Find the deepest child. Only consider the first tag child of each node - * (ignore text); stop if no children are found. - */ - let j = 0; - while (j < elInsertLocation.children.length) { - const child = elInsertLocation.children[j]; - if (isTag(child)) { - elInsertLocation = child; - j = 0; - } - else { - j++; - } - } - insert(el, elInsertLocation, [wrapperDom]); - } - return this; - }; -} -/** - * The .wrap() function can take any string or object that could be passed to - * the $() factory function to specify a DOM structure. This structure may be - * nested several levels deep, but should contain only one inmost element. A - * copy of this structure will be wrapped around each of the elements in the set - * of matched elements. This method returns the original set of elements for - * chaining purposes. - * - * @category Manipulation - * @example - * - * ```js - * const redFruit = $('<div class="red-fruit"></div>'); - * $('.apple').wrap(redFruit); - * - * //=> <ul id="fruits"> - * // <div class="red-fruit"> - * // <li class="apple">Apple</li> - * // </div> - * // <li class="orange">Orange</li> - * // <li class="plum">Plum</li> - * // </ul> - * - * const healthy = $('<div class="healthy"></div>'); - * $('li').wrap(healthy); - * - * //=> <ul id="fruits"> - * // <div class="healthy"> - * // <li class="apple">Apple</li> - * // </div> - * // <div class="healthy"> - * // <li class="orange">Orange</li> - * // </div> - * // <div class="healthy"> - * // <li class="plum">Plum</li> - * // </div> - * // </ul> - * ``` - * - * @param wrapper - The DOM structure to wrap around each element in the - * selection. - * @see {@link https://api.jquery.com/wrap/} - */ -export const wrap = _wrap((el, elInsertLocation, wrapperDom) => { - const { parent } = el; - if (!parent) - return; - const siblings = parent.children; - const index = siblings.indexOf(el); - updateDOM([el], elInsertLocation); - /* - * The previous operation removed the current element from the `siblings` - * array, so the `dom` array can be inserted without removing any - * additional elements. - */ - uniqueSplice(siblings, index, 0, wrapperDom, parent); -}); -/** - * The .wrapInner() function can take any string or object that could be passed - * to the $() factory function to specify a DOM structure. This structure may be - * nested several levels deep, but should contain only one inmost element. The - * structure will be wrapped around the content of each of the elements in the - * set of matched elements. - * - * @category Manipulation - * @example - * - * ```js - * const redFruit = $('<div class="red-fruit"></div>'); - * $('.apple').wrapInner(redFruit); - * - * //=> <ul id="fruits"> - * // <li class="apple"> - * // <div class="red-fruit">Apple</div> - * // </li> - * // <li class="orange">Orange</li> - * // <li class="pear">Pear</li> - * // </ul> - * - * const healthy = $('<div class="healthy"></div>'); - * $('li').wrapInner(healthy); - * - * //=> <ul id="fruits"> - * // <li class="apple"> - * // <div class="healthy">Apple</div> - * // </li> - * // <li class="orange"> - * // <div class="healthy">Orange</div> - * // </li> - * // <li class="pear"> - * // <div class="healthy">Pear</div> - * // </li> - * // </ul> - * ``` - * - * @param wrapper - The DOM structure to wrap around the content of each element - * in the selection. - * @returns The instance itself, for chaining. - * @see {@link https://api.jquery.com/wrapInner/} - */ -export const wrapInner = _wrap((el, elInsertLocation, wrapperDom) => { - if (!hasChildren(el)) - return; - updateDOM(el.children, elInsertLocation); - updateDOM(wrapperDom, el); -}); -/** - * The .unwrap() function, removes the parents of the set of matched elements - * from the DOM, leaving the matched elements in their place. - * - * @category Manipulation - * @example <caption>without selector</caption> - * - * ```js - * const $ = cheerio.load( - * '<div id=test>\n <div><p>Hello</p></div>\n <div><p>World</p></div>\n</div>', - * ); - * $('#test p').unwrap(); - * - * //=> <div id=test> - * // <p>Hello</p> - * // <p>World</p> - * // </div> - * ``` - * - * @example <caption>with selector</caption> - * - * ```js - * const $ = cheerio.load( - * '<div id=test>\n <p>Hello</p>\n <b><p>World</p></b>\n</div>', - * ); - * $('#test p').unwrap('b'); - * - * //=> <div id=test> - * // <p>Hello</p> - * // <p>World</p> - * // </div> - * ``` - * - * @param selector - A selector to check the parent element against. If an - * element's parent does not match the selector, the element won't be - * unwrapped. - * @returns The instance itself, for chaining. - * @see {@link https://api.jquery.com/unwrap/} - */ -export function unwrap(selector) { - this.parent(selector) - .not('body') - .each((_, el) => { - this._make(el).replaceWith(el.children); - }); - return this; -} -/** - * The .wrapAll() function can take any string or object that could be passed to - * the $() function to specify a DOM structure. This structure may be nested - * several levels deep, but should contain only one inmost element. The - * structure will be wrapped around all of the elements in the set of matched - * elements, as a single group. - * - * @category Manipulation - * @example <caption>With markup passed to `wrapAll`</caption> - * - * ```js - * const $ = cheerio.load( - * '<div class="container"><div class="inner">First</div><div class="inner">Second</div></div>', - * ); - * $('.inner').wrapAll("<div class='new'></div>"); - * - * //=> <div class="container"> - * // <div class='new'> - * // <div class="inner">First</div> - * // <div class="inner">Second</div> - * // </div> - * // </div> - * ``` - * - * @example <caption>With an existing cheerio instance</caption> - * - * ```js - * const $ = cheerio.load( - * '<span>Span 1</span><strong>Strong</strong><span>Span 2</span>', - * ); - * const wrap = $('<div><p><em><b></b></em></p></div>'); - * $('span').wrapAll(wrap); - * - * //=> <div> - * // <p> - * // <em> - * // <b> - * // <span>Span 1</span> - * // <span>Span 2</span> - * // </b> - * // </em> - * // </p> - * // </div> - * // <strong>Strong</strong> - * ``` - * - * @param wrapper - The DOM structure to wrap around all matched elements in the - * selection. - * @returns The instance itself. - * @see {@link https://api.jquery.com/wrapAll/} - */ -export function wrapAll(wrapper) { - const el = this[0]; - if (el) { - const wrap = this._make(typeof wrapper === 'function' ? wrapper.call(el, 0, el) : wrapper).insertBefore(el); - // If html is given as wrapper, wrap may contain text elements - let elInsertLocation; - for (let i = 0; i < wrap.length; i++) { - if (wrap[i].type === 'tag') - elInsertLocation = wrap[i]; - } - let j = 0; - /* - * Find the deepest child. Only consider the first tag child of each node - * (ignore text); stop if no children are found. - */ - while (elInsertLocation && j < elInsertLocation.children.length) { - const child = elInsertLocation.children[j]; - if (child.type === 'tag') { - elInsertLocation = child; - j = 0; - } - else { - j++; - } - } - if (elInsertLocation) - this._make(elInsertLocation).append(this); - } - return this; -} -/** - * Insert content next to each element in the set of matched elements. - * - * @category Manipulation - * @example - * - * ```js - * $('.apple').after('<li class="plum">Plum</li>'); - * $.html(); - * //=> <ul id="fruits"> - * // <li class="apple">Apple</li> - * // <li class="plum">Plum</li> - * // <li class="orange">Orange</li> - * // <li class="pear">Pear</li> - * // </ul> - * ``` - * - * @param elems - HTML string, DOM element, array of DOM elements or Cheerio to - * insert after each element in the set of matched elements. - * @returns The instance itself. - * @see {@link https://api.jquery.com/after/} - */ -export function after(...elems) { - const lastIdx = this.length - 1; - return domEach(this, (el, i) => { - if (!hasChildren(el) || !el.parent) { - return; - } - const siblings = el.parent.children; - const index = siblings.indexOf(el); - // If not found, move on - /* istanbul ignore next */ - if (index < 0) - return; - const domSrc = typeof elems[0] === 'function' - ? elems[0].call(el, i, this._render(el.children)) - : elems; - const dom = this._makeDomArray(domSrc, i < lastIdx); - // Add element after `this` element - uniqueSplice(siblings, index + 1, 0, dom, el.parent); - }); -} -/** - * Insert every element in the set of matched elements after the target. - * - * @category Manipulation - * @example - * - * ```js - * $('<li class="plum">Plum</li>').insertAfter('.apple'); - * $.html(); - * //=> <ul id="fruits"> - * // <li class="apple">Apple</li> - * // <li class="plum">Plum</li> - * // <li class="orange">Orange</li> - * // <li class="pear">Pear</li> - * // </ul> - * ``` - * - * @param target - Element to insert elements after. - * @returns The set of newly inserted elements. - * @see {@link https://api.jquery.com/insertAfter/} - */ -export function insertAfter(target) { - if (typeof target === 'string') { - target = this._make(target); - } - this.remove(); - const clones = []; - for (const el of this._makeDomArray(target)) { - const clonedSelf = this.clone().toArray(); - const { parent } = el; - if (!parent) { - continue; - } - const siblings = parent.children; - const index = siblings.indexOf(el); - // If not found, move on - /* istanbul ignore next */ - if (index < 0) - continue; - // Add cloned `this` element(s) after target element - uniqueSplice(siblings, index + 1, 0, clonedSelf, parent); - clones.push(...clonedSelf); - } - return this._make(clones); -} -/** - * Insert content previous to each element in the set of matched elements. - * - * @category Manipulation - * @example - * - * ```js - * $('.apple').before('<li class="plum">Plum</li>'); - * $.html(); - * //=> <ul id="fruits"> - * // <li class="plum">Plum</li> - * // <li class="apple">Apple</li> - * // <li class="orange">Orange</li> - * // <li class="pear">Pear</li> - * // </ul> - * ``` - * - * @param elems - HTML string, DOM element, array of DOM elements or Cheerio to - * insert before each element in the set of matched elements. - * @returns The instance itself. - * @see {@link https://api.jquery.com/before/} - */ -export function before(...elems) { - const lastIdx = this.length - 1; - return domEach(this, (el, i) => { - if (!hasChildren(el) || !el.parent) { - return; - } - const siblings = el.parent.children; - const index = siblings.indexOf(el); - // If not found, move on - /* istanbul ignore next */ - if (index < 0) - return; - const domSrc = typeof elems[0] === 'function' - ? elems[0].call(el, i, this._render(el.children)) - : elems; - const dom = this._makeDomArray(domSrc, i < lastIdx); - // Add element before `el` element - uniqueSplice(siblings, index, 0, dom, el.parent); - }); -} -/** - * Insert every element in the set of matched elements before the target. - * - * @category Manipulation - * @example - * - * ```js - * $('<li class="plum">Plum</li>').insertBefore('.apple'); - * $.html(); - * //=> <ul id="fruits"> - * // <li class="plum">Plum</li> - * // <li class="apple">Apple</li> - * // <li class="orange">Orange</li> - * // <li class="pear">Pear</li> - * // </ul> - * ``` - * - * @param target - Element to insert elements before. - * @returns The set of newly inserted elements. - * @see {@link https://api.jquery.com/insertBefore/} - */ -export function insertBefore(target) { - const targetArr = this._make(target); - this.remove(); - const clones = []; - domEach(targetArr, (el) => { - const clonedSelf = this.clone().toArray(); - const { parent } = el; - if (!parent) { - return; - } - const siblings = parent.children; - const index = siblings.indexOf(el); - // If not found, move on - /* istanbul ignore next */ - if (index < 0) - return; - // Add cloned `this` element(s) after target element - uniqueSplice(siblings, index, 0, clonedSelf, parent); - clones.push(...clonedSelf); - }); - return this._make(clones); -} -/** - * Removes the set of matched elements from the DOM and all their children. - * `selector` filters the set of matched elements to be removed. - * - * @category Manipulation - * @example - * - * ```js - * $('.pear').remove(); - * $.html(); - * //=> <ul id="fruits"> - * // <li class="apple">Apple</li> - * // <li class="orange">Orange</li> - * // </ul> - * ``` - * - * @param selector - Optional selector for elements to remove. - * @returns The instance itself. - * @see {@link https://api.jquery.com/remove/} - */ -export function remove(selector) { - // Filter if we have selector - const elems = selector ? this.filter(selector) : this; - domEach(elems, (el) => { - removeElement(el); - el.prev = el.next = el.parent = null; - }); - return this; -} -/** - * Replaces matched elements with `content`. - * - * @category Manipulation - * @example - * - * ```js - * const plum = $('<li class="plum">Plum</li>'); - * $('.pear').replaceWith(plum); - * $.html(); - * //=> <ul id="fruits"> - * // <li class="apple">Apple</li> - * // <li class="orange">Orange</li> - * // <li class="plum">Plum</li> - * // </ul> - * ``` - * - * @param content - Replacement for matched elements. - * @returns The instance itself. - * @see {@link https://api.jquery.com/replaceWith/} - */ -export function replaceWith(content) { - return domEach(this, (el, i) => { - const { parent } = el; - if (!parent) { - return; - } - const siblings = parent.children; - const cont = typeof content === 'function' ? content.call(el, i, el) : content; - const dom = this._makeDomArray(cont); - /* - * In the case that `dom` contains nodes that already exist in other - * structures, ensure those nodes are properly removed. - */ - updateDOM(dom, null); - const index = siblings.indexOf(el); - // Completely remove old element - uniqueSplice(siblings, index, 1, dom, parent); - if (!dom.includes(el)) { - el.parent = el.prev = el.next = null; - } - }); -} -/** - * Removes all children from each item in the selection. Text nodes and comment - * nodes are left as is. - * - * @category Manipulation - * @example - * - * ```js - * $('ul').empty(); - * $.html(); - * //=> <ul id="fruits"></ul> - * ``` - * - * @returns The instance itself. - * @see {@link https://api.jquery.com/empty/} - */ -export function empty() { - return domEach(this, (el) => { - if (!hasChildren(el)) - return; - for (const child of el.children) { - child.next = child.prev = child.parent = null; - } - el.children.length = 0; - }); -} -export function html(str) { - if (str === undefined) { - const el = this[0]; - if (!el || !hasChildren(el)) - return null; - return this._render(el.children); - } - return domEach(this, (el) => { - if (!hasChildren(el)) - return; - for (const child of el.children) { - child.next = child.prev = child.parent = null; - } - const content = isCheerio(str) - ? str.toArray() - : this._parse(`${str}`, this.options, false, el).children; - updateDOM(content, el); - }); -} -/** - * Turns the collection to a string. Alias for `.html()`. - * - * @category Manipulation - * @returns The rendered document. - */ -export function toString() { - return this._render(this); -} -export function text(str) { - // If `str` is undefined, act as a "getter" - if (str === undefined) { - return staticText(this); - } - if (typeof str === 'function') { - // Function support - return domEach(this, (el, i) => this._make(el).text(str.call(el, i, staticText([el])))); - } - // Append text node to each selected elements - return domEach(this, (el) => { - if (!hasChildren(el)) - return; - for (const child of el.children) { - child.next = child.prev = child.parent = null; - } - const textNode = new Text(`${str}`); - updateDOM(textNode, el); - }); -} -/** - * Clone the cheerio object. - * - * @category Manipulation - * @example - * - * ```js - * const moreFruit = $('#fruits').clone(); - * ``` - * - * @returns The cloned object. - * @see {@link https://api.jquery.com/clone/} - */ -export function clone() { - const clone = Array.prototype.map.call(this.get(), (el) => cloneNode(el, true)); - // Add a root node around the cloned nodes - const root = new Document(clone); - for (const node of clone) { - node.parent = root; - } - return this._make(clone); -} -//# sourceMappingURL=manipulation.js.map \ No newline at end of file diff --git a/node_modules/cheerio/dist/esm/api/manipulation.js.map b/node_modules/cheerio/dist/esm/api/manipulation.js.map deleted file mode 100644 index 343f230..0000000 --- a/node_modules/cheerio/dist/esm/api/manipulation.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"manipulation.js","sourceRoot":"","sources":["../../../src/api/manipulation.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EACL,KAAK,EACL,IAAI,EACJ,WAAW,EACX,SAAS,EACT,QAAQ,GAIT,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,MAAM,IAAI,SAAS,EAAE,MAAM,aAAa,CAAC;AAClD,OAAO,EAAE,IAAI,IAAI,UAAU,EAAE,MAAM,cAAc,CAAC;AAClD,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACzD,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAIzC;;;;;;;;;GASG;AACH,MAAM,UAAU,aAAa,CAE3B,IAAkE,EAClE,KAAe;IAEf,IAAI,IAAI,IAAI,IAAI,EAAE,CAAC;QACjB,OAAO,EAAE,CAAC;IACZ,CAAC;IAED,IAAI,OAAO,IAAI,KAAK,QAAQ,EAAE,CAAC;QAC7B,OAAO,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE,IAAI,CAAC,OAAO,EAAE,KAAK,EAAE,IAAI,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;IACxE,CAAC;IAED,IAAI,QAAQ,IAAI,IAAI,EAAE,CAAC;QACrB,IAAI,IAAI,CAAC,MAAM,KAAK,CA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AI,GAAG,KAAK,CAAC,MAAM,GAAG,IAAI,CAAC;QAChD,CAAC;QAED,MAAM,QAAQ,GAAG,IAAI,IAAI,CAAC,GAAG,GAAG,EAAE,CAAC,CAAC;QAEpC,SAAS,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC;IAC1B,CAAC,CAAC,CAAC;AACL,CAAC;AAED;;;;;;;;;;;;GAYG;AACH,MAAM,UAAU,KAAK;IACnB,MAAM,KAAK,GAAG,KAAK,CAAC,SAAS,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,EAAE,CAAC,EAAE,EAAE,EAAE,CACxD,SAAS,CAAC,EAAE,EAAE,IAAI,CAAC,CACb,CAAC;IAET,0CAA0C;IAC1C,MAAM,IAAI,GAAG,IAAI,QAAQ,CAAC,KAAK,CAAC,CAAC;IACjC,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;QACzB,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC;IACrB,CAAC;IAED,OAAO,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;AAC3B,CAAC"} \ No newline at end of file diff --git a/node_modules/cheerio/dist/esm/api/traversing.d.ts b/node_modules/cheerio/dist/esm/api/traversing.d.ts deleted file mode 100644 index 3961e38..0000000 --- a/node_modules/cheerio/dist/esm/api/traversing.d.ts +++ /dev/null @@ -1,657 +0,0 @@ -/** - * Methods for traversing the DOM structure. - * - * @module cheerio/traversing - */ -import { type AnyNode, type Element, type Document } from 'domhandler'; -import type { Cheerio } from '../cheerio.js'; -import type { AcceptedFilters } from '../types.js'; -/** - * Get the descendants of each element in the current set of matched elements, - * filtered by a selector, jQuery object, or element. - * - * @category Traversing - * @example - * - * ```js - * $('#fruits').find('li').length; - * //=> 3 - * $('#fruits').find($('.apple')).length; - * //=> 1 - * ``` - * - * @param selectorOrHaystack - Element to look for. - * @returns The found elements. - * @see {@link https://api.jquery.com/find/} - */ -export declare function find<T extends AnyNode>(this: Cheerio<T>, selectorOrHaystack?: string | Cheerio<Element> | Element): Cheerio<Element>; -/** - * Find elements by a specific selector. - * - * @private - * @category Traversing - * @param selector - Selector to filter by. - * @param limit - Maximum number of elements to match. - * @returns The found elements. - */ -export declare function _findBySelector<T extends AnyNode>(this: Cheerio<T>, selector: string, limit: number): Cheerio<Element>; -/** - * Get the parent of each element in the current set of matched elements, - * optionally filtered by a selector. - * - * @category Traversing - * @example - * - * ```js - * $('.pear').parent().attr('id'); - * //=> fruits - * ``` - * - * @param selector - If specified filter for parent. - * @returns The parents. - * @see {@link https://api.jquery.com/parent/} - */ -export declare const parent: <T extends AnyNode>(this: Cheerio<T>, selector?: AcceptedFilters<Element>) => Cheerio<Element>; -/** - * Get a set of parents filtered by `selector` of each element in the current - * set of match elements. - * - * @category Traversing - * @example - * - * ```js - * $('.orange').parents().length; - * //=> 2 - * $('.orange').parents('#fruits').length; - * //=> 1 - * ``` - * - * @param selector - If specified filter for parents. - * @returns The parents. - * @see {@link https://api.jquery.com/parents/} - */ -export declare const parents: <T extends AnyNode>(this: Cheerio<T>, selector?: AcceptedFilters<Element>) => Cheerio<Element>; -/** - * Get the ancestors of each element in the current set of matched elements, up - * to but not including the element matched by the selector, DOM node, or - * cheerio object. - * - * @category Traversing - * @example - * - * ```js - * $('.orange').parentsUntil('#food').length; - * //=> 1 - * ``` - * - * @param selector - Selector for element to stop at. - * @param filterSelector - Optional filter for parents. - * @returns The parents. - * @see {@link https://api.jquery.com/parentsUntil/} - */ -export declare const parentsUntil: <T extends AnyNode>(this: Cheerio<T>, selector?: AcceptedFilters<Element> | null, filterSelector?: AcceptedFilters<Element>) => Cheerio<Element>; -/** - * For each element in the set, get the first element that matches the selector - * by testing the element itself and traversing up through its ancestors in the - * DOM tree. - * - * @category Traversing - * @example - * - * ```js - * $('.orange').closest(); - * //=> [] - * - * $('.orange').closest('.apple'); - * // => [] - * - * $('.orange').closest('li'); - * //=> [<li class="orange">Orange</li>] - * - * $('.orange').closest('#fruits'); - * //=> [<ul id="fruits"> ... </ul>] - * ``` - * - * @param selector - Selector for the element to find. - * @returns The closest nodes. - * @see {@link https://api.jquery.com/closest/} - */ -export declare function closest<T extends AnyNode>(this: Cheerio<T>, selector?: AcceptedFilters<Element>): Cheerio<AnyNode>; -/** - * Gets the next sibling of each selected element, optionally filtered by a - * selector. - * - * @category Traversing - * @example - * - * ```js - * $('.apple').next().hasClass('orange'); - * //=> true - * ``` - * - * @param selector - If specified filter for sibling. - * @returns The next nodes. - * @see {@link https://api.jquery.com/next/} - */ -export declare const next: <T extends AnyNode>(this: Cheerio<T>, selector?: AcceptedFilters<Element>) => Cheerio<Element>; -/** - * Gets all the following siblings of the each selected element, optionally - * filtered by a selector. - * - * @category Traversing - * @example - * - * ```js - * $('.apple').nextAll(); - * //=> [<li class="orange">Orange</li>, <li class="pear">Pear</li>] - * $('.apple').nextAll('.orange'); - * //=> [<li class="orange">Orange</li>] - * ``` - * - * @param selector - If specified filter for siblings. - * @returns The next nodes. - * @see {@link https://api.jquery.com/nextAll/} - */ -export declare const nextAll: <T extends AnyNode>(this: Cheerio<T>, selector?: AcceptedFilters<Element>) => Cheerio<Element>; -/** - * Gets all the following siblings up to but not including the element matched - * by the selector, optionally filtered by another selector. - * - * @category Traversing - * @example - * - * ```js - * $('.apple').nextUntil('.pear'); - * //=> [<li class="orange">Orange</li>] - * ``` - * - * @param selector - Selector for element to stop at. - * @param filterSelector - If specified filter for siblings. - * @returns The next nodes. - * @see {@link https://api.jquery.com/nextUntil/} - */ -export declare const nextUntil: <T extends AnyNode>(this: Cheerio<T>, selector?: AcceptedFilters<Element> | null, filterSelector?: AcceptedFilters<Element>) => Cheerio<Element>; -/** - * Gets the previous sibling of each selected element optionally filtered by a - * selector. - * - * @category Traversing - * @example - * - * ```js - * $('.orange').prev().hasClass('apple'); - * //=> true - * ``` - * - * @param selector - If specified filter for siblings. - * @returns The previous nodes. - * @see {@link https://api.jquery.com/prev/} - */ -export declare const prev: <T extends AnyNode>(this: Cheerio<T>, selector?: AcceptedFilters<Element>) => Cheerio<Element>; -/** - * Gets all the preceding siblings of each selected element, optionally filtered - * by a selector. - * - * @category Traversing - * @example - * - * ```js - * $('.pear').prevAll(); - * //=> [<li class="orange">Orange</li>, <li class="apple">Apple</li>] - * - * $('.pear').prevAll('.orange'); - * //=> [<li class="orange">Orange</li>] - * ``` - * - * @param selector - If specified filter for siblings. - * @returns The previous nodes. - * @see {@link https://api.jquery.com/prevAll/} - */ -export declare const prevAll: <T extends AnyNode>(this: Cheerio<T>, selector?: AcceptedFilters<Element>) => Cheerio<Element>; -/** - * Gets all the preceding siblings up to but not including the element matched - * by the selector, optionally filtered by another selector. - * - * @category Traversing - * @example - * - * ```js - * $('.pear').prevUntil('.apple'); - * //=> [<li class="orange">Orange</li>] - * ``` - * - * @param selector - Selector for element to stop at. - * @param filterSelector - If specified filter for siblings. - * @returns The previous nodes. - * @see {@link https://api.jquery.com/prevUntil/} - */ -export declare const prevUntil: <T extends AnyNode>(this: Cheerio<T>, selector?: AcceptedFilters<Element> | null, filterSelector?: AcceptedFilters<Element>) => Cheerio<Element>; -/** - * Get the siblings of each element (excluding the element) in the set of - * matched elements, optionally filtered by a selector. - * - * @category Traversing - * @example - * - * ```js - * $('.pear').siblings().length; - * //=> 2 - * - * $('.pear').siblings('.orange').length; - * //=> 1 - * ``` - * - * @param selector - If specified filter for siblings. - * @returns The siblings. - * @see {@link https://api.jquery.com/siblings/} - */ -export declare const siblings: <T extends AnyNode>(this: Cheerio<T>, selector?: AcceptedFilters<Element>) => Cheerio<Element>; -/** - * Gets the element children of each element in the set of matched elements. - * - * @category Traversing - * @example - * - * ```js - * $('#fruits').children().length; - * //=> 3 - * - * $('#fruits').children('.pear').text(); - * //=> Pear - * ``` - * - * @param selector - If specified filter for children. - * @returns The children. - * @see {@link https://api.jquery.com/children/} - */ -export declare const children: <T extends AnyNode>(this: Cheerio<T>, selector?: AcceptedFilters<Element>) => Cheerio<Element>; -/** - * Gets the children of each element in the set of matched elements, including - * text and comment nodes. - * - * @category Traversing - * @example - * - * ```js - * $('#fruits').contents().length; - * //=> 3 - * ``` - * - * @returns The children. - * @see {@link https://api.jquery.com/contents/} - */ -export declare function contents<T extends AnyNode>(this: Cheerio<T>): Cheerio<AnyNode>; -/** - * Iterates over a cheerio object, executing a function for each matched - * element. When the callback is fired, the function is fired in the context of - * the DOM element, so `this` refers to the current element, which is equivalent - * to the function parameter `element`. To break out of the `each` loop early, - * return with `false`. - * - * @category Traversing - * @example - * - * ```js - * const fruits = []; - * - * $('li').each(function (i, elem) { - * fruits[i] = $(this).text(); - * }); - * - * fruits.join(', '); - * //=> Apple, Orange, Pear - * ``` - * - * @param fn - Function to execute. - * @returns The instance itself, useful for chaining. - * @see {@link https://api.jquery.com/each/} - */ -export declare function each<T>(this: Cheerio<T>, fn: (this: T, i: number, el: T) => void | boolean): Cheerio<T>; -/** - * Pass each element in the current matched set through a function, producing a - * new Cheerio object containing the return values. The function can return an - * individual data item or an array of data items to be inserted into the - * resulting set. If an array is returned, the elements inside the array are - * inserted into the set. If the function returns null or undefined, no element - * will be inserted. - * - * @category Traversing - * @example - * - * ```js - * $('li') - * .map(function (i, el) { - * // this === el - * return $(this).text(); - * }) - * .toArray() - * .join(' '); - * //=> "apple orange pear" - * ``` - * - * @param fn - Function to execute. - * @returns The mapped elements, wrapped in a Cheerio collection. - * @see {@link https://api.jquery.com/map/} - */ -export declare function map<T, M>(this: Cheerio<T>, fn: (this: T, i: number, el: T) => M[] | M | null | undefined): Cheerio<M>; -/** - * Iterates over a cheerio object, reducing the set of selector elements to - * those that match the selector or pass the function's test. - * - * This is the definition for using type guards; have a look below for other - * ways to invoke this method. The function is executed in the context of the - * selected element, so `this` refers to the current element. - * - * @category Traversing - * @example <caption>Function</caption> - * - * ```js - * $('li') - * .filter(function (i, el) { - * // this === el - * return $(this).attr('class') === 'orange'; - * }) - * .attr('class'); //=> orange - * ``` - * - * @param match - Value to look for, following the rules above. - * @returns The filtered collection. - * @see {@link https://api.jquery.com/filter/} - */ -export declare function filter<T, S extends T>(this: Cheerio<T>, match: (this: T, index: number, value: T) => value is S): Cheerio<S>; -/** - * Iterates over a cheerio object, reducing the set of selector elements to - * those that match the selector or pass the function's test. - * - * - When a Cheerio selection is specified, return only the elements contained in - * that selection. - * - When an element is specified, return only that element (if it is contained in - * the original selection). - * - If using the function method, the function is executed in the context of the - * selected element, so `this` refers to the current element. - * - * @category Traversing - * @example <caption>Selector</caption> - * - * ```js - * $('li').filter('.orange').attr('class'); - * //=> orange - * ``` - * - * @example <caption>Function</caption> - * - * ```js - * $('li') - * .filter(function (i, el) { - * // this === el - * return $(this).attr('class') === 'orange'; - * }) - * .attr('class'); //=> orange - * ``` - * - * @param match - Value to look for, following the rules above. See - * {@link AcceptedFilters}. - * @returns The filtered collection. - * @see {@link https://api.jquery.com/filter/} - */ -export declare function filter<T, S extends AcceptedFilters<T>>(this: Cheerio<T>, match: S): Cheerio<S extends string ? Element : T>; -export declare function filterArray<T>(nodes: T[], match: AcceptedFilters<T>, xmlMode?: boolean, root?: Document): Element[] | T[]; -/** - * Checks the current list of elements and returns `true` if _any_ of the - * elements match the selector. If using an element or Cheerio selection, - * returns `true` if _any_ of the elements match. If using a predicate function, - * the function is executed in the context of the selected element, so `this` - * refers to the current element. - * - * @category Traversing - * @param selector - Selector for the selection. - * @returns Whether or not the selector matches an element of the instance. - * @see {@link https://api.jquery.com/is/} - */ -export declare function is<T>(this: Cheerio<T>, selector?: AcceptedFilters<T>): boolean; -/** - * Remove elements from the set of matched elements. Given a Cheerio object that - * represents a set of DOM elements, the `.not()` method constructs a new - * Cheerio object from a subset of the matching elements. The supplied selector - * is tested against each element; the elements that don't match the selector - * will be included in the result. - * - * The `.not()` method can take a function as its argument in the same way that - * `.filter()` does. Elements for which the function returns `true` are excluded - * from the filtered set; all other elements are included. - * - * @category Traversing - * @example <caption>Selector</caption> - * - * ```js - * $('li').not('.apple').length; - * //=> 2 - * ``` - * - * @example <caption>Function</caption> - * - * ```js - * $('li').not(function (i, el) { - * // this === el - * return $(this).attr('class') === 'orange'; - * }).length; //=> 2 - * ``` - * - * @param match - Value to look for, following the rules above. - * @returns The filtered collection. - * @see {@link https://api.jquery.com/not/} - */ -export declare function not<T extends AnyNode>(this: Cheerio<T>, match: AcceptedFilters<T>): Cheerio<T>; -/** - * Filters the set of matched elements to only those which have the given DOM - * element as a descendant or which have a descendant that matches the given - * selector. Equivalent to `.filter(':has(selector)')`. - * - * @category Traversing - * @example <caption>Selector</caption> - * - * ```js - * $('ul').has('.pear').attr('id'); - * //=> fruits - * ``` - * - * @example <caption>Element</caption> - * - * ```js - * $('ul').has($('.pear')[0]).attr('id'); - * //=> fruits - * ``` - * - * @param selectorOrHaystack - Element to look for. - * @returns The filtered collection. - * @see {@link https://api.jquery.com/has/} - */ -export declare function has(this: Cheerio<AnyNode | Element>, selectorOrHaystack: string | Cheerio<Element> | Element): Cheerio<AnyNode | Element>; -/** - * Will select the first element of a cheerio object. - * - * @category Traversing - * @example - * - * ```js - * $('#fruits').children().first().text(); - * //=> Apple - * ``` - * - * @returns The first element. - * @see {@link https://api.jquery.com/first/} - */ -export declare function first<T extends AnyNode>(this: Cheerio<T>): Cheerio<T>; -/** - * Will select the last element of a cheerio object. - * - * @category Traversing - * @example - * - * ```js - * $('#fruits').children().last().text(); - * //=> Pear - * ``` - * - * @returns The last element. - * @see {@link https://api.jquery.com/last/} - */ -export declare function last<T>(this: Cheerio<T>): Cheerio<T>; -/** - * Reduce the set of matched elements to the one at the specified index. Use - * `.eq(-i)` to count backwards from the last selected element. - * - * @category Traversing - * @example - * - * ```js - * $('li').eq(0).text(); - * //=> Apple - * - * $('li').eq(-1).text(); - * //=> Pear - * ``` - * - * @param i - Index of the element to select. - * @returns The element at the `i`th position. - * @see {@link https://api.jquery.com/eq/} - */ -export declare function eq<T>(this: Cheerio<T>, i: number): Cheerio<T>; -/** - * Retrieve one of the elements matched by the Cheerio object, at the `i`th - * position. - * - * @category Traversing - * @example - * - * ```js - * $('li').get(0).tagName; - * //=> li - * ``` - * - * @param i - Element to retrieve. - * @returns The element at the `i`th position. - * @see {@link https://api.jquery.com/get/} - */ -export declare function get<T>(this: Cheerio<T>, i: number): T | undefined; -/** - * Retrieve all elements matched by the Cheerio object, as an array. - * - * @category Traversing - * @example - * - * ```js - * $('li').get().length; - * //=> 3 - * ``` - * - * @returns All elements matched by the Cheerio object. - * @see {@link https://api.jquery.com/get/} - */ -export declare function get<T>(this: Cheerio<T>): T[]; -/** - * Retrieve all the DOM elements contained in the jQuery set as an array. - * - * @example - * - * ```js - * $('li').toArray(); - * //=> [ {...}, {...}, {...} ] - * ``` - * - * @returns The contained items. - */ -export declare function toArray<T>(this: Cheerio<T>): T[]; -/** - * Search for a given element from among the matched elements. - * - * @category Traversing - * @example - * - * ```js - * $('.pear').index(); - * //=> 2 $('.orange').index('li'); - * //=> 1 - * $('.apple').index($('#fruit, li')); - * //=> 1 - * ``` - * - * @param selectorOrNeedle - Element to look for. - * @returns The index of the element. - * @see {@link https://api.jquery.com/index/} - */ -export declare function index<T extends AnyNode>(this: Cheerio<T>, selectorOrNeedle?: string | Cheerio<AnyNode> | AnyNode): number; -/** - * Gets the elements matching the specified range (0-based position). - * - * @category Traversing - * @example - * - * ```js - * $('li').slice(1).eq(0).text(); - * //=> 'Orange' - * - * $('li').slice(1, 2).length; - * //=> 1 - * ``` - * - * @param start - A position at which the elements begin to be selected. If - * negative, it indicates an offset from the end of the set. - * @param end - A position at which the elements stop being selected. If - * negative, it indicates an offset from the end of the set. If omitted, the - * range continues until the end of the set. - * @returns The elements matching the specified range. - * @see {@link https://api.jquery.com/slice/} - */ -export declare function slice<T>(this: Cheerio<T>, start?: number, end?: number): Cheerio<T>; -/** - * End the most recent filtering operation in the current chain and return the - * set of matched elements to its previous state. - * - * @category Traversing - * @example - * - * ```js - * $('li').eq(0).end().length; - * //=> 3 - * ``` - * - * @returns The previous state of the set of matched elements. - * @see {@link https://api.jquery.com/end/} - */ -export declare function end<T>(this: Cheerio<T>): Cheerio<AnyNode>; -/** - * Add elements to the set of matched elements. - * - * @category Traversing - * @example - * - * ```js - * $('.apple').add('.orange').length; - * //=> 2 - * ``` - * - * @param other - Elements to add. - * @param context - Optionally the context of the new selection. - * @returns The combined set. - * @see {@link https://api.jquery.com/add/} - */ -export declare function add<S extends AnyNode, T extends AnyNode>(this: Cheerio<T>, other: string | Cheerio<S> | S | S[], context?: Cheerio<S> | string): Cheerio<S | T>; -/** - * Add the previous set of elements on the stack to the current set, optionally - * filtered by a selector. - * - * @category Traversing - * @example - * - * ```js - * $('li').eq(0).addBack('.orange').length; - * //=> 2 - * ``` - * - * @param selector - Selector for the elements to add. - * @returns The combined set. - * @see {@link https://api.jquery.com/addBack/} - */ -export declare function addBack<T extends AnyNode>(this: Cheerio<T>, selector?: string): Cheerio<AnyNode>; -//# sourceMappingURL=traversing.d.ts.map \ No newline at end of file diff --git a/node_modules/cheerio/dist/esm/api/traversing.d.ts.map b/node_modules/cheerio/dist/esm/api/traversing.d.ts.map deleted file mode 100644 index 15411d1..0000000 --- a/node_modules/cheerio/dist/esm/api/traversing.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"traversing.d.ts","sourceRoot":"","sources":["../../../src/api/traversing.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAEL,KAAK,OAAO,EACZ,KAAK,OAAO,EAGZ,KAAK,QAAQ,EACd,MAAM,YAAY,CAAC;AACpB,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAW7C,OAAO,KAAK,EAAkB,eAAe,EAAE,MAAM,aAAa,CAAC;AAGnE;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,IAAI,CAAC,CAAC,SAAS,OAAO,EACpC,IAAI,EAAE,OAAO,CAAC,CAAC,CAAC,EAChB,kBAAkB,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,GAAG,OAAO,GACvD,OAAO,CAAC,OAAO,CAAC,CAkBlB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,CAAC,EACrB,IAAI,EAAE,OAAO,CAAC,CAAC,CAAC,EAChB,KAAK,CAAC,EAAE,MAAM,EACd,GAAG,CAAC,EAAE,MAAM,GACX,OAAO,CAAC,CAAC,CAAC,CAEZ;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,GAAG,CAAC,CAAC,EAAE,IAAI,EAAE,OAAO,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,OAAO,CAAC,CAEzD;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,GAAG,CAAC,CAAC,SAAS,OAAO,EAAE,CAAC,SAAS,OAAO,EACtD,IAAI,EAAE,OAAO,CAAC,CAAC,CAAC,EAChB,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,EACpC,OAAO,CAAC,EAAE,OAAO,CAAC,CAAC,CAAC,GAAG,MAAM,GAC5B,OAAO,CAAC,CAAC,GAAG,CAAC,CAAC,CAIhB;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,OAAO,CAAC,CAAC,SAAS,OAAO,EACvC,IAAI,EAAE,OAAO,CAAC,CAAC,CAAC,EAChB,QAAQ,CAAC,EAAE,MAAM,GAChB,OAAO,CAAC,OAAO,CAAC,CAIlB"} \ No newline at end of file diff --git a/node_modules/cheerio/dist/esm/api/traversing.js b/node_modules/cheerio/dist/esm/api/traversing.js deleted file mode 100644 index 33ef5ab..0000000 --- a/node_modules/cheerio/dist/esm/api/traversing.js +++ /dev/null @@ -1,853 +0,0 @@ -/** - * Methods for traversing the DOM structure. - * - * @module cheerio/traversing - */ -import { isTag, hasChildren, isDocument, } from 'domhandler'; -import * as select from 'cheerio-select'; -import { domEach, isCheerio } from '../utils.js'; -import { contains } from '../static.js'; -import { getChildren, getSiblings, nextElementSibling, prevElementSibling, uniqueSort, } from 'domutils'; -const reSiblingSelector = /^\s*[+~]/; -/** - * Get the descendants of each element in the current set of matched elements, - * filtered by a selector, jQuery object, or element. - * - * @category Traversing - * @example - * - * ```js - * $('#fruits').find('li').length; - * //=> 3 - * $('#fruits').find($('.apple')).length; - * //=> 1 - * ``` - * - * @param selectorOrHaystack - Element to look for. - * @returns The found elements. - * @see {@link https://api.jquery.com/find/} - */ -export function find(selectorOrHaystack) { - if (!selectorOrHaystack) { - return this._make([]); - } - if (typeof selectorOrHaystack !== 'string') { - const haystack = isCheerio(selectorOrHaystack) - ? selectorOrHaystack.toArray() - : [selectorOrHaystack]; - const context = this.toArray(); - return this._make(haystack.filter((elem) => context.some((node) => contains(node, elem)))); - } - return this._findBySelector(selectorOrHaystack, Number.POSITIVE_INFINITY); -} -/** - * Find elements by a specific selector. - * - * @private - * @category Traversing - * @param selector - Selector to filter by. - * @param limit - Maximum number of elements to match. - * @returns The found elements. - */ -export function _findBySelector(selector, limit) { - var _a; - const context = this.toArray(); - const elems = reSiblingSelector.test(selector) - ? context - : this.children().toArray(); - const options = { - context, - root: (_a = this._root) === null || _a === void 0 ? void 0 : _a[0], - // Pass options that are recognized by `cheerio-select` - xmlMode: this.options.xmlMode, - lowerCaseTags: this.options.lowerCaseTags, - lowerCaseAttributeNames: this.options.lowerCaseAttributeNames, - pseudos: this.options.pseudos, - quirksMode: this.options.quirksMode, - }; - return this._make(select.select(selector, elems, options, limit)); -} -/** - * Creates a matcher, using a particular mapping function. Matchers provide a - * function that finds elements using a generating function, supporting - * filtering. - * - * @private - * @param matchMap - Mapping function. - * @returns - Function for wrapping generating functions. - */ -function _getMatcher(matchMap) { - return function (fn, ...postFns) { - return function (selector) { - var _a; - let matched = matchMap(fn, this); - if (selector) { - matched = filterArray(matched, selector, this.options.xmlMode, (_a = this._root) === null || _a === void 0 ? void 0 : _a[0]); - } - return this._make( - // Post processing is only necessary if there is more than one element. - this.length > 1 && matched.length > 1 - ? postFns.reduce((elems, fn) => fn(elems), matched) - : matched); - }; - }; -} -/** Matcher that adds multiple elements for each entry in the input. */ -const _matcher = _getMatcher((fn, elems) => { - let ret = []; - for (let i = 0; i < elems.length; i++) { - const value = fn(elems[i]); - if (value.length > 0) - ret = ret.concat(value); - } - return ret; -}); -/** Matcher that adds at most one element for each entry in the input. */ -const _singleMatcher = _getMatcher((fn, elems) => { - const ret = []; - for (let i = 0; i < elems.length; i++) { - const value = fn(elems[i]); - if (value !== null) { - ret.push(value); - } - } - return ret; -}); -/** - * Matcher that supports traversing until a condition is met. - * - * @param nextElem - Function that returns the next element. - * @param postFns - Post processing functions. - * @returns A function usable for `*Until` methods. - */ -function _matchUntil(nextElem, ...postFns) { - // We use a variable here that is used from within the matcher. - let matches = null; - const innerMatcher = _getMatcher((nextElem, elems) => { - const matched = []; - domEach(elems, (elem) => { - for (let next; (next = nextElem(elem)); elem = next) { - // FIXME: `matched` might contain duplicates here and the index is too large. - if (matches === null || matches === void 0 ? void 0 : matches(next, matched.length)) - break; - matched.push(next); - } - }); - return matched; - })(nextElem, ...postFns); - return function (selector, filterSelector) { - // Override `matches` variable with the new target. - matches = - typeof selector === 'string' - ? (elem) => select.is(elem, selector, this.options) - : selector - ? getFilterFn(selector) - : null; - const ret = innerMatcher.call(this, filterSelector); - // Set `matches` to `null`, so we don't waste memory. - matches = null; - return ret; - }; -} -function _removeDuplicates(elems) { - return elems.length > 1 ? Array.from(new Set(elems)) : elems; -} -/** - * Get the parent of each element in the current set of matched elements, - * optionally filtered by a selector. - * - * @category Traversing - * @example - * - * ```js - * $('.pear').parent().attr('id'); - * //=> fruits - * ``` - * - * @param selector - If specified filter for parent. - * @returns The parents. - * @see {@link https://api.jquery.com/parent/} - */ -export const parent = _singleMatcher(({ parent }) => (parent && !isDocument(parent) ? parent : null), _removeDuplicates); -/** - * Get a set of parents filtered by `selector` of each element in the current - * set of match elements. - * - * @category Traversing - * @example - * - * ```js - * $('.orange').parents().length; - * //=> 2 - * $('.orange').parents('#fruits').length; - * //=> 1 - * ``` - * - * @param selector - If specified filter for parents. - * @returns The parents. - * @see {@link https://api.jquery.com/parents/} - */ -export const parents = _matcher((elem) => { - const matched = []; - while (elem.parent && !isDocument(elem.parent)) { - matched.push(elem.parent); - elem = elem.parent; - } - return matched; -}, uniqueSort, (elems) => elems.reverse()); -/** - * Get the ancestors of each element in the current set of matched elements, up - * to but not including the element matched by the selector, DOM node, or - * cheerio object. - * - * @category Traversing - * @example - * - * ```js - * $('.orange').parentsUntil('#food').length; - * //=> 1 - * ``` - * - * @param selector - Selector for element to stop at. - * @param filterSelector - Optional filter for parents. - * @returns The parents. - * @see {@link https://api.jquery.com/parentsUntil/} - */ -export const parentsUntil = _matchUntil(({ parent }) => (parent && !isDocument(parent) ? parent : null), uniqueSort, (elems) => elems.reverse()); -/** - * For each element in the set, get the first element that matches the selector - * by testing the element itself and traversing up through its ancestors in the - * DOM tree. - * - * @category Traversing - * @example - * - * ```js - * $('.orange').closest(); - * //=> [] - * - * $('.orange').closest('.apple'); - * // => [] - * - * $('.orange').closest('li'); - * //=> [<li class="orange">Orange</li>] - * - * $('.orange').closest('#fruits'); - * //=> [<ul id="fruits"> ... </ul>] - * ``` - * - * @param selector - Selector for the element to find. - * @returns The closest nodes. - * @see {@link https://api.jquery.com/closest/} - */ -export function closest(selector) { - var _a; - const set = []; - if (!selector) { - return this._make(set); - } - const selectOpts = { - xmlMode: this.options.xmlMode, - root: (_a = this._root) === null || _a === void 0 ? void 0 : _a[0], - }; - const selectFn = typeof selector === 'string' - ? (elem) => select.is(elem, selector, selectOpts) - : getFilterFn(selector); - domEach(this, (elem) => { - if (elem && !isDocument(elem) && !isTag(elem)) { - elem = elem.parent; - } - while (elem && isTag(elem)) { - if (selectFn(elem, 0)) { - // Do not add duplicate elements to the set - if (!set.includes(elem)) { - set.push(elem); - } - break; - } - elem = elem.parent; - } - }); - return this._make(set); -} -/** - * Gets the next sibling of each selected element, optionally filtered by a - * selector. - * - * @category Traversing - * @example - * - * ```js - * $('.apple').next().hasClass('orange'); - * //=> true - * ``` - * - * @param selector - If specified filter for sibling. - * @returns The next nodes. - * @see {@link https://api.jquery.com/next/} - */ -export const next = _singleMatcher((elem) => nextElementSibling(elem)); -/** - * Gets all the following siblings of the each selected element, optionally - * filtered by a selector. - * - * @category Traversing - * @example - * - * ```js - * $('.apple').nextAll(); - * //=> [<li class="orange">Orange</li>, <li class="pear">Pear</li>] - * $('.apple').nextAll('.orange'); - * //=> [<li class="orange">Orange</li>] - * ``` - * - * @param selector - If specified filter for siblings. - * @returns The next nodes. - * @see {@link https://api.jquery.com/nextAll/} - */ -export const nextAll = _matcher((elem) => { - const matched = []; - while (elem.next) { - elem = elem.next; - if (isTag(elem)) - matched.push(elem); - } - return matched; -}, _removeDuplicates); -/** - * Gets all the following siblings up to but not including the element matched - * by the selector, optionally filtered by another selector. - * - * @category Traversing - * @example - * - * ```js - * $('.apple').nextUntil('.pear'); - * //=> [<li class="orange">Orange</li>] - * ``` - * - * @param selector - Selector for element to stop at. - * @param filterSelector - If specified filter for siblings. - * @returns The next nodes. - * @see {@link https://api.jquery.com/nextUntil/} - */ -export const nextUntil = _matchUntil((el) => nextElementSibling(el), _removeDuplicates); -/** - * Gets the previous sibling of each selected element optionally filtered by a - * selector. - * - * @category Traversing - * @example - * - * ```js - * $('.orange').prev().hasClass('apple'); - * //=> true - * ``` - * - * @param selector - If specified filter for siblings. - * @returns The previous nodes. - * @see {@link https://api.jquery.com/prev/} - */ -export const prev = _singleMatcher((elem) => prevElementSibling(elem)); -/** - * Gets all the preceding siblings of each selected element, optionally filtered - * by a selector. - * - * @category Traversing - * @example - * - * ```js - * $('.pear').prevAll(); - * //=> [<li class="orange">Orange</li>, <li class="apple">Apple</li>] - * - * $('.pear').prevAll('.orange'); - * //=> [<li class="orange">Orange</li>] - * ``` - * - * @param selector - If specified filter for siblings. - * @returns The previous nodes. - * @see {@link https://api.jquery.com/prevAll/} - */ -export const prevAll = _matcher((elem) => { - const matched = []; - while (elem.prev) { - elem = elem.prev; - if (isTag(elem)) - matched.push(elem); - } - return matched; -}, _removeDuplicates); -/** - * Gets all the preceding siblings up to but not including the element matched - * by the selector, optionally filtered by another selector. - * - * @category Traversing - * @example - * - * ```js - * $('.pear').prevUntil('.apple'); - * //=> [<li class="orange">Orange</li>] - * ``` - * - * @param selector - Selector for element to stop at. - * @param filterSelector - If specified filter for siblings. - * @returns The previous nodes. - * @see {@link https://api.jquery.com/prevUntil/} - */ -export const prevUntil = _matchUntil((el) => prevElementSibling(el), _removeDuplicates); -/** - * Get the siblings of each element (excluding the element) in the set of - * matched elements, optionally filtered by a selector. - * - * @category Traversing - * @example - * - * ```js - * $('.pear').siblings().length; - * //=> 2 - * - * $('.pear').siblings('.orange').length; - * //=> 1 - * ``` - * - * @param selector - If specified filter for siblings. - * @returns The siblings. - * @see {@link https://api.jquery.com/siblings/} - */ -export const siblings = _matcher((elem) => getSiblings(elem).filter((el) => isTag(el) && el !== elem), uniqueSort); -/** - * Gets the element children of each element in the set of matched elements. - * - * @category Traversing - * @example - * - * ```js - * $('#fruits').children().length; - * //=> 3 - * - * $('#fruits').children('.pear').text(); - * //=> Pear - * ``` - * - * @param selector - If specified filter for children. - * @returns The children. - * @see {@link https://api.jquery.com/children/} - */ -export const children = _matcher((elem) => getChildren(elem).filter(isTag), _removeDuplicates); -/** - * Gets the children of each element in the set of matched elements, including - * text and comment nodes. - * - * @category Traversing - * @example - * - * ```js - * $('#fruits').contents().length; - * //=> 3 - * ``` - * - * @returns The children. - * @see {@link https://api.jquery.com/contents/} - */ -export function contents() { - const elems = this.toArray().reduce((newElems, elem) => hasChildren(elem) ? newElems.concat(elem.children) : newElems, []); - return this._make(elems); -} -/** - * Iterates over a cheerio object, executing a function for each matched - * element. When the callback is fired, the function is fired in the context of - * the DOM element, so `this` refers to the current element, which is equivalent - * to the function parameter `element`. To break out of the `each` loop early, - * return with `false`. - * - * @category Traversing - * @example - * - * ```js - * const fruits = []; - * - * $('li').each(function (i, elem) { - * fruits[i] = $(this).text(); - * }); - * - * fruits.join(', '); - * //=> Apple, Orange, Pear - * ``` - * - * @param fn - Function to execute. - * @returns The instance itself, useful for chaining. - * @see {@link https://api.jquery.com/each/} - */ -export function each(fn) { - let i = 0; - const len = this.length; - while (i < len && fn.call(this[i], i, this[i]) !== false) - ++i; - return this; -} -/** - * Pass each element in the current matched set through a function, producing a - * new Cheerio object containing the return values. The function can return an - * individual data item or an array of data items to be inserted into the - * resulting set. If an array is returned, the elements inside the array are - * inserted into the set. If the function returns null or undefined, no element - * will be inserted. - * - * @category Traversing - * @example - * - * ```js - * $('li') - * .map(function (i, el) { - * // this === el - * return $(this).text(); - * }) - * .toArray() - * .join(' '); - * //=> "apple orange pear" - * ``` - * - * @param fn - Function to execute. - * @returns The mapped elements, wrapped in a Cheerio collection. - * @see {@link https://api.jquery.com/map/} - */ -export function map(fn) { - let elems = []; - for (let i = 0; i < this.length; i++) { - const el = this[i]; - const val = fn.call(el, i, el); - if (val != null) { - elems = elems.concat(val); - } - } - return this._make(elems); -} -/** - * Creates a function to test if a filter is matched. - * - * @param match - A filter. - * @returns A function that determines if a filter has been matched. - */ -function getFilterFn(match) { - if (typeof match === 'function') { - return (el, i) => match.call(el, i, el); - } - if (isCheerio(match)) { - return (el) => Array.prototype.includes.call(match, el); - } - return function (el) { - return match === el; - }; -} -export function filter(match) { - var _a; - return this._make(filterArray(this.toArray(), match, this.options.xmlMode, (_a = this._root) === null || _a === void 0 ? void 0 : _a[0])); -} -export function filterArray(nodes, match, xmlMode, root) { - return typeof match === 'string' - ? select.filter(match, nodes, { xmlMode, root }) - : nodes.filter(getFilterFn(match)); -} -/** - * Checks the current list of elements and returns `true` if _any_ of the - * elements match the selector. If using an element or Cheerio selection, - * returns `true` if _any_ of the elements match. If using a predicate function, - * the function is executed in the context of the selected element, so `this` - * refers to the current element. - * - * @category Traversing - * @param selector - Selector for the selection. - * @returns Whether or not the selector matches an element of the instance. - * @see {@link https://api.jquery.com/is/} - */ -export function is(selector) { - const nodes = this.toArray(); - return typeof selector === 'string' - ? select.some(nodes.filter(isTag), selector, this.options) - : selector - ? nodes.some(getFilterFn(selector)) - : false; -} -/** - * Remove elements from the set of matched elements. Given a Cheerio object that - * represents a set of DOM elements, the `.not()` method constructs a new - * Cheerio object from a subset of the matching elements. The supplied selector - * is tested against each element; the elements that don't match the selector - * will be included in the result. - * - * The `.not()` method can take a function as its argument in the same way that - * `.filter()` does. Elements for which the function returns `true` are excluded - * from the filtered set; all other elements are included. - * - * @category Traversing - * @example <caption>Selector</caption> - * - * ```js - * $('li').not('.apple').length; - * //=> 2 - * ``` - * - * @example <caption>Function</caption> - * - * ```js - * $('li').not(function (i, el) { - * // this === el - * return $(this).attr('class') === 'orange'; - * }).length; //=> 2 - * ``` - * - * @param match - Value to look for, following the rules above. - * @returns The filtered collection. - * @see {@link https://api.jquery.com/not/} - */ -export function not(match) { - let nodes = this.toArray(); - if (typeof match === 'string') { - const matches = new Set(select.filter(match, nodes, this.options)); - nodes = nodes.filter((el) => !matches.has(el)); - } - else { - const filterFn = getFilterFn(match); - nodes = nodes.filter((el, i) => !filterFn(el, i)); - } - return this._make(nodes); -} -/** - * Filters the set of matched elements to only those which have the given DOM - * element as a descendant or which have a descendant that matches the given - * selector. Equivalent to `.filter(':has(selector)')`. - * - * @category Traversing - * @example <caption>Selector</caption> - * - * ```js - * $('ul').has('.pear').attr('id'); - * //=> fruits - * ``` - * - * @example <caption>Element</caption> - * - * ```js - * $('ul').has($('.pear')[0]).attr('id'); - * //=> fruits - * ``` - * - * @param selectorOrHaystack - Element to look for. - * @returns The filtered collection. - * @see {@link https://api.jquery.com/has/} - */ -export function has(selectorOrHaystack) { - return this.filter(typeof selectorOrHaystack === 'string' - ? // Using the `:has` selector here short-circuits searches. - `:has(${selectorOrHaystack})` - : (_, el) => this._make(el).find(selectorOrHaystack).length > 0); -} -/** - * Will select the first element of a cheerio object. - * - * @category Traversing - * @example - * - * ```js - * $('#fruits').children().first().text(); - * //=> Apple - * ``` - * - * @returns The first element. - * @see {@link https://api.jquery.com/first/} - */ -export function first() { - return this.length > 1 ? this._make(this[0]) : this; -} -/** - * Will select the last element of a cheerio object. - * - * @category Traversing - * @example - * - * ```js - * $('#fruits').children().last().text(); - * //=> Pear - * ``` - * - * @returns The last element. - * @see {@link https://api.jquery.com/last/} - */ -export function last() { - return this.length > 0 ? this._make(this[this.length - 1]) : this; -} -/** - * Reduce the set of matched elements to the one at the specified index. Use - * `.eq(-i)` to count backwards from the last selected element. - * - * @category Traversing - * @example - * - * ```js - * $('li').eq(0).text(); - * //=> Apple - * - * $('li').eq(-1).text(); - * //=> Pear - * ``` - * - * @param i - Index of the element to select. - * @returns The element at the `i`th position. - * @see {@link https://api.jquery.com/eq/} - */ -export function eq(i) { - var _a; - i = +i; - // Use the first identity optimization if possible - if (i === 0 && this.length <= 1) - return this; - if (i < 0) - i = this.length + i; - return this._make((_a = this[i]) !== null && _a !== void 0 ? _a : []); -} -export function get(i) { - if (i == null) { - return this.toArray(); - } - return this[i < 0 ? this.length + i : i]; -} -/** - * Retrieve all the DOM elements contained in the jQuery set as an array. - * - * @example - * - * ```js - * $('li').toArray(); - * //=> [ {...}, {...}, {...} ] - * ``` - * - * @returns The contained items. - */ -export function toArray() { - return Array.prototype.slice.call(this); -} -/** - * Search for a given element from among the matched elements. - * - * @category Traversing - * @example - * - * ```js - * $('.pear').index(); - * //=> 2 $('.orange').index('li'); - * //=> 1 - * $('.apple').index($('#fruit, li')); - * //=> 1 - * ``` - * - * @param selectorOrNeedle - Element to look for. - * @returns The index of the element. - * @see {@link https://api.jquery.com/index/} - */ -export function index(selectorOrNeedle) { - let $haystack; - let needle; - if (selectorOrNeedle == null) { - $haystack = this.parent().children(); - needle = this[0]; - } - else if (typeof selectorOrNeedle === 'string') { - $haystack = this._make(selectorOrNeedle); - needle = this[0]; - } - else { - // eslint-disable-next-line @typescript-eslint/no-this-alias, unicorn/no-this-assignment - $haystack = this; - needle = isCheerio(selectorOrNeedle) - ? selectorOrNeedle[0] - : selectorOrNeedle; - } - return Array.prototype.indexOf.call($haystack, needle); -} -/** - * Gets the elements matching the specified range (0-based position). - * - * @category Traversing - * @example - * - * ```js - * $('li').slice(1).eq(0).text(); - * //=> 'Orange' - * - * $('li').slice(1, 2).length; - * //=> 1 - * ``` - * - * @param start - A position at which the elements begin to be selected. If - * negative, it indicates an offset from the end of the set. - * @param end - A position at which the elements stop being selected. If - * negative, it indicates an offset from the end of the set. If omitted, the - * range continues until the end of the set. - * @returns The elements matching the specified range. - * @see {@link https://api.jquery.com/slice/} - */ -export function slice(start, end) { - return this._make(Array.prototype.slice.call(this, start, end)); -} -/** - * End the most recent filtering operation in the current chain and return the - * set of matched elements to its previous state. - * - * @category Traversing - * @example - * - * ```js - * $('li').eq(0).end().length; - * //=> 3 - * ``` - * - * @returns The previous state of the set of matched elements. - * @see {@link https://api.jquery.com/end/} - */ -export function end() { - var _a; - return (_a = this.prevObject) !== null && _a !== void 0 ? _a : this._make([]); -} -/** - * Add elements to the set of matched elements. - * - * @category Traversing - * @example - * - * ```js - * $('.apple').add('.orange').length; - * //=> 2 - * ``` - * - * @param other - Elements to add. - * @param context - Optionally the context of the new selection. - * @returns The combined set. - * @see {@link https://api.jquery.com/add/} - */ -export function add(other, context) { - const selection = this._make(other, context); - const contents = uniqueSort([...this.get(), ...selection.get()]); - return this._make(contents); -} -/** - * Add the previous set of elements on the stack to the current set, optionally - * filtered by a selector. - * - * @category Traversing - * @example - * - * ```js - * $('li').eq(0).addBack('.orange').length; - * //=> 2 - * ``` - * - * @param selector - Selector for the elements to add. - * @returns The combined set. - * @see {@link https://api.jquery.com/addBack/} - */ -export function addBack(selector) { - return this.prevObject - ? this.add(selector ? this.prevObject.filter(selector) : this.prevObject) - : this; -} -//# sourceMappingURL=traversing.js.map \ No newline at end of file diff --git a/node_modules/cheerio/dist/esm/api/traversing.js.map b/node_modules/cheerio/dist/esm/api/traversing.js.map deleted file mode 100644 index 5bc2645..0000000 --- a/node_modules/cheerio/dist/esm/api/traversing.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"traversing.js","sourceRoot":"","sources":["../../../src/api/traversing.ts"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a39fe6..0000000 --- a/node_modules/cheerio/dist/esm/cheerio.d.ts +++ /dev/null @@ -1,85 +0,0 @@ -import type { InternalOptions } from './options.js'; -import type { AnyNode, Document, ParentNode } from 'domhandler'; -import type { BasicAcceptedElems } from './types.js'; -import * as Attributes from './api/attributes.js'; -import * as Traversing from './api/traversing.js'; -import * as Manipulation from './api/manipulation.js'; -import * as Css from './api/css.js'; -import * as Forms from './api/forms.js'; -import * as Extract from './api/extract.js'; -type MethodsType = typeof Attributes & typeof Traversing & typeof Manipulation & typeof Css & typeof Forms & typeof Extract; -/** - * The cheerio class is the central class of the library. It wraps a set of - * elements and provides an API for traversing, modifying, and interacting with - * the set. - * - * Loading a document will return the Cheerio class bound to the root element of - * the document. The class will be instantiated when querying the document (when - * calling `$('selector')`). - * - * @example This is the HTML markup we will be using in all of the API examples: - * - * ```html - * <ul id="fruits"> - * <li class="apple">Apple</li> - * <li class="orange">Orange</li> - * <li class="pear">Pear</li> - * </ul> - * ``` - */ -export declare abstract class Cheerio<T> implements ArrayLike<T> { - length: number; - [index: number]: T; - options: InternalOptions; - /** - * The root of the document. Can be set by using the `root` argument of the - * constructor. - * - * @private - */ - _root: Cheerio<Document> | null; - /** - * Instance of cheerio. Methods are specified in the modules. Usage of this - * constructor is not recommended. Please use `$.load` instead. - * - * @private - * @param elements - The new selection. - * @param root - Sets the root node. - * @param options - Options for the instance. - */ - constructor(elements: ArrayLike<T> | undefined, root: Cheerio<Document> | null, options: InternalOptions); - prevObject: Cheerio<any> | undefined; - /** - * Make a cheerio object. - * - * @private - * @param dom - The contents of the new object. - * @param context - The context of the new object. - * @returns The new cheerio object. - */ - abstract _make<T>(dom: ArrayLike<T> | T | string, context?: BasicAcceptedElems<AnyNode>): Cheerio<T>; - /** - * Parses some content. - * - * @private - * @param content - Content to parse. - * @param options - Options for parsing. - * @param isDocument - Allows parser to be switched to fragment mode. - * @returns A document containing the `content`. - */ - abstract _parse(content: string | Document | AnyNode | AnyNode[] | Buffer, options: InternalOptions, isDocument: boolean, context: ParentNode | null): Document; - /** - * Render an element or a set of elements. - * - * @private - * @param dom - DOM to render. - * @returns The rendered DOM. - */ - abstract _render(dom: AnyNode | ArrayLike<AnyNode>): string; -} -export interface Cheerio<T> extends MethodsType, Iterable<T> { - cheerio: '[cheerio object]'; - splice: typeof Array.prototype.splice; -} -export {}; -//# sourceMappingURL=cheerio.d.ts.map \ No newline at end of file diff --git a/node_modules/cheerio/dist/esm/cheerio.d.ts.map b/node_modules/cheerio/dist/esm/cheerio.d.ts.map deleted file mode 100644 index b949c21..0000000 --- a/node_modules/cheerio/dist/esm/cheerio.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"cheerio.d.ts","sourceRoot":"","sources":["../../src/cheerio.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AACpD,OAAO,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAChE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAErD,OAAO,KAAK,UAAU,MAAM,qBAAqB,CAAC;AAClD,OAAO,KAAK,UAAU,MAAM,qBAAqB,CAAC;AAClD,OAAO,KAAK,YAAY,MAAM,uBAAuB,CAAC;AACtD,OAAO,KAAK,GAAG,MAAM,cAAc,CAAC;AACpC,OAAO,KAAK,KAAK,MAAM,gBAAgB,CAAC;AACxC,OAAO,KAAK,OAAO,MAAM,kBAAkB,CAAC;AAE5C,KAAK,WAAW,GAAG,OAAO,UAAU,GAClC,OAAO,UAAU,GACjB,OAAO,YAAY,GACnB,OAAO,GAAG,GACV,OAAO,KAAK,GACZ,OAAO,OAAO,CAAC;AAEjB;;;;;;;;;;;;;;;;;;GAkBG;AACH,8BAAsB,OAAO,CAAC,CAAC,CAAE,YAAW,SAAS,CAAC,CAAC,CAAC;IACtD,MAAM,SAAK;IACX,CAAC,KAAK,EAAE,MAAM,GAAG,CAAC,CAAC;IAEnB,OAAO,EAAE,eAAe,CAAC;IACzB;;;;;OAKG;IACH,KAAK,EAAE,OAAO,CAAC,QAAQ,CAAC,GAAG,IAAI,CAAC;IAEhC;;;;;;;;OAQG;gBAED,QAAQ,EAAE,SAAS,CAAC,CAAC,CAAC,GAAG,SAAS,EAClC,IAAI,EAAE,OAAO,CAAC,QAAQ,CAAC,GAAG,IAAI,EAC9B,OAAO,EAAE,eAAe;IAa1B,UAAU,EAAE,OAAO,CAAC,GAAG,CAAC,GAAG,SAAS,CAAC;IACrC;;;;;;;OAOG;IACH,QAAQ,CAAC,KAAK,CAAC,CAAC,EACd,GAAG,EAAE,SAAS,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,MAAM,EAC9B,OAAO,CAAC,EAAE,kBAAkB,CAAC,OAAO,CAAC,GACpC,OAAO,CAAC,CAAC,CAAC;IAEb;;;;;;;;OAQG;IACH,QAAQ,CAAC,MAAM,CACb,OAAO,EAAE,MAAM,GAAG,QAAQ,GAAG,OAAO,GAAG,OAAO,EAAE,GAAG,MAAM,EACzD,OAAO,EAAE,eAAe,EACxB,UAAU,EAAE,OAAO,EACnB,OAAO,EAAE,UAAU,GAAG,IAAI,GACzB,QAAQ;IAEX;;;;;;OAMG;IACH,QAAQ,CAAC,OAAO,CAAC,GAAG,EAAE,OAAO,GAAG,SAAS,CAAC,OAAO,CAAC,GAAG,MAAM;CAC5D;AAED,MAAM,WAAW,OAAO,CAAC,CAAC,CAAE,SAAQ,WAAW,EAAE,QAAQ,CAAC,CAAC,CAAC;IAC1D,OAAO,EAAE,kBAAkB,CAAC;IAE5B,MAAM,EAAE,OAAO,KAAK,CAAC,SAAS,CAAC,MAAM,CAAC;CACvC"} \ No newline at end of file diff --git a/node_modules/cheerio/dist/esm/cheerio.js b/node_modules/cheerio/dist/esm/cheerio.js deleted file mode 100644 index dde9ab0..0000000 --- a/node_modules/cheerio/dist/esm/cheerio.js +++ /dev/null @@ -1,58 +0,0 @@ -import * as Attributes from './api/attributes.js'; -import * as Traversing from './api/traversing.js'; -import * as Manipulation from './api/manipulation.js'; -import * as Css from './api/css.js'; -import * as Forms from './api/forms.js'; -import * as Extract from './api/extract.js'; -/** - * The cheerio class is the central class of the library. It wraps a set of - * elements and provides an API for traversing, modifying, and interacting with - * the set. - * - * Loading a document will return the Cheerio class bound to the root element of - * the document. The class will be instantiated when querying the document (when - * calling `$('selector')`). - * - * @example This is the HTML markup we will be using in all of the API examples: - * - * ```html - * <ul id="fruits"> - * <li class="apple">Apple</li> - * <li class="orange">Orange</li> - * <li class="pear">Pear</li> - * </ul> - * ``` - */ -export class Cheerio { - /** - * Instance of cheerio. Methods are specified in the modules. Usage of this - * constructor is not recommended. Please use `$.load` instead. - * - * @private - * @param elements - The new selection. - * @param root - Sets the root node. - * @param options - Options for the instance. - */ - constructor(elements, root, options) { - this.length = 0; - this.options = options; - this._root = root; - if (elements) { - for (let idx = 0; idx < elements.length; idx++) { - this[idx] = elements[idx]; - } - this.length = elements.length; - } - } -} -/** Set a signature of the object. */ -Cheerio.prototype.cheerio = '[cheerio object]'; -/* - * Make cheerio an array-like object - */ -Cheerio.prototype.splice = Array.prototype.splice; -// Support for (const element of $(...)) iteration: -Cheerio.prototype[Symbol.iterator] = Array.prototype[Symbol.iterator]; -// Plug in the API -Object.assign(Cheerio.prototype, Attributes, Traversing, Manipulation, Css, Forms, Extract); -//# sourceMappingURL=cheerio.js.map \ No newline at end of file diff --git a/node_modules/cheerio/dist/esm/cheerio.js.map b/node_modules/cheerio/dist/esm/cheerio.js.map deleted file mode 100644 index e4649b3..0000000 --- a/node_modules/cheerio/dist/esm/cheerio.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"cheerio.js","sourceRoot":"","sources":["../../src/cheerio.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,UAAU,MAAM,qBAAqB,CAAC;AAClD,OAAO,KAAK,UAAU,MAAM,qBAAqB,CAAC;AAClD,OAAO,KAAK,YAAY,MAAM,uBAAuB,CAAC;AACtD,OAAO,KAAK,GAAG,MAAM,cAAc,CAAC;AACpC,OAAO,KAAK,KAAK,MAAM,gBAAgB,CAAC;AACxC,OAAO,KAAK,OAAO,MAAM,kBAAkB,CAAC;AAS5C;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,OAAgB,OAAO;IAa3B;;;;;;;;OAQG;IACH,YACE,QAAkC,EAClC,IAA8B,EAC9B,OAAwB;QAxB1B,WAAM,GAAG,CAAC,CAAC;QA0BT,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC;QAElB,IAAI,QAAQ,EAAE,CAAC;YACb,KAAK,IAAI,GAAG,GAAG,CAAC,EAAE,GAAG,GAAG,QAAQ,CAAC,MAAM,EAAE,GAAG,EAAE,EAAE,CAAC;gBAC/C,IAAI,CAAC,GAAG,CAAC,GAAG,QAAQ,CAAC,GAAG,CAAC,CAAC;YAC5B,CAAC;YACD,IAAI,CAAC,MAAM,GAAG,QAAQ,CAAC,MAAM,CAAC;QAChC,CAAC;IACH,CAAC;CAwCF;AAQD,qCAAqC;AACrC,OAAO,CAAC,SAAS,CAAC,OAAO,GAAG,kBAAkB,CAAC;AAE/C;;GAEG;AACH,OAAO,CAAC,SAAS,CAAC,MAAM,GAAG,KAAK,CAAC,SAAS,CAAC,MAAM,CAAC;AAElD,mDAAmD;AACnD,OAAO,CAAC,SAAS,CAAC,MAAM,CAAC,QAAQ,CAAC,GAAG,KAAK,CAAC,SAAS,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;AAEtE,kBAAkB;AAClB,MAAM,CAAC,MAAM,CACX,OAAO,CAAC,SAAS,EACjB,UAAU,EACV,UAAU,EACV,YAAY,EACZ,GAAG,EACH,KAAK,EACL,OAAO,CACR,CAAC"} \ No newline at end of file diff --git a/node_modules/cheerio/dist/esm/index.d.ts b/node_modules/cheerio/dist/esm/index.d.ts deleted file mode 100644 index 9c4746c..0000000 --- a/node_modules/cheerio/dist/esm/index.d.ts +++ /dev/null @@ -1,104 +0,0 @@ -/** - * @file Batteries-included version of Cheerio. This module includes several - * convenience methods for loading documents from various sources. - */ -export * from './load-parse.js'; -export { contains, merge } from './static.js'; -export type * from './types.js'; -export type { Cheerio, CheerioAPI, CheerioOptions, HTMLParser2Options, } from './slim.js'; -import { type SnifferOptions } from 'encoding-sniffer'; -import * as undici from 'undici'; -import { Writable } from 'node:stream'; -import type { CheerioAPI } from './load.js'; -import { type CheerioOptions } from './options.js'; -/** - * Sniffs the encoding of a buffer, then creates a querying function bound to a - * document created from the buffer. - * - * @category Loading - * @example - * - * ```js - * import * as cheerio from 'cheerio'; - * - * const buffer = fs.readFileSync('index.html'); - * const $ = cheerio.fromBuffer(buffer); - * ``` - * - * @param buffer - The buffer to sniff the encoding of. - * @param options - The options to pass to Cheerio. - * @returns The loaded document. - */ -export declare function loadBuffer(buffer: Buffer, options?: DecodeStreamOptions): CheerioAPI; -/** - * Creates a stream that parses a sequence of strings into a document. - * - * The stream is a `Writable` stream that accepts strings. When the stream is - * finished, the callback is called with the loaded document. - * - * @category Loading - * @example - * - * ```js - * import * as cheerio from 'cheerio'; - * import * as fs from 'fs'; - * - * const writeStream = cheerio.stringStream({}, (err, $) => { - * if (err) { - * // Handle error - * } - * - * console.log($('h1').text()); - * // Output: Hello, world! - * }); - * - * fs.createReadStream('my-document.html', { encoding: 'utf8' }).pipe( - * writeStream, - * ); - * ``` - * - * @param options - The options to pass to Cheerio. - * @param cb - The callback to call when the stream is finished. - * @returns The writable stream. - */ -export declare function stringStream(options: CheerioOptions, cb: (err: Error | null | undefined, $: CheerioAPI) => void): Writable; -export interface DecodeStreamOptions extends CheerioOptions { - encoding?: SnifferOptions; -} -/** - * Parses a stream of buffers into a document. - * - * The stream is a `Writable` stream that accepts buffers. When the stream is - * finished, the callback is called with the loaded document. - * - * @category Loading - * @param options - The options to pass to Cheerio. - * @param cb - The callback to call when the stream is finished. - * @returns The writable stream. - */ -export declare function decodeStream(options: DecodeStreamOptions, cb: (err: Error | null | undefined, $: CheerioAPI) => void): Writable; -type UndiciStreamOptions = Parameters<typeof undici.stream>[1]; -export interface CheerioRequestOptions extends DecodeStreamOptions { - /** The options passed to `undici`'s `stream` method. */ - requestOptions?: UndiciStreamOptions; -} -/** - * `fromURL` loads a document from a URL. - * - * By default, redirects are allowed and non-2xx responses are rejected. - * - * @category Loading - * @example - * - * ```js - * import * as cheerio from 'cheerio'; - * - * const $ = await cheerio.fromURL('https://example.com'); - * ``` - * - * @param url - The URL to load the document from. - * @param options - The options to pass to Cheerio. - * @returns The loaded document. - */ -export declare function fromURL(url: string | URL, options?: CheerioRequestOptions): Promise<CheerioAPI>; -//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/cheerio/dist/esm/index.d.ts.map b/node_modules/cheerio/dist/esm/index.d.ts.map deleted file mode 100644 index b8add6a..0000000 --- a/node_modules/cheerio/dist/esm/index.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,cAAc,iBAAiB,CAAC;AAChC,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAC9C,mBAAmB,YAAY,CAAC;AAChC,YAAY,EACV,OAAO,EACP,UAAU,EACV,cAAc,EACd,kBAAkB,GACnB,MAAM,WAAW,CAAC;AAKnB,OAAO,EAGL,KAAK,cAAc,EACpB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,KAAK,MAAM,MAAM,QAAQ,CAAC;AAEjC,OAAO,EAAE,QAAQ,EAAY,MAAM,aAAa,CAAC;AACjD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAC5C,OAAO,EAGL,KAAK,cAAc,EACpB,MAAM,cAAc,CAAC;AAGtB;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,UAAU,CACxB,MAAM,EAAE,MAAM,EACd,OAAO,GAAE,mBAAwB,GAChC,UAAU,CAQZ;AA2CD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,wBAAgB,YAAY,CAC1B,OAAO,EAAE,cAAc,EACvB,EAAE,EAAE,CAAC,GAAG,EAAE,KAAK,GAAG,IAAI,GAAG,SAAS,EAAE,CAAC,EAAE,UAAU,KAAK,IAAI,GACzD,QAAQ,CAEV;AAED,MAAM,WAAW,mBAAoB,SAAQ,cAAc;IACzD,QAAQ,CAAC,EAAE,cAAc,CAAC;CAC3B;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,YAAY,CAC1B,OAAO,EAAE,mBAAmB,EAC5B,EAAE,EAAE,CAAC,GAAG,EAAE,KAAK,GAAG,IAAI,GAAG,SAAS,EAAE,CAAC,EAAE,UAAU,KAAK,IAAI,GACzD,QAAQ,CAaV;AAED,KAAK,mBAAmB,GAAG,UAAU,CAAC,OAAO,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;AAE/D,MAAM,WAAW,qBAAsB,SAAQ,mBAAmB;IAChE,wDAAwD;IACxD,cAAc,CAAC,EAAE,mBAAmB,CAAC;CACtC;AAcD;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAsB,OAAO,CAC3B,GAAG,EAAE,MAAM,GAAG,GAAG,EACjB,OAAO,GAAE,qBAA0B,GAClC,OAAO,CAAC,UAAU,CAAC,CAwDrB"} \ No newline at end of file diff --git a/node_modules/cheerio/dist/esm/index.js b/node_modules/cheerio/dist/esm/index.js deleted file mode 100644 index 32abe37..0000000 --- a/node_modules/cheerio/dist/esm/index.js +++ /dev/null @@ -1,191 +0,0 @@ -/** - * @file Batteries-included version of Cheerio. This module includes several - * convenience methods for loading documents from various sources. - */ -export * from './load-parse.js'; -export { contains, merge } from './static.js'; -import { adapter as htmlparser2Adapter } from 'parse5-htmlparser2-tree-adapter'; -import * as htmlparser2 from 'htmlparser2'; -import { ParserStream as Parse5Stream } from 'parse5-parser-stream'; -import { decodeBuffer, DecodeStream, } from 'encoding-sniffer'; -import * as undici from 'undici'; -import MIMEType from 'whatwg-mimetype'; -import { Writable, finished } from 'node:stream'; -import { flattenOptions, } from './options.js'; -import { load } from './load-parse.js'; -/** - * Sniffs the encoding of a buffer, then creates a querying function bound to a - * document created from the buffer. - * - * @category Loading - * @example - * - * ```js - * import * as cheerio from 'cheerio'; - * - * const buffer = fs.readFileSync('index.html'); - * const $ = cheerio.fromBuffer(buffer); - * ``` - * - * @param buffer - The buffer to sniff the encoding of. - * @param options - The options to pass to Cheerio. - * @returns The loaded document. - */ -export function loadBuffer(buffer, options = {}) { - const opts = flattenOptions(options); - const str = decodeBuffer(buffer, { - defaultEncoding: (opts === null || opts === void 0 ? void 0 : opts.xmlMode) ? 'utf8' : 'windows-1252', - ...options.encoding, - }); - return load(str, opts); -} -function _stringStream(options, cb) { - var _a; - if (options === null || options === void 0 ? void 0 : options._useHtmlParser2) { - const parser = htmlparser2.createDocumentStream((err, document) => cb(err, load(document)), options); - return new Writable({ - decodeStrings: false, - write(chunk, _encoding, callback) { - if (typeof chunk !== 'string') { - throw new TypeError('Expected a string'); - } - parser.write(chunk); - callback(); - }, - final(callback) { - parser.end(); - callback(); - }, - }); - } - options !== null && options !== void 0 ? options : (options = {}); - (_a = options.treeAdapter) !== null && _a !== void 0 ? _a : (options.treeAdapter = htmlparser2Adapter); - if (options.scriptingEnabled !== false) { - options.scriptingEnabled = true; - } - const stream = new Parse5Stream(options); - finished(stream, (err) => cb(err, load(stream.document))); - return stream; -} -/** - * Creates a stream that parses a sequence of strings into a document. - * - * The stream is a `Writable` stream that accepts strings. When the stream is - * finished, the callback is called with the loaded document. - * - * @category Loading - * @example - * - * ```js - * import * as cheerio from 'cheerio'; - * import * as fs from 'fs'; - * - * const writeStream = cheerio.stringStream({}, (err, $) => { - * if (err) { - * // Handle error - * } - * - * console.log($('h1').text()); - * // Output: Hello, world! - * }); - * - * fs.createReadStream('my-document.html', { encoding: 'utf8' }).pipe( - * writeStream, - * ); - * ``` - * - * @param options - The options to pass to Cheerio. - * @param cb - The callback to call when the stream is finished. - * @returns The writable stream. - */ -export function stringStream(options, cb) { - return _stringStream(flattenOptions(options), cb); -} -/** - * Parses a stream of buffers into a document. - * - * The stream is a `Writable` stream that accepts buffers. When the stream is - * finished, the callback is called with the loaded document. - * - * @category Loading - * @param options - The options to pass to Cheerio. - * @param cb - The callback to call when the stream is finished. - * @returns The writable stream. - */ -export function decodeStream(options, cb) { - var _a; - const { encoding = {}, ...cheerioOptions } = options; - const opts = flattenOptions(cheerioOptions); - // Set the default encoding to UTF-8 for XML mode - (_a = encoding.defaultEncoding) !== null && _a !== void 0 ? _a : (encoding.defaultEncoding = (opts === null || opts === void 0 ? void 0 : opts.xmlMode) ? 'utf8' : 'windows-1252'); - const decodeStream = new DecodeStream(encoding); - const loadStream = _stringStream(opts, cb); - decodeStream.pipe(loadStream); - return decodeStream; -} -const defaultRequestOptions = { - method: 'GET', - // Allow redirects by default - maxRedirections: 5, - // NOTE: `throwOnError` currently doesn't work https://github.com/nodejs/undici/issues/1753 - throwOnError: true, - // Set an Accept header - headers: { - accept: 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8', - }, -}; -/** - * `fromURL` loads a document from a URL. - * - * By default, redirects are allowed and non-2xx responses are rejected. - * - * @category Loading - * @example - * - * ```js - * import * as cheerio from 'cheerio'; - * - * const $ = await cheerio.fromURL('https://example.com'); - * ``` - * - * @param url - The URL to load the document from. - * @param options - The options to pass to Cheerio. - * @returns The loaded document. - */ -export async function fromURL(url, options = {}) { - var _a; - const { requestOptions = defaultRequestOptions, encoding = {}, ...cheerioOptions } = options; - let undiciStream; - // Add headers if none were supplied. - (_a = requestOptions.headers) !== null && _a !== void 0 ? _a : (requestOptions.headers = defaultRequestOptions.headers); - const promise = new Promise((resolve, reject) => { - undiciStream = undici.stream(url, requestOptions, (res) => { - var _a, _b; - const contentType = (_a = res.headers['content-type']) !== null && _a !== void 0 ? _a : 'text/html'; - const mimeType = new MIMEType(Array.isArray(contentType) ? contentType[0] : contentType); - if (!mimeType.isHTML() && !mimeType.isXML()) { - throw new RangeError(`The content-type "${contentType}" is neither HTML nor XML.`); - } - // Forward the charset from the header to the decodeStream. - encoding.transportLayerEncodingLabel = mimeType.parameters.get('charset'); - /* - * If we allow redirects, we will have entries in the history. - * The last entry will be the final URL. - */ - const history = (_b = res.context) === null || _b === void 0 ? void 0 : _b.history; - const opts = { - encoding, - // Set XML mode based on the MIME type. - xmlMode: mimeType.isXML(), - // Set the `baseURL` to the final URL. - baseURL: history ? history[history.length - 1] : url, - ...cheerioOptions, - }; - return decodeStream(opts, (err, $) => (err ? reject(err) : resolve($))); - }); - }); - // Let's make sure the request is completed before returning the promise. - await undiciStream; - return promise; -} -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/cheerio/dist/esm/index.js.map b/node_modules/cheerio/dist/esm/index.js.map deleted file mode 100644 index 0308d30..0000000 --- a/node_modules/cheerio/dist/esm/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,cAAc,iBAAiB,CAAC;AAChC,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAS9C,OAAO,EAAE,OAAO,IAAI,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AAChF,OAAO,KAAK,WAAW,MAAM,aAAa,CAAC;AAC3C,OAAO,EAAE,YAAY,IAAI,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACpE,OAAO,EACL,YAAY,EACZ,YAAY,GAEb,MAAM,kBAAkB,CAAC;AAC1B,OAAO,KAAK,MAAM,MAAM,QAAQ,CAAC;AACjC,OAAO,QAAQ,MAAM,iBAAiB,CAAC;AACvC,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAEjD,OAAO,EACL,cAAc,GAGf,MAAM,cAAc,CA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C,GAAG,CAAC,SAAS,CAAC,CAAC;YAE1E;;;eAGG;YACH,MAAM,OAAO,GAAG,MACd,GAAG,CAAC,OAKL,0CAAE,OAAO,CAAC;YAEX,MAAM,IAAI,GAAG;gBACX,QAAQ;gBACR,uCAAuC;gBACvC,OAAO,EAAE,QAAQ,CAAC,KAAK,EAAE;gBACzB,sCAAsC;gBACtC,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG;gBACpD,GAAG,cAAc;aAClB,CAAC;YAEF,OAAO,YAAY,CAAC,IAAI,EAAE,CAAC,GAAG,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAC1E,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;IAEH,yEAAyE;IACzE,MAAM,YAAY,CAAC;IAEnB,OAAO,OAAO,CAAC;AACjB,CAAC"} \ No newline at end of file diff --git a/node_modules/cheerio/dist/esm/load-parse.d.ts b/node_modules/cheerio/dist/esm/load-parse.d.ts deleted file mode 100644 index f884d14..0000000 --- a/node_modules/cheerio/dist/esm/load-parse.d.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { type CheerioAPI } from './load.js'; -import type { CheerioOptions } from './options.js'; -import type { AnyNode } from 'domhandler'; -/** - * Create a querying function, bound to a document created from the provided - * markup. - * - * Note that similar to web browser contexts, this operation may introduce - * `<html>`, `<head>`, and `<body>` elements; set `isDocument` to `false` to - * switch to fragment mode and disable this. - * - * @category Loading - * @param content - Markup to be loaded. - * @param options - Options for the created instance. - * @param isDocument - Allows parser to be switched to fragment mode. - * @returns The loaded document. - * @see {@link https://cheerio.js.org#loading} for additional usage information. - */ -export declare const load: (content: string | AnyNode | AnyNode[] | Buffer, options?: CheerioOptions | null, isDocument?: boolean) => CheerioAPI; -//# sourceMappingURL=load-parse.d.ts.map \ No newline at end of file diff --git a/node_modules/cheerio/dist/esm/load-parse.d.ts.map b/node_modules/cheerio/dist/esm/load-parse.d.ts.map deleted file mode 100644 index 4696c84..0000000 --- a/node_modules/cheerio/dist/esm/load-parse.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"load-parse.d.ts","sourceRoot":"","sources":["../../src/load-parse.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,UAAU,EAAW,MAAM,WAAW,CAAC;AAGrD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAGnD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAS1C;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,IAAI,EAAE,CACjB,OAAO,EAAE,MAAM,GAAG,OAAO,GAAG,OAAO,EAAE,GAAG,MAAM,EAC9C,OAAO,CAAC,EAAE,cAAc,GAAG,IAAI,EAC/B,UAAU,CAAC,EAAE,OAAO,KACjB,UAIJ,CAAC"} \ No newline at end of file diff --git a/node_modules/cheerio/dist/esm/load-parse.js b/node_modules/cheerio/dist/esm/load-parse.js deleted file mode 100644 index db7ae5f..0000000 --- a/node_modules/cheerio/dist/esm/load-parse.js +++ /dev/null @@ -1,28 +0,0 @@ -import { getLoad } from './load.js'; -import { getParse } from './parse.js'; -import { renderWithParse5, parseWithParse5 } from './parsers/parse5-adapter.js'; -import renderWithHtmlparser2 from 'dom-serializer'; -import { parseDocument as parseWithHtmlparser2 } from 'htmlparser2'; -const parse = getParse((content, options, isDocument, context) => options._useHtmlParser2 - ? parseWithHtmlparser2(content, options) - : parseWithParse5(content, options, isDocument, context)); -// Duplicate docs due to https://github.com/TypeStrong/typedoc/issues/1616 -/** - * Create a querying function, bound to a document created from the provided - * markup. - * - * Note that similar to web browser contexts, this operation may introduce - * `<html>`, `<head>`, and `<body>` elements; set `isDocument` to `false` to - * switch to fragment mode and disable this. - * - * @category Loading - * @param content - Markup to be loaded. - * @param options - Options for the created instance. - * @param isDocument - Allows parser to be switched to fragment mode. - * @returns The loaded document. - * @see {@link https://cheerio.js.org#loading} for additional usage information. - */ -export const load = getLoad(parse, (dom, options) => options._useHtmlParser2 - ? renderWithHtmlparser2(dom, options) - : renderWithParse5(dom)); -//# sourceMappingURL=load-parse.js.map \ No newline at end of file diff --git a/node_modules/cheerio/dist/esm/load-parse.js.map b/node_modules/cheerio/dist/esm/load-parse.js.map deleted file mode 100644 index 43e0389..0000000 --- a/node_modules/cheerio/dist/esm/load-parse.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"load-parse.js","sourceRoot":"","sources":["../../src/load-parse.ts"],"names":[],"mappings":"AAAA,OAAO,EAAmB,OAAO,EAAE,MAAM,WAAW,CAAC;AACrD,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAEhF,OAAO,qBAAqB,MAAM,gBAAgB,CAAC;AACnD,OAAO,EAAE,aAAa,IAAI,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAGpE,MAAM,KAAK,GAAG,QAAQ,CAAC,CAAC,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,EAAE,CAC/D,OAAO,CAAC,eAAe;IACrB,CAAC,CAAC,oBAAoB,CAAC,OAAO,EAAE,OAAO,CAAC;IACxC,CAAC,CAAC,eAAe,CAAC,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,OAAO,CAAC,CAC3D,CAAC;AAEF,0EAA0E;AAC1E;;;;;;;;;;;;;;GAcG;AACH,MAAM,CAAC,MAAM,IAAI,GAIC,OAAO,CAAC,KAAK,EAAE,CAAC,GAAG,EAAE,OAAO,EAAE,EAAE,CAChD,OAAO,CAAC,eAAe;IACrB,CAAC,CAAC,qBAAqB,CAAC,GAAG,EAAE,OAAO,CAAC;IACrC,CAAC,CAAC,gBAAgB,CAAC,GAAG,CAAC,CAC1B,CAAC"} \ No newline at end of file diff --git a/node_modules/cheerio/dist/esm/load.d.ts b/node_modules/cheerio/dist/esm/load.d.ts deleted file mode 100644 index 43ff318..0000000 --- a/node_modules/cheerio/dist/esm/load.d.ts +++ /dev/null @@ -1,91 +0,0 @@ -import { type CheerioOptions, type InternalOptions } from './options.js'; -import * as staticMethods from './static.js'; -import { Cheerio } from './cheerio.js'; -import type { AnyNode, Document, Element } from 'domhandler'; -import type { SelectorType, BasicAcceptedElems } from './types.js'; -type StaticType = typeof staticMethods; -/** - * A querying function, bound to a document created from the provided markup. - * - * Also provides several helper methods for dealing with the document as a - * whole. - */ -export interface CheerioAPI extends StaticType { - /** - * This selector method is the starting point for traversing and manipulating - * the document. Like jQuery, it's the primary method for selecting elements - * in the document. - * - * `selector` searches within the `context` scope, which searches within the - * `root` scope. - * - * @example - * - * ```js - * $('ul .pear').attr('class'); - * //=> pear - * - * $('li[class=orange]').html(); - * //=> Orange - * - * $('.apple', '#fruits').text(); - * //=> Apple - * ``` - * - * Optionally, you can also load HTML by passing the string as the selector: - * - * ```js - * $('<ul id="fruits">...</ul>'); - * ``` - * - * Or the context: - * - * ```js - * $('ul', '<ul id="fruits">...</ul>'); - * ``` - * - * Or as the root: - * - * ```js - * $('li', 'ul', '<ul id="fruits">...</ul>'); - * ``` - * - * @param selector - Either a selector to look for within the document, or the - * contents of a new Cheerio instance. - * @param context - Either a selector to look for within the root, or the - * contents of the document to query. - * @param root - Optional HTML document string. - */ - <T extends AnyNode, S extends string>(selector?: S | BasicAcceptedElems<T>, context?: BasicAcceptedElems<AnyNode> | null, root?: BasicAcceptedElems<Document>, options?: CheerioOptions): Cheerio<S extends SelectorType ? Element : T>; - /** - * The root the document was originally loaded with. - * - * @private - */ - _root: Document; - /** - * The options the document was originally loaded with. - * - * @private - */ - _options: InternalOptions; - /** Mimic jQuery's prototype alias for plugin authors. */ - fn: typeof Cheerio.prototype; - /** - * The `.load` static method defined on the "loaded" Cheerio factory function - * is deprecated. Users are encouraged to instead use the `load` function - * exported by the Cheerio module. - * - * @deprecated Use the `load` function exported by the Cheerio module. - * @category Deprecated - * @example - * - * ```js - * const $ = cheerio.load('<h1>Hello, <span>world</span>.</h1>'); - * ``` - */ - load: ReturnType<typeof getLoad>; -} -export declare function getLoad(parse: typeof Cheerio.prototype._parse, render: (dom: AnyNode | ArrayLike<AnyNode>, options: InternalOptions) => string): (content: string | AnyNode | AnyNode[] | Buffer, options?: CheerioOptions | null, isDocument?: boolean) => CheerioAPI; -export {}; -//# sourceMappingURL=load.d.ts.map \ No newline at end of file diff --git a/node_modules/cheerio/dist/esm/load.d.ts.map b/node_modules/cheerio/dist/esm/load.d.ts.map deleted file mode 100644 index 11729d5..0000000 --- a/node_modules/cheerio/dist/esm/load.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"load.d.ts","sourceRoot":"","sources":["../../src/load.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,cAAc,EACnB,KAAK,eAAe,EAErB,MAAM,cAAc,CAAC;AACtB,OAAO,KAAK,aAAa,MAAM,aAAa,CAAC;AAC7C,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAEvC,OAAO,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAc,MAAM,YAAY,CAAC;AACzE,OAAO,KAAK,EAAE,YAAY,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAEnE,KAAK,UAAU,GAAG,OAAO,aAAa,CAAC;AAEvC;;;;;GAKG;AACH,MAAM,WAAW,UAAW,SAAQ,UAAU;IAC5C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA4CG;IACH,CAAC,CAAC,SAAS,OAAO,EAAE,CAAC,SAAS,MAAM,EAClC,QAAQ,CAAC,EAAE,CAAC,GAAG,kBAAkB,CAAC,CAAC,CAAC,EACpC,OAAO,CAAC,EAAE,kBAAkB,CAAC,OAAO,CAAC,GAAG,IAAI,EAC5C,IAAI,CAAC,EAAE,kBAAkB,CAAC,QAAQ,CAAC,EACnC,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,CAAC,SAAS,YAAY,GAAG,OAAO,GAAG,CAAC,CAAC,CAAC;IAEjD;;;;OAIG;IACH,KAAK,EAAE,QAAQ,CAAC;IAEhB;;;;OAIG;IACH,QAAQ,EAAE,eAAe,CAAC;IAE1B,yDAAyD;IACzD,EAAE,EAAE,OAAO,OAAO,CAAC,SAAS,CAAC;IAE7B;;;;;;;;;;;;OAYG;IACH,IAAI,EAAE,UAAU,CAAC,OAAO,OAAO,CAAC,CAAC;CAClC;AAED,wBAAgB,OAAO,CACrB,KAAK,EAAE,OAAO,OAAO,CAAC,SAAS,CAAC,MAAM,EACtC,MAAM,EAAE,CACN,GAAG,EAAE,OAAO,GAAG,SAAS,CAAC,OAAO,CAAC,EACjC,OAAO,EAAE,eAAe,KACrB,MAAM,aAiBA,MAAM,GAAG,OAAO,GAAG,OAAO,EAAE,GAAG,MAAM,YACpC,cAAc,GAAG,IAAI,2BAE9B,UAAU,CAyId"} \ No newline at end of file diff --git a/node_modules/cheerio/dist/esm/load.js b/node_modules/cheerio/dist/esm/load.js deleted file mode 100644 index 837ce8b..0000000 --- a/node_modules/cheerio/dist/esm/load.js +++ /dev/null @@ -1,123 +0,0 @@ -import { flattenOptions, } from './options.js'; -import * as staticMethods from './static.js'; -import { Cheerio } from './cheerio.js'; -import { isHtml, isCheerio } from './utils.js'; -export function getLoad(parse, render) { - /** - * Create a querying function, bound to a document created from the provided - * markup. - * - * Note that similar to web browser contexts, this operation may introduce - * `<html>`, `<head>`, and `<body>` elements; set `isDocument` to `false` to - * switch to fragment mode and disable this. - * - * @param content - Markup to be loaded. - * @param options - Options for the created instance. - * @param isDocument - Allows parser to be switched to fragment mode. - * @returns The loaded document. - * @see {@link https://cheerio.js.org#loading} for additional usage information. - */ - return function load(content, options, isDocument = true) { - if (content == null) { - throw new Error('cheerio.load() expects a string'); - } - const internalOpts = flattenOptions(options); - const initialRoot = parse(content, internalOpts, isDocument, null); - /** - * Create an extended class here, so that extensions only live on one - * instance. - */ - class LoadedCheerio extends Cheerio { - _make(selector, context) { - const cheerio = initialize(selector, context); - cheerio.prevObject = this; - return cheerio; - } - _parse(content, options, isDocument, context) { - return parse(content, options, isDocument, context); - } - _render(dom) { - return render(dom, this.options); - } - } - function initialize(selector, context, root = initialRoot, opts) { - // $($) - if (selector && isCheerio(selector)) - return selector; - const options = flattenOptions(opts, internalOpts); - const r = typeof root === 'string' - ? [parse(root, options, false, null)] - : 'length' in root - ? root - : [root]; - const rootInstance = isCheerio(r) - ? r - : new LoadedCheerio(r, null, options); - // Add a cyclic reference, so that calling methods on `_root` never fails. - rootInstance._root = rootInstance; - // $(), $(null), $(undefined), $(false) - if (!selector) { - return new LoadedCheerio(undefined, rootInstance, options); - } - const elements = typeof selector === 'string' && isHtml(selector) - ? // $(<html>) - parse(selector, options, false, null).children - : isNode(selector) - ? // $(dom) - [selector] - : Array.isArray(selector) - ? // $([dom]) - selector - : undefined; - const instance = new LoadedCheerio(elements, rootInstance, options); - if (elements) { - return instance; - } - if (typeof selector !== 'string') { - throw new TypeError('Unexpected type of selector'); - } - // We know that our selector is a string now. - let search = selector; - const searchContext = context - ? // If we don't have a context, maybe we have a root, from loading - typeof context === 'string' - ? isHtml(context) - ? // $('li', '<ul>...</ul>') - new LoadedCheerio([parse(context, options, false, null)], rootInstance, options) - : // $('li', 'ul') - ((search = `${context} ${search}`), rootInstance) - : isCheerio(context) - ? // $('li', $) - context - : // $('li', node), $('li', [nodes]) - new LoadedCheerio(Array.isArray(context) ? context : [context], rootInstance, options) - : rootInstance; - // If we still don't have a context, return - if (!searchContext) - return instance; - /* - * #id, .class, tag - */ - return searchContext.find(search); - } - // Add in static methods & properties - Object.assign(initialize, staticMethods, { - load, - // `_root` and `_options` are used in static methods. - _root: initialRoot, - _options: internalOpts, - // Add `fn` for plugins - fn: LoadedCheerio.prototype, - // Add the prototype here to maintain `instanceof` behavior. - prototype: LoadedCheerio.prototype, - }); - return initialize; - }; -} -function isNode(obj) { - return (!!obj.name || - obj.type === 'root' || - obj.type === 'text' || - obj.type === 'comment'); -} -//# sourceMappingURL=load.js.map \ No newline at end of file diff --git a/node_modules/cheerio/dist/esm/load.js.map b/node_modules/cheerio/dist/esm/load.js.map deleted file mode 100644 index d7a19a9..0000000 --- a/node_modules/cheerio/dist/esm/load.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"load.js","sourceRoot":"","sources":["../../src/load.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,cAAc,GACf,MAAM,cAAc,CAAC;AACtB,OAAO,KAAK,aAAa,MAAM,aAAa,CAAC;AAC7C,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAkG/C,MAAM,UAAU,OAAO,CACrB,KAAsC,EACtC,MAGW;IAEX;;;;;;;;;;;;;OAaG;IACH,OAAO,SAAS,IAAI,CAClB,OAA8C,EAC9C,OAA+B,EAC/B,UAAU,GAAG,IAAI;QAEjB,IAAK,OAAyB,IAAI,IAAI,EAAE,CAAC;YACvC,MAAM,IAAI,KAAK,CAAC,iCAAiC,CAAC,CAAC;QACrD,CAAC;QAED,MAAM,YAAY,GAAG,cAAc,CAAC,OAAO,CAAC,CAAC;QAC7C,MAAM,WAAW,GAAG,KAAK,CAAC,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,IAAI,CAAC,CAAC;QAEnE;;;WAGG;QACH,MAAM,aAAiB,SAAQ,OAAU;YACvC,KAAK,CACH,QAAoC,EACpC,OAA4C;gBAE5C,MAAM,OAAO,GAAG,UAAU,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;gBAC9C,OAAO,CAAC,UAAU,GAAG,IAAI,CAAC;gBAE1B,OAAO,OAAO,CAAC;YACjB,CAAC;YAED,M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,OAAO,CACR;gBACP,CAAC,CAAC,YAAY,CAAC;YAEjB,2CAA2C;YAC3C,IAAI,CAAC,aAAa;gBAAE,OAAO,QAAe,CAAC;YAE3C;;eAEG;YACH,OAAO,aAAa,CAAC,IAAI,CAAC,MAAM,CAAoB,CAAC;QACvD,CAAC;QAED,qCAAqC;QACrC,MAAM,CAAC,MAAM,CAAC,UAAU,EAAE,aAAa,EAAE;YACvC,IAAI;YACJ,qDAAqD;YACrD,KAAK,EAAE,WAAW;YAClB,QAAQ,EAAE,YAAY;YACtB,uBAAuB;YACvB,EAAE,EAAE,aAAa,CAAC,SAAS;YAC3B,4DAA4D;YAC5D,SAAS,EAAE,aAAa,CAAC,SAAS;SACnC,CAAC,CAAC;QAEH,OAAO,UAAwB,CAAC;IAClC,CAAC,CAAC;AACJ,CAAC;AAED,SAAS,MAAM,CAAC,GAAQ;IACtB,OAAO,CACL,CAAC,CAAC,GAAG,CAAC,IAAI;QACV,GAAG,CAAC,IAAI,KAAK,MAAM;QACnB,GAAG,CAAC,IAAI,KAAK,MAAM;QACnB,GAAG,CAAC,IAAI,KAAK,SAAS,CACvB,CAAC;AACJ,CAAC"} \ No newline at end of file diff --git a/node_modules/cheerio/dist/esm/options.d.ts b/node_modules/cheerio/dist/esm/options.d.ts deleted file mode 100644 index c3650d6..0000000 --- a/node_modules/cheerio/dist/esm/options.d.ts +++ /dev/null @@ -1,95 +0,0 @@ -import type { DomHandlerOptions } from 'domhandler'; -import type { ParserOptions as HTMLParser2ParserOptions } from 'htmlparser2'; -import type { ParserOptions as Parse5ParserOptions } from 'parse5'; -import type { Htmlparser2TreeAdapterMap } from 'parse5-htmlparser2-tree-adapter'; -import type { Options as SelectOptions } from 'cheerio-select'; -/** - * Options accepted by htmlparser2, the default parser for XML. - * - * @see https://github.com/fb55/htmlparser2/wiki/Parser-options - */ -export interface HTMLParser2Options extends DomHandlerOptions, HTMLParser2ParserOptions { -} -/** - * Options accepted by Cheerio. - * - * Please note that parser-specific options are _only recognized_ if the - * relevant parser is used. - */ -export interface CheerioOptions extends Parse5ParserOptions<Htmlparser2TreeAdapterMap> { - /** - * Recommended way of configuring htmlparser2 when wanting to parse XML. - * - * This will switch Cheerio to use htmlparser2. - * - * @default false - */ - xml?: HTMLParser2Options | boolean; - /** - * Enable xml mode, which will switch Cheerio to use htmlparser2. - * - * @deprecated Please use the `xml` option instead. - * @default false - */ - xmlMode?: boolean; - /** The base URI for the document. Used to resolve the `href` and `src` props. */ - baseURI?: string | URL; - /** - * Is the document in quirks mode? - * - * This will lead to `.className` and `#id` being case-insensitive. - * - * @default false - */ - quirksMode?: SelectOptions['quirksMode']; - /** - * Extension point for pseudo-classes. - * - * Maps from names to either strings of functions. - * - * - A string value is a selector that the element must match to be selected. - * - A function is called with the element as its first argument, and optional - * parameters second. If it returns true, the element is selected. - * - * @example - * - * ```js - * const $ = cheerio.load( - * '<div class="foo"></div><div data-bar="boo"></div>', - * { - * pseudos: { - * // `:foo` is an alias for `div.foo` - * foo: 'div.foo', - * // `:bar(val)` is equivalent to `[data-bar=val s]` - * bar: (el, val) => el.attribs['data-bar'] === val, - * }, - * }, - * ); - * - * $(':foo').length; // 1 - * $('div:bar(boo)').length; // 1 - * $('div:bar(baz)').length; // 0 - * ``` - */ - pseudos?: SelectOptions['pseudos']; -} -/** Internal options for Cheerio. */ -export interface InternalOptions extends HTMLParser2Options, Omit<CheerioOptions, 'xml'> { - /** - * Whether to use htmlparser2. - * - * This is set to true if `xml` is set to true. - */ - _useHtmlParser2?: boolean; -} -/** - * Flatten the options for Cheerio. - * - * This will set `_useHtmlParser2` to true if `xml` is set to true. - * - * @param options - The options to flatten. - * @param baseOptions - The base options to use. - * @returns The flattened options. - */ -export declare function flattenOptions(options?: CheerioOptions | null, baseOptions?: InternalOptions): InternalOptions; -//# sourceMappingURL=options.d.ts.map \ No newline at end of file diff --git a/node_modules/cheerio/dist/esm/options.d.ts.map b/node_modules/cheerio/dist/esm/options.d.ts.map deleted file mode 100644 index 70b44c4..0000000 --- a/node_modules/cheerio/dist/esm/options.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"options.d.ts","sourceRoot":"","sources":["../../src/options.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AACpD,OAAO,KAAK,EAAE,aAAa,IAAI,wBAAwB,EAAE,MAAM,aAAa,CAAC;AAC7E,OAAO,KAAK,EAAE,aAAa,IAAI,mBAAmB,EAAE,MAAM,QAAQ,CAAC;AACnE,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,iCAAiC,CAAC;AACjF,OAAO,KAAK,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAE/D;;;;GAIG;AACH,MAAM,WAAW,kBACf,SAAQ,iBAAiB,EACvB,wBAAwB;CAAG;AAE/B;;;;;GAKG;AACH,MAAM,WAAW,cACf,SAAQ,mBAAmB,CAAC,yBAAyB,CAAC;IACtD;;;;;;OAMG;IACH,GAAG,CAAC,EAAE,kBAAkB,GAAG,OAAO,CAAC;IAEnC;;;;;OAKG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAElB,iFAAiF;IACjF,OAAO,CAAC,EAAE,MAAM,GAAG,GAAG,CAAC;IAEvB;;;;;;OAMG;IACH,UAAU,CAAC,EAAE,aAAa,CAAC,YAAY,CAAC,CAAC;IACzC;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA4BG;IACH,OAAO,CAAC,EAAE,aAAa,CAAC,SAAS,CAAC,CAAC;CACpC;AAED,oCAAoC;AACpC,MAAM,WAAW,eACf,SAAQ,kBAAkB,EACxB,IAAI,CAAC,cAAc,EAAE,KAAK,CAAC;IAC7B;;;;OAIG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B;AAMD;;;;;;;;GAQG;AACH,wBAAgB,cAAc,CAC5B,OAAO,CAAC,EAAE,cAAc,GAAG,IAAI,EAC/B,WAAW,CAAC,EAAE,eAAe,GAC5B,eAAe,CAuBjB"} \ No newline at end of file diff --git a/node_modules/cheerio/dist/esm/options.js b/node_modules/cheerio/dist/esm/options.js deleted file mode 100644 index 41867a5..0000000 --- a/node_modules/cheerio/dist/esm/options.js +++ /dev/null @@ -1,34 +0,0 @@ -const defaultOpts = { - _useHtmlParser2: false, -}; -/** - * Flatten the options for Cheerio. - * - * This will set `_useHtmlParser2` to true if `xml` is set to true. - * - * @param options - The options to flatten. - * @param baseOptions - The base options to use. - * @returns The flattened options. - */ -export function flattenOptions(options, baseOptions) { - if (!options) { - return baseOptions !== null && baseOptions !== void 0 ? baseOptions : defaultOpts; - } - const opts = { - _useHtmlParser2: !!options.xmlMode, - ...baseOptions, - ...options, - }; - if (options.xml) { - opts._useHtmlParser2 = true; - opts.xmlMode = true; - if (options.xml !== true) { - Object.assign(opts, options.xml); - } - } - else if (options.xmlMode) { - opts._useHtmlParser2 = true; - } - return opts; -} -//# sourceMappingURL=options.js.map \ No newline at end of file diff --git a/node_modules/cheerio/dist/esm/options.js.map b/node_modules/cheerio/dist/esm/options.js.map deleted file mode 100644 index b1c37d6..0000000 --- a/node_modules/cheerio/dist/esm/options.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"options.js","sourceRoot":"","sources":["../../src/options.ts"],"names":[],"mappings":"AA+FA,MAAM,WAAW,GAAoB;IACnC,eAAe,EAAE,KAAK;CACvB,CAAC;AAEF;;;;;;;;GAQG;AACH,MAAM,UAAU,cAAc,CAC5B,OAA+B,EAC/B,WAA6B;IAE7B,IAAI,CAAC,OAAO,EAAE,CAAC;QACb,OAAO,WAAW,aAAX,WAAW,cAAX,WAAW,GAAI,WAAW,CAAC;IACpC,CAAC;IAED,MAAM,IAAI,GAAoB;QAC5B,eAAe,EAAE,CAAC,CAAC,OAAO,CAAC,OAAO;QAClC,GAAG,WAAW;QACd,GAAG,OAAO;KACX,CAAC;IAEF,IAAI,OAAO,CAAC,GAAG,EAAE,CAAC;QAChB,IAAI,CAAC,eAAe,GAAG,IAAI,CAAC;QAC5B,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC;QAEpB,IAAI,OAAO,CAAC,GAAG,KAAK,IAAI,EAAE,CAAC;YACzB,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,GAAG,CAAC,CAAC;QACnC,CAAC;IACH,CAAC;SAAM,IAAI,OAAO,CAAC,OAAO,EAAE,CAAC;QAC3B,IAAI,CAAC,eAAe,GAAG,IAAI,CAAC;IAC9B,CAAC;IAED,OAAO,IAAI,CAAC;AACd,CAAC"} \ No newline at end of file diff --git a/node_modules/cheerio/dist/esm/package.json b/node_modules/cheerio/dist/esm/package.json deleted file mode 100644 index 3dbc1ca..0000000 --- a/node_modules/cheerio/dist/esm/package.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "type": "module" -} diff --git a/node_modules/cheerio/dist/esm/parse.d.ts b/node_modules/cheerio/dist/esm/parse.d.ts deleted file mode 100644 index 646f763..0000000 --- a/node_modules/cheerio/dist/esm/parse.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { type AnyNode, Document, type ParentNode } from 'domhandler'; -import type { InternalOptions } from './options.js'; -/** - * Get the parse function with options. - * - * @param parser - The parser function. - * @returns The parse function with options. - */ -export declare function getParse(parser: (content: string, options: InternalOptions, isDocument: boolean, context: ParentNode | null) => Document): (content: string | Document | AnyNode | AnyNode[] | Buffer, options: InternalOptions, isDocument: boolean, context: ParentNode | null) => Document; -/** - * Update the dom structure, for one changed layer. - * - * @param newChilds - The new children. - * @param parent - The new parent. - * @returns The parent node. - */ -export declare function update(newChilds: AnyNode[] | AnyNode, parent: ParentNode | null): ParentNode | null; -//# sourceMappingURL=parse.d.ts.map \ No newline at end of file diff --git a/node_modules/cheerio/dist/esm/parse.d.ts.map b/node_modules/cheerio/dist/esm/parse.d.ts.map deleted file mode 100644 index 8470d5d..0000000 --- a/node_modules/cheerio/dist/esm/parse.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"parse.d.ts","sourceRoot":"","sources":["../../src/parse.ts"],"names":[],"mappings":"AACA,OAAO,EACL,KAAK,OAAO,EACZ,QAAQ,EACR,KAAK,UAAU,EAEhB,MAAM,YAAY,CAAC;AACpB,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAEpD;;;;;GAKG;AACH,wBAAgB,QAAQ,CACtB,MAAM,EAAE,CACN,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,eAAe,EACxB,UAAU,EAAE,OAAO,EACnB,OAAO,EAAE,UAAU,GAAG,IAAI,KACvB,QAAQ,aAYF,MAAM,GAAG,QAAQ,GAAG,OAAO,GAAG,OAAO,EAAE,GAAG,MAAM,WAChD,eAAe,cACZ,OAAO,WACV,UAAU,GAAG,IAAI,KACzB,QAAQ,CAwBZ;AAED;;;;;;GAMG;AACH,wBAAgB,MAAM,CACpB,SAAS,EAAE,OAAO,EAAE,GAAG,OAAO,EAC9B,MAAM,EAAE,UAAU,GAAG,IAAI,GACxB,UAAU,GAAG,IAAI,CA+BnB"} \ No newline at end of file diff --git a/node_modules/cheerio/dist/esm/parse.js b/node_modules/cheerio/dist/esm/parse.js deleted file mode 100644 index 781d6a4..0000000 --- a/node_modules/cheerio/dist/esm/parse.js +++ /dev/null @@ -1,73 +0,0 @@ -import { removeElement } from 'domutils'; -import { Document, isDocument as checkIsDocument, } from 'domhandler'; -/** - * Get the parse function with options. - * - * @param parser - The parser function. - * @returns The parse function with options. - */ -export function getParse(parser) { - /** - * Parse a HTML string or a node. - * - * @param content - The HTML string or node. - * @param options - The parser options. - * @param isDocument - If `content` is a document. - * @param context - The context node in the DOM tree. - * @returns The parsed document node. - */ - return function parse(content, options, isDocument, context) { - if (typeof Buffer !== 'undefined' && Buffer.isBuffer(content)) { - content = content.toString(); - } - if (typeof content === 'string') { - return parser(content, options, isDocument, context); - } - const doc = content; - if (!Array.isArray(doc) && checkIsDocument(doc)) { - // If `doc` is already a root, just return it - return doc; - } - // Add conent to new root element - const root = new Document([]); - // Update the DOM using the root - update(doc, root); - return root; - }; -} -/** - * Update the dom structure, for one changed layer. - * - * @param newChilds - The new children. - * @param parent - The new parent. - * @returns The parent node. - */ -export function update(newChilds, parent) { - // Normalize - const arr = Array.isArray(newChilds) ? newChilds : [newChilds]; - // Update parent - if (parent) { - parent.children = arr; - } - else { - parent = null; - } - // Update neighbors - for (let i = 0; i < arr.length; i++) { - const node = arr[i]; - // Cleanly remove existing nodes from their previous structures. - if (node.parent && node.parent.children !== arr) { - removeElement(node); - } - if (parent) { - node.prev = arr[i - 1] || null; - node.next = arr[i + 1] || null; - } - else { - node.prev = node.next = null; - } - node.parent = parent; - } - return parent; -} -//# sourceMappingURL=parse.js.map \ No newline at end of file diff --git a/node_modules/cheerio/dist/esm/parse.js.map b/node_modules/cheerio/dist/esm/parse.js.map deleted file mode 100644 index 6c80b35..0000000 --- a/node_modules/cheerio/dist/esm/parse.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"parse.js","sourceRoot":"","sources":["../../src/parse.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EAEL,QAAQ,EAER,UAAU,IAAI,eAAe,GAC9B,MAAM,YAAY,CAAC;AAGpB;;;;;GAKG;AACH,MAAM,UAAU,QAAQ,CACtB,MAKa;IAEb;;;;;;;;OAQG;IACH,OAAO,SAAS,KAAK,CACnB,OAAyD,EACzD,OAAwB,EACxB,UAAmB,EACnB,OAA0B;QAE1B,IAAI,OAAO,MAAM,KAAK,WAAW,IAAI,MAAM,CAAC,QAAQ,CAAC,OAAO,CAAC,EAAE,CAAC;YAC9D,OAAO,GAAG,OAAO,CAAC,QAAQ,EAAE,CAAC;QAC/B,CAAC;QAED,IAAI,OAAO,OAAO,KAAK,QAAQ,EAAE,CAAC;YAChC,OAAO,MAAM,CAAC,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,OAAO,CAAC,CAAC;QACvD,CAAC;QAED,MA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IAAI,IAAI,CAAC;QACjC,CAAC;aAAM,CAAC;YACN,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QAC/B,CAAC;QAED,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED,OAAO,MAAM,CAAC;AAChB,CAAC"} \ No newline at end of file diff --git a/node_modules/cheerio/dist/esm/parsers/parse5-adapter.d.ts b/node_modules/cheerio/dist/esm/parsers/parse5-adapter.d.ts deleted file mode 100644 index c7a2d60..0000000 --- a/node_modules/cheerio/dist/esm/parsers/parse5-adapter.d.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { type AnyNode, type Document, type ParentNode } from 'domhandler'; -import type { InternalOptions } from '../options.js'; -/** - * Parse the content with `parse5` in the context of the given `ParentNode`. - * - * @param content - The content to parse. - * @param options - A set of options to use to parse. - * @param isDocument - Whether to parse the content as a full HTML document. - * @param context - The context in which to parse the content. - * @returns The parsed content. - */ -export declare function parseWithParse5(content: string, options: InternalOptions, isDocument: boolean, context: ParentNode | null): Document; -/** - * Renders the given DOM tree with `parse5` and returns the result as a string. - * - * @param dom - The DOM tree to render. - * @returns The rendered document. - */ -export declare function renderWithParse5(dom: AnyNode | ArrayLike<AnyNode>): string; -//# sourceMappingURL=parse5-adapter.d.ts.map \ No newline at end of file diff --git a/node_modules/cheerio/dist/esm/parsers/parse5-adapter.d.ts.map b/node_modules/cheerio/dist/esm/parsers/parse5-adapter.d.ts.map deleted file mode 100644 index d18dac2..0000000 --- a/node_modules/cheerio/dist/esm/parsers/parse5-adapter.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"parse5-adapter.d.ts","sourceRoot":"","sources":["../../../src/parsers/parse5-adapter.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,OAAO,EACZ,KAAK,QAAQ,EACb,KAAK,UAAU,EAEhB,MAAM,YAAY,CAAC;AAGpB,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAErD;;;;;;;;GAQG;AACH,wBAAgB,eAAe,CAC7B,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,eAAe,EACxB,UAAU,EAAE,OAAO,EACnB,OAAO,EAAE,UAAU,GAAG,IAAI,GACzB,QAAQ,CAUV;AAID;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,OAAO,GAAG,SAAS,CAAC,OAAO,CAAC,GAAG,MAAM,CAqB1E"} \ No newline at end of file diff --git a/node_modules/cheerio/dist/esm/parsers/parse5-adapter.js b/node_modules/cheerio/dist/esm/parsers/parse5-adapter.js deleted file mode 100644 index 0578369..0000000 --- a/node_modules/cheerio/dist/esm/parsers/parse5-adapter.js +++ /dev/null @@ -1,50 +0,0 @@ -import { isDocument, } from 'domhandler'; -import { parse as parseDocument, parseFragment, serializeOuter } from 'parse5'; -import { adapter as htmlparser2Adapter } from 'parse5-htmlparser2-tree-adapter'; -/** - * Parse the content with `parse5` in the context of the given `ParentNode`. - * - * @param content - The content to parse. - * @param options - A set of options to use to parse. - * @param isDocument - Whether to parse the content as a full HTML document. - * @param context - The context in which to parse the content. - * @returns The parsed content. - */ -export function parseWithParse5(content, options, isDocument, context) { - var _a; - (_a = options.treeAdapter) !== null && _a !== void 0 ? _a : (options.treeAdapter = htmlparser2Adapter); - if (options.scriptingEnabled !== false) { - options.scriptingEnabled = true; - } - return isDocument - ? parseDocument(content, options) - : parseFragment(context, content, options); -} -const renderOpts = { treeAdapter: htmlparser2Adapter }; -/** - * Renders the given DOM tree with `parse5` and returns the result as a string. - * - * @param dom - The DOM tree to render. - * @returns The rendered document. - */ -export function renderWithParse5(dom) { - /* - * `dom-serializer` passes over the special "root" node and renders the - * node's children in its place. To mimic this behavior with `parse5`, an - * equivalent operation must be applied to the input array. - */ - const nodes = 'length' in dom ? dom : [dom]; - for (let index = 0; index < nodes.length; index += 1) { - const node = nodes[index]; - if (isDocument(node)) { - Array.prototype.splice.call(nodes, index, 1, ...node.children); - } - } - let result = ''; - for (let index = 0; index < nodes.length; index += 1) { - const node = nodes[index]; - result += serializeOuter(node, renderOpts); - } - return result; -} -//# sourceMappingURL=parse5-adapter.js.map \ No newline at end of file diff --git a/node_modules/cheerio/dist/esm/parsers/parse5-adapter.js.map b/node_modules/cheerio/dist/esm/parsers/parse5-adapter.js.map deleted file mode 100644 index 9d98770..0000000 --- a/node_modules/cheerio/dist/esm/parsers/parse5-adapter.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"parse5-adapter.js","sourceRoot":"","sources":["../../../src/parsers/parse5-adapter.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,UAAU,GACX,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,KAAK,IAAI,aAAa,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,QAAQ,CAAC;AAC/E,OAAO,EAAE,OAAO,IAAI,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AAGhF;;;;;;;;GAQG;AACH,MAAM,UAAU,eAAe,CAC7B,OAAe,EACf,OAAwB,EACxB,UAAmB,EACnB,OAA0B;;IAE1B,MAAA,OAAO,CAAC,WAAW,oCAAnB,OAAO,CAAC,WAAW,GAAK,kBAAkB,EAAC;IAE3C,IAAI,OAAO,CAAC,gBAAgB,KAAK,KAAK,EAAE,CAAC;QACvC,OAAO,CAAC,gBAAgB,GAAG,IAAI,CAAC;IAClC,CAAC;IAED,OAAO,UAAU;QACf,CAAC,CAAC,aAAa,CAAC,OAAO,EAAE,OAAO,CAAC;QACjC,CAAC,CAAC,aAAa,CAAC,OAAO,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;AAC/C,CAAC;AAED,MAAM,UAAU,GAAG,EAAE,WAAW,EAAE,kBAAkB,EAAE,CAAC;AAEvD;;;;;GAKG;AACH,MAAM,UAAU,gBAAgB,CAAC,GAAiC;IAChE;;;;OAIG;IACH,MAAM,KAAK,GAAG,QAAQ,IAAI,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;IAC5C,KAAK,IAAI,KAAK,GAAG,CAAC,EAAE,KAAK,GAAG,KAAK,CAAC,MAAM,EAAE,KAAK,IAAI,CAAC,EAAE,CAAC;QACrD,MAAM,IAAI,GAAG,KAAK,CAAC,KAAK,CAAC,CAAC;QAC1B,IAAI,UAAU,CAAC,IAAI,CAAC,EAAE,CAAC;YACrB,KAAK,CAAC,SAAS,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,EAAE,KAAK,EAAE,CAAC,EAAE,GAAG,IAAI,CAAC,QAAQ,CAAC,CAAC;QACjE,CAAC;IACH,CAAC;IAED,IAAI,MAAM,GAAG,EAAE,CAAC;IAChB,KAAK,IAAI,KAAK,GAAG,CAAC,EAAE,KAAK,GAAG,KAAK,CAAC,MAAM,EAAE,KAAK,IAAI,CAAC,EAAE,CAAC;QACrD,MAAM,IAAI,GAAG,KAAK,CAAC,KAAK,CAAC,CAAC;QAC1B,MAAM,IAAI,cAAc,CAAC,IAAI,EAAE,UAAU,CAAC,CAAC;IAC7C,CAAC;IAED,OAAO,MAAM,CAAC;AAChB,CAAC"} \ No newline at end of file diff --git a/node_modules/cheerio/dist/esm/slim.d.ts b/node_modules/cheerio/dist/esm/slim.d.ts deleted file mode 100644 index d00f24a..0000000 --- a/node_modules/cheerio/dist/esm/slim.d.ts +++ /dev/null @@ -1,25 +0,0 @@ -/** - * @file Alternative entry point for Cheerio that always uses htmlparser2. This - * way, parse5 won't be loaded, saving some memory. - */ -import { type CheerioAPI } from './load.js'; -import { type CheerioOptions } from './options.js'; -import type { AnyNode } from 'domhandler'; -export { contains, merge } from './static.js'; -export type * from './types.js'; -export type { Cheerio } from './cheerio.js'; -export type { CheerioOptions, HTMLParser2Options } from './options.js'; -export type { CheerioAPI } from './load.js'; -/** - * Create a querying function, bound to a document created from the provided - * markup. - * - * @param content - Markup to be loaded. - * @param options - Options for the created instance. - * @param isDocument - Always `false` here, as we are always using - * `htmlparser2`. - * @returns The loaded document. - * @see {@link https://cheerio.js.org#loading} for additional usage information. - */ -export declare const load: (content: string | AnyNode | AnyNode[] | Buffer, options?: CheerioOptions | null, isDocument?: boolean) => CheerioAPI; -//# sourceMappingURL=slim.d.ts.map \ No newline at end of file diff --git a/node_modules/cheerio/dist/esm/slim.d.ts.map b/node_modules/cheerio/dist/esm/slim.d.ts.map deleted file mode 100644 index 0efbb21..0000000 --- a/node_modules/cheerio/dist/esm/slim.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"slim.d.ts","sourceRoot":"","sources":["../../src/slim.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAAE,KAAK,UAAU,EAAW,MAAM,WAAW,CAAC;AACrD,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,cAAc,CAAC;AAEnD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAI1C,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAC9C,mBAAmB,YAAY,CAAC;AAChC,YAAY,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAC5C,YAAY,EAAE,cAAc,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AACvE,YAAY,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAE5C;;;;;;;;;;GAUG;AACH,eAAO,MAAM,IAAI,EAAE,CACjB,OAAO,EAAE,MAAM,GAAG,OAAO,GAAG,OAAO,EAAE,GAAG,MAAM,EAC9C,OAAO,CAAC,EAAE,cAAc,GAAG,IAAI,EAC/B,UAAU,CAAC,EAAE,OAAO,KACjB,UAAqD,CAAC"} \ No newline at end of file diff --git a/node_modules/cheerio/dist/esm/slim.js b/node_modules/cheerio/dist/esm/slim.js deleted file mode 100644 index 52e73e3..0000000 --- a/node_modules/cheerio/dist/esm/slim.js +++ /dev/null @@ -1,22 +0,0 @@ -/** - * @file Alternative entry point for Cheerio that always uses htmlparser2. This - * way, parse5 won't be loaded, saving some memory. - */ -import { getLoad } from './load.js'; -import { getParse } from './parse.js'; -import render from 'dom-serializer'; -import { parseDocument } from 'htmlparser2'; -export { contains, merge } from './static.js'; -/** - * Create a querying function, bound to a document created from the provided - * markup. - * - * @param content - Markup to be loaded. - * @param options - Options for the created instance. - * @param isDocument - Always `false` here, as we are always using - * `htmlparser2`. - * @returns The loaded document. - * @see {@link https://cheerio.js.org#loading} for additional usage information. - */ -export const load = getLoad(getParse(parseDocument), render); -//# sourceMappingURL=slim.js.map \ No newline at end of file diff --git a/node_modules/cheerio/dist/esm/slim.js.map b/node_modules/cheerio/dist/esm/slim.js.map deleted file mode 100644 index 675df45..0000000 --- a/node_modules/cheerio/dist/esm/slim.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"slim.js","sourceRoot":"","sources":["../../src/slim.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAAmB,OAAO,EAAE,MAAM,WAAW,CAAC;AAErD,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEtC,OAAO,MAAM,MAAM,gBAAgB,CAAC;AACpC,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAE5C,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAM9C;;;;;;;;;;GAUG;AACH,MAAM,CAAC,MAAM,IAAI,GAIC,OAAO,CAAC,QAAQ,CAAC,aAAa,CAAC,EAAE,MAAM,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/cheerio/dist/esm/static.d.ts b/node_modules/cheerio/dist/esm/static.d.ts deleted file mode 100644 index 849a5ed..0000000 --- a/node_modules/cheerio/dist/esm/static.d.ts +++ /dev/null @@ -1,112 +0,0 @@ -import type { BasicAcceptedElems } from './types.js'; -import type { CheerioAPI } from './load.js'; -import type { Cheerio } from './cheerio.js'; -import type { AnyNode, Document } from 'domhandler'; -import { type CheerioOptions } from './options.js'; -import type { ExtractedMap, ExtractMap } from './api/extract.js'; -/** - * Renders the document. - * - * @category Static - * @param options - Options for the renderer. - * @returns The rendered document. - */ -export declare function html(this: CheerioAPI, options?: CheerioOptions): string; -/** - * Renders the document. - * - * @category Static - * @param dom - Element to render. - * @param options - Options for the renderer. - * @returns The rendered document. - */ -export declare function html(this: CheerioAPI, dom?: BasicAcceptedElems<AnyNode>, options?: CheerioOptions): string; -/** - * Render the document as XML. - * - * @category Static - * @param dom - Element to render. - * @returns THe rendered document. - */ -export declare function xml(this: CheerioAPI, dom?: BasicAcceptedElems<AnyNode>): string; -/** - * Render the document as text. - * - * This returns the `textContent` of the passed elements. The result will - * include the contents of `<script>` and `<style>` elements. To avoid this, use - * `.prop('innerText')` instead. - * - * @category Static - * @param elements - Elements to render. - * @returns The rendered document. - */ -export declare function text(this: CheerioAPI | void, elements?: ArrayLike<AnyNode>): string; -/** - * Parses a string into an array of DOM nodes. The `context` argument has no - * meaning for Cheerio, but it is maintained for API compatibility with jQuery. - * - * @category Static - * @param data - Markup that will be parsed. - * @param context - Will be ignored. If it is a boolean it will be used as the - * value of `keepScripts`. - * @param keepScripts - If false all scripts will be removed. - * @returns The parsed DOM. - * @alias Cheerio.parseHTML - * @see {@link https://api.jquery.com/jQuery.parseHTML/} - */ -export declare function parseHTML(this: CheerioAPI, data: string, context?: unknown | boolean, keepScripts?: boolean): AnyNode[]; -export declare function parseHTML(this: CheerioAPI, data?: '' | null): null; -/** - * Sometimes you need to work with the top-level root element. To query it, you - * can use `$.root()`. - * - * @category Static - * @example - * - * ```js - * $.root().append('<ul id="vegetables"></ul>').html(); - * //=> <ul id="fruits">...</ul><ul id="vegetables"></ul> - * ``` - * - * @returns Cheerio instance wrapping the root node. - * @alias Cheerio.root - */ -export declare function root(this: CheerioAPI): Cheerio<Document>; -/** - * Checks to see if the `contained` DOM element is a descendant of the - * `container` DOM element. - * - * @category Static - * @param container - Potential parent node. - * @param contained - Potential child node. - * @returns Indicates if the nodes contain one another. - * @alias Cheerio.contains - * @see {@link https://api.jquery.com/jQuery.contains/} - */ -export declare function contains(container: AnyNode, contained: AnyNode): boolean; -/** - * Extract multiple values from a document, and store them in an object. - * - * @category Static - * @param map - An object containing key-value pairs. The keys are the names of - * the properties to be created on the object, and the values are the - * selectors to be used to extract the values. - * @returns An object containing the extracted values. - */ -export declare function extract<M extends ExtractMap>(this: CheerioAPI, map: M): ExtractedMap<M>; -type Writable<T> = { - -readonly [P in keyof T]: T[P]; -}; -/** - * $.merge(). - * - * @category Static - * @param arr1 - First array. - * @param arr2 - Second array. - * @returns `arr1`, with elements of `arr2` inserted. - * @alias Cheerio.merge - * @see {@link https://api.jquery.com/jQuery.merge/} - */ -export declare function merge<T>(arr1: Writable<ArrayLike<T>>, arr2: ArrayLike<T>): ArrayLike<T> | undefined; -export {}; -//# sourceMappingURL=static.d.ts.map \ No newline at end of file diff --git a/node_modules/cheerio/dist/esm/static.d.ts.map b/node_modules/cheerio/dist/esm/static.d.ts.map deleted file mode 100644 index ebe63f7..0000000 --- a/node_modules/cheerio/dist/esm/static.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"static.d.ts","sourceRoot":"","sources":["../../src/static.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AACrD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAC5C,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAC5C,OAAO,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEpD,OAAO,EAEL,KAAK,cAAc,EAEpB,MAAM,cAAc,CAAC;AACtB,OAAO,KAAK,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAwCjE;;;;;;GAMG;AACH,wBAAgB,IAAI,CAAC,IAAI,EAAE,UAAU,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,MAAM,CAAC;AACzE;;;;;;;GAOG;AACH,wBAAgB,IAAI,CACl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ACrB,IAAI,EAAE,QAAQ,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,EAC5B,IAAI,EAAE,SAAS,CAAC,CAAC,CAAC,GACjB,SAAS,CAAC,CAAC,CAAC,GAAG,SAAS,CAY1B"} \ No newline at end of file diff --git a/node_modules/cheerio/dist/esm/static.js b/node_modules/cheerio/dist/esm/static.js deleted file mode 100644 index 8c3a88d..0000000 --- a/node_modules/cheerio/dist/esm/static.js +++ /dev/null @@ -1,204 +0,0 @@ -import { textContent } from 'domutils'; -import { flattenOptions as flattenOptions, } from './options.js'; -/** - * Helper function to render a DOM. - * - * @param that - Cheerio instance to render. - * @param dom - The DOM to render. Defaults to `that`'s root. - * @param options - Options for rendering. - * @returns The rendered document. - */ -function render(that, dom, options) { - if (!that) - return ''; - return that(dom !== null && dom !== void 0 ? dom : that._root.children, null, undefined, options).toString(); -} -/** - * Checks if a passed object is an options object. - * - * @param dom - Object to check if it is an options object. - * @param options - Options object. - * @returns Whether the object is an options object. - */ -function isOptions(dom, options) { - return (!options && - typeof dom === 'object' && - dom != null && - !('length' in dom) && - !('type' in dom)); -} -export function html(dom, options) { - /* - * Be flexible about parameters, sometimes we call html(), - * with options as only parameter - * check dom argument for dom element specific properties - * assume there is no 'length' or 'type' properties in the options object - */ - const toRender = isOptions(dom) ? ((options = dom), undefined) : dom; - /* - * Sometimes `$.html()` is used without preloading html, - * so fallback non-existing options to the default ones. - */ - const opts = { - ...this === null || this === void 0 ? void 0 : this._options, - ...flattenOptions(options), - }; - return render(this, toRender, opts); -} -/** - * Render the document as XML. - * - * @category Static - * @param dom - Element to render. - * @returns THe rendered document. - */ -export function xml(dom) { - const options = { ...this._options, xmlMode: true }; - return render(this, dom, options); -} -/** - * Render the document as text. - * - * This returns the `textContent` of the passed elements. The result will - * include the contents of `<script>` and `<style>` elements. To avoid this, use - * `.prop('innerText')` instead. - * - * @category Static - * @param elements - Elements to render. - * @returns The rendered document. - */ -export function text(elements) { - const elems = elements !== null && elements !== void 0 ? elements : (this ? this.root() : []); - let ret = ''; - for (let i = 0; i < elems.length; i++) { - ret += textContent(elems[i]); - } - return ret; -} -export function parseHTML(data, context, keepScripts = typeof context === 'boolean' ? context : false) { - if (!data || typeof data !== 'string') { - return null; - } - if (typeof context === 'boolean') { - keepScripts = context; - } - const parsed = this.load(data, this._options, false); - if (!keepScripts) { - parsed('script').remove(); - } - /* - * The `children` array is used by Cheerio internally to group elements that - * share the same parents. When nodes created through `parseHTML` are - * inserted into previously-existing DOM structures, they will be removed - * from the `children` array. The results of `parseHTML` should remain - * constant across these operations, so a shallow copy should be returned. - */ - return [...parsed.root()[0].children]; -} -/** - * Sometimes you need to work with the top-level root element. To query it, you - * can use `$.root()`. - * - * @category Static - * @example - * - * ```js - * $.root().append('<ul id="vegetables"></ul>').html(); - * //=> <ul id="fruits">...</ul><ul id="vegetables"></ul> - * ``` - * - * @returns Cheerio instance wrapping the root node. - * @alias Cheerio.root - */ -export function root() { - return this(this._root); -} -/** - * Checks to see if the `contained` DOM element is a descendant of the - * `container` DOM element. - * - * @category Static - * @param container - Potential parent node. - * @param contained - Potential child node. - * @returns Indicates if the nodes contain one another. - * @alias Cheerio.contains - * @see {@link https://api.jquery.com/jQuery.contains/} - */ -export function contains(container, contained) { - // According to the jQuery API, an element does not "contain" itself - if (contained === container) { - return false; - } - /* - * Step up the descendants, stopping when the root element is reached - * (signaled by `.parent` returning a reference to the same object) - */ - let next = contained; - while (next && next !== next.parent) { - next = next.parent; - if (next === container) { - return true; - } - } - return false; -} -/** - * Extract multiple values from a document, and store them in an object. - * - * @category Static - * @param map - An object containing key-value pairs. The keys are the names of - * the properties to be created on the object, and the values are the - * selectors to be used to extract the values. - * @returns An object containing the extracted values. - */ -export function extract(map) { - return this.root().extract(map); -} -/** - * $.merge(). - * - * @category Static - * @param arr1 - First array. - * @param arr2 - Second array. - * @returns `arr1`, with elements of `arr2` inserted. - * @alias Cheerio.merge - * @see {@link https://api.jquery.com/jQuery.merge/} - */ -export function merge(arr1, arr2) { - if (!isArrayLike(arr1) || !isArrayLike(arr2)) { - return; - } - let newLength = arr1.length; - const len = +arr2.length; - for (let i = 0; i < len; i++) { - arr1[newLength++] = arr2[i]; - } - arr1.length = newLength; - return arr1; -} -/** - * Checks if an object is array-like. - * - * @category Static - * @param item - Item to check. - * @returns Indicates if the item is array-like. - */ -function isArrayLike(item) { - if (Array.isArray(item)) { - return true; - } - if (typeof item !== 'object' || - item === null || - !('length' in item) || - typeof item.length !== 'number' || - item.length < 0) { - return false; - } - for (let i = 0; i < item.length; i++) { - if (!(i in item)) { - return false; - } - } - return true; -} -//# sourceMappingURL=static.js.map \ No newline at end of file diff --git a/node_modules/cheerio/dist/esm/static.js.map b/node_modules/cheerio/dist/esm/static.js.map deleted file mode 100644 index ddcddbe..0000000 --- a/node_modules/cheerio/dist/esm/static.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"static.js","sourceRoot":"","sources":["../../src/static.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AACvC,OAAO,EAGL,cAAc,IAAI,cAAc,GACjC,MAAM,cAAc,CAAC;AAGtB;;;;;;;GAOG;AACH,SAAS,MAAM,CACb,IAAgB,EAChB,GAA4C,EAC5C,OAAwB;IAExB,IAAI,CAAC,IAAI;QAAE,OAAO,EAAE,CAAC;IAErB,OAAO,IAAI,CAAC,GAAG,aAAH,GAAG,cAAH,GAAG,GAAI,IAAI,CAAC,KAAK,CAAC,QAAQ,EAAE,IAAI,EAAE,SAAS,EAAE,OAAO,CAAC,CAAC,QAAQ,EAAE,CAAC;AAC/E,CAAC;AAED;;;;;;GAMG;AACH,SAAS,SAAS,CAChB,GAAyD,EACzD,OAAwB;IAExB,OAAO,CACL,CAAC,OAAO;QACR,OAAO,GAAG,KAAK,QAAQ;QACvB,GAAG,IAAI,IAAI;QACX,CAAC,CAAC,QAAQ,IAAI,GAAG,CAAC;QAClB,CAAC,CAAC,MAAM,IAAI,GAAG,CA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ules/cheerio/dist/esm/types.d.ts b/node_modules/cheerio/dist/esm/types.d.ts deleted file mode 100644 index 52289cc..0000000 --- a/node_modules/cheerio/dist/esm/types.d.ts +++ /dev/null @@ -1,21 +0,0 @@ -/** @file Types used in signatures of Cheerio methods. */ -type LowercaseLetters = 'a' | 'b' | 'c' | 'd' | 'e' | 'f' | 'g' | 'h' | 'i' | 'j' | 'k' | 'l' | 'm' | 'n' | 'o' | 'p' | 'q' | 'r' | 's' | 't' | 'u' | 'v' | 'w' | 'x' | 'y' | 'z'; -type AlphaNumeric = LowercaseLetters | Uppercase<LowercaseLetters> | `${number}`; -type SelectorSpecial = '.' | '#' | ':' | '|' | '>' | '+' | '~' | '['; -/** - * Type for identifying selectors. Allows us to "upgrade" queries using - * selectors to return `Element`s. - */ -export type SelectorType = `${SelectorSpecial}${AlphaNumeric}${string}` | `${AlphaNumeric}${string}`; -import type { Cheerio } from './cheerio.js'; -import type { AnyNode } from 'domhandler'; -/** Elements that can be passed to manipulation methods. */ -export type BasicAcceptedElems<T extends AnyNode> = ArrayLike<T> | T | string; -/** Elements that can be passed to manipulation methods, including functions. */ -export type AcceptedElems<T extends AnyNode> = BasicAcceptedElems<T> | ((this: T, i: number, el: T) => BasicAcceptedElems<T>); -/** Function signature, for traversal methods. */ -export type FilterFunction<T> = (this: T, i: number, el: T) => boolean; -/** Supported filter types, for traversal methods. */ -export type AcceptedFilters<T> = string | FilterFunction<T> | T | Cheerio<T>; -export {}; -//# sourceMappingURL=types.d.ts.map \ No newline at end of file diff --git a/node_modules/cheerio/dist/esm/types.d.ts.map b/node_modules/cheerio/dist/esm/types.d.ts.map deleted file mode 100644 index a343d31..0000000 --- a/node_modules/cheerio/dist/esm/types.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"AAAA,yDAAyD;AAEzD,KAAK,gBAAgB,GACjB,GAAG,GACH,GAAG,GACH,GAAG,GACH,GA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AM,eAAe,CAAC,CAAC,IAAI,MAAM,GAAG,cAAc,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/cheerio/dist/esm/types.js b/node_modules/cheerio/dist/esm/types.js deleted file mode 100644 index 9bc98ac..0000000 --- a/node_modules/cheerio/dist/esm/types.js +++ /dev/null @@ -1,3 +0,0 @@ -/** @file Types used in signatures of Cheerio methods. */ -export {}; -//# sourceMappingURL=types.js.map \ No newline at end of file diff --git a/node_modules/cheerio/dist/esm/types.js.map b/node_modules/cheerio/dist/esm/types.js.map deleted file mode 100644 index cd18b94..0000000 --- a/node_modules/cheerio/dist/esm/types.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"AAAA,yDAAyD"} \ No newline at end of file diff --git a/node_modules/cheerio/dist/esm/utils.d.ts b/node_modules/cheerio/dist/esm/utils.d.ts deleted file mode 100644 index cbe8a22..0000000 --- a/node_modules/cheerio/dist/esm/utils.d.ts +++ /dev/null @@ -1,55 +0,0 @@ -import type { AnyNode } from 'domhandler'; -import type { Cheerio } from './cheerio.js'; -/** - * Checks if an object is a Cheerio instance. - * - * @category Utils - * @param maybeCheerio - The object to check. - * @returns Whether the object is a Cheerio instance. - */ -export declare function isCheerio<T>(maybeCheerio: any): maybeCheerio is Cheerio<T>; -/** - * Convert a string to camel case notation. - * - * @private - * @category Utils - * @param str - The string to be converted. - * @returns String in camel case notation. - */ -export declare function camelCase(str: string): string; -/** - * Convert a string from camel case to "CSS case", where word boundaries are - * described by hyphens ("-") and all characters are lower-case. - * - * @private - * @category Utils - * @param str - The string to be converted. - * @returns String in "CSS case". - */ -export declare function cssCase(str: string): string; -/** - * Iterate over each DOM element without creating intermediary Cheerio - * instances. - * - * This is indented for use internally to avoid otherwise unnecessary memory - * pressure introduced by _make. - * - * @category Utils - * @param array - The array to iterate over. - * @param fn - Function to call. - * @returns The original instance. - */ -export declare function domEach<T extends AnyNode, Arr extends ArrayLike<T> = Cheerio<T>>(array: Arr, fn: (elem: T, index: number) => void): Arr; -/** - * Check if string is HTML. - * - * Tests for a `<` within a string, immediate followed by a letter and - * eventually followed by a `>`. - * - * @private - * @category Utils - * @param str - The string to check. - * @returns Indicates if `str` is HTML. - */ -export declare function isHtml(str: string): boolean; -//# sourceMappingURL=utils.d.ts.map \ No newline at end of file diff --git a/node_modules/cheerio/dist/esm/utils.d.ts.map b/node_modules/cheerio/dist/esm/utils.d.ts.map deleted file mode 100644 index 6fe0a6e..0000000 --- a/node_modules/cheerio/dist/esm/utils.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAC1C,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAE5C;;;;;;GAMG;AACH,wBAAgB,SAAS,CAAC,CAAC,EAAE,YAAY,EAAE,GAAG,GAAG,YAAY,IAAI,OAAO,CAAC,CAAC,CAAC,CAE1E;AAED;;;;;;;GAOG;AACH,wBAAgB,SAAS,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAE7C;AAED;;;;;;;;GAQG;AACH,wBAAgB,OAAO,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAE3C;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,OAAO,CACrB,CAAC,SAAS,OAAO,EACjB,GAAG,SAAS,SAAS,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,EACrC,KAAK,EAAE,GAAG,EAAE,EAAE,EAAE,CAAC,IAAI,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,GAAG,GAAG,CAIvD;AAUD;;;;;;;;;;GAUG;AACH,wBAAgB,MAAM,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAa3C"} \ No newline at end of file diff --git a/node_modules/cheerio/dist/esm/utils.js b/node_modules/cheerio/dist/esm/utils.js deleted file mode 100644 index 6dc873a..0000000 --- a/node_modules/cheerio/dist/esm/utils.js +++ /dev/null @@ -1,81 +0,0 @@ -/** - * Checks if an object is a Cheerio instance. - * - * @category Utils - * @param maybeCheerio - The object to check. - * @returns Whether the object is a Cheerio instance. - */ -export function isCheerio(maybeCheerio) { - return maybeCheerio.cheerio != null; -} -/** - * Convert a string to camel case notation. - * - * @private - * @category Utils - * @param str - The string to be converted. - * @returns String in camel case notation. - */ -export function camelCase(str) { - return str.replace(/[._-](\w|$)/g, (_, x) => x.toUpperCase()); -} -/** - * Convert a string from camel case to "CSS case", where word boundaries are - * described by hyphens ("-") and all characters are lower-case. - * - * @private - * @category Utils - * @param str - The string to be converted. - * @returns String in "CSS case". - */ -export function cssCase(str) { - return str.replace(/[A-Z]/g, '-$&').toLowerCase(); -} -/** - * Iterate over each DOM element without creating intermediary Cheerio - * instances. - * - * This is indented for use internally to avoid otherwise unnecessary memory - * pressure introduced by _make. - * - * @category Utils - * @param array - The array to iterate over. - * @param fn - Function to call. - * @returns The original instance. - */ -export function domEach(array, fn) { - const len = array.length; - for (let i = 0; i < len; i++) - fn(array[i], i); - return array; -} -var CharacterCodes; -(function (CharacterCodes) { - CharacterCodes[CharacterCodes["LowerA"] = 97] = "LowerA"; - CharacterCodes[CharacterCodes["LowerZ"] = 122] = "LowerZ"; - CharacterCodes[CharacterCodes["UpperA"] = 65] = "UpperA"; - CharacterCodes[CharacterCodes["UpperZ"] = 90] = "UpperZ"; - CharacterCodes[CharacterCodes["Exclamation"] = 33] = "Exclamation"; -})(CharacterCodes || (CharacterCodes = {})); -/** - * Check if string is HTML. - * - * Tests for a `<` within a string, immediate followed by a letter and - * eventually followed by a `>`. - * - * @private - * @category Utils - * @param str - The string to check. - * @returns Indicates if `str` is HTML. - */ -export function isHtml(str) { - const tagStart = str.indexOf('<'); - if (tagStart < 0 || tagStart > str.length - 3) - return false; - const tagChar = str.charCodeAt(tagStart + 1); - return (((tagChar >= CharacterCodes.LowerA && tagChar <= CharacterCodes.LowerZ) || - (tagChar >= CharacterCodes.UpperA && tagChar <= CharacterCodes.UpperZ) || - tagChar === CharacterCodes.Exclamation) && - str.includes('>', tagStart + 2)); -} -//# sourceMappingURL=utils.js.map \ No newline at end of file diff --git a/node_modules/cheerio/dist/esm/utils.js.map b/node_modules/cheerio/dist/esm/utils.js.map deleted file mode 100644 index 763925f..0000000 --- a/node_modules/cheerio/dist/esm/utils.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../src/utils.ts"],"names":[],"mappings":"AAGA;;;;;;GAMG;AACH,MAAM,UAAU,SAAS,CAAI,YAAiB;IAC5C,OAAO,YAAY,CAAC,OAAO,IAAI,IAAI,CAAC;AACtC,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,SAAS,CAAC,GAAW;IACnC,OAAO,GAAG,CAAC,OAAO,CAAC,cAAc,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC,CAAC;AAChE,CAAC;AAED;;;;;;;;GAQG;AACH,MAAM,UAAU,OAAO,CAAC,GAAW;IACjC,OAAO,GAAG,CAAC,OAAO,CAAC,QAAQ,EAAE,KAAK,CAAC,CAAC,WAAW,EAAE,CAAC;AACpD,CAAC;AAED;;;;;;;;;;;GAWG;AACH,MAAM,UAAU,OAAO,CAGrB,KAAU,EAAE,EAAoC;IAChD,MAAM,GAAG,GAAG,KAAK,CAAC,MAAM,CAAC;IACzB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,GAAG,EAAE,CAAC,EAAE;QAAE,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;IAC9C,OAAO,KAAK,CAAC;AACf,CAAC;AAED,IAAW,cAMV;AAND,WAAW,cAAc;IACvB,wDAAW,CAAA;IACX,yDAAY,CAAA;IACZ,wDAAW,CAAA;IACX,wDAAW,CAAA;IACX,kEAAgB,CAAA;AAClB,CAAC,EANU,cAAc,KAAd,cAAc,QAMxB;AAED;;;;;;;;;;GAUG;AACH,MAAM,UAAU,MAAM,CAAC,GAAW;IAChC,MAAM,QAAQ,GAAG,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;IAElC,IAAI,QAAQ,GAAG,CAAC,IAAI,QAAQ,GAAG,GAAG,CAAC,MAAM,GAAG,CAAC;QAAE,OAAO,KAAK,CAAC;IAE5D,MAAM,OAAO,GAAG,GAAG,CAAC,UAAU,CAAC,QAAQ,GAAG,CAAC,CAAC,CAAC;IAE7C,OAAO,CACL,CAAC,CAAC,OAAO,IAAI,cAAc,CAAC,MAAM,IAAI,OAAO,IAAI,cAAc,CAAC,MAAM,CAAC;QACrE,CAAC,OAAO,IAAI,cAAc,CAAC,MAAM,IAAI,OAAO,IAAI,cAAc,CAAC,MAAM,CAAC;QACtE,OAAO,KAAK,cAAc,CAAC,WAAW,CAAC;QACzC,GAAG,CAAC,QAAQ,CAAC,GAAG,EAAE,QAAQ,GAAG,CAAC,CAAC,CAChC,CAAC;AACJ,CAAC"} \ No newline at end of file diff --git a/node_modules/cheerio/node_modules/undici/index-fetch.js b/node_modules/cheerio/node_modules/undici/index-fetch.js deleted file mode 100644 index 01df32d..0000000 --- a/node_modules/cheerio/node_modules/undici/index-fetch.js +++ /dev/null @@ -1,32 +0,0 @@ -'use strict' - -const { getGlobalDispatcher, setGlobalDispatcher } = require('./lib/global') -const EnvHttpProxyAgent = require('./lib/dispatcher/env-http-proxy-agent') -const fetchImpl = require('./lib/web/fetch').fetch - -module.exports.fetch = function fetch (resource, init = undefined) { - return fetchImpl(resource, init).catch((err) => { - if (err && typeof err === 'object') { - Error.captureStackTrace(err) - } - throw err - }) -} -module.exports.FormData = require('./lib/web/fetch/formdata').FormData -module.exports.Headers = require('./lib/web/fetch/headers').Headers -module.exports.Response = require('./lib/web/fetch/response').Response -module.exports.Request = require('./lib/web/fetch/request').Request - -const { CloseEvent, ErrorEvent, MessageEvent, createFastMessageEvent } = require('./lib/web/websocket/events') -module.exports.WebSocket = require('./lib/web/websocket/websocket').WebSocket -module.exports.CloseEvent = CloseEvent -module.exports.ErrorEvent = ErrorEvent -module.exports.MessageEvent = MessageEvent -module.exports.createFastMessageEvent = createFastMessageEvent - -module.exports.EventSource = require('./lib/web/eventsource/eventsource').EventSource - -// Expose the fetch implementation to be enabled in Node.js core via a flag -module.exports.EnvHttpProxyAgent = EnvHttpProxyAgent -module.exports.getGlobalDispatcher = getGlobalDispatcher -module.exports.setGlobalDispatcher = setGlobalDispatcher diff --git a/node_modules/cheerio/node_modules/undici/index.d.ts b/node_modules/cheerio/node_modules/undici/index.d.ts deleted file mode 100644 index 83a786d..0000000 --- a/node_modules/cheerio/node_modules/undici/index.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export * from './types/index' -import Undici from './types/index' -export default Undici diff --git a/node_modules/cheerio/node_modules/undici/index.js b/node_modules/cheerio/node_modules/undici/index.js deleted file mode 100644 index 0c37ed4..0000000 --- a/node_modules/cheerio/node_modules/undici/index.js +++ /dev/null @@ -1,169 +0,0 @@ -'use strict' - -const Client = require('./lib/dispatcher/client') -const Dispatcher = require('./lib/dispatcher/dispatcher') -const Pool = require('./lib/dispatcher/pool') -const BalancedPool = require('./lib/dispatcher/balanced-pool') -const Agent = require('./lib/dispatcher/agent') -const ProxyAgent = require('./lib/dispatcher/proxy-agent') -const EnvHttpProxyAgent = require('./lib/dispatcher/env-http-proxy-agent') -const RetryAgent = require('./lib/dispatcher/retry-agent') -const errors = require('./lib/core/errors') -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 RetryHandler = require('./lib/handler/retry-handler') -const { getGlobalDispatcher, setGlobalDispatcher } = require('./lib/global') -const DecoratorHandler = require('./lib/handler/decorator-handler') -const RedirectHandler = require('./lib/handler/redirect-handler') -const createRedirectInterceptor = require('./lib/interceptor/redirect-interceptor') - -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.EnvHttpProxyAgent = EnvHttpProxyAgent -module.exports.RetryAgent = RetryAgent -module.exports.RetryHandler = RetryHandler - -module.exports.DecoratorHandler = DecoratorHandler -module.exports.RedirectHandler = RedirectHandler -module.exports.createRedirectInterceptor = createRedirectInterceptor -module.exports.interceptors = { - redirect: require('./lib/interceptor/redirect'), - retry: require('./lib/interceptor/retry'), - dump: require('./lib/interceptor/dump'), - dns: require('./lib/interceptor/dns') -} - -module.exports.buildConnector = buildConnector -module.exports.errors = errors -module.exports.util = { - parseHeaders: util.parseHeaders, - headerNameToString: util.headerNameToString -} - -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 - -const fetchImpl = require('./lib/web/fetch').fetch -module.exports.fetch = async function fetch (init, options = undefined) { - try { - return await fetchImpl(init, options) - } catch (err) { - if (err && typeof err === 'object') { - Error.captureStackTrace(err) - } - - throw err - } -} -module.exports.Headers = require('./lib/web/fetch/headers').Headers -module.exports.Response = require('./lib/web/fetch/response').Response -module.exports.Request = require('./lib/web/fetch/request').Request -module.exports.FormData = require('./lib/web/fetch/formdata').FormData -module.exports.File = globalThis.File ?? require('node:buffer').File -module.exports.FileReader = require('./lib/web/fileapi/filereader').FileReader - -const { setGlobalOrigin, getGlobalOrigin } = require('./lib/web/fetch/global') - -module.exports.setGlobalOrigin = setGlobalOrigin -module.exports.getGlobalOrigin = getGlobalOrigin - -const { CacheStorage } = require('./lib/web/cache/cachestorage') -const { kConstruct } = require('./lib/web/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) - -const { deleteCookie, getCookies, getSetCookies, setCookie } = require('./lib/web/cookies') - -module.exports.deleteCookie = deleteCookie -module.exports.getCookies = getCookies -module.exports.getSetCookies = getSetCookies -module.exports.setCookie = setCookie - -const { parseMIMEType, serializeAMimeType } = require('./lib/web/fetch/data-url') - -module.exports.parseMIMEType = parseMIMEType -module.exports.serializeAMimeType = serializeAMimeType - -const { CloseEvent, ErrorEvent, MessageEvent } = require('./lib/web/websocket/events') -module.exports.WebSocket = require('./lib/web/websocket/websocket').WebSocket -module.exports.CloseEvent = CloseEvent -module.exports.ErrorEvent = ErrorEvent -module.exports.MessageEvent = MessageEvent - -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 - -const { EventSource } = require('./lib/web/eventsource/eventsource') - -module.exports.EventSource = EventSource diff --git a/node_modules/cheerio/node_modules/undici/lib/api/abort-signal.js b/node_modules/cheerio/node_modules/undici/lib/api/abort-signal.js deleted file mode 100644 index 2afe747..0000000 --- a/node_modules/cheerio/node_modules/undici/lib/api/abort-signal.js +++ /dev/null @@ -1,57 +0,0 @@ -const { addAbortListener } = require('../core/util') -const { RequestAbortedError } = require('../core/errors') - -const kListener = Symbol('kListener') -const kSignal = Symbol('kSignal') - -function abort (self) { - if (self.abort) { - self.abort(self[kSignal]?.reason) - } else { - self.reason = self[kSignal]?.reason ?? new RequestAbortedError() - } - removeSignal(self) -} - -function addSignal (self, signal) { - self.reason = null - - self[kSignal] = null - self[kListener] = null - - if (!signal) { - return - } - - if (signal.aborted) { - abort(self) - return - } - - self[kSignal] = signal - self[kListener] = () => { - abort(self) - } - - addAbortListener(self[kSignal], 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/cheerio/node_modules/undici/lib/api/api-connect.js b/node_modules/cheerio/node_modules/undici/lib/api/api-connect.js deleted file mode 100644 index f9dbbf6..0000000 --- a/node_modules/cheerio/node_modules/undici/lib/api/api-connect.js +++ /dev/null @@ -1,108 +0,0 @@ -'use strict' - -const assert = require('node:assert') -const { AsyncResource } = require('node:async_hooks') -const { InvalidArgumentError, SocketError } = require('../core/errors') -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.reason) { - abort(this.reason) - return - } - - assert(this.callback) - - 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 - - let headers = rawHeaders - // Indicates is an HTTP2Session - if (headers != null) { - 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?.opaque - queueMicrotask(() => callback(err, { opaque })) - } -} - -module.exports = connect diff --git a/node_modules/cheerio/node_modules/undici/lib/api/api-pipeline.js b/node_modules/cheerio/node_modules/undici/lib/api/api-pipeline.js deleted file mode 100644 index e64b329..0000000 --- a/node_modules/cheerio/node_modules/undici/lib/api/api-pipeline.js +++ /dev/null @@ -1,251 +0,0 @@ -'use strict' - -const { - Readable, - Duplex, - PassThrough -} = require('node:stream') -const { - InvalidArgumentError, - InvalidReturnValueError, - RequestAbortedError -} = require('../core/errors') -const util = require('../core/util') -const { AsyncResource } = require('node:async_hooks') -const { addSignal, removeSignal } = require('./abort-signal') -const assert = require('node: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?.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 - - if (this.reason) { - abort(this.reason) - return - } - - assert(!res, 'pipeline cannot be retried') - assert(!ret.destroyed) - - 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/cheerio/node_modules/undici/lib/api/api-request.js b/node_modules/cheerio/node_modules/undici/lib/api/api-request.js deleted file mode 100644 index be17d62..0000000 --- a/node_modules/cheerio/node_modules/undici/lib/api/api-request.js +++ /dev/null @@ -1,214 +0,0 @@ -'use strict' - -const assert = require('node:assert') -const { Readable } = require('./readable') -const { InvalidArgumentError, RequestAbortedError } = require('../core/errors') -const util = require('../core/util') -const { getResolveErrorBodyCallback } = require('./util') -const { AsyncResource } = require('node:async_hooks') - -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.method = method - 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 - this.signal = signal - this.reason = null - this.removeAbortListener = null - - if (util.isStream(body)) { - body.on('error', (err) => { - this.onError(err) - }) - } - - if (this.signal) { - if (this.signal.aborted) { - this.reason = this.signal.reason ?? new RequestAbortedError() - } else { - this.removeAbortListener = util.addAbortListener(this.signal, () => { - this.reason = this.signal.reason ?? new RequestAbortedError() - if (this.res) { - util.destroy(this.res.on('error', util.nop), this.reason) - } else if (this.abort) { - this.abort(this.reason) - } - - if (this.removeAbortListener) { - this.res?.off('close', this.removeAbortListener) - this.removeAbortListener() - this.removeAbortListener = null - } - }) - } - } - } - - onConnect (abort, context) { - if (this.reason) { - abort(this.reason) - return - } - - assert(this.callback) - - 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 contentLength = parsedHeaders['content-length'] - const res = new Readable({ - resume, - abort, - contentType, - contentLength: this.method !== 'HEAD' && contentLength - ? Number(contentLength) - : null, - highWaterMark - }) - - if (this.removeAbortListener) { - res.on('close', this.removeAbortListener) - } - - this.callback = null - this.res = res - if (callback !== null) { - if (this.throwOnError && statusCode >= 400) { - this.runInAsyncScope(getResolveErrorBodyCallback, null, - { callback, body: res, contentType, statusCode, statusMessage, headers } - ) - } else { - this.runInAsyncScope(callback, null, null, { - statusCode, - headers, - trailers: this.trailers, - opaque, - body: res, - context - }) - } - } - } - - onData (chunk) { - return this.res.push(chunk) - } - - onComplete (trailers) { - util.parseHeaders(trailers, this.trailers) - this.res.push(null) - } - - onError (err) { - const { res, callback, body, opaque } = 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) - } - - if (this.removeAbortListener) { - res?.off('close', this.removeAbortListener) - this.removeAbortListener() - this.removeAbortListener = null - } - } -} - -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?.opaque - queueMicrotask(() => callback(err, { opaque })) - } -} - -module.exports = request -module.exports.RequestHandler = RequestHandler diff --git a/node_modules/cheerio/node_modules/undici/lib/api/api-stream.js b/node_modules/cheerio/node_modules/undici/lib/api/api-stream.js deleted file mode 100644 index fba2266..0000000 --- a/node_modules/cheerio/node_modules/undici/lib/api/api-stream.js +++ /dev/null @@ -1,220 +0,0 @@ -'use strict' - -const assert = require('node:assert') -const { finished, PassThrough } = require('node:stream') -const { InvalidArgumentError, InvalidReturnValueError } = require('../core/errors') -const util = require('../core/util') -const { getResolveErrorBodyCallback } = require('./util') -const { AsyncResource } = require('node: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.reason) { - abort(this.reason) - return - } - - assert(this.callback) - - 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 { - if (factory === null) { - return - } - - 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?.needDrain - - return needDrain !== true - } - - onData (chunk) { - const { res } = this - - return res ? res.write(chunk) : true - } - - onComplete (trailers) { - const { res } = this - - removeSignal(this) - - if (!res) { - return - } - - 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?.opaque - queueMicrotask(() => callback(err, { opaque })) - } -} - -module.exports = stream diff --git a/node_modules/cheerio/node_modules/undici/lib/api/api-upgrade.js b/node_modules/cheerio/node_modules/undici/lib/api/api-upgrade.js deleted file mode 100644 index 7effcf2..0000000 --- a/node_modules/cheerio/node_modules/undici/lib/api/api-upgrade.js +++ /dev/null @@ -1,108 +0,0 @@ -'use strict' - -const { InvalidArgumentError, SocketError } = require('../core/errors') -const { AsyncResource } = require('node:async_hooks') -const util = require('../core/util') -const { addSignal, removeSignal } = require('./abort-signal') -const assert = require('node: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.reason) { - abort(this.reason) - return - } - - assert(this.callback) - - this.abort = abort - this.context = null - } - - onHeaders () { - throw new SocketError('bad upgrade', null) - } - - onUpgrade (statusCode, rawHeaders, socket) { - assert(statusCode === 101) - - 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, { - 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?.opaque - queueMicrotask(() => callback(err, { opaque })) - } -} - -module.exports = upgrade diff --git a/node_modules/cheerio/node_modules/undici/lib/api/index.js b/node_modules/cheerio/node_modules/undici/lib/api/index.js deleted file mode 100644 index 8983a5e..0000000 --- a/node_modules/cheerio/node_modules/undici/lib/api/index.js +++ /dev/null @@ -1,7 +0,0 @@ -'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/cheerio/node_modules/undici/lib/api/readable.js b/node_modules/cheerio/node_modules/undici/lib/api/readable.js deleted file mode 100644 index 47fbf3e..0000000 --- a/node_modules/cheerio/node_modules/undici/lib/api/readable.js +++ /dev/null @@ -1,385 +0,0 @@ -// Ported from https://github.com/nodejs/undici/pull/907 - -'use strict' - -const assert = require('node:assert') -const { Readable } = require('node:stream') -const { RequestAbortedError, NotSupportedError, InvalidArgumentError, AbortError } = require('../core/errors') -const util = require('../core/util') -const { ReadableStreamFrom } = require('../core/util') - -const kConsume = Symbol('kConsume') -const kReading = Symbol('kReading') -const kBody = Symbol('kBody') -const kAbort = Symbol('kAbort') -const kContentType = Symbol('kContentType') -const kContentLength = Symbol('kContentLength') - -const noop = () => {} - -class BodyReadable extends Readable { - constructor ({ - resume, - abort, - contentType = '', - contentLength, - 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 - this[kContentLength] = contentLength - - // 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 (!err && !this._readableState.endEmitted) { - err = new RequestAbortedError() - } - - if (err) { - this[kAbort]() - } - - return super.destroy(err) - } - - _destroy (err, callback) { - // Workaround for Node "bug". If the stream is destroyed in same - // tick as it is created, then a user who is waiting for a - // promise (i.e micro tick) for installing a 'error' listener will - // never get a chance and will always encounter an unhandled exception. - if (!this[kReading]) { - setImmediate(() => { - callback(err) - }) - } else { - callback(err) - } - } - - 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) { - 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-bytes - async bytes () { - return consume(this, 'bytes') - } - - // 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 = Number.isFinite(opts?.limit) ? opts.limit : 128 * 1024 - const signal = opts?.signal - - if (signal != null && (typeof signal !== 'object' || !('aborted' in signal))) { - throw new InvalidArgumentError('signal must be an AbortSignal') - } - - signal?.throwIfAborted() - - if (this._readableState.closeEmitted) { - return null - } - - return await new Promise((resolve, reject) => { - if (this[kContentLength] > limit) { - this.destroy(new AbortError()) - } - - const onAbort = () => { - this.destroy(signal.reason ?? new AbortError()) - } - signal?.addEventListener('abort', onAbort) - - this - .on('close', function () { - signal?.removeEventListener('abort', onAbort) - if (signal?.aborted) { - reject(signal.reason ?? new AbortError()) - } else { - resolve(null) - } - }) - .on('error', noop) - .on('data', function (chunk) { - limit -= chunk.length - if (limit <= 0) { - this.destroy() - } - }) - .resume() - }) - } -} - -// 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) { - assert(!stream[kConsume]) - - return new Promise((resolve, reject) => { - if (isUnusable(stream)) { - const rState = stream._readableState - if (rState.destroyed && rState.closeEmitted === false) { - stream - .on('error', err => { - reject(err) - }) - .on('close', () => { - reject(new TypeError('unusable')) - }) - } else { - reject(rState.errored ?? new TypeError('unusable')) - } - } else { - queueMicrotask(() => { - 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()) - } - }) - - consumeStart(stream[kConsume]) - }) - } - }) -} - -function consumeStart (consume) { - if (consume.body === null) { - return - } - - const { _readableState: state } = consume.stream - - if (state.bufferIndex) { - const start = state.bufferIndex - const end = state.buffer.length - for (let n = start; n < end; n++) { - consumePush(consume, state.buffer[n]) - } - } else { - 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 - } -} - -/** - * @param {Buffer[]} chunks - * @param {number} length - */ -function chunksDecode (chunks, length) { - if (chunks.length === 0 || length === 0) { - return '' - } - const buffer = chunks.length === 1 ? chunks[0] : Buffer.concat(chunks, length) - const bufferLength = buffer.length - - // Skip BOM. - const start = - bufferLength > 2 && - buffer[0] === 0xef && - buffer[1] === 0xbb && - buffer[2] === 0xbf - ? 3 - : 0 - return buffer.utf8Slice(start, bufferLength) -} - -/** - * @param {Buffer[]} chunks - * @param {number} length - * @returns {Uint8Array} - */ -function chunksConcat (chunks, length) { - if (chunks.length === 0 || length === 0) { - return new Uint8Array(0) - } - if (chunks.length === 1) { - // fast-path - return new Uint8Array(chunks[0]) - } - const buffer = new Uint8Array(Buffer.allocUnsafeSlow(length).buffer) - - let offset = 0 - for (let i = 0; i < chunks.length; ++i) { - const chunk = chunks[i] - buffer.set(chunk, offset) - offset += chunk.length - } - - return buffer -} - -function consumeEnd (consume) { - const { type, body, resolve, stream, length } = consume - - try { - if (type === 'text') { - resolve(chunksDecode(body, length)) - } else if (type === 'json') { - resolve(JSON.parse(chunksDecode(body, length))) - } else if (type === 'arrayBuffer') { - resolve(chunksConcat(body, length).buffer) - } else if (type === 'blob') { - resolve(new Blob(body, { type: stream[kContentType] })) - } else if (type === 'bytes') { - resolve(chunksConcat(body, length)) - } - - 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 -} - -module.exports = { Readable: BodyReadable, chunksDecode } diff --git a/node_modules/cheerio/node_modules/undici/lib/api/util.js b/node_modules/cheerio/node_modules/undici/lib/api/util.js deleted file mode 100644 index 2f983bf..0000000 --- a/node_modules/cheerio/node_modules/undici/lib/api/util.js +++ /dev/null @@ -1,93 +0,0 @@ -const assert = require('node:assert') -const { - ResponseStatusCodeError -} = require('../core/errors') - -const { chunksDecode } = require('./readable') -const CHUNK_LIMIT = 128 * 1024 - -async function getResolveErrorBodyCallback ({ callback, body, contentType, statusCode, statusMessage, headers }) { - assert(body) - - let chunks = [] - let length = 0 - - try { - for await (const chunk of body) { - chunks.push(chunk) - length += chunk.length - if (length > CHUNK_LIMIT) { - chunks = [] - length = 0 - break - } - } - } catch { - chunks = [] - length = 0 - // Do nothing.... - } - - const message = `Response status code ${statusCode}${statusMessage ? `: ${statusMessage}` : ''}` - - if (statusCode === 204 || !contentType || !length) { - queueMicrotask(() => callback(new ResponseStatusCodeError(message, statusCode, headers))) - return - } - - const stackTraceLimit = Error.stackTraceLimit - Error.stackTraceLimit = 0 - let payload - - try { - if (isContentTypeApplicationJson(contentType)) { - payload = JSON.parse(chunksDecode(chunks, length)) - } else if (isContentTypeText(contentType)) { - payload = chunksDecode(chunks, length) - } - } catch { - // process in a callback to avoid throwing in the microtask queue - } finally { - Error.stackTraceLimit = stackTraceLimit - } - queueMicrotask(() => callback(new ResponseStatusCodeError(message, statusCode, headers, payload))) -} - -const isContentTypeApplicationJson = (contentType) => { - return ( - contentType.length > 15 && - contentType[11] === '/' && - contentType[0] === 'a' && - contentType[1] === 'p' && - contentType[2] === 'p' && - contentType[3] === 'l' && - contentType[4] === 'i' && - contentType[5] === 'c' && - contentType[6] === 'a' && - contentType[7] === 't' && - contentType[8] === 'i' && - contentType[9] === 'o' && - contentType[10] === 'n' && - contentType[12] === 'j' && - contentType[13] === 's' && - contentType[14] === 'o' && - contentType[15] === 'n' - ) -} - -const isContentTypeText = (contentType) => { - return ( - contentType.length > 4 && - contentType[4] === '/' && - contentType[0] === 't' && - contentType[1] === 'e' && - contentType[2] === 'x' && - contentType[3] === 't' - ) -} - -module.exports = { - getResolveErrorBodyCallback, - isContentTypeApplicationJson, - isContentTypeText -} diff --git a/node_modules/cheerio/node_modules/undici/lib/core/connect.js b/node_modules/cheerio/node_modules/undici/lib/core/connect.js deleted file mode 100644 index 8cd8abc..0000000 --- a/node_modules/cheerio/node_modules/undici/lib/core/connect.js +++ /dev/null @@ -1,240 +0,0 @@ -'use strict' - -const net = require('node:net') -const assert = require('node:assert') -const util = require('./util') -const { InvalidArgumentError, ConnectTimeoutError } = require('./errors') -const timers = require('../util/timers') - -function noop () {} - -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 -// FIXME: remove workaround when the Node bug is fixed -// https://github.com/nodejs/node/issues/49344#issuecomment-1741776308 -if (global.FinalizationRegistry && !(process.env.NODE_V8_COVERAGE || process.env.UNDICI_NO_FG)) { - 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 ({ allowH2, maxCachedSessions, socketPath, timeout, session: customSession, ...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 - allowH2 = allowH2 != null ? allowH2 : false - return function connect ({ hostname, host, protocol, port, servername, localAddress, httpSocket }, callback) { - let socket - if (protocol === 'https:') { - if (!tls) { - tls = require('node:tls') - } - servername = servername || options.servername || util.getServerName(host) || null - - const sessionKey = servername || hostname - assert(sessionKey) - - const session = customSession || sessionCache.get(sessionKey) || null - - port = port || 443 - - socket = tls.connect({ - highWaterMark: 16384, // TLS in node can't have bigger HWM anyway... - ...options, - servername, - session, - localAddress, - // TODO(HTTP/2): Add support for h2c - ALPNProtocols: allowH2 ? ['http/1.1', 'h2'] : ['http/1.1'], - socket: httpSocket, // upgrade socket connection - port, - 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') - - port = port || 80 - - socket = net.connect({ - highWaterMark: 64 * 1024, // Same as nodejs fs streams. - ...options, - localAddress, - port, - 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 clearConnectTimeout = setupConnectTimeout(new WeakRef(socket), { timeout, hostname, port }) - - socket - .setNoDelay(true) - .once(protocol === 'https:' ? 'secureConnect' : 'connect', function () { - queueMicrotask(clearConnectTimeout) - - if (callback) { - const cb = callback - callback = null - cb(null, this) - } - }) - .on('error', function (err) { - queueMicrotask(clearConnectTimeout) - - if (callback) { - const cb = callback - callback = null - cb(err) - } - }) - - return socket - } -} - -/** - * @param {WeakRef<net.Socket>} socketWeakRef - * @param {object} opts - * @param {number} opts.timeout - * @param {string} opts.hostname - * @param {number} opts.port - * @returns {() => void} - */ -const setupConnectTimeout = process.platform === 'win32' - ? (socketWeakRef, opts) => { - if (!opts.timeout) { - return noop - } - - let s1 = null - let s2 = null - const fastTimer = timers.setFastTimeout(() => { - // setImmediate is added to make sure that we prioritize socket error events over timeouts - s1 = setImmediate(() => { - // Windows needs an extra setImmediate probably due to implementation differences in the socket logic - s2 = setImmediate(() => onConnectTimeout(socketWeakRef.deref(), opts)) - }) - }, opts.timeout) - return () => { - timers.clearFastTimeout(fastTimer) - clearImmediate(s1) - clearImmediate(s2) - } - } - : (socketWeakRef, opts) => { - if (!opts.timeout) { - return noop - } - - let s1 = null - const fastTimer = timers.setFastTimeout(() => { - // setImmediate is added to make sure that we prioritize socket error events over timeouts - s1 = setImmediate(() => { - onConnectTimeout(socketWeakRef.deref(), opts) - }) - }, opts.timeout) - return () => { - timers.clearFastTimeout(fastTimer) - clearImmediate(s1) - } - } - -/** - * @param {net.Socket} socket - * @param {object} opts - * @param {number} opts.timeout - * @param {string} opts.hostname - * @param {number} opts.port - */ -function onConnectTimeout (socket, opts) { - // The socket could be already garbage collected - if (socket == null) { - return - } - - let message = 'Connect Timeout Error' - if (Array.isArray(socket.autoSelectFamilyAttemptedAddresses)) { - message += ` (attempted addresses: ${socket.autoSelectFamilyAttemptedAddresses.join(', ')},` - } else { - message += ` (attempted address: ${opts.hostname}:${opts.port},` - } - - message += ` timeout: ${opts.timeout}ms)` - - util.destroy(socket, new ConnectTimeoutError(message)) -} - -module.exports = buildConnector diff --git a/node_modules/cheerio/node_modules/undici/lib/core/constants.js b/node_modules/cheerio/node_modules/undici/lib/core/constants.js deleted file mode 100644 index 6ec770d..0000000 --- a/node_modules/cheerio/node_modules/undici/lib/core/constants.js +++ /dev/null @@ -1,118 +0,0 @@ -'use strict' - -/** @type {Record<string, string | undefined>} */ -const headerNameLowerCasedRecord = {} - -// https://developer.mozilla.org/docs/Web/HTTP/Headers -const wellknownHeaderNames = [ - 'Accept', - 'Accept-Encoding', - 'Accept-Language', - 'Accept-Ranges', - 'Access-Control-Allow-Credentials', - 'Access-Control-Allow-Headers', - 'Access-Control-Allow-Methods', - 'Access-Control-Allow-Origin', - 'Access-Control-Expose-Headers', - 'Access-Control-Max-Age', - 'Access-Control-Request-Headers', - 'Access-Control-Request-Method', - 'Age', - 'Allow', - 'Alt-Svc', - 'Alt-Used', - 'Authorization', - 'Cache-Control', - 'Clear-Site-Data', - 'Connection', - 'Content-Disposition', - 'Content-Encoding', - 'Content-Language', - 'Content-Length', - 'Content-Location', - 'Content-Range', - 'Content-Security-Policy', - 'Content-Security-Policy-Report-Only', - 'Content-Type', - 'Cookie', - 'Cross-Origin-Embedder-Policy', - 'Cross-Origin-Opener-Policy', - 'Cross-Origin-Resource-Policy', - 'Date', - 'Device-Memory', - 'Downlink', - 'ECT', - 'ETag', - 'Expect', - 'Expect-CT', - 'Expires', - 'Forwarded', - 'From', - 'Host', - 'If-Match', - 'If-Modified-Since', - 'If-None-Match', - 'If-Range', - 'If-Unmodified-Since', - 'Keep-Alive', - 'Last-Modified', - 'Link', - 'Location', - 'Max-Forwards', - 'Origin', - 'Permissions-Policy', - 'Pragma', - 'Proxy-Authenticate', - 'Proxy-Authorization', - 'RTT', - 'Range', - 'Referer', - 'Referrer-Policy', - 'Refresh', - 'Retry-After', - 'Sec-WebSocket-Accept', - 'Sec-WebSocket-Extensions', - 'Sec-WebSocket-Key', - 'Sec-WebSocket-Protocol', - 'Sec-WebSocket-Version', - 'Server', - 'Server-Timing', - 'Service-Worker-Allowed', - 'Service-Worker-Navigation-Preload', - 'Set-Cookie', - 'SourceMap', - 'Strict-Transport-Security', - 'Supports-Loading-Mode', - 'TE', - 'Timing-Allow-Origin', - 'Trailer', - 'Transfer-Encoding', - 'Upgrade', - 'Upgrade-Insecure-Requests', - 'User-Agent', - 'Vary', - 'Via', - 'WWW-Authenticate', - 'X-Content-Type-Options', - 'X-DNS-Prefetch-Control', - 'X-Frame-Options', - 'X-Permitted-Cross-Domain-Policies', - 'X-Powered-By', - 'X-Requested-With', - 'X-XSS-Protection' -] - -for (let i = 0; i < wellknownHeaderNames.length; ++i) { - const key = wellknownHeaderNames[i] - const lowerCasedKey = key.toLowerCase() - headerNameLowerCasedRecord[key] = headerNameLowerCasedRecord[lowerCasedKey] = - lowerCasedKey -} - -// Note: object prototypes should not be able to be referenced. e.g. `Object#hasOwnProperty`. -Object.setPrototypeOf(headerNameLowerCasedRecord, null) - -module.exports = { - wellknownHeaderNames, - headerNameLowerCasedRecord -} diff --git a/node_modules/cheerio/node_modules/undici/lib/core/diagnostics.js b/node_modules/cheerio/node_modules/undici/lib/core/diagnostics.js deleted file mode 100644 index e1af3db..0000000 --- a/node_modules/cheerio/node_modules/undici/lib/core/diagnostics.js +++ /dev/null @@ -1,202 +0,0 @@ -'use strict' -const diagnosticsChannel = require('node:diagnostics_channel') -const util = require('node:util') - -const undiciDebugLog = util.debuglog('undici') -const fetchDebuglog = util.debuglog('fetch') -const websocketDebuglog = util.debuglog('websocket') -let isClientSet = false -const channels = { - // Client - beforeConnect: diagnosticsChannel.channel('undici:client:beforeConnect'), - connected: diagnosticsChannel.channel('undici:client:connected'), - connectError: diagnosticsChannel.channel('undici:client:connectError'), - sendHeaders: diagnosticsChannel.channel('undici:client:sendHeaders'), - // Request - create: diagnosticsChannel.channel('undici:request:create'), - bodySent: diagnosticsChannel.channel('undici:request:bodySent'), - headers: diagnosticsChannel.channel('undici:request:headers'), - trailers: diagnosticsChannel.channel('undici:request:trailers'), - error: diagnosticsChannel.channel('undici:request:error'), - // WebSocket - open: diagnosticsChannel.channel('undici:websocket:open'), - close: diagnosticsChannel.channel('undici:websocket:close'), - socketError: diagnosticsChannel.channel('undici:websocket:socket_error'), - ping: diagnosticsChannel.channel('undici:websocket:ping'), - pong: diagnosticsChannel.channel('undici:websocket:pong') -} - -if (undiciDebugLog.enabled || fetchDebuglog.enabled) { - const debuglog = fetchDebuglog.enabled ? fetchDebuglog : undiciDebugLog - - // Track all Client events - diagnosticsChannel.channel('undici:client:beforeConnect').subscribe(evt => { - const { - connectParams: { version, protocol, port, host } - } = evt - debuglog( - 'connecting to %s using %s%s', - `${host}${port ? `:${port}` : ''}`, - protocol, - version - ) - }) - - diagnosticsChannel.channel('undici:client:connected').subscribe(evt => { - const { - connectParams: { version, protocol, port, host } - } = evt - debuglog( - 'connected to %s using %s%s', - `${host}${port ? `:${port}` : ''}`, - protocol, - version - ) - }) - - diagnosticsChannel.channel('undici:client:connectError').subscribe(evt => { - const { - connectParams: { version, protocol, port, host }, - error - } = evt - debuglog( - 'connection to %s using %s%s errored - %s', - `${host}${port ? `:${port}` : ''}`, - protocol, - version, - error.message - ) - }) - - diagnosticsChannel.channel('undici:client:sendHeaders').subscribe(evt => { - const { - request: { method, path, origin } - } = evt - debuglog('sending request to %s %s/%s', method, origin, path) - }) - - // Track Request events - diagnosticsChannel.channel('undici:request:headers').subscribe(evt => { - const { - request: { method, path, origin }, - response: { statusCode } - } = evt - debuglog( - 'received response to %s %s/%s - HTTP %d', - method, - origin, - path, - statusCode - ) - }) - - diagnosticsChannel.channel('undici:request:trailers').subscribe(evt => { - const { - request: { method, path, origin } - } = evt - debuglog('trailers received from %s %s/%s', method, origin, path) - }) - - diagnosticsChannel.channel('undici:request:error').subscribe(evt => { - const { - request: { method, path, origin }, - error - } = evt - debuglog( - 'request to %s %s/%s errored - %s', - method, - origin, - path, - error.message - ) - }) - - isClientSet = true -} - -if (websocketDebuglog.enabled) { - if (!isClientSet) { - const debuglog = undiciDebugLog.enabled ? undiciDebugLog : websocketDebuglog - diagnosticsChannel.channel('undici:client:beforeConnect').subscribe(evt => { - const { - connectParams: { version, protocol, port, host } - } = evt - debuglog( - 'connecting to %s%s using %s%s', - host, - port ? `:${port}` : '', - protocol, - version - ) - }) - - diagnosticsChannel.channel('undici:client:connected').subscribe(evt => { - const { - connectParams: { version, protocol, port, host } - } = evt - debuglog( - 'connected to %s%s using %s%s', - host, - port ? `:${port}` : '', - protocol, - version - ) - }) - - diagnosticsChannel.channel('undici:client:connectError').subscribe(evt => { - const { - connectParams: { version, protocol, port, host }, - error - } = evt - debuglog( - 'connection to %s%s using %s%s errored - %s', - host, - port ? `:${port}` : '', - protocol, - version, - error.message - ) - }) - - diagnosticsChannel.channel('undici:client:sendHeaders').subscribe(evt => { - const { - request: { method, path, origin } - } = evt - debuglog('sending request to %s %s/%s', method, origin, path) - }) - } - - // Track all WebSocket events - diagnosticsChannel.channel('undici:websocket:open').subscribe(evt => { - const { - address: { address, port } - } = evt - websocketDebuglog('connection opened %s%s', address, port ? `:${port}` : '') - }) - - diagnosticsChannel.channel('undici:websocket:close').subscribe(evt => { - const { websocket, code, reason } = evt - websocketDebuglog( - 'closed connection to %s - %s %s', - websocket.url, - code, - reason - ) - }) - - diagnosticsChannel.channel('undici:websocket:socket_error').subscribe(err => { - websocketDebuglog('connection errored - %s', err.message) - }) - - diagnosticsChannel.channel('undici:websocket:ping').subscribe(evt => { - websocketDebuglog('ping received') - }) - - diagnosticsChannel.channel('undici:websocket:pong').subscribe(evt => { - websocketDebuglog('pong received') - }) -} - -module.exports = { - channels -} diff --git a/node_modules/cheerio/node_modules/undici/lib/core/errors.js b/node_modules/cheerio/node_modules/undici/lib/core/errors.js deleted file mode 100644 index 9257875..0000000 --- a/node_modules/cheerio/node_modules/undici/lib/core/errors.js +++ /dev/null @@ -1,244 +0,0 @@ -'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) - this.name = 'ConnectTimeoutError' - this.message = message || 'Connect Timeout Error' - this.code = 'UND_ERR_CONNECT_TIMEOUT' - } -} - -class HeadersTimeoutError extends UndiciError { - constructor (message) { - super(message) - this.name = 'HeadersTimeoutError' - this.message = message || 'Headers Timeout Error' - this.code = 'UND_ERR_HEADERS_TIMEOUT' - } -} - -class HeadersOverflowError extends UndiciError { - constructor (message) { - super(message) - this.name = 'HeadersOverflowError' - this.message = message || 'Headers Overflow Error' - this.code = 'UND_ERR_HEADERS_OVERFLOW' - } -} - -class BodyTimeoutError extends UndiciError { - constructor (message) { - super(message) - 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) - 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) - this.name = 'InvalidArgumentError' - this.message = message || 'Invalid Argument Error' - this.code = 'UND_ERR_INVALID_ARG' - } -} - -class InvalidReturnValueError extends UndiciError { - constructor (message) { - super(message) - this.name = 'InvalidReturnValueError' - this.message = message || 'Invalid Return Value Error' - this.code = 'UND_ERR_INVALID_RETURN_VALUE' - } -} - -class AbortError extends UndiciError { - constructor (message) { - super(message) - this.name = 'AbortError' - this.message = message || 'The operation was aborted' - } -} - -class RequestAbortedError extends AbortError { - constructor (message) { - super(message) - this.name = 'AbortError' - this.message = message || 'Request aborted' - this.code = 'UND_ERR_ABORTED' - } -} - -class InformationalError extends UndiciError { - constructor (message) { - super(message) - this.name = 'InformationalError' - this.message = message || 'Request information' - this.code = 'UND_ERR_INFO' - } -} - -class RequestContentLengthMismatchError extends UndiciError { - constructor (message) { - super(message) - 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) - 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) - this.name = 'ClientDestroyedError' - this.message = message || 'The client is destroyed' - this.code = 'UND_ERR_DESTROYED' - } -} - -class ClientClosedError extends UndiciError { - constructor (message) { - super(message) - this.name = 'ClientClosedError' - this.message = message || 'The client is closed' - this.code = 'UND_ERR_CLOSED' - } -} - -class SocketError extends UndiciError { - constructor (message, socket) { - super(message) - this.name = 'SocketError' - this.message = message || 'Socket error' - this.code = 'UND_ERR_SOCKET' - this.socket = socket - } -} - -class NotSupportedError extends UndiciError { - constructor (message) { - super(message) - this.name = 'NotSupportedError' - this.message = message || 'Not supported error' - this.code = 'UND_ERR_NOT_SUPPORTED' - } -} - -class BalancedPoolMissingUpstreamError extends UndiciError { - constructor (message) { - super(message) - 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) - this.name = 'HTTPParserError' - this.code = code ? `HPE_${code}` : undefined - this.data = data ? data.toString() : undefined - } -} - -class ResponseExceededMaxSizeError extends UndiciError { - constructor (message) { - super(message) - this.name = 'ResponseExceededMaxSizeError' - this.message = message || 'Response content exceeded max size' - this.code = 'UND_ERR_RES_EXCEEDED_MAX_SIZE' - } -} - -class RequestRetryError extends UndiciError { - constructor (message, code, { headers, data }) { - super(message) - this.name = 'RequestRetryError' - this.message = message || 'Request retry error' - this.code = 'UND_ERR_REQ_RETRY' - this.statusCode = code - this.data = data - this.headers = headers - } -} - -class ResponseError extends UndiciError { - constructor (message, code, { headers, data }) { - super(message) - this.name = 'ResponseError' - this.message = message || 'Response error' - this.code = 'UND_ERR_RESPONSE' - this.statusCode = code - this.data = data - this.headers = headers - } -} - -class SecureProxyConnectionError extends UndiciError { - constructor (cause, message, options) { - super(message, { cause, ...(options ?? {}) }) - this.name = 'SecureProxyConnectionError' - this.message = message || 'Secure Proxy Connection failed' - this.code = 'UND_ERR_PRX_TLS' - this.cause = cause - } -} - -module.exports = { - AbortError, - HTTPParserError, - UndiciError, - HeadersTimeoutError, - HeadersOverflowError, - BodyTimeoutError, - RequestContentLengthMismatchError, - ConnectTimeoutError, - ResponseStatusCodeError, - InvalidArgumentError, - InvalidReturnValueError, - RequestAbortedError, - ClientDestroyedError, - ClientClosedError, - InformationalError, - SocketError, - NotSupportedError, - ResponseContentLengthMismatchError, - BalancedPoolMissingUpstreamError, - ResponseExceededMaxSizeError, - RequestRetryError, - ResponseError, - SecureProxyConnectionError -} diff --git a/node_modules/cheerio/node_modules/undici/lib/core/request.js b/node_modules/cheerio/node_modules/undici/lib/core/request.js deleted file mode 100644 index 7800303..0000000 --- a/node_modules/cheerio/node_modules/undici/lib/core/request.js +++ /dev/null @@ -1,395 +0,0 @@ -'use strict' - -const { - InvalidArgumentError, - NotSupportedError -} = require('./errors') -const assert = require('node:assert') -const { - isValidHTTPToken, - isValidHeaderValue, - isStream, - destroy, - isBuffer, - isFormDataLike, - isIterable, - isBlobLike, - buildURL, - validateHandler, - getServerName, - normalizedMethodRecords -} = require('./util') -const { channels } = require('./diagnostics.js') -const { headerNameLowerCasedRecord } = require('./constants') - -// Verifies that a given path is valid does not contain control chars \x00 to \x20 -const invalidPathRegex = /[^\u0021-\u00ff]/ - -const kHandler = Symbol('handler') - -class Request { - constructor (origin, { - path, - method, - body, - headers, - query, - idempotent, - blocking, - upgrade, - headersTimeout, - bodyTimeout, - reset, - throwOnError, - expectContinue, - servername - }, 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.test(path)) { - throw new InvalidArgumentError('invalid request path') - } - - if (typeof method !== 'string') { - throw new InvalidArgumentError('method must be a string') - } else if (normalizedMethodRecords[method] === undefined && !isValidHTTPToken(method)) { - 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') - } - - if (expectContinue != null && typeof expectContinue !== 'boolean') { - throw new InvalidArgumentError('invalid expectContinue') - } - - this.headersTimeout = headersTimeout - - this.bodyTimeout = bodyTimeout - - this.throwOnError = throwOnError === true - - this.method = method - - this.abort = null - - if (body == null) { - this.body = null - } else if (isStream(body)) { - this.body = body - - const rState = this.body._readableState - if (!rState || !rState.autoDestroy) { - this.endHandler = function autoDestroy () { - destroy(this) - } - this.body.on('end', this.endHandler) - } - - this.errorHandler = err => { - if (this.abort) { - this.abort(err) - } else { - this.error = err - } - } - this.body.on('error', this.errorHandler) - } else if (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 (isFormDataLike(body) || isIterable(body) || 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 ? 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 = [] - - // Only for H2 - this.expectContinue = expectContinue != null ? expectContinue : false - - 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') { - if (headers[Symbol.iterator]) { - for (const header of headers) { - if (!Array.isArray(header) || header.length !== 2) { - throw new InvalidArgumentError('headers must be in key-value pair format') - } - processHeader(this, header[0], header[1]) - } - } else { - const keys = Object.keys(headers) - for (let i = 0; i < keys.length; ++i) { - processHeader(this, keys[i], headers[keys[i]]) - } - } - } else if (headers != null) { - throw new InvalidArgumentError('headers must be an object or an array') - } - - validateHandler(handler, method, upgrade) - - this.servername = servername || getServerName(this.host) - - this[kHandler] = handler - - if (channels.create.hasSubscribers) { - channels.create.publish({ request: this }) - } - } - - onBodySent (chunk) { - if (this[kHandler].onBodySent) { - try { - return this[kHandler].onBodySent(chunk) - } catch (err) { - this.abort(err) - } - } - } - - onRequestSent () { - if (channels.bodySent.hasSubscribers) { - channels.bodySent.publish({ request: this }) - } - - if (this[kHandler].onRequestSent) { - try { - return this[kHandler].onRequestSent() - } catch (err) { - this.abort(err) - } - } - } - - onConnect (abort) { - assert(!this.aborted) - assert(!this.completed) - - if (this.error) { - abort(this.error) - } else { - this.abort = abort - return this[kHandler].onConnect(abort) - } - } - - onResponseStarted () { - return this[kHandler].onResponseStarted?.() - } - - onHeaders (statusCode, headers, resume, statusText) { - assert(!this.aborted) - assert(!this.completed) - - if (channels.headers.hasSubscribers) { - channels.headers.publish({ request: this, response: { statusCode, headers, statusText } }) - } - - try { - return this[kHandler].onHeaders(statusCode, headers, resume, statusText) - } catch (err) { - this.abort(err) - } - } - - onData (chunk) { - assert(!this.aborted) - assert(!this.completed) - - try { - return this[kHandler].onData(chunk) - } catch (err) { - this.abort(err) - return false - } - } - - onUpgrade (statusCode, headers, socket) { - assert(!this.aborted) - assert(!this.completed) - - return this[kHandler].onUpgrade(statusCode, headers, socket) - } - - onComplete (trailers) { - this.onFinally() - - assert(!this.aborted) - - this.completed = true - if (channels.trailers.hasSubscribers) { - channels.trailers.publish({ request: this, trailers }) - } - - try { - return this[kHandler].onComplete(trailers) - } catch (err) { - // TODO (fix): This might be a bad idea? - this.onError(err) - } - } - - onError (error) { - this.onFinally() - - if (channels.error.hasSubscribers) { - channels.error.publish({ request: this, error }) - } - - if (this.aborted) { - return - } - this.aborted = true - - return this[kHandler].onError(error) - } - - onFinally () { - if (this.errorHandler) { - this.body.off('error', this.errorHandler) - this.errorHandler = null - } - - if (this.endHandler) { - this.body.off('end', this.endHandler) - this.endHandler = null - } - } - - addHeader (key, value) { - processHeader(this, key, value) - return this - } -} - -function processHeader (request, key, val) { - if (val && (typeof val === 'object' && !Array.isArray(val))) { - throw new InvalidArgumentError(`invalid ${key} header`) - } else if (val === undefined) { - return - } - - let headerName = headerNameLowerCasedRecord[key] - - if (headerName === undefined) { - headerName = key.toLowerCase() - if (headerNameLowerCasedRecord[headerName] === undefined && !isValidHTTPToken(headerName)) { - throw new InvalidArgumentError('invalid header key') - } - } - - if (Array.isArray(val)) { - const arr = [] - for (let i = 0; i < val.length; i++) { - if (typeof val[i] === 'string') { - if (!isValidHeaderValue(val[i])) { - throw new InvalidArgumentError(`invalid ${key} header`) - } - arr.push(val[i]) - } else if (val[i] === null) { - arr.push('') - } else if (typeof val[i] === 'object') { - throw new InvalidArgumentError(`invalid ${key} header`) - } else { - arr.push(`${val[i]}`) - } - } - val = arr - } else if (typeof val === 'string') { - if (!isValidHeaderValue(val)) { - throw new InvalidArgumentError(`invalid ${key} header`) - } - } else if (val === null) { - val = '' - } else { - val = `${val}` - } - - if (request.host === null && headerName === 'host') { - if (typeof val !== 'string') { - throw new InvalidArgumentError('invalid host header') - } - // Consumed by Client - request.host = val - } else if (request.contentLength === null && headerName === 'content-length') { - request.contentLength = parseInt(val, 10) - if (!Number.isFinite(request.contentLength)) { - throw new InvalidArgumentError('invalid content-length header') - } - } else if (request.contentType === null && headerName === 'content-type') { - request.contentType = val - request.headers.push(key, val) - } else if (headerName === 'transfer-encoding' || headerName === 'keep-alive' || headerName === 'upgrade') { - throw new InvalidArgumentError(`invalid ${headerName} header`) - } else if (headerName === 'connection') { - const value = typeof val === 'string' ? val.toLowerCase() : null - if (value !== 'close' && value !== 'keep-alive') { - throw new InvalidArgumentError('invalid connection header') - } - - if (value === 'close') { - request.reset = true - } - } else if (headerName === 'expect') { - throw new NotSupportedError('expect header not supported') - } else { - request.headers.push(key, val) - } -} - -module.exports = Request diff --git a/node_modules/cheerio/node_modules/undici/lib/core/symbols.js b/node_modules/cheerio/node_modules/undici/lib/core/symbols.js deleted file mode 100644 index c8ba5dd..0000000 --- a/node_modules/cheerio/node_modules/undici/lib/core/symbols.js +++ /dev/null @@ -1,67 +0,0 @@ -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'), - 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'), - kBody: Symbol('abstracted request body'), - 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'), - kResume: Symbol('resume'), - kOnError: Symbol('on error'), - 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'), - kHTTP2Session: Symbol('http2Session'), - kHTTP2SessionState: Symbol('http2Session state'), - kRetryHandlerDefaultRetry: Symbol('retry agent default retry'), - kConstruct: Symbol('constructable'), - kListeners: Symbol('listeners'), - kHTTPContext: Symbol('http context'), - kMaxConcurrentStreams: Symbol('max concurrent streams'), - kNoProxyAgent: Symbol('no proxy agent'), - kHttpProxyAgent: Symbol('http proxy agent'), - kHttpsProxyAgent: Symbol('https proxy agent') -} diff --git a/node_modules/cheerio/node_modules/undici/lib/core/util.js b/node_modules/cheerio/node_modules/undici/lib/core/util.js deleted file mode 100644 index 9ee7ec2..0000000 --- a/node_modules/cheerio/node_modules/undici/lib/core/util.js +++ /dev/null @@ -1,719 +0,0 @@ -'use strict' - -const assert = require('node:assert') -const { kDestroyed, kBodyUsed, kListeners, kBody } = require('./symbols') -const { IncomingMessage } = require('node:http') -const stream = require('node:stream') -const net = require('node:net') -const { Blob } = require('node:buffer') -const nodeUtil = require('node:util') -const { stringify } = require('node:querystring') -const { EventEmitter: EE } = require('node:events') -const { InvalidArgumentError } = require('./errors') -const { headerNameLowerCasedRecord } = require('./constants') -const { tree } = require('./tree') - -const [nodeMajor, nodeMinor] = process.versions.node.split('.').map(v => Number(v)) - -class BodyAsyncIterable { - constructor (body) { - this[kBody] = body - this[kBodyUsed] = false - } - - async * [Symbol.asyncIterator] () { - assert(!this[kBodyUsed], 'disturbed') - this[kBodyUsed] = true - yield * this[kBody] - } -} - -function wrapRequestBody (body) { - if (isStream(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 (bodyLength(body) === 0) { - body - .on('data', function () { - assert(false) - }) - } - - if (typeof body.readableDidRead !== 'boolean') { - body[kBodyUsed] = false - EE.prototype.on.call(body, 'data', function () { - this[kBodyUsed] = true - }) - } - - return body - } else if (body && typeof 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. - return new BodyAsyncIterable(body) - } else if ( - body && - typeof body !== 'string' && - !ArrayBuffer.isView(body) && - isIterable(body) - ) { - // TODO: Should we allow re-using iterable if !this.opts.idempotent - // or through some other flag? - return new BodyAsyncIterable(body) - } else { - return body - } -} - -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) { - if (object === null) { - return false - } else if (object instanceof Blob) { - return true - } else if (typeof object !== 'object') { - return false - } else { - const sTag = object[Symbol.toStringTag] - - return (sTag === 'Blob' || sTag === 'File') && ( - ('stream' in object && typeof object.stream === 'function') || - ('arrayBuffer' in object && typeof object.arrayBuffer === 'function') - ) - } -} - -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 isValidPort (port) { - const value = parseInt(port, 10) - return ( - value === Number(port) && - value >= 0 && - value <= 65535 - ) -} - -function isHttpOrHttpsPrefixed (value) { - return ( - value != null && - value[0] === 'h' && - value[1] === 't' && - value[2] === 't' && - value[3] === 'p' && - ( - value[4] === ':' || - ( - value[4] === 's' && - value[5] === ':' - ) - ) - ) -} - -function parseURL (url) { - if (typeof url === 'string') { - url = new URL(url) - - if (!isHttpOrHttpsPrefixed(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 instanceof URL)) { - if (url.port != null && url.port !== '' && isValidPort(url.port) === false) { - 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 (!isHttpOrHttpsPrefixed(url.origin || url.protocol)) { - throw new InvalidArgumentError('Invalid URL protocol: the URL must start with `http:` or `https:`.') - } - - 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[origin.length - 1] === '/') { - origin = origin.slice(0, origin.length - 1) - } - - if (path && path[0] !== '/') { - 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. - return new URL(`${origin}${path}`) - } - - if (!isHttpOrHttpsPrefixed(url.origin || url.protocol)) { - throw new InvalidArgumentError('Invalid URL protocol: the URL must start with `http:` or `https:`.') - } - - 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.substring(1, idx) - } - - const idx = host.indexOf(':') - if (idx === -1) return host - - return host.substring(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(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.objectMode === false && 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 (body) { - return body && !!(body.destroyed || body[kDestroyed] || (stream.isDestroyed?.(body))) -} - -function destroy (stream, err) { - if (stream == null || !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) { - queueMicrotask(() => { - stream.emit('error', 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 -} - -/** - * Retrieves a header name and returns its lowercase value. - * @param {string | Buffer} value Header name - * @returns {string} - */ -function headerNameToString (value) { - return typeof value === 'string' - ? headerNameLowerCasedRecord[value] ?? value.toLowerCase() - : tree.lookup(value) ?? value.toString('latin1').toLowerCase() -} - -/** - * Receive the buffer as a string and return its lowercase value. - * @param {Buffer} value Header name - * @returns {string} - */ -function bufferToLowerCasedHeaderName (value) { - return tree.lookup(value) ?? value.toString('latin1').toLowerCase() -} - -/** - * @param {Record<string, string | string[]> | (Buffer | string | (Buffer | string)[])[]} headers - * @param {Record<string, string | string[]>} [obj] - * @returns {Record<string, string | string[]>} - */ -function parseHeaders (headers, obj) { - if (obj === undefined) obj = {} - for (let i = 0; i < headers.length; i += 2) { - const key = headerNameToString(headers[i]) - let val = obj[key] - - if (val) { - if (typeof val === 'string') { - val = [val] - obj[key] = val - } - val.push(headers[i + 1].toString('utf8')) - } else { - const headersValue = headers[i + 1] - if (typeof headersValue === 'string') { - obj[key] = headersValue - } else { - obj[key] = Array.isArray(headersValue) ? headersValue.map(x => x.toString('utf8')) : headersValue.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 len = headers.length - const ret = new Array(len) - - let hasContentLength = false - let contentDispositionIdx = -1 - let key - let val - let kLen = 0 - - for (let n = 0; n < headers.length; n += 2) { - key = headers[n] - val = headers[n + 1] - - typeof key !== 'string' && (key = key.toString()) - typeof val !== 'string' && (val = val.toString('utf8')) - - kLen = key.length - if (kLen === 14 && key[7] === '-' && (key === 'content-length' || key.toLowerCase() === 'content-length')) { - hasContentLength = true - } else if (kLen === 19 && key[7] === '-' && (key === 'content-disposition' || key.toLowerCase() === 'content-disposition')) { - contentDispositionIdx = n + 1 - } - ret[n] = key - ret[n + 1] = 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) { - // TODO (fix): Why is body[kBodyUsed] needed? - return !!(body && (stream.isDisturbed(body) || body[kBodyUsed])) -} - -function isErrored (body) { - return !!(body && stream.isErrored(body)) -} - -function isReadable (body) { - return !!(body && stream.isReadable(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 - } -} - -/** @type {globalThis['ReadableStream']} */ -function ReadableStreamFrom (iterable) { - // We cannot use ReadableStream.from here because it does not return a byte stream. - - 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() - controller.byobRequest?.respond(0) - }) - } else { - const buf = Buffer.isBuffer(value) ? value : Buffer.from(value) - if (buf.byteLength) { - controller.enqueue(new Uint8Array(buf)) - } - } - return controller.desiredSize > 0 - }, - async cancel (reason) { - await iterator.return() - }, - type: 'bytes' - } - ) -} - -// 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 addAbortListener (signal, listener) { - if ('addEventListener' in signal) { - signal.addEventListener('abort', listener, { once: true }) - return () => signal.removeEventListener('abort', listener) - } - signal.addListener('abort', listener) - return () => signal.removeListener('abort', listener) -} - -const hasToWellFormed = typeof String.prototype.toWellFormed === 'function' -const hasIsWellFormed = typeof String.prototype.isWellFormed === 'function' - -/** - * @param {string} val - */ -function toUSVString (val) { - return hasToWellFormed ? `${val}`.toWellFormed() : nodeUtil.toUSVString(val) -} - -/** - * @param {string} val - */ -// TODO: move this to webidl -function isUSVString (val) { - return hasIsWellFormed ? `${val}`.isWellFormed() : toUSVString(val) === `${val}` -} - -/** - * @see https://tools.ietf.org/html/rfc7230#section-3.2.6 - * @param {number} c - */ -function isTokenCharCode (c) { - switch (c) { - case 0x22: - case 0x28: - case 0x29: - case 0x2c: - case 0x2f: - case 0x3a: - case 0x3b: - case 0x3c: - case 0x3d: - case 0x3e: - case 0x3f: - case 0x40: - case 0x5b: - case 0x5c: - case 0x5d: - case 0x7b: - case 0x7d: - // DQUOTE and "(),/:;<=>?@[\]{}" - return false - default: - // VCHAR %x21-7E - return c >= 0x21 && c <= 0x7e - } -} - -/** - * @param {string} characters - */ -function isValidHTTPToken (characters) { - if (characters.length === 0) { - return false - } - for (let i = 0; i < characters.length; ++i) { - if (!isTokenCharCode(characters.charCodeAt(i))) { - return false - } - } - return true -} - -// headerCharRegex have been lifted from -// https://github.com/nodejs/node/blob/main/lib/_http_common.js - -/** - * 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]/ - -/** - * @param {string} characters - */ -function isValidHeaderValue (characters) { - return !headerCharRegex.test(characters) -} - -// Parsed accordingly to RFC 9110 -// https://www.rfc-editor.org/rfc/rfc9110#field.content-range -function parseRangeHeader (range) { - if (range == null || range === '') return { start: 0, end: null, size: null } - - const m = range ? range.match(/^bytes (\d+)-(\d+)\/(\d+)?$/) : null - return m - ? { - start: parseInt(m[1]), - end: m[2] ? parseInt(m[2]) : null, - size: m[3] ? parseInt(m[3]) : null - } - : null -} - -function addListener (obj, name, listener) { - const listeners = (obj[kListeners] ??= []) - listeners.push([name, listener]) - obj.on(name, listener) - return obj -} - -function removeAllListeners (obj) { - for (const [name, listener] of obj[kListeners] ?? []) { - obj.removeListener(name, listener) - } - obj[kListeners] = null -} - -function errorRequest (client, request, err) { - try { - request.onError(err) - assert(request.aborted) - } catch (err) { - client.emit('error', err) - } -} - -const kEnumerableProperty = Object.create(null) -kEnumerableProperty.enumerable = true - -const normalizedMethodRecordsBase = { - delete: 'DELETE', - DELETE: 'DELETE', - get: 'GET', - GET: 'GET', - head: 'HEAD', - HEAD: 'HEAD', - options: 'OPTIONS', - OPTIONS: 'OPTIONS', - post: 'POST', - POST: 'POST', - put: 'PUT', - PUT: 'PUT' -} - -const normalizedMethodRecords = { - ...normalizedMethodRecordsBase, - patch: 'patch', - PATCH: 'PATCH' -} - -// Note: object prototypes should not be able to be referenced. e.g. `Object#hasOwnProperty`. -Object.setPrototypeOf(normalizedMethodRecordsBase, null) -Object.setPrototypeOf(normalizedMethodRecords, null) - -module.exports = { - kEnumerableProperty, - nop, - isDisturbed, - isErrored, - isReadable, - toUSVString, - isUSVString, - isBlobLike, - parseOrigin, - parseURL, - getServerName, - isStream, - isIterable, - isAsyncIterable, - isDestroyed, - headerNameToString, - bufferToLowerCasedHeaderName, - addListener, - removeAllListeners, - errorRequest, - parseRawHeaders, - parseHeaders, - parseKeepAliveTimeout, - destroy, - bodyLength, - deepClone, - ReadableStreamFrom, - isBuffer, - validateHandler, - getSocketInfo, - isFormDataLike, - buildURL, - addAbortListener, - isValidHTTPToken, - isValidHeaderValue, - isTokenCharCode, - parseRangeHeader, - normalizedMethodRecordsBase, - normalizedMethodRecords, - isValidPort, - isHttpOrHttpsPrefixed, - nodeMajor, - nodeMinor, - safeHTTPMethods: ['GET', 'HEAD', 'OPTIONS', 'TRACE'], - wrapRequestBody -} diff --git a/node_modules/cheerio/node_modules/undici/lib/dispatcher/fixed-queue.js b/node_modules/cheerio/node_modules/undici/lib/dispatcher/fixed-queue.js deleted file mode 100644 index 3572681..0000000 --- a/node_modules/cheerio/node_modules/undici/lib/dispatcher/fixed-queue.js +++ /dev/null @@ -1,117 +0,0 @@ -/* 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/cheerio/node_modules/undici/lib/global.js b/node_modules/cheerio/node_modules/undici/lib/global.js deleted file mode 100644 index 0c7528f..0000000 --- a/node_modules/cheerio/node_modules/undici/lib/global.js +++ /dev/null @@ -1,32 +0,0 @@ -'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('./dispatcher/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/cheerio/node_modules/undici/lib/handler/decorator-handler.js b/node_modules/cheerio/node_modules/undici/lib/handler/decorator-handler.js deleted file mode 100644 index 26f220c..0000000 --- a/node_modules/cheerio/node_modules/undici/lib/handler/decorator-handler.js +++ /dev/null @@ -1,44 +0,0 @@ -'use strict' - -module.exports = class DecoratorHandler { - #handler - - constructor (handler) { - if (typeof handler !== 'object' || handler === null) { - throw new TypeError('handler must be an object') - } - this.#handler = handler - } - - onConnect (...args) { - return this.#handler.onConnect?.(...args) - } - - onError (...args) { - return this.#handler.onError?.(...args) - } - - onUpgrade (...args) { - return this.#handler.onUpgrade?.(...args) - } - - onResponseStarted (...args) { - return this.#handler.onResponseStarted?.(...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/cheerio/node_modules/undici/lib/interceptor/redirect.js b/node_modules/cheerio/node_modules/undici/lib/interceptor/redirect.js deleted file mode 100644 index d2e789d..0000000 --- a/node_modules/cheerio/node_modules/undici/lib/interceptor/redirect.js +++ /dev/null @@ -1,24 +0,0 @@ -'use strict' -const RedirectHandler = require('../handler/redirect-handler') - -module.exports = opts => { - const globalMaxRedirections = opts?.maxRedirections - return dispatch => { - return function redirectInterceptor (opts, handler) { - const { maxRedirections = globalMaxRedirections, ...baseOpts } = opts - - if (!maxRedirections) { - return dispatch(opts, handler) - } - - const redirectHandler = new RedirectHandler( - dispatch, - maxRedirections, - opts, - handler - ) - - return dispatch(baseOpts, redirectHandler) - } - } -} diff --git a/node_modules/cheerio/node_modules/undici/lib/interceptor/response-error.js b/node_modules/cheerio/node_modules/undici/lib/interceptor/response-error.js deleted file mode 100644 index 3ded9c8..0000000 --- a/node_modules/cheerio/node_modules/undici/lib/interceptor/response-error.js +++ /dev/null @@ -1,86 +0,0 @@ -'use strict' - -const { parseHeaders } = require('../core/util') -const DecoratorHandler = require('../handler/decorator-handler') -const { ResponseError } = require('../core/errors') - -class Handler extends DecoratorHandler { - #handler - #statusCode - #contentType - #decoder - #headers - #body - - constructor (opts, { handler }) { - super(handler) - this.#handler = handler - } - - onConnect (abort) { - this.#statusCode = 0 - this.#contentType = null - this.#decoder = null - this.#headers = null - this.#body = '' - - return this.#handler.onConnect(abort) - } - - onHeaders (statusCode, rawHeaders, resume, statusMessage, headers = parseHeaders(rawHeaders)) { - this.#statusCode = statusCode - this.#headers = headers - this.#contentType = headers['content-type'] - - if (this.#statusCode < 400) { - return this.#handler.onHeaders(statusCode, rawHeaders, resume, statusMessage, headers) - } - - if (this.#contentType === 'application/json' || this.#contentType === 'text/plain') { - this.#decoder = new TextDecoder('utf-8') - } - } - - onData (chunk) { - if (this.#statusCode < 400) { - return this.#handler.onData(chunk) - } - - this.#body += this.#decoder?.decode(chunk, { stream: true }) ?? '' - } - - onComplete (rawTrailers) { - if (this.#statusCode >= 400) { - this.#body += this.#decoder?.decode(undefined, { stream: false }) ?? '' - - if (this.#contentType === 'application/json') { - try { - this.#body = JSON.parse(this.#body) - } catch { - // Do nothing... - } - } - - let err - const stackTraceLimit = Error.stackTraceLimit - Error.stackTraceLimit = 0 - try { - err = new ResponseError('Response Error', this.#statusCode, this.#headers, this.#body) - } finally { - Error.stackTraceLimit = stackTraceLimit - } - - this.#handler.onError(err) - } else { - this.#handler.onComplete(rawTrailers) - } - } - - onError (err) { - this.#handler.onError(err) - } -} - -module.exports = (dispatch) => (opts, handler) => opts.throwOnError - ? dispatch(opts, new Handler(opts, { handler })) - : dispatch(opts, handler) diff --git a/node_modules/cheerio/node_modules/undici/lib/llhttp/constants.js b/node_modules/cheerio/node_modules/undici/lib/llhttp/constants.js deleted file mode 100644 index fb0b5a2..0000000 --- a/node_modules/cheerio/node_modules/undici/lib/llhttp/constants.js +++ /dev/null @@ -1,278 +0,0 @@ -"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/cheerio/node_modules/undici/lib/llhttp/llhttp-wasm.js b/node_modules/cheerio/node_modules/undici/lib/llhttp/llhttp-wasm.js deleted file mode 100644 index 8ac8481..0000000 --- a/node_modules/cheerio/node_modules/undici/lib/llhttp/llhttp-wasm.js +++ /dev/null @@ -1,5 +0,0 @@ -'use strict' - -const { Buffer } = require('node:buffer') - -module.exports = Buffer.from('AGFzbQEAAAABJwdgAX8Bf2ADf39/AX9gAX8AYAJ/fwBgBH9/f38Bf2AAAGADf39/AALLAQgDZW52GHdhc21fb25faGVhZGVyc19jb21wbGV0ZQAEA2VudhV3YXNtX29uX21lc3NhZ2VfYmVnaW4AAANlbnYLd2FzbV9vbl91cmwAAQNlbnYOd2FzbV9vbl9zdGF0dXMAAQNlbnYUd2FzbV9vbl9oZWFkZXJfZmllbGQAAQNlbnYUd2FzbV9vbl9oZWFkZXJfdmFsdWUAAQNlbnYMd2FzbV9vbl9ib2R5AAEDZW52GHdhc21fb25fbWVzc2FnZV9jb21wbGV0ZQAAAy0sBQYAAAIAAAAAAAACAQIAAgICAAADAAAAAAMDAwMBAQEBAQEBAQEAAAIAAAAEBQFwARISBQMBAAIGCAF/AUGA1AQLB9EFIgZtZW1vcnkCAAtfaW5pdGlhbGl6ZQAIGV9faW5kaXJlY3RfZnVuY3Rpb25fdGFibGUBAAtsbGh0dHBfaW5pdAAJGGxsaHR0cF9zaG91bGRfa2VlcF9hbGl2ZQAvDGxsaHR0cF9hbGxvYwALBm1hbGxvYwAxC2xsaHR0cF9mcmVlAAwEZnJlZQAMD2xsaHR0cF9nZXRfdHlwZQANFWxsaHR0cF9nZXRfaHR0cF9tYWpvcgAOFWxsaHR0cF9nZXRfaHR0cF9taW5v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IQMgASAERg2hAiACKAIAIgAgBCABa2ohBSABIABrQQJqIQYCQANAIAEtAAAgAEGOzwBqLQAARw1kIABBAkYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAyiAgsgAkEANgIAIAZBAWohAUECDGULQYwBIQMgASAERg2gAiACKAIAIgAgBCABa2ohBSABIABrQQFqIQYCQANAIAEtAAAgAEHwzwBqLQAARw1jIABBAUYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAyhAgsgAkEANgIAIAZBAWohAUEfDGQLQY0BIQMgASAERg2fAiACKAIAIgAgBCABa2ohBSABIABrQQFqIQYCQANAIAEtAAAgAEHyzwBqLQAARw1iIABBAUYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAygAgsgAkEANgIAIAZBAWohAUEJDGMLIAEgBEYEQEGOASEDDJ8CCwJAAkAgAS0AAEHJAGsOBwBiYmJiYgFiCyABQQFqIQFB+AAhAwyGAgsgAUEBaiEBQfkAIQMMhQILQY8BIQMgASAERg2dAiACKAIAIgAgBCABa2ohBSABIABrQQVqIQYCQANAIAEtAAAgAEGRzwBqLQAARw1gIABBBUYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAyeAgsgAkEANgIAIAZBAWohAUEYDGELQZABIQMgASAERg2cAiACKAIAIgAgBCABa2ohBSABIABrQQJqIQYCQANAIAEtAAAgAEGXzwBqLQAARw1fIABBAkYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAydAgsgAkEANgIAIAZBAWohAUEXDGALQZEBIQMgASAERg2bAiACKAIAIgAgBCABa2ohBSABIABrQQZqIQYCQANAIAEtAAAgAEGazwBqLQAARw1eIABBBkYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAycAgsgAkEANgIAIAZBAWohAUEVDF8LQZIBIQMgASAERg2aAiACKAIAIgAgBCABa2ohBSABIABrQQVqIQYCQANAIAEtAAAgAEGhzwBqLQAARw1dIABBBUYNASAAQQFqIQAgB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EANgIEIAIgACABECUiAEUNByACQeUANgIcIAIgATYCFCACIAA2AgxBACEDDKoBCyACKAIEIQAgAkEANgIEIAIgACABECUiAEUNFiACQdMANgIcIAIgATYCFCACIAA2AgxBACEDDKkBCyACKAIEIQAgAkEANgIEIAIgACABECUiAEUNGCACQdIANgIcIAIgATYCFCACIAA2AgxBACEDDKgBCyACQQA2AhwgAiABNgIUIAJBxgo2AhAgAkEHNgIMQQAhAwynAQsgAigCBCEAIAJBADYCBCACIAAgARAlIgBFDQMgAkHlADYCHCACIAE2AhQgAiAANgIMQQAhAwymAQsgAigCBCEAIAJBADYCBCACIAAgARAlIgBFDRIgAkHTADYCHCACIAE2AhQgAiAANgIMQQAhAwylAQsgAigCBCEAIAJBADYCBCACIAAgARAlIgBFDRQgAkHSADYCHCACIAE2AhQgAiAANgIMQQAhAwykAQsgAigCBCEAIAJBADYCBCACIAAgARAlIgBFDQAgAkHlADYCHCACIAE2AhQgAiAANgIMQQAhAwyjAQtB1QAhAwyJAQsgAEEVRwRAIAJBADYCHCACIAE2AhQgAkG5DTYCECACQRo2AgxBACEDDKIBCyACQeQANgIcIAIgATYCFCACQeMXNgIQIAJBFTYCDEEAIQMMoQELIAJBADYCACAGQQFqIQEgAi0AKSIAQSNrQQtJDQQCQCAAQQZLDQBBASAAdEHKAHFFDQAMBQtBACEDIAJBADYCHCACIAE2AhQgAkH3CTYCECACQQg2AgwMoAELIAJBADYCACAGQQFqIQEgAi0AKUEhRg0DIAJBADYCHCACIAE2AhQgAkGbCjYCECACQQg2AgxBACEDDJ8BCyACQQA2AgALQQAhAyACQQA2AhwgAiABNgIUIAJBkDM2AhAgAkEINgIMDJ0BCyACQQA2AgAgBkEBaiEBIAItAClBI0kNACACQQA2AhwgAiABNgIUIAJB0wk2AhAgAkEINgIMQQAhAwycAQtB0QAhAwyCAQsgAS0AAEEwayIAQf8BcUEKSQRAIAIgADoAKiABQQFqIQFBzwAhAwyCAQsgAigCBCEAIAJBADYCBCACIAAgARAoIg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MDAwAAAAAAAAMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAEH6zAALBAEAAAEAQZDNAAsBAQBBms0ACwYCAAAAAAIAQbHNAAs6AwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMAAAAAAAADAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwBB8M4AC5YBTk9VTkNFRUNLT1VUTkVDVEVURUNSSUJFTFVTSEVURUFEU0VBUkNIUkdFQ1RJVklUWUxFTkRBUlZFT1RJRllQVElPTlNDSFNFQVlTVEFUQ0hHRU9SRElSRUNUT1JUUkNIUEFSQU1FVEVSVVJDRUJTQ1JJQkVBUkRPV05BQ0VJTkROS0NLVUJTQ1JJQkVIVFRQL0FEVFAv', 'base64') diff --git a/node_modules/cheerio/node_modules/undici/lib/llhttp/llhttp_simd-wasm.js b/node_modules/cheerio/node_modules/undici/lib/llhttp/llhttp_simd-wasm.js deleted file mode 100644 index 3ee8132..0000000 --- a/node_modules/cheerio/node_modules/undici/lib/llhttp/llhttp_simd-wasm.js +++ /dev/null @@ -1,5 +0,0 @@ -'use strict' - -const { Buffer } = require('node:buffer') - -module.exports = Buffer.from('AGFzbQEAAAABJwdgAX8Bf2ADf39/AX9gAX8AYAJ/fwBgBH9/f38Bf2AAAGADf39/AALLAQgDZW52GHdhc21fb25faGVhZGVyc19jb21wbGV0ZQAEA2VudhV3YXNtX29uX21lc3NhZ2VfYmVnaW4AAANlbnYLd2FzbV9vbl91cmwAAQNlbnYOd2FzbV9vbl9zdGF0dXMAAQNlbnYUd2FzbV9vbl9oZWFkZXJfZmllbGQAAQNlbnYUd2FzbV9vbl9oZWFkZXJfdmFsdWUAAQNlbnYMd2FzbV9vbl9ib2R5AAEDZW52GHdhc21fb25fbWVzc2FnZV9jb21wbGV0ZQAAAy0sBQYAAAIAAAAAAAACAQIAAgICAAADAAAAAAMDAwMBAQEBAQEBAQEAAAIAAAAEBQFwARISBQMBAAIGCAF/AUGA1AQLB9EFIgZtZW1vcn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gQgAiAAIAEQJSIARQ0dIAJB0wA2AhwgAiABNgIUIAIgADYCDEEAIQMMsAELIAIoAgQhACACQQA2AgQgAiAAIAEQJSIARQ0fIAJB0gA2AhwgAiABNgIUIAIgADYCDEEAIQMMrwELIABBP0cNASABQQFqCyEBQQUhAwyUAQtBACEDIAJBADYCHCACIAE2AhQgAkH9EjYCECACQQc2AgwMrAELIAJBADYCHCACIAE2AhQgAkHcCDYCECACQQc2AgxBACEDDKsBCyACKAIEIQAgAkEANgIEIAIgACABECUiAEUNByACQeUANgIcIAIgATYCFCACIAA2AgxBACEDDKoBCyACKAIEIQAgAkEANgIEIAIgACABECUiAEUNFiACQdMANgIcIAIgATYCFCACIAA2AgxBACEDDKkBCyACKAIEIQAgAkEANgIEIAIgACABECUiAEUNGCACQdIANgIcIAIgATYCFCACIAA2AgxBACEDDKgBCyACQQA2AhwgAiABNgIUIAJBxgo2AhAgAkEHNgIMQQAhAwynAQsgAigCBCEAIAJBADYCBCACIAAgARAlIgBFDQMgAkHlADYCHCACIAE2AhQgAiAANgIMQQAhAwymAQsgAigCBCEAIAJBADYCBCACIAAgARAlIgBFDRIgAkHTADYCHCACIAE2AhQgAiAANgIMQQAhAwylAQsgAigCBCEAIAJBADYCBCACIAAgARAlIgBFDRQgAkHSADYCHCACIAE2AhQgAiAANgIMQQAhAwykAQsgAigCBCEAIAJBADYCBCACIAAgARAlIgBFDQAgAkHlADYCHCACIAE2AhQgAiAANgIMQQAhAwyjAQtB1QAhAwyJAQsgAEEVRwRAIAJBADYCHCACIAE2AhQgAkG5DTYCECACQRo2AgxBACEDDKIBCyACQeQANgIcIAIgATYCFCACQeMXNgIQIAJBFTYCDEEAIQMMoQELIAJBADYCACAGQQFqIQEgAi0AKSIAQSNrQQtJDQQCQCAAQQZLDQBBASAAdEHKAHFFDQAMBQtBACEDIAJBADYCHCACIAE2AhQgAkH3CTYCECACQQg2AgwMoAELIAJBADYCACAGQQFqIQEgAi0AKUEhRg0DIAJBADYCHCACIAE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EBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQBB+sgACwQBAAACAEGQyQALXwMEAAAEBAQEBAQEBAQEBAUEBAQEBAQEBAQEBAQABAAGBwQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAAEAAQABAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQAAAAEAEH6ygALBAEAAAEAQZDLAAsBAQBBqssAC0ECAAAAAAAAAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMAAAAAAAADAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwBB+swACwQBAAABAEGQzQALAQEAQZrNAAsGAgAAAAACAEGxzQALOgMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAAAAAAAAAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMAQfDOAAuWAU5PVU5DRUVDS09VVE5FQ1RFVEVDUklCRUxVU0hFVEVBRFNFQVJDSFJHRUNUSVZJVFlMRU5EQVJWRU9USUZZUFRJT05TQ0hTRUFZU1RBVENIR0VPUkRJUkVDVE9SVFJDSFBBUkFNRVRFUlVSQ0VCU0NSSUJFQVJET1dOQUNFSU5ETktDS1VCU0NSSUJFSFRUUC9BRFRQLw==', 'base64') diff --git a/node_modules/cheerio/node_modules/undici/lib/llhttp/utils.js b/node_modules/cheerio/node_modules/undici/lib/llhttp/utils.js deleted file mode 100644 index 8a32e56..0000000 --- a/node_modules/cheerio/node_modules/undici/lib/llhttp/utils.js +++ /dev/null @@ -1,15 +0,0 @@ -"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/cheerio/node_modules/undici/lib/mock/mock-agent.js b/node_modules/cheerio/node_modules/undici/lib/mock/mock-agent.js deleted file mode 100644 index c02ee37..0000000 --- a/node_modules/cheerio/node_modules/undici/lib/mock/mock-agent.js +++ /dev/null @@ -1,160 +0,0 @@ -'use strict' - -const { kClients } = require('../core/symbols') -const Agent = require('../dispatcher/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/dispatcher') -const Pluralizer = require('./pluralizer') -const PendingInterceptorsFormatter = require('./pending-interceptors-formatter') - -class MockAgent extends Dispatcher { - constructor (opts) { - super(opts) - - this[kNetConnect] = true - this[kIsMockActive] = true - - // Instantiate Agent and encapsulate - if ((opts?.agent && typeof opts.agent.dispatch !== 'function')) { - throw new InvalidArgumentError('Argument opts.agent must implement Agent') - } - const agent = 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, 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 client = this[kClients].get(origin) - if (client) { - return client - } - - // 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, nonExplicitDispatcher] of Array.from(this[kClients])) { - 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[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/cheerio/node_modules/undici/lib/mock/mock-client.js b/node_modules/cheerio/node_modules/undici/lib/mock/mock-client.js deleted file mode 100644 index c375dbd..0000000 --- a/node_modules/cheerio/node_modules/undici/lib/mock/mock-client.js +++ /dev/null @@ -1,59 +0,0 @@ -'use strict' - -const { promisify } = require('node:util') -const Client = require('../dispatcher/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/cheerio/node_modules/undici/lib/mock/mock-errors.js b/node_modules/cheerio/node_modules/undici/lib/mock/mock-errors.js deleted file mode 100644 index 5442c0e..0000000 --- a/node_modules/cheerio/node_modules/undici/lib/mock/mock-errors.js +++ /dev/null @@ -1,17 +0,0 @@ -'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/cheerio/node_modules/undici/lib/mock/mock-interceptor.js b/node_modules/cheerio/node_modules/undici/lib/mock/mock-interceptor.js deleted file mode 100644 index c6b16b3..0000000 --- a/node_modules/cheerio/node_modules/undici/lib/mock/mock-interceptor.js +++ /dev/null @@ -1,207 +0,0 @@ -'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/web/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 (replyParameters) { - if (typeof replyParameters.statusCode === 'undefined') { - throw new InvalidArgumentError('statusCode must be defined') - } - if (typeof replyParameters.responseOptions !== 'object' || replyParameters.responseOptions === null) { - throw new InvalidArgumentError('responseOptions must be an object') - } - } - - /** - * Mock an undici request with a defined reply. - */ - reply (replyOptionsCallbackOrStatusCode) { - // Values of reply aren't available right now as they - // can only be available when the reply callback is invoked. - if (typeof replyOptionsCallbackOrStatusCode === '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 = replyOptionsCallbackOrStatusCode(opts) - - // Check if it is in the right format - if (typeof resolvedData !== 'object' || resolvedData === null) { - throw new InvalidArgumentError('reply options callback must return an object') - } - - const replyParameters = { data: '', responseOptions: {}, ...resolvedData } - this.validateReplyParameters(replyParameters) - // Since the values can be obtained immediately we return them - // from this higher order function that will be resolved later. - return { - ...this.createMockScopeDispatchData(replyParameters) - } - } - - // 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 replyParameters = { - statusCode: replyOptionsCallbackOrStatusCode, - data: arguments[1] === undefined ? '' : arguments[1], - responseOptions: arguments[2] === undefined ? {} : arguments[2] - } - this.validateReplyParameters(replyParameters) - - // Send in-already provided data like usual - const dispatchData = this.createMockScopeDispatchData(replyParameters) - 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/cheerio/node_modules/undici/lib/mock/mock-pool.js b/node_modules/cheerio/node_modules/undici/lib/mock/mock-pool.js deleted file mode 100644 index 8b005d7..0000000 --- a/node_modules/cheerio/node_modules/undici/lib/mock/mock-pool.js +++ /dev/null @@ -1,59 +0,0 @@ -'use strict' - -const { promisify } = require('node:util') -const Pool = require('../dispatcher/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/cheerio/node_modules/undici/lib/mock/mock-symbols.js b/node_modules/cheerio/node_modules/undici/lib/mock/mock-symbols.js deleted file mode 100644 index 8c4cbb6..0000000 --- a/node_modules/cheerio/node_modules/undici/lib/mock/mock-symbols.js +++ /dev/null @@ -1,23 +0,0 @@ -'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/cheerio/node_modules/undici/lib/mock/mock-utils.js b/node_modules/cheerio/node_modules/undici/lib/mock/mock-utils.js deleted file mode 100644 index 8f18db3..0000000 --- a/node_modules/cheerio/node_modules/undici/lib/mock/mock-utils.js +++ /dev/null @@ -1,367 +0,0 @@ -'use strict' - -const { MockNotMatchedError } = require('./mock-errors') -const { - kDispatches, - kMockAgent, - kOriginalDispatch, - kOrigin, - kGetNetConnect -} = require('./mock-symbols') -const { buildURL } = require('../core/util') -const { STATUS_CODES } = require('node:http') -const { - types: { - isPromise - } -} = require('node: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 (data instanceof Uint8Array) { - return data - } else if (data instanceof ArrayBuffer) { - 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}' on path '${resolvedPath}'`) - } - - // 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}' on path '${resolvedPath}'`) - } - - // Match headers - matchedMockDispatches = matchedMockDispatches.filter((mockDispatch) => matchHeaders(mockDispatch, key.headers)) - if (matchedMockDispatches.length === 0) { - const headers = typeof key.headers === 'object' ? JSON.stringify(key.headers) : key.headers - throw new MockNotMatchedError(`Mock dispatch not matched for headers '${headers}' on path '${resolvedPath}'`) - } - - 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) { - const keys = Object.keys(data) - const result = [] - for (let i = 0; i < keys.length; ++i) { - const key = keys[i] - const value = data[key] - const name = Buffer.from(`${key}`) - if (Array.isArray(value)) { - for (let j = 0; j < value.length; ++j) { - result.push(name, Buffer.from(`${value[j]}`)) - } - } else { - result.push(name, Buffer.from(`${value}`)) - } - } - return result -} - -/** - * @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.onConnect?.(err => handler.onError(err), null) - 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, - buildHeadersFromArray -} diff --git a/node_modules/cheerio/node_modules/undici/lib/mock/pending-interceptors-formatter.js b/node_modules/cheerio/node_modules/undici/lib/mock/pending-interceptors-formatter.js deleted file mode 100644 index ccca951..0000000 --- a/node_modules/cheerio/node_modules/undici/lib/mock/pending-interceptors-formatter.js +++ /dev/null @@ -1,43 +0,0 @@ -'use strict' - -const { Transform } = require('node:stream') -const { Console } = require('node:console') - -const PERSISTENT = process.versions.icu ? '✅' : 'Y ' -const NOT_PERSISTENT = process.versions.icu ? '❌' : 'N ' - -/** - * 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 ? PERSISTENT : NOT_PERSISTENT, - Invocations: timesInvoked, - Remaining: persist ? Infinity : times - timesInvoked - })) - - this.logger.table(withPrettyHeaders) - return this.transform.read().toString() - } -} diff --git a/node_modules/cheerio/node_modules/undici/lib/mock/pluralizer.js b/node_modules/cheerio/node_modules/undici/lib/mock/pluralizer.js deleted file mode 100644 index 47f150b..0000000 --- a/node_modules/cheerio/node_modules/undici/lib/mock/pluralizer.js +++ /dev/null @@ -1,29 +0,0 @@ -'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/cheerio/node_modules/undici/lib/web/cache/symbols.js b/node_modules/cheerio/node_modules/undici/lib/web/cache/symbols.js deleted file mode 100644 index 9271fb6..0000000 --- a/node_modules/cheerio/node_modules/undici/lib/web/cache/symbols.js +++ /dev/null @@ -1,5 +0,0 @@ -'use strict' - -module.exports = { - kConstruct: require('../../core/symbols').kConstruct -} diff --git a/node_modules/cheerio/node_modules/undici/lib/web/fetch/file.js b/node_modules/cheerio/node_modules/undici/lib/web/fetch/file.js deleted file mode 100644 index 31ba407..0000000 --- a/node_modules/cheerio/node_modules/undici/lib/web/fetch/file.js +++ /dev/null @@ -1,126 +0,0 @@ -'use strict' - -const { Blob, File } = require('node:buffer') -const { kState } = require('./symbols') -const { webidl } = require('./webidl') - -// TODO(@KhafraDev): remove -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' - } -} - -webidl.converters.Blob = webidl.interfaceConverter(Blob) - -// 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 ( - (object instanceof File) || - ( - object && - (typeof object.stream === 'function' || - typeof object.arrayBuffer === 'function') && - object[Symbol.toStringTag] === 'File' - ) - ) -} - -module.exports = { FileLike, isFileLike } diff --git a/node_modules/cheerio/node_modules/undici/lib/web/fetch/symbols.js b/node_modules/cheerio/node_modules/undici/lib/web/fetch/symbols.js deleted file mode 100644 index 32e360e..0000000 --- a/node_modules/cheerio/node_modules/undici/lib/web/fetch/symbols.js +++ /dev/null @@ -1,9 +0,0 @@ -'use strict' - -module.exports = { - kUrl: Symbol('url'), - kHeaders: Symbol('headers'), - kSignal: Symbol('signal'), - kState: Symbol('state'), - kDispatcher: Symbol('dispatcher') -} diff --git a/node_modules/cheerio/node_modules/undici/lib/web/fileapi/encoding.js b/node_modules/cheerio/node_modules/undici/lib/web/fileapi/encoding.js deleted file mode 100644 index 1d1d2b6..0000000 --- a/node_modules/cheerio/node_modules/undici/lib/web/fileapi/encoding.js +++ /dev/null @@ -1,290 +0,0 @@ -'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/cheerio/node_modules/undici/lib/web/fileapi/filereader.js b/node_modules/cheerio/node_modules/undici/lib/web/fileapi/filereader.js deleted file mode 100644 index ccebe69..0000000 --- a/node_modules/cheerio/node_modules/undici/lib/web/fileapi/filereader.js +++ /dev/null @@ -1,344 +0,0 @@ -'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, '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, '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, 'FileReader.readAsText') - - blob = webidl.converters.Blob(blob, { strict: false }) - - if (encoding !== undefined) { - encoding = webidl.converters.DOMString(encoding, 'FileReader.readAsText', '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, '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/cheerio/node_modules/undici/lib/web/fileapi/progressevent.js b/node_modules/cheerio/node_modules/undici/lib/web/fileapi/progressevent.js deleted file mode 100644 index 2d09d18..0000000 --- a/node_modules/cheerio/node_modules/undici/lib/web/fileapi/progressevent.js +++ /dev/null @@ -1,78 +0,0 @@ -'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, 'ProgressEvent constructor', '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/cheerio/node_modules/undici/lib/web/fileapi/symbols.js b/node_modules/cheerio/node_modules/undici/lib/web/fileapi/symbols.js deleted file mode 100644 index dd11746..0000000 --- a/node_modules/cheerio/node_modules/undici/lib/web/fileapi/symbols.js +++ /dev/null @@ -1,10 +0,0 @@ -'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/cheerio/node_modules/undici/lib/web/fileapi/util.js b/node_modules/cheerio/node_modules/undici/lib/web/fileapi/util.js deleted file mode 100644 index 9110b87..0000000 --- a/node_modules/cheerio/node_modules/undici/lib/web/fileapi/util.js +++ /dev/null @@ -1,391 +0,0 @@ -'use strict' - -const { - kState, - kError, - kResult, - kAborted, - kLastProgressEventFired -} = require('./symbols') -const { ProgressEvent } = require('./progressevent') -const { getEncoding } = require('./encoding') -const { serializeAMimeType, parseMIMEType } = require('../fetch/data-url') -const { types } = require('node:util') -const { StringDecoder } = require('string_decoder') -const { btoa } = require('node: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/cheerio/node_modules/undici/lib/web/websocket/constants.js b/node_modules/cheerio/node_modules/undici/lib/web/websocket/constants.js deleted file mode 100644 index 2019b5b..0000000 --- a/node_modules/cheerio/node_modules/undici/lib/web/websocket/constants.js +++ /dev/null @@ -1,66 +0,0 @@ -'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 sentCloseFrameState = { - NOT_SENT: 0, - PROCESSING: 1, - SENT: 2 -} - -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) - -const sendHints = { - string: 1, - typedArray: 2, - arrayBuffer: 3, - blob: 4 -} - -module.exports = { - uid, - sentCloseFrameState, - staticPropertyDescriptors, - states, - opcodes, - maxUnsigned16Bit, - parserStates, - emptyBuffer, - sendHints -} diff --git a/node_modules/cheerio/node_modules/undici/lib/web/websocket/symbols.js b/node_modules/cheerio/node_modules/undici/lib/web/websocket/symbols.js deleted file mode 100644 index 11d03e3..0000000 --- a/node_modules/cheerio/node_modules/undici/lib/web/websocket/symbols.js +++ /dev/null @@ -1,12 +0,0 @@ -'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/cheerio/node_modules/undici/package.json b/node_modules/cheerio/node_modules/undici/package.json deleted file mode 100644 index d7fab14..0000000 --- a/node_modules/cheerio/node_modules/undici/package.json +++ /dev/null @@ -1,160 +0,0 @@ -{ - "name": "undici", - "version": "6.21.2", - "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", - "contributors": [ - { - "name": "Daniele Belardi", - "url": "https://github.com/dnlup", - "author": true - }, - { - "name": "Ethan Arrowood", - "url": "https://github.com/ethan-arrowood", - "author": true - }, - { - "name": "Matteo Collina", - "url": "https://github.com/mcollina", - "author": true - }, - { - "name": "Matthew Aitken", - "url": "https://github.com/KhafraDev", - "author": true - }, - { - "name": "Robert Nagy", - "url": "https://github.com/ronag", - "author": true - }, - { - "name": "Szymon Marczak", - "url": "https://github.com/szmarczak", - "author": true - }, - { - "name": "Tomas Della Vedova", - "url": "https://github.com/delvedor", - "author": true - } - ], - "keywords": [ - "fetch", - "http", - "https", - "promise", - "request", - "curl", - "wget", - "xhr", - "whatwg" - ], - "main": "index.js", - "types": "index.d.ts", - "scripts": { - "build:node": "npx esbuild@0.19.10 index-fetch.js --bundle --platform=node --outfile=undici-fetch.js --define:esbuildDetection=1 --keep-names && node scripts/strip-comments.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:javascript && cross-env NODE_V8_COVERAGE= npm run test:typescript", - "test:javascript": "node scripts/generate-pem && npm run test:unit && npm run test:node-fetch && npm run test:cache && npm run test:interceptors && npm run test:fetch && npm run test:cookies && npm run test:eventsource && npm run test:wpt && npm run test:websocket && npm run test:node-test && npm run test:jest", - "test:javascript:withoutintl": "node scripts/generate-pem && npm run test:unit && npm run test:node-fetch && npm run test:fetch:nobuild && npm run test:cache && npm run test:interceptors && npm run test:cookies && npm run test:eventsource:nobuild && npm run test:wpt:withoutintl && npm run test:node-test", - "test:busboy": "borp -p \"test/busboy/*.js\"", - "test:cache": "borp -p \"test/cache/*.js\"", - "test:cookies": "borp -p \"test/cookie/*.js\"", - "test:eventsource": "npm run build:node && npm run test:eventsource:nobuild", - "test:eventsource:nobuild": "borp --expose-gc -p \"test/eventsource/*.js\"", - "test:fuzzing": "node test/fuzzing/fuzzing.test.js", - "test:fetch": "npm run build:node && npm run test:fetch:nobuild", - "test:fetch:nobuild": "borp --timeout 180000 --expose-gc --concurrency 1 -p \"test/fetch/*.js\" && npm run test:webidl && npm run test:busboy", - "test:h2": "npm run test:h2:core && npm run test:h2:fetch", - "test:h2:core": "borp -p \"test/http2*.js\"", - "test:h2:fetch": "npm run build:node && borp -p \"test/fetch/http2*.js\"", - "test:interceptors": "borp -p \"test/interceptors/*.js\"", - "test:jest": "cross-env NODE_V8_COVERAGE= jest", - "test:unit": "borp --expose-gc -p \"test/*.js\"", - "test:node-fetch": "borp -p \"test/node-fetch/**/*.js\"", - "test:node-test": "borp -p \"test/node-test/**/*.js\"", - "test:tdd": "borp --expose-gc -p \"test/*.js\"", - "test:tdd:node-test": "borp -p \"test/node-test/**/*.js\" -w", - "test:typescript": "tsd && tsc test/imports/undici-import.ts --typeRoots ./types && tsc ./types/*.d.ts --noEmit --typeRoots ./types", - "test:webidl": "borp -p \"test/webidl/*.js\"", - "test:websocket": "borp -p \"test/websocket/*.js\"", - "test:websocket:autobahn": "node test/autobahn/client.js", - "test:websocket:autobahn:report": "node test/autobahn/report.js", - "test:wpt": "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 test/wpt/start-websockets.mjs && node test/wpt/start-cacheStorage.mjs && node test/wpt/start-eventsource.mjs", - "test:wpt:withoutintl": "node test/wpt/start-fetch.mjs && node test/wpt/start-mimesniff.mjs && node test/wpt/start-xhr.mjs && node test/wpt/start-cacheStorage.mjs && node test/wpt/start-eventsource.mjs", - "coverage": "npm run coverage:clean && cross-env NODE_V8_COVERAGE=./coverage/tmp npm run test:javascript && npm run coverage:report", - "coverage:ci": "npm run coverage:clean && cross-env NODE_V8_COVERAGE=./coverage/tmp npm run test:javascript && npm run coverage:report:ci", - "coverage:clean": "node ./scripts/clean-coverage.js", - "coverage:report": "cross-env NODE_V8_COVERAGE= c8 report", - "coverage:report:ci": "c8 report", - "bench": "echo \"Error: Benchmarks have been moved to '/benchmarks'\" && exit 1", - "serve:website": "echo \"Error: Documentation has been moved to '/docs'\" && exit 1", - "prepare": "husky && node ./scripts/platform-shell.js" - }, - "devDependencies": { - "@fastify/busboy": "2.1.1", - "@matteo.collina/tspl": "^0.1.1", - "@sinonjs/fake-timers": "^11.1.0", - "@types/node": "~18.19.50", - "abort-controller": "^3.0.0", - "borp": "^0.15.0", - "c8": "^10.0.0", - "cross-env": "^7.0.3", - "dns-packet": "^5.4.0", - "fast-check": "^3.17.1", - "form-data": "^4.0.0", - "formdata-node": "^6.0.3", - "https-pem": "^3.0.0", - "husky": "^9.0.7", - "jest": "^29.0.2", - "jsdom": "^24.0.0", - "node-forge": "^1.3.1", - "pre-commit": "^1.2.2", - "proxy": "^2.1.1", - "snazzy": "^9.0.0", - "standard": "^17.0.0", - "tsd": "^0.31.0", - "typescript": "^5.0.2", - "ws": "^8.11.0" - }, - "engines": { - "node": ">=18.17" - }, - "standard": { - "env": [ - "jest" - ], - "ignore": [ - "lib/llhttp/constants.js", - "lib/llhttp/utils.js", - "test/fixtures/wpt" - ] - }, - "tsd": { - "directory": "test/types", - "compilerOptions": { - "esModuleInterop": true, - "lib": [ - "esnext" - ] - } - }, - "jest": { - "testMatch": [ - "<rootDir>/test/jest/**" - ] - } -} diff --git a/node_modules/cheerio/node_modules/undici/types/agent.d.ts b/node_modules/cheerio/node_modules/undici/types/agent.d.ts deleted file mode 100644 index 58081ce..0000000 --- a/node_modules/cheerio/node_modules/undici/types/agent.d.ts +++ /dev/null @@ -1,31 +0,0 @@ -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: string | 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/cheerio/node_modules/undici/types/api.d.ts b/node_modules/cheerio/node_modules/undici/types/api.d.ts deleted file mode 100644 index 400341d..0000000 --- a/node_modules/cheerio/node_modules/undici/types/api.d.ts +++ /dev/null @@ -1,43 +0,0 @@ -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/cheerio/node_modules/undici/types/balanced-pool.d.ts b/node_modules/cheerio/node_modules/undici/types/balanced-pool.d.ts deleted file mode 100644 index 7f930f4..0000000 --- a/node_modules/cheerio/node_modules/undici/types/balanced-pool.d.ts +++ /dev/null @@ -1,29 +0,0 @@ -import Pool from './pool' -import Dispatcher from './dispatcher' -import { URL } from 'url' - -export default BalancedPool - -type BalancedPoolConnectOptions = Omit<Dispatcher.ConnectOptions, "origin">; - -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; - - // Override dispatcher APIs. - override connect( - options: BalancedPoolConnectOptions - ): Promise<Dispatcher.ConnectData>; - override connect( - options: BalancedPoolConnectOptions, - callback: (err: Error | null, data: Dispatcher.ConnectData) => void - ): void; -} diff --git a/node_modules/cheerio/node_modules/undici/types/cache.d.ts b/node_modules/cheerio/node_modules/undici/types/cache.d.ts deleted file mode 100644 index 4c33335..0000000 --- a/node_modules/cheerio/node_modules/undici/types/cache.d.ts +++ /dev/null @@ -1,36 +0,0 @@ -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/cheerio/node_modules/undici/types/client.d.ts b/node_modules/cheerio/node_modules/undici/types/client.d.ts deleted file mode 100644 index d0a5379..0000000 --- a/node_modules/cheerio/node_modules/undici/types/client.d.ts +++ /dev/null @@ -1,108 +0,0 @@ -import { URL } from 'url' -import { TlsOptions } from 'tls' -import Dispatcher from './dispatcher' -import buildConnector from "./connector"; - -type ClientConnectOptions = Omit<Dispatcher.ConnectOptions, "origin">; - -/** - * 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; - - // Override dispatcher APIs. - override connect( - options: ClientConnectOptions - ): Promise<Dispatcher.ConnectData>; - override connect( - options: ClientConnectOptions, - callback: (err: Error | null, data: Dispatcher.ConnectData) => void - ): void; -} - -export declare namespace Client { - export interface OptionsInterceptors { - Client: readonly Dispatcher.DispatchInterceptor[]; - } - export interface Options { - /** TODO */ - interceptors?: OptionsInterceptors; - /** The maximum length of request headers in bytes. Default: Node.js' `--max-http-header-size` or `16384` (16KiB). */ - maxHeaderSize?: number; - /** The amount of time, in milliseconds, 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, in milliseconds, 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`, in milliseconds, when overridden by *keep-alive* hints from the server. Default: `600e3` milliseconds (10min). */ - keepAliveMaxTimeout?: number; - /** A number of milliseconds 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; - /** - * @description Enables support for H2 if the server has assigned bigger priority to it through ALPN negotiation. - * @default false - */ - allowH2?: boolean; - /** - * @description Dictates the maximum number of concurrent streams for a single H2 session. It can be overridden by a SETTINGS remote frame. - * @default 100 - */ - maxConcurrentStreams?: 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/cheerio/node_modules/undici/types/connector.d.ts b/node_modules/cheerio/node_modules/undici/types/connector.d.ts deleted file mode 100644 index bd92433..0000000 --- a/node_modules/cheerio/node_modules/undici/types/connector.d.ts +++ /dev/null @@ -1,34 +0,0 @@ -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) & { - allowH2?: boolean; - 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/cheerio/node_modules/undici/types/content-type.d.ts b/node_modules/cheerio/node_modules/undici/types/content-type.d.ts deleted file mode 100644 index f2a87f1..0000000 --- a/node_modules/cheerio/node_modules/undici/types/content-type.d.ts +++ /dev/null @@ -1,21 +0,0 @@ -/// <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/cheerio/node_modules/undici/types/cookies.d.ts b/node_modules/cheerio/node_modules/undici/types/cookies.d.ts deleted file mode 100644 index aa38cae..0000000 --- a/node_modules/cheerio/node_modules/undici/types/cookies.d.ts +++ /dev/null @@ -1,28 +0,0 @@ -/// <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/cheerio/node_modules/undici/types/diagnostics-channel.d.ts b/node_modules/cheerio/node_modules/undici/types/diagnostics-channel.d.ts deleted file mode 100644 index a037d1e..0000000 --- a/node_modules/cheerio/node_modules/undici/types/diagnostics-channel.d.ts +++ /dev/null @@ -1,66 +0,0 @@ -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: any; - } - 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/cheerio/node_modules/undici/types/dispatcher.d.ts b/node_modules/cheerio/node_modules/undici/types/dispatcher.d.ts deleted file mode 100644 index 1b4c9c7..0000000 --- a/node_modules/cheerio/node_modules/undici/types/dispatcher.d.ts +++ /dev/null @@ -1,256 +0,0 @@ -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; - /** Compose a chain of dispatchers */ - compose(dispatchers: Dispatcher.DispatcherComposeInterceptor[]): Dispatcher.ComposedDispatcher; - compose(...dispatchers: Dispatcher.DispatcherComposeInterceptor[]): Dispatcher.ComposedDispatcher; - /** 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 ComposedDispatcher extends Dispatcher {} - export type DispatcherComposeInterceptor = (dispatch: Dispatcher['dispatch']) => Dispatcher['dispatch']; - export interface DispatchOptions { - origin?: string | URL; - path: string; - method: HttpMethod; - /** Default: `null` */ - body?: string | Buffer | Uint8Array | Readable | null | FormData; - /** Default: `null` */ - headers?: IncomingHttpHeaders | string[] | Iterable<[string, string | string[] | undefined]> | 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, in milliseconds, 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; - /** For H2, it appends the expect: 100-continue header, and halts the request body until a 100-continue is received from the remote server*/ - expectContinue?: boolean; - } - export interface ConnectOptions { - origin: string | URL; - 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: false */ - redirectionLimitReached?: boolean; - /** 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: false */ - redirectionLimitReached?: boolean; - /** 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: false */ - redirectionLimitReached?: boolean; - /** 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: (err?: Error) => 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 response is received, before headers have been read. **/ - onResponseStarted?(): void; - /** Invoked when statusCode and headers have been received. May be invoked multiple times due to 1xx informational headers. */ - onHeaders?(statusCode: number, headers: Buffer[], resume: () => void, statusText: string): 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; - readonly bodyUsed: boolean; - arrayBuffer(): Promise<ArrayBuffer>; - blob(): Promise<Blob>; - bytes(): Promise<Uint8Array>; - formData(): Promise<never>; - json(): Promise<unknown>; - text(): Promise<string>; - } - - export interface DispatchInterceptor { - (dispatch: Dispatcher['dispatch']): Dispatcher['dispatch'] - } -} diff --git a/node_modules/cheerio/node_modules/undici/types/errors.d.ts b/node_modules/cheerio/node_modules/undici/types/errors.d.ts deleted file mode 100644 index f6fb73b..0000000 --- a/node_modules/cheerio/node_modules/undici/types/errors.d.ts +++ /dev/null @@ -1,149 +0,0 @@ -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'; - } - - export class RequestRetryError extends UndiciError { - constructor ( - message: string, - statusCode: number, - headers?: IncomingHttpHeaders | string[] | null, - body?: null | Record<string, any> | string - ); - name: 'RequestRetryError'; - code: 'UND_ERR_REQ_RETRY'; - statusCode: number; - data: { - count: number; - }; - headers: Record<string, string | string[]>; - } - - export class SecureProxyConnectionError extends UndiciError { - name: 'SecureProxyConnectionError'; - code: 'UND_ERR_PRX_TLS'; - } -} diff --git a/node_modules/cheerio/node_modules/undici/types/fetch.d.ts b/node_modules/cheerio/node_modules/undici/types/fetch.d.ts deleted file mode 100644 index 7e94375..0000000 --- a/node_modules/cheerio/node_modules/undici/types/fetch.d.ts +++ /dev/null @@ -1,209 +0,0 @@ -// 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 class BodyMixin { - readonly body: ReadableStream | null - readonly bodyUsed: boolean - - readonly arrayBuffer: () => Promise<ArrayBuffer> - readonly blob: () => Promise<Blob> - /** - * @deprecated This method is not recommended for parsing multipart/form-data bodies in server environments. - * It is recommended to use a library such as [@fastify/busboy](https://www.npmjs.com/package/@fastify/busboy) as follows: - * - * @example - * ```js - * import { Busboy } from '@fastify/busboy' - * import { Readable } from 'node:stream' - * - * const response = await fetch('...') - * const busboy = new Busboy({ headers: { 'content-type': response.headers.get('content-type') } }) - * - * // handle events emitted from `busboy` - * - * Readable.fromWeb(response.body).pipe(busboy) - * ``` - */ - 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]: () => SpecIterableIterator<[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 | null - redirect?: RequestRedirect - integrity?: string - signal?: AbortSignal | null - 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 extends 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 referrer: string - readonly referrerPolicy: ReferrerPolicy - readonly url: string - - readonly keepalive: boolean - readonly signal: AbortSignal - readonly duplex: RequestDuplex - - 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 extends 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 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/cheerio/node_modules/undici/types/file.d.ts b/node_modules/cheerio/node_modules/undici/types/file.d.ts deleted file mode 100644 index c695b7a..0000000 --- a/node_modules/cheerio/node_modules/undici/types/file.d.ts +++ /dev/null @@ -1,39 +0,0 @@ -// 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/cheerio/node_modules/undici/types/filereader.d.ts b/node_modules/cheerio/node_modules/undici/types/filereader.d.ts deleted file mode 100644 index d1c0f9e..0000000 --- a/node_modules/cheerio/node_modules/undici/types/filereader.d.ts +++ /dev/null @@ -1,54 +0,0 @@ -/// <reference types="node" /> - -import { Blob } from 'buffer' -import { DOMException, EventInit } 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/cheerio/node_modules/undici/types/formdata.d.ts b/node_modules/cheerio/node_modules/undici/types/formdata.d.ts deleted file mode 100644 index e676b11..0000000 --- a/node_modules/cheerio/node_modules/undici/types/formdata.d.ts +++ /dev/null @@ -1,108 +0,0 @@ -// Based on https://github.com/octet-stream/form-data/blob/2d0f0dc371517444ce1f22cdde13f51995d0953a/lib/FormData.ts (MIT) -/// <reference types="node" /> - -import { File } from './file' -import { 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/cheerio/node_modules/undici/types/global-dispatcher.d.ts b/node_modules/cheerio/node_modules/undici/types/global-dispatcher.d.ts deleted file mode 100644 index 728f95c..0000000 --- a/node_modules/cheerio/node_modules/undici/types/global-dispatcher.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -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/cheerio/node_modules/undici/types/global-origin.d.ts b/node_modules/cheerio/node_modules/undici/types/global-origin.d.ts deleted file mode 100644 index 322542d..0000000 --- a/node_modules/cheerio/node_modules/undici/types/global-origin.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -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/cheerio/node_modules/undici/types/handlers.d.ts b/node_modules/cheerio/node_modules/undici/types/handlers.d.ts deleted file mode 100644 index afcda9a..0000000 --- a/node_modules/cheerio/node_modules/undici/types/handlers.d.ts +++ /dev/null @@ -1,15 +0,0 @@ -import Dispatcher from "./dispatcher"; - -export declare class RedirectHandler implements Dispatcher.DispatchHandlers { - constructor( - dispatch: Dispatcher, - maxRedirections: number, - opts: Dispatcher.DispatchOptions, - handler: Dispatcher.DispatchHandlers, - redirectionLimitReached: boolean - ); -} - -export declare class DecoratorHandler implements Dispatcher.DispatchHandlers { - constructor(handler: Dispatcher.DispatchHandlers); -} diff --git a/node_modules/cheerio/node_modules/undici/types/header.d.ts b/node_modules/cheerio/node_modules/undici/types/header.d.ts deleted file mode 100644 index bfdb329..0000000 --- a/node_modules/cheerio/node_modules/undici/types/header.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -/** - * The header type declaration of `undici`. - */ -export type IncomingHttpHeaders = Record<string, string | string[] | undefined>; diff --git a/node_modules/cheerio/node_modules/undici/types/index.d.ts b/node_modules/cheerio/node_modules/undici/types/index.d.ts deleted file mode 100644 index f6be35c..0000000 --- a/node_modules/cheerio/node_modules/undici/types/index.d.ts +++ /dev/null @@ -1,71 +0,0 @@ -import Dispatcher from'./dispatcher' -import { setGlobalDispatcher, getGlobalDispatcher } from './global-dispatcher' -import { setGlobalOrigin, getGlobalOrigin } from './global-origin' -import Pool from'./pool' -import { RedirectHandler, DecoratorHandler } from './handlers' - -import BalancedPool from './balanced-pool' -import Client from'./client' -import buildConnector from'./connector' -import errors from'./errors' -import Agent from'./agent' -import MockClient from'./mock-client' -import MockPool from'./mock-pool' -import MockAgent from'./mock-agent' -import mockErrors from'./mock-errors' -import ProxyAgent from'./proxy-agent' -import EnvHttpProxyAgent from './env-http-proxy-agent' -import RetryHandler from'./retry-handler' -import RetryAgent from'./retry-agent' -import { request, pipeline, stream, connect, upgrade } from './api' -import interceptors from './interceptors' - -export * from './util' -export * from './cookies' -export * from './eventsource' -export * from './fetch' -export * from './file' -export * from './filereader' -export * from './formdata' -export * from './diagnostics-channel' -export * from './websocket' -export * from './content-type' -export * from './cache' -export { Interceptable } from './mock-interceptor' - -export { Dispatcher, BalancedPool, Pool, Client, buildConnector, errors, Agent, request, stream, pipeline, connect, upgrade, setGlobalDispatcher, getGlobalDispatcher, setGlobalOrigin, getGlobalOrigin, interceptors, MockClient, MockPool, MockAgent, mockErrors, ProxyAgent, EnvHttpProxyAgent, RedirectHandler, DecoratorHandler, RetryHandler, RetryAgent } -export default Undici - -declare namespace Undici { - var Dispatcher: typeof import('./dispatcher').default - var Pool: typeof import('./pool').default; - var RedirectHandler: typeof import ('./handlers').RedirectHandler - var DecoratorHandler: typeof import ('./handlers').DecoratorHandler - var RetryHandler: typeof import ('./retry-handler').default - var createRedirectInterceptor: typeof import ('./interceptors').default.createRedirectInterceptor - var BalancedPool: typeof import('./balanced-pool').default; - var Client: typeof import('./client').default; - var buildConnector: typeof import('./connector').default; - var errors: typeof import('./errors').default; - var Agent: typeof import('./agent').default; - var setGlobalDispatcher: typeof import('./global-dispatcher').setGlobalDispatcher; - var getGlobalDispatcher: typeof import('./global-dispatcher').getGlobalDispatcher; - var request: typeof import('./api').request; - var stream: typeof import('./api').stream; - var pipeline: typeof import('./api').pipeline; - var connect: typeof import('./api').connect; - var upgrade: typeof import('./api').upgrade; - var MockClient: typeof import('./mock-client').default; - var MockPool: typeof import('./mock-pool').default; - var MockAgent: typeof import('./mock-agent').default; - var mockErrors: typeof import('./mock-errors').default; - var fetch: typeof import('./fetch').fetch; - var Headers: typeof import('./fetch').Headers; - var Response: typeof import('./fetch').Response; - var Request: typeof import('./fetch').Request; - var FormData: typeof import('./formdata').FormData; - var File: typeof import('./file').File; - var FileReader: typeof import('./filereader').FileReader; - var caches: typeof import('./cache').caches; - var interceptors: typeof import('./interceptors').default; -} diff --git a/node_modules/cheerio/node_modules/undici/types/interceptors.d.ts b/node_modules/cheerio/node_modules/undici/types/interceptors.d.ts deleted file mode 100644 index 9f6af12..0000000 --- a/node_modules/cheerio/node_modules/undici/types/interceptors.d.ts +++ /dev/null @@ -1,32 +0,0 @@ -import { LookupOptions } from 'node:dns' - -import Dispatcher from "./dispatcher"; -import RetryHandler from "./retry-handler"; - -export default Interceptors; - -declare namespace Interceptors { - export type DumpInterceptorOpts = { maxSize?: number } - export type RetryInterceptorOpts = RetryHandler.RetryOptions - export type RedirectInterceptorOpts = { maxRedirections?: number } - export type ResponseErrorInterceptorOpts = { throwOnError: boolean } - - // DNS interceptor - export type DNSInterceptorRecord = { address: string, ttl: number, family: 4 | 6 } - export type DNSInterceptorOriginRecords = { 4: { ips: DNSInterceptorRecord[] } | null, 6: { ips: DNSInterceptorRecord[] } | null } - export type DNSInterceptorOpts = { - maxTTL?: number - maxItems?: number - lookup?: (hostname: string, options: LookupOptions, callback: (err: NodeJS.ErrnoException | null, addresses: DNSInterceptorRecord[]) => void) => void - pick?: (origin: URL, records: DNSInterceptorOriginRecords, affinity: 4 | 6) => DNSInterceptorRecord - dualStack?: boolean - affinity?: 4 | 6 - } - - export function createRedirectInterceptor(opts: RedirectInterceptorOpts): Dispatcher.DispatcherComposeInterceptor - export function dump(opts?: DumpInterceptorOpts): Dispatcher.DispatcherComposeInterceptor - export function retry(opts?: RetryInterceptorOpts): Dispatcher.DispatcherComposeInterceptor - export function redirect(opts?: RedirectInterceptorOpts): Dispatcher.DispatcherComposeInterceptor - export function responseError(opts?: ResponseErrorInterceptorOpts): Dispatcher.DispatcherComposeInterceptor - export function dns (opts?: DNSInterceptorOpts): Dispatcher.DispatcherComposeInterceptor -} diff --git a/node_modules/cheerio/node_modules/undici/types/mock-agent.d.ts b/node_modules/cheerio/node_modules/undici/types/mock-agent.d.ts deleted file mode 100644 index 98cd645..0000000 --- a/node_modules/cheerio/node_modules/undici/types/mock-agent.d.ts +++ /dev/null @@ -1,50 +0,0 @@ -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/cheerio/node_modules/undici/types/mock-client.d.ts b/node_modules/cheerio/node_modules/undici/types/mock-client.d.ts deleted file mode 100644 index 51d008c..0000000 --- a/node_modules/cheerio/node_modules/undici/types/mock-client.d.ts +++ /dev/null @@ -1,25 +0,0 @@ -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/cheerio/node_modules/undici/types/mock-errors.d.ts b/node_modules/cheerio/node_modules/undici/types/mock-errors.d.ts deleted file mode 100644 index 3d9e727..0000000 --- a/node_modules/cheerio/node_modules/undici/types/mock-errors.d.ts +++ /dev/null @@ -1,12 +0,0 @@ -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/cheerio/node_modules/undici/types/mock-interceptor.d.ts b/node_modules/cheerio/node_modules/undici/types/mock-interceptor.d.ts deleted file mode 100644 index 33f3f14..0000000 --- a/node_modules/cheerio/node_modules/undici/types/mock-interceptor.d.ts +++ /dev/null @@ -1,93 +0,0 @@ -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; - method: string; - headers?: Headers | Record<string, string>; - origin?: string; - body?: BodyInit | Dispatcher.DispatchOptions['body'] | null; - 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/cheerio/node_modules/undici/types/mock-pool.d.ts b/node_modules/cheerio/node_modules/undici/types/mock-pool.d.ts deleted file mode 100644 index 39e709a..0000000 --- a/node_modules/cheerio/node_modules/undici/types/mock-pool.d.ts +++ /dev/null @@ -1,25 +0,0 @@ -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/cheerio/node_modules/undici/types/patch.d.ts b/node_modules/cheerio/node_modules/undici/types/patch.d.ts deleted file mode 100644 index 4ac3845..0000000 --- a/node_modules/cheerio/node_modules/undici/types/patch.d.ts +++ /dev/null @@ -1,33 +0,0 @@ -/// <reference types="node" /> - -// See https://github.com/nodejs/undici/issues/1740 - -export type DOMException = typeof globalThis extends { DOMException: infer T } - ? T - : any - -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/cheerio/node_modules/undici/types/pool-stats.d.ts b/node_modules/cheerio/node_modules/undici/types/pool-stats.d.ts deleted file mode 100644 index 8b6d2bf..0000000 --- a/node_modules/cheerio/node_modules/undici/types/pool-stats.d.ts +++ /dev/null @@ -1,19 +0,0 @@ -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/cheerio/node_modules/undici/types/pool.d.ts b/node_modules/cheerio/node_modules/undici/types/pool.d.ts deleted file mode 100644 index bad5ba0..0000000 --- a/node_modules/cheerio/node_modules/undici/types/pool.d.ts +++ /dev/null @@ -1,39 +0,0 @@ -import Client from './client' -import TPoolStats from './pool-stats' -import { URL } from 'url' -import Dispatcher from "./dispatcher"; - -export default Pool - -type PoolConnectOptions = Omit<Dispatcher.ConnectOptions, "origin">; - -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; - - // Override dispatcher APIs. - override connect( - options: PoolConnectOptions - ): Promise<Dispatcher.ConnectData>; - override connect( - options: PoolConnectOptions, - callback: (err: Error | null, data: Dispatcher.ConnectData) => void - ): void; -} - -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/cheerio/node_modules/undici/types/proxy-agent.d.ts b/node_modules/cheerio/node_modules/undici/types/proxy-agent.d.ts deleted file mode 100644 index 32e3acb..0000000 --- a/node_modules/cheerio/node_modules/undici/types/proxy-agent.d.ts +++ /dev/null @@ -1,28 +0,0 @@ -import Agent from './agent' -import buildConnector from './connector'; -import Dispatcher from './dispatcher' -import { IncomingHttpHeaders } from './header' - -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/cheerio/node_modules/undici/types/readable.d.ts b/node_modules/cheerio/node_modules/undici/types/readable.d.ts deleted file mode 100644 index c4f052a..0000000 --- a/node_modules/cheerio/node_modules/undici/types/readable.d.ts +++ /dev/null @@ -1,65 +0,0 @@ -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<unknown> - - /** 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 Uint8Array - * https://fetch.spec.whatwg.org/#dom-body-bytes - */ - bytes(): Promise<Uint8Array> - - /** 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 - - /** - * 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/cheerio/node_modules/undici/types/retry-handler.d.ts b/node_modules/cheerio/node_modules/undici/types/retry-handler.d.ts deleted file mode 100644 index 6cb34c1..0000000 --- a/node_modules/cheerio/node_modules/undici/types/retry-handler.d.ts +++ /dev/null @@ -1,116 +0,0 @@ -import Dispatcher from "./dispatcher"; - -export default RetryHandler; - -declare class RetryHandler implements Dispatcher.DispatchHandlers { - constructor( - options: Dispatcher.DispatchOptions & { - retryOptions?: RetryHandler.RetryOptions; - }, - retryHandlers: RetryHandler.RetryHandlers - ); -} - -declare namespace RetryHandler { - export type RetryState = { counter: number; }; - - export type RetryContext = { - state: RetryState; - opts: Dispatcher.DispatchOptions & { - retryOptions?: RetryHandler.RetryOptions; - }; - } - - export type OnRetryCallback = (result?: Error | null) => void; - - export type RetryCallback = ( - err: Error, - context: { - state: RetryState; - opts: Dispatcher.DispatchOptions & { - retryOptions?: RetryHandler.RetryOptions; - }; - }, - callback: OnRetryCallback - ) => void - - export interface RetryOptions { - /** - * Callback to be invoked on every retry iteration. - * It receives the error, current state of the retry object and the options object - * passed when instantiating the retry handler. - * - * @type {RetryCallback} - * @memberof RetryOptions - */ - retry?: RetryCallback; - /** - * Maximum number of retries to allow. - * - * @type {number} - * @memberof RetryOptions - * @default 5 - */ - maxRetries?: number; - /** - * Max number of milliseconds allow between retries - * - * @type {number} - * @memberof RetryOptions - * @default 30000 - */ - maxTimeout?: number; - /** - * Initial number of milliseconds to wait before retrying for the first time. - * - * @type {number} - * @memberof RetryOptions - * @default 500 - */ - minTimeout?: number; - /** - * Factior to multiply the timeout factor between retries. - * - * @type {number} - * @memberof RetryOptions - * @default 2 - */ - timeoutFactor?: number; - /** - * It enables to automatically infer timeout between retries based on the `Retry-After` header. - * - * @type {boolean} - * @memberof RetryOptions - * @default true - */ - retryAfter?: boolean; - /** - * HTTP methods to retry. - * - * @type {Dispatcher.HttpMethod[]} - * @memberof RetryOptions - * @default ['GET', 'HEAD', 'OPTIONS', 'PUT', 'DELETE', 'TRACE'], - */ - methods?: Dispatcher.HttpMethod[]; - /** - * Error codes to be retried. e.g. `ECONNRESET`, `ENOTFOUND`, `ETIMEDOUT`, `ECONNREFUSED`, etc. - * - * @type {string[]} - * @default ['ECONNRESET','ECONNREFUSED','ENOTFOUND','ENETDOWN','ENETUNREACH','EHOSTDOWN','EHOSTUNREACH','EPIPE'] - */ - errorCodes?: string[]; - /** - * HTTP status codes to be retried. - * - * @type {number[]} - * @memberof RetryOptions - * @default [500, 502, 503, 504, 429], - */ - statusCodes?: number[]; - } - - export interface RetryHandlers { - dispatch: Dispatcher["dispatch"]; - handler: Dispatcher.DispatchHandlers; - } -} diff --git a/node_modules/cheerio/node_modules/undici/types/webidl.d.ts b/node_modules/cheerio/node_modules/undici/types/webidl.d.ts deleted file mode 100644 index fd83b68..0000000 --- a/node_modules/cheerio/node_modules/undici/types/webidl.d.ts +++ /dev/null @@ -1,228 +0,0 @@ -// 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, iterable?: IterableIterator<T>) => 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 - - /** - * Stringifies {@param V} - */ - Stringify (V: any): string - - /** - * Mark a value as uncloneable for Node.js. - * This is only effective in some newer Node.js versions. - */ - markAsUncloneable (V: any): void -} - -interface WebidlConverters { - /** - * @see https://webidl.spec.whatwg.org/#es-DOMString - */ - DOMString (V: unknown, prefix: string, argument: string, opts?: { - legacyNullToEmptyString: boolean - }): string - - /** - * @see https://webidl.spec.whatwg.org/#es-ByteString - */ - ByteString (V: unknown, prefix: string, argument: string): 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: string): void -} diff --git a/node_modules/cheerio/node_modules/undici/types/websocket.d.ts b/node_modules/cheerio/node_modules/undici/types/websocket.d.ts deleted file mode 100644 index dfdd815..0000000 --- a/node_modules/cheerio/node_modules/undici/types/websocket.d.ts +++ /dev/null @@ -1,150 +0,0 @@ -/// <reference types="node" /> - -import type { Blob } from 'buffer' -import type { MessagePort } from 'worker_threads' -import { - EventInit, - EventListenerOptions, - AddEventListenerOptions, - EventListenerOrEventListenerObject -} from './patch' -import Dispatcher from './dispatcher' -import { HeadersInit } from './fetch' - -export type BinaryType = 'blob' | 'arraybuffer' - -interface WebSocketEventMap { - close: CloseEvent - error: ErrorEvent - 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 ErrorEventInit extends EventInit { - message?: string - filename?: string - lineno?: number - colno?: number - error?: any -} - -interface ErrorEvent extends Event { - readonly message: string - readonly filename: string - readonly lineno: number - readonly colno: number - readonly error: any -} - -export declare const ErrorEvent: { - prototype: ErrorEvent - new (type: string, eventInitDict?: ErrorEventInit): ErrorEvent -} - -interface WebSocketInit { - protocols?: string | string[], - dispatcher?: Dispatcher, - headers?: HeadersInit -} diff --git a/node_modules/cheerio/package.json b/node_modules/cheerio/package.json deleted file mode 100644 index 8b6d414..0000000 --- a/node_modules/cheerio/package.json +++ /dev/null @@ -1,178 +0,0 @@ -{ - "name": "cheerio", - "version": "1.0.0", - "description": "The fast, flexible & elegant library for parsing and manipulating HTML and XML.", - "keywords": [ - "htmlparser", - "jquery", - "selector", - "scraper", - "parser", - "dom", - "xml", - "html" - ], - "homepage": "https://cheerio.js.org/", - "bugs": { - "url": "https://github.com/cheeriojs/cheerio/issues" - }, - "repository": { - "type": "git", - "url": "git://github.com/cheeriojs/cheerio.git" - }, - "funding": "https://github.com/cheeriojs/cheerio?sponsor=1", - "license": "MIT", - "author": "Matt Mueller <mattmuelle@gmail.com>", - "maintainers": [ - "Felix Boehm <me@feedic.com>" - ], - "type": "module", - "exports": { - ".": { - "browser": { - "types": "./dist/browser/index.d.ts", - "default": "./dist/browser/index.js" - }, - "import": { - "types": "./dist/esm/index.d.ts", - "default": "./dist/esm/index.js" - }, - "require": { - "types": "./dist/commonjs/index.d.ts", - "default": "./dist/commonjs/index.js" - } - }, - "./slim": { - "browser": { - "types": "./dist/browser/slim.d.ts", - "default": "./dist/browser/slim.js" - }, - "import": { - "types": "./dist/esm/slim.d.ts", - "default": "./dist/esm/slim.js" - }, - "require": { - "types": "./dist/commonjs/slim.d.ts", - "default": "./dist/commonjs/slim.js" - } - }, - "./utils": { - "browser": { - "types": "./dist/browser/utils.d.ts", - "default": "./dist/browser/utils.js" - }, - "import": { - "types": "./dist/esm/utils.d.ts", - "default": "./dist/esm/utils.js" - }, - "require": { - "types": "./dist/commonjs/utils.d.ts", - "default": "./dist/commonjs/utils.js" - } - }, - "./package.json": "./package.json" - }, - "main": "./dist/commonjs/index.js", - "module": "./dist/esm/index.js", - "types": "./dist/commonjs/index.d.ts", - "files": [ - "dist", - "src" - ], - "scripts": { - "benchmark": "node --import=tsx benchmark/benchmark.ts", - "build": "tshy", - "format": "npm run format:es && npm run format:prettier", - "format:es": "npm run lint:es -- --fix", - "format:prettier": "npm run format:prettier:raw -- --write", - "format:prettier:raw": "prettier \"**/*.{{m,c,}{j,t}s{x,},md{x,},json,y{a,}ml}\" --ignore-path .gitignore", - "lint": "npm run lint:es && npm run lint:prettier && npm run lint:ts", - "lint:es": "eslint --report-unused-disable-directives --ignore-path .gitignore .", - "lint:prettier": "npm run format:prettier:raw -- --check", - "lint:ts": "tsc --noEmit", - "prepare": "husky", - "prepublishOnly": "npm run build", - "test": "npm run lint && npm run test:vi", - "test:vi": "vitest run", - "update-sponsors": "tsx scripts/fetch-sponsors.mts" - }, - "lint-staged": { - "*.js": [ - "prettier --write", - "npm run lint:es -- --fix" - ], - "*.{json,md,ts,yml}": [ - "prettier --write" - ] - }, - "prettier": { - "plugins": [ - "./node_modules/prettier-plugin-jsdoc/dist/index.js" - ], - "proseWrap": "always", - "singleQuote": true, - "tabWidth": 2, - "tsdoc": true - }, - "dependencies": { - "cheerio-select": "^2.1.0", - "dom-serializer": "^2.0.0", - "domhandler": "^5.0.3", - "domutils": "^3.1.0", - "encoding-sniffer": "^0.2.0", - "htmlparser2": "^9.1.0", - "parse5": "^7.1.2", - "parse5-htmlparser2-tree-adapter": "^7.0.0", - "parse5-parser-stream": "^7.1.2", - "undici": "^6.19.5", - "whatwg-mimetype": "^4.0.0" - }, - "devDependencies": { - "@imgix/js-core": "^3.8.0", - "@octokit/graphql": "^8.1.1", - "@types/jsdom": "^21.1.7", - "@types/node": "^22.1.0", - "@types/whatwg-mimetype": "^3.0.2", - "@typescript-eslint/eslint-plugin": "^8.0.1", - "@typescript-eslint/parser": "^8.0.1", - "@vitest/coverage-v8": "^2.0.5", - "eslint": "^8.57.0", - "eslint-config-prettier": "^9.1.0", - "eslint-plugin-expect-type": "^0.4.0", - "eslint-plugin-jsdoc": "^50.0.0", - "eslint-plugin-n": "^16.6.2", - "eslint-plugin-unicorn": "^55.0.0", - "eslint-plugin-vitest": "^0.5.4", - "husky": "^9.1.4", - "jquery": "^3.7.1", - "jsdom": "^24.1.1", - "lint-staged": "^15.2.8", - "prettier": "^3.3.3", - "prettier-plugin-jsdoc": "^1.3.0", - "tinybench": "^2.9.0", - "tshy": "^3.0.2", - "tsx": "^4.17.0", - "typescript": "^5.5.4", - "vitest": "^2.0.5" - }, - "engines": { - "node": ">=18.17" - }, - "tshy": { - "esmDialects": [ - "browser" - ], - "exports": { - ".": "./src/index.ts", - "./slim": "./src/slim.ts", - "./utils": "./src/utils.ts", - "./package.json": "./package.json" - }, - "exclude": [ - "**/*.spec.ts", - "**/__fixtures__/*", - "**/__tests__/*", - "**/__snapshots__/*" - ] - } -} diff --git a/node_modules/cheerio/src/__fixtures__/fixtures.ts b/node_modules/cheerio/src/__fixtures__/fixtures.ts deleted file mode 100644 index d153fe2..0000000 --- a/node_modules/cheerio/src/__fixtures__/fixtures.ts +++ /dev/null @@ -1,147 +0,0 @@ -import type { CheerioAPI } from '../load.js'; -import { load } from '../load-parse.js'; - -/** A Cheerio instance with no content. */ -export const cheerio: CheerioAPI = load([]); - -export const fruits: string = [ - '<ul id="fruits">', - '<li class="apple">Apple</li>', - '<li class="orange">Orange</li>', - '<li class="pear">Pear</li>', - '</ul>', -].join(''); - -export const vegetables: string = [ - '<ul id="vegetables">', - '<li class="carrot">Carrot</li>', - '<li class="sweetcorn">Sweetcorn</li>', - '</ul>', -].join(''); - -export const divcontainers: string = [ - '<div class="container">', - '<div class="inner">First</div>', - '<div class="inner">Second</div>', - '</div>', - '<div class="container">', - '<div class="inner">Third</div>', - '<div class="inner">Fourth</div>', - '</div>', - '<div id="new"><div>', - '<div>\n\n<p><em><b></b></em></p>\n\n</div>', - '</div>', -].join(''); - -export const chocolates: string = [ - '<ul id="chocolates">', - '<li class="linth" data-highlight="Lindor" data-origin="swiss">Linth</li>', - '<li class="frey" data-taste="sweet" data-best-collection="Mahony">Frey</li>', - '<li class="cailler">Cailler</li>', - '</ul>', -].join(''); - -export const drinks: string = [ - '<ul id="drinks">', - '<li class="beer">Beer</li>', - '<li class="juice">Juice</li>', - '<li class="milk">Milk</li>', - '<li class="water">Water</li>', - '<li class="cider">Cider</li>', - '</ul>', -].join(''); - -export const food: string = [ - '<ul id="food">', - fruits, - vegetables, - '</ul>', -].join(''); - -export const eleven = ` -<html> - <body> - <ul> - <li>One</li> - <li>Two</li> - <li class="blue sel">Three</li> - <li class="red">Four</li> - </ul> - - <ul> - <li class="red">Five</li> - <li>Six</li> - <li class="blue">Seven</li> - </ul> - - <ul> - <li>Eight</li> - <li class="red sel">Nine</li> - <li>Ten</li> - <li class="sel">Eleven</li> - </ul> - </body> -</html> -`; - -export const unwrapspans: string = [ - '<div id=unwrap style="display: none;">', - '<div id=unwrap1><span class=unwrap>a</span><span class=unwrap>b</span></div>', - '<div id=unwrap2><span class=unwrap>c</span><span class=unwrap>d</span></div>', - '<div id=unwrap3><b><span class="unwrap unwrap3">e</span></b><b><span class="unwrap unwrap3">f</span></b></div>', - '</div>', -].join(''); - -export const inputs: string = [ - '<select id="one"><option value="option_not_selected">Option not selected</option><option value="option_selected" selected>Option selected</option></select>', - '<select id="one-valueless"><option>Option not selected</option><option selected>Option selected</option></select>', - '<select id="one-html-entity"><option>Option not selected</option><option selected>Option <selected></option></select>', - '<select id="one-nested"><option>Option not selected</option><option selected>Option <span>selected</span></option></select>', - '<input type="text" value="input_text" />', - '<input type="checkbox" name="checkbox_off" value="off" /><input type="checkbox" name="checkbox_on" value="on" checked />', - '<input type="checkbox" name="checkbox_valueless" />', - '<input type="radio" value="off" name="radio" /><input type="radio" name="radio" value="on" checked />', - '<input type="radio" value="off" name="radio[brackets]" /><input type="radio" name="radio[brackets]" value="on" checked />', - '<input type="radio" name="radio_valueless" />', - '<select id="multi" multiple><option value="1">1</option><option value="2" selected>2</option><option value="3" selected>3</option><option value="4">4</option></select>', - '<select id="multi-valueless" multiple><option>1</option><option selected>2</option><option selected>3</option><option>4</option></select>', -].join(''); - -export const text: string = [ - '<p>Apples, <b>oranges</b> and pears.</p>', - '<p>Carrots and <!-- sweetcorn --></p>', -].join(''); - -export const forms: string = [ - '<form id="simple"><input type="text" name="fruit" value="Apple" /></form>', - '<form id="nested"><div><input type="text" name="fruit" value="Apple" /></div><input type="text" name="vegetable" value="Carrot" /></form>', - '<form id="disabled"><input type="text" name="fruit" value="Apple" disabled /></form>', - '<form id="submit"><input type="text" name="fruit" value="Apple" /><input type="submit" name="submit" value="Submit" /></form>', - '<form id="select"><select name="fruit"><option value="Apple">Apple</option><option value="Orange" selected>Orange</option></select></form>', - '<form id="unnamed"><input type="text" name="fruit" value="Apple" /><input type="text" value="Carrot" /></form>', - '<form id="multiple"><select name="fruit" multiple><option value="Apple" selected>Apple</option><option value="Orange" selected>Orange</option><option value="Carrot">Carrot</option></select></form>', - '<form id="textarea"><textarea name="fruits">Apple\nOrange</textarea></form>', - '<form id="spaces"><input type="text" name="fruit" value="Blood orange" /></form>', -].join(''); - -export const noscript: string = [ - '</body>', - '<noscript>', - '<!-- anchor linking to external file -->', - '<a href="https://github.com/cheeriojs/cheerio">External Link</a>', - '</noscript>', - '<p>Rocks!</p>', - '</body>', -].join(''); - -export const script: string = [ - '<div>', - '<a>A</a>', - '<script>', - ' var foo = "bar";', - '</script>', - '<b>B</b>', - '</div>', -].join(''); - -export const mixedText = '<a>1</a>TEXT<b>2</b>'; diff --git a/node_modules/cheerio/src/__tests__/deprecated.spec.ts b/node_modules/cheerio/src/__tests__/deprecated.spec.ts deleted file mode 100644 index 493b8c7..0000000 --- a/node_modules/cheerio/src/__tests__/deprecated.spec.ts +++ /dev/null @@ -1,266 +0,0 @@ -/** - * This file includes tests for deprecated APIs. The methods are expected to be - * removed in the next major release of Cheerio, but their stability should be - * maintained until that time. - */ -import { describe, it, expect, beforeEach } from 'vitest'; -import { cheerio, food, fruits } from '../__fixtures__/fixtures.js'; - -describe('deprecated APIs', () => { - describe('cheerio module', () => { - describe('.parseHTML', () => { - it('(html) : should preserve content', () => { - const html = '<div>test div</div>'; - expect(cheerio(cheerio.parseHTML(html)[0]).html()).toBe('test div'); - }); - }); - - describe('.merge', () => { - it('should be a function', () => { - expect(typeof cheerio.merge).toBe('function'); - }); - - // #1674 - merge, wont accept Cheerio object - it('should be a able merge array and cheerio object', () => { - const ret = cheerio.merge<unknown>(cheerio(), ['elem1', 'elem2']); - expect(typeof ret).toBe('object'); - expect(ret).toHaveLength(2); - }); - - it('(arraylike, arraylike) : should modify the first array, but not the second', () => { - const arr1 = [1, 2, 3]; - const arr2 = [4, 5, 6]; - const ret = cheerio.merge(arr1, arr2); - - expect(typeof ret).toBe('object'); - expect(Array.isArray(ret)).toBe(true); - expect(ret).toBe(arr1); - expect(arr1).toHaveLength(6); - expect(arr2).toHaveLength(3); - }); - - it('(arraylike, arraylike) : should handle objects that arent arrays, but are arraylike', () => { - const arr1: ArrayLike<string> = { - length: 3, - 0: 'a', - 1: 'b', - 2: 'c', - }; - const arr2 = { - length: 3, - 0: 'd', - 1: 'e', - 2: 'f', - }; - - cheerio.merge(arr1, arr2); - expect(arr1).toHaveLength(6); - expect(arr1[3]).toBe('d'); - expect(arr1[4]).toBe('e'); - expect(arr1[5]).toBe('f'); - expect(arr2).toHaveLength(3); - }); - - it('(?, ?) : should gracefully reject invalid inputs', () => { - expect(cheerio.merge([4], 3 as never)).toBeUndefined(); - expect(cheerio.merge({} as never, {} as never)).toBeUndefined(); - expect(cheerio.merge([], {} as never)).toBeUndefined(); - expect(cheerio.merge({} as never, [])).toBeUndefined(); - - const fakeArray = { length: 3, 0: 'a', 1: 'b', 3: 'd' }; - expect(cheerio.merge(fakeArray, [])).toBeUndefined(); - expect(cheerio.merge([], fakeArray)).toBeUndefined(); - - expect(cheerio.merge({ length: '7' } as never, [])).toBeUndefined(); - expect(cheerio.merge({ length: -1 }, [])).toBeUndefined(); - }); - - it('(?, ?) : should no-op on invalid inputs', () => { - const fakeArray1 = { length: 3, 0: 'a', 1: 'b', 3: 'd' }; - cheerio.merge(fakeArray1, []); - expect(fakeArray1).toHaveLength(3); - expect(fakeArray1[0]).toBe('a'); - expect(fakeArray1[1]).toBe('b'); - expect(fakeArray1[3]).toBe('d'); - cheerio.merge([], fakeArray1); - expect(fakeArray1).toHaveLength(3); - expect(fakeArray1[0]).toBe('a'); - expect(fakeArray1[1]).toBe('b'); - expect(fakeArray1[3]).toBe('d'); - }); - }); - - describe('.contains', () => { - let $: typeof cheerio; - - beforeEach(() => { - $ = cheerio.load(food); - }); - - it('(container, contained) : should correctly detect the provided element', () => { - const $food = $('#food'); - const $fruits = $('#fruits'); - const $apple = $('.apple'); - - expect(cheerio.contains($food[0], $fruits[0])).toBe(true); - expect(cheerio.contains($food[0], $apple[0])).toBe(true); - }); - - it('(container, other) : should not detect elements that are not contained', () => { - const $fruits = $('#fruits'); - const $vegetables = $('#vegetables'); - const $apple = $('.apple'); - - expect(cheerio.contains($vegetables[0], $apple[0])).toBe(false); - expect(cheerio.contains($fruits[0], $vegetables[0])).toBe(false); - expect(cheerio.contains($vegetables[0], $fruits[0])).toBe(false); - expect(cheerio.contains($fruits[0], $fruits[0])).toBe(false); - expect(cheerio.contains($vegetables[0], $vegetables[0])).toBe(false); - }); - }); - - describe('.root', () => { - it('returns an empty selection', () => { - const $empty = cheerio.root(); - expect($empty).toHaveLength(1); - expect($empty[0].children).toHaveLength(0); - }); - }); - }); - - describe('Cheerio function', () => { - it('.load', () => { - const $1 = cheerio.load(fruits); - const $2 = $1.load('<div><p>Some <a>text</a>.</p></div>'); - - expect($2('a')).toHaveLength(1); - }); - - /** - * The `.html` static method defined on the "loaded" Cheerio factory - * function is deprecated. - * - * In order to promote consistency with the jQuery library, users are - * encouraged to instead use the instance method of the same name. - * - * @example - * - * ```js - * const $ = cheerio.load('<h1>Hello, <span>world</span>.</h1>'); - * - * $('h1').html(); - * //=> '<h1>Hello, <span>world</span>.' - * ``` - * - * @example <caption>To render the markup of an entire document, invoke the - * `html` function exported by the Cheerio module with a "root" - * selection.</caption> - * - * ```js - * cheerio.html($.root()); - * //=> '<html><head></head><body><h1>Hello, <span>world</span>.</h1></body></html>' - * ``` - */ - describe('.html - deprecated API', () => { - it('() : of empty cheerio object should return null', () => { - /* - * Note: the direct invocation of the Cheerio constructor function is - * also deprecated. - */ - const $ = cheerio(); - expect($.html()).toBe(null); - }); - - it('(selector) : should return the outerHTML of the selected element', () => { - const $ = cheerio.load(fruits); - expect($.html('.pear')).toBe('<li class="pear">Pear</li>'); - }); - }); - - /** - * The `.xml` static method defined on the "loaded" Cheerio factory function - * is deprecated. Users are encouraged to instead use the `xml` function - * exported by the Cheerio module. - * - * @example - * - * ```js - * cheerio.xml($.root()); - * ``` - */ - describe('.xml - deprecated API', () => { - it('() : renders XML', () => { - const $ = cheerio.load('<foo></foo>', { xmlMode: true }); - expect($.xml()).toBe('<foo/>'); - }); - }); - - /** - * The `.text` static method defined on the "loaded" Cheerio factory - * function is deprecated. - * - * In order to promote consistency with the jQuery library, users are - * encouraged to instead use the instance method of the same name. - * - * @example - * - * ```js - * const $ = cheerio.load('<h1>Hello, <span>world</span>.</h1>'); - * $('h1').text(); - * //=> 'Hello, world.' - * ``` - * - * @example <caption>To render the text content of an entire document, - * invoke the `text` function exported by the Cheerio module with a "root" - * selection. </caption> - * - * ```js - * cheerio.text($.root()); - * //=> 'Hello, world.' - * ``` - */ - describe('.text - deprecated API', () => { - it('(cheerio object) : should return the text contents of the specified elements', () => { - const $ = cheerio.load('<a>This is <em>content</em>.</a>'); - expect($.text($('a'))).toBe('This is content.'); - }); - - it('(cheerio object) : should omit comment nodes', () => { - const $ = cheerio.load( - '<a>This is <!-- a comment --> not a comment.</a>', - ); - expect($.text($('a'))).toBe('This is not a comment.'); - }); - - it('(cheerio object) : should include text contents of children recursively', () => { - const $ = cheerio.load( - '<a>This is <div>a child with <span>another child and <!-- a comment --> not a comment</span> followed by <em>one last child</em> and some final</div> text.</a>', - ); - expect($.text($('a'))).toBe( - 'This is a child with another child and not a comment followed by one last child and some final text.', - ); - }); - - it('() : should return the rendered text content of the root', () => { - const $ = cheerio.load( - '<a>This is <div>a child with <span>another child and <!-- a comment --> not a comment</span> followed by <em>one last child</em> and some final</div> text.</a>', - ); - expect($.text()).toBe( - 'This is a child with another child and not a comment followed by one last child and some final text.', - ); - }); - - it('(cheerio object) : should not omit script tags', () => { - const $ = cheerio.load('<script>console.log("test")</script>'); - expect($.text()).toBe('console.log("test")'); - }); - - it('(cheerio object) : should omit style tags', () => { - const $ = cheerio.load( - '<style type="text/css">.cf-hidden { display: none; }</style>', - ); - expect($.text()).toBe('.cf-hidden { display: none; }'); - }); - }); - }); -}); diff --git a/node_modules/cheerio/src/__tests__/xml.spec.ts b/node_modules/cheerio/src/__tests__/xml.spec.ts deleted file mode 100644 index 22d32fe..0000000 --- a/node_modules/cheerio/src/__tests__/xml.spec.ts +++ /dev/null @@ -1,66 +0,0 @@ -import { describe, it, expect } from 'vitest'; -import { load } from '../index.js'; -import type { CheerioOptions } from '../options.js'; - -function xml(str: string, options?: CheerioOptions) { - options = { xml: true, ...options }; - const $ = load(str, options); - return $.xml(); -} - -function dom(str: string, options?: CheerioOptions) { - const $ = load('', options); - return $(str).html(); -} - -describe('render', () => { - describe('(xml)', () => { - it('should render <media:thumbnail /> tags correctly', () => { - const str = - '<media:thumbnail url="http://www.foo.com/keyframe.jpg" width="75" height="50" time="12:05:01.123" />'; - expect(xml(str)).toBe( - '<media:thumbnail url="http://www.foo.com/keyframe.jpg" width="75" height="50" time="12:05:01.123"/>', - ); - }); - - it('should render <link /> tags (RSS) correctly', () => { - const str = '<link>http://www.github.com/</link>'; - expect(xml(str)).toBe('<link>http://www.github.com/</link>'); - }); - - it('should escape entities', () => { - const str = '<tag attr="foo & bar"/>'; - expect(xml(str)).toBe(str); - }); - - it('should render HTML as XML', () => { - const $ = load('<foo></foo>', null, false); - expect($.xml()).toBe('<foo/>'); - }); - }); - - describe('(dom)', () => { - it('should not keep camelCase for new nodes', () => { - const str = '<g><someElem someAttribute="something">hello</someElem></g>'; - expect(dom(str, { xml: false })).toBe( - '<someelem someattribute="something">hello</someelem>', - ); - }); - - it('should keep camelCase for new nodes', () => { - const str = '<g><someElem someAttribute="something">hello</someElem></g>'; - expect(dom(str, { xml: true })).toBe( - '<someElem someAttribute="something">hello</someElem>', - ); - }); - - it('should maintain the parsing options of distinct contexts independently', () => { - const str = '<g><someElem someAttribute="something">hello</someElem></g>'; - const $ = load('', { xml: false }); - - expect($(str).html()).toBe( - '<someelem someattribute="something">hello</someelem>', - ); - }); - }); -}); diff --git a/node_modules/cheerio/src/api/attributes.spec.ts b/node_modules/cheerio/src/api/attributes.spec.ts deleted file mode 100644 index 9b1c64c..0000000 --- a/node_modules/cheerio/src/api/attributes.spec.ts +++ /dev/null @@ -1,1165 +0,0 @@ -import { describe, it, expect, beforeEach } from 'vitest'; -import { load, type CheerioAPI, type Cheerio } from '../index.js'; -import type { Element } from 'domhandler'; -import { - cheerio, - script, - fruits, - vegetables, - food, - chocolates, - inputs, - mixedText, -} from '../__fixtures__/fixtures.js'; - -function withClass(attr: string) { - return cheerio(`<div class="${attr}"></div>`); -} - -describe('$(...)', () => { - describe('.attr', () => { - let $: CheerioAPI; - - beforeEach(() => { - $ = load(fruits); - }); - - it('() : should get all the attributes', () => { - const attrs = $('ul').attr(); - expect(attrs).toHaveProperty('id', 'fruits'); - }); - - it('(invalid key) : invalid attr should get undefined', () => { - const attr = $('.apple').attr('lol'); - expect(attr).toBeUndefined(); - }); - - it('(valid key) : valid attr should get value', () => { - const cls = $('.apple').attr('class'); - expect(cls).toBe('apple'); - }); - - it('(valid key) : valid attr should get name when boolean', () => { - const attr = $('<input name=email autofocus>').attr('autofocus'); - expect(attr).toBe('autofocus'); - }); - - it('(key, value) : should set one attr', () => { - const $pear = $('.pear').attr('id', 'pear'); - expect($('#pear')).toHaveLength(1); - expect($pear).toBeInstanceOf($); - }); - - it('(key, value) : should set multiple attr', () => { - const $el = cheerio('<div></div> <div></div>').attr( - 'class', - 'pear', - ) as Cheerio<Element>; - - expect($el[0].attribs).toHaveProperty('class', 'pear'); - expect($el[1].attribs).toBeUndefined(); - expect($el[2].attribs).toHaveProperty('class', 'pear'); - }); - - it('(key, value) : should return an empty object for an empty object', () => { - const $src = $().attr('key', 'value'); - expect($src.length).toBe(0); - expect($src[0]).toBeUndefined(); - }); - - it('(map) : object map should set multiple attributes', () => { - $('.apple').attr({ - id: 'apple', - style: 'color:red;', - 'data-url': 'http://apple.com', - }); - const attrs = $('.apple').attr(); - expect(attrs).toHaveProperty('id', 'apple'); - expect(attrs).toHaveProperty('style', 'color:red;'); - expect(attrs).toHaveProperty('data-url', 'http://apple.com'); - }); - - it('(map, val) : should throw with wrong combination of arguments', () => { - expect(() => - $('.apple').attr( - { - id: 'apple', - style: 'color:red;', - 'data-url': 'http://apple.com', - } as never, - () => '', - ), - ).toThrow('Bad combination of arguments.'); - }); - - it('(key, function) : should call the function and update the attribute with the return value', () => { - const $fruits = $('#fruits'); - $fruits.attr('id', (index, value) => { - expect(index).toBe(0); - expect(value).toBe('fruits'); - return 'ninja'; - }); - const attrs = $fruits.attr(); - expect(attrs).toHaveProperty('id', 'ninja'); - }); - - it('(key, function) : should ignore text nodes', () => { - const $text = $(mixedText); - $text.attr('class', () => 'ninja'); - const className = $text.attr('class'); - expect(className).toBe('ninja'); - }); - - it('(key, value) : should correctly encode then decode unsafe values', () => { - const $apple = $('.apple'); - $apple.attr( - 'href', - 'http://github.com/"><script>alert("XSS!")</script><br', - ); - expect($apple.attr('href')).toBe( - 'http://github.com/"><script>alert("XSS!")</script><br', - ); - - $apple.attr( - 'href', - 'http://github.com/"><script>alert("XSS!")</script><br', - ); - expect($apple.html()).not.toContain('<script>alert("XSS!")</script>'); - }); - - it('(key, value) : should coerce values to a string', () => { - const $apple = $('.apple'); - $apple.attr('data-test', 1 as never); - expect($apple[0].attribs['data-test']).toBe('1'); - expect($apple.attr('data-test')).toBe('1'); - }); - - it('(key, value) : handle removed boolean attributes', () => { - const $apple = $('.apple'); - $apple.attr('autofocus', 'autofocus'); - expect($apple.attr('autofocus')).toBe('autofocus'); - $apple.removeAttr('autofocus'); - expect($apple.attr('autofocus')).toBeUndefined(); - }); - - it('(key, value) : should remove non-boolean attributes with names or values similar to boolean ones', () => { - const $apple = $('.apple'); - $apple.attr('data-autofocus', 'autofocus'); - expect($apple.attr('data-autofocus')).toBe('autofocus'); - $apple.removeAttr('data-autofocus'); - expect($apple.attr('data-autofocus')).toBeUndefined(); - }); - - it('(key, value) : should remove attributes when called with null value', () => { - const $pear = $('.pear').attr('autofocus', 'autofocus'); - expect($pear.attr('autofocus')).toBe('autofocus'); - $pear.attr('autofocus', null); - expect($pear.attr('autofocus')).toBeUndefined(); - }); - - it('(map) : should remove attributes with null values', () => { - const $pear = $('.pear').attr({ - autofocus: 'autofocus', - style: 'color:red', - }); - expect($pear.attr('autofocus')).toBe('autofocus'); - expect($pear.attr('style')).toBe('color:red'); - $pear.attr({ autofocus: null, style: 'color:blue' }); - expect($pear.attr('autofocus')).toBeUndefined(); - expect($pear.attr('style')).toBe('color:blue'); - }); - - it('(chaining) setting value and calling attr returns result', () => { - const pearAttr = $('.pear').attr('foo', 'bar').attr('foo'); - expect(pearAttr).toBe('bar'); - }); - - it('(chaining) setting attr to null returns a $', () => { - const $pear = $('.pear').attr('foo', null); - expect($pear).toBeInstanceOf($); - }); - - it('(chaining) setting attr to undefined returns a $', () => { - const $pear = $('.pear').attr('foo', undefined); - expect($('.pear')).toHaveLength(1); - expect($('.pear').attr('foo')).toBeUndefined(); - expect($pear).toBeInstanceOf($); - }); - - it("(bool) shouldn't treat boolean attributes differently in XML mode", () => { - const $xml = $.load(`<input checked=checked disabled=yes />`, { - xml: true, - })('input'); - - expect($xml.attr('checked')).toBe('checked'); - expect($xml.attr('disabled')).toBe('yes'); - }); - }); - - describe('.prop', () => { - let $: CheerioAPI; - let checkbox: Cheerio<Element>; - - beforeEach(() => { - $ = load(inputs); - checkbox = $('input[name=checkbox_on]'); - }); - - it('(valid key) : valid prop should get value', () => { - expect(checkbox.prop('checked')).toBe(true); - checkbox.css('display', 'none'); - expect(checkbox.prop('style')).toHaveProperty('display', 'none'); - expect(checkbox.prop('style')).toHaveLength(1); - expect(checkbox.prop('style')).toContain('display'); - expect(checkbox.prop('tagName')).toBe('INPUT'); - expect(checkbox.prop('nodeName')).toBe('INPUT'); - }); - - it('(valid key) : should return on empty collection', () => { - expect($(undefined).prop('checked')).toBeUndefined(); - expect($(undefined).prop('style')).toBeUndefined(); - expect($(undefined).prop('tagName')).toBeUndefined(); - expect($(undefined).prop('nodeName')).toBeUndefined(); - }); - - it('(invalid key) : invalid prop should get undefined', () => { - expect(checkbox.prop('lol')).toBeUndefined(); - expect(checkbox.prop(4 as never)).toBeUndefined(); - expect(checkbox.prop(true as never)).toBeUndefined(); - }); - - it('(key, value) : should set prop', () => { - expect(checkbox.prop('checked')).toBe(true); - checkbox.prop('checked', false); - expect(checkbox.prop('checked')).toBe(false); - checkbox.prop('checked', true); - expect(checkbox.prop('checked')).toBe(true); - }); - - it('(key, value) : should update attribute', () => { - expect(checkbox.prop('checked')).toBe(true); - expect(checkbox.attr('checked')).toBe('checked'); - checkbox.prop('checked', false); - expect(checkbox.prop('checked')).toBe(false); - expect(checkbox.attr('checked')).toBeUndefined(); - checkbox.prop('checked', true); - expect(checkbox.prop('checked')).toBe(true); - expect(checkbox.attr('checked')).toBe('checked'); - }); - - it('(key, value) : should update namespace', () => { - const imgs = $('<img>\n\n<img>\n\n<img>'); - const nsHtml = 'http://www.w3.org/1999/xhtml'; - imgs.prop('src', '#').prop('namespace', nsHtml); - expect(imgs.prop('namespace')).toBe(nsHtml); - imgs.prop('attribs', null); - expect(imgs.prop('src')).toBeUndefined(); - expect(imgs.prop('data-foo')).toBeUndefined(); - }); - - it('(key, value) : should ignore empty collection', () => { - expect($(undefined).prop('checked')).toBeUndefined(); - $(undefined).prop('checked', true); - expect($(undefined).prop('checked')).toBeUndefined(); - }); - - it('(map) : object map should set multiple props', () => { - checkbox.prop({ - id: 'check', - checked: false, - }); - expect(checkbox.prop('id')).toBe('check'); - expect(checkbox.prop('checked')).toBe(false); - }); - - it('(map, val) : should throw with wrong combination of arguments', () => { - expect(() => - $('.apple').prop( - { - id: 'check', - checked: false, - } as never, - () => '', - ), - ).toThrow('Bad combination of arguments.'); - }); - - it('(key, function) : should call the function and update the prop with the return value', () => { - checkbox.prop('checked', (index, value) => { - expect(index).toBe(0); - expect(value).toBe(true); - return false; - }); - expect(checkbox.prop('checked')).toBe(false); - }); - - it('(key, value) : should support chaining after setting props', () => { - expect(checkbox.prop('checked', false)).toBe(checkbox); - }); - - it('(invalid element/tag) : prop should return undefined', () => { - expect($(undefined).prop('prop')).toBeUndefined(); - expect($(null as never).prop('prop')).toBeUndefined(); - }); - - it('("href") : should resolve links with `baseURI`', () => { - const $ = load( - ` - <a id="1" href="http://example.org">example1</a> - <a id="2" href="//example.org">example2</a> - <a id="3" href="/example.org">example3</a> - <a id="4" href="example.org">example4</a> - `, - { baseURI: 'http://example.com/page/1' }, - ); - - expect($('#1').prop('href')).toBe('http://example.org/'); - expect($('#2').prop('href')).toBe('http://example.org/'); - expect($('#3').prop('href')).toBe('http://example.com/example.org'); - expect($('#4').prop('href')).toBe('http://example.com/page/example.org'); - - expect($(undefined).prop('href')).toBeUndefined(); - }); - - it('("src") : should resolve links with `baseURI`', () => { - const $ = load( - ` - <img id="1" src="http://example.org/image.png"> - <iframe id="2" src="//example.org/page.html"></iframe> - <audio id="3" src="/example.org/song.mp3"></audio> - <source id="4" src="example.org/image.png"> - `, - { baseURI: 'http://example.com/page/1' }, - ); - - expect($('#1').prop('src')).toBe('http://example.org/image.png'); - expect($('#2').prop('src')).toBe('http://example.org/page.html'); - expect($('#3').prop('src')).toBe( - 'http://example.com/example.org/song.mp3', - ); - expect($('#4').prop('src')).toBe( - 'http://example.com/page/example.org/image.png', - ); - - expect($(undefined).prop('src')).toBeUndefined(); - }); - - it('("outerHTML") : should render properly', () => { - const outerHtml = '<div><a></a></div>'; - const $a = $(outerHtml); - - expect($a.prop('outerHTML')).toBe(outerHtml); - - expect($(undefined).prop('outerHTML')).toBeUndefined(); - }); - - it('("innerHTML") : should render properly', () => { - const $a = $('<div><a></a></div>'); - - expect($a.prop('innerHTML')).toBe('<a></a>'); - - expect($(undefined).prop('innerHTML')).toBeUndefined(); - }); - - it('("textContent") : should render properly', () => { - expect($('select').children().prop('textContent')).toBe( - 'Option not selected', - ); - - expect($(script).prop('textContent')).toBe('A var foo = "bar";B'); - - expect($(undefined).prop('textContent')).toBeUndefined(); - }); - - it('("textContent") : should include style and script tags', () => { - const $ = load( - '<body>Welcome <div>Hello, testing text function,<script>console.log("hello")</script></div><style type="text/css">.cf-hidden { display: none; }</style>End of message</body>', - ); - expect($('body').prop('textContent')).toBe( - 'Welcome Hello, testing text function,console.log("hello").cf-hidden { display: none; }End of message', - ); - expect($('style').prop('textContent')).toBe( - '.cf-hidden { display: none; }', - ); - expect($('script').prop('textContent')).toBe('console.log("hello")'); - }); - - it('("innerText") : should render properly', () => { - expect($('select').children().prop('innerText')).toBe( - 'Option not selected', - ); - - expect($(script).prop('innerText')).toBe('AB'); - - expect($(undefined).prop('innerText')).toBeUndefined(); - }); - - it('("innerText") : should omit style and script tags', () => { - const $ = load( - '<body>Welcome <div>Hello, testing text function,<script>console.log("hello")</script></div><style type="text/css">.cf-hidden { display: none; }</style>End of message</body>', - ); - expect($('body').prop('innerText')).toBe( - 'Welcome Hello, testing text function,End of message', - ); - expect($('style').prop('innerText')).toBe(''); - expect($('script').prop('innerText')).toBe(''); - }); - - it('(inherited properties) : prop should support inherited properties', () => { - expect($('select').prop('childNodes')).toBe($('select')[0].childNodes); - }); - - it('(key) : should skip text nodes', () => { - const $text = load(mixedText); - const $body = $text($text('body')[0].children); - - expect($text($body[1]).prop('tagName')).toBeUndefined(); - - $body.prop('test-name', () => 'tester'); - expect($text('body').html()).toBe( - '<a test-name="tester">1</a>TEXT<b test-name="tester">2</b>', - ); - }); - - it("(bool) shouldn't treat boolean attributes differently in XML mode", () => { - const $xml = $.load(`<input checked=checked disabled=yes />`, { - xml: true, - })('input'); - - expect($xml.prop('checked')).toBe('checked'); - expect($xml.prop('disabled')).toBe('yes'); - }); - }); - - describe('.data', () => { - let $: CheerioAPI; - - beforeEach(() => { - $ = load(chocolates); - }); - - it('() : should get all data attributes initially declared in the markup', () => { - const data = $('.linth').data(); - expect(data).toStrictEqual({ - highlight: 'Lindor', - origin: 'swiss', - }); - }); - - it('() : should get all data set via `data`', () => { - const $el = cheerio('<div>'); - $el.data('a', 1); - $el.data('b', 2); - - expect($el.data()).toStrictEqual({ - a: 1, - b: 2, - }); - }); - - it('() : should get all data attributes initially declared in the markup merged with all data additionally set via `data`', () => { - const $el = cheerio('<div data-a="a" data-b="b">'); - $el.data('b', 'b-modified'); - $el.data('c', 'c'); - - expect($el.data()).toStrictEqual({ - a: 'a', - b: 'b-modified', - c: 'c', - }); - }); - - it('() : no data attribute should return an empty object', () => { - const data = $('.cailler').data(); - expect(Object.keys(data)).toHaveLength(0); - expect($('.free').data()).toBeUndefined(); - }); - - it('(invalid key) : invalid data attribute should return `undefined`', () => { - const data = $('.frey').data('lol'); - expect(data).toBeUndefined(); - }); - - it('(valid key) : valid data attribute should get value', () => { - const highlight = $('.linth').data('highlight'); - const origin = $('.linth').data('origin'); - - expect(highlight).toBe('Lindor'); - expect(origin).toBe('swiss'); - }); - - it('(key) : should translate camel-cased key values to hyphen-separated versions', () => { - const $el = cheerio( - '<div data--three-word-attribute="a" data-foo-Bar_BAZ-="b">', - ); - - expect($el.data('ThreeWordAttribute')).toBe('a'); - expect($el.data('fooBar_baz-')).toBe('b'); - }); - - it('(key) : should retrieve object values', () => { - const data = {}; - const $el = cheerio('<div>'); - - $el.data('test', data); - - expect($el.data('test')).toBe(data); - }); - - it('(key) : should parse JSON data derived from the markup', () => { - const $el = cheerio('<div data-json="[1, 2, 3]">'); - - expect($el.data('json')).toStrictEqual([1, 2, 3]); - }); - - it('(key) : should not parse JSON data set via the `data` API', () => { - const $el = cheerio('<div>'); - $el.data('json', '[1, 2, 3]'); - - expect($el.data('json')).toBe('[1, 2, 3]'); - }); - - // See https://api.jquery.com/data/ and https://bugs.jquery.com/ticket/14523 - it('(key) : should ignore the markup value after the first access', () => { - const $el = cheerio('<div data-test="a">'); - - expect($el.data('test')).toBe('a'); - - $el.attr('data-test', 'b'); - - expect($el.data('test')).toBe('a'); - }); - - it('(key) : should recover from malformed JSON', () => { - const $el = cheerio('<div data-custom="{{templatevar}}">'); - - expect($el.data('custom')).toBe('{{templatevar}}'); - }); - - it('("") : should accept the empty string as a name', () => { - const $el = cheerio('<div data-="a">'); - - expect($el.data('')).toBe('a'); - }); - - it('(hyphen key) : data addribute with hyphen should be camelized ;-)', () => { - const data = $('.frey').data(); - expect(data).toStrictEqual({ - taste: 'sweet', - bestCollection: 'Mahony', - }); - }); - - it('(key, value) : should set data attribute', () => { - // Adding as object. - const a = $('.frey').data({ - balls: 'giandor', - }); - // Adding as string. - const b = $('.linth').data('snack', 'chocoletti'); - - expect(() => { - a.data(4 as never, 'throw'); - }).not.toThrow(); - expect(a.data('balls')).toStrictEqual('giandor'); - expect(b.data('snack')).toStrictEqual('chocoletti'); - }); - - it('(key, value) : should set data for all elements in the selection', () => { - $('li').data('foo', 'bar'); - - expect($('li').eq(0).data('foo')).toStrictEqual('bar'); - expect($('li').eq(1).data('foo')).toStrictEqual('bar'); - expect($('li').eq(2).data('foo')).toStrictEqual('bar'); - }); - - it('(map) : object map should set multiple data attributes', () => { - const { data } = $('.linth').data({ - id: 'Cailler', - flop: 'Pippilotti Rist', - top: 'Frigor', - url: 'http://www.cailler.ch/', - })[0] as never; - - expect(data).toHaveProperty('id', 'Cailler'); - expect(data).toHaveProperty('flop', 'Pippilotti Rist'); - expect(data).toHaveProperty('top', 'Frigor'); - expect(data).toHaveProperty('url', 'http://www.cailler.ch/'); - }); - - describe('(attr) : data-* attribute type coercion :', () => { - it('boolean', () => { - const $el = cheerio('<div data-bool="true">'); - expect($el.data('bool')).toBe(true); - }); - - it('number', () => { - const $el = cheerio('<div data-number="23">'); - expect($el.data('number')).toBe(23); - }); - - it('number (scientific notation is not coerced)', () => { - const $el = cheerio('<div data-sci="1E10">'); - expect($el.data('sci')).toBe('1E10'); - }); - - it('null', () => { - const $el = cheerio('<div data-null="null">'); - expect($el.data('null')).toBe(null); - }); - - it('object', () => { - const $el = cheerio('<div data-obj=\'{ "a": 45 }\'>'); - expect($el.data('obj')).toStrictEqual({ a: 45 }); - }); - - it('array', () => { - const $el = cheerio('<div data-array="[1, 2, 3]">'); - expect($el.data('array')).toStrictEqual([1, 2, 3]); - }); - }); - - it('(key, value) : should skip text nodes', () => { - const $text = load(mixedText); - const $body = $text($text('body')[0].children); - - $body.data('snack', 'chocoletti'); - - expect($text('b').data('snack')).toBe('chocoletti'); - }); - }); - - describe('.val', () => { - let $: CheerioAPI; - - beforeEach(() => { - $ = load(inputs); - }); - - it('(): on div should get undefined', () => { - expect($('<div>').val()).toBeUndefined(); - }); - - it('(): on select should get value', () => { - const val = $('select#one').val(); - expect(val).toBe('option_selected'); - }); - it('(): on select with no value should get text', () => { - const val = $('select#one-valueless').val(); - expect(val).toBe('Option selected'); - }); - it('(): on select with no value should get converted HTML', () => { - const val = $('select#one-html-entity').val(); - expect(val).toBe('Option <selected>'); - }); - it('(): on select with no value should get text content', () => { - const val = $('select#one-nested').val(); - expect(val).toBe('Option selected'); - }); - it('(): on option should get value', () => { - const val = $('select#one option').eq(0).val(); - expect(val).toBe('option_not_selected'); - }); - it('(): on text input should get value', () => { - const val = $('input[type="text"]').val(); - expect(val).toBe('input_text'); - }); - it('(): on checked checkbox should get value', () => { - const val = $('input[name="checkbox_on"]').val(); - expect(val).toBe('on'); - }); - it('(): on unchecked checkbox should get value', () => { - const val = $('input[name="checkbox_off"]').val(); - expect(val).toBe('off'); - }); - it('(): on valueless checkbox should get value', () => { - const val = $('input[name="checkbox_valueless"]').val(); - expect(val).toBe('on'); - }); - it('(): on radio should get value', () => { - const val = $('input[type="radio"]').val(); - expect(val).toBe('off'); - }); - it('(): on valueless radio should get value', () => { - const val = $('input[name="radio_valueless"]').val(); - expect(val).toBe('on'); - }); - it('(): on multiple select should get an array of values', () => { - const val = $('select#multi').val(); - expect(val).toStrictEqual(['2', '3']); - }); - it('(): on multiple select with no value attribute should get an array of text content', () => { - const val = $('select#multi-valueless').val(); - expect(val).toStrictEqual(['2', '3']); - }); - it('(): with no selector matches should return nothing', () => { - const val = $('.nasty').val(); - expect(val).toBeUndefined(); - }); - it('(invalid value): should only handle arrays when it has the attribute multiple', () => { - const val = $('select#one').val([]); - expect(val).not.toBeUndefined(); - }); - it('(value): on empty set should get `this`', () => { - const $empty = $([]); - expect($empty.val('test')).toBe($empty); - }); - it('(value): on input text should set value', () => { - const element = $('input[type="text"]').val('test'); - expect(element.val()).toBe('test'); - }); - it('(value): on select should set value', () => { - const element = $('select#one').val('option_not_selected'); - expect(element.val()).toBe('option_not_selected'); - }); - it('(value): on option should set value', () => { - const element = $('select#one option').eq(0).val('option_changed'); - expect(element.val()).toBe('option_changed'); - }); - it('(value): on radio should set value', () => { - const element = $('input[name="radio"]').val('off'); - expect(element.val()).toBe('off'); - }); - it('(value): on radio with special characters should set value', () => { - const element = $('input[name="radio[brackets]"]').val('off'); - expect(element.val()).toBe('off'); - }); - it('(values): on multiple select should set multiple values', () => { - const element = $('select#multi').val(['1', '3', '4']); - expect(element.val()).toHaveLength(3); - }); - }); - - describe('.removeAttr', () => { - let $: CheerioAPI; - - beforeEach(() => { - $ = load(fruits); - }); - - it('(key) : should remove a single attr', () => { - const $fruits = $('#fruits'); - expect($fruits.attr('id')).not.toBeUndefined(); - $fruits.removeAttr('id'); - expect($fruits.attr('id')).toBeUndefined(); - }); - - it('(key key) : should remove multiple attrs', () => { - const $apple = $('.apple'); - $apple.attr('id', 'favorite'); - $apple.attr('size', 'small'); - - expect($apple.attr('id')).toBe('favorite'); - expect($apple.attr('class')).toBe('apple'); - expect($apple.attr('size')).toBe('small'); - $apple.removeAttr('id class'); - expect($apple.attr('id')).toBeUndefined(); - expect($apple.attr('class')).toBeUndefined(); - expect($apple.attr('size')).toBe('small'); - }); - - it('(key) : should return cheerio object', () => { - const obj = $('ul').removeAttr('id'); - expect(obj).toBeInstanceOf($); - }); - - it('(key) : should skip text nodes', () => { - const $text = load(mixedText); - const $body = $text($text('body')[0].children); - - $body.addClass(() => 'test'); - - expect($text('body').html()).toBe( - '<a class="test">1</a>TEXT<b class="test">2</b>', - ); - - $body.removeAttr('class'); - - expect($text('body').html()).toBe(mixedText); - }); - }); - - describe('.hasClass', () => { - let $: CheerioAPI; - - beforeEach(() => { - $ = load(fruits); - }); - - it('(valid class) : should return true', () => { - const cls = $('.apple').hasClass('apple'); - expect(cls).toBe(true); - - expect(withClass('foo').hasClass('foo')).toBe(true); - expect(withClass('foo bar').hasClass('foo')).toBe(true); - expect(withClass('bar foo').hasClass('foo')).toBe(true); - expect(withClass('bar foo bar').hasClass('foo')).toBe(true); - }); - - it('(invalid class) : should return false', () => { - const cls = $('#fruits').hasClass('fruits'); - expect(cls).toBe(false); - expect(withClass('foo-bar').hasClass('foo')).toBe(false); - expect(withClass('foo-bar').hasClass('foo')).toBe(false); - expect(withClass('foo-bar').hasClass('foo-ba')).toBe(false); - }); - - it('should check multiple classes', () => { - // Add a class - $('.apple').addClass('red'); - expect($('.apple').hasClass('apple')).toBe(true); - expect($('.apple').hasClass('red')).toBe(true); - - // Remove one and test again - $('.apple').removeClass('apple'); - expect($('li').eq(0).hasClass('apple')).toBe(false); - }); - - it('(empty string argument) : should return false', () => { - expect(withClass('foo').hasClass('')).toBe(false); - expect(withClass('foo bar').hasClass('')).toBe(false); - expect(withClass('foo bar').removeClass('foo').hasClass('')).toBe(false); - }); - }); - - describe('.addClass', () => { - let $: CheerioAPI; - - beforeEach(() => { - $ = load(fruits); - }); - - it('(first class) : should add the class to the element', () => { - const $fruits = $('#fruits'); - $fruits.addClass('fruits'); - const cls = $fruits.hasClass('fruits'); - expect(cls).toBe(true); - }); - - it('(single class) : should add the class to the element', () => { - $('.apple').addClass('fruit'); - const cls = $('.apple').hasClass('fruit'); - expect(cls).toBe(true); - }); - - it('(class): adds classes to many selected items', () => { - $('li').addClass('fruit'); - expect($('.apple').hasClass('fruit')).toBe(true); - expect($('.orange').hasClass('fruit')).toBe(true); - expect($('.pear').hasClass('fruit')).toBe(true); - - // Mixed with text nodes - const $red = $('<html>\n<ul id=one>\n</ul>\t</html>').addClass('red'); - expect($red).toHaveLength(3); - expect($red[0].type).toBe('text'); - expect($red[1].type).toBe('tag'); - expect($red[2].type).toBe('text'); - expect($red.hasClass('red')).toBe(true); - }); - - it('(class class class) : should add multiple classes to the element', () => { - $('.apple').addClass('fruit red tasty'); - expect($('.apple').hasClass('apple')).toBe(true); - expect($('.apple').hasClass('fruit')).toBe(true); - expect($('.apple').hasClass('red')).toBe(true); - expect($('.apple').hasClass('tasty')).toBe(true); - }); - - it('(fn) : should add classes returned from the function', () => { - const $fruits = $('#fruits').children().add($('#fruits')); - const args: [i: number, className: string][] = []; - const thisVals: Element[] = []; - const toAdd = ['main', 'apple red', '', undefined]; - - $fruits.addClass(function (...myArgs) { - args.push(myArgs); - thisVals.push(this); - return toAdd[myArgs[0]]; - }); - - expect(args).toStrictEqual([ - [0, ''], - [1, 'apple'], - [2, 'orange'], - [3, 'pear'], - ]); - expect(thisVals).toStrictEqual([ - $fruits[0], - $fruits[1], - $fruits[2], - $fruits[3], - ]); - expect($fruits.eq(0).hasClass('main')).toBe(true); - expect($fruits.eq(0).hasClass('apple')).toBe(false); - expect($fruits.eq(1).hasClass('apple')).toBe(true); - expect($fruits.eq(1).hasClass('red')).toBe(true); - expect($fruits.eq(2).hasClass('orange')).toBe(true); - expect($fruits.eq(3).hasClass('pear')).toBe(true); - }); - }); - - describe('.removeClass', () => { - let $: CheerioAPI; - - beforeEach(() => { - $ = load(fruits); - }); - - it('() : should remove all the classes', () => { - $('.pear').addClass('fruit'); - $('.pear').removeClass(); - expect($('.pear').attr('class')).toBeUndefined(); - }); - - it('("") : should not modify class list', () => { - const $fruits = $('#fruits'); - $fruits.children().removeClass(''); - expect($('.apple')).toHaveLength(1); - }); - - it('(invalid class) : should not remove anything', () => { - $('.pear').removeClass('fruit'); - expect($('.pear').hasClass('pear')).toBe(true); - }); - - it('(no class attribute) : should not throw an exception', () => { - const $vegetables = cheerio(vegetables); - - expect(() => { - $('li', $vegetables).removeClass('vegetable'); - }).not.toThrow(); - }); - - it('(single class) : should remove a single class from the element', () => { - $('.pear').addClass('fruit'); - expect($('.pear').hasClass('fruit')).toBe(true); - $('.pear').removeClass('fruit'); - expect($('.pear').hasClass('fruit')).toBe(false); - expect($('.pear').hasClass('pear')).toBe(true); - - // Remove one class from set - const $li = $('li').removeClass('orange'); - expect($li.eq(0).attr('class')).toBe('apple'); - expect($li.eq(1).attr('class')).toBe(''); - expect($li.eq(2).attr('class')).toBe('pear'); - - // Mixed with text nodes - const $red = $('<html>\n<ul class=one>\n</ul>\t</html>').removeClass( - 'one', - ); - expect($red).toHaveLength(3); - expect($red[0].type).toBe('text'); - expect($red[1].type).toBe('tag'); - expect($red[2].type).toBe('text'); - expect($red.eq(1).attr('class')).toBe(''); - expect($red.eq(1).prop('tagName')).toBe('UL'); - }); - - it('(single class) : should remove a single class from multiple classes on the element', () => { - $('.pear').addClass('fruit green tasty'); - expect($('.pear').hasClass('fruit')).toBe(true); - expect($('.pear').hasClass('green')).toBe(true); - expect($('.pear').hasClass('tasty')).toBe(true); - - $('.pear').removeClass('green'); - expect($('.pear').hasClass('fruit')).toBe(true); - expect($('.pear').hasClass('green')).toBe(false); - expect($('.pear').hasClass('tasty')).toBe(true); - }); - - it('(class class class) : should remove multiple classes from the element', () => { - $('.apple').addClass('fruit red tasty'); - expect($('.apple').hasClass('apple')).toBe(true); - expect($('.apple').hasClass('fruit')).toBe(true); - expect($('.apple').hasClass('red')).toBe(true); - expect($('.apple').hasClass('tasty')).toBe(true); - - $('.apple').removeClass('apple red tasty'); - expect($('.fruit').hasClass('apple')).toBe(false); - expect($('.fruit').hasClass('red')).toBe(false); - expect($('.fruit').hasClass('tasty')).toBe(false); - expect($('.fruit').hasClass('fruit')).toBe(true); - }); - - it('(class) : should remove all occurrences of a class name', () => { - const $div = cheerio('<div class="x x y x z"></div>'); - expect($div.removeClass('x').hasClass('x')).toBe(false); - }); - - it('(fn) : should remove classes returned from the function', () => { - const $fruits = $('#fruits').children(); - const args: [number, string][] = []; - const thisVals: Element[] = []; - const toAdd = ['apple red', '', undefined]; - - $fruits.removeClass(function (...myArgs) { - args.push(myArgs); - thisVals.push(this); - return toAdd[myArgs[0]]; - }); - - expect(args).toStrictEqual([ - [0, 'apple'], - [1, 'orange'], - [2, 'pear'], - ]); - expect(thisVals).toStrictEqual([$fruits[0], $fruits[1], $fruits[2]]); - expect($fruits.eq(0).hasClass('apple')).toBe(false); - expect($fruits.eq(0).hasClass('red')).toBe(false); - expect($fruits.eq(1).hasClass('orange')).toBe(true); - expect($fruits.eq(2).hasClass('pear')).toBe(true); - }); - - it('(fn) : should no op elements without attributes', () => { - const $inputs = $(inputs); - const val = $inputs.removeClass(() => 'tasty'); - expect(val).toHaveLength(15); - }); - - it('(fn) : should skip text nodes', () => { - const $text = load(mixedText); - const $body = $text($text('body')[0].children); - - $body.addClass(() => 'test'); - - expect($text('body').html()).toBe( - '<a class="test">1</a>TEXT<b class="test">2</b>', - ); - - $body.removeClass(() => 'test'); - - expect($text('body').html()).toBe( - '<a class="">1</a>TEXT<b class="">2</b>', - ); - }); - }); - - describe('.toggleClass', () => { - let $: CheerioAPI; - - beforeEach(() => { - $ = load(fruits); - }); - - it('(class class) : should toggle multiple classes from the element', () => { - $('.apple').addClass('fruit'); - expect($('.apple').hasClass('apple')).toBe(true); - expect($('.apple').hasClass('fruit')).toBe(true); - expect($('.apple').hasClass('red')).toBe(false); - - $('.apple').toggleClass('apple red'); - expect($('.fruit').hasClass('apple')).toBe(false); - expect($('.fruit').hasClass('red')).toBe(true); - expect($('.fruit').hasClass('fruit')).toBe(true); - - // Mixed with text nodes - const $red = $('<html>\n<ul class=one>\n</ul>\t</html>').toggleClass( - 'red', - ); - expect($red).toHaveLength(3); - expect($red.hasClass('red')).toBe(true); - expect($red.hasClass('one')).toBe(true); - $red.toggleClass('one'); - expect($red.hasClass('red')).toBe(true); - expect($red.hasClass('one')).toBe(false); - }); - - it('(class class, true) : should add multiple classes to the element', () => { - $('.apple').addClass('fruit'); - expect($('.apple').hasClass('apple')).toBe(true); - expect($('.apple').hasClass('fruit')).toBe(true); - expect($('.apple').hasClass('red')).toBe(false); - - $('.apple').toggleClass('apple red', true); - expect($('.fruit').hasClass('apple')).toBe(true); - expect($('.fruit').hasClass('red')).toBe(true); - expect($('.fruit').hasClass('fruit')).toBe(true); - }); - - it('(class true) : should add only one instance of class', () => { - $('.apple').toggleClass('tasty', true); - $('.apple').toggleClass('tasty', true); - expect($('.apple').attr('class')).toMatch(/tasty/g); - }); - - it('(class class, false) : should remove multiple classes from the element', () => { - $('.apple').addClass('fruit'); - expect($('.apple').hasClass('apple')).toBe(true); - expect($('.apple').hasClass('fruit')).toBe(true); - expect($('.apple').hasClass('red')).toBe(false); - - $('.apple').toggleClass('apple red', false); - expect($('.fruit').hasClass('apple')).toBe(false); - expect($('.fruit').hasClass('red')).toBe(false); - expect($('.fruit').hasClass('fruit')).toBe(true); - }); - - it('(fn) : should toggle classes returned from the function', () => { - const $ = load(food); - - $('.apple').addClass('fruit'); - $('.carrot').addClass('vegetable'); - expect($('.apple').hasClass('fruit')).toBe(true); - expect($('.apple').hasClass('vegetable')).toBe(false); - expect($('.orange').hasClass('fruit')).toBe(false); - expect($('.orange').hasClass('vegetable')).toBe(false); - expect($('.carrot').hasClass('fruit')).toBe(false); - expect($('.carrot').hasClass('vegetable')).toBe(true); - expect($('.sweetcorn').hasClass('fruit')).toBe(false); - expect($('.sweetcorn').hasClass('vegetable')).toBe(false); - - $('li').toggleClass(function () { - return $(this).parent().is('#fruits') ? 'fruit' : 'vegetable'; - }); - expect($('.apple').hasClass('fruit')).toBe(false); - expect($('.apple').hasClass('vegetable')).toBe(false); - expect($('.orange').hasClass('fruit')).toBe(true); - expect($('.orange').hasClass('vegetable')).toBe(false); - expect($('.carrot').hasClass('fruit')).toBe(false); - expect($('.carrot').hasClass('vegetable')).toBe(false); - expect($('.sweetcorn').hasClass('fruit')).toBe(false); - expect($('.sweetcorn').hasClass('vegetable')).toBe(true); - }); - - it('(fn) : should work with no initial class attribute', () => { - const $inputs = load(inputs); - $inputs('input, select').toggleClass(function () { - // eslint-disable-next-line @typescript-eslint/no-non-null-assertion -- `get` should never return undefined here. - return $inputs(this).get(0)!.tagName === 'select' - ? 'selectable' - : 'inputable'; - }); - expect($inputs('.selectable')).toHaveLength(6); - expect($inputs('.inputable')).toHaveLength(9); - }); - - it('(fn) : should skip text nodes', () => { - const $text = load(mixedText); - const $body = $text($text('body')[0].children); - - $body.toggleClass(() => 'test'); - - expect($text('body').html()).toBe( - '<a class="test">1</a>TEXT<b class="test">2</b>', - ); - - $body.toggleClass(() => 'test'); - - expect($text('body').html()).toBe( - '<a class="">1</a>TEXT<b class="">2</b>', - ); - }); - - it('(invalid) : should be a no-op for invalid inputs', () => { - const original = $('.apple'); - const testAgainst = original.attr('class'); - expect(original.toggleClass().attr('class')).toStrictEqual(testAgainst); - - for (const value of [undefined, true, false, null, 0, 1, {}]) { - expect( - original.toggleClass(value as never).attr('class'), - ).toStrictEqual(testAgainst); - } - }); - }); -}); diff --git a/node_modules/cheerio/src/api/attributes.ts b/node_modules/cheerio/src/api/attributes.ts deleted file mode 100644 index db246e6..0000000 --- a/node_modules/cheerio/src/api/attributes.ts +++ /dev/null @@ -1,1130 +0,0 @@ -/** - * Methods for getting and modifying attributes. - * - * @module cheerio/attributes - */ - -import { text } from '../static.js'; -import { domEach, camelCase, cssCase } from '../utils.js'; -import { isTag, type AnyNode, type Element } from 'domhandler'; -import type { Cheerio } from '../cheerio.js'; -import { innerText, textContent } from 'domutils'; -const hasOwn = Object.prototype.hasOwnProperty; -const rspace = /\s+/; -const dataAttrPrefix = 'data-'; - -// Attributes that are booleans -const rboolean = - /^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i; -// Matches strings that look like JSON objects or arrays -const rbrace = /^{[^]*}$|^\[[^]*]$/; - -/** - * Gets a node's attribute. For boolean attributes, it will return the value's - * name should it be set. - * - * Also supports getting the `value` of several form elements. - * - * @private - * @category Attributes - * @param elem - Element to get the attribute of. - * @param name - Name of the attribute. - * @param xmlMode - Disable handling of special HTML attributes. - * @returns The attribute's value. - */ -function getAttr( - elem: AnyNode, - name: undefined, - xmlMode?: boolean, -): Record<string, string> | undefined; -function getAttr( - elem: AnyNode, - name: string, - xmlMode?: boolean, -): string | undefined; -function getAttr( - elem: AnyNode, - name: string | undefined, - xmlMode?: boolean, -): Record<string, string> | string | undefined { - if (!elem || !isTag(elem)) return undefined; - - elem.attribs ??= {}; - - // Return the entire attribs object if no attribute specified - if (!name) { - return elem.attribs; - } - - if (hasOwn.call(elem.attribs, name)) { - // Get the (decoded) attribute - return !xmlMode && rboolean.test(name) ? name : elem.attribs[name]; - } - - // Mimic the DOM and return text content as value for `option's` - if (elem.name === 'option' && name === 'value') { - return text(elem.children); - } - - // Mimic DOM with default value for radios/checkboxes - if ( - elem.name === 'input' && - (elem.attribs['type'] === 'radio' || elem.attribs['type'] === 'checkbox') && - name === 'value' - ) { - return 'on'; - } - - return undefined; -} - -/** - * Sets the value of an attribute. The attribute will be deleted if the value is - * `null`. - * - * @private - * @param el - The element to set the attribute on. - * @param name - The attribute's name. - * @param value - The attribute's value. - */ -function setAttr(el: Element, name: string, value: string | null) { - if (value === null) { - removeAttribute(el, name); - } else { - el.attribs[name] = `${value}`; - } -} - -/** - * Method for getting attributes. Gets the attribute value for only the first - * element in the matched set. - * - * @category Attributes - * @example - * - * ```js - * $('ul').attr('id'); - * //=> fruits - * ``` - * - * @param name - Name of the attribute. - * @returns The attribute's value. - * @see {@link https://api.jquery.com/attr/} - */ -export function attr<T extends AnyNode>( - this: Cheerio<T>, - name: string, -): string | undefined; -/** - * Method for getting all attributes and their values of the first element in - * the matched set. - * - * @category Attributes - * @example - * - * ```js - * $('ul').attr(); - * //=> { id: 'fruits' } - * ``` - * - * @returns The attribute's values. - * @see {@link https://api.jquery.com/attr/} - */ -export function attr<T extends AnyNode>( - this: Cheerio<T>, -): Record<string, string> | undefined; -/** - * Method for setting attributes. Sets the attribute value for only the first - * element in the matched set. If you set an attribute's value to `null`, you - * remove that attribute. You may also pass a `map` and `function`. - * - * @category Attributes - * @example - * - * ```js - * $('.apple').attr('id', 'favorite').html(); - * //=> <li class="apple" id="favorite">Apple</li> - * ``` - * - * @param name - Name of the attribute. - * @param value - The new value of the attribute. - * @returns The instance itself. - * @see {@link https://api.jquery.com/attr/} - */ -export function attr<T extends AnyNode>( - this: Cheerio<T>, - name: string, - value?: - | string - | null - | ((this: Element, i: number, attrib: string) => string | null), -): Cheerio<T>; -/** - * Method for setting multiple attributes at once. Sets the attribute value for - * only the first element in the matched set. If you set an attribute's value to - * `null`, you remove that attribute. - * - * @category Attributes - * @example - * - * ```js - * $('.apple').attr({ id: 'favorite' }).html(); - * //=> <li class="apple" id="favorite">Apple</li> - * ``` - * - * @param values - Map of attribute names and values. - * @returns The instance itself. - * @see {@link https://api.jquery.com/attr/} - */ -export function attr<T extends AnyNode>( - this: Cheerio<T>, - values: Record<string, string | null>, -): Cheerio<T>; -export function attr<T extends AnyNode>( - this: Cheerio<T>, - name?: string | Record<string, string | null>, - value?: - | string - | null - | ((this: Element, i: number, attrib: string) => string | null), -): string | Cheerio<T> | undefined | Record<string, string> { - // Set the value (with attr map support) - if (typeof name === 'object' || value !== undefined) { - if (typeof value === 'function') { - if (typeof name !== 'string') { - { - throw new Error('Bad combination of arguments.'); - } - } - return domEach(this, (el, i) => { - if (isTag(el)) setAttr(el, name, value.call(el, i, el.attribs[name])); - }); - } - return domEach(this, (el) => { - if (!isTag(el)) return; - - if (typeof name === 'object') { - for (const objName of Object.keys(name)) { - const objValue = name[objName]; - setAttr(el, objName, objValue); - } - } else { - setAttr(el, name as string, value as string); - } - }); - } - - return arguments.length > 1 - ? this - : getAttr(this[0], name as string, this.options.xmlMode); -} - -/** - * Gets a node's prop. - * - * @private - * @category Attributes - * @param el - Element to get the prop of. - * @param name - Name of the prop. - * @param xmlMode - Disable handling of special HTML attributes. - * @returns The prop's value. - */ -function getProp( - el: Element, - name: string, - xmlMode?: boolean, -): string | undefined | Element[keyof Element] { - return name in el - ? // @ts-expect-error TS doesn't like us accessing the value directly here. - el[name] - : !xmlMode && rboolean.test(name) - ? getAttr(el, name, false) !== undefined - : getAttr(el, name, xmlMode); -} - -/** - * Sets the value of a prop. - * - * @private - * @param el - The element to set the prop on. - * @param name - The prop's name. - * @param value - The prop's value. - * @param xmlMode - Disable handling of special HTML attributes. - */ -function setProp(el: Element, name: string, value: unknown, xmlMode?: boolean) { - if (name in el) { - // @ts-expect-error Overriding value - el[name] = value; - } else { - setAttr( - el, - name, - !xmlMode && rboolean.test(name) ? (value ? '' : null) : `${value}`, - ); - } -} - -interface StyleProp { - length: number; - [key: string]: string | number; - [index: number]: string; -} - -/** - * Method for getting and setting properties. Gets the property value for only - * the first element in the matched set. - * - * @category Attributes - * @example - * - * ```js - * $('input[type="checkbox"]').prop('checked'); - * //=> false - * - * $('input[type="checkbox"]').prop('checked', true).val(); - * //=> ok - * ``` - * - * @param name - Name of the property. - * @returns If `value` is specified the instance itself, otherwise the prop's - * value. - * @see {@link https://api.jquery.com/prop/} - */ -export function prop<T extends AnyNode>( - this: Cheerio<T>, - name: 'tagName' | 'nodeName', -): string | undefined; -export function prop<T extends AnyNode>( - this: Cheerio<T>, - name: 'innerHTML' | 'outerHTML' | 'innerText' | 'textContent', -): string | null; -/** - * Get a parsed CSS style object. - * - * @param name - Name of the property. - * @returns The style object, or `undefined` if the element has no `style` - * attribute. - */ -export function prop<T extends AnyNode>( - this: Cheerio<T>, - name: 'style', -): StyleProp | undefined; -/** - * Resolve `href` or `src` of supported elements. Requires the `baseURI` option - * to be set, and a global `URL` object to be part of the environment. - * - * @example With `baseURI` set to `'https://example.com'`: - * - * ```js - * $('<img src="image.png">').prop('src'); - * //=> 'https://example.com/image.png' - * ``` - * - * @param name - Name of the property. - * @returns The resolved URL, or `undefined` if the element is not supported. - */ -export function prop<T extends AnyNode>( - this: Cheerio<T>, - name: 'href' | 'src', -): string | undefined; -/** - * Get a property of an element. - * - * @param name - Name of the property. - * @returns The property's value. - */ -export function prop<T extends AnyNode, K extends keyof Element>( - this: Cheerio<T>, - name: K, -): Element[K]; -/** - * Set a property of an element. - * - * @param name - Name of the property. - * @param value - Value to set the property to. - * @returns The instance itself. - */ -export function prop<T extends AnyNode, K extends keyof Element>( - this: Cheerio<T>, - name: K, - value: - | Element[K] - | ((this: Element, i: number, prop: K) => Element[keyof Element]), -): Cheerio<T>; -/** - * Set multiple properties of an element. - * - * @example - * - * ```js - * $('input[type="checkbox"]').prop({ - * checked: true, - * disabled: false, - * }); - * ``` - * - * @param map - Object of properties to set. - * @returns The instance itself. - */ -export function prop<T extends AnyNode>( - this: Cheerio<T>, - map: Record<string, string | Element[keyof Element] | boolean>, -): Cheerio<T>; -/** - * Set a property of an element. - * - * @param name - Name of the property. - * @param value - Value to set the property to. - * @returns The instance itself. - */ -export function prop<T extends AnyNode>( - this: Cheerio<T>, - name: string, - value: - | string - | boolean - | null - | ((this: Element, i: number, prop: string) => string | boolean), -): Cheerio<T>; -/** - * Get a property of an element. - * - * @param name - The property's name. - * @returns The property's value. - */ -export function prop<T extends AnyNode>(this: Cheerio<T>, name: string): string; -export function prop<T extends AnyNode>( - this: Cheerio<T>, - name: string | Record<string, string | Element[keyof Element] | boolean>, - value?: - | (( - this: Element, - i: number, - prop: string | undefined, - ) => string | Element[keyof Element] | boolean) - | unknown, -): Cheerio<T> | string | undefined | null | Element[keyof Element] | StyleProp { - if (typeof name === 'string' && value === undefined) { - const el = this[0]; - - if (!el || !isTag(el)) return undefined; - - switch (name) { - case 'style': { - const property = this.css() as StyleProp; - const keys = Object.keys(property); - for (let i = 0; i < keys.length; i++) { - property[i] = keys[i]; - } - - property.length = keys.length; - - return property; - } - case 'tagName': - case 'nodeName': { - return el.name.toUpperCase(); - } - - case 'href': - case 'src': { - const prop = el.attribs?.[name]; - - if ( - typeof URL !== 'undefined' && - ((name === 'href' && (el.tagName === 'a' || el.tagName === 'link')) || - (name === 'src' && - (el.tagName === 'img' || - el.tagName === 'iframe' || - el.tagName === 'audio' || - el.tagName === 'video' || - el.tagName === 'source'))) && - prop !== undefined && - this.options.baseURI - ) { - return new URL(prop, this.options.baseURI).href; - } - - return prop; - } - - case 'innerText': { - return innerText(el); - } - - case 'textContent': { - return textContent(el); - } - - case 'outerHTML': { - return this.clone().wrap('<container />').parent().html(); - } - - case 'innerHTML': { - return this.html(); - } - - default: { - return getProp(el, name, this.options.xmlMode); - } - } - } - - if (typeof name === 'object' || value !== undefined) { - if (typeof value === 'function') { - if (typeof name === 'object') { - throw new TypeError('Bad combination of arguments.'); - } - return domEach(this, (el, i) => { - if (isTag(el)) { - setProp( - el, - name, - value.call(el, i, getProp(el, name, this.options.xmlMode)), - this.options.xmlMode, - ); - } - }); - } - - return domEach(this, (el) => { - if (!isTag(el)) return; - - if (typeof name === 'object') { - for (const key of Object.keys(name)) { - const val = name[key]; - setProp(el, key, val, this.options.xmlMode); - } - } else { - setProp(el, name, value, this.options.xmlMode); - } - }); - } - - return undefined; -} - -/** - * An element with a data attribute. - * - * @private - */ -interface DataElement extends Element { - /** The data attribute. */ - data?: Record<string, unknown>; -} - -/** - * Sets the value of a data attribute. - * - * @private - * @param elem - The element to set the data attribute on. - * @param name - The data attribute's name. - * @param value - The data attribute's value. - */ -function setData( - elem: DataElement, - name: string | Record<string, unknown>, - value?: unknown, -) { - elem.data ??= {}; - - if (typeof name === 'object') Object.assign(elem.data, name); - else if (typeof name === 'string' && value !== undefined) { - elem.data[name] = value; - } -} - -/** - * Read _all_ HTML5 `data-*` attributes from the equivalent HTML5 `data-*` - * attribute, and cache the value in the node's internal data store. - * - * @private - * @category Attributes - * @param el - Element to get the data attribute of. - * @returns A map with all of the data attributes. - */ -function readAllData(el: DataElement): unknown { - for (const domName of Object.keys(el.attribs)) { - if (!domName.startsWith(dataAttrPrefix)) { - continue; - } - - const jsName = camelCase(domName.slice(dataAttrPrefix.length)); - - if (!hasOwn.call(el.data, jsName)) { - el.data![jsName] = parseDataValue(el.attribs[domName]); - } - } - - return el.data; -} - -/** - * Read the specified attribute from the equivalent HTML5 `data-*` attribute, - * and (if present) cache the value in the node's internal data store. - * - * @private - * @category Attributes - * @param el - Element to get the data attribute of. - * @param name - Name of the data attribute. - * @returns The data attribute's value. - */ -function readData(el: DataElement, name: string): unknown { - const domName = dataAttrPrefix + cssCase(name); - const data = el.data!; - - if (hasOwn.call(data, name)) { - return data[name]; - } - - if (hasOwn.call(el.attribs, domName)) { - return (data[name] = parseDataValue(el.attribs[domName])); - } - - return undefined; -} - -/** - * Coerce string data-* attributes to their corresponding JavaScript primitives. - * - * @private - * @category Attributes - * @param value - The value to parse. - * @returns The parsed value. - */ -function parseDataValue(value: string): unknown { - if (value === 'null') return null; - if (value === 'true') return true; - if (value === 'false') return false; - const num = Number(value); - if (value === String(num)) return num; - if (rbrace.test(value)) { - try { - return JSON.parse(value); - } catch { - /* Ignore */ - } - } - return value; -} - -/** - * Method for getting data attributes, for only the first element in the matched - * set. - * - * @category Attributes - * @example - * - * ```js - * $('<div data-apple-color="red"></div>').data('apple-color'); - * //=> 'red' - * ``` - * - * @param name - Name of the data attribute. - * @returns The data attribute's value, or `undefined` if the attribute does not - * exist. - * @see {@link https://api.jquery.com/data/} - */ -export function data<T extends AnyNode>( - this: Cheerio<T>, - name: string, -): unknown | undefined; -/** - * Method for getting all of an element's data attributes, for only the first - * element in the matched set. - * - * @category Attributes - * @example - * - * ```js - * $('<div data-apple-color="red"></div>').data(); - * //=> { appleColor: 'red' } - * ``` - * - * @returns A map with all of the data attributes. - * @see {@link https://api.jquery.com/data/} - */ -export function data<T extends AnyNode>( - this: Cheerio<T>, -): Record<string, unknown>; -/** - * Method for setting data attributes, for only the first element in the matched - * set. - * - * @category Attributes - * @example - * - * ```js - * const apple = $('.apple').data('kind', 'mac'); - * - * apple.data('kind'); - * //=> 'mac' - * ``` - * - * @param name - Name of the data attribute. - * @param value - The new value. - * @returns The instance itself. - * @see {@link https://api.jquery.com/data/} - */ -export function data<T extends AnyNode>( - this: Cheerio<T>, - name: string, - value: unknown, -): Cheerio<T>; -/** - * Method for setting multiple data attributes at once, for only the first - * element in the matched set. - * - * @category Attributes - * @example - * - * ```js - * const apple = $('.apple').data({ kind: 'mac' }); - * - * apple.data('kind'); - * //=> 'mac' - * ``` - * - * @param values - Map of names to values. - * @returns The instance itself. - * @see {@link https://api.jquery.com/data/} - */ -export function data<T extends AnyNode>( - this: Cheerio<T>, - values: Record<string, unknown>, -): Cheerio<T>; -export function data<T extends AnyNode>( - this: Cheerio<T>, - name?: string | Record<string, unknown>, - value?: unknown, -): unknown | Cheerio<T> | undefined | Record<string, unknown> { - const elem = this[0]; - - if (!elem || !isTag(elem)) return; - - const dataEl: DataElement = elem; - dataEl.data ??= {}; - - // Return the entire data object if no data specified - if (name == null) { - return readAllData(dataEl); - } - - // Set the value (with attr map support) - if (typeof name === 'object' || value !== undefined) { - domEach(this, (el) => { - if (isTag(el)) { - if (typeof name === 'object') setData(el, name); - else setData(el, name, value as unknown); - } - }); - return this; - } - - return readData(dataEl, name); -} - -/** - * Method for getting the value of input, select, and textarea. Note: Support - * for `map`, and `function` has not been added yet. - * - * @category Attributes - * @example - * - * ```js - * $('input[type="text"]').val(); - * //=> input_text - * ``` - * - * @returns The value. - * @see {@link https://api.jquery.com/val/} - */ -export function val<T extends AnyNode>( - this: Cheerio<T>, -): string | undefined | string[]; -/** - * Method for setting the value of input, select, and textarea. Note: Support - * for `map`, and `function` has not been added yet. - * - * @category Attributes - * @example - * - * ```js - * $('input[type="text"]').val('test').html(); - * //=> <input type="text" value="test"/> - * ``` - * - * @param value - The new value. - * @returns The instance itself. - * @see {@link https://api.jquery.com/val/} - */ -export function val<T extends AnyNode>( - this: Cheerio<T>, - value: string | string[], -): Cheerio<T>; -export function val<T extends AnyNode>( - this: Cheerio<T>, - value?: string | string[], -): string | string[] | Cheerio<T> | undefined { - const querying = arguments.length === 0; - const element = this[0]; - - if (!element || !isTag(element)) return querying ? undefined : this; - - switch (element.name) { - case 'textarea': { - return this.text(value as string); - } - case 'select': { - const option = this.find('option:selected'); - if (!querying) { - if (this.attr('multiple') == null && typeof value === 'object') { - return this; - } - - this.find('option').removeAttr('selected'); - - const values = typeof value === 'object' ? value : [value]; - for (const val of values) { - this.find(`option[value="${val}"]`).attr('selected', ''); - } - - return this; - } - - return this.attr('multiple') - ? option.toArray().map((el) => text(el.children)) - : option.attr('value'); - } - case 'input': - case 'option': { - return querying - ? this.attr('value') - : this.attr('value', value as string); - } - } - - return undefined; -} - -/** - * Remove an attribute. - * - * @private - * @param elem - Node to remove attribute from. - * @param name - Name of the attribute to remove. - */ -function removeAttribute(elem: Element, name: string) { - if (!elem.attribs || !hasOwn.call(elem.attribs, name)) return; - - delete elem.attribs[name]; -} - -/** - * Splits a space-separated list of names to individual names. - * - * @category Attributes - * @param names - Names to split. - * @returns - Split names. - */ -function splitNames(names?: string): string[] { - return names ? names.trim().split(rspace) : []; -} - -/** - * Method for removing attributes by `name`. - * - * @category Attributes - * @example - * - * ```js - * $('.pear').removeAttr('class').html(); - * //=> <li>Pear</li> - * - * $('.apple').attr('id', 'favorite'); - * $('.apple').removeAttr('id class').html(); - * //=> <li>Apple</li> - * ``` - * - * @param name - Name of the attribute. - * @returns The instance itself. - * @see {@link https://api.jquery.com/removeAttr/} - */ -export function removeAttr<T extends AnyNode>( - this: Cheerio<T>, - name: string, -): Cheerio<T> { - const attrNames = splitNames(name); - - for (const attrName of attrNames) { - domEach(this, (elem) => { - if (isTag(elem)) removeAttribute(elem, attrName); - }); - } - - return this; -} - -/** - * Check to see if _any_ of the matched elements have the given `className`. - * - * @category Attributes - * @example - * - * ```js - * $('.pear').hasClass('pear'); - * //=> true - * - * $('apple').hasClass('fruit'); - * //=> false - * - * $('li').hasClass('pear'); - * //=> true - * ``` - * - * @param className - Name of the class. - * @returns Indicates if an element has the given `className`. - * @see {@link https://api.jquery.com/hasClass/} - */ -export function hasClass<T extends AnyNode>( - this: Cheerio<T>, - className: string, -): boolean { - return this.toArray().some((elem) => { - const clazz = isTag(elem) && elem.attribs['class']; - let idx = -1; - - if (clazz && className.length > 0) { - while ((idx = clazz.indexOf(className, idx + 1)) > -1) { - const end = idx + className.length; - - if ( - (idx === 0 || rspace.test(clazz[idx - 1])) && - (end === clazz.length || rspace.test(clazz[end])) - ) { - return true; - } - } - } - - return false; - }); -} - -/** - * Adds class(es) to all of the matched elements. Also accepts a `function`. - * - * @category Attributes - * @example - * - * ```js - * $('.pear').addClass('fruit').html(); - * //=> <li class="pear fruit">Pear</li> - * - * $('.apple').addClass('fruit red').html(); - * //=> <li class="apple fruit red">Apple</li> - * ``` - * - * @param value - Name of new class. - * @returns The instance itself. - * @see {@link https://api.jquery.com/addClass/} - */ -export function addClass<T extends AnyNode, R extends ArrayLike<T>>( - this: R, - value?: - | string - | ((this: Element, i: number, className: string) => string | undefined), -): R { - // Support functions - if (typeof value === 'function') { - return domEach(this, (el, i) => { - if (isTag(el)) { - const className = el.attribs['class'] || ''; - addClass.call([el], value.call(el, i, className)); - } - }); - } - - // Return if no value or not a string or function - if (!value || typeof value !== 'string') return this; - - const classNames = value.split(rspace); - const numElements = this.length; - - for (let i = 0; i < numElements; i++) { - const el = this[i]; - // If selected element isn't a tag, move on - if (!isTag(el)) continue; - - // If we don't already have classes — always set xmlMode to false here, as it doesn't matter for classes - const className = getAttr(el, 'class', false); - - if (className) { - let setClass = ` ${className} `; - - // Check if class already exists - for (const cn of classNames) { - const appendClass = `${cn} `; - if (!setClass.includes(` ${appendClass}`)) setClass += appendClass; - } - - setAttr(el, 'class', setClass.trim()); - } else { - setAttr(el, 'class', classNames.join(' ').trim()); - } - } - - return this; -} - -/** - * Removes one or more space-separated classes from the selected elements. If no - * `className` is defined, all classes will be removed. Also accepts a - * `function`. - * - * @category Attributes - * @example - * - * ```js - * $('.pear').removeClass('pear').html(); - * //=> <li class="">Pear</li> - * - * $('.apple').addClass('red').removeClass().html(); - * //=> <li class="">Apple</li> - * ``` - * - * @param name - Name of the class. If not specified, removes all elements. - * @returns The instance itself. - * @see {@link https://api.jquery.com/removeClass/} - */ -export function removeClass<T extends AnyNode, R extends ArrayLike<T>>( - this: R, - name?: - | string - | ((this: Element, i: number, className: string) => string | undefined), -): R { - // Handle if value is a function - if (typeof name === 'function') { - return domEach(this, (el, i) => { - if (isTag(el)) { - removeClass.call([el], name.call(el, i, el.attribs['class'] || '')); - } - }); - } - - const classes = splitNames(name); - const numClasses = classes.length; - const removeAll = arguments.length === 0; - - return domEach(this, (el) => { - if (!isTag(el)) return; - - if (removeAll) { - // Short circuit the remove all case as this is the nice one - el.attribs['class'] = ''; - } else { - const elClasses = splitNames(el.attribs['class']); - let changed = false; - - for (let j = 0; j < numClasses; j++) { - const index = elClasses.indexOf(classes[j]); - - if (index >= 0) { - elClasses.splice(index, 1); - changed = true; - - /* - * We have to do another pass to ensure that there are not duplicate - * classes listed - */ - j--; - } - } - if (changed) { - el.attribs['class'] = elClasses.join(' '); - } - } - }); -} - -/** - * Add or remove class(es) from the matched elements, depending on either the - * class's presence or the value of the switch argument. Also accepts a - * `function`. - * - * @category Attributes - * @example - * - * ```js - * $('.apple.green').toggleClass('fruit green red').html(); - * //=> <li class="apple fruit red">Apple</li> - * - * $('.apple.green').toggleClass('fruit green red', true).html(); - * //=> <li class="apple green fruit red">Apple</li> - * ``` - * - * @param value - Name of the class. Can also be a function. - * @param stateVal - If specified the state of the class. - * @returns The instance itself. - * @see {@link https://api.jquery.com/toggleClass/} - */ -export function toggleClass<T extends AnyNode, R extends ArrayLike<T>>( - this: R, - value?: - | string - | (( - this: Element, - i: number, - className: string, - stateVal?: boolean, - ) => string), - stateVal?: boolean, -): R { - // Support functions - if (typeof value === 'function') { - return domEach(this, (el, i) => { - if (isTag(el)) { - toggleClass.call( - [el], - value.call(el, i, el.attribs['class'] || '', stateVal), - stateVal, - ); - } - }); - } - - // Return if no value or not a string or function - if (!value || typeof value !== 'string') return this; - - const classNames = value.split(rspace); - const numClasses = classNames.length; - const state = typeof stateVal === 'boolean' ? (stateVal ? 1 : -1) : 0; - const numElements = this.length; - - for (let i = 0; i < numElements; i++) { - const el = this[i]; - // If selected element isn't a tag, move on - if (!isTag(el)) continue; - - const elementClasses = splitNames(el.attribs['class']); - - // Check if class already exists - for (let j = 0; j < numClasses; j++) { - // Check if the class name is currently defined - const index = elementClasses.indexOf(classNames[j]); - - // Add if stateValue === true or we are toggling and there is no value - if (state >= 0 && index < 0) { - elementClasses.push(classNames[j]); - } else if (state <= 0 && index >= 0) { - // Otherwise remove but only if the item exists - elementClasses.splice(index, 1); - } - } - - el.attribs['class'] = elementClasses.join(' '); - } - - return this; -} diff --git a/node_modules/cheerio/src/api/css.spec.ts b/node_modules/cheerio/src/api/css.spec.ts deleted file mode 100644 index f6455c2..0000000 --- a/node_modules/cheerio/src/api/css.spec.ts +++ /dev/null @@ -1,138 +0,0 @@ -import { describe, it, expect, beforeEach } from 'vitest'; -import { load, type Cheerio } from '../index.js'; -import type { Element } from 'domhandler'; -import { cheerio, mixedText } from '../__fixtures__/fixtures.js'; - -describe('$(...)', () => { - describe('.css', () => { - it('(prop): should return a css property value', () => { - const el = cheerio('<li style="hai: there">'); - expect(el.css('hai')).toBe('there'); - }); - - it('([prop1, prop2]): should return the specified property values as an object', () => { - const el = cheerio( - '<li style="margin: 1px; padding: 2px; color: blue;">', - ); - expect(el.css(['margin', 'color'])).toStrictEqual({ - margin: '1px', - color: 'blue', - }); - }); - - it('(prop, val): should set a css property', () => { - const el = cheerio('<li style="margin: 0;"></li><li></li>'); - el.css('color', 'red'); - expect(el.attr('style')).toBe('margin: 0; color: red;'); - expect(el.eq(1).attr('style')).toBe('color: red;'); - }); - - it('(prop, val) : should skip text nodes', () => { - const $text = load(mixedText); - const $body = $text($text('body')[0].children); - - $body.css('test', 'value'); - - expect($text('body').html()).toBe( - '<a style="test: value;">1</a>TEXT<b style="test: value;">2</b>', - ); - }); - - it('(prop, ""): should unset a css property', () => { - const el = cheerio('<li style="padding: 1px; margin: 0;">'); - el.css('padding', ''); - expect(el.attr('style')).toBe('margin: 0;'); - }); - - it('(any, val): should ignore unsupported prop types', () => { - const el = cheerio('<li style="padding: 1px;">'); - el.css(123 as never, 'test'); - expect(el.attr('style')).toBe('padding: 1px;'); - }); - - it('(prop): should not mangle embedded urls', () => { - const el = cheerio( - '<li style="background-image:url(http://example.com/img.png);">', - ); - expect(el.css('background-image')).toBe( - 'url(http://example.com/img.png)', - ); - }); - - it('(prop): should ignore blank properties', () => { - const el = cheerio('<li style=":#ccc;color:#aaa;">'); - expect(el.css()).toStrictEqual({ color: '#aaa' }); - }); - - it('(prop): should ignore blank values', () => { - const el = cheerio('<li style="color:;position:absolute;">'); - expect(el.css()).toStrictEqual({ position: 'absolute' }); - }); - - it('(prop): should return undefined for unmatched elements', () => { - const $ = load('<li style="color:;position:absolute;">'); - expect($('ul').css('background-image')).toBeUndefined(); - }); - - it('(prop): should return undefined for unmatched styles', () => { - const el = cheerio('<li style="color:;position:absolute;">'); - expect(el.css('margin')).toBeUndefined(); - }); - - describe('(prop, function):', () => { - let $el: Cheerio<Element>; - beforeEach(() => { - const $ = load( - '<div style="margin: 0px;"></div><div style="margin: 1px;"></div><div style="margin: 2px;">', - ); - $el = $('div'); - }); - - it('should iterate over the selection', () => { - let count = 0; - $el.css('margin', function (idx, value) { - expect(idx).toBe(count); - expect(value).toBe(`${count}px`); - expect(this).toBe($el[count]); - count++; - return undefined; - }); - expect(count).toBe(3); - }); - - it('should set each attribute independently', () => { - const values = ['4px', '', undefined]; - $el.css('margin', (idx) => values[idx]); - expect($el.eq(0).attr('style')).toBe('margin: 4px;'); - expect($el.eq(1).attr('style')).toBe(''); - expect($el.eq(2).attr('style')).toBe('margin: 2px;'); - }); - }); - - it('(obj): should set each key and val', () => { - const el = cheerio('<li style="padding: 0;"></li><li></li>'); - el.css({ foo: 0 } as never); - expect(el.eq(0).attr('style')).toBe('padding: 0; foo: 0;'); - expect(el.eq(1).attr('style')).toBe('foo: 0;'); - }); - - describe('parser', () => { - it('should allow any whitespace between declarations', () => { - const el = cheerio('<li style="one \t:\n 0;\n two \f\r:\v 1">'); - expect(el.css(['one', 'two', 'five'])).toStrictEqual({ - one: '0', - two: '1', - }); - }); - - it('should add malformed values to previous field (#1134)', () => { - const el = cheerio( - '<button style="background-image: url(data:image/png;base64,iVBORw0KGgo)"></button>', - ); - expect(el.css('background-image')).toStrictEqual( - 'url(data:image/png;base64,iVBORw0KGgo)', - ); - }); - }); - }); -}); diff --git a/node_modules/cheerio/src/api/css.ts b/node_modules/cheerio/src/api/css.ts deleted file mode 100644 index 9a1564a..0000000 --- a/node_modules/cheerio/src/api/css.ts +++ /dev/null @@ -1,224 +0,0 @@ -import { domEach } from '../utils.js'; -import { isTag, type Element, type AnyNode } from 'domhandler'; -import type { Cheerio } from '../cheerio.js'; - -/** - * Get the value of a style property for the first element in the set of matched - * elements. - * - * @category CSS - * @param names - Optionally the names of the properties of interest. - * @returns A map of all of the style properties. - * @see {@link https://api.jquery.com/css/} - */ -export function css<T extends AnyNode>( - this: Cheerio<T>, - names?: string[], -): Record<string, string> | undefined; -/** - * Get the value of a style property for the first element in the set of matched - * elements. - * - * @category CSS - * @param name - The name of the property. - * @returns The property value for the given name. - * @see {@link https://api.jquery.com/css/} - */ -export function css<T extends AnyNode>( - this: Cheerio<T>, - name: string, -): string | undefined; -/** - * Set one CSS property for every matched element. - * - * @category CSS - * @param prop - The name of the property. - * @param val - The new value. - * @returns The instance itself. - * @see {@link https://api.jquery.com/css/} - */ -export function css<T extends AnyNode>( - this: Cheerio<T>, - prop: string, - val: - | string - | ((this: Element, i: number, style: string) => string | undefined), -): Cheerio<T>; -/** - * Set multiple CSS properties for every matched element. - * - * @category CSS - * @param map - A map of property names and values. - * @returns The instance itself. - * @see {@link https://api.jquery.com/css/} - */ -export function css<T extends AnyNode>( - this: Cheerio<T>, - map: Record<string, string>, -): Cheerio<T>; -/** - * Set multiple CSS properties for every matched element. - * - * @category CSS - * @param prop - The names of the properties. - * @param val - The new values. - * @returns The instance itself. - * @see {@link https://api.jquery.com/css/} - */ -export function css<T extends AnyNode>( - this: Cheerio<T>, - prop?: string | string[] | Record<string, string>, - val?: - | string - | ((this: Element, i: number, style: string) => string | undefined), -): Cheerio<T> | Record<string, string> | string | undefined { - if ( - (prop != null && val != null) || - // When `prop` is a "plain" object - (typeof prop === 'object' && !Array.isArray(prop)) - ) { - return domEach(this, (el, i) => { - if (isTag(el)) { - // `prop` can't be an array here anymore. - setCss(el, prop as string, val, i); - } - }); - } - - if (this.length === 0) { - return undefined; - } - - return getCss(this[0], prop as string); -} - -/** - * Set styles of all elements. - * - * @private - * @param el - Element to set style of. - * @param prop - Name of property. - * @param value - Value to set property to. - * @param idx - Optional index within the selection. - */ -function setCss( - el: Element, - prop: string | Record<string, string>, - value: - | string - | ((this: Element, i: number, style: string) => string | undefined) - | undefined, - idx: number, -) { - if (typeof prop === 'string') { - const styles = getCss(el); - - const val = - typeof value === 'function' ? value.call(el, idx, styles[prop]) : value; - - if (val === '') { - delete styles[prop]; - } else if (val != null) { - styles[prop] = val; - } - - el.attribs['style'] = stringify(styles); - } else if (typeof prop === 'object') { - const keys = Object.keys(prop); - for (let i = 0; i < keys.length; i++) { - const k = keys[i]; - setCss(el, k, prop[k], i); - } - } -} - -/** - * Get the parsed styles of the first element. - * - * @private - * @category CSS - * @param el - Element to get styles from. - * @param props - Optionally the names of the properties of interest. - * @returns The parsed styles. - */ -function getCss(el: AnyNode, props?: string[]): Record<string, string>; -/** - * Get a property from the parsed styles of the first element. - * - * @private - * @category CSS - * @param el - Element to get styles from. - * @param prop - Name of the prop. - * @returns The value of the property. - */ -function getCss(el: AnyNode, prop: string): string | undefined; -function getCss( - el: AnyNode, - prop?: string | string[], -): Record<string, string> | string | undefined { - if (!el || !isTag(el)) return; - - const styles = parse(el.attribs['style']); - if (typeof prop === 'string') { - return styles[prop]; - } - if (Array.isArray(prop)) { - const newStyles: Record<string, string> = {}; - for (const item of prop) { - if (styles[item] != null) { - newStyles[item] = styles[item]; - } - } - return newStyles; - } - return styles; -} - -/** - * Stringify `obj` to styles. - * - * @private - * @category CSS - * @param obj - Object to stringify. - * @returns The serialized styles. - */ -function stringify(obj: Record<string, string>): string { - return Object.keys(obj).reduce( - (str, prop) => `${str}${str ? ' ' : ''}${prop}: ${obj[prop]};`, - '', - ); -} - -/** - * Parse `styles`. - * - * @private - * @category CSS - * @param styles - Styles to be parsed. - * @returns The parsed styles. - */ -function parse(styles: string): Record<string, string> { - styles = (styles || '').trim(); - - if (!styles) return {}; - - const obj: Record<string, string> = {}; - - let key: string | undefined; - - for (const str of styles.split(';')) { - const n = str.indexOf(':'); - // If there is no :, or if it is the first/last character, add to the previous item's value - if (n < 1 || n === str.length - 1) { - const trimmed = str.trimEnd(); - if (trimmed.length > 0 && key !== undefined) { - obj[key] += `;${trimmed}`; - } - } else { - key = str.slice(0, n).trim(); - obj[key] = str.slice(n + 1).trim(); - } - } - - return obj; -} diff --git a/node_modules/cheerio/src/api/extract.spec.ts b/node_modules/cheerio/src/api/extract.spec.ts deleted file mode 100644 index b243212..0000000 --- a/node_modules/cheerio/src/api/extract.spec.ts +++ /dev/null @@ -1,121 +0,0 @@ -import { describe, it, expect } from 'vitest'; -import * as fixtures from '../__fixtures__/fixtures.js'; -import { load } from '../load-parse.js'; - -interface RedSelObject { - red: string | undefined; - sel: string | undefined; -} - -interface RedSelMultipleObject { - red: string[]; - sel: string[]; -} - -describe('$.extract', () => { - it('() : should extract values for selectors', () => { - const $ = load(fixtures.eleven); - const $root = load(fixtures.eleven).root(); - // An empty object should lead to an empty extraction. - - // $ExpectType ExtractedMap<{}> - const emptyExtract = $root.extract({}); - expect(emptyExtract).toStrictEqual({}); - // Non-existent values should be undefined. - - // $ExpectType ExtractedMap<{ foo: string; }> - const simpleExtract = $root.extract({ foo: 'bar' }); - expect(simpleExtract).toStrictEqual({ foo: undefined }); - - // Existing values should be extracted. - expect<{ red: string | undefined }>( - $root.extract({ red: '.red' }), - ).toStrictEqual({ - red: 'Four', - }); - expect<RedSelObject>( - $root.extract({ red: '.red', sel: '.sel' }), - ).toStrictEqual({ - red: 'Four', - sel: 'Three', - }); - // Descriptors for extractions should be supported - expect<RedSelObject>( - $root.extract({ - red: { selector: '.red' }, - sel: { selector: '.sel' }, - }), - ).toStrictEqual({ red: 'Four', sel: 'Three' }); - // Should support extraction of multiple values. - - // $ExpectType ExtractedMap<{ red: [string]; sel: [string]; }> - const multipleExtract = $root.extract({ - red: ['.red'], - sel: ['.sel'], - }); - expect<RedSelMultipleObject>(multipleExtract).toStrictEqual({ - red: ['Four', 'Five', 'Nine'], - sel: ['Three', 'Nine', 'Eleven'], - }); - // Should support custom `prop`s. - expect<RedSelObject>( - $root.extract({ - red: { selector: '.red', value: 'outerHTML' }, - sel: { selector: '.sel', value: 'tagName' }, - }), - ).toStrictEqual({ red: '<li class="red">Four</li>', sel: 'LI' }); - // Should support custom `prop`s for multiple values. - expect<{ red: string[] }>( - $root.extract({ - red: [{ selector: '.red', value: 'outerHTML' }], - }), - ).toStrictEqual({ - red: [ - '<li class="red">Four</li>', - '<li class="red">Five</li>', - '<li class="red sel">Nine</li>', - ], - }); - // Should support custom extraction functions. - expect<{ red: string | undefined }>( - $root.extract({ - red: { - selector: '.red', - value: (el, key) => `${key}=${$(el).text()}`, - }, - }), - ).toStrictEqual({ red: 'red=Four' }); - // Should support custom extraction functions for multiple values. - expect<{ red: string[] }>( - $root.extract({ - red: [ - { - selector: '.red', - value: (el, key) => `${key}=${$(el).text()}`, - }, - ], - }), - ).toStrictEqual({ red: ['red=Four', 'red=Five', 'red=Nine'] }); - // Should support extraction objects - - // $ExpectType ExtractedMap<{ section: { selector: string; value: { red: string; sel: string; }; }; }> - const subExtractObject = $root.extract({ - section: { - selector: 'ul:nth(1)', - value: { - red: '.red', - sel: '.blue', - }, - }, - }); - - expect<{ section: RedSelObject | undefined }>( - subExtractObject, - ).toStrictEqual({ - section: { - red: 'Five', - sel: 'Seven', - }, - }); - }); -}); diff --git a/node_modules/cheerio/src/api/extract.ts b/node_modules/cheerio/src/api/extract.ts deleted file mode 100644 index 10bd529..0000000 --- a/node_modules/cheerio/src/api/extract.ts +++ /dev/null @@ -1,92 +0,0 @@ -import type { AnyNode, Element } from 'domhandler'; -import type { Cheerio } from '../cheerio.js'; -import type { prop } from './attributes.js'; - -type ExtractDescriptorFn = ( - el: Element, - key: string, - // TODO: This could be typed with ExtractedMap - obj: Record<string, unknown>, -) => unknown; - -interface ExtractDescriptor { - selector: string; - value?: string | ExtractDescriptorFn | ExtractMap; -} - -type ExtractValue = string | ExtractDescriptor | [string | ExtractDescriptor]; - -export interface ExtractMap { - [key: string]: ExtractValue; -} - -type ExtractedValue<V extends ExtractValue, M extends ExtractMap> = V extends [ - string | ExtractDescriptor, -] - ? NonNullable<ExtractedValue<V[0], M>>[] - : V extends string - ? string | undefined - : V extends ExtractDescriptor - ? V['value'] extends ExtractMap - ? ExtractedMap<V['value']> | undefined - : V['value'] extends ExtractDescriptorFn - ? ReturnType<V['value']> | undefined - : ReturnType<typeof prop> | undefined - : never; - -export type ExtractedMap<M extends ExtractMap> = { - [key in keyof M]: ExtractedValue<M[key], M>; -}; - -function getExtractDescr( - descr: string | ExtractDescriptor, -): Required<ExtractDescriptor> { - if (typeof descr === 'string') { - return { selector: descr, value: 'textContent' }; - } - - return { - selector: descr.selector, - value: descr.value ?? 'textContent', - }; -} - -/** - * Extract multiple values from a document, and store them in an object. - * - * @param map - An object containing key-value pairs. The keys are the names of - * the properties to be created on the object, and the values are the - * selectors to be used to extract the values. - * @returns An object containing the extracted values. - */ -export function extract<M extends ExtractMap, T extends AnyNode>( - this: Cheerio<T>, - map: M, -): ExtractedMap<M> { - const ret: Record<string, unknown> = {}; - - for (const key in map) { - const descr = map[key]; - const isArray = Array.isArray(descr); - - const { selector, value } = getExtractDescr(isArray ? descr[0] : descr); - - const fn: ExtractDescriptorFn = - typeof value === 'function' - ? value - : typeof value === 'string' - ? (el: Element) => this._make(el).prop(value) - : (el: Element) => this._make(el).extract(value); - - if (isArray) { - ret[key] = this._findBySelector(selector, Number.POSITIVE_INFINITY) - .map((_, el) => fn(el, key, ret)) - .get(); - } else { - const $ = this._findBySelector(selector, 1); - ret[key] = $.length > 0 ? fn($[0], key, ret) : undefined; - } - } - - return ret as ExtractedMap<M>; -} diff --git a/node_modules/cheerio/src/api/forms.spec.ts b/node_modules/cheerio/src/api/forms.spec.ts deleted file mode 100644 index ddd3d75..0000000 --- a/node_modules/cheerio/src/api/forms.spec.ts +++ /dev/null @@ -1,155 +0,0 @@ -import { describe, it, expect, beforeEach } from 'vitest'; -import { type CheerioAPI } from '../index.js'; -import { cheerio, forms } from '../__fixtures__/fixtures.js'; - -describe('$(...)', () => { - let $: CheerioAPI; - - beforeEach(() => { - $ = cheerio.load(forms); - }); - - describe('.serializeArray', () => { - it('() : should get form controls', () => { - expect($('form#simple').serializeArray()).toStrictEqual([ - { - name: 'fruit', - value: 'Apple', - }, - ]); - }); - - it('() : should get nested form controls', () => { - expect($('form#nested').serializeArray()).toHaveLength(2); - const data = $('form#nested').serializeArray(); - data.sort((a, b) => (a.value > b.value ? 1 : -1)); - expect(data).toStrictEqual([ - { - name: 'fruit', - value: 'Apple', - }, - { - name: 'vegetable', - value: 'Carrot', - }, - ]); - }); - - it('() : should not get disabled form controls', () => { - expect($('form#disabled').serializeArray()).toStrictEqual([]); - }); - - it('() : should not get form controls with the wrong type', () => { - expect($('form#submit').serializeArray()).toStrictEqual([ - { - name: 'fruit', - value: 'Apple', - }, - ]); - }); - - it('() : should get selected options', () => { - expect($('form#select').serializeArray()).toStrictEqual([ - { - name: 'fruit', - value: 'Orange', - }, - ]); - }); - - it('() : should not get unnamed form controls', () => { - expect($('form#unnamed').serializeArray()).toStrictEqual([ - { - name: 'fruit', - value: 'Apple', - }, - ]); - }); - - it('() : should get multiple selected options', () => { - expect($('form#multiple').serializeArray()).toHaveLength(2); - const data = $('form#multiple').serializeArray(); - data.sort((a, b) => (a.value > b.value ? 1 : -1)); - expect(data).toStrictEqual([ - { - name: 'fruit', - value: 'Apple', - }, - { - name: 'fruit', - value: 'Orange', - }, - ]); - }); - - it('() : should get individually selected elements', () => { - const data = $('form#nested input').serializeArray(); - data.sort((a, b) => (a.value > b.value ? 1 : -1)); - expect(data).toStrictEqual([ - { - name: 'fruit', - value: 'Apple', - }, - { - name: 'vegetable', - value: 'Carrot', - }, - ]); - }); - - it('() : should standardize line breaks', () => { - expect($('form#textarea').serializeArray()).toStrictEqual([ - { - name: 'fruits', - value: 'Apple\r\nOrange', - }, - ]); - }); - - it("() : shouldn't serialize the empty string", () => { - expect($('<input value=pineapple>').serializeArray()).toStrictEqual([]); - expect( - $('<input name="" value=pineapple>').serializeArray(), - ).toStrictEqual([]); - expect( - $('<input name="fruit" value=pineapple>').serializeArray(), - ).toStrictEqual([ - { - name: 'fruit', - value: 'pineapple', - }, - ]); - }); - - it('() : should serialize inputs without value attributes', () => { - expect($('<input name="fruit">').serializeArray()).toStrictEqual([ - { - name: 'fruit', - value: '', - }, - ]); - }); - }); - - describe('.serialize', () => { - it('() : should get form controls', () => { - expect($('form#simple').serialize()).toBe('fruit=Apple'); - }); - - it('() : should get nested form controls', () => { - expect($('form#nested').serialize()).toBe('fruit=Apple&vegetable=Carrot'); - }); - - it('() : should not get disabled form controls', () => { - expect($('form#disabled').serialize()).toBe(''); - }); - - it('() : should get multiple selected options', () => { - expect($('form#multiple').serialize()).toBe('fruit=Apple&fruit=Orange'); - }); - - it("() : should encode spaces as +'s", () => { - expect($('form#spaces').serialize()).toBe('fruit=Blood+orange'); - }); - }); -}); diff --git a/node_modules/cheerio/src/api/forms.ts b/node_modules/cheerio/src/api/forms.ts deleted file mode 100644 index 902f919..0000000 --- a/node_modules/cheerio/src/api/forms.ts +++ /dev/null @@ -1,103 +0,0 @@ -import { isTag, type AnyNode } from 'domhandler'; -import type { Cheerio } from '../cheerio.js'; - -/* - * https://github.com/jquery/jquery/blob/2.1.3/src/manipulation/var/rcheckableType.js - * https://github.com/jquery/jquery/blob/2.1.3/src/serialize.js - */ -const submittableSelector = 'input,select,textarea,keygen'; -const r20 = /%20/g; -const rCRLF = /\r?\n/g; - -/** - * Encode a set of form elements as a string for submission. - * - * @category Forms - * @example - * - * ```js - * $('<form><input name="foo" value="bar" /></form>').serialize(); - * //=> 'foo=bar' - * ``` - * - * @returns The serialized form. - * @see {@link https://api.jquery.com/serialize/} - */ -export function serialize<T extends AnyNode>(this: Cheerio<T>): string { - // Convert form elements into name/value objects - const arr = this.serializeArray(); - - // Serialize each element into a key/value string - const retArr = arr.map( - (data) => - `${encodeURIComponent(data.name)}=${encodeURIComponent(data.value)}`, - ); - - // Return the resulting serialization - return retArr.join('&').replace(r20, '+'); -} - -/** - * Encode a set of form elements as an array of names and values. - * - * @category Forms - * @example - * - * ```js - * $('<form><input name="foo" value="bar" /></form>').serializeArray(); - * //=> [ { name: 'foo', value: 'bar' } ] - * ``` - * - * @returns The serialized form. - * @see {@link https://api.jquery.com/serializeArray/} - */ -export function serializeArray<T extends AnyNode>( - this: Cheerio<T>, -): { - name: string; - value: string; -}[] { - // Resolve all form elements from either forms or collections of form elements - return this.map((_, elem) => { - const $elem = this._make(elem); - if (isTag(elem) && elem.name === 'form') { - return $elem.find(submittableSelector).toArray(); - } - return $elem.filter(submittableSelector).toArray(); - }) - .filter( - // Verify elements have a name (`attr.name`) and are not disabled (`:enabled`) - '[name!=""]:enabled' + - // And cannot be clicked (`[type=submit]`) or are used in `x-www-form-urlencoded` (`[type=file]`) - ':not(:submit, :button, :image, :reset, :file)' + - // And are either checked/don't have a checkable state - ':matches([checked], :not(:checkbox, :radio))', - // Convert each of the elements to its value(s) - ) - .map< - AnyNode, - { - name: string; - value: string; - } - >((_, elem) => { - const $elem = this._make(elem); - const name = $elem.attr('name') as string; // We have filtered for elements with a name before. - // If there is no value set (e.g. `undefined`, `null`), then default value to empty - const value = $elem.val() ?? ''; - - // If we have an array of values (e.g. `<select multiple>`), return an array of key/value pairs - if (Array.isArray(value)) { - return value.map((val) => - /* - * We trim replace any line endings (e.g. `\r` or `\r\n` with `\r\n`) to guarantee consistency across platforms - * These can occur inside of `<textarea>'s` - */ - ({ name, value: val.replace(rCRLF, '\r\n') }), - ); - } - // Otherwise (e.g. `<input type="text">`, return only one key/value pair - return { name, value: value.replace(rCRLF, '\r\n') }; - }) - .toArray(); -} diff --git a/node_modules/cheerio/src/api/manipulation.spec.ts b/node_modules/cheerio/src/api/manipulation.spec.ts deleted file mode 100644 index 841dc78..0000000 --- a/node_modules/cheerio/src/api/manipulation.spec.ts +++ /dev/null @@ -1,1988 +0,0 @@ -import { describe, it, expect, beforeEach } from 'vitest'; -import { load, type CheerioAPI, type Cheerio } from '../index.js'; -import { - fruits, - divcontainers, - mixedText, - unwrapspans, -} from '../__fixtures__/fixtures.js'; -import type { AnyNode, Element } from 'domhandler'; - -describe('$(...)', () => { - let $: CheerioAPI; - let $fruits: Cheerio<Element>; - - beforeEach(() => { - $ = load(fruits); - $fruits = $('#fruits'); - }); - - describe('.wrap', () => { - it('(Cheerio object) : should insert the element and add selected element(s) as its child', () => { - const $redFruits = $('<div class="red-fruits"></div>'); - $('.apple').wrap($redFruits); - - expect($fruits.children().eq(0).hasClass('red-fruits')).toBe(true); - expect($('.red-fruits').children().eq(0).hasClass('apple')).toBe(true); - expect($fruits.children().eq(1).hasClass('orange')).toBe(true); - expect($redFruits.children()).toHaveLength(1); - }); - - it('(element) : should wrap the base element correctly', () => { - $('ul').wrap('<a></a>'); - expect($('body').children()[0].tagName).toBe('a'); - }); - - it('(document) : should ignore document node', () => { - $.root().wrap('<a></a>'); - expect($.root()[0]).toHaveProperty('type', 'root'); - }); - - it('(element) : should insert the element and add selected element(s) as its child', () => { - const $redFruits = $('<div class="red-fruits"></div>'); - $('.apple').wrap($redFruits[0]); - - expect($fruits.children()[0]).toBe($redFruits[0]); - expect($redFruits.children()).toHaveLength(1); - expect($redFruits.children()[0]).toBe($('.apple')[0]); - expect($fruits.children()[1]).toBe($('.orange')[0]); - }); - - it('(html) : should insert the markup and add selected element(s) as its child', () => { - $('.apple').wrap('<div class="red-fruits"> </div>'); - expect($fruits.children().eq(0).hasClass('red-fruits')).toBe(true); - expect($('.red-fruits').children().eq(0).hasClass('apple')).toBe(true); - expect($fruits.children().eq(1).hasClass('orange')).toBe(true); - expect($('.red-fruits').children()).toHaveLength(1); - }); - - it('(html) : discards extraneous markup', () => { - $('.apple').wrap('<div></div><p></p>'); - expect($('div')).toHaveLength(1); - expect($('p')).toHaveLength(0); - }); - - it('(html) : wraps with nested elements', () => { - const $orangeFruits = $( - '<div class="orange-fruits"><div class="and-stuff"></div></div>', - ); - $('.orange').wrap($orangeFruits); - - expect($fruits.children().eq(1).hasClass('orange-fruits')).toBe(true); - expect($('.orange-fruits').children().eq(0).hasClass('and-stuff')).toBe( - true, - ); - expect($fruits.children().eq(2).hasClass('pear')).toBe(true); - expect($('.orange-fruits').children()).toHaveLength(1); - }); - - it('(html) : should only worry about the first tag children', () => { - const delicious = '<span> This guy is delicious: <b></b></span>'; - $('.apple').wrap(delicious); - expect($('b>.apple')).toHaveLength(1); - }); - - it('(selector) : wraps the content with a copy of the first matched element', () => { - $('.apple').wrap('.orange, .pear'); - - const $oranges = $('.orange'); - expect($('.pear')).toHaveLength(1); - expect($oranges).toHaveLength(2); - expect($oranges.eq(0).parent()[0]).toBe($fruits[0]); - expect($oranges.eq(0).children()).toHaveLength(1); - expect($oranges.eq(0).children()[0]).toBe($('.apple')[0]); - expect($('.apple').parent()[0]).toBe($oranges[0]); - expect($oranges.eq(1).children()).toHaveLength(0); - }); - - it('(fn) : should invoke the provided function with the correct arguments and context', () => { - const $children = $fruits.children(); - const args: [number, AnyNode][] = []; - const thisValues: AnyNode[] = []; - - $children.wrap(function (...myArgs) { - args.push(myArgs); - thisValues.push(this); - return ''; - }); - - expect(args).toStrictEqual([ - [0, $children[0]], - [1, $children[1]], - [2, $children[2]], - ]); - expect(thisValues).toStrictEqual([ - $children[0], - $children[1], - $children[2], - ]); - }); - - it('(fn) : should use the returned HTML to wrap each element', () => { - const $children = $fruits.children(); - const tagNames = ['div', 'span', 'p']; - - $children.wrap(() => `<${tagNames.shift()}>`); - - expect($fruits.find('div')).toHaveLength(1); - expect($fruits.find('div')[0]).toBe($fruits.children()[0]); - expect($fruits.find('.apple')).toHaveLength(1); - expect($fruits.find('.apple').parent()[0]).toBe($fruits.find('div')[0]); - - expect($fruits.find('span')).toHaveLength(1); - expect($fruits.find('span')[0]).toBe($fruits.children()[1]); - expect($fruits.find('.orange')).toHaveLength(1); - expect($fruits.find('.orange').parent()[0]).toBe($fruits.find('span')[0]); - - expect($fruits.find('p')).toHaveLength(1); - expect($fruits.find('p')[0]).toBe($fruits.children()[2]); - expect($fruits.find('.pear')).toHaveLength(1); - expect($fruits.find('.pear').parent()[0]).toBe($fruits.find('p')[0]); - }); - - it('(fn) : should use the returned Cheerio object to wrap each element', () => { - const $children = $fruits.children(); - const tagNames = ['span', 'p', 'div']; - - $children.wrap(() => $(`<${tagNames.shift()}>`)); - - expect($fruits.find('span')).toHaveLength(1); - expect($fruits.find('span')[0]).toBe($fruits.children()[0]); - expect($fruits.find('.apple')).toHaveLength(1); - expect($fruits.find('.apple').parent()[0]).toBe($fruits.find('span')[0]); - - expect($fruits.find('p')).toHaveLength(1); - expect($fruits.find('p')[0]).toBe($fruits.children()[1]); - expect($fruits.find('.orange')).toHaveLength(1); - expect($fruits.find('.orange').parent()[0]).toBe($fruits.find('p')[0]); - - expect($fruits.find('div')).toHaveLength(1); - expect($fruits.find('div')[0]).toBe($fruits.children()[2]); - expect($fruits.find('.pear')).toHaveLength(1); - expect($fruits.find('.pear').parent()[0]).toBe($fruits.find('div')[0]); - }); - - it('($(...)) : for each element it should add a wrapper elment and add the selected element as its child', () => { - const $fruitDecorator = $('<div class="fruit-decorator"></div>'); - $('li').wrap($fruitDecorator); - expect($fruits.children().eq(0).hasClass('fruit-decorator')).toBe(true); - expect($fruits.children().eq(0).children().eq(0).hasClass('apple')).toBe( - true, - ); - expect($fruits.children().eq(1).hasClass('fruit-decorator')).toBe(true); - expect($fruits.children().eq(1).children().eq(0).hasClass('orange')).toBe( - true, - ); - expect($fruits.children().eq(2).hasClass('fruit-decorator')).toBe(true); - expect($fruits.children().eq(2).children().eq(0).hasClass('pear')).toBe( - true, - ); - }); - }); - - describe('.wrapInner', () => { - it('(Cheerio object) : should insert the element and add selected element(s) as its parent', () => { - const $container = $('<div class="container"></div>') as Cheerio<Element>; - $fruits.wrapInner($container); - - expect($fruits.children()[0]).toBe($container[0]); - expect($container[0].parent).toBe($fruits[0]); - expect($container[0].children[0]).toBe($('.apple')[0]); - expect($container[0].children[1]).toBe($('.orange')[0]); - expect($('.apple')[0].parent).toBe($container[0]); - expect($fruits.children()).toHaveLength(1); - expect($container.children()).toHaveLength(3); - }); - - it('(element) : should insert the element and add selected element(s) as its parent', () => { - const $container = $('<div class="container"></div>') as Cheerio<Element>; - $fruits.wrapInner($container[0]); - - expect($fruits.children()[0]).toBe($container[0]); - expect($container[0].parent).toBe($fruits[0]); - expect($container[0].children[0]).toBe($('.apple')[0]); - expect($container[0].children[1]).toBe($('.orange')[0]); - expect($('.apple')[0].parent).toBe($container[0]); - expect($fruits.children()).toHaveLength(1); - expect($container.children()).toHaveLength(3); - }); - - it('(html) : should ignore text nodes', () => { - const $test = load(mixedText); - $test($test('body')[0].children).wrapInner('<test>'); - - expect($test('body').html()).toBe( - '<a><test>1</test></a>TEXT<b><test>2</test></b>', - ); - }); - - it('(html) : should insert the element and add selected element(s) as its parent', () => { - $fruits.wrapInner('<div class="container"></div>'); - - expect($fruits.children()[0]).toBe($('.container')[0]); - expect($('.container')[0].parent).toBe($fruits[0]); - expect($('.container')[0].children[0]).toBe($('.apple')[0]); - expect($('.container')[0].children[1]).toBe($('.orange')[0]); - expect($('.apple')[0].parent).toBe($('.container')[0]); - expect($fruits.children()).toHaveLength(1); - expect($('.container').children()).toHaveLength(3); - }); - - it("(selector) : should wrap the html of the element with the selector's first match", () => { - $('.apple').wrapInner('.orange, .pear'); - const $oranges = $('.orange'); - expect($('.pear')).toHaveLength(1); - expect($oranges).toHaveLength(2); - expect($oranges.eq(0).parent()[0]).toBe($('.apple')[0]); - expect($oranges.eq(0).text()).toBe('Apple'); - expect($('.apple').eq(0).children()[0]).toBe($oranges[0]); - expect($oranges.eq(1).parent()[0]).toBe($fruits[0]); - expect($oranges.eq(1).text()).toBe('Orange'); - }); - - it('(fn) : should invoke the provided function with the correct arguments and context', () => { - const $children = $fruits.children(); - const args: [number, AnyNode][] = []; - const thisValues: AnyNode[] = []; - - $children.wrapInner(function (...myArgs) { - args.push(myArgs); - thisValues.push(this); - return this; - }); - - expect(args).toStrictEqual([ - [0, $children[0]], - [1, $children[1]], - [2, $children[2]], - ]); - expect(thisValues).toStrictEqual([ - $children[0], - $children[1], - $children[2], - ]); - }); - - it("(fn) : should use the returned HTML to wrap each element's contents", () => { - const $children = $fruits.children(); - const tagNames = ['div', 'span', 'p']; - - $children.wrapInner(() => `<${tagNames.shift()}>`); - - expect($fruits.find('div')).toHaveLength(1); - expect($fruits.find('div')[0]).toBe($('.apple').children()[0]); - expect($fruits.find('.apple')).toHaveLength(1); - - expect($fruits.find('span')).toHaveLength(1); - expect($fruits.find('span')[0]).toBe($('.orange').children()[0]); - expect($fruits.find('.orange')).toHaveLength(1); - - expect($fruits.find('p')).toHaveLength(1); - expect($fruits.find('p')[0]).toBe($('.pear').children()[0]); - expect($fruits.find('.pear')).toHaveLength(1); - }); - - it("(fn) : should use the returned Cheerio object to wrap each element's contents", () => { - const $children = $fruits.children(); - const tags = [$('<div></div>'), $('<span></span>'), $('<p></p>')]; - - $children.wrapInner(() => tags.shift()!); - - expect($fruits.find('div')).toHaveLength(1); - expect($fruits.find('div')[0]).toBe($('.apple').children()[0]); - expect($fruits.find('.apple')).toHaveLength(1); - - expect($fruits.find('span')).toHaveLength(1); - expect($fruits.find('span')[0]).toBe($('.orange').children()[0]); - expect($fruits.find('.orange')).toHaveLength(1); - - expect($fruits.find('p')).toHaveLength(1); - expect($fruits.find('p')[0]).toBe($('.pear').children()[0]); - expect($fruits.find('.pear')).toHaveLength(1); - }); - - it('($(...)) : for each element it should add a wrapper elment and add the selected element as its child', () => { - const $fruitDecorator = $('<div class="fruit-decorator"></div>'); - const $children = $fruits.children(); - $('li').wrapInner($fruitDecorator); - - expect($('.fruit-decorator')).toHaveLength(3); - expect($children.eq(0).children().eq(0).hasClass('fruit-decorator')).toBe( - true, - ); - expect($children.eq(0).hasClass('apple')).toBe(true); - expect($children.eq(1).children().eq(0).hasClass('fruit-decorator')).toBe( - true, - ); - expect($children.eq(1).hasClass('orange')).toBe(true); - expect($children.eq(2).children().eq(0).hasClass('fruit-decorator')).toBe( - true, - ); - expect($children.eq(2).hasClass('pear')).toBe(true); - }); - - it('(html) : wraps with nested elements', () => { - const $badOrangeJoke = $( - '<div class="orange-you-glad"><div class="i-didnt-say-apple"></div></div>', - ); - $('.orange').wrapInner($badOrangeJoke); - - expect($('.orange').children().eq(0).hasClass('orange-you-glad')).toBe( - true, - ); - expect( - $('.orange-you-glad').children().eq(0).hasClass('i-didnt-say-apple'), - ).toBe(true); - expect($fruits.children().eq(2).hasClass('pear')).toBe(true); - expect($('.orange-you-glad').children()).toHaveLength(1); - }); - - it('(html) : should only worry about the first tag children', () => { - const delicious = '<span> This guy is delicious: <b></b></span>'; - $('.apple').wrapInner(delicious); - expect($('.apple>span>b')).toHaveLength(1); - expect($('.apple>span>b').text()).toBe('Apple'); - }); - }); - - describe('.unwrap', () => { - let $elem: CheerioAPI; - - beforeEach(() => { - $elem = load(unwrapspans); - }); - - it('() : should be unwrap span elements', () => { - const abcd = $elem('#unwrap1 > span, #unwrap2 > span').get(); - const abcdef = $elem('#unwrap span').get(); - - // Make #unwrap1 and #unwrap2 go away - expect( - $elem('#unwrap1 span').add('#unwrap2 span:first-child').unwrap(), - ).toHaveLength(3); - - /* - * .toEqual - * all four spans should still exist - */ - expect($elem('#unwrap > span').get()).toEqual(abcd); - - // Make all b elements in #unwrap3 go away - expect($elem('#unwrap3 span').unwrap().get()).toEqual( - $elem('#unwrap3 > span').get(), - ); - - // Make #unwrap3 go away - expect($elem('#unwrap3 span').unwrap().get()).toEqual( - $elem('#unwrap > span.unwrap3').get(), - ); - - // #unwrap only contains 6 child spans - expect($elem('#unwrap').children().get()).toEqual(abcdef); - - // Make the 6 spans become children of body - expect($elem('#unwrap > span').unwrap().get()).toEqual( - $elem('body > span.unwrap').get(), - ); - - // Can't unwrap children of body - expect($elem('body > span.unwrap').unwrap().get()).toEqual( - $elem('body > span.unwrap').get(), - ); - - // Can't unwrap children of body - expect($elem('body > span.unwrap').unwrap().get()).toEqual(abcdef); - - // Can't unwrap children of body - expect($elem('body > span.unwrap').get()).toEqual(abcdef); - }); - - it('(selector) : should only unwrap element parent what specified', () => { - const abcd = $elem('#unwrap1 > span, #unwrap2 > span').get(); - - // Shouldn't unwrap, no match - $elem('#unwrap1 span').unwrap('#unwrap2'); - expect($elem('#unwrap1')).toHaveLength(1); - - // Shouldn't unwrap, no match - $elem('#unwrap1 span').unwrap('span'); - expect($elem('#unwrap1')).toHaveLength(1); - - // Unwraps - $elem('#unwrap1 span').unwrap('#unwrap1'); - expect($elem('#unwrap1')).toHaveLength(0); - - // Should not unwrap - unmatched unwrap - $elem('#unwrap2 span').unwrap('quote'); - expect($elem('#unwrap > span')).toHaveLength(2); - - // Check return values - matched unwrap - $elem('#unwrap2 span').unwrap('#unwrap2'); - expect($elem('#unwrap > span').get()).toEqual(abcd); - }); - }); - - describe('.wrapAll', () => { - let doc: CheerioAPI; - let $inner: Cheerio<Element>; - - beforeEach(() => { - doc = load(divcontainers); - $inner = doc('.inner'); - }); - - it('(Cheerio object) : should insert the element and wrap elements with it', () => { - $inner.wrapAll(doc('#new')); - const $container = doc('.container'); - const $wrap = doc('b'); - - expect($container).toHaveLength(2); - expect($container[0].children).toHaveLength(1); - expect($container[1].children).toHaveLength(0); - expect($container[0].children[0]).toBe(doc('#new')[0]); - - expect($inner).toHaveLength(4); - expect($wrap[0].children).toHaveLength(4); - expect($inner[0].parent).toBe($wrap[0]); - expect($inner[1].parent).toBe($wrap[0]); - expect($inner[2].parent).toBe($wrap[0]); - expect($inner[3].parent).toBe($wrap[0]); - }); - - it('(html) : should wrap elements with it', () => { - $inner.wrapAll('<div class="wrap"></div>'); - const $container = doc('.container'); - const $wrap = doc('.wrap'); - - expect($inner).toHaveLength(4); - expect($container).toHaveLength(2); - expect($wrap).toHaveLength(1); - expect($wrap[0].children).toHaveLength(4); - expect($container[0].children).toHaveLength(1); - expect($container[1].children).toHaveLength(0); - expect($inner[0].parent).toBe($wrap[0]); - expect($inner[1].parent).toBe($wrap[0]); - expect($inner[2].parent).toBe($wrap[0]); - expect($inner[3].parent).toBe($wrap[0]); - expect($wrap[0].parent).toBe($container[0]); - expect($container[0].children[0]).toBe($wrap[0]); - }); - - it('(html) : should wrap single element with it', () => { - const parent = doc('<p>').wrapAll('<div></div>').parent(); - expect(parent).toHaveLength(1); - expect(parent.is('div')).toBe(true); - }); - - it('(selector) : should find element from dom, wrap elements with it', () => { - $inner.wrapAll('#new'); - const $container = doc('.container'); - const $wrap = doc('b'); - const $new = doc('#new'); - - expect($inner).toHaveLength(4); - expect($container).toHaveLength(2); - expect($container[0].children).toHaveLength(1); - expect($container[1].children).toHaveLength(0); - expect($wrap[0].children).toHaveLength(4); - expect($inner[0].parent).toBe($wrap[0]); - expect($inner[1].parent).toBe($wrap[0]); - expect($inner[2].parent).toBe($wrap[0]); - expect($inner[3].parent).toBe($wrap[0]); - expect($new[0].parent).toBe($container[0]); - expect($container[0].children[0]).toBe($new[0]); - }); - - it('(function) : check execution', () => { - const $container = doc('.container'); - const p = $container[0].parent; - - const result = $container.wrapAll( - () => "<div class='red'><div class='tmp'></div></div>", - ); - - expect(result.parent()).toHaveLength(1); - expect($container.eq(0).parent().parent().is('.red')).toBe(true); - expect($container.eq(1).parent().parent().is('.red')).toBe(true); - expect($container.eq(0).parent().parent().parent().is(p)).toBe(true); - }); - - it('(function) : check execution characteristics', () => { - const $new = doc('#new'); - let i = 0; - - doc('no-result').wrapAll(() => { - i++; - return ''; - }); - expect(i).toBeFalsy(); - - $new.wrapAll(function (index) { - expect(this).toBe($new[0]); - expect(index).toBe(0); - return this; - }); - }); - - it('(nodes) : should skip text nodes', () => { - const $text = load(mixedText); - const $body = $text($text('body')[0].children); - - $body.wrapAll($text('body')[0].children.slice(1)); - - expect($text('body').html()).toBe('TEXT<b>2<a>1</a>TEXT<b>2</b></b>'); - }); - }); - - describe('.append', () => { - it('() : should do nothing', () => { - expect($('#fruits').append()[0].tagName).toBe('ul'); - }); - - it('(null) : should do nothing', () => { - $fruits.append(null as never); - expect($fruits.children()).toHaveLength(3); - }); - - it('(html) : should add element as last child', () => { - $fruits.append('<li class="plum">Plum</li>'); - expect($fruits.children().eq(3).hasClass('plum')).toBe(true); - }); - - it('(html) : should not fail on text nodes', () => { - expect($(mixedText).append(' UP').html()).toBe('1 UP'); - }); - - it('($(...)) : should add element as last child', () => { - const $plum = $('<li class="plum">Plum</li>'); - $fruits.append($plum); - expect($fruits.children().eq(3).hasClass('plum')).toBe(true); - }); - - it('(Node) : should add element as last child', () => { - const plum = $('<li class="plum">Plum</li>')[0]; - $fruits.append(plum); - expect($fruits.children().eq(3).hasClass('plum')).toBe(true); - }); - - it('(existing Node) : should remove node from previous location', () => { - const apple = $fruits.children()[0]; - - expect($fruits.children()).toHaveLength(3); - $fruits.append(apple); - const $children = $fruits.children(); - - expect($children).toHaveLength(3); - expect($children[0]).not.toBe(apple); - expect($children[2]).toBe(apple); - }); - - it('(existing Node) : should remove existing node from previous location', () => { - const apple = $fruits.children()[0]; - const $dest = $('<div></div>'); - - expect($fruits.children()).toHaveLength(3); - $dest.append(apple); - const $children = $fruits.children(); - - expect($children).toHaveLength(2); - expect($children[0]).not.toBe(apple); - - expect($dest.children()).toHaveLength(1); - expect($dest.children()[0]).toBe(apple); - }); - - it('(existing Node) : should update original direct siblings', () => { - $('.pear').append($('.orange')); - expect($('.apple').next()[0]).toBe($('.pear')[0]); - expect($('.pear').prev()[0]).toBe($('.apple')[0]); - }); - - it('(existing Node) : should clone all but the last occurrence', () => { - const $originalApple = $('.apple'); - - $('.orange, .pear').append($originalApple); - - const $apples = $('.apple'); - expect($apples).toHaveLength(2); - expect($apples.eq(0).parent()[0]).toBe($('.orange')[0]); - expect($apples.eq(1).parent()[0]).toBe($('.pear')[0]); - expect($apples[1]).toBe($originalApple[0]); - }); - - it('(elem) : should NOP if removed', () => { - const $apple = $('.apple'); - - $apple.remove(); - $fruits.append($apple); - expect($fruits.children().eq(2).hasClass('apple')).toBe(true); - }); - - it('($(...), html) : should add multiple elements as last children', () => { - const $plum = $('<li class="plum">Plum</li>'); - const grape = '<li class="grape">Grape</li>'; - $fruits.append($plum, grape); - expect($fruits.children().eq(3).hasClass('plum')).toBe(true); - expect($fruits.children().eq(4).hasClass('grape')).toBe(true); - }); - - it('(Array) : should append all elements in the array', () => { - const more = $( - '<li class="plum">Plum</li><li class="grape">Grape</li>', - ).get(); - $fruits.append(more); - expect($fruits.children().eq(3).hasClass('plum')).toBe(true); - expect($fruits.children().eq(4).hasClass('grape')).toBe(true); - }); - - it('(fn) : should invoke the callback with the correct arguments and context', () => { - const $fruits = $('#fruits').children(); - const args: [number, string][] = []; - const thisValues: AnyNode[] = []; - - $fruits.append(function (...myArgs) { - args.push(myArgs); - thisValues.push(this); - return this; - }); - - expect(args).toStrictEqual([ - [0, 'Apple'], - [1, 'Orange'], - [2, 'Pear'], - ]); - expect(thisValues).toStrictEqual([$fruits[0], $fruits[1], $fruits[2]]); - }); - - it('(fn) : should add returned string as last child', () => { - const $fruits = $('#fruits').children(); - - $fruits.append(() => '<div class="first">'); - - const $apple = $fruits.eq(0); - const $orange = $fruits.eq(1); - const $pear = $fruits.eq(2); - - expect($apple.find('.first')[0]).toBe($apple.contents()[1]); - expect($orange.find('.first')[0]).toBe($orange.contents()[1]); - expect($pear.find('.first')[0]).toBe($pear.contents()[1]); - }); - - it('(fn) : should add returned Cheerio object as last child', () => { - const $fruits = $('#fruits').children(); - - $fruits.append(() => $('<div class="second">')); - - const $apple = $fruits.eq(0); - const $orange = $fruits.eq(1); - const $pear = $fruits.eq(2); - - expect($apple.find('.second')[0]).toBe($apple.contents()[1]); - expect($orange.find('.second')[0]).toBe($orange.contents()[1]); - expect($pear.find('.second')[0]).toBe($pear.contents()[1]); - }); - - it('(fn) : should add returned Node as last child', () => { - const $fruits = $('#fruits').children(); - - $fruits.append(() => $('<div class="third">')[0]); - - const $apple = $fruits.eq(0); - const $orange = $fruits.eq(1); - const $pear = $fruits.eq(2); - - expect($apple.find('.third')[0]).toBe($apple.contents()[1]); - expect($orange.find('.third')[0]).toBe($orange.contents()[1]); - expect($pear.find('.third')[0]).toBe($pear.contents()[1]); - }); - - it('should maintain correct object state (Issue: #10)', () => { - const $obj = $('<div></div>') - .append('<div><div></div></div>') - .children() - .children() - .parent(); - expect($obj).toBeTruthy(); - }); - - it('($(...)) : should remove from root element', () => { - const $plum = $('<li class="plum">Plum</li>'); - const { parent } = $plum[0]; - expect(parent).toBeTruthy(); - - $fruits.append($plum); - expect($plum[0].parent?.type).not.toBe('root'); - expect(parent?.childNodes).not.toContain($plum[0]); - }); - }); - - describe('.prepend', () => { - it('() : should do nothing', () => { - expect($('#fruits').prepend()[0].tagName).toBe('ul'); - }); - - it('(html) : should add element as first child', () => { - $fruits.prepend('<li class="plum">Plum</li>'); - expect($fruits.children().eq(0).hasClass('plum')).toBe(true); - }); - - it('($(...)) : should add element as first child', () => { - const $plum = $('<li class="plum">Plum</li>'); - $fruits.prepend($plum); - expect($fruits.children().eq(0).hasClass('plum')).toBe(true); - }); - - it('($(...)) : should add style element as first child', () => { - const $style = $('<style>.foo {}</style>'); - $fruits.prepend($style); - const styleTag = $fruits.children().get(0); - expect(styleTag?.tagName).toBe('style'); - expect(styleTag?.children[0]).toHaveProperty('data', '.foo {}'); - }); - - it('($(...)) : should add script element as first child', () => { - const $script = $('<script>var foo;</script>'); - $fruits.prepend($script); - const scriptTag = $fruits.children().get(0); - expect(scriptTag?.tagName).toBe('script'); - expect(scriptTag?.children[0]).toHaveProperty('data', 'var foo;'); - }); - - it('(Node) : should add node as first child', () => { - const plum = $('<li class="plum">Plum</li>')[0]; - $fruits.prepend(plum); - expect($fruits.children().eq(0).hasClass('plum')).toBe(true); - }); - - it('(existing Node) : should remove existing nodes from previous locations', () => { - const pear = $fruits.children()[2]; - - expect($fruits.children()).toHaveLength(3); - $fruits.prepend(pear); - const $children = $fruits.children(); - - expect($children).toHaveLength(3); - expect($children[2]).not.toBe(pear); - expect($children[0]).toBe(pear); - }); - - it('(existing Node) : should update original direct siblings', () => { - $('.pear').prepend($('.orange')); - expect($('.apple').next()[0]).toBe($('.pear')[0]); - expect($('.pear').prev()[0]).toBe($('.apple')[0]); - }); - - it('(existing Node) : should clone all but the last occurrence', () => { - const $originalApple = $('.apple'); - - $('.orange, .pear').prepend($originalApple); - - const $apples = $('.apple'); - expect($apples).toHaveLength(2); - expect($apples.eq(0).parent()[0]).toBe($('.orange')[0]); - expect($apples.eq(1).parent()[0]).toBe($('.pear')[0]); - expect($apples[1]).toBe($originalApple[0]); - }); - - it('(elem) : should handle if removed', () => { - const $apple = $('.apple'); - - $apple.remove(); - $fruits.prepend($apple); - expect($fruits.children().eq(0).hasClass('apple')).toBe(true); - }); - - it('(Array) : should add all elements in the array as initial children', () => { - const more = $( - '<li class="plum">Plum</li><li class="grape">Grape</li>', - ).get(); - $fruits.prepend(more); - expect($fruits.children().eq(0).hasClass('plum')).toBe(true); - expect($fruits.children().eq(1).hasClass('grape')).toBe(true); - }); - - it('(html, $(...), html) : should add multiple elements as first children', () => { - const $plum = $('<li class="plum">Plum</li>'); - const grape = '<li class="grape">Grape</li>'; - $fruits.prepend($plum, grape); - expect($fruits.children().eq(0).hasClass('plum')).toBe(true); - expect($fruits.children().eq(1).hasClass('grape')).toBe(true); - }); - - it('(fn) : should invoke the callback with the correct arguments and context', () => { - const args: [number, string][] = []; - const thisValues: AnyNode[] = []; - const $fruits = $('#fruits').children(); - - $fruits.prepend(function (...myArgs) { - args.push(myArgs); - thisValues.push(this); - return this; - }); - - expect(args).toStrictEqual([ - [0, 'Apple'], - [1, 'Orange'], - [2, 'Pear'], - ]); - expect(thisValues).toStrictEqual([$fruits[0], $fruits[1], $fruits[2]]); - }); - - it('(fn) : should add returned string as first child', () => { - const $fruits = $('#fruits').children(); - - $fruits.prepend(() => '<div class="first">'); - - const $apple = $fruits.eq(0); - const $orange = $fruits.eq(1); - const $pear = $fruits.eq(2); - - expect($apple.find('.first')[0]).toBe($apple.contents()[0]); - expect($orange.find('.first')[0]).toBe($orange.contents()[0]); - expect($pear.find('.first')[0]).toBe($pear.contents()[0]); - }); - - it('(fn) : should add returned Cheerio object as first child', () => { - const $fruits = $('#fruits').children(); - - $fruits.prepend(() => $('<div class="second">')); - - const $apple = $fruits.eq(0); - const $orange = $fruits.eq(1); - const $pear = $fruits.eq(2); - - expect($apple.find('.second')[0]).toBe($apple.contents()[0]); - expect($orange.find('.second')[0]).toBe($orange.contents()[0]); - expect($pear.find('.second')[0]).toBe($pear.contents()[0]); - }); - - it('(fn) : should add returned Node as first child', () => { - const $fruits = $('#fruits').children(); - - $fruits.prepend(() => $('<div class="third">')[0]); - - const $apple = $fruits.eq(0); - const $orange = $fruits.eq(1); - const $pear = $fruits.eq(2); - - expect($apple.find('.third')[0]).toBe($apple.contents()[0]); - expect($orange.find('.third')[0]).toBe($orange.contents()[0]); - expect($pear.find('.third')[0]).toBe($pear.contents()[0]); - }); - - it('($(...)) : should remove from root element', () => { - const $plum = $('<li class="plum">Plum</li>'); - const root = $plum[0].parent; - expect(root?.type).toBe('root'); - - $fruits.prepend($plum); - expect($plum[0].parent?.type).not.toBe('root'); - expect(root?.childNodes).not.toContain($plum[0]); - }); - }); - - describe('.appendTo', () => { - it('(html) : should add element as last child', () => { - const $plum = $('<li class="plum">Plum</li>').appendTo(fruits); - expect($plum.parent().children().eq(3).hasClass('plum')).toBe(true); - }); - - it('($(...)) : should add element as last child', () => { - $('<li class="plum">Plum</li>').appendTo($fruits); - expect($fruits.children().eq(3).hasClass('plum')).toBe(true); - }); - - it('(Node) : should add element as last child', () => { - $('<li class="plum">Plum</li>').appendTo($fruits[0]); - expect($fruits.children().eq(3).hasClass('plum')).toBe(true); - }); - - it('(selector) : should add element as last child', () => { - $('<li class="plum">Plum</li>').appendTo('#fruits'); - expect($fruits.children().eq(3).hasClass('plum')).toBe(true); - }); - - it('(Array) : should add element as last child of all elements in the array', () => { - const $multiple = $('<ul><li>Apple</li></ul><ul><li>Orange</li></ul>'); - $('<li class="plum">Plum</li>').appendTo($multiple.get()); - expect($multiple.first().children().eq(1).hasClass('plum')).toBe(true); - expect($multiple.last().children().eq(1).hasClass('plum')).toBe(true); - }); - }); - - describe('.prependTo', () => { - it('(html) : should add element as first child', () => { - const $plum = $('<li class="plum">Plum</li>').prependTo(fruits); - expect($plum.parent().children().eq(0).hasClass('plum')).toBe(true); - }); - - it('($(...)) : should add element as first child', () => { - $('<li class="plum">Plum</li>').prependTo($fruits); - expect($fruits.children().eq(0).hasClass('plum')).toBe(true); - }); - - it('(Node) : should add node as first child', () => { - $('<li class="plum">Plum</li>').prependTo($fruits[0]); - expect($fruits.children().eq(0).hasClass('plum')).toBe(true); - }); - - it('(selector) : should add element as first child', () => { - $('<li class="plum">Plum</li>').prependTo('#fruits'); - expect($fruits.children().eq(0).hasClass('plum')).toBe(true); - }); - - it('(Array) : should add element as first child of all elements in the array', () => { - const $multiple = $('<ul><li>Apple</li></ul><ul><li>Orange</li></ul>'); - $('<li class="plum">Plum</li>').prependTo($multiple.get()); - expect($multiple.first().children().eq(0).hasClass('plum')).toBe(true); - expect($multiple.last().children().eq(0).hasClass('plum')).toBe(true); - }); - }); - - describe('.after', () => { - it('() : should do nothing', () => { - expect($fruits.after()[0].tagName).toBe('ul'); - }); - - it('(html) : should add element as next sibling', () => { - const grape = '<li class="grape">Grape</li>'; - $('.apple').after(grape); - expect($('.apple').next().hasClass('grape')).toBe(true); - }); - - it('(Array) : should add all elements in the array as next sibling', () => { - const more = $( - '<li class="plum">Plum</li><li class="grape">Grape</li>', - ).get(); - $('.apple').after(more); - expect($fruits.children().eq(1).hasClass('plum')).toBe(true); - expect($fruits.children().eq(2).hasClass('grape')).toBe(true); - }); - - it('($(...)) : should add element as next sibling', () => { - const $plum = $('<li class="plum">Plum</li>'); - $('.apple').after($plum); - expect($('.apple').next().hasClass('plum')).toBe(true); - }); - - it('(Node) : should add element as next sibling', () => { - const plum = $('<li class="plum">Plum</li>')[0]; - $('.apple').after(plum); - expect($('.apple').next().hasClass('plum')).toBe(true); - }); - - it('(existing Node) : should remove existing nodes from previous locations', () => { - const pear = $fruits.children()[2]; - - $('.apple').after(pear); - - const $children = $fruits.children(); - expect($children).toHaveLength(3); - expect($children[1]).toBe(pear); - }); - - it('(existing Node) : should update original direct siblings', () => { - $('.pear').after($('.orange')); - expect($('.apple').next()[0]).toBe($('.pear')[0]); - expect($('.pear').prev()[0]).toBe($('.apple')[0]); - }); - - it('(existing Node) : should clone all but the last occurrence', () => { - const $originalApple = $('.apple'); - $('.orange, .pear').after($originalApple); - - expect($('.apple')).toHaveLength(2); - expect($('.apple').eq(0).prev()[0]).toBe($('.orange')[0]); - expect($('.apple').eq(0).next()[0]).toBe($('.pear')[0]); - expect($('.apple').eq(1).prev()[0]).toBe($('.pear')[0]); - expect($('.apple').eq(1).next()).toHaveLength(0); - expect($('.apple')[0]).not.toStrictEqual($originalApple[0]); - expect($('.apple')[1]).toStrictEqual($originalApple[0]); - }); - - it('(elem) : should handle if removed', () => { - const $apple = $('.apple'); - const $plum = $('<li class="plum">Plum</li>'); - - $apple.remove(); - $apple.after($plum); - expect($plum.prev()).toHaveLength(0); - }); - - it('($(...), html) : should add multiple elements as next siblings', () => { - const $plum = $('<li class="plum">Plum</li>'); - const grape = '<li class="grape">Grape</li>'; - $('.apple').after($plum, grape); - expect($('.apple').next().hasClass('plum')).toBe(true); - expect($('.plum').next().hasClass('grape')).toBe(true); - }); - - it('(fn) : should invoke the callback with the correct arguments and context', () => { - const args: [number, string][] = []; - const thisValues: AnyNode[] = []; - const $fruits = $('#fruits').children(); - - $fruits.after(function (...myArgs) { - args.push(myArgs); - thisValues.push(this); - return this; - }); - - expect(args).toStrictEqual([ - [0, 'Apple'], - [1, 'Orange'], - [2, 'Pear'], - ]); - expect(thisValues).toStrictEqual([$fruits[0], $fruits[1], $fruits[2]]); - }); - - it('(fn) : should add returned string as next sibling', () => { - const $fruits = $('#fruits').children(); - - $fruits.after(() => '<li class="first">'); - - expect($('.first')[0]).toBe($('#fruits').contents()[1]); - expect($('.first')[1]).toBe($('#fruits').contents()[3]); - expect($('.first')[2]).toBe($('#fruits').contents()[5]); - }); - - it('(fn) : should add returned Cheerio object as next sibling', () => { - const $fruits = $('#fruits').children(); - - $fruits.after(() => $('<li class="second">')); - - expect($('.second')[0]).toBe($('#fruits').contents()[1]); - expect($('.second')[1]).toBe($('#fruits').contents()[3]); - expect($('.second')[2]).toBe($('#fruits').contents()[5]); - }); - - it('(fn) : should add returned element as next sibling', () => { - const $fruits = $('#fruits').children(); - - $fruits.after(() => $('<li class="third">')[0]); - - expect($('.third')[0]).toBe($('#fruits').contents()[1]); - expect($('.third')[1]).toBe($('#fruits').contents()[3]); - expect($('.third')[2]).toBe($('#fruits').contents()[5]); - }); - - it('(fn) : should support text nodes', () => { - const $text = load(mixedText); - - $text($text('body')[0].children).after( - (_, content) => `<c>${content}added</c>`, - ); - - expect($text('body').html()).toBe( - '<a>1</a><c>1added</c>TEXT<b>2</b><c>2added</c>', - ); - }); - - it('($(...)) : should remove from root element', () => { - const $plum = $('<li class="plum">Plum</li>'); - const root = $plum[0].parent; - expect(root?.type).toBe('root'); - - $fruits.after($plum); - expect($plum[0].parent?.type).not.toBe('root'); - expect(root?.childNodes).not.toContain($plum[0]); - }); - }); - - describe('.insertAfter', () => { - it('(selector) : should create element and add as next sibling', () => { - const grape = $('<li class="grape">Grape</li>'); - grape.insertAfter('.apple'); - expect($('.apple').next().hasClass('grape')).toBe(true); - }); - - it('(selector) : should create element and add as next sibling of multiple elements', () => { - const grape = $('<li class="grape">Grape</li>'); - grape.insertAfter('.apple, .pear'); - expect($('.apple').next().hasClass('grape')).toBe(true); - expect($('.pear').next().hasClass('grape')).toBe(true); - }); - - it('($(...)) : should create element and add as next sibling', () => { - const grape = $('<li class="grape">Grape</li>'); - grape.insertAfter($('.apple')); - expect($('.apple').next().hasClass('grape')).toBe(true); - }); - - it('($(...)) : should create element and add as next sibling of multiple elements', () => { - const grape = $('<li class="grape">Grape</li>'); - grape.insertAfter($('.apple, .pear')); - expect($('.apple').next().hasClass('grape')).toBe(true); - expect($('.pear').next().hasClass('grape')).toBe(true); - }); - - it('($(...)) : should create all elements in the array and add as next siblings', () => { - const more = $('<li class="plum">Plum</li><li class="grape">Grape</li>'); - more.insertAfter($('.apple')); - expect($fruits.children().eq(0).hasClass('apple')).toBe(true); - expect($fruits.children().eq(1).hasClass('plum')).toBe(true); - expect($fruits.children().eq(2).hasClass('grape')).toBe(true); - }); - - it('(existing Node) : should remove existing nodes from previous locations', () => { - $('.orange').insertAfter('.pear'); - expect($fruits.children().eq(1).hasClass('orange')).toBe(false); - expect($fruits.children().length).toBe(3); - expect($('.orange').length).toBe(1); - }); - - it('(existing Node) : should update original direct siblings', () => { - $('.orange').insertAfter('.pear'); - expect($('.apple').next().hasClass('pear')).toBe(true); - expect($('.pear').prev().hasClass('apple')).toBe(true); - expect($('.pear').next().hasClass('orange')).toBe(true); - expect($('.orange').next()).toHaveLength(0); - }); - - it('(existing Node) : should update original direct siblings of multiple elements', () => { - $('.apple').insertAfter('.orange, .pear'); - expect($('.orange').prev()).toHaveLength(0); - expect($('.orange').next().hasClass('apple')).toBe(true); - expect($('.pear').next().hasClass('apple')).toBe(true); - expect($('.pear').prev().hasClass('apple')).toBe(true); - expect($fruits.children().length).toBe(4); - const apples = $('.apple'); - expect(apples.length).toBe(2); - expect(apples.eq(0).prev().hasClass('orange')).toBe(true); - expect(apples.eq(1).prev().hasClass('pear')).toBe(true); - }); - - it('(elem) : should handle if removed', () => { - const $apple = $('.apple'); - const $plum = $('<li class="plum">Plum</li>'); - $apple.remove(); - $plum.insertAfter($apple); - expect($plum.prev()).toHaveLength(0); - }); - - it('(single) should return the new element for chaining', () => { - const $grape = $('<li class="grape">Grape</li>').insertAfter('.apple'); - expect($grape.cheerio).toBeTruthy(); - expect($grape.each).toBeTruthy(); - expect($grape.length).toBe(1); - expect($grape.hasClass('grape')).toBe(true); - }); - - it('(single) should return the new elements for chaining', () => { - const $purple = $( - '<li class="grape">Grape</li><li class="plum">Plum</li>', - ).insertAfter('.apple'); - expect($purple.cheerio).toBeTruthy(); - expect($purple.each).toBeTruthy(); - expect($purple.length).toBe(2); - expect($purple.eq(0).hasClass('grape')).toBe(true); - expect($purple.eq(1).hasClass('plum')).toBe(true); - }); - - it('(multiple) should return the new elements for chaining', () => { - const $purple = $( - '<li class="grape">Grape</li><li class="plum">Plum</li>', - ).insertAfter('.apple, .pear'); - expect($purple.cheerio).toBeTruthy(); - expect($purple.each).toBeTruthy(); - expect($purple.length).toBe(4); - expect($purple.eq(0).hasClass('grape')).toBe(true); - expect($purple.eq(1).hasClass('plum')).toBe(true); - expect($purple.eq(2).hasClass('grape')).toBe(true); - expect($purple.eq(3).hasClass('plum')).toBe(true); - }); - - it('(single) should return the existing element for chaining', () => { - const $pear = $('.pear').insertAfter('.apple'); - expect($pear.cheerio).toBeTruthy(); - expect($pear.each).toBeTruthy(); - expect($pear.length).toBe(1); - expect($pear.hasClass('pear')).toBe(true); - }); - - it('(single) should return the existing elements for chaining', () => { - const $things = $('.orange, .apple').insertAfter('.pear'); - expect($things.cheerio).toBeTruthy(); - expect($things.each).toBeTruthy(); - expect($things.length).toBe(2); - expect($things.eq(0).hasClass('apple')).toBe(true); - expect($things.eq(1).hasClass('orange')).toBe(true); - }); - - it('(multiple) should return the existing elements for chaining', () => { - $('<li class="grape">Grape</li>').insertAfter('.apple'); - const $things = $('.orange, .apple').insertAfter('.pear, .grape'); - expect($things.cheerio).toBeTruthy(); - expect($things.each).toBeTruthy(); - expect($things.length).toBe(4); - expect($things.eq(0).hasClass('apple')).toBe(true); - expect($things.eq(1).hasClass('orange')).toBe(true); - expect($things.eq(2).hasClass('apple')).toBe(true); - expect($things.eq(3).hasClass('orange')).toBe(true); - }); - }); - - describe('.before', () => { - it('() : should do nothing', () => { - expect($('#fruits').before()[0].tagName).toBe('ul'); - }); - - it('(html) : should add element as previous sibling', () => { - const grape = '<li class="grape">Grape</li>'; - $('.apple').before(grape); - expect($('.apple').prev().hasClass('grape')).toBe(true); - }); - - it('($(...)) : should add element as previous sibling', () => { - const $plum = $('<li class="plum">Plum</li>'); - $('.apple').before($plum); - expect($('.apple').prev().hasClass('plum')).toBe(true); - }); - - it('(Node) : should add element as previous sibling', () => { - const plum = $('<li class="plum">Plum</li>')[0]; - $('.apple').before(plum); - expect($('.apple').prev().hasClass('plum')).toBe(true); - }); - - it('(existing Node) : should remove existing nodes from previous locations', () => { - const pear = $fruits.children()[2]; - - $('.apple').before(pear); - - const $children = $fruits.children(); - expect($children).toHaveLength(3); - expect($children[0]).toBe(pear); - }); - - it('(existing Node) : should update original direct siblings', () => { - $('.apple').before($('.orange')); - expect($('.apple').next()[0]).toBe($('.pear')[0]); - expect($('.pear').prev()[0]).toBe($('.apple')[0]); - }); - - it('(existing Node) : should clone all but the last occurrence', () => { - const $originalPear = $('.pear'); - $('.apple, .orange').before($originalPear); - - expect($('.pear')).toHaveLength(2); - expect($('.pear').eq(0).prev()).toHaveLength(0); - expect($('.pear').eq(0).next()[0]).toBe($('.apple')[0]); - expect($('.pear').eq(1).prev()[0]).toBe($('.apple')[0]); - expect($('.pear').eq(1).next()[0]).toBe($('.orange')[0]); - expect($('.pear')[0]).not.toStrictEqual($originalPear[0]); - expect($('.pear')[1]).toStrictEqual($originalPear[0]); - }); - - it('(elem) : should handle if removed', () => { - const $apple = $('.apple'); - const $plum = $('<li class="plum">Plum</li>'); - - $apple.remove(); - $apple.before($plum); - expect($plum.next()).toHaveLength(0); - }); - - it('(Array) : should add all elements in the array as previous sibling', () => { - const more = $( - '<li class="plum">Plum</li><li class="grape">Grape</li>', - ).get(); - $('.apple').before(more); - expect($fruits.children().eq(0).hasClass('plum')).toBe(true); - expect($fruits.children().eq(1).hasClass('grape')).toBe(true); - }); - - it('($(...), html) : should add multiple elements as previous siblings', () => { - const $plum = $('<li class="plum">Plum</li>'); - const grape = '<li class="grape">Grape</li>'; - $('.apple').before($plum, grape); - expect($('.apple').prev().hasClass('grape')).toBe(true); - expect($('.grape').prev().hasClass('plum')).toBe(true); - }); - - it('(fn) : should invoke the callback with the correct arguments and context', () => { - const args: [number, string][] = []; - const thisValues: AnyNode[] = []; - const $fruits = $('#fruits').children(); - - $fruits.before(function (...myArgs) { - args.push(myArgs); - thisValues.push(this); - return this; - }); - - expect(args).toStrictEqual([ - [0, 'Apple'], - [1, 'Orange'], - [2, 'Pear'], - ]); - expect(thisValues).toStrictEqual([$fruits[0], $fruits[1], $fruits[2]]); - }); - - it('(fn) : should add returned string as previous sibling', () => { - const $fruits = $('#fruits').children(); - - $fruits.before(() => '<li class="first">'); - - expect($('.first')[0]).toBe($('#fruits').contents()[0]); - expect($('.first')[1]).toBe($('#fruits').contents()[2]); - expect($('.first')[2]).toBe($('#fruits').contents()[4]); - }); - - it('(fn) : should add returned Cheerio object as previous sibling', () => { - const $fruits = $('#fruits').children(); - - $fruits.before(() => $('<li class="second">')); - - expect($('.second')[0]).toBe($('#fruits').contents()[0]); - expect($('.second')[1]).toBe($('#fruits').contents()[2]); - expect($('.second')[2]).toBe($('#fruits').contents()[4]); - }); - - it('(fn) : should add returned Node as previous sibling', () => { - const $fruits = $('#fruits').children(); - - $fruits.before(() => $('<li class="third">')[0]); - - expect($('.third')[0]).toBe($('#fruits').contents()[0]); - expect($('.third')[1]).toBe($('#fruits').contents()[2]); - expect($('.third')[2]).toBe($('#fruits').contents()[4]); - }); - - it('(fn) : should support text nodes', () => { - const $text = load(mixedText); - - $text($text('body')[0].children).before( - (_, content) => `<c>${content}added</c>`, - ); - - expect($text('body').html()).toBe( - '<c>1added</c><a>1</a>TEXT<c>2added</c><b>2</b>', - ); - }); - - it('($(...)) : should remove from root element', () => { - const $plum = $('<li class="plum">Plum</li>'); - const root = $plum[0].parent; - expect(root?.type).toBe('root'); - - $fruits.before($plum); - expect($plum[0].parent?.type).not.toBe('root'); - expect(root?.childNodes).not.toContain($plum[0]); - }); - }); - - describe('.insertBefore', () => { - it('(selector) : should create element and add as prev sibling', () => { - const grape = $('<li class="grape">Grape</li>'); - grape.insertBefore('.apple'); - expect($('.apple').prev().hasClass('grape')).toBe(true); - }); - - it('(selector) : should create element and add as prev sibling of multiple elements', () => { - const grape = $('<li class="grape">Grape</li>'); - grape.insertBefore('.apple, .pear'); - expect($('.apple').prev().hasClass('grape')).toBe(true); - expect($('.pear').prev().hasClass('grape')).toBe(true); - }); - - it('($(...)) : should create element and add as prev sibling', () => { - const grape = $('<li class="grape">Grape</li>'); - grape.insertBefore($('.apple')); - expect($('.apple').prev().hasClass('grape')).toBe(true); - }); - - it('($(...)) : should create element and add as next sibling of multiple elements', () => { - const grape = $('<li class="grape">Grape</li>'); - grape.insertBefore($('.apple, .pear')); - expect($('.apple').prev().hasClass('grape')).toBe(true); - expect($('.pear').prev().hasClass('grape')).toBe(true); - }); - - it('($(...)) : should create all elements in the array and add as prev siblings', () => { - const more = $('<li class="plum">Plum</li><li class="grape">Grape</li>'); - more.insertBefore($('.apple')); - expect($fruits.children().eq(0).hasClass('plum')).toBe(true); - expect($fruits.children().eq(1).hasClass('grape')).toBe(true); - expect($fruits.children().eq(2).hasClass('apple')).toBe(true); - }); - - it('(existing Node) : should remove existing nodes from previous locations', () => { - $('.pear').insertBefore('.apple'); - expect($fruits.children().eq(2).hasClass('pear')).toBe(false); - expect($fruits.children().length).toBe(3); - expect($('.pear').length).toBe(1); - }); - - it('(existing Node) : should update original direct siblings', () => { - $('.pear').insertBefore('.apple'); - expect($('.apple').prev().hasClass('pear')).toBe(true); - expect($('.apple').next().hasClass('orange')).toBe(true); - expect($('.pear').next().hasClass('apple')).toBe(true); - expect($('.pear').prev()).toHaveLength(0); - }); - - it('(existing Node) : should update original direct siblings of multiple elements', () => { - $('.pear').insertBefore('.apple, .orange'); - expect($('.apple').prev().hasClass('pear')).toBe(true); - expect($('.apple').next().hasClass('pear')).toBe(true); - expect($('.orange').prev().hasClass('pear')).toBe(true); - expect($('.orange').next()).toHaveLength(0); - expect($fruits.children().length).toBe(4); - const pears = $('.pear'); - expect(pears.length).toBe(2); - expect(pears.eq(0).next().hasClass('apple')).toBe(true); - expect(pears.eq(1).next().hasClass('orange')).toBe(true); - }); - - it('(elem) : should handle if removed', () => { - const $apple = $('.apple'); - const $plum = $('<li class="plum">Plum</li>'); - - $apple.remove(); - $plum.insertBefore($apple); - expect($plum.next()).toHaveLength(0); - }); - - it('(single) should return the new element for chaining', () => { - const $grape = $('<li class="grape">Grape</li>').insertBefore('.apple'); - expect($grape.cheerio).toBeTruthy(); - expect($grape.each).toBeTruthy(); - expect($grape.length).toBe(1); - expect($grape.hasClass('grape')).toBe(true); - }); - - it('(single) should return the new elements for chaining', () => { - const $purple = $( - '<li class="grape">Grape</li><li class="plum">Plum</li>', - ).insertBefore('.apple'); - expect($purple.cheerio).toBeTruthy(); - expect($purple.each).toBeTruthy(); - expect($purple.length).toBe(2); - expect($purple.eq(0).hasClass('grape')).toBe(true); - expect($purple.eq(1).hasClass('plum')).toBe(true); - }); - - it('(multiple) should return the new elements for chaining', () => { - const $purple = $( - '<li class="grape">Grape</li><li class="plum">Plum</li>', - ).insertBefore('.apple, .pear'); - expect($purple.cheerio).toBeTruthy(); - expect($purple.each).toBeTruthy(); - expect($purple.length).toBe(4); - expect($purple.eq(0).hasClass('grape')).toBe(true); - expect($purple.eq(1).hasClass('plum')).toBe(true); - expect($purple.eq(2).hasClass('grape')).toBe(true); - expect($purple.eq(3).hasClass('plum')).toBe(true); - }); - - it('(single) should return the existing element for chaining', () => { - const $orange = $('.orange').insertBefore('.apple'); - expect($orange.cheerio).toBeTruthy(); - expect($orange.each).toBeTruthy(); - expect($orange.length).toBe(1); - expect($orange.hasClass('orange')).toBe(true); - }); - - it('(single) should return the existing elements for chaining', () => { - const $things = $('.orange, .pear').insertBefore('.apple'); - expect($things.cheerio).toBeTruthy(); - expect($things.each).toBeTruthy(); - expect($things.length).toBe(2); - expect($things.eq(0).hasClass('orange')).toBe(true); - expect($things.eq(1).hasClass('pear')).toBe(true); - }); - - it('(multiple) should return the existing elements for chaining', () => { - $('<li class="grape">Grape</li>').insertBefore('.apple'); - const $things = $('.orange, .apple').insertBefore('.pear, .grape'); - expect($things.cheerio).toBeTruthy(); - expect($things.each).toBeTruthy(); - expect($things.length).toBe(4); - expect($things.eq(0).hasClass('apple')).toBe(true); - expect($things.eq(1).hasClass('orange')).toBe(true); - expect($things.eq(2).hasClass('apple')).toBe(true); - expect($things.eq(3).hasClass('orange')).toBe(true); - }); - }); - - describe('.remove', () => { - it('() : should remove selected elements', () => { - $('.apple').remove(); - expect($fruits.find('.apple')).toHaveLength(0); - }); - - it('() : should be reentrant', () => { - const $apple = $('.apple'); - $apple.remove(); - $apple.remove(); - expect($fruits.find('.apple')).toHaveLength(0); - }); - - it('(selector) : should remove matching selected elements', () => { - $('li').remove('.apple'); - expect($fruits.find('.apple')).toHaveLength(0); - }); - - it('($(...)) : should remove from root element', () => { - const $plum = $('<li class="plum">Plum</li>'); - const root = $plum[0].parent; - expect(root?.type).toBe('root'); - - $plum.remove(); - expect($plum[0].parent).toBe(null); - expect(root?.childNodes).not.toContain($plum[0]); - }); - }); - - describe('.replaceWith', () => { - it('(elem) : should replace one <li> tag with another', () => { - const $plum = $('<li class="plum">Plum</li>'); - $('.orange').replaceWith($plum); - expect($('.apple').next().hasClass('plum')).toBe(true); - expect($('.apple').next().html()).toBe('Plum'); - expect($('.pear').prev().hasClass('plum')).toBe(true); - expect($('.pear').prev().html()).toBe('Plum'); - }); - - it('(Array) : should replace one <li> tag with the elements in the array', () => { - const more = $( - '<li class="plum">Plum</li><li class="grape">Grape</li>', - ).get(); - $('.orange').replaceWith(more); - - expect($fruits.children().eq(1).hasClass('plum')).toBe(true); - expect($fruits.children().eq(2).hasClass('grape')).toBe(true); - expect($('.apple').next().hasClass('plum')).toBe(true); - expect($('.pear').prev().hasClass('grape')).toBe(true); - expect($fruits.children()).toHaveLength(4); - }); - - it('(Node) : should replace the selected element with given node', () => { - const $src = $('<h2>hi <span>there</span></h2>'); - const $new = $('<ul></ul>'); - const $replaced = $src.find('span').replaceWith($new[0]); - expect($new[0].parentNode).toBe($src[0]); - expect($replaced[0].parentNode).toBe(null); - expect($.html($src)).toBe('<h2>hi <ul></ul></h2>'); - }); - - it('(existing element) : should remove element from its previous location', () => { - $('.pear').replaceWith($('.apple')); - expect($fruits.children()).toHaveLength(2); - expect($fruits.children()[0]).toBe($('.orange')[0]); - expect($fruits.children()[1]).toBe($('.apple')[0]); - }); - - it('(elem) : should NOP if removed', () => { - const $pear = $('.pear'); - const $plum = $('<li class="plum">Plum</li>'); - - $pear.remove(); - $pear.replaceWith($plum); - expect($('.orange').next().hasClass('plum')).toBe(false); - }); - - it('(elem) : should replace the single selected element with given element', () => { - const $src = $('<h2>hi <span>there</span></h2>'); - const $new = $('<div>here</div>'); - const $replaced = $src.find('span').replaceWith($new); - expect($new[0].parentNode).toBe($src[0]); - expect($replaced[0].parentNode).toBe(null); - expect($.html($src)).toBe('<h2>hi <div>here</div></h2>'); - }); - - it('(self) : should be replaced after replacing it with itself', () => { - const $a = load('<a>foo</a>', null, false); - const replacement = '<a>bar</a>'; - $a('a').replaceWith((_, el: AnyNode) => el); - $a('a').replaceWith(replacement); - expect($a.html()).toBe(replacement); - }); - - it('(str) : should accept strings', () => { - const $src = $('<h2>hi <span>there</span></h2>'); - const newStr = '<div>here</div>'; - const $replaced = $src.find('span').replaceWith(newStr); - expect($replaced[0].parentNode).toBe(null); - expect($.html($src)).toBe('<h2>hi <div>here</div></h2>'); - }); - - it('(str) : should replace all selected elements', () => { - const $src = $('<b>a<br>b<br>c<br>d</b>'); - const $replaced = $src.find('br').replaceWith(' '); - expect($replaced[0].parentNode).toBe(null); - expect($.html($src)).toBe('<b>a b c d</b>'); - }); - - it('(fn) : should invoke the callback with the correct argument and context', () => { - const origChildren = $fruits.children().get(); - const args: [number, AnyNode][] = []; - const thisValues: AnyNode[] = []; - - $fruits.children().replaceWith(function (...myArgs) { - args.push(myArgs); - thisValues.push(this); - return '<li class="first">'; - }); - - expect(args).toStrictEqual([ - [0, origChildren[0]], - [1, origChildren[1]], - [2, origChildren[2]], - ]); - expect(thisValues).toStrictEqual([ - origChildren[0], - origChildren[1], - origChildren[2], - ]); - }); - - it('(fn) : should replace the selected element with the returned string', () => { - $fruits.children().replaceWith(() => '<li class="first">'); - - expect($fruits.find('.first')).toHaveLength(3); - }); - - it('(fn) : should replace the selected element with the returned Cheerio object', () => { - $fruits.children().replaceWith(() => $('<li class="second">')); - - expect($fruits.find('.second')).toHaveLength(3); - }); - - it('(fn) : should replace the selected element with the returned node', () => { - $fruits.children().replaceWith(() => $('<li class="third">')[0]); - - expect($fruits.find('.third')).toHaveLength(3); - }); - - it('($(...)) : should remove from root element', () => { - const $plum = $('<li class="plum">Plum</li>'); - const root = $plum[0].parent; - expect(root?.type).toBe('root'); - - $fruits.children().replaceWith($plum); - expect($plum[0].parent?.type).not.toBe('root'); - expect(root?.childNodes).not.toContain($plum[0]); - }); - }); - - describe('.empty', () => { - it('() : should remove all children from selected elements', () => { - expect($fruits.children()).toHaveLength(3); - - $fruits.empty(); - expect($fruits.children()).toHaveLength(0); - }); - - it('() : should allow element reinsertion', () => { - const $children = $fruits.children(); - - $fruits.empty(); - expect($fruits.children()).toHaveLength(0); - expect($children).toHaveLength(3); - - $fruits.append($('<div></div><div></div>')); - const $remove = $fruits.children().eq(0); - - $remove.replaceWith($children); - expect($fruits.children()).toHaveLength(4); - }); - - it("() : should destroy children's references to the parent", () => { - const $children = $fruits.children(); - - $fruits.empty(); - - expect($children.eq(0).parent()).toHaveLength(0); - expect($children.eq(0).next()).toHaveLength(0); - expect($children.eq(0).prev()).toHaveLength(0); - expect($children.eq(1).parent()).toHaveLength(0); - expect($children.eq(1).next()).toHaveLength(0); - expect($children.eq(1).prev()).toHaveLength(0); - expect($children.eq(2).parent()).toHaveLength(0); - expect($children.eq(2).next()).toHaveLength(0); - expect($children.eq(2).prev()).toHaveLength(0); - }); - - it('() : should skip text nodes', () => { - const $text = load(mixedText); - const $body = $text($text('body')[0].children); - - $body.empty(); - - expect($text('body').html()).toBe('<a></a>TEXT<b></b>'); - }); - - it('() : should skip comment nodes', () => { - const $comment = load('<a>1</a><!--Comment-->TEXT<b>2</b>'); - const $body = $comment($comment('body')[0].children); - - $body.empty(); - - expect($comment('body').html()).toBe('<a></a><!--Comment-->TEXT<b></b>'); - }); - }); - - describe('.html', () => { - it('() : should get the innerHTML for an element', () => { - expect($fruits.html()).toBe( - [ - '<li class="apple">Apple</li>', - '<li class="orange">Orange</li>', - '<li class="pear">Pear</li>', - ].join(''), - ); - }); - - it('() : should get innerHTML even if its just text', () => { - expect($('.pear', '<li class="pear">Pear</li>').html()).toBe('Pear'); - }); - - it('() : should return empty string if nothing inside', () => { - expect($('li', '<li></li>').html()).toBe(''); - }); - - it('(html) : should set the html for its children', () => { - $fruits.html('<li class="durian">Durian</li>'); - const html = $fruits.html(); - expect(html).toBe('<li class="durian">Durian</li>'); - }); - - it('(html) : should add new elements for each element in selection', () => { - const $fruits = $('li'); - $fruits.html('<li class="durian">Durian</li>'); - let tested = 0; - $fruits.each(function () { - expect($(this).children().parent().get(0)).toBe(this); - tested++; - }); - expect(tested).toBe(3); - }); - - it('(html) : should skip text nodes', () => { - const $text = load(mixedText); - const $body = $text($text('body')[0].children); - - $body.html('test'); - - expect($text('body').html()).toBe('<a>test</a>TEXT<b>test</b>'); - }); - - it('(elem) : should set the html for its children with element', () => { - $fruits.html($('<li class="durian">Durian</li>')); - const html = $fruits.html(); - expect(html).toBe('<li class="durian">Durian</li>'); - }); - - it('(elem) : should move the passed element (#940)', () => { - $('.apple').html($('.orange')); - expect($fruits.html()).toBe( - '<li class="apple"><li class="orange">Orange</li></li><li class="pear">Pear</li>', - ); - }); - - it('() : should allow element reinsertion', () => { - const $children = $fruits.children(); - - $fruits.html('<div></div><div></div>'); - expect($fruits.children()).toHaveLength(2); - - const $remove = $fruits.children().eq(0); - - $remove.replaceWith($children); - expect($fruits.children()).toHaveLength(4); - }); - - it('(script value) : should add content as text', () => { - const $data = '<a><b>'; - const $script = $('<script>').html($data) as Cheerio<Element>; - - expect($script).toHaveLength(1); - expect($script[0].type).toBe('script'); - expect($script[0]).toHaveProperty('name', 'script'); - - expect($script[0].children).toHaveLength(1); - expect($script[0].children[0].type).toBe('text'); - expect($script[0].children[0]).toHaveProperty('data', $data); - }); - }); - - describe('.toString', () => { - it('() : should get the outerHTML for an element', () => { - expect($fruits.toString()).toBe(fruits); - }); - - it('() : should return an html string for a set of elements', () => { - expect($fruits.find('li').toString()).toBe( - '<li class="apple">Apple</li><li class="orange">Orange</li><li class="pear">Pear</li>', - ); - }); - - it('() : should be called implicitly', () => { - const string = [$('<foo>'), $('<bar>'), $('<baz>')].join(''); - expect(string).toBe('<foo></foo><bar></bar><baz></baz>'); - }); - - it('() : should pass options', () => { - const dom = load('&', { xml: { decodeEntities: false } }); - expect(dom.root().toString()).toBe('&'); - }); - }); - - describe('.text', () => { - it('() : gets the text for a single element', () => { - expect($('.apple').text()).toBe('Apple'); - }); - - it('() : combines all text from children text nodes', () => { - expect($('#fruits').text()).toBe('AppleOrangePear'); - }); - - it('(text) : sets the text for the child node', () => { - $('.apple').text('Granny Smith Apple'); - expect($('.apple')[0].childNodes[0]).toHaveProperty( - 'data', - 'Granny Smith Apple', - ); - }); - - it('(text) : inserts separate nodes for all children', () => { - $('li').text('Fruits'); - let tested = 0; - $('li').each(function () { - expect(this.childNodes[0].parentNode).toBe(this); - tested++; - }); - expect(tested).toBe(3); - }); - - it('(text) : should create a Node with the DOM level 1 API', () => { - const $apple = $('.apple'); - - $apple.text('anything'); - const textNode = $apple[0].childNodes[0]; - - expect(textNode.parentNode).toBe($apple[0]); - expect(textNode.nodeType).toBe(3); - expect(textNode).toHaveProperty('data', 'anything'); - }); - - it('(html) : should skip text nodes', () => { - const $text = load(mixedText); - const $body = $text($text('body')[0].children); - - $body.text('test'); - - expect($text('body').html()).toBe('<a>test</a>TEXT<b>test</b>'); - }); - - it('should allow functions as arguments', () => { - $('.apple').text((idx, content) => { - expect(idx).toBe(0); - expect(content).toBe('Apple'); - return 'whatever mate'; - }); - expect($('.apple')[0].childNodes[0]).toHaveProperty( - 'data', - 'whatever mate', - ); - }); - - it('should allow functions as arguments for multiple elements', () => { - $('li').text((idx) => `text${idx}`); - $('li').each(function (this, idx) { - expect(this.childNodes[0]).toHaveProperty('data', `text${idx}`); - }); - }); - - it('should decode special chars', () => { - const text = $('<p>M&M</p>').text(); - expect(text).toBe('M&M'); - }); - - it('should work with special chars added as strings', () => { - const text = $('<p>M&M</p>').text(); - expect(text).toBe('M&M'); - }); - - it('should turn passed values to strings', () => { - $('.apple').text(1 as never); - expect($('.apple')[0].childNodes[0]).toHaveProperty('data', '1'); - }); - - it('( undefined ) : should act as an accessor', () => { - const $div = $('<div>test</div>'); - expect(typeof $div.text(undefined as never)).toBe('string'); - expect($div.text()).toBe('test'); - }); - - it('( "" ) : should convert to string', () => { - const $div = $('<div>test</div>'); - expect($div.text('').text()).toBe(''); - }); - - it('( null ) : should convert to string', () => { - expect( - $('<div>') - .text(null as never) - .text(), - ).toBe('null'); - }); - - it('( 0 ) : should convert to string', () => { - expect( - $('<div>') - .text(0 as never) - .text(), - ).toBe('0'); - }); - - it('(str) should encode then decode unsafe characters', () => { - const $apple = $('.apple'); - - $apple.text('blah <script>alert("XSS!")</script> blah'); - expect($apple[0].childNodes[0]).toHaveProperty( - 'data', - 'blah <script>alert("XSS!")</script> blah', - ); - expect($apple.text()).toBe('blah <script>alert("XSS!")</script> blah'); - - $apple.text('blah <script>alert("XSS!")</script> blah'); - expect($apple.html()).not.toContain('<script>alert("XSS!")</script>'); - }); - }); - - describe('.clone', () => { - it('() : should return a copy', () => { - const $src = $( - '<div><span>foo</span><span>bar</span><span>baz</span></div>', - ).children(); - const $elem = $src.clone(); - expect($elem.length).toBe(3); - expect($elem.parent()).toHaveLength(0); - expect($elem.text()).toBe($src.text()); - $src.text('rofl'); - expect($elem.text()).not.toBe($src.text()); - }); - - it('() : should return a copy of document', () => { - const $src = load('<html><body><div>foo</div>bar</body></html>') - .root() - .children(); - const $elem = $src.clone(); - expect($elem.length).toBe(1); - expect($elem.parent()).toHaveLength(0); - expect($elem.text()).toBe($src.text()); - $src.text('rofl'); - expect($elem.text()).not.toBe($src.text()); - }); - - it('() : should preserve parsing options', () => { - const $ = load('<div>π</div>', { xml: { decodeEntities: false } }); - const $div = $('div'); - - expect($div.text()).toBe($div.clone().text()); - }); - }); -}); diff --git a/node_modules/cheerio/src/api/manipulation.ts b/node_modules/cheerio/src/api/manipulation.ts deleted file mode 100644 index 7c76360..0000000 --- a/node_modules/cheerio/src/api/manipulation.ts +++ /dev/null @@ -1,1111 +0,0 @@ -/** - * Methods for modifying the DOM structure. - * - * @module cheerio/manipulation - */ - -import { - isTag, - Text, - hasChildren, - cloneNode, - Document, - type ParentNode, - type AnyNode, - type Element, -} from 'domhandler'; -import { update as updateDOM } from '../parse.js'; -import { text as staticText } from '../static.js'; -import { domEach, isHtml, isCheerio } from '../utils.js'; -import { removeElement } from 'domutils'; -import type { Cheerio } from '../cheerio.js'; -import type { BasicAcceptedElems, AcceptedElems } from '../types.js'; - -/** - * Create an array of nodes, recursing into arrays and parsing strings if - * necessary. - * - * @private - * @category Manipulation - * @param elem - Elements to make an array of. - * @param clone - Optionally clone nodes. - * @returns The array of nodes. - */ -export function _makeDomArray<T extends AnyNode>( - this: Cheerio<T>, - elem?: BasicAcceptedElems<AnyNode> | BasicAcceptedElems<AnyNode>[], - clone?: boolean, -): AnyNode[] { - if (elem == null) { - return []; - } - - if (typeof elem === 'string') { - return this._parse(elem, this.options, false, null).children.slice(0); - } - - if ('length' in elem) { - if (elem.length === 1) { - return this._makeDomArray(elem[0], clone); - } - - const result: AnyNode[] = []; - - for (let i = 0; i < elem.length; i++) { - const el = elem[i]; - - if (typeof el === 'object') { - if (el == null) { - continue; - } - - if (!('length' in el)) { - result.push(clone ? cloneNode(el, true) : el); - continue; - } - } - - result.push(...this._makeDomArray(el, clone)); - } - - return result; - } - - return [clone ? cloneNode(elem, true) : elem]; -} - -function _insert( - concatenator: ( - dom: AnyNode[], - children: AnyNode[], - parent: ParentNode, - ) => void, -) { - return function <T extends AnyNode>( - this: Cheerio<T>, - ...elems: - | [ - ( - this: AnyNode, - i: number, - html: string, - ) => BasicAcceptedElems<AnyNode>, - ] - | BasicAcceptedElems<AnyNode>[] - ) { - const lastIdx = this.length - 1; - - return domEach(this, (el, i) => { - if (!hasChildren(el)) return; - - const domSrc = - typeof elems[0] === 'function' - ? elems[0].call(el, i, this._render(el.children)) - : (elems as BasicAcceptedElems<AnyNode>[]); - - const dom = this._makeDomArray(domSrc, i < lastIdx); - concatenator(dom, el.children, el); - }); - }; -} - -/** - * Modify an array in-place, removing some number of elements and adding new - * elements directly following them. - * - * @private - * @category Manipulation - * @param array - Target array to splice. - * @param spliceIdx - Index at which to begin changing the array. - * @param spliceCount - Number of elements to remove from the array. - * @param newElems - Elements to insert into the array. - * @param parent - The parent of the node. - * @returns The spliced array. - */ -function uniqueSplice( - array: AnyNode[], - spliceIdx: number, - spliceCount: number, - newElems: AnyNode[], - parent: ParentNode, -): AnyNode[] { - const spliceArgs: Parameters<typeof Array.prototype.splice> = [ - spliceIdx, - spliceCount, - ...newElems, - ]; - const prev = spliceIdx === 0 ? null : array[spliceIdx - 1]; - const next = - spliceIdx + spliceCount >= array.length - ? null - : array[spliceIdx + spliceCount]; - - /* - * Before splicing in new elements, ensure they do not already appear in the - * current array. - */ - for (let idx = 0; idx < newElems.length; ++idx) { - const node = newElems[idx]; - const oldParent = node.parent; - - if (oldParent) { - const oldSiblings: AnyNode[] = oldParent.children; - const prevIdx = oldSiblings.indexOf(node); - - if (prevIdx > -1) { - oldParent.children.splice(prevIdx, 1); - if (parent === oldParent && spliceIdx > prevIdx) { - spliceArgs[0]--; - } - } - } - - node.parent = parent; - - if (node.prev) { - node.prev.next = node.next ?? null; - } - - if (node.next) { - node.next.prev = node.prev ?? null; - } - - node.prev = idx === 0 ? prev : newElems[idx - 1]; - node.next = idx === newElems.length - 1 ? next : newElems[idx + 1]; - } - - if (prev) { - prev.next = newElems[0]; - } - if (next) { - next.prev = newElems[newElems.length - 1]; - } - return array.splice(...spliceArgs); -} - -/** - * Insert every element in the set of matched elements to the end of the target. - * - * @category Manipulation - * @example - * - * ```js - * $('<li class="plum">Plum</li>').appendTo('#fruits'); - * $.html(); - * //=> <ul id="fruits"> - * // <li class="apple">Apple</li> - * // <li class="orange">Orange</li> - * // <li class="pear">Pear</li> - * // <li class="plum">Plum</li> - * // </ul> - * ``` - * - * @param target - Element to append elements to. - * @returns The instance itself. - * @see {@link https://api.jquery.com/appendTo/} - */ -export function appendTo<T extends AnyNode>( - this: Cheerio<T>, - target: BasicAcceptedElems<AnyNode>, -): Cheerio<T> { - const appendTarget = isCheerio<T>(target) ? target : this._make(target); - - appendTarget.append(this); - - return this; -} - -/** - * Insert every element in the set of matched elements to the beginning of the - * target. - * - * @category Manipulation - * @example - * - * ```js - * $('<li class="plum">Plum</li>').prependTo('#fruits'); - * $.html(); - * //=> <ul id="fruits"> - * // <li class="plum">Plum</li> - * // <li class="apple">Apple</li> - * // <li class="orange">Orange</li> - * // <li class="pear">Pear</li> - * // </ul> - * ``` - * - * @param target - Element to prepend elements to. - * @returns The instance itself. - * @see {@link https://api.jquery.com/prependTo/} - */ -export function prependTo<T extends AnyNode>( - this: Cheerio<T>, - target: BasicAcceptedElems<AnyNode>, -): Cheerio<T> { - const prependTarget = isCheerio<T>(target) ? target : this._make(target); - - prependTarget.prepend(this); - - return this; -} - -/** - * Inserts content as the _last_ child of each of the selected elements. - * - * @category Manipulation - * @example - * - * ```js - * $('ul').append('<li class="plum">Plum</li>'); - * $.html(); - * //=> <ul id="fruits"> - * // <li class="apple">Apple</li> - * // <li class="orange">Orange</li> - * // <li class="pear">Pear</li> - * // <li class="plum">Plum</li> - * // </ul> - * ``` - * - * @see {@link https://api.jquery.com/append/} - */ -export const append: <T extends AnyNode>( - this: Cheerio<T>, - ...elems: - | [(this: AnyNode, i: number, html: string) => BasicAcceptedElems<AnyNode>] - | BasicAcceptedElems<AnyNode>[] -) => Cheerio<T> = _insert((dom, children, parent) => { - uniqueSplice(children, children.length, 0, dom, parent); -}); - -/** - * Inserts content as the _first_ child of each of the selected elements. - * - * @category Manipulation - * @example - * - * ```js - * $('ul').prepend('<li class="plum">Plum</li>'); - * $.html(); - * //=> <ul id="fruits"> - * // <li class="plum">Plum</li> - * // <li class="apple">Apple</li> - * // <li class="orange">Orange</li> - * // <li class="pear">Pear</li> - * // </ul> - * ``` - * - * @see {@link https://api.jquery.com/prepend/} - */ -export const prepend: <T extends AnyNode>( - this: Cheerio<T>, - ...elems: - | [(this: AnyNode, i: number, html: string) => BasicAcceptedElems<AnyNode>] - | BasicAcceptedElems<AnyNode>[] -) => Cheerio<T> = _insert((dom, children, parent) => { - uniqueSplice(children, 0, 0, dom, parent); -}); - -function _wrap( - insert: ( - el: AnyNode, - elInsertLocation: ParentNode, - wrapperDom: ParentNode[], - ) => void, -) { - return function <T extends AnyNode>( - this: Cheerio<T>, - wrapper: AcceptedElems<AnyNode>, - ) { - const lastIdx = this.length - 1; - const lastParent = this.parents().last(); - - for (let i = 0; i < this.length; i++) { - const el = this[i]; - - const wrap = - typeof wrapper === 'function' - ? wrapper.call(el, i, el) - : typeof wrapper === 'string' && !isHtml(wrapper) - ? lastParent.find(wrapper).clone() - : wrapper; - - const [wrapperDom] = this._makeDomArray(wrap, i < lastIdx); - - if (!wrapperDom || !hasChildren(wrapperDom)) continue; - - let elInsertLocation = wrapperDom; - - /* - * Find the deepest child. Only consider the first tag child of each node - * (ignore text); stop if no children are found. - */ - let j = 0; - - while (j < elInsertLocation.children.length) { - const child = elInsertLocation.children[j]; - if (isTag(child)) { - elInsertLocation = child; - j = 0; - } else { - j++; - } - } - - insert(el, elInsertLocation, [wrapperDom]); - } - - return this; - }; -} - -/** - * The .wrap() function can take any string or object that could be passed to - * the $() factory function to specify a DOM structure. This structure may be - * nested several levels deep, but should contain only one inmost element. A - * copy of this structure will be wrapped around each of the elements in the set - * of matched elements. This method returns the original set of elements for - * chaining purposes. - * - * @category Manipulation - * @example - * - * ```js - * const redFruit = $('<div class="red-fruit"></div>'); - * $('.apple').wrap(redFruit); - * - * //=> <ul id="fruits"> - * // <div class="red-fruit"> - * // <li class="apple">Apple</li> - * // </div> - * // <li class="orange">Orange</li> - * // <li class="plum">Plum</li> - * // </ul> - * - * const healthy = $('<div class="healthy"></div>'); - * $('li').wrap(healthy); - * - * //=> <ul id="fruits"> - * // <div class="healthy"> - * // <li class="apple">Apple</li> - * // </div> - * // <div class="healthy"> - * // <li class="orange">Orange</li> - * // </div> - * // <div class="healthy"> - * // <li class="plum">Plum</li> - * // </div> - * // </ul> - * ``` - * - * @param wrapper - The DOM structure to wrap around each element in the - * selection. - * @see {@link https://api.jquery.com/wrap/} - */ -export const wrap: <T extends AnyNode>( - this: Cheerio<T>, - wrapper: AcceptedElems<AnyNode>, -) => Cheerio<T> = _wrap((el, elInsertLocation, wrapperDom) => { - const { parent } = el; - - if (!parent) return; - - const siblings: AnyNode[] = parent.children; - const index = siblings.indexOf(el); - - updateDOM([el], elInsertLocation); - /* - * The previous operation removed the current element from the `siblings` - * array, so the `dom` array can be inserted without removing any - * additional elements. - */ - uniqueSplice(siblings, index, 0, wrapperDom, parent); -}); - -/** - * The .wrapInner() function can take any string or object that could be passed - * to the $() factory function to specify a DOM structure. This structure may be - * nested several levels deep, but should contain only one inmost element. The - * structure will be wrapped around the content of each of the elements in the - * set of matched elements. - * - * @category Manipulation - * @example - * - * ```js - * const redFruit = $('<div class="red-fruit"></div>'); - * $('.apple').wrapInner(redFruit); - * - * //=> <ul id="fruits"> - * // <li class="apple"> - * // <div class="red-fruit">Apple</div> - * // </li> - * // <li class="orange">Orange</li> - * // <li class="pear">Pear</li> - * // </ul> - * - * const healthy = $('<div class="healthy"></div>'); - * $('li').wrapInner(healthy); - * - * //=> <ul id="fruits"> - * // <li class="apple"> - * // <div class="healthy">Apple</div> - * // </li> - * // <li class="orange"> - * // <div class="healthy">Orange</div> - * // </li> - * // <li class="pear"> - * // <div class="healthy">Pear</div> - * // </li> - * // </ul> - * ``` - * - * @param wrapper - The DOM structure to wrap around the content of each element - * in the selection. - * @returns The instance itself, for chaining. - * @see {@link https://api.jquery.com/wrapInner/} - */ -export const wrapInner: <T extends AnyNode>( - this: Cheerio<T>, - wrapper: AcceptedElems<AnyNode>, -) => Cheerio<T> = _wrap((el, elInsertLocation, wrapperDom) => { - if (!hasChildren(el)) return; - updateDOM(el.children, elInsertLocation); - updateDOM(wrapperDom, el); -}); - -/** - * The .unwrap() function, removes the parents of the set of matched elements - * from the DOM, leaving the matched elements in their place. - * - * @category Manipulation - * @example <caption>without selector</caption> - * - * ```js - * const $ = cheerio.load( - * '<div id=test>\n <div><p>Hello</p></div>\n <div><p>World</p></div>\n</div>', - * ); - * $('#test p').unwrap(); - * - * //=> <div id=test> - * // <p>Hello</p> - * // <p>World</p> - * // </div> - * ``` - * - * @example <caption>with selector</caption> - * - * ```js - * const $ = cheerio.load( - * '<div id=test>\n <p>Hello</p>\n <b><p>World</p></b>\n</div>', - * ); - * $('#test p').unwrap('b'); - * - * //=> <div id=test> - * // <p>Hello</p> - * // <p>World</p> - * // </div> - * ``` - * - * @param selector - A selector to check the parent element against. If an - * element's parent does not match the selector, the element won't be - * unwrapped. - * @returns The instance itself, for chaining. - * @see {@link https://api.jquery.com/unwrap/} - */ -export function unwrap<T extends AnyNode>( - this: Cheerio<T>, - selector?: string, -): Cheerio<T> { - this.parent(selector) - .not('body') - .each((_, el) => { - this._make(el).replaceWith(el.children); - }); - return this; -} - -/** - * The .wrapAll() function can take any string or object that could be passed to - * the $() function to specify a DOM structure. This structure may be nested - * several levels deep, but should contain only one inmost element. The - * structure will be wrapped around all of the elements in the set of matched - * elements, as a single group. - * - * @category Manipulation - * @example <caption>With markup passed to `wrapAll`</caption> - * - * ```js - * const $ = cheerio.load( - * '<div class="container"><div class="inner">First</div><div class="inner">Second</div></div>', - * ); - * $('.inner').wrapAll("<div class='new'></div>"); - * - * //=> <div class="container"> - * // <div class='new'> - * // <div class="inner">First</div> - * // <div class="inner">Second</div> - * // </div> - * // </div> - * ``` - * - * @example <caption>With an existing cheerio instance</caption> - * - * ```js - * const $ = cheerio.load( - * '<span>Span 1</span><strong>Strong</strong><span>Span 2</span>', - * ); - * const wrap = $('<div><p><em><b></b></em></p></div>'); - * $('span').wrapAll(wrap); - * - * //=> <div> - * // <p> - * // <em> - * // <b> - * // <span>Span 1</span> - * // <span>Span 2</span> - * // </b> - * // </em> - * // </p> - * // </div> - * // <strong>Strong</strong> - * ``` - * - * @param wrapper - The DOM structure to wrap around all matched elements in the - * selection. - * @returns The instance itself. - * @see {@link https://api.jquery.com/wrapAll/} - */ -export function wrapAll<T extends AnyNode>( - this: Cheerio<T>, - wrapper: AcceptedElems<T>, -): Cheerio<T> { - const el = this[0]; - if (el) { - const wrap: Cheerio<AnyNode> = this._make( - typeof wrapper === 'function' ? wrapper.call(el, 0, el) : wrapper, - ).insertBefore(el); - - // If html is given as wrapper, wrap may contain text elements - let elInsertLocation: Element | undefined; - - for (let i = 0; i < wrap.length; i++) { - if (wrap[i].type === 'tag') elInsertLocation = wrap[i] as Element; - } - - let j = 0; - - /* - * Find the deepest child. Only consider the first tag child of each node - * (ignore text); stop if no children are found. - */ - while (elInsertLocation && j < elInsertLocation.children.length) { - const child = elInsertLocation.children[j]; - if (child.type === 'tag') { - elInsertLocation = child as Element; - j = 0; - } else { - j++; - } - } - - if (elInsertLocation) this._make(elInsertLocation).append(this); - } - return this; -} - -/** - * Insert content next to each element in the set of matched elements. - * - * @category Manipulation - * @example - * - * ```js - * $('.apple').after('<li class="plum">Plum</li>'); - * $.html(); - * //=> <ul id="fruits"> - * // <li class="apple">Apple</li> - * // <li class="plum">Plum</li> - * // <li class="orange">Orange</li> - * // <li class="pear">Pear</li> - * // </ul> - * ``` - * - * @param elems - HTML string, DOM element, array of DOM elements or Cheerio to - * insert after each element in the set of matched elements. - * @returns The instance itself. - * @see {@link https://api.jquery.com/after/} - */ -export function after<T extends AnyNode>( - this: Cheerio<T>, - ...elems: - | [(this: AnyNode, i: number, html: string) => BasicAcceptedElems<AnyNode>] - | BasicAcceptedElems<AnyNode>[] -): Cheerio<T> { - const lastIdx = this.length - 1; - - return domEach(this, (el, i) => { - if (!hasChildren(el) || !el.parent) { - return; - } - - const siblings: AnyNode[] = el.parent.children; - const index = siblings.indexOf(el); - - // If not found, move on - /* istanbul ignore next */ - if (index < 0) return; - - const domSrc = - typeof elems[0] === 'function' - ? elems[0].call(el, i, this._render(el.children)) - : (elems as BasicAcceptedElems<AnyNode>[]); - - const dom = this._makeDomArray(domSrc, i < lastIdx); - - // Add element after `this` element - uniqueSplice(siblings, index + 1, 0, dom, el.parent); - }); -} - -/** - * Insert every element in the set of matched elements after the target. - * - * @category Manipulation - * @example - * - * ```js - * $('<li class="plum">Plum</li>').insertAfter('.apple'); - * $.html(); - * //=> <ul id="fruits"> - * // <li class="apple">Apple</li> - * // <li class="plum">Plum</li> - * // <li class="orange">Orange</li> - * // <li class="pear">Pear</li> - * // </ul> - * ``` - * - * @param target - Element to insert elements after. - * @returns The set of newly inserted elements. - * @see {@link https://api.jquery.com/insertAfter/} - */ -export function insertAfter<T extends AnyNode>( - this: Cheerio<T>, - target: BasicAcceptedElems<AnyNode>, -): Cheerio<T> { - if (typeof target === 'string') { - target = this._make<AnyNode>(target); - } - - this.remove(); - - const clones: T[] = []; - - for (const el of this._makeDomArray(target)) { - const clonedSelf = this.clone().toArray(); - const { parent } = el; - if (!parent) { - continue; - } - - const siblings: AnyNode[] = parent.children; - const index = siblings.indexOf(el); - - // If not found, move on - /* istanbul ignore next */ - if (index < 0) continue; - - // Add cloned `this` element(s) after target element - uniqueSplice(siblings, index + 1, 0, clonedSelf, parent); - clones.push(...clonedSelf); - } - - return this._make(clones); -} - -/** - * Insert content previous to each element in the set of matched elements. - * - * @category Manipulation - * @example - * - * ```js - * $('.apple').before('<li class="plum">Plum</li>'); - * $.html(); - * //=> <ul id="fruits"> - * // <li class="plum">Plum</li> - * // <li class="apple">Apple</li> - * // <li class="orange">Orange</li> - * // <li class="pear">Pear</li> - * // </ul> - * ``` - * - * @param elems - HTML string, DOM element, array of DOM elements or Cheerio to - * insert before each element in the set of matched elements. - * @returns The instance itself. - * @see {@link https://api.jquery.com/before/} - */ -export function before<T extends AnyNode>( - this: Cheerio<T>, - ...elems: - | [(this: AnyNode, i: number, html: string) => BasicAcceptedElems<AnyNode>] - | BasicAcceptedElems<AnyNode>[] -): Cheerio<T> { - const lastIdx = this.length - 1; - - return domEach(this, (el, i) => { - if (!hasChildren(el) || !el.parent) { - return; - } - - const siblings: AnyNode[] = el.parent.children; - const index = siblings.indexOf(el); - - // If not found, move on - /* istanbul ignore next */ - if (index < 0) return; - - const domSrc = - typeof elems[0] === 'function' - ? elems[0].call(el, i, this._render(el.children)) - : (elems as BasicAcceptedElems<AnyNode>[]); - - const dom = this._makeDomArray(domSrc, i < lastIdx); - - // Add element before `el` element - uniqueSplice(siblings, index, 0, dom, el.parent); - }); -} - -/** - * Insert every element in the set of matched elements before the target. - * - * @category Manipulation - * @example - * - * ```js - * $('<li class="plum">Plum</li>').insertBefore('.apple'); - * $.html(); - * //=> <ul id="fruits"> - * // <li class="plum">Plum</li> - * // <li class="apple">Apple</li> - * // <li class="orange">Orange</li> - * // <li class="pear">Pear</li> - * // </ul> - * ``` - * - * @param target - Element to insert elements before. - * @returns The set of newly inserted elements. - * @see {@link https://api.jquery.com/insertBefore/} - */ -export function insertBefore<T extends AnyNode>( - this: Cheerio<T>, - target: BasicAcceptedElems<AnyNode>, -): Cheerio<T> { - const targetArr = this._make<AnyNode>(target); - - this.remove(); - - const clones: T[] = []; - - domEach(targetArr, (el) => { - const clonedSelf = this.clone().toArray(); - const { parent } = el; - if (!parent) { - return; - } - - const siblings: AnyNode[] = parent.children; - const index = siblings.indexOf(el); - - // If not found, move on - /* istanbul ignore next */ - if (index < 0) return; - - // Add cloned `this` element(s) after target element - uniqueSplice(siblings, index, 0, clonedSelf, parent); - clones.push(...clonedSelf); - }); - - return this._make(clones); -} - -/** - * Removes the set of matched elements from the DOM and all their children. - * `selector` filters the set of matched elements to be removed. - * - * @category Manipulation - * @example - * - * ```js - * $('.pear').remove(); - * $.html(); - * //=> <ul id="fruits"> - * // <li class="apple">Apple</li> - * // <li class="orange">Orange</li> - * // </ul> - * ``` - * - * @param selector - Optional selector for elements to remove. - * @returns The instance itself. - * @see {@link https://api.jquery.com/remove/} - */ -export function remove<T extends AnyNode>( - this: Cheerio<T>, - selector?: string, -): Cheerio<T> { - // Filter if we have selector - const elems = selector ? this.filter(selector) : this; - - domEach(elems, (el) => { - removeElement(el); - el.prev = el.next = el.parent = null; - }); - - return this; -} - -/** - * Replaces matched elements with `content`. - * - * @category Manipulation - * @example - * - * ```js - * const plum = $('<li class="plum">Plum</li>'); - * $('.pear').replaceWith(plum); - * $.html(); - * //=> <ul id="fruits"> - * // <li class="apple">Apple</li> - * // <li class="orange">Orange</li> - * // <li class="plum">Plum</li> - * // </ul> - * ``` - * - * @param content - Replacement for matched elements. - * @returns The instance itself. - * @see {@link https://api.jquery.com/replaceWith/} - */ -export function replaceWith<T extends AnyNode>( - this: Cheerio<T>, - content: AcceptedElems<AnyNode>, -): Cheerio<T> { - return domEach(this, (el, i) => { - const { parent } = el; - if (!parent) { - return; - } - - const siblings: AnyNode[] = parent.children; - const cont = - typeof content === 'function' ? content.call(el, i, el) : content; - const dom = this._makeDomArray(cont); - - /* - * In the case that `dom` contains nodes that already exist in other - * structures, ensure those nodes are properly removed. - */ - updateDOM(dom, null); - - const index = siblings.indexOf(el); - - // Completely remove old element - uniqueSplice(siblings, index, 1, dom, parent); - - if (!dom.includes(el)) { - el.parent = el.prev = el.next = null; - } - }); -} - -/** - * Removes all children from each item in the selection. Text nodes and comment - * nodes are left as is. - * - * @category Manipulation - * @example - * - * ```js - * $('ul').empty(); - * $.html(); - * //=> <ul id="fruits"></ul> - * ``` - * - * @returns The instance itself. - * @see {@link https://api.jquery.com/empty/} - */ -export function empty<T extends AnyNode>(this: Cheerio<T>): Cheerio<T> { - return domEach(this, (el) => { - if (!hasChildren(el)) return; - for (const child of el.children) { - child.next = child.prev = child.parent = null; - } - - el.children.length = 0; - }); -} - -/** - * Gets an HTML content string from the first selected element. - * - * @category Manipulation - * @example - * - * ```js - * $('.orange').html(); - * //=> Orange - * - * $('#fruits').html('<li class="mango">Mango</li>').html(); - * //=> <li class="mango">Mango</li> - * ``` - * - * @returns The HTML content string. - * @see {@link https://api.jquery.com/html/} - */ -export function html<T extends AnyNode>(this: Cheerio<T>): string | null; -/** - * Replaces each selected element's content with the specified content. - * - * @category Manipulation - * @example - * - * ```js - * $('.orange').html('<li class="mango">Mango</li>').html(); - * //=> <li class="mango">Mango</li> - * ``` - * - * @param str - The content to replace selection's contents with. - * @returns The instance itself. - * @see {@link https://api.jquery.com/html/} - */ -export function html<T extends AnyNode>( - this: Cheerio<T>, - str: string | Cheerio<T>, -): Cheerio<T>; -export function html<T extends AnyNode>( - this: Cheerio<T>, - str?: string | Cheerio<AnyNode>, -): Cheerio<T> | string | null { - if (str === undefined) { - const el = this[0]; - if (!el || !hasChildren(el)) return null; - return this._render(el.children); - } - - return domEach(this, (el) => { - if (!hasChildren(el)) return; - for (const child of el.children) { - child.next = child.prev = child.parent = null; - } - - const content = isCheerio(str) - ? str.toArray() - : this._parse(`${str}`, this.options, false, el).children; - - updateDOM(content, el); - }); -} - -/** - * Turns the collection to a string. Alias for `.html()`. - * - * @category Manipulation - * @returns The rendered document. - */ -export function toString<T extends AnyNode>(this: Cheerio<T>): string { - return this._render(this); -} - -/** - * Get the combined text contents of each element in the set of matched - * elements, including their descendants. - * - * @category Manipulation - * @example - * - * ```js - * $('.orange').text(); - * //=> Orange - * - * $('ul').text(); - * //=> Apple - * // Orange - * // Pear - * ``` - * - * @returns The text contents of the collection. - * @see {@link https://api.jquery.com/text/} - */ -export function text<T extends AnyNode>(this: Cheerio<T>): string; -/** - * Set the content of each element in the set of matched elements to the - * specified text. - * - * @category Manipulation - * @example - * - * ```js - * $('.orange').text('Orange'); - * //=> <div class="orange">Orange</div> - * ``` - * - * @param str - The text to set as the content of each matched element. - * @returns The instance itself. - * @see {@link https://api.jquery.com/text/} - */ -export function text<T extends AnyNode>( - this: Cheerio<T>, - str: string | ((this: AnyNode, i: number, text: string) => string), -): Cheerio<T>; -export function text<T extends AnyNode>( - this: Cheerio<T>, - str?: string | ((this: AnyNode, i: number, text: string) => string), -): Cheerio<T> | string { - // If `str` is undefined, act as a "getter" - if (str === undefined) { - return staticText(this); - } - if (typeof str === 'function') { - // Function support - return domEach(this, (el, i) => - this._make(el).text(str.call(el, i, staticText([el]))), - ); - } - - // Append text node to each selected elements - return domEach(this, (el) => { - if (!hasChildren(el)) return; - for (const child of el.children) { - child.next = child.prev = child.parent = null; - } - - const textNode = new Text(`${str}`); - - updateDOM(textNode, el); - }); -} - -/** - * Clone the cheerio object. - * - * @category Manipulation - * @example - * - * ```js - * const moreFruit = $('#fruits').clone(); - * ``` - * - * @returns The cloned object. - * @see {@link https://api.jquery.com/clone/} - */ -export function clone<T extends AnyNode>(this: Cheerio<T>): Cheerio<T> { - const clone = Array.prototype.map.call(this.get(), (el) => - cloneNode(el, true), - ) as T[]; - - // Add a root node around the cloned nodes - const root = new Document(clone); - for (const node of clone) { - node.parent = root; - } - - return this._make(clone); -} diff --git a/node_modules/cheerio/src/api/traversing.spec.ts b/node_modules/cheerio/src/api/traversing.spec.ts deleted file mode 100644 index b57baf6..0000000 --- a/node_modules/cheerio/src/api/traversing.spec.ts +++ /dev/null @@ -1,1677 +0,0 @@ -import { describe, it, expect, beforeEach } from 'vitest'; -import { load, type CheerioAPI } from '../index.js'; -import { Cheerio } from '../cheerio.js'; -import { type AnyNode, type Element, type Text, isText } from 'domhandler'; -import { - cheerio, - food, - fruits, - eleven, - drinks, - text, - forms, - mixedText, - vegetables, -} from '../__fixtures__/fixtures.js'; - -function getText(el: Cheerio<Element>) { - if (el.length === 0) return undefined; - const [firstChild] = el[0].childNodes; - return isText(firstChild) ? firstChild.data : undefined; -} - -describe('$(...)', () => { - let $: CheerioAPI; - - beforeEach(() => { - $ = load(fruits); - }); - - describe('.load', () => { - it('should throw a TypeError if given invalid input', () => { - expect(() => { - (load as any)(); - }).toThrow('cheerio.load() expects a string'); - }); - }); - - describe('.find', () => { - it('() : should find nothing', () => { - expect($('ul').find()).toHaveLength(0); - }); - - it('(single) : should find one descendant', () => { - expect($('#fruits').find('.apple')[0].attribs).toHaveProperty( - 'class', - 'apple', - ); - }); - - // #1679 - text tags not filtered - it('(single) : should filter out text nodes', () => { - const $root = $(`<html>\n${fruits.replace(/></g, '>\n<')}\n</html>`); - expect($root.find('.apple')[0].attribs).toHaveProperty('class', 'apple'); - }); - - it('(many) : should find all matching descendant', () => { - expect($('#fruits').find('li')).toHaveLength(3); - }); - - it('(many) : should merge all selected elems with matching descendants', () => { - expect($('#fruits, #food', food).find('.apple')).toHaveLength(1); - }); - - it('(invalid single) : should return empty if cant find', () => { - expect($('ul').find('blah')).toHaveLength(0); - }); - - it('(invalid single) : should query descendants only', () => { - expect($('#fruits').find('ul')).toHaveLength(0); - }); - - it('should return empty if search already empty result', () => { - expect($('#not-fruits').find('li')).toHaveLength(0); - }); - - it('should lowercase selectors', () => { - expect($('#fruits').find('LI')).toHaveLength(3); - }); - - it('should query immediate descendant only', () => { - const q = load('<foo><bar><bar></bar><bar></bar></bar></foo>'); - expect(q('foo').find('> bar')).toHaveLength(1); - }); - - it('should find siblings', () => { - const q = load('<p class=a><p class=b></p>'); - expect(q('.a').find('+.b')).toHaveLength(1); - expect(q('.a').find('~.b')).toHaveLength(1); - expect(q('.a').find('+.a')).toHaveLength(0); - expect(q('.a').find('~.a')).toHaveLength(0); - }); - - it('should query case-sensitively when in xml mode', () => { - const q = load('<caseSenSitive allTheWay>', { xml: true }); - expect(q('caseSenSitive')).toHaveLength(1); - expect(q('[allTheWay]')).toHaveLength(1); - expect(q('casesensitive')).toHaveLength(0); - expect(q('[alltheway]')).toHaveLength(0); - }); - - it('should throw an Error if given an invalid selector', () => { - expect(() => { - $('#fruits').find(':bah'); - }).toThrow('Unknown pseudo-class :bah'); - }); - - it('should respect the `lowerCaseTags` option (#3495)', () => { - const q = load( - `<parentTag class="myClass"> - <firstTag> <child> blah </child> </firstTag> - <secondTag> <child> blah </child> </secondTag> - </parentTag> `, - { - xml: { - xmlMode: true, - decodeEntities: false, - lowerCaseTags: true, - lowerCaseAttributeNames: false, - recognizeSelfClosing: true, - }, - }, - ); - expect(q('.myClass').find('firstTag > child')).toHaveLength(1); - }); - - describe('(cheerio object) :', () => { - it('returns only those nodes contained within the current selection', () => { - const q = load(food); - const $selection = q('#fruits').find(q('li')); - - expect($selection).toHaveLength(3); - expect($selection[0]).toBe(q('.apple')[0]); - expect($selection[1]).toBe(q('.orange')[0]); - expect($selection[2]).toBe(q('.pear')[0]); - }); - it('returns only those nodes contained within any element in the current selection', () => { - const q = load(food); - const $selection = q('.apple, #vegetables').find(q('li')); - - expect($selection).toHaveLength(2); - expect($selection[0]).toBe(q('.carrot')[0]); - expect($selection[1]).toBe(q('.sweetcorn')[0]); - }); - }); - - describe('(node) :', () => { - it('returns node when contained within the current selection', () => { - const q = load(food); - const $selection = q('#fruits').find(q('.apple')[0]); - - expect($selection).toHaveLength(1); - expect($selection[0]).toBe(q('.apple')[0]); - }); - it('returns node when contained within any element the current selection', () => { - const q = load(food); - const $selection = q('#fruits, #vegetables').find(q('.carrot')[0]); - - expect($selection).toHaveLength(1); - expect($selection[0]).toBe(q('.carrot')[0]); - }); - it('does not return node that is not contained within the current selection', () => { - const q = load(food); - const $selection = q('#fruits').find(q('.carrot')[0]); - - expect($selection).toHaveLength(0); - }); - }); - }); - - describe('.children', () => { - it('() : should get all children', () => { - expect($('ul').children()).toHaveLength(3); - }); - - it('() : should skip text nodes', () => { - expect($(mixedText).children()).toHaveLength(0); - }); - - it('() : should return children of all matched elements', () => { - expect($('ul ul', food).children()).toHaveLength(5); - }); - - it('(selector) : should return children matching selector', () => { - const { attribs } = $('ul').children('.orange')[0]; - expect(attribs).toHaveProperty('class', 'orange'); - }); - - it('(invalid selector) : should return empty', () => { - expect($('ul').children('.lulz')).toHaveLength(0); - }); - - it('should only match immediate children, not ancestors', () => { - expect($(food).children('li')).toHaveLength(0); - }); - }); - - describe('.contents', () => { - beforeEach(() => { - $ = load(text); - }); - - it('() : should get all contents', () => { - expect($('p').contents()).toHaveLength(5); - }); - - it('() : should skip text nodes', () => { - expect($(mixedText).contents()).toHaveLength(2); - }); - - it('() : should include text nodes', () => { - expect($('p').contents().first()[0].type).toBe('text'); - }); - - it('() : should include comment nodes', () => { - expect($('p').contents().last()[0].type).toBe('comment'); - }); - }); - - describe('.next', () => { - it('() : should return next element', () => { - const { attribs } = $('.orange').next()[0]; - expect(attribs).toHaveProperty('class', 'pear'); - }); - - it('() : should skip text nodes', () => { - expect($(mixedText).next()[0]).toHaveProperty('name', 'b'); - }); - - it('(no next) : should return empty for last child', () => { - expect($('.pear').next()).toHaveLength(0); - }); - - it('(next on empty object) : should return empty', () => { - expect($('.banana').next()).toHaveLength(0); - }); - - it('() : should operate over all elements in the selection', () => { - expect($('.apple, .orange', food).next()).toHaveLength(2); - }); - - it('() : should return elements in order', () => { - const result = load(eleven)('.red').next(); - expect(result).toHaveLength(2); - expect(result.eq(0).text()).toBe('Six'); - expect(result.eq(1).text()).toBe('Ten'); - }); - - it('should reject elements that violate the filter', () => { - expect($('.apple').next('.non-existent')).toHaveLength(0); - }); - - it('should accept elements that satisify the filter', () => { - expect($('.apple').next('.orange')).toHaveLength(1); - }); - - describe('(selector) :', () => { - it('should reject elements that violate the filter', () => { - expect($('.apple').next('.non-existent')).toHaveLength(0); - }); - - it('should accept elements that satisify the filter', () => { - expect($('.apple').next('.orange')).toHaveLength(1); - }); - }); - }); - - describe('.nextAll', () => { - it('() : should return all following siblings', () => { - const elems = $('.apple').nextAll(); - expect(elems).toHaveLength(2); - expect(elems[0].attribs).toHaveProperty('class', 'orange'); - expect(elems[1].attribs).toHaveProperty('class', 'pear'); - }); - - it('(no next) : should return empty for last child', () => { - expect($('.pear').nextAll()).toHaveLength(0); - }); - - it('(nextAll on empty object) : should return empty', () => { - expect($('.banana').nextAll()).toHaveLength(0); - }); - - it('() : should operate over all elements in the selection', () => { - expect($('.apple, .carrot', food).nextAll()).toHaveLength(3); - }); - - it('() : should not contain duplicate elements', () => { - const elems = $('.apple, .orange', food); - expect(elems.nextAll()).toHaveLength(2); - }); - - it('() : should not contain text elements', () => { - const elems = $('.apple', fruits.replace(/></g, '>\n<')); - expect(elems.nextAll()).toHaveLength(2); - }); - - describe('(selector) :', () => { - it('should filter according to the provided selector', () => { - expect($('.apple').nextAll('.pear')).toHaveLength(1); - }); - - it("should not consider siblings' contents when filtering", () => { - expect($('#fruits', food).nextAll('li')).toHaveLength(0); - }); - }); - }); - - describe('.nextUntil', () => { - it('() : should return all following siblings if no selector specified', () => { - const elems = $('.apple', food).nextUntil(); - expect(elems).toHaveLength(2); - expect(elems[0].attribs).toHaveProperty('class', 'orange'); - expect(elems[1].attribs).toHaveProperty('class', 'pear'); - }); - - it('() : should filter out non-element nodes', () => { - const elems = $('<div><div></div><!-- comment -->text<div></div></div>'); - const div = elems.children().eq(0); - expect(div.nextUntil()).toHaveLength(1); - }); - - it('() : should operate over all elements in the selection', () => { - const elems = $('.apple, .carrot', food); - expect(elems.nextUntil()).toHaveLength(3); - }); - - it('() : should not contain duplicate elements', () => { - const elems = $('.apple, .orange', food); - expect(elems.nextUntil()).toHaveLength(2); - }); - - it('(selector) : should return all following siblings until selector', () => { - const elems = $('.apple', food).nextUntil('.pear'); - expect(elems).toHaveLength(1); - expect(elems[0].attribs).toHaveProperty('class', 'orange'); - }); - - it('(selector) : should support selector matching multiple elements', () => { - const elems = $('#disabled', forms).nextUntil('option, #unnamed'); - expect(elems).toHaveLength(2); - expect(elems[0].attribs).toHaveProperty('id', 'submit'); - expect(elems[1].attribs).toHaveProperty('id', 'select'); - }); - - it('(selector not sibling) : should return all following siblings', () => { - const elems = $('.apple').nextUntil('#vegetables'); - expect(elems).toHaveLength(2); - }); - - it('(selector, filterString) : should return all following siblings until selector, filtered by filter', () => { - const elems = $('.beer', drinks).nextUntil('.water', '.milk'); - expect(elems).toHaveLength(1); - expect(elems[0].attribs).toHaveProperty('class', 'milk'); - }); - - it('(null, filterString) : should return all following siblings until selector, filtered by filter', () => { - const elems = $('<ul><li></li><li><p></p></li></ul>'); - const empty = elems.find('li').eq(0).nextUntil(null, 'p'); - expect(empty).toHaveLength(0); - }); - - it('() : should return an empty object for last child', () => { - expect($('.pear').nextUntil()).toHaveLength(0); - }); - - it('() : should return an empty object when called on an empty object', () => { - expect($('.banana').nextUntil()).toHaveLength(0); - }); - - it('(node) : should return all following siblings until the node', () => { - const $fruits = $('#fruits').children(); - const elems = $fruits.eq(0).nextUntil($fruits[2]); - expect(elems).toHaveLength(1); - }); - - it('(cheerio object) : should return all following siblings until any member of the cheerio object', () => { - const $drinks = $(drinks).children(); - const $until = $([$drinks[4], $drinks[3]]); - const elems = $drinks.eq(0).nextUntil($until); - expect(elems).toHaveLength(2); - }); - }); - - describe('.prev', () => { - it('() : should return previous element', () => { - const { attribs } = $('.orange').prev()[0]; - expect(attribs).toHaveProperty('class', 'apple'); - }); - - it('() : should skip text nodes', () => { - expect($($(mixedText)[2]).prev()[0]).toHaveProperty('name', 'a'); - }); - - it('(no prev) : should return empty for first child', () => { - expect($('.apple').prev()).toHaveLength(0); - }); - - it('(prev on empty object) : should return empty', () => { - expect($('.banana').prev()).toHaveLength(0); - }); - - it('() : should operate over all elements in the selection', () => { - expect($('.orange, .pear', food).prev()).toHaveLength(2); - }); - - it('() : should maintain elements order', () => { - const sel = load(eleven)('.sel'); - expect(sel).toHaveLength(3); - expect(sel.eq(0).text()).toBe('Three'); - expect(sel.eq(1).text()).toBe('Nine'); - expect(sel.eq(2).text()).toBe('Eleven'); - - // Swap last elements - const el = sel[2]; - sel[2] = sel[1]; - sel[1] = el; - - const result = sel.prev(); - expect(result).toHaveLength(3); - expect(result.eq(0).text()).toBe('Two'); - expect(result.eq(1).text()).toBe('Ten'); - expect(result.eq(2).text()).toBe('Eight'); - }); - - describe('(selector) :', () => { - it('should reject elements that violate the filter', () => { - expect($('.orange').prev('.non-existent')).toHaveLength(0); - }); - - it('should accept elements that satisify the filter', () => { - expect($('.orange').prev('.apple')).toHaveLength(1); - }); - - it('(selector) : should reject elements that violate the filter', () => { - expect($('.orange').prev('.non-existent')).toHaveLength(0); - }); - - it('(selector) : should accept elements that satisify the filter', () => { - expect($('.orange').prev('.apple')).toHaveLength(1); - }); - }); - }); - - describe('.prevAll', () => { - it('() : should return all preceding siblings', () => { - const elems = $('.pear').prevAll(); - expect(elems).toHaveLength(2); - expect(elems[0].attribs).toHaveProperty('class', 'orange'); - expect(elems[1].attribs).toHaveProperty('class', 'apple'); - }); - - it('() : should not contain text elements', () => { - const elems = $('.pear', fruits.replace(/></g, '>\n<')); - expect(elems.prevAll()).toHaveLength(2); - }); - - it('(no prev) : should return empty for first child', () => { - expect($('.apple').prevAll()).toHaveLength(0); - }); - - it('(prevAll on empty object) : should return empty', () => { - expect($('.banana').prevAll()).toHaveLength(0); - }); - - it('() : should operate over all elements in the selection', () => { - expect($('.orange, .sweetcorn', food).prevAll()).toHaveLength(2); - }); - - it('() : should not contain duplicate elements', () => { - const elems = $('.orange, .pear', food); - expect(elems.prevAll()).toHaveLength(2); - }); - - describe('(selector) :', () => { - it('should filter returned elements', () => { - const elems = $('.pear').prevAll('.apple'); - expect(elems).toHaveLength(1); - }); - - it("should not consider siblings's descendents", () => { - const elems = $('#vegetables', food).prevAll('li'); - expect(elems).toHaveLength(0); - }); - }); - }); - - describe('.prevUntil', () => { - it('() : should return all preceding siblings if no selector specified', () => { - const elems = $('.pear').prevUntil(); - expect(elems).toHaveLength(2); - expect(elems[0].attribs).toHaveProperty('class', 'orange'); - expect(elems[1].attribs).toHaveProperty('class', 'apple'); - }); - - it('() : should filter out non-element nodes', () => { - const elems = $( - '<div class="1"><div class="2"></div><!-- comment -->text<div class="3"></div></div>', - ); - const div = elems.children().last(); - expect(div.prevUntil()).toHaveLength(1); - }); - - it('() : should operate over all elements in the selection', () => { - const elems = $('.pear, .sweetcorn', food); - expect(elems.prevUntil()).toHaveLength(3); - }); - - it('() : should not contain duplicate elements', () => { - const elems = $('.orange, .pear', food); - expect(elems.prevUntil()).toHaveLength(2); - }); - - it('(selector) : should return all preceding siblings until selector', () => { - const elems = $('.pear').prevUntil('.apple'); - expect(elems).toHaveLength(1); - expect(elems[0].attribs).toHaveProperty('class', 'orange'); - }); - - it('(selector) : should support selector matching multiple elements', () => { - const elems = $('#unnamed', forms).prevUntil('option, #disabled'); - expect(elems).toHaveLength(2); - expect(elems[0].attribs).toHaveProperty('id', 'select'); - expect(elems[1].attribs).toHaveProperty('id', 'submit'); - }); - - it('(selector not sibling) : should return all preceding siblings', () => { - const elems = $('.sweetcorn', food).prevUntil('#fruits'); - expect(elems).toHaveLength(1); - expect(elems[0].attribs).toHaveProperty('class', 'carrot'); - }); - - it('(selector, filterString) : should return all preceding siblings until selector, filtered by filter', () => { - const elems = $('.cider', drinks).prevUntil('.juice', '.water'); - expect(elems).toHaveLength(1); - expect(elems[0].attribs).toHaveProperty('class', 'water'); - }); - - it('(selector, filterString) : should return all preceding siblings until selector', () => { - const elems = $('<ul><li><p></p></li><li></li></ul>'); - const empty = elems.find('li').eq(1).prevUntil(null, 'p'); - expect(empty).toHaveLength(0); - }); - - it('() : should return an empty object for first child', () => { - expect($('.apple').prevUntil()).toHaveLength(0); - }); - - it('() : should return an empty object when called on an empty object', () => { - expect($('.banana').prevUntil()).toHaveLength(0); - }); - - it('(node) : should return all previous siblings until the node', () => { - const $fruits = $('#fruits').children(); - const elems = $fruits.eq(2).prevUntil($fruits[0]); - expect(elems).toHaveLength(1); - }); - - it('(cheerio object) : should return all previous siblings until any member of the cheerio object', () => { - const $drinks = $(drinks).children(); - const $until = $([$drinks[0], $drinks[1]]); - const elems = $drinks.eq(4).prevUntil($until); - expect(elems).toHaveLength(2); - }); - }); - - describe('.siblings', () => { - it('() : should get all the siblings', () => { - expect($('.orange').siblings()).toHaveLength(2); - expect($('#fruits').siblings()).toHaveLength(0); - expect($('.apple, .carrot', food).siblings()).toHaveLength(3); - }); - - it('(selector) : should get all siblings that match the selector', () => { - expect($('.orange').siblings('.apple')).toHaveLength(1); - expect($('.orange').siblings('.peach')).toHaveLength(0); - }); - - it('(selector) : should throw an Error if given an invalid selector', () => { - expect(() => { - $('.orange').siblings(':bah'); - }).toThrow('Unknown pseudo-class :bah'); - }); - - it('(selector) : does not consider the contents of siblings when filtering (GH-374)', () => { - expect($('#fruits', food).siblings('li')).toHaveLength(0); - }); - - it('() : when two elements are siblings to each other they have to be included', () => { - const result = load(eleven)('.sel').siblings(); - expect(result).toHaveLength(7); - expect(result.eq(0).text()).toBe('One'); - expect(result.eq(1).text()).toBe('Two'); - expect(result.eq(2).text()).toBe('Four'); - expect(result.eq(3).text()).toBe('Eight'); - expect(result.eq(4).text()).toBe('Nine'); - expect(result.eq(5).text()).toBe('Ten'); - expect(result.eq(6).text()).toBe('Eleven'); - }); - - it('(selector) : when two elements are siblings to each other they have to be included', () => { - const result = load(eleven)('.sel').siblings('.red'); - expect(result).toHaveLength(2); - expect(result.eq(0).text()).toBe('Four'); - expect(result.eq(1).text()).toBe('Nine'); - }); - - it('(cheerio) : test filtering with cheerio object', () => { - const doc = load(eleven); - const result = doc('.sel').siblings(doc(':not([class])')); - expect(result).toHaveLength(4); - expect(result.eq(0).text()).toBe('One'); - expect(result.eq(1).text()).toBe('Two'); - expect(result.eq(2).text()).toBe('Eight'); - expect(result.eq(3).text()).toBe('Ten'); - }); - }); - - describe('.parents', () => { - beforeEach(() => { - $ = load(food); - }); - - it('() : should get all of the parents in logical order', () => { - const orange = $('.orange').parents(); - expect(orange).toHaveLength(4); - expect(orange[0].attribs).toHaveProperty('id', 'fruits'); - expect(orange[1].attribs).toHaveProperty('id', 'food'); - expect(orange[2].tagName).toBe('body'); - expect(orange[3].tagName).toBe('html'); - const fruits = $('#fruits').parents(); - expect(fruits).toHaveLength(3); - expect(fruits[0].attribs).toHaveProperty('id', 'food'); - expect(fruits[1].tagName).toBe('body'); - expect(fruits[2].tagName).toBe('html'); - }); - - it('(selector) : should get all of the parents that match the selector in logical order', () => { - const fruits = $('.orange').parents('#fruits'); - expect(fruits).toHaveLength(1); - expect(fruits[0].attribs).toHaveProperty('id', 'fruits'); - const uls = $('.orange').parents('ul'); - expect(uls).toHaveLength(2); - expect(uls[0].attribs).toHaveProperty('id', 'fruits'); - expect(uls[1].attribs).toHaveProperty('id', 'food'); - }); - - it('() : should not break if the selector does not have any results', () => { - const result = $('.saladbar').parents(); - expect(result).toHaveLength(0); - }); - - it('() : should return an empty set for top-level elements', () => { - const result = $('html').parents(); - expect(result).toHaveLength(0); - }); - - it('() : should return the parents of every element in the *reveresed* collection, omitting duplicates', () => { - const $parents = $('li').parents(); - - expect($parents).toHaveLength(5); - expect($parents[0]).toBe($('#vegetables')[0]); - expect($parents[1]).toBe($('#fruits')[0]); - expect($parents[2]).toBe($('#food')[0]); - expect($parents[3]).toBe($('body')[0]); - expect($parents[4]).toBe($('html')[0]); - }); - }); - - describe('.parentsUntil', () => { - beforeEach(() => { - $ = load(food); - }); - - it('() : should get all of the parents in logical order', () => { - const result = $('.orange').parentsUntil(); - expect(result).toHaveLength(4); - expect(result[0].attribs).toHaveProperty('id', 'fruits'); - expect(result[1].attribs).toHaveProperty('id', 'food'); - expect(result[2].tagName).toBe('body'); - expect(result[3].tagName).toBe('html'); - }); - - it('() : should get all of the parents in reversed order, omitting duplicates', () => { - const result = $('.apple, .sweetcorn').parentsUntil(); - expect(result).toHaveLength(5); - expect(result[0]).toBe($('#vegetables')[0]); - expect(result[1]).toBe($('#fruits')[0]); - expect(result[2]).toBe($('#food')[0]); - expect(result[3]).toBe($('body')[0]); - expect(result[4]).toBe($('html')[0]); - }); - - it('(selector) : should get all of the parents until selector', () => { - const food = $('.orange').parentsUntil('#food'); - expect(food).toHaveLength(1); - expect(food[0].attribs).toHaveProperty('id', 'fruits'); - const fruits = $('.orange').parentsUntil('#fruits'); - expect(fruits).toHaveLength(0); - }); - - it('(selector) : Less simple parentsUntil check with selector', () => { - const result = $('#fruits').parentsUntil('html, body'); - expect(result.eq(0).attr('id')).toBe('food'); - }); - - it('(selector not parent) : should return all parents', () => { - const result = $('.orange').parentsUntil('.apple'); - expect(result).toHaveLength(4); - expect(result[0].attribs).toHaveProperty('id', 'fruits'); - expect(result[1].attribs).toHaveProperty('id', 'food'); - expect(result[2].tagName).toBe('body'); - expect(result[3].tagName).toBe('html'); - }); - - it('(selector, filter) : should get all of the parents that match the filter', () => { - const result = $('.apple, .sweetcorn').parentsUntil( - '.saladbar', - '#vegetables', - ); - expect(result).toHaveLength(1); - expect(result[0].attribs).toHaveProperty('id', 'vegetables'); - }); - - it('(selector, filter) : Multiple-filtered parentsUntil check', () => { - const result = $('.orange').parentsUntil('html', 'ul,body'); - expect(result).toHaveLength(3); - expect(result.eq(0).attr('id')).toBe('fruits'); - expect(result.eq(1).attr('id')).toBe('food'); - expect(result.eq(2).prop('tagName')).toBe('BODY'); - }); - - it('() : should return empty object when called on an empty object', () => { - const result = $('.saladbar').parentsUntil(); - expect(result).toHaveLength(0); - }); - - it('() : should return an empty set for top-level elements', () => { - const result = $('html').parentsUntil(); - expect(result).toHaveLength(0); - }); - - it('(cheerio object) : should return all parents until any member of the cheerio object', () => { - const $fruits = $('#fruits'); - const $until = $('#food'); - const result = $fruits.children().eq(1).parentsUntil($until); - expect(result).toHaveLength(1); - expect(result[0].attribs).toHaveProperty('id', 'fruits'); - }); - - it('(cheerio object) : should return all parents until body element', () => { - const body = $('body')[0]; - const result = $('.carrot').parentsUntil(body); - expect(result).toHaveLength(2); - expect(result.eq(0).is('ul#vegetables')).toBe(true); - }); - }); - - describe('.parent', () => { - it('() : should return the parent of each matched element', () => { - let result = $('.orange').parent(); - expect(result).toHaveLength(1); - expect(result[0].attribs).toHaveProperty('id', 'fruits'); - result = $('li', food).parent(); - expect(result).toHaveLength(2); - expect(result[0].attribs).toHaveProperty('id', 'fruits'); - expect(result[1].attribs).toHaveProperty('id', 'vegetables'); - }); - - it('(undefined) : should not throw an exception', () => { - expect(() => { - $('li').parent(undefined); - }).not.toThrow(); - }); - - it('() : should return an empty object for top-level elements', () => { - const result = $('html').parent(); - expect(result).toHaveLength(0); - }); - - it('() : should not contain duplicate elements', () => { - const result = $('li').parent(); - expect(result).toHaveLength(1); - }); - - it('(selector) : should filter the matched parent elements by the selector', () => { - const parents = $('.orange').parent(); - expect(parents).toHaveLength(1); - expect(parents[0].attribs).toHaveProperty('id', 'fruits'); - const fruits = $('li', food).parent('#fruits'); - expect(fruits).toHaveLength(1); - expect(fruits[0].attribs).toHaveProperty('id', 'fruits'); - }); - }); - - describe('.closest', () => { - it('() : should return an empty array', () => { - const result = $('.orange').closest(); - expect(result).toHaveLength(0); - expect(result).toBeInstanceOf(Cheerio); - }); - - it('(selector) : should find the closest element that matches the selector, searching through its ancestors and itself', () => { - expect($('.orange').closest('.apple')).toHaveLength(0); - expect( - ($('.orange', food).closest('#food')[0] as Element).attribs, - ).toHaveProperty('id', 'food'); - expect( - ($('.orange', food).closest('ul')[0] as Element).attribs, - ).toHaveProperty('id', 'fruits'); - expect( - ($('.orange', food).closest('li')[0] as Element).attribs, - ).toHaveProperty('class', 'orange'); - }); - - it('(selector) : should find the closest element of each item, removing duplicates', () => { - const result = $('li', food).closest('ul'); - expect(result).toHaveLength(2); - }); - - it('() : should not break if the selector does not have any results', () => { - const result = $('.saladbar', food).closest('ul'); - expect(result).toHaveLength(0); - }); - - it('(selector) : should find closest element for text nodes', () => { - const textNode = $('.apple', food).contents().first(); - const result = textNode.closest('#food') as Cheerio<Element>; - expect(result[0].attribs).toHaveProperty('id', 'food'); - }); - }); - - describe('.each', () => { - it('( (i, elem) -> ) : should loop selected returning fn with (i, elem)', () => { - const items: Element[] = []; - const classes = ['apple', 'orange', 'pear']; - $('li').each(function (idx, elem) { - items[idx] = elem; - expect(this.attribs).toHaveProperty('class', classes[idx]); - }); - expect(items[0].attribs).toHaveProperty('class', 'apple'); - expect(items[1].attribs).toHaveProperty('class', 'orange'); - expect(items[2].attribs).toHaveProperty('class', 'pear'); - }); - - it('( (i, elem) -> ) : should break iteration when the iterator function returns false', () => { - let iterationCount = 0; - $('li').each((idx) => { - iterationCount++; - return idx < 1; - }); - - expect(iterationCount).toBe(2); - }); - }); - - if (typeof Symbol !== 'undefined') { - describe('[Symbol.iterator]', () => { - it('should yield each element', () => { - // The equivalent of: for (const element of $('li')) ... - const $li = $('li'); - const iterator = $li[Symbol.iterator](); - expect(iterator.next().value.attribs).toHaveProperty('class', 'apple'); - expect(iterator.next().value.attribs).toHaveProperty('class', 'orange'); - expect(iterator.next().value.attribs).toHaveProperty('class', 'pear'); - expect(iterator.next().done).toBe(true); - }); - }); - } - - describe('.map', () => { - it('(fn) : should be invoked with the correct arguments and context', () => { - const $fruits = $('li'); - const args: [number, AnyNode][] = []; - const thisVals: AnyNode[] = []; - - $fruits.map(function (...myArgs) { - args.push(myArgs); - thisVals.push(this); - return undefined; - }); - - expect(args).toStrictEqual([ - [0, $fruits[0]], - [1, $fruits[1]], - [2, $fruits[2]], - ]); - expect(thisVals).toStrictEqual([$fruits[0], $fruits[1], $fruits[2]]); - }); - - it('(fn) : should return an Cheerio object wrapping the returned items', () => { - const $fruits = $('li'); - const $mapped = $fruits.map((i) => $fruits[2 - i]); - - expect($mapped).toHaveLength(3); - expect($mapped[0]).toBe($fruits[2]); - expect($mapped[1]).toBe($fruits[1]); - expect($mapped[2]).toBe($fruits[0]); - }); - - it('(fn) : should ignore `null` and `undefined` returned by iterator', () => { - const $fruits = $('li'); - const retVals = [null, undefined, $fruits[1]]; - - const $mapped = $fruits.map((i) => retVals[i]); - - expect($mapped).toHaveLength(1); - expect($mapped[0]).toBe($fruits[1]); - }); - - it('(fn) : should preform a shallow merge on arrays returned by iterator', () => { - const $fruits = $('li'); - - const $mapped = $fruits.map(() => [1, [3, 4]]); - - expect($mapped.get()).toStrictEqual([1, [3, 4], 1, [3, 4], 1, [3, 4]]); - }); - - it('(fn) : should tolerate `null` and `undefined` when flattening arrays returned by iterator', () => { - const $fruits = $('li'); - - const $mapped = $fruits.map(() => [null, undefined]); - - expect($mapped.get()).toStrictEqual([ - null, - undefined, - null, - undefined, - null, - undefined, - ]); - }); - }); - - describe('.filter', () => { - it('(selector) : should reduce the set of matched elements to those that match the selector', () => { - const pear = $('li').filter('.pear').text(); - expect(pear).toBe('Pear'); - }); - - it('(selector) : should not consider nested elements', () => { - const lis = $('#fruits').filter('li'); - expect(lis).toHaveLength(0); - }); - - it('(selection) : should reduce the set of matched elements to those that are contained in the provided selection', () => { - const $fruits = $('li'); - const $pear = $fruits.filter('.pear, .apple'); - expect($fruits.filter($pear)).toHaveLength(2); - }); - - it('(element) : should reduce the set of matched elements to those that specified directly', () => { - const $fruits = $('li'); - const pear = $fruits.filter('.pear')[0]; - expect($fruits.filter(pear)).toHaveLength(1); - }); - - it("(fn) : should reduce the set of matched elements to those that pass the function's test", () => { - const orange = $('li') - .filter(function (i, el) { - expect(this).toBe(el); - expect(el.tagName).toBe('li'); - expect(typeof i).toBe('number'); - return $(this).attr('class') === 'orange'; - }) - .text(); - - expect(orange).toBe('Orange'); - }); - - it('should also iterate over text nodes (#1867)', () => { - const text = $('<a>a</a>b<c></c>').filter((_, el): el is Text => - isText(el), - ); - - expect(text[0].data).toBe('b'); - }); - }); - - describe('.not', () => { - it('(selector) : should reduce the set of matched elements to those that do not match the selector', () => { - const $fruits = $('li'); - - const $notPear = $fruits.not('.pear'); - - expect($notPear).toHaveLength(2); - expect($notPear[0]).toBe($fruits[0]); - expect($notPear[1]).toBe($fruits[1]); - }); - - it('(selector) : should not consider nested elements', () => { - const lis = $('#fruits').not('li'); - expect(lis).toHaveLength(1); - }); - - it('(selection) : should reduce the set of matched elements to those that are mot contained in the provided selection', () => { - const $fruits = $('li'); - const $orange = $('.orange'); - - const $notOrange = $fruits.not($orange); - - expect($notOrange).toHaveLength(2); - expect($notOrange[0]).toBe($fruits[0]); - expect($notOrange[1]).toBe($fruits[2]); - }); - - it('(element) : should reduce the set of matched elements to those that specified directly', () => { - const $fruits = $('li'); - const apple = $('.apple')[0]; - - const $notApple = $fruits.not(apple); - - expect($notApple).toHaveLength(2); - expect($notApple[0]).toBe($fruits[1]); - expect($notApple[1]).toBe($fruits[2]); - }); - - it("(fn) : should reduce the set of matched elements to those that do not pass the function's test", () => { - const $fruits = $('li'); - - const $notOrange = $fruits.not(function (i, el) { - expect(this).toBe(el); - expect(el).toHaveProperty('name', 'li'); - expect(typeof i).toBe('number'); - return $(this).attr('class') === 'orange'; - }); - - expect($notOrange).toHaveLength(2); - expect($notOrange[0]).toBe($fruits[0]); - expect($notOrange[1]).toBe($fruits[2]); - }); - }); - - describe('.has', () => { - beforeEach(() => { - $ = load(food); - }); - - it('(selector) : should reduce the set of matched elements to those with descendants that match the selector', () => { - const $fruits = $('#fruits,#vegetables').has('.pear'); - expect($fruits).toHaveLength(1); - expect($fruits[0]).toBe($('#fruits')[0]); - }); - - it('(selector) : should only consider nested elements', () => { - const $empty = $('#fruits').has('#fruits'); - expect($empty).toHaveLength(0); - }); - - it('(element) : should reduce the set of matched elements to those that are ancestors of the provided element', () => { - const $fruits = $('#fruits,#vegetables').has($('.pear')[0]); - expect($fruits).toHaveLength(1); - expect($fruits[0]).toBe($('#fruits')[0]); - }); - - it('(element) : should only consider nested elements', () => { - const $fruits = $('#fruits'); - const fruitsEl = $fruits[0]; - const $empty = $fruits.has(fruitsEl); - - expect($empty).toHaveLength(0); - }); - }); - - describe('.first', () => { - it('() : should return the first item', () => { - const $src = $( - '<span>foo</span><span>bar</span><span>baz</span>', - ) as Cheerio<Element>; - const $elem = $src.first(); - expect($elem.length).toBe(1); - expect($elem[0].childNodes[0]).toHaveProperty('data', 'foo'); - }); - - it('() : should return an empty object for an empty object', () => { - const $src = $(); - const $first = $src.first(); - expect($first.length).toBe(0); - expect($first[0]).toBeUndefined(); - }); - }); - - describe('.last', () => { - it('() : should return the last element', () => { - const $src = $( - '<span>foo</span><span>bar</span><span>baz</span>', - ) as Cheerio<Element>; - const $elem = $src.last(); - expect($elem.length).toBe(1); - expect($elem[0].childNodes[0]).toHaveProperty('data', 'baz'); - }); - - it('() : should return an empty object for an empty object', () => { - const $src = $(); - const $last = $src.last(); - expect($last.length).toBe(0); - expect($last[0]).toBeUndefined(); - }); - }); - - describe('.first & .last', () => { - it('() : should return equivalent collections if only one element', () => { - const $src = $('<span>bar</span>') as Cheerio<Element>; - const $first = $src.first(); - const $last = $src.last(); - expect($first.length).toBe(1); - expect($first[0].childNodes[0]).toHaveProperty('data', 'bar'); - expect($last.length).toBe(1); - expect($last[0].childNodes[0]).toHaveProperty('data', 'bar'); - expect($first[0]).toBe($last[0]); - }); - }); - - describe('.eq', () => { - it('(i) : should return the element at the specified index', () => { - expect(getText($('li').eq(0))).toBe('Apple'); - expect(getText($('li').eq(1))).toBe('Orange'); - expect(getText($('li').eq(2))).toBe('Pear'); - expect(getText($('li').eq(3))).toBeUndefined(); - expect(getText($('li').eq(-1))).toBe('Pear'); - }); - }); - - describe('.get', () => { - it('(i) : should return the element at the specified index', () => { - const children = $('#fruits').children(); - expect(children.get(0)).toBe(children[0]); - expect(children.get(1)).toBe(children[1]); - expect(children.get(2)).toBe(children[2]); - }); - - it('(-1) : should return the element indexed from the end of the collection', () => { - const children = $('#fruits').children(); - expect(children.get(-1)).toBe(children[2]); - expect(children.get(-2)).toBe(children[1]); - expect(children.get(-3)).toBe(children[0]); - }); - - it('() : should return an array containing all of the collection', () => { - const children = $('#fruits').children(); - const all = children.get(); - expect(Array.isArray(all)).toBe(true); - expect(all).toStrictEqual([children[0], children[1], children[2]]); - }); - }); - - describe('.index', () => { - describe('() :', () => { - it('returns the index of a child amongst its siblings', () => { - expect($('.orange').index()).toBe(1); - }); - it('returns -1 when the selection has no parent', () => { - expect($('<div/>').index()).toBe(-1); - }); - }); - - describe('(selector) :', () => { - it('returns the index of the first element in the set matched by `selector`', () => { - expect($('.apple').index('#fruits, li')).toBe(1); - }); - it('returns -1 when the item is not present in the set matched by `selector`', () => { - expect($('.apple').index('#fuits')).toBe(-1); - }); - it('returns -1 when the first element in the set has no parent', () => { - expect($('<div/>').index('*')).toBe(-1); - }); - }); - - describe('(node) :', () => { - it('returns the index of the given node within the current selection', () => { - const $lis = $('li'); - expect($lis.index($lis.get(1))).toBe(1); - }); - it('returns the index of the given node within the current selection when the current selection has no parent', () => { - const $apple = $('.apple').remove(); - - expect($apple.index($apple.get(0))).toBe(0); - }); - it('returns -1 when the given node is not present in the current selection', () => { - expect($('li').index($('#fruits').get(0))).toBe(-1); - }); - it('returns -1 when the current selection is empty', () => { - expect($('.not-fruit').index($('#fruits').get(0))).toBe(-1); - }); - }); - - describe('(selection) :', () => { - it('returns the index of the first node in the provided selection within the current selection', () => { - const $lis = $('li'); - expect($lis.index($('.orange, .pear'))).toBe(1); - }); - it('returns -1 when the given node is not present in the current selection', () => { - expect($('li').index($('#fruits'))).toBe(-1); - }); - it('returns -1 when the current selection is empty', () => { - expect($('.not-fruit').index($('#fruits'))).toBe(-1); - }); - }); - }); - - describe('.slice', () => { - it('(start) : should return all elements after the given index', () => { - const sliced = $('li').slice(1); - expect(sliced).toHaveLength(2); - expect(getText(sliced.eq(0))).toBe('Orange'); - expect(getText(sliced.eq(1))).toBe('Pear'); - }); - - it('(start, end) : should return all elements matching the given range', () => { - const sliced = $('li').slice(1, 2); - expect(sliced).toHaveLength(1); - expect(getText(sliced.eq(0))).toBe('Orange'); - }); - - it('(-start) : should return element matching the offset from the end', () => { - const sliced = $('li').slice(-1); - expect(sliced).toHaveLength(1); - expect(getText(sliced.eq(0))).toBe('Pear'); - }); - }); - - describe('.end() :', () => { - let $fruits: Cheerio<Element>; - - beforeEach(() => { - $fruits = $('#fruits').children(); - }); - - it('returns an empty object at the end of the chain', () => { - expect($fruits.end().end().end()).toBeTruthy(); - expect($fruits.end().end().end()).toHaveLength(0); - }); - it('find', () => { - expect($fruits.find('.apple').end()).toBe($fruits); - }); - it('filter', () => { - expect($fruits.filter('.apple').end()).toBe($fruits); - }); - it('map', () => { - expect( - $fruits - .map(function () { - return this; - }) - .end(), - ).toBe($fruits); - }); - it('contents', () => { - expect($fruits.contents().end()).toBe($fruits); - }); - it('eq', () => { - expect($fruits.eq(1).end()).toBe($fruits); - }); - it('first', () => { - expect($fruits.first().end()).toBe($fruits); - }); - it('last', () => { - expect($fruits.last().end()).toBe($fruits); - }); - it('slice', () => { - expect($fruits.slice(1).end()).toBe($fruits); - }); - it('children', () => { - expect($fruits.children().end()).toBe($fruits); - }); - it('parent', () => { - expect($fruits.parent().end()).toBe($fruits); - }); - it('parents', () => { - expect($fruits.parents().end()).toBe($fruits); - }); - it('closest', () => { - expect($fruits.closest('ul').end()).toBe($fruits); - }); - it('siblings', () => { - expect($fruits.siblings().end()).toBe($fruits); - }); - it('next', () => { - expect($fruits.next().end()).toBe($fruits); - }); - it('nextAll', () => { - expect($fruits.nextAll().end()).toBe($fruits); - }); - it('prev', () => { - expect($fruits.prev().end()).toBe($fruits); - }); - it('prevAll', () => { - expect($fruits.prevAll().end()).toBe($fruits); - }); - it('clone', () => { - expect($fruits.clone().end()).toBe($fruits); - }); - }); - - describe('.add()', () => { - let $fruits: Cheerio<AnyNode>; - let $apple: Cheerio<Element>; - let $orange: Cheerio<Element>; - let $pear: Cheerio<Element>; - - beforeEach(() => { - $ = load(food); - $fruits = $('#fruits'); - $apple = $('.apple'); - $orange = $('.orange'); - $pear = $('.pear'); - }); - - describe('(selector) matched element :', () => { - it('occurs before current selection', () => { - const $selection = $orange.add('.apple'); - - expect($selection).toHaveLength(2); - expect($selection[0]).toBe($apple[0]); - expect($selection[1]).toBe($orange[0]); - }); - it('is identical to the current selection', () => { - const $selection = $orange.add('.orange'); - - expect($selection).toHaveLength(1); - expect($selection[0]).toBe($orange[0]); - }); - it('occurs after current selection', () => { - const $selection = $orange.add('.pear'); - - expect($selection).toHaveLength(2); - expect($selection[0]).toBe($orange[0]); - expect($selection[1]).toBe($pear[0]); - }); - it('contains the current selection', () => { - const $selection = $orange.add('#fruits'); - - expect($selection).toHaveLength(2); - expect($selection[0]).toBe($fruits[0]); - expect($selection[1]).toBe($orange[0]); - }); - it('is a child of the current selection', () => { - const $selection = $fruits.add('.orange'); - - expect($selection).toHaveLength(2); - expect($selection[0]).toBe($fruits[0]); - expect($selection[1]).toBe($orange[0]); - }); - it('is root object preserved', () => { - const $selection = $('<div></div>').add('#fruits'); - - expect($selection).toHaveLength(2); - expect($selection.eq(0).is('div')).toBe(true); - expect($selection.eq(1).is($fruits.eq(0))).toBe(true); - }); - }); - describe('(selector) matched elements :', () => { - it('occur before the current selection', () => { - const $selection = $pear.add('.apple, .orange'); - - expect($selection).toHaveLength(3); - expect($selection[0]).toBe($apple[0]); - expect($selection[1]).toBe($orange[0]); - expect($selection[2]).toBe($pear[0]); - }); - it('include the current selection', () => { - const $selection = $pear.add('#fruits li'); - - expect($selection).toHaveLength(3); - expect($selection[0]).toBe($apple[0]); - expect($selection[1]).toBe($orange[0]); - expect($selection[2]).toBe($pear[0]); - }); - it('occur after the current selection', () => { - const $selection = $apple.add('.orange, .pear'); - - expect($selection).toHaveLength(3); - expect($selection[0]).toBe($apple[0]); - expect($selection[1]).toBe($orange[0]); - expect($selection[2]).toBe($pear[0]); - }); - it('occur within the current selection', () => { - const $selection = $fruits.add('#fruits li'); - - expect($selection).toHaveLength(4); - expect($selection[0]).toBe($fruits[0]); - expect($selection[1]).toBe($apple[0]); - expect($selection[2]).toBe($orange[0]); - expect($selection[3]).toBe($pear[0]); - }); - }); - describe('(selector, context) :', () => { - it(', context)', () => { - const $selection = $fruits.add('li', '#vegetables'); - expect($selection).toHaveLength(3); - expect($selection[0]).toBe($fruits[0]); - expect($selection[1]).toBe($('.carrot')[0]); - expect($selection[2]).toBe($('.sweetcorn')[0]); - }); - }); - - describe('(element) honors document order when element occurs :', () => { - it('before the current selection', () => { - const $selection = $orange.add($apple[0]); - - expect($selection).toHaveLength(2); - expect($selection[0]).toBe($apple[0]); - expect($selection[1]).toBe($orange[0]); - }); - it('after the current selection', () => { - const $selection = $orange.add($pear[0]); - - expect($selection).toHaveLength(2); - expect($selection[0]).toBe($orange[0]); - expect($selection[1]).toBe($pear[0]); - }); - it('within the current selection', () => { - const $selection = $fruits.add($orange[0]); - - expect($selection).toHaveLength(2); - expect($selection[0]).toBe($fruits[0]); - expect($selection[1]).toBe($orange[0]); - }); - it('as an ancestor of the current selection', () => { - const $selection = $orange.add($fruits[0]); - - expect($selection).toHaveLength(2); - expect($selection[0]).toBe($fruits[0]); - expect($selection[1]).toBe($orange[0]); - }); - it('does not insert an element already contained within the current selection', () => { - const $selection = $apple.add($apple[0]); - - expect($selection).toHaveLength(1); - expect($selection[0]).toBe($apple[0]); - }); - }); - describe('([elements]) : elements', () => { - it('occur before the current selection', () => { - const $selection = $pear.add($('.apple, .orange').get()); - - expect($selection).toHaveLength(3); - expect($selection[0]).toBe($apple[0]); - expect($selection[1]).toBe($orange[0]); - expect($selection[2]).toBe($pear[0]); - }); - it('include the current selection', () => { - const $selection = $pear.add($('#fruits li').get()); - - expect($selection).toHaveLength(3); - expect($selection[0]).toBe($apple[0]); - expect($selection[1]).toBe($orange[0]); - expect($selection[2]).toBe($pear[0]); - }); - it('occur after the current selection', () => { - const $selection = $apple.add($('.orange, .pear').get()); - - expect($selection).toHaveLength(3); - expect($selection[0]).toBe($apple[0]); - expect($selection[1]).toBe($orange[0]); - expect($selection[2]).toBe($pear[0]); - }); - it('occur within the current selection', () => { - const $selection = $fruits.add($('#fruits li').get()); - - expect($selection).toHaveLength(4); - expect($selection[0]).toBe($fruits[0]); - expect($selection[1]).toBe($apple[0]); - expect($selection[2]).toBe($orange[0]); - expect($selection[3]).toBe($pear[0]); - }); - }); - - /** - * Element order is undefined in this case, so it should not be asserted - * here. - * - * If the collection consists of elements from different documents or ones - * not in any document, the sort order is undefined. - * - * @see {@link https://api.jquery.com/add/} - */ - it('(html) : correctly parses and adds the new elements', () => { - const $selection = $apple.add('<li class="banana">banana</li>'); - - expect($selection).toHaveLength(2); - expect($selection.is('.apple')).toBe(true); - expect($selection.is('.banana')).toBe(true); - }); - - describe('(selection) element in selection :', () => { - it('occurs before current selection', () => { - const $selection = $orange.add($('.apple')); - - expect($selection).toHaveLength(2); - expect($selection[0]).toBe($apple[0]); - expect($selection[1]).toBe($orange[0]); - }); - it('is identical to the current selection', () => { - const $selection = $orange.add($('.orange')); - - expect($selection).toHaveLength(1); - expect($selection[0]).toBe($orange[0]); - }); - it('occurs after current selection', () => { - const $selection = $orange.add($('.pear')); - - expect($selection).toHaveLength(2); - expect($selection[0]).toBe($orange[0]); - expect($selection[1]).toBe($pear[0]); - }); - it('contains the current selection', () => { - const $selection = $orange.add($('#fruits')); - - expect($selection).toHaveLength(2); - expect($selection[0]).toBe($fruits[0]); - expect($selection[1]).toBe($orange[0]); - }); - it('is a child of the current selection', () => { - const $selection = $fruits.add($('.orange')); - - expect($selection).toHaveLength(2); - expect($selection[0]).toBe($fruits[0]); - expect($selection[1]).toBe($orange[0]); - }); - }); - describe('(selection) elements in the selection :', () => { - it('occur before the current selection', () => { - const $selection = $pear.add($('.apple, .orange')); - - expect($selection).toHaveLength(3); - expect($selection[0]).toBe($apple[0]); - expect($selection[1]).toBe($orange[0]); - expect($selection[2]).toBe($pear[0]); - }); - it('include the current selection', () => { - const $selection = $pear.add($('#fruits li')); - - expect($selection).toHaveLength(3); - expect($selection[0]).toBe($apple[0]); - expect($selection[1]).toBe($orange[0]); - expect($selection[2]).toBe($pear[0]); - }); - it('occur after the current selection', () => { - const $selection = $apple.add($('.orange, .pear')); - - expect($selection).toHaveLength(3); - expect($selection[0]).toBe($apple[0]); - expect($selection[1]).toBe($orange[0]); - expect($selection[2]).toBe($pear[0]); - }); - it('occur within the current selection', () => { - const $selection = $fruits.add($('#fruits li')); - - expect($selection).toHaveLength(4); - expect($selection[0]).toBe($fruits[0]); - expect($selection[1]).toBe($apple[0]); - expect($selection[2]).toBe($orange[0]); - expect($selection[3]).toBe($pear[0]); - }); - }); - - describe('(selection) :', () => { - it('modifying nested selections should not impact the parent [#834]', () => { - const apple_pear = $apple.add($pear); - - // Applies red to apple and pear - apple_pear.addClass('red'); - - expect($apple.hasClass('red')).toBe(true); // This is true - expect($pear.hasClass('red')).toBe(true); // This is true - - // Applies green to pear... AND should not affect apple - $pear.addClass('green'); - expect($pear.hasClass('green')).toBe(true); // Currently this is true - expect($apple.hasClass('green')).toBe(false); // And this should be false! - }); - }); - }); - - describe('.addBack', () => { - describe('() :', () => { - it('includes siblings and self', () => { - const $selection = $('.orange').siblings().addBack(); - - expect($selection).toHaveLength(3); - expect($selection[0]).toBe($('.apple')[0]); - expect($selection[1]).toBe($('.orange')[0]); - expect($selection[2]).toBe($('.pear')[0]); - }); - it('includes children and self', () => { - const $selection = $('#fruits').children().addBack(); - - expect($selection).toHaveLength(4); - expect($selection[0]).toBe($('#fruits')[0]); - expect($selection[1]).toBe($('.apple')[0]); - expect($selection[2]).toBe($('.orange')[0]); - expect($selection[3]).toBe($('.pear')[0]); - }); - it('includes parent and self', () => { - const $selection = $('.apple').parent().addBack(); - - expect($selection).toHaveLength(2); - expect($selection[0]).toBe($('#fruits')[0]); - expect($selection[1]).toBe($('.apple')[0]); - }); - it('includes parents and self', () => { - const q = load(food); - const $selection = q('.apple').parents().addBack(); - - expect($selection).toHaveLength(5); - expect($selection[0]).toBe(q('html')[0]); - expect($selection[1]).toBe(q('body')[0]); - expect($selection[2]).toBe(q('#food')[0]); - expect($selection[3]).toBe(q('#fruits')[0]); - expect($selection[4]).toBe(q('.apple')[0]); - }); - }); - it('(filter) : filters the previous selection', () => { - const $selection = $('li').eq(1).addBack('.apple'); - - expect($selection).toHaveLength(2); - expect($selection[0]).toBe($('.apple')[0]); - expect($selection[1]).toBe($('.orange')[0]); - }); - it('() : fails gracefully when no args are passed', () => { - const $div = cheerio('<div>'); - expect($div.addBack()).toBe($div); - }); - }); - - describe('.is', () => { - it('() : should return false', () => { - expect($('li.apple').is()).toBe(false); - }); - - it('(true selector) : should return true', () => { - expect(cheerio('#vegetables', vegetables).is('ul')).toBe(true); - }); - - it('(false selector) : should return false', () => { - expect(cheerio('#vegetables', vegetables).is('div')).toBe(false); - }); - - it('(true selection) : should return true', () => { - const $vegetables = cheerio('li', vegetables); - expect($vegetables.is($vegetables.eq(1))).toBe(true); - }); - - it('(false selection) : should return false', () => { - const $vegetableList = cheerio(vegetables); - const $vegetables = $vegetableList.find('li'); - expect($vegetables.is($vegetableList)).toBe(false); - }); - - it('(true element) : should return true', () => { - const $vegetables = cheerio('li', vegetables); - expect($vegetables.is($vegetables[0])).toBe(true); - }); - - it('(false element) : should return false', () => { - const $vegetableList = cheerio(vegetables); - const $vegetables = $vegetableList.find('li'); - expect($vegetables.is($vegetableList[0])).toBe(false); - }); - - it('(true predicate) : should return true', () => { - const result = $('li').is(function () { - return this.tagName === 'li' && $(this).hasClass('pear'); - }); - expect(result).toBe(true); - }); - - it('(false predicate) : should return false', () => { - const result = $('li') - .last() - .is(function () { - return this.tagName === 'ul'; - }); - expect(result).toBe(false); - }); - }); -}); diff --git a/node_modules/cheerio/src/api/traversing.ts b/node_modules/cheerio/src/api/traversing.ts deleted file mode 100644 index cae098a..0000000 --- a/node_modules/cheerio/src/api/traversing.ts +++ /dev/null @@ -1,1171 +0,0 @@ -/** - * Methods for traversing the DOM structure. - * - * @module cheerio/traversing - */ - -import { - isTag, - type AnyNode, - type Element, - hasChildren, - isDocument, - type Document, -} from 'domhandler'; -import type { Cheerio } from '../cheerio.js'; -import * as select from 'cheerio-select'; -import { domEach, isCheerio } from '../utils.js'; -import { contains } from '../static.js'; -import { - getChildren, - getSiblings, - nextElementSibling, - prevElementSibling, - uniqueSort, -} from 'domutils'; -import type { FilterFunction, AcceptedFilters } from '../types.js'; -const reSiblingSelector = /^\s*[+~]/; - -/** - * Get the descendants of each element in the current set of matched elements, - * filtered by a selector, jQuery object, or element. - * - * @category Traversing - * @example - * - * ```js - * $('#fruits').find('li').length; - * //=> 3 - * $('#fruits').find($('.apple')).length; - * //=> 1 - * ``` - * - * @param selectorOrHaystack - Element to look for. - * @returns The found elements. - * @see {@link https://api.jquery.com/find/} - */ -export function find<T extends AnyNode>( - this: Cheerio<T>, - selectorOrHaystack?: string | Cheerio<Element> | Element, -): Cheerio<Element> { - if (!selectorOrHaystack) { - return this._make([]); - } - - if (typeof selectorOrHaystack !== 'string') { - const haystack = isCheerio(selectorOrHaystack) - ? selectorOrHaystack.toArray() - : [selectorOrHaystack]; - - const context = this.toArray(); - - return this._make( - haystack.filter((elem) => context.some((node) => contains(node, elem))), - ); - } - - return this._findBySelector(selectorOrHaystack, Number.POSITIVE_INFINITY); -} - -/** - * Find elements by a specific selector. - * - * @private - * @category Traversing - * @param selector - Selector to filter by. - * @param limit - Maximum number of elements to match. - * @returns The found elements. - */ -export function _findBySelector<T extends AnyNode>( - this: Cheerio<T>, - selector: string, - limit: number, -): Cheerio<Element> { - const context = this.toArray(); - - const elems = reSiblingSelector.test(selector) - ? context - : this.children().toArray(); - - const options = { - context, - root: this._root?.[0], - - // Pass options that are recognized by `cheerio-select` - xmlMode: this.options.xmlMode, - lowerCaseTags: this.options.lowerCaseTags, - lowerCaseAttributeNames: this.options.lowerCaseAttributeNames, - pseudos: this.options.pseudos, - quirksMode: this.options.quirksMode, - }; - - return this._make(select.select(selector, elems, options, limit)); -} - -/** - * Creates a matcher, using a particular mapping function. Matchers provide a - * function that finds elements using a generating function, supporting - * filtering. - * - * @private - * @param matchMap - Mapping function. - * @returns - Function for wrapping generating functions. - */ -function _getMatcher<P>( - matchMap: (fn: (elem: AnyNode) => P, elems: Cheerio<AnyNode>) => Element[], -) { - return function ( - fn: (elem: AnyNode) => P, - ...postFns: ((elems: Element[]) => Element[])[] - ) { - return function <T extends AnyNode>( - this: Cheerio<T>, - selector?: AcceptedFilters<Element>, - ): Cheerio<Element> { - let matched: Element[] = matchMap(fn, this); - - if (selector) { - matched = filterArray( - matched, - selector, - this.options.xmlMode, - this._root?.[0], - ); - } - - return this._make( - // Post processing is only necessary if there is more than one element. - this.length > 1 && matched.length > 1 - ? postFns.reduce((elems, fn) => fn(elems), matched) - : matched, - ); - }; - }; -} - -/** Matcher that adds multiple elements for each entry in the input. */ -const _matcher = _getMatcher((fn: (elem: AnyNode) => Element[], elems) => { - let ret: Element[] = []; - - for (let i = 0; i < elems.length; i++) { - const value = fn(elems[i]); - if (value.length > 0) ret = ret.concat(value); - } - - return ret; -}); - -/** Matcher that adds at most one element for each entry in the input. */ -const _singleMatcher = _getMatcher( - (fn: (elem: AnyNode) => Element | null, elems) => { - const ret: Element[] = []; - - for (let i = 0; i < elems.length; i++) { - const value = fn(elems[i]); - if (value !== null) { - ret.push(value); - } - } - return ret; - }, -); - -/** - * Matcher that supports traversing until a condition is met. - * - * @param nextElem - Function that returns the next element. - * @param postFns - Post processing functions. - * @returns A function usable for `*Until` methods. - */ -function _matchUntil( - nextElem: (elem: AnyNode) => Element | null, - ...postFns: ((elems: Element[]) => Element[])[] -) { - // We use a variable here that is used from within the matcher. - let matches: ((el: Element, i: number) => boolean) | null = null; - - const innerMatcher = _getMatcher( - (nextElem: (elem: AnyNode) => Element | null, elems) => { - const matched: Element[] = []; - - domEach(elems, (elem) => { - for (let next; (next = nextElem(elem)); elem = next) { - // FIXME: `matched` might contain duplicates here and the index is too large. - if (matches?.(next, matched.length)) break; - matched.push(next); - } - }); - - return matched; - }, - )(nextElem, ...postFns); - - return function <T extends AnyNode>( - this: Cheerio<T>, - selector?: AcceptedFilters<Element> | null, - filterSelector?: AcceptedFilters<Element>, - ): Cheerio<Element> { - // Override `matches` variable with the new target. - matches = - typeof selector === 'string' - ? (elem: Element) => select.is(elem, selector, this.options) - : selector - ? getFilterFn(selector) - : null; - - const ret = innerMatcher.call(this, filterSelector); - - // Set `matches` to `null`, so we don't waste memory. - matches = null; - - return ret; - }; -} - -function _removeDuplicates<T extends AnyNode>(elems: T[]): T[] { - return elems.length > 1 ? Array.from(new Set<T>(elems)) : elems; -} - -/** - * Get the parent of each element in the current set of matched elements, - * optionally filtered by a selector. - * - * @category Traversing - * @example - * - * ```js - * $('.pear').parent().attr('id'); - * //=> fruits - * ``` - * - * @param selector - If specified filter for parent. - * @returns The parents. - * @see {@link https://api.jquery.com/parent/} - */ -export const parent: <T extends AnyNode>( - this: Cheerio<T>, - selector?: AcceptedFilters<Element>, -) => Cheerio<Element> = _singleMatcher( - ({ parent }) => (parent && !isDocument(parent) ? (parent as Element) : null), - _removeDuplicates, -); - -/** - * Get a set of parents filtered by `selector` of each element in the current - * set of match elements. - * - * @category Traversing - * @example - * - * ```js - * $('.orange').parents().length; - * //=> 2 - * $('.orange').parents('#fruits').length; - * //=> 1 - * ``` - * - * @param selector - If specified filter for parents. - * @returns The parents. - * @see {@link https://api.jquery.com/parents/} - */ -export const parents: <T extends AnyNode>( - this: Cheerio<T>, - selector?: AcceptedFilters<Element>, -) => Cheerio<Element> = _matcher( - (elem) => { - const matched = []; - while (elem.parent && !isDocument(elem.parent)) { - matched.push(elem.parent as Element); - elem = elem.parent; - } - return matched; - }, - uniqueSort, - (elems) => elems.reverse(), -); - -/** - * Get the ancestors of each element in the current set of matched elements, up - * to but not including the element matched by the selector, DOM node, or - * cheerio object. - * - * @category Traversing - * @example - * - * ```js - * $('.orange').parentsUntil('#food').length; - * //=> 1 - * ``` - * - * @param selector - Selector for element to stop at. - * @param filterSelector - Optional filter for parents. - * @returns The parents. - * @see {@link https://api.jquery.com/parentsUntil/} - */ -export const parentsUntil: <T extends AnyNode>( - this: Cheerio<T>, - selector?: AcceptedFilters<Element> | null, - filterSelector?: AcceptedFilters<Element>, -) => Cheerio<Element> = _matchUntil( - ({ parent }) => (parent && !isDocument(parent) ? (parent as Element) : null), - uniqueSort, - (elems) => elems.reverse(), -); - -/** - * For each element in the set, get the first element that matches the selector - * by testing the element itself and traversing up through its ancestors in the - * DOM tree. - * - * @category Traversing - * @example - * - * ```js - * $('.orange').closest(); - * //=> [] - * - * $('.orange').closest('.apple'); - * // => [] - * - * $('.orange').closest('li'); - * //=> [<li class="orange">Orange</li>] - * - * $('.orange').closest('#fruits'); - * //=> [<ul id="fruits"> ... </ul>] - * ``` - * - * @param selector - Selector for the element to find. - * @returns The closest nodes. - * @see {@link https://api.jquery.com/closest/} - */ -export function closest<T extends AnyNode>( - this: Cheerio<T>, - selector?: AcceptedFilters<Element>, -): Cheerio<AnyNode> { - const set: AnyNode[] = []; - - if (!selector) { - return this._make(set); - } - - const selectOpts = { - xmlMode: this.options.xmlMode, - root: this._root?.[0], - }; - - const selectFn = - typeof selector === 'string' - ? (elem: Element) => select.is(elem, selector, selectOpts) - : getFilterFn(selector); - - domEach(this, (elem: AnyNode | null) => { - if (elem && !isDocument(elem) && !isTag(elem)) { - elem = elem.parent; - } - while (elem && isTag(elem)) { - if (selectFn(elem, 0)) { - // Do not add duplicate elements to the set - if (!set.includes(elem)) { - set.push(elem); - } - break; - } - elem = elem.parent; - } - }); - - return this._make(set); -} - -/** - * Gets the next sibling of each selected element, optionally filtered by a - * selector. - * - * @category Traversing - * @example - * - * ```js - * $('.apple').next().hasClass('orange'); - * //=> true - * ``` - * - * @param selector - If specified filter for sibling. - * @returns The next nodes. - * @see {@link https://api.jquery.com/next/} - */ -export const next: <T extends AnyNode>( - this: Cheerio<T>, - selector?: AcceptedFilters<Element>, -) => Cheerio<Element> = _singleMatcher((elem) => nextElementSibling(elem)); - -/** - * Gets all the following siblings of the each selected element, optionally - * filtered by a selector. - * - * @category Traversing - * @example - * - * ```js - * $('.apple').nextAll(); - * //=> [<li class="orange">Orange</li>, <li class="pear">Pear</li>] - * $('.apple').nextAll('.orange'); - * //=> [<li class="orange">Orange</li>] - * ``` - * - * @param selector - If specified filter for siblings. - * @returns The next nodes. - * @see {@link https://api.jquery.com/nextAll/} - */ -export const nextAll: <T extends AnyNode>( - this: Cheerio<T>, - selector?: AcceptedFilters<Element>, -) => Cheerio<Element> = _matcher((elem) => { - const matched = []; - while (elem.next) { - elem = elem.next; - if (isTag(elem)) matched.push(elem); - } - return matched; -}, _removeDuplicates); - -/** - * Gets all the following siblings up to but not including the element matched - * by the selector, optionally filtered by another selector. - * - * @category Traversing - * @example - * - * ```js - * $('.apple').nextUntil('.pear'); - * //=> [<li class="orange">Orange</li>] - * ``` - * - * @param selector - Selector for element to stop at. - * @param filterSelector - If specified filter for siblings. - * @returns The next nodes. - * @see {@link https://api.jquery.com/nextUntil/} - */ -export const nextUntil: <T extends AnyNode>( - this: Cheerio<T>, - selector?: AcceptedFilters<Element> | null, - filterSelector?: AcceptedFilters<Element>, -) => Cheerio<Element> = _matchUntil( - (el) => nextElementSibling(el), - _removeDuplicates, -); - -/** - * Gets the previous sibling of each selected element optionally filtered by a - * selector. - * - * @category Traversing - * @example - * - * ```js - * $('.orange').prev().hasClass('apple'); - * //=> true - * ``` - * - * @param selector - If specified filter for siblings. - * @returns The previous nodes. - * @see {@link https://api.jquery.com/prev/} - */ -export const prev: <T extends AnyNode>( - this: Cheerio<T>, - selector?: AcceptedFilters<Element>, -) => Cheerio<Element> = _singleMatcher((elem) => prevElementSibling(elem)); - -/** - * Gets all the preceding siblings of each selected element, optionally filtered - * by a selector. - * - * @category Traversing - * @example - * - * ```js - * $('.pear').prevAll(); - * //=> [<li class="orange">Orange</li>, <li class="apple">Apple</li>] - * - * $('.pear').prevAll('.orange'); - * //=> [<li class="orange">Orange</li>] - * ``` - * - * @param selector - If specified filter for siblings. - * @returns The previous nodes. - * @see {@link https://api.jquery.com/prevAll/} - */ -export const prevAll: <T extends AnyNode>( - this: Cheerio<T>, - selector?: AcceptedFilters<Element>, -) => Cheerio<Element> = _matcher((elem) => { - const matched = []; - while (elem.prev) { - elem = elem.prev; - if (isTag(elem)) matched.push(elem); - } - return matched; -}, _removeDuplicates); - -/** - * Gets all the preceding siblings up to but not including the element matched - * by the selector, optionally filtered by another selector. - * - * @category Traversing - * @example - * - * ```js - * $('.pear').prevUntil('.apple'); - * //=> [<li class="orange">Orange</li>] - * ``` - * - * @param selector - Selector for element to stop at. - * @param filterSelector - If specified filter for siblings. - * @returns The previous nodes. - * @see {@link https://api.jquery.com/prevUntil/} - */ -export const prevUntil: <T extends AnyNode>( - this: Cheerio<T>, - selector?: AcceptedFilters<Element> | null, - filterSelector?: AcceptedFilters<Element>, -) => Cheerio<Element> = _matchUntil( - (el) => prevElementSibling(el), - _removeDuplicates, -); - -/** - * Get the siblings of each element (excluding the element) in the set of - * matched elements, optionally filtered by a selector. - * - * @category Traversing - * @example - * - * ```js - * $('.pear').siblings().length; - * //=> 2 - * - * $('.pear').siblings('.orange').length; - * //=> 1 - * ``` - * - * @param selector - If specified filter for siblings. - * @returns The siblings. - * @see {@link https://api.jquery.com/siblings/} - */ -export const siblings: <T extends AnyNode>( - this: Cheerio<T>, - selector?: AcceptedFilters<Element>, -) => Cheerio<Element> = _matcher( - (elem) => - getSiblings(elem).filter((el): el is Element => isTag(el) && el !== elem), - uniqueSort, -); - -/** - * Gets the element children of each element in the set of matched elements. - * - * @category Traversing - * @example - * - * ```js - * $('#fruits').children().length; - * //=> 3 - * - * $('#fruits').children('.pear').text(); - * //=> Pear - * ``` - * - * @param selector - If specified filter for children. - * @returns The children. - * @see {@link https://api.jquery.com/children/} - */ -export const children: <T extends AnyNode>( - this: Cheerio<T>, - selector?: AcceptedFilters<Element>, -) => Cheerio<Element> = _matcher( - (elem) => getChildren(elem).filter(isTag), - _removeDuplicates, -); - -/** - * Gets the children of each element in the set of matched elements, including - * text and comment nodes. - * - * @category Traversing - * @example - * - * ```js - * $('#fruits').contents().length; - * //=> 3 - * ``` - * - * @returns The children. - * @see {@link https://api.jquery.com/contents/} - */ -export function contents<T extends AnyNode>( - this: Cheerio<T>, -): Cheerio<AnyNode> { - const elems = this.toArray().reduce<AnyNode[]>( - (newElems, elem) => - hasChildren(elem) ? newElems.concat(elem.children) : newElems, - [], - ); - return this._make(elems); -} - -/** - * Iterates over a cheerio object, executing a function for each matched - * element. When the callback is fired, the function is fired in the context of - * the DOM element, so `this` refers to the current element, which is equivalent - * to the function parameter `element`. To break out of the `each` loop early, - * return with `false`. - * - * @category Traversing - * @example - * - * ```js - * const fruits = []; - * - * $('li').each(function (i, elem) { - * fruits[i] = $(this).text(); - * }); - * - * fruits.join(', '); - * //=> Apple, Orange, Pear - * ``` - * - * @param fn - Function to execute. - * @returns The instance itself, useful for chaining. - * @see {@link https://api.jquery.com/each/} - */ -export function each<T>( - this: Cheerio<T>, - fn: (this: T, i: number, el: T) => void | boolean, -): Cheerio<T> { - let i = 0; - const len = this.length; - while (i < len && fn.call(this[i], i, this[i]) !== false) ++i; - return this; -} - -/** - * Pass each element in the current matched set through a function, producing a - * new Cheerio object containing the return values. The function can return an - * individual data item or an array of data items to be inserted into the - * resulting set. If an array is returned, the elements inside the array are - * inserted into the set. If the function returns null or undefined, no element - * will be inserted. - * - * @category Traversing - * @example - * - * ```js - * $('li') - * .map(function (i, el) { - * // this === el - * return $(this).text(); - * }) - * .toArray() - * .join(' '); - * //=> "apple orange pear" - * ``` - * - * @param fn - Function to execute. - * @returns The mapped elements, wrapped in a Cheerio collection. - * @see {@link https://api.jquery.com/map/} - */ -export function map<T, M>( - this: Cheerio<T>, - fn: (this: T, i: number, el: T) => M[] | M | null | undefined, -): Cheerio<M> { - let elems: M[] = []; - for (let i = 0; i < this.length; i++) { - const el = this[i]; - const val = fn.call(el, i, el); - if (val != null) { - elems = elems.concat(val); - } - } - return this._make(elems); -} - -/** - * Creates a function to test if a filter is matched. - * - * @param match - A filter. - * @returns A function that determines if a filter has been matched. - */ -function getFilterFn<T>( - match: FilterFunction<T> | Cheerio<T> | T, -): (el: T, i: number) => boolean { - if (typeof match === 'function') { - return (el, i) => (match as FilterFunction<T>).call(el, i, el); - } - if (isCheerio<T>(match)) { - return (el) => Array.prototype.includes.call(match, el); - } - return function (el) { - return match === el; - }; -} - -/** - * Iterates over a cheerio object, reducing the set of selector elements to - * those that match the selector or pass the function's test. - * - * This is the definition for using type guards; have a look below for other - * ways to invoke this method. The function is executed in the context of the - * selected element, so `this` refers to the current element. - * - * @category Traversing - * @example <caption>Function</caption> - * - * ```js - * $('li') - * .filter(function (i, el) { - * // this === el - * return $(this).attr('class') === 'orange'; - * }) - * .attr('class'); //=> orange - * ``` - * - * @param match - Value to look for, following the rules above. - * @returns The filtered collection. - * @see {@link https://api.jquery.com/filter/} - */ -export function filter<T, S extends T>( - this: Cheerio<T>, - match: (this: T, index: number, value: T) => value is S, -): Cheerio<S>; -/** - * Iterates over a cheerio object, reducing the set of selector elements to - * those that match the selector or pass the function's test. - * - * - When a Cheerio selection is specified, return only the elements contained in - * that selection. - * - When an element is specified, return only that element (if it is contained in - * the original selection). - * - If using the function method, the function is executed in the context of the - * selected element, so `this` refers to the current element. - * - * @category Traversing - * @example <caption>Selector</caption> - * - * ```js - * $('li').filter('.orange').attr('class'); - * //=> orange - * ``` - * - * @example <caption>Function</caption> - * - * ```js - * $('li') - * .filter(function (i, el) { - * // this === el - * return $(this).attr('class') === 'orange'; - * }) - * .attr('class'); //=> orange - * ``` - * - * @param match - Value to look for, following the rules above. See - * {@link AcceptedFilters}. - * @returns The filtered collection. - * @see {@link https://api.jquery.com/filter/} - */ -export function filter<T, S extends AcceptedFilters<T>>( - this: Cheerio<T>, - match: S, -): Cheerio<S extends string ? Element : T>; -export function filter<T>( - this: Cheerio<T>, - match: AcceptedFilters<T>, -): Cheerio<unknown> { - return this._make<unknown>( - filterArray(this.toArray(), match, this.options.xmlMode, this._root?.[0]), - ); -} - -export function filterArray<T>( - nodes: T[], - match: AcceptedFilters<T>, - xmlMode?: boolean, - root?: Document, -): Element[] | T[] { - return typeof match === 'string' - ? select.filter(match, nodes as unknown as AnyNode[], { xmlMode, root }) - : nodes.filter(getFilterFn<T>(match)); -} - -/** - * Checks the current list of elements and returns `true` if _any_ of the - * elements match the selector. If using an element or Cheerio selection, - * returns `true` if _any_ of the elements match. If using a predicate function, - * the function is executed in the context of the selected element, so `this` - * refers to the current element. - * - * @category Traversing - * @param selector - Selector for the selection. - * @returns Whether or not the selector matches an element of the instance. - * @see {@link https://api.jquery.com/is/} - */ -export function is<T>( - this: Cheerio<T>, - selector?: AcceptedFilters<T>, -): boolean { - const nodes = this.toArray(); - return typeof selector === 'string' - ? select.some( - (nodes as unknown as AnyNode[]).filter(isTag), - selector, - this.options, - ) - : selector - ? nodes.some(getFilterFn<T>(selector)) - : false; -} - -/** - * Remove elements from the set of matched elements. Given a Cheerio object that - * represents a set of DOM elements, the `.not()` method constructs a new - * Cheerio object from a subset of the matching elements. The supplied selector - * is tested against each element; the elements that don't match the selector - * will be included in the result. - * - * The `.not()` method can take a function as its argument in the same way that - * `.filter()` does. Elements for which the function returns `true` are excluded - * from the filtered set; all other elements are included. - * - * @category Traversing - * @example <caption>Selector</caption> - * - * ```js - * $('li').not('.apple').length; - * //=> 2 - * ``` - * - * @example <caption>Function</caption> - * - * ```js - * $('li').not(function (i, el) { - * // this === el - * return $(this).attr('class') === 'orange'; - * }).length; //=> 2 - * ``` - * - * @param match - Value to look for, following the rules above. - * @returns The filtered collection. - * @see {@link https://api.jquery.com/not/} - */ -export function not<T extends AnyNode>( - this: Cheerio<T>, - match: AcceptedFilters<T>, -): Cheerio<T> { - let nodes = this.toArray(); - - if (typeof match === 'string') { - const matches = new Set<AnyNode>(select.filter(match, nodes, this.options)); - nodes = nodes.filter((el) => !matches.has(el)); - } else { - const filterFn = getFilterFn(match); - nodes = nodes.filter((el, i) => !filterFn(el, i)); - } - - return this._make(nodes); -} - -/** - * Filters the set of matched elements to only those which have the given DOM - * element as a descendant or which have a descendant that matches the given - * selector. Equivalent to `.filter(':has(selector)')`. - * - * @category Traversing - * @example <caption>Selector</caption> - * - * ```js - * $('ul').has('.pear').attr('id'); - * //=> fruits - * ``` - * - * @example <caption>Element</caption> - * - * ```js - * $('ul').has($('.pear')[0]).attr('id'); - * //=> fruits - * ``` - * - * @param selectorOrHaystack - Element to look for. - * @returns The filtered collection. - * @see {@link https://api.jquery.com/has/} - */ -export function has( - this: Cheerio<AnyNode | Element>, - selectorOrHaystack: string | Cheerio<Element> | Element, -): Cheerio<AnyNode | Element> { - return this.filter( - typeof selectorOrHaystack === 'string' - ? // Using the `:has` selector here short-circuits searches. - `:has(${selectorOrHaystack})` - : (_, el) => this._make(el).find(selectorOrHaystack).length > 0, - ); -} - -/** - * Will select the first element of a cheerio object. - * - * @category Traversing - * @example - * - * ```js - * $('#fruits').children().first().text(); - * //=> Apple - * ``` - * - * @returns The first element. - * @see {@link https://api.jquery.com/first/} - */ -export function first<T extends AnyNode>(this: Cheerio<T>): Cheerio<T> { - return this.length > 1 ? this._make(this[0]) : this; -} - -/** - * Will select the last element of a cheerio object. - * - * @category Traversing - * @example - * - * ```js - * $('#fruits').children().last().text(); - * //=> Pear - * ``` - * - * @returns The last element. - * @see {@link https://api.jquery.com/last/} - */ -export function last<T>(this: Cheerio<T>): Cheerio<T> { - return this.length > 0 ? this._make(this[this.length - 1]) : this; -} - -/** - * Reduce the set of matched elements to the one at the specified index. Use - * `.eq(-i)` to count backwards from the last selected element. - * - * @category Traversing - * @example - * - * ```js - * $('li').eq(0).text(); - * //=> Apple - * - * $('li').eq(-1).text(); - * //=> Pear - * ``` - * - * @param i - Index of the element to select. - * @returns The element at the `i`th position. - * @see {@link https://api.jquery.com/eq/} - */ -export function eq<T>(this: Cheerio<T>, i: number): Cheerio<T> { - i = +i; - - // Use the first identity optimization if possible - if (i === 0 && this.length <= 1) return this; - - if (i < 0) i = this.length + i; - return this._make(this[i] ?? []); -} - -/** - * Retrieve one of the elements matched by the Cheerio object, at the `i`th - * position. - * - * @category Traversing - * @example - * - * ```js - * $('li').get(0).tagName; - * //=> li - * ``` - * - * @param i - Element to retrieve. - * @returns The element at the `i`th position. - * @see {@link https://api.jquery.com/get/} - */ -export function get<T>(this: Cheerio<T>, i: number): T | undefined; -/** - * Retrieve all elements matched by the Cheerio object, as an array. - * - * @category Traversing - * @example - * - * ```js - * $('li').get().length; - * //=> 3 - * ``` - * - * @returns All elements matched by the Cheerio object. - * @see {@link https://api.jquery.com/get/} - */ -export function get<T>(this: Cheerio<T>): T[]; -export function get<T>(this: Cheerio<T>, i?: number): T | T[] { - if (i == null) { - return this.toArray(); - } - return this[i < 0 ? this.length + i : i]; -} - -/** - * Retrieve all the DOM elements contained in the jQuery set as an array. - * - * @example - * - * ```js - * $('li').toArray(); - * //=> [ {...}, {...}, {...} ] - * ``` - * - * @returns The contained items. - */ -export function toArray<T>(this: Cheerio<T>): T[] { - return Array.prototype.slice.call(this); -} - -/** - * Search for a given element from among the matched elements. - * - * @category Traversing - * @example - * - * ```js - * $('.pear').index(); - * //=> 2 $('.orange').index('li'); - * //=> 1 - * $('.apple').index($('#fruit, li')); - * //=> 1 - * ``` - * - * @param selectorOrNeedle - Element to look for. - * @returns The index of the element. - * @see {@link https://api.jquery.com/index/} - */ -export function index<T extends AnyNode>( - this: Cheerio<T>, - selectorOrNeedle?: string | Cheerio<AnyNode> | AnyNode, -): number { - let $haystack: Cheerio<AnyNode>; - let needle: AnyNode; - - if (selectorOrNeedle == null) { - $haystack = this.parent().children(); - needle = this[0]; - } else if (typeof selectorOrNeedle === 'string') { - $haystack = this._make<AnyNode>(selectorOrNeedle); - needle = this[0]; - } else { - // eslint-disable-next-line @typescript-eslint/no-this-alias, unicorn/no-this-assignment - $haystack = this; - needle = isCheerio(selectorOrNeedle) - ? selectorOrNeedle[0] - : selectorOrNeedle; - } - - return Array.prototype.indexOf.call($haystack, needle); -} - -/** - * Gets the elements matching the specified range (0-based position). - * - * @category Traversing - * @example - * - * ```js - * $('li').slice(1).eq(0).text(); - * //=> 'Orange' - * - * $('li').slice(1, 2).length; - * //=> 1 - * ``` - * - * @param start - A position at which the elements begin to be selected. If - * negative, it indicates an offset from the end of the set. - * @param end - A position at which the elements stop being selected. If - * negative, it indicates an offset from the end of the set. If omitted, the - * range continues until the end of the set. - * @returns The elements matching the specified range. - * @see {@link https://api.jquery.com/slice/} - */ -export function slice<T>( - this: Cheerio<T>, - start?: number, - end?: number, -): Cheerio<T> { - return this._make(Array.prototype.slice.call(this, start, end)); -} - -/** - * End the most recent filtering operation in the current chain and return the - * set of matched elements to its previous state. - * - * @category Traversing - * @example - * - * ```js - * $('li').eq(0).end().length; - * //=> 3 - * ``` - * - * @returns The previous state of the set of matched elements. - * @see {@link https://api.jquery.com/end/} - */ -export function end<T>(this: Cheerio<T>): Cheerio<AnyNode> { - return this.prevObject ?? this._make([]); -} - -/** - * Add elements to the set of matched elements. - * - * @category Traversing - * @example - * - * ```js - * $('.apple').add('.orange').length; - * //=> 2 - * ``` - * - * @param other - Elements to add. - * @param context - Optionally the context of the new selection. - * @returns The combined set. - * @see {@link https://api.jquery.com/add/} - */ -export function add<S extends AnyNode, T extends AnyNode>( - this: Cheerio<T>, - other: string | Cheerio<S> | S | S[], - context?: Cheerio<S> | string, -): Cheerio<S | T> { - const selection = this._make(other, context); - const contents = uniqueSort([...this.get(), ...selection.get()]); - return this._make(contents); -} - -/** - * Add the previous set of elements on the stack to the current set, optionally - * filtered by a selector. - * - * @category Traversing - * @example - * - * ```js - * $('li').eq(0).addBack('.orange').length; - * //=> 2 - * ``` - * - * @param selector - Selector for the elements to add. - * @returns The combined set. - * @see {@link https://api.jquery.com/addBack/} - */ -export function addBack<T extends AnyNode>( - this: Cheerio<T>, - selector?: string, -): Cheerio<AnyNode> { - return this.prevObject - ? this.add(selector ? this.prevObject.filter(selector) : this.prevObject) - : this; -} diff --git a/node_modules/cheerio/src/cheerio.spec.ts b/node_modules/cheerio/src/cheerio.spec.ts deleted file mode 100644 index 380c80e..0000000 --- a/node_modules/cheerio/src/cheerio.spec.ts +++ /dev/null @@ -1,455 +0,0 @@ -import { describe, it, expect } from 'vitest'; -import { parseDOM } from 'htmlparser2'; -import { type Cheerio } from './index.js'; -import { cheerio, fruits, food, noscript } from './__fixtures__/fixtures.js'; -import type { Element } from 'domhandler'; - -declare module './index.js' { - interface Cheerio<T> { - myPlugin(...args: unknown[]): { - context: Cheerio<T>; - args: unknown[]; - }; - foo(): void; - } -} - -function testAppleSelect($apple: ArrayLike<Element>) { - expect($apple).toHaveLength(1); - const apple = $apple[0]; - expect(apple.parentNode).toHaveProperty('tagName', 'ul'); - expect(apple.prev).toBe(null); - expect((apple.next as Element).attribs).toHaveProperty('class', 'orange'); - expect(apple.childNodes).toHaveLength(1); - expect(apple.childNodes[0]).toHaveProperty('data', 'Apple'); -} - -describe('cheerio', () => { - it('cheerio(null) should be empty', () => { - expect(cheerio(null as never)).toHaveLength(0); - }); - - it('cheerio(undefined) should be empty', () => { - expect(cheerio(undefined)).toHaveLength(0); - }); - - it("cheerio('') should be empty", () => { - expect(cheerio('')).toHaveLength(0); - }); - - it('cheerio(selector) with no context or root should be empty', () => { - expect(cheerio('.h2')).toHaveLength(0); - expect(cheerio('#fruits')).toHaveLength(0); - }); - - it('cheerio(node) : should override previously-loaded nodes', () => { - const $ = cheerio.load('<div><span></span></div>'); - const spanNode = $('span')[0]; - const $span = $(spanNode); - expect($span[0]).toBe(spanNode); - }); - - it('should be able to create html without a root or context', () => { - const $h2 = cheerio('<h2>'); - expect($h2).not.toHaveLength(0); - expect($h2).toHaveLength(1); - expect($h2[0]).toHaveProperty('tagName', 'h2'); - }); - - it('should be able to create complicated html', () => { - const $script = cheerio( - '<script src="script.js" type="text/javascript"></script>', - ) as Cheerio<Element>; - expect($script).not.toHaveLength(0); - expect($script).toHaveLength(1); - expect($script[0].attribs).toHaveProperty('src', 'script.js'); - expect($script[0].attribs).toHaveProperty('type', 'text/javascript'); - expect($script[0].childNodes).toHaveLength(0); - }); - - // eslint-disable-next-line vitest/expect-expect - it('should be able to select .apple with only a context', () => { - const $apple = cheerio('.apple', fruits); - testAppleSelect($apple); - }); - - // eslint-disable-next-line vitest/expect-expect - it('should be able to select .apple with a node as context', () => { - const $apple = cheerio('.apple', cheerio(fruits)[0]); - testAppleSelect($apple); - }); - - // eslint-disable-next-line vitest/expect-expect - it('should be able to select .apple with only a root', () => { - const $apple = cheerio('.apple', null, fruits); - testAppleSelect($apple); - }); - - it('should be able to select an id', () => { - const $fruits = cheerio('#fruits', null, fruits); - expect($fruits).toHaveLength(1); - expect($fruits[0].attribs).toHaveProperty('id', 'fruits'); - }); - - it('should be able to select a tag', () => { - const $ul = cheerio('ul', fruits); - expect($ul).toHaveLength(1); - expect($ul[0].tagName).toBe('ul'); - }); - - it('should accept a node reference as a context', () => { - const $elems = cheerio('<div><span></span></div>'); - expect(cheerio('span', $elems[0])).toHaveLength(1); - }); - - it('should accept an array of node references as a context', () => { - const $elems = cheerio('<div><span></span></div>'); - expect(cheerio('span', $elems.toArray())).toHaveLength(1); - }); - - it('should select only elements inside given context (Issue #193)', () => { - const $ = cheerio.load(food); - const $fruits = $('#fruits'); - const fruitElements = $('li', $fruits); - - expect(fruitElements).toHaveLength(3); - }); - - it('should be able to select multiple tags', () => { - const $fruits = cheerio('li', null, fruits); - expect($fruits).toHaveLength(3); - const classes = ['apple', 'orange', 'pear']; - $fruits.each((idx, $fruit) => { - expect($fruit.attribs).toHaveProperty('class', classes[idx]); - }); - }); - - // eslint-disable-next-line vitest/expect-expect - it('should be able to do: cheerio("#fruits .apple")', () => { - const $apple = cheerio('#fruits .apple', fruits); - testAppleSelect($apple); - }); - - // eslint-disable-next-line vitest/expect-expect - it('should be able to do: cheerio("li.apple")', () => { - const $apple = cheerio('li.apple', fruits); - testAppleSelect($apple); - }); - - // eslint-disable-next-line vitest/expect-expect - it('should be able to select by attributes', () => { - const $apple = cheerio('li[class=apple]', fruits); - testAppleSelect($apple); - }); - - it('should be able to select multiple classes: cheerio(".btn.primary")', () => { - const $a = cheerio( - '.btn.primary', - '<p><a class="btn primary" href="#">Save</a></p>', - ); - expect($a).toHaveLength(1); - expect($a[0].childNodes[0]).toHaveProperty('data', 'Save'); - }); - - it('should not create a top-level node', () => { - const $elem = cheerio('* div', '<div>'); - expect($elem).toHaveLength(0); - }); - - it('should be able to select multiple elements: cheerio(".apple, #fruits")', () => { - const $elems = cheerio('.apple, #fruits', fruits); - expect($elems).toHaveLength(2); - - const $apple = $elems - .toArray() - .filter((elem) => elem.attribs['class'] === 'apple'); - const $fruit = $elems - .toArray() - .find((elem) => elem.attribs['id'] === 'fruits'); - testAppleSelect($apple); - expect($fruit?.attribs).toHaveProperty('id', 'fruits'); - }); - - it('should select first element cheerio(:first)', () => { - const $elem = cheerio('li:first', fruits); - expect($elem.attr('class')).toBe('apple'); - - const $filtered = cheerio('li', fruits).filter(':even'); - expect($filtered).toHaveLength(2); - }); - - it('should be able to select immediate children: cheerio("#fruits > .pear")', () => { - const $food = cheerio(food); - cheerio('.pear', $food).append('<li class="pear">Another Pear!</li>'); - expect(cheerio('#fruits .pear', $food)).toHaveLength(2); - const $elem = cheerio('#fruits > .pear', $food); - expect($elem).toHaveLength(1); - expect($elem.attr('class')).toBe('pear'); - }); - - it('should be able to select immediate children: cheerio(".apple + .pear")', () => { - expect(cheerio('.apple + li', fruits)).toHaveLength(1); - expect(cheerio('.apple + .pear', fruits)).toHaveLength(0); - const $elem = cheerio('.apple + .orange', fruits); - expect($elem).toHaveLength(1); - expect($elem.attr('class')).toBe('orange'); - }); - - it('should be able to select immediate children: cheerio(".apple ~ .pear")', () => { - expect(cheerio('.apple ~ li', fruits)).toHaveLength(2); - expect(cheerio('.apple ~ .pear', fruits).attr('class')).toBe('pear'); - }); - - it('should handle wildcards on attributes: cheerio("li[class*=r]")', () => { - const $elem = cheerio('li[class*=r]', fruits); - expect($elem).toHaveLength(2); - expect($elem.eq(0).attr('class')).toBe('orange'); - expect($elem.eq(1).attr('class')).toBe('pear'); - }); - - it('should handle beginning of attr selectors: cheerio("li[class^=o]")', () => { - const $elem = cheerio('li[class^=o]', fruits); - expect($elem).toHaveLength(1); - expect($elem.eq(0).attr('class')).toBe('orange'); - }); - - it('should handle beginning of attr selectors: cheerio("li[class$=e]")', () => { - const $elem = cheerio('li[class$=e]', fruits); - expect($elem).toHaveLength(2); - expect($elem.eq(0).attr('class')).toBe('apple'); - expect($elem.eq(1).attr('class')).toBe('orange'); - }); - - it('(extended Array) should not interfere with prototype methods (issue #119)', () => { - const extended: any = []; - extended.find = - extended.children = - extended.each = - function () { - /* Ignore */ - }; - const $empty = cheerio(extended); - - expect($empty.find).toBe(cheerio.prototype.find); - expect($empty.children).toBe(cheerio.prototype.children); - expect($empty.each).toBe(cheerio.prototype.each); - }); - - it('cheerio.html(null) should return a "" string', () => { - expect(cheerio.html(null as never)).toBe(''); - }); - - it('should set html(number) as a string', () => { - const $elem = cheerio('<div>'); - $elem.html(123 as never); - expect(typeof $elem.text()).toBe('string'); - }); - - it('should set text(number) as a string', () => { - const $elem = cheerio('<div>'); - $elem.text(123 as never); - expect(typeof $elem.text()).toBe('string'); - }); - - describe('.load', () => { - it('should generate selections as proper instances', () => { - const $ = cheerio.load(fruits); - - expect($('.apple')).toBeInstanceOf($); - }); - - // Issue #1092 - it('should handle a character `)` in `:contains` selector', () => { - const result = cheerio.load('<p>)aaa</p>')( - String.raw`:contains('\)aaa')`, - ); - expect(result).toHaveLength(3); - expect(result.first().prop('tagName')).toBe('HTML'); - expect(result.eq(1).prop('tagName')).toBe('BODY'); - expect(result.last().prop('tagName')).toBe('P'); - }); - - it('should be able to filter down using the context', () => { - const $ = cheerio.load(fruits); - const apple = $('.apple', 'ul'); - const lis = $('li', 'ul'); - - expect(apple).toHaveLength(1); - expect(lis).toHaveLength(3); - }); - - it('should preserve root content', () => { - const $ = cheerio.load(fruits); - // Root should not be overwritten - const el = $('<div></div>'); - expect(Object.is(el, el._root)).toBe(false); - // Query has to have results - expect($('li', 'ul')).toHaveLength(3); - }); - - it('should allow loading a pre-parsed DOM', () => { - const dom = parseDOM(food); - const $ = cheerio.load(dom); - - expect($('ul')).toHaveLength(3); - }); - - it('should allow loading a single element', () => { - const el = parseDOM(food)[0]; - const $ = cheerio.load(el); - - expect($('ul')).toHaveLength(3); - }); - - it('should render xml in html() when options.xml = true', () => { - const str = '<MixedCaseTag UPPERCASEATTRIBUTE=""></MixedCaseTag>'; - const expected = '<MixedCaseTag UPPERCASEATTRIBUTE=""/>'; - const $ = cheerio.load(str, { xml: true }); - - expect($('MixedCaseTag').get(0)).toHaveProperty( - 'tagName', - 'MixedCaseTag', - ); - expect($.html()).toBe(expected); - }); - - it('should render xml in html() when options.xml = true passed to html()', () => { - const str = '<MixedCaseTag UPPERCASEATTRIBUTE=""></MixedCaseTag>'; - // Since parsing done without xml flag, all tags converted to lowercase - const expectedXml = - '<html><head/><body><mixedcasetag uppercaseattribute=""/></body></html>'; - const expectedNoXml = - '<html><head></head><body><mixedcasetag uppercaseattribute=""></mixedcasetag></body></html>'; - const $ = cheerio.load(str); - - expect($('MixedCaseTag').get(0)).toHaveProperty( - 'tagName', - 'mixedcasetag', - ); - expect($.html()).toBe(expectedNoXml); - expect($.html({ xml: true })).toBe(expectedXml); - }); - - it('should respect options on the element level', () => { - const str = - '<!doctype html><html><head><title>Some test</title></head><body><footer><p>Copyright © 2003-2014</p></footer></body></html>'; - const expectedHtml = '<p>Copyright © 2003-2014</p>'; - const expectedXml = '<p>Copyright © 2003-2014</p>'; - const domNotEncoded = cheerio.load(str, { - xml: { decodeEntities: false }, - }); - const domEncoded = cheerio.load(str); - - expect(domNotEncoded('footer').html()).toBe(expectedHtml); - expect(domEncoded('footer').html()).toBe(expectedXml); - }); - - it('should use htmlparser2 if xml option is used', () => { - const str = '<div></div>'; - const dom = cheerio.load(str, null, false); - expect(dom.html()).toBe(str); - }); - - it('should return a fully-qualified Function', () => { - const $ = cheerio.load('<div>'); - - expect($).toBeInstanceOf(Function); - }); - - describe('prototype extensions', () => { - it('should honor extensions defined on `prototype` property', () => { - const $ = cheerio.load('<div>'); - - $.prototype.myPlugin = function (...args: unknown[]) { - return { - context: this, - args, - }; - }; - - const $div = $('div'); - - expect(typeof $div.myPlugin).toBe('function'); - expect($div.myPlugin().context).toBe($div); - expect($div.myPlugin(1, 2, 3).args).toStrictEqual([1, 2, 3]); - }); - - it('should honor extensions defined on `fn` property', () => { - const $ = cheerio.load('<div>'); - $.fn.myPlugin = function (...args: unknown[]) { - return { - context: this, - args, - }; - }; - - const $div = $('div'); - - expect(typeof $div.myPlugin).toBe('function'); - expect($div.myPlugin().context).toBe($div); - expect($div.myPlugin(1, 2, 3).args).toStrictEqual([1, 2, 3]); - }); - - it('should isolate extensions between loaded functions', () => { - const $a = cheerio.load('<div>'); - const $b = cheerio.load('<div>'); - - $a.prototype.foo = function () { - /* Ignore */ - }; - - expect($b('div').foo).toBeUndefined(); - }); - }); - }); - - describe('parse5 options', () => { - // Should parse noscript tags only with false option value - it('{scriptingEnabled: ???}', () => { - // [default] `scriptingEnabled: true` - tag contains one text element - const withScripts = cheerio.load(noscript)('noscript'); - expect(withScripts).toHaveLength(1); - expect(withScripts[0].children).toHaveLength(1); - expect(withScripts[0].children[0].type).toBe('text'); - - // `scriptingEnabled: false` - content of noscript will parsed - const noScripts = cheerio.load(noscript, { scriptingEnabled: false })( - 'noscript', - ); - expect(noScripts).toHaveLength(1); - expect(noScripts[0].children).toHaveLength(2); - expect(noScripts[0].children[0].type).toBe('comment'); - expect(noScripts[0].children[1].type).toBe('tag'); - expect(noScripts[0].children[1]).toHaveProperty('name', 'a'); - - // `scriptingEnabled: ???` - should acts as true - for (const val of [undefined, null, 0, '']) { - const options = { scriptingEnabled: val as never }; - const result = cheerio.load(noscript, options)('noscript'); - expect(result).toHaveLength(1); - expect(result[0].children).toHaveLength(1); - expect(result[0].children[0].type).toBe('text'); - } - }); - - // Should contain location data only with truthful option value - it('{sourceCodeLocationInfo: ???}', () => { - // Location data should not be present - for (const val of [undefined, null, 0, false, '']) { - const options = { sourceCodeLocationInfo: val as never }; - const result = cheerio.load(noscript, options)('noscript'); - expect(result).toHaveLength(1); - expect(result[0]).not.toHaveProperty('sourceCodeLocation'); - } - - // Location data should be present - for (const val of [true, 1, 'test']) { - const options = { sourceCodeLocationInfo: val as never }; - const result = cheerio.load(noscript, options)('noscript'); - expect(result).toHaveLength(1); - expect(result[0]).toHaveProperty('sourceCodeLocation'); - expect(typeof result[0].sourceCodeLocation).toBe('object'); - } - }); - }); -}); diff --git a/node_modules/cheerio/src/cheerio.ts b/node_modules/cheerio/src/cheerio.ts deleted file mode 100644 index 8f5b2d6..0000000 --- a/node_modules/cheerio/src/cheerio.ts +++ /dev/null @@ -1,143 +0,0 @@ -/* eslint-disable @typescript-eslint/no-unsafe-declaration-merging */ -import type { InternalOptions } from './options.js'; -import type { AnyNode, Document, ParentNode } from 'domhandler'; -import type { BasicAcceptedElems } from './types.js'; - -import * as Attributes from './api/attributes.js'; -import * as Traversing from './api/traversing.js'; -import * as Manipulation from './api/manipulation.js'; -import * as Css from './api/css.js'; -import * as Forms from './api/forms.js'; -import * as Extract from './api/extract.js'; - -type MethodsType = typeof Attributes & - typeof Traversing & - typeof Manipulation & - typeof Css & - typeof Forms & - typeof Extract; - -/** - * The cheerio class is the central class of the library. It wraps a set of - * elements and provides an API for traversing, modifying, and interacting with - * the set. - * - * Loading a document will return the Cheerio class bound to the root element of - * the document. The class will be instantiated when querying the document (when - * calling `$('selector')`). - * - * @example This is the HTML markup we will be using in all of the API examples: - * - * ```html - * <ul id="fruits"> - * <li class="apple">Apple</li> - * <li class="orange">Orange</li> - * <li class="pear">Pear</li> - * </ul> - * ``` - */ -export abstract class Cheerio<T> implements ArrayLike<T> { - length = 0; - [index: number]: T; - - options: InternalOptions; - /** - * The root of the document. Can be set by using the `root` argument of the - * constructor. - * - * @private - */ - _root: Cheerio<Document> | null; - - /** - * Instance of cheerio. Methods are specified in the modules. Usage of this - * constructor is not recommended. Please use `$.load` instead. - * - * @private - * @param elements - The new selection. - * @param root - Sets the root node. - * @param options - Options for the instance. - */ - constructor( - elements: ArrayLike<T> | undefined, - root: Cheerio<Document> | null, - options: InternalOptions, - ) { - this.options = options; - this._root = root; - - if (elements) { - for (let idx = 0; idx < elements.length; idx++) { - this[idx] = elements[idx]; - } - this.length = elements.length; - } - } - - prevObject: Cheerio<any> | undefined; - /** - * Make a cheerio object. - * - * @private - * @param dom - The contents of the new object. - * @param context - The context of the new object. - * @returns The new cheerio object. - */ - abstract _make<T>( - dom: ArrayLike<T> | T | string, - context?: BasicAcceptedElems<AnyNode>, - ): Cheerio<T>; - - /** - * Parses some content. - * - * @private - * @param content - Content to parse. - * @param options - Options for parsing. - * @param isDocument - Allows parser to be switched to fragment mode. - * @returns A document containing the `content`. - */ - abstract _parse( - content: string | Document | AnyNode | AnyNode[] | Buffer, - options: InternalOptions, - isDocument: boolean, - context: ParentNode | null, - ): Document; - - /** - * Render an element or a set of elements. - * - * @private - * @param dom - DOM to render. - * @returns The rendered DOM. - */ - abstract _render(dom: AnyNode | ArrayLike<AnyNode>): string; -} - -export interface Cheerio<T> extends MethodsType, Iterable<T> { - cheerio: '[cheerio object]'; - - splice: typeof Array.prototype.splice; -} - -/** Set a signature of the object. */ -Cheerio.prototype.cheerio = '[cheerio object]'; - -/* - * Make cheerio an array-like object - */ -Cheerio.prototype.splice = Array.prototype.splice; - -// Support for (const element of $(...)) iteration: -Cheerio.prototype[Symbol.iterator] = Array.prototype[Symbol.iterator]; - -// Plug in the API -Object.assign( - Cheerio.prototype, - Attributes, - Traversing, - Manipulation, - Css, - Forms, - Extract, -); diff --git a/node_modules/cheerio/src/index-browser.mts b/node_modules/cheerio/src/index-browser.mts deleted file mode 100644 index 7ba8626..0000000 --- a/node_modules/cheerio/src/index-browser.mts +++ /dev/null @@ -1,10 +0,0 @@ -export type * from './types.js'; -export type { - Cheerio, - CheerioAPI, - CheerioOptions, - HTMLParser2Options, -} from './slim.js'; -export { contains, merge } from './static.js'; - -export * from './load-parse.js'; diff --git a/node_modules/cheerio/src/index.spec.ts b/node_modules/cheerio/src/index.spec.ts deleted file mode 100644 index e1e9a73..0000000 --- a/node_modules/cheerio/src/index.spec.ts +++ /dev/null @@ -1,180 +0,0 @@ -import { describe, it, expect, afterEach } from 'vitest'; -import * as cheerio from './index.js'; -import { Writable } from 'node:stream'; -import { createServer, type Server } from 'node:http'; - -function noop() { - // Ignore -} - -// Returns a promise and a resolve function -function getPromise() { - let cb: (error: Error | null | undefined, $: cheerio.CheerioAPI) => void; - const promise = new Promise<cheerio.CheerioAPI>((resolve, reject) => { - cb = (error, $) => (error ? reject(error) : resolve($)); - }); - - return { promise, cb: cb! }; -} - -const TEST_HTML = '<h1>Hello World</h1>'; -const TEST_HTML_UTF16 = Buffer.from(TEST_HTML, 'utf16le'); -const TEST_HTML_UTF16_BOM = Buffer.from([ - // UTF16-LE BOM - 0xff, - 0xfe, - ...Array.from(TEST_HTML_UTF16), -]); - -describe('loadBuffer', () => { - it('should parse UTF-8 HTML', () => { - const $ = cheerio.loadBuffer(Buffer.from(TEST_HTML)); - - expect($.html()).toBe( - `<html><head></head><body>${TEST_HTML}</body></html>`, - ); - }); - - it('should parse UTF-16 HTML', () => { - const $ = cheerio.loadBuffer(TEST_HTML_UTF16_BOM); - - expect($.html()).toBe( - `<html><head></head><body>${TEST_HTML}</body></html>`, - ); - }); -}); - -describe('stringStream', () => { - it('should use parse5 by default', async () => { - const { promise, cb } = getPromise(); - const stream = cheerio.stringStream({}, cb); - - expect(stream).toBeInstanceOf(Writable); - - stream.end(TEST_HTML); - - const $ = await promise; - - expect($.html()).toBe( - `<html><head></head><body>${TEST_HTML}</body></html>`, - ); - }); - - it('should error from parse5 on buffer', () => { - const stream = cheerio.stringStream({}, noop); - expect(stream).toBeInstanceOf(Writable); - - expect(() => stream.write(Buffer.from(TEST_HTML))).toThrow( - 'Parser can work only with string streams.', - ); - }); - - it('should use htmlparser2 for XML', async () => { - const { promise, cb } = getPromise(); - const stream = cheerio.stringStream({ xmlMode: true }, cb); - - expect(stream).toBeInstanceOf(Writable); - - stream.end(TEST_HTML); - - const $ = await promise; - - expect($.html()).toBe(TEST_HTML); - }); -}); - -describe('decodeStream', () => { - it('should use parse5 by default', async () => { - const { promise, cb } = getPromise(); - const stream = cheerio.decodeStream({}, cb); - - expect(stream).toBeInstanceOf(Writable); - - stream.end(TEST_HTML_UTF16_BOM); - - const $ = await promise; - - expect($.html()).toBe( - `<html><head></head><body>${TEST_HTML}</body></html>`, - ); - }); - - it('should use htmlparser2 for XML', async () => { - const { promise, cb } = getPromise(); - const stream = cheerio.decodeStream({ xmlMode: true }, cb); - - expect(stream).toBeInstanceOf(Writable); - - stream.end(TEST_HTML_UTF16_BOM); - - const $ = await promise; - - expect($.html()).toBe(TEST_HTML); - }); -}); - -describe('fromURL', () => { - let server: Server | undefined; - - function createTestServer( - contentType: string, - body: string | Buffer, - ): Promise<number> { - return new Promise((resolve, reject) => { - server = createServer((_req, res) => { - res.writeHead(200, { 'Content-Type': contentType }); - res.end(body); - }); - - server.listen(0, () => { - const address = server?.address(); - - if (typeof address === 'string' || address == null) { - reject(new Error('Failed to get port')); - } else { - resolve(address.port); - } - }); - }); - } - - afterEach( - async () => - new Promise<void>((resolve, reject) => { - if (server) { - server.close((err) => (err ? reject(err) : resolve())); - server = undefined; - } else { - resolve(); - } - }), - ); - - it('should fetch UTF-8 HTML', async () => { - const port = await createTestServer('text/html', TEST_HTML); - const $ = await cheerio.fromURL(`http://localhost:${port}`); - - expect($.html()).toBe( - `<html><head></head><body>${TEST_HTML}</body></html>`, - ); - }); - - it('should fetch UTF-16 HTML', async () => { - const port = await createTestServer( - 'text/html; charset=utf-16le', - TEST_HTML_UTF16, - ); - const $ = await cheerio.fromURL(`http://localhost:${port}`); - - expect($.html()).toBe( - `<html><head></head><body>${TEST_HTML}</body></html>`, - ); - }); - - it('should parse XML based on Content-Type', async () => { - const port = await createTestServer('text/xml', TEST_HTML); - const $ = await cheerio.fromURL(`http://localhost:${port}`); - - expect($.html()).toBe(TEST_HTML); - }); -}); diff --git a/node_modules/cheerio/src/index.ts b/node_modules/cheerio/src/index.ts deleted file mode 100644 index d8e3292..0000000 --- a/node_modules/cheerio/src/index.ts +++ /dev/null @@ -1,274 +0,0 @@ -/** - * @file Batteries-included version of Cheerio. This module includes several - * convenience methods for loading documents from various sources. - */ - -export * from './load-parse.js'; -export { contains, merge } from './static.js'; -export type * from './types.js'; -export type { - Cheerio, - CheerioAPI, - CheerioOptions, - HTMLParser2Options, -} from './slim.js'; - -import { adapter as htmlparser2Adapter } from 'parse5-htmlparser2-tree-adapter'; -import * as htmlparser2 from 'htmlparser2'; -import { ParserStream as Parse5Stream } from 'parse5-parser-stream'; -import { - decodeBuffer, - DecodeStream, - type SnifferOptions, -} from 'encoding-sniffer'; -import * as undici from 'undici'; -import MIMEType from 'whatwg-mimetype'; -import { Writable, finished } from 'node:stream'; -import type { CheerioAPI } from './load.js'; -import { - flattenOptions, - type InternalOptions, - type CheerioOptions, -} from './options.js'; -import { load } from './load-parse.js'; - -/** - * Sniffs the encoding of a buffer, then creates a querying function bound to a - * document created from the buffer. - * - * @category Loading - * @example - * - * ```js - * import * as cheerio from 'cheerio'; - * - * const buffer = fs.readFileSync('index.html'); - * const $ = cheerio.fromBuffer(buffer); - * ``` - * - * @param buffer - The buffer to sniff the encoding of. - * @param options - The options to pass to Cheerio. - * @returns The loaded document. - */ -export function loadBuffer( - buffer: Buffer, - options: DecodeStreamOptions = {}, -): CheerioAPI { - const opts = flattenOptions(options); - const str = decodeBuffer(buffer, { - defaultEncoding: opts?.xmlMode ? 'utf8' : 'windows-1252', - ...options.encoding, - }); - - return load(str, opts); -} - -function _stringStream( - options: InternalOptions | undefined, - cb: (err: Error | null | undefined, $: CheerioAPI) => void, -): Writable { - if (options?._useHtmlParser2) { - const parser = htmlparser2.createDocumentStream( - (err, document) => cb(err, load(document)), - options, - ); - - return new Writable({ - decodeStrings: false, - write(chunk, _encoding, callback) { - if (typeof chunk !== 'string') { - throw new TypeError('Expected a string'); - } - - parser.write(chunk); - callback(); - }, - final(callback) { - parser.end(); - callback(); - }, - }); - } - - options ??= {}; - options.treeAdapter ??= htmlparser2Adapter; - - if (options.scriptingEnabled !== false) { - options.scriptingEnabled = true; - } - - const stream = new Parse5Stream(options); - - finished(stream, (err) => cb(err, load(stream.document))); - - return stream; -} - -/** - * Creates a stream that parses a sequence of strings into a document. - * - * The stream is a `Writable` stream that accepts strings. When the stream is - * finished, the callback is called with the loaded document. - * - * @category Loading - * @example - * - * ```js - * import * as cheerio from 'cheerio'; - * import * as fs from 'fs'; - * - * const writeStream = cheerio.stringStream({}, (err, $) => { - * if (err) { - * // Handle error - * } - * - * console.log($('h1').text()); - * // Output: Hello, world! - * }); - * - * fs.createReadStream('my-document.html', { encoding: 'utf8' }).pipe( - * writeStream, - * ); - * ``` - * - * @param options - The options to pass to Cheerio. - * @param cb - The callback to call when the stream is finished. - * @returns The writable stream. - */ -export function stringStream( - options: CheerioOptions, - cb: (err: Error | null | undefined, $: CheerioAPI) => void, -): Writable { - return _stringStream(flattenOptions(options), cb); -} - -export interface DecodeStreamOptions extends CheerioOptions { - encoding?: SnifferOptions; -} - -/** - * Parses a stream of buffers into a document. - * - * The stream is a `Writable` stream that accepts buffers. When the stream is - * finished, the callback is called with the loaded document. - * - * @category Loading - * @param options - The options to pass to Cheerio. - * @param cb - The callback to call when the stream is finished. - * @returns The writable stream. - */ -export function decodeStream( - options: DecodeStreamOptions, - cb: (err: Error | null | undefined, $: CheerioAPI) => void, -): Writable { - const { encoding = {}, ...cheerioOptions } = options; - const opts = flattenOptions(cheerioOptions); - - // Set the default encoding to UTF-8 for XML mode - encoding.defaultEncoding ??= opts?.xmlMode ? 'utf8' : 'windows-1252'; - - const decodeStream = new DecodeStream(encoding); - const loadStream = _stringStream(opts, cb); - - decodeStream.pipe(loadStream); - - return decodeStream; -} - -type UndiciStreamOptions = Parameters<typeof undici.stream>[1]; - -export interface CheerioRequestOptions extends DecodeStreamOptions { - /** The options passed to `undici`'s `stream` method. */ - requestOptions?: UndiciStreamOptions; -} - -const defaultRequestOptions: UndiciStreamOptions = { - method: 'GET', - // Allow redirects by default - maxRedirections: 5, - // NOTE: `throwOnError` currently doesn't work https://github.com/nodejs/undici/issues/1753 - throwOnError: true, - // Set an Accept header - headers: { - accept: 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8', - }, -}; - -/** - * `fromURL` loads a document from a URL. - * - * By default, redirects are allowed and non-2xx responses are rejected. - * - * @category Loading - * @example - * - * ```js - * import * as cheerio from 'cheerio'; - * - * const $ = await cheerio.fromURL('https://example.com'); - * ``` - * - * @param url - The URL to load the document from. - * @param options - The options to pass to Cheerio. - * @returns The loaded document. - */ -export async function fromURL( - url: string | URL, - options: CheerioRequestOptions = {}, -): Promise<CheerioAPI> { - const { - requestOptions = defaultRequestOptions, - encoding = {}, - ...cheerioOptions - } = options; - let undiciStream: Promise<undici.Dispatcher.StreamData> | undefined; - - // Add headers if none were supplied. - requestOptions.headers ??= defaultRequestOptions.headers; - - const promise = new Promise<CheerioAPI>((resolve, reject) => { - undiciStream = undici.stream(url, requestOptions, (res) => { - const contentType = res.headers['content-type'] ?? 'text/html'; - const mimeType = new MIMEType( - Array.isArray(contentType) ? contentType[0] : contentType, - ); - - if (!mimeType.isHTML() && !mimeType.isXML()) { - throw new RangeError( - `The content-type "${contentType}" is neither HTML nor XML.`, - ); - } - - // Forward the charset from the header to the decodeStream. - encoding.transportLayerEncodingLabel = mimeType.parameters.get('charset'); - - /* - * If we allow redirects, we will have entries in the history. - * The last entry will be the final URL. - */ - const history = ( - res.context as - | { - history?: URL[]; - } - | undefined - )?.history; - - const opts = { - encoding, - // Set XML mode based on the MIME type. - xmlMode: mimeType.isXML(), - // Set the `baseURL` to the final URL. - baseURL: history ? history[history.length - 1] : url, - ...cheerioOptions, - }; - - return decodeStream(opts, (err, $) => (err ? reject(err) : resolve($))); - }); - }); - - // Let's make sure the request is completed before returning the promise. - await undiciStream; - - return promise; -} diff --git a/node_modules/cheerio/src/load-parse.ts b/node_modules/cheerio/src/load-parse.ts deleted file mode 100644 index 669169a..0000000 --- a/node_modules/cheerio/src/load-parse.ts +++ /dev/null @@ -1,39 +0,0 @@ -import { type CheerioAPI, getLoad } from './load.js'; -import { getParse } from './parse.js'; -import { renderWithParse5, parseWithParse5 } from './parsers/parse5-adapter.js'; -import type { CheerioOptions } from './options.js'; -import renderWithHtmlparser2 from 'dom-serializer'; -import { parseDocument as parseWithHtmlparser2 } from 'htmlparser2'; -import type { AnyNode } from 'domhandler'; - -const parse = getParse((content, options, isDocument, context) => - options._useHtmlParser2 - ? parseWithHtmlparser2(content, options) - : parseWithParse5(content, options, isDocument, context), -); - -// Duplicate docs due to https://github.com/TypeStrong/typedoc/issues/1616 -/** - * Create a querying function, bound to a document created from the provided - * markup. - * - * Note that similar to web browser contexts, this operation may introduce - * `<html>`, `<head>`, and `<body>` elements; set `isDocument` to `false` to - * switch to fragment mode and disable this. - * - * @category Loading - * @param content - Markup to be loaded. - * @param options - Options for the created instance. - * @param isDocument - Allows parser to be switched to fragment mode. - * @returns The loaded document. - * @see {@link https://cheerio.js.org#loading} for additional usage information. - */ -export const load: ( - content: string | AnyNode | AnyNode[] | Buffer, - options?: CheerioOptions | null, - isDocument?: boolean, -) => CheerioAPI = getLoad(parse, (dom, options) => - options._useHtmlParser2 - ? renderWithHtmlparser2(dom, options) - : renderWithParse5(dom), -); diff --git a/node_modules/cheerio/src/load.spec.ts b/node_modules/cheerio/src/load.spec.ts deleted file mode 100644 index 8aa2210..0000000 --- a/node_modules/cheerio/src/load.spec.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { describe, it, expect } from 'vitest'; -import { load } from './index.js'; - -describe('.load', () => { - it('(html) : should retain original root after creating a new node', () => { - const $ = load('<body><ul id="fruits"></ul></body>'); - expect($('body')).toHaveLength(1); - $('<script>'); - expect($('body')).toHaveLength(1); - }); - - it('(html) : should handle lowercase tag options', () => { - const $ = load('<BODY><ul id="fruits"></ul></BODY>', { - xml: { lowerCaseTags: true }, - }); - expect($.html()).toBe('<body><ul id="fruits"/></body>'); - }); - - it('(html) : should handle xml tag option', () => { - const $ = load('<body><script><foo></script></body>', { - xml: true, - }); - expect($('script')[0].children[0].type).toBe('tag'); - }); - - it('(buffer) : should accept a buffer', () => { - const html = '<html><head></head><body>foo</body></html>'; - const $html = load(Buffer.from(html)); - expect($html.html()).toBe(html); - }); -}); diff --git a/node_modules/cheerio/src/load.ts b/node_modules/cheerio/src/load.ts deleted file mode 100644 index 4216ce0..0000000 --- a/node_modules/cheerio/src/load.ts +++ /dev/null @@ -1,277 +0,0 @@ -import { - type CheerioOptions, - type InternalOptions, - flattenOptions, -} from './options.js'; -import * as staticMethods from './static.js'; -import { Cheerio } from './cheerio.js'; -import { isHtml, isCheerio } from './utils.js'; -import type { AnyNode, Document, Element, ParentNode } from 'domhandler'; -import type { SelectorType, BasicAcceptedElems } from './types.js'; - -type StaticType = typeof staticMethods; - -/** - * A querying function, bound to a document created from the provided markup. - * - * Also provides several helper methods for dealing with the document as a - * whole. - */ -export interface CheerioAPI extends StaticType { - /** - * This selector method is the starting point for traversing and manipulating - * the document. Like jQuery, it's the primary method for selecting elements - * in the document. - * - * `selector` searches within the `context` scope, which searches within the - * `root` scope. - * - * @example - * - * ```js - * $('ul .pear').attr('class'); - * //=> pear - * - * $('li[class=orange]').html(); - * //=> Orange - * - * $('.apple', '#fruits').text(); - * //=> Apple - * ``` - * - * Optionally, you can also load HTML by passing the string as the selector: - * - * ```js - * $('<ul id="fruits">...</ul>'); - * ``` - * - * Or the context: - * - * ```js - * $('ul', '<ul id="fruits">...</ul>'); - * ``` - * - * Or as the root: - * - * ```js - * $('li', 'ul', '<ul id="fruits">...</ul>'); - * ``` - * - * @param selector - Either a selector to look for within the document, or the - * contents of a new Cheerio instance. - * @param context - Either a selector to look for within the root, or the - * contents of the document to query. - * @param root - Optional HTML document string. - */ - <T extends AnyNode, S extends string>( - selector?: S | BasicAcceptedElems<T>, - context?: BasicAcceptedElems<AnyNode> | null, - root?: BasicAcceptedElems<Document>, - options?: CheerioOptions, - ): Cheerio<S extends SelectorType ? Element : T>; - - /** - * The root the document was originally loaded with. - * - * @private - */ - _root: Document; - - /** - * The options the document was originally loaded with. - * - * @private - */ - _options: InternalOptions; - - /** Mimic jQuery's prototype alias for plugin authors. */ - fn: typeof Cheerio.prototype; - - /** - * The `.load` static method defined on the "loaded" Cheerio factory function - * is deprecated. Users are encouraged to instead use the `load` function - * exported by the Cheerio module. - * - * @deprecated Use the `load` function exported by the Cheerio module. - * @category Deprecated - * @example - * - * ```js - * const $ = cheerio.load('<h1>Hello, <span>world</span>.</h1>'); - * ``` - */ - load: ReturnType<typeof getLoad>; -} - -export function getLoad( - parse: typeof Cheerio.prototype._parse, - render: ( - dom: AnyNode | ArrayLike<AnyNode>, - options: InternalOptions, - ) => string, -) { - /** - * Create a querying function, bound to a document created from the provided - * markup. - * - * Note that similar to web browser contexts, this operation may introduce - * `<html>`, `<head>`, and `<body>` elements; set `isDocument` to `false` to - * switch to fragment mode and disable this. - * - * @param content - Markup to be loaded. - * @param options - Options for the created instance. - * @param isDocument - Allows parser to be switched to fragment mode. - * @returns The loaded document. - * @see {@link https://cheerio.js.org#loading} for additional usage information. - */ - return function load( - content: string | AnyNode | AnyNode[] | Buffer, - options?: CheerioOptions | null, - isDocument = true, - ): CheerioAPI { - if ((content as string | null) == null) { - throw new Error('cheerio.load() expects a string'); - } - - const internalOpts = flattenOptions(options); - const initialRoot = parse(content, internalOpts, isDocument, null); - - /** - * Create an extended class here, so that extensions only live on one - * instance. - */ - class LoadedCheerio<T> extends Cheerio<T> { - _make<T>( - selector?: ArrayLike<T> | T | string, - context?: BasicAcceptedElems<AnyNode> | null, - ): Cheerio<T> { - const cheerio = initialize(selector, context); - cheerio.prevObject = this; - - return cheerio; - } - - _parse( - content: string | Document | AnyNode | AnyNode[] | Buffer, - options: InternalOptions, - isDocument: boolean, - context: ParentNode | null, - ) { - return parse(content, options, isDocument, context); - } - - _render(dom: AnyNode | ArrayLike<AnyNode>): string { - return render(dom, this.options); - } - } - - function initialize<T = AnyNode, S extends string = string>( - selector?: ArrayLike<T> | T | S, - context?: BasicAcceptedElems<AnyNode> | null, - root: BasicAcceptedElems<Document> = initialRoot, - opts?: CheerioOptions, - ): Cheerio<S extends SelectorType ? Element : T> { - type Result = S extends SelectorType ? Element : T; - - // $($) - if (selector && isCheerio<Result>(selector)) return selector; - - const options = flattenOptions(opts, internalOpts); - const r = - typeof root === 'string' - ? [parse(root, options, false, null)] - : 'length' in root - ? root - : [root]; - const rootInstance = isCheerio<Document>(r) - ? r - : new LoadedCheerio<Document>(r, null, options); - // Add a cyclic reference, so that calling methods on `_root` never fails. - rootInstance._root = rootInstance; - - // $(), $(null), $(undefined), $(false) - if (!selector) { - return new LoadedCheerio<Result>(undefined, rootInstance, options); - } - - const elements: AnyNode[] | undefined = - typeof selector === 'string' && isHtml(selector) - ? // $(<html>) - parse(selector, options, false, null).children - : isNode(selector) - ? // $(dom) - [selector] - : Array.isArray(selector) - ? // $([dom]) - selector - : undefined; - - const instance = new LoadedCheerio(elements, rootInstance, options); - - if (elements) { - return instance as any; - } - - if (typeof selector !== 'string') { - throw new TypeError('Unexpected type of selector'); - } - - // We know that our selector is a string now. - let search = selector; - - const searchContext: Cheerio<AnyNode> | undefined = context - ? // If we don't have a context, maybe we have a root, from loading - typeof context === 'string' - ? isHtml(context) - ? // $('li', '<ul>...</ul>') - new LoadedCheerio<Document>( - [parse(context, options, false, null)], - rootInstance, - options, - ) - : // $('li', 'ul') - ((search = `${context} ${search}` as S), rootInstance) - : isCheerio<AnyNode>(context) - ? // $('li', $) - context - : // $('li', node), $('li', [nodes]) - new LoadedCheerio<AnyNode>( - Array.isArray(context) ? context : [context], - rootInstance, - options, - ) - : rootInstance; - - // If we still don't have a context, return - if (!searchContext) return instance as any; - - /* - * #id, .class, tag - */ - return searchContext.find(search) as Cheerio<Result>; - } - - // Add in static methods & properties - Object.assign(initialize, staticMethods, { - load, - // `_root` and `_options` are used in static methods. - _root: initialRoot, - _options: internalOpts, - // Add `fn` for plugins - fn: LoadedCheerio.prototype, - // Add the prototype here to maintain `instanceof` behavior. - prototype: LoadedCheerio.prototype, - }); - - return initialize as CheerioAPI; - }; -} - -function isNode(obj: any): obj is AnyNode { - return ( - !!obj.name || - obj.type === 'root' || - obj.type === 'text' || - obj.type === 'comment' - ); -} diff --git a/node_modules/cheerio/src/options.ts b/node_modules/cheerio/src/options.ts deleted file mode 100644 index f12e668..0000000 --- a/node_modules/cheerio/src/options.ts +++ /dev/null @@ -1,135 +0,0 @@ -import type { DomHandlerOptions } from 'domhandler'; -import type { ParserOptions as HTMLParser2ParserOptions } from 'htmlparser2'; -import type { ParserOptions as Parse5ParserOptions } from 'parse5'; -import type { Htmlparser2TreeAdapterMap } from 'parse5-htmlparser2-tree-adapter'; -import type { Options as SelectOptions } from 'cheerio-select'; - -/** - * Options accepted by htmlparser2, the default parser for XML. - * - * @see https://github.com/fb55/htmlparser2/wiki/Parser-options - */ -export interface HTMLParser2Options - extends DomHandlerOptions, - HTMLParser2ParserOptions {} - -/** - * Options accepted by Cheerio. - * - * Please note that parser-specific options are _only recognized_ if the - * relevant parser is used. - */ -export interface CheerioOptions - extends Parse5ParserOptions<Htmlparser2TreeAdapterMap> { - /** - * Recommended way of configuring htmlparser2 when wanting to parse XML. - * - * This will switch Cheerio to use htmlparser2. - * - * @default false - */ - xml?: HTMLParser2Options | boolean; - - /** - * Enable xml mode, which will switch Cheerio to use htmlparser2. - * - * @deprecated Please use the `xml` option instead. - * @default false - */ - xmlMode?: boolean; - - /** The base URI for the document. Used to resolve the `href` and `src` props. */ - baseURI?: string | URL; - - /** - * Is the document in quirks mode? - * - * This will lead to `.className` and `#id` being case-insensitive. - * - * @default false - */ - quirksMode?: SelectOptions['quirksMode']; - /** - * Extension point for pseudo-classes. - * - * Maps from names to either strings of functions. - * - * - A string value is a selector that the element must match to be selected. - * - A function is called with the element as its first argument, and optional - * parameters second. If it returns true, the element is selected. - * - * @example - * - * ```js - * const $ = cheerio.load( - * '<div class="foo"></div><div data-bar="boo"></div>', - * { - * pseudos: { - * // `:foo` is an alias for `div.foo` - * foo: 'div.foo', - * // `:bar(val)` is equivalent to `[data-bar=val s]` - * bar: (el, val) => el.attribs['data-bar'] === val, - * }, - * }, - * ); - * - * $(':foo').length; // 1 - * $('div:bar(boo)').length; // 1 - * $('div:bar(baz)').length; // 0 - * ``` - */ - pseudos?: SelectOptions['pseudos']; -} - -/** Internal options for Cheerio. */ -export interface InternalOptions - extends HTMLParser2Options, - Omit<CheerioOptions, 'xml'> { - /** - * Whether to use htmlparser2. - * - * This is set to true if `xml` is set to true. - */ - _useHtmlParser2?: boolean; -} - -const defaultOpts: InternalOptions = { - _useHtmlParser2: false, -}; - -/** - * Flatten the options for Cheerio. - * - * This will set `_useHtmlParser2` to true if `xml` is set to true. - * - * @param options - The options to flatten. - * @param baseOptions - The base options to use. - * @returns The flattened options. - */ -export function flattenOptions( - options?: CheerioOptions | null, - baseOptions?: InternalOptions, -): InternalOptions { - if (!options) { - return baseOptions ?? defaultOpts; - } - - const opts: InternalOptions = { - _useHtmlParser2: !!options.xmlMode, - ...baseOptions, - ...options, - }; - - if (options.xml) { - opts._useHtmlParser2 = true; - opts.xmlMode = true; - - if (options.xml !== true) { - Object.assign(opts, options.xml); - } - } else if (options.xmlMode) { - opts._useHtmlParser2 = true; - } - - return opts; -} diff --git a/node_modules/cheerio/src/parse.spec.ts b/node_modules/cheerio/src/parse.spec.ts deleted file mode 100644 index f5dc3df..0000000 --- a/node_modules/cheerio/src/parse.spec.ts +++ /dev/null @@ -1,452 +0,0 @@ -import { describe, it, expect } from 'vitest'; -import type { Document, Element } from 'domhandler'; -import { getParse } from './parse.js'; - -import { parseDocument as parseWithHtmlparser2 } from 'htmlparser2'; -import { parseWithParse5 } from './parsers/parse5-adapter.js'; - -const defaultOpts = { _useHtmlParser2: false }; - -const parse = getParse((content, options, isDocument, context) => - options._useHtmlParser2 - ? parseWithHtmlparser2(content, options) - : parseWithParse5(content, options, isDocument, context), -); - -// Tags -const basic = '<html></html>'; -const siblings = '<h2></h2><p></p>'; - -// Single Tags -const single = '<br/>'; -const singleWrong = '<br>'; - -// Children -const children = '<html><br/></html>'; -const li = '<li class="durian">Durian</li>'; - -// Attributes -const attributes = '<img src="hello.png" alt="man waving">'; -const noValueAttribute = '<textarea disabled></textarea>'; - -// Comments -const comment = '<!-- sexy -->'; -const conditional = - '<!--[if IE 8]><html class="no-js ie8" lang="en"><![endif]-->'; - -// Text -const text = 'lorem ipsum'; - -// Script -const script = '<script type="text/javascript">alert("hi world!");</script>'; -const scriptEmpty = '<script></script>'; - -// Style -const style = '<style type="text/css"> h2 { color:blue; } </style>'; -const styleEmpty = '<style></style>'; - -// Directives -const directive = '<!doctype html>'; - -function rootTest(root: Document) { - expect(root).toHaveProperty('type', 'root'); - - expect(root.nextSibling).toBe(null); - expect(root.previousSibling).toBe(null); - expect(root.parentNode).toBe(null); - - const child = root.childNodes[0]; - expect(child.parentNode).toBe(root); -} - -describe('parse', () => { - describe('evaluate', () => { - it(`should parse basic empty tags: ${basic}`, () => { - const [tag] = parse(basic, defaultOpts, true, null).children as Element[]; - expect(tag.type).toBe('tag'); - expect(tag.tagName).toBe('html'); - expect(tag.childNodes).toHaveLength(2); - }); - - it(`should handle sibling tags: ${siblings}`, () => { - const dom = parse(siblings, defaultOpts, false, null) - .children as Element[]; - const [h2, p] = dom; - - expect(dom).toHaveLength(2); - expect(h2.tagName).toBe('h2'); - expect(p.tagName).toBe('p'); - }); - - it(`should handle single tags: ${single}`, () => { - const [tag] = parse(single, defaultOpts, false, null) - .children as Element[]; - expect(tag.type).toBe('tag'); - expect(tag.tagName).toBe('br'); - expect(tag.childNodes).toHaveLength(0); - }); - - it(`should handle malformatted single tags: ${singleWrong}`, () => { - const [tag] = parse(singleWrong, defaultOpts, false, null) - .children as Element[]; - expect(tag.type).toBe('tag'); - expect(tag.tagName).toBe('br'); - expect(tag.childNodes).toHaveLength(0); - }); - - it(`should handle tags with children: ${children}`, () => { - const [tag] = parse(children, defaultOpts, true, null) - .children as Element[]; - expect(tag.type).toBe('tag'); - expect(tag.tagName).toBe('html'); - expect(tag.childNodes).toBeTruthy(); - expect(tag.childNodes[1]).toHaveProperty('tagName', 'body'); - expect((tag.childNodes[1] as Element).childNodes).toHaveLength(1); - }); - - it(`should handle tags with children: ${li}`, () => { - const [tag] = parse(li, defaultOpts, false, null).children as Element[]; - expect(tag.childNodes).toHaveLength(1); - expect(tag.childNodes[0]).toHaveProperty('data', 'Durian'); - }); - - it(`should handle tags with attributes: ${attributes}`, () => { - const attrs = parse(attributes, defaultOpts, false, null) - .children[0] as Element; - expect(attrs.attribs).toBeTruthy(); - expect(attrs.attribs).toHaveProperty('src', 'hello.png'); - expect(attrs.attribs).toHaveProperty('alt', 'man waving'); - }); - - it(`should handle value-less attributes: ${noValueAttribute}`, () => { - const attrs = parse(noValueAttribute, defaultOpts, false, null) - .children[0] as Element; - expect(attrs.attribs).toBeTruthy(); - expect(attrs.attribs).toHaveProperty('disabled', ''); - }); - - it(`should handle comments: ${comment}`, () => { - const elem = parse(comment, defaultOpts, false, null).children[0]; - expect(elem.type).toBe('comment'); - expect(elem).toHaveProperty('data', ' sexy '); - }); - - it(`should handle conditional comments: ${conditional}`, () => { - const elem = parse(conditional, defaultOpts, false, null).children[0]; - expect(elem.type).toBe('comment'); - expect(elem).toHaveProperty( - 'data', - conditional.replace('<!--', '').replace('-->', ''), - ); - }); - - it(`should handle text: ${text}`, () => { - const text_ = parse(text, defaultOpts, false, null).children[0]; - expect(text_.type).toBe('text'); - expect(text_).toHaveProperty('data', 'lorem ipsum'); - }); - - it(`should handle script tags: ${script}`, () => { - const script_ = parse(script, defaultOpts, false, null) - .children[0] as Element; - expect(script_.type).toBe('script'); - expect(script_.tagName).toBe('script'); - expect(script_.attribs).toHaveProperty('type', 'text/javascript'); - expect(script_.childNodes).toHaveLength(1); - expect(script_.childNodes[0].type).toBe('text'); - expect(script_.childNodes[0]).toHaveProperty( - 'data', - 'alert("hi world!");', - ); - }); - - it(`should handle style tags: ${style}`, () => { - const style_ = parse(style, defaultOpts, false, null) - .children[0] as Element; - expect(style_.type).toBe('style'); - expect(style_.tagName).toBe('style'); - expect(style_.attribs).toHaveProperty('type', 'text/css'); - expect(style_.childNodes).toHaveLength(1); - expect(style_.childNodes[0].type).toBe('text'); - expect(style_.childNodes[0]).toHaveProperty( - 'data', - ' h2 { color:blue; } ', - ); - }); - - it(`should handle directives: ${directive}`, () => { - const elem = parse(directive, defaultOpts, true, null).children[0]; - expect(elem.type).toBe('directive'); - expect(elem).toHaveProperty('data', '!DOCTYPE html'); - expect(elem).toHaveProperty('name', '!doctype'); - }); - }); - - describe('.parse', () => { - // Root test utility - - it(`should add root to: ${basic}`, () => { - const root = parse(basic, defaultOpts, true, null); - rootTest(root); - expect(root.childNodes).toHaveLength(1); - expect(root.childNodes[0]).toHaveProperty('tagName', 'html'); - }); - - it(`should add root to: ${siblings}`, () => { - const root = parse(siblings, defaultOpts, false, null); - rootTest(root); - expect(root.childNodes).toHaveLength(2); - expect(root.childNodes[0]).toHaveProperty('tagName', 'h2'); - expect(root.childNodes[1]).toHaveProperty('tagName', 'p'); - expect(root.childNodes[1].parent).toBe(root); - }); - - it(`should add root to: ${comment}`, () => { - const root = parse(comment, defaultOpts, false, null); - rootTest(root); - expect(root.childNodes).toHaveLength(1); - expect(root.childNodes[0].type).toBe('comment'); - }); - - it(`should add root to: ${text}`, () => { - const root = parse(text, defaultOpts, false, null); - rootTest(root); - expect(root.childNodes).toHaveLength(1); - expect(root.childNodes[0].type).toBe('text'); - }); - - it(`should add root to: ${scriptEmpty}`, () => { - const root = parse(scriptEmpty, defaultOpts, false, null); - rootTest(root); - expect(root.childNodes).toHaveLength(1); - expect(root.childNodes[0].type).toBe('script'); - }); - - it(`should add root to: ${styleEmpty}`, () => { - const root = parse(styleEmpty, defaultOpts, false, null); - rootTest(root); - expect(root.childNodes).toHaveLength(1); - expect(root.childNodes[0].type).toBe('style'); - }); - - it(`should add root to: ${directive}`, () => { - const root = parse(directive, defaultOpts, true, null); - rootTest(root); - expect(root.childNodes).toHaveLength(2); - expect(root.childNodes[0].type).toBe('directive'); - }); - - it('should simply return root', () => { - const oldroot = parse(basic, defaultOpts, true, null); - const root = parse(oldroot, defaultOpts, true, null); - expect(root).toBe(oldroot); - rootTest(root); - expect(root.childNodes).toHaveLength(1); - expect(root.childNodes[0]).toHaveProperty('tagName', 'html'); - }); - - it('should expose the DOM level 1 API', () => { - const root = parse( - '<div><a></a><span></span><p></p></div>', - defaultOpts, - false, - null, - ).childNodes[0] as Element; - const childNodes = root.childNodes as Element[]; - - expect(childNodes).toHaveLength(3); - - expect(root.tagName).toBe('div'); - expect(root.firstChild).toBe(childNodes[0]); - expect(root.lastChild).toBe(childNodes[2]); - - expect(childNodes[0].tagName).toBe('a'); - expect(childNodes[0].previousSibling).toBe(null); - expect(childNodes[0].nextSibling).toBe(childNodes[1]); - expect(childNodes[0].parentNode).toBe(root); - expect((childNodes[0] as Element).childNodes).toHaveLength(0); - expect(childNodes[0].firstChild).toBe(null); - expect(childNodes[0].lastChild).toBe(null); - - expect(childNodes[1].tagName).toBe('span'); - expect(childNodes[1].previousSibling).toBe(childNodes[0]); - expect(childNodes[1].nextSibling).toBe(childNodes[2]); - expect(childNodes[1].parentNode).toBe(root); - expect(childNodes[1].childNodes).toHaveLength(0); - expect(childNodes[1].firstChild).toBe(null); - expect(childNodes[1].lastChild).toBe(null); - - expect(childNodes[2].tagName).toBe('p'); - expect(childNodes[2].previousSibling).toBe(childNodes[1]); - expect(childNodes[2].nextSibling).toBe(null); - expect(childNodes[2].parentNode).toBe(root); - expect(childNodes[2].childNodes).toHaveLength(0); - expect(childNodes[2].firstChild).toBe(null); - expect(childNodes[2].lastChild).toBe(null); - }); - - it('Should parse less than or equal sign sign', () => { - const root = parse('<i>A</i><=<i>B</i>', defaultOpts, false, null); - const { childNodes } = root; - - expect(childNodes[0]).toHaveProperty('tagName', 'i'); - expect((childNodes[0] as Element).childNodes[0]).toHaveProperty( - 'data', - 'A', - ); - expect(childNodes[1]).toHaveProperty('data', '<='); - expect(childNodes[2]).toHaveProperty('tagName', 'i'); - expect((childNodes[2] as Element).childNodes[0]).toHaveProperty( - 'data', - 'B', - ); - }); - - it('Should ignore unclosed CDATA', () => { - const root = parse( - '<a></a><script>foo //<![CDATA[ bar</script><b></b>', - defaultOpts, - false, - null, - ); - const childNodes = root.childNodes as Element[]; - - expect(childNodes[0].tagName).toBe('a'); - expect(childNodes[1].tagName).toBe('script'); - expect(childNodes[1].childNodes[0]).toHaveProperty( - 'data', - 'foo //<![CDATA[ bar', - ); - expect(childNodes[2].tagName).toBe('b'); - }); - - it('Should add <head> to documents', () => { - const root = parse('<html></html>', defaultOpts, true, null); - const childNodes = root.childNodes as Element[]; - - expect(childNodes[0].tagName).toBe('html'); - expect(childNodes[0].childNodes[0]).toHaveProperty('tagName', 'head'); - }); - - it('Should implicitly create <tr> around <td>', () => { - const root = parse( - '<table><td>bar</td></tr></table>', - defaultOpts, - false, - null, - ); - const childNodes = root.childNodes as Element[]; - - expect(childNodes[0].tagName).toBe('table'); - expect(childNodes[0].childNodes.length).toBe(1); - expect(childNodes[0].childNodes[0]).toHaveProperty('tagName', 'tbody'); - expect((childNodes[0] as any).childNodes[0].childNodes[0]).toHaveProperty( - 'tagName', - 'tr', - ); - expect( - (childNodes[0] as any).childNodes[0].childNodes[0].childNodes[0] - .tagName, - ).toBe('td'); - expect( - (childNodes[0] as any).childNodes[0].childNodes[0].childNodes[0] - .childNodes[0].data, - ).toBe('bar'); - }); - - it('Should parse custom tag <line>', () => { - const root = parse('<line>test</line>', defaultOpts, false, null); - const childNodes = root.childNodes as Element[]; - - expect(childNodes.length).toBe(1); - expect(childNodes[0].tagName).toBe('line'); - expect(childNodes[0].childNodes[0]).toHaveProperty('data', 'test'); - }); - - it('Should properly parse misnested table tags', () => { - const root = parse( - '<tr><td>i1</td></tr><tr><td>i2</td></td></tr><tr><td>i3</td></td></tr>', - defaultOpts, - false, - null, - ); - const childNodes = root.childNodes as Element[]; - - expect(childNodes.length).toBe(3); - - for (let i = 0; i < childNodes.length; i++) { - const child = childNodes[i]; - expect(child.tagName).toBe('tr'); - expect(child.childNodes[0]).toHaveProperty('tagName', 'td'); - expect((child.childNodes[0] as Element).childNodes[0]).toHaveProperty( - 'data', - `i${i + 1}`, - ); - } - }); - - it('Should correctly parse data url attributes', () => { - const html = - '<div style=\'font-family:"butcherman-caps"; src:url(data:font/opentype;base64,AAEA...);\'></div>'; - const expectedAttr = - 'font-family:"butcherman-caps"; src:url(data:font/opentype;base64,AAEA...);'; - const root = parse(html, defaultOpts, false, null); - const childNodes = root.childNodes as Element[]; - - expect(childNodes[0].attribs).toHaveProperty('style', expectedAttr); - }); - - it('Should treat <xmp> tag content as text', () => { - const root = parse('<xmp><h2></xmp>', defaultOpts, false, null); - const childNodes = root.childNodes as Element[]; - - expect(childNodes[0].childNodes[0]).toHaveProperty('data', '<h2>'); - }); - - it('Should correctly parse malformed numbered entities', () => { - const root = parse('<p>z&#</p>', defaultOpts, false, null); - const childNodes = root.childNodes as Element[]; - - expect(childNodes[0].childNodes[0]).toHaveProperty('data', 'z&#'); - }); - - it('Should correctly parse mismatched headings', () => { - const root = parse('<h2>Test</h3><div></div>', defaultOpts, false, null); - const { childNodes } = root; - - expect(childNodes.length).toBe(2); - expect(childNodes[0]).toHaveProperty('tagName', 'h2'); - expect(childNodes[1]).toHaveProperty('tagName', 'div'); - }); - - it('Should correctly parse tricky <pre> content', () => { - const root = parse( - '<pre>\nA <- factor(A, levels = c("c","a","b"))\n</pre>', - defaultOpts, - false, - null, - ); - const childNodes = root.childNodes as Element[]; - - expect(childNodes.length).toBe(1); - expect(childNodes[0].tagName).toBe('pre'); - expect(childNodes[0].childNodes[0]).toHaveProperty( - 'data', - 'A <- factor(A, levels = c("c","a","b"))\n', - ); - }); - - it('should pass the options for including the location info to parse5', () => { - const root = parse( - '<p>Hello</p>', - { ...defaultOpts, sourceCodeLocationInfo: true }, - false, - null, - ); - const location = root.children[0].sourceCodeLocation; - - expect(typeof location).toBe('object'); - expect(location?.endOffset).toBe(12); - }); - }); -}); diff --git a/node_modules/cheerio/src/parse.ts b/node_modules/cheerio/src/parse.ts deleted file mode 100644 index 5706f14..0000000 --- a/node_modules/cheerio/src/parse.ts +++ /dev/null @@ -1,105 +0,0 @@ -import { removeElement } from 'domutils'; -import { - type AnyNode, - Document, - type ParentNode, - isDocument as checkIsDocument, -} from 'domhandler'; -import type { InternalOptions } from './options.js'; - -/** - * Get the parse function with options. - * - * @param parser - The parser function. - * @returns The parse function with options. - */ -export function getParse( - parser: ( - content: string, - options: InternalOptions, - isDocument: boolean, - context: ParentNode | null, - ) => Document, -) { - /** - * Parse a HTML string or a node. - * - * @param content - The HTML string or node. - * @param options - The parser options. - * @param isDocument - If `content` is a document. - * @param context - The context node in the DOM tree. - * @returns The parsed document node. - */ - return function parse( - content: string | Document | AnyNode | AnyNode[] | Buffer, - options: InternalOptions, - isDocument: boolean, - context: ParentNode | null, - ): Document { - if (typeof Buffer !== 'undefined' && Buffer.isBuffer(content)) { - content = content.toString(); - } - - if (typeof content === 'string') { - return parser(content, options, isDocument, context); - } - - const doc = content as AnyNode | AnyNode[] | Document; - - if (!Array.isArray(doc) && checkIsDocument(doc)) { - // If `doc` is already a root, just return it - return doc; - } - - // Add conent to new root element - const root = new Document([]); - - // Update the DOM using the root - update(doc, root); - - return root; - }; -} - -/** - * Update the dom structure, for one changed layer. - * - * @param newChilds - The new children. - * @param parent - The new parent. - * @returns The parent node. - */ -export function update( - newChilds: AnyNode[] | AnyNode, - parent: ParentNode | null, -): ParentNode | null { - // Normalize - const arr = Array.isArray(newChilds) ? newChilds : [newChilds]; - - // Update parent - if (parent) { - parent.children = arr; - } else { - parent = null; - } - - // Update neighbors - for (let i = 0; i < arr.length; i++) { - const node = arr[i]; - - // Cleanly remove existing nodes from their previous structures. - if (node.parent && node.parent.children !== arr) { - removeElement(node); - } - - if (parent) { - node.prev = arr[i - 1] || null; - node.next = arr[i + 1] || null; - } else { - node.prev = node.next = null; - } - - node.parent = parent; - } - - return parent; -} diff --git a/node_modules/cheerio/src/parsers/parse5-adapter.ts b/node_modules/cheerio/src/parsers/parse5-adapter.ts deleted file mode 100644 index ca0d861..0000000 --- a/node_modules/cheerio/src/parsers/parse5-adapter.ts +++ /dev/null @@ -1,66 +0,0 @@ -import { - type AnyNode, - type Document, - type ParentNode, - isDocument, -} from 'domhandler'; -import { parse as parseDocument, parseFragment, serializeOuter } from 'parse5'; -import { adapter as htmlparser2Adapter } from 'parse5-htmlparser2-tree-adapter'; -import type { InternalOptions } from '../options.js'; - -/** - * Parse the content with `parse5` in the context of the given `ParentNode`. - * - * @param content - The content to parse. - * @param options - A set of options to use to parse. - * @param isDocument - Whether to parse the content as a full HTML document. - * @param context - The context in which to parse the content. - * @returns The parsed content. - */ -export function parseWithParse5( - content: string, - options: InternalOptions, - isDocument: boolean, - context: ParentNode | null, -): Document { - options.treeAdapter ??= htmlparser2Adapter; - - if (options.scriptingEnabled !== false) { - options.scriptingEnabled = true; - } - - return isDocument - ? parseDocument(content, options) - : parseFragment(context, content, options); -} - -const renderOpts = { treeAdapter: htmlparser2Adapter }; - -/** - * Renders the given DOM tree with `parse5` and returns the result as a string. - * - * @param dom - The DOM tree to render. - * @returns The rendered document. - */ -export function renderWithParse5(dom: AnyNode | ArrayLike<AnyNode>): string { - /* - * `dom-serializer` passes over the special "root" node and renders the - * node's children in its place. To mimic this behavior with `parse5`, an - * equivalent operation must be applied to the input array. - */ - const nodes = 'length' in dom ? dom : [dom]; - for (let index = 0; index < nodes.length; index += 1) { - const node = nodes[index]; - if (isDocument(node)) { - Array.prototype.splice.call(nodes, index, 1, ...node.children); - } - } - - let result = ''; - for (let index = 0; index < nodes.length; index += 1) { - const node = nodes[index]; - result += serializeOuter(node, renderOpts); - } - - return result; -} diff --git a/node_modules/cheerio/src/slim.ts b/node_modules/cheerio/src/slim.ts deleted file mode 100644 index 440d0a6..0000000 --- a/node_modules/cheerio/src/slim.ts +++ /dev/null @@ -1,33 +0,0 @@ -/** - * @file Alternative entry point for Cheerio that always uses htmlparser2. This - * way, parse5 won't be loaded, saving some memory. - */ -import { type CheerioAPI, getLoad } from './load.js'; -import { type CheerioOptions } from './options.js'; -import { getParse } from './parse.js'; -import type { AnyNode } from 'domhandler'; -import render from 'dom-serializer'; -import { parseDocument } from 'htmlparser2'; - -export { contains, merge } from './static.js'; -export type * from './types.js'; -export type { Cheerio } from './cheerio.js'; -export type { CheerioOptions, HTMLParser2Options } from './options.js'; -export type { CheerioAPI } from './load.js'; - -/** - * Create a querying function, bound to a document created from the provided - * markup. - * - * @param content - Markup to be loaded. - * @param options - Options for the created instance. - * @param isDocument - Always `false` here, as we are always using - * `htmlparser2`. - * @returns The loaded document. - * @see {@link https://cheerio.js.org#loading} for additional usage information. - */ -export const load: ( - content: string | AnyNode | AnyNode[] | Buffer, - options?: CheerioOptions | null, - isDocument?: boolean, -) => CheerioAPI = getLoad(getParse(parseDocument), render); diff --git a/node_modules/cheerio/src/static.spec.ts b/node_modules/cheerio/src/static.spec.ts deleted file mode 100644 index 3f27234..0000000 --- a/node_modules/cheerio/src/static.spec.ts +++ /dev/null @@ -1,325 +0,0 @@ -import { describe, it, expect, beforeEach } from 'vitest'; -import { cheerio, food, eleven } from './__fixtures__/fixtures.js'; -import { type CheerioAPI } from './index.js'; - -describe('cheerio', () => { - describe('.html', () => { - it('() : should return innerHTML; $.html(obj) should return outerHTML', () => { - const $div = cheerio( - 'div', - '<div><span>foo</span><span>bar</span></div>', - ); - const span = $div.children()[1]; - expect(cheerio(span).html()).toBe('bar'); - expect(cheerio.html(span)).toBe('<span>bar</span>'); - }); - - it('(<obj>) : should accept an object, an array, or a cheerio object', () => { - const $span = cheerio('<span>foo</span>'); - expect(cheerio.html($span[0])).toBe('<span>foo</span>'); - expect(cheerio.html($span)).toBe('<span>foo</span>'); - }); - - it('(<value>) : should be able to set to an empty string', () => { - const $elem = cheerio('<span>foo</span>').html(''); - expect(cheerio.html($elem)).toBe('<span></span>'); - }); - - it('(<root>) : does not render the root element', () => { - const $ = cheerio.load(''); - expect(cheerio.html($.root())).toBe( - '<html><head></head><body></body></html>', - ); - }); - - it('(<elem>, <root>, <elem>) : does not render the root element', () => { - const $ = cheerio.load('<div>a div</div><span>a span</span>'); - const $collection = $('div').add($.root()).add('span'); - const expected = - '<html><head></head><body><div>a div</div><span>a span</span></body></html><div>a div</div><span>a span</span>'; - expect(cheerio.html($collection)).toBe(expected); - }); - - it('() : does not crash with `null` as `this` value', () => { - const { html } = cheerio; - expect(html.call(null as never)).toBe(''); - expect(html.call(null as never, '#nothing')).toBe(''); - }); - }); - - describe('.text', () => { - it('(cheerio object) : should return the text contents of the specified elements', () => { - const $ = cheerio.load('<a>This is <em>content</em>.</a>'); - expect(cheerio.text($('a'))).toBe('This is content.'); - }); - - it('(cheerio object) : should omit comment nodes', () => { - const $ = cheerio.load( - '<a>This is <!-- a comment --> not a comment.</a>', - ); - expect(cheerio.text($('a'))).toBe('This is not a comment.'); - }); - - it('(cheerio object) : should include text contents of children recursively', () => { - const $ = cheerio.load( - '<a>This is <div>a child with <span>another child and <!-- a comment --> not a comment</span> followed by <em>one last child</em> and some final</div> text.</a>', - ); - expect(cheerio.text($('a'))).toBe( - 'This is a child with another child and not a comment followed by one last child and some final text.', - ); - }); - - it('() : should return the rendered text content of the root', () => { - const $ = cheerio.load( - '<a>This is <div>a child with <span>another child and <!-- a comment --> not a comment</span> followed by <em>one last child</em> and some final</div> text.</a>', - ); - expect(cheerio.text($.root())).toBe( - 'This is a child with another child and not a comment followed by one last child and some final text.', - ); - }); - - it('(cheerio object) : should not omit script tags', () => { - const $ = cheerio.load('<script>console.log("test")</script>'); - expect(cheerio.text($.root())).toBe('console.log("test")'); - }); - - it('(cheerio object) : should omit style tags', () => { - const $ = cheerio.load( - '<style type="text/css">.cf-hidden { display: none; }</style>', - ); - expect($.text()).toBe('.cf-hidden { display: none; }'); - }); - - it('() : does not crash with `null` as `this` value', () => { - const { text } = cheerio; - expect(text.call(null as never)).toBe(''); - }); - }); - - describe('.parseHTML', () => { - const $ = cheerio.load(''); - - it('() : returns null', () => { - expect($.parseHTML()).toBe(null); - }); - - it('(null) : returns null', () => { - expect($.parseHTML(null)).toBe(null); - }); - - it('("") : returns null', () => { - expect($.parseHTML('')).toBe(null); - }); - - it('(largeHtmlString) : parses large HTML strings', () => { - const html = '<div></div>'.repeat(10); - const nodes = $.parseHTML(html); - - expect(nodes.length).toBe(10); - expect(nodes).toBeInstanceOf(Array); - }); - - it('("<script>") : ignores scripts by default', () => { - const html = '<script>undefined()</script>'; - expect($.parseHTML(html)).toHaveLength(0); - }); - - it('("<script>", true) : preserves scripts when requested', () => { - const html = '<script>undefined()</script>'; - expect($.parseHTML(html, true)[0]).toHaveProperty('tagName', 'script'); - }); - - it('("scriptAndNonScript) : preserves non-script nodes', () => { - const html = '<script>undefined()</script><div></div>'; - expect($.parseHTML(html)[0]).toHaveProperty('tagName', 'div'); - }); - - it('(scriptAndNonScript, true) : Preserves script position', () => { - const html = '<script>undefined()</script><div></div>'; - expect($.parseHTML(html, true)[0]).toHaveProperty('tagName', 'script'); - }); - - it('(text) : returns a text node', () => { - expect($.parseHTML('text')[0].type).toBe('text'); - }); - - it('(<tab>>text) : preserves leading whitespace', () => { - expect($.parseHTML('\t<div></div>')[0]).toHaveProperty('data', '\t'); - }); - - it('( text) : Leading spaces are treated as text nodes', () => { - expect($.parseHTML(' <div/> ')[0].type).toBe('text'); - }); - - it('(html) : should preserve content', () => { - const html = '<div>test div</div>'; - expect(cheerio($.parseHTML(html)[0]).html()).toBe('test div'); - }); - - it('(malformedHtml) : should not break', () => { - expect($.parseHTML('<span><span>')).toHaveLength(1); - }); - - it('(garbageInput) : should not cause an error', () => { - expect( - $.parseHTML('<#if><tr><p>This is a test.</p></tr><#/if>'), - ).toBeTruthy(); - }); - - it('(text) : should return an array that is not effected by DOM manipulation methods', () => { - const $div = cheerio.load('<div>'); - const elems = $div.parseHTML('<b></b><i></i>'); - - $div('div').append(elems); - - expect(elems).toHaveLength(2); - }); - - it('(html, context) : should ignore context argument', () => { - const $div = cheerio.load('<div>'); - const elems = $div.parseHTML('<script>foo</script><a>', { foo: 123 }); - - $div('div').append(elems); - - expect(elems).toHaveLength(1); - }); - - it('(html, context, keepScripts) : should ignore context argument', () => { - const $div = cheerio.load('<div>'); - const elems = $div.parseHTML( - '<script>foo</script><a>', - { foo: 123 }, - true, - ); - - $div('div').append(elems); - - expect(elems).toHaveLength(2); - }); - }); - - describe('.merge', () => { - const $ = cheerio.load(''); - - it('should be a function', () => { - expect(typeof $.merge).toBe('function'); - }); - - it('(arraylike, arraylike) : should modify the first array, but not the second', () => { - const arr1 = [1, 2, 3]; - const arr2 = [4, 5, 6]; - - const ret = $.merge(arr1, arr2); - expect(typeof ret).toBe('object'); - expect(Array.isArray(ret)).toBe(true); - expect(ret).toBe(arr1); - expect(arr1).toHaveLength(6); - expect(arr2).toHaveLength(3); - }); - - it('(arraylike, arraylike) : should handle objects that arent arrays, but are arraylike', () => { - const arr1: ArrayLike<string> = { - length: 3, - 0: 'a', - 1: 'b', - 2: 'c', - }; - const arr2 = { - length: 3, - 0: 'd', - 1: 'e', - 2: 'f', - }; - - $.merge(arr1, arr2); - expect(arr1).toHaveLength(6); - expect(arr1[3]).toBe('d'); - expect(arr1[4]).toBe('e'); - expect(arr1[5]).toBe('f'); - expect(arr2).toHaveLength(3); - }); - - it('(?, ?) : should gracefully reject invalid inputs', () => { - expect($.merge([4], 3 as never)).toBeFalsy(); - expect($.merge({} as never, {} as never)).toBeFalsy(); - expect($.merge([], {} as never)).toBeFalsy(); - expect($.merge({} as never, [])).toBeFalsy(); - const fakeArray1 = { length: 3, 0: 'a', 1: 'b', 3: 'd' }; - expect($.merge(fakeArray1, [])).toBeFalsy(); - expect($.merge([], fakeArray1)).toBeFalsy(); - expect($.merge({ length: '7' } as never, [])).toBeFalsy(); - expect($.merge({ length: -1 }, [])).toBeFalsy(); - }); - - it('(?, ?) : should no-op on invalid inputs', () => { - const fakeArray1 = { length: 3, 0: 'a', 1: 'b', 3: 'd' }; - $.merge(fakeArray1, []); - expect(fakeArray1).toHaveLength(3); - expect(fakeArray1[0]).toBe('a'); - expect(fakeArray1[1]).toBe('b'); - expect(fakeArray1[3]).toBe('d'); - $.merge([], fakeArray1); - expect(fakeArray1).toHaveLength(3); - expect(fakeArray1[0]).toBe('a'); - expect(fakeArray1[1]).toBe('b'); - expect(fakeArray1[3]).toBe('d'); - }); - }); - - describe('.contains', () => { - let $: CheerioAPI; - - beforeEach(() => { - $ = cheerio.load(food); - }); - - it('(container, contained) : should correctly detect the provided element', () => { - const $food = $('#food'); - const $fruits = $('#fruits'); - const $apple = $('.apple'); - - expect($.contains($food[0], $fruits[0])).toBe(true); - expect($.contains($food[0], $apple[0])).toBe(true); - }); - - it('(container, other) : should not detect elements that are not contained', () => { - const $fruits = $('#fruits'); - const $vegetables = $('#vegetables'); - const $apple = $('.apple'); - - expect($.contains($vegetables[0], $apple[0])).toBe(false); - expect($.contains($fruits[0], $vegetables[0])).toBe(false); - expect($.contains($vegetables[0], $fruits[0])).toBe(false); - expect($.contains($fruits[0], $fruits[0])).toBe(false); - expect($.contains($vegetables[0], $vegetables[0])).toBe(false); - }); - }); - - describe('.root', () => { - it('() : should return a cheerio-wrapped root object', () => { - const $ = cheerio.load('<html><head></head><body>foo</body></html>'); - $.root().append('<div id="test"></div>'); - expect($.html()).toBe( - '<html><head></head><body>foo</body></html><div id="test"></div>', - ); - }); - }); - - describe('.extract', () => { - it('() : should extract values for selectors', () => { - const $ = cheerio.load(eleven); - - expect( - $.extract({ - red: [{ selector: '.red', value: 'outerHTML' }], - }), - ).toStrictEqual({ - red: [ - '<li class="red">Four</li>', - '<li class="red">Five</li>', - '<li class="red sel">Nine</li>', - ], - }); - }); - }); -}); diff --git a/node_modules/cheerio/src/static.ts b/node_modules/cheerio/src/static.ts deleted file mode 100644 index b26f213..0000000 --- a/node_modules/cheerio/src/static.ts +++ /dev/null @@ -1,312 +0,0 @@ -import type { BasicAcceptedElems } from './types.js'; -import type { CheerioAPI } from './load.js'; -import type { Cheerio } from './cheerio.js'; -import type { AnyNode, Document } from 'domhandler'; -import { textContent } from 'domutils'; -import { - type InternalOptions, - type CheerioOptions, - flattenOptions as flattenOptions, -} from './options.js'; -import type { ExtractedMap, ExtractMap } from './api/extract.js'; - -/** - * Helper function to render a DOM. - * - * @param that - Cheerio instance to render. - * @param dom - The DOM to render. Defaults to `that`'s root. - * @param options - Options for rendering. - * @returns The rendered document. - */ -function render( - that: CheerioAPI, - dom: BasicAcceptedElems<AnyNode> | undefined, - options: InternalOptions, -): string { - if (!that) return ''; - - return that(dom ?? that._root.children, null, undefined, options).toString(); -} - -/** - * Checks if a passed object is an options object. - * - * @param dom - Object to check if it is an options object. - * @param options - Options object. - * @returns Whether the object is an options object. - */ -function isOptions( - dom?: BasicAcceptedElems<AnyNode> | CheerioOptions | null, - options?: CheerioOptions, -): dom is CheerioOptions { - return ( - !options && - typeof dom === 'object' && - dom != null && - !('length' in dom) && - !('type' in dom) - ); -} - -/** - * Renders the document. - * - * @category Static - * @param options - Options for the renderer. - * @returns The rendered document. - */ -export function html(this: CheerioAPI, options?: CheerioOptions): string; -/** - * Renders the document. - * - * @category Static - * @param dom - Element to render. - * @param options - Options for the renderer. - * @returns The rendered document. - */ -export function html( - this: CheerioAPI, - dom?: BasicAcceptedElems<AnyNode>, - options?: CheerioOptions, -): string; -export function html( - this: CheerioAPI, - dom?: BasicAcceptedElems<AnyNode> | CheerioOptions, - options?: CheerioOptions, -): string { - /* - * Be flexible about parameters, sometimes we call html(), - * with options as only parameter - * check dom argument for dom element specific properties - * assume there is no 'length' or 'type' properties in the options object - */ - const toRender = isOptions(dom) ? ((options = dom), undefined) : dom; - - /* - * Sometimes `$.html()` is used without preloading html, - * so fallback non-existing options to the default ones. - */ - const opts = { - ...this?._options, - ...flattenOptions(options), - }; - - return render(this, toRender, opts); -} - -/** - * Render the document as XML. - * - * @category Static - * @param dom - Element to render. - * @returns THe rendered document. - */ -export function xml( - this: CheerioAPI, - dom?: BasicAcceptedElems<AnyNode>, -): string { - const options = { ...this._options, xmlMode: true }; - - return render(this, dom, options); -} - -/** - * Render the document as text. - * - * This returns the `textContent` of the passed elements. The result will - * include the contents of `<script>` and `<style>` elements. To avoid this, use - * `.prop('innerText')` instead. - * - * @category Static - * @param elements - Elements to render. - * @returns The rendered document. - */ -export function text( - this: CheerioAPI | void, - elements?: ArrayLike<AnyNode>, -): string { - const elems = elements ?? (this ? this.root() : []); - - let ret = ''; - - for (let i = 0; i < elems.length; i++) { - ret += textContent(elems[i]); - } - - return ret; -} - -/** - * Parses a string into an array of DOM nodes. The `context` argument has no - * meaning for Cheerio, but it is maintained for API compatibility with jQuery. - * - * @category Static - * @param data - Markup that will be parsed. - * @param context - Will be ignored. If it is a boolean it will be used as the - * value of `keepScripts`. - * @param keepScripts - If false all scripts will be removed. - * @returns The parsed DOM. - * @alias Cheerio.parseHTML - * @see {@link https://api.jquery.com/jQuery.parseHTML/} - */ -export function parseHTML( - this: CheerioAPI, - data: string, - context?: unknown | boolean, - keepScripts?: boolean, -): AnyNode[]; -export function parseHTML(this: CheerioAPI, data?: '' | null): null; -export function parseHTML( - this: CheerioAPI, - data?: string | null, - context?: unknown | boolean, - keepScripts = typeof context === 'boolean' ? context : false, -): AnyNode[] | null { - if (!data || typeof data !== 'string') { - return null; - } - - if (typeof context === 'boolean') { - keepScripts = context; - } - - const parsed = this.load(data, this._options, false); - if (!keepScripts) { - parsed('script').remove(); - } - - /* - * The `children` array is used by Cheerio internally to group elements that - * share the same parents. When nodes created through `parseHTML` are - * inserted into previously-existing DOM structures, they will be removed - * from the `children` array. The results of `parseHTML` should remain - * constant across these operations, so a shallow copy should be returned. - */ - return [...parsed.root()[0].children]; -} - -/** - * Sometimes you need to work with the top-level root element. To query it, you - * can use `$.root()`. - * - * @category Static - * @example - * - * ```js - * $.root().append('<ul id="vegetables"></ul>').html(); - * //=> <ul id="fruits">...</ul><ul id="vegetables"></ul> - * ``` - * - * @returns Cheerio instance wrapping the root node. - * @alias Cheerio.root - */ -export function root(this: CheerioAPI): Cheerio<Document> { - return this(this._root); -} - -/** - * Checks to see if the `contained` DOM element is a descendant of the - * `container` DOM element. - * - * @category Static - * @param container - Potential parent node. - * @param contained - Potential child node. - * @returns Indicates if the nodes contain one another. - * @alias Cheerio.contains - * @see {@link https://api.jquery.com/jQuery.contains/} - */ -export function contains(container: AnyNode, contained: AnyNode): boolean { - // According to the jQuery API, an element does not "contain" itself - if (contained === container) { - return false; - } - - /* - * Step up the descendants, stopping when the root element is reached - * (signaled by `.parent` returning a reference to the same object) - */ - let next: AnyNode | null = contained; - while (next && next !== next.parent) { - next = next.parent; - if (next === container) { - return true; - } - } - - return false; -} - -/** - * Extract multiple values from a document, and store them in an object. - * - * @category Static - * @param map - An object containing key-value pairs. The keys are the names of - * the properties to be created on the object, and the values are the - * selectors to be used to extract the values. - * @returns An object containing the extracted values. - */ -export function extract<M extends ExtractMap>( - this: CheerioAPI, - map: M, -): ExtractedMap<M> { - return this.root().extract(map); -} - -type Writable<T> = { -readonly [P in keyof T]: T[P] }; - -/** - * $.merge(). - * - * @category Static - * @param arr1 - First array. - * @param arr2 - Second array. - * @returns `arr1`, with elements of `arr2` inserted. - * @alias Cheerio.merge - * @see {@link https://api.jquery.com/jQuery.merge/} - */ -export function merge<T>( - arr1: Writable<ArrayLike<T>>, - arr2: ArrayLike<T>, -): ArrayLike<T> | undefined { - if (!isArrayLike(arr1) || !isArrayLike(arr2)) { - return; - } - let newLength = arr1.length; - const len = +arr2.length; - - for (let i = 0; i < len; i++) { - arr1[newLength++] = arr2[i]; - } - arr1.length = newLength; - return arr1; -} - -/** - * Checks if an object is array-like. - * - * @category Static - * @param item - Item to check. - * @returns Indicates if the item is array-like. - */ -function isArrayLike(item: unknown): item is ArrayLike<unknown> { - if (Array.isArray(item)) { - return true; - } - - if ( - typeof item !== 'object' || - item === null || - !('length' in item) || - typeof item.length !== 'number' || - item.length < 0 - ) { - return false; - } - - for (let i = 0; i < item.length; i++) { - if (!(i in item)) { - return false; - } - } - return true; -} diff --git a/node_modules/cheerio/src/types.ts b/node_modules/cheerio/src/types.ts deleted file mode 100644 index 0b3b175..0000000 --- a/node_modules/cheerio/src/types.ts +++ /dev/null @@ -1,58 +0,0 @@ -/** @file Types used in signatures of Cheerio methods. */ - -type LowercaseLetters = - | 'a' - | 'b' - | 'c' - | 'd' - | 'e' - | 'f' - | 'g' - | 'h' - | 'i' - | 'j' - | 'k' - | 'l' - | 'm' - | 'n' - | 'o' - | 'p' - | 'q' - | 'r' - | 's' - | 't' - | 'u' - | 'v' - | 'w' - | 'x' - | 'y' - | 'z'; - -type AlphaNumeric = - | LowercaseLetters - | Uppercase<LowercaseLetters> - | `${number}`; - -type SelectorSpecial = '.' | '#' | ':' | '|' | '>' | '+' | '~' | '['; -/** - * Type for identifying selectors. Allows us to "upgrade" queries using - * selectors to return `Element`s. - */ -export type SelectorType = - | `${SelectorSpecial}${AlphaNumeric}${string}` - | `${AlphaNumeric}${string}`; - -import type { Cheerio } from './cheerio.js'; -import type { AnyNode } from 'domhandler'; - -/** Elements that can be passed to manipulation methods. */ -export type BasicAcceptedElems<T extends AnyNode> = ArrayLike<T> | T | string; -/** Elements that can be passed to manipulation methods, including functions. */ -export type AcceptedElems<T extends AnyNode> = - | BasicAcceptedElems<T> - | ((this: T, i: number, el: T) => BasicAcceptedElems<T>); - -/** Function signature, for traversal methods. */ -export type FilterFunction<T> = (this: T, i: number, el: T) => boolean; -/** Supported filter types, for traversal methods. */ -export type AcceptedFilters<T> = string | FilterFunction<T> | T | Cheerio<T>; diff --git a/node_modules/cheerio/src/utils.spec.ts b/node_modules/cheerio/src/utils.spec.ts deleted file mode 100644 index e2b1273..0000000 --- a/node_modules/cheerio/src/utils.spec.ts +++ /dev/null @@ -1,32 +0,0 @@ -import { describe, it, expect } from 'vitest'; -import * as utils from './utils.js'; - -describe('util functions', () => { - it('camelCase function test', () => { - expect(utils.camelCase('cheerio.js')).toBe('cheerioJs'); - expect(utils.camelCase('camel-case-')).toBe('camelCase'); - expect(utils.camelCase('__directory__')).toBe('_directory_'); - expect(utils.camelCase('_one-two.three')).toBe('OneTwoThree'); - }); - - it('cssCase function test', () => { - expect(utils.cssCase('camelCase')).toBe('camel-case'); - expect(utils.cssCase('jQuery')).toBe('j-query'); - expect(utils.cssCase('neverSayNever')).toBe('never-say-never'); - expect(utils.cssCase('CSSCase')).toBe('-c-s-s-case'); - }); - - it('isHtml function test', () => { - expect(utils.isHtml('<html>')).toBe(true); - expect(utils.isHtml('\n<html>\n')).toBe(true); - expect(utils.isHtml('#main')).toBe(false); - expect(utils.isHtml('\n<p>foo<p>bar\n')).toBe(true); - expect(utils.isHtml('dog<p>fox<p>cat')).toBe(true); - expect(utils.isHtml('<p>fox<p>cat')).toBe(true); - expect(utils.isHtml('\n<p>fox<p>cat\n')).toBe(true); - expect(utils.isHtml('#<p>fox<p>cat#')).toBe(true); - expect(utils.isHtml('<!-- comment -->')).toBe(true); - expect(utils.isHtml('<!doctype html>')).toBe(true); - expect(utils.isHtml('<123>')).toBe(false); - }); -}); diff --git a/node_modules/cheerio/src/utils.ts b/node_modules/cheerio/src/utils.ts deleted file mode 100644 index c10efb7..0000000 --- a/node_modules/cheerio/src/utils.ts +++ /dev/null @@ -1,93 +0,0 @@ -import type { AnyNode } from 'domhandler'; -import type { Cheerio } from './cheerio.js'; - -/** - * Checks if an object is a Cheerio instance. - * - * @category Utils - * @param maybeCheerio - The object to check. - * @returns Whether the object is a Cheerio instance. - */ -export function isCheerio<T>(maybeCheerio: any): maybeCheerio is Cheerio<T> { - return maybeCheerio.cheerio != null; -} - -/** - * Convert a string to camel case notation. - * - * @private - * @category Utils - * @param str - The string to be converted. - * @returns String in camel case notation. - */ -export function camelCase(str: string): string { - return str.replace(/[._-](\w|$)/g, (_, x) => x.toUpperCase()); -} - -/** - * Convert a string from camel case to "CSS case", where word boundaries are - * described by hyphens ("-") and all characters are lower-case. - * - * @private - * @category Utils - * @param str - The string to be converted. - * @returns String in "CSS case". - */ -export function cssCase(str: string): string { - return str.replace(/[A-Z]/g, '-$&').toLowerCase(); -} - -/** - * Iterate over each DOM element without creating intermediary Cheerio - * instances. - * - * This is indented for use internally to avoid otherwise unnecessary memory - * pressure introduced by _make. - * - * @category Utils - * @param array - The array to iterate over. - * @param fn - Function to call. - * @returns The original instance. - */ -export function domEach< - T extends AnyNode, - Arr extends ArrayLike<T> = Cheerio<T>, ->(array: Arr, fn: (elem: T, index: number) => void): Arr { - const len = array.length; - for (let i = 0; i < len; i++) fn(array[i], i); - return array; -} - -const enum CharacterCodes { - LowerA = 97, - LowerZ = 122, - UpperA = 65, - UpperZ = 90, - Exclamation = 33, -} - -/** - * Check if string is HTML. - * - * Tests for a `<` within a string, immediate followed by a letter and - * eventually followed by a `>`. - * - * @private - * @category Utils - * @param str - The string to check. - * @returns Indicates if `str` is HTML. - */ -export function isHtml(str: string): boolean { - const tagStart = str.indexOf('<'); - - if (tagStart < 0 || tagStart > str.length - 3) return false; - - const tagChar = str.charCodeAt(tagStart + 1); - - return ( - ((tagChar >= CharacterCodes.LowerA && tagChar <= CharacterCodes.LowerZ) || - (tagChar >= CharacterCodes.UpperA && tagChar <= CharacterCodes.UpperZ) || - tagChar === CharacterCodes.Exclamation) && - str.includes('>', tagStart + 2) - ); -} diff --git a/node_modules/chokidar/index.js b/node_modules/chokidar/index.js deleted file mode 100644 index 8752893..0000000 --- a/node_modules/chokidar/index.js +++ /dev/null @@ -1,973 +0,0 @@ -'use strict'; - -const { EventEmitter } = require('events'); -const fs = require('fs'); -const sysPath = require('path'); -const { promisify } = require('util'); -const readdirp = require('readdirp'); -const anymatch = require('anymatch').default; -const globParent = require('glob-parent'); -const isGlob = require('is-glob'); -const braces = require('braces'); -const normalizePath = require('normalize-path'); - -const NodeFsHandler = require('./lib/nodefs-handler'); -const FsEventsHandler = require('./lib/fsevents-handler'); -const { - EV_ALL, - EV_READY, - EV_ADD, - EV_CHANGE, - EV_UNLINK, - EV_ADD_DIR, - EV_UNLINK_DIR, - EV_RAW, - EV_ERROR, - - STR_CLOSE, - STR_END, - - BACK_SLASH_RE, - DOUBLE_SLASH_RE, - SLASH_OR_BACK_SLASH_RE, - DOT_RE, - REPLACER_RE, - - SLASH, - SLASH_SLASH, - BRACE_START, - BANG, - ONE_DOT, - TWO_DOTS, - GLOBSTAR, - SLASH_GLOBSTAR, - ANYMATCH_OPTS, - STRING_TYPE, - FUNCTION_TYPE, - EMPTY_STR, - EMPTY_FN, - - isWindows, - isMacos, - isIBMi -} = require('./lib/constants'); - -const stat = promisify(fs.stat); -const readdir = promisify(fs.readdir); - -/** - * @typedef {String} Path - * @typedef {'all'|'add'|'addDir'|'change'|'unlink'|'unlinkDir'|'raw'|'error'|'ready'} EventName - * @typedef {'readdir'|'watch'|'add'|'remove'|'change'} ThrottleType - */ - -/** - * - * @typedef {Object} WatchHelpers - * @property {Boolean} followSymlinks - * @property {'stat'|'lstat'} statMethod - * @property {Path} path - * @property {Path} watchPath - * @property {Function} entryPath - * @property {Boolean} hasGlob - * @property {Object} globFilter - * @property {Function} filterPath - * @property {Function} filterDir - */ - -const arrify = (value = []) => Array.isArray(value) ? value : [value]; -const flatten = (list, result = []) => { - list.forEach(item => { - if (Array.isArray(item)) { - flatten(item, result); - } else { - result.push(item); - } - }); - return result; -}; - -const unifyPaths = (paths_) => { - /** - * @type {Array<String>} - */ - const paths = flatten(arrify(paths_)); - if (!paths.every(p => typeof p === STRING_TYPE)) { - throw new TypeError(`Non-string provided as watch path: ${paths}`); - } - return paths.map(normalizePathToUnix); -}; - -// If SLASH_SLASH occurs at the beginning of path, it is not replaced -// because "//StoragePC/DrivePool/Movies" is a valid network path -const toUnix = (string) => { - let str = string.replace(BACK_SLASH_RE, SLASH); - let prepend = false; - if (str.startsWith(SLASH_SLASH)) { - prepend = true; - } - while (str.match(DOUBLE_SLASH_RE)) { - str = str.replace(DOUBLE_SLASH_RE, SLASH); - } - if (prepend) { - str = SLASH + str; - } - return str; -}; - -// Our version of upath.normalize -// TODO: this is not equal to path-normalize module - investigate why -const normalizePathToUnix = (path) => toUnix(sysPath.normalize(toUnix(path))); - -const normalizeIgnored = (cwd = EMPTY_STR) => (path) => { - if (typeof path !== STRING_TYPE) return path; - return normalizePathToUnix(sysPath.isAbsolute(path) ? path : sysPath.join(cwd, path)); -}; - -const getAbsolutePath = (path, cwd) => { - if (sysPath.isAbsolute(path)) { - return path; - } - if (path.startsWith(BANG)) { - return BANG + sysPath.join(cwd, path.slice(1)); - } - return sysPath.join(cwd, path); -}; - -const undef = (opts, key) => opts[key] === undefined; - -/** - * Directory entry. - * @property {Path} path - * @property {Set<Path>} items - */ -class DirEntry { - /** - * @param {Path} dir - * @param {Function} removeWatcher - */ - constructor(dir, removeWatcher) { - this.path = dir; - this._removeWatcher = removeWatcher; - /** @type {Set<Path>} */ - this.items = new Set(); - } - - add(item) { - const {items} = this; - if (!items) return; - if (item !== ONE_DOT && item !== TWO_DOTS) items.add(item); - } - - async remove(item) { - const {items} = this; - if (!items) return; - items.delete(item); - if (items.size > 0) return; - - const dir = this.path; - try { - await readdir(dir); - } catch (err) { - if (this._removeWatcher) { - this._removeWatcher(sysPath.dirname(dir), sysPath.basename(dir)); - } - } - } - - has(item) { - const {items} = this; - if (!items) return; - return items.has(item); - } - - /** - * @returns {Array<String>} - */ - getChildren() { - const {items} = this; - if (!items) return; - return [...items.values()]; - } - - dispose() { - this.items.clear(); - delete this.path; - delete this._removeWatcher; - delete this.items; - Object.freeze(this); - } -} - -const STAT_METHOD_F = 'stat'; -const STAT_METHOD_L = 'lstat'; -class WatchHelper { - constructor(path, watchPath, follow, fsw) { - this.fsw = fsw; - this.path = path = path.replace(REPLACER_RE, EMPTY_STR); - this.watchPath = watchPath; - this.fullWatchPath = sysPath.resolve(watchPath); - this.hasGlob = watchPath !== path; - /** @type {object|boolean} */ - if (path === EMPTY_STR) this.hasGlob = false; - this.globSymlink = this.hasGlob && follow ? undefined : false; - this.globFilter = this.hasGlob ? anymatch(path, undefined, ANYMATCH_OPTS) : false; - this.dirParts = this.getDirParts(path); - this.dirParts.forEach((parts) => { - if (parts.length > 1) parts.pop(); - }); - this.followSymlinks = follow; - this.statMethod = follow ? STAT_METHOD_F : STAT_METHOD_L; - } - - checkGlobSymlink(entry) { - // only need to resolve once - // first entry should always have entry.parentDir === EMPTY_STR - if (this.globSymlink === undefined) { - this.globSymlink = entry.fullParentDir === this.fullWatchPath ? - false : {realPath: entry.fullParentDir, linkPath: this.fullWatchPath}; - } - - if (this.globSymlink) { - return entry.fullPath.replace(this.globSymlink.realPath, this.globSymlink.linkPath); - } - - return entry.fullPath; - } - - entryPath(entry) { - return sysPath.join(this.watchPath, - sysPath.relative(this.watchPath, this.checkGlobSymlink(entry)) - ); - } - - filterPath(entry) { - const {stats} = entry; - if (stats && stats.isSymbolicLink()) return this.filterDir(entry); - const resolvedPath = this.entryPath(entry); - const matchesGlob = this.hasGlob && typeof this.globFilter === FUNCTION_TYPE ? - this.globFilter(resolvedPath) : true; - return matchesGlob && - this.fsw._isntIgnored(resolvedPath, stats) && - this.fsw._hasReadPermissions(stats); - } - - getDirParts(path) { - if (!this.hasGlob) return []; - const parts = []; - const expandedPath = path.includes(BRACE_START) ? braces.expand(path) : [path]; - expandedPath.forEach((path) => { - parts.push(sysPath.relative(this.watchPath, path).split(SLASH_OR_BACK_SLASH_RE)); - }); - return parts; - } - - filterDir(entry) { - if (this.hasGlob) { - const entryParts = this.getDirParts(this.checkGlobSymlink(entry)); - let globstar = false; - this.unmatchedGlob = !this.dirParts.some((parts) => { - return parts.every((part, i) => { - if (part === GLOBSTAR) globstar = true; - return globstar || !entryParts[0][i] || anymatch(part, entryParts[0][i], ANYMATCH_OPTS); - }); - }); - } - return !this.unmatchedGlob && this.fsw._isntIgnored(this.entryPath(entry), entry.stats); - } -} - -/** - * Watches files & directories for changes. Emitted events: - * `add`, `addDir`, `change`, `unlink`, `unlinkDir`, `all`, `error` - * - * new FSWatcher() - * .add(directories) - * .on('add', path => log('File', path, 'was added')) - */ -class FSWatcher extends EventEmitter { -// Not indenting methods for history sake; for now. -constructor(_opts) { - super(); - - const opts = {}; - if (_opts) Object.assign(opts, _opts); // for frozen objects - - /** @type {Map<String, DirEntry>} */ - this._watched = new Map(); - /** @type {Map<String, Array>} */ - this._closers = new Map(); - /** @type {Set<String>} */ - this._ignoredPaths = new Set(); - - /** @type {Map<ThrottleType, Map>} */ - this._throttled = new Map(); - - /** @type {Map<Path, String|Boolean>} */ - this._symlinkPaths = new Map(); - - this._streams = new Set(); - this.closed = false; - - // Set up default options. - if (undef(opts, 'persistent')) opts.persistent = true; - if (undef(opts, 'ignoreInitial')) opts.ignoreInitial = false; - if (undef(opts, 'ignorePermissionErrors')) opts.ignorePermissionErrors = false; - if (undef(opts, 'interval')) opts.interval = 100; - if (undef(opts, 'binaryInterval')) opts.binaryInterval = 300; - if (undef(opts, 'disableGlobbing')) opts.disableGlobbing = false; - opts.enableBinaryInterval = opts.binaryInterval !== opts.interval; - - // Enable fsevents on OS X when polling isn't explicitly enabled. - if (undef(opts, 'useFsEvents')) opts.useFsEvents = !opts.usePolling; - - // If we can't use fsevents, ensure the options reflect it's disabled. - const canUseFsEvents = FsEventsHandler.canUse(); - if (!canUseFsEvents) opts.useFsEvents = false; - - // Use polling on Mac if not using fsevents. - // Other platforms use non-polling fs_watch. - if (undef(opts, 'usePolling') && !opts.useFsEvents) { - opts.usePolling = isMacos; - } - - // Always default to polling on IBM i because fs.watch() is not available on IBM i. - if(isIBMi) { - opts.usePolling = true; - } - - // Global override (useful for end-developers that need to force polling for all - // instances of chokidar, regardless of usage/dependency depth) - const envPoll = process.env.CHOKIDAR_USEPOLLING; - if (envPoll !== undefined) { - const envLower = envPoll.toLowerCase(); - - if (envLower === 'false' || envLower === '0') { - opts.usePolling = false; - } else if (envLower === 'true' || envLower === '1') { - opts.usePolling = true; - } else { - opts.usePolling = !!envLower; - } - } - const envInterval = process.env.CHOKIDAR_INTERVAL; - if (envInterval) { - opts.interval = Number.parseInt(envInterval, 10); - } - - // Editor atomic write normalization enabled by default with fs.watch - if (undef(opts, 'atomic')) opts.atomic = !opts.usePolling && !opts.useFsEvents; - if (opts.atomic) this._pendingUnlinks = new Map(); - - if (undef(opts, 'followSymlinks')) opts.followSymlinks = true; - - if (undef(opts, 'awaitWriteFinish')) opts.awaitWriteFinish = false; - if (opts.awaitWriteFinish === true) opts.awaitWriteFinish = {}; - const awf = opts.awaitWriteFinish; - if (awf) { - if (!awf.stabilityThreshold) awf.stabilityThreshold = 2000; - if (!awf.pollInterval) awf.pollInterval = 100; - this._pendingWrites = new Map(); - } - if (opts.ignored) opts.ignored = arrify(opts.ignored); - - let readyCalls = 0; - this._emitReady = () => { - readyCalls++; - if (readyCalls >= this._readyCount) { - this._emitReady = EMPTY_FN; - this._readyEmitted = true; - // use process.nextTick to allow time for listener to be bound - process.nextTick(() => this.emit(EV_READY)); - } - }; - this._emitRaw = (...args) => this.emit(EV_RAW, ...args); - this._readyEmitted = false; - this.options = opts; - - // Initialize with proper watcher. - if (opts.useFsEvents) { - this._fsEventsHandler = new FsEventsHandler(this); - } else { - this._nodeFsHandler = new NodeFsHandler(this); - } - - // You’re frozen when your heart’s not open. - Object.freeze(opts); -} - -// Public methods - -/** - * Adds paths to be watched on an existing FSWatcher instance - * @param {Path|Array<Path>} paths_ - * @param {String=} _origAdd private; for handling non-existent paths to be watched - * @param {Boolean=} _internal private; indicates a non-user add - * @returns {FSWatcher} for chaining - */ -add(paths_, _origAdd, _internal) { - const {cwd, disableGlobbing} = this.options; - this.closed = false; - let paths = unifyPaths(paths_); - if (cwd) { - paths = paths.map((path) => { - const absPath = getAbsolutePath(path, cwd); - - // Check `path` instead of `absPath` because the cwd portion can't be a glob - if (disableGlobbing || !isGlob(path)) { - return absPath; - } - return normalizePath(absPath); - }); - } - - // set aside negated glob strings - paths = paths.filter((path) => { - if (path.startsWith(BANG)) { - this._ignoredPaths.add(path.slice(1)); - return false; - } - - // if a path is being added that was previously ignored, stop ignoring it - this._ignoredPaths.delete(path); - this._ignoredPaths.delete(path + SLASH_GLOBSTAR); - - // reset the cached userIgnored anymatch fn - // to make ignoredPaths changes effective - this._userIgnored = undefined; - - return true; - }); - - if (this.options.useFsEvents && this._fsEventsHandler) { - if (!this._readyCount) this._readyCount = paths.length; - if (this.options.persistent) this._readyCount += paths.length; - paths.forEach((path) => this._fsEventsHandler._addToFsEvents(path)); - } else { - if (!this._readyCount) this._readyCount = 0; - this._readyCount += paths.length; - Promise.all( - paths.map(async path => { - const res = await this._nodeFsHandler._addToNodeFs(path, !_internal, 0, 0, _origAdd); - if (res) this._emitReady(); - return res; - }) - ).then(results => { - if (this.closed) return; - results.filter(item => item).forEach(item => { - this.add(sysPath.dirname(item), sysPath.basename(_origAdd || item)); - }); - }); - } - - return this; -} - -/** - * Close watchers or start ignoring events from specified paths. - * @param {Path|Array<Path>} paths_ - string or array of strings, file/directory paths and/or globs - * @returns {FSWatcher} for chaining -*/ -unwatch(paths_) { - if (this.closed) return this; - const paths = unifyPaths(paths_); - const {cwd} = this.options; - - paths.forEach((path) => { - // convert to absolute path unless relative path already matches - if (!sysPath.isAbsolute(path) && !this._closers.has(path)) { - if (cwd) path = sysPath.join(cwd, path); - path = sysPath.resolve(path); - } - - this._closePath(path); - - this._ignoredPaths.add(path); - if (this._watched.has(path)) { - this._ignoredPaths.add(path + SLASH_GLOBSTAR); - } - - // reset the cached userIgnored anymatch fn - // to make ignoredPaths changes effective - this._userIgnored = undefined; - }); - - return this; -} - -/** - * Close watchers and remove all listeners from watched paths. - * @returns {Promise<void>}. -*/ -close() { - if (this.closed) return this._closePromise; - this.closed = true; - - // Memory management. - this.removeAllListeners(); - const closers = []; - this._closers.forEach(closerList => closerList.forEach(closer => { - const promise = closer(); - if (promise instanceof Promise) closers.push(promise); - })); - this._streams.forEach(stream => stream.destroy()); - this._userIgnored = undefined; - this._readyCount = 0; - this._readyEmitted = false; - this._watched.forEach(dirent => dirent.dispose()); - ['closers', 'watched', 'streams', 'symlinkPaths', 'throttled'].forEach(key => { - this[`_${key}`].clear(); - }); - - this._closePromise = closers.length ? Promise.all(closers).then(() => undefined) : Promise.resolve(); - return this._closePromise; -} - -/** - * Expose list of watched paths - * @returns {Object} for chaining -*/ -getWatched() { - const watchList = {}; - this._watched.forEach((entry, dir) => { - const key = this.options.cwd ? sysPath.relative(this.options.cwd, dir) : dir; - watchList[key || ONE_DOT] = entry.getChildren().sort(); - }); - return watchList; -} - -emitWithAll(event, args) { - this.emit(...args); - if (event !== EV_ERROR) this.emit(EV_ALL, ...args); -} - -// Common helpers -// -------------- - -/** - * Normalize and emit events. - * Calling _emit DOES NOT MEAN emit() would be called! - * @param {EventName} event Type of event - * @param {Path} path File or directory path - * @param {*=} val1 arguments to be passed with event - * @param {*=} val2 - * @param {*=} val3 - * @returns the error if defined, otherwise the value of the FSWatcher instance's `closed` flag - */ -async _emit(event, path, val1, val2, val3) { - if (this.closed) return; - - const opts = this.options; - if (isWindows) path = sysPath.normalize(path); - if (opts.cwd) path = sysPath.relative(opts.cwd, path); - /** @type Array<any> */ - const args = [event, path]; - if (val3 !== undefined) args.push(val1, val2, val3); - else if (val2 !== undefined) args.push(val1, val2); - else if (val1 !== undefined) args.push(val1); - - const awf = opts.awaitWriteFinish; - let pw; - if (awf && (pw = this._pendingWrites.get(path))) { - pw.lastChange = new Date(); - return this; - } - - if (opts.atomic) { - if (event === EV_UNLINK) { - this._pendingUnlinks.set(path, args); - setTimeout(() => { - this._pendingUnlinks.forEach((entry, path) => { - this.emit(...entry); - this.emit(EV_ALL, ...entry); - this._pendingUnlinks.delete(path); - }); - }, typeof opts.atomic === 'number' ? opts.atomic : 100); - return this; - } - if (event === EV_ADD && this._pendingUnlinks.has(path)) { - event = args[0] = EV_CHANGE; - this._pendingUnlinks.delete(path); - } - } - - if (awf && (event === EV_ADD || event === EV_CHANGE) && this._readyEmitted) { - const awfEmit = (err, stats) => { - if (err) { - event = args[0] = EV_ERROR; - args[1] = err; - this.emitWithAll(event, args); - } else if (stats) { - // if stats doesn't exist the file must have been deleted - if (args.length > 2) { - args[2] = stats; - } else { - args.push(stats); - } - this.emitWithAll(event, args); - } - }; - - this._awaitWriteFinish(path, awf.stabilityThreshold, event, awfEmit); - return this; - } - - if (event === EV_CHANGE) { - const isThrottled = !this._throttle(EV_CHANGE, path, 50); - if (isThrottled) return this; - } - - if (opts.alwaysStat && val1 === undefined && - (event === EV_ADD || event === EV_ADD_DIR || event === EV_CHANGE) - ) { - const fullPath = opts.cwd ? sysPath.join(opts.cwd, path) : path; - let stats; - try { - stats = await stat(fullPath); - } catch (err) {} - // Suppress event when fs_stat fails, to avoid sending undefined 'stat' - if (!stats || this.closed) return; - args.push(stats); - } - this.emitWithAll(event, args); - - return this; -} - -/** - * Common handler for errors - * @param {Error} error - * @returns {Error|Boolean} The error if defined, otherwise the value of the FSWatcher instance's `closed` flag - */ -_handleError(error) { - const code = error && error.code; - if (error && code !== 'ENOENT' && code !== 'ENOTDIR' && - (!this.options.ignorePermissionErrors || (code !== 'EPERM' && code !== 'EACCES')) - ) { - this.emit(EV_ERROR, error); - } - return error || this.closed; -} - -/** - * Helper utility for throttling - * @param {ThrottleType} actionType type being throttled - * @param {Path} path being acted upon - * @param {Number} timeout duration of time to suppress duplicate actions - * @returns {Object|false} tracking object or false if action should be suppressed - */ -_throttle(actionType, path, timeout) { - if (!this._throttled.has(actionType)) { - this._throttled.set(actionType, new Map()); - } - - /** @type {Map<Path, Object>} */ - const action = this._throttled.get(actionType); - /** @type {Object} */ - const actionPath = action.get(path); - - if (actionPath) { - actionPath.count++; - return false; - } - - let timeoutObject; - const clear = () => { - const item = action.get(path); - const count = item ? item.count : 0; - action.delete(path); - clearTimeout(timeoutObject); - if (item) clearTimeout(item.timeoutObject); - return count; - }; - timeoutObject = setTimeout(clear, timeout); - const thr = {timeoutObject, clear, count: 0}; - action.set(path, thr); - return thr; -} - -_incrReadyCount() { - return this._readyCount++; -} - -/** - * Awaits write operation to finish. - * Polls a newly created file for size variations. When files size does not change for 'threshold' milliseconds calls callback. - * @param {Path} path being acted upon - * @param {Number} threshold Time in milliseconds a file size must be fixed before acknowledging write OP is finished - * @param {EventName} event - * @param {Function} awfEmit Callback to be called when ready for event to be emitted. - */ -_awaitWriteFinish(path, threshold, event, awfEmit) { - let timeoutHandler; - - let fullPath = path; - if (this.options.cwd && !sysPath.isAbsolute(path)) { - fullPath = sysPath.join(this.options.cwd, path); - } - - const now = new Date(); - - const awaitWriteFinish = (prevStat) => { - fs.stat(fullPath, (err, curStat) => { - if (err || !this._pendingWrites.has(path)) { - if (err && err.code !== 'ENOENT') awfEmit(err); - return; - } - - const now = Number(new Date()); - - if (prevStat && curStat.size !== prevStat.size) { - this._pendingWrites.get(path).lastChange = now; - } - const pw = this._pendingWrites.get(path); - const df = now - pw.lastChange; - - if (df >= threshold) { - this._pendingWrites.delete(path); - awfEmit(undefined, curStat); - } else { - timeoutHandler = setTimeout( - awaitWriteFinish, - this.options.awaitWriteFinish.pollInterval, - curStat - ); - } - }); - }; - - if (!this._pendingWrites.has(path)) { - this._pendingWrites.set(path, { - lastChange: now, - cancelWait: () => { - this._pendingWrites.delete(path); - clearTimeout(timeoutHandler); - return event; - } - }); - timeoutHandler = setTimeout( - awaitWriteFinish, - this.options.awaitWriteFinish.pollInterval - ); - } -} - -_getGlobIgnored() { - return [...this._ignoredPaths.values()]; -} - -/** - * Determines whether user has asked to ignore this path. - * @param {Path} path filepath or dir - * @param {fs.Stats=} stats result of fs.stat - * @returns {Boolean} - */ -_isIgnored(path, stats) { - if (this.options.atomic && DOT_RE.test(path)) return true; - if (!this._userIgnored) { - const {cwd} = this.options; - const ign = this.options.ignored; - - const ignored = ign && ign.map(normalizeIgnored(cwd)); - const paths = arrify(ignored) - .filter((path) => typeof path === STRING_TYPE && !isGlob(path)) - .map((path) => path + SLASH_GLOBSTAR); - const list = this._getGlobIgnored().map(normalizeIgnored(cwd)).concat(ignored, paths); - this._userIgnored = anymatch(list, undefined, ANYMATCH_OPTS); - } - - return this._userIgnored([path, stats]); -} - -_isntIgnored(path, stat) { - return !this._isIgnored(path, stat); -} - -/** - * Provides a set of common helpers and properties relating to symlink and glob handling. - * @param {Path} path file, directory, or glob pattern being watched - * @param {Number=} depth at any depth > 0, this isn't a glob - * @returns {WatchHelper} object containing helpers for this path - */ -_getWatchHelpers(path, depth) { - const watchPath = depth || this.options.disableGlobbing || !isGlob(path) ? path : globParent(path); - const follow = this.options.followSymlinks; - - return new WatchHelper(path, watchPath, follow, this); -} - -// Directory helpers -// ----------------- - -/** - * Provides directory tracking objects - * @param {String} directory path of the directory - * @returns {DirEntry} the directory's tracking object - */ -_getWatchedDir(directory) { - if (!this._boundRemove) this._boundRemove = this._remove.bind(this); - const dir = sysPath.resolve(directory); - if (!this._watched.has(dir)) this._watched.set(dir, new DirEntry(dir, this._boundRemove)); - return this._watched.get(dir); -} - -// File helpers -// ------------ - -/** - * Check for read permissions. - * Based on this answer on SO: https://stackoverflow.com/a/11781404/1358405 - * @param {fs.Stats} stats - object, result of fs_stat - * @returns {Boolean} indicates whether the file can be read -*/ -_hasReadPermissions(stats) { - if (this.options.ignorePermissionErrors) return true; - - // stats.mode may be bigint - const md = stats && Number.parseInt(stats.mode, 10); - const st = md & 0o777; - const it = Number.parseInt(st.toString(8)[0], 10); - return Boolean(4 & it); -} - -/** - * Handles emitting unlink events for - * files and directories, and via recursion, for - * files and directories within directories that are unlinked - * @param {String} directory within which the following item is located - * @param {String} item base path of item/directory - * @returns {void} -*/ -_remove(directory, item, isDirectory) { - // if what is being deleted is a directory, get that directory's paths - // for recursive deleting and cleaning of watched object - // if it is not a directory, nestedDirectoryChildren will be empty array - const path = sysPath.join(directory, item); - const fullPath = sysPath.resolve(path); - isDirectory = isDirectory != null - ? isDirectory - : this._watched.has(path) || this._watched.has(fullPath); - - // prevent duplicate handling in case of arriving here nearly simultaneously - // via multiple paths (such as _handleFile and _handleDir) - if (!this._throttle('remove', path, 100)) return; - - // if the only watched file is removed, watch for its return - if (!isDirectory && !this.options.useFsEvents && this._watched.size === 1) { - this.add(directory, item, true); - } - - // This will create a new entry in the watched object in either case - // so we got to do the directory check beforehand - const wp = this._getWatchedDir(path); - const nestedDirectoryChildren = wp.getChildren(); - - // Recursively remove children directories / files. - nestedDirectoryChildren.forEach(nested => this._remove(path, nested)); - - // Check if item was on the watched list and remove it - const parent = this._getWatchedDir(directory); - const wasTracked = parent.has(item); - parent.remove(item); - - // Fixes issue #1042 -> Relative paths were detected and added as symlinks - // (https://github.com/paulmillr/chokidar/blob/e1753ddbc9571bdc33b4a4af172d52cb6e611c10/lib/nodefs-handler.js#L612), - // but never removed from the map in case the path was deleted. - // This leads to an incorrect state if the path was recreated: - // https://github.com/paulmillr/chokidar/blob/e1753ddbc9571bdc33b4a4af172d52cb6e611c10/lib/nodefs-handler.js#L553 - if (this._symlinkPaths.has(fullPath)) { - this._symlinkPaths.delete(fullPath); - } - - // If we wait for this file to be fully written, cancel the wait. - let relPath = path; - if (this.options.cwd) relPath = sysPath.relative(this.options.cwd, path); - if (this.options.awaitWriteFinish && this._pendingWrites.has(relPath)) { - const event = this._pendingWrites.get(relPath).cancelWait(); - if (event === EV_ADD) return; - } - - // The Entry will either be a directory that just got removed - // or a bogus entry to a file, in either case we have to remove it - this._watched.delete(path); - this._watched.delete(fullPath); - const eventName = isDirectory ? EV_UNLINK_DIR : EV_UNLINK; - if (wasTracked && !this._isIgnored(path)) this._emit(eventName, path); - - // Avoid conflicts if we later create another file with the same name - if (!this.options.useFsEvents) { - this._closePath(path); - } -} - -/** - * Closes all watchers for a path - * @param {Path} path - */ -_closePath(path) { - this._closeFile(path) - const dir = sysPath.dirname(path); - this._getWatchedDir(dir).remove(sysPath.basename(path)); -} - -/** - * Closes only file-specific watchers - * @param {Path} path - */ -_closeFile(path) { - const closers = this._closers.get(path); - if (!closers) return; - closers.forEach(closer => closer()); - this._closers.delete(path); -} - -/** - * - * @param {Path} path - * @param {Function} closer - */ -_addPathCloser(path, closer) { - if (!closer) return; - let list = this._closers.get(path); - if (!list) { - list = []; - this._closers.set(path, list); - } - list.push(closer); -} - -_readdirp(root, opts) { - if (this.closed) return; - const options = {type: EV_ALL, alwaysStat: true, lstat: true, ...opts}; - let stream = readdirp(root, options); - this._streams.add(stream); - stream.once(STR_CLOSE, () => { - stream = undefined; - }); - stream.once(STR_END, () => { - if (stream) { - this._streams.delete(stream); - stream = undefined; - } - }); - return stream; -} - -} - -// Export FSWatcher class -exports.FSWatcher = FSWatcher; - -/** - * Instantiates watcher with paths to be tracked. - * @param {String|Array<String>} paths file/directory paths and/or globs - * @param {Object=} options chokidar opts - * @returns an instance of FSWatcher for chaining. - */ -const watch = (paths, options) => { - const watcher = new FSWatcher(options); - watcher.add(paths); - return watcher; -}; - -exports.watch = watch; diff --git a/node_modules/chokidar/lib/constants.js b/node_modules/chokidar/lib/constants.js deleted file mode 100644 index 4743865..0000000 --- a/node_modules/chokidar/lib/constants.js +++ /dev/null @@ -1,66 +0,0 @@ -'use strict'; - -const {sep} = require('path'); -const {platform} = process; -const os = require('os'); - -exports.EV_ALL = 'all'; -exports.EV_READY = 'ready'; -exports.EV_ADD = 'add'; -exports.EV_CHANGE = 'change'; -exports.EV_ADD_DIR = 'addDir'; -exports.EV_UNLINK = 'unlink'; -exports.EV_UNLINK_DIR = 'unlinkDir'; -exports.EV_RAW = 'raw'; -exports.EV_ERROR = 'error'; - -exports.STR_DATA = 'data'; -exports.STR_END = 'end'; -exports.STR_CLOSE = 'close'; - -exports.FSEVENT_CREATED = 'created'; -exports.FSEVENT_MODIFIED = 'modified'; -exports.FSEVENT_DELETED = 'deleted'; -exports.FSEVENT_MOVED = 'moved'; -exports.FSEVENT_CLONED = 'cloned'; -exports.FSEVENT_UNKNOWN = 'unknown'; -exports.FSEVENT_FLAG_MUST_SCAN_SUBDIRS = 1; -exports.FSEVENT_TYPE_FILE = 'file'; -exports.FSEVENT_TYPE_DIRECTORY = 'directory'; -exports.FSEVENT_TYPE_SYMLINK = 'symlink'; - -exports.KEY_LISTENERS = 'listeners'; -exports.KEY_ERR = 'errHandlers'; -exports.KEY_RAW = 'rawEmitters'; -exports.HANDLER_KEYS = [exports.KEY_LISTENERS, exports.KEY_ERR, exports.KEY_RAW]; - -exports.DOT_SLASH = `.${sep}`; - -exports.BACK_SLASH_RE = /\\/g; -exports.DOUBLE_SLASH_RE = /\/\//; -exports.SLASH_OR_BACK_SLASH_RE = /[/\\]/; -exports.DOT_RE = /\..*\.(sw[px])$|~$|\.subl.*\.tmp/; -exports.REPLACER_RE = /^\.[/\\]/; - -exports.SLASH = '/'; -exports.SLASH_SLASH = '//'; -exports.BRACE_START = '{'; -exports.BANG = '!'; -exports.ONE_DOT = '.'; -exports.TWO_DOTS = '..'; -exports.STAR = '*'; -exports.GLOBSTAR = '**'; -exports.ROOT_GLOBSTAR = '/**/*'; -exports.SLASH_GLOBSTAR = '/**'; -exports.DIR_SUFFIX = 'Dir'; -exports.ANYMATCH_OPTS = {dot: true}; -exports.STRING_TYPE = 'string'; -exports.FUNCTION_TYPE = 'function'; -exports.EMPTY_STR = ''; -exports.EMPTY_FN = () => {}; -exports.IDENTITY_FN = val => val; - -exports.isWindows = platform === 'win32'; -exports.isMacos = platform === 'darwin'; -exports.isLinux = platform === 'linux'; -exports.isIBMi = os.type() === 'OS400'; diff --git a/node_modules/chokidar/lib/fsevents-handler.js b/node_modules/chokidar/lib/fsevents-handler.js deleted file mode 100644 index fe29393..0000000 --- a/node_modules/chokidar/lib/fsevents-handler.js +++ /dev/null @@ -1,526 +0,0 @@ -'use strict'; - -const fs = require('fs'); -const sysPath = require('path'); -const { promisify } = require('util'); - -let fsevents; -try { - fsevents = require('fsevents'); -} catch (error) { - if (process.env.CHOKIDAR_PRINT_FSEVENTS_REQUIRE_ERROR) console.error(error); -} - -if (fsevents) { - // TODO: real check - const mtch = process.version.match(/v(\d+)\.(\d+)/); - if (mtch && mtch[1] && mtch[2]) { - const maj = Number.parseInt(mtch[1], 10); - const min = Number.parseInt(mtch[2], 10); - if (maj === 8 && min < 16) { - fsevents = undefined; - } - } -} - -const { - EV_ADD, - EV_CHANGE, - EV_ADD_DIR, - EV_UNLINK, - EV_ERROR, - STR_DATA, - STR_END, - FSEVENT_CREATED, - FSEVENT_MODIFIED, - FSEVENT_DELETED, - FSEVENT_MOVED, - // FSEVENT_CLONED, - FSEVENT_UNKNOWN, - FSEVENT_FLAG_MUST_SCAN_SUBDIRS, - FSEVENT_TYPE_FILE, - FSEVENT_TYPE_DIRECTORY, - FSEVENT_TYPE_SYMLINK, - - ROOT_GLOBSTAR, - DIR_SUFFIX, - DOT_SLASH, - FUNCTION_TYPE, - EMPTY_FN, - IDENTITY_FN -} = require('./constants'); - -const Depth = (value) => isNaN(value) ? {} : {depth: value}; - -const stat = promisify(fs.stat); -const lstat = promisify(fs.lstat); -const realpath = promisify(fs.realpath); - -const statMethods = { stat, lstat }; - -/** - * @typedef {String} Path - */ - -/** - * @typedef {Object} FsEventsWatchContainer - * @property {Set<Function>} listeners - * @property {Function} rawEmitter - * @property {{stop: Function}} watcher - */ - -// fsevents instance helper functions -/** - * Object to hold per-process fsevents instances (may be shared across chokidar FSWatcher instances) - * @type {Map<Path,FsEventsWatchContainer>} - */ -const FSEventsWatchers = new Map(); - -// Threshold of duplicate path prefixes at which to start -// consolidating going forward -const consolidateThreshhold = 10; - -const wrongEventFlags = new Set([ - 69888, 70400, 71424, 72704, 73472, 131328, 131840, 262912 -]); - -/** - * Instantiates the fsevents interface - * @param {Path} path path to be watched - * @param {Function} callback called when fsevents is bound and ready - * @returns {{stop: Function}} new fsevents instance - */ -const createFSEventsInstance = (path, callback) => { - const stop = fsevents.watch(path, callback); - return {stop}; -}; - -/** - * Instantiates the fsevents interface or binds listeners to an existing one covering - * the same file tree. - * @param {Path} path - to be watched - * @param {Path} realPath - real path for symlinks - * @param {Function} listener - called when fsevents emits events - * @param {Function} rawEmitter - passes data to listeners of the 'raw' event - * @returns {Function} closer - */ -function setFSEventsListener(path, realPath, listener, rawEmitter) { - let watchPath = sysPath.extname(realPath) ? sysPath.dirname(realPath) : realPath; - - const parentPath = sysPath.dirname(watchPath); - let cont = FSEventsWatchers.get(watchPath); - - // If we've accumulated a substantial number of paths that - // could have been consolidated by watching one directory - // above the current one, create a watcher on the parent - // path instead, so that we do consolidate going forward. - if (couldConsolidate(parentPath)) { - watchPath = parentPath; - } - - const resolvedPath = sysPath.resolve(path); - const hasSymlink = resolvedPath !== realPath; - - const filteredListener = (fullPath, flags, info) => { - if (hasSymlink) fullPath = fullPath.replace(realPath, resolvedPath); - if ( - fullPath === resolvedPath || - !fullPath.indexOf(resolvedPath + sysPath.sep) - ) listener(fullPath, flags, info); - }; - - // check if there is already a watcher on a parent path - // modifies `watchPath` to the parent path when it finds a match - let watchedParent = false; - for (const watchedPath of FSEventsWatchers.keys()) { - if (realPath.indexOf(sysPath.resolve(watchedPath) + sysPath.sep) === 0) { - watchPath = watchedPath; - cont = FSEventsWatchers.get(watchPath); - watchedParent = true; - break; - } - } - - if (cont || watchedParent) { - cont.listeners.add(filteredListener); - } else { - cont = { - listeners: new Set([filteredListener]), - rawEmitter, - watcher: createFSEventsInstance(watchPath, (fullPath, flags) => { - if (!cont.listeners.size) return; - if (flags & FSEVENT_FLAG_MUST_SCAN_SUBDIRS) return; - const info = fsevents.getInfo(fullPath, flags); - cont.listeners.forEach(list => { - list(fullPath, flags, info); - }); - - cont.rawEmitter(info.event, fullPath, info); - }) - }; - FSEventsWatchers.set(watchPath, cont); - } - - // removes this instance's listeners and closes the underlying fsevents - // instance if there are no more listeners left - return () => { - const lst = cont.listeners; - - lst.delete(filteredListener); - if (!lst.size) { - FSEventsWatchers.delete(watchPath); - if (cont.watcher) return cont.watcher.stop().then(() => { - cont.rawEmitter = cont.watcher = undefined; - Object.freeze(cont); - }); - } - }; -} - -// Decide whether or not we should start a new higher-level -// parent watcher -const couldConsolidate = (path) => { - let count = 0; - for (const watchPath of FSEventsWatchers.keys()) { - if (watchPath.indexOf(path) === 0) { - count++; - if (count >= consolidateThreshhold) { - return true; - } - } - } - - return false; -}; - -// returns boolean indicating whether fsevents can be used -const canUse = () => fsevents && FSEventsWatchers.size < 128; - -// determines subdirectory traversal levels from root to path -const calcDepth = (path, root) => { - let i = 0; - while (!path.indexOf(root) && (path = sysPath.dirname(path)) !== root) i++; - return i; -}; - -// returns boolean indicating whether the fsevents' event info has the same type -// as the one returned by fs.stat -const sameTypes = (info, stats) => ( - info.type === FSEVENT_TYPE_DIRECTORY && stats.isDirectory() || - info.type === FSEVENT_TYPE_SYMLINK && stats.isSymbolicLink() || - info.type === FSEVENT_TYPE_FILE && stats.isFile() -) - -/** - * @mixin - */ -class FsEventsHandler { - -/** - * @param {import('../index').FSWatcher} fsw - */ -constructor(fsw) { - this.fsw = fsw; -} -checkIgnored(path, stats) { - const ipaths = this.fsw._ignoredPaths; - if (this.fsw._isIgnored(path, stats)) { - ipaths.add(path); - if (stats && stats.isDirectory()) { - ipaths.add(path + ROOT_GLOBSTAR); - } - return true; - } - - ipaths.delete(path); - ipaths.delete(path + ROOT_GLOBSTAR); -} - -addOrChange(path, fullPath, realPath, parent, watchedDir, item, info, opts) { - const event = watchedDir.has(item) ? EV_CHANGE : EV_ADD; - this.handleEvent(event, path, fullPath, realPath, parent, watchedDir, item, info, opts); -} - -async checkExists(path, fullPath, realPath, parent, watchedDir, item, info, opts) { - try { - const stats = await stat(path) - if (this.fsw.closed) return; - if (sameTypes(info, stats)) { - this.addOrChange(path, fullPath, realPath, parent, watchedDir, item, info, opts); - } else { - this.handleEvent(EV_UNLINK, path, fullPath, realPath, parent, watchedDir, item, info, opts); - } - } catch (error) { - if (error.code === 'EACCES') { - this.addOrChange(path, fullPath, realPath, parent, watchedDir, item, info, opts); - } else { - this.handleEvent(EV_UNLINK, path, fullPath, realPath, parent, watchedDir, item, info, opts); - } - } -} - -handleEvent(event, path, fullPath, realPath, parent, watchedDir, item, info, opts) { - if (this.fsw.closed || this.checkIgnored(path)) return; - - if (event === EV_UNLINK) { - const isDirectory = info.type === FSEVENT_TYPE_DIRECTORY - // suppress unlink events on never before seen files - if (isDirectory || watchedDir.has(item)) { - this.fsw._remove(parent, item, isDirectory); - } - } else { - if (event === EV_ADD) { - // track new directories - if (info.type === FSEVENT_TYPE_DIRECTORY) this.fsw._getWatchedDir(path); - - if (info.type === FSEVENT_TYPE_SYMLINK && opts.followSymlinks) { - // push symlinks back to the top of the stack to get handled - const curDepth = opts.depth === undefined ? - undefined : calcDepth(fullPath, realPath) + 1; - return this._addToFsEvents(path, false, true, curDepth); - } - - // track new paths - // (other than symlinks being followed, which will be tracked soon) - this.fsw._getWatchedDir(parent).add(item); - } - /** - * @type {'add'|'addDir'|'unlink'|'unlinkDir'} - */ - const eventName = info.type === FSEVENT_TYPE_DIRECTORY ? event + DIR_SUFFIX : event; - this.fsw._emit(eventName, path); - if (eventName === EV_ADD_DIR) this._addToFsEvents(path, false, true); - } -} - -/** - * Handle symlinks encountered during directory scan - * @param {String} watchPath - file/dir path to be watched with fsevents - * @param {String} realPath - real path (in case of symlinks) - * @param {Function} transform - path transformer - * @param {Function} globFilter - path filter in case a glob pattern was provided - * @returns {Function} closer for the watcher instance -*/ -_watchWithFsEvents(watchPath, realPath, transform, globFilter) { - if (this.fsw.closed || this.fsw._isIgnored(watchPath)) return; - const opts = this.fsw.options; - const watchCallback = async (fullPath, flags, info) => { - if (this.fsw.closed) return; - if ( - opts.depth !== undefined && - calcDepth(fullPath, realPath) > opts.depth - ) return; - const path = transform(sysPath.join( - watchPath, sysPath.relative(watchPath, fullPath) - )); - if (globFilter && !globFilter(path)) return; - // ensure directories are tracked - const parent = sysPath.dirname(path); - const item = sysPath.basename(path); - const watchedDir = this.fsw._getWatchedDir( - info.type === FSEVENT_TYPE_DIRECTORY ? path : parent - ); - - // correct for wrong events emitted - if (wrongEventFlags.has(flags) || info.event === FSEVENT_UNKNOWN) { - if (typeof opts.ignored === FUNCTION_TYPE) { - let stats; - try { - stats = await stat(path); - } catch (error) {} - if (this.fsw.closed) return; - if (this.checkIgnored(path, stats)) return; - if (sameTypes(info, stats)) { - this.addOrChange(path, fullPath, realPath, parent, watchedDir, item, info, opts); - } else { - this.handleEvent(EV_UNLINK, path, fullPath, realPath, parent, watchedDir, item, info, opts); - } - } else { - this.checkExists(path, fullPath, realPath, parent, watchedDir, item, info, opts); - } - } else { - switch (info.event) { - case FSEVENT_CREATED: - case FSEVENT_MODIFIED: - return this.addOrChange(path, fullPath, realPath, parent, watchedDir, item, info, opts); - case FSEVENT_DELETED: - case FSEVENT_MOVED: - return this.checkExists(path, fullPath, realPath, parent, watchedDir, item, info, opts); - } - } - }; - - const closer = setFSEventsListener( - watchPath, - realPath, - watchCallback, - this.fsw._emitRaw - ); - - this.fsw._emitReady(); - return closer; -} - -/** - * Handle symlinks encountered during directory scan - * @param {String} linkPath path to symlink - * @param {String} fullPath absolute path to the symlink - * @param {Function} transform pre-existing path transformer - * @param {Number} curDepth level of subdirectories traversed to where symlink is - * @returns {Promise<void>} - */ -async _handleFsEventsSymlink(linkPath, fullPath, transform, curDepth) { - // don't follow the same symlink more than once - if (this.fsw.closed || this.fsw._symlinkPaths.has(fullPath)) return; - - this.fsw._symlinkPaths.set(fullPath, true); - this.fsw._incrReadyCount(); - - try { - const linkTarget = await realpath(linkPath); - if (this.fsw.closed) return; - if (this.fsw._isIgnored(linkTarget)) { - return this.fsw._emitReady(); - } - - this.fsw._incrReadyCount(); - - // add the linkTarget for watching with a wrapper for transform - // that causes emitted paths to incorporate the link's path - this._addToFsEvents(linkTarget || linkPath, (path) => { - let aliasedPath = linkPath; - if (linkTarget && linkTarget !== DOT_SLASH) { - aliasedPath = path.replace(linkTarget, linkPath); - } else if (path !== DOT_SLASH) { - aliasedPath = sysPath.join(linkPath, path); - } - return transform(aliasedPath); - }, false, curDepth); - } catch(error) { - if (this.fsw._handleError(error)) { - return this.fsw._emitReady(); - } - } -} - -/** - * - * @param {Path} newPath - * @param {fs.Stats} stats - */ -emitAdd(newPath, stats, processPath, opts, forceAdd) { - const pp = processPath(newPath); - const isDir = stats.isDirectory(); - const dirObj = this.fsw._getWatchedDir(sysPath.dirname(pp)); - const base = sysPath.basename(pp); - - // ensure empty dirs get tracked - if (isDir) this.fsw._getWatchedDir(pp); - if (dirObj.has(base)) return; - dirObj.add(base); - - if (!opts.ignoreInitial || forceAdd === true) { - this.fsw._emit(isDir ? EV_ADD_DIR : EV_ADD, pp, stats); - } -} - -initWatch(realPath, path, wh, processPath) { - if (this.fsw.closed) return; - const closer = this._watchWithFsEvents( - wh.watchPath, - sysPath.resolve(realPath || wh.watchPath), - processPath, - wh.globFilter - ); - this.fsw._addPathCloser(path, closer); -} - -/** - * Handle added path with fsevents - * @param {String} path file/dir path or glob pattern - * @param {Function|Boolean=} transform converts working path to what the user expects - * @param {Boolean=} forceAdd ensure add is emitted - * @param {Number=} priorDepth Level of subdirectories already traversed. - * @returns {Promise<void>} - */ -async _addToFsEvents(path, transform, forceAdd, priorDepth) { - if (this.fsw.closed) { - return; - } - const opts = this.fsw.options; - const processPath = typeof transform === FUNCTION_TYPE ? transform : IDENTITY_FN; - - const wh = this.fsw._getWatchHelpers(path); - - // evaluate what is at the path we're being asked to watch - try { - const stats = await statMethods[wh.statMethod](wh.watchPath); - if (this.fsw.closed) return; - if (this.fsw._isIgnored(wh.watchPath, stats)) { - throw null; - } - if (stats.isDirectory()) { - // emit addDir unless this is a glob parent - if (!wh.globFilter) this.emitAdd(processPath(path), stats, processPath, opts, forceAdd); - - // don't recurse further if it would exceed depth setting - if (priorDepth && priorDepth > opts.depth) return; - - // scan the contents of the dir - this.fsw._readdirp(wh.watchPath, { - fileFilter: entry => wh.filterPath(entry), - directoryFilter: entry => wh.filterDir(entry), - ...Depth(opts.depth - (priorDepth || 0)) - }).on(STR_DATA, (entry) => { - // need to check filterPath on dirs b/c filterDir is less restrictive - if (this.fsw.closed) { - return; - } - if (entry.stats.isDirectory() && !wh.filterPath(entry)) return; - - const joinedPath = sysPath.join(wh.watchPath, entry.path); - const {fullPath} = entry; - - if (wh.followSymlinks && entry.stats.isSymbolicLink()) { - // preserve the current depth here since it can't be derived from - // real paths past the symlink - const curDepth = opts.depth === undefined ? - undefined : calcDepth(joinedPath, sysPath.resolve(wh.watchPath)) + 1; - - this._handleFsEventsSymlink(joinedPath, fullPath, processPath, curDepth); - } else { - this.emitAdd(joinedPath, entry.stats, processPath, opts, forceAdd); - } - }).on(EV_ERROR, EMPTY_FN).on(STR_END, () => { - this.fsw._emitReady(); - }); - } else { - this.emitAdd(wh.watchPath, stats, processPath, opts, forceAdd); - this.fsw._emitReady(); - } - } catch (error) { - if (!error || this.fsw._handleError(error)) { - // TODO: Strange thing: "should not choke on an ignored watch path" will be failed without 2 ready calls -__- - this.fsw._emitReady(); - this.fsw._emitReady(); - } - } - - if (opts.persistent && forceAdd !== true) { - if (typeof transform === FUNCTION_TYPE) { - // realpath has already been resolved - this.initWatch(undefined, path, wh, processPath); - } else { - let realPath; - try { - realPath = await realpath(wh.watchPath); - } catch (e) {} - this.initWatch(realPath, path, wh, processPath); - } - } -} - -} - -module.exports = FsEventsHandler; -module.exports.canUse = canUse; diff --git a/node_modules/chokidar/lib/nodefs-handler.js b/node_modules/chokidar/lib/nodefs-handler.js deleted file mode 100644 index 199cfe9..0000000 --- a/node_modules/chokidar/lib/nodefs-handler.js +++ /dev/null @@ -1,654 +0,0 @@ -'use strict'; - -const fs = require('fs'); -const sysPath = require('path'); -const { promisify } = require('util'); -const isBinaryPath = require('is-binary-path'); -const { - isWindows, - isLinux, - EMPTY_FN, - EMPTY_STR, - KEY_LISTENERS, - KEY_ERR, - KEY_RAW, - HANDLER_KEYS, - EV_CHANGE, - EV_ADD, - EV_ADD_DIR, - EV_ERROR, - STR_DATA, - STR_END, - BRACE_START, - STAR -} = require('./constants'); - -const THROTTLE_MODE_WATCH = 'watch'; - -const open = promisify(fs.open); -const stat = promisify(fs.stat); -const lstat = promisify(fs.lstat); -const close = promisify(fs.close); -const fsrealpath = promisify(fs.realpath); - -const statMethods = { lstat, stat }; - -// TODO: emit errors properly. Example: EMFILE on Macos. -const foreach = (val, fn) => { - if (val instanceof Set) { - val.forEach(fn); - } else { - fn(val); - } -}; - -const addAndConvert = (main, prop, item) => { - let container = main[prop]; - if (!(container instanceof Set)) { - main[prop] = container = new Set([container]); - } - container.add(item); -}; - -const clearItem = cont => key => { - const set = cont[key]; - if (set instanceof Set) { - set.clear(); - } else { - delete cont[key]; - } -}; - -const delFromSet = (main, prop, item) => { - const container = main[prop]; - if (container instanceof Set) { - container.delete(item); - } else if (container === item) { - delete main[prop]; - } -}; - -const isEmptySet = (val) => val instanceof Set ? val.size === 0 : !val; - -/** - * @typedef {String} Path - */ - -// fs_watch helpers - -// object to hold per-process fs_watch instances -// (may be shared across chokidar FSWatcher instances) - -/** - * @typedef {Object} FsWatchContainer - * @property {Set} listeners - * @property {Set} errHandlers - * @property {Set} rawEmitters - * @property {fs.FSWatcher=} watcher - * @property {Boolean=} watcherUnusable - */ - -/** - * @type {Map<String,FsWatchContainer>} - */ -const FsWatchInstances = new Map(); - -/** - * Instantiates the fs_watch interface - * @param {String} path to be watched - * @param {Object} options to be passed to fs_watch - * @param {Function} listener main event handler - * @param {Function} errHandler emits info about errors - * @param {Function} emitRaw emits raw event data - * @returns {fs.FSWatcher} new fsevents instance - */ -function createFsWatchInstance(path, options, listener, errHandler, emitRaw) { - const handleEvent = (rawEvent, evPath) => { - listener(path); - emitRaw(rawEvent, evPath, {watchedPath: path}); - - // emit based on events occurring for files from a directory's watcher in - // case the file's watcher misses it (and rely on throttling to de-dupe) - if (evPath && path !== evPath) { - fsWatchBroadcast( - sysPath.resolve(path, evPath), KEY_LISTENERS, sysPath.join(path, evPath) - ); - } - }; - try { - return fs.watch(path, options, handleEvent); - } catch (error) { - errHandler(error); - } -} - -/** - * Helper for passing fs_watch event data to a collection of listeners - * @param {Path} fullPath absolute path bound to fs_watch instance - * @param {String} type listener type - * @param {*=} val1 arguments to be passed to listeners - * @param {*=} val2 - * @param {*=} val3 - */ -const fsWatchBroadcast = (fullPath, type, val1, val2, val3) => { - const cont = FsWatchInstances.get(fullPath); - if (!cont) return; - foreach(cont[type], (listener) => { - listener(val1, val2, val3); - }); -}; - -/** - * Instantiates the fs_watch interface or binds listeners - * to an existing one covering the same file system entry - * @param {String} path - * @param {String} fullPath absolute path - * @param {Object} options to be passed to fs_watch - * @param {Object} handlers container for event listener functions - */ -const setFsWatchListener = (path, fullPath, options, handlers) => { - const {listener, errHandler, rawEmitter} = handlers; - let cont = FsWatchInstances.get(fullPath); - - /** @type {fs.FSWatcher=} */ - let watcher; - if (!options.persistent) { - watcher = createFsWatchInstance( - path, options, listener, errHandler, rawEmitter - ); - return watcher.close.bind(watcher); - } - if (cont) { - addAndConvert(cont, KEY_LISTENERS, listener); - addAndConvert(cont, KEY_ERR, errHandler); - addAndConvert(cont, KEY_RAW, rawEmitter); - } else { - watcher = createFsWatchInstance( - path, - options, - fsWatchBroadcast.bind(null, fullPath, KEY_LISTENERS), - errHandler, // no need to use broadcast here - fsWatchBroadcast.bind(null, fullPath, KEY_RAW) - ); - if (!watcher) return; - watcher.on(EV_ERROR, async (error) => { - const broadcastErr = fsWatchBroadcast.bind(null, fullPath, KEY_ERR); - cont.watcherUnusable = true; // documented since Node 10.4.1 - // Workaround for https://github.com/joyent/node/issues/4337 - if (isWindows && error.code === 'EPERM') { - try { - const fd = await open(path, 'r'); - await close(fd); - broadcastErr(error); - } catch (err) {} - } else { - broadcastErr(error); - } - }); - cont = { - listeners: listener, - errHandlers: errHandler, - rawEmitters: rawEmitter, - watcher - }; - FsWatchInstances.set(fullPath, cont); - } - // const index = cont.listeners.indexOf(listener); - - // removes this instance's listeners and closes the underlying fs_watch - // instance if there are no more listeners left - return () => { - delFromSet(cont, KEY_LISTENERS, listener); - delFromSet(cont, KEY_ERR, errHandler); - delFromSet(cont, KEY_RAW, rawEmitter); - if (isEmptySet(cont.listeners)) { - // Check to protect against issue gh-730. - // if (cont.watcherUnusable) { - cont.watcher.close(); - // } - FsWatchInstances.delete(fullPath); - HANDLER_KEYS.forEach(clearItem(cont)); - cont.watcher = undefined; - Object.freeze(cont); - } - }; -}; - -// fs_watchFile helpers - -// object to hold per-process fs_watchFile instances -// (may be shared across chokidar FSWatcher instances) -const FsWatchFileInstances = new Map(); - -/** - * Instantiates the fs_watchFile interface or binds listeners - * to an existing one covering the same file system entry - * @param {String} path to be watched - * @param {String} fullPath absolute path - * @param {Object} options options to be passed to fs_watchFile - * @param {Object} handlers container for event listener functions - * @returns {Function} closer - */ -const setFsWatchFileListener = (path, fullPath, options, handlers) => { - const {listener, rawEmitter} = handlers; - let cont = FsWatchFileInstances.get(fullPath); - - /* eslint-disable no-unused-vars, prefer-destructuring */ - let listeners = new Set(); - let rawEmitters = new Set(); - - const copts = cont && cont.options; - if (copts && (copts.persistent < options.persistent || copts.interval > options.interval)) { - // "Upgrade" the watcher to persistence or a quicker interval. - // This creates some unlikely edge case issues if the user mixes - // settings in a very weird way, but solving for those cases - // doesn't seem worthwhile for the added complexity. - listeners = cont.listeners; - rawEmitters = cont.rawEmitters; - fs.unwatchFile(fullPath); - cont = undefined; - } - - /* eslint-enable no-unused-vars, prefer-destructuring */ - - if (cont) { - addAndConvert(cont, KEY_LISTENERS, listener); - addAndConvert(cont, KEY_RAW, rawEmitter); - } else { - // TODO - // listeners.add(listener); - // rawEmitters.add(rawEmitter); - cont = { - listeners: listener, - rawEmitters: rawEmitter, - options, - watcher: fs.watchFile(fullPath, options, (curr, prev) => { - foreach(cont.rawEmitters, (rawEmitter) => { - rawEmitter(EV_CHANGE, fullPath, {curr, prev}); - }); - const currmtime = curr.mtimeMs; - if (curr.size !== prev.size || currmtime > prev.mtimeMs || currmtime === 0) { - foreach(cont.listeners, (listener) => listener(path, curr)); - } - }) - }; - FsWatchFileInstances.set(fullPath, cont); - } - // const index = cont.listeners.indexOf(listener); - - // Removes this instance's listeners and closes the underlying fs_watchFile - // instance if there are no more listeners left. - return () => { - delFromSet(cont, KEY_LISTENERS, listener); - delFromSet(cont, KEY_RAW, rawEmitter); - if (isEmptySet(cont.listeners)) { - FsWatchFileInstances.delete(fullPath); - fs.unwatchFile(fullPath); - cont.options = cont.watcher = undefined; - Object.freeze(cont); - } - }; -}; - -/** - * @mixin - */ -class NodeFsHandler { - -/** - * @param {import("../index").FSWatcher} fsW - */ -constructor(fsW) { - this.fsw = fsW; - this._boundHandleError = (error) => fsW._handleError(error); -} - -/** - * Watch file for changes with fs_watchFile or fs_watch. - * @param {String} path to file or dir - * @param {Function} listener on fs change - * @returns {Function} closer for the watcher instance - */ -_watchWithNodeFs(path, listener) { - const opts = this.fsw.options; - const directory = sysPath.dirname(path); - const basename = sysPath.basename(path); - const parent = this.fsw._getWatchedDir(directory); - parent.add(basename); - const absolutePath = sysPath.resolve(path); - const options = {persistent: opts.persistent}; - if (!listener) listener = EMPTY_FN; - - let closer; - if (opts.usePolling) { - options.interval = opts.enableBinaryInterval && isBinaryPath(basename) ? - opts.binaryInterval : opts.interval; - closer = setFsWatchFileListener(path, absolutePath, options, { - listener, - rawEmitter: this.fsw._emitRaw - }); - } else { - closer = setFsWatchListener(path, absolutePath, options, { - listener, - errHandler: this._boundHandleError, - rawEmitter: this.fsw._emitRaw - }); - } - return closer; -} - -/** - * Watch a file and emit add event if warranted. - * @param {Path} file Path - * @param {fs.Stats} stats result of fs_stat - * @param {Boolean} initialAdd was the file added at watch instantiation? - * @returns {Function} closer for the watcher instance - */ -_handleFile(file, stats, initialAdd) { - if (this.fsw.closed) { - return; - } - const dirname = sysPath.dirname(file); - const basename = sysPath.basename(file); - const parent = this.fsw._getWatchedDir(dirname); - // stats is always present - let prevStats = stats; - - // if the file is already being watched, do nothing - if (parent.has(basename)) return; - - const listener = async (path, newStats) => { - if (!this.fsw._throttle(THROTTLE_MODE_WATCH, file, 5)) return; - if (!newStats || newStats.mtimeMs === 0) { - try { - const newStats = await stat(file); - if (this.fsw.closed) return; - // Check that change event was not fired because of changed only accessTime. - const at = newStats.atimeMs; - const mt = newStats.mtimeMs; - if (!at || at <= mt || mt !== prevStats.mtimeMs) { - this.fsw._emit(EV_CHANGE, file, newStats); - } - if (isLinux && prevStats.ino !== newStats.ino) { - this.fsw._closeFile(path) - prevStats = newStats; - this.fsw._addPathCloser(path, this._watchWithNodeFs(file, listener)); - } else { - prevStats = newStats; - } - } catch (error) { - // Fix issues where mtime is null but file is still present - this.fsw._remove(dirname, basename); - } - // add is about to be emitted if file not already tracked in parent - } else if (parent.has(basename)) { - // Check that change event was not fired because of changed only accessTime. - const at = newStats.atimeMs; - const mt = newStats.mtimeMs; - if (!at || at <= mt || mt !== prevStats.mtimeMs) { - this.fsw._emit(EV_CHANGE, file, newStats); - } - prevStats = newStats; - } - } - // kick off the watcher - const closer = this._watchWithNodeFs(file, listener); - - // emit an add event if we're supposed to - if (!(initialAdd && this.fsw.options.ignoreInitial) && this.fsw._isntIgnored(file)) { - if (!this.fsw._throttle(EV_ADD, file, 0)) return; - this.fsw._emit(EV_ADD, file, stats); - } - - return closer; -} - -/** - * Handle symlinks encountered while reading a dir. - * @param {Object} entry returned by readdirp - * @param {String} directory path of dir being read - * @param {String} path of this item - * @param {String} item basename of this item - * @returns {Promise<Boolean>} true if no more processing is needed for this entry. - */ -async _handleSymlink(entry, directory, path, item) { - if (this.fsw.closed) { - return; - } - const full = entry.fullPath; - const dir = this.fsw._getWatchedDir(directory); - - if (!this.fsw.options.followSymlinks) { - // watch symlink directly (don't follow) and detect changes - this.fsw._incrReadyCount(); - - let linkPath; - try { - linkPath = await fsrealpath(path); - } catch (e) { - this.fsw._emitReady(); - return true; - } - - if (this.fsw.closed) return; - if (dir.has(item)) { - if (this.fsw._symlinkPaths.get(full) !== linkPath) { - this.fsw._symlinkPaths.set(full, linkPath); - this.fsw._emit(EV_CHANGE, path, entry.stats); - } - } else { - dir.add(item); - this.fsw._symlinkPaths.set(full, linkPath); - this.fsw._emit(EV_ADD, path, entry.stats); - } - this.fsw._emitReady(); - return true; - } - - // don't follow the same symlink more than once - if (this.fsw._symlinkPaths.has(full)) { - return true; - } - - this.fsw._symlinkPaths.set(full, true); -} - -_handleRead(directory, initialAdd, wh, target, dir, depth, throttler) { - // Normalize the directory name on Windows - directory = sysPath.join(directory, EMPTY_STR); - - if (!wh.hasGlob) { - throttler = this.fsw._throttle('readdir', directory, 1000); - if (!throttler) return; - } - - const previous = this.fsw._getWatchedDir(wh.path); - const current = new Set(); - - let stream = this.fsw._readdirp(directory, { - fileFilter: entry => wh.filterPath(entry), - directoryFilter: entry => wh.filterDir(entry), - depth: 0 - }).on(STR_DATA, async (entry) => { - if (this.fsw.closed) { - stream = undefined; - return; - } - const item = entry.path; - let path = sysPath.join(directory, item); - current.add(item); - - if (entry.stats.isSymbolicLink() && await this._handleSymlink(entry, directory, path, item)) { - return; - } - - if (this.fsw.closed) { - stream = undefined; - return; - } - // Files that present in current directory snapshot - // but absent in previous are added to watch list and - // emit `add` event. - if (item === target || !target && !previous.has(item)) { - this.fsw._incrReadyCount(); - - // ensure relativeness of path is preserved in case of watcher reuse - path = sysPath.join(dir, sysPath.relative(dir, path)); - - this._addToNodeFs(path, initialAdd, wh, depth + 1); - } - }).on(EV_ERROR, this._boundHandleError); - - return new Promise(resolve => - stream.once(STR_END, () => { - if (this.fsw.closed) { - stream = undefined; - return; - } - const wasThrottled = throttler ? throttler.clear() : false; - - resolve(); - - // Files that absent in current directory snapshot - // but present in previous emit `remove` event - // and are removed from @watched[directory]. - previous.getChildren().filter((item) => { - return item !== directory && - !current.has(item) && - // in case of intersecting globs; - // a path may have been filtered out of this readdir, but - // shouldn't be removed because it matches a different glob - (!wh.hasGlob || wh.filterPath({ - fullPath: sysPath.resolve(directory, item) - })); - }).forEach((item) => { - this.fsw._remove(directory, item); - }); - - stream = undefined; - - // one more time for any missed in case changes came in extremely quickly - if (wasThrottled) this._handleRead(directory, false, wh, target, dir, depth, throttler); - }) - ); -} - -/** - * Read directory to add / remove files from `@watched` list and re-read it on change. - * @param {String} dir fs path - * @param {fs.Stats} stats - * @param {Boolean} initialAdd - * @param {Number} depth relative to user-supplied path - * @param {String} target child path targeted for watch - * @param {Object} wh Common watch helpers for this path - * @param {String} realpath - * @returns {Promise<Function>} closer for the watcher instance. - */ -async _handleDir(dir, stats, initialAdd, depth, target, wh, realpath) { - const parentDir = this.fsw._getWatchedDir(sysPath.dirname(dir)); - const tracked = parentDir.has(sysPath.basename(dir)); - if (!(initialAdd && this.fsw.options.ignoreInitial) && !target && !tracked) { - if (!wh.hasGlob || wh.globFilter(dir)) this.fsw._emit(EV_ADD_DIR, dir, stats); - } - - // ensure dir is tracked (harmless if redundant) - parentDir.add(sysPath.basename(dir)); - this.fsw._getWatchedDir(dir); - let throttler; - let closer; - - const oDepth = this.fsw.options.depth; - if ((oDepth == null || depth <= oDepth) && !this.fsw._symlinkPaths.has(realpath)) { - if (!target) { - await this._handleRead(dir, initialAdd, wh, target, dir, depth, throttler); - if (this.fsw.closed) return; - } - - closer = this._watchWithNodeFs(dir, (dirPath, stats) => { - // if current directory is removed, do nothing - if (stats && stats.mtimeMs === 0) return; - - this._handleRead(dirPath, false, wh, target, dir, depth, throttler); - }); - } - return closer; -} - -/** - * Handle added file, directory, or glob pattern. - * Delegates call to _handleFile / _handleDir after checks. - * @param {String} path to file or ir - * @param {Boolean} initialAdd was the file added at watch instantiation? - * @param {Object} priorWh depth relative to user-supplied path - * @param {Number} depth Child path actually targeted for watch - * @param {String=} target Child path actually targeted for watch - * @returns {Promise} - */ -async _addToNodeFs(path, initialAdd, priorWh, depth, target) { - const ready = this.fsw._emitReady; - if (this.fsw._isIgnored(path) || this.fsw.closed) { - ready(); - return false; - } - - const wh = this.fsw._getWatchHelpers(path, depth); - if (!wh.hasGlob && priorWh) { - wh.hasGlob = priorWh.hasGlob; - wh.globFilter = priorWh.globFilter; - wh.filterPath = entry => priorWh.filterPath(entry); - wh.filterDir = entry => priorWh.filterDir(entry); - } - - // evaluate what is at the path we're being asked to watch - try { - const stats = await statMethods[wh.statMethod](wh.watchPath); - if (this.fsw.closed) return; - if (this.fsw._isIgnored(wh.watchPath, stats)) { - ready(); - return false; - } - - const follow = this.fsw.options.followSymlinks && !path.includes(STAR) && !path.includes(BRACE_START); - let closer; - if (stats.isDirectory()) { - const absPath = sysPath.resolve(path); - const targetPath = follow ? await fsrealpath(path) : path; - if (this.fsw.closed) return; - closer = await this._handleDir(wh.watchPath, stats, initialAdd, depth, target, wh, targetPath); - if (this.fsw.closed) return; - // preserve this symlink's target path - if (absPath !== targetPath && targetPath !== undefined) { - this.fsw._symlinkPaths.set(absPath, targetPath); - } - } else if (stats.isSymbolicLink()) { - const targetPath = follow ? await fsrealpath(path) : path; - if (this.fsw.closed) return; - const parent = sysPath.dirname(wh.watchPath); - this.fsw._getWatchedDir(parent).add(wh.watchPath); - this.fsw._emit(EV_ADD, wh.watchPath, stats); - closer = await this._handleDir(parent, stats, initialAdd, depth, path, wh, targetPath); - if (this.fsw.closed) return; - - // preserve this symlink's target path - if (targetPath !== undefined) { - this.fsw._symlinkPaths.set(sysPath.resolve(path), targetPath); - } - } else { - closer = this._handleFile(wh.watchPath, stats, initialAdd); - } - ready(); - - this.fsw._addPathCloser(path, closer); - return false; - - } catch (error) { - if (this.fsw._handleError(error)) { - ready(); - return path; - } - } -} - -} - -module.exports = NodeFsHandler; diff --git a/node_modules/chokidar/package.json b/node_modules/chokidar/package.json deleted file mode 100644 index e8f8b3d..0000000 --- a/node_modules/chokidar/package.json +++ /dev/null @@ -1,70 +0,0 @@ -{ - "name": "chokidar", - "description": "Minimal and efficient cross-platform file watching library", - "version": "3.6.0", - "homepage": "https://github.com/paulmillr/chokidar", - "author": "Paul Miller (https://paulmillr.com)", - "contributors": [ - "Paul Miller (https://paulmillr.com)", - "Elan Shanker" - ], - "engines": { - "node": ">= 8.10.0" - }, - "main": "index.js", - "types": "./types/index.d.ts", - "dependencies": { - "anymatch": "~3.1.2", - "braces": "~3.0.2", - "glob-parent": "~5.1.2", - "is-binary-path": "~2.1.0", - "is-glob": "~4.0.1", - "normalize-path": "~3.0.0", - "readdirp": "~3.6.0" - }, - "optionalDependencies": { - "fsevents": "~2.3.2" - }, - "devDependencies": { - "@types/node": "^14", - "chai": "^4.3", - "dtslint": "^3.3.0", - "eslint": "^7.0.0", - "mocha": "^7.0.0", - "rimraf": "^3.0.0", - "sinon": "^9.0.1", - "sinon-chai": "^3.3.0", - "typescript": "^4.4.3", - "upath": "^1.2.0" - }, - "files": [ - "index.js", - "lib/*.js", - "types/index.d.ts" - ], - "repository": { - "type": "git", - "url": "git+https://github.com/paulmillr/chokidar.git" - }, - "bugs": { - "url": "https://github.com/paulmillr/chokidar/issues" - }, - "license": "MIT", - "scripts": { - "dtslint": "dtslint types", - "lint": "eslint --report-unused-disable-directives --ignore-path .gitignore .", - "build": "npm ls", - "mocha": "mocha --exit --timeout 90000", - "test": "npm run lint && npm run mocha" - }, - "keywords": [ - "fs", - "watch", - "watchFile", - "watcher", - "watching", - "file", - "fsevents" - ], - "funding": "https://paulmillr.com/funding/" -} diff --git a/node_modules/chokidar/types/index.d.ts b/node_modules/chokidar/types/index.d.ts deleted file mode 100644 index 4558066..0000000 --- a/node_modules/chokidar/types/index.d.ts +++ /dev/null @@ -1,192 +0,0 @@ -// TypeScript Version: 3.0 - -/// <reference types="node" /> - -import * as fs from "fs"; -import { EventEmitter } from "events"; -import { Matcher } from 'anymatch'; - -export class FSWatcher extends EventEmitter implements fs.FSWatcher { - options: WatchOptions; - - /** - * Constructs a new FSWatcher instance with optional WatchOptions parameter. - */ - constructor(options?: WatchOptions); - - /** - * Add files, directories, or glob patterns for tracking. Takes an array of strings or just one - * string. - */ - add(paths: string | ReadonlyArray<string>): this; - - /** - * Stop watching files, directories, or glob patterns. Takes an array of strings or just one - * string. - */ - unwatch(paths: string | ReadonlyArray<string>): this; - - /** - * Returns an object representing all the paths on the file system being watched by this - * `FSWatcher` instance. The object's keys are all the directories (using absolute paths unless - * the `cwd` option was used), and the values are arrays of the names of the items contained in - * each directory. - */ - getWatched(): { - [directory: string]: string[]; - }; - - /** - * Removes all listeners from watched files. - */ - close(): Promise<void>; - - on(event: 'add'|'addDir'|'change', listener: (path: string, stats?: fs.Stats) => void): this; - - on(event: 'all', listener: (eventName: 'add'|'addDir'|'change'|'unlink'|'unlinkDir', path: string, stats?: fs.Stats) => void): this; - - /** - * Error occurred - */ - on(event: 'error', listener: (error: Error) => void): this; - - /** - * Exposes the native Node `fs.FSWatcher events` - */ - on(event: 'raw', listener: (eventName: string, path: string, details: any) => void): this; - - /** - * Fires when the initial scan is complete - */ - on(event: 'ready', listener: () => void): this; - - on(event: 'unlink'|'unlinkDir', listener: (path: string) => void): this; - - on(event: string, listener: (...args: any[]) => void): this; - - ref(): this; - - unref(): this; -} - -export interface WatchOptions { - /** - * Indicates whether the process should continue to run as long as files are being watched. If - * set to `false` when using `fsevents` to watch, no more events will be emitted after `ready`, - * even if the process continues to run. - */ - persistent?: boolean; - - /** - * ([anymatch](https://github.com/micromatch/anymatch)-compatible definition) Defines files/paths to - * be ignored. The whole relative or absolute path is tested, not just filename. If a function - * with two arguments is provided, it gets called twice per path - once with a single argument - * (the path), second time with two arguments (the path and the - * [`fs.Stats`](https://nodejs.org/api/fs.html#fs_class_fs_stats) object of that path). - */ - ignored?: Matcher; - - /** - * If set to `false` then `add`/`addDir` events are also emitted for matching paths while - * instantiating the watching as chokidar discovers these file paths (before the `ready` event). - */ - ignoreInitial?: boolean; - - /** - * When `false`, only the symlinks themselves will be watched for changes instead of following - * the link references and bubbling events through the link's path. - */ - followSymlinks?: boolean; - - /** - * The base directory from which watch `paths` are to be derived. Paths emitted with events will - * be relative to this. - */ - cwd?: string; - - /** - * If set to true then the strings passed to .watch() and .add() are treated as literal path - * names, even if they look like globs. Default: false. - */ - disableGlobbing?: boolean; - - /** - * Whether to use fs.watchFile (backed by polling), or fs.watch. If polling leads to high CPU - * utilization, consider setting this to `false`. It is typically necessary to **set this to - * `true` to successfully watch files over a network**, and it may be necessary to successfully - * watch files in other non-standard situations. Setting to `true` explicitly on OS X overrides - * the `useFsEvents` default. - */ - usePolling?: boolean; - - /** - * Whether to use the `fsevents` watching interface if available. When set to `true` explicitly - * and `fsevents` is available this supercedes the `usePolling` setting. When set to `false` on - * OS X, `usePolling: true` becomes the default. - */ - useFsEvents?: boolean; - - /** - * If relying upon the [`fs.Stats`](https://nodejs.org/api/fs.html#fs_class_fs_stats) object that - * may get passed with `add`, `addDir`, and `change` events, set this to `true` to ensure it is - * provided even in cases where it wasn't already available from the underlying watch events. - */ - alwaysStat?: boolean; - - /** - * If set, limits how many levels of subdirectories will be traversed. - */ - depth?: number; - - /** - * Interval of file system polling. - */ - interval?: number; - - /** - * Interval of file system polling for binary files. ([see list of binary extensions](https://gi - * thub.com/sindresorhus/binary-extensions/blob/master/binary-extensions.json)) - */ - binaryInterval?: number; - - /** - * Indicates whether to watch files that don't have read permissions if possible. If watching - * fails due to `EPERM` or `EACCES` with this set to `true`, the errors will be suppressed - * silently. - */ - ignorePermissionErrors?: boolean; - - /** - * `true` if `useFsEvents` and `usePolling` are `false`). Automatically filters out artifacts - * that occur when using editors that use "atomic writes" instead of writing directly to the - * source file. If a file is re-added within 100 ms of being deleted, Chokidar emits a `change` - * event rather than `unlink` then `add`. If the default of 100 ms does not work well for you, - * you can override it by setting `atomic` to a custom value, in milliseconds. - */ - atomic?: boolean | number; - - /** - * can be set to an object in order to adjust timing params: - */ - awaitWriteFinish?: AwaitWriteFinishOptions | boolean; -} - -export interface AwaitWriteFinishOptions { - /** - * Amount of time in milliseconds for a file size to remain constant before emitting its event. - */ - stabilityThreshold?: number; - - /** - * File size polling interval. - */ - pollInterval?: number; -} - -/** - * produces an instance of `FSWatcher`. - */ -export function watch( - paths: string | ReadonlyArray<string>, - options?: WatchOptions -): FSWatcher; diff --git a/node_modules/cliui/build/index.cjs b/node_modules/cliui/build/index.cjs deleted file mode 100644 index 82126b6..0000000 --- a/node_modules/cliui/build/index.cjs +++ /dev/null @@ -1,302 +0,0 @@ -'use strict'; - -const align = { - right: alignRight, - center: alignCenter -}; -const top = 0; -const right = 1; -const bottom = 2; -const left = 3; -class UI { - constructor(opts) { - var _a; - this.width = opts.width; - this.wrap = (_a = opts.wrap) !== null && _a !== void 0 ? _a : true; - this.rows = []; - } - span(...args) { - const cols = this.div(...args); - cols.span = true; - } - resetOutput() { - this.rows = []; - } - div(...args) { - if (args.length === 0) { - this.div(''); - } - if (this.wrap && this.shouldApplyLayoutDSL(...args) && typeof args[0] === 'string') { - return this.applyLayoutDSL(args[0]); - } - const cols = args.map(arg => { - if (typeof arg === 'string') { - return this.colFromString(arg); - } - return arg; - }); - this.rows.push(cols); - return cols; - } - shouldApplyLayoutDSL(...args) { - return args.length === 1 && typeof args[0] === 'string' && - /[\t\n]/.test(args[0]); - } - applyLayoutDSL(str) { - const rows = str.split('\n').map(row => row.split('\t')); - let leftColumnWidth = 0; - // simple heuristic for layout, make sure the - // second column lines up along the left-hand. - // don't allow the first column to take up more - // than 50% of the screen. - rows.forEach(columns => { - if (columns.length > 1 && mixin.stringWidth(columns[0]) > leftColumnWidth) { - leftColumnWidth = Math.min(Math.floor(this.width * 0.5), mixin.stringWidth(columns[0])); - } - }); - // generate a table: - // replacing ' ' with padding calculations. - // using the algorithmically generated width. - rows.forEach(columns => { - this.div(...columns.map((r, i) => { - return { - text: r.trim(), - padding: this.measurePadding(r), - width: (i === 0 && columns.length > 1) ? leftColumnWidth : undefined - }; - })); - }); - return this.rows[this.rows.length - 1]; - } - colFromString(text) { - return { - text, - padding: this.measurePadding(text) - }; - } - measurePadding(str) { - // measure padding without ansi escape codes - const noAnsi = mixin.stripAnsi(str); - return [0, noAnsi.match(/\s*$/)[0].length, 0, noAnsi.match(/^\s*/)[0].length]; - } - toString() { - const lines = []; - this.rows.forEach(row => { - this.rowToString(row, lines); - }); - // don't display any lines with the - // hidden flag set. - return lines - .filter(line => !line.hidden) - .map(line => line.text) - .join('\n'); - } - rowToString(row, lines) { - this.rasterize(row).forEach((rrow, r) => { - let str = ''; - rrow.forEach((col, c) => { - const { width } = row[c]; // the width with padding. - const wrapWidth = this.negatePadding(row[c]); // the width without padding. - let ts = col; // temporary string used during alignment/padding. - if (wrapWidth > mixin.stringWidth(col)) { - ts += ' '.repeat(wrapWidth - mixin.stringWidth(col)); - } - // align the string within its column. - if (row[c].align && row[c].align !== 'left' && this.wrap) { - const fn = align[row[c].align]; - ts = fn(ts, wrapWidth); - if (mixin.stringWidth(ts) < wrapWidth) { - ts += ' '.repeat((width || 0) - mixin.stringWidth(ts) - 1); - } - } - // apply border and padding to string. - const padding = row[c].padding || [0, 0, 0, 0]; - if (padding[left]) { - str += ' '.repeat(padding[left]); - } - str += addBorder(row[c], ts, '| '); - str += ts; - str += addBorder(row[c], ts, ' |'); - if (padding[right]) { - str += ' '.repeat(padding[right]); - } - // if prior row is span, try to render the - // current row on the prior line. - if (r === 0 && lines.length > 0) { - str = this.renderInline(str, lines[lines.length - 1]); - } - }); - // remove trailing whitespace. - lines.push({ - text: str.replace(/ +$/, ''), - span: row.span - }); - }); - return lines; - } - // if the full 'source' can render in - // the target line, do so. - renderInline(source, previousLine) { - const match = source.match(/^ */); - const leadingWhitespace = match ? match[0].length : 0; - const target = previousLine.text; - const targetTextWidth = mixin.stringWidth(target.trimRight()); - if (!previousLine.span) { - return source; - } - // if we're not applying wrapping logic, - // just always append to the span. - if (!this.wrap) { - previousLine.hidden = true; - return target + source; - } - if (leadingWhitespace < targetTextWidth) { - return source; - } - previousLine.hidden = true; - return target.trimRight() + ' '.repeat(leadingWhitespace - targetTextWidth) + source.trimLeft(); - } - rasterize(row) { - const rrows = []; - const widths = this.columnWidths(row); - let wrapped; - // word wrap all columns, and create - // a data-structure that is easy to rasterize. - row.forEach((col, c) => { - // leave room for left and right padding. - col.width = widths[c]; - if (this.wrap) { - wrapped = mixin.wrap(col.text, this.negatePadding(col), { hard: true }).split('\n'); - } - else { - wrapped = col.text.split('\n'); - } - if (col.border) { - wrapped.unshift('.' + '-'.repeat(this.negatePadding(col) + 2) + '.'); - wrapped.push("'" + '-'.repeat(this.negatePadding(col) + 2) + "'"); - } - // add top and bottom padding. - if (col.padding) { - wrapped.unshift(...new Array(col.padding[top] || 0).fill('')); - wrapped.push(...new Array(col.padding[bottom] || 0).fill('')); - } - wrapped.forEach((str, r) => { - if (!rrows[r]) { - rrows.push([]); - } - const rrow = rrows[r]; - for (let i = 0; i < c; i++) { - if (rrow[i] === undefined) { - rrow.push(''); - } - } - rrow.push(str); - }); - }); - return rrows; - } - negatePadding(col) { - let wrapWidth = col.width || 0; - if (col.padding) { - wrapWidth -= (col.padding[left] || 0) + (col.padding[right] || 0); - } - if (col.border) { - wrapWidth -= 4; - } - return wrapWidth; - } - columnWidths(row) { - if (!this.wrap) { - return row.map(col => { - return col.width || mixin.stringWidth(col.text); - }); - } - let unset = row.length; - let remainingWidth = this.width; - // column widths can be set in config. - const widths = row.map(col => { - if (col.width) { - unset--; - remainingWidth -= col.width; - return col.width; - } - return undefined; - }); - // any unset widths should be calculated. - const unsetWidth = unset ? Math.floor(remainingWidth / unset) : 0; - return widths.map((w, i) => { - if (w === undefined) { - return Math.max(unsetWidth, _minWidth(row[i])); - } - return w; - }); - } -} -function addBorder(col, ts, style) { - if (col.border) { - if (/[.']-+[.']/.test(ts)) { - return ''; - } - if (ts.trim().length !== 0) { - return style; - } - return ' '; - } - return ''; -} -// calculates the minimum width of -// a column, based on padding preferences. -function _minWidth(col) { - const padding = col.padding || []; - const minWidth = 1 + (padding[left] || 0) + (padding[right] || 0); - if (col.border) { - return minWidth + 4; - } - return minWidth; -} -function getWindowWidth() { - /* istanbul ignore next: depends on terminal */ - if (typeof process === 'object' && process.stdout && process.stdout.columns) { - return process.stdout.columns; - } - return 80; -} -function alignRight(str, width) { - str = str.trim(); - const strWidth = mixin.stringWidth(str); - if (strWidth < width) { - return ' '.repeat(width - strWidth) + str; - } - return str; -} -function alignCenter(str, width) { - str = str.trim(); - const strWidth = mixin.stringWidth(str); - /* istanbul ignore next */ - if (strWidth >= width) { - return str; - } - return ' '.repeat((width - strWidth) >> 1) + str; -} -let mixin; -function cliui(opts, _mixin) { - mixin = _mixin; - return new UI({ - width: (opts === null || opts === void 0 ? void 0 : opts.width) || getWindowWidth(), - wrap: opts === null || opts === void 0 ? void 0 : opts.wrap - }); -} - -// Bootstrap cliui with CommonJS dependencies: -const stringWidth = require('string-width'); -const stripAnsi = require('strip-ansi'); -const wrap = require('wrap-ansi'); -function ui(opts) { - return cliui(opts, { - stringWidth, - stripAnsi, - wrap - }); -} - -module.exports = ui; diff --git a/node_modules/cliui/build/lib/index.js b/node_modules/cliui/build/lib/index.js deleted file mode 100644 index b6eb054..0000000 --- a/node_modules/cliui/build/lib/index.js +++ /dev/null @@ -1,287 +0,0 @@ -'use strict'; -const align = { - right: alignRight, - center: alignCenter -}; -const top = 0; -const right = 1; -const bottom = 2; -const left = 3; -export class UI { - constructor(opts) { - var _a; - this.width = opts.width; - this.wrap = (_a = opts.wrap) !== null && _a !== void 0 ? _a : true; - this.rows = []; - } - span(...args) { - const cols = this.div(...args); - cols.span = true; - } - resetOutput() { - this.rows = []; - } - div(...args) { - if (args.length === 0) { - this.div(''); - } - if (this.wrap && this.shouldApplyLayoutDSL(...args) && typeof args[0] === 'string') { - return this.applyLayoutDSL(args[0]); - } - const cols = args.map(arg => { - if (typeof arg === 'string') { - return this.colFromString(arg); - } - return arg; - }); - this.rows.push(cols); - return cols; - } - shouldApplyLayoutDSL(...args) { - return args.length === 1 && typeof args[0] === 'string' && - /[\t\n]/.test(args[0]); - } - applyLayoutDSL(str) { - const rows = str.split('\n').map(row => row.split('\t')); - let leftColumnWidth = 0; - // simple heuristic for layout, make sure the - // second column lines up along the left-hand. - // don't allow the first column to take up more - // than 50% of the screen. - rows.forEach(columns => { - if (columns.length > 1 && mixin.stringWidth(columns[0]) > leftColumnWidth) { - leftColumnWidth = Math.min(Math.floor(this.width * 0.5), mixin.stringWidth(columns[0])); - } - }); - // generate a table: - // replacing ' ' with padding calculations. - // using the algorithmically generated width. - rows.forEach(columns => { - this.div(...columns.map((r, i) => { - return { - text: r.trim(), - padding: this.measurePadding(r), - width: (i === 0 && columns.length > 1) ? leftColumnWidth : undefined - }; - })); - }); - return this.rows[this.rows.length - 1]; - } - colFromString(text) { - return { - text, - padding: this.measurePadding(text) - }; - } - measurePadding(str) { - // measure padding without ansi escape codes - const noAnsi = mixin.stripAnsi(str); - return [0, noAnsi.match(/\s*$/)[0].length, 0, noAnsi.match(/^\s*/)[0].length]; - } - toString() { - const lines = []; - this.rows.forEach(row => { - this.rowToString(row, lines); - }); - // don't display any lines with the - // hidden flag set. - return lines - .filter(line => !line.hidden) - .map(line => line.text) - .join('\n'); - } - rowToString(row, lines) { - this.rasterize(row).forEach((rrow, r) => { - let str = ''; - rrow.forEach((col, c) => { - const { width } = row[c]; // the width with padding. - const wrapWidth = this.negatePadding(row[c]); // the width without padding. - let ts = col; // temporary string used during alignment/padding. - if (wrapWidth > mixin.stringWidth(col)) { - ts += ' '.repeat(wrapWidth - mixin.stringWidth(col)); - } - // align the string within its column. - if (row[c].align && row[c].align !== 'left' && this.wrap) { - const fn = align[row[c].align]; - ts = fn(ts, wrapWidth); - if (mixin.stringWidth(ts) < wrapWidth) { - ts += ' '.repeat((width || 0) - mixin.stringWidth(ts) - 1); - } - } - // apply border and padding to string. - const padding = row[c].padding || [0, 0, 0, 0]; - if (padding[left]) { - str += ' '.repeat(padding[left]); - } - str += addBorder(row[c], ts, '| '); - str += ts; - str += addBorder(row[c], ts, ' |'); - if (padding[right]) { - str += ' '.repeat(padding[right]); - } - // if prior row is span, try to render the - // current row on the prior line. - if (r === 0 && lines.length > 0) { - str = this.renderInline(str, lines[lines.length - 1]); - } - }); - // remove trailing whitespace. - lines.push({ - text: str.replace(/ +$/, ''), - span: row.span - }); - }); - return lines; - } - // if the full 'source' can render in - // the target line, do so. - renderInline(source, previousLine) { - const match = source.match(/^ */); - const leadingWhitespace = match ? match[0].length : 0; - const target = previousLine.text; - const targetTextWidth = mixin.stringWidth(target.trimRight()); - if (!previousLine.span) { - return source; - } - // if we're not applying wrapping logic, - // just always append to the span. - if (!this.wrap) { - previousLine.hidden = true; - return target + source; - } - if (leadingWhitespace < targetTextWidth) { - return source; - } - previousLine.hidden = true; - return target.trimRight() + ' '.repeat(leadingWhitespace - targetTextWidth) + source.trimLeft(); - } - rasterize(row) { - const rrows = []; - const widths = this.columnWidths(row); - let wrapped; - // word wrap all columns, and create - // a data-structure that is easy to rasterize. - row.forEach((col, c) => { - // leave room for left and right padding. - col.width = widths[c]; - if (this.wrap) { - wrapped = mixin.wrap(col.text, this.negatePadding(col), { hard: true }).split('\n'); - } - else { - wrapped = col.text.split('\n'); - } - if (col.border) { - wrapped.unshift('.' + '-'.repeat(this.negatePadding(col) + 2) + '.'); - wrapped.push("'" + '-'.repeat(this.negatePadding(col) + 2) + "'"); - } - // add top and bottom padding. - if (col.padding) { - wrapped.unshift(...new Array(col.padding[top] || 0).fill('')); - wrapped.push(...new Array(col.padding[bottom] || 0).fill('')); - } - wrapped.forEach((str, r) => { - if (!rrows[r]) { - rrows.push([]); - } - const rrow = rrows[r]; - for (let i = 0; i < c; i++) { - if (rrow[i] === undefined) { - rrow.push(''); - } - } - rrow.push(str); - }); - }); - return rrows; - } - negatePadding(col) { - let wrapWidth = col.width || 0; - if (col.padding) { - wrapWidth -= (col.padding[left] || 0) + (col.padding[right] || 0); - } - if (col.border) { - wrapWidth -= 4; - } - return wrapWidth; - } - columnWidths(row) { - if (!this.wrap) { - return row.map(col => { - return col.width || mixin.stringWidth(col.text); - }); - } - let unset = row.length; - let remainingWidth = this.width; - // column widths can be set in config. - const widths = row.map(col => { - if (col.width) { - unset--; - remainingWidth -= col.width; - return col.width; - } - return undefined; - }); - // any unset widths should be calculated. - const unsetWidth = unset ? Math.floor(remainingWidth / unset) : 0; - return widths.map((w, i) => { - if (w === undefined) { - return Math.max(unsetWidth, _minWidth(row[i])); - } - return w; - }); - } -} -function addBorder(col, ts, style) { - if (col.border) { - if (/[.']-+[.']/.test(ts)) { - return ''; - } - if (ts.trim().length !== 0) { - return style; - } - return ' '; - } - return ''; -} -// calculates the minimum width of -// a column, based on padding preferences. -function _minWidth(col) { - const padding = col.padding || []; - const minWidth = 1 + (padding[left] || 0) + (padding[right] || 0); - if (col.border) { - return minWidth + 4; - } - return minWidth; -} -function getWindowWidth() { - /* istanbul ignore next: depends on terminal */ - if (typeof process === 'object' && process.stdout && process.stdout.columns) { - return process.stdout.columns; - } - return 80; -} -function alignRight(str, width) { - str = str.trim(); - const strWidth = mixin.stringWidth(str); - if (strWidth < width) { - return ' '.repeat(width - strWidth) + str; - } - return str; -} -function alignCenter(str, width) { - str = str.trim(); - const strWidth = mixin.stringWidth(str); - /* istanbul ignore next */ - if (strWidth >= width) { - return str; - } - return ' '.repeat((width - strWidth) >> 1) + str; -} -let mixin; -export function cliui(opts, _mixin) { - mixin = _mixin; - return new UI({ - width: (opts === null || opts === void 0 ? void 0 : opts.width) || getWindowWidth(), - wrap: opts === null || opts === void 0 ? void 0 : opts.wrap - }); -} diff --git a/node_modules/cliui/build/lib/string-utils.js b/node_modules/cliui/build/lib/string-utils.js deleted file mode 100644 index 4b87453..0000000 --- a/node_modules/cliui/build/lib/string-utils.js +++ /dev/null @@ -1,27 +0,0 @@ -// Minimal replacement for ansi string helpers "wrap-ansi" and "strip-ansi". -// to facilitate ESM and Deno modules. -// TODO: look at porting https://www.npmjs.com/package/wrap-ansi to ESM. -// The npm application -// Copyright (c) npm, Inc. and Contributors -// Licensed on the terms of The Artistic License 2.0 -// See: https://github.com/npm/cli/blob/4c65cd952bc8627811735bea76b9b110cc4fc80e/lib/utils/ansi-trim.js -const ansi = new RegExp('\x1b(?:\\[(?:\\d+[ABCDEFGJKSTm]|\\d+;\\d+[Hfm]|' + - '\\d+;\\d+;\\d+m|6n|s|u|\\?25[lh])|\\w)', 'g'); -export function stripAnsi(str) { - return str.replace(ansi, ''); -} -export function wrap(str, width) { - const [start, end] = str.match(ansi) || ['', '']; - str = stripAnsi(str); - let wrapped = ''; - for (let i = 0; i < str.length; i++) { - if (i !== 0 && (i % width) === 0) { - wrapped += '\n'; - } - wrapped += str.charAt(i); - } - if (start && end) { - wrapped = `${start}${wrapped}${end}`; - } - return wrapped; -} diff --git a/node_modules/cliui/index.mjs b/node_modules/cliui/index.mjs deleted file mode 100644 index bc7a022..0000000 --- a/node_modules/cliui/index.mjs +++ /dev/null @@ -1,13 +0,0 @@ -// Bootstrap cliui with CommonJS dependencies: -import { cliui } from './build/lib/index.js' -import { wrap, stripAnsi } from './build/lib/string-utils.js' - -export default function ui (opts) { - return cliui(opts, { - stringWidth: (str) => { - return [...str].length - }, - stripAnsi, - wrap - }) -} diff --git a/node_modules/cliui/node_modules/ansi-regex/index.d.ts b/node_modules/cliui/node_modules/ansi-regex/index.d.ts deleted file mode 100644 index 2dbf6af..0000000 --- a/node_modules/cliui/node_modules/ansi-regex/index.d.ts +++ /dev/null @@ -1,37 +0,0 @@ -declare namespace ansiRegex { - interface Options { - /** - Match only the first ANSI escape. - - @default false - */ - onlyFirst: boolean; - } -} - -/** -Regular expression for matching ANSI escape codes. - -@example -``` -import ansiRegex = require('ansi-regex'); - -ansiRegex().test('\u001B[4mcake\u001B[0m'); -//=> true - -ansiRegex().test('cake'); -//=> false - -'\u001B[4mcake\u001B[0m'.match(ansiRegex()); -//=> ['\u001B[4m', '\u001B[0m'] - -'\u001B[4mcake\u001B[0m'.match(ansiRegex({onlyFirst: true})); -//=> ['\u001B[4m'] - -'\u001B]8;;https://github.com\u0007click\u001B]8;;\u0007'.match(ansiRegex()); -//=> ['\u001B]8;;https://github.com\u0007', '\u001B]8;;\u0007'] -``` -*/ -declare function ansiRegex(options?: ansiRegex.Options): RegExp; - -export = ansiRegex; diff --git a/node_modules/cliui/node_modules/ansi-regex/index.js b/node_modules/cliui/node_modules/ansi-regex/index.js deleted file mode 100644 index 616ff83..0000000 --- a/node_modules/cliui/node_modules/ansi-regex/index.js +++ /dev/null @@ -1,10 +0,0 @@ -'use strict'; - -module.exports = ({onlyFirst = false} = {}) => { - const pattern = [ - '[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)', - '(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))' - ].join('|'); - - return new RegExp(pattern, onlyFirst ? undefined : 'g'); -}; diff --git a/node_modules/cliui/node_modules/ansi-regex/package.json b/node_modules/cliui/node_modules/ansi-regex/package.json deleted file mode 100644 index 017f531..0000000 --- a/node_modules/cliui/node_modules/ansi-regex/package.json +++ /dev/null @@ -1,55 +0,0 @@ -{ - "name": "ansi-regex", - "version": "5.0.1", - "description": "Regular expression for matching ANSI escape codes", - "license": "MIT", - "repository": "chalk/ansi-regex", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "engines": { - "node": ">=8" - }, - "scripts": { - "test": "xo && ava && tsd", - "view-supported": "node fixtures/view-codes.js" - }, - "files": [ - "index.js", - "index.d.ts" - ], - "keywords": [ - "ansi", - "styles", - "color", - "colour", - "colors", - "terminal", - "console", - "cli", - "string", - "tty", - "escape", - "formatting", - "rgb", - "256", - "shell", - "xterm", - "command-line", - "text", - "regex", - "regexp", - "re", - "match", - "test", - "find", - "pattern" - ], - "devDependencies": { - "ava": "^2.4.0", - "tsd": "^0.9.0", - "xo": "^0.25.3" - } -} diff --git a/node_modules/cliui/node_modules/ansi-styles/index.d.ts b/node_modules/cliui/node_modules/ansi-styles/index.d.ts deleted file mode 100644 index 44a907e..0000000 --- a/node_modules/cliui/node_modules/ansi-styles/index.d.ts +++ /dev/null @@ -1,345 +0,0 @@ -declare type CSSColor = - | 'aliceblue' - | 'antiquewhite' - | 'aqua' - | 'aquamarine' - | 'azure' - | 'beige' - | 'bisque' - | 'black' - | 'blanchedalmond' - | 'blue' - | 'blueviolet' - | 'brown' - | 'burlywood' - | 'cadetblue' - | 'chartreuse' - | 'chocolate' - | 'coral' - | 'cornflowerblue' - | 'cornsilk' - | 'crimson' - | 'cyan' - | 'darkblue' - | 'darkcyan' - | 'darkgoldenrod' - | 'darkgray' - | 'darkgreen' - | 'darkgrey' - | 'darkkhaki' - | 'darkmagenta' - | 'darkolivegreen' - | 'darkorange' - | 'darkorchid' - | 'darkred' - | 'darksalmon' - | 'darkseagreen' - | 'darkslateblue' - | 'darkslategray' - | 'darkslategrey' - | 'darkturquoise' - | 'darkviolet' - | 'deeppink' - | 'deepskyblue' - | 'dimgray' - | 'dimgrey' - | 'dodgerblue' - | 'firebrick' - | 'floralwhite' - | 'forestgreen' - | 'fuchsia' - | 'gainsboro' - | 'ghostwhite' - | 'gold' - | 'goldenrod' - | 'gray' - | 'green' - | 'greenyellow' - | 'grey' - | 'honeydew' - | 'hotpink' - | 'indianred' - | 'indigo' - | 'ivory' - | 'khaki' - | 'lavender' - | 'lavenderblush' - | 'lawngreen' - | 'lemonchiffon' - | 'lightblue' - | 'lightcoral' - | 'lightcyan' - | 'lightgoldenrodyellow' - | 'lightgray' - | 'lightgreen' - | 'lightgrey' - | 'lightpink' - | 'lightsalmon' - | 'lightseagreen' - | 'lightskyblue' - | 'lightslategray' - | 'lightslategrey' - | 'lightsteelblue' - | 'lightyellow' - | 'lime' - | 'limegreen' - | 'linen' - | 'magenta' - | 'maroon' - | 'mediumaquamarine' - | 'mediumblue' - | 'mediumorchid' - | 'mediumpurple' - | 'mediumseagreen' - | 'mediumslateblue' - | 'mediumspringgreen' - | 'mediumturquoise' - | 'mediumvioletred' - | 'midnightblue' - | 'mintcream' - | 'mistyrose' - | 'moccasin' - | 'navajowhite' - | 'navy' - | 'oldlace' - | 'olive' - | 'olivedrab' - | 'orange' - | 'orangered' - | 'orchid' - | 'palegoldenrod' - | 'palegreen' - | 'paleturquoise' - | 'palevioletred' - | 'papayawhip' - | 'peachpuff' - | 'peru' - | 'pink' - | 'plum' - | 'powderblue' - | 'purple' - | 'rebeccapurple' - | 'red' - | 'rosybrown' - | 'royalblue' - | 'saddlebrown' - | 'salmon' - | 'sandybrown' - | 'seagreen' - | 'seashell' - | 'sienna' - | 'silver' - | 'skyblue' - | 'slateblue' - | 'slategray' - | 'slategrey' - | 'snow' - | 'springgreen' - | 'steelblue' - | 'tan' - | 'teal' - | 'thistle' - | 'tomato' - | 'turquoise' - | 'violet' - | 'wheat' - | 'white' - | 'whitesmoke' - | 'yellow' - | 'yellowgreen'; - -declare namespace ansiStyles { - interface ColorConvert { - /** - The RGB color space. - - @param red - (`0`-`255`) - @param green - (`0`-`255`) - @param blue - (`0`-`255`) - */ - rgb(red: number, green: number, blue: number): string; - - /** - The RGB HEX color space. - - @param hex - A hexadecimal string containing RGB data. - */ - hex(hex: string): string; - - /** - @param keyword - A CSS color name. - */ - keyword(keyword: CSSColor): string; - - /** - The HSL color space. - - @param hue - (`0`-`360`) - @param saturation - (`0`-`100`) - @param lightness - (`0`-`100`) - */ - hsl(hue: number, saturation: number, lightness: number): string; - - /** - The HSV color space. - - @param hue - (`0`-`360`) - @param saturation - (`0`-`100`) - @param value - (`0`-`100`) - */ - hsv(hue: number, saturation: number, value: number): string; - - /** - The HSV color space. - - @param hue - (`0`-`360`) - @param whiteness - (`0`-`100`) - @param blackness - (`0`-`100`) - */ - hwb(hue: number, whiteness: number, blackness: number): string; - - /** - Use a [4-bit unsigned number](https://en.wikipedia.org/wiki/ANSI_escape_code#3/4-bit) to set text color. - */ - ansi(ansi: number): string; - - /** - Use an [8-bit unsigned number](https://en.wikipedia.org/wiki/ANSI_escape_code#8-bit) to set text color. - */ - ansi256(ansi: number): string; - } - - interface CSPair { - /** - The ANSI terminal control sequence for starting this style. - */ - readonly open: string; - - /** - The ANSI terminal control sequence for ending this style. - */ - readonly close: string; - } - - interface ColorBase { - readonly ansi: ColorConvert; - readonly ansi256: ColorConvert; - readonly ansi16m: ColorConvert; - - /** - The ANSI terminal control sequence for ending this color. - */ - readonly close: string; - } - - interface Modifier { - /** - Resets the current color chain. - */ - readonly reset: CSPair; - - /** - Make text bold. - */ - readonly bold: CSPair; - - /** - Emitting only a small amount of light. - */ - readonly dim: CSPair; - - /** - Make text italic. (Not widely supported) - */ - readonly italic: CSPair; - - /** - Make text underline. (Not widely supported) - */ - readonly underline: CSPair; - - /** - Inverse background and foreground colors. - */ - readonly inverse: CSPair; - - /** - Prints the text, but makes it invisible. - */ - readonly hidden: CSPair; - - /** - Puts a horizontal line through the center of the text. (Not widely supported) - */ - readonly strikethrough: CSPair; - } - - interface ForegroundColor { - readonly black: CSPair; - readonly red: CSPair; - readonly green: CSPair; - readonly yellow: CSPair; - readonly blue: CSPair; - readonly cyan: CSPair; - readonly magenta: CSPair; - readonly white: CSPair; - - /** - Alias for `blackBright`. - */ - readonly gray: CSPair; - - /** - Alias for `blackBright`. - */ - readonly grey: CSPair; - - readonly blackBright: CSPair; - readonly redBright: CSPair; - readonly greenBright: CSPair; - readonly yellowBright: CSPair; - readonly blueBright: CSPair; - readonly cyanBright: CSPair; - readonly magentaBright: CSPair; - readonly whiteBright: CSPair; - } - - interface BackgroundColor { - readonly bgBlack: CSPair; - readonly bgRed: CSPair; - readonly bgGreen: CSPair; - readonly bgYellow: CSPair; - readonly bgBlue: CSPair; - readonly bgCyan: CSPair; - readonly bgMagenta: CSPair; - readonly bgWhite: CSPair; - - /** - Alias for `bgBlackBright`. - */ - readonly bgGray: CSPair; - - /** - Alias for `bgBlackBright`. - */ - readonly bgGrey: CSPair; - - readonly bgBlackBright: CSPair; - readonly bgRedBright: CSPair; - readonly bgGreenBright: CSPair; - readonly bgYellowBright: CSPair; - readonly bgBlueBright: CSPair; - readonly bgCyanBright: CSPair; - readonly bgMagentaBright: CSPair; - readonly bgWhiteBright: CSPair; - } -} - -declare const ansiStyles: { - readonly modifier: ansiStyles.Modifier; - readonly color: ansiStyles.ForegroundColor & ansiStyles.ColorBase; - readonly bgColor: ansiStyles.BackgroundColor & ansiStyles.ColorBase; - readonly codes: ReadonlyMap<number, number>; -} & ansiStyles.BackgroundColor & ansiStyles.ForegroundColor & ansiStyles.Modifier; - -export = ansiStyles; diff --git a/node_modules/cliui/node_modules/ansi-styles/index.js b/node_modules/cliui/node_modules/ansi-styles/index.js deleted file mode 100644 index 5d82581..0000000 --- a/node_modules/cliui/node_modules/ansi-styles/index.js +++ /dev/null @@ -1,163 +0,0 @@ -'use strict'; - -const wrapAnsi16 = (fn, offset) => (...args) => { - const code = fn(...args); - return `\u001B[${code + offset}m`; -}; - -const wrapAnsi256 = (fn, offset) => (...args) => { - const code = fn(...args); - return `\u001B[${38 + offset};5;${code}m`; -}; - -const wrapAnsi16m = (fn, offset) => (...args) => { - const rgb = fn(...args); - return `\u001B[${38 + offset};2;${rgb[0]};${rgb[1]};${rgb[2]}m`; -}; - -const ansi2ansi = n => n; -const rgb2rgb = (r, g, b) => [r, g, b]; - -const setLazyProperty = (object, property, get) => { - Object.defineProperty(object, property, { - get: () => { - const value = get(); - - Object.defineProperty(object, property, { - value, - enumerable: true, - configurable: true - }); - - return value; - }, - enumerable: true, - configurable: true - }); -}; - -/** @type {typeof import('color-convert')} */ -let colorConvert; -const makeDynamicStyles = (wrap, targetSpace, identity, isBackground) => { - if (colorConvert === undefined) { - colorConvert = require('color-convert'); - } - - const offset = isBackground ? 10 : 0; - const styles = {}; - - for (const [sourceSpace, suite] of Object.entries(colorConvert)) { - const name = sourceSpace === 'ansi16' ? 'ansi' : sourceSpace; - if (sourceSpace === targetSpace) { - styles[name] = wrap(identity, offset); - } else if (typeof suite === 'object') { - styles[name] = wrap(suite[targetSpace], offset); - } - } - - return styles; -}; - -function assembleStyles() { - const codes = new Map(); - const styles = { - modifier: { - reset: [0, 0], - // 21 isn't widely supported and 22 does the same thing - bold: [1, 22], - dim: [2, 22], - italic: [3, 23], - underline: [4, 24], - inverse: [7, 27], - hidden: [8, 28], - strikethrough: [9, 29] - }, - color: { - black: [30, 39], - red: [31, 39], - green: [32, 39], - yellow: [33, 39], - blue: [34, 39], - magenta: [35, 39], - cyan: [36, 39], - white: [37, 39], - - // Bright color - blackBright: [90, 39], - redBright: [91, 39], - greenBright: [92, 39], - yellowBright: [93, 39], - blueBright: [94, 39], - magentaBright: [95, 39], - cyanBright: [96, 39], - whiteBright: [97, 39] - }, - bgColor: { - bgBlack: [40, 49], - bgRed: [41, 49], - bgGreen: [42, 49], - bgYellow: [43, 49], - bgBlue: [44, 49], - bgMagenta: [45, 49], - bgCyan: [46, 49], - bgWhite: [47, 49], - - // Bright color - bgBlackBright: [100, 49], - bgRedBright: [101, 49], - bgGreenBright: [102, 49], - bgYellowBright: [103, 49], - bgBlueBright: [104, 49], - bgMagentaBright: [105, 49], - bgCyanBright: [106, 49], - bgWhiteBright: [107, 49] - } - }; - - // Alias bright black as gray (and grey) - styles.color.gray = styles.color.blackBright; - styles.bgColor.bgGray = styles.bgColor.bgBlackBright; - styles.color.grey = styles.color.blackBright; - styles.bgColor.bgGrey = styles.bgColor.bgBlackBright; - - for (const [groupName, group] of Object.entries(styles)) { - for (const [styleName, style] of Object.entries(group)) { - styles[styleName] = { - open: `\u001B[${style[0]}m`, - close: `\u001B[${style[1]}m` - }; - - group[styleName] = styles[styleName]; - - codes.set(style[0], style[1]); - } - - Object.defineProperty(styles, groupName, { - value: group, - enumerable: false - }); - } - - Object.defineProperty(styles, 'codes', { - value: codes, - enumerable: false - }); - - styles.color.close = '\u001B[39m'; - styles.bgColor.close = '\u001B[49m'; - - setLazyProperty(styles.color, 'ansi', () => makeDynamicStyles(wrapAnsi16, 'ansi16', ansi2ansi, false)); - setLazyProperty(styles.color, 'ansi256', () => makeDynamicStyles(wrapAnsi256, 'ansi256', ansi2ansi, false)); - setLazyProperty(styles.color, 'ansi16m', () => makeDynamicStyles(wrapAnsi16m, 'rgb', rgb2rgb, false)); - setLazyProperty(styles.bgColor, 'ansi', () => makeDynamicStyles(wrapAnsi16, 'ansi16', ansi2ansi, true)); - setLazyProperty(styles.bgColor, 'ansi256', () => makeDynamicStyles(wrapAnsi256, 'ansi256', ansi2ansi, true)); - setLazyProperty(styles.bgColor, 'ansi16m', () => makeDynamicStyles(wrapAnsi16m, 'rgb', rgb2rgb, true)); - - return styles; -} - -// Make the export immutable -Object.defineProperty(module, 'exports', { - enumerable: true, - get: assembleStyles -}); diff --git a/node_modules/cliui/node_modules/ansi-styles/package.json b/node_modules/cliui/node_modules/ansi-styles/package.json deleted file mode 100644 index 7539328..0000000 --- a/node_modules/cliui/node_modules/ansi-styles/package.json +++ /dev/null @@ -1,56 +0,0 @@ -{ - "name": "ansi-styles", - "version": "4.3.0", - "description": "ANSI escape codes for styling strings in the terminal", - "license": "MIT", - "repository": "chalk/ansi-styles", - "funding": "https://github.com/chalk/ansi-styles?sponsor=1", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "engines": { - "node": ">=8" - }, - "scripts": { - "test": "xo && ava && tsd", - "screenshot": "svg-term --command='node screenshot' --out=screenshot.svg --padding=3 --width=55 --height=3 --at=1000 --no-cursor" - }, - "files": [ - "index.js", - "index.d.ts" - ], - "keywords": [ - "ansi", - "styles", - "color", - "colour", - "colors", - "terminal", - "console", - "cli", - "string", - "tty", - "escape", - "formatting", - "rgb", - "256", - "shell", - "xterm", - "log", - "logging", - "command-line", - "text" - ], - "dependencies": { - "color-convert": "^2.0.1" - }, - "devDependencies": { - "@types/color-convert": "^1.9.0", - "ava": "^2.3.0", - "svg-term-cli": "^2.1.1", - "tsd": "^0.11.0", - "xo": "^0.25.3" - } -} diff --git a/node_modules/cliui/node_modules/emoji-regex/es2015/index.js b/node_modules/cliui/node_modules/emoji-regex/es2015/index.js deleted file mode 100644 index b4cf3dc..0000000 --- a/node_modules/cliui/node_modules/emoji-regex/es2015/index.js +++ /dev/null @@ -1,6 +0,0 @@ -"use strict"; - -module.exports = () => { - // https://mths.be/emoji - return /\u{1F3F4}\u{E0067}\u{E0062}(?:\u{E0065}\u{E006E}\u{E0067}|\u{E0073}\u{E0063}\u{E0074}|\u{E0077}\u{E006C}\u{E0073})\u{E007F}|\u{1F468}(?:\u{1F3FC}\u200D(?:\u{1F91D}\u200D\u{1F468}\u{1F3FB}|[\u{1F33E}\u{1F373}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}])|\u{1F3FF}\u200D(?:\u{1F91D}\u200D\u{1F468}[\u{1F3FB}-\u{1F3FE}]|[\u{1F33E}\u{1F373}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}])|\u{1F3FE}\u200D(?:\u{1F91D}\u200D\u{1F468}[\u{1F3FB}-\u{1F3FD}]|[\u{1F33E}\u{1F373}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}])|\u{1F3FD}\u200D(?:\u{1F91D}\u200D\u{1F468}[\u{1F3FB}\u{1F3FC}]|[\u{1F33E}\u{1F373}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}])|\u200D(?:\u2764\uFE0F\u200D(?:\u{1F48B}\u200D)?\u{1F468}|[\u{1F468}\u{1F469}]\u200D(?:\u{1F466}\u200D\u{1F466}|\u{1F467}\u200D[\u{1F466}\u{1F467}])|\u{1F466}\u200D\u{1F466}|\u{1F467}\u200D[\u{1F466}\u{1F467}]|[\u{1F468}\u{1F469}]\u200D[\u{1F466}\u{1F467}]|[\u2695\u2696\u2708]\uFE0F|[\u{1F466}\u{1F467}]|[\u{1F33E}\u{1F373}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}])|(?:\u{1F3FB}\u200D[\u2695\u2696\u2708]|\u{1F3FF}\u200D[\u2695\u2696\u2708]|\u{1F3FE}\u200D[\u2695\u2696\u2708]|\u{1F3FD}\u200D[\u2695\u2696\u2708]|\u{1F3FC}\u200D[\u2695\u2696\u2708])\uFE0F|\u{1F3FB}\u200D[\u{1F33E}\u{1F373}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}]|[\u{1F3FB}-\u{1F3FF}])|(?:\u{1F9D1}\u{1F3FB}\u200D\u{1F91D}\u200D\u{1F9D1}|\u{1F469}\u{1F3FC}\u200D\u{1F91D}\u200D\u{1F469})\u{1F3FB}|\u{1F9D1}(?:\u{1F3FF}\u200D\u{1F91D}\u200D\u{1F9D1}[\u{1F3FB}-\u{1F3FF}]|\u200D\u{1F91D}\u200D\u{1F9D1})|(?:\u{1F9D1}\u{1F3FE}\u200D\u{1F91D}\u200D\u{1F9D1}|\u{1F469}\u{1F3FF}\u200D\u{1F91D}\u200D[\u{1F468}\u{1F469}])[\u{1F3FB}-\u{1F3FE}]|(?:\u{1F9D1}\u{1F3FC}\u200D\u{1F91D}\u200D\u{1F9D1}|\u{1F469}\u{1F3FD}\u200D\u{1F91D}\u200D\u{1F469})[\u{1F3FB}\u{1F3FC}]|\u{1F469}(?:\u{1F3FE}\u200D(?:\u{1F91D}\u200D\u{1F468}[\u{1F3FB}-\u{1F3FD}\u{1F3FF}]|[\u{1F33E}\u{1F373}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}])|\u{1F3FC}\u200D(?:\u{1F91D}\u200D\u{1F468}[\u{1F3FB}\u{1F3FD}-\u{1F3FF}]|[\u{1F33E}\u{1F373}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}])|\u{1F3FB}\u200D(?:\u{1F91D}\u200D\u{1F468}[\u{1F3FC}-\u{1F3FF}]|[\u{1F33E}\u{1F373}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}])|\u{1F3FD}\u200D(?:\u{1F91D}\u200D\u{1F468}[\u{1F3FB}\u{1F3FC}\u{1F3FE}\u{1F3FF}]|[\u{1F33E}\u{1F373}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}])|\u200D(?:\u2764\uFE0F\u200D(?:\u{1F48B}\u200D[\u{1F468}\u{1F469}]|[\u{1F468}\u{1F469}])|[\u{1F33E}\u{1F373}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}])|\u{1F3FF}\u200D[\u{1F33E}\u{1F373}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}])|\u{1F469}\u200D\u{1F469}\u200D(?:\u{1F466}\u200D\u{1F466}|\u{1F467}\u200D[\u{1F466}\u{1F467}])|(?:\u{1F9D1}\u{1F3FD}\u200D\u{1F91D}\u200D\u{1F9D1}|\u{1F469}\u{1F3FE}\u200D\u{1F91D}\u200D\u{1F469})[\u{1F3FB}-\u{1F3FD}]|\u{1F469}\u200D\u{1F466}\u200D\u{1F466}|\u{1F469}\u200D\u{1F469}\u200D[\u{1F466}\u{1F467}]|(?:\u{1F441}\uFE0F\u200D\u{1F5E8}|\u{1F469}(?:\u{1F3FF}\u200D[\u2695\u2696\u2708]|\u{1F3FE}\u200D[\u2695\u2696\u2708]|\u{1F3FC}\u200D[\u2695\u2696\u2708]|\u{1F3FB}\u200D[\u2695\u2696\u2708]|\u{1F3FD}\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|(?:[\u26F9\u{1F3CB}\u{1F3CC}\u{1F575}]\uFE0F|[\u{1F46F}\u{1F93C}\u{1F9DE}\u{1F9DF}])\u200D[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u{1F930}-\u{1F936}\u{1F9B5}\u{1F9B6}\u{1F9BB}\u{1F9D2}-\u{1F9D5}][\u{1F3FB}-\u{1F3FF}]|[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55\u{1F004}\u{1F0CF}\u{1F18E}\u{1F191}-\u{1F19A}\u{1F1E6}-\u{1F1FF}\u{1F201}\u{1F21A}\u{1F22F}\u{1F232}-\u{1F236}\u{1F238}-\u{1F23A}\u{1F250}\u{1F251}\u{1F300}-\u{1F320}\u{1F32D}-\u{1F335}\u{1F337}-\u{1F37C}\u{1F37E}-\u{1F393}\u{1F3A0}-\u{1F3CA}\u{1F3CF}-\u{1F3D3}\u{1F3E0}-\u{1F3F0}\u{1F3F4}\u{1F3F8}-\u{1F43E}\u{1F440}\u{1F442}-\u{1F4FC}\u{1F4FF}-\u{1F53D}\u{1F54B}-\u{1F54E}\u{1F550}-\u{1F567}\u{1F57A}\u{1F595}\u{1F596}\u{1F5A4}\u{1F5FB}-\u{1F64F}\u{1F680}-\u{1F6C5}\u{1F6CC}\u{1F6D0}-\u{1F6D2}\u{1F6D5}\u{1F6EB}\u{1F6EC}\u{1F6F4}-\u{1F6FA}\u{1F7E0}-\u{1F7EB}\u{1F90D}-\u{1F93A}\u{1F93C}-\u{1F945}\u{1F947}-\u{1F971}\u{1F973}-\u{1F976}\u{1F97A}-\u{1F9A2}\u{1F9A5}-\u{1F9AA}\u{1F9AE}-\u{1F9CA}\u{1F9CD}-\u{1F9FF}\u{1FA70}-\u{1FA73}\u{1FA78}-\u{1FA7A}\u{1FA80}-\u{1FA82}\u{1FA90}-\u{1FA95}]|[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299\u{1F004}\u{1F0CF}\u{1F170}\u{1F171}\u{1F17E}\u{1F17F}\u{1F18E}\u{1F191}-\u{1F19A}\u{1F1E6}-\u{1F1FF}\u{1F201}\u{1F202}\u{1F21A}\u{1F22F}\u{1F232}-\u{1F23A}\u{1F250}\u{1F251}\u{1F300}-\u{1F321}\u{1F324}-\u{1F393}\u{1F396}\u{1F397}\u{1F399}-\u{1F39B}\u{1F39E}-\u{1F3F0}\u{1F3F3}-\u{1F3F5}\u{1F3F7}-\u{1F4FD}\u{1F4FF}-\u{1F53D}\u{1F549}-\u{1F54E}\u{1F550}-\u{1F567}\u{1F56F}\u{1F570}\u{1F573}-\u{1F57A}\u{1F587}\u{1F58A}-\u{1F58D}\u{1F590}\u{1F595}\u{1F596}\u{1F5A4}\u{1F5A5}\u{1F5A8}\u{1F5B1}\u{1F5B2}\u{1F5BC}\u{1F5C2}-\u{1F5C4}\u{1F5D1}-\u{1F5D3}\u{1F5DC}-\u{1F5DE}\u{1F5E1}\u{1F5E3}\u{1F5E8}\u{1F5EF}\u{1F5F3}\u{1F5FA}-\u{1F64F}\u{1F680}-\u{1F6C5}\u{1F6CB}-\u{1F6D2}\u{1F6D5}\u{1F6E0}-\u{1F6E5}\u{1F6E9}\u{1F6EB}\u{1F6EC}\u{1F6F0}\u{1F6F3}-\u{1F6FA}\u{1F7E0}-\u{1F7EB}\u{1F90D}-\u{1F93A}\u{1F93C}-\u{1F945}\u{1F947}-\u{1F971}\u{1F973}-\u{1F976}\u{1F97A}-\u{1F9A2}\u{1F9A5}-\u{1F9AA}\u{1F9AE}-\u{1F9CA}\u{1F9CD}-\u{1F9FF}\u{1FA70}-\u{1FA73}\u{1FA78}-\u{1FA7A}\u{1FA80}-\u{1FA82}\u{1FA90}-\u{1FA95}]\uFE0F|[\u261D\u26F9\u270A-\u270D\u{1F385}\u{1F3C2}-\u{1F3C4}\u{1F3C7}\u{1F3CA}-\u{1F3CC}\u{1F442}\u{1F443}\u{1F446}-\u{1F450}\u{1F466}-\u{1F478}\u{1F47C}\u{1F481}-\u{1F483}\u{1F485}-\u{1F487}\u{1F48F}\u{1F491}\u{1F4AA}\u{1F574}\u{1F575}\u{1F57A}\u{1F590}\u{1F595}\u{1F596}\u{1F645}-\u{1F647}\u{1F64B}-\u{1F64F}\u{1F6A3}\u{1F6B4}-\u{1F6B6}\u{1F6C0}\u{1F6CC}\u{1F90F}\u{1F918}-\u{1F91F}\u{1F926}\u{1F930}-\u{1F939}\u{1F93C}-\u{1F93E}\u{1F9B5}\u{1F9B6}\u{1F9B8}\u{1F9B9}\u{1F9BB}\u{1F9CD}-\u{1F9CF}\u{1F9D1}-\u{1F9DD}]/gu; -}; diff --git a/node_modules/cliui/node_modules/emoji-regex/es2015/text.js b/node_modules/cliui/node_modules/emoji-regex/es2015/text.js deleted file mode 100644 index 780309d..0000000 --- a/node_modules/cliui/node_modules/emoji-regex/es2015/text.js +++ /dev/null @@ -1,6 +0,0 @@ -"use strict"; - -module.exports = () => { - // https://mths.be/emoji - return /\u{1F3F4}\u{E0067}\u{E0062}(?:\u{E0065}\u{E006E}\u{E0067}|\u{E0073}\u{E0063}\u{E0074}|\u{E0077}\u{E006C}\u{E0073})\u{E007F}|\u{1F468}(?:\u{1F3FC}\u200D(?:\u{1F91D}\u200D\u{1F468}\u{1F3FB}|[\u{1F33E}\u{1F373}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}])|\u{1F3FF}\u200D(?:\u{1F91D}\u200D\u{1F468}[\u{1F3FB}-\u{1F3FE}]|[\u{1F33E}\u{1F373}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}])|\u{1F3FE}\u200D(?:\u{1F91D}\u200D\u{1F468}[\u{1F3FB}-\u{1F3FD}]|[\u{1F33E}\u{1F373}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}])|\u{1F3FD}\u200D(?:\u{1F91D}\u200D\u{1F468}[\u{1F3FB}\u{1F3FC}]|[\u{1F33E}\u{1F373}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}])|\u200D(?:\u2764\uFE0F\u200D(?:\u{1F48B}\u200D)?\u{1F468}|[\u{1F468}\u{1F469}]\u200D(?:\u{1F466}\u200D\u{1F466}|\u{1F467}\u200D[\u{1F466}\u{1F467}])|\u{1F466}\u200D\u{1F466}|\u{1F467}\u200D[\u{1F466}\u{1F467}]|[\u{1F468}\u{1F469}]\u200D[\u{1F466}\u{1F467}]|[\u2695\u2696\u2708]\uFE0F|[\u{1F466}\u{1F467}]|[\u{1F33E}\u{1F373}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}])|(?:\u{1F3FB}\u200D[\u2695\u2696\u2708]|\u{1F3FF}\u200D[\u2695\u2696\u2708]|\u{1F3FE}\u200D[\u2695\u2696\u2708]|\u{1F3FD}\u200D[\u2695\u2696\u2708]|\u{1F3FC}\u200D[\u2695\u2696\u2708])\uFE0F|\u{1F3FB}\u200D[\u{1F33E}\u{1F373}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}]|[\u{1F3FB}-\u{1F3FF}])|(?:\u{1F9D1}\u{1F3FB}\u200D\u{1F91D}\u200D\u{1F9D1}|\u{1F469}\u{1F3FC}\u200D\u{1F91D}\u200D\u{1F469})\u{1F3FB}|\u{1F9D1}(?:\u{1F3FF}\u200D\u{1F91D}\u200D\u{1F9D1}[\u{1F3FB}-\u{1F3FF}]|\u200D\u{1F91D}\u200D\u{1F9D1})|(?:\u{1F9D1}\u{1F3FE}\u200D\u{1F91D}\u200D\u{1F9D1}|\u{1F469}\u{1F3FF}\u200D\u{1F91D}\u200D[\u{1F468}\u{1F469}])[\u{1F3FB}-\u{1F3FE}]|(?:\u{1F9D1}\u{1F3FC}\u200D\u{1F91D}\u200D\u{1F9D1}|\u{1F469}\u{1F3FD}\u200D\u{1F91D}\u200D\u{1F469})[\u{1F3FB}\u{1F3FC}]|\u{1F469}(?:\u{1F3FE}\u200D(?:\u{1F91D}\u200D\u{1F468}[\u{1F3FB}-\u{1F3FD}\u{1F3FF}]|[\u{1F33E}\u{1F373}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}])|\u{1F3FC}\u200D(?:\u{1F91D}\u200D\u{1F468}[\u{1F3FB}\u{1F3FD}-\u{1F3FF}]|[\u{1F33E}\u{1F373}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}])|\u{1F3FB}\u200D(?:\u{1F91D}\u200D\u{1F468}[\u{1F3FC}-\u{1F3FF}]|[\u{1F33E}\u{1F373}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}])|\u{1F3FD}\u200D(?:\u{1F91D}\u200D\u{1F468}[\u{1F3FB}\u{1F3FC}\u{1F3FE}\u{1F3FF}]|[\u{1F33E}\u{1F373}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}])|\u200D(?:\u2764\uFE0F\u200D(?:\u{1F48B}\u200D[\u{1F468}\u{1F469}]|[\u{1F468}\u{1F469}])|[\u{1F33E}\u{1F373}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}])|\u{1F3FF}\u200D[\u{1F33E}\u{1F373}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}])|\u{1F469}\u200D\u{1F469}\u200D(?:\u{1F466}\u200D\u{1F466}|\u{1F467}\u200D[\u{1F466}\u{1F467}])|(?:\u{1F9D1}\u{1F3FD}\u200D\u{1F91D}\u200D\u{1F9D1}|\u{1F469}\u{1F3FE}\u200D\u{1F91D}\u200D\u{1F469})[\u{1F3FB}-\u{1F3FD}]|\u{1F469}\u200D\u{1F466}\u200D\u{1F466}|\u{1F469}\u200D\u{1F469}\u200D[\u{1F466}\u{1F467}]|(?:\u{1F441}\uFE0F\u200D\u{1F5E8}|\u{1F469}(?:\u{1F3FF}\u200D[\u2695\u2696\u2708]|\u{1F3FE}\u200D[\u2695\u2696\u2708]|\u{1F3FC}\u200D[\u2695\u2696\u2708]|\u{1F3FB}\u200D[\u2695\u2696\u2708]|\u{1F3FD}\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|(?:[\u26F9\u{1F3CB}\u{1F3CC}\u{1F575}]\uFE0F|[\u{1F46F}\u{1F93C}\u{1F9DE}\u{1F9DF}])\u200D[\u2640\u2642]|[\u26F9\u{1F3CB}\u{1F3CC}\u{1F575}][\u{1F3FB}-\u{1F3FF}]\u200D[\u2640\u2642]|[\u{1F3C3}\u{1F3C4}\u{1F3CA}\u{1F46E}\u{1F471}\u{1F473}\u{1F477}\u{1F481}\u{1F482}\u{1F486}\u{1F487}\u{1F645}-\u{1F647}\u{1F64B}\u{1F64D}\u{1F64E}\u{1F6A3}\u{1F6B4}-\u{1F6B6}\u{1F926}\u{1F937}-\u{1F939}\u{1F93D}\u{1F93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1F1F2}\u{1F1F3}\u{1F1F8}\u{1F1FE}\u{1F1FF}]|\u{1F1EE}[\u{1F1E8}-\u{1F1EA}\u{1F1F1}-\u{1F1F4}\u{1F1F6}-\u{1F1F9}]|\u{1F1EF}[\u{1F1EA}\u{1F1F2}\u{1F1F4}\u{1F1F5}]|[\u{1F3C3}\u{1F3C4}\u{1F3CA}\u{1F46E}\u{1F471}\u{1F473}\u{1F477}\u{1F481}\u{1F482}\u{1F486}\u{1F487}\u{1F645}-\u{1F647}\u{1F64B}\u{1F64D}\u{1F64E}\u{1F6A3}\u{1F6B4}-\u{1F6B6}\u{1F926}\u{1F937}-\u{1F939}\u{1F93D}\u{1F93E}\u{1F9B8}\u{1F9B9}\u{1F9CD}-\u{1F9CF}\u{1F9D6}-\u{1F9DD}][\u{1F3FB}-\u{1F3FF}]|[\u26F9\u{1F3CB}\u{1F3CC}\u{1F575}][\u{1F3FB}-\u{1F3FF}]|[\u261D\u270A-\u270D\u{1F385}\u{1F3C2}\u{1F3C7}\u{1F442}\u{1F443}\u{1F446}-\u{1F450}\u{1F466}\u{1F467}\u{1F46B}-\u{1F46D}\u{1F470}\u{1F472}\u{1F474}-\u{1F476}\u{1F478}\u{1F47C}\u{1F483}\u{1F485}\u{1F4AA}\u{1F574}\u{1F57A}\u{1F590}\u{1F595}\u{1F596}\u{1F64C}\u{1F64F}\u{1F6C0}\u{1F6CC}\u{1F90F}\u{1F918}-\u{1F91C}\u{1F91E}\u{1F91F}\u{1F930}-\u{1F936}\u{1F9B5}\u{1F9B6}\u{1F9BB}\u{1F9D2}-\u{1F9D5}][\u{1F3FB}-\u{1F3FF}]|[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55\u{1F004}\u{1F0CF}\u{1F18E}\u{1F191}-\u{1F19A}\u{1F1E6}-\u{1F1FF}\u{1F201}\u{1F21A}\u{1F22F}\u{1F232}-\u{1F236}\u{1F238}-\u{1F23A}\u{1F250}\u{1F251}\u{1F300}-\u{1F320}\u{1F32D}-\u{1F335}\u{1F337}-\u{1F37C}\u{1F37E}-\u{1F393}\u{1F3A0}-\u{1F3CA}\u{1F3CF}-\u{1F3D3}\u{1F3E0}-\u{1F3F0}\u{1F3F4}\u{1F3F8}-\u{1F43E}\u{1F440}\u{1F442}-\u{1F4FC}\u{1F4FF}-\u{1F53D}\u{1F54B}-\u{1F54E}\u{1F550}-\u{1F567}\u{1F57A}\u{1F595}\u{1F596}\u{1F5A4}\u{1F5FB}-\u{1F64F}\u{1F680}-\u{1F6C5}\u{1F6CC}\u{1F6D0}-\u{1F6D2}\u{1F6D5}\u{1F6EB}\u{1F6EC}\u{1F6F4}-\u{1F6FA}\u{1F7E0}-\u{1F7EB}\u{1F90D}-\u{1F93A}\u{1F93C}-\u{1F945}\u{1F947}-\u{1F971}\u{1F973}-\u{1F976}\u{1F97A}-\u{1F9A2}\u{1F9A5}-\u{1F9AA}\u{1F9AE}-\u{1F9CA}\u{1F9CD}-\u{1F9FF}\u{1FA70}-\u{1FA73}\u{1FA78}-\u{1FA7A}\u{1FA80}-\u{1FA82}\u{1FA90}-\u{1FA95}]|[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299\u{1F004}\u{1F0CF}\u{1F170}\u{1F171}\u{1F17E}\u{1F17F}\u{1F18E}\u{1F191}-\u{1F19A}\u{1F1E6}-\u{1F1FF}\u{1F201}\u{1F202}\u{1F21A}\u{1F22F}\u{1F232}-\u{1F23A}\u{1F250}\u{1F251}\u{1F300}-\u{1F321}\u{1F324}-\u{1F393}\u{1F396}\u{1F397}\u{1F399}-\u{1F39B}\u{1F39E}-\u{1F3F0}\u{1F3F3}-\u{1F3F5}\u{1F3F7}-\u{1F4FD}\u{1F4FF}-\u{1F53D}\u{1F549}-\u{1F54E}\u{1F550}-\u{1F567}\u{1F56F}\u{1F570}\u{1F573}-\u{1F57A}\u{1F587}\u{1F58A}-\u{1F58D}\u{1F590}\u{1F595}\u{1F596}\u{1F5A4}\u{1F5A5}\u{1F5A8}\u{1F5B1}\u{1F5B2}\u{1F5BC}\u{1F5C2}-\u{1F5C4}\u{1F5D1}-\u{1F5D3}\u{1F5DC}-\u{1F5DE}\u{1F5E1}\u{1F5E3}\u{1F5E8}\u{1F5EF}\u{1F5F3}\u{1F5FA}-\u{1F64F}\u{1F680}-\u{1F6C5}\u{1F6CB}-\u{1F6D2}\u{1F6D5}\u{1F6E0}-\u{1F6E5}\u{1F6E9}\u{1F6EB}\u{1F6EC}\u{1F6F0}\u{1F6F3}-\u{1F6FA}\u{1F7E0}-\u{1F7EB}\u{1F90D}-\u{1F93A}\u{1F93C}-\u{1F945}\u{1F947}-\u{1F971}\u{1F973}-\u{1F976}\u{1F97A}-\u{1F9A2}\u{1F9A5}-\u{1F9AA}\u{1F9AE}-\u{1F9CA}\u{1F9CD}-\u{1F9FF}\u{1FA70}-\u{1FA73}\u{1FA78}-\u{1FA7A}\u{1FA80}-\u{1FA82}\u{1FA90}-\u{1FA95}]\uFE0F?|[\u261D\u26F9\u270A-\u270D\u{1F385}\u{1F3C2}-\u{1F3C4}\u{1F3C7}\u{1F3CA}-\u{1F3CC}\u{1F442}\u{1F443}\u{1F446}-\u{1F450}\u{1F466}-\u{1F478}\u{1F47C}\u{1F481}-\u{1F483}\u{1F485}-\u{1F487}\u{1F48F}\u{1F491}\u{1F4AA}\u{1F574}\u{1F575}\u{1F57A}\u{1F590}\u{1F595}\u{1F596}\u{1F645}-\u{1F647}\u{1F64B}-\u{1F64F}\u{1F6A3}\u{1F6B4}-\u{1F6B6}\u{1F6C0}\u{1F6CC}\u{1F90F}\u{1F918}-\u{1F91F}\u{1F926}\u{1F930}-\u{1F939}\u{1F93C}-\u{1F93E}\u{1F9B5}\u{1F9B6}\u{1F9B8}\u{1F9B9}\u{1F9BB}\u{1F9CD}-\u{1F9CF}\u{1F9D1}-\u{1F9DD}]/gu; -}; diff --git a/node_modules/cliui/node_modules/emoji-regex/index.d.ts b/node_modules/cliui/node_modules/emoji-regex/index.d.ts deleted file mode 100644 index 1955b47..0000000 --- a/node_modules/cliui/node_modules/emoji-regex/index.d.ts +++ /dev/null @@ -1,23 +0,0 @@ -declare module 'emoji-regex' { - function emojiRegex(): RegExp; - - export default emojiRegex; -} - -declare module 'emoji-regex/text' { - function emojiRegex(): RegExp; - - export default emojiRegex; -} - -declare module 'emoji-regex/es2015' { - function emojiRegex(): RegExp; - - export default emojiRegex; -} - -declare module 'emoji-regex/es2015/text' { - function emojiRegex(): RegExp; - - export default emojiRegex; -} diff --git a/node_modules/cliui/node_modules/emoji-regex/index.js b/node_modules/cliui/node_modules/emoji-regex/index.js deleted file mode 100644 index d993a3a..0000000 --- a/node_modules/cliui/node_modules/emoji-regex/index.js +++ /dev/null @@ -1,6 +0,0 @@ -"use strict"; - -module.exports = function () { - // https://mths.be/emoji - return /\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F|\uD83D\uDC68(?:\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68\uD83C\uDFFB|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|[\u2695\u2696\u2708]\uFE0F|\uD83D[\uDC66\uDC67]|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708])\uFE0F|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C[\uDFFB-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)\uD83C\uDFFB|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB\uDFFC])|\uD83D\uDC69(?:\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB-\uDFFD])|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|(?:(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)\uFE0F|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\u200D[\u2640\u2642])|\uD83C\uDFF4\u200D\u2620)\uFE0F|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF4\uD83C\uDDF2|\uD83C\uDDF6\uD83C\uDDE6|[#\*0-9]\uFE0F\u20E3|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83D\uDC69(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uD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D83C[\uDDEA\uDDF2\uDDF4\uDDF5])|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270A-\u270D]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC70\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDCAA\uDD74\uDD7A\uDD90\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD36\uDDB5\uDDB6\uDDBB\uDDD2-\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5\uDEEB\uDEEC\uDEF4-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])\uFE0F|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDC8F\uDC91\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g; -}; diff --git a/node_modules/cliui/node_modules/emoji-regex/package.json b/node_modules/cliui/node_modules/emoji-regex/package.json deleted file mode 100644 index 6d32352..0000000 --- a/node_modules/cliui/node_modules/emoji-regex/package.json +++ /dev/null @@ -1,50 +0,0 @@ -{ - "name": "emoji-regex", - "version": "8.0.0", - "description": "A regular expression to match all Emoji-only symbols as per the Unicode Standard.", - "homepage": "https://mths.be/emoji-regex", - "main": "index.js", - "types": "index.d.ts", - "keywords": [ - "unicode", - "regex", - "regexp", - "regular expressions", - "code points", - "symbols", - "characters", - "emoji" - ], - "license": "MIT", - "author": { - "name": "Mathias Bynens", - "url": "https://mathiasbynens.be/" - }, - "repository": { - "type": "git", - "url": "https://github.com/mathiasbynens/emoji-regex.git" - }, - "bugs": "https://github.com/mathiasbynens/emoji-regex/issues", - "files": [ - "LICENSE-MIT.txt", - "index.js", - "index.d.ts", - "text.js", - "es2015/index.js", - "es2015/text.js" - ], - "scripts": { - "build": "rm -rf -- es2015; babel src -d .; NODE_ENV=es2015 babel src -d ./es2015; node script/inject-sequences.js", - "test": "mocha", - "test:watch": "npm run test -- --watch" - }, - "devDependencies": { - "@babel/cli": "^7.2.3", - "@babel/core": "^7.3.4", - "@babel/plugin-proposal-unicode-property-regex": "^7.2.0", - "@babel/preset-env": "^7.3.4", - "mocha": "^6.0.2", - "regexgen": "^1.3.0", - "unicode-12.0.0": "^0.7.9" - } -} diff --git a/node_modules/cliui/node_modules/emoji-regex/text.js b/node_modules/cliui/node_modules/emoji-regex/text.js deleted file mode 100644 index 0a55ce2..0000000 --- a/node_modules/cliui/node_modules/emoji-regex/text.js +++ /dev/null @@ -1,6 +0,0 @@ -"use strict"; - -module.exports = function () { - // https://mths.be/emoji - return /\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F|\uD83D\uDC68(?:\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68\uD83C\uDFFB|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|[\u2695\u2696\u2708]\uFE0F|\uD83D[\uDC66\uDC67]|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708])\uFE0F|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C[\uDFFB-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)\uD83C\uDFFB|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB\uDFFC])|\uD83D\uDC69(?:\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB-\uDFFD])|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|(?:(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)\uFE0F|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\u200D[\u2640\u2642])|\uD83C\uDFF4\u200D\u2620)\uFE0F|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC15\u200D\uD83E\uDDBA|\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uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC70\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDCAA\uDD74\uDD7A\uDD90\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD36\uDDB5\uDDB6\uDDBB\uDDD2-\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5\uDEEB\uDEEC\uDEF4-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])\uFE0F?|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDC8F\uDC91\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g; -}; diff --git a/node_modules/cliui/node_modules/string-width/index.d.ts b/node_modules/cliui/node_modules/string-width/index.d.ts deleted file mode 100644 index 12b5309..0000000 --- a/node_modules/cliui/node_modules/string-width/index.d.ts +++ /dev/null @@ -1,29 +0,0 @@ -declare const stringWidth: { - /** - Get the visual width of a string - the number of columns required to display it. - - Some Unicode characters are [fullwidth](https://en.wikipedia.org/wiki/Halfwidth_and_fullwidth_forms) and use double the normal width. [ANSI escape codes](https://en.wikipedia.org/wiki/ANSI_escape_code) are stripped and doesn't affect the width. - - @example - ``` - import stringWidth = require('string-width'); - - stringWidth('a'); - //=> 1 - - stringWidth('古'); - //=> 2 - - stringWidth('\u001B[1m古\u001B[22m'); - //=> 2 - ``` - */ - (string: string): number; - - // TODO: remove this in the next major version, refactor the whole definition to: - // declare function stringWidth(string: string): number; - // export = stringWidth; - default: typeof stringWidth; -} - -export = stringWidth; diff --git a/node_modules/cliui/node_modules/string-width/index.js b/node_modules/cliui/node_modules/string-width/index.js deleted file mode 100644 index f4d261a..0000000 --- a/node_modules/cliui/node_modules/string-width/index.js +++ /dev/null @@ -1,47 +0,0 @@ -'use strict'; -const stripAnsi = require('strip-ansi'); -const isFullwidthCodePoint = require('is-fullwidth-code-point'); -const emojiRegex = require('emoji-regex'); - -const stringWidth = string => { - if (typeof string !== 'string' || string.length === 0) { - return 0; - } - - string = stripAnsi(string); - - if (string.length === 0) { - return 0; - } - - string = string.replace(emojiRegex(), ' '); - - let width = 0; - - for (let i = 0; i < string.length; i++) { - const code = string.codePointAt(i); - - // Ignore control characters - if (code <= 0x1F || (code >= 0x7F && code <= 0x9F)) { - continue; - } - - // Ignore combining characters - if (code >= 0x300 && code <= 0x36F) { - continue; - } - - // Surrogates - if (code > 0xFFFF) { - i++; - } - - width += isFullwidthCodePoint(code) ? 2 : 1; - } - - return width; -}; - -module.exports = stringWidth; -// TODO: remove this in the next major version -module.exports.default = stringWidth; diff --git a/node_modules/cliui/node_modules/string-width/package.json b/node_modules/cliui/node_modules/string-width/package.json deleted file mode 100644 index 28ba7b4..0000000 --- a/node_modules/cliui/node_modules/string-width/package.json +++ /dev/null @@ -1,56 +0,0 @@ -{ - "name": "string-width", - "version": "4.2.3", - "description": "Get the visual width of a string - the number of columns required to display it", - "license": "MIT", - "repository": "sindresorhus/string-width", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "engines": { - "node": ">=8" - }, - "scripts": { - "test": "xo && ava && tsd" - }, - "files": [ - "index.js", - "index.d.ts" - ], - "keywords": [ - "string", - "character", - "unicode", - "width", - "visual", - "column", - "columns", - "fullwidth", - "full-width", - "full", - "ansi", - "escape", - "codes", - "cli", - "command-line", - "terminal", - "console", - "cjk", - "chinese", - "japanese", - "korean", - "fixed-width" - ], - "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" - }, - "devDependencies": { - "ava": "^1.4.1", - "tsd": "^0.7.1", - "xo": "^0.24.0" - } -} diff --git a/node_modules/cliui/node_modules/strip-ansi/index.d.ts b/node_modules/cliui/node_modules/strip-ansi/index.d.ts deleted file mode 100644 index 907fccc..0000000 --- a/node_modules/cliui/node_modules/strip-ansi/index.d.ts +++ /dev/null @@ -1,17 +0,0 @@ -/** -Strip [ANSI escape codes](https://en.wikipedia.org/wiki/ANSI_escape_code) from a string. - -@example -``` -import stripAnsi = require('strip-ansi'); - -stripAnsi('\u001B[4mUnicorn\u001B[0m'); -//=> 'Unicorn' - -stripAnsi('\u001B]8;;https://github.com\u0007Click\u001B]8;;\u0007'); -//=> 'Click' -``` -*/ -declare function stripAnsi(string: string): string; - -export = stripAnsi; diff --git a/node_modules/cliui/node_modules/strip-ansi/index.js b/node_modules/cliui/node_modules/strip-ansi/index.js deleted file mode 100644 index 9a593df..0000000 --- a/node_modules/cliui/node_modules/strip-ansi/index.js +++ /dev/null @@ -1,4 +0,0 @@ -'use strict'; -const ansiRegex = require('ansi-regex'); - -module.exports = string => typeof string === 'string' ? string.replace(ansiRegex(), '') : string; diff --git a/node_modules/cliui/node_modules/strip-ansi/package.json b/node_modules/cliui/node_modules/strip-ansi/package.json deleted file mode 100644 index 1a41108..0000000 --- a/node_modules/cliui/node_modules/strip-ansi/package.json +++ /dev/null @@ -1,54 +0,0 @@ -{ - "name": "strip-ansi", - "version": "6.0.1", - "description": "Strip ANSI escape codes from a string", - "license": "MIT", - "repository": "chalk/strip-ansi", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "engines": { - "node": ">=8" - }, - "scripts": { - "test": "xo && ava && tsd" - }, - "files": [ - "index.js", - "index.d.ts" - ], - "keywords": [ - "strip", - "trim", - "remove", - "ansi", - "styles", - "color", - "colour", - "colors", - "terminal", - "console", - "string", - "tty", - "escape", - "formatting", - "rgb", - "256", - "shell", - "xterm", - "log", - "logging", - "command-line", - "text" - ], - "dependencies": { - "ansi-regex": "^5.0.1" - }, - "devDependencies": { - "ava": "^2.4.0", - "tsd": "^0.10.0", - "xo": "^0.25.3" - } -} diff --git a/node_modules/cliui/node_modules/wrap-ansi/index.js b/node_modules/cliui/node_modules/wrap-ansi/index.js deleted file mode 100644 index d502255..0000000 --- a/node_modules/cliui/node_modules/wrap-ansi/index.js +++ /dev/null @@ -1,216 +0,0 @@ -'use strict'; -const stringWidth = require('string-width'); -const stripAnsi = require('strip-ansi'); -const ansiStyles = require('ansi-styles'); - -const ESCAPES = new Set([ - '\u001B', - '\u009B' -]); - -const END_CODE = 39; - -const ANSI_ESCAPE_BELL = '\u0007'; -const ANSI_CSI = '['; -const ANSI_OSC = ']'; -const ANSI_SGR_TERMINATOR = 'm'; -const ANSI_ESCAPE_LINK = `${ANSI_OSC}8;;`; - -const wrapAnsi = code => `${ESCAPES.values().next().value}${ANSI_CSI}${code}${ANSI_SGR_TERMINATOR}`; -const wrapAnsiHyperlink = uri => `${ESCAPES.values().next().value}${ANSI_ESCAPE_LINK}${uri}${ANSI_ESCAPE_BELL}`; - -// Calculate the length of words split on ' ', ignoring -// the extra characters added by ansi escape codes -const wordLengths = string => string.split(' ').map(character => stringWidth(character)); - -// Wrap a long word across multiple rows -// Ansi escape codes do not count towards length -const wrapWord = (rows, word, columns) => { - const characters = [...word]; - - let isInsideEscape = false; - let isInsideLinkEscape = false; - let visible = stringWidth(stripAnsi(rows[rows.length - 1])); - - for (const [index, character] of characters.entries()) { - const characterLength = stringWidth(character); - - if (visible + characterLength <= columns) { - rows[rows.length - 1] += character; - } else { - rows.push(character); - visible = 0; - } - - if (ESCAPES.has(character)) { - isInsideEscape = true; - isInsideLinkEscape = characters.slice(index + 1).join('').startsWith(ANSI_ESCAPE_LINK); - } - - if (isInsideEscape) { - if (isInsideLinkEscape) { - if (character === ANSI_ESCAPE_BELL) { - isInsideEscape = false; - isInsideLinkEscape = false; - } - } else if (character === ANSI_SGR_TERMINATOR) { - isInsideEscape = false; - } - - continue; - } - - visible += characterLength; - - if (visible === columns && index < characters.length - 1) { - rows.push(''); - visible = 0; - } - } - - // It's possible that the last row we copy over is only - // ansi escape characters, handle this edge-case - if (!visible && rows[rows.length - 1].length > 0 && rows.length > 1) { - rows[rows.length - 2] += rows.pop(); - } -}; - -// Trims spaces from a string ignoring invisible sequences -const stringVisibleTrimSpacesRight = string => { - const words = string.split(' '); - let last = words.length; - - while (last > 0) { - if (stringWidth(words[last - 1]) > 0) { - break; - } - - last--; - } - - if (last === words.length) { - return string; - } - - return words.slice(0, last).join(' ') + words.slice(last).join(''); -}; - -// The wrap-ansi module can be invoked in either 'hard' or 'soft' wrap mode -// -// 'hard' will never allow a string to take up more than columns characters -// -// 'soft' allows long words to expand past the column length -const exec = (string, columns, options = {}) => { - if (options.trim !== false && string.trim() === '') { - return ''; - } - - let returnValue = ''; - let escapeCode; - let escapeUrl; - - const lengths = wordLengths(string); - let rows = ['']; - - for (const [index, word] of string.split(' ').entries()) { - if (options.trim !== false) { - rows[rows.length - 1] = rows[rows.length - 1].trimStart(); - } - - let rowLength = stringWidth(rows[rows.length - 1]); - - if (index !== 0) { - if (rowLength >= columns && (options.wordWrap === false || options.trim === false)) { - // If we start with a new word but the current row length equals the length of the columns, add a new row - rows.push(''); - rowLength = 0; - } - - if (rowLength > 0 || options.trim === false) { - rows[rows.length - 1] += ' '; - rowLength++; - } - } - - // In 'hard' wrap mode, the length of a line is never allowed to extend past 'columns' - if (options.hard && lengths[index] > columns) { - const remainingColumns = (columns - rowLength); - const breaksStartingThisLine = 1 + Math.floor((lengths[index] - remainingColumns - 1) / columns); - const breaksStartingNextLine = Math.floor((lengths[index] - 1) / columns); - if (breaksStartingNextLine < breaksStartingThisLine) { - rows.push(''); - } - - wrapWord(rows, word, columns); - continue; - } - - if (rowLength + lengths[index] > columns && rowLength > 0 && lengths[index] > 0) { - if (options.wordWrap === false && rowLength < columns) { - wrapWord(rows, word, columns); - continue; - } - - rows.push(''); - } - - if (rowLength + lengths[index] > columns && options.wordWrap === false) { - wrapWord(rows, word, columns); - continue; - } - - rows[rows.length - 1] += word; - } - - if (options.trim !== false) { - rows = rows.map(stringVisibleTrimSpacesRight); - } - - const pre = [...rows.join('\n')]; - - for (const [index, character] of pre.entries()) { - returnValue += character; - - if (ESCAPES.has(character)) { - const {groups} = new RegExp(`(?:\\${ANSI_CSI}(?<code>\\d+)m|\\${ANSI_ESCAPE_LINK}(?<uri>.*)${ANSI_ESCAPE_BELL})`).exec(pre.slice(index).join('')) || {groups: {}}; - if (groups.code !== undefined) { - const code = Number.parseFloat(groups.code); - escapeCode = code === END_CODE ? undefined : code; - } else if (groups.uri !== undefined) { - escapeUrl = groups.uri.length === 0 ? undefined : groups.uri; - } - } - - const code = ansiStyles.codes.get(Number(escapeCode)); - - if (pre[index + 1] === '\n') { - if (escapeUrl) { - returnValue += wrapAnsiHyperlink(''); - } - - if (escapeCode && code) { - returnValue += wrapAnsi(code); - } - } else if (character === '\n') { - if (escapeCode && code) { - returnValue += wrapAnsi(escapeCode); - } - - if (escapeUrl) { - returnValue += wrapAnsiHyperlink(escapeUrl); - } - } - } - - return returnValue; -}; - -// For each newline, invoke the method separately -module.exports = (string, columns, options) => { - return String(string) - .normalize() - .replace(/\r\n/g, '\n') - .split('\n') - .map(line => exec(line, columns, options)) - .join('\n'); -}; diff --git a/node_modules/cliui/node_modules/wrap-ansi/package.json b/node_modules/cliui/node_modules/wrap-ansi/package.json deleted file mode 100644 index dfb2f4f..0000000 --- a/node_modules/cliui/node_modules/wrap-ansi/package.json +++ /dev/null @@ -1,62 +0,0 @@ -{ - "name": "wrap-ansi", - "version": "7.0.0", - "description": "Wordwrap a string with ANSI escape codes", - "license": "MIT", - "repository": "chalk/wrap-ansi", - "funding": "https://github.com/chalk/wrap-ansi?sponsor=1", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "https://sindresorhus.com" - }, - "engines": { - "node": ">=10" - }, - "scripts": { - "test": "xo && nyc ava" - }, - "files": [ - "index.js" - ], - "keywords": [ - "wrap", - "break", - "wordwrap", - "wordbreak", - "linewrap", - "ansi", - "styles", - "color", - "colour", - "colors", - "terminal", - "console", - "cli", - "string", - "tty", - "escape", - "formatting", - "rgb", - "256", - "shell", - "xterm", - "log", - "logging", - "command-line", - "text" - ], - "dependencies": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" - }, - "devDependencies": { - "ava": "^2.1.0", - "chalk": "^4.0.0", - "coveralls": "^3.0.3", - "has-ansi": "^4.0.0", - "nyc": "^15.0.1", - "xo": "^0.29.1" - } -} diff --git a/node_modules/cliui/package.json b/node_modules/cliui/package.json deleted file mode 100644 index eab6bf4..0000000 --- a/node_modules/cliui/package.json +++ /dev/null @@ -1,83 +0,0 @@ -{ - "name": "cliui", - "version": "8.0.1", - "description": "easily create complex multi-column command-line-interfaces", - "main": "build/index.cjs", - "exports": { - ".": [ - { - "import": "./index.mjs", - "require": "./build/index.cjs" - }, - "./build/index.cjs" - ] - }, - "type": "module", - "module": "./index.mjs", - "scripts": { - "check": "standardx '**/*.ts' && standardx '**/*.js' && standardx '**/*.cjs'", - "fix": "standardx --fix '**/*.ts' && standardx --fix '**/*.js' && standardx --fix '**/*.cjs'", - "pretest": "rimraf build && tsc -p tsconfig.test.json && cross-env NODE_ENV=test npm run build:cjs", - "test": "c8 mocha ./test/*.cjs", - "test:esm": "c8 mocha ./test/esm/cliui-test.mjs", - "postest": "check", - "coverage": "c8 report --check-coverage", - "precompile": "rimraf build", - "compile": "tsc", - "postcompile": "npm run build:cjs", - "build:cjs": "rollup -c", - "prepare": "npm run compile" - }, - "repository": "yargs/cliui", - "standard": { - "ignore": [ - "**/example/**" - ], - "globals": [ - "it" - ] - }, - "keywords": [ - "cli", - "command-line", - "layout", - "design", - "console", - "wrap", - "table" - ], - "author": "Ben Coe <ben@npmjs.com>", - "license": "ISC", - "dependencies": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.1", - "wrap-ansi": "^7.0.0" - }, - "devDependencies": { - "@types/node": "^14.0.27", - "@typescript-eslint/eslint-plugin": "^4.0.0", - "@typescript-eslint/parser": "^4.0.0", - "c8": "^7.3.0", - "chai": "^4.2.0", - "chalk": "^4.1.0", - "cross-env": "^7.0.2", - "eslint": "^7.6.0", - "eslint-plugin-import": "^2.22.0", - "eslint-plugin-node": "^11.1.0", - "gts": "^3.0.0", - "mocha": "^10.0.0", - "rimraf": "^3.0.2", - "rollup": "^2.23.1", - "rollup-plugin-ts": "^3.0.2", - "standardx": "^7.0.0", - "typescript": "^4.0.0" - }, - "files": [ - "build", - "index.mjs", - "!*.d.ts" - ], - "engines": { - "node": ">=12" - } -} diff --git a/node_modules/concat-map/example/map.js b/node_modules/concat-map/example/map.js deleted file mode 100644 index 3365621..0000000 --- a/node_modules/concat-map/example/map.js +++ /dev/null @@ -1,6 +0,0 @@ -var concatMap = require('../'); -var xs = [ 1, 2, 3, 4, 5, 6 ]; -var ys = concatMap(xs, function (x) { - return x % 2 ? [ x - 0.1, x, x + 0.1 ] : []; -}); -console.dir(ys); diff --git a/node_modules/concat-map/index.js b/node_modules/concat-map/index.js deleted file mode 100644 index b29a781..0000000 --- a/node_modules/concat-map/index.js +++ /dev/null @@ -1,13 +0,0 @@ -module.exports = function (xs, fn) { - var res = []; - for (var i = 0; i < xs.length; i++) { - var x = fn(xs[i], i); - if (isArray(x)) res.push.apply(res, x); - else res.push(x); - } - return res; -}; - -var isArray = Array.isArray || function (xs) { - return Object.prototype.toString.call(xs) === '[object Array]'; -}; diff --git a/node_modules/concat-map/package.json b/node_modules/concat-map/package.json deleted file mode 100644 index d3640e6..0000000 --- a/node_modules/concat-map/package.json +++ /dev/null @@ -1,43 +0,0 @@ -{ - "name" : "concat-map", - "description" : "concatenative mapdashery", - "version" : "0.0.1", - "repository" : { - "type" : "git", - "url" : "git://github.com/substack/node-concat-map.git" - }, - "main" : "index.js", - "keywords" : [ - "concat", - "concatMap", - "map", - "functional", - "higher-order" - ], - "directories" : { - "example" : "example", - "test" : "test" - }, - "scripts" : { - "test" : "tape test/*.js" - }, - "devDependencies" : { - "tape" : "~2.4.0" - }, - "license" : "MIT", - "author" : { - "name" : "James Halliday", - "email" : "mail@substack.net", - "url" : "http://substack.net" - }, - "testling" : { - "files" : "test/*.js", - "browsers" : { - "ie" : [ 6, 7, 8, 9 ], - "ff" : [ 3.5, 10, 15.0 ], - "chrome" : [ 10, 22 ], - "safari" : [ 5.1 ], - "opera" : [ 12 ] - } - } -} diff --git a/node_modules/css-select/lib/attributes.d.ts b/node_modules/css-select/lib/attributes.d.ts deleted file mode 100644 index 27b60a5..0000000 --- a/node_modules/css-select/lib/attributes.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -import type { CompiledQuery, InternalOptions } from "./types.js"; -import type { AttributeSelector, AttributeAction } from "css-what"; -/** - * Attribute selectors - */ -export declare const attributeRules: Record<AttributeAction, <Node, ElementNode extends Node>(next: CompiledQuery<ElementNode>, data: AttributeSelector, options: InternalOptions<Node, ElementNode>) => CompiledQuery<ElementNode>>; -//# sourceMappingURL=attributes.d.ts.map \ No newline at end of file diff --git a/node_modules/css-select/lib/attributes.d.ts.map b/node_modules/css-select/lib/attributes.d.ts.map deleted file mode 100644 index aafba15..0000000 --- a/node_modules/css-select/lib/attributes.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"attributes.d.ts","sourceRoot":"https://raw.githubusercontent.com/fb55/css-select/0f0725a9dfeddd2fdb54eda9656cdbab5bbf6be6/src/","sources":["attributes.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AACjE,OAAO,KAAK,EAAE,iBAAiB,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AA+EnE;;GAEG;AACH,eAAO,MAAM,cAAc,EAAE,MAAM,CAC/B,eAAe,EACf,CAAC,IAAI,EAAE,WAAW,SAAS,IAAI,EAC3B,IAAI,EAAE,aAAa,CAAC,WAAW,CAAC,EAChC,IAAI,EAAE,iBAAiB,EACvB,OAAO,EAAE,eAAe,CAAC,IAAI,EAAE,WAAW,CAAC,KAC1C,aAAa,CAAC,WAAW,CAAC,CAsLlC,CAAC"} \ No newline at end of file diff --git a/node_modules/css-select/lib/attributes.js b/node_modules/css-select/lib/attributes.js deleted file mode 100644 index 3c6867f..0000000 --- a/node_modules/css-select/lib/attributes.js +++ /dev/null @@ -1,236 +0,0 @@ -"use strict"; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.attributeRules = void 0; -var boolbase_1 = __importDefault(require("boolbase")); -/** - * All reserved characters in a regex, used for escaping. - * - * Taken from XRegExp, (c) 2007-2020 Steven Levithan under the MIT license - * https://github.com/slevithan/xregexp/blob/95eeebeb8fac8754d54eafe2b4743661ac1cf028/src/xregexp.js#L794 - */ -var reChars = /[-[\]{}()*+?.,\\^$|#\s]/g; -function escapeRegex(value) { - return value.replace(reChars, "\\$&"); -} -/** - * Attributes that are case-insensitive in HTML. - * - * @private - * @see https://html.spec.whatwg.org/multipage/semantics-other.html#case-sensitivity-of-selectors - */ -var caseInsensitiveAttributes = new Set([ - "accept", - "accept-charset", - "align", - "alink", - "axis", - "bgcolor", - "charset", - "checked", - "clear", - "codetype", - "color", - "compact", - "declare", - "defer", - "dir", - "direction", - "disabled", - "enctype", - "face", - "frame", - "hreflang", - "http-equiv", - "lang", - "language", - "link", - "media", - "method", - "multiple", - "nohref", - "noresize", - "noshade", - "nowrap", - "readonly", - "rel", - "rev", - "rules", - "scope", - "scrolling", - "selected", - "shape", - "target", - "text", - "type", - "valign", - "valuetype", - "vlink", -]); -function shouldIgnoreCase(selector, options) { - return typeof selector.ignoreCase === "boolean" - ? selector.ignoreCase - : selector.ignoreCase === "quirks" - ? !!options.quirksMode - : !options.xmlMode && caseInsensitiveAttributes.has(selector.name); -} -/** - * Attribute selectors - */ -exports.attributeRules = { - equals: function (next, data, options) { - var adapter = options.adapter; - var name = data.name; - var value = data.value; - if (shouldIgnoreCase(data, options)) { - value = value.toLowerCase(); - return function (elem) { - var attr = adapter.getAttributeValue(elem, name); - return (attr != null && - attr.length === value.length && - attr.toLowerCase() === value && - next(elem)); - }; - } - return function (elem) { - return adapter.getAttributeValue(elem, name) === value && next(elem); - }; - }, - hyphen: function (next, data, options) { - var adapter = options.adapter; - var name = data.name; - var value = data.value; - var len = value.length; - if (shouldIgnoreCase(data, options)) { - value = value.toLowerCase(); - return function hyphenIC(elem) { - var attr = adapter.getAttributeValue(elem, name); - return (attr != null && - (attr.length === len || attr.charAt(len) === "-") && - attr.substr(0, len).toLowerCase() === value && - next(elem)); - }; - } - return function hyphen(elem) { - var attr = adapter.getAttributeValue(elem, name); - return (attr != null && - (attr.length === len || attr.charAt(len) === "-") && - attr.substr(0, len) === value && - next(elem)); - }; - }, - element: function (next, data, options) { - var adapter = options.adapter; - var name = data.name, value = data.value; - if (/\s/.test(value)) { - return boolbase_1.default.falseFunc; - } - var regex = new RegExp("(?:^|\\s)".concat(escapeRegex(value), "(?:$|\\s)"), shouldIgnoreCase(data, options) ? "i" : ""); - return function element(elem) { - var attr = adapter.getAttributeValue(elem, name); - return (attr != null && - attr.length >= value.length && - regex.test(attr) && - next(elem)); - }; - }, - exists: function (next, _a, _b) { - var name = _a.name; - var adapter = _b.adapter; - return function (elem) { return adapter.hasAttrib(elem, name) && next(elem); }; - }, - start: function (next, data, options) { - var adapter = options.adapter; - var name = data.name; - var value = data.value; - var len = value.length; - if (len === 0) { - return boolbase_1.default.falseFunc; - } - if (shouldIgnoreCase(data, options)) { - value = value.toLowerCase(); - return function (elem) { - var attr = adapter.getAttributeValue(elem, name); - return (attr != null && - attr.length >= len && - attr.substr(0, len).toLowerCase() === value && - next(elem)); - }; - } - return function (elem) { - var _a; - return !!((_a = adapter.getAttributeValue(elem, name)) === null || _a === void 0 ? void 0 : _a.startsWith(value)) && - next(elem); - }; - }, - end: function (next, data, options) { - var adapter = options.adapter; - var name = data.name; - var value = data.value; - var len = -value.length; - if (len === 0) { - return boolbase_1.default.falseFunc; - } - if (shouldIgnoreCase(data, options)) { - value = value.toLowerCase(); - return function (elem) { - var _a; - return ((_a = adapter - .getAttributeValue(elem, name)) === null || _a === void 0 ? void 0 : _a.substr(len).toLowerCase()) === value && next(elem); - }; - } - return function (elem) { - var _a; - return !!((_a = adapter.getAttributeValue(elem, name)) === null || _a === void 0 ? void 0 : _a.endsWith(value)) && - next(elem); - }; - }, - any: function (next, data, options) { - var adapter = options.adapter; - var name = data.name, value = data.value; - if (value === "") { - return boolbase_1.default.falseFunc; - } - if (shouldIgnoreCase(data, options)) { - var regex_1 = new RegExp(escapeRegex(value), "i"); - return function anyIC(elem) { - var attr = adapter.getAttributeValue(elem, name); - return (attr != null && - attr.length >= value.length && - regex_1.test(attr) && - next(elem)); - }; - } - return function (elem) { - var _a; - return !!((_a = adapter.getAttributeValue(elem, name)) === null || _a === void 0 ? void 0 : _a.includes(value)) && - next(elem); - }; - }, - not: function (next, data, options) { - var adapter = options.adapter; - var name = data.name; - var value = data.value; - if (value === "") { - return function (elem) { - return !!adapter.getAttributeValue(elem, name) && next(elem); - }; - } - else if (shouldIgnoreCase(data, options)) { - value = value.toLowerCase(); - return function (elem) { - var attr = adapter.getAttributeValue(elem, name); - return ((attr == null || - attr.length !== value.length || - attr.toLowerCase() !== value) && - next(elem)); - }; - } - return function (elem) { - return adapter.getAttributeValue(elem, name) !== value && next(elem); - }; - }, -}; -//# sourceMappingURL=attributes.js.map \ No newline at end of file diff --git a/node_modules/css-select/lib/attributes.js.map b/node_modules/css-select/lib/attributes.js.map deleted file mode 100644 index e542c97..0000000 --- a/node_modules/css-select/lib/attributes.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"attributes.js","sourceRoot":"https://raw.githubusercontent.com/fb55/css-select/0f0725a9dfe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;oBACT,IAAI,CAAC,MAAM,KAAK,KAAK,CAAC,MAAM;oBAC5B,IAAI,CAAC,WAAW,EAAE,KAAK,KAAK,CAAC;oBACjC,IAAI,CAAC,IAAI,CAAC,CACb,CAAC;YACN,CAAC,CAAC;SACL;QAED,OAAO,UAAC,IAAI;YACR,OAAA,OAAO,CAAC,iBAAiB,CAAC,IAAI,EAAE,IAAI,CAAC,KAAK,KAAK,IAAI,IAAI,CAAC,IAAI,CAAC;QAA7D,CAA6D,CAAC;IACtE,CAAC;CACJ,CAAC"} \ No newline at end of file diff --git a/node_modules/css-select/lib/compile.d.ts b/node_modules/css-select/lib/compile.d.ts deleted file mode 100644 index f67b508..0000000 --- a/node_modules/css-select/lib/compile.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { Selector } from "css-what"; -import type { CompiledQuery, InternalOptions, InternalSelector } from "./types.js"; -/** - * Compiles a selector to an executable function. - * - * @param selector Selector to compile. - * @param options Compilation options. - * @param context Optional context for the selector. - */ -export declare function compile<Node, ElementNode extends Node>(selector: string | Selector[][], options: InternalOptions<Node, ElementNode>, context?: Node[] | Node): CompiledQuery<Node>; -export declare function compileUnsafe<Node, ElementNode extends Node>(selector: string | Selector[][], options: InternalOptions<Node, ElementNode>, context?: Node[] | Node): CompiledQuery<ElementNode>; -export declare function compileToken<Node, ElementNode extends Node>(token: InternalSelector[][], options: InternalOptions<Node, ElementNode>, context?: Node[] | Node): CompiledQuery<ElementNode>; -//# sourceMappingURL=compile.d.ts.map \ No newline at end of file diff --git a/node_modules/css-select/lib/compile.d.ts.map b/node_modules/css-select/lib/compile.d.ts.map deleted file mode 100644 index 59231bc..0000000 --- a/node_modules/css-select/lib/compile.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"compile.d.ts","sourceRoot":"https://raw.githubusercontent.com/fb55/css-select/0f0725a9dfeddd2fdb54eda9656cdbab5bbf6be6/src/","sources":["compile.ts"],"names":[],"mappings":"AAAA,OAAO,EAAS,QAAQ,EAAgB,MAAM,UAAU,CAAC;AAQzD,OAAO,KAAK,EACR,aAAa,EACb,eAAe,EACf,gBAAgB,EACnB,MAAM,YAAY,CAAC;AAEpB;;;;;;GAMG;AACH,wBAAgB,OAAO,CAAC,IAAI,EAAE,WAAW,SAAS,IAAI,EAClD,QAAQ,EAAE,MAAM,GAAG,QAAQ,EAAE,EAAE,EAC/B,OAAO,EAAE,eAAe,CAAC,IAAI,EAAE,WAAW,CAAC,EAC3C,OAAO,CAAC,EAAE,IAAI,EAAE,GAAG,IAAI,GACxB,aAAa,CAAC,IAAI,CAAC,CAGrB;AAED,wBAAgB,aAAa,CAAC,IAAI,EAAE,WAAW,SAAS,IAAI,EACxD,QAAQ,EAAE,MAAM,GAAG,QAAQ,EAAE,EAAE,EAC/B,OAAO,EAAE,eAAe,CAAC,IAAI,EAAE,WAAW,CAAC,EAC3C,OAAO,CAAC,EAAE,IAAI,EAAE,GAAG,IAAI,GACxB,aAAa,CAAC,WAAW,CAAC,CAG5B;AAqDD,wBAAgB,YAAY,CAAC,IAAI,EAAE,WAAW,SAAS,IAAI,EACvD,KAAK,EAAE,gBAAgB,EAAE,EAAE,EAC3B,OAAO,EAAE,eAAe,CAAC,IAAI,EAAE,WAAW,CAAC,EAC3C,OAAO,CAAC,EAAE,IAAI,EAAE,GAAG,IAAI,GACxB,aAAa,CAAC,WAAW,CAAC,CAsD5B"} \ No newline at end of file diff --git a/node_modules/css-select/lib/compile.js b/node_modules/css-select/lib/compile.js deleted file mode 100644 index cf0507c..0000000 --- a/node_modules/css-select/lib/compile.js +++ /dev/null @@ -1,151 +0,0 @@ -"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 __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}); -var __importStar = (this && this.__importStar) || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; -}; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.compileToken = exports.compileUnsafe = exports.compile = void 0; -var css_what_1 = require("css-what"); -var boolbase_1 = __importDefault(require("boolbase")); -var sort_js_1 = __importStar(require("./sort.js")); -var general_js_1 = require("./general.js"); -var subselects_js_1 = require("./pseudo-selectors/subselects.js"); -/** - * Compiles a selector to an executable function. - * - * @param selector Selector to compile. - * @param options Compilation options. - * @param context Optional context for the selector. - */ -function compile(selector, options, context) { - var next = compileUnsafe(selector, options, context); - return (0, subselects_js_1.ensureIsTag)(next, options.adapter); -} -exports.compile = compile; -function compileUnsafe(selector, options, context) { - var token = typeof selector === "string" ? (0, css_what_1.parse)(selector) : selector; - return compileToken(token, options, context); -} -exports.compileUnsafe = compileUnsafe; -function includesScopePseudo(t) { - return (t.type === css_what_1.SelectorType.Pseudo && - (t.name === "scope" || - (Array.isArray(t.data) && - t.data.some(function (data) { return data.some(includesScopePseudo); })))); -} -var DESCENDANT_TOKEN = { type: css_what_1.SelectorType.Descendant }; -var FLEXIBLE_DESCENDANT_TOKEN = { - type: "_flexibleDescendant", -}; -var SCOPE_TOKEN = { - type: css_what_1.SelectorType.Pseudo, - name: "scope", - data: null, -}; -/* - * CSS 4 Spec (Draft): 3.4.1. Absolutizing a Relative Selector - * http://www.w3.org/TR/selectors4/#absolutizing - */ -function absolutize(token, _a, context) { - var adapter = _a.adapter; - // TODO Use better check if the context is a document - var hasContext = !!(context === null || context === void 0 ? void 0 : context.every(function (e) { - var parent = adapter.isTag(e) && adapter.getParent(e); - return e === subselects_js_1.PLACEHOLDER_ELEMENT || (parent && adapter.isTag(parent)); - })); - for (var _i = 0, token_1 = token; _i < token_1.length; _i++) { - var t = token_1[_i]; - if (t.length > 0 && - (0, sort_js_1.isTraversal)(t[0]) && - t[0].type !== css_what_1.SelectorType.Descendant) { - // Don't continue in else branch - } - else if (hasContext && !t.some(includesScopePseudo)) { - t.unshift(DESCENDANT_TOKEN); - } - else { - continue; - } - t.unshift(SCOPE_TOKEN); - } -} -function compileToken(token, options, context) { - var _a; - token.forEach(sort_js_1.default); - context = (_a = options.context) !== null && _a !== void 0 ? _a : context; - var isArrayContext = Array.isArray(context); - var finalContext = context && (Array.isArray(context) ? context : [context]); - // Check if the selector is relative - if (options.relativeSelector !== false) { - absolutize(token, options, finalContext); - } - else if (token.some(function (t) { return t.length > 0 && (0, sort_js_1.isTraversal)(t[0]); })) { - throw new Error("Relative selectors are not allowed when the `relativeSelector` option is disabled"); - } - var shouldTestNextSiblings = false; - var query = token - .map(function (rules) { - if (rules.length >= 2) { - var first = rules[0], second = rules[1]; - if (first.type !== css_what_1.SelectorType.Pseudo || - first.name !== "scope") { - // Ignore - } - else if (isArrayContext && - second.type === css_what_1.SelectorType.Descendant) { - rules[1] = FLEXIBLE_DESCENDANT_TOKEN; - } - else if (second.type === css_what_1.SelectorType.Adjacent || - second.type === css_what_1.SelectorType.Sibling) { - shouldTestNextSiblings = true; - } - } - return compileRules(rules, options, finalContext); - }) - .reduce(reduceRules, boolbase_1.default.falseFunc); - query.shouldTestNextSiblings = shouldTestNextSiblings; - return query; -} -exports.compileToken = compileToken; -function compileRules(rules, options, context) { - var _a; - return rules.reduce(function (previous, rule) { - return previous === boolbase_1.default.falseFunc - ? boolbase_1.default.falseFunc - : (0, general_js_1.compileGeneralSelector)(previous, rule, options, context, compileToken); - }, (_a = options.rootFunc) !== null && _a !== void 0 ? _a : boolbase_1.default.trueFunc); -} -function reduceRules(a, b) { - if (b === boolbase_1.default.falseFunc || a === boolbase_1.default.trueFunc) { - return a; - } - if (a === boolbase_1.default.falseFunc || b === boolbase_1.default.trueFunc) { - return b; - } - return function combine(elem) { - return a(elem) || b(elem); - }; -} -//# sourceMappingURL=compile.js.map \ No newline at end of file diff --git a/node_modules/css-select/lib/compile.js.map b/node_modules/css-select/lib/compile.js.map deleted file mode 100644 index 0634249..0000000 --- a/node_modules/css-select/lib/compile.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"compile.js","sourceRoot":"https://raw.githubusercontent.com/fb55/css-select/0f0725a9dfeddd2fdb54eda9656cdbab5bbf6be6/src/","sources":["compile.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,qCAAyD;AACzD,sDAAgC;AAChC,mDAAmD;AACnD,2CAAsD;AACtD,kEAG0C;AAO1C;;;;;;GAMG;AACH,SAAgB,OAAO,CACnB,QAA+B,EAC/B,OAA2C,EAC3C,OAAuB;IAEvB,IAAM,IAAI,GAAG,aAAa,CAAC,QAAQ,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;IACvD,OAAO,IAAA,2BAAW,EAAC,IAAI,EAAE,OAAO,CAAC,OAAO,CAAC,CAAC;AAC9C,CAAC;AAPD,0BAOC;AAED,SAAgB,aAAa,CACzB,QAA+B,EAC/B,OAA2C,EAC3C,OAAuB;IAEvB,IAAM,KAAK,GAAG,OAAO,QAAQ,KAAK,QAAQ,CAAC,CAAC,CAAC,IAAA,gBAAK,EAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC;IACxE,OAAO,YAAY,CAAoB,KAAK,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;AACpE,CAAC;AAPD,sCAOC;AAED,SAAS,mBAAmB,CAAC,CAAmB;IAC5C,OAAO,CACH,CAAC,CAAC,IAAI,KAAK,uBAAY,CAAC,MAAM;QAC9B,CAAC,CA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,CAAC,QAAQ,EAAE;QACrD,OAAO,CAAC,CAAC;KACZ;IAED,OAAO,SAAS,OAAO,CAAC,IAAI;QACxB,OAAO,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC;IAC9B,CAAC,CAAC;AACN,CAAC"} \ No newline at end of file diff --git a/node_modules/css-select/lib/esm/attributes.d.ts b/node_modules/css-select/lib/esm/attributes.d.ts deleted file mode 100644 index 27b60a5..0000000 --- a/node_modules/css-select/lib/esm/attributes.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -import type { CompiledQuery, InternalOptions } from "./types.js"; -import type { AttributeSelector, AttributeAction } from "css-what"; -/** - * Attribute selectors - */ -export declare const attributeRules: Record<AttributeAction, <Node, ElementNode extends Node>(next: CompiledQuery<ElementNode>, data: AttributeSelector, options: InternalOptions<Node, ElementNode>) => CompiledQuery<ElementNode>>; -//# sourceMappingURL=attributes.d.ts.map \ No newline at end of file diff --git a/node_modules/css-select/lib/esm/attributes.d.ts.map b/node_modules/css-select/lib/esm/attributes.d.ts.map deleted file mode 100644 index aafba15..0000000 --- a/node_modules/css-select/lib/esm/attributes.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"attributes.d.ts","sourceRoot":"https://raw.githubusercontent.com/fb55/css-select/0f0725a9dfeddd2fdb54eda9656cdbab5bbf6be6/src/","sources":["attributes.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AACjE,OAAO,KAAK,EAAE,iBAAiB,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AA+EnE;;GAEG;AACH,eAAO,MAAM,cAAc,EAAE,MAAM,CAC/B,eAAe,EACf,CAAC,IAAI,EAAE,WAAW,SAAS,IAAI,EAC3B,IAAI,EAAE,aAAa,CAAC,WAAW,CAAC,EAChC,IAAI,EAAE,iBAAiB,EACvB,OAAO,EAAE,eAAe,CAAC,IAAI,EAAE,WAAW,CAAC,KAC1C,aAAa,CAAC,WAAW,CAAC,CAsLlC,CAAC"} \ No newline at end of file diff --git a/node_modules/css-select/lib/esm/attributes.js b/node_modules/css-select/lib/esm/attributes.js deleted file mode 100644 index 199467e..0000000 --- a/node_modules/css-select/lib/esm/attributes.js +++ /dev/null @@ -1,222 +0,0 @@ -import boolbase from "boolbase"; -/** - * All reserved characters in a regex, used for escaping. - * - * Taken from XRegExp, (c) 2007-2020 Steven Levithan under the MIT license - * https://github.com/slevithan/xregexp/blob/95eeebeb8fac8754d54eafe2b4743661ac1cf028/src/xregexp.js#L794 - */ -const reChars = /[-[\]{}()*+?.,\\^$|#\s]/g; -function escapeRegex(value) { - return value.replace(reChars, "\\$&"); -} -/** - * Attributes that are case-insensitive in HTML. - * - * @private - * @see https://html.spec.whatwg.org/multipage/semantics-other.html#case-sensitivity-of-selectors - */ -const caseInsensitiveAttributes = new Set([ - "accept", - "accept-charset", - "align", - "alink", - "axis", - "bgcolor", - "charset", - "checked", - "clear", - "codetype", - "color", - "compact", - "declare", - "defer", - "dir", - "direction", - "disabled", - "enctype", - "face", - "frame", - "hreflang", - "http-equiv", - "lang", - "language", - "link", - "media", - "method", - "multiple", - "nohref", - "noresize", - "noshade", - "nowrap", - "readonly", - "rel", - "rev", - "rules", - "scope", - "scrolling", - "selected", - "shape", - "target", - "text", - "type", - "valign", - "valuetype", - "vlink", -]); -function shouldIgnoreCase(selector, options) { - return typeof selector.ignoreCase === "boolean" - ? selector.ignoreCase - : selector.ignoreCase === "quirks" - ? !!options.quirksMode - : !options.xmlMode && caseInsensitiveAttributes.has(selector.name); -} -/** - * Attribute selectors - */ -export const attributeRules = { - equals(next, data, options) { - const { adapter } = options; - const { name } = data; - let { value } = data; - if (shouldIgnoreCase(data, options)) { - value = value.toLowerCase(); - return (elem) => { - const attr = adapter.getAttributeValue(elem, name); - return (attr != null && - attr.length === value.length && - attr.toLowerCase() === value && - next(elem)); - }; - } - return (elem) => adapter.getAttributeValue(elem, name) === value && next(elem); - }, - hyphen(next, data, options) { - const { adapter } = options; - const { name } = data; - let { value } = data; - const len = value.length; - if (shouldIgnoreCase(data, options)) { - value = value.toLowerCase(); - return function hyphenIC(elem) { - const attr = adapter.getAttributeValue(elem, name); - return (attr != null && - (attr.length === len || attr.charAt(len) === "-") && - attr.substr(0, len).toLowerCase() === value && - next(elem)); - }; - } - return function hyphen(elem) { - const attr = adapter.getAttributeValue(elem, name); - return (attr != null && - (attr.length === len || attr.charAt(len) === "-") && - attr.substr(0, len) === value && - next(elem)); - }; - }, - element(next, data, options) { - const { adapter } = options; - const { name, value } = data; - if (/\s/.test(value)) { - return boolbase.falseFunc; - } - const regex = new RegExp(`(?:^|\\s)${escapeRegex(value)}(?:$|\\s)`, shouldIgnoreCase(data, options) ? "i" : ""); - return function element(elem) { - const attr = adapter.getAttributeValue(elem, name); - return (attr != null && - attr.length >= value.length && - regex.test(attr) && - next(elem)); - }; - }, - exists(next, { name }, { adapter }) { - return (elem) => adapter.hasAttrib(elem, name) && next(elem); - }, - start(next, data, options) { - const { adapter } = options; - const { name } = data; - let { value } = data; - const len = value.length; - if (len === 0) { - return boolbase.falseFunc; - } - if (shouldIgnoreCase(data, options)) { - value = value.toLowerCase(); - return (elem) => { - const attr = adapter.getAttributeValue(elem, name); - return (attr != null && - attr.length >= len && - attr.substr(0, len).toLowerCase() === value && - next(elem)); - }; - } - return (elem) => { - var _a; - return !!((_a = adapter.getAttributeValue(elem, name)) === null || _a === void 0 ? void 0 : _a.startsWith(value)) && - next(elem); - }; - }, - end(next, data, options) { - const { adapter } = options; - const { name } = data; - let { value } = data; - const len = -value.length; - if (len === 0) { - return boolbase.falseFunc; - } - if (shouldIgnoreCase(data, options)) { - value = value.toLowerCase(); - return (elem) => { - var _a; - return ((_a = adapter - .getAttributeValue(elem, name)) === null || _a === void 0 ? void 0 : _a.substr(len).toLowerCase()) === value && next(elem); - }; - } - return (elem) => { - var _a; - return !!((_a = adapter.getAttributeValue(elem, name)) === null || _a === void 0 ? void 0 : _a.endsWith(value)) && - next(elem); - }; - }, - any(next, data, options) { - const { adapter } = options; - const { name, value } = data; - if (value === "") { - return boolbase.falseFunc; - } - if (shouldIgnoreCase(data, options)) { - const regex = new RegExp(escapeRegex(value), "i"); - return function anyIC(elem) { - const attr = adapter.getAttributeValue(elem, name); - return (attr != null && - attr.length >= value.length && - regex.test(attr) && - next(elem)); - }; - } - return (elem) => { - var _a; - return !!((_a = adapter.getAttributeValue(elem, name)) === null || _a === void 0 ? void 0 : _a.includes(value)) && - next(elem); - }; - }, - not(next, data, options) { - const { adapter } = options; - const { name } = data; - let { value } = data; - if (value === "") { - return (elem) => !!adapter.getAttributeValue(elem, name) && next(elem); - } - else if (shouldIgnoreCase(data, options)) { - value = value.toLowerCase(); - return (elem) => { - const attr = adapter.getAttributeValue(elem, name); - return ((attr == null || - attr.length !== value.length || - attr.toLowerCase() !== value) && - next(elem)); - }; - } - return (elem) => adapter.getAttributeValue(elem, name) !== value && next(elem); - }, -}; -//# sourceMappingURL=attributes.js.map \ No newline at end of file diff --git a/node_modules/css-select/lib/esm/attributes.js.map b/node_modules/css-select/lib/esm/attributes.js.map deleted file mode 100644 index 09d1da6..0000000 --- a/node_modules/css-select/lib/esm/attributes.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"attributes.js","sourceRoot":"https://raw.githubusercontent.com/fb55/css-select/0f0725a9dfeddd2fdb54eda9656cdbab5bbf6be6/src/","sources":["attributes.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,MAAM,UAAU,CAAC;AAIhC;;;;;GAKG;AACH,MAAM,OAAO,GAAG,0BAA0B,CAAC;AAC3C,SAAS,WAAW,CAAC,KAAa;IAC9B,OAAO,KAAK,CAAC,OAAO,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;AAC1C,CAAC;AAED;;;;;GAKG;AACH,MAAM,yBAAyB,GAAG,IAAI,GAAG,CAAC;IACtC,QAAQ;IACR,gBAAgB;IAChB,OAAO;IACP,OAAO;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,CAAC,iBAAiB,CAAC,IAAI,EAAE,IAAI,CAAC,KAAK,KAAK,IAAI,IAAI,CAAC,IAAI,CAAC,CAAC;IACtE,CAAC;CACJ,CAAC"} \ No newline at end of file diff --git a/node_modules/css-select/lib/esm/compile.d.ts b/node_modules/css-select/lib/esm/compile.d.ts deleted file mode 100644 index f67b508..0000000 --- a/node_modules/css-select/lib/esm/compile.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { Selector } from "css-what"; -import type { CompiledQuery, InternalOptions, InternalSelector } from "./types.js"; -/** - * Compiles a selector to an executable function. - * - * @param selector Selector to compile. - * @param options Compilation options. - * @param context Optional context for the selector. - */ -export declare function compile<Node, ElementNode extends Node>(selector: string | Selector[][], options: InternalOptions<Node, ElementNode>, context?: Node[] | Node): CompiledQuery<Node>; -export declare function compileUnsafe<Node, ElementNode extends Node>(selector: string | Selector[][], options: InternalOptions<Node, ElementNode>, context?: Node[] | Node): CompiledQuery<ElementNode>; -export declare function compileToken<Node, ElementNode extends Node>(token: InternalSelector[][], options: InternalOptions<Node, ElementNode>, context?: Node[] | Node): CompiledQuery<ElementNode>; -//# sourceMappingURL=compile.d.ts.map \ No newline at end of file diff --git a/node_modules/css-select/lib/esm/compile.d.ts.map b/node_modules/css-select/lib/esm/compile.d.ts.map deleted file mode 100644 index 59231bc..0000000 --- a/node_modules/css-select/lib/esm/compile.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"compile.d.ts","sourceRoot":"https://raw.githubusercontent.com/fb55/css-select/0f0725a9dfeddd2fdb54eda9656cdbab5bbf6be6/src/","sources":["compile.ts"],"names":[],"mappings":"AAAA,OAAO,EAAS,QAAQ,EAAgB,MAAM,UAAU,CAAC;AAQzD,OAAO,KAAK,EACR,aAAa,EACb,eAAe,EACf,gBAAgB,EACnB,MAAM,YAAY,CAAC;AAEpB;;;;;;GAMG;AACH,wBAAgB,OAAO,CAAC,IAAI,EAAE,WAAW,SAAS,IAAI,EAClD,QAAQ,EAAE,MAAM,GAAG,QAAQ,EAAE,EAAE,EAC/B,OAAO,EAAE,eAAe,CAAC,IAAI,EAAE,WAAW,CAAC,EAC3C,OAAO,CAAC,EAAE,IAAI,EAAE,GAAG,IAAI,GACxB,aAAa,CAAC,IAAI,CAAC,CAGrB;AAED,wBAAgB,aAAa,CAAC,IAAI,EAAE,WAAW,SAAS,IAAI,EACxD,QAAQ,EAAE,MAAM,GAAG,QAAQ,EAAE,EAAE,EAC/B,OAAO,EAAE,eAAe,CAAC,IAAI,EAAE,WAAW,CAAC,EAC3C,OAAO,CAAC,EAAE,IAAI,EAAE,GAAG,IAAI,GACxB,aAAa,CAAC,WAAW,CAAC,CAG5B;AAqDD,wBAAgB,YAAY,CAAC,IAAI,EAAE,WAAW,SAAS,IAAI,EACvD,KAAK,EAAE,gBAAgB,EAAE,EAAE,EAC3B,OAAO,EAAE,eAAe,CAAC,IAAI,EAAE,WAAW,CAAC,EAC3C,OAAO,CAAC,EAAE,IAAI,EAAE,GAAG,IAAI,GACxB,aAAa,CAAC,WAAW,CAAC,CAsD5B"} \ No newline at end of file diff --git a/node_modules/css-select/lib/esm/compile.js b/node_modules/css-select/lib/esm/compile.js deleted file mode 100644 index 1f5ee57..0000000 --- a/node_modules/css-select/lib/esm/compile.js +++ /dev/null @@ -1,115 +0,0 @@ -import { parse, SelectorType } from "css-what"; -import boolbase from "boolbase"; -import sortRules, { isTraversal } from "./sort.js"; -import { compileGeneralSelector } from "./general.js"; -import { ensureIsTag, PLACEHOLDER_ELEMENT, } from "./pseudo-selectors/subselects.js"; -/** - * Compiles a selector to an executable function. - * - * @param selector Selector to compile. - * @param options Compilation options. - * @param context Optional context for the selector. - */ -export function compile(selector, options, context) { - const next = compileUnsafe(selector, options, context); - return ensureIsTag(next, options.adapter); -} -export function compileUnsafe(selector, options, context) { - const token = typeof selector === "string" ? parse(selector) : selector; - return compileToken(token, options, context); -} -function includesScopePseudo(t) { - return (t.type === SelectorType.Pseudo && - (t.name === "scope" || - (Array.isArray(t.data) && - t.data.some((data) => data.some(includesScopePseudo))))); -} -const DESCENDANT_TOKEN = { type: SelectorType.Descendant }; -const FLEXIBLE_DESCENDANT_TOKEN = { - type: "_flexibleDescendant", -}; -const SCOPE_TOKEN = { - type: SelectorType.Pseudo, - name: "scope", - data: null, -}; -/* - * CSS 4 Spec (Draft): 3.4.1. Absolutizing a Relative Selector - * http://www.w3.org/TR/selectors4/#absolutizing - */ -function absolutize(token, { adapter }, context) { - // TODO Use better check if the context is a document - const hasContext = !!(context === null || context === void 0 ? void 0 : context.every((e) => { - const parent = adapter.isTag(e) && adapter.getParent(e); - return e === PLACEHOLDER_ELEMENT || (parent && adapter.isTag(parent)); - })); - for (const t of token) { - if (t.length > 0 && - isTraversal(t[0]) && - t[0].type !== SelectorType.Descendant) { - // Don't continue in else branch - } - else if (hasContext && !t.some(includesScopePseudo)) { - t.unshift(DESCENDANT_TOKEN); - } - else { - continue; - } - t.unshift(SCOPE_TOKEN); - } -} -export function compileToken(token, options, context) { - var _a; - token.forEach(sortRules); - context = (_a = options.context) !== null && _a !== void 0 ? _a : context; - const isArrayContext = Array.isArray(context); - const finalContext = context && (Array.isArray(context) ? context : [context]); - // Check if the selector is relative - if (options.relativeSelector !== false) { - absolutize(token, options, finalContext); - } - else if (token.some((t) => t.length > 0 && isTraversal(t[0]))) { - throw new Error("Relative selectors are not allowed when the `relativeSelector` option is disabled"); - } - let shouldTestNextSiblings = false; - const query = token - .map((rules) => { - if (rules.length >= 2) { - const [first, second] = rules; - if (first.type !== SelectorType.Pseudo || - first.name !== "scope") { - // Ignore - } - else if (isArrayContext && - second.type === SelectorType.Descendant) { - rules[1] = FLEXIBLE_DESCENDANT_TOKEN; - } - else if (second.type === SelectorType.Adjacent || - second.type === SelectorType.Sibling) { - shouldTestNextSiblings = true; - } - } - return compileRules(rules, options, finalContext); - }) - .reduce(reduceRules, boolbase.falseFunc); - query.shouldTestNextSiblings = shouldTestNextSiblings; - return query; -} -function compileRules(rules, options, context) { - var _a; - return rules.reduce((previous, rule) => previous === boolbase.falseFunc - ? boolbase.falseFunc - : compileGeneralSelector(previous, rule, options, context, compileToken), (_a = options.rootFunc) !== null && _a !== void 0 ? _a : boolbase.trueFunc); -} -function reduceRules(a, b) { - if (b === boolbase.falseFunc || a === boolbase.trueFunc) { - return a; - } - if (a === boolbase.falseFunc || b === boolbase.trueFunc) { - return b; - } - return function combine(elem) { - return a(elem) || b(elem); - }; -} -//# sourceMappingURL=compile.js.map \ No newline at end of file diff --git a/node_modules/css-select/lib/esm/compile.js.map b/node_modules/css-select/lib/esm/compile.js.map deleted file mode 100644 index 8e83703..0000000 --- a/node_modules/css-select/lib/esm/compile.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"compile.js","sourceRoot":"https://raw.githubusercontent.com/fb55/css-select/0f0725a9dfeddd2fdb54eda9656cdbab5bbf6be6/src/","sources":["compile.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAY,YAAY,EAAE,MAAM,UAAU,CAAC;AACzD,OAAO,QAAQ,MAAM,UAAU,CAAC;AAChC,OAAO,SAAS,EAAE,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AACnD,OAAO,EAAE,sBAAsB,EAAE,MAAM,cAAc,CAAC;AACtD,OAAO,EACH,WAAW,EACX,mBAAmB,GACtB,MAAM,kCAAkC,CAAC;AAO1C;;;;;;GAMG;AACH,MAAM,UAAU,OAAO,CACnB,QAA+B,EAC/B,OAA2C,EAC3C,OAAuB;IAEvB,MAAM,IAAI,GAAG,aAAa,CAAC,QAAQ,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;IACvD,OAAO,WAAW,CAAC,IAAI,EAAE,OAAO,CAAC,OAAO,CAAC,CAAC;AAC9C,CAAC;AAED,MAAM,UAAU,aAAa,CACzB,QAA+B,EAC/B,OAA2C,EAC3C,OAAuB;IAEvB,MAAM,KAAK,GAAG,OAAO,QAAQ,KAAK,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,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QAAQ,CAAC,QAAQ,EAAE;QACrD,OAAO,CAAC,CAAC;KACZ;IACD,IAAI,CAAC,KAAK,QAAQ,CAAC,SAAS,IAAI,CAAC,KAAK,QAAQ,CAAC,QAAQ,EAAE;QACrD,OAAO,CAAC,CAAC;KACZ;IAED,OAAO,SAAS,OAAO,CAAC,IAAI;QACxB,OAAO,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC;IAC9B,CAAC,CAAC;AACN,CAAC"} \ No newline at end of file diff --git a/node_modules/css-select/lib/esm/general.d.ts b/node_modules/css-select/lib/esm/general.d.ts deleted file mode 100644 index 2baa1f3..0000000 --- a/node_modules/css-select/lib/esm/general.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -import type { CompiledQuery, InternalOptions, InternalSelector, CompileToken } from "./types.js"; -export declare function compileGeneralSelector<Node, ElementNode extends Node>(next: CompiledQuery<ElementNode>, selector: InternalSelector, options: InternalOptions<Node, ElementNode>, context: Node[] | undefined, compileToken: CompileToken<Node, ElementNode>): CompiledQuery<ElementNode>; -//# sourceMappingURL=general.d.ts.map \ No newline at end of file diff --git a/node_modules/css-select/lib/esm/general.d.ts.map b/node_modules/css-select/lib/esm/general.d.ts.map deleted file mode 100644 index 82c8d6d..0000000 --- a/node_modules/css-select/lib/esm/general.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"general.d.ts","sourceRoot":"https://raw.githubusercontent.com/fb55/css-select/0f0725a9dfeddd2fdb54eda9656cdbab5bbf6be6/src/","sources":["general.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAER,aAAa,EACb,eAAe,EACf,gBAAgB,EAChB,YAAY,EACf,MAAM,YAAY,CAAC;AAkBpB,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,WAAW,SAAS,IAAI,EACjE,IAAI,EAAE,aAAa,CAAC,WAAW,CAAC,EAChC,QAAQ,EAAE,gBAAgB,EAC1B,OAAO,EAAE,eAAe,CAAC,IAAI,EAAE,WAAW,CAAC,EAC3C,OAAO,EAAE,IAAI,EAAE,GAAG,SAAS,EAC3B,YAAY,EAAE,YAAY,CAAC,IAAI,EAAE,WAAW,CAAC,GAC9C,aAAa,CAAC,WAAW,CAAC,CAiK5B"} \ No newline at end of file diff --git a/node_modules/css-select/lib/esm/general.js b/node_modules/css-select/lib/esm/general.js deleted file mode 100644 index 743ef7b..0000000 --- a/node_modules/css-select/lib/esm/general.js +++ /dev/null @@ -1,144 +0,0 @@ -import { attributeRules } from "./attributes.js"; -import { compilePseudoSelector } from "./pseudo-selectors/index.js"; -import { SelectorType } from "css-what"; -function getElementParent(node, adapter) { - const parent = adapter.getParent(node); - if (parent && adapter.isTag(parent)) { - return parent; - } - return null; -} -/* - * All available rules - */ -export function compileGeneralSelector(next, selector, options, context, compileToken) { - const { adapter, equals } = options; - switch (selector.type) { - case SelectorType.PseudoElement: { - throw new Error("Pseudo-elements are not supported by css-select"); - } - case SelectorType.ColumnCombinator: { - throw new Error("Column combinators are not yet supported by css-select"); - } - case SelectorType.Attribute: { - if (selector.namespace != null) { - throw new Error("Namespaced attributes are not yet supported by css-select"); - } - if (!options.xmlMode || options.lowerCaseAttributeNames) { - selector.name = selector.name.toLowerCase(); - } - return attributeRules[selector.action](next, selector, options); - } - case SelectorType.Pseudo: { - return compilePseudoSelector(next, selector, options, context, compileToken); - } - // Tags - case SelectorType.Tag: { - if (selector.namespace != null) { - throw new Error("Namespaced tag names are not yet supported by css-select"); - } - let { name } = selector; - if (!options.xmlMode || options.lowerCaseTags) { - name = name.toLowerCase(); - } - return function tag(elem) { - return adapter.getName(elem) === name && next(elem); - }; - } - // Traversal - case SelectorType.Descendant: { - if (options.cacheResults === false || - typeof WeakSet === "undefined") { - return function descendant(elem) { - let current = elem; - while ((current = getElementParent(current, adapter))) { - if (next(current)) { - return true; - } - } - return false; - }; - } - // @ts-expect-error `ElementNode` is not extending object - const isFalseCache = new WeakSet(); - return function cachedDescendant(elem) { - let current = elem; - while ((current = getElementParent(current, adapter))) { - if (!isFalseCache.has(current)) { - if (adapter.isTag(current) && next(current)) { - return true; - } - isFalseCache.add(current); - } - } - return false; - }; - } - case "_flexibleDescendant": { - // Include element itself, only used while querying an array - return function flexibleDescendant(elem) { - let current = elem; - do { - if (next(current)) - return true; - } while ((current = getElementParent(current, adapter))); - return false; - }; - } - case SelectorType.Parent: { - return function parent(elem) { - return adapter - .getChildren(elem) - .some((elem) => adapter.isTag(elem) && next(elem)); - }; - } - case SelectorType.Child: { - return function child(elem) { - const parent = adapter.getParent(elem); - return parent != null && adapter.isTag(parent) && next(parent); - }; - } - case SelectorType.Sibling: { - return function sibling(elem) { - const siblings = adapter.getSiblings(elem); - for (let i = 0; i < siblings.length; i++) { - const currentSibling = siblings[i]; - if (equals(elem, currentSibling)) - break; - if (adapter.isTag(currentSibling) && next(currentSibling)) { - return true; - } - } - return false; - }; - } - case SelectorType.Adjacent: { - if (adapter.prevElementSibling) { - return function adjacent(elem) { - const previous = adapter.prevElementSibling(elem); - return previous != null && next(previous); - }; - } - return function adjacent(elem) { - const siblings = adapter.getSiblings(elem); - let lastElement; - for (let i = 0; i < siblings.length; i++) { - const currentSibling = siblings[i]; - if (equals(elem, currentSibling)) - break; - if (adapter.isTag(currentSibling)) { - lastElement = currentSibling; - } - } - return !!lastElement && next(lastElement); - }; - } - case SelectorType.Universal: { - if (selector.namespace != null && selector.namespace !== "*") { - throw new Error("Namespaced universal selectors are not yet supported by css-select"); - } - return next; - } - } -} -//# sourceMappingURL=general.js.map \ No newline at end of file diff --git a/node_modules/css-select/lib/esm/general.js.map b/node_modules/css-select/lib/esm/general.js.map deleted file mode 100644 index 6838068..0000000 --- a/node_modules/css-select/lib/esm/general.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"general.js","sourceRoot":"https://raw.githubusercontent.com/fb55/css-select/0f0725a9dfeddd2fdb54eda9656cdbab5bbf6be6/src/","sources":["general.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,E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AC,WAAW,IAAI,IAAI,CAAC,WAAW,CAAC,CAAC;YAC9C,CAAC,CAAC;SACL;QACD,KAAK,YAAY,CAAC,SAAS,CAAC,CAAC;YACzB,IAAI,QAAQ,CAAC,SAAS,IAAI,IAAI,IAAI,QAAQ,CAAC,SAAS,KAAK,GAAG,EAAE;gBAC1D,MAAM,IAAI,KAAK,CACX,oEAAoE,CACvE,CAAC;aACL;YAED,OAAO,IAAI,CAAC;SACf;KACJ;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/css-select/lib/esm/index.d.ts b/node_modules/css-select/lib/esm/index.d.ts deleted file mode 100644 index 0911372..0000000 --- a/node_modules/css-select/lib/esm/index.d.ts +++ /dev/null @@ -1,50 +0,0 @@ -import type { CompiledQuery, Options, Query, Adapter } from "./types.js"; -export type { Options }; -/** - * Compiles the query, returns a function. - */ -export declare const compile: <Node, ElementNode extends Node>(selector: string | import("css-what").Selector[][], options?: Options<Node, ElementNode> | undefined, context?: Node | Node[] | undefined) => CompiledQuery<Node>; -export declare const _compileUnsafe: <Node, ElementNode extends Node>(selector: string | import("css-what").Selector[][], options?: Options<Node, ElementNode> | undefined, context?: Node | Node[] | undefined) => CompiledQuery<ElementNode>; -export declare const _compileToken: <Node, ElementNode extends Node>(selector: import("./types.js").InternalSelector[][], options?: Options<Node, ElementNode> | undefined, context?: Node | Node[] | undefined) => CompiledQuery<ElementNode>; -export declare function prepareContext<Node, ElementNode extends Node>(elems: Node | Node[], adapter: Adapter<Node, ElementNode>, shouldTestNextSiblings?: boolean): Node[]; -/** - * @template Node The generic Node type for the DOM adapter being used. - * @template ElementNode The Node type for elements for the DOM adapter being used. - * @param elems Elements to query. If it is an element, its children will be queried.. - * @param query can be either a CSS selector string or a compiled query function. - * @param [options] options for querying the document. - * @see compile for supported selector queries. - * @returns All matching elements. - * - */ -export declare const selectAll: <Node, ElementNode extends Node>(query: Query<ElementNode>, elements: Node | Node[], options?: Options<Node, ElementNode> | undefined) => ElementNode[]; -/** - * @template Node The generic Node type for the DOM adapter being used. - * @template ElementNode The Node type for elements for the DOM adapter being used. - * @param elems Elements to query. If it is an element, its children will be queried.. - * @param query can be either a CSS selector string or a compiled query function. - * @param [options] options for querying the document. - * @see compile for supported selector queries. - * @returns the first match, or null if there was no match. - */ -export declare const selectOne: <Node, ElementNode extends Node>(query: Query<ElementNode>, elements: Node | Node[], options?: Options<Node, ElementNode> | undefined) => ElementNode | null; -/** - * Tests whether or not an element is matched by query. - * - * @template Node The generic Node type for the DOM adapter being used. - * @template ElementNode The Node type for elements for the DOM adapter being used. - * @param elem The element to test if it matches the query. - * @param query can be either a CSS selector string or a compiled query function. - * @param [options] options for querying the document. - * @see compile for supported selector queries. - * @returns - */ -export declare function is<Node, ElementNode extends Node>(elem: ElementNode, query: Query<ElementNode>, options?: Options<Node, ElementNode>): boolean; -/** - * Alias for selectAll(query, elems, options). - * @see [compile] for supported selector queries. - */ -export default selectAll; -/** @deprecated Use the `pseudos` option instead. */ -export { filters, pseudos, aliases } from "./pseudo-selectors/index.js"; -//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/css-select/lib/esm/index.d.ts.map b/node_modules/css-select/lib/esm/index.d.ts.map deleted file mode 100644 index 120c4fe..0000000 --- a/node_modules/css-select/lib/esm/index.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"https://raw.githubusercontent.com/fb55/css-select/0f0725a9dfeddd2fdb54eda9656cdbab5bbf6be6/src/","sources":["index.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EACR,aAAa,EACb,OAAO,EAEP,KAAK,EACL,OAAO,EAEV,MAAM,YAAY,CAAC;AAGpB,YAAY,EAAE,OAAO,EAAE,CAAC;AA0CxB;;GAEG;AACH,eAAO,MAAM,OAAO,oMAA0B,CAAC;AAC/C,eAAO,MAAM,cAAc,2MAA6B,CAAC;AACzD,eAAO,MAAM,aAAa,4MAA4B,CAAC;AA6BvD,wBAAgB,cAAc,CAAC,IAAI,EAAE,WAAW,SAAS,IAAI,EACzD,KAAK,EAAE,IAAI,GAAG,IAAI,EAAE,EACpB,OAAO,EAAE,OAAO,CAAC,IAAI,EAAE,WAAW,CAAC,EACnC,sBAAsB,UAAQ,GAC/B,IAAI,EAAE,CAYR;AAiBD;;;;;;;;;GASG;AACH,eAAO,MAAM,SAAS,yJASrB,CAAC;AAEF;;;;;;;;GAQG;AACH,eAAO,MAAM,SAAS,8JASrB,CAAC;AAEF;;;;;;;;;;GAUG;AACH,wBAAgB,EAAE,CAAC,IAAI,EAAE,WAAW,SAAS,IAAI,EAC7C,IAAI,EAAE,WAAW,EACjB,KAAK,EAAE,KAAK,CAAC,WAAW,CAAC,EACzB,OAAO,CAAC,EAAE,OAAO,CAAC,IAAI,EAAE,WAAW,CAAC,GACrC,OAAO,CAKT;AAED;;;GAGG;AACH,eAAe,SAAS,CAAC;AAGzB,oDAAoD;AACpD,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,6BAA6B,CAAC"} \ No newline at end of file diff --git a/node_modules/css-select/lib/esm/index.js b/node_modules/css-select/lib/esm/index.js deleted file mode 100644 index 7d827a2..0000000 --- a/node_modules/css-select/lib/esm/index.js +++ /dev/null @@ -1,115 +0,0 @@ -import * as DomUtils from "domutils"; -import boolbase from "boolbase"; -import { compile as compileRaw, compileUnsafe, compileToken, } from "./compile.js"; -import { getNextSiblings } from "./pseudo-selectors/subselects.js"; -const defaultEquals = (a, b) => a === b; -const defaultOptions = { - adapter: DomUtils, - equals: defaultEquals, -}; -function convertOptionFormats(options) { - var _a, _b, _c, _d; - /* - * We force one format of options to the other one. - */ - // @ts-expect-error Default options may have incompatible `Node` / `ElementNode`. - const opts = options !== null && options !== void 0 ? options : defaultOptions; - // @ts-expect-error Same as above. - (_a = opts.adapter) !== null && _a !== void 0 ? _a : (opts.adapter = DomUtils); - // @ts-expect-error `equals` does not exist on `Options` - (_b = opts.equals) !== null && _b !== void 0 ? _b : (opts.equals = (_d = (_c = opts.adapter) === null || _c === void 0 ? void 0 : _c.equals) !== null && _d !== void 0 ? _d : defaultEquals); - return opts; -} -function wrapCompile(func) { - return function addAdapter(selector, options, context) { - const opts = convertOptionFormats(options); - return func(selector, opts, context); - }; -} -/** - * Compiles the query, returns a function. - */ -export const compile = wrapCompile(compileRaw); -export const _compileUnsafe = wrapCompile(compileUnsafe); -export const _compileToken = wrapCompile(compileToken); -function getSelectorFunc(searchFunc) { - return function select(query, elements, options) { - const opts = convertOptionFormats(options); - if (typeof query !== "function") { - query = compileUnsafe(query, opts, elements); - } - const filteredElements = prepareContext(elements, opts.adapter, query.shouldTestNextSiblings); - return searchFunc(query, filteredElements, opts); - }; -} -export function prepareContext(elems, adapter, shouldTestNextSiblings = false) { - /* - * Add siblings if the query requires them. - * See https://github.com/fb55/css-select/pull/43#issuecomment-225414692 - */ - if (shouldTestNextSiblings) { - elems = appendNextSiblings(elems, adapter); - } - return Array.isArray(elems) - ? adapter.removeSubsets(elems) - : adapter.getChildren(elems); -} -function appendNextSiblings(elem, adapter) { - // Order matters because jQuery seems to check the children before the siblings - const elems = Array.isArray(elem) ? elem.slice(0) : [elem]; - const elemsLength = elems.length; - for (let i = 0; i < elemsLength; i++) { - const nextSiblings = getNextSiblings(elems[i], adapter); - elems.push(...nextSiblings); - } - return elems; -} -/** - * @template Node The generic Node type for the DOM adapter being used. - * @template ElementNode The Node type for elements for the DOM adapter being used. - * @param elems Elements to query. If it is an element, its children will be queried.. - * @param query can be either a CSS selector string or a compiled query function. - * @param [options] options for querying the document. - * @see compile for supported selector queries. - * @returns All matching elements. - * - */ -export const selectAll = getSelectorFunc((query, elems, options) => query === boolbase.falseFunc || !elems || elems.length === 0 - ? [] - : options.adapter.findAll(query, elems)); -/** - * @template Node The generic Node type for the DOM adapter being used. - * @template ElementNode The Node type for elements for the DOM adapter being used. - * @param elems Elements to query. If it is an element, its children will be queried.. - * @param query can be either a CSS selector string or a compiled query function. - * @param [options] options for querying the document. - * @see compile for supported selector queries. - * @returns the first match, or null if there was no match. - */ -export const selectOne = getSelectorFunc((query, elems, options) => query === boolbase.falseFunc || !elems || elems.length === 0 - ? null - : options.adapter.findOne(query, elems)); -/** - * Tests whether or not an element is matched by query. - * - * @template Node The generic Node type for the DOM adapter being used. - * @template ElementNode The Node type for elements for the DOM adapter being used. - * @param elem The element to test if it matches the query. - * @param query can be either a CSS selector string or a compiled query function. - * @param [options] options for querying the document. - * @see compile for supported selector queries. - * @returns - */ -export function is(elem, query, options) { - const opts = convertOptionFormats(options); - return (typeof query === "function" ? query : compileRaw(query, opts))(elem); -} -/** - * Alias for selectAll(query, elems, options). - * @see [compile] for supported selector queries. - */ -export default selectAll; -// Export filters, pseudos and aliases to allow users to supply their own. -/** @deprecated Use the `pseudos` option instead. */ -export { filters, pseudos, aliases } from "./pseudo-selectors/index.js"; -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/css-select/lib/esm/index.js.map b/node_modules/css-select/lib/esm/index.js.map deleted file mode 100644 index b9e98bf..0000000 --- a/node_modules/css-select/lib/esm/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sourceRoot":"https://raw.githubusercontent.com/fb55/css-select/0f0725a9dfeddd2fdb54eda9656cdbab5bbf6be6/src/","sources":["index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,QAAQ,MAAM,UAAU,CAAC;AACrC,OAAO,QAAQ,MAAM,UAAU,CAAC;AAKhC,OAAO,EACH,OAAO,IAAI,UAAU,EACrB,aAAa,EACb,YAAY,GACf,MAAM,cAAc,CAAC;AAStB,OAAO,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAC;AAInE,MAAM,aAAa,GAAG,CAAO,CAAO,EAAE,CAAO,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC;AAC1D,MAAM,cAAc,GAAuD;IACvE,OAAO,EAAE,QAAQ;IACjB,MAAM,EAAE,aAAa;CACxB,CAAC;AAEF,SAAS,oBAAoB,CACz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AAC,OAAO,CAAC,OAAO,CAAC,OAAO,CAAC,KAAK,EAAE,KAAK,CAAC,CAClD,CAAC;AAEF;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,SAAS,GAAG,eAAe,CACpC,CACI,KAA6B,EAC7B,KAAoB,EACpB,OAA2C,EACzB,EAAE,CACpB,KAAK,KAAK,QAAQ,CAAC,SAAS,IAAI,CAAC,KAAK,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC;IACxD,CAAC,CAAC,IAAI;IACN,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,OAAO,CAAC,KAAK,EAAE,KAAK,CAAC,CAClD,CAAC;AAEF;;;;;;;;;;GAUG;AACH,MAAM,UAAU,EAAE,CACd,IAAiB,EACjB,KAAyB,EACzB,OAAoC;IAEpC,MAAM,IAAI,GAAG,oBAAoB,CAAC,OAAO,CAAC,CAAC;IAC3C,OAAO,CAAC,OAAO,KAAK,KAAK,UAAU,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,UAAU,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC,CAClE,IAAI,CACP,CAAC;AACN,CAAC;AAED;;;GAGG;AACH,eAAe,SAAS,CAAC;AAEzB,0EAA0E;AAC1E,oDAAoD;AACpD,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,6BAA6B,CAAC"} \ No newline at end of file diff --git a/node_modules/css-select/lib/esm/package.json b/node_modules/css-select/lib/esm/package.json deleted file mode 100644 index 089153b..0000000 --- a/node_modules/css-select/lib/esm/package.json +++ /dev/null @@ -1 +0,0 @@ -{"type":"module"} diff --git a/node_modules/css-select/lib/esm/pseudo-selectors/aliases.d.ts b/node_modules/css-select/lib/esm/pseudo-selectors/aliases.d.ts deleted file mode 100644 index 1bcb31a..0000000 --- a/node_modules/css-select/lib/esm/pseudo-selectors/aliases.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -/** - * Aliases are pseudos that are expressed as selectors. - */ -export declare const aliases: Record<string, string>; -//# sourceMappingURL=aliases.d.ts.map \ No newline at end of file diff --git a/node_modules/css-select/lib/esm/pseudo-selectors/aliases.d.ts.map b/node_modules/css-select/lib/esm/pseudo-selectors/aliases.d.ts.map deleted file mode 100644 index 37c9e8c..0000000 --- a/node_modules/css-select/lib/esm/pseudo-selectors/aliases.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"aliases.d.ts","sourceRoot":"https://raw.githubusercontent.com/fb55/css-select/0f0725a9dfeddd2fdb54eda9656cdbab5bbf6be6/src/","sources":["pseudo-selectors/aliases.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,eAAO,MAAM,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAwC1C,CAAC"} \ No newline at end of file diff --git a/node_modules/css-select/lib/esm/pseudo-selectors/aliases.js b/node_modules/css-select/lib/esm/pseudo-selectors/aliases.js deleted file mode 100644 index 49cd6f0..0000000 --- a/node_modules/css-select/lib/esm/pseudo-selectors/aliases.js +++ /dev/null @@ -1,35 +0,0 @@ -/** - * Aliases are pseudos that are expressed as selectors. - */ -export const aliases = { - // Links - "any-link": ":is(a, area, link)[href]", - link: ":any-link:not(:visited)", - // Forms - // https://html.spec.whatwg.org/multipage/scripting.html#disabled-elements - disabled: `:is( - :is(button, input, select, textarea, optgroup, option)[disabled], - optgroup[disabled] > option, - fieldset[disabled]:not(fieldset[disabled] legend:first-of-type *) - )`, - enabled: ":not(:disabled)", - checked: ":is(:is(input[type=radio], input[type=checkbox])[checked], option:selected)", - required: ":is(input, select, textarea)[required]", - optional: ":is(input, select, textarea):not([required])", - // JQuery extensions - // https://html.spec.whatwg.org/multipage/form-elements.html#concept-option-selectedness - selected: "option:is([selected], select:not([multiple]):not(:has(> option[selected])) > :first-of-type)", - checkbox: "[type=checkbox]", - file: "[type=file]", - password: "[type=password]", - radio: "[type=radio]", - reset: "[type=reset]", - image: "[type=image]", - submit: "[type=submit]", - parent: ":not(:empty)", - header: ":is(h1, h2, h3, h4, h5, h6)", - button: ":is(button, input[type=button])", - input: ":is(input, textarea, select, button)", - text: "input:is(:not([type!='']), [type=text])", -}; -//# sourceMappingURL=aliases.js.map \ No newline at end of file diff --git a/node_modules/css-select/lib/esm/pseudo-selectors/aliases.js.map b/node_modules/css-select/lib/esm/pseudo-selectors/aliases.js.map deleted file mode 100644 index 6ef57c9..0000000 --- a/node_modules/css-select/lib/esm/pseudo-selectors/aliases.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"aliases.js","sourceRoot":"https://raw.githubusercontent.com/fb55/css-select/0f0725a9dfeddd2fdb54eda9656cdbab5bbf6be6/src/","sources":["pseudo-selectors/aliases.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,CAAC,MAAM,OAAO,GAA2B;IAC3C,QAAQ;IAER,UAAU,EAAE,0BAA0B;IACtC,IAAI,EAAE,yBAAyB;IAE/B,QAAQ;IAER,0EAA0E;IAC1E,QAAQ,EAAE;;;;MAIR;IACF,OAAO,EAAE,iBAAiB;IAC1B,OAAO,EACH,6EAA6E;IACjF,QAAQ,EAAE,wCAAwC;IAClD,QAAQ,EAAE,8CAA8C;IAExD,oBAAoB;IAEpB,wFAAwF;IACxF,QAAQ,EACJ,8FAA8F;IAElG,QAAQ,EAAE,iBAAiB;IAC3B,IAAI,EAAE,aAAa;IACnB,QAAQ,EAAE,iBAAiB;IAC3B,KAAK,EAAE,cAAc;IACrB,KAAK,EAAE,cAAc;IACrB,KAAK,EAAE,cAAc;IACrB,MAAM,EAAE,eAAe;IAEvB,MAAM,EAAE,cAAc;IACtB,MAAM,EAAE,6BAA6B;IAErC,MAAM,EAAE,iCAAiC;IACzC,KAAK,EAAE,sCAAsC;IAC7C,IAAI,EAAE,yCAAyC;CAClD,CAAC"} \ No newline at end of file diff --git a/node_modules/css-select/lib/esm/pseudo-selectors/filters.d.ts b/node_modules/css-select/lib/esm/pseudo-selectors/filters.d.ts deleted file mode 100644 index a75d063..0000000 --- a/node_modules/css-select/lib/esm/pseudo-selectors/filters.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -import type { CompiledQuery, InternalOptions } from "../types.js"; -export declare type Filter = <Node, ElementNode extends Node>(next: CompiledQuery<ElementNode>, text: string, options: InternalOptions<Node, ElementNode>, context?: Node[]) => CompiledQuery<ElementNode>; -export declare const filters: Record<string, Filter>; -//# sourceMappingURL=filters.d.ts.map \ No newline at end of file diff --git a/node_modules/css-select/lib/esm/pseudo-selectors/filters.d.ts.map b/node_modules/css-select/lib/esm/pseudo-selectors/filters.d.ts.map deleted file mode 100644 index 86f1cef..0000000 --- a/node_modules/css-select/lib/esm/pseudo-selectors/filters.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"filters.d.ts","sourceRoot":"https://raw.githubusercontent.com/fb55/css-select/0f0725a9dfeddd2fdb54eda9656cdbab5bbf6be6/src/","sources":["pseudo-selectors/filters.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,eAAe,EAAW,MAAM,aAAa,CAAC;AAE3E,oBAAY,MAAM,GAAG,CAAC,IAAI,EAAE,WAAW,SAAS,IAAI,EAChD,IAAI,EAAE,aAAa,CAAC,WAAW,CAAC,EAChC,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,eAAe,CAAC,IAAI,EAAE,WAAW,CAAC,EAC3C,OAAO,CAAC,EAAE,IAAI,EAAE,KACf,aAAa,CAAC,WAAW,CAAC,CAAC;AAYhC,eAAO,MAAM,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CA2I1C,CAAC"} \ No newline at end of file diff --git a/node_modules/css-select/lib/esm/pseudo-selectors/filters.js b/node_modules/css-select/lib/esm/pseudo-selectors/filters.js deleted file mode 100644 index 2f939ed..0000000 --- a/node_modules/css-select/lib/esm/pseudo-selectors/filters.js +++ /dev/null @@ -1,143 +0,0 @@ -import getNCheck from "nth-check"; -import boolbase from "boolbase"; -function getChildFunc(next, adapter) { - return (elem) => { - const parent = adapter.getParent(elem); - return parent != null && adapter.isTag(parent) && next(elem); - }; -} -export const filters = { - contains(next, text, { adapter }) { - return function contains(elem) { - return next(elem) && adapter.getText(elem).includes(text); - }; - }, - icontains(next, text, { adapter }) { - const itext = text.toLowerCase(); - return function icontains(elem) { - return (next(elem) && - adapter.getText(elem).toLowerCase().includes(itext)); - }; - }, - // Location specific methods - "nth-child"(next, rule, { adapter, equals }) { - const func = getNCheck(rule); - if (func === boolbase.falseFunc) - return boolbase.falseFunc; - if (func === boolbase.trueFunc) - return getChildFunc(next, adapter); - return function nthChild(elem) { - const siblings = adapter.getSiblings(elem); - let pos = 0; - for (let i = 0; i < siblings.length; i++) { - if (equals(elem, siblings[i])) - break; - if (adapter.isTag(siblings[i])) { - pos++; - } - } - return func(pos) && next(elem); - }; - }, - "nth-last-child"(next, rule, { adapter, equals }) { - const func = getNCheck(rule); - if (func === boolbase.falseFunc) - return boolbase.falseFunc; - if (func === boolbase.trueFunc) - return getChildFunc(next, adapter); - return function nthLastChild(elem) { - const siblings = adapter.getSiblings(elem); - let pos = 0; - for (let i = siblings.length - 1; i >= 0; i--) { - if (equals(elem, siblings[i])) - break; - if (adapter.isTag(siblings[i])) { - pos++; - } - } - return func(pos) && next(elem); - }; - }, - "nth-of-type"(next, rule, { adapter, equals }) { - const func = getNCheck(rule); - if (func === boolbase.falseFunc) - return boolbase.falseFunc; - if (func === boolbase.trueFunc) - return getChildFunc(next, adapter); - return function nthOfType(elem) { - const siblings = adapter.getSiblings(elem); - let pos = 0; - for (let i = 0; i < siblings.length; i++) { - const currentSibling = siblings[i]; - if (equals(elem, currentSibling)) - break; - if (adapter.isTag(currentSibling) && - adapter.getName(currentSibling) === adapter.getName(elem)) { - pos++; - } - } - return func(pos) && next(elem); - }; - }, - "nth-last-of-type"(next, rule, { adapter, equals }) { - const func = getNCheck(rule); - if (func === boolbase.falseFunc) - return boolbase.falseFunc; - if (func === boolbase.trueFunc) - return getChildFunc(next, adapter); - return function nthLastOfType(elem) { - const siblings = adapter.getSiblings(elem); - let pos = 0; - for (let i = siblings.length - 1; i >= 0; i--) { - const currentSibling = siblings[i]; - if (equals(elem, currentSibling)) - break; - if (adapter.isTag(currentSibling) && - adapter.getName(currentSibling) === adapter.getName(elem)) { - pos++; - } - } - return func(pos) && next(elem); - }; - }, - // TODO determine the actual root element - root(next, _rule, { adapter }) { - return (elem) => { - const parent = adapter.getParent(elem); - return (parent == null || !adapter.isTag(parent)) && next(elem); - }; - }, - scope(next, rule, options, context) { - const { equals } = options; - if (!context || context.length === 0) { - // Equivalent to :root - return filters["root"](next, rule, options); - } - if (context.length === 1) { - // NOTE: can't be unpacked, as :has uses this for side-effects - return (elem) => equals(context[0], elem) && next(elem); - } - return (elem) => context.includes(elem) && next(elem); - }, - hover: dynamicStatePseudo("isHovered"), - visited: dynamicStatePseudo("isVisited"), - active: dynamicStatePseudo("isActive"), -}; -/** - * Dynamic state pseudos. These depend on optional Adapter methods. - * - * @param name The name of the adapter method to call. - * @returns Pseudo for the `filters` object. - */ -function dynamicStatePseudo(name) { - return function dynamicPseudo(next, _rule, { adapter }) { - const func = adapter[name]; - if (typeof func !== "function") { - return boolbase.falseFunc; - } - return function active(elem) { - return func(elem) && next(elem); - }; - }; -} -//# sourceMappingURL=filters.js.map \ No newline at end of file diff --git a/node_modules/css-select/lib/esm/pseudo-selectors/filters.js.map b/node_modules/css-select/lib/esm/pseudo-selectors/filters.js.map deleted file mode 100644 index 605d0cb..0000000 --- a/node_modules/css-select/lib/esm/pseudo-selectors/filters.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"filters.js","sourceRoot":"https://raw.githubusercontent.com/fb55/css-select/0f0725a9dfeddd2fdb54eda9656cdbab5bbf6be6/src/","sources":["pseudo-selectors/filters.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,WAAW,CAAC;AAClC,OAAO,QAAQ,MAAM,UAAU,CAAC;AAUhC,SAAS,YAAY,CACjB,IAAgC,EAChC,OAAmC;IAEnC,OA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OAAO,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC,EAAE;YAClC,sBAAsB;YACtB,OAAO,OAAO,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,IAAI,EAAE,OAAO,CAAC,CAAC;SAC/C;QAED,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC,EAAE;YACtB,8DAA8D;YAC9D,OAAO,CAAC,IAAI,EAAE,EAAE,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,IAAI,CAAC,IAAI,IAAI,CAAC,IAAI,CAAC,CAAC;SAC3D;QAED,OAAO,CAAC,IAAI,EAAE,EAAE,CAAC,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,IAAI,CAAC,IAAI,CAAC,CAAC;IAC1D,CAAC;IAED,KAAK,EAAE,kBAAkB,CAAC,WAAW,CAAC;IACtC,OAAO,EAAE,kBAAkB,CAAC,WAAW,CAAC;IACxC,MAAM,EAAE,kBAAkB,CAAC,UAAU,CAAC;CACzC,CAAC;AAEF;;;;;GAKG;AACH,SAAS,kBAAkB,CACvB,IAA4C;IAE5C,OAAO,SAAS,aAAa,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE;QAClD,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;QAE3B,IAAI,OAAO,IAAI,KAAK,UAAU,EAAE;YAC5B,OAAO,QAAQ,CAAC,SAAS,CAAC;SAC7B;QAED,OAAO,SAAS,MAAM,CAAC,IAAI;YACvB,OAAO,IAAI,CAAC,IAAI,CAAC,IAAI,IAAI,CAAC,IAAI,CAAC,CAAC;QACpC,CAAC,CAAC;IACN,CAAC,CAAC;AACN,CAAC"} \ No newline at end of file diff --git a/node_modules/css-select/lib/esm/pseudo-selectors/index.d.ts b/node_modules/css-select/lib/esm/pseudo-selectors/index.d.ts deleted file mode 100644 index 2c41913..0000000 --- a/node_modules/css-select/lib/esm/pseudo-selectors/index.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -import type { CompiledQuery, InternalOptions, CompileToken } from "../types.js"; -import { PseudoSelector } from "css-what"; -import { filters } from "./filters.js"; -import { pseudos } from "./pseudos.js"; -import { aliases } from "./aliases.js"; -export { filters, pseudos, aliases }; -export declare function compilePseudoSelector<Node, ElementNode extends Node>(next: CompiledQuery<ElementNode>, selector: PseudoSelector, options: InternalOptions<Node, ElementNode>, context: Node[] | undefined, compileToken: CompileToken<Node, ElementNode>): CompiledQuery<ElementNode>; -//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/css-select/lib/esm/pseudo-selectors/index.d.ts.map b/node_modules/css-select/lib/esm/pseudo-selectors/index.d.ts.map deleted file mode 100644 index ba14097..0000000 --- a/node_modules/css-select/lib/esm/pseudo-selectors/index.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"https://raw.githubusercontent.com/fb55/css-select/0f0725a9dfeddd2fdb54eda9656cdbab5bbf6be6/src/","sources":["pseudo-selectors/index.ts"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAAE,aAAa,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAChF,OAAO,EAAS,cAAc,EAAE,MAAM,UAAU,CAAC;AACjD,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,OAAO,EAAoB,MAAM,cAAc,CAAC;AACzD,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAGvC,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,CAAC;AAErC,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,WAAW,SAAS,IAAI,EAChE,IAAI,EAAE,aAAa,CAAC,WAAW,CAAC,EAChC,QAAQ,EAAE,cAAc,EACxB,OAAO,EAAE,eAAe,CAAC,IAAI,EAAE,WAAW,CAAC,EAC3C,OAAO,EAAE,IAAI,EAAE,GAAG,SAAS,EAC3B,YAAY,EAAE,YAAY,CAAC,IAAI,EAAE,WAAW,CAAC,GAC9C,aAAa,CAAC,WAAW,CAAC,CA4C5B"} \ No newline at end of file diff --git a/node_modules/css-select/lib/esm/pseudo-selectors/index.js b/node_modules/css-select/lib/esm/pseudo-selectors/index.js deleted file mode 100644 index ab43243..0000000 --- a/node_modules/css-select/lib/esm/pseudo-selectors/index.js +++ /dev/null @@ -1,40 +0,0 @@ -import { parse } from "css-what"; -import { filters } from "./filters.js"; -import { pseudos, verifyPseudoArgs } from "./pseudos.js"; -import { aliases } from "./aliases.js"; -import { subselects } from "./subselects.js"; -export { filters, pseudos, aliases }; -export function compilePseudoSelector(next, selector, options, context, compileToken) { - var _a; - const { name, data } = selector; - if (Array.isArray(data)) { - if (!(name in subselects)) { - throw new Error(`Unknown pseudo-class :${name}(${data})`); - } - return subselects[name](next, data, options, context, compileToken); - } - const userPseudo = (_a = options.pseudos) === null || _a === void 0 ? void 0 : _a[name]; - const stringPseudo = typeof userPseudo === "string" ? userPseudo : aliases[name]; - if (typeof stringPseudo === "string") { - if (data != null) { - throw new Error(`Pseudo ${name} doesn't have any arguments`); - } - // The alias has to be parsed here, to make sure options are respected. - const alias = parse(stringPseudo); - return subselects["is"](next, alias, options, context, compileToken); - } - if (typeof userPseudo === "function") { - verifyPseudoArgs(userPseudo, name, data, 1); - return (elem) => userPseudo(elem, data) && next(elem); - } - if (name in filters) { - return filters[name](next, data, options, context); - } - if (name in pseudos) { - const pseudo = pseudos[name]; - verifyPseudoArgs(pseudo, name, data, 2); - return (elem) => pseudo(elem, options, data) && next(elem); - } - throw new Error(`Unknown pseudo-class :${name}`); -} -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/css-select/lib/esm/pseudo-selectors/index.js.map b/node_modules/css-select/lib/esm/pseudo-selectors/index.js.map deleted file mode 100644 index f8fe1e7..0000000 --- a/node_modules/css-select/lib/esm/pseudo-selectors/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sourceRoot":"https://raw.github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E;QACvE,MAAM,KAAK,GAAG,KAAK,CAAC,YAAY,CAAC,CAAC;QAClC,OAAO,UAAU,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,YAAY,CAAC,CAAC;KACxE;IAED,IAAI,OAAO,UAAU,KAAK,UAAU,EAAE;QAClC,gBAAgB,CAAC,UAAU,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;QAE5C,OAAO,CAAC,IAAI,EAAE,EAAE,CAAC,UAAU,CAAC,IAAI,EAAE,IAAI,CAAC,IAAI,IAAI,CAAC,IAAI,CAAC,CAAC;KACzD;IAED,IAAI,IAAI,IAAI,OAAO,EAAE;QACjB,OAAO,OAAO,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,IAAc,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;KAChE;IAED,IAAI,IAAI,IAAI,OAAO,EAAE;QACjB,MAAM,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;QAC7B,gBAAgB,CAAC,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;QAExC,OAAO,CAAC,IAAI,EAAE,EAAE,CAAC,MAAM,CAAC,IAAI,EAAE,OAAO,EAAE,IAAI,CAAC,IAAI,IAAI,CAAC,IAAI,CAAC,CAAC;KAC9D;IAED,MAAM,IAAI,KAAK,CAAC,yBAAyB,IAAI,EAAE,CAAC,CAAC;AACrD,CAAC"} \ No newline at end of file diff --git a/node_modules/css-select/lib/esm/pseudo-selectors/pseudos.d.ts b/node_modules/css-select/lib/esm/pseudo-selectors/pseudos.d.ts deleted file mode 100644 index cfcf8d6..0000000 --- a/node_modules/css-select/lib/esm/pseudo-selectors/pseudos.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import type { PseudoSelector } from "css-what"; -import type { InternalOptions } from "../types.js"; -export declare type Pseudo = <Node, ElementNode extends Node>(elem: ElementNode, options: InternalOptions<Node, ElementNode>, subselect?: string | null) => boolean; -export declare const pseudos: Record<string, Pseudo>; -export declare function verifyPseudoArgs<T extends Array<unknown>>(func: (...args: T) => boolean, name: string, subselect: PseudoSelector["data"], argIndex: number): void; -//# sourceMappingURL=pseudos.d.ts.map \ No newline at end of file diff --git a/node_modules/css-select/lib/esm/pseudo-selectors/pseudos.d.ts.map b/node_modules/css-select/lib/esm/pseudo-selectors/pseudos.d.ts.map deleted file mode 100644 index b2d1137..0000000 --- a/node_modules/css-select/lib/esm/pseudo-selectors/pseudos.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"pseudos.d.ts","sourceRoot":"https://raw.githubusercontent.com/fb55/css-select/0f0725a9dfeddd2fdb54eda9656cdbab5bbf6be6/src/","sources":["pseudo-selectors/pseudos.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAC/C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAEnD,oBAAY,MAAM,GAAG,CAAC,IAAI,EAAE,WAAW,SAAS,IAAI,EAChD,IAAI,EAAE,WAAW,EACjB,OAAO,EAAE,eAAe,CAAC,IAAI,EAAE,WAAW,CAAC,EAC3C,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,KACxB,OAAO,CAAC;AAGb,eAAO,MAAM,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAkF1C,CAAC;AAEF,wBAAgB,gBAAgB,CAAC,CAAC,SAAS,KAAK,CAAC,OAAO,CAAC,EACrD,IAAI,EAAE,CAAC,GAAG,IAAI,EAAE,CAAC,KAAK,OAAO,EAC7B,IAAI,EAAE,MAAM,EACZ,SAAS,EAAE,cAAc,CAAC,MAAM,CAAC,EACjC,QAAQ,EAAE,MAAM,GACjB,IAAI,CAQN"} \ No newline at end of file diff --git a/node_modules/css-select/lib/esm/pseudo-selectors/pseudos.js b/node_modules/css-select/lib/esm/pseudo-selectors/pseudos.js deleted file mode 100644 index fe2ebef..0000000 --- a/node_modules/css-select/lib/esm/pseudo-selectors/pseudos.js +++ /dev/null @@ -1,79 +0,0 @@ -// While filters are precompiled, pseudos get called when they are needed -export const pseudos = { - empty(elem, { adapter }) { - return !adapter.getChildren(elem).some((elem) => - // FIXME: `getText` call is potentially expensive. - adapter.isTag(elem) || adapter.getText(elem) !== ""); - }, - "first-child"(elem, { adapter, equals }) { - if (adapter.prevElementSibling) { - return adapter.prevElementSibling(elem) == null; - } - const firstChild = adapter - .getSiblings(elem) - .find((elem) => adapter.isTag(elem)); - return firstChild != null && equals(elem, firstChild); - }, - "last-child"(elem, { adapter, equals }) { - const siblings = adapter.getSiblings(elem); - for (let i = siblings.length - 1; i >= 0; i--) { - if (equals(elem, siblings[i])) - return true; - if (adapter.isTag(siblings[i])) - break; - } - return false; - }, - "first-of-type"(elem, { adapter, equals }) { - const siblings = adapter.getSiblings(elem); - const elemName = adapter.getName(elem); - for (let i = 0; i < siblings.length; i++) { - const currentSibling = siblings[i]; - if (equals(elem, currentSibling)) - return true; - if (adapter.isTag(currentSibling) && - adapter.getName(currentSibling) === elemName) { - break; - } - } - return false; - }, - "last-of-type"(elem, { adapter, equals }) { - const siblings = adapter.getSiblings(elem); - const elemName = adapter.getName(elem); - for (let i = siblings.length - 1; i >= 0; i--) { - const currentSibling = siblings[i]; - if (equals(elem, currentSibling)) - return true; - if (adapter.isTag(currentSibling) && - adapter.getName(currentSibling) === elemName) { - break; - } - } - return false; - }, - "only-of-type"(elem, { adapter, equals }) { - const elemName = adapter.getName(elem); - return adapter - .getSiblings(elem) - .every((sibling) => equals(elem, sibling) || - !adapter.isTag(sibling) || - adapter.getName(sibling) !== elemName); - }, - "only-child"(elem, { adapter, equals }) { - return adapter - .getSiblings(elem) - .every((sibling) => equals(elem, sibling) || !adapter.isTag(sibling)); - }, -}; -export function verifyPseudoArgs(func, name, subselect, argIndex) { - if (subselect === null) { - if (func.length > argIndex) { - throw new Error(`Pseudo-class :${name} requires an argument`); - } - } - else if (func.length === argIndex) { - throw new Error(`Pseudo-class :${name} doesn't have any arguments`); - } -} -//# sourceMappingURL=pseudos.js.map \ No newline at end of file diff --git a/node_modules/css-select/lib/esm/pseudo-selectors/pseudos.js.map b/node_modules/css-select/lib/esm/pseudo-selectors/pseudos.js.map deleted file mode 100644 index 62f4ec3..0000000 --- a/node_modules/css-select/lib/esm/pseudo-selectors/pseudos.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"pseudos.js","sourceRoot":"https://raw.githubusercontent.com/fb55/css-select/0f0725a9dfeddd2fdb54eda9656cdbab5bbf6be6/src/","sources":["pseudo-selectors/pseudos.ts"],"names":[],"mappings":"AASA,yEAAyE;AACzE,MAAM,CAAC,MAAM,OAAO,GAA2B;IAC3C,KAAK,CAAC,IAAI,EAAE,EAAE,OAAO,EAAE;QACnB,OAAO,CAAC,OAAO,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC,IAAI,CAClC,CAAC,IAAI,EAAE,EAAE;QACL,kDAAkD;QAClD,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,EAAE,CAC1D,CAAC;IACN,CAAC;IAED,aAAa,CAAC,IAAI,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE;QACnC,IAAI,OAAO,CAAC,kBAAkB,EAAE;YAC5B,OAAO,OAAO,CAAC,kBAAkB,CAAC,IAAI,CAAC,IAAI,IAAI,CAAC;SACnD;QAED,MAAM,UAAU,GAAG,OAAO;aACrB,WAAW,CAAC,IAAI,CAAC;aACjB,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC;QACzC,OAAO,UAAU,IAAI,IAAI,IAAI,MAAM,CAAC,IAAI,EAAE,UAAU,CAAC,CAAC;IAC1D,CAAC;IACD,YAAY,CAAC,IAAI,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE;QAClC,MAAM,Q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AAC;SACjE;KACJ;SAAM,IAAI,IAAI,CAAC,MAAM,KAAK,QAAQ,EAAE;QACjC,MAAM,IAAI,KAAK,CAAC,iBAAiB,IAAI,6BAA6B,CAAC,CAAC;KACvE;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/css-select/lib/esm/pseudo-selectors/subselects.d.ts b/node_modules/css-select/lib/esm/pseudo-selectors/subselects.d.ts deleted file mode 100644 index 6555ef2..0000000 --- a/node_modules/css-select/lib/esm/pseudo-selectors/subselects.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -import type { Selector } from "css-what"; -import type { CompiledQuery, InternalOptions, CompileToken, Adapter } from "../types.js"; -/** Used as a placeholder for :has. Will be replaced with the actual element. */ -export declare const PLACEHOLDER_ELEMENT: {}; -export declare function ensureIsTag<Node, ElementNode extends Node>(next: CompiledQuery<ElementNode>, adapter: Adapter<Node, ElementNode>): CompiledQuery<Node>; -export declare type Subselect = <Node, ElementNode extends Node>(next: CompiledQuery<ElementNode>, subselect: Selector[][], options: InternalOptions<Node, ElementNode>, context: Node[] | undefined, compileToken: CompileToken<Node, ElementNode>) => CompiledQuery<ElementNode>; -export declare function getNextSiblings<Node, ElementNode extends Node>(elem: Node, adapter: Adapter<Node, ElementNode>): ElementNode[]; -export declare const subselects: Record<string, Subselect>; -//# sourceMappingURL=subselects.d.ts.map \ No newline at end of file diff --git a/node_modules/css-select/lib/esm/pseudo-selectors/subselects.d.ts.map b/node_modules/css-select/lib/esm/pseudo-selectors/subselects.d.ts.map deleted file mode 100644 index 9950c0c..0000000 --- a/node_modules/css-select/lib/esm/pseudo-selectors/subselects.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"subselects.d.ts","sourceRoot":"https://raw.githubusercontent.com/fb55/css-select/0f0725a9dfeddd2fdb54eda9656cdbab5bbf6be6/src/","sources":["pseudo-selectors/subselects.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AAEzC,OAAO,KAAK,EACR,aAAa,EACb,eAAe,EACf,YAAY,EACZ,OAAO,EACV,MAAM,aAAa,CAAC;AAGrB,gFAAgF;AAChF,eAAO,MAAM,mBAAmB,IAAK,CAAC;AAEtC,wBAAgB,WAAW,CAAC,IAAI,EAAE,WAAW,SAAS,IAAI,EACtD,IAAI,EAAE,aAAa,CAAC,WAAW,CAAC,EAChC,OAAO,EAAE,OAAO,CAAC,IAAI,EAAE,WAAW,CAAC,GACpC,aAAa,CAAC,IAAI,CAAC,CAGrB;AAED,oBAAY,SAAS,GAAG,CAAC,IAAI,EAAE,WAAW,SAAS,IAAI,EACnD,IAAI,EAAE,aAAa,CAAC,WAAW,CAAC,EAChC,SAAS,EAAE,QAAQ,EAAE,EAAE,EACvB,OAAO,EAAE,eAAe,CAAC,IAAI,EAAE,WAAW,CAAC,EAC3C,OAAO,EAAE,IAAI,EAAE,GAAG,SAAS,EAC3B,YAAY,EAAE,YAAY,CAAC,IAAI,EAAE,WAAW,CAAC,KAC5C,aAAa,CAAC,WAAW,CAAC,CAAC;AAEhC,wBAAgB,eAAe,CAAC,IAAI,EAAE,WAAW,SAAS,IAAI,EAC1D,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,OAAO,CAAC,IAAI,EAAE,WAAW,CAAC,GACpC,WAAW,EAAE,CAMf;AAiCD,eAAO,MAAM,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,SAAS,CAgEhD,CAAC"} \ No newline at end of file diff --git a/node_modules/css-select/lib/esm/pseudo-selectors/subselects.js b/node_modules/css-select/lib/esm/pseudo-selectors/subselects.js deleted file mode 100644 index 25d7e8e..0000000 --- a/node_modules/css-select/lib/esm/pseudo-selectors/subselects.js +++ /dev/null @@ -1,94 +0,0 @@ -import boolbase from "boolbase"; -import { isTraversal } from "../sort.js"; -/** Used as a placeholder for :has. Will be replaced with the actual element. */ -export const PLACEHOLDER_ELEMENT = {}; -export function ensureIsTag(next, adapter) { - if (next === boolbase.falseFunc) - return boolbase.falseFunc; - return (elem) => adapter.isTag(elem) && next(elem); -} -export function getNextSiblings(elem, adapter) { - const siblings = adapter.getSiblings(elem); - if (siblings.length <= 1) - return []; - const elemIndex = siblings.indexOf(elem); - if (elemIndex < 0 || elemIndex === siblings.length - 1) - return []; - return siblings.slice(elemIndex + 1).filter(adapter.isTag); -} -function copyOptions(options) { - // Not copied: context, rootFunc - return { - xmlMode: !!options.xmlMode, - lowerCaseAttributeNames: !!options.lowerCaseAttributeNames, - lowerCaseTags: !!options.lowerCaseTags, - quirksMode: !!options.quirksMode, - cacheResults: !!options.cacheResults, - pseudos: options.pseudos, - adapter: options.adapter, - equals: options.equals, - }; -} -const is = (next, token, options, context, compileToken) => { - const func = compileToken(token, copyOptions(options), context); - return func === boolbase.trueFunc - ? next - : func === boolbase.falseFunc - ? boolbase.falseFunc - : (elem) => func(elem) && next(elem); -}; -/* - * :not, :has, :is, :matches and :where have to compile selectors - * doing this in src/pseudos.ts would lead to circular dependencies, - * so we add them here - */ -export const subselects = { - is, - /** - * `:matches` and `:where` are aliases for `:is`. - */ - matches: is, - where: is, - not(next, token, options, context, compileToken) { - const func = compileToken(token, copyOptions(options), context); - return func === boolbase.falseFunc - ? next - : func === boolbase.trueFunc - ? boolbase.falseFunc - : (elem) => !func(elem) && next(elem); - }, - has(next, subselect, options, _context, compileToken) { - const { adapter } = options; - const opts = copyOptions(options); - opts.relativeSelector = true; - const context = subselect.some((s) => s.some(isTraversal)) - ? // Used as a placeholder. Will be replaced with the actual element. - [PLACEHOLDER_ELEMENT] - : undefined; - const compiled = compileToken(subselect, opts, context); - if (compiled === boolbase.falseFunc) - return boolbase.falseFunc; - const hasElement = ensureIsTag(compiled, adapter); - // If `compiled` is `trueFunc`, we can skip this. - if (context && compiled !== boolbase.trueFunc) { - /* - * `shouldTestNextSiblings` will only be true if the query starts with - * a traversal (sibling or adjacent). That means we will always have a context. - */ - const { shouldTestNextSiblings = false } = compiled; - return (elem) => { - if (!next(elem)) - return false; - context[0] = elem; - const childs = adapter.getChildren(elem); - const nextElements = shouldTestNextSiblings - ? [...childs, ...getNextSiblings(elem, adapter)] - : childs; - return adapter.existsOne(hasElement, nextElements); - }; - } - return (elem) => next(elem) && - adapter.existsOne(hasElement, adapter.getChildren(elem)); - }, -}; -//# sourceMappingURL=subselects.js.map \ No newline at end of file diff --git a/node_modules/css-select/lib/esm/pseudo-selectors/subselects.js.map b/node_modules/css-select/lib/esm/pseudo-selectors/subselects.js.map deleted file mode 100644 index 39cdd6e..0000000 --- a/node_modules/css-select/lib/esm/pseudo-selectors/subselects.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"subselects.js","sourceRoot":"https://raw.githubusercontent.com/fb55/css-select/0f0725a9dfeddd2fdb54eda9656cdbab5bbf6be6/src/","sources":["pseudo-selectors/subselects.ts"],"names":[],"mappings":"AACA,OAAO,QAAQ,MAAM,UAAU,CAAC;AAOhC,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAEzC,gFAAgF;AAChF,MAAM,CAAC,MAAM,mBAAmB,GAAG,EAAE,CAAC;AAEtC,MAAM,UAAU,WAAW,CACvB,IAAgC,EAChC,OAAmC;IAEnC,IAAI,IAAI,KAAK,QAAQ,CAAC,SAAS;QAAE,OAAO,QAAQ,CAAC,SAAS,CAAC;IAC3D,OAAO,CAAC,IAAU,EAAE,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,IAAI,CAAC,IAAI,CAAC,CAAC;AAC7D,CAAC;AAUD,MAAM,UAAU,eAAe,CAC3B,IAAU,EACV,OAAmC;IAEnC,MAAM,QAAQ,GAAG,OAAO,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;IAC3C,IAAI,QAAQ,CAAC,MAAM,IAAI,CAAC;QAAE,OAAO,EAAE,CAAC;IACpC,MAAM,SAAS,GAAG,QAAQ,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;IACzC,IAAI,SAAS,GAAG,CAAC,IAAI,SAAS,KAAK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,EAAE,GAAG,QAAQ,CAAC;YAEpD,OAAO,CAAC,IAAI,EAAE,EAAE;gBACZ,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC;oBAAE,OAAO,KAAK,CAAC;gBAE9B,OAAO,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC;gBAClB,MAAM,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;gBACzC,MAAM,YAAY,GAAG,sBAAsB;oBACvC,CAAC,CAAC,CAAC,GAAG,MAAM,EAAE,GAAG,eAAe,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;oBAChD,CAAC,CAAC,MAAM,CAAC;gBAEb,OAAO,OAAO,CAAC,SAAS,CAAC,UAAU,EAAE,YAAY,CAAC,CAAC;YACvD,CAAC,CAAC;SACL;QAED,OAAO,CAAC,IAAI,EAAE,EAAE,CACZ,IAAI,CAAC,IAAI,CAAC;YACV,OAAO,CAAC,SAAS,CAAC,UAAU,EAAE,OAAO,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC,CAAC;IACjE,CAAC;CACJ,CAAC"} \ No newline at end of file diff --git a/node_modules/css-select/lib/esm/sort.d.ts b/node_modules/css-select/lib/esm/sort.d.ts deleted file mode 100644 index 93c996c..0000000 --- a/node_modules/css-select/lib/esm/sort.d.ts +++ /dev/null @@ -1,12 +0,0 @@ -import type { InternalSelector } from "./types.js"; -import { type Traversal } from "css-what"; -export declare function isTraversal(token: InternalSelector): token is Traversal; -/** - * Sort the parts of the passed selector, - * as there is potential for optimization - * (some types of selectors are faster than others) - * - * @param arr Selector to sort - */ -export default function sortByProcedure(arr: InternalSelector[]): void; -//# sourceMappingURL=sort.d.ts.map \ No newline at end of file diff --git a/node_modules/css-select/lib/esm/sort.d.ts.map b/node_modules/css-select/lib/esm/sort.d.ts.map deleted file mode 100644 index 8e996f4..0000000 --- a/node_modules/css-select/lib/esm/sort.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"sort.d.ts","sourceRoot":"https://raw.githubusercontent.com/fb55/css-select/0f0725a9dfeddd2fdb54eda9656cdbab5bbf6be6/src/","sources":["sort.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AACnD,OAAO,EAAiC,KAAK,SAAS,EAAE,MAAM,UAAU,CAAC;AASzE,wBAAgB,WAAW,CAAC,KAAK,EAAE,gBAAgB,GAAG,KAAK,IAAI,SAAS,CAEvE;AAWD;;;;;;GAMG;AACH,MAAM,CAAC,OAAO,UAAU,eAAe,CAAC,GAAG,EAAE,gBAAgB,EAAE,GAAG,IAAI,CAerE"} \ No newline at end of file diff --git a/node_modules/css-select/lib/esm/sort.js b/node_modules/css-select/lib/esm/sort.js deleted file mode 100644 index b3b3239..0000000 --- a/node_modules/css-select/lib/esm/sort.js +++ /dev/null @@ -1,79 +0,0 @@ -import { AttributeAction, SelectorType } from "css-what"; -const procedure = new Map([ - [SelectorType.Universal, 50], - [SelectorType.Tag, 30], - [SelectorType.Attribute, 1], - [SelectorType.Pseudo, 0], -]); -export function isTraversal(token) { - return !procedure.has(token.type); -} -const attributes = new Map([ - [AttributeAction.Exists, 10], - [AttributeAction.Equals, 8], - [AttributeAction.Not, 7], - [AttributeAction.Start, 6], - [AttributeAction.End, 6], - [AttributeAction.Any, 5], -]); -/** - * Sort the parts of the passed selector, - * as there is potential for optimization - * (some types of selectors are faster than others) - * - * @param arr Selector to sort - */ -export default function sortByProcedure(arr) { - const procs = arr.map(getProcedure); - for (let i = 1; i < arr.length; i++) { - const procNew = procs[i]; - if (procNew < 0) - continue; - for (let j = i - 1; j >= 0 && procNew < procs[j]; j--) { - const token = arr[j + 1]; - arr[j + 1] = arr[j]; - arr[j] = token; - procs[j + 1] = procs[j]; - procs[j] = procNew; - } - } -} -function getProcedure(token) { - var _a, _b; - let proc = (_a = procedure.get(token.type)) !== null && _a !== void 0 ? _a : -1; - if (token.type === SelectorType.Attribute) { - proc = (_b = attributes.get(token.action)) !== null && _b !== void 0 ? _b : 4; - if (token.action === AttributeAction.Equals && token.name === "id") { - // Prefer ID selectors (eg. #ID) - proc = 9; - } - if (token.ignoreCase) { - /* - * IgnoreCase adds some overhead, prefer "normal" token - * this is a binary operation, to ensure it's still an int - */ - proc >>= 1; - } - } - else if (token.type === SelectorType.Pseudo) { - if (!token.data) { - proc = 3; - } - else if (token.name === "has" || token.name === "contains") { - proc = 0; // Expensive in any case - } - else if (Array.isArray(token.data)) { - // Eg. :matches, :not - proc = Math.min(...token.data.map((d) => Math.min(...d.map(getProcedure)))); - // If we have traversals, try to avoid executing this selector - if (proc < 0) { - proc = 0; - } - } - else { - proc = 2; - } - } - return proc; -} -//# sourceMappingURL=sort.js.map \ No newline at end of file diff --git a/node_modules/css-select/lib/esm/sort.js.map b/node_modules/css-select/lib/esm/sort.js.map deleted file mode 100644 index 537c45c..0000000 --- a/node_modules/css-select/lib/esm/sort.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"sort.js","sourceRoot":"https://raw.githubusercontent.com/fb55/css-select/0f0725a9dfeddd2fdb54eda9656cdbab5bbf6be6/src/","sources":["sort.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,YAAY,EAAkB,MAAM,UAAU,CAAC;AAEzE,MAAM,SAAS,GAAG,IAAI,GAAG,CAAmC;IACxD,CAAC,YAAY,CAAC,SAAS,EAAE,EAAE,CAAC;IAC5B,CAAC,YAAY,CAAC,GAAG,EAAE,EAAE,CAAC;IACtB,CAAC,YAAY,CAAC,SAAS,EAAE,CAAC,CAAC;IAC3B,CAAC,YAAY,CAAC,MAAM,EAAE,CAAC,CAAC;CAC3B,CAAC,CAAC;AAEH,MAAM,UAAU,WAAW,CAAC,KAAuB;IAC/C,OAAO,CAAC,SAAS,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;AACtC,CAAC;AAED,MAAM,UAAU,GAAG,IAAI,GAAG,CAA0B;IAChD,CAAC,eAAe,CAAC,MAA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,IAAI,KAAK,CAAC,IAAI,KAAK,YAAY,CAAC,SAAS,EAAE;QACvC,IAAI,GAAG,MAAA,UAAU,CAAC,GAAG,CAAC,KAAK,CAAC,MAAM,CAAC,mCAAI,CAAC,CAAC;QAEzC,IAAI,KAAK,CAAC,MAAM,KAAK,eAAe,CAAC,MAAM,IAAI,KAAK,CAAC,IAAI,KAAK,IAAI,EAAE;YAChE,gCAAgC;YAChC,IAAI,GAAG,CAAC,CAAC;SACZ;QAED,IAAI,KAAK,CAAC,UAAU,EAAE;YAClB;;;eAGG;YACH,IAAI,KAAK,CAAC,CAAC;SACd;KACJ;SAAM,IAAI,KAAK,CAAC,IAAI,KAAK,YAAY,CAAC,MAAM,EAAE;QAC3C,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE;YACb,IAAI,GAAG,CAAC,CAAC;SACZ;aAAM,IAAI,KAAK,CAAC,IAAI,KAAK,KAAK,IAAI,KAAK,CAAC,IAAI,KAAK,UAAU,EAAE;YAC1D,IAAI,GAAG,CAAC,CAAC,CAAC,wBAAwB;SACrC;aAAM,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE;YAClC,qBAAqB;YACrB,IAAI,GAAG,IAAI,CAAC,GAAG,CACX,GAAG,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC,CAAC,CAC7D,CAAC;YAEF,8DAA8D;YAC9D,IAAI,IAAI,GAAG,CAAC,EAAE;gBACV,IAAI,GAAG,CAAC,CAAC;aACZ;SACJ;aAAM;YACH,IAAI,GAAG,CAAC,CAAC;SACZ;KACJ;IACD,OAAO,IAAI,CAAC;AAChB,CAAC"} \ No newline at end of file diff --git a/node_modules/css-select/lib/esm/types.d.ts b/node_modules/css-select/lib/esm/types.d.ts deleted file mode 100644 index 7a0cd8a..0000000 --- a/node_modules/css-select/lib/esm/types.d.ts +++ /dev/null @@ -1,167 +0,0 @@ -import type { Selector } from "css-what"; -export declare type InternalSelector = Selector | { - type: "_flexibleDescendant"; -}; -export declare type Predicate<Value> = (v: Value) => boolean; -export interface Adapter<Node, ElementNode extends Node> { - /** - * Is the node a tag? - */ - isTag: (node: Node) => node is ElementNode; - /** - * Does at least one of passed element nodes pass the test predicate? - */ - existsOne: (test: Predicate<ElementNode>, elems: Node[]) => boolean; - /** - * Get the attribute value. - */ - getAttributeValue: (elem: ElementNode, name: string) => string | undefined; - /** - * Get the node's children - */ - getChildren: (node: Node) => Node[]; - /** - * Get the name of the tag - */ - getName: (elem: ElementNode) => string; - /** - * Get the parent of the node - */ - getParent: (node: ElementNode) => Node | null; - /** - * Get the siblings of the node. Note that unlike jQuery's `siblings` method, - * this is expected to include the current node as well - */ - getSiblings: (node: Node) => Node[]; - /** - * Returns the previous element sibling of a node. - */ - prevElementSibling?: (node: Node) => ElementNode | null; - /** - * Get the text content of the node, and its children if it has any. - */ - getText: (node: Node) => string; - /** - * Does the element have the named attribute? - */ - hasAttrib: (elem: ElementNode, name: string) => boolean; - /** - * Takes an array of nodes, and removes any duplicates, as well as any - * nodes whose ancestors are also in the array. - */ - removeSubsets: (nodes: Node[]) => Node[]; - /** - * Finds all of the element nodes in the array that match the test predicate, - * as well as any of their children that match it. - */ - findAll: (test: Predicate<ElementNode>, nodes: Node[]) => ElementNode[]; - /** - * Finds the first node in the array that matches the test predicate, or one - * of its children. - */ - findOne: (test: Predicate<ElementNode>, elems: Node[]) => ElementNode | null; - /** - * The adapter can also optionally include an equals method, if your DOM - * structure needs a custom equality test to compare two objects which refer - * to the same underlying node. If not provided, `css-select` will fall back to - * `a === b`. - */ - equals?: (a: Node, b: Node) => boolean; - /** - * Is the element in hovered state? - */ - isHovered?: (elem: ElementNode) => boolean; - /** - * Is the element in visited state? - */ - isVisited?: (elem: ElementNode) => boolean; - /** - * Is the element in active state? - */ - isActive?: (elem: ElementNode) => boolean; -} -export interface Options<Node, ElementNode extends Node> { - /** - * When enabled, tag names will be case-sensitive. - * - * @default false - */ - xmlMode?: boolean; - /** - * Lower-case attribute names. - * - * @default !xmlMode - */ - lowerCaseAttributeNames?: boolean; - /** - * Lower-case tag names. - * - * @default !xmlMode - */ - lowerCaseTags?: boolean; - /** - * Is the document in quirks mode? - * - * This will lead to .className and #id being case-insensitive. - * - * @default false - */ - quirksMode?: boolean; - /** - * Pseudo-classes that override the default ones. - * - * Maps from names to either strings of functions. - * - A string value is a selector that the element must match to be selected. - * - A function is called with the element as its first argument, and optional - * parameters second. If it returns true, the element is selected. - */ - pseudos?: Record<string, string | ((elem: ElementNode, value?: string | null) => boolean)> | undefined; - /** - * The last function in the stack, will be called with the last element - * that's looked at. - */ - rootFunc?: (element: ElementNode) => boolean; - /** - * The adapter to use when interacting with the backing DOM structure. By - * default it uses the `domutils` module. - */ - adapter?: Adapter<Node, ElementNode>; - /** - * The context of the current query. Used to limit the scope of searches. - * Can be matched directly using the `:scope` pseudo-class. - */ - context?: Node | Node[]; - /** - * Indicates whether to consider the selector as a relative selector. - * - * Relative selectors that don't include a `:scope` pseudo-class behave - * as if they have a `:scope ` prefix (a `:scope` pseudo-class, followed by - * a descendant selector). - * - * If relative selectors are disabled, selectors starting with a traversal - * will lead to an error. - * - * @default true - * @see {@link https://www.w3.org/TR/selectors-4/#relative} - */ - relativeSelector?: boolean; - /** - * Allow css-select to cache results for some selectors, sometimes greatly - * improving querying performance. Disable this if your document can - * change in between queries with the same compiled selector. - * - * @default true - */ - cacheResults?: boolean; -} -export interface InternalOptions<Node, ElementNode extends Node> extends Options<Node, ElementNode> { - adapter: Adapter<Node, ElementNode>; - equals: (a: Node, b: Node) => boolean; -} -export interface CompiledQuery<ElementNode> { - (node: ElementNode): boolean; - shouldTestNextSiblings?: boolean; -} -export declare type Query<ElementNode> = string | CompiledQuery<ElementNode> | Selector[][]; -export declare type CompileToken<Node, ElementNode extends Node> = (token: InternalSelector[][], options: InternalOptions<Node, ElementNode>, context?: Node[] | Node) => CompiledQuery<ElementNode>; -//# sourceMappingURL=types.d.ts.map \ No newline at end of file diff --git a/node_modules/css-select/lib/esm/types.d.ts.map b/node_modules/css-select/lib/esm/types.d.ts.map deleted file mode 100644 index d14b18f..0000000 --- a/node_modules/css-select/lib/esm/types.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"types.d.ts","sourceRoot":"https://raw.githubusercontent.com/fb55/css-select/0f0725a9dfeddd2fdb54eda9656cdbab5bbf6be6/src/","sources":["types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AAEzC,oBAAY,gBAAgB,GAAG,QAAQ,GAAG;IAAE,IAAI,EAAE,qBAAqB,CAAA;CAAE,CAAC;AAE1E,oBAAY,SAAS,CAAC,KAAK,IAAI,CAAC,CAAC,EAAE,KAAK,KAAK,OAAO,CAAC;AACrD,MAAM,WAAW,OAAO,CAAC,IAAI,EAAE,WAAW,SAAS,IAAI;IACnD;;OAEG;IACH,KAAK,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,IAAI,IAAI,WAAW,CAAC;IAE3C;;OAEG;IACH,SAAS,EAAE,CAAC,IAAI,EAAE,SAAS,CAAC,WAAW,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,OAAO,CAAC;IAEpE;;OAEG;IACH,iBAAiB,EAAE,CAAC,IAAI,EAAE,WAAW,EAAE,IAAI,EAAE,MAAM,KAAK,MAAM,GAAG,SAAS,CAAC;IAE3E;;OAEG;IACH,WAAW,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,IAAI,EAAE,CAAC;IAEpC;;OAEG;IACH,OAAO,EAAE,CAAC,IAAI,EAAE,WAAW,KAAK,MAAM,CAAC;IAEvC;;OAEG;IACH,SAAS,EAAE,CAAC,IAAI,EAAE,WAAW,KAAK,IAAI,GAAG,IAAI,CAAC;IAE9C;;;OAGG;IACH,WAAW,EAAE,CAAC,IA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,OAAO,CAAC,EAAE,IAAI,EAAE,GAAG,IAAI,KACtB,aAAa,CAAC,WAAW,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/css-select/lib/esm/types.js b/node_modules/css-select/lib/esm/types.js deleted file mode 100644 index 718fd38..0000000 --- a/node_modules/css-select/lib/esm/types.js +++ /dev/null @@ -1,2 +0,0 @@ -export {}; -//# sourceMappingURL=types.js.map \ No newline at end of file diff --git a/node_modules/css-select/lib/esm/types.js.map b/node_modules/css-select/lib/esm/types.js.map deleted file mode 100644 index d1bde2f..0000000 --- a/node_modules/css-select/lib/esm/types.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"types.js","sourceRoot":"https://raw.githubusercontent.com/fb55/css-select/0f0725a9dfeddd2fdb54eda9656cdbab5bbf6be6/src/","sources":["types.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/node_modules/css-select/lib/general.d.ts b/node_modules/css-select/lib/general.d.ts deleted file mode 100644 index 2baa1f3..0000000 --- a/node_modules/css-select/lib/general.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -import type { CompiledQuery, InternalOptions, InternalSelector, CompileToken } from "./types.js"; -export declare function compileGeneralSelector<Node, ElementNode extends Node>(next: CompiledQuery<ElementNode>, selector: InternalSelector, options: InternalOptions<Node, ElementNode>, context: Node[] | undefined, compileToken: CompileToken<Node, ElementNode>): CompiledQuery<ElementNode>; -//# sourceMappingURL=general.d.ts.map \ No newline at end of file diff --git a/node_modules/css-select/lib/general.d.ts.map b/node_modules/css-select/lib/general.d.ts.map deleted file mode 100644 index 82c8d6d..0000000 --- a/node_modules/css-select/lib/general.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"general.d.ts","sourceRoot":"https://raw.githubusercontent.com/fb55/css-select/0f0725a9dfeddd2fdb54eda9656cdbab5bbf6be6/src/","sources":["general.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAER,aAAa,EACb,eAAe,EACf,gBAAgB,EAChB,YAAY,EACf,MAAM,YAAY,CAAC;AAkBpB,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,WAAW,SAAS,IAAI,EACjE,IAAI,EAAE,aAAa,CAAC,WAAW,CAAC,EAChC,QAAQ,EAAE,gBAAgB,EAC1B,OAAO,EAAE,eAAe,CAAC,IAAI,EAAE,WAAW,CAAC,EAC3C,OAAO,EAAE,IAAI,EAAE,GAAG,SAAS,EAC3B,YAAY,EAAE,YAAY,CAAC,IAAI,EAAE,WAAW,CAAC,GAC9C,aAAa,CAAC,WAAW,CAAC,CAiK5B"} \ No newline at end of file diff --git a/node_modules/css-select/lib/general.js b/node_modules/css-select/lib/general.js deleted file mode 100644 index 5c06800..0000000 --- a/node_modules/css-select/lib/general.js +++ /dev/null @@ -1,148 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.compileGeneralSelector = void 0; -var attributes_js_1 = require("./attributes.js"); -var index_js_1 = require("./pseudo-selectors/index.js"); -var css_what_1 = require("css-what"); -function getElementParent(node, adapter) { - var parent = adapter.getParent(node); - if (parent && adapter.isTag(parent)) { - return parent; - } - return null; -} -/* - * All available rules - */ -function compileGeneralSelector(next, selector, options, context, compileToken) { - var adapter = options.adapter, equals = options.equals; - switch (selector.type) { - case css_what_1.SelectorType.PseudoElement: { - throw new Error("Pseudo-elements are not supported by css-select"); - } - case css_what_1.SelectorType.ColumnCombinator: { - throw new Error("Column combinators are not yet supported by css-select"); - } - case css_what_1.SelectorType.Attribute: { - if (selector.namespace != null) { - throw new Error("Namespaced attributes are not yet supported by css-select"); - } - if (!options.xmlMode || options.lowerCaseAttributeNames) { - selector.name = selector.name.toLowerCase(); - } - return attributes_js_1.attributeRules[selector.action](next, selector, options); - } - case css_what_1.SelectorType.Pseudo: { - return (0, index_js_1.compilePseudoSelector)(next, selector, options, context, compileToken); - } - // Tags - case css_what_1.SelectorType.Tag: { - if (selector.namespace != null) { - throw new Error("Namespaced tag names are not yet supported by css-select"); - } - var name_1 = selector.name; - if (!options.xmlMode || options.lowerCaseTags) { - name_1 = name_1.toLowerCase(); - } - return function tag(elem) { - return adapter.getName(elem) === name_1 && next(elem); - }; - } - // Traversal - case css_what_1.SelectorType.Descendant: { - if (options.cacheResults === false || - typeof WeakSet === "undefined") { - return function descendant(elem) { - var current = elem; - while ((current = getElementParent(current, adapter))) { - if (next(current)) { - return true; - } - } - return false; - }; - } - // @ts-expect-error `ElementNode` is not extending object - var isFalseCache_1 = new WeakSet(); - return function cachedDescendant(elem) { - var current = elem; - while ((current = getElementParent(current, adapter))) { - if (!isFalseCache_1.has(current)) { - if (adapter.isTag(current) && next(current)) { - return true; - } - isFalseCache_1.add(current); - } - } - return false; - }; - } - case "_flexibleDescendant": { - // Include element itself, only used while querying an array - return function flexibleDescendant(elem) { - var current = elem; - do { - if (next(current)) - return true; - } while ((current = getElementParent(current, adapter))); - return false; - }; - } - case css_what_1.SelectorType.Parent: { - return function parent(elem) { - return adapter - .getChildren(elem) - .some(function (elem) { return adapter.isTag(elem) && next(elem); }); - }; - } - case css_what_1.SelectorType.Child: { - return function child(elem) { - var parent = adapter.getParent(elem); - return parent != null && adapter.isTag(parent) && next(parent); - }; - } - case css_what_1.SelectorType.Sibling: { - return function sibling(elem) { - var siblings = adapter.getSiblings(elem); - for (var i = 0; i < siblings.length; i++) { - var currentSibling = siblings[i]; - if (equals(elem, currentSibling)) - break; - if (adapter.isTag(currentSibling) && next(currentSibling)) { - return true; - } - } - return false; - }; - } - case css_what_1.SelectorType.Adjacent: { - if (adapter.prevElementSibling) { - return function adjacent(elem) { - var previous = adapter.prevElementSibling(elem); - return previous != null && next(previous); - }; - } - return function adjacent(elem) { - var siblings = adapter.getSiblings(elem); - var lastElement; - for (var i = 0; i < siblings.length; i++) { - var currentSibling = siblings[i]; - if (equals(elem, currentSibling)) - break; - if (adapter.isTag(currentSibling)) { - lastElement = currentSibling; - } - } - return !!lastElement && next(lastElement); - }; - } - case css_what_1.SelectorType.Universal: { - if (selector.namespace != null && selector.namespace !== "*") { - throw new Error("Namespaced universal selectors are not yet supported by css-select"); - } - return next; - } - } -} -exports.compileGeneralSelector = compileGeneralSelector; -//# sourceMappingURL=general.js.map \ No newline at end of file diff --git a/node_modules/css-select/lib/general.js.map b/node_modules/css-select/lib/general.js.map deleted file mode 100644 index 0832b74..0000000 --- a/node_modules/css-select/lib/general.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"general.js","sourceRoot":"https://raw.githubusercontent.com/fb55/css-select/0f0725a9dfeddd2fdb54eda9656cdbab5bbf6be6/src/","sources":["general.ts"],"names":[],"mappings":";;;AAAA,iDAAiD;AACjD,wDAAoE;AAQpE,qCAAwC;AAExC,SAAS,gBAAgB,CACrB,IAAiB,EACjB,OAAmC;IAEnC,IAAM,MAAM,GAAG,OAAO,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;IACvC,IAAI,MAAM,IAAI,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,EAAE;QACjC,OAAO,MAAM,CAAC;KACjB;IACD,OAAO,IAAI,CAAC;AAChB,CAAC;AAED;;GAEG;AAEH,SAAgB,sBAAsB,CAClC,IAAgC,EAChC,QAA0B,EAC1B,OAA2C,EAC3C,OAA2B,EAC3B,YAA6C;IAErC,IAAA,OAAO,GAAa,OAAO,QAApB,EAAE,MAAM,GAAK,OAAO,OAAZ,CAAa;IAEpC,QAAQ,QAAQ,CAAC,IAAI,EAAE;QACnB,KAAK,uBAAY,CAAC,aAAa,CAAC,CAAC;YAC7B,MAAM,IAAI,KAAK,CAAC,iDAAiD,CAAC,CAAC;SACtE;QACD,KAAK,uBAAY,CAAC,gBAAgB,CAAC,CAAC;YAChC,MAAM,IAAI,KAAK,CACX,wDAAwD,CAC3D,CAAC;SACL;QACD,KAAK,uBAAY,CAAC,SAAS,CAAC,CAAC;YACzB,IAAI,QAAQ,CAAC,SAAS,IAAI,IAAI,EAAE;gBAC5B,MAAM,IAAI,KAAK,CACX,2DAA2D,CAC9D,CAAC;aACL;YAED,IA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GAAG,CAAC,EAAE,CAAC,GAAG,QAAQ,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;oBACtC,IAAM,cAAc,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAC;oBACnC,IAAI,MAAM,CAAC,IAAI,EAAE,cAAc,CAAC;wBAAE,MAAM;oBACxC,IAAI,OAAO,CAAC,KAAK,CAAC,cAAc,CAAC,EAAE;wBAC/B,WAAW,GAAG,cAAc,CAAC;qBAChC;iBACJ;gBAED,OAAO,CAAC,CAAC,WAAW,IAAI,IAAI,CAAC,WAAW,CAAC,CAAC;YAC9C,CAAC,CAAC;SACL;QACD,KAAK,uBAAY,CAAC,SAAS,CAAC,CAAC;YACzB,IAAI,QAAQ,CAAC,SAAS,IAAI,IAAI,IAAI,QAAQ,CAAC,SAAS,KAAK,GAAG,EAAE;gBAC1D,MAAM,IAAI,KAAK,CACX,oEAAoE,CACvE,CAAC;aACL;YAED,OAAO,IAAI,CAAC;SACf;KACJ;AACL,CAAC;AAvKD,wDAuKC"} \ No newline at end of file diff --git a/node_modules/css-select/lib/index.d.ts b/node_modules/css-select/lib/index.d.ts deleted file mode 100644 index 0911372..0000000 --- a/node_modules/css-select/lib/index.d.ts +++ /dev/null @@ -1,50 +0,0 @@ -import type { CompiledQuery, Options, Query, Adapter } from "./types.js"; -export type { Options }; -/** - * Compiles the query, returns a function. - */ -export declare const compile: <Node, ElementNode extends Node>(selector: string | import("css-what").Selector[][], options?: Options<Node, ElementNode> | undefined, context?: Node | Node[] | undefined) => CompiledQuery<Node>; -export declare const _compileUnsafe: <Node, ElementNode extends Node>(selector: string | import("css-what").Selector[][], options?: Options<Node, ElementNode> | undefined, context?: Node | Node[] | undefined) => CompiledQuery<ElementNode>; -export declare const _compileToken: <Node, ElementNode extends Node>(selector: import("./types.js").InternalSelector[][], options?: Options<Node, ElementNode> | undefined, context?: Node | Node[] | undefined) => CompiledQuery<ElementNode>; -export declare function prepareContext<Node, ElementNode extends Node>(elems: Node | Node[], adapter: Adapter<Node, ElementNode>, shouldTestNextSiblings?: boolean): Node[]; -/** - * @template Node The generic Node type for the DOM adapter being used. - * @template ElementNode The Node type for elements for the DOM adapter being used. - * @param elems Elements to query. If it is an element, its children will be queried.. - * @param query can be either a CSS selector string or a compiled query function. - * @param [options] options for querying the document. - * @see compile for supported selector queries. - * @returns All matching elements. - * - */ -export declare const selectAll: <Node, ElementNode extends Node>(query: Query<ElementNode>, elements: Node | Node[], options?: Options<Node, ElementNode> | undefined) => ElementNode[]; -/** - * @template Node The generic Node type for the DOM adapter being used. - * @template ElementNode The Node type for elements for the DOM adapter being used. - * @param elems Elements to query. If it is an element, its children will be queried.. - * @param query can be either a CSS selector string or a compiled query function. - * @param [options] options for querying the document. - * @see compile for supported selector queries. - * @returns the first match, or null if there was no match. - */ -export declare const selectOne: <Node, ElementNode extends Node>(query: Query<ElementNode>, elements: Node | Node[], options?: Options<Node, ElementNode> | undefined) => ElementNode | null; -/** - * Tests whether or not an element is matched by query. - * - * @template Node The generic Node type for the DOM adapter being used. - * @template ElementNode The Node type for elements for the DOM adapter being used. - * @param elem The element to test if it matches the query. - * @param query can be either a CSS selector string or a compiled query function. - * @param [options] options for querying the document. - * @see compile for supported selector queries. - * @returns - */ -export declare function is<Node, ElementNode extends Node>(elem: ElementNode, query: Query<ElementNode>, options?: Options<Node, ElementNode>): boolean; -/** - * Alias for selectAll(query, elems, options). - * @see [compile] for supported selector queries. - */ -export default selectAll; -/** @deprecated Use the `pseudos` option instead. */ -export { filters, pseudos, aliases } from "./pseudo-selectors/index.js"; -//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/css-select/lib/index.d.ts.map b/node_modules/css-select/lib/index.d.ts.map deleted file mode 100644 index 120c4fe..0000000 --- a/node_modules/css-select/lib/index.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"https://raw.githubusercontent.com/fb55/css-select/0f0725a9dfeddd2fdb54eda9656cdbab5bbf6be6/src/","sources":["index.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EACR,aAAa,EACb,OAAO,EAEP,KAAK,EACL,OAAO,EAEV,MAAM,YAAY,CAAC;AAGpB,YAAY,EAAE,OAAO,EAAE,CAAC;AA0CxB;;GAEG;AACH,eAAO,MAAM,OAAO,oMAA0B,CAAC;AAC/C,eAAO,MAAM,cAAc,2MAA6B,CAAC;AACzD,eAAO,MAAM,aAAa,4MAA4B,CAAC;AA6BvD,wBAAgB,cAAc,CAAC,IAAI,EAAE,WAAW,SAAS,IAAI,EACzD,KAAK,EAAE,IAAI,GAAG,IAAI,EAAE,EACpB,OAAO,EAAE,OAAO,CAAC,IAAI,EAAE,WAAW,CAAC,EACnC,sBAAsB,UAAQ,GAC/B,IAAI,EAAE,CAYR;AAiBD;;;;;;;;;GASG;AACH,eAAO,MAAM,SAAS,yJASrB,CAAC;AAEF;;;;;;;;GAQG;AACH,eAAO,MAAM,SAAS,8JASrB,CAAC;AAEF;;;;;;;;;;GAUG;AACH,wBAAgB,EAAE,CAAC,IAAI,EAAE,WAAW,SAAS,IAAI,EAC7C,IAAI,EAAE,WAAW,EACjB,KAAK,EAAE,KAAK,CAAC,WAAW,CAAC,EACzB,OAAO,CAAC,EAAE,OAAO,CAAC,IAAI,EAAE,WAAW,CAAC,GACrC,OAAO,CAKT;AAED;;;GAGG;AACH,eAAe,SAAS,CAAC;AAGzB,oDAAoD;AACpD,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,6BAA6B,CAAC"} \ No newline at end of file diff --git a/node_modules/css-select/lib/index.js b/node_modules/css-select/lib/index.js deleted file mode 100644 index 0dc6da0..0000000 --- a/node_modules/css-select/lib/index.js +++ /dev/null @@ -1,154 +0,0 @@ -"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 __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}); -var __importStar = (this && this.__importStar) || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; -}; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.aliases = exports.pseudos = exports.filters = exports.is = exports.selectOne = exports.selectAll = exports.prepareContext = exports._compileToken = exports._compileUnsafe = exports.compile = void 0; -var DomUtils = __importStar(require("domutils")); -var boolbase_1 = __importDefault(require("boolbase")); -var compile_js_1 = require("./compile.js"); -var subselects_js_1 = require("./pseudo-selectors/subselects.js"); -var defaultEquals = function (a, b) { return a === b; }; -var defaultOptions = { - adapter: DomUtils, - equals: defaultEquals, -}; -function convertOptionFormats(options) { - var _a, _b, _c, _d; - /* - * We force one format of options to the other one. - */ - // @ts-expect-error Default options may have incompatible `Node` / `ElementNode`. - var opts = options !== null && options !== void 0 ? options : defaultOptions; - // @ts-expect-error Same as above. - (_a = opts.adapter) !== null && _a !== void 0 ? _a : (opts.adapter = DomUtils); - // @ts-expect-error `equals` does not exist on `Options` - (_b = opts.equals) !== null && _b !== void 0 ? _b : (opts.equals = (_d = (_c = opts.adapter) === null || _c === void 0 ? void 0 : _c.equals) !== null && _d !== void 0 ? _d : defaultEquals); - return opts; -} -function wrapCompile(func) { - return function addAdapter(selector, options, context) { - var opts = convertOptionFormats(options); - return func(selector, opts, context); - }; -} -/** - * Compiles the query, returns a function. - */ -exports.compile = wrapCompile(compile_js_1.compile); -exports._compileUnsafe = wrapCompile(compile_js_1.compileUnsafe); -exports._compileToken = wrapCompile(compile_js_1.compileToken); -function getSelectorFunc(searchFunc) { - return function select(query, elements, options) { - var opts = convertOptionFormats(options); - if (typeof query !== "function") { - query = (0, compile_js_1.compileUnsafe)(query, opts, elements); - } - var filteredElements = prepareContext(elements, opts.adapter, query.shouldTestNextSiblings); - return searchFunc(query, filteredElements, opts); - }; -} -function prepareContext(elems, adapter, shouldTestNextSiblings) { - if (shouldTestNextSiblings === void 0) { shouldTestNextSiblings = false; } - /* - * Add siblings if the query requires them. - * See https://github.com/fb55/css-select/pull/43#issuecomment-225414692 - */ - if (shouldTestNextSiblings) { - elems = appendNextSiblings(elems, adapter); - } - return Array.isArray(elems) - ? adapter.removeSubsets(elems) - : adapter.getChildren(elems); -} -exports.prepareContext = prepareContext; -function appendNextSiblings(elem, adapter) { - // Order matters because jQuery seems to check the children before the siblings - var elems = Array.isArray(elem) ? elem.slice(0) : [elem]; - var elemsLength = elems.length; - for (var i = 0; i < elemsLength; i++) { - var nextSiblings = (0, subselects_js_1.getNextSiblings)(elems[i], adapter); - elems.push.apply(elems, nextSiblings); - } - return elems; -} -/** - * @template Node The generic Node type for the DOM adapter being used. - * @template ElementNode The Node type for elements for the DOM adapter being used. - * @param elems Elements to query. If it is an element, its children will be queried.. - * @param query can be either a CSS selector string or a compiled query function. - * @param [options] options for querying the document. - * @see compile for supported selector queries. - * @returns All matching elements. - * - */ -exports.selectAll = getSelectorFunc(function (query, elems, options) { - return query === boolbase_1.default.falseFunc || !elems || elems.length === 0 - ? [] - : options.adapter.findAll(query, elems); -}); -/** - * @template Node The generic Node type for the DOM adapter being used. - * @template ElementNode The Node type for elements for the DOM adapter being used. - * @param elems Elements to query. If it is an element, its children will be queried.. - * @param query can be either a CSS selector string or a compiled query function. - * @param [options] options for querying the document. - * @see compile for supported selector queries. - * @returns the first match, or null if there was no match. - */ -exports.selectOne = getSelectorFunc(function (query, elems, options) { - return query === boolbase_1.default.falseFunc || !elems || elems.length === 0 - ? null - : options.adapter.findOne(query, elems); -}); -/** - * Tests whether or not an element is matched by query. - * - * @template Node The generic Node type for the DOM adapter being used. - * @template ElementNode The Node type for elements for the DOM adapter being used. - * @param elem The element to test if it matches the query. - * @param query can be either a CSS selector string or a compiled query function. - * @param [options] options for querying the document. - * @see compile for supported selector queries. - * @returns - */ -function is(elem, query, options) { - var opts = convertOptionFormats(options); - return (typeof query === "function" ? query : (0, compile_js_1.compile)(query, opts))(elem); -} -exports.is = is; -/** - * Alias for selectAll(query, elems, options). - * @see [compile] for supported selector queries. - */ -exports.default = exports.selectAll; -// Export filters, pseudos and aliases to allow users to supply their own. -/** @deprecated Use the `pseudos` option instead. */ -var index_js_1 = require("./pseudo-selectors/index.js"); -Object.defineProperty(exports, "filters", { enumerable: true, get: function () { return index_js_1.filters; } }); -Object.defineProperty(exports, "pseudos", { enumerable: true, get: function () { return index_js_1.pseudos; } }); -Object.defineProperty(exports, "aliases", { enumerable: true, get: function () { return index_js_1.aliases; } }); -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/css-select/lib/index.js.map b/node_modules/css-select/lib/index.js.map deleted file mode 100644 index c44e856..0000000 --- a/node_modules/css-select/lib/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sourceRoot":"https://raw.githubusercontent.com/fb55/css-select/0f0725a9dfeddd2fdb54eda9656cdbab5bbf6be6/src/","sources":["index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,iDAAqC;AACrC,sDAAgC;AAKhC,2CAIsB;AAStB,kEAAmE;AAInE,IAAM,aAAa,GAAG,UAAO,CAAO,EAAE,CAAO,IAAK,OAAA,CAAC,KAAK,CAAC,EAAP,CAAO,CAAC;AAC1D,IAAM,cAAc,GAAuD;IACvE,OAAO,EAAE,QAAQ;IACjB,MAAM,EAAE,aAAa;CACxB,CAAC;AAEF,SAAS,oBAAoB,CACz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AAO,CAAC,OAAO,CAAC,OAAO,CAAC,KAAK,EAAE,KAAK,CAAC;AAF3C,CAE2C,CAClD,CAAC;AAEF;;;;;;;;GAQG;AACU,QAAA,SAAS,GAAG,eAAe,CACpC,UACI,KAA6B,EAC7B,KAAoB,EACpB,OAA2C;IAE3C,OAAA,KAAK,KAAK,kBAAQ,CAAC,SAAS,IAAI,CAAC,KAAK,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC;QACxD,CAAC,CAAC,IAAI;QACN,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,OAAO,CAAC,KAAK,EAAE,KAAK,CAAC;AAF3C,CAE2C,CAClD,CAAC;AAEF;;;;;;;;;;GAUG;AACH,SAAgB,EAAE,CACd,IAAiB,EACjB,KAAyB,EACzB,OAAoC;IAEpC,IAAM,IAAI,GAAG,oBAAoB,CAAC,OAAO,CAAC,CAAC;IAC3C,OAAO,CAAC,OAAO,KAAK,KAAK,UAAU,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAA,oBAAU,EAAC,KAAK,EAAE,IAAI,CAAC,CAAC,CAClE,IAAI,CACP,CAAC;AACN,CAAC;AATD,gBASC;AAED;;;GAGG;AACH,kBAAe,iBAAS,CAAC;AAEzB,0EAA0E;AAC1E,oDAAoD;AACpD,wDAAwE;AAA/D,mGAAA,OAAO,OAAA;AAAE,mGAAA,OAAO,OAAA;AAAE,mGAAA,OAAO,OAAA"} \ No newline at end of file diff --git a/node_modules/css-select/lib/pseudo-selectors/aliases.d.ts b/node_modules/css-select/lib/pseudo-selectors/aliases.d.ts deleted file mode 100644 index 1bcb31a..0000000 --- a/node_modules/css-select/lib/pseudo-selectors/aliases.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -/** - * Aliases are pseudos that are expressed as selectors. - */ -export declare const aliases: Record<string, string>; -//# sourceMappingURL=aliases.d.ts.map \ No newline at end of file diff --git a/node_modules/css-select/lib/pseudo-selectors/aliases.d.ts.map b/node_modules/css-select/lib/pseudo-selectors/aliases.d.ts.map deleted file mode 100644 index 37c9e8c..0000000 --- a/node_modules/css-select/lib/pseudo-selectors/aliases.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"aliases.d.ts","sourceRoot":"https://raw.githubusercontent.com/fb55/css-select/0f0725a9dfeddd2fdb54eda9656cdbab5bbf6be6/src/","sources":["pseudo-selectors/aliases.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,eAAO,MAAM,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAwC1C,CAAC"} \ No newline at end of file diff --git a/node_modules/css-select/lib/pseudo-selectors/aliases.js b/node_modules/css-select/lib/pseudo-selectors/aliases.js deleted file mode 100644 index c259889..0000000 --- a/node_modules/css-select/lib/pseudo-selectors/aliases.js +++ /dev/null @@ -1,34 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.aliases = void 0; -/** - * Aliases are pseudos that are expressed as selectors. - */ -exports.aliases = { - // Links - "any-link": ":is(a, area, link)[href]", - link: ":any-link:not(:visited)", - // Forms - // https://html.spec.whatwg.org/multipage/scripting.html#disabled-elements - disabled: ":is(\n :is(button, input, select, textarea, optgroup, option)[disabled],\n optgroup[disabled] > option,\n fieldset[disabled]:not(fieldset[disabled] legend:first-of-type *)\n )", - enabled: ":not(:disabled)", - checked: ":is(:is(input[type=radio], input[type=checkbox])[checked], option:selected)", - required: ":is(input, select, textarea)[required]", - optional: ":is(input, select, textarea):not([required])", - // JQuery extensions - // https://html.spec.whatwg.org/multipage/form-elements.html#concept-option-selectedness - selected: "option:is([selected], select:not([multiple]):not(:has(> option[selected])) > :first-of-type)", - checkbox: "[type=checkbox]", - file: "[type=file]", - password: "[type=password]", - radio: "[type=radio]", - reset: "[type=reset]", - image: "[type=image]", - submit: "[type=submit]", - parent: ":not(:empty)", - header: ":is(h1, h2, h3, h4, h5, h6)", - button: ":is(button, input[type=button])", - input: ":is(input, textarea, select, button)", - text: "input:is(:not([type!='']), [type=text])", -}; -//# sourceMappingURL=aliases.js.map \ No newline at end of file diff --git a/node_modules/css-select/lib/pseudo-selectors/aliases.js.map b/node_modules/css-select/lib/pseudo-selectors/aliases.js.map deleted file mode 100644 index 6a82f97..0000000 --- a/node_modules/css-select/lib/pseudo-selectors/aliases.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"aliases.js","sourceRoot":"https://raw.githubusercontent.com/fb55/css-select/0f0725a9dfeddd2fdb54eda9656cdbab5bbf6be6/src/","sources":["pseudo-selectors/aliases.ts"],"names":[],"mappings":";;;AAAA;;GAEG;AACU,QAAA,OAAO,GAA2B;IAC3C,QAAQ;IAER,UAAU,EAAE,0BAA0B;IACtC,IAAI,EAAE,yBAAyB;IAE/B,QAAQ;IAER,0EAA0E;IAC1E,QAAQ,EAAE,yMAIR;IACF,OAAO,EAAE,iBAAiB;IAC1B,OAAO,EACH,6EAA6E;IACjF,QAAQ,EAAE,wCAAwC;IAClD,QAAQ,EAAE,8CAA8C;IAExD,oBAAoB;IAEpB,wFAAwF;IACxF,QAAQ,EACJ,8FAA8F;IAElG,QAAQ,EAAE,iBAAiB;IAC3B,IAAI,EAAE,aAAa;IACnB,QAAQ,EAAE,iBAAiB;IAC3B,KAAK,EAAE,cAAc;IACrB,KAAK,EAAE,cAAc;IACrB,KAAK,EAAE,cAAc;IACrB,MAAM,EAAE,eAAe;IAEvB,MAAM,EAAE,cAAc;IACtB,MAAM,EAAE,6BAA6B;IAErC,MAAM,EAAE,iCAAiC;IACzC,KAAK,EAAE,sCAAsC;IAC7C,IAAI,EAAE,yCAAyC;CAClD,CAAC"} \ No newline at end of file diff --git a/node_modules/css-select/lib/pseudo-selectors/filters.d.ts b/node_modules/css-select/lib/pseudo-selectors/filters.d.ts deleted file mode 100644 index a75d063..0000000 --- a/node_modules/css-select/lib/pseudo-selectors/filters.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -import type { CompiledQuery, InternalOptions } from "../types.js"; -export declare type Filter = <Node, ElementNode extends Node>(next: CompiledQuery<ElementNode>, text: string, options: InternalOptions<Node, ElementNode>, context?: Node[]) => CompiledQuery<ElementNode>; -export declare const filters: Record<string, Filter>; -//# sourceMappingURL=filters.d.ts.map \ No newline at end of file diff --git a/node_modules/css-select/lib/pseudo-selectors/filters.d.ts.map b/node_modules/css-select/lib/pseudo-selectors/filters.d.ts.map deleted file mode 100644 index 86f1cef..0000000 --- a/node_modules/css-select/lib/pseudo-selectors/filters.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"filters.d.ts","sourceRoot":"https://raw.githubusercontent.com/fb55/css-select/0f0725a9dfeddd2fdb54eda9656cdbab5bbf6be6/src/","sources":["pseudo-selectors/filters.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,eAAe,EAAW,MAAM,aAAa,CAAC;AAE3E,oBAAY,MAAM,GAAG,CAAC,IAAI,EAAE,WAAW,SAAS,IAAI,EAChD,IAAI,EAAE,aAAa,CAAC,WAAW,CAAC,EAChC,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,eAAe,CAAC,IAAI,EAAE,WAAW,CAAC,EAC3C,OAAO,CAAC,EAAE,IAAI,EAAE,KACf,aAAa,CAAC,WAAW,CAAC,CAAC;AAYhC,eAAO,MAAM,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CA2I1C,CAAC"} \ No newline at end of file diff --git a/node_modules/css-select/lib/pseudo-selectors/filters.js b/node_modules/css-select/lib/pseudo-selectors/filters.js deleted file mode 100644 index 981ec2f..0000000 --- a/node_modules/css-select/lib/pseudo-selectors/filters.js +++ /dev/null @@ -1,157 +0,0 @@ -"use strict"; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.filters = void 0; -var nth_check_1 = __importDefault(require("nth-check")); -var boolbase_1 = __importDefault(require("boolbase")); -function getChildFunc(next, adapter) { - return function (elem) { - var parent = adapter.getParent(elem); - return parent != null && adapter.isTag(parent) && next(elem); - }; -} -exports.filters = { - contains: function (next, text, _a) { - var adapter = _a.adapter; - return function contains(elem) { - return next(elem) && adapter.getText(elem).includes(text); - }; - }, - icontains: function (next, text, _a) { - var adapter = _a.adapter; - var itext = text.toLowerCase(); - return function icontains(elem) { - return (next(elem) && - adapter.getText(elem).toLowerCase().includes(itext)); - }; - }, - // Location specific methods - "nth-child": function (next, rule, _a) { - var adapter = _a.adapter, equals = _a.equals; - var func = (0, nth_check_1.default)(rule); - if (func === boolbase_1.default.falseFunc) - return boolbase_1.default.falseFunc; - if (func === boolbase_1.default.trueFunc) - return getChildFunc(next, adapter); - return function nthChild(elem) { - var siblings = adapter.getSiblings(elem); - var pos = 0; - for (var i = 0; i < siblings.length; i++) { - if (equals(elem, siblings[i])) - break; - if (adapter.isTag(siblings[i])) { - pos++; - } - } - return func(pos) && next(elem); - }; - }, - "nth-last-child": function (next, rule, _a) { - var adapter = _a.adapter, equals = _a.equals; - var func = (0, nth_check_1.default)(rule); - if (func === boolbase_1.default.falseFunc) - return boolbase_1.default.falseFunc; - if (func === boolbase_1.default.trueFunc) - return getChildFunc(next, adapter); - return function nthLastChild(elem) { - var siblings = adapter.getSiblings(elem); - var pos = 0; - for (var i = siblings.length - 1; i >= 0; i--) { - if (equals(elem, siblings[i])) - break; - if (adapter.isTag(siblings[i])) { - pos++; - } - } - return func(pos) && next(elem); - }; - }, - "nth-of-type": function (next, rule, _a) { - var adapter = _a.adapter, equals = _a.equals; - var func = (0, nth_check_1.default)(rule); - if (func === boolbase_1.default.falseFunc) - return boolbase_1.default.falseFunc; - if (func === boolbase_1.default.trueFunc) - return getChildFunc(next, adapter); - return function nthOfType(elem) { - var siblings = adapter.getSiblings(elem); - var pos = 0; - for (var i = 0; i < siblings.length; i++) { - var currentSibling = siblings[i]; - if (equals(elem, currentSibling)) - break; - if (adapter.isTag(currentSibling) && - adapter.getName(currentSibling) === adapter.getName(elem)) { - pos++; - } - } - return func(pos) && next(elem); - }; - }, - "nth-last-of-type": function (next, rule, _a) { - var adapter = _a.adapter, equals = _a.equals; - var func = (0, nth_check_1.default)(rule); - if (func === boolbase_1.default.falseFunc) - return boolbase_1.default.falseFunc; - if (func === boolbase_1.default.trueFunc) - return getChildFunc(next, adapter); - return function nthLastOfType(elem) { - var siblings = adapter.getSiblings(elem); - var pos = 0; - for (var i = siblings.length - 1; i >= 0; i--) { - var currentSibling = siblings[i]; - if (equals(elem, currentSibling)) - break; - if (adapter.isTag(currentSibling) && - adapter.getName(currentSibling) === adapter.getName(elem)) { - pos++; - } - } - return func(pos) && next(elem); - }; - }, - // TODO determine the actual root element - root: function (next, _rule, _a) { - var adapter = _a.adapter; - return function (elem) { - var parent = adapter.getParent(elem); - return (parent == null || !adapter.isTag(parent)) && next(elem); - }; - }, - scope: function (next, rule, options, context) { - var equals = options.equals; - if (!context || context.length === 0) { - // Equivalent to :root - return exports.filters["root"](next, rule, options); - } - if (context.length === 1) { - // NOTE: can't be unpacked, as :has uses this for side-effects - return function (elem) { return equals(context[0], elem) && next(elem); }; - } - return function (elem) { return context.includes(elem) && next(elem); }; - }, - hover: dynamicStatePseudo("isHovered"), - visited: dynamicStatePseudo("isVisited"), - active: dynamicStatePseudo("isActive"), -}; -/** - * Dynamic state pseudos. These depend on optional Adapter methods. - * - * @param name The name of the adapter method to call. - * @returns Pseudo for the `filters` object. - */ -function dynamicStatePseudo(name) { - return function dynamicPseudo(next, _rule, _a) { - var adapter = _a.adapter; - var func = adapter[name]; - if (typeof func !== "function") { - return boolbase_1.default.falseFunc; - } - return function active(elem) { - return func(elem) && next(elem); - }; - }; -} -//# sourceMappingURL=filters.js.map \ No newline at end of file diff --git a/node_modules/css-select/lib/pseudo-selectors/filters.js.map b/node_modules/css-select/lib/pseudo-selectors/filters.js.map deleted file mode 100644 index 5ce5696..0000000 --- a/node_modules/css-select/lib/pseudo-selectors/filters.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"filters.js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,IAAI;YACvB,OAAO,IAAI,CAAC,IAAI,CAAC,IAAI,IAAI,CAAC,IAAI,CAAC,CAAC;QACpC,CAAC,CAAC;IACN,CAAC,CAAC;AACN,CAAC"} \ No newline at end of file diff --git a/node_modules/css-select/lib/pseudo-selectors/index.d.ts b/node_modules/css-select/lib/pseudo-selectors/index.d.ts deleted file mode 100644 index 2c41913..0000000 --- a/node_modules/css-select/lib/pseudo-selectors/index.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -import type { CompiledQuery, InternalOptions, CompileToken } from "../types.js"; -import { PseudoSelector } from "css-what"; -import { filters } from "./filters.js"; -import { pseudos } from "./pseudos.js"; -import { aliases } from "./aliases.js"; -export { filters, pseudos, aliases }; -export declare function compilePseudoSelector<Node, ElementNode extends Node>(next: CompiledQuery<ElementNode>, selector: PseudoSelector, options: InternalOptions<Node, ElementNode>, context: Node[] | undefined, compileToken: CompileToken<Node, ElementNode>): CompiledQuery<ElementNode>; -//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/css-select/lib/pseudo-selectors/index.d.ts.map b/node_modules/css-select/lib/pseudo-selectors/index.d.ts.map deleted file mode 100644 index ba14097..0000000 --- a/node_modules/css-select/lib/pseudo-selectors/index.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"https://raw.githubusercontent.com/fb55/css-select/0f0725a9dfeddd2fdb54eda9656cdbab5bbf6be6/src/","sources":["pseudo-selectors/index.ts"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAAE,aAAa,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAChF,OAAO,EAAS,cAAc,EAAE,MAAM,UAAU,CAAC;AACjD,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,OAAO,EAAoB,MAAM,cAAc,CAAC;AACzD,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAGvC,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,CAAC;AAErC,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,WAAW,SAAS,IAAI,EAChE,IAAI,EAAE,aAAa,CAAC,WAAW,CAAC,EAChC,QAAQ,EAAE,cAAc,EACxB,OAAO,EAAE,eAAe,CAAC,IAAI,EAAE,WAAW,CAAC,EAC3C,OAAO,EAAE,IAAI,EAAE,GAAG,SAAS,EAC3B,YAAY,EAAE,YAAY,CAAC,IAAI,EAAE,WAAW,CAAC,GAC9C,aAAa,CAAC,WAAW,CAAC,CA4C5B"} \ No newline at end of file diff --git a/node_modules/css-select/lib/pseudo-selectors/index.js b/node_modules/css-select/lib/pseudo-selectors/index.js deleted file mode 100644 index 2536786..0000000 --- a/node_modules/css-select/lib/pseudo-selectors/index.js +++ /dev/null @@ -1,46 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.compilePseudoSelector = exports.aliases = exports.pseudos = exports.filters = void 0; -var css_what_1 = require("css-what"); -var filters_js_1 = require("./filters.js"); -Object.defineProperty(exports, "filters", { enumerable: true, get: function () { return filters_js_1.filters; } }); -var pseudos_js_1 = require("./pseudos.js"); -Object.defineProperty(exports, "pseudos", { enumerable: true, get: function () { return pseudos_js_1.pseudos; } }); -var aliases_js_1 = require("./aliases.js"); -Object.defineProperty(exports, "aliases", { enumerable: true, get: function () { return aliases_js_1.aliases; } }); -var subselects_js_1 = require("./subselects.js"); -function compilePseudoSelector(next, selector, options, context, compileToken) { - var _a; - var name = selector.name, data = selector.data; - if (Array.isArray(data)) { - if (!(name in subselects_js_1.subselects)) { - throw new Error("Unknown pseudo-class :".concat(name, "(").concat(data, ")")); - } - return subselects_js_1.subselects[name](next, data, options, context, compileToken); - } - var userPseudo = (_a = options.pseudos) === null || _a === void 0 ? void 0 : _a[name]; - var stringPseudo = typeof userPseudo === "string" ? userPseudo : aliases_js_1.aliases[name]; - if (typeof stringPseudo === "string") { - if (data != null) { - throw new Error("Pseudo ".concat(name, " doesn't have any arguments")); - } - // The alias has to be parsed here, to make sure options are respected. - var alias = (0, css_what_1.parse)(stringPseudo); - return subselects_js_1.subselects["is"](next, alias, options, context, compileToken); - } - if (typeof userPseudo === "function") { - (0, pseudos_js_1.verifyPseudoArgs)(userPseudo, name, data, 1); - return function (elem) { return userPseudo(elem, data) && next(elem); }; - } - if (name in filters_js_1.filters) { - return filters_js_1.filters[name](next, data, options, context); - } - if (name in pseudos_js_1.pseudos) { - var pseudo_1 = pseudos_js_1.pseudos[name]; - (0, pseudos_js_1.verifyPseudoArgs)(pseudo_1, name, data, 2); - return function (elem) { return pseudo_1(elem, options, data) && next(elem); }; - } - throw new Error("Unknown pseudo-class :".concat(name)); -} -exports.compilePseudoSelector = compilePseudoSelector; -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/css-select/lib/pseudo-selectors/index.js.map b/node_modules/css-select/lib/pseudo-selectors/index.js.map deleted file mode 100644 index 93f6fc8..0000000 --- a/node_modules/css-select/lib/pseudo-selectors/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sourceRoot":"https://raw.githubusercontent.com/fb55/css-select/0f0725a9dfeddd2fdb54eda9656cdbab5bbf6be6/src/","sources":["pseudo-selectors/index.ts"],"names":[],"mappings":";;;AAeA,qCAAiD;AACjD,2CAAuC;AAK9B,wFALA,oBAAO,OAKA;AAJhB,2CAAyD;AAIvC,wFAJT,oBAAO,OAIS;AAHzB,2CAAuC;AAGZ,wFAHlB,oBAAO,OAGkB;AAFlC,iDAA6C;AAI7C,SAAgB,qBAAqB,CACjC,IAAgC,EAChC,QAAwB,EACxB,OAA2C,EAC3C,OAA2B,EAC3B,YAA6C;;IAErC,IAAA,IAAI,GAAW,QAAQ,KAAnB,EAAE,IAAI,GAAK,QAAQ,KAAb,CAAc;IAEhC,IAAI,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE;QACrB,IAAI,CAAC,CAAC,IAAI,IAAI,0BAAU,CAAC,E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AAgB,EAAC,QAAM,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;QAExC,OAAO,UAAC,IAAI,IAAK,OAAA,QAAM,CAAC,IAAI,EAAE,OAAO,EAAE,IAAI,CAAC,IAAI,IAAI,CAAC,IAAI,CAAC,EAAzC,CAAyC,CAAC;KAC9D;IAED,MAAM,IAAI,KAAK,CAAC,gCAAyB,IAAI,CAAE,CAAC,CAAC;AACrD,CAAC;AAlDD,sDAkDC"} \ No newline at end of file diff --git a/node_modules/css-select/lib/pseudo-selectors/pseudos.d.ts b/node_modules/css-select/lib/pseudo-selectors/pseudos.d.ts deleted file mode 100644 index cfcf8d6..0000000 --- a/node_modules/css-select/lib/pseudo-selectors/pseudos.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import type { PseudoSelector } from "css-what"; -import type { InternalOptions } from "../types.js"; -export declare type Pseudo = <Node, ElementNode extends Node>(elem: ElementNode, options: InternalOptions<Node, ElementNode>, subselect?: string | null) => boolean; -export declare const pseudos: Record<string, Pseudo>; -export declare function verifyPseudoArgs<T extends Array<unknown>>(func: (...args: T) => boolean, name: string, subselect: PseudoSelector["data"], argIndex: number): void; -//# sourceMappingURL=pseudos.d.ts.map \ No newline at end of file diff --git a/node_modules/css-select/lib/pseudo-selectors/pseudos.d.ts.map b/node_modules/css-select/lib/pseudo-selectors/pseudos.d.ts.map deleted file mode 100644 index b2d1137..0000000 --- a/node_modules/css-select/lib/pseudo-selectors/pseudos.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"pseudos.d.ts","sourceRoot":"https://raw.githubusercontent.com/fb55/css-select/0f0725a9dfeddd2fdb54eda9656cdbab5bbf6be6/src/","sources":["pseudo-selectors/pseudos.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAC/C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAEnD,oBAAY,MAAM,GAAG,CAAC,IAAI,EAAE,WAAW,SAAS,IAAI,EAChD,IAAI,EAAE,WAAW,EACjB,OAAO,EAAE,eAAe,CAAC,IAAI,EAAE,WAAW,CAAC,EAC3C,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,KACxB,OAAO,CAAC;AAGb,eAAO,MAAM,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAkF1C,CAAC;AAEF,wBAAgB,gBAAgB,CAAC,CAAC,SAAS,KAAK,CAAC,OAAO,CAAC,EACrD,IAAI,EAAE,CAAC,GAAG,IAAI,EAAE,CAAC,KAAK,OAAO,EAC7B,IAAI,EAAE,MAAM,EACZ,SAAS,EAAE,cAAc,CAAC,MAAM,CAAC,EACjC,QAAQ,EAAE,MAAM,GACjB,IAAI,CAQN"} \ No newline at end of file diff --git a/node_modules/css-select/lib/pseudo-selectors/pseudos.js b/node_modules/css-select/lib/pseudo-selectors/pseudos.js deleted file mode 100644 index 050ac7f..0000000 --- a/node_modules/css-select/lib/pseudo-selectors/pseudos.js +++ /dev/null @@ -1,93 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.verifyPseudoArgs = exports.pseudos = void 0; -// While filters are precompiled, pseudos get called when they are needed -exports.pseudos = { - empty: function (elem, _a) { - var adapter = _a.adapter; - return !adapter.getChildren(elem).some(function (elem) { - // FIXME: `getText` call is potentially expensive. - return adapter.isTag(elem) || adapter.getText(elem) !== ""; - }); - }, - "first-child": function (elem, _a) { - var adapter = _a.adapter, equals = _a.equals; - if (adapter.prevElementSibling) { - return adapter.prevElementSibling(elem) == null; - } - var firstChild = adapter - .getSiblings(elem) - .find(function (elem) { return adapter.isTag(elem); }); - return firstChild != null && equals(elem, firstChild); - }, - "last-child": function (elem, _a) { - var adapter = _a.adapter, equals = _a.equals; - var siblings = adapter.getSiblings(elem); - for (var i = siblings.length - 1; i >= 0; i--) { - if (equals(elem, siblings[i])) - return true; - if (adapter.isTag(siblings[i])) - break; - } - return false; - }, - "first-of-type": function (elem, _a) { - var adapter = _a.adapter, equals = _a.equals; - var siblings = adapter.getSiblings(elem); - var elemName = adapter.getName(elem); - for (var i = 0; i < siblings.length; i++) { - var currentSibling = siblings[i]; - if (equals(elem, currentSibling)) - return true; - if (adapter.isTag(currentSibling) && - adapter.getName(currentSibling) === elemName) { - break; - } - } - return false; - }, - "last-of-type": function (elem, _a) { - var adapter = _a.adapter, equals = _a.equals; - var siblings = adapter.getSiblings(elem); - var elemName = adapter.getName(elem); - for (var i = siblings.length - 1; i >= 0; i--) { - var currentSibling = siblings[i]; - if (equals(elem, currentSibling)) - return true; - if (adapter.isTag(currentSibling) && - adapter.getName(currentSibling) === elemName) { - break; - } - } - return false; - }, - "only-of-type": function (elem, _a) { - var adapter = _a.adapter, equals = _a.equals; - var elemName = adapter.getName(elem); - return adapter - .getSiblings(elem) - .every(function (sibling) { - return equals(elem, sibling) || - !adapter.isTag(sibling) || - adapter.getName(sibling) !== elemName; - }); - }, - "only-child": function (elem, _a) { - var adapter = _a.adapter, equals = _a.equals; - return adapter - .getSiblings(elem) - .every(function (sibling) { return equals(elem, sibling) || !adapter.isTag(sibling); }); - }, -}; -function verifyPseudoArgs(func, name, subselect, argIndex) { - if (subselect === null) { - if (func.length > argIndex) { - throw new Error("Pseudo-class :".concat(name, " requires an argument")); - } - } - else if (func.length === argIndex) { - throw new Error("Pseudo-class :".concat(name, " doesn't have any arguments")); - } -} -exports.verifyPseudoArgs = verifyPseudoArgs; -//# sourceMappingURL=pseudos.js.map \ No newline at end of file diff --git a/node_modules/css-select/lib/pseudo-selectors/pseudos.js.map b/node_modules/css-select/lib/pseudo-selectors/pseudos.js.map deleted file mode 100644 index 089cc51..0000000 --- a/node_modules/css-select/lib/pseudo-selectors/pseudos.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"pseudos.js","sourceRoot":"https://raw.githubusercontent.com/fb55/css-select/0f0725a9dfeddd2fdb54eda9656cdbab5bbf6be6/src/","sources":["pseudo-selectors/pseudos.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AO,KAAK,CAAC;IACjB,CAAC;IACD,cAAc,YAAC,IAAI,EAAE,EAAmB;YAAjB,OAAO,aAAA,EAAE,MAAM,YAAA;QAClC,IAAM,QAAQ,GAAG,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;QAEvC,OAAO,OAAO;aACT,WAAW,CAAC,IAAI,CAAC;aACjB,KAAK,CACF,UAAC,OAAO;YACJ,OAAA,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC;gBACrB,CAAC,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC;gBACvB,OAAO,CAAC,OAAO,CAAC,OAAO,CAAC,KAAK,QAAQ;QAFrC,CAEqC,CAC5C,CAAC;IACV,CAAC;IACD,YAAY,YAAC,IAAI,EAAE,EAAmB;YAAjB,OAAO,aAAA,EAAE,MAAM,YAAA;QAChC,OAAO,OAAO;aACT,WAAW,CAAC,IAAI,CAAC;aACjB,KAAK,CACF,UAAC,OAAO,IAAK,OAAA,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,EAAhD,CAAgD,CAChE,CAAC;IACV,CAAC;CACJ,CAAC;AAEF,SAAgB,gBAAgB,CAC5B,IAA6B,EAC7B,IAAY,EACZ,SAAiC,EACjC,QAAgB;IAEhB,IAAI,SAAS,KAAK,IAAI,EAAE;QACpB,IAAI,IAAI,CAAC,MAAM,GAAG,QAAQ,EAAE;YACxB,MAAM,IAAI,KAAK,CAAC,wBAAiB,IAAI,0BAAuB,CAAC,CAAC;SACjE;KACJ;SAAM,IAAI,IAAI,CAAC,MAAM,KAAK,QAAQ,EAAE;QACjC,MAAM,IAAI,KAAK,CAAC,wBAAiB,IAAI,gCAA6B,CAAC,CAAC;KACvE;AACL,CAAC;AAbD,4CAaC"} \ No newline at end of file diff --git a/node_modules/css-select/lib/pseudo-selectors/subselects.d.ts b/node_modules/css-select/lib/pseudo-selectors/subselects.d.ts deleted file mode 100644 index 6555ef2..0000000 --- a/node_modules/css-select/lib/pseudo-selectors/subselects.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -import type { Selector } from "css-what"; -import type { CompiledQuery, InternalOptions, CompileToken, Adapter } from "../types.js"; -/** Used as a placeholder for :has. Will be replaced with the actual element. */ -export declare const PLACEHOLDER_ELEMENT: {}; -export declare function ensureIsTag<Node, ElementNode extends Node>(next: CompiledQuery<ElementNode>, adapter: Adapter<Node, ElementNode>): CompiledQuery<Node>; -export declare type Subselect = <Node, ElementNode extends Node>(next: CompiledQuery<ElementNode>, subselect: Selector[][], options: InternalOptions<Node, ElementNode>, context: Node[] | undefined, compileToken: CompileToken<Node, ElementNode>) => CompiledQuery<ElementNode>; -export declare function getNextSiblings<Node, ElementNode extends Node>(elem: Node, adapter: Adapter<Node, ElementNode>): ElementNode[]; -export declare const subselects: Record<string, Subselect>; -//# sourceMappingURL=subselects.d.ts.map \ No newline at end of file diff --git a/node_modules/css-select/lib/pseudo-selectors/subselects.d.ts.map b/node_modules/css-select/lib/pseudo-selectors/subselects.d.ts.map deleted file mode 100644 index 9950c0c..0000000 --- a/node_modules/css-select/lib/pseudo-selectors/subselects.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"subselects.d.ts","sourceRoot":"https://raw.githubusercontent.com/fb55/css-select/0f0725a9dfeddd2fdb54eda9656cdbab5bbf6be6/src/","sources":["pseudo-selectors/subselects.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AAEzC,OAAO,KAAK,EACR,aAAa,EACb,eAAe,EACf,YAAY,EACZ,OAAO,EACV,MAAM,aAAa,CAAC;AAGrB,gFAAgF;AAChF,eAAO,MAAM,mBAAmB,IAAK,CAAC;AAEtC,wBAAgB,WAAW,CAAC,IAAI,EAAE,WAAW,SAAS,IAAI,EACtD,IAAI,EAAE,aAAa,CAAC,WAAW,CAAC,EAChC,OAAO,EAAE,OAAO,CAAC,IAAI,EAAE,WAAW,CAAC,GACpC,aAAa,CAAC,IAAI,CAAC,CAGrB;AAED,oBAAY,SAAS,GAAG,CAAC,IAAI,EAAE,WAAW,SAAS,IAAI,EACnD,IAAI,EAAE,aAAa,CAAC,WAAW,CAAC,EAChC,SAAS,EAAE,QAAQ,EAAE,EAAE,EACvB,OAAO,EAAE,eAAe,CAAC,IAAI,EAAE,WAAW,CAAC,EAC3C,OAAO,EAAE,IAAI,EAAE,GAAG,SAAS,EAC3B,YAAY,EAAE,YAAY,CAAC,IAAI,EAAE,WAAW,CAAC,KAC5C,aAAa,CAAC,WAAW,CAAC,CAAC;AAEhC,wBAAgB,eAAe,CAAC,IAAI,EAAE,WAAW,SAAS,IAAI,EAC1D,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,OAAO,CAAC,IAAI,EAAE,WAAW,CAAC,GACpC,WAAW,EAAE,CAMf;AAiCD,eAAO,MAAM,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,SAAS,CAgEhD,CAAC"} \ No newline at end of file diff --git a/node_modules/css-select/lib/pseudo-selectors/subselects.js b/node_modules/css-select/lib/pseudo-selectors/subselects.js deleted file mode 100644 index d2f3b1c..0000000 --- a/node_modules/css-select/lib/pseudo-selectors/subselects.js +++ /dev/null @@ -1,112 +0,0 @@ -"use strict"; -var __spreadArray = (this && this.__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)); -}; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.subselects = exports.getNextSiblings = exports.ensureIsTag = exports.PLACEHOLDER_ELEMENT = void 0; -var boolbase_1 = __importDefault(require("boolbase")); -var sort_js_1 = require("../sort.js"); -/** Used as a placeholder for :has. Will be replaced with the actual element. */ -exports.PLACEHOLDER_ELEMENT = {}; -function ensureIsTag(next, adapter) { - if (next === boolbase_1.default.falseFunc) - return boolbase_1.default.falseFunc; - return function (elem) { return adapter.isTag(elem) && next(elem); }; -} -exports.ensureIsTag = ensureIsTag; -function getNextSiblings(elem, adapter) { - var siblings = adapter.getSiblings(elem); - if (siblings.length <= 1) - return []; - var elemIndex = siblings.indexOf(elem); - if (elemIndex < 0 || elemIndex === siblings.length - 1) - return []; - return siblings.slice(elemIndex + 1).filter(adapter.isTag); -} -exports.getNextSiblings = getNextSiblings; -function copyOptions(options) { - // Not copied: context, rootFunc - return { - xmlMode: !!options.xmlMode, - lowerCaseAttributeNames: !!options.lowerCaseAttributeNames, - lowerCaseTags: !!options.lowerCaseTags, - quirksMode: !!options.quirksMode, - cacheResults: !!options.cacheResults, - pseudos: options.pseudos, - adapter: options.adapter, - equals: options.equals, - }; -} -var is = function (next, token, options, context, compileToken) { - var func = compileToken(token, copyOptions(options), context); - return func === boolbase_1.default.trueFunc - ? next - : func === boolbase_1.default.falseFunc - ? boolbase_1.default.falseFunc - : function (elem) { return func(elem) && next(elem); }; -}; -/* - * :not, :has, :is, :matches and :where have to compile selectors - * doing this in src/pseudos.ts would lead to circular dependencies, - * so we add them here - */ -exports.subselects = { - is: is, - /** - * `:matches` and `:where` are aliases for `:is`. - */ - matches: is, - where: is, - not: function (next, token, options, context, compileToken) { - var func = compileToken(token, copyOptions(options), context); - return func === boolbase_1.default.falseFunc - ? next - : func === boolbase_1.default.trueFunc - ? boolbase_1.default.falseFunc - : function (elem) { return !func(elem) && next(elem); }; - }, - has: function (next, subselect, options, _context, compileToken) { - var adapter = options.adapter; - var opts = copyOptions(options); - opts.relativeSelector = true; - var context = subselect.some(function (s) { return s.some(sort_js_1.isTraversal); }) - ? // Used as a placeholder. Will be replaced with the actual element. - [exports.PLACEHOLDER_ELEMENT] - : undefined; - var compiled = compileToken(subselect, opts, context); - if (compiled === boolbase_1.default.falseFunc) - return boolbase_1.default.falseFunc; - var hasElement = ensureIsTag(compiled, adapter); - // If `compiled` is `trueFunc`, we can skip this. - if (context && compiled !== boolbase_1.default.trueFunc) { - /* - * `shouldTestNextSiblings` will only be true if the query starts with - * a traversal (sibling or adjacent). That means we will always have a context. - */ - var _a = compiled.shouldTestNextSiblings, shouldTestNextSiblings_1 = _a === void 0 ? false : _a; - return function (elem) { - if (!next(elem)) - return false; - context[0] = elem; - var childs = adapter.getChildren(elem); - var nextElements = shouldTestNextSiblings_1 - ? __spreadArray(__spreadArray([], childs, true), getNextSiblings(elem, adapter), true) : childs; - return adapter.existsOne(hasElement, nextElements); - }; - } - return function (elem) { - return next(elem) && - adapter.existsOne(hasElement, adapter.getChildren(elem)); - }; - }, -}; -//# sourceMappingURL=subselects.js.map \ No newline at end of file diff --git a/node_modules/css-select/lib/pseudo-selectors/subselects.js.map b/node_modules/css-select/lib/pseudo-selectors/subselects.js.map deleted file mode 100644 index 40e0c25..0000000 --- a/node_modules/css-select/lib/pseudo-selectors/subselects.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"subselects.js","sourceRoot":"https://raw.githubusercontent.com/fb55/css-select/0f0725a9dfeddd2fdb54eda9656cdbab5bbf6be6/src/","sources":["pseudo-selectors/subselects.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AACA,sDAAgC;AAOhC,sCAAyC;AAEzC,gFAAgF;AACnE,QAAA,mBAAmB,GAAG,EAAE,CAAC;AAEtC,SAAgB,WAAW,CACvB,IAAgC,EAChC,OAAmC;IAEnC,IAAI,IAAI,KAAK,kBAAQ,CAAC,SAAS;QAAE,OAAO,kBAAQ,CAAC,SAAS,CAAC;IAC3D,OAAO,UAAC,IAAU,IAAK,OAAA,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,IAAI,CAAC,IAAI,CAAC,EAAjC,CAAiC,CAAC;AAC7D,CAAC;AAND,kCAMC;AAUD,SAAgB,eAAe,CAC3B,IAAU,EACV,OAAmC;IAEnC,IAAM,QAAQ,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AK,kBAAQ,CAAC,SAAS;YAAE,OAAO,kBAAQ,CAAC,SAAS,CAAC;QAE/D,IAAM,UAAU,GAAG,WAAW,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;QAElD,iDAAiD;QACjD,IAAI,OAAO,IAAI,QAAQ,KAAK,kBAAQ,CAAC,QAAQ,EAAE;YAC3C;;;eAGG;YACK,IAAA,KAAmC,QAAQ,uBAAb,EAA9B,wBAAsB,mBAAG,KAAK,KAAA,CAAc;YAEpD,OAAO,UAAC,IAAI;gBACR,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC;oBAAE,OAAO,KAAK,CAAC;gBAE9B,OAAO,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC;gBAClB,IAAM,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;gBACzC,IAAM,YAAY,GAAG,wBAAsB;oBACvC,CAAC,iCAAK,MAAM,SAAK,eAAe,CAAC,IAAI,EAAE,OAAO,CAAC,QAC/C,CAAC,CAAC,MAAM,CAAC;gBAEb,OAAO,OAAO,CAAC,SAAS,CAAC,UAAU,EAAE,YAAY,CAAC,CAAC;YACvD,CAAC,CAAC;SACL;QAED,OAAO,UAAC,IAAI;YACR,OAAA,IAAI,CAAC,IAAI,CAAC;gBACV,OAAO,CAAC,SAAS,CAAC,UAAU,EAAE,OAAO,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;QADxD,CACwD,CAAC;IACjE,CAAC;CACJ,CAAC"} \ No newline at end of file diff --git a/node_modules/css-select/lib/sort.d.ts b/node_modules/css-select/lib/sort.d.ts deleted file mode 100644 index 93c996c..0000000 --- a/node_modules/css-select/lib/sort.d.ts +++ /dev/null @@ -1,12 +0,0 @@ -import type { InternalSelector } from "./types.js"; -import { type Traversal } from "css-what"; -export declare function isTraversal(token: InternalSelector): token is Traversal; -/** - * Sort the parts of the passed selector, - * as there is potential for optimization - * (some types of selectors are faster than others) - * - * @param arr Selector to sort - */ -export default function sortByProcedure(arr: InternalSelector[]): void; -//# sourceMappingURL=sort.d.ts.map \ No newline at end of file diff --git a/node_modules/css-select/lib/sort.d.ts.map b/node_modules/css-select/lib/sort.d.ts.map deleted file mode 100644 index 8e996f4..0000000 --- a/node_modules/css-select/lib/sort.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"sort.d.ts","sourceRoot":"https://raw.githubusercontent.com/fb55/css-select/0f0725a9dfeddd2fdb54eda9656cdbab5bbf6be6/src/","sources":["sort.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AACnD,OAAO,EAAiC,KAAK,SAAS,EAAE,MAAM,UAAU,CAAC;AASzE,wBAAgB,WAAW,CAAC,KAAK,EAAE,gBAAgB,GAAG,KAAK,IAAI,SAAS,CAEvE;AAWD;;;;;;GAMG;AACH,MAAM,CAAC,OAAO,UAAU,eAAe,CAAC,GAAG,EAAE,gBAAgB,EAAE,GAAG,IAAI,CAerE"} \ No newline at end of file diff --git a/node_modules/css-select/lib/sort.js b/node_modules/css-select/lib/sort.js deleted file mode 100644 index d597e82..0000000 --- a/node_modules/css-select/lib/sort.js +++ /dev/null @@ -1,84 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.isTraversal = void 0; -var css_what_1 = require("css-what"); -var procedure = new Map([ - [css_what_1.SelectorType.Universal, 50], - [css_what_1.SelectorType.Tag, 30], - [css_what_1.SelectorType.Attribute, 1], - [css_what_1.SelectorType.Pseudo, 0], -]); -function isTraversal(token) { - return !procedure.has(token.type); -} -exports.isTraversal = isTraversal; -var attributes = new Map([ - [css_what_1.AttributeAction.Exists, 10], - [css_what_1.AttributeAction.Equals, 8], - [css_what_1.AttributeAction.Not, 7], - [css_what_1.AttributeAction.Start, 6], - [css_what_1.AttributeAction.End, 6], - [css_what_1.AttributeAction.Any, 5], -]); -/** - * Sort the parts of the passed selector, - * as there is potential for optimization - * (some types of selectors are faster than others) - * - * @param arr Selector to sort - */ -function sortByProcedure(arr) { - var procs = arr.map(getProcedure); - for (var i = 1; i < arr.length; i++) { - var procNew = procs[i]; - if (procNew < 0) - continue; - for (var j = i - 1; j >= 0 && procNew < procs[j]; j--) { - var token = arr[j + 1]; - arr[j + 1] = arr[j]; - arr[j] = token; - procs[j + 1] = procs[j]; - procs[j] = procNew; - } - } -} -exports.default = sortByProcedure; -function getProcedure(token) { - var _a, _b; - var proc = (_a = procedure.get(token.type)) !== null && _a !== void 0 ? _a : -1; - if (token.type === css_what_1.SelectorType.Attribute) { - proc = (_b = attributes.get(token.action)) !== null && _b !== void 0 ? _b : 4; - if (token.action === css_what_1.AttributeAction.Equals && token.name === "id") { - // Prefer ID selectors (eg. #ID) - proc = 9; - } - if (token.ignoreCase) { - /* - * IgnoreCase adds some overhead, prefer "normal" token - * this is a binary operation, to ensure it's still an int - */ - proc >>= 1; - } - } - else if (token.type === css_what_1.SelectorType.Pseudo) { - if (!token.data) { - proc = 3; - } - else if (token.name === "has" || token.name === "contains") { - proc = 0; // Expensive in any case - } - else if (Array.isArray(token.data)) { - // Eg. :matches, :not - proc = Math.min.apply(Math, token.data.map(function (d) { return Math.min.apply(Math, d.map(getProcedure)); })); - // If we have traversals, try to avoid executing this selector - if (proc < 0) { - proc = 0; - } - } - else { - proc = 2; - } - } - return proc; -} -//# sourceMappingURL=sort.js.map \ No newline at end of file diff --git a/node_modules/css-select/lib/sort.js.map b/node_modules/css-select/lib/sort.js.map deleted file mode 100644 index 5b4862b..0000000 --- a/node_modules/css-select/lib/sort.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"sort.js","sourceRoot":"https://raw.githubusercontent.com/fb55/css-select/0f0725a9dfeddd2fdb54eda9656cdbab5bbf6be6/src/","sources":["sort.ts"],"names":[],"mappings":";;;AACA,qCAAyE;AAEzE,IAAM,SAAS,GAAG,IAAI,GAAG,CAAmC;IACxD,CAAC,uBAAY,CAAC,SAAS,EAAE,EAAE,CAAC;IAC5B,CAAC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AAG,OAAR,IAAI,EAAQ,CAAC,CAAC,GAAG,CAAC,YAAY,CAAC,GAA/B,CAAgC,CAAC,CAC7D,CAAC;YAEF,8DAA8D;YAC9D,IAAI,IAAI,GAAG,CAAC,EAAE;gBACV,IAAI,GAAG,CAAC,CAAC;aACZ;SACJ;aAAM;YACH,IAAI,GAAG,CAAC,CAAC;SACZ;KACJ;IACD,OAAO,IAAI,CAAC;AAChB,CAAC"} \ No newline at end of file diff --git a/node_modules/css-select/lib/types.d.ts b/node_modules/css-select/lib/types.d.ts deleted file mode 100644 index 7a0cd8a..0000000 --- a/node_modules/css-select/lib/types.d.ts +++ /dev/null @@ -1,167 +0,0 @@ -import type { Selector } from "css-what"; -export declare type InternalSelector = Selector | { - type: "_flexibleDescendant"; -}; -export declare type Predicate<Value> = (v: Value) => boolean; -export interface Adapter<Node, ElementNode extends Node> { - /** - * Is the node a tag? - */ - isTag: (node: Node) => node is ElementNode; - /** - * Does at least one of passed element nodes pass the test predicate? - */ - existsOne: (test: Predicate<ElementNode>, elems: Node[]) => boolean; - /** - * Get the attribute value. - */ - getAttributeValue: (elem: ElementNode, name: string) => string | undefined; - /** - * Get the node's children - */ - getChildren: (node: Node) => Node[]; - /** - * Get the name of the tag - */ - getName: (elem: ElementNode) => string; - /** - * Get the parent of the node - */ - getParent: (node: ElementNode) => Node | null; - /** - * Get the siblings of the node. Note that unlike jQuery's `siblings` method, - * this is expected to include the current node as well - */ - getSiblings: (node: Node) => Node[]; - /** - * Returns the previous element sibling of a node. - */ - prevElementSibling?: (node: Node) => ElementNode | null; - /** - * Get the text content of the node, and its children if it has any. - */ - getText: (node: Node) => string; - /** - * Does the element have the named attribute? - */ - hasAttrib: (elem: ElementNode, name: string) => boolean; - /** - * Takes an array of nodes, and removes any duplicates, as well as any - * nodes whose ancestors are also in the array. - */ - removeSubsets: (nodes: Node[]) => Node[]; - /** - * Finds all of the element nodes in the array that match the test predicate, - * as well as any of their children that match it. - */ - findAll: (test: Predicate<ElementNode>, nodes: Node[]) => ElementNode[]; - /** - * Finds the first node in the array that matches the test predicate, or one - * of its children. - */ - findOne: (test: Predicate<ElementNode>, elems: Node[]) => ElementNode | null; - /** - * The adapter can also optionally include an equals method, if your DOM - * structure needs a custom equality test to compare two objects which refer - * to the same underlying node. If not provided, `css-select` will fall back to - * `a === b`. - */ - equals?: (a: Node, b: Node) => boolean; - /** - * Is the element in hovered state? - */ - isHovered?: (elem: ElementNode) => boolean; - /** - * Is the element in visited state? - */ - isVisited?: (elem: ElementNode) => boolean; - /** - * Is the element in active state? - */ - isActive?: (elem: ElementNode) => boolean; -} -export interface Options<Node, ElementNode extends Node> { - /** - * When enabled, tag names will be case-sensitive. - * - * @default false - */ - xmlMode?: boolean; - /** - * Lower-case attribute names. - * - * @default !xmlMode - */ - lowerCaseAttributeNames?: boolean; - /** - * Lower-case tag names. - * - * @default !xmlMode - */ - lowerCaseTags?: boolean; - /** - * Is the document in quirks mode? - * - * This will lead to .className and #id being case-insensitive. - * - * @default false - */ - quirksMode?: boolean; - /** - * Pseudo-classes that override the default ones. - * - * Maps from names to either strings of functions. - * - A string value is a selector that the element must match to be selected. - * - A function is called with the element as its first argument, and optional - * parameters second. If it returns true, the element is selected. - */ - pseudos?: Record<string, string | ((elem: ElementNode, value?: string | null) => boolean)> | undefined; - /** - * The last function in the stack, will be called with the last element - * that's looked at. - */ - rootFunc?: (element: ElementNode) => boolean; - /** - * The adapter to use when interacting with the backing DOM structure. By - * default it uses the `domutils` module. - */ - adapter?: Adapter<Node, ElementNode>; - /** - * The context of the current query. Used to limit the scope of searches. - * Can be matched directly using the `:scope` pseudo-class. - */ - context?: Node | Node[]; - /** - * Indicates whether to consider the selector as a relative selector. - * - * Relative selectors that don't include a `:scope` pseudo-class behave - * as if they have a `:scope ` prefix (a `:scope` pseudo-class, followed by - * a descendant selector). - * - * If relative selectors are disabled, selectors starting with a traversal - * will lead to an error. - * - * @default true - * @see {@link https://www.w3.org/TR/selectors-4/#relative} - */ - relativeSelector?: boolean; - /** - * Allow css-select to cache results for some selectors, sometimes greatly - * improving querying performance. Disable this if your document can - * change in between queries with the same compiled selector. - * - * @default true - */ - cacheResults?: boolean; -} -export interface InternalOptions<Node, ElementNode extends Node> extends Options<Node, ElementNode> { - adapter: Adapter<Node, ElementNode>; - equals: (a: Node, b: Node) => boolean; -} -export interface CompiledQuery<ElementNode> { - (node: ElementNode): boolean; - shouldTestNextSiblings?: boolean; -} -export declare type Query<ElementNode> = string | CompiledQuery<ElementNode> | Selector[][]; -export declare type CompileToken<Node, ElementNode extends Node> = (token: InternalSelector[][], options: InternalOptions<Node, ElementNode>, context?: Node[] | Node) => CompiledQuery<ElementNode>; -//# sourceMappingURL=types.d.ts.map \ No newline at end of file diff --git a/node_modules/css-select/lib/types.d.ts.map b/node_modules/css-select/lib/types.d.ts.map deleted file mode 100644 index d14b18f..0000000 --- a/node_modules/css-select/lib/types.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"types.d.ts","sourceRoot":"https://raw.githubusercontent.com/fb55/css-select/0f0725a9dfeddd2fdb54eda9656cdbab5bbf6be6/src/","sources":["types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AAEzC,oBAAY,gBAAgB,GAAG,QAAQ,GAAG;IAAE,IAAI,EAAE,qBAAqB,CAAA;CAAE,CAAC;AAE1E,oBAAY,SAAS,CAAC,KAAK,IAAI,CAAC,CAAC,EAAE,KAAK,KAAK,OAAO,CAAC;AACrD,MAAM,WAAW,OAAO,CAAC,IAAI,EAAE,WAAW,SAAS,IAAI;IACnD;;OAEG;IACH,KAAK,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,IAAI,IAAI,WAAW,CAAC;IAE3C;;OAEG;IACH,SAAS,EAAE,CAAC,IAAI,EAAE,SAAS,CAAC,WAAW,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,OAAO,CAAC;IAEpE;;OAEG;IACH,iBAAiB,EA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W;IACtC,CAAC,IAAI,EAAE,WAAW,GAAG,OAAO,CAAC;IAC7B,sBAAsB,CAAC,EAAE,OAAO,CAAC;CACpC;AACD,oBAAY,KAAK,CAAC,WAAW,IACvB,MAAM,GACN,aAAa,CAAC,WAAW,CAAC,GAC1B,QAAQ,EAAE,EAAE,CAAC;AACnB,oBAAY,YAAY,CAAC,IAAI,EAAE,WAAW,SAAS,IAAI,IAAI,CACvD,KAAK,EAAE,gBAAgB,EAAE,EAAE,EAC3B,OAAO,EAAE,eAAe,CAAC,IAAI,EAAE,WAAW,CAAC,EAC3C,OAAO,CAAC,EAAE,IAAI,EAAE,GAAG,IAAI,KACtB,aAAa,CAAC,WAAW,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/css-select/lib/types.js b/node_modules/css-select/lib/types.js deleted file mode 100644 index 11e638d..0000000 --- a/node_modules/css-select/lib/types.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -//# sourceMappingURL=types.js.map \ No newline at end of file diff --git a/node_modules/css-select/lib/types.js.map b/node_modules/css-select/lib/types.js.map deleted file mode 100644 index d1bde2f..0000000 --- a/node_modules/css-select/lib/types.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"types.js","sourceRoot":"https://raw.githubusercontent.com/fb55/css-select/0f0725a9dfeddd2fdb54eda9656cdbab5bbf6be6/src/","sources":["types.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/node_modules/css-select/package.json b/node_modules/css-select/package.json deleted file mode 100644 index 6289eee..0000000 --- a/node_modules/css-select/package.json +++ /dev/null @@ -1,81 +0,0 @@ -{ - "name": "css-select", - "version": "5.1.0", - "description": "a CSS selector compiler/engine", - "author": "Felix Boehm <me@feedic.com>", - "funding": { - "url": "https://github.com/sponsors/fb55" - }, - "keywords": [ - "css", - "selector", - "sizzle" - ], - "repository": { - "type": "git", - "url": "git://github.com/fb55/css-select.git" - }, - "main": "lib/index.js", - "types": "lib/index.d.ts", - "module": "lib/esm/index.js", - "exports": { - "require": "./lib/index.js", - "import": "./lib/esm/index.js" - }, - "files": [ - "lib" - ], - "dependencies": { - "boolbase": "^1.0.0", - "css-what": "^6.1.0", - "domhandler": "^5.0.2", - "domutils": "^3.0.1", - "nth-check": "^2.0.1" - }, - "devDependencies": { - "@types/boolbase": "^1.0.1", - "@types/jest": "^27.4.1", - "@types/node": "^17.0.29", - "@typescript-eslint/eslint-plugin": "^5.21.0", - "@typescript-eslint/parser": "^5.21.0", - "cheerio-soupselect": "^0.1.1", - "eslint": "^8.14.0", - "eslint-config-prettier": "^8.5.0", - "htmlparser2": "^8.0.0", - "jest": "^27.5.1", - "prettier": "^2.6.2", - "ts-jest": "^27.1.4", - "typescript": "^4.6.3" - }, - "scripts": { - "test": "npm run test:jest && npm run lint", - "test:jest": "jest", - "lint": "npm run lint:es && npm run lint:prettier", - "lint:es": "eslint src", - "lint:prettier": "npm run prettier -- --check", - "format": "npm run format:es && npm run format:prettier", - "format:es": "npm run lint:es -- --fix", - "format:prettier": "npm run prettier -- --write", - "prettier": "prettier '**/*.{ts,md,json,yml}'", - "build": "npm run build:cjs && npm run build:esm", - "build:cjs": "tsc --sourceRoot https://raw.githubusercontent.com/fb55/css-select/$(git rev-parse HEAD)/src/", - "build:esm": "npm run build:cjs -- --module esnext --target es2019 --outDir lib/esm && echo '{\"type\":\"module\"}' > lib/esm/package.json", - "prepare": "npm run build" - }, - "license": "BSD-2-Clause", - "prettier": { - "tabWidth": 4, - "proseWrap": "always" - }, - "jest": { - "preset": "ts-jest", - "testEnvironment": "node", - "coverageProvider": "v8", - "moduleNameMapper": { - "^(.*)\\.js$": "$1" - }, - "testMatch": [ - "<rootDir>/test/*.ts" - ] - } -} diff --git a/node_modules/css-what/lib/commonjs/index.d.ts b/node_modules/css-what/lib/commonjs/index.d.ts deleted file mode 100644 index ee9d66e..0000000 --- a/node_modules/css-what/lib/commonjs/index.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -export * from "./types"; -export { isTraversal, parse } from "./parse"; -export { stringify } from "./stringify"; -//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/css-what/lib/commonjs/index.d.ts.map b/node_modules/css-what/lib/commonjs/index.d.ts.map deleted file mode 100644 index 8a428b6..0000000 --- a/node_modules/css-what/lib/commonjs/index.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,OAAO,EAAE,WAAW,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAC7C,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC"} \ No newline at end of file diff --git a/node_modules/css-what/lib/commonjs/index.js b/node_modules/css-what/lib/commonjs/index.js deleted file mode 100644 index 3a2058a..0000000 --- a/node_modules/css-what/lib/commonjs/index.js +++ /dev/null @@ -1,23 +0,0 @@ -"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.stringify = exports.parse = exports.isTraversal = void 0; -__exportStar(require("./types"), exports); -var parse_1 = require("./parse"); -Object.defineProperty(exports, "isTraversal", { enumerable: true, get: function () { return parse_1.isTraversal; } }); -Object.defineProperty(exports, "parse", { enumerable: true, get: function () { return parse_1.parse; } }); -var stringify_1 = require("./stringify"); -Object.defineProperty(exports, "stringify", { enumerable: true, get: function () { return stringify_1.stringify; } }); diff --git a/node_modules/css-what/lib/commonjs/parse.d.ts b/node_modules/css-what/lib/commonjs/parse.d.ts deleted file mode 100644 index 1d6e3a2..0000000 --- a/node_modules/css-what/lib/commonjs/parse.d.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { Selector, Traversal } from "./types"; -/** - * Checks whether a specific selector is a traversal. - * This is useful eg. in swapping the order of elements that - * are not traversals. - * - * @param selector Selector to check. - */ -export declare function isTraversal(selector: Selector): selector is Traversal; -/** - * Parses `selector`, optionally with the passed `options`. - * - * @param selector Selector to parse. - * @param options Options for parsing. - * @returns Returns a two-dimensional array. - * The first dimension represents selectors separated by commas (eg. `sub1, sub2`), - * the second contains the relevant tokens for that selector. - */ -export declare function parse(selector: string): Selector[][]; -//# sourceMappingURL=parse.d.ts.map \ No newline at end of file diff --git a/node_modules/css-what/lib/commonjs/parse.d.ts.map b/node_modules/css-what/lib/commonjs/parse.d.ts.map deleted file mode 100644 index e4a5b05..0000000 --- a/node_modules/css-what/lib/commonjs/parse.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"parse.d.ts","sourceRoot":"","sources":["../../src/parse.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,QAAQ,EAGR,SAAS,EAIZ,MAAM,SAAS,CAAC;AA6DjB;;;;;;GAMG;AACH,wBAAgB,WAAW,CAAC,QAAQ,EAAE,QAAQ,GAAG,QAAQ,IAAI,SAAS,CAYrE;AAoCD;;;;;;;;GAQG;AACH,wBAAgB,KAAK,CAAC,QAAQ,EAAE,MAAM,GAAG,QAAQ,EAAE,EAAE,CAUpD"} \ No newline at end of file diff --git a/node_modules/css-what/lib/commonjs/parse.js b/node_modules/css-what/lib/commonjs/parse.js deleted file mode 100644 index 708de67..0000000 --- a/node_modules/css-what/lib/commonjs/parse.js +++ /dev/null @@ -1,425 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.parse = exports.isTraversal = void 0; -var types_1 = require("./types"); -var reName = /^[^\\#]?(?:\\(?:[\da-f]{1,6}\s?|.)|[\w\-\u00b0-\uFFFF])+/; -var reEscape = /\\([\da-f]{1,6}\s?|(\s)|.)/gi; -var actionTypes = new Map([ - [126 /* Tilde */, types_1.AttributeAction.Element], - [94 /* Circumflex */, types_1.AttributeAction.Start], - [36 /* Dollar */, types_1.AttributeAction.End], - [42 /* Asterisk */, types_1.AttributeAction.Any], - [33 /* ExclamationMark */, types_1.AttributeAction.Not], - [124 /* Pipe */, types_1.AttributeAction.Hyphen], -]); -// Pseudos, whose data property is parsed as well. -var unpackPseudos = new Set([ - "has", - "not", - "matches", - "is", - "where", - "host", - "host-context", -]); -/** - * Checks whether a specific selector is a traversal. - * This is useful eg. in swapping the order of elements that - * are not traversals. - * - * @param selector Selector to check. - */ -function isTraversal(selector) { - switch (selector.type) { - case types_1.SelectorType.Adjacent: - case types_1.SelectorType.Child: - case types_1.SelectorType.Descendant: - case types_1.SelectorType.Parent: - case types_1.SelectorType.Sibling: - case types_1.SelectorType.ColumnCombinator: - return true; - default: - return false; - } -} -exports.isTraversal = isTraversal; -var stripQuotesFromPseudos = new Set(["contains", "icontains"]); -// Unescape function taken from https://github.com/jquery/sizzle/blob/master/src/sizzle.js#L152 -function funescape(_, escaped, escapedWhitespace) { - var high = parseInt(escaped, 16) - 0x10000; - // NaN means non-codepoint - return high !== high || escapedWhitespace - ? escaped - : high < 0 - ? // BMP codepoint - String.fromCharCode(high + 0x10000) - : // Supplemental Plane codepoint (surrogate pair) - String.fromCharCode((high >> 10) | 0xd800, (high & 0x3ff) | 0xdc00); -} -function unescapeCSS(str) { - return str.replace(reEscape, funescape); -} -function isQuote(c) { - return c === 39 /* SingleQuote */ || c === 34 /* DoubleQuote */; -} -function isWhitespace(c) { - return (c === 32 /* Space */ || - c === 9 /* Tab */ || - c === 10 /* NewLine */ || - c === 12 /* FormFeed */ || - c === 13 /* CarriageReturn */); -} -/** - * Parses `selector`, optionally with the passed `options`. - * - * @param selector Selector to parse. - * @param options Options for parsing. - * @returns Returns a two-dimensional array. - * The first dimension represents selectors separated by commas (eg. `sub1, sub2`), - * the second contains the relevant tokens for that selector. - */ -function parse(selector) { - var subselects = []; - var endIndex = parseSelector(subselects, "".concat(selector), 0); - if (endIndex < selector.length) { - throw new Error("Unmatched selector: ".concat(selector.slice(endIndex))); - } - return subselects; -} -exports.parse = parse; -function parseSelector(subselects, selector, selectorIndex) { - var tokens = []; - function getName(offset) { - var match = selector.slice(selectorIndex + offset).match(reName); - if (!match) { - throw new Error("Expected name, found ".concat(selector.slice(selectorIndex))); - } - var name = match[0]; - selectorIndex += offset + name.length; - return unescapeCSS(name); - } - function stripWhitespace(offset) { - selectorIndex += offset; - while (selectorIndex < selector.length && - isWhitespace(selector.charCodeAt(selectorIndex))) { - selectorIndex++; - } - } - function readValueWithParenthesis() { - selectorIndex += 1; - var start = selectorIndex; - var counter = 1; - for (; counter > 0 && selectorIndex < selector.length; selectorIndex++) { - if (selector.charCodeAt(selectorIndex) === - 40 /* LeftParenthesis */ && - !isEscaped(selectorIndex)) { - counter++; - } - else if (selector.charCodeAt(selectorIndex) === - 41 /* RightParenthesis */ && - !isEscaped(selectorIndex)) { - counter--; - } - } - if (counter) { - throw new Error("Parenthesis not matched"); - } - return unescapeCSS(selector.slice(start, selectorIndex - 1)); - } - function isEscaped(pos) { - var slashCount = 0; - while (selector.charCodeAt(--pos) === 92 /* BackSlash */) - slashCount++; - return (slashCount & 1) === 1; - } - function ensureNotTraversal() { - if (tokens.length > 0 && isTraversal(tokens[tokens.length - 1])) { - throw new Error("Did not expect successive traversals."); - } - } - function addTraversal(type) { - if (tokens.length > 0 && - tokens[tokens.length - 1].type === types_1.SelectorType.Descendant) { - tokens[tokens.length - 1].type = type; - return; - } - ensureNotTraversal(); - tokens.push({ type: type }); - } - function addSpecialAttribute(name, action) { - tokens.push({ - type: types_1.SelectorType.Attribute, - name: name, - action: action, - value: getName(1), - namespace: null, - ignoreCase: "quirks", - }); - } - /** - * We have finished parsing the current part of the selector. - * - * Remove descendant tokens at the end if they exist, - * and return the last index, so that parsing can be - * picked up from here. - */ - function finalizeSubselector() { - if (tokens.length && - tokens[tokens.length - 1].type === types_1.SelectorType.Descendant) { - tokens.pop(); - } - if (tokens.length === 0) { - throw new Error("Empty sub-selector"); - } - subselects.push(tokens); - } - stripWhitespace(0); - if (selector.length === selectorIndex) { - return selectorIndex; - } - loop: while (selectorIndex < selector.length) { - var firstChar = selector.charCodeAt(selectorIndex); - switch (firstChar) { - // Whitespace - case 32 /* Space */: - case 9 /* Tab */: - case 10 /* NewLine */: - case 12 /* FormFeed */: - case 13 /* CarriageReturn */: { - if (tokens.length === 0 || - tokens[0].type !== types_1.SelectorType.Descendant) { - ensureNotTraversal(); - tokens.push({ type: types_1.SelectorType.Descendant }); - } - stripWhitespace(1); - break; - } - // Traversals - case 62 /* GreaterThan */: { - addTraversal(types_1.SelectorType.Child); - stripWhitespace(1); - break; - } - case 60 /* LessThan */: { - addTraversal(types_1.SelectorType.Parent); - stripWhitespace(1); - break; - } - case 126 /* Tilde */: { - addTraversal(types_1.SelectorType.Sibling); - stripWhitespace(1); - break; - } - case 43 /* Plus */: { - addTraversal(types_1.SelectorType.Adjacent); - stripWhitespace(1); - break; - } - // Special attribute selectors: .class, #id - case 46 /* Period */: { - addSpecialAttribute("class", types_1.AttributeAction.Element); - break; - } - case 35 /* Hash */: { - addSpecialAttribute("id", types_1.AttributeAction.Equals); - break; - } - case 91 /* LeftSquareBracket */: { - stripWhitespace(1); - // Determine attribute name and namespace - var name_1 = void 0; - var namespace = null; - if (selector.charCodeAt(selectorIndex) === 124 /* Pipe */) { - // Equivalent to no namespace - name_1 = getName(1); - } - else if (selector.startsWith("*|", selectorIndex)) { - namespace = "*"; - name_1 = getName(2); - } - else { - name_1 = getName(0); - if (selector.charCodeAt(selectorIndex) === 124 /* Pipe */ && - selector.charCodeAt(selectorIndex + 1) !== - 61 /* Equal */) { - namespace = name_1; - name_1 = getName(1); - } - } - stripWhitespace(0); - // Determine comparison operation - var action = types_1.AttributeAction.Exists; - var possibleAction = actionTypes.get(selector.charCodeAt(selectorIndex)); - if (possibleAction) { - action = possibleAction; - if (selector.charCodeAt(selectorIndex + 1) !== - 61 /* Equal */) { - throw new Error("Expected `=`"); - } - stripWhitespace(2); - } - else if (selector.charCodeAt(selectorIndex) === 61 /* Equal */) { - action = types_1.AttributeAction.Equals; - stripWhitespace(1); - } - // Determine value - var value = ""; - var ignoreCase = null; - if (action !== "exists") { - if (isQuote(selector.charCodeAt(selectorIndex))) { - var quote = selector.charCodeAt(selectorIndex); - var sectionEnd = selectorIndex + 1; - while (sectionEnd < selector.length && - (selector.charCodeAt(sectionEnd) !== quote || - isEscaped(sectionEnd))) { - sectionEnd += 1; - } - if (selector.charCodeAt(sectionEnd) !== quote) { - throw new Error("Attribute value didn't end"); - } - value = unescapeCSS(selector.slice(selectorIndex + 1, sectionEnd)); - selectorIndex = sectionEnd + 1; - } - else { - var valueStart = selectorIndex; - while (selectorIndex < selector.length && - ((!isWhitespace(selector.charCodeAt(selectorIndex)) && - selector.charCodeAt(selectorIndex) !== - 93 /* RightSquareBracket */) || - isEscaped(selectorIndex))) { - selectorIndex += 1; - } - value = unescapeCSS(selector.slice(valueStart, selectorIndex)); - } - stripWhitespace(0); - // See if we have a force ignore flag - var forceIgnore = selector.charCodeAt(selectorIndex) | 0x20; - // If the forceIgnore flag is set (either `i` or `s`), use that value - if (forceIgnore === 115 /* LowerS */) { - ignoreCase = false; - stripWhitespace(1); - } - else if (forceIgnore === 105 /* LowerI */) { - ignoreCase = true; - stripWhitespace(1); - } - } - if (selector.charCodeAt(selectorIndex) !== - 93 /* RightSquareBracket */) { - throw new Error("Attribute selector didn't terminate"); - } - selectorIndex += 1; - var attributeSelector = { - type: types_1.SelectorType.Attribute, - name: name_1, - action: action, - value: value, - namespace: namespace, - ignoreCase: ignoreCase, - }; - tokens.push(attributeSelector); - break; - } - case 58 /* Colon */: { - if (selector.charCodeAt(selectorIndex + 1) === 58 /* Colon */) { - tokens.push({ - type: types_1.SelectorType.PseudoElement, - name: getName(2).toLowerCase(), - data: selector.charCodeAt(selectorIndex) === - 40 /* LeftParenthesis */ - ? readValueWithParenthesis() - : null, - }); - continue; - } - var name_2 = getName(1).toLowerCase(); - var data = null; - if (selector.charCodeAt(selectorIndex) === - 40 /* LeftParenthesis */) { - if (unpackPseudos.has(name_2)) { - if (isQuote(selector.charCodeAt(selectorIndex + 1))) { - throw new Error("Pseudo-selector ".concat(name_2, " cannot be quoted")); - } - data = []; - selectorIndex = parseSelector(data, selector, selectorIndex + 1); - if (selector.charCodeAt(selectorIndex) !== - 41 /* RightParenthesis */) { - throw new Error("Missing closing parenthesis in :".concat(name_2, " (").concat(selector, ")")); - } - selectorIndex += 1; - } - else { - data = readValueWithParenthesis(); - if (stripQuotesFromPseudos.has(name_2)) { - var quot = data.charCodeAt(0); - if (quot === data.charCodeAt(data.length - 1) && - isQuote(quot)) { - data = data.slice(1, -1); - } - } - data = unescapeCSS(data); - } - } - tokens.push({ type: types_1.SelectorType.Pseudo, name: name_2, data: data }); - break; - } - case 44 /* Comma */: { - finalizeSubselector(); - tokens = []; - stripWhitespace(1); - break; - } - default: { - if (selector.startsWith("/*", selectorIndex)) { - var endIndex = selector.indexOf("*/", selectorIndex + 2); - if (endIndex < 0) { - throw new Error("Comment was not terminated"); - } - selectorIndex = endIndex + 2; - // Remove leading whitespace - if (tokens.length === 0) { - stripWhitespace(0); - } - break; - } - var namespace = null; - var name_3 = void 0; - if (firstChar === 42 /* Asterisk */) { - selectorIndex += 1; - name_3 = "*"; - } - else if (firstChar === 124 /* Pipe */) { - name_3 = ""; - if (selector.charCodeAt(selectorIndex + 1) === 124 /* Pipe */) { - addTraversal(types_1.SelectorType.ColumnCombinator); - stripWhitespace(2); - break; - } - } - else if (reName.test(selector.slice(selectorIndex))) { - name_3 = getName(0); - } - else { - break loop; - } - if (selector.charCodeAt(selectorIndex) === 124 /* Pipe */ && - selector.charCodeAt(selectorIndex + 1) !== 124 /* Pipe */) { - namespace = name_3; - if (selector.charCodeAt(selectorIndex + 1) === - 42 /* Asterisk */) { - name_3 = "*"; - selectorIndex += 2; - } - else { - name_3 = getName(1); - } - } - tokens.push(name_3 === "*" - ? { type: types_1.SelectorType.Universal, namespace: namespace } - : { type: types_1.SelectorType.Tag, name: name_3, namespace: namespace }); - } - } - } - finalizeSubselector(); - return selectorIndex; -} diff --git a/node_modules/css-what/lib/commonjs/stringify.d.ts b/node_modules/css-what/lib/commonjs/stringify.d.ts deleted file mode 100644 index 2883b0c..0000000 --- a/node_modules/css-what/lib/commonjs/stringify.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { Selector } from "./types"; -/** - * Turns `selector` back into a string. - * - * @param selector Selector to stringify. - */ -export declare function stringify(selector: Selector[][]): string; -//# sourceMappingURL=stringify.d.ts.map \ No newline at end of file diff --git a/node_modules/css-what/lib/commonjs/stringify.d.ts.map b/node_modules/css-what/lib/commonjs/stringify.d.ts.map deleted file mode 100644 index 98f99ca..0000000 --- a/node_modules/css-what/lib/commonjs/stringify.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"stringify.d.ts","sourceRoot":"","sources":["../../src/stringify.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAiC,MAAM,SAAS,CAAC;AA6BlE;;;;GAIG;AACH,wBAAgB,SAAS,CAAC,QAAQ,EAAE,QAAQ,EAAE,EAAE,GAAG,MAAM,CAIxD"} \ No newline at end of file diff --git a/node_modules/css-what/lib/commonjs/stringify.js b/node_modules/css-what/lib/commonjs/stringify.js deleted file mode 100644 index 158b180..0000000 --- a/node_modules/css-what/lib/commonjs/stringify.js +++ /dev/null @@ -1,138 +0,0 @@ -"use strict"; -var __spreadArray = (this && this.__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)); -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.stringify = void 0; -var types_1 = require("./types"); -var attribValChars = ["\\", '"']; -var pseudoValChars = __spreadArray(__spreadArray([], attribValChars, true), ["(", ")"], false); -var charsToEscapeInAttributeValue = new Set(attribValChars.map(function (c) { return c.charCodeAt(0); })); -var charsToEscapeInPseudoValue = new Set(pseudoValChars.map(function (c) { return c.charCodeAt(0); })); -var charsToEscapeInName = new Set(__spreadArray(__spreadArray([], pseudoValChars, true), [ - "~", - "^", - "$", - "*", - "+", - "!", - "|", - ":", - "[", - "]", - " ", - ".", -], false).map(function (c) { return c.charCodeAt(0); })); -/** - * Turns `selector` back into a string. - * - * @param selector Selector to stringify. - */ -function stringify(selector) { - return selector - .map(function (token) { return token.map(stringifyToken).join(""); }) - .join(", "); -} -exports.stringify = stringify; -function stringifyToken(token, index, arr) { - switch (token.type) { - // Simple types - case types_1.SelectorType.Child: - return index === 0 ? "> " : " > "; - case types_1.SelectorType.Parent: - return index === 0 ? "< " : " < "; - case types_1.SelectorType.Sibling: - return index === 0 ? "~ " : " ~ "; - case types_1.SelectorType.Adjacent: - return index === 0 ? "+ " : " + "; - case types_1.SelectorType.Descendant: - return " "; - case types_1.SelectorType.ColumnCombinator: - return index === 0 ? "|| " : " || "; - case types_1.SelectorType.Universal: - // Return an empty string if the selector isn't needed. - return token.namespace === "*" && - index + 1 < arr.length && - "name" in arr[index + 1] - ? "" - : "".concat(getNamespace(token.namespace), "*"); - case types_1.SelectorType.Tag: - return getNamespacedName(token); - case types_1.SelectorType.PseudoElement: - return "::".concat(escapeName(token.name, charsToEscapeInName)).concat(token.data === null - ? "" - : "(".concat(escapeName(token.data, charsToEscapeInPseudoValue), ")")); - case types_1.SelectorType.Pseudo: - return ":".concat(escapeName(token.name, charsToEscapeInName)).concat(token.data === null - ? "" - : "(".concat(typeof token.data === "string" - ? escapeName(token.data, charsToEscapeInPseudoValue) - : stringify(token.data), ")")); - case types_1.SelectorType.Attribute: { - if (token.name === "id" && - token.action === types_1.AttributeAction.Equals && - token.ignoreCase === "quirks" && - !token.namespace) { - return "#".concat(escapeName(token.value, charsToEscapeInName)); - } - if (token.name === "class" && - token.action === types_1.AttributeAction.Element && - token.ignoreCase === "quirks" && - !token.namespace) { - return ".".concat(escapeName(token.value, charsToEscapeInName)); - } - var name_1 = getNamespacedName(token); - if (token.action === types_1.AttributeAction.Exists) { - return "[".concat(name_1, "]"); - } - return "[".concat(name_1).concat(getActionValue(token.action), "=\"").concat(escapeName(token.value, charsToEscapeInAttributeValue), "\"").concat(token.ignoreCase === null ? "" : token.ignoreCase ? " i" : " s", "]"); - } - } -} -function getActionValue(action) { - switch (action) { - case types_1.AttributeAction.Equals: - return ""; - case types_1.AttributeAction.Element: - return "~"; - case types_1.AttributeAction.Start: - return "^"; - case types_1.AttributeAction.End: - return "$"; - case types_1.AttributeAction.Any: - return "*"; - case types_1.AttributeAction.Not: - return "!"; - case types_1.AttributeAction.Hyphen: - return "|"; - case types_1.AttributeAction.Exists: - throw new Error("Shouldn't be here"); - } -} -function getNamespacedName(token) { - return "".concat(getNamespace(token.namespace)).concat(escapeName(token.name, charsToEscapeInName)); -} -function getNamespace(namespace) { - return namespace !== null - ? "".concat(namespace === "*" - ? "*" - : escapeName(namespace, charsToEscapeInName), "|") - : ""; -} -function escapeName(str, charsToEscape) { - var lastIdx = 0; - var ret = ""; - for (var i = 0; i < str.length; i++) { - if (charsToEscape.has(str.charCodeAt(i))) { - ret += "".concat(str.slice(lastIdx, i), "\\").concat(str.charAt(i)); - lastIdx = i + 1; - } - } - return ret.length > 0 ? ret + str.slice(lastIdx) : str; -} diff --git a/node_modules/css-what/lib/commonjs/types.d.ts b/node_modules/css-what/lib/commonjs/types.d.ts deleted file mode 100644 index 6eedca4..0000000 --- a/node_modules/css-what/lib/commonjs/types.d.ts +++ /dev/null @@ -1,70 +0,0 @@ -export declare type Selector = PseudoSelector | PseudoElement | AttributeSelector | TagSelector | UniversalSelector | Traversal; -export declare enum SelectorType { - Attribute = "attribute", - Pseudo = "pseudo", - PseudoElement = "pseudo-element", - Tag = "tag", - Universal = "universal", - Adjacent = "adjacent", - Child = "child", - Descendant = "descendant", - Parent = "parent", - Sibling = "sibling", - ColumnCombinator = "column-combinator" -} -/** - * Modes for ignore case. - * - * This could be updated to an enum, and the object is - * the current stand-in that will allow code to be updated - * without big changes. - */ -export declare const IgnoreCaseMode: { - readonly Unknown: null; - readonly QuirksMode: "quirks"; - readonly IgnoreCase: true; - readonly CaseSensitive: false; -}; -export interface AttributeSelector { - type: SelectorType.Attribute; - name: string; - action: AttributeAction; - value: string; - ignoreCase: "quirks" | boolean | null; - namespace: string | null; -} -export declare type DataType = Selector[][] | null | string; -export interface PseudoSelector { - type: SelectorType.Pseudo; - name: string; - data: DataType; -} -export interface PseudoElement { - type: SelectorType.PseudoElement; - name: string; - data: string | null; -} -export interface TagSelector { - type: SelectorType.Tag; - name: string; - namespace: string | null; -} -export interface UniversalSelector { - type: SelectorType.Universal; - namespace: string | null; -} -export interface Traversal { - type: TraversalType; -} -export declare enum AttributeAction { - Any = "any", - Element = "element", - End = "end", - Equals = "equals", - Exists = "exists", - Hyphen = "hyphen", - Not = "not", - Start = "start" -} -export declare type TraversalType = SelectorType.Adjacent | SelectorType.Child | SelectorType.Descendant | SelectorType.Parent | SelectorType.Sibling | SelectorType.ColumnCombinator; -//# sourceMappingURL=types.d.ts.map \ No newline at end of file diff --git a/node_modules/css-what/lib/commonjs/types.d.ts.map b/node_modules/css-what/lib/commonjs/types.d.ts.map deleted file mode 100644 index 5759e96..0000000 --- a/node_modules/css-what/lib/commonjs/types.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"AAAA,oBAAY,QAAQ,GACd,cAAc,GACd,aAAa,GACb,iBAAiB,GACjB,WAAW,GACX,iBAAiB,GACjB,SAAS,CAAC;AAEhB,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Y,eAAe;IACvB,GAAG,QAAQ;IACX,OAAO,YAAY;IACnB,GAAG,QAAQ;IACX,MAAM,WAAW;IACjB,MAAM,WAAW;IACjB,MAAM,WAAW;IACjB,GAAG,QAAQ;IACX,KAAK,UAAU;CAClB;AAED,oBAAY,aAAa,GACnB,YAAY,CAAC,QAAQ,GACrB,YAAY,CAAC,KAAK,GAClB,YAAY,CAAC,UAAU,GACvB,YAAY,CAAC,MAAM,GACnB,YAAY,CAAC,OAAO,GACpB,YAAY,CAAC,gBAAgB,CAAC"} \ No newline at end of file diff --git a/node_modules/css-what/lib/commonjs/types.js b/node_modules/css-what/lib/commonjs/types.js deleted file mode 100644 index 9ad7467..0000000 --- a/node_modules/css-what/lib/commonjs/types.js +++ /dev/null @@ -1,42 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.AttributeAction = exports.IgnoreCaseMode = exports.SelectorType = void 0; -var SelectorType; -(function (SelectorType) { - SelectorType["Attribute"] = "attribute"; - SelectorType["Pseudo"] = "pseudo"; - SelectorType["PseudoElement"] = "pseudo-element"; - SelectorType["Tag"] = "tag"; - SelectorType["Universal"] = "universal"; - // Traversals - SelectorType["Adjacent"] = "adjacent"; - SelectorType["Child"] = "child"; - SelectorType["Descendant"] = "descendant"; - SelectorType["Parent"] = "parent"; - SelectorType["Sibling"] = "sibling"; - SelectorType["ColumnCombinator"] = "column-combinator"; -})(SelectorType = exports.SelectorType || (exports.SelectorType = {})); -/** - * Modes for ignore case. - * - * This could be updated to an enum, and the object is - * the current stand-in that will allow code to be updated - * without big changes. - */ -exports.IgnoreCaseMode = { - Unknown: null, - QuirksMode: "quirks", - IgnoreCase: true, - CaseSensitive: false, -}; -var AttributeAction; -(function (AttributeAction) { - AttributeAction["Any"] = "any"; - AttributeAction["Element"] = "element"; - AttributeAction["End"] = "end"; - AttributeAction["Equals"] = "equals"; - AttributeAction["Exists"] = "exists"; - AttributeAction["Hyphen"] = "hyphen"; - AttributeAction["Not"] = "not"; - AttributeAction["Start"] = "start"; -})(AttributeAction = exports.AttributeAction || (exports.AttributeAction = {})); diff --git a/node_modules/css-what/lib/es/index.d.ts b/node_modules/css-what/lib/es/index.d.ts deleted file mode 100644 index ee9d66e..0000000 --- a/node_modules/css-what/lib/es/index.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -export * from "./types"; -export { isTraversal, parse } from "./parse"; -export { stringify } from "./stringify"; -//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/css-what/lib/es/index.d.ts.map b/node_modules/css-what/lib/es/index.d.ts.map deleted file mode 100644 index 8a428b6..0000000 --- a/node_modules/css-what/lib/es/index.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,OAAO,EAAE,WAAW,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAC7C,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC"} \ No newline at end of file diff --git a/node_modules/css-what/lib/es/index.js b/node_modules/css-what/lib/es/index.js deleted file mode 100644 index 1cf4a53..0000000 --- a/node_modules/css-what/lib/es/index.js +++ /dev/null @@ -1,3 +0,0 @@ -export * from "./types"; -export { isTraversal, parse } from "./parse"; -export { stringify } from "./stringify"; diff --git a/node_modules/css-what/lib/es/parse.d.ts b/node_modules/css-what/lib/es/parse.d.ts deleted file mode 100644 index 1d6e3a2..0000000 --- a/node_modules/css-what/lib/es/parse.d.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { Selector, Traversal } from "./types"; -/** - * Checks whether a specific selector is a traversal. - * This is useful eg. in swapping the order of elements that - * are not traversals. - * - * @param selector Selector to check. - */ -export declare function isTraversal(selector: Selector): selector is Traversal; -/** - * Parses `selector`, optionally with the passed `options`. - * - * @param selector Selector to parse. - * @param options Options for parsing. - * @returns Returns a two-dimensional array. - * The first dimension represents selectors separated by commas (eg. `sub1, sub2`), - * the second contains the relevant tokens for that selector. - */ -export declare function parse(selector: string): Selector[][]; -//# sourceMappingURL=parse.d.ts.map \ No newline at end of file diff --git a/node_modules/css-what/lib/es/parse.d.ts.map b/node_modules/css-what/lib/es/parse.d.ts.map deleted file mode 100644 index e4a5b05..0000000 --- a/node_modules/css-what/lib/es/parse.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"parse.d.ts","sourceRoot":"","sources":["../../src/parse.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,QAAQ,EAGR,SAAS,EAIZ,MAAM,SAAS,CAAC;AA6DjB;;;;;;GAMG;AACH,wBAAgB,WAAW,CAAC,QAAQ,EAAE,QAAQ,GAAG,QAAQ,IAAI,SAAS,CAYrE;AAoCD;;;;;;;;GAQG;AACH,wBAAgB,KAAK,CAAC,QAAQ,EAAE,MAAM,GAAG,QAAQ,EAAE,EAAE,CAUpD"} \ No newline at end of file diff --git a/node_modules/css-what/lib/es/parse.js b/node_modules/css-what/lib/es/parse.js deleted file mode 100644 index fe6ea9a..0000000 --- a/node_modules/css-what/lib/es/parse.js +++ /dev/null @@ -1,420 +0,0 @@ -import { SelectorType, AttributeAction, } from "./types"; -const reName = /^[^\\#]?(?:\\(?:[\da-f]{1,6}\s?|.)|[\w\-\u00b0-\uFFFF])+/; -const reEscape = /\\([\da-f]{1,6}\s?|(\s)|.)/gi; -const actionTypes = new Map([ - [126 /* Tilde */, AttributeAction.Element], - [94 /* Circumflex */, AttributeAction.Start], - [36 /* Dollar */, AttributeAction.End], - [42 /* Asterisk */, AttributeAction.Any], - [33 /* ExclamationMark */, AttributeAction.Not], - [124 /* Pipe */, AttributeAction.Hyphen], -]); -// Pseudos, whose data property is parsed as well. -const unpackPseudos = new Set([ - "has", - "not", - "matches", - "is", - "where", - "host", - "host-context", -]); -/** - * Checks whether a specific selector is a traversal. - * This is useful eg. in swapping the order of elements that - * are not traversals. - * - * @param selector Selector to check. - */ -export function isTraversal(selector) { - switch (selector.type) { - case SelectorType.Adjacent: - case SelectorType.Child: - case SelectorType.Descendant: - case SelectorType.Parent: - case SelectorType.Sibling: - case SelectorType.ColumnCombinator: - return true; - default: - return false; - } -} -const stripQuotesFromPseudos = new Set(["contains", "icontains"]); -// Unescape function taken from https://github.com/jquery/sizzle/blob/master/src/sizzle.js#L152 -function funescape(_, escaped, escapedWhitespace) { - const high = parseInt(escaped, 16) - 0x10000; - // NaN means non-codepoint - return high !== high || escapedWhitespace - ? escaped - : high < 0 - ? // BMP codepoint - String.fromCharCode(high + 0x10000) - : // Supplemental Plane codepoint (surrogate pair) - String.fromCharCode((high >> 10) | 0xd800, (high & 0x3ff) | 0xdc00); -} -function unescapeCSS(str) { - return str.replace(reEscape, funescape); -} -function isQuote(c) { - return c === 39 /* SingleQuote */ || c === 34 /* DoubleQuote */; -} -function isWhitespace(c) { - return (c === 32 /* Space */ || - c === 9 /* Tab */ || - c === 10 /* NewLine */ || - c === 12 /* FormFeed */ || - c === 13 /* CarriageReturn */); -} -/** - * Parses `selector`, optionally with the passed `options`. - * - * @param selector Selector to parse. - * @param options Options for parsing. - * @returns Returns a two-dimensional array. - * The first dimension represents selectors separated by commas (eg. `sub1, sub2`), - * the second contains the relevant tokens for that selector. - */ -export function parse(selector) { - const subselects = []; - const endIndex = parseSelector(subselects, `${selector}`, 0); - if (endIndex < selector.length) { - throw new Error(`Unmatched selector: ${selector.slice(endIndex)}`); - } - return subselects; -} -function parseSelector(subselects, selector, selectorIndex) { - let tokens = []; - function getName(offset) { - const match = selector.slice(selectorIndex + offset).match(reName); - if (!match) { - throw new Error(`Expected name, found ${selector.slice(selectorIndex)}`); - } - const [name] = match; - selectorIndex += offset + name.length; - return unescapeCSS(name); - } - function stripWhitespace(offset) { - selectorIndex += offset; - while (selectorIndex < selector.length && - isWhitespace(selector.charCodeAt(selectorIndex))) { - selectorIndex++; - } - } - function readValueWithParenthesis() { - selectorIndex += 1; - const start = selectorIndex; - let counter = 1; - for (; counter > 0 && selectorIndex < selector.length; selectorIndex++) { - if (selector.charCodeAt(selectorIndex) === - 40 /* LeftParenthesis */ && - !isEscaped(selectorIndex)) { - counter++; - } - else if (selector.charCodeAt(selectorIndex) === - 41 /* RightParenthesis */ && - !isEscaped(selectorIndex)) { - counter--; - } - } - if (counter) { - throw new Error("Parenthesis not matched"); - } - return unescapeCSS(selector.slice(start, selectorIndex - 1)); - } - function isEscaped(pos) { - let slashCount = 0; - while (selector.charCodeAt(--pos) === 92 /* BackSlash */) - slashCount++; - return (slashCount & 1) === 1; - } - function ensureNotTraversal() { - if (tokens.length > 0 && isTraversal(tokens[tokens.length - 1])) { - throw new Error("Did not expect successive traversals."); - } - } - function addTraversal(type) { - if (tokens.length > 0 && - tokens[tokens.length - 1].type === SelectorType.Descendant) { - tokens[tokens.length - 1].type = type; - return; - } - ensureNotTraversal(); - tokens.push({ type }); - } - function addSpecialAttribute(name, action) { - tokens.push({ - type: SelectorType.Attribute, - name, - action, - value: getName(1), - namespace: null, - ignoreCase: "quirks", - }); - } - /** - * We have finished parsing the current part of the selector. - * - * Remove descendant tokens at the end if they exist, - * and return the last index, so that parsing can be - * picked up from here. - */ - function finalizeSubselector() { - if (tokens.length && - tokens[tokens.length - 1].type === SelectorType.Descendant) { - tokens.pop(); - } - if (tokens.length === 0) { - throw new Error("Empty sub-selector"); - } - subselects.push(tokens); - } - stripWhitespace(0); - if (selector.length === selectorIndex) { - return selectorIndex; - } - loop: while (selectorIndex < selector.length) { - const firstChar = selector.charCodeAt(selectorIndex); - switch (firstChar) { - // Whitespace - case 32 /* Space */: - case 9 /* Tab */: - case 10 /* NewLine */: - case 12 /* FormFeed */: - case 13 /* CarriageReturn */: { - if (tokens.length === 0 || - tokens[0].type !== SelectorType.Descendant) { - ensureNotTraversal(); - tokens.push({ type: SelectorType.Descendant }); - } - stripWhitespace(1); - break; - } - // Traversals - case 62 /* GreaterThan */: { - addTraversal(SelectorType.Child); - stripWhitespace(1); - break; - } - case 60 /* LessThan */: { - addTraversal(SelectorType.Parent); - stripWhitespace(1); - break; - } - case 126 /* Tilde */: { - addTraversal(SelectorType.Sibling); - stripWhitespace(1); - break; - } - case 43 /* Plus */: { - addTraversal(SelectorType.Adjacent); - stripWhitespace(1); - break; - } - // Special attribute selectors: .class, #id - case 46 /* Period */: { - addSpecialAttribute("class", AttributeAction.Element); - break; - } - case 35 /* Hash */: { - addSpecialAttribute("id", AttributeAction.Equals); - break; - } - case 91 /* LeftSquareBracket */: { - stripWhitespace(1); - // Determine attribute name and namespace - let name; - let namespace = null; - if (selector.charCodeAt(selectorIndex) === 124 /* Pipe */) { - // Equivalent to no namespace - name = getName(1); - } - else if (selector.startsWith("*|", selectorIndex)) { - namespace = "*"; - name = getName(2); - } - else { - name = getName(0); - if (selector.charCodeAt(selectorIndex) === 124 /* Pipe */ && - selector.charCodeAt(selectorIndex + 1) !== - 61 /* Equal */) { - namespace = name; - name = getName(1); - } - } - stripWhitespace(0); - // Determine comparison operation - let action = AttributeAction.Exists; - const possibleAction = actionTypes.get(selector.charCodeAt(selectorIndex)); - if (possibleAction) { - action = possibleAction; - if (selector.charCodeAt(selectorIndex + 1) !== - 61 /* Equal */) { - throw new Error("Expected `=`"); - } - stripWhitespace(2); - } - else if (selector.charCodeAt(selectorIndex) === 61 /* Equal */) { - action = AttributeAction.Equals; - stripWhitespace(1); - } - // Determine value - let value = ""; - let ignoreCase = null; - if (action !== "exists") { - if (isQuote(selector.charCodeAt(selectorIndex))) { - const quote = selector.charCodeAt(selectorIndex); - let sectionEnd = selectorIndex + 1; - while (sectionEnd < selector.length && - (selector.charCodeAt(sectionEnd) !== quote || - isEscaped(sectionEnd))) { - sectionEnd += 1; - } - if (selector.charCodeAt(sectionEnd) !== quote) { - throw new Error("Attribute value didn't end"); - } - value = unescapeCSS(selector.slice(selectorIndex + 1, sectionEnd)); - selectorIndex = sectionEnd + 1; - } - else { - const valueStart = selectorIndex; - while (selectorIndex < selector.length && - ((!isWhitespace(selector.charCodeAt(selectorIndex)) && - selector.charCodeAt(selectorIndex) !== - 93 /* RightSquareBracket */) || - isEscaped(selectorIndex))) { - selectorIndex += 1; - } - value = unescapeCSS(selector.slice(valueStart, selectorIndex)); - } - stripWhitespace(0); - // See if we have a force ignore flag - const forceIgnore = selector.charCodeAt(selectorIndex) | 0x20; - // If the forceIgnore flag is set (either `i` or `s`), use that value - if (forceIgnore === 115 /* LowerS */) { - ignoreCase = false; - stripWhitespace(1); - } - else if (forceIgnore === 105 /* LowerI */) { - ignoreCase = true; - stripWhitespace(1); - } - } - if (selector.charCodeAt(selectorIndex) !== - 93 /* RightSquareBracket */) { - throw new Error("Attribute selector didn't terminate"); - } - selectorIndex += 1; - const attributeSelector = { - type: SelectorType.Attribute, - name, - action, - value, - namespace, - ignoreCase, - }; - tokens.push(attributeSelector); - break; - } - case 58 /* Colon */: { - if (selector.charCodeAt(selectorIndex + 1) === 58 /* Colon */) { - tokens.push({ - type: SelectorType.PseudoElement, - name: getName(2).toLowerCase(), - data: selector.charCodeAt(selectorIndex) === - 40 /* LeftParenthesis */ - ? readValueWithParenthesis() - : null, - }); - continue; - } - const name = getName(1).toLowerCase(); - let data = null; - if (selector.charCodeAt(selectorIndex) === - 40 /* LeftParenthesis */) { - if (unpackPseudos.has(name)) { - if (isQuote(selector.charCodeAt(selectorIndex + 1))) { - throw new Error(`Pseudo-selector ${name} cannot be quoted`); - } - data = []; - selectorIndex = parseSelector(data, selector, selectorIndex + 1); - if (selector.charCodeAt(selectorIndex) !== - 41 /* RightParenthesis */) { - throw new Error(`Missing closing parenthesis in :${name} (${selector})`); - } - selectorIndex += 1; - } - else { - data = readValueWithParenthesis(); - if (stripQuotesFromPseudos.has(name)) { - const quot = data.charCodeAt(0); - if (quot === data.charCodeAt(data.length - 1) && - isQuote(quot)) { - data = data.slice(1, -1); - } - } - data = unescapeCSS(data); - } - } - tokens.push({ type: SelectorType.Pseudo, name, data }); - break; - } - case 44 /* Comma */: { - finalizeSubselector(); - tokens = []; - stripWhitespace(1); - break; - } - default: { - if (selector.startsWith("/*", selectorIndex)) { - const endIndex = selector.indexOf("*/", selectorIndex + 2); - if (endIndex < 0) { - throw new Error("Comment was not terminated"); - } - selectorIndex = endIndex + 2; - // Remove leading whitespace - if (tokens.length === 0) { - stripWhitespace(0); - } - break; - } - let namespace = null; - let name; - if (firstChar === 42 /* Asterisk */) { - selectorIndex += 1; - name = "*"; - } - else if (firstChar === 124 /* Pipe */) { - name = ""; - if (selector.charCodeAt(selectorIndex + 1) === 124 /* Pipe */) { - addTraversal(SelectorType.ColumnCombinator); - stripWhitespace(2); - break; - } - } - else if (reName.test(selector.slice(selectorIndex))) { - name = getName(0); - } - else { - break loop; - } - if (selector.charCodeAt(selectorIndex) === 124 /* Pipe */ && - selector.charCodeAt(selectorIndex + 1) !== 124 /* Pipe */) { - namespace = name; - if (selector.charCodeAt(selectorIndex + 1) === - 42 /* Asterisk */) { - name = "*"; - selectorIndex += 2; - } - else { - name = getName(1); - } - } - tokens.push(name === "*" - ? { type: SelectorType.Universal, namespace } - : { type: SelectorType.Tag, name, namespace }); - } - } - } - finalizeSubselector(); - return selectorIndex; -} diff --git a/node_modules/css-what/lib/es/stringify.d.ts b/node_modules/css-what/lib/es/stringify.d.ts deleted file mode 100644 index 2883b0c..0000000 --- a/node_modules/css-what/lib/es/stringify.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { Selector } from "./types"; -/** - * Turns `selector` back into a string. - * - * @param selector Selector to stringify. - */ -export declare function stringify(selector: Selector[][]): string; -//# sourceMappingURL=stringify.d.ts.map \ No newline at end of file diff --git a/node_modules/css-what/lib/es/stringify.d.ts.map b/node_modules/css-what/lib/es/stringify.d.ts.map deleted file mode 100644 index 98f99ca..0000000 --- a/node_modules/css-what/lib/es/stringify.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"stringify.d.ts","sourceRoot":"","sources":["../../src/stringify.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAiC,MAAM,SAAS,CAAC;AA6BlE;;;;GAIG;AACH,wBAAgB,SAAS,CAAC,QAAQ,EAAE,QAAQ,EAAE,EAAE,GAAG,MAAM,CAIxD"} \ No newline at end of file diff --git a/node_modules/css-what/lib/es/stringify.js b/node_modules/css-what/lib/es/stringify.js deleted file mode 100644 index 5f3b8ef..0000000 --- a/node_modules/css-what/lib/es/stringify.js +++ /dev/null @@ -1,126 +0,0 @@ -import { SelectorType, AttributeAction } from "./types"; -const attribValChars = ["\\", '"']; -const pseudoValChars = [...attribValChars, "(", ")"]; -const charsToEscapeInAttributeValue = new Set(attribValChars.map((c) => c.charCodeAt(0))); -const charsToEscapeInPseudoValue = new Set(pseudoValChars.map((c) => c.charCodeAt(0))); -const charsToEscapeInName = new Set([ - ...pseudoValChars, - "~", - "^", - "$", - "*", - "+", - "!", - "|", - ":", - "[", - "]", - " ", - ".", -].map((c) => c.charCodeAt(0))); -/** - * Turns `selector` back into a string. - * - * @param selector Selector to stringify. - */ -export function stringify(selector) { - return selector - .map((token) => token.map(stringifyToken).join("")) - .join(", "); -} -function stringifyToken(token, index, arr) { - switch (token.type) { - // Simple types - case SelectorType.Child: - return index === 0 ? "> " : " > "; - case SelectorType.Parent: - return index === 0 ? "< " : " < "; - case SelectorType.Sibling: - return index === 0 ? "~ " : " ~ "; - case SelectorType.Adjacent: - return index === 0 ? "+ " : " + "; - case SelectorType.Descendant: - return " "; - case SelectorType.ColumnCombinator: - return index === 0 ? "|| " : " || "; - case SelectorType.Universal: - // Return an empty string if the selector isn't needed. - return token.namespace === "*" && - index + 1 < arr.length && - "name" in arr[index + 1] - ? "" - : `${getNamespace(token.namespace)}*`; - case SelectorType.Tag: - return getNamespacedName(token); - case SelectorType.PseudoElement: - return `::${escapeName(token.name, charsToEscapeInName)}${token.data === null - ? "" - : `(${escapeName(token.data, charsToEscapeInPseudoValue)})`}`; - case SelectorType.Pseudo: - return `:${escapeName(token.name, charsToEscapeInName)}${token.data === null - ? "" - : `(${typeof token.data === "string" - ? escapeName(token.data, charsToEscapeInPseudoValue) - : stringify(token.data)})`}`; - case SelectorType.Attribute: { - if (token.name === "id" && - token.action === AttributeAction.Equals && - token.ignoreCase === "quirks" && - !token.namespace) { - return `#${escapeName(token.value, charsToEscapeInName)}`; - } - if (token.name === "class" && - token.action === AttributeAction.Element && - token.ignoreCase === "quirks" && - !token.namespace) { - return `.${escapeName(token.value, charsToEscapeInName)}`; - } - const name = getNamespacedName(token); - if (token.action === AttributeAction.Exists) { - return `[${name}]`; - } - return `[${name}${getActionValue(token.action)}="${escapeName(token.value, charsToEscapeInAttributeValue)}"${token.ignoreCase === null ? "" : token.ignoreCase ? " i" : " s"}]`; - } - } -} -function getActionValue(action) { - switch (action) { - case AttributeAction.Equals: - return ""; - case AttributeAction.Element: - return "~"; - case AttributeAction.Start: - return "^"; - case AttributeAction.End: - return "$"; - case AttributeAction.Any: - return "*"; - case AttributeAction.Not: - return "!"; - case AttributeAction.Hyphen: - return "|"; - case AttributeAction.Exists: - throw new Error("Shouldn't be here"); - } -} -function getNamespacedName(token) { - return `${getNamespace(token.namespace)}${escapeName(token.name, charsToEscapeInName)}`; -} -function getNamespace(namespace) { - return namespace !== null - ? `${namespace === "*" - ? "*" - : escapeName(namespace, charsToEscapeInName)}|` - : ""; -} -function escapeName(str, charsToEscape) { - let lastIdx = 0; - let ret = ""; - for (let i = 0; i < str.length; i++) { - if (charsToEscape.has(str.charCodeAt(i))) { - ret += `${str.slice(lastIdx, i)}\\${str.charAt(i)}`; - lastIdx = i + 1; - } - } - return ret.length > 0 ? ret + str.slice(lastIdx) : str; -} diff --git a/node_modules/css-what/lib/es/types.d.ts b/node_modules/css-what/lib/es/types.d.ts deleted file mode 100644 index 6eedca4..0000000 --- a/node_modules/css-what/lib/es/types.d.ts +++ /dev/null @@ -1,70 +0,0 @@ -export declare type Selector = PseudoSelector | PseudoElement | AttributeSelector | TagSelector | UniversalSelector | Traversal; -export declare enum SelectorType { - Attribute = "attribute", - Pseudo = "pseudo", - PseudoElement = "pseudo-element", - Tag = "tag", - Universal = "universal", - Adjacent = "adjacent", - Child = "child", - Descendant = "descendant", - Parent = "parent", - Sibling = "sibling", - ColumnCombinator = "column-combinator" -} -/** - * Modes for ignore case. - * - * This could be updated to an enum, and the object is - * the current stand-in that will allow code to be updated - * without big changes. - */ -export declare const IgnoreCaseMode: { - readonly Unknown: null; - readonly QuirksMode: "quirks"; - readonly IgnoreCase: true; - readonly CaseSensitive: false; -}; -export interface AttributeSelector { - type: SelectorType.Attribute; - name: string; - action: AttributeAction; - value: string; - ignoreCase: "quirks" | boolean | null; - namespace: string | null; -} -export declare type DataType = Selector[][] | null | string; -export interface PseudoSelector { - type: SelectorType.Pseudo; - name: string; - data: DataType; -} -export interface PseudoElement { - type: SelectorType.PseudoElement; - name: string; - data: string | null; -} -export interface TagSelector { - type: SelectorType.Tag; - name: string; - namespace: string | null; -} -export interface UniversalSelector { - type: SelectorType.Universal; - namespace: string | null; -} -export interface Traversal { - type: TraversalType; -} -export declare enum AttributeAction { - Any = "any", - Element = "element", - End = "end", - Equals = "equals", - Exists = "exists", - Hyphen = "hyphen", - Not = "not", - Start = "start" -} -export declare type TraversalType = SelectorType.Adjacent | SelectorType.Child | SelectorType.Descendant | SelectorType.Parent | SelectorType.Sibling | SelectorType.ColumnCombinator; -//# sourceMappingURL=types.d.ts.map \ No newline at end of file diff --git a/node_modules/css-what/lib/es/types.d.ts.map b/node_modules/css-what/lib/es/types.d.ts.map deleted file mode 100644 index 5759e96..0000000 --- a/node_modules/css-what/lib/es/types.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"AAAA,oBAAY,QAAQ,GACd,cAAc,GACd,aAAa,GACb,iBAAiB,GACjB,WAAW,GACX,iBAAiB,GACjB,SAAS,CAAC;AAEhB,oBAAY,YAAY;IACpB,SAAS,cAAc;IACvB,MAAM,WAAW;IACjB,aAAa,mBAAmB;IAChC,GAAG,QAAQ;IACX,SAAS,cAAc;IAG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,WAAW;IACjB,GAAG,QAAQ;IACX,KAAK,UAAU;CAClB;AAED,oBAAY,aAAa,GACnB,YAAY,CAAC,QAAQ,GACrB,YAAY,CAAC,KAAK,GAClB,YAAY,CAAC,UAAU,GACvB,YAAY,CAAC,MAAM,GACnB,YAAY,CAAC,OAAO,GACpB,YAAY,CAAC,gBAAgB,CAAC"} \ No newline at end of file diff --git a/node_modules/css-what/lib/es/types.js b/node_modules/css-what/lib/es/types.js deleted file mode 100644 index a0a33d2..0000000 --- a/node_modules/css-what/lib/es/types.js +++ /dev/null @@ -1,39 +0,0 @@ -export var SelectorType; -(function (SelectorType) { - SelectorType["Attribute"] = "attribute"; - SelectorType["Pseudo"] = "pseudo"; - SelectorType["PseudoElement"] = "pseudo-element"; - SelectorType["Tag"] = "tag"; - SelectorType["Universal"] = "universal"; - // Traversals - SelectorType["Adjacent"] = "adjacent"; - SelectorType["Child"] = "child"; - SelectorType["Descendant"] = "descendant"; - SelectorType["Parent"] = "parent"; - SelectorType["Sibling"] = "sibling"; - SelectorType["ColumnCombinator"] = "column-combinator"; -})(SelectorType || (SelectorType = {})); -/** - * Modes for ignore case. - * - * This could be updated to an enum, and the object is - * the current stand-in that will allow code to be updated - * without big changes. - */ -export const IgnoreCaseMode = { - Unknown: null, - QuirksMode: "quirks", - IgnoreCase: true, - CaseSensitive: false, -}; -export var AttributeAction; -(function (AttributeAction) { - AttributeAction["Any"] = "any"; - AttributeAction["Element"] = "element"; - AttributeAction["End"] = "end"; - AttributeAction["Equals"] = "equals"; - AttributeAction["Exists"] = "exists"; - AttributeAction["Hyphen"] = "hyphen"; - AttributeAction["Not"] = "not"; - AttributeAction["Start"] = "start"; -})(AttributeAction || (AttributeAction = {})); diff --git a/node_modules/css-what/package.json b/node_modules/css-what/package.json deleted file mode 100644 index 8aa2c44..0000000 --- a/node_modules/css-what/package.json +++ /dev/null @@ -1,59 +0,0 @@ -{ - "author": "Felix Böhm <me@feedic.com> (http://feedic.com)", - "name": "css-what", - "description": "a CSS selector parser", - "version": "6.1.0", - "funding": { - "url": "https://github.com/sponsors/fb55" - }, - "repository": { - "type": "git", - "url": "https://github.com/fb55/css-what" - }, - "main": "lib/commonjs/index.js", - "module": "lib/es/index.js", - "types": "lib/es/index.d.ts", - "sideEffects": false, - "files": [ - "lib/**/*" - ], - "scripts": { - "test": "npm run test:jest && npm run lint", - "test:jest": "jest", - "lint": "npm run lint:es && npm run lint:prettier", - "lint:es": "eslint src", - "lint:prettier": "npm run prettier -- --check", - "format": "npm run format:es && npm run format:prettier", - "format:es": "npm run lint:es -- --fix", - "format:prettier": "npm run prettier -- --write", - "prettier": "prettier '**/*.{ts,md,json,yml}'", - "build": "tsc && tsc -p tsconfig.es.json", - "prepare": "npm run build" - }, - "devDependencies": { - "@types/jest": "^27.4.1", - "@types/node": "^17.0.23", - "@typescript-eslint/eslint-plugin": "^5.17.0", - "@typescript-eslint/parser": "^5.17.0", - "eslint": "^8.12.0", - "eslint-config-prettier": "^8.5.0", - "eslint-plugin-node": "^11.1.0", - "jest": "^27.5.1", - "prettier": "^2.6.1", - "ts-jest": "^27.1.4", - "typescript": "^4.6.3" - }, - "engines": { - "node": ">= 6" - }, - "license": "BSD-2-Clause", - "jest": { - "preset": "ts-jest", - "roots": [ - "src" - ] - }, - "prettier": { - "tabWidth": 4 - } -} diff --git a/node_modules/dom-serializer/lib/esm/foreignNames.d.ts b/node_modules/dom-serializer/lib/esm/foreignNames.d.ts deleted file mode 100644 index a8b0938..0000000 --- a/node_modules/dom-serializer/lib/esm/foreignNames.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export declare const elementNames: Map<string, string>; -export declare const attributeNames: Map<string, string>; -//# sourceMappingURL=foreignNames.d.ts.map \ No newline at end of file diff --git a/node_modules/dom-serializer/lib/esm/foreignNames.d.ts.map b/node_modules/dom-serializer/lib/esm/foreignNames.d.ts.map deleted file mode 100644 index f471fd0..0000000 --- a/node_modules/dom-serializer/lib/esm/foreignNames.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"foreignNames.d.ts","sourceRoot":"","sources":["../../src/foreignNames.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,YAAY,qBAwCxB,CAAC;AACF,eAAO,MAAM,cAAc,qBA8D1B,CAAC"} \ No newline at end of file diff --git a/node_modules/dom-serializer/lib/esm/foreignNames.js b/node_modules/dom-serializer/lib/esm/foreignNames.js deleted file mode 100644 index ebd6272..0000000 --- a/node_modules/dom-serializer/lib/esm/foreignNames.js +++ /dev/null @@ -1,100 +0,0 @@ -export const elementNames = new Map([ - "altGlyph", - "altGlyphDef", - "altGlyphItem", - "animateColor", - "animateMotion", - "animateTransform", - "clipPath", - "feBlend", - "feColorMatrix", - "feComponentTransfer", - "feComposite", - "feConvolveMatrix", - "feDiffuseLighting", - "feDisplacementMap", - "feDistantLight", - "feDropShadow", - "feFlood", - "feFuncA", - "feFuncB", - "feFuncG", - "feFuncR", - "feGaussianBlur", - "feImage", - "feMerge", - "feMergeNode", - "feMorphology", - "feOffset", - "fePointLight", - "feSpecularLighting", - "feSpotLight", - "feTile", - "feTurbulence", - "foreignObject", - "glyphRef", - "linearGradient", - "radialGradient", - "textPath", -].map((val) => [val.toLowerCase(), val])); -export const attributeNames = new Map([ - "definitionURL", - "attributeName", - "attributeType", - "baseFrequency", - "baseProfile", - "calcMode", - "clipPathUnits", - "diffuseConstant", - "edgeMode", - "filterUnits", - "glyphRef", - "gradientTransform", - "gradientUnits", - "kernelMatrix", - "kernelUnitLength", - "keyPoints", - "keySplines", - "keyTimes", - "lengthAdjust", - "limitingConeAngle", - "markerHeight", - "markerUnits", - "markerWidth", - "maskContentUnits", - "maskUnits", - "numOctaves", - "pathLength", - "patternContentUnits", - "patternTransform", - "patternUnits", - "pointsAtX", - "pointsAtY", - "pointsAtZ", - "preserveAlpha", - "preserveAspectRatio", - "primitiveUnits", - "refX", - "refY", - "repeatCount", - "repeatDur", - "requiredExtensions", - "requiredFeatures", - "specularConstant", - "specularExponent", - "spreadMethod", - "startOffset", - "stdDeviation", - "stitchTiles", - "surfaceScale", - "systemLanguage", - "tableValues", - "targetX", - "targetY", - "textLength", - "viewBox", - "viewTarget", - "xChannelSelector", - "yChannelSelector", - "zoomAndPan", -].map((val) => [val.toLowerCase(), val])); diff --git a/node_modules/dom-serializer/lib/esm/index.d.ts b/node_modules/dom-serializer/lib/esm/index.d.ts deleted file mode 100644 index cdf04f0..0000000 --- a/node_modules/dom-serializer/lib/esm/index.d.ts +++ /dev/null @@ -1,52 +0,0 @@ -import type { AnyNode } from "domhandler"; -export interface DomSerializerOptions { - /** - * Print an empty attribute's value. - * - * @default xmlMode - * @example With <code>emptyAttrs: false</code>: <code><input checked></code> - * @example With <code>emptyAttrs: true</code>: <code><input checked=""></code> - */ - emptyAttrs?: boolean; - /** - * Print self-closing tags for tags without contents. - * - * @default xmlMode - * @example With <code>selfClosingTags: false</code>: <code><foo></foo></code> - * @example With <code>selfClosingTags: true</code>: <code><foo /></code> - */ - selfClosingTags?: boolean; - /** - * Treat the input as an XML document; enables the `emptyAttrs` and `selfClosingTags` options. - * - * If the value is `"foreign"`, it will try to correct mixed-case attribute names. - * - * @default false - */ - xmlMode?: boolean | "foreign"; - /** - * Encode characters that are either reserved in HTML or XML. - * - * If `xmlMode` is `true` or the value not `'utf8'`, characters outside of the utf8 range will be encoded as well. - * - * @default `decodeEntities` - */ - encodeEntities?: boolean | "utf8"; - /** - * Option inherited from parsing; will be used as the default value for `encodeEntities`. - * - * @default true - */ - decodeEntities?: boolean; -} -/** - * Renders a DOM node or an array of DOM nodes to a string. - * - * Can be thought of as the equivalent of the `outerHTML` of the passed node(s). - * - * @param node Node to be rendered. - * @param options Changes serialization behavior - */ -export declare function render(node: AnyNode | ArrayLike<AnyNode>, options?: DomSerializerOptions): string; -export default render; -//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/dom-serializer/lib/esm/index.d.ts.map b/node_modules/dom-serializer/lib/esm/index.d.ts.map deleted file mode 100644 index 0476a46..0000000 --- a/node_modules/dom-serializer/lib/esm/index.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EACV,OAAO,EAMR,MAAM,YAAY,CAAC;AAWpB,MAAM,WAAW,oBAAoB;IACnC;;;;;;OAMG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;;;;;OAMG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B;;;;;;OAMG;IACH,OAAO,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAC9B;;;;;;OAMG;IACH,cAAc,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;IAClC;;;;OAIG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B;AA4ED;;;;;;;GAOG;AACH,wBAAgB,MAAM,CACpB,IAAI,EAAE,OAAO,GAAG,SAAS,CAAC,OAAO,CAAC,EAClC,OAAO,GAAE,oBAAyB,GACjC,MAAM,CAUR;AAED,eAAe,MAAM,CAAC"} \ No newline at end of file diff --git a/node_modules/dom-serializer/lib/esm/index.js b/node_modules/dom-serializer/lib/esm/index.js deleted file mode 100644 index 1ccc9d5..0000000 --- a/node_modules/dom-serializer/lib/esm/index.js +++ /dev/null @@ -1,190 +0,0 @@ -/* - * Module dependencies - */ -import * as ElementType from "domelementtype"; -import { encodeXML, escapeAttribute, escapeText } from "entities"; -/** - * Mixed-case SVG and MathML tags & attributes - * recognized by the HTML parser. - * - * @see https://html.spec.whatwg.org/multipage/parsing.html#parsing-main-inforeign - */ -import { elementNames, attributeNames } from "./foreignNames.js"; -const unencodedElements = new Set([ - "style", - "script", - "xmp", - "iframe", - "noembed", - "noframes", - "plaintext", - "noscript", -]); -function replaceQuotes(value) { - return value.replace(/"/g, """); -} -/** - * Format attributes - */ -function formatAttributes(attributes, opts) { - var _a; - if (!attributes) - return; - const encode = ((_a = opts.encodeEntities) !== null && _a !== void 0 ? _a : opts.decodeEntities) === false - ? replaceQuotes - : opts.xmlMode || opts.encodeEntities !== "utf8" - ? encodeXML - : escapeAttribute; - return Object.keys(attributes) - .map((key) => { - var _a, _b; - const value = (_a = attributes[key]) !== null && _a !== void 0 ? _a : ""; - if (opts.xmlMode === "foreign") { - /* Fix up mixed-case attribute names */ - key = (_b = attributeNames.get(key)) !== null && _b !== void 0 ? _b : key; - } - if (!opts.emptyAttrs && !opts.xmlMode && value === "") { - return key; - } - return `${key}="${encode(value)}"`; - }) - .join(" "); -} -/** - * Self-enclosing tags - */ -const singleTag = new Set([ - "area", - "base", - "basefont", - "br", - "col", - "command", - "embed", - "frame", - "hr", - "img", - "input", - "isindex", - "keygen", - "link", - "meta", - "param", - "source", - "track", - "wbr", -]); -/** - * Renders a DOM node or an array of DOM nodes to a string. - * - * Can be thought of as the equivalent of the `outerHTML` of the passed node(s). - * - * @param node Node to be rendered. - * @param options Changes serialization behavior - */ -export function render(node, options = {}) { - const nodes = "length" in node ? node : [node]; - let output = ""; - for (let i = 0; i < nodes.length; i++) { - output += renderNode(nodes[i], options); - } - return output; -} -export default render; -function renderNode(node, options) { - switch (node.type) { - case ElementType.Root: - return render(node.children, options); - // @ts-expect-error We don't use `Doctype` yet - case ElementType.Doctype: - case ElementType.Directive: - return renderDirective(node); - case ElementType.Comment: - return renderComment(node); - case ElementType.CDATA: - return renderCdata(node); - case ElementType.Script: - case ElementType.Style: - case ElementType.Tag: - return renderTag(node, options); - case ElementType.Text: - return renderText(node, options); - } -} -const foreignModeIntegrationPoints = new Set([ - "mi", - "mo", - "mn", - "ms", - "mtext", - "annotation-xml", - "foreignObject", - "desc", - "title", -]); -const foreignElements = new Set(["svg", "math"]); -function renderTag(elem, opts) { - var _a; - // Handle SVG / MathML in HTML - if (opts.xmlMode === "foreign") { - /* Fix up mixed-case element names */ - elem.name = (_a = elementNames.get(elem.name)) !== null && _a !== void 0 ? _a : elem.name; - /* Exit foreign mode at integration points */ - if (elem.parent && - foreignModeIntegrationPoints.has(elem.parent.name)) { - opts = { ...opts, xmlMode: false }; - } - } - if (!opts.xmlMode && foreignElements.has(elem.name)) { - opts = { ...opts, xmlMode: "foreign" }; - } - let tag = `<${elem.name}`; - const attribs = formatAttributes(elem.attribs, opts); - if (attribs) { - tag += ` ${attribs}`; - } - if (elem.children.length === 0 && - (opts.xmlMode - ? // In XML mode or foreign mode, and user hasn't explicitly turned off self-closing tags - opts.selfClosingTags !== false - : // User explicitly asked for self-closing tags, even in HTML mode - opts.selfClosingTags && singleTag.has(elem.name))) { - if (!opts.xmlMode) - tag += " "; - tag += "/>"; - } - else { - tag += ">"; - if (elem.children.length > 0) { - tag += render(elem.children, opts); - } - if (opts.xmlMode || !singleTag.has(elem.name)) { - tag += `</${elem.name}>`; - } - } - return tag; -} -function renderDirective(elem) { - return `<${elem.data}>`; -} -function renderText(elem, opts) { - var _a; - let data = elem.data || ""; - // If entities weren't decoded, no need to encode them back - if (((_a = opts.encodeEntities) !== null && _a !== void 0 ? _a : opts.decodeEntities) !== false && - !(!opts.xmlMode && - elem.parent && - unencodedElements.has(elem.parent.name))) { - data = - opts.xmlMode || opts.encodeEntities !== "utf8" - ? encodeXML(data) - : escapeText(data); - } - return data; -} -function renderCdata(elem) { - return `<![CDATA[${elem.children[0].data}]]>`; -} -function renderComment(elem) { - return `<!--${elem.data}-->`; -} diff --git a/node_modules/dom-serializer/lib/esm/package.json b/node_modules/dom-serializer/lib/esm/package.json deleted file mode 100644 index 089153b..0000000 --- a/node_modules/dom-serializer/lib/esm/package.json +++ /dev/null @@ -1 +0,0 @@ -{"type":"module"} diff --git a/node_modules/dom-serializer/lib/foreignNames.d.ts b/node_modules/dom-serializer/lib/foreignNames.d.ts deleted file mode 100644 index a8b0938..0000000 --- a/node_modules/dom-serializer/lib/foreignNames.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export declare const elementNames: Map<string, string>; -export declare const attributeNames: Map<string, string>; -//# sourceMappingURL=foreignNames.d.ts.map \ No newline at end of file diff --git a/node_modules/dom-serializer/lib/foreignNames.d.ts.map b/node_modules/dom-serializer/lib/foreignNames.d.ts.map deleted file mode 100644 index bc1d2d0..0000000 --- a/node_modules/dom-serializer/lib/foreignNames.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"foreignNames.d.ts","sourceRoot":"","sources":["../src/foreignNames.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,YAAY,qBAwCxB,CAAC;AACF,eAAO,MAAM,cAAc,qBA8D1B,CAAC"} \ No newline at end of file diff --git a/node_modules/dom-serializer/lib/foreignNames.js b/node_modules/dom-serializer/lib/foreignNames.js deleted file mode 100644 index 3b24b75..0000000 --- a/node_modules/dom-serializer/lib/foreignNames.js +++ /dev/null @@ -1,103 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.attributeNames = exports.elementNames = void 0; -exports.elementNames = new Map([ - "altGlyph", - "altGlyphDef", - "altGlyphItem", - "animateColor", - "animateMotion", - "animateTransform", - "clipPath", - "feBlend", - "feColorMatrix", - "feComponentTransfer", - "feComposite", - "feConvolveMatrix", - "feDiffuseLighting", - "feDisplacementMap", - "feDistantLight", - "feDropShadow", - "feFlood", - "feFuncA", - "feFuncB", - "feFuncG", - "feFuncR", - "feGaussianBlur", - "feImage", - "feMerge", - "feMergeNode", - "feMorphology", - "feOffset", - "fePointLight", - "feSpecularLighting", - "feSpotLight", - "feTile", - "feTurbulence", - "foreignObject", - "glyphRef", - "linearGradient", - "radialGradient", - "textPath", -].map(function (val) { return [val.toLowerCase(), val]; })); -exports.attributeNames = new Map([ - "definitionURL", - "attributeName", - "attributeType", - "baseFrequency", - "baseProfile", - "calcMode", - "clipPathUnits", - "diffuseConstant", - "edgeMode", - "filterUnits", - "glyphRef", - "gradientTransform", - "gradientUnits", - "kernelMatrix", - "kernelUnitLength", - "keyPoints", - "keySplines", - "keyTimes", - "lengthAdjust", - "limitingConeAngle", - "markerHeight", - "markerUnits", - "markerWidth", - "maskContentUnits", - "maskUnits", - "numOctaves", - "pathLength", - "patternContentUnits", - "patternTransform", - "patternUnits", - "pointsAtX", - "pointsAtY", - "pointsAtZ", - "preserveAlpha", - "preserveAspectRatio", - "primitiveUnits", - "refX", - "refY", - "repeatCount", - "repeatDur", - "requiredExtensions", - "requiredFeatures", - "specularConstant", - "specularExponent", - "spreadMethod", - "startOffset", - "stdDeviation", - "stitchTiles", - "surfaceScale", - "systemLanguage", - "tableValues", - "targetX", - "targetY", - "textLength", - "viewBox", - "viewTarget", - "xChannelSelector", - "yChannelSelector", - "zoomAndPan", -].map(function (val) { return [val.toLowerCase(), val]; })); diff --git a/node_modules/dom-serializer/lib/index.d.ts b/node_modules/dom-serializer/lib/index.d.ts deleted file mode 100644 index cdf04f0..0000000 --- a/node_modules/dom-serializer/lib/index.d.ts +++ /dev/null @@ -1,52 +0,0 @@ -import type { AnyNode } from "domhandler"; -export interface DomSerializerOptions { - /** - * Print an empty attribute's value. - * - * @default xmlMode - * @example With <code>emptyAttrs: false</code>: <code><input checked></code> - * @example With <code>emptyAttrs: true</code>: <code><input checked=""></code> - */ - emptyAttrs?: boolean; - /** - * Print self-closing tags for tags without contents. - * - * @default xmlMode - * @example With <code>selfClosingTags: false</code>: <code><foo></foo></code> - * @example With <code>selfClosingTags: true</code>: <code><foo /></code> - */ - selfClosingTags?: boolean; - /** - * Treat the input as an XML document; enables the `emptyAttrs` and `selfClosingTags` options. - * - * If the value is `"foreign"`, it will try to correct mixed-case attribute names. - * - * @default false - */ - xmlMode?: boolean | "foreign"; - /** - * Encode characters that are either reserved in HTML or XML. - * - * If `xmlMode` is `true` or the value not `'utf8'`, characters outside of the utf8 range will be encoded as well. - * - * @default `decodeEntities` - */ - encodeEntities?: boolean | "utf8"; - /** - * Option inherited from parsing; will be used as the default value for `encodeEntities`. - * - * @default true - */ - decodeEntities?: boolean; -} -/** - * Renders a DOM node or an array of DOM nodes to a string. - * - * Can be thought of as the equivalent of the `outerHTML` of the passed node(s). - * - * @param node Node to be rendered. - * @param options Changes serialization behavior - */ -export declare function render(node: AnyNode | ArrayLike<AnyNode>, options?: DomSerializerOptions): string; -export default render; -//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/dom-serializer/lib/index.d.ts.map b/node_modules/dom-serializer/lib/index.d.ts.map deleted file mode 100644 index 6d9d0b6..0000000 --- a/node_modules/dom-serializer/lib/index.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EACV,OAAO,EAMR,MAAM,YAAY,CAAC;AAWpB,MAAM,WAAW,oBAAoB;IACnC;;;;;;OAMG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;;;;;OAMG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B;;;;;;OAMG;IACH,OAAO,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAC9B;;;;;;OAMG;IACH,cAAc,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;IAClC;;;;OAIG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B;AA4ED;;;;;;;GAOG;AACH,wBAAgB,MAAM,CACpB,IAAI,EAAE,OAAO,GAAG,SAAS,CAAC,OAAO,CAAC,EAClC,OAAO,GAAE,oBAAyB,GACjC,MAAM,CAUR;AAED,eAAe,MAAM,CAAC"} \ No newline at end of file diff --git a/node_modules/dom-serializer/lib/index.js b/node_modules/dom-serializer/lib/index.js deleted file mode 100644 index af996ff..0000000 --- a/node_modules/dom-serializer/lib/index.js +++ /dev/null @@ -1,229 +0,0 @@ -"use strict"; -var __assign = (this && this.__assign) || function () { - __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; - }; - return __assign.apply(this, arguments); -}; -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 __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}); -var __importStar = (this && this.__importStar) || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.render = void 0; -/* - * Module dependencies - */ -var ElementType = __importStar(require("domelementtype")); -var entities_1 = require("entities"); -/** - * Mixed-case SVG and MathML tags & attributes - * recognized by the HTML parser. - * - * @see https://html.spec.whatwg.org/multipage/parsing.html#parsing-main-inforeign - */ -var foreignNames_js_1 = require("./foreignNames.js"); -var unencodedElements = new Set([ - "style", - "script", - "xmp", - "iframe", - "noembed", - "noframes", - "plaintext", - "noscript", -]); -function replaceQuotes(value) { - return value.replace(/"/g, """); -} -/** - * Format attributes - */ -function formatAttributes(attributes, opts) { - var _a; - if (!attributes) - return; - var encode = ((_a = opts.encodeEntities) !== null && _a !== void 0 ? _a : opts.decodeEntities) === false - ? replaceQuotes - : opts.xmlMode || opts.encodeEntities !== "utf8" - ? entities_1.encodeXML - : entities_1.escapeAttribute; - return Object.keys(attributes) - .map(function (key) { - var _a, _b; - var value = (_a = attributes[key]) !== null && _a !== void 0 ? _a : ""; - if (opts.xmlMode === "foreign") { - /* Fix up mixed-case attribute names */ - key = (_b = foreignNames_js_1.attributeNames.get(key)) !== null && _b !== void 0 ? _b : key; - } - if (!opts.emptyAttrs && !opts.xmlMode && value === "") { - return key; - } - return "".concat(key, "=\"").concat(encode(value), "\""); - }) - .join(" "); -} -/** - * Self-enclosing tags - */ -var singleTag = new Set([ - "area", - "base", - "basefont", - "br", - "col", - "command", - "embed", - "frame", - "hr", - "img", - "input", - "isindex", - "keygen", - "link", - "meta", - "param", - "source", - "track", - "wbr", -]); -/** - * Renders a DOM node or an array of DOM nodes to a string. - * - * Can be thought of as the equivalent of the `outerHTML` of the passed node(s). - * - * @param node Node to be rendered. - * @param options Changes serialization behavior - */ -function render(node, options) { - if (options === void 0) { options = {}; } - var nodes = "length" in node ? node : [node]; - var output = ""; - for (var i = 0; i < nodes.length; i++) { - output += renderNode(nodes[i], options); - } - return output; -} -exports.render = render; -exports.default = render; -function renderNode(node, options) { - switch (node.type) { - case ElementType.Root: - return render(node.children, options); - // @ts-expect-error We don't use `Doctype` yet - case ElementType.Doctype: - case ElementType.Directive: - return renderDirective(node); - case ElementType.Comment: - return renderComment(node); - case ElementType.CDATA: - return renderCdata(node); - case ElementType.Script: - case ElementType.Style: - case ElementType.Tag: - return renderTag(node, options); - case ElementType.Text: - return renderText(node, options); - } -} -var foreignModeIntegrationPoints = new Set([ - "mi", - "mo", - "mn", - "ms", - "mtext", - "annotation-xml", - "foreignObject", - "desc", - "title", -]); -var foreignElements = new Set(["svg", "math"]); -function renderTag(elem, opts) { - var _a; - // Handle SVG / MathML in HTML - if (opts.xmlMode === "foreign") { - /* Fix up mixed-case element names */ - elem.name = (_a = foreignNames_js_1.elementNames.get(elem.name)) !== null && _a !== void 0 ? _a : elem.name; - /* Exit foreign mode at integration points */ - if (elem.parent && - foreignModeIntegrationPoints.has(elem.parent.name)) { - opts = __assign(__assign({}, opts), { xmlMode: false }); - } - } - if (!opts.xmlMode && foreignElements.has(elem.name)) { - opts = __assign(__assign({}, opts), { xmlMode: "foreign" }); - } - var tag = "<".concat(elem.name); - var attribs = formatAttributes(elem.attribs, opts); - if (attribs) { - tag += " ".concat(attribs); - } - if (elem.children.length === 0 && - (opts.xmlMode - ? // In XML mode or foreign mode, and user hasn't explicitly turned off self-closing tags - opts.selfClosingTags !== false - : // User explicitly asked for self-closing tags, even in HTML mode - opts.selfClosingTags && singleTag.has(elem.name))) { - if (!opts.xmlMode) - tag += " "; - tag += "/>"; - } - else { - tag += ">"; - if (elem.children.length > 0) { - tag += render(elem.children, opts); - } - if (opts.xmlMode || !singleTag.has(elem.name)) { - tag += "</".concat(elem.name, ">"); - } - } - return tag; -} -function renderDirective(elem) { - return "<".concat(elem.data, ">"); -} -function renderText(elem, opts) { - var _a; - var data = elem.data || ""; - // If entities weren't decoded, no need to encode them back - if (((_a = opts.encodeEntities) !== null && _a !== void 0 ? _a : opts.decodeEntities) !== false && - !(!opts.xmlMode && - elem.parent && - unencodedElements.has(elem.parent.name))) { - data = - opts.xmlMode || opts.encodeEntities !== "utf8" - ? (0, entities_1.encodeXML)(data) - : (0, entities_1.escapeText)(data); - } - return data; -} -function renderCdata(elem) { - return "<![CDATA[".concat(elem.children[0].data, "]]>"); -} -function renderComment(elem) { - return "<!--".concat(elem.data, "-->"); -} diff --git a/node_modules/dom-serializer/package.json b/node_modules/dom-serializer/package.json deleted file mode 100644 index 002681c..0000000 --- a/node_modules/dom-serializer/package.json +++ /dev/null @@ -1,69 +0,0 @@ -{ - "name": "dom-serializer", - "version": "2.0.0", - "description": "render domhandler DOM nodes to a string", - "author": "Felix Boehm <me@feedic.com>", - "sideEffects": false, - "keywords": [ - "html", - "xml", - "render" - ], - "repository": { - "type": "git", - "url": "git://github.com/cheeriojs/dom-serializer.git" - }, - "main": "lib/index.js", - "types": "lib/index.d.ts", - "module": "lib/esm/index.js", - "exports": { - "require": "./lib/index.js", - "import": "./lib/esm/index.js" - }, - "files": [ - "lib/**/*" - ], - "dependencies": { - "domelementtype": "^2.3.0", - "domhandler": "^5.0.2", - "entities": "^4.2.0" - }, - "devDependencies": { - "@types/jest": "^27.4.1", - "@types/node": "^17.0.23", - "@typescript-eslint/eslint-plugin": "^5.18.0", - "@typescript-eslint/parser": "^5.18.0", - "cheerio": "^1.0.0-rc.9", - "eslint": "^8.12.0", - "eslint-config-prettier": "^8.5.0", - "htmlparser2": "^7.2.0", - "jest": "^27.5.1", - "prettier": "^2.6.2", - "ts-jest": "^27.1.4", - "typescript": "^4.6.3" - }, - "scripts": { - "test": "npm run test:jest && npm run lint", - "test:jest": "jest", - "lint": "npm run lint:es && npm run lint:prettier", - "lint:es": "eslint --ignore-path .gitignore .", - "lint:prettier": "npm run prettier -- --check", - "format": "npm run format:es && npm run format:prettier", - "format:es": "npm run lint:es -- --fix", - "format:prettier": "npm run prettier -- --write", - "prettier": "prettier \"**/*.{ts,md,json,yml}\" --ignore-path .gitignore", - "build": "npm run build:cjs && npm run build:esm", - "build:cjs": "tsc", - "build:esm": "tsc --module esnext --target es2019 --outDir lib/esm && echo '{\"type\":\"module\"}' > lib/esm/package.json", - "prepare": "npm run build" - }, - "jest": { - "preset": "ts-jest", - "testEnvironment": "node", - "moduleNameMapper": { - "^(.*)\\.js$": "$1" - } - }, - "funding": "https://github.com/cheeriojs/dom-serializer?sponsor=1", - "license": "MIT" -} diff --git a/node_modules/domelementtype/lib/esm/index.d.ts b/node_modules/domelementtype/lib/esm/index.d.ts deleted file mode 100644 index 72fa4f8..0000000 --- a/node_modules/domelementtype/lib/esm/index.d.ts +++ /dev/null @@ -1,48 +0,0 @@ -/** Types of elements found in htmlparser2's DOM */ -export declare enum ElementType { - /** Type for the root element of a document */ - Root = "root", - /** Type for Text */ - Text = "text", - /** Type for <? ... ?> */ - Directive = "directive", - /** Type for <!-- ... --> */ - Comment = "comment", - /** Type for <script> tags */ - Script = "script", - /** Type for <style> tags */ - Style = "style", - /** Type for Any tag */ - Tag = "tag", - /** Type for <![CDATA[ ... ]]> */ - CDATA = "cdata", - /** Type for <!doctype ...> */ - Doctype = "doctype" -} -/** - * Tests whether an element is a tag or not. - * - * @param elem Element to test - */ -export declare function isTag(elem: { - type: ElementType; -}): boolean; -/** Type for the root element of a document */ -export declare const Root = ElementType.Root; -/** Type for Text */ -export declare const Text = ElementType.Text; -/** Type for <? ... ?> */ -export declare const Directive = ElementType.Directive; -/** Type for <!-- ... --> */ -export declare const Comment = ElementType.Comment; -/** Type for <script> tags */ -export declare const Script = ElementType.Script; -/** Type for <style> tags */ -export declare const Style = ElementType.Style; -/** Type for Any tag */ -export declare const Tag = ElementType.Tag; -/** Type for <![CDATA[ ... ]]> */ -export declare const CDATA = ElementType.CDATA; -/** Type for <!doctype ...> */ -export declare const Doctype = ElementType.Doctype; -//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/domelementtype/lib/esm/index.d.ts.map b/node_modules/domelementtype/lib/esm/index.d.ts.map deleted file mode 100644 index 49f4d9d..0000000 --- a/node_modules/domelementtype/lib/esm/index.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,mDAAmD;AACnD,oBAAY,WAAW;IACnB,8CAA8C;IAC9C,IAAI,SAAS;IACb,oBAAoB;IACpB,IAAI,SAAS;IACb,yBAAyB;IACzB,SAAS,cAAc;IACvB,4BAA4B;IAC5B,OAAO,YAAY;IACnB,6BAA6B;IAC7B,MAAM,WAAW;IACjB,4BAA4B;IAC5B,KAAK,UAAU;IACf,uBAAuB;IACvB,GAAG,QAAQ;IACX,iCAAiC;IACjC,KAAK,UAAU;IACf,8BAA8B;IAC9B,OAAO,YAAY;CACtB;AAED;;;;GAIG;AACH,wBAAgB,KAAK,CAAC,IAAI,EAAE;IAAE,IAAI,EAAE,WAAW,CAAA;CAAE,GAAG,OAAO,CAM1D;AAGD,8CAA8C;AAC9C,eAAO,MAAM,IAAI,mBAAmB,CAAC;AACrC,oBAAoB;AACpB,eAAO,MAAM,IAAI,mBAAmB,CAAC;AACrC,yBAAyB;AACzB,eAAO,MAAM,SAAS,wBAAwB,CAAC;AAC/C,4BAA4B;AAC5B,eAAO,MAAM,OAAO,sBAAsB,CAAC;AAC3C,6BAA6B;AAC7B,eAAO,MAAM,MAAM,qBAAqB,CAAC;AACzC,4BAA4B;AAC5B,eAAO,MAAM,KAAK,oBAAoB,CAAC;AACvC,uBAAuB;AACvB,eAAO,MAAM,GAAG,kBAAkB,CAAC;AACnC,iCAAiC;AACjC,eAAO,MAAM,KAAK,oBAAoB,CAAC;AACvC,8BAA8B;AAC9B,eAAO,MAAM,OAAO,sBAAsB,CAAC"} \ No newline at end of file diff --git a/node_modules/domelementtype/lib/esm/index.js b/node_modules/domelementtype/lib/esm/index.js deleted file mode 100644 index 8ec1a42..0000000 --- a/node_modules/domelementtype/lib/esm/index.js +++ /dev/null @@ -1,51 +0,0 @@ -/** Types of elements found in htmlparser2's DOM */ -export var ElementType; -(function (ElementType) { - /** Type for the root element of a document */ - ElementType["Root"] = "root"; - /** Type for Text */ - ElementType["Text"] = "text"; - /** Type for <? ... ?> */ - ElementType["Directive"] = "directive"; - /** Type for <!-- ... --> */ - ElementType["Comment"] = "comment"; - /** Type for <script> tags */ - ElementType["Script"] = "script"; - /** Type for <style> tags */ - ElementType["Style"] = "style"; - /** Type for Any tag */ - ElementType["Tag"] = "tag"; - /** Type for <![CDATA[ ... ]]> */ - ElementType["CDATA"] = "cdata"; - /** Type for <!doctype ...> */ - ElementType["Doctype"] = "doctype"; -})(ElementType || (ElementType = {})); -/** - * Tests whether an element is a tag or not. - * - * @param elem Element to test - */ -export function isTag(elem) { - return (elem.type === ElementType.Tag || - elem.type === ElementType.Script || - elem.type === ElementType.Style); -} -// Exports for backwards compatibility -/** Type for the root element of a document */ -export const Root = ElementType.Root; -/** Type for Text */ -export const Text = ElementType.Text; -/** Type for <? ... ?> */ -export const Directive = ElementType.Directive; -/** Type for <!-- ... --> */ -export const Comment = ElementType.Comment; -/** Type for <script> tags */ -export const Script = ElementType.Script; -/** Type for <style> tags */ -export const Style = ElementType.Style; -/** Type for Any tag */ -export const Tag = ElementType.Tag; -/** Type for <![CDATA[ ... ]]> */ -export const CDATA = ElementType.CDATA; -/** Type for <!doctype ...> */ -export const Doctype = ElementType.Doctype; diff --git a/node_modules/domelementtype/lib/esm/package.json b/node_modules/domelementtype/lib/esm/package.json deleted file mode 100644 index 089153b..0000000 --- a/node_modules/domelementtype/lib/esm/package.json +++ /dev/null @@ -1 +0,0 @@ -{"type":"module"} diff --git a/node_modules/domelementtype/lib/index.d.ts b/node_modules/domelementtype/lib/index.d.ts deleted file mode 100644 index 72fa4f8..0000000 --- a/node_modules/domelementtype/lib/index.d.ts +++ /dev/null @@ -1,48 +0,0 @@ -/** Types of elements found in htmlparser2's DOM */ -export declare enum ElementType { - /** Type for the root element of a document */ - Root = "root", - /** Type for Text */ - Text = "text", - /** Type for <? ... ?> */ - Directive = "directive", - /** Type for <!-- ... --> */ - Comment = "comment", - /** Type for <script> tags */ - Script = "script", - /** Type for <style> tags */ - Style = "style", - /** Type for Any tag */ - Tag = "tag", - /** Type for <![CDATA[ ... ]]> */ - CDATA = "cdata", - /** Type for <!doctype ...> */ - Doctype = "doctype" -} -/** - * Tests whether an element is a tag or not. - * - * @param elem Element to test - */ -export declare function isTag(elem: { - type: ElementType; -}): boolean; -/** Type for the root element of a document */ -export declare const Root = ElementType.Root; -/** Type for Text */ -export declare const Text = ElementType.Text; -/** Type for <? ... ?> */ -export declare const Directive = ElementType.Directive; -/** Type for <!-- ... --> */ -export declare const Comment = ElementType.Comment; -/** Type for <script> tags */ -export declare const Script = ElementType.Script; -/** Type for <style> tags */ -export declare const Style = ElementType.Style; -/** Type for Any tag */ -export declare const Tag = ElementType.Tag; -/** Type for <![CDATA[ ... ]]> */ -export declare const CDATA = ElementType.CDATA; -/** Type for <!doctype ...> */ -export declare const Doctype = ElementType.Doctype; -//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/domelementtype/lib/index.d.ts.map b/node_modules/domelementtype/lib/index.d.ts.map deleted file mode 100644 index a581ba6..0000000 --- a/node_modules/domelementtype/lib/index.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,mDAAmD;AACnD,oBAAY,WAAW;IACnB,8CAA8C;IAC9C,IAAI,SAAS;IACb,oBAAoB;IACpB,IAAI,SAAS;IACb,yBAAyB;IACzB,SAAS,cAAc;IACvB,4BAA4B;IAC5B,OAAO,YAAY;IACnB,6BAA6B;IAC7B,MAAM,WAAW;IACjB,4BAA4B;IAC5B,KAAK,UAAU;IACf,uBAAuB;IACvB,GAAG,QAAQ;IACX,iCAAiC;IACjC,KAAK,UAAU;IACf,8BAA8B;IAC9B,OAAO,YAAY;CACtB;AAED;;;;GAIG;AACH,wBAAgB,KAAK,CAAC,IAAI,EAAE;IAAE,IAAI,EAAE,WAAW,CAAA;CAAE,GAAG,OAAO,CAM1D;AAGD,8CAA8C;AAC9C,eAAO,MAAM,IAAI,mBAAmB,CAAC;AACrC,oBAAoB;AACpB,eAAO,MAAM,IAAI,mBAAmB,CAAC;AACrC,yBAAyB;AACzB,eAAO,MAAM,SAAS,wBAAwB,CAAC;AAC/C,4BAA4B;AAC5B,eAAO,MAAM,OAAO,sBAAsB,CAAC;AAC3C,6BAA6B;AAC7B,eAAO,MAAM,MAAM,qBAAqB,CAAC;AACzC,4BAA4B;AAC5B,eAAO,MAAM,KAAK,oBAAoB,CAAC;AACvC,uBAAuB;AACvB,eAAO,MAAM,GAAG,kBAAkB,CAAC;AACnC,iCAAiC;AACjC,eAAO,MAAM,KAAK,oBAAoB,CAAC;AACvC,8BAA8B;AAC9B,eAAO,MAAM,OAAO,sBAAsB,CAAC"} \ No newline at end of file diff --git a/node_modules/domelementtype/lib/index.js b/node_modules/domelementtype/lib/index.js deleted file mode 100644 index b0ebcb1..0000000 --- a/node_modules/domelementtype/lib/index.js +++ /dev/null @@ -1,55 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.Doctype = exports.CDATA = exports.Tag = exports.Style = exports.Script = exports.Comment = exports.Directive = exports.Text = exports.Root = exports.isTag = exports.ElementType = void 0; -/** Types of elements found in htmlparser2's DOM */ -var ElementType; -(function (ElementType) { - /** Type for the root element of a document */ - ElementType["Root"] = "root"; - /** Type for Text */ - ElementType["Text"] = "text"; - /** Type for <? ... ?> */ - ElementType["Directive"] = "directive"; - /** Type for <!-- ... --> */ - ElementType["Comment"] = "comment"; - /** Type for <script> tags */ - ElementType["Script"] = "script"; - /** Type for <style> tags */ - ElementType["Style"] = "style"; - /** Type for Any tag */ - ElementType["Tag"] = "tag"; - /** Type for <![CDATA[ ... ]]> */ - ElementType["CDATA"] = "cdata"; - /** Type for <!doctype ...> */ - ElementType["Doctype"] = "doctype"; -})(ElementType = exports.ElementType || (exports.ElementType = {})); -/** - * Tests whether an element is a tag or not. - * - * @param elem Element to test - */ -function isTag(elem) { - return (elem.type === ElementType.Tag || - elem.type === ElementType.Script || - elem.type === ElementType.Style); -} -exports.isTag = isTag; -// Exports for backwards compatibility -/** Type for the root element of a document */ -exports.Root = ElementType.Root; -/** Type for Text */ -exports.Text = ElementType.Text; -/** Type for <? ... ?> */ -exports.Directive = ElementType.Directive; -/** Type for <!-- ... --> */ -exports.Comment = ElementType.Comment; -/** Type for <script> tags */ -exports.Script = ElementType.Script; -/** Type for <style> tags */ -exports.Style = ElementType.Style; -/** Type for Any tag */ -exports.Tag = ElementType.Tag; -/** Type for <![CDATA[ ... ]]> */ -exports.CDATA = ElementType.CDATA; -/** Type for <!doctype ...> */ -exports.Doctype = ElementType.Doctype; diff --git a/node_modules/domelementtype/package.json b/node_modules/domelementtype/package.json deleted file mode 100644 index f23933a..0000000 --- a/node_modules/domelementtype/package.json +++ /dev/null @@ -1,54 +0,0 @@ -{ - "name": "domelementtype", - "version": "2.3.0", - "description": "all the types of nodes in htmlparser2's dom", - "author": "Felix Boehm <me@feedic.com>", - "license": "BSD-2-Clause", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/fb55" - } - ], - "sideEffects": false, - "main": "lib/index.js", - "types": "lib/index.d.ts", - "module": "lib/esm/index.js", - "exports": { - "require": "./lib/index.js", - "import": "./lib/esm/index.js" - }, - "files": [ - "lib/**/*" - ], - "repository": { - "type": "git", - "url": "git://github.com/fb55/domelementtype.git" - }, - "keywords": [ - "dom", - "element", - "types", - "htmlparser2" - ], - "scripts": { - "test": "npm run lint && prettier --check **/*.{ts,json,md}", - "lint": "eslint src", - "format": "prettier --write **/*.{ts,json,md}", - "build": "npm run build:cjs && npm run build:esm", - "build:cjs": "tsc", - "build:esm": "tsc --module esnext --target es2019 --outDir lib/esm && echo '{\"type\":\"module\"}' > lib/esm/package.json", - "prepare": "npm run build" - }, - "prettier": { - "tabWidth": 4 - }, - "devDependencies": { - "@typescript-eslint/eslint-plugin": "^5.18.0", - "@typescript-eslint/parser": "^5.18.0", - "eslint": "^8.12.0", - "eslint-config-prettier": "^8.5.0", - "prettier": "^2.6.2", - "typescript": "^4.6.3" - } -} diff --git a/node_modules/domhandler/lib/esm/index.d.ts b/node_modules/domhandler/lib/esm/index.d.ts deleted file mode 100644 index 5d322c1..0000000 --- a/node_modules/domhandler/lib/esm/index.d.ts +++ /dev/null @@ -1,76 +0,0 @@ -import { ChildNode, Element, DataNode, Document, ParentNode } from "./node.js"; -export * from "./node.js"; -export interface DomHandlerOptions { - /** - * Add a `startIndex` property to nodes. - * When the parser is used in a non-streaming fashion, `startIndex` is an integer - * indicating the position of the start of the node in the document. - * - * @default false - */ - withStartIndices?: boolean; - /** - * Add an `endIndex` property to nodes. - * When the parser is used in a non-streaming fashion, `endIndex` is an integer - * indicating the position of the end of the node in the document. - * - * @default false - */ - withEndIndices?: boolean; - /** - * Treat the markup as XML. - * - * @default false - */ - xmlMode?: boolean; -} -interface ParserInterface { - startIndex: number | null; - endIndex: number | null; -} -declare type Callback = (error: Error | null, dom: ChildNode[]) => void; -declare type ElementCallback = (element: Element) => void; -export declare class DomHandler { - /** The elements of the DOM */ - dom: ChildNode[]; - /** The root element for the DOM */ - root: Document; - /** Called once parsing has completed. */ - private readonly callback; - /** Settings for the handler. */ - private readonly options; - /** Callback whenever a tag is closed. */ - private readonly elementCB; - /** Indicated whether parsing has been completed. */ - private done; - /** Stack of open tags. */ - protected tagStack: ParentNode[]; - /** A data node that is still being written to. */ - protected lastNode: DataNode | null; - /** Reference to the parser instance. Used for location information. */ - private parser; - /** - * @param callback Called once parsing has completed. - * @param options Settings for the handler. - * @param elementCB Callback whenever a tag is closed. - */ - constructor(callback?: Callback | null, options?: DomHandlerOptions | null, elementCB?: ElementCallback); - onparserinit(parser: ParserInterface): void; - onreset(): void; - onend(): void; - onerror(error: Error): void; - onclosetag(): void; - onopentag(name: string, attribs: { - [key: string]: string; - }): void; - ontext(data: string): void; - oncomment(data: string): void; - oncommentend(): void; - oncdatastart(): void; - oncdataend(): void; - onprocessinginstruction(name: string, data: string): void; - protected handleCallback(error: Error | null): void; - protected addNode(node: ChildNode): void; -} -export default DomHandler; -//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/domhandler/lib/esm/index.d.ts.map b/node_modules/domhandler/lib/esm/index.d.ts.map deleted file mode 100644 index 54497b0..0000000 --- a/node_modules/domhandler/lib/esm/index.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EACH,SAAS,EACT,OAAO,EACP,QAAQ,EAIR,QAAQ,EAER,UAAU,EACb,MAAM,WAAW,CAAC;AAEnB,cAAc,WAAW,CAAC;AAE1B,MAAM,WAAW,iBAAiB;IAC9B;;;;;;OAMG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAE3B;;;;;;OAMG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;IAEzB;;;;OAIG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;CACrB;AASD,UAAU,eAAe;IACrB,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,QAAQ,EAAE,MAAM,G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AM,GAAG,IAAI;IAW7B,YAAY,IAAI,IAAI;IAIpB,YAAY,IAAI,IAAI;IAUpB,UAAU,IAAI,IAAI;IAIlB,uBAAuB,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,IAAI;IAKhE,SAAS,CAAC,cAAc,CAAC,KAAK,EAAE,KAAK,GAAG,IAAI,GAAG,IAAI;IAQnD,SAAS,CAAC,OAAO,CAAC,IAAI,EAAE,SAAS,GAAG,IAAI;CAwB3C;AAED,eAAe,UAAU,CAAC"} \ No newline at end of file diff --git a/node_modules/domhandler/lib/esm/index.js b/node_modules/domhandler/lib/esm/index.js deleted file mode 100644 index 3c1e7d1..0000000 --- a/node_modules/domhandler/lib/esm/index.js +++ /dev/null @@ -1,146 +0,0 @@ -import { ElementType } from "domelementtype"; -import { Element, Text, Comment, CDATA, Document, ProcessingInstruction, } from "./node.js"; -export * from "./node.js"; -// Default options -const defaultOpts = { - withStartIndices: false, - withEndIndices: false, - xmlMode: false, -}; -export class DomHandler { - /** - * @param callback Called once parsing has completed. - * @param options Settings for the handler. - * @param elementCB Callback whenever a tag is closed. - */ - constructor(callback, options, elementCB) { - /** The elements of the DOM */ - this.dom = []; - /** The root element for the DOM */ - this.root = new Document(this.dom); - /** Indicated whether parsing has been completed. */ - this.done = false; - /** Stack of open tags. */ - this.tagStack = [this.root]; - /** A data node that is still being written to. */ - this.lastNode = null; - /** Reference to the parser instance. Used for location information. */ - this.parser = null; - // Make it possible to skip arguments, for backwards-compatibility - if (typeof options === "function") { - elementCB = options; - options = defaultOpts; - } - if (typeof callback === "object") { - options = callback; - callback = undefined; - } - this.callback = callback !== null && callback !== void 0 ? callback : null; - this.options = options !== null && options !== void 0 ? options : defaultOpts; - this.elementCB = elementCB !== null && elementCB !== void 0 ? elementCB : null; - } - onparserinit(parser) { - this.parser = parser; - } - // Resets the handler back to starting state - onreset() { - this.dom = []; - this.root = new Document(this.dom); - this.done = false; - this.tagStack = [this.root]; - this.lastNode = null; - this.parser = null; - } - // Signals the handler that parsing is done - onend() { - if (this.done) - return; - this.done = true; - this.parser = null; - this.handleCallback(null); - } - onerror(error) { - this.handleCallback(error); - } - onclosetag() { - this.lastNode = null; - const elem = this.tagStack.pop(); - if (this.options.withEndIndices) { - elem.endIndex = this.parser.endIndex; - } - if (this.elementCB) - this.elementCB(elem); - } - onopentag(name, attribs) { - const type = this.options.xmlMode ? ElementType.Tag : undefined; - const element = new Element(name, attribs, undefined, type); - this.addNode(element); - this.tagStack.push(element); - } - ontext(data) { - const { lastNode } = this; - if (lastNode && lastNode.type === ElementType.Text) { - lastNode.data += data; - if (this.options.withEndIndices) { - lastNode.endIndex = this.parser.endIndex; - } - } - else { - const node = new Text(data); - this.addNode(node); - this.lastNode = node; - } - } - oncomment(data) { - if (this.lastNode && this.lastNode.type === ElementType.Comment) { - this.lastNode.data += data; - return; - } - const node = new Comment(data); - this.addNode(node); - this.lastNode = node; - } - oncommentend() { - this.lastNode = null; - } - oncdatastart() { - const text = new Text(""); - const node = new CDATA([text]); - this.addNode(node); - text.parent = node; - this.lastNode = text; - } - oncdataend() { - this.lastNode = null; - } - onprocessinginstruction(name, data) { - const node = new ProcessingInstruction(name, data); - this.addNode(node); - } - handleCallback(error) { - if (typeof this.callback === "function") { - this.callback(error, this.dom); - } - else if (error) { - throw error; - } - } - addNode(node) { - const parent = this.tagStack[this.tagStack.length - 1]; - const previousSibling = parent.children[parent.children.length - 1]; - if (this.options.withStartIndices) { - node.startIndex = this.parser.startIndex; - } - if (this.options.withEndIndices) { - node.endIndex = this.parser.endIndex; - } - parent.children.push(node); - if (previousSibling) { - node.prev = previousSibling; - previousSibling.next = node; - } - node.parent = parent; - this.lastNode = null; - } -} -export default DomHandler; diff --git a/node_modules/domhandler/lib/esm/node.d.ts b/node_modules/domhandler/lib/esm/node.d.ts deleted file mode 100644 index b71c88a..0000000 --- a/node_modules/domhandler/lib/esm/node.d.ts +++ /dev/null @@ -1,245 +0,0 @@ -import { ElementType } from "domelementtype"; -interface SourceCodeLocation { - /** One-based line index of the first character. */ - startLine: number; - /** One-based column index of the first character. */ - startCol: number; - /** Zero-based first character index. */ - startOffset: number; - /** One-based line index of the last character. */ - endLine: number; - /** One-based column index of the last character. Points directly *after* the last character. */ - endCol: number; - /** Zero-based last character index. Points directly *after* the last character. */ - endOffset: number; -} -interface TagSourceCodeLocation extends SourceCodeLocation { - startTag?: SourceCodeLocation; - endTag?: SourceCodeLocation; -} -export declare type ParentNode = Document | Element | CDATA; -export declare type ChildNode = Text | Comment | ProcessingInstruction | Element | CDATA | Document; -export declare type AnyNode = ParentNode | ChildNode; -/** - * This object will be used as the prototype for Nodes when creating a - * DOM-Level-1-compliant structure. - */ -export declare abstract class Node { - /** The type of the node. */ - abstract readonly type: ElementType; - /** Parent of the node */ - parent: ParentNode | null; - /** Previous sibling */ - prev: ChildNode | null; - /** Next sibling */ - next: ChildNode | null; - /** The start index of the node. Requires `withStartIndices` on the handler to be `true. */ - startIndex: number | null; - /** The end index of the node. Requires `withEndIndices` on the handler to be `true. */ - endIndex: number | null; - /** - * `parse5` source code location info. - * - * Available if parsing with parse5 and location info is enabled. - */ - sourceCodeLocation?: SourceCodeLocation | null; - /** - * [DOM spec](https://dom.spec.whatwg.org/#dom-node-nodetype)-compatible - * node {@link type}. - */ - abstract readonly nodeType: number; - /** - * Same as {@link parent}. - * [DOM spec](https://dom.spec.whatwg.org)-compatible alias. - */ - get parentNode(): ParentNode | null; - set parentNode(parent: ParentNode | null); - /** - * Same as {@link prev}. - * [DOM spec](https://dom.spec.whatwg.org)-compatible alias. - */ - get previousSibling(): ChildNode | null; - set previousSibling(prev: ChildNode | null); - /** - * Same as {@link next}. - * [DOM spec](https://dom.spec.whatwg.org)-compatible alias. - */ - get nextSibling(): ChildNode | null; - set nextSibling(next: ChildNode | null); - /** - * Clone this node, and optionally its children. - * - * @param recursive Clone child nodes as well. - * @returns A clone of the node. - */ - cloneNode<T extends Node>(this: T, recursive?: boolean): T; -} -/** - * A node that contains some data. - */ -export declare abstract class DataNode extends Node { - data: string; - /** - * @param data The content of the data node - */ - constructor(data: string); - /** - * Same as {@link data}. - * [DOM spec](https://dom.spec.whatwg.org)-compatible alias. - */ - get nodeValue(): string; - set nodeValue(data: string); -} -/** - * Text within the document. - */ -export declare class Text extends DataNode { - type: ElementType.Text; - get nodeType(): 3; -} -/** - * Comments within the document. - */ -export declare class Comment extends DataNode { - type: ElementType.Comment; - get nodeType(): 8; -} -/** - * Processing instructions, including doc types. - */ -export declare class ProcessingInstruction extends DataNode { - name: string; - type: ElementType.Directive; - constructor(name: string, data: string); - get nodeType(): 1; - /** If this is a doctype, the document type name (parse5 only). */ - "x-name"?: string; - /** If this is a doctype, the document type public identifier (parse5 only). */ - "x-publicId"?: string; - /** If this is a doctype, the document type system identifier (parse5 only). */ - "x-systemId"?: string; -} -/** - * A `Node` that can have children. - */ -export declare abstract class NodeWithChildren extends Node { - children: ChildNode[]; - /** - * @param children Children of the node. Only certain node types can have children. - */ - constructor(children: ChildNode[]); - /** First child of the node. */ - get firstChild(): ChildNode | null; - /** Last child of the node. */ - get lastChild(): ChildNode | null; - /** - * Same as {@link children}. - * [DOM spec](https://dom.spec.whatwg.org)-compatible alias. - */ - get childNodes(): ChildNode[]; - set childNodes(children: ChildNode[]); -} -export declare class CDATA extends NodeWithChildren { - type: ElementType.CDATA; - get nodeType(): 4; -} -/** - * The root node of the document. - */ -export declare class Document extends NodeWithChildren { - type: ElementType.Root; - get nodeType(): 9; - /** [Document mode](https://dom.spec.whatwg.org/#concept-document-limited-quirks) (parse5 only). */ - "x-mode"?: "no-quirks" | "quirks" | "limited-quirks"; -} -/** - * The description of an individual attribute. - */ -interface Attribute { - name: string; - value: string; - namespace?: string; - prefix?: string; -} -/** - * An element within the DOM. - */ -export declare class Element extends NodeWithChildren { - name: string; - attribs: { - [name: string]: string; - }; - type: ElementType.Tag | ElementType.Script | ElementType.Style; - /** - * @param name Name of the tag, eg. `div`, `span`. - * @param attribs Object mapping attribute names to attribute values. - * @param children Children of the node. - */ - constructor(name: string, attribs: { - [name: string]: string; - }, children?: ChildNode[], type?: ElementType.Tag | ElementType.Script | ElementType.Style); - get nodeType(): 1; - /** - * `parse5` source code location info, with start & end tags. - * - * Available if parsing with parse5 and location info is enabled. - */ - sourceCodeLocation?: TagSourceCodeLocation | null; - /** - * Same as {@link name}. - * [DOM spec](https://dom.spec.whatwg.org)-compatible alias. - */ - get tagName(): string; - set tagName(name: string); - get attributes(): Attribute[]; - /** Element namespace (parse5 only). */ - namespace?: string; - /** Element attribute namespaces (parse5 only). */ - "x-attribsNamespace"?: Record<string, string>; - /** Element attribute namespace-related prefixes (parse5 only). */ - "x-attribsPrefix"?: Record<string, string>; -} -/** - * @param node Node to check. - * @returns `true` if the node is a `Element`, `false` otherwise. - */ -export declare function isTag(node: Node): node is Element; -/** - * @param node Node to check. - * @returns `true` if the node has the type `CDATA`, `false` otherwise. - */ -export declare function isCDATA(node: Node): node is CDATA; -/** - * @param node Node to check. - * @returns `true` if the node has the type `Text`, `false` otherwise. - */ -export declare function isText(node: Node): node is Text; -/** - * @param node Node to check. - * @returns `true` if the node has the type `Comment`, `false` otherwise. - */ -export declare function isComment(node: Node): node is Comment; -/** - * @param node Node to check. - * @returns `true` if the node has the type `ProcessingInstruction`, `false` otherwise. - */ -export declare function isDirective(node: Node): node is ProcessingInstruction; -/** - * @param node Node to check. - * @returns `true` if the node has the type `ProcessingInstruction`, `false` otherwise. - */ -export declare function isDocument(node: Node): node is Document; -/** - * @param node Node to check. - * @returns `true` if the node has children, `false` otherwise. - */ -export declare function hasChildren(node: Node): node is ParentNode; -/** - * Clone a node, and optionally its children. - * - * @param recursive Clone child nodes as well. - * @returns A clone of the node. - */ -export declare function cloneNode<T extends Node>(node: T, recursive?: boolean): T; -export {}; -//# sourceMappingURL=node.d.ts.map \ No newline at end of file diff --git a/node_modules/domhandler/lib/esm/node.d.ts.map b/node_modules/domhandler/lib/esm/node.d.ts.map deleted file mode 100644 index b8868ab..0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;AACH,wBAAgB,UAAU,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI,IAAI,QAAQ,CAEvD;AAED;;;GAGG;AACH,wBAAgB,WAAW,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI,IAAI,UAAU,CAE1D;AAED;;;;;GAKG;AACH,wBAAgB,SAAS,CAAC,CAAC,SAAS,IAAI,EAAE,IAAI,EAAE,CAAC,EAAE,SAAS,UAAQ,GAAG,CAAC,CA4DvE"} \ No newline at end of file diff --git a/node_modules/domhandler/lib/esm/node.js b/node_modules/domhandler/lib/esm/node.js deleted file mode 100644 index 972d9e1..0000000 --- a/node_modules/domhandler/lib/esm/node.js +++ /dev/null @@ -1,338 +0,0 @@ -import { ElementType, isTag as isTagRaw } from "domelementtype"; -/** - * This object will be used as the prototype for Nodes when creating a - * DOM-Level-1-compliant structure. - */ -export class Node { - constructor() { - /** Parent of the node */ - this.parent = null; - /** Previous sibling */ - this.prev = null; - /** Next sibling */ - this.next = null; - /** The start index of the node. Requires `withStartIndices` on the handler to be `true. */ - this.startIndex = null; - /** The end index of the node. Requires `withEndIndices` on the handler to be `true. */ - this.endIndex = null; - } - // Read-write aliases for properties - /** - * Same as {@link parent}. - * [DOM spec](https://dom.spec.whatwg.org)-compatible alias. - */ - get parentNode() { - return this.parent; - } - set parentNode(parent) { - this.parent = parent; - } - /** - * Same as {@link prev}. - * [DOM spec](https://dom.spec.whatwg.org)-compatible alias. - */ - get previousSibling() { - return this.prev; - } - set previousSibling(prev) { - this.prev = prev; - } - /** - * Same as {@link next}. - * [DOM spec](https://dom.spec.whatwg.org)-compatible alias. - */ - get nextSibling() { - return this.next; - } - set nextSibling(next) { - this.next = next; - } - /** - * Clone this node, and optionally its children. - * - * @param recursive Clone child nodes as well. - * @returns A clone of the node. - */ - cloneNode(recursive = false) { - return cloneNode(this, recursive); - } -} -/** - * A node that contains some data. - */ -export class DataNode extends Node { - /** - * @param data The content of the data node - */ - constructor(data) { - super(); - this.data = data; - } - /** - * Same as {@link data}. - * [DOM spec](https://dom.spec.whatwg.org)-compatible alias. - */ - get nodeValue() { - return this.data; - } - set nodeValue(data) { - this.data = data; - } -} -/** - * Text within the document. - */ -export class Text extends DataNode { - constructor() { - super(...arguments); - this.type = ElementType.Text; - } - get nodeType() { - return 3; - } -} -/** - * Comments within the document. - */ -export class Comment extends DataNode { - constructor() { - super(...arguments); - this.type = ElementType.Comment; - } - get nodeType() { - return 8; - } -} -/** - * Processing instructions, including doc types. - */ -export class ProcessingInstruction extends DataNode { - constructor(name, data) { - super(data); - this.name = name; - this.type = ElementType.Directive; - } - get nodeType() { - return 1; - } -} -/** - * A `Node` that can have children. - */ -export class NodeWithChildren extends Node { - /** - * @param children Children of the node. Only certain node types can have children. - */ - constructor(children) { - super(); - this.children = children; - } - // Aliases - /** First child of the node. */ - get firstChild() { - var _a; - return (_a = this.children[0]) !== null && _a !== void 0 ? _a : null; - } - /** Last child of the node. */ - get lastChild() { - return this.children.length > 0 - ? this.children[this.children.length - 1] - : null; - } - /** - * Same as {@link children}. - * [DOM spec](https://dom.spec.whatwg.org)-compatible alias. - */ - get childNodes() { - return this.children; - } - set childNodes(children) { - this.children = children; - } -} -export class CDATA extends NodeWithChildren { - constructor() { - super(...arguments); - this.type = ElementType.CDATA; - } - get nodeType() { - return 4; - } -} -/** - * The root node of the document. - */ -export class Document extends NodeWithChildren { - constructor() { - super(...arguments); - this.type = ElementType.Root; - } - get nodeType() { - return 9; - } -} -/** - * An element within the DOM. - */ -export class Element extends NodeWithChildren { - /** - * @param name Name of the tag, eg. `div`, `span`. - * @param attribs Object mapping attribute names to attribute values. - * @param children Children of the node. - */ - constructor(name, attribs, children = [], type = name === "script" - ? ElementType.Script - : name === "style" - ? ElementType.Style - : ElementType.Tag) { - super(children); - this.name = name; - this.attribs = attribs; - this.type = type; - } - get nodeType() { - return 1; - } - // DOM Level 1 aliases - /** - * Same as {@link name}. - * [DOM spec](https://dom.spec.whatwg.org)-compatible alias. - */ - get tagName() { - return this.name; - } - set tagName(name) { - this.name = name; - } - get attributes() { - return Object.keys(this.attribs).map((name) => { - var _a, _b; - return ({ - name, - value: this.attribs[name], - namespace: (_a = this["x-attribsNamespace"]) === null || _a === void 0 ? void 0 : _a[name], - prefix: (_b = this["x-attribsPrefix"]) === null || _b === void 0 ? void 0 : _b[name], - }); - }); - } -} -/** - * @param node Node to check. - * @returns `true` if the node is a `Element`, `false` otherwise. - */ -export function isTag(node) { - return isTagRaw(node); -} -/** - * @param node Node to check. - * @returns `true` if the node has the type `CDATA`, `false` otherwise. - */ -export function isCDATA(node) { - return node.type === ElementType.CDATA; -} -/** - * @param node Node to check. - * @returns `true` if the node has the type `Text`, `false` otherwise. - */ -export function isText(node) { - return node.type === ElementType.Text; -} -/** - * @param node Node to check. - * @returns `true` if the node has the type `Comment`, `false` otherwise. - */ -export function isComment(node) { - return node.type === ElementType.Comment; -} -/** - * @param node Node to check. - * @returns `true` if the node has the type `ProcessingInstruction`, `false` otherwise. - */ -export function isDirective(node) { - return node.type === ElementType.Directive; -} -/** - * @param node Node to check. - * @returns `true` if the node has the type `ProcessingInstruction`, `false` otherwise. - */ -export function isDocument(node) { - return node.type === ElementType.Root; -} -/** - * @param node Node to check. - * @returns `true` if the node has children, `false` otherwise. - */ -export function hasChildren(node) { - return Object.prototype.hasOwnProperty.call(node, "children"); -} -/** - * Clone a node, and optionally its children. - * - * @param recursive Clone child nodes as well. - * @returns A clone of the node. - */ -export function cloneNode(node, recursive = false) { - let result; - if (isText(node)) { - result = new Text(node.data); - } - else if (isComment(node)) { - result = new Comment(node.data); - } - else if (isTag(node)) { - const children = recursive ? cloneChildren(node.children) : []; - const clone = new Element(node.name, { ...node.attribs }, children); - children.forEach((child) => (child.parent = clone)); - if (node.namespace != null) { - clone.namespace = node.namespace; - } - if (node["x-attribsNamespace"]) { - clone["x-attribsNamespace"] = { ...node["x-attribsNamespace"] }; - } - if (node["x-attribsPrefix"]) { - clone["x-attribsPrefix"] = { ...node["x-attribsPrefix"] }; - } - result = clone; - } - else if (isCDATA(node)) { - const children = recursive ? cloneChildren(node.children) : []; - const clone = new CDATA(children); - children.forEach((child) => (child.parent = clone)); - result = clone; - } - else if (isDocument(node)) { - const children = recursive ? cloneChildren(node.children) : []; - const clone = new Document(children); - children.forEach((child) => (child.parent = clone)); - if (node["x-mode"]) { - clone["x-mode"] = node["x-mode"]; - } - result = clone; - } - else if (isDirective(node)) { - const instruction = new ProcessingInstruction(node.name, node.data); - if (node["x-name"] != null) { - instruction["x-name"] = node["x-name"]; - instruction["x-publicId"] = node["x-publicId"]; - instruction["x-systemId"] = node["x-systemId"]; - } - result = instruction; - } - else { - throw new Error(`Not implemented yet: ${node.type}`); - } - result.startIndex = node.startIndex; - result.endIndex = node.endIndex; - if (node.sourceCodeLocation != null) { - result.sourceCodeLocation = node.sourceCodeLocation; - } - return result; -} -function cloneChildren(childs) { - const children = childs.map((child) => cloneNode(child, true)); - for (let i = 1; i < children.length; i++) { - children[i].prev = children[i - 1]; - children[i - 1].next = children[i]; - } - return children; -} diff --git a/node_modules/domhandler/lib/esm/package.json b/node_modules/domhandler/lib/esm/package.json deleted file mode 100644 index 089153b..0000000 --- a/node_modules/domhandler/lib/esm/package.json +++ /dev/null @@ -1 +0,0 @@ -{"type":"module"} diff --git a/node_modules/domhandler/lib/index.d.ts b/node_modules/domhandler/lib/index.d.ts deleted file mode 100644 index 5d322c1..0000000 --- a/node_modules/domhandler/lib/index.d.ts +++ /dev/null @@ -1,76 +0,0 @@ -import { ChildNode, Element, DataNode, Document, ParentNode } from "./node.js"; -export * from "./node.js"; -export interface DomHandlerOptions { - /** - * Add a `startIndex` property to nodes. - * When the parser is used in a non-streaming fashion, `startIndex` is an integer - * indicating the position of the start of the node in the document. - * - * @default false - */ - withStartIndices?: boolean; - /** - * Add an `endIndex` property to nodes. - * When the parser is used in a non-streaming fashion, `endIndex` is an integer - * indicating the position of the end of the node in the document. - * - * @default false - */ - withEndIndices?: boolean; - /** - * Treat the markup as XML. - * - * @default false - */ - xmlMode?: boolean; -} -interface ParserInterface { - startIndex: number | null; - endIndex: number | null; -} -declare type Callback = (error: Error | null, dom: ChildNode[]) => void; -declare type ElementCallback = (element: Element) => void; -export declare class DomHandler { - /** The elements of the DOM */ - dom: ChildNode[]; - /** The root element for the DOM */ - root: Document; - /** Called once parsing has completed. */ - private readonly callback; - /** Settings for the handler. */ - private readonly options; - /** Callback whenever a tag is closed. */ - private readonly elementCB; - /** Indicated whether parsing has been completed. */ - private done; - /** Stack of open tags. */ - protected tagStack: ParentNode[]; - /** A data node that is still being written to. */ - protected lastNode: DataNode | null; - /** Reference to the parser instance. Used for location information. */ - private parser; - /** - * @param callback Called once parsing has completed. - * @param options Settings for the handler. - * @param elementCB Callback whenever a tag is closed. - */ - constructor(callback?: Callback | null, options?: DomHandlerOptions | null, elementCB?: ElementCallback); - onparserinit(parser: ParserInterface): void; - onreset(): void; - onend(): void; - onerror(error: Error): void; - onclosetag(): void; - onopentag(name: string, attribs: { - [key: string]: string; - }): void; - ontext(data: string): void; - oncomment(data: string): void; - oncommentend(): void; - oncdatastart(): void; - oncdataend(): void; - onprocessinginstruction(name: string, data: string): void; - protected handleCallback(error: Error | null): void; - protected addNode(node: ChildNode): void; -} -export default DomHandler; -//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/domhandler/lib/index.d.ts.map b/node_modules/domhandler/lib/index.d.ts.map deleted file mode 100644 index 90dbc4b..0000000 --- a/node_modules/domhandler/lib/index.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EACH,SAAS,EACT,OAAO,EACP,QAAQ,EAIR,QAAQ,EAER,UAAU,EACb,MAAM,WAAW,CAAC;AAEnB,cAAc,WAAW,CAAC;AAE1B,MAAM,WAAW,iBAAiB;IAC9B;;;;;;OAMG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAE3B;;;;;;OAMG;IACH,cAA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AM,EAAE,OAAO,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,GAAG,IAAI;IAOjE,MAAM,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI;IAe1B,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI;IAW7B,YAAY,IAAI,IAAI;IAIpB,YAAY,IAAI,IAAI;IAUpB,UAAU,IAAI,IAAI;IAIlB,uBAAuB,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,IAAI;IAKhE,SAAS,CAAC,cAAc,CAAC,KAAK,EAAE,KAAK,GAAG,IAAI,GAAG,IAAI;IAQnD,SAAS,CAAC,OAAO,CAAC,IAAI,EAAE,SAAS,GAAG,IAAI;CAwB3C;AAED,eAAe,UAAU,CAAC"} \ No newline at end of file diff --git a/node_modules/domhandler/lib/index.js b/node_modules/domhandler/lib/index.js deleted file mode 100644 index 9c4ea0e..0000000 --- a/node_modules/domhandler/lib/index.js +++ /dev/null @@ -1,165 +0,0 @@ -"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.DomHandler = void 0; -var domelementtype_1 = require("domelementtype"); -var node_js_1 = require("./node.js"); -__exportStar(require("./node.js"), exports); -// Default options -var defaultOpts = { - withStartIndices: false, - withEndIndices: false, - xmlMode: false, -}; -var DomHandler = /** @class */ (function () { - /** - * @param callback Called once parsing has completed. - * @param options Settings for the handler. - * @param elementCB Callback whenever a tag is closed. - */ - function DomHandler(callback, options, elementCB) { - /** The elements of the DOM */ - this.dom = []; - /** The root element for the DOM */ - this.root = new node_js_1.Document(this.dom); - /** Indicated whether parsing has been completed. */ - this.done = false; - /** Stack of open tags. */ - this.tagStack = [this.root]; - /** A data node that is still being written to. */ - this.lastNode = null; - /** Reference to the parser instance. Used for location information. */ - this.parser = null; - // Make it possible to skip arguments, for backwards-compatibility - if (typeof options === "function") { - elementCB = options; - options = defaultOpts; - } - if (typeof callback === "object") { - options = callback; - callback = undefined; - } - this.callback = callback !== null && callback !== void 0 ? callback : null; - this.options = options !== null && options !== void 0 ? options : defaultOpts; - this.elementCB = elementCB !== null && elementCB !== void 0 ? elementCB : null; - } - DomHandler.prototype.onparserinit = function (parser) { - this.parser = parser; - }; - // Resets the handler back to starting state - DomHandler.prototype.onreset = function () { - this.dom = []; - this.root = new node_js_1.Document(this.dom); - this.done = false; - this.tagStack = [this.root]; - this.lastNode = null; - this.parser = null; - }; - // Signals the handler that parsing is done - DomHandler.prototype.onend = function () { - if (this.done) - return; - this.done = true; - this.parser = null; - this.handleCallback(null); - }; - DomHandler.prototype.onerror = function (error) { - this.handleCallback(error); - }; - DomHandler.prototype.onclosetag = function () { - this.lastNode = null; - var elem = this.tagStack.pop(); - if (this.options.withEndIndices) { - elem.endIndex = this.parser.endIndex; - } - if (this.elementCB) - this.elementCB(elem); - }; - DomHandler.prototype.onopentag = function (name, attribs) { - var type = this.options.xmlMode ? domelementtype_1.ElementType.Tag : undefined; - var element = new node_js_1.Element(name, attribs, undefined, type); - this.addNode(element); - this.tagStack.push(element); - }; - DomHandler.prototype.ontext = function (data) { - var lastNode = this.lastNode; - if (lastNode && lastNode.type === domelementtype_1.ElementType.Text) { - lastNode.data += data; - if (this.options.withEndIndices) { - lastNode.endIndex = this.parser.endIndex; - } - } - else { - var node = new node_js_1.Text(data); - this.addNode(node); - this.lastNode = node; - } - }; - DomHandler.prototype.oncomment = function (data) { - if (this.lastNode && this.lastNode.type === domelementtype_1.ElementType.Comment) { - this.lastNode.data += data; - return; - } - var node = new node_js_1.Comment(data); - this.addNode(node); - this.lastNode = node; - }; - DomHandler.prototype.oncommentend = function () { - this.lastNode = null; - }; - DomHandler.prototype.oncdatastart = function () { - var text = new node_js_1.Text(""); - var node = new node_js_1.CDATA([text]); - this.addNode(node); - text.parent = node; - this.lastNode = text; - }; - DomHandler.prototype.oncdataend = function () { - this.lastNode = null; - }; - DomHandler.prototype.onprocessinginstruction = function (name, data) { - var node = new node_js_1.ProcessingInstruction(name, data); - this.addNode(node); - }; - DomHandler.prototype.handleCallback = function (error) { - if (typeof this.callback === "function") { - this.callback(error, this.dom); - } - else if (error) { - throw error; - } - }; - DomHandler.prototype.addNode = function (node) { - var parent = this.tagStack[this.tagStack.length - 1]; - var previousSibling = parent.children[parent.children.length - 1]; - if (this.options.withStartIndices) { - node.startIndex = this.parser.startIndex; - } - if (this.options.withEndIndices) { - node.endIndex = this.parser.endIndex; - } - parent.children.push(node); - if (previousSibling) { - node.prev = previousSibling; - previousSibling.next = node; - } - node.parent = parent; - this.lastNode = null; - }; - return DomHandler; -}()); -exports.DomHandler = DomHandler; -exports.default = DomHandler; diff --git a/node_modules/domhandler/lib/node.d.ts b/node_modules/domhandler/lib/node.d.ts deleted file mode 100644 index b71c88a..0000000 --- a/node_modules/domhandler/lib/node.d.ts +++ /dev/null @@ -1,245 +0,0 @@ -import { ElementType } from "domelementtype"; -interface SourceCodeLocation { - /** One-based line index of the first character. */ - startLine: number; - /** One-based column index of the first character. */ - startCol: number; - /** Zero-based first character index. */ - startOffset: number; - /** One-based line index of the last character. */ - endLine: number; - /** One-based column index of the last character. Points directly *after* the last character. */ - endCol: number; - /** Zero-based last character index. Points directly *after* the last character. */ - endOffset: number; -} -interface TagSourceCodeLocation extends SourceCodeLocation { - startTag?: SourceCodeLocation; - endTag?: SourceCodeLocation; -} -export declare type ParentNode = Document | Element | CDATA; -export declare type ChildNode = Text | Comment | ProcessingInstruction | Element | CDATA | Document; -export declare type AnyNode = ParentNode | ChildNode; -/** - * This object will be used as the prototype for Nodes when creating a - * DOM-Level-1-compliant structure. - */ -export declare abstract class Node { - /** The type of the node. */ - abstract readonly type: ElementType; - /** Parent of the node */ - parent: ParentNode | null; - /** Previous sibling */ - prev: ChildNode | null; - /** Next sibling */ - next: ChildNode | null; - /** The start index of the node. Requires `withStartIndices` on the handler to be `true. */ - startIndex: number | null; - /** The end index of the node. Requires `withEndIndices` on the handler to be `true. */ - endIndex: number | null; - /** - * `parse5` source code location info. - * - * Available if parsing with parse5 and location info is enabled. - */ - sourceCodeLocation?: SourceCodeLocation | null; - /** - * [DOM spec](https://dom.spec.whatwg.org/#dom-node-nodetype)-compatible - * node {@link type}. - */ - abstract readonly nodeType: number; - /** - * Same as {@link parent}. - * [DOM spec](https://dom.spec.whatwg.org)-compatible alias. - */ - get parentNode(): ParentNode | null; - set parentNode(parent: ParentNode | null); - /** - * Same as {@link prev}. - * [DOM spec](https://dom.spec.whatwg.org)-compatible alias. - */ - get previousSibling(): ChildNode | null; - set previousSibling(prev: ChildNode | null); - /** - * Same as {@link next}. - * [DOM spec](https://dom.spec.whatwg.org)-compatible alias. - */ - get nextSibling(): ChildNode | null; - set nextSibling(next: ChildNode | null); - /** - * Clone this node, and optionally its children. - * - * @param recursive Clone child nodes as well. - * @returns A clone of the node. - */ - cloneNode<T extends Node>(this: T, recursive?: boolean): T; -} -/** - * A node that contains some data. - */ -export declare abstract class DataNode extends Node { - data: string; - /** - * @param data The content of the data node - */ - constructor(data: string); - /** - * Same as {@link data}. - * [DOM spec](https://dom.spec.whatwg.org)-compatible alias. - */ - get nodeValue(): string; - set nodeValue(data: string); -} -/** - * Text within the document. - */ -export declare class Text extends DataNode { - type: ElementType.Text; - get nodeType(): 3; -} -/** - * Comments within the document. - */ -export declare class Comment extends DataNode { - type: ElementType.Comment; - get nodeType(): 8; -} -/** - * Processing instructions, including doc types. - */ -export declare class ProcessingInstruction extends DataNode { - name: string; - type: ElementType.Directive; - constructor(name: string, data: string); - get nodeType(): 1; - /** If this is a doctype, the document type name (parse5 only). */ - "x-name"?: string; - /** If this is a doctype, the document type public identifier (parse5 only). */ - "x-publicId"?: string; - /** If this is a doctype, the document type system identifier (parse5 only). */ - "x-systemId"?: string; -} -/** - * A `Node` that can have children. - */ -export declare abstract class NodeWithChildren extends Node { - children: ChildNode[]; - /** - * @param children Children of the node. Only certain node types can have children. - */ - constructor(children: ChildNode[]); - /** First child of the node. */ - get firstChild(): ChildNode | null; - /** Last child of the node. */ - get lastChild(): ChildNode | null; - /** - * Same as {@link children}. - * [DOM spec](https://dom.spec.whatwg.org)-compatible alias. - */ - get childNodes(): ChildNode[]; - set childNodes(children: ChildNode[]); -} -export declare class CDATA extends NodeWithChildren { - type: ElementType.CDATA; - get nodeType(): 4; -} -/** - * The root node of the document. - */ -export declare class Document extends NodeWithChildren { - type: ElementType.Root; - get nodeType(): 9; - /** [Document mode](https://dom.spec.whatwg.org/#concept-document-limited-quirks) (parse5 only). */ - "x-mode"?: "no-quirks" | "quirks" | "limited-quirks"; -} -/** - * The description of an individual attribute. - */ -interface Attribute { - name: string; - value: string; - namespace?: string; - prefix?: string; -} -/** - * An element within the DOM. - */ -export declare class Element extends NodeWithChildren { - name: string; - attribs: { - [name: string]: string; - }; - type: ElementType.Tag | ElementType.Script | ElementType.Style; - /** - * @param name Name of the tag, eg. `div`, `span`. - * @param attribs Object mapping attribute names to attribute values. - * @param children Children of the node. - */ - constructor(name: string, attribs: { - [name: string]: string; - }, children?: ChildNode[], type?: ElementType.Tag | ElementType.Script | ElementType.Style); - get nodeType(): 1; - /** - * `parse5` source code location info, with start & end tags. - * - * Available if parsing with parse5 and location info is enabled. - */ - sourceCodeLocation?: TagSourceCodeLocation | null; - /** - * Same as {@link name}. - * [DOM spec](https://dom.spec.whatwg.org)-compatible alias. - */ - get tagName(): string; - set tagName(name: string); - get attributes(): Attribute[]; - /** Element namespace (parse5 only). */ - namespace?: string; - /** Element attribute namespaces (parse5 only). */ - "x-attribsNamespace"?: Record<string, string>; - /** Element attribute namespace-related prefixes (parse5 only). */ - "x-attribsPrefix"?: Record<string, string>; -} -/** - * @param node Node to check. - * @returns `true` if the node is a `Element`, `false` otherwise. - */ -export declare function isTag(node: Node): node is Element; -/** - * @param node Node to check. - * @returns `true` if the node has the type `CDATA`, `false` otherwise. - */ -export declare function isCDATA(node: Node): node is CDATA; -/** - * @param node Node to check. - * @returns `true` if the node has the type `Text`, `false` otherwise. - */ -export declare function isText(node: Node): node is Text; -/** - * @param node Node to check. - * @returns `true` if the node has the type `Comment`, `false` otherwise. - */ -export declare function isComment(node: Node): node is Comment; -/** - * @param node Node to check. - * @returns `true` if the node has the type `ProcessingInstruction`, `false` otherwise. - */ -export declare function isDirective(node: Node): node is ProcessingInstruction; -/** - * @param node Node to check. - * @returns `true` if the node has the type `ProcessingInstruction`, `false` otherwise. - */ -export declare function isDocument(node: Node): node is Document; -/** - * @param node Node to check. - * @returns `true` if the node has children, `false` otherwise. - */ -export declare function hasChildren(node: Node): node is ParentNode; -/** - * Clone a node, and optionally its children. - * - * @param recursive Clone child nodes as well. - * @returns A clone of the node. - */ -export declare function cloneNode<T extends Node>(node: T, recursive?: boolean): T; -export {}; -//# sourceMappingURL=node.d.ts.map \ No newline at end of file diff --git a/node_modules/domhandler/lib/node.d.ts.map b/node_modules/domhandler/lib/node.d.ts.map deleted file mode 100644 index 40fa82e..0000000 --- a/node_modules/domhandler/lib/node.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"node.d.ts","sourceRoot":"","sources":["../src/node.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAqB,MAAM,gBAAgB,CAAC;AAEhE,UAAU,kBAAkB;IACxB,mDAAmD;IACnD,SAAS,EAAE,MAAM,CAAC;IAClB,qDAAqD;IACrD,QAAQ,EAAE,MAAM,CAAC;IACjB,wCAAwC;IACxC,WAAW,EAAE,MAAM,CA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modules/domhandler/lib/node.js deleted file mode 100644 index df08e5b..0000000 --- a/node_modules/domhandler/lib/node.js +++ /dev/null @@ -1,474 +0,0 @@ -"use strict"; -var __extends = (this && this.__extends) || (function () { - 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); - }; - return 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 __()); - }; -})(); -var __assign = (this && this.__assign) || function () { - __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; - }; - return __assign.apply(this, arguments); -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.cloneNode = exports.hasChildren = exports.isDocument = exports.isDirective = exports.isComment = exports.isText = exports.isCDATA = exports.isTag = exports.Element = exports.Document = exports.CDATA = exports.NodeWithChildren = exports.ProcessingInstruction = exports.Comment = exports.Text = exports.DataNode = exports.Node = void 0; -var domelementtype_1 = require("domelementtype"); -/** - * This object will be used as the prototype for Nodes when creating a - * DOM-Level-1-compliant structure. - */ -var Node = /** @class */ (function () { - function Node() { - /** Parent of the node */ - this.parent = null; - /** Previous sibling */ - this.prev = null; - /** Next sibling */ - this.next = null; - /** The start index of the node. Requires `withStartIndices` on the handler to be `true. */ - this.startIndex = null; - /** The end index of the node. Requires `withEndIndices` on the handler to be `true. */ - this.endIndex = null; - } - Object.defineProperty(Node.prototype, "parentNode", { - // Read-write aliases for properties - /** - * Same as {@link parent}. - * [DOM spec](https://dom.spec.whatwg.org)-compatible alias. - */ - get: function () { - return this.parent; - }, - set: function (parent) { - this.parent = parent; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(Node.prototype, "previousSibling", { - /** - * Same as {@link prev}. - * [DOM spec](https://dom.spec.whatwg.org)-compatible alias. - */ - get: function () { - return this.prev; - }, - set: function (prev) { - this.prev = prev; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(Node.prototype, "nextSibling", { - /** - * Same as {@link next}. - * [DOM spec](https://dom.spec.whatwg.org)-compatible alias. - */ - get: function () { - return this.next; - }, - set: function (next) { - this.next = next; - }, - enumerable: false, - configurable: true - }); - /** - * Clone this node, and optionally its children. - * - * @param recursive Clone child nodes as well. - * @returns A clone of the node. - */ - Node.prototype.cloneNode = function (recursive) { - if (recursive === void 0) { recursive = false; } - return cloneNode(this, recursive); - }; - return Node; -}()); -exports.Node = Node; -/** - * A node that contains some data. - */ -var DataNode = /** @class */ (function (_super) { - __extends(DataNode, _super); - /** - * @param data The content of the data node - */ - function DataNode(data) { - var _this = _super.call(this) || this; - _this.data = data; - return _this; - } - Object.defineProperty(DataNode.prototype, "nodeValue", { - /** - * Same as {@link data}. - * [DOM spec](https://dom.spec.whatwg.org)-compatible alias. - */ - get: function () { - return this.data; - }, - set: function (data) { - this.data = data; - }, - enumerable: false, - configurable: true - }); - return DataNode; -}(Node)); -exports.DataNode = DataNode; -/** - * Text within the document. - */ -var Text = /** @class */ (function (_super) { - __extends(Text, _super); - function Text() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this.type = domelementtype_1.ElementType.Text; - return _this; - } - Object.defineProperty(Text.prototype, "nodeType", { - get: function () { - return 3; - }, - enumerable: false, - configurable: true - }); - return Text; -}(DataNode)); -exports.Text = Text; -/** - * Comments within the document. - */ -var Comment = /** @class */ (function (_super) { - __extends(Comment, _super); - function Comment() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this.type = domelementtype_1.ElementType.Comment; - return _this; - } - Object.defineProperty(Comment.prototype, "nodeType", { - get: function () { - return 8; - }, - enumerable: false, - configurable: true - }); - return Comment; -}(DataNode)); -exports.Comment = Comment; -/** - * Processing instructions, including doc types. - */ -var ProcessingInstruction = /** @class */ (function (_super) { - __extends(ProcessingInstruction, _super); - function ProcessingInstruction(name, data) { - var _this = _super.call(this, data) || this; - _this.name = name; - _this.type = domelementtype_1.ElementType.Directive; - return _this; - } - Object.defineProperty(ProcessingInstruction.prototype, "nodeType", { - get: function () { - return 1; - }, - enumerable: false, - configurable: true - }); - return ProcessingInstruction; -}(DataNode)); -exports.ProcessingInstruction = ProcessingInstruction; -/** - * A `Node` that can have children. - */ -var NodeWithChildren = /** @class */ (function (_super) { - __extends(NodeWithChildren, _super); - /** - * @param children Children of the node. Only certain node types can have children. - */ - function NodeWithChildren(children) { - var _this = _super.call(this) || this; - _this.children = children; - return _this; - } - Object.defineProperty(NodeWithChildren.prototype, "firstChild", { - // Aliases - /** First child of the node. */ - get: function () { - var _a; - return (_a = this.children[0]) !== null && _a !== void 0 ? _a : null; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(NodeWithChildren.prototype, "lastChild", { - /** Last child of the node. */ - get: function () { - return this.children.length > 0 - ? this.children[this.children.length - 1] - : null; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(NodeWithChildren.prototype, "childNodes", { - /** - * Same as {@link children}. - * [DOM spec](https://dom.spec.whatwg.org)-compatible alias. - */ - get: function () { - return this.children; - }, - set: function (children) { - this.children = children; - }, - enumerable: false, - configurable: true - }); - return NodeWithChildren; -}(Node)); -exports.NodeWithChildren = NodeWithChildren; -var CDATA = /** @class */ (function (_super) { - __extends(CDATA, _super); - function CDATA() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this.type = domelementtype_1.ElementType.CDATA; - return _this; - } - Object.defineProperty(CDATA.prototype, "nodeType", { - get: function () { - return 4; - }, - enumerable: false, - configurable: true - }); - return CDATA; -}(NodeWithChildren)); -exports.CDATA = CDATA; -/** - * The root node of the document. - */ -var Document = /** @class */ (function (_super) { - __extends(Document, _super); - function Document() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this.type = domelementtype_1.ElementType.Root; - return _this; - } - Object.defineProperty(Document.prototype, "nodeType", { - get: function () { - return 9; - }, - enumerable: false, - configurable: true - }); - return Document; -}(NodeWithChildren)); -exports.Document = Document; -/** - * An element within the DOM. - */ -var Element = /** @class */ (function (_super) { - __extends(Element, _super); - /** - * @param name Name of the tag, eg. `div`, `span`. - * @param attribs Object mapping attribute names to attribute values. - * @param children Children of the node. - */ - function Element(name, attribs, children, type) { - if (children === void 0) { children = []; } - if (type === void 0) { type = name === "script" - ? domelementtype_1.ElementType.Script - : name === "style" - ? domelementtype_1.ElementType.Style - : domelementtype_1.ElementType.Tag; } - var _this = _super.call(this, children) || this; - _this.name = name; - _this.attribs = attribs; - _this.type = type; - return _this; - } - Object.defineProperty(Element.prototype, "nodeType", { - get: function () { - return 1; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(Element.prototype, "tagName", { - // DOM Level 1 aliases - /** - * Same as {@link name}. - * [DOM spec](https://dom.spec.whatwg.org)-compatible alias. - */ - get: function () { - return this.name; - }, - set: function (name) { - this.name = name; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(Element.prototype, "attributes", { - get: function () { - var _this = this; - return Object.keys(this.attribs).map(function (name) { - var _a, _b; - return ({ - name: name, - value: _this.attribs[name], - namespace: (_a = _this["x-attribsNamespace"]) === null || _a === void 0 ? void 0 : _a[name], - prefix: (_b = _this["x-attribsPrefix"]) === null || _b === void 0 ? void 0 : _b[name], - }); - }); - }, - enumerable: false, - configurable: true - }); - return Element; -}(NodeWithChildren)); -exports.Element = Element; -/** - * @param node Node to check. - * @returns `true` if the node is a `Element`, `false` otherwise. - */ -function isTag(node) { - return (0, domelementtype_1.isTag)(node); -} -exports.isTag = isTag; -/** - * @param node Node to check. - * @returns `true` if the node has the type `CDATA`, `false` otherwise. - */ -function isCDATA(node) { - return node.type === domelementtype_1.ElementType.CDATA; -} -exports.isCDATA = isCDATA; -/** - * @param node Node to check. - * @returns `true` if the node has the type `Text`, `false` otherwise. - */ -function isText(node) { - return node.type === domelementtype_1.ElementType.Text; -} -exports.isText = isText; -/** - * @param node Node to check. - * @returns `true` if the node has the type `Comment`, `false` otherwise. - */ -function isComment(node) { - return node.type === domelementtype_1.ElementType.Comment; -} -exports.isComment = isComment; -/** - * @param node Node to check. - * @returns `true` if the node has the type `ProcessingInstruction`, `false` otherwise. - */ -function isDirective(node) { - return node.type === domelementtype_1.ElementType.Directive; -} -exports.isDirective = isDirective; -/** - * @param node Node to check. - * @returns `true` if the node has the type `ProcessingInstruction`, `false` otherwise. - */ -function isDocument(node) { - return node.type === domelementtype_1.ElementType.Root; -} -exports.isDocument = isDocument; -/** - * @param node Node to check. - * @returns `true` if the node has children, `false` otherwise. - */ -function hasChildren(node) { - return Object.prototype.hasOwnProperty.call(node, "children"); -} -exports.hasChildren = hasChildren; -/** - * Clone a node, and optionally its children. - * - * @param recursive Clone child nodes as well. - * @returns A clone of the node. - */ -function cloneNode(node, recursive) { - if (recursive === void 0) { recursive = false; } - var result; - if (isText(node)) { - result = new Text(node.data); - } - else if (isComment(node)) { - result = new Comment(node.data); - } - else if (isTag(node)) { - var children = recursive ? cloneChildren(node.children) : []; - var clone_1 = new Element(node.name, __assign({}, node.attribs), children); - children.forEach(function (child) { return (child.parent = clone_1); }); - if (node.namespace != null) { - clone_1.namespace = node.namespace; - } - if (node["x-attribsNamespace"]) { - clone_1["x-attribsNamespace"] = __assign({}, node["x-attribsNamespace"]); - } - if (node["x-attribsPrefix"]) { - clone_1["x-attribsPrefix"] = __assign({}, node["x-attribsPrefix"]); - } - result = clone_1; - } - else if (isCDATA(node)) { - var children = recursive ? cloneChildren(node.children) : []; - var clone_2 = new CDATA(children); - children.forEach(function (child) { return (child.parent = clone_2); }); - result = clone_2; - } - else if (isDocument(node)) { - var children = recursive ? cloneChildren(node.children) : []; - var clone_3 = new Document(children); - children.forEach(function (child) { return (child.parent = clone_3); }); - if (node["x-mode"]) { - clone_3["x-mode"] = node["x-mode"]; - } - result = clone_3; - } - else if (isDirective(node)) { - var instruction = new ProcessingInstruction(node.name, node.data); - if (node["x-name"] != null) { - instruction["x-name"] = node["x-name"]; - instruction["x-publicId"] = node["x-publicId"]; - instruction["x-systemId"] = node["x-systemId"]; - } - result = instruction; - } - else { - throw new Error("Not implemented yet: ".concat(node.type)); - } - result.startIndex = node.startIndex; - result.endIndex = node.endIndex; - if (node.sourceCodeLocation != null) { - result.sourceCodeLocation = node.sourceCodeLocation; - } - return result; -} -exports.cloneNode = cloneNode; -function cloneChildren(childs) { - var children = childs.map(function (child) { return cloneNode(child, true); }); - for (var i = 1; i < children.length; i++) { - children[i].prev = children[i - 1]; - children[i - 1].next = children[i]; - } - return children; -} diff --git a/node_modules/domhandler/package.json b/node_modules/domhandler/package.json deleted file mode 100644 index f80da8e..0000000 --- a/node_modules/domhandler/package.json +++ /dev/null @@ -1,73 +0,0 @@ -{ - "name": "domhandler", - "version": "5.0.3", - "description": "Handler for htmlparser2 that turns pages into a dom", - "author": "Felix Boehm <me@feedic.com>", - "funding": { - "url": "https://github.com/fb55/domhandler?sponsor=1" - }, - "license": "BSD-2-Clause", - "main": "lib/index.js", - "types": "lib/index.d.ts", - "module": "lib/esm/index.js", - "exports": { - "require": "./lib/index.js", - "import": "./lib/esm/index.js" - }, - "sideEffects": false, - "files": [ - "lib" - ], - "scripts": { - "test": "npm run test:jest && npm run lint", - "test:jest": "jest", - "lint": "npm run lint:es && npm run lint:prettier", - "lint:es": "eslint --ignore-path .gitignore .", - "lint:prettier": "npm run prettier -- --check", - "format": "npm run format:es && npm run format:prettier", - "format:es": "npm run lint:es -- --fix", - "format:prettier": "npm run prettier -- --write", - "prettier": "prettier \"**/*.{ts,md,json,yml}\" --ignore-path .gitignore", - "build": "npm run build:cjs && npm run build:esm", - "build:cjs": "tsc", - "build:esm": "tsc --module esnext --target es2019 --outDir lib/esm && echo '{\"type\":\"module\"}' > lib/esm/package.json", - "prepare": "npm run build" - }, - "repository": { - "type": "git", - "url": "git://github.com/fb55/domhandler.git" - }, - "keywords": [ - "dom", - "htmlparser2" - ], - "engines": { - "node": ">= 4" - }, - "dependencies": { - "domelementtype": "^2.3.0" - }, - "devDependencies": { - "@types/jest": "^27.4.1", - "@types/node": "^17.0.30", - "@typescript-eslint/eslint-plugin": "^5.21.0", - "@typescript-eslint/parser": "^5.21.0", - "eslint": "^8.14.0", - "eslint-config-prettier": "^8.5.0", - "htmlparser2": "^8.0.0", - "jest": "^27.5.1", - "prettier": "^2.6.2", - "ts-jest": "^27.1.4", - "typescript": "^4.6.4" - }, - "jest": { - "preset": "ts-jest", - "testEnvironment": "node", - "moduleNameMapper": { - "^(.*)\\.js$": "$1" - } - }, - "prettier": { - "tabWidth": 4 - } -} diff --git a/node_modules/domutils/lib/esm/feeds.d.ts b/node_modules/domutils/lib/esm/feeds.d.ts deleted file mode 100644 index 19badb7..0000000 --- a/node_modules/domutils/lib/esm/feeds.d.ts +++ /dev/null @@ -1,71 +0,0 @@ -import type { AnyNode } from "domhandler"; -/** - * The medium of a media item. - * - * @category Feeds - */ -export type FeedItemMediaMedium = "image" | "audio" | "video" | "document" | "executable"; -/** - * The type of a media item. - * - * @category Feeds - */ -export type FeedItemMediaExpression = "sample" | "full" | "nonstop"; -/** - * A media item of a feed entry. - * - * @category Feeds - */ -export interface FeedItemMedia { - medium: FeedItemMediaMedium | undefined; - isDefault: boolean; - url?: string; - fileSize?: number; - type?: string; - expression?: FeedItemMediaExpression; - bitrate?: number; - framerate?: number; - samplingrate?: number; - channels?: number; - duration?: number; - height?: number; - width?: number; - lang?: string; -} -/** - * An entry of a feed. - * - * @category Feeds - */ -export interface FeedItem { - id?: string; - title?: string; - link?: string; - description?: string; - pubDate?: Date; - media: FeedItemMedia[]; -} -/** - * The root of a feed. - * - * @category Feeds - */ -export interface Feed { - type: string; - id?: string; - title?: string; - link?: string; - description?: string; - updated?: Date; - author?: string; - items: FeedItem[]; -} -/** - * Get the feed object from the root of a DOM tree. - * - * @category Feeds - * @param doc - The DOM to to extract the feed from. - * @returns The feed. - */ -export declare function getFeed(doc: AnyNode[]): Feed | null; -//# sourceMappingURL=feeds.d.ts.map \ No newline at end of file diff --git a/node_modules/domutils/lib/esm/feeds.d.ts.map b/node_modules/domutils/lib/esm/feeds.d.ts.map deleted file mode 100644 index 37a29bf..0000000 --- a/node_modules/domutils/lib/esm/feeds.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"feeds.d.ts","sourceRoot":"https://raw.githubusercontent.com/fb55/domutils/0ab8bcf1ecfc70dfc93291a4cb2496578ac25e9c/src/","sources":["feeds.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAW,MAAM,YAAY,CAAC;AAInD;;;;GAIG;AACH,MAAM,MAAM,mBAAmB,GACzB,OAAO,GACP,OAAO,GACP,OAAO,GACP,UAAU,GACV,YAAY,CAAC;AAEnB;;;;GAIG;AACH,MAAM,MAAM,uBAAuB,GAAG,QAAQ,GAAG,MAAM,GAAG,SAAS,CAAC;AAEpE;;;;GAIG;AACH,MAAM,WAAW,aAAa;IAC1B,MAAM,EAAE,mBAAmB,GAAG,SAAS,CAAC;IACxC,SAAS,EAAE,OAAO,CAAC;IACnB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,UAAU,CAAC,EAAE,uBAAuB,CAAC;IACrC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;;;GAIG;AACH,MAAM,WAAW,QAAQ;IACrB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,CAAC,EAAE,IAAI,CAAC;IACf,KAAK,EAAE,aAAa,EAAE,CAAC;CAC1B;AAED;;;;GAIG;AACH,MAAM,WAAW,IAAI;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,CAAC,EAAE,IAAI,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,QAAQ,EAAE,CAAC;CACrB;AAED;;;;;;GAMG;AACH,wBAAgB,OAAO,CAAC,GAAG,EAAE,OAAO,EAAE,GAAG,IAAI,GAAG,IAAI,CAQnD"} \ No newline at end of file diff --git a/node_modules/domutils/lib/esm/feeds.js b/node_modules/domutils/lib/esm/feeds.js deleted file mode 100644 index df0210a..0000000 --- a/node_modules/domutils/lib/esm/feeds.js +++ /dev/null @@ -1,183 +0,0 @@ -import { textContent } from "./stringify.js"; -import { getElementsByTagName } from "./legacy.js"; -/** - * Get the feed object from the root of a DOM tree. - * - * @category Feeds - * @param doc - The DOM to to extract the feed from. - * @returns The feed. - */ -export function getFeed(doc) { - const feedRoot = getOneElement(isValidFeed, doc); - return !feedRoot - ? null - : feedRoot.name === "feed" - ? getAtomFeed(feedRoot) - : getRssFeed(feedRoot); -} -/** - * Parse an Atom feed. - * - * @param feedRoot The root of the feed. - * @returns The parsed feed. - */ -function getAtomFeed(feedRoot) { - var _a; - const childs = feedRoot.children; - const feed = { - type: "atom", - items: getElementsByTagName("entry", childs).map((item) => { - var _a; - const { children } = item; - const entry = { media: getMediaElements(children) }; - addConditionally(entry, "id", "id", children); - addConditionally(entry, "title", "title", children); - const href = (_a = getOneElement("link", children)) === null || _a === void 0 ? void 0 : _a.attribs["href"]; - if (href) { - entry.link = href; - } - const description = fetch("summary", children) || fetch("content", children); - if (description) { - entry.description = description; - } - const pubDate = fetch("updated", children); - if (pubDate) { - entry.pubDate = new Date(pubDate); - } - return entry; - }), - }; - addConditionally(feed, "id", "id", childs); - addConditionally(feed, "title", "title", childs); - const href = (_a = getOneElement("link", childs)) === null || _a === void 0 ? void 0 : _a.attribs["href"]; - if (href) { - feed.link = href; - } - addConditionally(feed, "description", "subtitle", childs); - const updated = fetch("updated", childs); - if (updated) { - feed.updated = new Date(updated); - } - addConditionally(feed, "author", "email", childs, true); - return feed; -} -/** - * Parse a RSS feed. - * - * @param feedRoot The root of the feed. - * @returns The parsed feed. - */ -function getRssFeed(feedRoot) { - var _a, _b; - const childs = (_b = (_a = getOneElement("channel", feedRoot.children)) === null || _a === void 0 ? void 0 : _a.children) !== null && _b !== void 0 ? _b : []; - const feed = { - type: feedRoot.name.substr(0, 3), - id: "", - items: getElementsByTagName("item", feedRoot.children).map((item) => { - const { children } = item; - const entry = { media: getMediaElements(children) }; - addConditionally(entry, "id", "guid", children); - addConditionally(entry, "title", "title", children); - addConditionally(entry, "link", "link", children); - addConditionally(entry, "description", "description", children); - const pubDate = fetch("pubDate", children) || fetch("dc:date", children); - if (pubDate) - entry.pubDate = new Date(pubDate); - return entry; - }), - }; - addConditionally(feed, "title", "title", childs); - addConditionally(feed, "link", "link", childs); - addConditionally(feed, "description", "description", childs); - const updated = fetch("lastBuildDate", childs); - if (updated) { - feed.updated = new Date(updated); - } - addConditionally(feed, "author", "managingEditor", childs, true); - return feed; -} -const MEDIA_KEYS_STRING = ["url", "type", "lang"]; -const MEDIA_KEYS_INT = [ - "fileSize", - "bitrate", - "framerate", - "samplingrate", - "channels", - "duration", - "height", - "width", -]; -/** - * Get all media elements of a feed item. - * - * @param where Nodes to search in. - * @returns Media elements. - */ -function getMediaElements(where) { - return getElementsByTagName("media:content", where).map((elem) => { - const { attribs } = elem; - const media = { - medium: attribs["medium"], - isDefault: !!attribs["isDefault"], - }; - for (const attrib of MEDIA_KEYS_STRING) { - if (attribs[attrib]) { - media[attrib] = attribs[attrib]; - } - } - for (const attrib of MEDIA_KEYS_INT) { - if (attribs[attrib]) { - media[attrib] = parseInt(attribs[attrib], 10); - } - } - if (attribs["expression"]) { - media.expression = attribs["expression"]; - } - return media; - }); -} -/** - * Get one element by tag name. - * - * @param tagName Tag name to look for - * @param node Node to search in - * @returns The element or null - */ -function getOneElement(tagName, node) { - return getElementsByTagName(tagName, node, true, 1)[0]; -} -/** - * Get the text content of an element with a certain tag name. - * - * @param tagName Tag name to look for. - * @param where Node to search in. - * @param recurse Whether to recurse into child nodes. - * @returns The text content of the element. - */ -function fetch(tagName, where, recurse = false) { - return textContent(getElementsByTagName(tagName, where, recurse, 1)).trim(); -} -/** - * Adds a property to an object if it has a value. - * - * @param obj Object to be extended - * @param prop Property name - * @param tagName Tag name that contains the conditionally added property - * @param where Element to search for the property - * @param recurse Whether to recurse into child nodes. - */ -function addConditionally(obj, prop, tagName, where, recurse = false) { - const val = fetch(tagName, where, recurse); - if (val) - obj[prop] = val; -} -/** - * Checks if an element is a feed root node. - * - * @param value The name of the element to check. - * @returns Whether an element is a feed root node. - */ -function isValidFeed(value) { - return value === "rss" || value === "feed" || value === "rdf:RDF"; -} -//# sourceMappingURL=feeds.js.map \ No newline at end of file diff --git a/node_modules/domutils/lib/esm/feeds.js.map b/node_modules/domutils/lib/esm/feeds.js.map deleted file mode 100644 index 7148202..0000000 --- a/node_modules/domutils/lib/esm/feeds.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"feeds.js","sourceRoot":"https://raw.githubusercontent.com/fb55/domutils/0ab8bcf1ecfc70dfc93291a4cb2496578ac25e9c/src/","sources":["feeds.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,oBAAoB,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C;AAED;;;;;;GAMG;AACH,SAAS,aAAa,CAClB,OAA6C,EAC7C,IAAe;IAEf,OAAO,oBAAoB,CAAC,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AAC3D,CAAC;AAED;;;;;;;GAOG;AACH,SAAS,KAAK,CACV,OAAe,EACf,KAA0B,EAC1B,OAAO,GAAG,KAAK;IAEf,OAAO,WAAW,CAAC,oBAAoB,CAAC,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;AAChF,CAAC;AAED;;;;;;;;GAQG;AACH,SAAS,gBAAgB,CACrB,GAAM,EACN,IAAa,EACb,OAAe,EACf,KAAgB,EAChB,OAAO,GAAG,KAAK;IAEf,MAAM,GAAG,GAAG,KAAK,CAAC,OAAO,EAAE,KAAK,EAAE,OAAO,CAAC,CAAC;IAC3C,IAAI,GAAG;QAAE,GAAG,CAAC,IAAI,CAAC,GAAG,GAA4B,CAAC;AACtD,CAAC;AAED;;;;;GAKG;AACH,SAAS,WAAW,CAAC,KAAa;IAC9B,OAAO,KAAK,KAAK,KAAK,IAAI,KAAK,KAAK,MAAM,IAAI,KAAK,KAAK,SAAS,CAAC;AACtE,CAAC"} \ No newline at end of file diff --git a/node_modules/domutils/lib/esm/helpers.d.ts b/node_modules/domutils/lib/esm/helpers.d.ts deleted file mode 100644 index e4ced08..0000000 --- a/node_modules/domutils/lib/esm/helpers.d.ts +++ /dev/null @@ -1,59 +0,0 @@ -import { AnyNode } from "domhandler"; -/** - * Given an array of nodes, remove any member that is contained by another - * member. - * - * @category Helpers - * @param nodes Nodes to filter. - * @returns Remaining nodes that aren't contained by other nodes. - */ -export declare function removeSubsets(nodes: AnyNode[]): AnyNode[]; -/** - * @category Helpers - * @see {@link http://dom.spec.whatwg.org/#dom-node-comparedocumentposition} - */ -export declare const enum DocumentPosition { - DISCONNECTED = 1, - PRECEDING = 2, - FOLLOWING = 4, - CONTAINS = 8, - CONTAINED_BY = 16 -} -/** - * Compare the position of one node against another node in any other document, - * returning a bitmask with the values from {@link DocumentPosition}. - * - * Document order: - * > There is an ordering, document order, defined on all the nodes in the - * > document corresponding to the order in which the first character of the - * > XML representation of each node occurs in the XML representation of the - * > document after expansion of general entities. Thus, the document element - * > node will be the first node. Element nodes occur before their children. - * > Thus, document order orders element nodes in order of the occurrence of - * > their start-tag in the XML (after expansion of entities). The attribute - * > nodes of an element occur after the element and before its children. The - * > relative order of attribute nodes is implementation-dependent. - * - * Source: - * http://www.w3.org/TR/DOM-Level-3-Core/glossary.html#dt-document-order - * - * @category Helpers - * @param nodeA The first node to use in the comparison - * @param nodeB The second node to use in the comparison - * @returns A bitmask describing the input nodes' relative position. - * - * See http://dom.spec.whatwg.org/#dom-node-comparedocumentposition for - * a description of these values. - */ -export declare function compareDocumentPosition(nodeA: AnyNode, nodeB: AnyNode): number; -/** - * Sort an array of nodes based on their relative position in the document, - * removing any duplicate nodes. If the array contains nodes that do not belong - * to the same document, sort order is unspecified. - * - * @category Helpers - * @param nodes Array of DOM nodes. - * @returns Collection of unique nodes, sorted in document order. - */ -export declare function uniqueSort<T extends AnyNode>(nodes: T[]): T[]; -//# sourceMappingURL=helpers.d.ts.map \ No newline at end of file diff --git a/node_modules/domutils/lib/esm/helpers.d.ts.map b/node_modules/domutils/lib/esm/helpers.d.ts.map deleted file mode 100644 index 281f1d8..0000000 --- a/node_modules/domutils/lib/esm/helpers.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"helpers.d.ts","sourceRoot":"https://raw.githubusercontent.com/fb55/domutils/0ab8bcf1ecfc70dfc93291a4cb2496578ac25e9c/src/","sources":["helpers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAe,OAAO,EAAc,MAAM,YAAY,CAAC;AAE9D;;;;;;;GAOG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,OAAO,EAAE,GAAG,OAAO,EAAE,CA6BzD;AACD;;;GAGG;AACH,0BAAkB,gBAAgB;IAC9B,YAAY,IAAI;IAChB,SAAS,IAAI;IACb,SAAS,IAAI;IACb,QAAQ,IAAI;IACZ,YAAY,KAAK;CACpB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,wBAAgB,uBAAuB,CACnC,KAAK,EAAE,OAAO,EACd,KAAK,EAAE,OAAO,GACf,MAAM,CA4CR;AAED;;;;;;;;GAQG;AACH,wBAAgB,UAAU,CAAC,CAAC,SAAS,OAAO,EAAE,KAAK,EAAE,CAAC,EAAE,GAAG,CAAC,EAAE,CAc7D"} \ No newline at end of file diff --git a/node_modules/domutils/lib/esm/helpers.js b/node_modules/domutils/lib/esm/helpers.js deleted file mode 100644 index f3a90d9..0000000 --- a/node_modules/domutils/lib/esm/helpers.js +++ /dev/null @@ -1,136 +0,0 @@ -import { hasChildren } from "domhandler"; -/** - * Given an array of nodes, remove any member that is contained by another - * member. - * - * @category Helpers - * @param nodes Nodes to filter. - * @returns Remaining nodes that aren't contained by other nodes. - */ -export function removeSubsets(nodes) { - let idx = nodes.length; - /* - * Check if each node (or one of its ancestors) is already contained in the - * array. - */ - while (--idx >= 0) { - const node = nodes[idx]; - /* - * Remove the node if it is not unique. - * We are going through the array from the end, so we only - * have to check nodes that preceed the node under consideration in the array. - */ - if (idx > 0 && nodes.lastIndexOf(node, idx - 1) >= 0) { - nodes.splice(idx, 1); - continue; - } - for (let ancestor = node.parent; ancestor; ancestor = ancestor.parent) { - if (nodes.includes(ancestor)) { - nodes.splice(idx, 1); - break; - } - } - } - return nodes; -} -/** - * @category Helpers - * @see {@link http://dom.spec.whatwg.org/#dom-node-comparedocumentposition} - */ -export var DocumentPosition; -(function (DocumentPosition) { - DocumentPosition[DocumentPosition["DISCONNECTED"] = 1] = "DISCONNECTED"; - DocumentPosition[DocumentPosition["PRECEDING"] = 2] = "PRECEDING"; - DocumentPosition[DocumentPosition["FOLLOWING"] = 4] = "FOLLOWING"; - DocumentPosition[DocumentPosition["CONTAINS"] = 8] = "CONTAINS"; - DocumentPosition[DocumentPosition["CONTAINED_BY"] = 16] = "CONTAINED_BY"; -})(DocumentPosition || (DocumentPosition = {})); -/** - * Compare the position of one node against another node in any other document, - * returning a bitmask with the values from {@link DocumentPosition}. - * - * Document order: - * > There is an ordering, document order, defined on all the nodes in the - * > document corresponding to the order in which the first character of the - * > XML representation of each node occurs in the XML representation of the - * > document after expansion of general entities. Thus, the document element - * > node will be the first node. Element nodes occur before their children. - * > Thus, document order orders element nodes in order of the occurrence of - * > their start-tag in the XML (after expansion of entities). The attribute - * > nodes of an element occur after the element and before its children. The - * > relative order of attribute nodes is implementation-dependent. - * - * Source: - * http://www.w3.org/TR/DOM-Level-3-Core/glossary.html#dt-document-order - * - * @category Helpers - * @param nodeA The first node to use in the comparison - * @param nodeB The second node to use in the comparison - * @returns A bitmask describing the input nodes' relative position. - * - * See http://dom.spec.whatwg.org/#dom-node-comparedocumentposition for - * a description of these values. - */ -export function compareDocumentPosition(nodeA, nodeB) { - const aParents = []; - const bParents = []; - if (nodeA === nodeB) { - return 0; - } - let current = hasChildren(nodeA) ? nodeA : nodeA.parent; - while (current) { - aParents.unshift(current); - current = current.parent; - } - current = hasChildren(nodeB) ? nodeB : nodeB.parent; - while (current) { - bParents.unshift(current); - current = current.parent; - } - const maxIdx = Math.min(aParents.length, bParents.length); - let idx = 0; - while (idx < maxIdx && aParents[idx] === bParents[idx]) { - idx++; - } - if (idx === 0) { - return DocumentPosition.DISCONNECTED; - } - const sharedParent = aParents[idx - 1]; - const siblings = sharedParent.children; - const aSibling = aParents[idx]; - const bSibling = bParents[idx]; - if (siblings.indexOf(aSibling) > siblings.indexOf(bSibling)) { - if (sharedParent === nodeB) { - return DocumentPosition.FOLLOWING | DocumentPosition.CONTAINED_BY; - } - return DocumentPosition.FOLLOWING; - } - if (sharedParent === nodeA) { - return DocumentPosition.PRECEDING | DocumentPosition.CONTAINS; - } - return DocumentPosition.PRECEDING; -} -/** - * Sort an array of nodes based on their relative position in the document, - * removing any duplicate nodes. If the array contains nodes that do not belong - * to the same document, sort order is unspecified. - * - * @category Helpers - * @param nodes Array of DOM nodes. - * @returns Collection of unique nodes, sorted in document order. - */ -export function uniqueSort(nodes) { - nodes = nodes.filter((node, i, arr) => !arr.includes(node, i + 1)); - nodes.sort((a, b) => { - const relative = compareDocumentPosition(a, b); - if (relative & DocumentPosition.PRECEDING) { - return -1; - } - else if (relative & DocumentPosition.FOLLOWING) { - return 1; - } - return 0; - }); - return nodes; -} -//# sourceMappingURL=helpers.js.map \ No newline at end of file diff --git a/node_modules/domutils/lib/esm/helpers.js.map b/node_modules/domutils/lib/esm/helpers.js.map deleted file mode 100644 index 7561a99..0000000 --- a/node_modules/domutils/lib/esm/helpers.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"helpers.js","sourceRoot":"https://raw.githubusercontent.com/fb55/domutils/0ab8bcf1ecfc70dfc93291a4cb2496578ac25e9c/src/","sources":["helpers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAuB,MAAM,YAAY,CAAC;AAE9D;;;;;;;GAOG;AACH,MAAM,UAAU,aAAa,CAAC,KAAgB;IAC1C,IAAI,GAAG,GAAG,KAAK,CAAC,MAAM,CAAC;IAEvB;;;OAGG;IACH,OAAO,EAAE,GAAG,IAAI,CAAC,EAAE,CAAC;QAChB,MAAM,IAAI,GAAG,KAAK,CAAC,GAAG,CAAC,CAAC;QAExB;;;;WAIG;QACH,IAAI,GAAG,GAAG,CAAC,IAAI,KAAK,CAAC,WAAW,CAAC,IAAI,EAAE,GAAG,GAAG,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC;YACnD,KAAK,CAAC,MAAM,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC;YACrB,SAAS;QACb,CAAC;QAED,KAAK,IAAI,QAAQ,GAAG,IAAI,CAAC,MAAM,EAAE,QAAQ,EAAE,QAAQ,GAAG,QAAQ,CAAC,MAAM,EAAE,CAAC;YACpE,IA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C,EAAE,CAAC,EAAE,EAAE;QAChB,MAAM,QAAQ,GAAG,uBAAuB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;QAC/C,IAAI,QAAQ,GAAG,gBAAgB,CAAC,SAAS,EAAE,CAAC;YACxC,OAAO,CAAC,CAAC,CAAC;QACd,CAAC;aAAM,IAAI,QAAQ,GAAG,gBAAgB,CAAC,SAAS,EAAE,CAAC;YAC/C,OAAO,CAAC,CAAC;QACb,CAAC;QACD,OAAO,CAAC,CAAC;IACb,CAAC,CAAC,CAAC;IAEH,OAAO,KAAK,CAAC;AACjB,CAAC"} \ No newline at end of file diff --git a/node_modules/domutils/lib/esm/index.d.ts b/node_modules/domutils/lib/esm/index.d.ts deleted file mode 100644 index 41ab6e8..0000000 --- a/node_modules/domutils/lib/esm/index.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -export * from "./stringify.js"; -export * from "./traversal.js"; -export * from "./manipulation.js"; -export * from "./querying.js"; -export * from "./legacy.js"; -export * from "./helpers.js"; -export * from "./feeds.js"; -/** @deprecated Use these methods from `domhandler` directly. */ -export { isTag, isCDATA, isText, isComment, isDocument, hasChildren, } from "domhandler"; -//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/domutils/lib/esm/index.d.ts.map b/node_modules/domutils/lib/esm/index.d.ts.map deleted file mode 100644 index dd860ff..0000000 --- a/node_modules/domutils/lib/esm/index.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"https://raw.githubusercontent.com/fb55/domutils/0ab8bcf1ecfc70dfc93291a4cb2496578ac25e9c/src/","sources":["index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,mBAAmB,CAAC;AAClC,cAAc,eAAe,CAAC;AAC9B,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC;AAC3B,gEAAgE;AAChE,OAAO,EACH,KAAK,EACL,OAAO,EACP,MAAM,EACN,SAAS,EACT,UAAU,EACV,WAAW,GACd,MAAM,YAAY,CAAC"} \ No newline at end of file diff --git a/node_modules/domutils/lib/esm/index.js b/node_modules/domutils/lib/esm/index.js deleted file mode 100644 index 918c0eb..0000000 --- a/node_modules/domutils/lib/esm/index.js +++ /dev/null @@ -1,10 +0,0 @@ -export * from "./stringify.js"; -export * from "./traversal.js"; -export * from "./manipulation.js"; -export * from "./querying.js"; -export * from "./legacy.js"; -export * from "./helpers.js"; -export * from "./feeds.js"; -/** @deprecated Use these methods from `domhandler` directly. */ -export { isTag, isCDATA, isText, isComment, isDocument, hasChildren, } from "domhandler"; -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/domutils/lib/esm/index.js.map b/node_modules/domutils/lib/esm/index.js.map deleted file mode 100644 index 7f8acf9..0000000 --- a/node_modules/domutils/lib/esm/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sourceRoot":"https://raw.githubusercontent.com/fb55/domutils/0ab8bcf1ecfc70dfc93291a4cb2496578ac25e9c/src/","sources":["index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,mBAAmB,CAAC;AAClC,cAAc,eAAe,CAAC;AAC9B,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC;AAC3B,gEAAgE;AAChE,OAAO,EACH,KAAK,EACL,OAAO,EACP,MAAM,EACN,SAAS,EACT,UAAU,EACV,WAAW,GACd,MAAM,YAAY,CAAC"} \ No newline at end of file diff --git a/node_modules/domutils/lib/esm/legacy.d.ts b/node_modules/domutils/lib/esm/legacy.d.ts deleted file mode 100644 index a6f7a5b..0000000 --- a/node_modules/domutils/lib/esm/legacy.d.ts +++ /dev/null @@ -1,79 +0,0 @@ -import { AnyNode, Element } from "domhandler"; -import type { ElementType } from "domelementtype"; -/** - * An object with keys to check elements against. If a key is `tag_name`, - * `tag_type` or `tag_contains`, it will check the value against that specific - * value. Otherwise, it will check an attribute with the key's name. - * - * @category Legacy Query Functions - */ -export interface TestElementOpts { - tag_name?: string | ((name: string) => boolean); - tag_type?: string | ((name: string) => boolean); - tag_contains?: string | ((data?: string) => boolean); - [attributeName: string]: undefined | string | ((attributeValue: string) => boolean); -} -/** - * Checks whether a node matches the description in `options`. - * - * @category Legacy Query Functions - * @param options An object describing nodes to look for. - * @param node The element to test. - * @returns Whether the element matches the description in `options`. - */ -export declare function testElement(options: TestElementOpts, node: AnyNode): boolean; -/** - * Returns all nodes that match `options`. - * - * @category Legacy Query Functions - * @param options An object describing nodes to look for. - * @param nodes Nodes to search through. - * @param recurse Also consider child nodes. - * @param limit Maximum number of nodes to return. - * @returns All nodes that match `options`. - */ -export declare function getElements(options: TestElementOpts, nodes: AnyNode | AnyNode[], recurse: boolean, limit?: number): AnyNode[]; -/** - * Returns the node with the supplied ID. - * - * @category Legacy Query Functions - * @param id The unique ID attribute value to look for. - * @param nodes Nodes to search through. - * @param recurse Also consider child nodes. - * @returns The node with the supplied ID. - */ -export declare function getElementById(id: string | ((id: string) => boolean), nodes: AnyNode | AnyNode[], recurse?: boolean): Element | null; -/** - * Returns all nodes with the supplied `tagName`. - * - * @category Legacy Query Functions - * @param tagName Tag name to search for. - * @param nodes Nodes to search through. - * @param recurse Also consider child nodes. - * @param limit Maximum number of nodes to return. - * @returns All nodes with the supplied `tagName`. - */ -export declare function getElementsByTagName(tagName: string | ((name: string) => boolean), nodes: AnyNode | AnyNode[], recurse?: boolean, limit?: number): Element[]; -/** - * Returns all nodes with the supplied `className`. - * - * @category Legacy Query Functions - * @param className Class name to search for. - * @param nodes Nodes to search through. - * @param recurse Also consider child nodes. - * @param limit Maximum number of nodes to return. - * @returns All nodes with the supplied `className`. - */ -export declare function getElementsByClassName(className: string | ((name: string) => boolean), nodes: AnyNode | AnyNode[], recurse?: boolean, limit?: number): Element[]; -/** - * Returns all nodes with the supplied `type`. - * - * @category Legacy Query Functions - * @param type Element type to look for. - * @param nodes Nodes to search through. - * @param recurse Also consider child nodes. - * @param limit Maximum number of nodes to return. - * @returns All nodes with the supplied `type`. - */ -export declare function getElementsByTagType(type: ElementType | ((type: ElementType) => boolean), nodes: AnyNode | AnyNode[], recurse?: boolean, limit?: number): AnyNode[]; -//# sourceMappingURL=legacy.d.ts.map \ No newline at end of file diff --git a/node_modules/domutils/lib/esm/legacy.d.ts.map b/node_modules/domutils/lib/esm/legacy.d.ts.map deleted file mode 100644 index e4dd4df..0000000 --- a/node_modules/domutils/lib/esm/legacy.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"legacy.d.ts","sourceRoot":"https://raw.githubusercontent.com/fb55/domutils/0ab8bcf1ecfc70dfc93291a4cb2496578ac25e9c/src/","sources":["legacy.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAC7D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAKlD;;;;;;GAMG;AACH,MAAM,WAAW,eAAe;IAC5B,QAAQ,CAAC,EAAE,MAAM,GAAG,CAAC,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,CAAC;IAChD,QAAQ,CAAC,EAAE,MAAM,GAAG,CAAC,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,CAAC;IAChD,YAAY,CAAC,EAAE,MAAM,GAAG,CAAC,CAAC,IAAI,CAAC,EAAE,MAAM,KAAK,OAAO,CAAC,CAAC;IACrD,CAAC,aAAa,EAAE,MAAM,GAChB,SAAS,GACT,MAAM,GACN,CAAC,CAAC,cAAc,EAAE,MAAM,KAAK,OAAO,CAAC,CAAC;CAC/C;AAkFD;;;;;;;GAOG;AACH,wBAAgB,WAAW,CAAC,OAAO,EAAE,eAAe,EAAE,IAAI,EAAE,OAAO,GAAG,OAAO,CAG5E;AAED;;;;;;;;;GASG;AACH,wBAAgB,WAAW,CACvB,OAAO,EAAE,eAAe,EACxB,KAAK,EAAE,OAAO,GAAG,OAAO,EAAE,EAC1B,OAAO,EAAE,OAAO,EAChB,KAAK,GAAE,MAAiB,GACzB,OAAO,EAAE,CAGX;AAED;;;;;;;;GAQG;AACH,wBAAgB,cAAc,CAC1B,EAAE,EAAE,MAAM,GAAG,CAAC,CAAC,EAAE,EAAE,MAAM,KAAK,OAAO,CAAC,EACtC,KAAK,EAAE,OAAO,GAAG,OAAO,EAAE,EAC1B,OAAO,UAAO,GACf,OAAO,GAAG,IAAI,CAGhB;AAED;;;;;;;;;GASG;AACH,wBAAgB,oBAAoB,CAChC,OAAO,EAAE,MAAM,GAAG,CAAC,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,EAC7C,KAAK,EAAE,OAAO,GAAG,OAAO,EAAE,EAC1B,OAAO,UAAO,EACd,KAAK,GAAE,MAAiB,GACzB,OAAO,EAAE,CAOX;AAED;;;;;;;;;GASG;AACH,wBAAgB,sBAAsB,CAClC,SAAS,EAAE,MAAM,GAAG,CAAC,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,EAC/C,KAAK,EAAE,OAAO,GAAG,OAAO,EAAE,EAC1B,OAAO,UAAO,EACd,KAAK,GAAE,MAAiB,GACzB,OAAO,EAAE,CAOX;AAED;;;;;;;;;GASG;AACH,wBAAgB,oBAAoB,CAChC,IAAI,EAAE,WAAW,GAAG,CAAC,CAAC,IAAI,EAAE,WAAW,KAAK,OAAO,CAAC,EACpD,KAAK,EAAE,OAAO,GAAG,OAAO,EAAE,EAC1B,OAAO,UAAO,EACd,KAAK,GAAE,MAAiB,GACzB,OAAO,EAAE,CAEX"} \ No newline at end of file diff --git a/node_modules/domutils/lib/esm/legacy.js b/node_modules/domutils/lib/esm/legacy.js deleted file mode 100644 index 57661b5..0000000 --- a/node_modules/domutils/lib/esm/legacy.js +++ /dev/null @@ -1,152 +0,0 @@ -import { isTag, isText } from "domhandler"; -import { filter, findOne } from "./querying.js"; -/** - * A map of functions to check nodes against. - */ -const Checks = { - tag_name(name) { - if (typeof name === "function") { - return (elem) => isTag(elem) && name(elem.name); - } - else if (name === "*") { - return isTag; - } - return (elem) => isTag(elem) && elem.name === name; - }, - tag_type(type) { - if (typeof type === "function") { - return (elem) => type(elem.type); - } - return (elem) => elem.type === type; - }, - tag_contains(data) { - if (typeof data === "function") { - return (elem) => isText(elem) && data(elem.data); - } - return (elem) => isText(elem) && elem.data === data; - }, -}; -/** - * Returns a function to check whether a node has an attribute with a particular - * value. - * - * @param attrib Attribute to check. - * @param value Attribute value to look for. - * @returns A function to check whether the a node has an attribute with a - * particular value. - */ -function getAttribCheck(attrib, value) { - if (typeof value === "function") { - return (elem) => isTag(elem) && value(elem.attribs[attrib]); - } - return (elem) => isTag(elem) && elem.attribs[attrib] === value; -} -/** - * Returns a function that returns `true` if either of the input functions - * returns `true` for a node. - * - * @param a First function to combine. - * @param b Second function to combine. - * @returns A function taking a node and returning `true` if either of the input - * functions returns `true` for the node. - */ -function combineFuncs(a, b) { - return (elem) => a(elem) || b(elem); -} -/** - * Returns a function that executes all checks in `options` and returns `true` - * if any of them match a node. - * - * @param options An object describing nodes to look for. - * @returns A function that executes all checks in `options` and returns `true` - * if any of them match a node. - */ -function compileTest(options) { - const funcs = Object.keys(options).map((key) => { - const value = options[key]; - return Object.prototype.hasOwnProperty.call(Checks, key) - ? Checks[key](value) - : getAttribCheck(key, value); - }); - return funcs.length === 0 ? null : funcs.reduce(combineFuncs); -} -/** - * Checks whether a node matches the description in `options`. - * - * @category Legacy Query Functions - * @param options An object describing nodes to look for. - * @param node The element to test. - * @returns Whether the element matches the description in `options`. - */ -export function testElement(options, node) { - const test = compileTest(options); - return test ? test(node) : true; -} -/** - * Returns all nodes that match `options`. - * - * @category Legacy Query Functions - * @param options An object describing nodes to look for. - * @param nodes Nodes to search through. - * @param recurse Also consider child nodes. - * @param limit Maximum number of nodes to return. - * @returns All nodes that match `options`. - */ -export function getElements(options, nodes, recurse, limit = Infinity) { - const test = compileTest(options); - return test ? filter(test, nodes, recurse, limit) : []; -} -/** - * Returns the node with the supplied ID. - * - * @category Legacy Query Functions - * @param id The unique ID attribute value to look for. - * @param nodes Nodes to search through. - * @param recurse Also consider child nodes. - * @returns The node with the supplied ID. - */ -export function getElementById(id, nodes, recurse = true) { - if (!Array.isArray(nodes)) - nodes = [nodes]; - return findOne(getAttribCheck("id", id), nodes, recurse); -} -/** - * Returns all nodes with the supplied `tagName`. - * - * @category Legacy Query Functions - * @param tagName Tag name to search for. - * @param nodes Nodes to search through. - * @param recurse Also consider child nodes. - * @param limit Maximum number of nodes to return. - * @returns All nodes with the supplied `tagName`. - */ -export function getElementsByTagName(tagName, nodes, recurse = true, limit = Infinity) { - return filter(Checks["tag_name"](tagName), nodes, recurse, limit); -} -/** - * Returns all nodes with the supplied `className`. - * - * @category Legacy Query Functions - * @param className Class name to search for. - * @param nodes Nodes to search through. - * @param recurse Also consider child nodes. - * @param limit Maximum number of nodes to return. - * @returns All nodes with the supplied `className`. - */ -export function getElementsByClassName(className, nodes, recurse = true, limit = Infinity) { - return filter(getAttribCheck("class", className), nodes, recurse, limit); -} -/** - * Returns all nodes with the supplied `type`. - * - * @category Legacy Query Functions - * @param type Element type to look for. - * @param nodes Nodes to search through. - * @param recurse Also consider child nodes. - * @param limit Maximum number of nodes to return. - * @returns All nodes with the supplied `type`. - */ -export function getElementsByTagType(type, nodes, recurse = true, limit = Infinity) { - return filter(Checks["tag_type"](type), nodes, recurse, limit); -} -//# sourceMappingURL=legacy.js.map \ No newline at end of file diff --git a/node_modules/domutils/lib/esm/legacy.js.map b/node_modules/domutils/lib/esm/legacy.js.map deleted file mode 100644 index 023c460..0000000 --- a/node_modules/domutils/lib/esm/legacy.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"legacy.js","sourceRoot":"https://raw.githubusercontent.com/fb55/domutils/0ab8bcf1ecfc70dfc93291a4cb2496578ac25e9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OAAO,GAAG,IAAI,EACd,QAAgB,QAAQ;IAExB,OAAO,MAAM,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC,IAAc,CAAC,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,CAAC,CAAC;AAC7E,CAAC"} \ No newline at end of file diff --git a/node_modules/domutils/lib/esm/manipulation.d.ts b/node_modules/domutils/lib/esm/manipulation.d.ts deleted file mode 100644 index 70369dd..0000000 --- a/node_modules/domutils/lib/esm/manipulation.d.ts +++ /dev/null @@ -1,49 +0,0 @@ -import type { ChildNode, ParentNode } from "domhandler"; -/** - * Remove an element from the dom - * - * @category Manipulation - * @param elem The element to be removed - */ -export declare function removeElement(elem: ChildNode): void; -/** - * Replace an element in the dom - * - * @category Manipulation - * @param elem The element to be replaced - * @param replacement The element to be added - */ -export declare function replaceElement(elem: ChildNode, replacement: ChildNode): void; -/** - * Append a child to an element. - * - * @category Manipulation - * @param parent The element to append to. - * @param child The element to be added as a child. - */ -export declare function appendChild(parent: ParentNode, child: ChildNode): void; -/** - * Append an element after another. - * - * @category Manipulation - * @param elem The element to append after. - * @param next The element be added. - */ -export declare function append(elem: ChildNode, next: ChildNode): void; -/** - * Prepend a child to an element. - * - * @category Manipulation - * @param parent The element to prepend before. - * @param child The element to be added as a child. - */ -export declare function prependChild(parent: ParentNode, child: ChildNode): void; -/** - * Prepend an element before another. - * - * @category Manipulation - * @param elem The element to prepend before. - * @param prev The element be added. - */ -export declare function prepend(elem: ChildNode, prev: ChildNode): void; -//# sourceMappingURL=manipulation.d.ts.map \ No newline at end of file diff --git a/node_modules/domutils/lib/esm/manipulation.d.ts.map b/node_modules/domutils/lib/esm/manipulation.d.ts.map deleted file mode 100644 index 9146f84..0000000 --- a/node_modules/domutils/lib/esm/manipulation.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"manipulation.d.ts","sourceRoot":"https://raw.githubusercontent.com/fb55/domutils/0ab8bcf1ecfc70dfc93291a4cb2496578ac25e9c/src/","sources":["manipulation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAExD;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,SAAS,GAAG,IAAI,CAcnD;AAED;;;;;;GAMG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,SAAS,EAAE,WAAW,EAAE,SAAS,GAAG,IAAI,CAiB5E;AAED;;;;;;GAMG;AACH,wBAAgB,WAAW,CAAC,MAAM,EAAE,UAAU,EAAE,KAAK,EAAE,SAAS,GAAG,IAAI,CAatE;AAED;;;;;;GAMG;AACH,wBAAgB,MAAM,CAAC,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,SAAS,GAAG,IAAI,CAoB7D;AAED;;;;;;GAMG;AACH,wBAAgB,YAAY,CAAC,MAAM,EAAE,UAAU,EAAE,KAAK,EAAE,SAAS,GAAG,IAAI,CAavE;AAED;;;;;;GAMG;AACH,wBAAgB,OAAO,CAAC,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,SAAS,GAAG,IAAI,CAiB9D"} \ No newline at end of file diff --git a/node_modules/domutils/lib/esm/manipulation.js b/node_modules/domutils/lib/esm/manipulation.js deleted file mode 100644 index d587885..0000000 --- a/node_modules/domutils/lib/esm/manipulation.js +++ /dev/null @@ -1,134 +0,0 @@ -/** - * Remove an element from the dom - * - * @category Manipulation - * @param elem The element to be removed - */ -export function removeElement(elem) { - if (elem.prev) - elem.prev.next = elem.next; - if (elem.next) - elem.next.prev = elem.prev; - if (elem.parent) { - const childs = elem.parent.children; - const childsIndex = childs.lastIndexOf(elem); - if (childsIndex >= 0) { - childs.splice(childsIndex, 1); - } - } - elem.next = null; - elem.prev = null; - elem.parent = null; -} -/** - * Replace an element in the dom - * - * @category Manipulation - * @param elem The element to be replaced - * @param replacement The element to be added - */ -export function replaceElement(elem, replacement) { - const prev = (replacement.prev = elem.prev); - if (prev) { - prev.next = replacement; - } - const next = (replacement.next = elem.next); - if (next) { - next.prev = replacement; - } - const parent = (replacement.parent = elem.parent); - if (parent) { - const childs = parent.children; - childs[childs.lastIndexOf(elem)] = replacement; - elem.parent = null; - } -} -/** - * Append a child to an element. - * - * @category Manipulation - * @param parent The element to append to. - * @param child The element to be added as a child. - */ -export function appendChild(parent, child) { - removeElement(child); - child.next = null; - child.parent = parent; - if (parent.children.push(child) > 1) { - const sibling = parent.children[parent.children.length - 2]; - sibling.next = child; - child.prev = sibling; - } - else { - child.prev = null; - } -} -/** - * Append an element after another. - * - * @category Manipulation - * @param elem The element to append after. - * @param next The element be added. - */ -export function append(elem, next) { - removeElement(next); - const { parent } = elem; - const currNext = elem.next; - next.next = currNext; - next.prev = elem; - elem.next = next; - next.parent = parent; - if (currNext) { - currNext.prev = next; - if (parent) { - const childs = parent.children; - childs.splice(childs.lastIndexOf(currNext), 0, next); - } - } - else if (parent) { - parent.children.push(next); - } -} -/** - * Prepend a child to an element. - * - * @category Manipulation - * @param parent The element to prepend before. - * @param child The element to be added as a child. - */ -export function prependChild(parent, child) { - removeElement(child); - child.parent = parent; - child.prev = null; - if (parent.children.unshift(child) !== 1) { - const sibling = parent.children[1]; - sibling.prev = child; - child.next = sibling; - } - else { - child.next = null; - } -} -/** - * Prepend an element before another. - * - * @category Manipulation - * @param elem The element to prepend before. - * @param prev The element be added. - */ -export function prepend(elem, prev) { - removeElement(prev); - const { parent } = elem; - if (parent) { - const childs = parent.children; - childs.splice(childs.indexOf(elem), 0, prev); - } - if (elem.prev) { - elem.prev.next = prev; - } - prev.parent = parent; - prev.prev = elem.prev; - prev.next = elem; - elem.prev = prev; -} -//# sourceMappingURL=manipulation.js.map \ No newline at end of file diff --git a/node_modules/domutils/lib/esm/manipulation.js.map b/node_modules/domutils/lib/esm/manipulation.js.map deleted file mode 100644 index 9414928..0000000 --- a/node_modules/domutils/lib/esm/manipulation.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"manipulation.js","sourceRoot":"https://raw.githubusercont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AAI,CAAC,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;IAC1B,CAAC;IAED,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACrB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC;IACtB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;IACjB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/node_modules/domutils/lib/esm/package.json b/node_modules/domutils/lib/esm/package.json deleted file mode 100644 index 089153b..0000000 --- a/node_modules/domutils/lib/esm/package.json +++ /dev/null @@ -1 +0,0 @@ -{"type":"module"} diff --git a/node_modules/domutils/lib/esm/querying.d.ts b/node_modules/domutils/lib/esm/querying.d.ts deleted file mode 100644 index 8a6dc1f..0000000 --- a/node_modules/domutils/lib/esm/querying.d.ts +++ /dev/null @@ -1,64 +0,0 @@ -import { Element, AnyNode, ParentNode } from "domhandler"; -/** - * Search a node and its children for nodes passing a test function. If `node` is not an array, it will be wrapped in one. - * - * @category Querying - * @param test Function to test nodes on. - * @param node Node to search. Will be included in the result set if it matches. - * @param recurse Also consider child nodes. - * @param limit Maximum number of nodes to return. - * @returns All nodes passing `test`. - */ -export declare function filter(test: (elem: AnyNode) => boolean, node: AnyNode | AnyNode[], recurse?: boolean, limit?: number): AnyNode[]; -/** - * Search an array of nodes and their children for nodes passing a test function. - * - * @category Querying - * @param test Function to test nodes on. - * @param nodes Array of nodes to search. - * @param recurse Also consider child nodes. - * @param limit Maximum number of nodes to return. - * @returns All nodes passing `test`. - */ -export declare function find(test: (elem: AnyNode) => boolean, nodes: AnyNode[] | ParentNode, recurse: boolean, limit: number): AnyNode[]; -/** - * Finds the first element inside of an array that matches a test function. This is an alias for `Array.prototype.find`. - * - * @category Querying - * @param test Function to test nodes on. - * @param nodes Array of nodes to search. - * @returns The first node in the array that passes `test`. - * @deprecated Use `Array.prototype.find` directly. - */ -export declare function findOneChild<T>(test: (elem: T) => boolean, nodes: T[]): T | undefined; -/** - * Finds one element in a tree that passes a test. - * - * @category Querying - * @param test Function to test nodes on. - * @param nodes Node or array of nodes to search. - * @param recurse Also consider child nodes. - * @returns The first node that passes `test`. - */ -export declare function findOne(test: (elem: Element) => boolean, nodes: AnyNode[] | ParentNode, recurse?: boolean): Element | null; -/** - * Checks if a tree of nodes contains at least one node passing a test. - * - * @category Querying - * @param test Function to test nodes on. - * @param nodes Array of nodes to search. - * @returns Whether a tree of nodes contains at least one node passing the test. - */ -export declare function existsOne(test: (elem: Element) => boolean, nodes: AnyNode[] | ParentNode): boolean; -/** - * Search an array of nodes and their children for elements passing a test function. - * - * Same as `find`, but limited to elements and with less options, leading to reduced complexity. - * - * @category Querying - * @param test Function to test nodes on. - * @param nodes Array of nodes to search. - * @returns All nodes passing `test`. - */ -export declare function findAll(test: (elem: Element) => boolean, nodes: AnyNode[] | ParentNode): Element[]; -//# sourceMappingURL=querying.d.ts.map \ No newline at end of file diff --git a/node_modules/domutils/lib/esm/querying.d.ts.map b/node_modules/domutils/lib/esm/querying.d.ts.map deleted file mode 100644 index 0f4ae22..0000000 --- a/node_modules/domutils/lib/esm/querying.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"querying.d.ts","sourceRoot":"https://raw.githubusercontent.com/fb55/domutils/0ab8bcf1ecfc70dfc93291a4cb2496578ac25e9c/src/","sources":["querying.ts"],"names":[],"mappings":"AAAA,OAAO,EAAsB,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAE9E;;;;;;;;;GASG;AACH,wBAAgB,MAAM,CAClB,IAAI,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,OAAO,EAChC,IAAI,EAAE,OAAO,GAAG,OAAO,EAAE,EACzB,OAAO,UAAO,EACd,KAAK,GAAE,MAAiB,GACzB,OAAO,EAAE,CAEX;AAED;;;;;;;;;GASG;AACH,wBAAgB,IAAI,CAChB,IAAI,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,OAAO,EAChC,KAAK,EAAE,OAAO,EAAE,GAAG,UAAU,EAC7B,OAAO,EAAE,OAAO,EAChB,KAAK,EAAE,MAAM,GACd,OAAO,EAAE,CAuCX;AAED;;;;;;;;GAQG;AACH,wBAAgB,YAAY,CAAC,CAAC,EAC1B,IAAI,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,OAAO,EAC1B,KAAK,EAAE,CAAC,EAAE,GACX,CAAC,GAAG,SAAS,CAEf;AAED;;;;;;;;GAQG;AACH,wBAAgB,OAAO,CACnB,IAAI,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,OAAO,EAChC,KAAK,EAAE,OAAO,EAAE,GAAG,UAAU,EAC7B,OAAO,UAAO,GACf,OAAO,GAAG,IAAI,CAchB;AAED;;;;;;;GAOG;AACH,wBAAgB,SAAS,CACrB,IAAI,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,OAAO,EAChC,KAAK,EAAE,OAAO,EAAE,GAAG,UAAU,GAC9B,OAAO,CAMT;AAED;;;;;;;;;GASG;AACH,wBAAgB,OAAO,CACnB,IAAI,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,OAAO,EAChC,KAAK,EAAE,OAAO,EAAE,GAAG,UAAU,GAC9B,OAAO,EAAE,CA4BX"} \ No newline at end of file diff --git a/node_modules/domutils/lib/esm/querying.js b/node_modules/domutils/lib/esm/querying.js deleted file mode 100644 index 06c0df2..0000000 --- a/node_modules/domutils/lib/esm/querying.js +++ /dev/null @@ -1,142 +0,0 @@ -import { isTag, hasChildren } from "domhandler"; -/** - * Search a node and its children for nodes passing a test function. If `node` is not an array, it will be wrapped in one. - * - * @category Querying - * @param test Function to test nodes on. - * @param node Node to search. Will be included in the result set if it matches. - * @param recurse Also consider child nodes. - * @param limit Maximum number of nodes to return. - * @returns All nodes passing `test`. - */ -export function filter(test, node, recurse = true, limit = Infinity) { - return find(test, Array.isArray(node) ? node : [node], recurse, limit); -} -/** - * Search an array of nodes and their children for nodes passing a test function. - * - * @category Querying - * @param test Function to test nodes on. - * @param nodes Array of nodes to search. - * @param recurse Also consider child nodes. - * @param limit Maximum number of nodes to return. - * @returns All nodes passing `test`. - */ -export function find(test, nodes, recurse, limit) { - const result = []; - /** Stack of the arrays we are looking at. */ - const nodeStack = [Array.isArray(nodes) ? nodes : [nodes]]; - /** Stack of the indices within the arrays. */ - const indexStack = [0]; - for (;;) { - // First, check if the current array has any more elements to look at. - if (indexStack[0] >= nodeStack[0].length) { - // If we have no more arrays to look at, we are done. - if (indexStack.length === 1) { - return result; - } - // Otherwise, remove the current array from the stack. - nodeStack.shift(); - indexStack.shift(); - // Loop back to the start to continue with the next array. - continue; - } - const elem = nodeStack[0][indexStack[0]++]; - if (test(elem)) { - result.push(elem); - if (--limit <= 0) - return result; - } - if (recurse && hasChildren(elem) && elem.children.length > 0) { - /* - * Add the children to the stack. We are depth-first, so this is - * the next array we look at. - */ - indexStack.unshift(0); - nodeStack.unshift(elem.children); - } - } -} -/** - * Finds the first element inside of an array that matches a test function. This is an alias for `Array.prototype.find`. - * - * @category Querying - * @param test Function to test nodes on. - * @param nodes Array of nodes to search. - * @returns The first node in the array that passes `test`. - * @deprecated Use `Array.prototype.find` directly. - */ -export function findOneChild(test, nodes) { - return nodes.find(test); -} -/** - * Finds one element in a tree that passes a test. - * - * @category Querying - * @param test Function to test nodes on. - * @param nodes Node or array of nodes to search. - * @param recurse Also consider child nodes. - * @returns The first node that passes `test`. - */ -export function findOne(test, nodes, recurse = true) { - const searchedNodes = Array.isArray(nodes) ? nodes : [nodes]; - for (let i = 0; i < searchedNodes.length; i++) { - const node = searchedNodes[i]; - if (isTag(node) && test(node)) { - return node; - } - if (recurse && hasChildren(node) && node.children.length > 0) { - const found = findOne(test, node.children, true); - if (found) - return found; - } - } - return null; -} -/** - * Checks if a tree of nodes contains at least one node passing a test. - * - * @category Querying - * @param test Function to test nodes on. - * @param nodes Array of nodes to search. - * @returns Whether a tree of nodes contains at least one node passing the test. - */ -export function existsOne(test, nodes) { - return (Array.isArray(nodes) ? nodes : [nodes]).some((node) => (isTag(node) && test(node)) || - (hasChildren(node) && existsOne(test, node.children))); -} -/** - * Search an array of nodes and their children for elements passing a test function. - * - * Same as `find`, but limited to elements and with less options, leading to reduced complexity. - * - * @category Querying - * @param test Function to test nodes on. - * @param nodes Array of nodes to search. - * @returns All nodes passing `test`. - */ -export function findAll(test, nodes) { - const result = []; - const nodeStack = [Array.isArray(nodes) ? nodes : [nodes]]; - const indexStack = [0]; - for (;;) { - if (indexStack[0] >= nodeStack[0].length) { - if (nodeStack.length === 1) { - return result; - } - // Otherwise, remove the current array from the stack. - nodeStack.shift(); - indexStack.shift(); - // Loop back to the start to continue with the next array. - continue; - } - const elem = nodeStack[0][indexStack[0]++]; - if (isTag(elem) && test(elem)) - result.push(elem); - if (hasChildren(elem) && elem.children.length > 0) { - indexStack.unshift(0); - nodeStack.unshift(elem.children); - } - } -} -//# sourceMappingURL=querying.js.map \ No newline at end of file diff --git a/node_modules/domutils/lib/esm/querying.js.map b/node_modules/domutils/lib/esm/querying.js.map deleted file mode 100644 index e3e5958..0000000 --- a/node_modules/domutils/lib/esm/querying.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"querying.js","sourceRoot":"https://raw.githubusercontent.com/fb55/domutils/0ab8bcf1ecfc70dfc93291a4cb2496578ac25e9c/src/","sources":["querying.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,WAAW,EAAgC,MAAM,YAAY,CAAC;AAE9E;;;;;;;;;GASG;AACH,MAAM,UAAU,MAAM,CAClB,IAAgC,EAChC,IAAyB,EACzB,OAAO,GAAG,IAAI,EACd,QAAgB,QAAQ;IAExB,OAAO,IAAI,CAAC,IAAI,EAAE,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,OAAO,EAAE,KAAK,CAAC,CAAC;AAC3E,CAAC;AAED;;;;;;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ify.d.ts b/node_modules/domutils/lib/esm/stringify.d.ts deleted file mode 100644 index 6e6e397..0000000 --- a/node_modules/domutils/lib/esm/stringify.d.ts +++ /dev/null @@ -1,46 +0,0 @@ -import { AnyNode } from "domhandler"; -import { DomSerializerOptions } from "dom-serializer"; -/** - * @category Stringify - * @deprecated Use the `dom-serializer` module directly. - * @param node Node to get the outer HTML of. - * @param options Options for serialization. - * @returns `node`'s outer HTML. - */ -export declare function getOuterHTML(node: AnyNode | ArrayLike<AnyNode>, options?: DomSerializerOptions): string; -/** - * @category Stringify - * @deprecated Use the `dom-serializer` module directly. - * @param node Node to get the inner HTML of. - * @param options Options for serialization. - * @returns `node`'s inner HTML. - */ -export declare function getInnerHTML(node: AnyNode, options?: DomSerializerOptions): string; -/** - * Get a node's inner text. Same as `textContent`, but inserts newlines for `<br>` tags. Ignores comments. - * - * @category Stringify - * @deprecated Use `textContent` instead. - * @param node Node to get the inner text of. - * @returns `node`'s inner text. - */ -export declare function getText(node: AnyNode | AnyNode[]): string; -/** - * Get a node's text content. Ignores comments. - * - * @category Stringify - * @param node Node to get the text content of. - * @returns `node`'s text content. - * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/Node/textContent} - */ -export declare function textContent(node: AnyNode | AnyNode[]): string; -/** - * Get a node's inner text, ignoring `<script>` and `<style>` tags. Ignores comments. - * - * @category Stringify - * @param node Node to get the inner text of. - * @returns `node`'s inner text. - * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/Node/innerText} - */ -export declare function innerText(node: AnyNode | AnyNode[]): string; -//# sourceMappingURL=stringify.d.ts.map \ No newline at end of file diff --git a/node_modules/domutils/lib/esm/stringify.d.ts.map b/node_modules/domutils/lib/esm/stringify.d.ts.map deleted file mode 100644 index b649b79..0000000 --- a/node_modules/domutils/lib/esm/stringify.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"stringify.d.ts","sourceRoot":"https://raw.githubusercontent.com/fb55/domutils/0ab8bcf1ecfc70dfc93291a4cb2496578ac25e9c/src/","sources":["stringify.ts"],"names":[],"mappings":"AAAA,OAAO,EAKH,OAAO,EAEV,MAAM,YAAY,CAAC;AACpB,OAAmB,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AAGlE;;;;;;GAMG;AACH,wBAAgB,YAAY,CACxB,IAAI,EAAE,OAAO,GAAG,SAAS,CAAC,OAAO,CAAC,EAClC,OAAO,CAAC,EAAE,oBAAoB,GAC/B,MAAM,CAER;AAED;;;;;;GAMG;AACH,wBAAgB,YAAY,CACxB,IAAI,EAAE,OAAO,EACb,OAAO,CAAC,EAAE,oBAAoB,GAC/B,MAAM,CAIR;AAED;;;;;;;GAOG;AACH,wBAAgB,OAAO,CAAC,IAAI,EAAE,OAAO,GAAG,OAAO,EAAE,GAAG,MAAM,CAMzD;AAED;;;;;;;GAOG;AACH,wBAAgB,WAAW,CAAC,IAAI,EAAE,OAAO,GAAG,OAAO,EAAE,GAAG,MAAM,CAO7D;AAED;;;;;;;GAOG;AACH,wBAAgB,SAAS,CAAC,IAAI,EAAE,OAAO,GAAG,OAAO,EAAE,GAAG,MAAM,CAO3D"} \ No newline at end of file diff --git a/node_modules/domutils/lib/esm/stringify.js b/node_modules/domutils/lib/esm/stringify.js deleted file mode 100644 index 8fa4602..0000000 --- a/node_modules/domutils/lib/esm/stringify.js +++ /dev/null @@ -1,81 +0,0 @@ -import { isTag, isCDATA, isText, hasChildren, isComment, } from "domhandler"; -import renderHTML from "dom-serializer"; -import { ElementType } from "domelementtype"; -/** - * @category Stringify - * @deprecated Use the `dom-serializer` module directly. - * @param node Node to get the outer HTML of. - * @param options Options for serialization. - * @returns `node`'s outer HTML. - */ -export function getOuterHTML(node, options) { - return renderHTML(node, options); -} -/** - * @category Stringify - * @deprecated Use the `dom-serializer` module directly. - * @param node Node to get the inner HTML of. - * @param options Options for serialization. - * @returns `node`'s inner HTML. - */ -export function getInnerHTML(node, options) { - return hasChildren(node) - ? node.children.map((node) => getOuterHTML(node, options)).join("") - : ""; -} -/** - * Get a node's inner text. Same as `textContent`, but inserts newlines for `<br>` tags. Ignores comments. - * - * @category Stringify - * @deprecated Use `textContent` instead. - * @param node Node to get the inner text of. - * @returns `node`'s inner text. - */ -export function getText(node) { - if (Array.isArray(node)) - return node.map(getText).join(""); - if (isTag(node)) - return node.name === "br" ? "\n" : getText(node.children); - if (isCDATA(node)) - return getText(node.children); - if (isText(node)) - return node.data; - return ""; -} -/** - * Get a node's text content. Ignores comments. - * - * @category Stringify - * @param node Node to get the text content of. - * @returns `node`'s text content. - * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/Node/textContent} - */ -export function textContent(node) { - if (Array.isArray(node)) - return node.map(textContent).join(""); - if (hasChildren(node) && !isComment(node)) { - return textContent(node.children); - } - if (isText(node)) - return node.data; - return ""; -} -/** - * Get a node's inner text, ignoring `<script>` and `<style>` tags. Ignores comments. - * - * @category Stringify - * @param node Node to get the inner text of. - * @returns `node`'s inner text. - * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/Node/innerText} - */ -export function innerText(node) { - if (Array.isArray(node)) - return node.map(innerText).join(""); - if (hasChildren(node) && (node.type === ElementType.Tag || isCDATA(node))) { - return innerText(node.children); - } - if (isText(node)) - return node.data; - return ""; -} -//# sourceMappingURL=stringify.js.map \ No newline at end of file diff --git a/node_modules/domutils/lib/esm/stringify.js.map b/node_modules/domutils/lib/esm/stringify.js.map deleted file mode 100644 index a3b3420..0000000 --- a/node_modules/domutils/lib/esm/stringify.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"stringify.js","sourceRoot":"https://raw.githubusercontent.com/fb55/domutils/0ab8bcf1ecfc70dfc93291a4cb2496578ac25e9c/src/","sources":["stringify.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,KAAK,EACL,OAAO,EACP,MAAM,EACN,WAAW,EAEX,SAAS,GACZ,MAAM,YAAY,CAAC;AACpB,OAAO,UAAoC,MAAM,gBAAgB,CAAC;AAClE,OAAO,EAAE,WAAW,EAA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C,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,EAAE,CAAC;QACxC,OAAO,WAAW,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IACtC,CAAC;IACD,IAAI,MAAM,CAAC,IAAI,CAAC;QAAE,OAAO,IAAI,CAAC,IAAI,CAAC;IACnC,OAAO,EAAE,CAAC;AACd,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,SAAS,CAAC,IAAyB;IAC/C,IAAI,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC;QAAE,OAAO,IAAI,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IAC7D,IAAI,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,KAAK,WAAW,CAAC,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC;QACxE,OAAO,SAAS,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IACpC,CAAC;IACD,IAAI,MAAM,CAAC,IAAI,CAAC;QAAE,OAAO,IAAI,CAAC,IAAI,CAAC;IACnC,OAAO,EAAE,CAAC;AACd,CAAC"} \ No newline at end of file diff --git a/node_modules/domutils/lib/esm/traversal.d.ts b/node_modules/domutils/lib/esm/traversal.d.ts deleted file mode 100644 index 1984643..0000000 --- a/node_modules/domutils/lib/esm/traversal.d.ts +++ /dev/null @@ -1,67 +0,0 @@ -import { AnyNode, ChildNode, Element, ParentNode } from "domhandler"; -/** - * Get a node's children. - * - * @category Traversal - * @param elem Node to get the children of. - * @returns `elem`'s children, or an empty array. - */ -export declare function getChildren(elem: AnyNode): ChildNode[]; -export declare function getParent(elem: AnyNode): ParentNode | null; -/** - * Gets an elements siblings, including the element itself. - * - * Attempts to get the children through the element's parent first. If we don't - * have a parent (the element is a root node), we walk the element's `prev` & - * `next` to get all remaining nodes. - * - * @category Traversal - * @param elem Element to get the siblings of. - * @returns `elem`'s siblings, including `elem`. - */ -export declare function getSiblings(elem: AnyNode): AnyNode[]; -/** - * Gets an attribute from an element. - * - * @category Traversal - * @param elem Element to check. - * @param name Attribute name to retrieve. - * @returns The element's attribute value, or `undefined`. - */ -export declare function getAttributeValue(elem: Element, name: string): string | undefined; -/** - * Checks whether an element has an attribute. - * - * @category Traversal - * @param elem Element to check. - * @param name Attribute name to look for. - * @returns Returns whether `elem` has the attribute `name`. - */ -export declare function hasAttrib(elem: Element, name: string): boolean; -/** - * Get the tag name of an element. - * - * @category Traversal - * @param elem The element to get the name for. - * @returns The tag name of `elem`. - */ -export declare function getName(elem: Element): string; -/** - * Returns the next element sibling of a node. - * - * @category Traversal - * @param elem The element to get the next sibling of. - * @returns `elem`'s next sibling that is a tag, or `null` if there is no next - * sibling. - */ -export declare function nextElementSibling(elem: AnyNode): Element | null; -/** - * Returns the previous element sibling of a node. - * - * @category Traversal - * @param elem The element to get the previous sibling of. - * @returns `elem`'s previous sibling that is a tag, or `null` if there is no - * previous sibling. - */ -export declare function prevElementSibling(elem: AnyNode): Element | null; -//# sourceMappingURL=traversal.d.ts.map \ No newline at end of file diff --git a/node_modules/domutils/lib/esm/traversal.d.ts.map b/node_modules/domutils/lib/esm/traversal.d.ts.map deleted file mode 100644 index 37e58b9..0000000 --- a/node_modules/domutils/lib/esm/traversal.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"traversal.d.ts","sourceRoot":"https://raw.githubusercontent.com/fb55/domutils/0ab8bcf1ecfc70dfc93291a4cb2496578ac25e9c/src/","sources":["traversal.ts"],"names":[],"mappings":"AAAA,OAAO,EAEH,OAAO,EACP,SAAS,EACT,OAAO,EACP,UAAU,EAEb,MAAM,YAAY,CAAC;AAEpB;;;;;;GAMG;AACH,wBAAgB,WAAW,CAAC,IAAI,EAAE,OAAO,GAAG,SAAS,EAAE,CAEtD;AAED,wBAAgB,SAAS,CAAC,IAAI,EAAE,OAAO,GAAG,UAAU,GAAG,IAAI,CAAC;AAY5D;;;;;;;;;;GAUG;AACH,wBAAgB,WAAW,CAAC,IAAI,EAAE,OAAO,GAAG,OAAO,EAAE,CAepD;AAED;;;;;;;GAOG;AACH,wBAAgB,iBAAiB,CAC7B,IAAI,EAAE,OAAO,EACb,IAAI,EAAE,MAAM,GACb,MAAM,GAAG,SAAS,CAEpB;AAED;;;;;;;GAOG;AACH,wBAAgB,SAAS,CAAC,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAM9D;AAED;;;;;;GAMG;AACH,wBAAgB,OAAO,CAAC,IAAI,EAAE,OAAO,GAAG,MAAM,CAE7C;AAED;;;;;;;GAOG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,OAAO,GAAG,OAAO,GAAG,IAAI,CAIhE;AAED;;;;;;;GAOG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,OAAO,GAAG,OAAO,GAAG,IAAI,CAIhE"} \ No newline at end of file diff --git a/node_modules/domutils/lib/esm/traversal.js b/node_modules/domutils/lib/esm/traversal.js deleted file mode 100644 index ea85db4..0000000 --- a/node_modules/domutils/lib/esm/traversal.js +++ /dev/null @@ -1,112 +0,0 @@ -import { isTag, hasChildren, } from "domhandler"; -/** - * Get a node's children. - * - * @category Traversal - * @param elem Node to get the children of. - * @returns `elem`'s children, or an empty array. - */ -export function getChildren(elem) { - return hasChildren(elem) ? elem.children : []; -} -/** - * Get a node's parent. - * - * @category Traversal - * @param elem Node to get the parent of. - * @returns `elem`'s parent node, or `null` if `elem` is a root node. - */ -export function getParent(elem) { - return elem.parent || null; -} -/** - * Gets an elements siblings, including the element itself. - * - * Attempts to get the children through the element's parent first. If we don't - * have a parent (the element is a root node), we walk the element's `prev` & - * `next` to get all remaining nodes. - * - * @category Traversal - * @param elem Element to get the siblings of. - * @returns `elem`'s siblings, including `elem`. - */ -export function getSiblings(elem) { - const parent = getParent(elem); - if (parent != null) - return getChildren(parent); - const siblings = [elem]; - let { prev, next } = elem; - while (prev != null) { - siblings.unshift(prev); - ({ prev } = prev); - } - while (next != null) { - siblings.push(next); - ({ next } = next); - } - return siblings; -} -/** - * Gets an attribute from an element. - * - * @category Traversal - * @param elem Element to check. - * @param name Attribute name to retrieve. - * @returns The element's attribute value, or `undefined`. - */ -export function getAttributeValue(elem, name) { - var _a; - return (_a = elem.attribs) === null || _a === void 0 ? void 0 : _a[name]; -} -/** - * Checks whether an element has an attribute. - * - * @category Traversal - * @param elem Element to check. - * @param name Attribute name to look for. - * @returns Returns whether `elem` has the attribute `name`. - */ -export function hasAttrib(elem, name) { - return (elem.attribs != null && - Object.prototype.hasOwnProperty.call(elem.attribs, name) && - elem.attribs[name] != null); -} -/** - * Get the tag name of an element. - * - * @category Traversal - * @param elem The element to get the name for. - * @returns The tag name of `elem`. - */ -export function getName(elem) { - return elem.name; -} -/** - * Returns the next element sibling of a node. - * - * @category Traversal - * @param elem The element to get the next sibling of. - * @returns `elem`'s next sibling that is a tag, or `null` if there is no next - * sibling. - */ -export function nextElementSibling(elem) { - let { next } = elem; - while (next !== null && !isTag(next)) - ({ next } = next); - return next; -} -/** - * Returns the previous element sibling of a node. - * - * @category Traversal - * @param elem The element to get the previous sibling of. - * @returns `elem`'s previous sibling that is a tag, or `null` if there is no - * previous sibling. - */ -export function prevElementSibling(elem) { - let { prev } = elem; - while (prev !== null && !isTag(prev)) - ({ prev } = prev); - return prev; -} -//# sourceMappingURL=traversal.js.map \ No newline at end of file diff --git a/node_modules/domutils/lib/esm/traversal.js.map b/node_modules/domutils/lib/esm/traversal.js.map deleted file mode 100644 index e25f52b..0000000 --- a/node_modules/domutils/lib/esm/traversal.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"traversal.js","sourceRoot":"https://raw.githubusercontent.com/fb55/domutils/0ab8bcf1ecfc70dfc93291a4cb2496578ac25e9c/src/","sources":["traversal.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,KAAK,EAKL,WAAW,GACd,MAAM,YAAY,CAAC;AAEpB;;;;;;GAMG;AACH,MAAM,UAAU,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,CAAC;QACxD,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,IAAI,CAC7B,CAAC;AACN,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,OAAO,CAAC,IAAa;IACjC,OAAO,IAAI,CAAC,IAAI,CAAC;AACrB,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,kBAAkB,CAAC,IAAa;IAC5C,IAAI,EAAE,IAAI,EAAE,GAAG,IAAI,CAAC;IACpB,OAAO,IAAI,KAAK,IAAI,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC;QAAE,CAAC,EAAE,IAAI,EAAE,GAAG,IAAI,CAAC,CAAC;IACxD,OAAO,IAAI,CAAC;AAChB,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,kBAAkB,CAAC,IAAa;IAC5C,IAAI,EAAE,IAAI,EAAE,GAAG,IAAI,CAAC;IACpB,OAAO,IAAI,KAAK,IAAI,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC;QAAE,CAAC,EAAE,IAAI,EAAE,GAAG,IAAI,CAAC,CAAC;IACxD,OAAO,IAAI,CAAC;AAChB,CAAC"} \ No newline at end of file diff --git a/node_modules/domutils/lib/feeds.d.ts b/node_modules/domutils/lib/feeds.d.ts deleted file mode 100644 index 19badb7..0000000 --- a/node_modules/domutils/lib/feeds.d.ts +++ /dev/null @@ -1,71 +0,0 @@ -import type { AnyNode } from "domhandler"; -/** - * The medium of a media item. - * - * @category Feeds - */ -export type FeedItemMediaMedium = "image" | "audio" | "video" | "document" | "executable"; -/** - * The type of a media item. - * - * @category Feeds - */ -export type FeedItemMediaExpression = "sample" | "full" | "nonstop"; -/** - * A media item of a feed entry. - * - * @category Feeds - */ -export interface FeedItemMedia { - medium: FeedItemMediaMedium | undefined; - isDefault: boolean; - url?: string; - fileSize?: number; - type?: string; - expression?: FeedItemMediaExpression; - bitrate?: number; - framerate?: number; - samplingrate?: number; - channels?: number; - duration?: number; - height?: number; - width?: number; - lang?: string; -} -/** - * An entry of a feed. - * - * @category Feeds - */ -export interface FeedItem { - id?: string; - title?: string; - link?: string; - description?: string; - pubDate?: Date; - media: FeedItemMedia[]; -} -/** - * The root of a feed. - * - * @category Feeds - */ -export interface Feed { - type: string; - id?: string; - title?: string; - link?: string; - description?: string; - updated?: Date; - author?: string; - items: FeedItem[]; -} -/** - * Get the feed object from the root of a DOM tree. - * - * @category Feeds - * @param doc - The DOM to to extract the feed from. - * @returns The feed. - */ -export declare function getFeed(doc: AnyNode[]): Feed | null; -//# sourceMappingURL=feeds.d.ts.map \ No newline at end of file diff --git a/node_modules/domutils/lib/feeds.d.ts.map b/node_modules/domutils/lib/feeds.d.ts.map deleted file mode 100644 index 37a29bf..0000000 --- a/node_modules/domutils/lib/feeds.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"feeds.d.ts","sourceRoot":"https://raw.githubusercontent.com/fb55/domutils/0ab8bcf1ecfc70dfc93291a4cb2496578ac25e9c/src/","sources":["feeds.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAW,MAAM,YAAY,CAAC;AAInD;;;;GAIG;AACH,MAAM,MAAM,mBAAmB,GACzB,OAAO,GACP,OAAO,GACP,OAAO,GACP,UAAU,GACV,YAAY,CAAC;AAEnB;;;;GAIG;AACH,MAAM,MAAM,uBAAuB,GAAG,QAAQ,GAAG,MAAM,GAAG,SAAS,CAAC;AAEpE;;;;GAIG;AACH,MAAM,WAAW,aAAa;IAC1B,MAAM,EAAE,mBAAmB,GAAG,SAAS,CAAC;IACxC,SAAS,EAAE,OAAO,CAAC;IACnB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,UAAU,CAAC,EAAE,uBAAuB,CAAC;IACrC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;;;GAIG;AACH,MAAM,WAAW,QAAQ;IACrB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,CAAC,EAAE,IAAI,CAAC;IACf,KAAK,EAAE,aAAa,EAAE,CAAC;CAC1B;AAED;;;;GAIG;AACH,MAAM,WAAW,IAAI;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,CAAC,EAAE,IAAI,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,QAAQ,EAAE,CAAC;CACrB;AAED;;;;;;GAMG;AACH,wBAAgB,OAAO,CAAC,GAAG,EAAE,OAAO,EAAE,GAAG,IAAI,GAAG,IAAI,CAQnD"} \ No newline at end of file diff --git a/node_modules/domutils/lib/feeds.js b/node_modules/domutils/lib/feeds.js deleted file mode 100644 index 62867ec..0000000 --- a/node_modules/domutils/lib/feeds.js +++ /dev/null @@ -1,190 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.getFeed = getFeed; -var stringify_js_1 = require("./stringify.js"); -var legacy_js_1 = require("./legacy.js"); -/** - * Get the feed object from the root of a DOM tree. - * - * @category Feeds - * @param doc - The DOM to to extract the feed from. - * @returns The feed. - */ -function getFeed(doc) { - var feedRoot = getOneElement(isValidFeed, doc); - return !feedRoot - ? null - : feedRoot.name === "feed" - ? getAtomFeed(feedRoot) - : getRssFeed(feedRoot); -} -/** - * Parse an Atom feed. - * - * @param feedRoot The root of the feed. - * @returns The parsed feed. - */ -function getAtomFeed(feedRoot) { - var _a; - var childs = feedRoot.children; - var feed = { - type: "atom", - items: (0, legacy_js_1.getElementsByTagName)("entry", childs).map(function (item) { - var _a; - var children = item.children; - var entry = { media: getMediaElements(children) }; - addConditionally(entry, "id", "id", children); - addConditionally(entry, "title", "title", children); - var href = (_a = getOneElement("link", children)) === null || _a === void 0 ? void 0 : _a.attribs["href"]; - if (href) { - entry.link = href; - } - var description = fetch("summary", children) || fetch("content", children); - if (description) { - entry.description = description; - } - var pubDate = fetch("updated", children); - if (pubDate) { - entry.pubDate = new Date(pubDate); - } - return entry; - }), - }; - addConditionally(feed, "id", "id", childs); - addConditionally(feed, "title", "title", childs); - var href = (_a = getOneElement("link", childs)) === null || _a === void 0 ? void 0 : _a.attribs["href"]; - if (href) { - feed.link = href; - } - addConditionally(feed, "description", "subtitle", childs); - var updated = fetch("updated", childs); - if (updated) { - feed.updated = new Date(updated); - } - addConditionally(feed, "author", "email", childs, true); - return feed; -} -/** - * Parse a RSS feed. - * - * @param feedRoot The root of the feed. - * @returns The parsed feed. - */ -function getRssFeed(feedRoot) { - var _a, _b; - var childs = (_b = (_a = getOneElement("channel", feedRoot.children)) === null || _a === void 0 ? void 0 : _a.children) !== null && _b !== void 0 ? _b : []; - var feed = { - type: feedRoot.name.substr(0, 3), - id: "", - items: (0, legacy_js_1.getElementsByTagName)("item", feedRoot.children).map(function (item) { - var children = item.children; - var entry = { media: getMediaElements(children) }; - addConditionally(entry, "id", "guid", children); - addConditionally(entry, "title", "title", children); - addConditionally(entry, "link", "link", children); - addConditionally(entry, "description", "description", children); - var pubDate = fetch("pubDate", children) || fetch("dc:date", children); - if (pubDate) - entry.pubDate = new Date(pubDate); - return entry; - }), - }; - addConditionally(feed, "title", "title", childs); - addConditionally(feed, "link", "link", childs); - addConditionally(feed, "description", "description", childs); - var updated = fetch("lastBuildDate", childs); - if (updated) { - feed.updated = new Date(updated); - } - addConditionally(feed, "author", "managingEditor", childs, true); - return feed; -} -var MEDIA_KEYS_STRING = ["url", "type", "lang"]; -var MEDIA_KEYS_INT = [ - "fileSize", - "bitrate", - "framerate", - "samplingrate", - "channels", - "duration", - "height", - "width", -]; -/** - * Get all media elements of a feed item. - * - * @param where Nodes to search in. - * @returns Media elements. - */ -function getMediaElements(where) { - return (0, legacy_js_1.getElementsByTagName)("media:content", where).map(function (elem) { - var attribs = elem.attribs; - var media = { - medium: attribs["medium"], - isDefault: !!attribs["isDefault"], - }; - for (var _i = 0, MEDIA_KEYS_STRING_1 = MEDIA_KEYS_STRING; _i < MEDIA_KEYS_STRING_1.length; _i++) { - var attrib = MEDIA_KEYS_STRING_1[_i]; - if (attribs[attrib]) { - media[attrib] = attribs[attrib]; - } - } - for (var _a = 0, MEDIA_KEYS_INT_1 = MEDIA_KEYS_INT; _a < MEDIA_KEYS_INT_1.length; _a++) { - var attrib = MEDIA_KEYS_INT_1[_a]; - if (attribs[attrib]) { - media[attrib] = parseInt(attribs[attrib], 10); - } - } - if (attribs["expression"]) { - media.expression = attribs["expression"]; - } - return media; - }); -} -/** - * Get one element by tag name. - * - * @param tagName Tag name to look for - * @param node Node to search in - * @returns The element or null - */ -function getOneElement(tagName, node) { - return (0, legacy_js_1.getElementsByTagName)(tagName, node, true, 1)[0]; -} -/** - * Get the text content of an element with a certain tag name. - * - * @param tagName Tag name to look for. - * @param where Node to search in. - * @param recurse Whether to recurse into child nodes. - * @returns The text content of the element. - */ -function fetch(tagName, where, recurse) { - if (recurse === void 0) { recurse = false; } - return (0, stringify_js_1.textContent)((0, legacy_js_1.getElementsByTagName)(tagName, where, recurse, 1)).trim(); -} -/** - * Adds a property to an object if it has a value. - * - * @param obj Object to be extended - * @param prop Property name - * @param tagName Tag name that contains the conditionally added property - * @param where Element to search for the property - * @param recurse Whether to recurse into child nodes. - */ -function addConditionally(obj, prop, tagName, where, recurse) { - if (recurse === void 0) { recurse = false; } - var val = fetch(tagName, where, recurse); - if (val) - obj[prop] = val; -} -/** - * Checks if an element is a feed root node. - * - * @param value The name of the element to check. - * @returns Whether an element is a feed root node. - */ -function isValidFeed(value) { - return value === "rss" || value === "feed" || value === "rdf:RDF"; -} -//# sourceMappingURL=feeds.js.map \ No newline at end of file diff --git a/node_modules/domutils/lib/feeds.js.map b/node_modules/domutils/lib/feeds.js.map deleted file mode 100644 index 7d02f20..0000000 --- a/node_modules/domutils/lib/feeds.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"feeds.js","sourceRoot":"https://raw.githubusercontent.com/fb55/domutils/0ab8bcf1ecfc70dfc93291a4cb2496578ac25e9c/src/","sources":["feeds.ts"],"names":[],"mappings":";;AAkFA,0BAQC;AAzFD,+CAA6C;AAC7C,yCAAmD;AAyEnD;;;;;;GAMG;AACH,SAAgB,OAAO,CAAC,GAAc;IAClC,IAAM,QAAQ,GAAG,aAAa,CAAC,WAAW,EAAE,GAAG,CAAC,CAAC;IAEjD,OAAO,CAAC,QAAQ;QACZ,CAAC,CAAC,IAAI;QACN,CAAC,CAAC,QAAQ,CAAC,IAAI,KAAK,MAAM;YACxB,CAAC,CAAC,WAAW,CAAC,QAAQ,CAAC;YACvB,CAAC,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC;AACjC,CAAC;AAED;;;;;GAKG;AACH,SAAS,WAAW,CAAC,QAAiB;;IAClC,IAAM,MAAM,GAAG,QAAQ,CAAC,QAAQ,CAAC;IAEjC,IAAM,IAAI,GAAS;QACf,IAAI,EAAE,MAAM;QACZ,KAAK,EAAE,IAAA,gCAAoB,EAAC,OAAO,EAAE,MAAM,CAAC,CAAC,GAAG,CAAC,UAAC,IAAI;;YAC1C,IAAA,QAAQ,GAAK,IAAI,SAAT,CAAU;YAC1B,IAAM,KAAK,GAAa,EAAE,KAAK,EAAE,gBAAgB,CAAC,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I,GAAG;QAAE,GAAG,CAAC,IAAI,CAAC,GAAG,GAA4B,CAAC;AACtD,CAAC;AAED;;;;;GAKG;AACH,SAAS,WAAW,CAAC,KAAa;IAC9B,OAAO,KAAK,KAAK,KAAK,IAAI,KAAK,KAAK,MAAM,IAAI,KAAK,KAAK,SAAS,CAAC;AACtE,CAAC"} \ No newline at end of file diff --git a/node_modules/domutils/lib/helpers.d.ts b/node_modules/domutils/lib/helpers.d.ts deleted file mode 100644 index e4ced08..0000000 --- a/node_modules/domutils/lib/helpers.d.ts +++ /dev/null @@ -1,59 +0,0 @@ -import { AnyNode } from "domhandler"; -/** - * Given an array of nodes, remove any member that is contained by another - * member. - * - * @category Helpers - * @param nodes Nodes to filter. - * @returns Remaining nodes that aren't contained by other nodes. - */ -export declare function removeSubsets(nodes: AnyNode[]): AnyNode[]; -/** - * @category Helpers - * @see {@link http://dom.spec.whatwg.org/#dom-node-comparedocumentposition} - */ -export declare const enum DocumentPosition { - DISCONNECTED = 1, - PRECEDING = 2, - FOLLOWING = 4, - CONTAINS = 8, - CONTAINED_BY = 16 -} -/** - * Compare the position of one node against another node in any other document, - * returning a bitmask with the values from {@link DocumentPosition}. - * - * Document order: - * > There is an ordering, document order, defined on all the nodes in the - * > document corresponding to the order in which the first character of the - * > XML representation of each node occurs in the XML representation of the - * > document after expansion of general entities. Thus, the document element - * > node will be the first node. Element nodes occur before their children. - * > Thus, document order orders element nodes in order of the occurrence of - * > their start-tag in the XML (after expansion of entities). The attribute - * > nodes of an element occur after the element and before its children. The - * > relative order of attribute nodes is implementation-dependent. - * - * Source: - * http://www.w3.org/TR/DOM-Level-3-Core/glossary.html#dt-document-order - * - * @category Helpers - * @param nodeA The first node to use in the comparison - * @param nodeB The second node to use in the comparison - * @returns A bitmask describing the input nodes' relative position. - * - * See http://dom.spec.whatwg.org/#dom-node-comparedocumentposition for - * a description of these values. - */ -export declare function compareDocumentPosition(nodeA: AnyNode, nodeB: AnyNode): number; -/** - * Sort an array of nodes based on their relative position in the document, - * removing any duplicate nodes. If the array contains nodes that do not belong - * to the same document, sort order is unspecified. - * - * @category Helpers - * @param nodes Array of DOM nodes. - * @returns Collection of unique nodes, sorted in document order. - */ -export declare function uniqueSort<T extends AnyNode>(nodes: T[]): T[]; -//# sourceMappingURL=helpers.d.ts.map \ No newline at end of file diff --git a/node_modules/domutils/lib/helpers.d.ts.map b/node_modules/domutils/lib/helpers.d.ts.map deleted file mode 100644 index 281f1d8..0000000 --- a/node_modules/domutils/lib/helpers.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"helpers.d.ts","sourceRoot":"https://raw.githubusercontent.com/fb55/domutils/0ab8bcf1ecfc70dfc93291a4cb2496578ac25e9c/src/","sources":["helpers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAe,OAAO,EAAc,MAAM,YAAY,CAAC;AAE9D;;;;;;;GAOG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,OAAO,EAAE,GAAG,OAAO,EAAE,CA6BzD;AACD;;;GAGG;AACH,0BAAkB,gBAAgB;IAC9B,YAAY,IAAI;IAChB,SAAS,IAAI;IACb,SAAS,IAAI;IACb,QAAQ,IAAI;IACZ,YAAY,KAAK;CACpB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,wBAAgB,uBAAuB,CACnC,KAAK,EAAE,OAAO,EACd,KAAK,EAAE,OAAO,GACf,MAAM,CA4CR;AAED;;;;;;;;GAQG;AACH,wBAAgB,UAAU,CAAC,CAAC,SAAS,OAAO,EAAE,KAAK,EAAE,CAAC,EAAE,GAAG,CAAC,EAAE,CAc7D"} \ No newline at end of file diff --git a/node_modules/domutils/lib/helpers.js b/node_modules/domutils/lib/helpers.js deleted file mode 100644 index 4aec318..0000000 --- a/node_modules/domutils/lib/helpers.js +++ /dev/null @@ -1,142 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.DocumentPosition = void 0; -exports.removeSubsets = removeSubsets; -exports.compareDocumentPosition = compareDocumentPosition; -exports.uniqueSort = uniqueSort; -var domhandler_1 = require("domhandler"); -/** - * Given an array of nodes, remove any member that is contained by another - * member. - * - * @category Helpers - * @param nodes Nodes to filter. - * @returns Remaining nodes that aren't contained by other nodes. - */ -function removeSubsets(nodes) { - var idx = nodes.length; - /* - * Check if each node (or one of its ancestors) is already contained in the - * array. - */ - while (--idx >= 0) { - var node = nodes[idx]; - /* - * Remove the node if it is not unique. - * We are going through the array from the end, so we only - * have to check nodes that preceed the node under consideration in the array. - */ - if (idx > 0 && nodes.lastIndexOf(node, idx - 1) >= 0) { - nodes.splice(idx, 1); - continue; - } - for (var ancestor = node.parent; ancestor; ancestor = ancestor.parent) { - if (nodes.includes(ancestor)) { - nodes.splice(idx, 1); - break; - } - } - } - return nodes; -} -/** - * @category Helpers - * @see {@link http://dom.spec.whatwg.org/#dom-node-comparedocumentposition} - */ -var DocumentPosition; -(function (DocumentPosition) { - DocumentPosition[DocumentPosition["DISCONNECTED"] = 1] = "DISCONNECTED"; - DocumentPosition[DocumentPosition["PRECEDING"] = 2] = "PRECEDING"; - DocumentPosition[DocumentPosition["FOLLOWING"] = 4] = "FOLLOWING"; - DocumentPosition[DocumentPosition["CONTAINS"] = 8] = "CONTAINS"; - DocumentPosition[DocumentPosition["CONTAINED_BY"] = 16] = "CONTAINED_BY"; -})(DocumentPosition || (exports.DocumentPosition = DocumentPosition = {})); -/** - * Compare the position of one node against another node in any other document, - * returning a bitmask with the values from {@link DocumentPosition}. - * - * Document order: - * > There is an ordering, document order, defined on all the nodes in the - * > document corresponding to the order in which the first character of the - * > XML representation of each node occurs in the XML representation of the - * > document after expansion of general entities. Thus, the document element - * > node will be the first node. Element nodes occur before their children. - * > Thus, document order orders element nodes in order of the occurrence of - * > their start-tag in the XML (after expansion of entities). The attribute - * > nodes of an element occur after the element and before its children. The - * > relative order of attribute nodes is implementation-dependent. - * - * Source: - * http://www.w3.org/TR/DOM-Level-3-Core/glossary.html#dt-document-order - * - * @category Helpers - * @param nodeA The first node to use in the comparison - * @param nodeB The second node to use in the comparison - * @returns A bitmask describing the input nodes' relative position. - * - * See http://dom.spec.whatwg.org/#dom-node-comparedocumentposition for - * a description of these values. - */ -function compareDocumentPosition(nodeA, nodeB) { - var aParents = []; - var bParents = []; - if (nodeA === nodeB) { - return 0; - } - var current = (0, domhandler_1.hasChildren)(nodeA) ? nodeA : nodeA.parent; - while (current) { - aParents.unshift(current); - current = current.parent; - } - current = (0, domhandler_1.hasChildren)(nodeB) ? nodeB : nodeB.parent; - while (current) { - bParents.unshift(current); - current = current.parent; - } - var maxIdx = Math.min(aParents.length, bParents.length); - var idx = 0; - while (idx < maxIdx && aParents[idx] === bParents[idx]) { - idx++; - } - if (idx === 0) { - return DocumentPosition.DISCONNECTED; - } - var sharedParent = aParents[idx - 1]; - var siblings = sharedParent.children; - var aSibling = aParents[idx]; - var bSibling = bParents[idx]; - if (siblings.indexOf(aSibling) > siblings.indexOf(bSibling)) { - if (sharedParent === nodeB) { - return DocumentPosition.FOLLOWING | DocumentPosition.CONTAINED_BY; - } - return DocumentPosition.FOLLOWING; - } - if (sharedParent === nodeA) { - return DocumentPosition.PRECEDING | DocumentPosition.CONTAINS; - } - return DocumentPosition.PRECEDING; -} -/** - * Sort an array of nodes based on their relative position in the document, - * removing any duplicate nodes. If the array contains nodes that do not belong - * to the same document, sort order is unspecified. - * - * @category Helpers - * @param nodes Array of DOM nodes. - * @returns Collection of unique nodes, sorted in document order. - */ -function uniqueSort(nodes) { - nodes = nodes.filter(function (node, i, arr) { return !arr.includes(node, i + 1); }); - nodes.sort(function (a, b) { - var relative = compareDocumentPosition(a, b); - if (relative & DocumentPosition.PRECEDING) { - return -1; - } - else if (relative & DocumentPosition.FOLLOWING) { - return 1; - } - return 0; - }); - return nodes; -} -//# sourceMappingURL=helpers.js.map \ No newline at end of file diff --git a/node_modules/domutils/lib/helpers.js.map b/node_modules/domutils/lib/helpers.js.map deleted file mode 100644 index fdc2893..0000000 --- a/node_modules/domutils/lib/helpers.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"helpers.js","sourceRoot":"https://raw.githubusercontent.com/fb55/domutils/0ab8bcf1ecfc70dfc93291a4cb2496578ac25e9c/src/","sources":["helpers.ts"],"names":[],"mappings":";;;AAUA,sCA6BC;AAuCD,0DA+CC;AAWD,gCAcC;AAtJD,yCAA8D;AAE9D;;;;;;;GAOG;AACH,SAAgB,aAAa,CAAC,KAAgB;IAC1C,IAAI,GAAG,GAAG,KAAK,CAAC,MAAM,CAAC;IAEvB;;;OAGG;IACH,OAAO,EAAE,GAAG,IAAI,CAAC,EAAE,CAAC;QAChB,IAAM,IAAI,GAAG,KAAK,CAAC,GAAG,CAAC,CAAC;QAExB;;;;WAIG;QACH,IAAI,GAAG,GAAG,CAAC,IAAI,KAAK,CAAC,WAAW,CAAC,IAAI,EAAE,GAAG,GAAG,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC;YACnD,KAAK,CAAC,MAAM,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC;YACrB,SAAS;QACb,CAAC;QAED,KAAK,IAAI,QAAQ,GAAG,IAAI,CAAC,MAAM,EAAE,QAAQ,EAAE,QAAQ,GAAG,QAAQ,CAAC,MAAM,EAAE,CAAC;YACpE,IAAI,KAAK,CAAC,QAAQ,CAAC,QAAQ,CAAC,EAAE,CAAC;gBAC3B,KAAK,CAAC,MAAM,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC;gBACrB,MAAM;YACV,CAAC;QACL,CAAC;IACL,CAAC;IAED,OAAO,KAAK,CAAC;AACjB,CAAC;AACD;;;GAGG;AACH,IAAkB,gBAMjB;AAND,WAAkB,gBAAgB;IAC9B,uEAAgB,CAAA;IAChB,iEAAa,CAAA;IACb,iEAAa,CAAA;IACb,+DAAY,CAAA;IACZ,wEAAiB,CAAA;AACrB,CAAC,EANiB,gBAAgB,gCAAhB,gBAAgB,QAMjC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,SAA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..0000000 --- a/node_modules/domutils/lib/index.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -export * from "./stringify.js"; -export * from "./traversal.js"; -export * from "./manipulation.js"; -export * from "./querying.js"; -export * from "./legacy.js"; -export * from "./helpers.js"; -export * from "./feeds.js"; -/** @deprecated Use these methods from `domhandler` directly. */ -export { isTag, isCDATA, isText, isComment, isDocument, hasChildren, } from "domhandler"; -//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/domutils/lib/index.d.ts.map b/node_modules/domutils/lib/index.d.ts.map deleted file mode 100644 index dd860ff..0000000 --- a/node_modules/domutils/lib/index.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"https://raw.githubusercontent.com/fb55/domutils/0ab8bcf1ecfc70dfc93291a4cb2496578ac25e9c/src/","sources":["index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,mBAAmB,CAAC;AAClC,cAAc,eAAe,CAAC;AAC9B,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC;AAC3B,gEAAgE;AAChE,OAAO,EACH,KAAK,EACL,OAAO,EACP,MAAM,EACN,SAAS,EACT,UAAU,EACV,WAAW,GACd,MAAM,YAAY,CAAC"} \ No newline at end of file diff --git a/node_modules/domutils/lib/index.js b/node_modules/domutils/lib/index.js deleted file mode 100644 index 1eb8e26..0000000 --- a/node_modules/domutils/lib/index.js +++ /dev/null @@ -1,33 +0,0 @@ -"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.hasChildren = exports.isDocument = exports.isComment = exports.isText = exports.isCDATA = exports.isTag = void 0; -__exportStar(require("./stringify.js"), exports); -__exportStar(require("./traversal.js"), exports); -__exportStar(require("./manipulation.js"), exports); -__exportStar(require("./querying.js"), exports); -__exportStar(require("./legacy.js"), exports); -__exportStar(require("./helpers.js"), exports); -__exportStar(require("./feeds.js"), exports); -/** @deprecated Use these methods from `domhandler` directly. */ -var domhandler_1 = require("domhandler"); -Object.defineProperty(exports, "isTag", { enumerable: true, get: function () { return domhandler_1.isTag; } }); -Object.defineProperty(exports, "isCDATA", { enumerable: true, get: function () { return domhandler_1.isCDATA; } }); -Object.defineProperty(exports, "isText", { enumerable: true, get: function () { return domhandler_1.isText; } }); -Object.defineProperty(exports, "isComment", { enumerable: true, get: function () { return domhandler_1.isComment; } }); -Object.defineProperty(exports, "isDocument", { enumerable: true, get: function () { return domhandler_1.isDocument; } }); -Object.defineProperty(exports, "hasChildren", { enumerable: true, get: function () { return domhandler_1.hasChildren; } }); -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/domutils/lib/index.js.map b/node_modules/domutils/lib/index.js.map deleted file mode 100644 index d9d14b1..0000000 --- a/node_modules/domutils/lib/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sourceRoot":"https://raw.githubusercontent.com/fb55/domutils/0ab8bcf1ecfc70dfc93291a4cb2496578ac25e9c/src/","sources":["index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,iDAA+B;AAC/B,iDAA+B;AAC/B,oDAAkC;AAClC,gDAA8B;AAC9B,8CAA4B;AAC5B,+CAA6B;AAC7B,6CAA2B;AAC3B,gEAAgE;AAChE,yCAOoB;AANhB,mGAAA,KAAK,OAAA;AACL,qGAAA,OAAO,OAAA;AACP,oGAAA,MAAM,OAAA;AACN,uGAAA,SAAS,OAAA;AACT,wGAAA,UAAU,OAAA;AACV,yGAAA,WAAW,OAAA"} \ No newline at end of file diff --git a/node_modules/domutils/lib/legacy.d.ts b/node_modules/domutils/lib/legacy.d.ts deleted file mode 100644 index a6f7a5b..0000000 --- a/node_modules/domutils/lib/legacy.d.ts +++ /dev/null @@ -1,79 +0,0 @@ -import { AnyNode, Element } from "domhandler"; -import type { ElementType } from "domelementtype"; -/** - * An object with keys to check elements against. If a key is `tag_name`, - * `tag_type` or `tag_contains`, it will check the value against that specific - * value. Otherwise, it will check an attribute with the key's name. - * - * @category Legacy Query Functions - */ -export interface TestElementOpts { - tag_name?: string | ((name: string) => boolean); - tag_type?: string | ((name: string) => boolean); - tag_contains?: string | ((data?: string) => boolean); - [attributeName: string]: undefined | string | ((attributeValue: string) => boolean); -} -/** - * Checks whether a node matches the description in `options`. - * - * @category Legacy Query Functions - * @param options An object describing nodes to look for. - * @param node The element to test. - * @returns Whether the element matches the description in `options`. - */ -export declare function testElement(options: TestElementOpts, node: AnyNode): boolean; -/** - * Returns all nodes that match `options`. - * - * @category Legacy Query Functions - * @param options An object describing nodes to look for. - * @param nodes Nodes to search through. - * @param recurse Also consider child nodes. - * @param limit Maximum number of nodes to return. - * @returns All nodes that match `options`. - */ -export declare function getElements(options: TestElementOpts, nodes: AnyNode | AnyNode[], recurse: boolean, limit?: number): AnyNode[]; -/** - * Returns the node with the supplied ID. - * - * @category Legacy Query Functions - * @param id The unique ID attribute value to look for. - * @param nodes Nodes to search through. - * @param recurse Also consider child nodes. - * @returns The node with the supplied ID. - */ -export declare function getElementById(id: string | ((id: string) => boolean), nodes: AnyNode | AnyNode[], recurse?: boolean): Element | null; -/** - * Returns all nodes with the supplied `tagName`. - * - * @category Legacy Query Functions - * @param tagName Tag name to search for. - * @param nodes Nodes to search through. - * @param recurse Also consider child nodes. - * @param limit Maximum number of nodes to return. - * @returns All nodes with the supplied `tagName`. - */ -export declare function getElementsByTagName(tagName: string | ((name: string) => boolean), nodes: AnyNode | AnyNode[], recurse?: boolean, limit?: number): Element[]; -/** - * Returns all nodes with the supplied `className`. - * - * @category Legacy Query Functions - * @param className Class name to search for. - * @param nodes Nodes to search through. - * @param recurse Also consider child nodes. - * @param limit Maximum number of nodes to return. - * @returns All nodes with the supplied `className`. - */ -export declare function getElementsByClassName(className: string | ((name: string) => boolean), nodes: AnyNode | AnyNode[], recurse?: boolean, limit?: number): Element[]; -/** - * Returns all nodes with the supplied `type`. - * - * @category Legacy Query Functions - * @param type Element type to look for. - * @param nodes Nodes to search through. - * @param recurse Also consider child nodes. - * @param limit Maximum number of nodes to return. - * @returns All nodes with the supplied `type`. - */ -export declare function getElementsByTagType(type: ElementType | ((type: ElementType) => boolean), nodes: AnyNode | AnyNode[], recurse?: boolean, limit?: number): AnyNode[]; -//# sourceMappingURL=legacy.d.ts.map \ No newline at end of file diff --git a/node_modules/domutils/lib/legacy.d.ts.map b/node_modules/domutils/lib/legacy.d.ts.map deleted file mode 100644 index e4dd4df..0000000 --- a/node_modules/domutils/lib/legacy.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"legacy.d.ts","sourceRoot":"https://raw.githubusercontent.com/fb55/domutils/0ab8bcf1ecfc70dfc93291a4cb2496578ac25e9c/src/","sources":["legacy.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAC7D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAKlD;;;;;;GAMG;AACH,MAAM,WAAW,eAAe;IAC5B,QAAQ,CAAC,EAAE,MAAM,GAAG,CAAC,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,CAAC;IAChD,QAAQ,CAAC,EAAE,MAAM,GAAG,CAAC,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,CAAC;IAChD,YAAY,C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C,CAAC,IAAI,EAAE,WAAW,KAAK,OAAO,CAAC,EACpD,KAAK,EAAE,OAAO,GAAG,OAAO,EAAE,EAC1B,OAAO,UAAO,EACd,KAAK,GAAE,MAAiB,GACzB,OAAO,EAAE,CAEX"} \ No newline at end of file diff --git a/node_modules/domutils/lib/legacy.js b/node_modules/domutils/lib/legacy.js deleted file mode 100644 index d1b5c65..0000000 --- a/node_modules/domutils/lib/legacy.js +++ /dev/null @@ -1,168 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.testElement = testElement; -exports.getElements = getElements; -exports.getElementById = getElementById; -exports.getElementsByTagName = getElementsByTagName; -exports.getElementsByClassName = getElementsByClassName; -exports.getElementsByTagType = getElementsByTagType; -var domhandler_1 = require("domhandler"); -var querying_js_1 = require("./querying.js"); -/** - * A map of functions to check nodes against. - */ -var Checks = { - tag_name: function (name) { - if (typeof name === "function") { - return function (elem) { return (0, domhandler_1.isTag)(elem) && name(elem.name); }; - } - else if (name === "*") { - return domhandler_1.isTag; - } - return function (elem) { return (0, domhandler_1.isTag)(elem) && elem.name === name; }; - }, - tag_type: function (type) { - if (typeof type === "function") { - return function (elem) { return type(elem.type); }; - } - return function (elem) { return elem.type === type; }; - }, - tag_contains: function (data) { - if (typeof data === "function") { - return function (elem) { return (0, domhandler_1.isText)(elem) && data(elem.data); }; - } - return function (elem) { return (0, domhandler_1.isText)(elem) && elem.data === data; }; - }, -}; -/** - * Returns a function to check whether a node has an attribute with a particular - * value. - * - * @param attrib Attribute to check. - * @param value Attribute value to look for. - * @returns A function to check whether the a node has an attribute with a - * particular value. - */ -function getAttribCheck(attrib, value) { - if (typeof value === "function") { - return function (elem) { return (0, domhandler_1.isTag)(elem) && value(elem.attribs[attrib]); }; - } - return function (elem) { return (0, domhandler_1.isTag)(elem) && elem.attribs[attrib] === value; }; -} -/** - * Returns a function that returns `true` if either of the input functions - * returns `true` for a node. - * - * @param a First function to combine. - * @param b Second function to combine. - * @returns A function taking a node and returning `true` if either of the input - * functions returns `true` for the node. - */ -function combineFuncs(a, b) { - return function (elem) { return a(elem) || b(elem); }; -} -/** - * Returns a function that executes all checks in `options` and returns `true` - * if any of them match a node. - * - * @param options An object describing nodes to look for. - * @returns A function that executes all checks in `options` and returns `true` - * if any of them match a node. - */ -function compileTest(options) { - var funcs = Object.keys(options).map(function (key) { - var value = options[key]; - return Object.prototype.hasOwnProperty.call(Checks, key) - ? Checks[key](value) - : getAttribCheck(key, value); - }); - return funcs.length === 0 ? null : funcs.reduce(combineFuncs); -} -/** - * Checks whether a node matches the description in `options`. - * - * @category Legacy Query Functions - * @param options An object describing nodes to look for. - * @param node The element to test. - * @returns Whether the element matches the description in `options`. - */ -function testElement(options, node) { - var test = compileTest(options); - return test ? test(node) : true; -} -/** - * Returns all nodes that match `options`. - * - * @category Legacy Query Functions - * @param options An object describing nodes to look for. - * @param nodes Nodes to search through. - * @param recurse Also consider child nodes. - * @param limit Maximum number of nodes to return. - * @returns All nodes that match `options`. - */ -function getElements(options, nodes, recurse, limit) { - if (limit === void 0) { limit = Infinity; } - var test = compileTest(options); - return test ? (0, querying_js_1.filter)(test, nodes, recurse, limit) : []; -} -/** - * Returns the node with the supplied ID. - * - * @category Legacy Query Functions - * @param id The unique ID attribute value to look for. - * @param nodes Nodes to search through. - * @param recurse Also consider child nodes. - * @returns The node with the supplied ID. - */ -function getElementById(id, nodes, recurse) { - if (recurse === void 0) { recurse = true; } - if (!Array.isArray(nodes)) - nodes = [nodes]; - return (0, querying_js_1.findOne)(getAttribCheck("id", id), nodes, recurse); -} -/** - * Returns all nodes with the supplied `tagName`. - * - * @category Legacy Query Functions - * @param tagName Tag name to search for. - * @param nodes Nodes to search through. - * @param recurse Also consider child nodes. - * @param limit Maximum number of nodes to return. - * @returns All nodes with the supplied `tagName`. - */ -function getElementsByTagName(tagName, nodes, recurse, limit) { - if (recurse === void 0) { recurse = true; } - if (limit === void 0) { limit = Infinity; } - return (0, querying_js_1.filter)(Checks["tag_name"](tagName), nodes, recurse, limit); -} -/** - * Returns all nodes with the supplied `className`. - * - * @category Legacy Query Functions - * @param className Class name to search for. - * @param nodes Nodes to search through. - * @param recurse Also consider child nodes. - * @param limit Maximum number of nodes to return. - * @returns All nodes with the supplied `className`. - */ -function getElementsByClassName(className, nodes, recurse, limit) { - if (recurse === void 0) { recurse = true; } - if (limit === void 0) { limit = Infinity; } - return (0, querying_js_1.filter)(getAttribCheck("class", className), nodes, recurse, limit); -} -/** - * Returns all nodes with the supplied `type`. - * - * @category Legacy Query Functions - * @param type Element type to look for. - * @param nodes Nodes to search through. - * @param recurse Also consider child nodes. - * @param limit Maximum number of nodes to return. - * @returns All nodes with the supplied `type`. - */ -function getElementsByTagType(type, nodes, recurse, limit) { - if (recurse === void 0) { recurse = true; } - if (limit === void 0) { limit = Infinity; } - return (0, querying_js_1.filter)(Checks["tag_type"](type), nodes, recurse, limit); -} -//# sourceMappingURL=legacy.js.map \ No newline at end of file diff --git a/node_modules/domutils/lib/legacy.js.map b/node_modules/domutils/lib/legacy.js.map deleted file mode 100644 index 5b62d4c..0000000 --- a/node_modules/domutils/lib/legacy.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"legacy.js","sourceRoot":"https://raw.githubusercontent.com/fb55/domutils/0ab8bcf1ecfc70dfc93291a4cb2496578ac25e9c/src/","sources":["legacy.ts"],"names":[],"mappings":";;AA+GA,kCAGC;AAYD,kCAQC;AAWD,wCAOC;AAYD,oDAYC;AAYD,wDAYC;AAYD,oDAOC;AA3ND,yCAA6D;AAE7D,6CAAgD;AAqBhD;;GAEG;AACH,IAAM,MAAM,GAGR;IACA,QAAQ,YAAC,IAAI;QACT,IAAI,OAAO,IAAI,KAAK,UAAU,EAAE,CAAC;YAC7B,OAAO,UAAC,IAAa,IAAK,OAAA,IAAA,kBAAK,EAAC,IAAI,CAAC,IAAI,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,EAA9B,CAA8B,CAAC;QAC7D,CAAC;aAAM,IAAI,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ff --git a/node_modules/domutils/lib/manipulation.d.ts b/node_modules/domutils/lib/manipulation.d.ts deleted file mode 100644 index 70369dd..0000000 --- a/node_modules/domutils/lib/manipulation.d.ts +++ /dev/null @@ -1,49 +0,0 @@ -import type { ChildNode, ParentNode } from "domhandler"; -/** - * Remove an element from the dom - * - * @category Manipulation - * @param elem The element to be removed - */ -export declare function removeElement(elem: ChildNode): void; -/** - * Replace an element in the dom - * - * @category Manipulation - * @param elem The element to be replaced - * @param replacement The element to be added - */ -export declare function replaceElement(elem: ChildNode, replacement: ChildNode): void; -/** - * Append a child to an element. - * - * @category Manipulation - * @param parent The element to append to. - * @param child The element to be added as a child. - */ -export declare function appendChild(parent: ParentNode, child: ChildNode): void; -/** - * Append an element after another. - * - * @category Manipulation - * @param elem The element to append after. - * @param next The element be added. - */ -export declare function append(elem: ChildNode, next: ChildNode): void; -/** - * Prepend a child to an element. - * - * @category Manipulation - * @param parent The element to prepend before. - * @param child The element to be added as a child. - */ -export declare function prependChild(parent: ParentNode, child: ChildNode): void; -/** - * Prepend an element before another. - * - * @category Manipulation - * @param elem The element to prepend before. - * @param prev The element be added. - */ -export declare function prepend(elem: ChildNode, prev: ChildNode): void; -//# sourceMappingURL=manipulation.d.ts.map \ No newline at end of file diff --git a/node_modules/domutils/lib/manipulation.d.ts.map b/node_modules/domutils/lib/manipulation.d.ts.map deleted file mode 100644 index 9146f84..0000000 --- a/node_modules/domutils/lib/manipulation.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"manipulation.d.ts","sourceRoot":"https://raw.githubusercontent.com/fb55/domutils/0ab8bcf1ecfc70dfc93291a4cb2496578ac25e9c/src/","sources":["manipulation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAExD;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,SAAS,GAAG,IAAI,CAcnD;AAED;;;;;;GAMG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,SAAS,EAAE,WAAW,EAAE,SAAS,GAAG,IAAI,CAiB5E;AAED;;;;;;GAMG;AACH,wBAAgB,WAAW,CAAC,MAAM,EAAE,UAAU,EAAE,KAAK,EAAE,SAAS,GAAG,IAAI,CAatE;AAED;;;;;;GAMG;AACH,wBAAgB,MAAM,CAAC,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,SAAS,GAAG,IAAI,CAoB7D;AAED;;;;;;GAMG;AACH,wBAAgB,YAAY,CAAC,MAAM,EAAE,UAAU,EAAE,KAAK,EAAE,SAAS,GAAG,IAAI,CAavE;AAED;;;;;;GAMG;AACH,wBAAgB,OAAO,CAAC,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,SAAS,GAAG,IAAI,CAiB9D"} \ No newline at end of file diff --git a/node_modules/domutils/lib/manipulation.js b/node_modules/domutils/lib/manipulation.js deleted file mode 100644 index a1bb9e6..0000000 --- a/node_modules/domutils/lib/manipulation.js +++ /dev/null @@ -1,142 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.removeElement = removeElement; -exports.replaceElement = replaceElement; -exports.appendChild = appendChild; -exports.append = append; -exports.prependChild = prependChild; -exports.prepend = prepend; -/** - * Remove an element from the dom - * - * @category Manipulation - * @param elem The element to be removed - */ -function removeElement(elem) { - if (elem.prev) - elem.prev.next = elem.next; - if (elem.next) - elem.next.prev = elem.prev; - if (elem.parent) { - var childs = elem.parent.children; - var childsIndex = childs.lastIndexOf(elem); - if (childsIndex >= 0) { - childs.splice(childsIndex, 1); - } - } - elem.next = null; - elem.prev = null; - elem.parent = null; -} -/** - * Replace an element in the dom - * - * @category Manipulation - * @param elem The element to be replaced - * @param replacement The element to be added - */ -function replaceElement(elem, replacement) { - var prev = (replacement.prev = elem.prev); - if (prev) { - prev.next = replacement; - } - var next = (replacement.next = elem.next); - if (next) { - next.prev = replacement; - } - var parent = (replacement.parent = elem.parent); - if (parent) { - var childs = parent.children; - childs[childs.lastIndexOf(elem)] = replacement; - elem.parent = null; - } -} -/** - * Append a child to an element. - * - * @category Manipulation - * @param parent The element to append to. - * @param child The element to be added as a child. - */ -function appendChild(parent, child) { - removeElement(child); - child.next = null; - child.parent = parent; - if (parent.children.push(child) > 1) { - var sibling = parent.children[parent.children.length - 2]; - sibling.next = child; - child.prev = sibling; - } - else { - child.prev = null; - } -} -/** - * Append an element after another. - * - * @category Manipulation - * @param elem The element to append after. - * @param next The element be added. - */ -function append(elem, next) { - removeElement(next); - var parent = elem.parent; - var currNext = elem.next; - next.next = currNext; - next.prev = elem; - elem.next = next; - next.parent = parent; - if (currNext) { - currNext.prev = next; - if (parent) { - var childs = parent.children; - childs.splice(childs.lastIndexOf(currNext), 0, next); - } - } - else if (parent) { - parent.children.push(next); - } -} -/** - * Prepend a child to an element. - * - * @category Manipulation - * @param parent The element to prepend before. - * @param child The element to be added as a child. - */ -function prependChild(parent, child) { - removeElement(child); - child.parent = parent; - child.prev = null; - if (parent.children.unshift(child) !== 1) { - var sibling = parent.children[1]; - sibling.prev = child; - child.next = sibling; - } - else { - child.next = null; - } -} -/** - * Prepend an element before another. - * - * @category Manipulation - * @param elem The element to prepend before. - * @param prev The element be added. - */ -function prepend(elem, prev) { - removeElement(prev); - var parent = elem.parent; - if (parent) { - var childs = parent.children; - childs.splice(childs.indexOf(elem), 0, prev); - } - if (elem.prev) { - elem.prev.next = prev; - } - prev.parent = parent; - prev.prev = elem.prev; - prev.next = elem; - elem.prev = prev; -} -//# sourceMappingURL=manipulation.js.map \ No newline at end of file diff --git a/node_modules/domutils/lib/manipulation.js.map b/node_modules/domutils/lib/manipulation.js.map deleted file mode 100644 index 7ec5beb..0000000 --- a/node_modules/domutils/lib/manipulation.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"manipulation.js","sourceRoot":"https://raw.githubusercontent.com/fb55/domutils/0ab8bcf1ecfc70dfc93291a4cb2496578ac25e9c/src/","sources":["manipulation.ts"],"names":[],"mappings":";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IAC1B,CAAC;IAED,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACrB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC;IACtB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;IACjB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/node_modules/domutils/lib/querying.d.ts b/node_modules/domutils/lib/querying.d.ts deleted file mode 100644 index 8a6dc1f..0000000 --- a/node_modules/domutils/lib/querying.d.ts +++ /dev/null @@ -1,64 +0,0 @@ -import { Element, AnyNode, ParentNode } from "domhandler"; -/** - * Search a node and its children for nodes passing a test function. If `node` is not an array, it will be wrapped in one. - * - * @category Querying - * @param test Function to test nodes on. - * @param node Node to search. Will be included in the result set if it matches. - * @param recurse Also consider child nodes. - * @param limit Maximum number of nodes to return. - * @returns All nodes passing `test`. - */ -export declare function filter(test: (elem: AnyNode) => boolean, node: AnyNode | AnyNode[], recurse?: boolean, limit?: number): AnyNode[]; -/** - * Search an array of nodes and their children for nodes passing a test function. - * - * @category Querying - * @param test Function to test nodes on. - * @param nodes Array of nodes to search. - * @param recurse Also consider child nodes. - * @param limit Maximum number of nodes to return. - * @returns All nodes passing `test`. - */ -export declare function find(test: (elem: AnyNode) => boolean, nodes: AnyNode[] | ParentNode, recurse: boolean, limit: number): AnyNode[]; -/** - * Finds the first element inside of an array that matches a test function. This is an alias for `Array.prototype.find`. - * - * @category Querying - * @param test Function to test nodes on. - * @param nodes Array of nodes to search. - * @returns The first node in the array that passes `test`. - * @deprecated Use `Array.prototype.find` directly. - */ -export declare function findOneChild<T>(test: (elem: T) => boolean, nodes: T[]): T | undefined; -/** - * Finds one element in a tree that passes a test. - * - * @category Querying - * @param test Function to test nodes on. - * @param nodes Node or array of nodes to search. - * @param recurse Also consider child nodes. - * @returns The first node that passes `test`. - */ -export declare function findOne(test: (elem: Element) => boolean, nodes: AnyNode[] | ParentNode, recurse?: boolean): Element | null; -/** - * Checks if a tree of nodes contains at least one node passing a test. - * - * @category Querying - * @param test Function to test nodes on. - * @param nodes Array of nodes to search. - * @returns Whether a tree of nodes contains at least one node passing the test. - */ -export declare function existsOne(test: (elem: Element) => boolean, nodes: AnyNode[] | ParentNode): boolean; -/** - * Search an array of nodes and their children for elements passing a test function. - * - * Same as `find`, but limited to elements and with less options, leading to reduced complexity. - * - * @category Querying - * @param test Function to test nodes on. - * @param nodes Array of nodes to search. - * @returns All nodes passing `test`. - */ -export declare function findAll(test: (elem: Element) => boolean, nodes: AnyNode[] | ParentNode): Element[]; -//# sourceMappingURL=querying.d.ts.map \ No newline at end of file diff --git a/node_modules/domutils/lib/querying.d.ts.map b/node_modules/domutils/lib/querying.d.ts.map deleted file mode 100644 index 0f4ae22..0000000 --- a/node_modules/domutils/lib/querying.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"querying.d.ts","sourceRoot":"https://raw.githubusercontent.com/fb55/domutils/0ab8bcf1ecfc70dfc93291a4cb2496578ac25e9c/src/","sources":["querying.ts"],"names":[],"mappings":"AAAA,OAAO,EAAsB,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAE9E;;;;;;;;;GASG;AACH,wBAAgB,MAAM,CAClB,IAAI,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,OAAO,EAChC,IAAI,EAAE,OAAO,GAAG,OAAO,EAAE,EACzB,OAAO,UAAO,EACd,KAAK,GAAE,MAAiB,GACzB,OAAO,EAAE,CAEX;AAED;;;;;;;;;GASG;AACH,wBAAgB,IAAI,CAChB,IAAI,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,OAAO,EAChC,KAAK,EAAE,OAAO,EAAE,GAAG,UAAU,EAC7B,OAAO,EAAE,OAAO,EAChB,KAAK,EAAE,MAAM,GACd,OAAO,EAAE,CAuCX;AAED;;;;;;;;GAQG;AACH,wBAAgB,YAAY,CAAC,CAAC,EAC1B,IAAI,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,OAAO,EAC1B,KAAK,EAAE,CAAC,EAAE,GACX,CAAC,GAAG,SAAS,CAEf;AAED;;;;;;;;GAQG;AACH,wBAAgB,OAAO,CACnB,IAAI,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,OAAO,EAChC,KAAK,EAAE,OAAO,EAAE,GAAG,UAAU,EAC7B,OAAO,UAAO,GACf,OAAO,GAAG,IAAI,CAchB;AAED;;;;;;;GAOG;AACH,wBAAgB,SAAS,CACrB,IAAI,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,OAAO,EAChC,KAAK,EAAE,OAAO,EAAE,GAAG,UAAU,GAC9B,OAAO,CAMT;AAED;;;;;;;;;GASG;AACH,wBAAgB,OAAO,CACnB,IAAI,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,OAAO,EAChC,KAAK,EAAE,OAAO,EAAE,GAAG,UAAU,GAC9B,OAAO,EAAE,CA4BX"} \ No newline at end of file diff --git a/node_modules/domutils/lib/querying.js b/node_modules/domutils/lib/querying.js deleted file mode 100644 index f3e3fa9..0000000 --- a/node_modules/domutils/lib/querying.js +++ /dev/null @@ -1,155 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.filter = filter; -exports.find = find; -exports.findOneChild = findOneChild; -exports.findOne = findOne; -exports.existsOne = existsOne; -exports.findAll = findAll; -var domhandler_1 = require("domhandler"); -/** - * Search a node and its children for nodes passing a test function. If `node` is not an array, it will be wrapped in one. - * - * @category Querying - * @param test Function to test nodes on. - * @param node Node to search. Will be included in the result set if it matches. - * @param recurse Also consider child nodes. - * @param limit Maximum number of nodes to return. - * @returns All nodes passing `test`. - */ -function filter(test, node, recurse, limit) { - if (recurse === void 0) { recurse = true; } - if (limit === void 0) { limit = Infinity; } - return find(test, Array.isArray(node) ? node : [node], recurse, limit); -} -/** - * Search an array of nodes and their children for nodes passing a test function. - * - * @category Querying - * @param test Function to test nodes on. - * @param nodes Array of nodes to search. - * @param recurse Also consider child nodes. - * @param limit Maximum number of nodes to return. - * @returns All nodes passing `test`. - */ -function find(test, nodes, recurse, limit) { - var result = []; - /** Stack of the arrays we are looking at. */ - var nodeStack = [Array.isArray(nodes) ? nodes : [nodes]]; - /** Stack of the indices within the arrays. */ - var indexStack = [0]; - for (;;) { - // First, check if the current array has any more elements to look at. - if (indexStack[0] >= nodeStack[0].length) { - // If we have no more arrays to look at, we are done. - if (indexStack.length === 1) { - return result; - } - // Otherwise, remove the current array from the stack. - nodeStack.shift(); - indexStack.shift(); - // Loop back to the start to continue with the next array. - continue; - } - var elem = nodeStack[0][indexStack[0]++]; - if (test(elem)) { - result.push(elem); - if (--limit <= 0) - return result; - } - if (recurse && (0, domhandler_1.hasChildren)(elem) && elem.children.length > 0) { - /* - * Add the children to the stack. We are depth-first, so this is - * the next array we look at. - */ - indexStack.unshift(0); - nodeStack.unshift(elem.children); - } - } -} -/** - * Finds the first element inside of an array that matches a test function. This is an alias for `Array.prototype.find`. - * - * @category Querying - * @param test Function to test nodes on. - * @param nodes Array of nodes to search. - * @returns The first node in the array that passes `test`. - * @deprecated Use `Array.prototype.find` directly. - */ -function findOneChild(test, nodes) { - return nodes.find(test); -} -/** - * Finds one element in a tree that passes a test. - * - * @category Querying - * @param test Function to test nodes on. - * @param nodes Node or array of nodes to search. - * @param recurse Also consider child nodes. - * @returns The first node that passes `test`. - */ -function findOne(test, nodes, recurse) { - if (recurse === void 0) { recurse = true; } - var searchedNodes = Array.isArray(nodes) ? nodes : [nodes]; - for (var i = 0; i < searchedNodes.length; i++) { - var node = searchedNodes[i]; - if ((0, domhandler_1.isTag)(node) && test(node)) { - return node; - } - if (recurse && (0, domhandler_1.hasChildren)(node) && node.children.length > 0) { - var found = findOne(test, node.children, true); - if (found) - return found; - } - } - return null; -} -/** - * Checks if a tree of nodes contains at least one node passing a test. - * - * @category Querying - * @param test Function to test nodes on. - * @param nodes Array of nodes to search. - * @returns Whether a tree of nodes contains at least one node passing the test. - */ -function existsOne(test, nodes) { - return (Array.isArray(nodes) ? nodes : [nodes]).some(function (node) { - return ((0, domhandler_1.isTag)(node) && test(node)) || - ((0, domhandler_1.hasChildren)(node) && existsOne(test, node.children)); - }); -} -/** - * Search an array of nodes and their children for elements passing a test function. - * - * Same as `find`, but limited to elements and with less options, leading to reduced complexity. - * - * @category Querying - * @param test Function to test nodes on. - * @param nodes Array of nodes to search. - * @returns All nodes passing `test`. - */ -function findAll(test, nodes) { - var result = []; - var nodeStack = [Array.isArray(nodes) ? nodes : [nodes]]; - var indexStack = [0]; - for (;;) { - if (indexStack[0] >= nodeStack[0].length) { - if (nodeStack.length === 1) { - return result; - } - // Otherwise, remove the current array from the stack. - nodeStack.shift(); - indexStack.shift(); - // Loop back to the start to continue with the next array. - continue; - } - var elem = nodeStack[0][indexStack[0]++]; - if ((0, domhandler_1.isTag)(elem) && test(elem)) - result.push(elem); - if ((0, domhandler_1.hasChildren)(elem) && elem.children.length > 0) { - indexStack.unshift(0); - nodeStack.unshift(elem.children); - } - } -} -//# sourceMappingURL=querying.js.map \ No newline at end of file diff --git a/node_modules/domutils/lib/querying.js.map b/node_modules/domutils/lib/querying.js.map deleted file mode 100644 index 8027b58..0000000 --- a/node_modules/domutils/lib/querying.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"querying.js","sourceRoot":"https://raw.githubusercontent.com/fb55/domutils/0ab8bcf1ecfc70dfc93291a4cb2496578ac25e9c/src/","sources":["querying.ts"],"names":[],"mappings":";;AAYA,wBAOC;AAYD,oBA4CC;AAWD,oCAKC;AAWD,0BAkBC;AAUD,8BASC;AAYD,0BA+BC;AAtLD,yCAA8E;AAE9E;;;;;;;;;GASG;AACH,SAAgB,MAAM,CAClB,IAAgC,EAChC,IAAyB,EACzB,OAAc,EACd,KAAwB;IADxB,wBAAA,EAAA,cAAc;IACd,sBAAA,EAAA,gBAAwB;IAExB,OAAO,IAAI,CAAC,IAAI,EAAE,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC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C,CAAC,CAAC,CAAC;YACtB,SAAS,CAAC,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QACrC,CAAC;IACL,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/domutils/lib/stringify.d.ts b/node_modules/domutils/lib/stringify.d.ts deleted file mode 100644 index 6e6e397..0000000 --- a/node_modules/domutils/lib/stringify.d.ts +++ /dev/null @@ -1,46 +0,0 @@ -import { AnyNode } from "domhandler"; -import { DomSerializerOptions } from "dom-serializer"; -/** - * @category Stringify - * @deprecated Use the `dom-serializer` module directly. - * @param node Node to get the outer HTML of. - * @param options Options for serialization. - * @returns `node`'s outer HTML. - */ -export declare function getOuterHTML(node: AnyNode | ArrayLike<AnyNode>, options?: DomSerializerOptions): string; -/** - * @category Stringify - * @deprecated Use the `dom-serializer` module directly. - * @param node Node to get the inner HTML of. - * @param options Options for serialization. - * @returns `node`'s inner HTML. - */ -export declare function getInnerHTML(node: AnyNode, options?: DomSerializerOptions): string; -/** - * Get a node's inner text. Same as `textContent`, but inserts newlines for `<br>` tags. Ignores comments. - * - * @category Stringify - * @deprecated Use `textContent` instead. - * @param node Node to get the inner text of. - * @returns `node`'s inner text. - */ -export declare function getText(node: AnyNode | AnyNode[]): string; -/** - * Get a node's text content. Ignores comments. - * - * @category Stringify - * @param node Node to get the text content of. - * @returns `node`'s text content. - * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/Node/textContent} - */ -export declare function textContent(node: AnyNode | AnyNode[]): string; -/** - * Get a node's inner text, ignoring `<script>` and `<style>` tags. Ignores comments. - * - * @category Stringify - * @param node Node to get the inner text of. - * @returns `node`'s inner text. - * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/Node/innerText} - */ -export declare function innerText(node: AnyNode | AnyNode[]): string; -//# sourceMappingURL=stringify.d.ts.map \ No newline at end of file diff --git a/node_modules/domutils/lib/stringify.d.ts.map b/node_modules/domutils/lib/stringify.d.ts.map deleted file mode 100644 index b649b79..0000000 --- a/node_modules/domutils/lib/stringify.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"stringify.d.ts","sourceRoot":"https://raw.githubusercontent.com/fb55/domutils/0ab8bcf1ecfc70dfc93291a4cb2496578ac25e9c/src/","sources":["stringify.ts"],"names":[],"mappings":"AAAA,OAAO,EAKH,OAAO,EAEV,MAAM,YAAY,CAAC;AACpB,OAAmB,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AAGlE;;;;;;GAMG;AACH,wBAAgB,YAAY,CACxB,IAAI,EAAE,OAAO,GAAG,SAAS,CAAC,OAAO,CAAC,EAClC,OAAO,CAAC,EAAE,oBAAoB,GAC/B,MAAM,CAER;AAED;;;;;;GAMG;AACH,wBAAgB,YAAY,CACxB,IAAI,EAAE,OAAO,EACb,OAAO,CAAC,EAAE,oBAAoB,GAC/B,MAAM,CAIR;AAED;;;;;;;GAOG;AACH,wBAAgB,OAAO,CAAC,IAAI,EAAE,OAAO,GAAG,OAAO,EAAE,GAAG,MAAM,CAMzD;AAED;;;;;;;GAOG;AACH,wBAAgB,WAAW,CAAC,IAAI,EAAE,OAAO,GAAG,OAAO,EAAE,GAAG,MAAM,CAO7D;AAED;;;;;;;GAOG;AACH,wBAAgB,SAAS,CAAC,IAAI,EAAE,OAAO,GAAG,OAAO,EAAE,GAAG,MAAM,CAO3D"} \ No newline at end of file diff --git a/node_modules/domutils/lib/stringify.js b/node_modules/domutils/lib/stringify.js deleted file mode 100644 index 5723254..0000000 --- a/node_modules/domutils/lib/stringify.js +++ /dev/null @@ -1,91 +0,0 @@ -"use strict"; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.getOuterHTML = getOuterHTML; -exports.getInnerHTML = getInnerHTML; -exports.getText = getText; -exports.textContent = textContent; -exports.innerText = innerText; -var domhandler_1 = require("domhandler"); -var dom_serializer_1 = __importDefault(require("dom-serializer")); -var domelementtype_1 = require("domelementtype"); -/** - * @category Stringify - * @deprecated Use the `dom-serializer` module directly. - * @param node Node to get the outer HTML of. - * @param options Options for serialization. - * @returns `node`'s outer HTML. - */ -function getOuterHTML(node, options) { - return (0, dom_serializer_1.default)(node, options); -} -/** - * @category Stringify - * @deprecated Use the `dom-serializer` module directly. - * @param node Node to get the inner HTML of. - * @param options Options for serialization. - * @returns `node`'s inner HTML. - */ -function getInnerHTML(node, options) { - return (0, domhandler_1.hasChildren)(node) - ? node.children.map(function (node) { return getOuterHTML(node, options); }).join("") - : ""; -} -/** - * Get a node's inner text. Same as `textContent`, but inserts newlines for `<br>` tags. Ignores comments. - * - * @category Stringify - * @deprecated Use `textContent` instead. - * @param node Node to get the inner text of. - * @returns `node`'s inner text. - */ -function getText(node) { - if (Array.isArray(node)) - return node.map(getText).join(""); - if ((0, domhandler_1.isTag)(node)) - return node.name === "br" ? "\n" : getText(node.children); - if ((0, domhandler_1.isCDATA)(node)) - return getText(node.children); - if ((0, domhandler_1.isText)(node)) - return node.data; - return ""; -} -/** - * Get a node's text content. Ignores comments. - * - * @category Stringify - * @param node Node to get the text content of. - * @returns `node`'s text content. - * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/Node/textContent} - */ -function textContent(node) { - if (Array.isArray(node)) - return node.map(textContent).join(""); - if ((0, domhandler_1.hasChildren)(node) && !(0, domhandler_1.isComment)(node)) { - return textContent(node.children); - } - if ((0, domhandler_1.isText)(node)) - return node.data; - return ""; -} -/** - * Get a node's inner text, ignoring `<script>` and `<style>` tags. Ignores comments. - * - * @category Stringify - * @param node Node to get the inner text of. - * @returns `node`'s inner text. - * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/Node/innerText} - */ -function innerText(node) { - if (Array.isArray(node)) - return node.map(innerText).join(""); - if ((0, domhandler_1.hasChildren)(node) && (node.type === domelementtype_1.ElementType.Tag || (0, domhandler_1.isCDATA)(node))) { - return innerText(node.children); - } - if ((0, domhandler_1.isText)(node)) - return node.data; - return ""; -} -//# sourceMappingURL=stringify.js.map \ No newline at end of file diff --git a/node_modules/domutils/lib/stringify.js.map b/node_modules/domutils/lib/stringify.js.map deleted file mode 100644 index 984e7b6..0000000 --- a/node_modules/domutils/lib/stringify.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"stringify.js","sourceRoot":"https://raw.githubusercontent.com/fb55/domutils/0ab8bcf1ecfc70dfc93291a4cb2496578ac25e9c/src/","sources":["stringify.ts"],"names":[],"mappings":";;;;;AAkBA,oCAKC;AASD,oCAOC;AAUD,0BAMC;AAUD,kCAOC;AAUD,8BAOC;AAzFD,yCAOoB;AACpB,kEAAkE;AAClE,iDAA6C;AAE7C;;;;;;GAMG;AACH,SAAgB,YAAY,CACxB,IAAkC,EAClC,OAA8B;IAE9B,OAAO,IAAA,wBAAU,EAAC,IAAI,EAAE,OAAO,CAAC,CAAC;AACrC,CAAC;AAED;;;;;;GAMG;AACH,SAAgB,YAAY,CACxB,IAAa,EACb,OAA8B;IAE9B,OAAO,IAAA,wBAAW,EAAC,IAAI,CAAC;QACpB,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,UAAC,IAAI,IAAK,OAAA,YAAY,CAAC,IAAI,EAAE,OAAO,CAAC,EAA3B,CAA2B,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC;QACnE,CAAC,CAAC,EAAE,CAAC;AACb,CAAC;AAED;;;;;;;GAOG;AACH,SAAgB,OAAO,CAAC,IAAyB;IAC7C,IAAI,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC;QAAE,OAAO,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IAC3D,IAAI,IAAA,kBAAK,EAAC,IAAI,CAAC;QAAE,OAAO,IAAI,CAAC,IAAI,KAAK,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IAC3E,IAAI,IAAA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/lib/traversal.d.ts deleted file mode 100644 index 1984643..0000000 --- a/node_modules/domutils/lib/traversal.d.ts +++ /dev/null @@ -1,67 +0,0 @@ -import { AnyNode, ChildNode, Element, ParentNode } from "domhandler"; -/** - * Get a node's children. - * - * @category Traversal - * @param elem Node to get the children of. - * @returns `elem`'s children, or an empty array. - */ -export declare function getChildren(elem: AnyNode): ChildNode[]; -export declare function getParent(elem: AnyNode): ParentNode | null; -/** - * Gets an elements siblings, including the element itself. - * - * Attempts to get the children through the element's parent first. If we don't - * have a parent (the element is a root node), we walk the element's `prev` & - * `next` to get all remaining nodes. - * - * @category Traversal - * @param elem Element to get the siblings of. - * @returns `elem`'s siblings, including `elem`. - */ -export declare function getSiblings(elem: AnyNode): AnyNode[]; -/** - * Gets an attribute from an element. - * - * @category Traversal - * @param elem Element to check. - * @param name Attribute name to retrieve. - * @returns The element's attribute value, or `undefined`. - */ -export declare function getAttributeValue(elem: Element, name: string): string | undefined; -/** - * Checks whether an element has an attribute. - * - * @category Traversal - * @param elem Element to check. - * @param name Attribute name to look for. - * @returns Returns whether `elem` has the attribute `name`. - */ -export declare function hasAttrib(elem: Element, name: string): boolean; -/** - * Get the tag name of an element. - * - * @category Traversal - * @param elem The element to get the name for. - * @returns The tag name of `elem`. - */ -export declare function getName(elem: Element): string; -/** - * Returns the next element sibling of a node. - * - * @category Traversal - * @param elem The element to get the next sibling of. - * @returns `elem`'s next sibling that is a tag, or `null` if there is no next - * sibling. - */ -export declare function nextElementSibling(elem: AnyNode): Element | null; -/** - * Returns the previous element sibling of a node. - * - * @category Traversal - * @param elem The element to get the previous sibling of. - * @returns `elem`'s previous sibling that is a tag, or `null` if there is no - * previous sibling. - */ -export declare function prevElementSibling(elem: AnyNode): Element | null; -//# sourceMappingURL=traversal.d.ts.map \ No newline at end of file diff --git a/node_modules/domutils/lib/traversal.d.ts.map b/node_modules/domutils/lib/traversal.d.ts.map deleted file mode 100644 index 37e58b9..0000000 --- a/node_modules/domutils/lib/traversal.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"traversal.d.ts","sourceRoot":"https://raw.githubusercontent.com/fb55/domutils/0ab8bcf1ecfc70dfc93291a4cb2496578ac25e9c/src/","sources":["traversal.ts"],"names":[],"mappings":"AAAA,OAAO,EAEH,OAAO,EACP,SAAS,EACT,OAAO,EACP,UAAU,EAEb,MAAM,YAAY,CAAC;AAEpB;;;;;;GAMG;AACH,wBAAgB,WAAW,CAAC,IAAI,EAAE,OAAO,GAAG,SAAS,EAAE,CAEtD;AAED,wBAAgB,SAAS,CAAC,IAAI,EAAE,OAAO,GAAG,UAAU,GAAG,IAAI,CAAC;AAY5D;;;;;;;;;;GAUG;AACH,wBAAgB,WAAW,CAAC,IAAI,EAAE,OAAO,GAAG,OAAO,EAAE,CAepD;AAED;;;;;;;GAOG;AACH,wBAAgB,iBAAiB,CAC7B,IAAI,EAAE,OAAO,EACb,IAAI,EAAE,MAAM,GACb,MAAM,GAAG,SAAS,CAEpB;AAED;;;;;;;GAOG;AACH,wBAAgB,SAAS,CAAC,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAM9D;AAED;;;;;;GAMG;AACH,wBAAgB,OAAO,CAAC,IAAI,EAAE,OAAO,GAAG,MAAM,CAE7C;AAED;;;;;;;GAOG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,OAAO,GAAG,OAAO,GAAG,IAAI,CAIhE;AAED;;;;;;;GAOG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,OAAO,GAAG,OAAO,GAAG,IAAI,CAIhE"} \ No newline at end of file diff --git a/node_modules/domutils/lib/traversal.js b/node_modules/domutils/lib/traversal.js deleted file mode 100644 index 0e14fbe..0000000 --- a/node_modules/domutils/lib/traversal.js +++ /dev/null @@ -1,125 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.getChildren = getChildren; -exports.getParent = getParent; -exports.getSiblings = getSiblings; -exports.getAttributeValue = getAttributeValue; -exports.hasAttrib = hasAttrib; -exports.getName = getName; -exports.nextElementSibling = nextElementSibling; -exports.prevElementSibling = prevElementSibling; -var domhandler_1 = require("domhandler"); -/** - * Get a node's children. - * - * @category Traversal - * @param elem Node to get the children of. - * @returns `elem`'s children, or an empty array. - */ -function getChildren(elem) { - return (0, domhandler_1.hasChildren)(elem) ? elem.children : []; -} -/** - * Get a node's parent. - * - * @category Traversal - * @param elem Node to get the parent of. - * @returns `elem`'s parent node, or `null` if `elem` is a root node. - */ -function getParent(elem) { - return elem.parent || null; -} -/** - * Gets an elements siblings, including the element itself. - * - * Attempts to get the children through the element's parent first. If we don't - * have a parent (the element is a root node), we walk the element's `prev` & - * `next` to get all remaining nodes. - * - * @category Traversal - * @param elem Element to get the siblings of. - * @returns `elem`'s siblings, including `elem`. - */ -function getSiblings(elem) { - var _a, _b; - var parent = getParent(elem); - if (parent != null) - return getChildren(parent); - var siblings = [elem]; - var prev = elem.prev, next = elem.next; - while (prev != null) { - siblings.unshift(prev); - (_a = prev, prev = _a.prev); - } - while (next != null) { - siblings.push(next); - (_b = next, next = _b.next); - } - return siblings; -} -/** - * Gets an attribute from an element. - * - * @category Traversal - * @param elem Element to check. - * @param name Attribute name to retrieve. - * @returns The element's attribute value, or `undefined`. - */ -function getAttributeValue(elem, name) { - var _a; - return (_a = elem.attribs) === null || _a === void 0 ? void 0 : _a[name]; -} -/** - * Checks whether an element has an attribute. - * - * @category Traversal - * @param elem Element to check. - * @param name Attribute name to look for. - * @returns Returns whether `elem` has the attribute `name`. - */ -function hasAttrib(elem, name) { - return (elem.attribs != null && - Object.prototype.hasOwnProperty.call(elem.attribs, name) && - elem.attribs[name] != null); -} -/** - * Get the tag name of an element. - * - * @category Traversal - * @param elem The element to get the name for. - * @returns The tag name of `elem`. - */ -function getName(elem) { - return elem.name; -} -/** - * Returns the next element sibling of a node. - * - * @category Traversal - * @param elem The element to get the next sibling of. - * @returns `elem`'s next sibling that is a tag, or `null` if there is no next - * sibling. - */ -function nextElementSibling(elem) { - var _a; - var next = elem.next; - while (next !== null && !(0, domhandler_1.isTag)(next)) - (_a = next, next = _a.next); - return next; -} -/** - * Returns the previous element sibling of a node. - * - * @category Traversal - * @param elem The element to get the previous sibling of. - * @returns `elem`'s previous sibling that is a tag, or `null` if there is no - * previous sibling. - */ -function prevElementSibling(elem) { - var _a; - var prev = elem.prev; - while (prev !== null && !(0, domhandler_1.isTag)(prev)) - (_a = prev, prev = _a.prev); - return prev; -} -//# sourceMappingURL=traversal.js.map \ No newline at end of file diff --git a/node_modules/domutils/lib/traversal.js.map b/node_modules/domutils/lib/traversal.js.map deleted file mode 100644 index 0b8629b..0000000 --- a/node_modules/domutils/lib/traversal.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"traversal.js","sourceRoot":"https://raw.githubusercontent.com/fb55/domutils/0ab8bcf1ecfc70dfc93291a4cb2496578ac25e9c/src/","sources":["traversal.ts"],"names":[],"mappings":";;AAgBA,kCAEC;AAUD,8BAEC;AAaD,kCAeC;AAUD,8CAKC;AAUD,8BAMC;AASD,0BAEC;AAUD,gDAIC;AAUD,gDAIC;AAhID,yCAOoB;AAEpB;;;;;;GAMG;AACH,SAAgB,WAAW,CAAC,IAAa;IACrC,OAAO,IAAA,wBAAW,EAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAC;AAClD,CAAC;AAGD;;;;;;GAMG;AACH,SAAgB,SAAS,CAAC,IAAa;IACnC,OAAO,IAAI,CAAC,MAAM,IAAI,IAAI,CAAC;AAC/B,CAAC;AAED;;;;;;;;;;GAUG;AACH,SAAgB,WAAW,CAAC,IAAa;;IACrC,IAAM,MAAM,GAAG,SAAS,CAAC,IAAI,CAAC,CAAC;IAC/B,IAAI,MAAM,IAAI,IAAI;QAAE,OAAO,WAAW,CAAC,MAAM,CAAC,CAAC;IAE/C,IAAM,QAAQ,GAAG,CAAC,IAAI,CAAC,CAAC;IA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IAAa;;IACtC,IAAA,IAAI,GAAK,IAAI,KAAT,CAAU;IACpB,OAAO,IAAI,KAAK,IAAI,IAAI,CAAC,IAAA,kBAAK,EAAC,IAAI,CAAC;QAAE,CAAC,KAAW,IAAI,EAAb,IAAI,UAAA,CAAU,CAAC;IACxD,OAAO,IAAI,CAAC;AAChB,CAAC"} \ No newline at end of file diff --git a/node_modules/domutils/package.json b/node_modules/domutils/package.json deleted file mode 100644 index ae1a94d..0000000 --- a/node_modules/domutils/package.json +++ /dev/null @@ -1,79 +0,0 @@ -{ - "name": "domutils", - "version": "3.2.2", - "description": "Utilities for working with htmlparser2's dom", - "author": "Felix Boehm <me@feedic.com>", - "funding": { - "url": "https://github.com/fb55/domutils?sponsor=1" - }, - "license": "BSD-2-Clause", - "sideEffects": false, - "main": "lib/index.js", - "types": "lib/index.d.ts", - "module": "lib/esm/index.js", - "exports": { - "require": "./lib/index.js", - "import": "./lib/esm/index.js" - }, - "files": [ - "lib/**/*" - ], - "scripts": { - "test": "npm run test:jest && npm run lint", - "test:jest": "jest", - "lint": "npm run lint:es && npm run lint:prettier", - "lint:es": "eslint --ignore-path .gitignore .", - "lint:prettier": "npm run prettier -- --check", - "format": "npm run format:es && npm run format:prettier", - "format:es": "npm run lint:es -- --fix", - "format:prettier": "npm run prettier -- --write", - "prettier": "prettier \"**/*.{ts,md,json,yml}\" --ignore-path .gitignore", - "build": "npm run build:cjs && npm run build:esm", - "build:cjs": "tsc --sourceRoot https://raw.githubusercontent.com/fb55/domutils/$(git rev-parse HEAD)/src/", - "build:esm": "npm run build:cjs -- --module esnext --target es2019 --outDir lib/esm && echo '{\"type\":\"module\"}' > lib/esm/package.json", - "build:docs": "typedoc src", - "prepare": "npm run build" - }, - "repository": { - "type": "git", - "url": "git://github.com/fb55/domutils.git" - }, - "keywords": [ - "dom", - "htmlparser2" - ], - "dependencies": { - "dom-serializer": "^2.0.0", - "domelementtype": "^2.3.0", - "domhandler": "^5.0.3" - }, - "devDependencies": { - "@types/jest": "^29.5.14", - "@types/node": "^22.10.5", - "@typescript-eslint/eslint-plugin": "^8.19.0", - "@typescript-eslint/parser": "^8.19.0", - "eslint": "^8.57.1", - "eslint-config-prettier": "^9.1.0", - "eslint-plugin-jsdoc": "^50.6.1", - "htmlparser2": "~9.1.0", - "jest": "^29.7.0", - "prettier": "^3.4.2", - "ts-jest": "^29.2.5", - "typedoc": "^0.27.6", - "typescript": "^5.7.2" - }, - "jest": { - "preset": "ts-jest", - "testEnvironment": "node", - "coverageProvider": "v8", - "moduleNameMapper": { - "^(.*)\\.js$": [ - "$1.js", - "$1" - ] - } - }, - "prettier": { - "tabWidth": 4 - } -} diff --git a/node_modules/encoding-sniffer/dist/commonjs/index.d.ts b/node_modules/encoding-sniffer/dist/commonjs/index.d.ts deleted file mode 100644 index 6f4f9ec..0000000 --- a/node_modules/encoding-sniffer/dist/commonjs/index.d.ts +++ /dev/null @@ -1,33 +0,0 @@ -/// <reference types="node" /> -/// <reference types="node" /> -import { Transform, type TransformCallback } from "node:stream"; -import type { SnifferOptions } from "./sniffer.js"; -/** - * Sniff the encoding of a buffer, then decode it. - * - * @param buffer Buffer to be decoded - * @param options Options for the sniffer - * @returns The decoded buffer - */ -export declare function decodeBuffer(buffer: Buffer, options?: SnifferOptions): string; -/** - * Decodes a stream of buffers into a stream of strings. - * - * Reads the first 1024 bytes and passes them to the sniffer. Once an encoding - * has been determined, it passes all data to iconv-lite's stream and outputs - * the results. - */ -export declare class DecodeStream extends Transform { - private readonly sniffer; - private readonly buffers; - /** The iconv decode stream. If it is set, we have read more than `options.maxBytes` bytes. */ - private iconv; - private readonly maxBytes; - private readBytes; - constructor(options?: SnifferOptions); - _transform(chunk: Uint8Array, _encoding: string, callback: TransformCallback): void; - private getIconvStream; - _flush(callback: TransformCallback): void; -} -export { type SnifferOptions, getEncoding } from "./sniffer.js"; -//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/encoding-sniffer/dist/commonjs/index.d.ts.map b/node_modules/encoding-sniffer/dist/commonjs/index.d.ts.map deleted file mode 100644 index 10647e9..0000000 --- a/node_modules/encoding-sniffer/dist/commonjs/index.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;AAAA,OAAO,EAAE,SAAS,EAAE,KAAK,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAEhE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAGnD;;;;;;GAMG;AACH,wBAAgB,YAAY,CACxB,MAAM,EAAE,MAAM,EACd,OAAO,GAAE,cAAmB,GAC7B,MAAM,CAER;AAED;;;;;;GAMG;AACH,qBAAa,YAAa,SAAQ,SAAS;IACvC,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAU;IAClC,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAoB;IAC5C,8FAA8F;IAC9F,OAAO,CAAC,KAAK,CAAuC;IACpD,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAC;IAC1B,OAAO,CAAC,SAAS,CAAK;gBAEV,OAAO,CAAC,EAAE,cAAc;IAM3B,UAAU,CACf,KAAK,EAAE,UAAU,EACjB,SAAS,EAAE,MAAM,EACjB,QAAQ,EAAE,iBAAiB,GAC5B,IAAI;IAeP,OAAO,CAAC,cAAc;IAmBb,MAAM,CAAC,QAAQ,EAAE,iBAAiB,GAAG,IAAI;CAGrD;AAED,OAAO,EAAE,KAAK,cAAc,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC"} \ No newline at end of file diff --git a/node_modules/encoding-sniffer/dist/commonjs/index.js b/node_modules/encoding-sniffer/dist/commonjs/index.js deleted file mode 100644 index bc993eb..0000000 --- a/node_modules/encoding-sniffer/dist/commonjs/index.js +++ /dev/null @@ -1,93 +0,0 @@ -"use strict"; -var __extends = (this && this.__extends) || (function () { - 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); - }; - return 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 __()); - }; -})(); -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.getEncoding = exports.DecodeStream = exports.decodeBuffer = void 0; -var node_stream_1 = require("node:stream"); -var iconv_lite_1 = __importDefault(require("iconv-lite")); -var sniffer_js_1 = require("./sniffer.js"); -/** - * Sniff the encoding of a buffer, then decode it. - * - * @param buffer Buffer to be decoded - * @param options Options for the sniffer - * @returns The decoded buffer - */ -function decodeBuffer(buffer, options) { - if (options === void 0) { options = {}; } - return iconv_lite_1.default.decode(buffer, (0, sniffer_js_1.getEncoding)(buffer, options)); -} -exports.decodeBuffer = decodeBuffer; -/** - * Decodes a stream of buffers into a stream of strings. - * - * Reads the first 1024 bytes and passes them to the sniffer. Once an encoding - * has been determined, it passes all data to iconv-lite's stream and outputs - * the results. - */ -var DecodeStream = /** @class */ (function (_super) { - __extends(DecodeStream, _super); - function DecodeStream(options) { - var _a; - var _this = _super.call(this, { decodeStrings: false, encoding: "utf-8" }) || this; - _this.buffers = []; - /** The iconv decode stream. If it is set, we have read more than `options.maxBytes` bytes. */ - _this.iconv = null; - _this.readBytes = 0; - _this.sniffer = new sniffer_js_1.Sniffer(options); - _this.maxBytes = (_a = options === null || options === void 0 ? void 0 : options.maxBytes) !== null && _a !== void 0 ? _a : 1024; - return _this; - } - DecodeStream.prototype._transform = function (chunk, _encoding, callback) { - if (this.readBytes < this.maxBytes) { - this.sniffer.write(chunk); - this.readBytes += chunk.length; - if (this.readBytes < this.maxBytes) { - this.buffers.push(chunk); - callback(); - return; - } - } - this.getIconvStream().write(chunk, callback); - }; - DecodeStream.prototype.getIconvStream = function () { - var _this = this; - if (this.iconv) { - return this.iconv; - } - var stream = iconv_lite_1.default.decodeStream(this.sniffer.encoding); - stream.on("data", function (chunk) { return _this.push(chunk, "utf-8"); }); - stream.on("end", function () { return _this.push(null); }); - this.iconv = stream; - for (var _i = 0, _a = this.buffers; _i < _a.length; _i++) { - var buffer = _a[_i]; - stream.write(buffer); - } - this.buffers.length = 0; - return stream; - }; - DecodeStream.prototype._flush = function (callback) { - this.getIconvStream().end(callback); - }; - return DecodeStream; -}(node_stream_1.Transform)); -exports.DecodeStream = DecodeStream; -var sniffer_js_2 = require("./sniffer.js"); -Object.defineProperty(exports, "getEncoding", { enumerable: true, get: function () { return sniffer_js_2.getEncoding; } }); -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/encoding-sniffer/dist/commonjs/index.js.map b/node_modules/encoding-sniffer/dist/commonjs/index.js.map deleted file mode 100644 index 4c90477..0000000 --- a/node_modules/encoding-sniffer/dist/commonjs/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,2CAAgE;AAChE,0DAA+B;AAE/B,2CAAoD;AAEpD;;;;;;GAMG;AACH,SAAgB,YAAY,CACxB,MAAc,EACd,OAA4B;IAA5B,wBAAA,EAAA,YAA4B;IAE5B,OAAO,oBAAK,CAAC,MAAM,CAAC,MAAM,EAAE,IAAA,wBAAW,EAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;AAC9D,CAAC;AALD,oCAKC;AAED;;;;;;GAMG;AACH;IAAkC,gCAAS;IAQvC,sBAAY,OAAwB;;QAChC,YAAA,MAAK,YAAC,EAAE,aAAa,EAAE,KAAK,EAAE,QAAQ,EAAE,OAAO,EAAE,CAAC,SAAC;QAPtC,aAAO,GAAiB,EAAE,CAAC;QAC5C,8FAA8F;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AAC,CAAC;QAExC,IAAI,CAAC,KAAK,GAAG,MAAM,CAAC;QAEpB,KAAqB,UAAY,EAAZ,KAAA,IAAI,CAAC,OAAO,EAAZ,cAAY,EAAZ,IAAY,EAAE,CAAC;YAA/B,IAAM,MAAM,SAAA;YACb,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;QACzB,CAAC;QACD,IAAI,CAAC,OAAO,CAAC,MAAM,GAAG,CAAC,CAAC;QAExB,OAAO,MAAM,CAAC;IAClB,CAAC;IAEQ,6BAAM,GAAf,UAAgB,QAA2B;QACvC,IAAI,CAAC,cAAc,EAAE,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;IACxC,CAAC;IACL,mBAAC;AAAD,CAAC,AAvDD,CAAkC,uBAAS,GAuD1C;AAvDY,oCAAY;AAyDzB,2CAAgE;AAAlC,yGAAA,WAAW,OAAA"} \ No newline at end of file diff --git a/node_modules/encoding-sniffer/dist/commonjs/package.json b/node_modules/encoding-sniffer/dist/commonjs/package.json deleted file mode 100644 index 5bbefff..0000000 --- a/node_modules/encoding-sniffer/dist/commonjs/package.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "type": "commonjs" -} diff --git a/node_modules/encoding-sniffer/dist/commonjs/sniffer.d.ts b/node_modules/encoding-sniffer/dist/commonjs/sniffer.d.ts deleted file mode 100644 index e36d703..0000000 --- a/node_modules/encoding-sniffer/dist/commonjs/sniffer.d.ts +++ /dev/null @@ -1,148 +0,0 @@ -export declare enum ResultType { - BOM = 0, - PASSED = 1, - XML_PREFIX = 2, - META_TAG = 3, - XML_ENCODING = 4, - DEFAULT = 5 -} -export declare const STRINGS: { - UTF8_BOM: Uint8Array; - UTF16LE_BOM: Uint8Array; - UTF16BE_BOM: Uint8Array; - UTF16LE_XML_PREFIX: Uint8Array; - UTF16BE_XML_PREFIX: Uint8Array; - XML_DECLARATION: Uint8Array; - ENCODING: Uint8Array; - META: Uint8Array; - HTTP_EQUIV: Uint8Array; - CONTENT: Uint8Array; - CONTENT_TYPE: Uint8Array; - CHARSET: Uint8Array; - COMMENT_START: Uint8Array; - COMMENT_END: Uint8Array; -}; -export interface SnifferOptions { - /** - * The maximum number of bytes to sniff. - * - * @default 1024 - */ - maxBytes?: number; - /** - * The encoding specified by the user. - */ - userEncoding?: string; - /** - * The encoding specified by the transport layer. - */ - transportLayerEncodingLabel?: string; - /** - * The default encoding to use. - * - * @default "windows-1252" - */ - defaultEncoding?: string; -} -export declare class Sniffer { - /** The maximum number of bytes to sniff. */ - private readonly maxBytes; - /** The offset of the previous buffers. */ - private offset; - private state; - private sectionIndex; - private attribType; - /** - * Indicates if the `http-equiv` is `content-type`. - * - * Initially `null`, a boolean when a value is found. - */ - private gotPragma; - private needsPragma; - private inMetaTag; - encoding: string; - resultType: ResultType; - private setResult; - constructor({ maxBytes, userEncoding, transportLayerEncodingLabel, defaultEncoding, }?: SnifferOptions); - private stateBegin; - private stateBeginLT; - private stateUTF16BE_XML_PREFIX; - private stateUTF16LE_XML_PREFIX; - private stateBOM16LE; - private stateBOM16BE; - private stateBOM8; - private stateBeforeTag; - /** - * We have seen a `<`, and now have to figure out what to do. - * - * Options: - * - `<meta` - * - Any other tag - * - A closing tag - * - `<!--` - * - An XML declaration - * - */ - private stateBeforeTagName; - private stateBeforeCloseTagName; - private stateCommentStart; - private stateCommentEnd; - /** - * Any section starting with `<!`, `<?`, `</`, without being a closing tag or comment. - */ - private stateWeirdTag; - /** - * Advances the section, ignoring upper/lower case. - * - * Make sure the section has left-over characters before calling. - * - * @returns `false` if we did not match the section. - */ - private advanceSectionIC; - /** - * Advances the section. - * - * Make sure the section has left-over characters before calling. - * - * @returns `false` if we did not match the section. - */ - private advanceSection; - private stateTagNameMeta; - private stateTagNameOther; - private stateBeforeAttribute; - private handleMetaAttrib; - private stateMetaAttribHttpEquiv; - private stateMetaAttribC; - private stateMetaAttribCharset; - private stateMetaAttribContent; - private stateMetaAttribAfterName; - private stateAnyAttribName; - private stateAfterAttributeName; - private quoteCharacter; - private readonly attributeValue; - private stateBeforeAttributeValue; - private stateMetaAttribHttpEquivValue; - private handleMetaContentValue; - private handleAttributeValue; - private stateAttributeValueUnquoted; - private findMetaContentEncoding; - private stateMetaContentValueUnquotedBeforeEncoding; - private stateMetaContentValueUnquotedBeforeValue; - private stateMetaContentValueUnquotedValueQuoted; - private stateMetaContentValueUnquotedValueUnquoted; - private stateMetaContentValueQuotedValueUnquoted; - private stateMetaContentValueQuotedValueQuoted; - private stateMetaContentValueQuotedBeforeEncoding; - private stateMetaContentValueQuotedAfterEncoding; - private stateMetaContentValueQuotedBeforeValue; - private stateAttributeValueQuoted; - private stateXMLDeclaration; - private stateXMLDeclarationBeforeEncoding; - private stateXMLDeclarationAfterEncoding; - private stateXMLDeclarationBeforeValue; - private stateXMLDeclarationValue; - write(buffer: Uint8Array): void; -} -/** Get the encoding for the passed buffer. */ -export declare function getEncoding(buffer: Uint8Array, options?: SnifferOptions): string; -//# sourceMappingURL=sniffer.d.ts.map \ No newline at end of file diff --git a/node_modules/encoding-sniffer/dist/commonjs/sniffer.d.ts.map b/node_modules/encoding-sniffer/dist/commonjs/sniffer.d.ts.map deleted file mode 100644 index c712c80..0000000 --- a/node_modules/encoding-sniffer/dist/commonjs/sniffer.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"sniffer.d.ts","sourceRoot":"","sources":["../../src/sniffer.ts"],"names":[],"mappings":"AAuEA,oBAAY,UAAU;IAElB,GAAG,IAAI;IAEP,MAAM,IAAI;IAEV,UAAU,IAAI;IAEd,QAAQ,IAAI;IAEZ,YAAY,IAAI;IAEhB,OAAO,IAAI;CACd;AAgDD,eAAO,MAAM,OAAO;;;;;;;;;;;;;;;CAenB,CAAC;AAaF,MAAM,WAAW,cAAc;IAC3B;;;;OAIG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;OAEG;IACH,2BAA2B,CAAC,EAAE,MAAM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C,wBAAwB;IAUhC,OAAO,CAAC,kBAAkB;IAW1B,OAAO,CAAC,uBAAuB;IAW/B,OAAO,CAAC,cAAc,CAAK;IAC3B,OAAO,CAAC,QAAQ,CAAC,cAAc,CAAgB;IAE/C,OAAO,CAAC,yBAAyB;IA8BjC,OAAO,CAAC,6BAA6B;IA+BrC,OAAO,CAAC,sBAAsB;IAe9B,OAAO,CAAC,oBAAoB;IAS5B,OAAO,CAAC,2BAA2B;IAYnC,OAAO,CAAC,uBAAuB;IAY/B,OAAO,CAAC,2CAA2C;IAYnD,OAAO,CAAC,wCAAwC;IAahD,OAAO,CAAC,wCAAwC;IAYhD,OAAO,CAAC,0CAA0C;IAUlD,OAAO,CAAC,wCAAwC;IAWhD,OAAO,CAAC,sCAAsC;IAgB9C,OAAO,CAAC,yCAAyC;IAQjD,OAAO,CAAC,wCAAwC;IAUhD,OAAO,CAAC,sCAAsC;IAW9C,OAAO,CAAC,yBAAyB;IAUjC,OAAO,CAAC,mBAAmB;IAW3B,OAAO,CAAC,iCAAiC;IAazC,OAAO,CAAC,gCAAgC;IASxC,OAAO,CAAC,8BAA8B;IAUtC,OAAO,CAAC,wBAAwB;IAgBzB,KAAK,CAAC,MAAM,EAAE,UAAU,GAAG,IAAI;CAoOzC;AAED,8CAA8C;AAC9C,wBAAgB,WAAW,CACvB,MAAM,EAAE,UAAU,EAClB,OAAO,CAAC,EAAE,cAAc,GACzB,MAAM,CAIR"} \ No newline at end of file diff --git a/node_modules/encoding-sniffer/dist/commonjs/sniffer.js b/node_modules/encoding-sniffer/dist/commonjs/sniffer.js deleted file mode 100644 index b62cef6..0000000 --- a/node_modules/encoding-sniffer/dist/commonjs/sniffer.js +++ /dev/null @@ -1,992 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.getEncoding = exports.Sniffer = exports.STRINGS = exports.ResultType = void 0; -var whatwg_encoding_1 = require("whatwg-encoding"); -// https://html.spec.whatwg.org/multipage/syntax.html#prescan-a-byte-stream-to-determine-its-encoding -var State; -(function (State) { - // Before anything starts; can be any of BOM, UTF-16 XML declarations or meta tags - State[State["Begin"] = 0] = "Begin"; - // Inside of a BOM - State[State["BOM16BE"] = 1] = "BOM16BE"; - State[State["BOM16LE"] = 2] = "BOM16LE"; - State[State["BOM8"] = 3] = "BOM8"; - // XML prefix - State[State["UTF16LE_XML_PREFIX"] = 4] = "UTF16LE_XML_PREFIX"; - State[State["BeginLT"] = 5] = "BeginLT"; - State[State["UTF16BE_XML_PREFIX"] = 6] = "UTF16BE_XML_PREFIX"; - // Waiting for opening `<` - State[State["BeforeTag"] = 7] = "BeforeTag"; - // After the opening `<` - State[State["BeforeTagName"] = 8] = "BeforeTagName"; - // After `</` - State[State["BeforeCloseTagName"] = 9] = "BeforeCloseTagName"; - // Beginning of a comment - State[State["CommentStart"] = 10] = "CommentStart"; - // End of a comment - State[State["CommentEnd"] = 11] = "CommentEnd"; - // A tag name that could be `meta` - State[State["TagNameMeta"] = 12] = "TagNameMeta"; - // A tag name that is not `meta` - State[State["TagNameOther"] = 13] = "TagNameOther"; - // XML declaration - State[State["XMLDeclaration"] = 14] = "XMLDeclaration"; - State[State["XMLDeclarationBeforeEncoding"] = 15] = "XMLDeclarationBeforeEncoding"; - State[State["XMLDeclarationAfterEncoding"] = 16] = "XMLDeclarationAfterEncoding"; - State[State["XMLDeclarationBeforeValue"] = 17] = "XMLDeclarationBeforeValue"; - State[State["XMLDeclarationValue"] = 18] = "XMLDeclarationValue"; - // Anything that looks like a tag, but doesn't fit in the above categories - State[State["WeirdTag"] = 19] = "WeirdTag"; - State[State["BeforeAttribute"] = 20] = "BeforeAttribute"; - /* - * Attributes in meta tag — we compare them to our set here, and back out - * We care about four attributes: http-equiv, content-type, content, charset - */ - State[State["MetaAttribHttpEquiv"] = 21] = "MetaAttribHttpEquiv"; - // The value has to be `content-type` - State[State["MetaAttribHttpEquivValue"] = 22] = "MetaAttribHttpEquivValue"; - State[State["MetaAttribC"] = 23] = "MetaAttribC"; - State[State["MetaAttribContent"] = 24] = "MetaAttribContent"; - State[State["MetaAttribCharset"] = 25] = "MetaAttribCharset"; - // Waiting for whitespace - State[State["MetaAttribAfterName"] = 26] = "MetaAttribAfterName"; - State[State["MetaContentValueQuotedBeforeEncoding"] = 27] = "MetaContentValueQuotedBeforeEncoding"; - State[State["MetaContentValueQuotedAfterEncoding"] = 28] = "MetaContentValueQuotedAfterEncoding"; - State[State["MetaContentValueQuotedBeforeValue"] = 29] = "MetaContentValueQuotedBeforeValue"; - State[State["MetaContentValueQuotedValueQuoted"] = 30] = "MetaContentValueQuotedValueQuoted"; - State[State["MetaContentValueQuotedValueUnquoted"] = 31] = "MetaContentValueQuotedValueUnquoted"; - State[State["MetaContentValueUnquotedBeforeEncoding"] = 32] = "MetaContentValueUnquotedBeforeEncoding"; - State[State["MetaContentValueUnquotedBeforeValue"] = 33] = "MetaContentValueUnquotedBeforeValue"; - State[State["MetaContentValueUnquotedValueQuoted"] = 34] = "MetaContentValueUnquotedValueQuoted"; - State[State["MetaContentValueUnquotedValueUnquoted"] = 35] = "MetaContentValueUnquotedValueUnquoted"; - State[State["AnyAttribName"] = 36] = "AnyAttribName"; - // After the name of an attribute, before the equals sign - State[State["AfterAttributeName"] = 37] = "AfterAttributeName"; - // After `=` - State[State["BeforeAttributeValue"] = 38] = "BeforeAttributeValue"; - State[State["AttributeValueQuoted"] = 39] = "AttributeValueQuoted"; - State[State["AttributeValueUnquoted"] = 40] = "AttributeValueUnquoted"; -})(State || (State = {})); -var ResultType; -(function (ResultType) { - // Byte order mark - ResultType[ResultType["BOM"] = 0] = "BOM"; - // User- or transport layer-defined - ResultType[ResultType["PASSED"] = 1] = "PASSED"; - // XML prefixes - ResultType[ResultType["XML_PREFIX"] = 2] = "XML_PREFIX"; - // Meta tag - ResultType[ResultType["META_TAG"] = 3] = "META_TAG"; - // XML encoding - ResultType[ResultType["XML_ENCODING"] = 4] = "XML_ENCODING"; - // Default - ResultType[ResultType["DEFAULT"] = 5] = "DEFAULT"; -})(ResultType || (exports.ResultType = ResultType = {})); -var AttribType; -(function (AttribType) { - AttribType[AttribType["None"] = 0] = "None"; - AttribType[AttribType["HttpEquiv"] = 1] = "HttpEquiv"; - AttribType[AttribType["Content"] = 2] = "Content"; - AttribType[AttribType["Charset"] = 3] = "Charset"; -})(AttribType || (AttribType = {})); -var Chars; -(function (Chars) { - Chars[Chars["NIL"] = 0] = "NIL"; - Chars[Chars["TAB"] = 9] = "TAB"; - Chars[Chars["LF"] = 10] = "LF"; - Chars[Chars["CR"] = 13] = "CR"; - Chars[Chars["SPACE"] = 32] = "SPACE"; - Chars[Chars["EXCLAMATION"] = 33] = "EXCLAMATION"; - Chars[Chars["DQUOTE"] = 34] = "DQUOTE"; - Chars[Chars["SQUOTE"] = 39] = "SQUOTE"; - Chars[Chars["DASH"] = 45] = "DASH"; - Chars[Chars["SLASH"] = 47] = "SLASH"; - Chars[Chars["SEMICOLON"] = 59] = "SEMICOLON"; - Chars[Chars["LT"] = 60] = "LT"; - Chars[Chars["EQUALS"] = 61] = "EQUALS"; - Chars[Chars["GT"] = 62] = "GT"; - Chars[Chars["QUESTION"] = 63] = "QUESTION"; - Chars[Chars["UpperA"] = 65] = "UpperA"; - Chars[Chars["UpperZ"] = 90] = "UpperZ"; - Chars[Chars["LowerA"] = 97] = "LowerA"; - Chars[Chars["LowerZ"] = 122] = "LowerZ"; -})(Chars || (Chars = {})); -var SPACE_CHARACTERS = new Set([Chars.SPACE, Chars.LF, Chars.CR, Chars.TAB]); -var END_OF_UNQUOTED_ATTRIBUTE_VALUE = new Set([ - Chars.SPACE, - Chars.LF, - Chars.CR, - Chars.TAB, - Chars.GT, -]); -function toUint8Array(str) { - var arr = new Uint8Array(str.length); - for (var i = 0; i < str.length; i++) { - arr[i] = str.charCodeAt(i); - } - return arr; -} -exports.STRINGS = { - UTF8_BOM: new Uint8Array([0xef, 0xbb, 0xbf]), - UTF16LE_BOM: new Uint8Array([0xff, 0xfe]), - UTF16BE_BOM: new Uint8Array([0xfe, 0xff]), - UTF16LE_XML_PREFIX: new Uint8Array([0x3c, 0x0, 0x3f, 0x0, 0x78, 0x0]), - UTF16BE_XML_PREFIX: new Uint8Array([0x0, 0x3c, 0x0, 0x3f, 0x0, 0x78]), - XML_DECLARATION: toUint8Array("<?xml"), - ENCODING: toUint8Array("encoding"), - META: toUint8Array("meta"), - HTTP_EQUIV: toUint8Array("http-equiv"), - CONTENT: toUint8Array("content"), - CONTENT_TYPE: toUint8Array("content-type"), - CHARSET: toUint8Array("charset"), - COMMENT_START: toUint8Array("<!--"), - COMMENT_END: toUint8Array("-->"), -}; -function isAsciiAlpha(c) { - return ((c >= Chars.UpperA && c <= Chars.UpperZ) || - (c >= Chars.LowerA && c <= Chars.LowerZ)); -} -function isQuote(c) { - return c === Chars.DQUOTE || c === Chars.SQUOTE; -} -var Sniffer = /** @class */ (function () { - function Sniffer(_a) { - var _b = _a === void 0 ? {} : _a, _c = _b.maxBytes, maxBytes = _c === void 0 ? 1024 : _c, userEncoding = _b.userEncoding, transportLayerEncodingLabel = _b.transportLayerEncodingLabel, defaultEncoding = _b.defaultEncoding; - /** The offset of the previous buffers. */ - this.offset = 0; - this.state = State.Begin; - this.sectionIndex = 0; - this.attribType = AttribType.None; - /** - * Indicates if the `http-equiv` is `content-type`. - * - * Initially `null`, a boolean when a value is found. - */ - this.gotPragma = null; - this.needsPragma = null; - this.inMetaTag = false; - this.encoding = "windows-1252"; - this.resultType = ResultType.DEFAULT; - this.quoteCharacter = 0; - this.attributeValue = []; - this.maxBytes = maxBytes; - if (userEncoding) { - this.setResult(userEncoding, ResultType.PASSED); - } - if (transportLayerEncodingLabel) { - this.setResult(transportLayerEncodingLabel, ResultType.PASSED); - } - if (defaultEncoding) { - this.setResult(defaultEncoding, ResultType.DEFAULT); - } - } - Sniffer.prototype.setResult = function (label, type) { - if (this.resultType === ResultType.DEFAULT || this.resultType > type) { - var encoding = (0, whatwg_encoding_1.labelToName)(label); - if (encoding) { - this.encoding = - // Check if we are in a meta tag and the encoding is `x-user-defined` - type === ResultType.META_TAG && - encoding === "x-user-defined" - ? "windows-1252" - : // Check if we are in a meta tag or xml declaration, and the encoding is UTF-16 - (type === ResultType.META_TAG || - type === ResultType.XML_ENCODING) && - (encoding === "UTF-16LE" || encoding === "UTF-16BE") - ? "UTF-8" - : encoding; - this.resultType = type; - } - } - }; - Sniffer.prototype.stateBegin = function (c) { - switch (c) { - case exports.STRINGS.UTF16BE_BOM[0]: { - this.state = State.BOM16BE; - break; - } - case exports.STRINGS.UTF16LE_BOM[0]: { - this.state = State.BOM16LE; - break; - } - case exports.STRINGS.UTF8_BOM[0]: { - this.sectionIndex = 1; - this.state = State.BOM8; - break; - } - case Chars.NIL: { - this.state = State.UTF16BE_XML_PREFIX; - this.sectionIndex = 1; - break; - } - case Chars.LT: { - this.state = State.BeginLT; - break; - } - default: { - this.state = State.BeforeTag; - } - } - }; - Sniffer.prototype.stateBeginLT = function (c) { - if (c === Chars.NIL) { - this.state = State.UTF16LE_XML_PREFIX; - this.sectionIndex = 2; - } - else if (c === Chars.QUESTION) { - this.state = State.XMLDeclaration; - this.sectionIndex = 2; - } - else { - this.state = State.BeforeTagName; - this.stateBeforeTagName(c); - } - }; - Sniffer.prototype.stateUTF16BE_XML_PREFIX = function (c) { - // Advance position in the section - if (this.advanceSection(exports.STRINGS.UTF16BE_XML_PREFIX, c)) { - if (this.sectionIndex === exports.STRINGS.UTF16BE_XML_PREFIX.length) { - // We have the whole prefix - this.setResult("utf-16be", ResultType.XML_PREFIX); - } - } - else { - this.state = State.BeforeTag; - this.stateBeforeTag(c); - } - }; - Sniffer.prototype.stateUTF16LE_XML_PREFIX = function (c) { - // Advance position in the section - if (this.advanceSection(exports.STRINGS.UTF16LE_XML_PREFIX, c)) { - if (this.sectionIndex === exports.STRINGS.UTF16LE_XML_PREFIX.length) { - // We have the whole prefix - this.setResult("utf-16le", ResultType.XML_PREFIX); - } - } - else { - this.state = State.BeforeTag; - this.stateBeforeTag(c); - } - }; - Sniffer.prototype.stateBOM16LE = function (c) { - if (c === exports.STRINGS.UTF16LE_BOM[1]) { - this.setResult("utf-16le", ResultType.BOM); - } - else { - this.state = State.BeforeTag; - this.stateBeforeTag(c); - } - }; - Sniffer.prototype.stateBOM16BE = function (c) { - if (c === exports.STRINGS.UTF16BE_BOM[1]) { - this.setResult("utf-16be", ResultType.BOM); - } - else { - this.state = State.BeforeTag; - this.stateBeforeTag(c); - } - }; - Sniffer.prototype.stateBOM8 = function (c) { - if (this.advanceSection(exports.STRINGS.UTF8_BOM, c) && - this.sectionIndex === exports.STRINGS.UTF8_BOM.length) { - this.setResult("utf-8", ResultType.BOM); - } - }; - Sniffer.prototype.stateBeforeTag = function (c) { - if (c === Chars.LT) { - this.state = State.BeforeTagName; - this.inMetaTag = false; - } - }; - /** - * We have seen a `<`, and now have to figure out what to do. - * - * Options: - * - `<meta` - * - Any other tag - * - A closing tag - * - `<!--` - * - An XML declaration - * - */ - Sniffer.prototype.stateBeforeTagName = function (c) { - if (isAsciiAlpha(c)) { - if ((c | 0x20) === exports.STRINGS.META[0]) { - this.sectionIndex = 1; - this.state = State.TagNameMeta; - } - else { - this.state = State.TagNameOther; - } - } - else - switch (c) { - case Chars.SLASH: { - this.state = State.BeforeCloseTagName; - break; - } - case Chars.EXCLAMATION: { - this.state = State.CommentStart; - this.sectionIndex = 2; - break; - } - case Chars.QUESTION: { - this.state = State.WeirdTag; - break; - } - default: { - this.state = State.BeforeTag; - this.stateBeforeTag(c); - } - } - }; - Sniffer.prototype.stateBeforeCloseTagName = function (c) { - this.state = isAsciiAlpha(c) - ? // Switch to `TagNameOther`; the HTML spec allows attributes here as well. - State.TagNameOther - : State.WeirdTag; - }; - Sniffer.prototype.stateCommentStart = function (c) { - if (this.advanceSection(exports.STRINGS.COMMENT_START, c)) { - if (this.sectionIndex === exports.STRINGS.COMMENT_START.length) { - this.state = State.CommentEnd; - // The -- of the comment start can be part of the end. - this.sectionIndex = 2; - } - } - else { - this.state = State.WeirdTag; - this.stateWeirdTag(c); - } - }; - Sniffer.prototype.stateCommentEnd = function (c) { - if (this.advanceSection(exports.STRINGS.COMMENT_END, c)) { - if (this.sectionIndex === exports.STRINGS.COMMENT_END.length) { - this.state = State.BeforeTag; - } - } - else if (c === Chars.DASH) { - /* - * If we are here, we know we expected a `>` above. - * Set this to 2, to support many dashes before the closing `>`. - */ - this.sectionIndex = 2; - } - }; - /** - * Any section starting with `<!`, `<?`, `</`, without being a closing tag or comment. - */ - Sniffer.prototype.stateWeirdTag = function (c) { - if (c === Chars.GT) { - this.state = State.BeforeTag; - } - }; - /** - * Advances the section, ignoring upper/lower case. - * - * Make sure the section has left-over characters before calling. - * - * @returns `false` if we did not match the section. - */ - Sniffer.prototype.advanceSectionIC = function (section, c) { - return this.advanceSection(section, c | 0x20); - }; - /** - * Advances the section. - * - * Make sure the section has left-over characters before calling. - * - * @returns `false` if we did not match the section. - */ - Sniffer.prototype.advanceSection = function (section, c) { - if (section[this.sectionIndex] === c) { - this.sectionIndex++; - return true; - } - this.sectionIndex = 0; - return false; - }; - Sniffer.prototype.stateTagNameMeta = function (c) { - if (this.sectionIndex < exports.STRINGS.META.length) { - if (this.advanceSectionIC(exports.STRINGS.META, c)) { - return; - } - } - else if (SPACE_CHARACTERS.has(c)) { - this.inMetaTag = true; - this.gotPragma = null; - this.needsPragma = null; - this.state = State.BeforeAttribute; - return; - } - this.state = State.TagNameOther; - // Reconsume in case there is a `>`. - this.stateTagNameOther(c); - }; - Sniffer.prototype.stateTagNameOther = function (c) { - if (SPACE_CHARACTERS.has(c)) { - this.state = State.BeforeAttribute; - } - else if (c === Chars.GT) { - this.state = State.BeforeTag; - } - }; - Sniffer.prototype.stateBeforeAttribute = function (c) { - if (SPACE_CHARACTERS.has(c)) - return; - if (this.inMetaTag) { - var lower = c | 0x20; - if (lower === exports.STRINGS.HTTP_EQUIV[0]) { - this.sectionIndex = 1; - this.state = State.MetaAttribHttpEquiv; - return; - } - else if (lower === exports.STRINGS.CHARSET[0]) { - this.sectionIndex = 1; - this.state = State.MetaAttribC; - return; - } - } - this.state = - c === Chars.SLASH || c === Chars.GT - ? State.BeforeTag - : State.AnyAttribName; - }; - Sniffer.prototype.handleMetaAttrib = function (c, section, type) { - if (this.advanceSectionIC(section, c)) { - if (this.sectionIndex === section.length) { - this.attribType = type; - this.state = State.MetaAttribAfterName; - } - } - else { - this.state = State.AnyAttribName; - this.stateAnyAttribName(c); - } - }; - Sniffer.prototype.stateMetaAttribHttpEquiv = function (c) { - this.handleMetaAttrib(c, exports.STRINGS.HTTP_EQUIV, AttribType.HttpEquiv); - }; - Sniffer.prototype.stateMetaAttribC = function (c) { - var lower = c | 0x20; - if (lower === exports.STRINGS.CHARSET[1]) { - this.sectionIndex = 2; - this.state = State.MetaAttribCharset; - } - else if (lower === exports.STRINGS.CONTENT[1]) { - this.sectionIndex = 2; - this.state = State.MetaAttribContent; - } - else { - this.state = State.AnyAttribName; - this.stateAnyAttribName(c); - } - }; - Sniffer.prototype.stateMetaAttribCharset = function (c) { - this.handleMetaAttrib(c, exports.STRINGS.CHARSET, AttribType.Charset); - }; - Sniffer.prototype.stateMetaAttribContent = function (c) { - this.handleMetaAttrib(c, exports.STRINGS.CONTENT, AttribType.Content); - }; - Sniffer.prototype.stateMetaAttribAfterName = function (c) { - if (SPACE_CHARACTERS.has(c) || c === Chars.EQUALS) { - this.state = State.AfterAttributeName; - this.stateAfterAttributeName(c); - } - else { - this.state = State.AnyAttribName; - this.stateAnyAttribName(c); - } - }; - Sniffer.prototype.stateAnyAttribName = function (c) { - if (SPACE_CHARACTERS.has(c)) { - this.attribType = AttribType.None; - this.state = State.AfterAttributeName; - } - else if (c === Chars.SLASH || c === Chars.GT) { - this.state = State.BeforeTag; - } - else if (c === Chars.EQUALS) { - this.state = State.BeforeAttributeValue; - } - }; - Sniffer.prototype.stateAfterAttributeName = function (c) { - if (SPACE_CHARACTERS.has(c)) - return; - if (c === Chars.EQUALS) { - this.state = State.BeforeAttributeValue; - } - else { - this.state = State.BeforeAttribute; - this.stateBeforeAttribute(c); - } - }; - Sniffer.prototype.stateBeforeAttributeValue = function (c) { - if (SPACE_CHARACTERS.has(c)) - return; - this.attributeValue.length = 0; - this.sectionIndex = 0; - if (isQuote(c)) { - this.quoteCharacter = c; - this.state = - this.attribType === AttribType.Content - ? State.MetaContentValueQuotedBeforeEncoding - : this.attribType === AttribType.HttpEquiv - ? State.MetaAttribHttpEquivValue - : State.AttributeValueQuoted; - } - else if (this.attribType === AttribType.Content) { - this.state = State.MetaContentValueUnquotedBeforeEncoding; - this.stateMetaContentValueUnquotedBeforeEncoding(c); - } - else if (this.attribType === AttribType.HttpEquiv) { - // We use `quoteCharacter = 0` to signify that the value is unquoted. - this.quoteCharacter = 0; - this.sectionIndex = 0; - this.state = State.MetaAttribHttpEquivValue; - this.stateMetaAttribHttpEquivValue(c); - } - else { - this.state = State.AttributeValueUnquoted; - this.stateAttributeValueUnquoted(c); - } - }; - // The value has to be `content-type` - Sniffer.prototype.stateMetaAttribHttpEquivValue = function (c) { - if (this.sectionIndex === exports.STRINGS.CONTENT_TYPE.length) { - if (this.quoteCharacter === 0 - ? END_OF_UNQUOTED_ATTRIBUTE_VALUE.has(c) - : c === this.quoteCharacter) { - if (this.needsPragma !== null) { - this.setResult(this.needsPragma, ResultType.META_TAG); - } - else if (this.gotPragma === null) { - this.gotPragma = true; - } - this.state = State.BeforeAttribute; - return; - } - } - else if (this.advanceSectionIC(exports.STRINGS.CONTENT_TYPE, c)) { - return; - } - this.gotPragma = false; - if (this.quoteCharacter === 0) { - this.state = State.AttributeValueUnquoted; - this.stateAttributeValueUnquoted(c); - } - else { - this.state = State.AttributeValueQuoted; - this.stateAttributeValueQuoted(c); - } - }; - Sniffer.prototype.handleMetaContentValue = function () { - if (this.attributeValue.length === 0) - return; - var encoding = String.fromCharCode.apply(String, this.attributeValue); - if (this.gotPragma) { - this.setResult(encoding, ResultType.META_TAG); - } - else if (this.needsPragma === null) { - // Don't override a previous result. - this.needsPragma = encoding; - } - this.attributeValue.length = 0; - }; - Sniffer.prototype.handleAttributeValue = function () { - if (this.attribType === AttribType.Charset) { - this.setResult(String.fromCharCode.apply(String, this.attributeValue), ResultType.META_TAG); - } - }; - Sniffer.prototype.stateAttributeValueUnquoted = function (c) { - if (SPACE_CHARACTERS.has(c)) { - this.handleAttributeValue(); - this.state = State.BeforeAttribute; - } - else if (c === Chars.SLASH || c === Chars.GT) { - this.handleAttributeValue(); - this.state = State.BeforeTag; - } - else if (this.attribType === AttribType.Charset) { - this.attributeValue.push(c | 0x20); - } - }; - Sniffer.prototype.findMetaContentEncoding = function (c) { - if (this.advanceSectionIC(exports.STRINGS.CHARSET, c)) { - if (this.sectionIndex === exports.STRINGS.CHARSET.length) { - return true; - } - } - else { - // If we encountered another `c`, assume we started over. - this.sectionIndex = Number(c === exports.STRINGS.CHARSET[0]); - } - return false; - }; - Sniffer.prototype.stateMetaContentValueUnquotedBeforeEncoding = function (c) { - if (END_OF_UNQUOTED_ATTRIBUTE_VALUE.has(c)) { - this.stateAttributeValueUnquoted(c); - } - else if (this.sectionIndex === exports.STRINGS.CHARSET.length) { - if (c === Chars.EQUALS) { - this.state = State.MetaContentValueUnquotedBeforeValue; - } - } - else { - this.findMetaContentEncoding(c); - } - }; - Sniffer.prototype.stateMetaContentValueUnquotedBeforeValue = function (c) { - if (isQuote(c)) { - this.quoteCharacter = c; - this.state = State.MetaContentValueUnquotedValueQuoted; - } - else if (END_OF_UNQUOTED_ATTRIBUTE_VALUE.has(c)) { - // Can't have spaces here, as it would no longer be part of the attribute value. - this.stateAttributeValueUnquoted(c); - } - else { - this.state = State.MetaContentValueUnquotedValueUnquoted; - this.stateMetaContentValueUnquotedValueUnquoted(c); - } - }; - Sniffer.prototype.stateMetaContentValueUnquotedValueQuoted = function (c) { - if (END_OF_UNQUOTED_ATTRIBUTE_VALUE.has(c)) { - // Quotes weren't matched, so we're done. - this.stateAttributeValueUnquoted(c); - } - else if (c === this.quoteCharacter) { - this.handleMetaContentValue(); - this.state = State.AttributeValueUnquoted; - } - else { - this.attributeValue.push(c | 0x20); - } - }; - Sniffer.prototype.stateMetaContentValueUnquotedValueUnquoted = function (c) { - if (END_OF_UNQUOTED_ATTRIBUTE_VALUE.has(c) || c === Chars.SEMICOLON) { - this.handleMetaContentValue(); - this.state = State.AttributeValueUnquoted; - this.stateAttributeValueUnquoted(c); - } - else { - this.attributeValue.push(c | 0x20); - } - }; - Sniffer.prototype.stateMetaContentValueQuotedValueUnquoted = function (c) { - if (isQuote(c) || SPACE_CHARACTERS.has(c) || c === Chars.SEMICOLON) { - this.handleMetaContentValue(); - // We are done with the value, but might not be at the end of the attribute - this.state = State.AttributeValueQuoted; - this.stateAttributeValueQuoted(c); - } - else { - this.attributeValue.push(c | 0x20); - } - }; - Sniffer.prototype.stateMetaContentValueQuotedValueQuoted = function (c) { - if (isQuote(c)) { - // We have reached the end of our value. - if (c !== this.quoteCharacter) { - // Only handle the value if inner quotes were matched. - this.handleMetaContentValue(); - } - this.state = State.AttributeValueQuoted; - this.stateAttributeValueQuoted(c); - } - else { - this.attributeValue.push(c | 0x20); - } - }; - Sniffer.prototype.stateMetaContentValueQuotedBeforeEncoding = function (c) { - if (c === this.quoteCharacter) { - this.stateAttributeValueQuoted(c); - } - else if (this.findMetaContentEncoding(c)) { - this.state = State.MetaContentValueQuotedAfterEncoding; - } - }; - Sniffer.prototype.stateMetaContentValueQuotedAfterEncoding = function (c) { - if (c === Chars.EQUALS) { - this.state = State.MetaContentValueQuotedBeforeValue; - } - else if (!SPACE_CHARACTERS.has(c)) { - // Look for the next encoding - this.state = State.MetaContentValueQuotedBeforeEncoding; - this.stateMetaContentValueQuotedBeforeEncoding(c); - } - }; - Sniffer.prototype.stateMetaContentValueQuotedBeforeValue = function (c) { - if (c === this.quoteCharacter) { - this.stateAttributeValueQuoted(c); - } - else if (isQuote(c)) { - this.state = State.MetaContentValueQuotedValueQuoted; - } - else if (!SPACE_CHARACTERS.has(c)) { - this.state = State.MetaContentValueQuotedValueUnquoted; - this.stateMetaContentValueQuotedValueUnquoted(c); - } - }; - Sniffer.prototype.stateAttributeValueQuoted = function (c) { - if (c === this.quoteCharacter) { - this.handleAttributeValue(); - this.state = State.BeforeAttribute; - } - else if (this.attribType === AttribType.Charset) { - this.attributeValue.push(c | 0x20); - } - }; - // Read STRINGS.XML_DECLARATION - Sniffer.prototype.stateXMLDeclaration = function (c) { - if (this.advanceSection(exports.STRINGS.XML_DECLARATION, c)) { - if (this.sectionIndex === exports.STRINGS.XML_DECLARATION.length) { - this.sectionIndex = 0; - this.state = State.XMLDeclarationBeforeEncoding; - } - } - else { - this.state = State.WeirdTag; - } - }; - Sniffer.prototype.stateXMLDeclarationBeforeEncoding = function (c) { - if (this.advanceSection(exports.STRINGS.ENCODING, c)) { - if (this.sectionIndex === exports.STRINGS.ENCODING.length) { - this.state = State.XMLDeclarationAfterEncoding; - } - } - else if (c === Chars.GT) { - this.state = State.BeforeTag; - } - else { - // If we encountered another `c`, assume we started over. - this.sectionIndex = Number(c === exports.STRINGS.ENCODING[0]); - } - }; - Sniffer.prototype.stateXMLDeclarationAfterEncoding = function (c) { - if (c === Chars.EQUALS) { - this.state = State.XMLDeclarationBeforeValue; - } - else if (c > Chars.SPACE) { - this.state = State.WeirdTag; - this.stateWeirdTag(c); - } - }; - Sniffer.prototype.stateXMLDeclarationBeforeValue = function (c) { - if (isQuote(c)) { - this.attributeValue.length = 0; - this.state = State.XMLDeclarationValue; - } - else if (c > Chars.SPACE) { - this.state = State.WeirdTag; - this.stateWeirdTag(c); - } - }; - Sniffer.prototype.stateXMLDeclarationValue = function (c) { - if (isQuote(c)) { - this.setResult(String.fromCharCode.apply(String, this.attributeValue), ResultType.XML_ENCODING); - this.state = State.WeirdTag; - } - else if (c === Chars.GT) { - this.state = State.BeforeTag; - } - else if (c <= Chars.SPACE) { - this.state = State.WeirdTag; - } - else { - this.attributeValue.push(c | 0x20); - } - }; - Sniffer.prototype.write = function (buffer) { - var index = 0; - for (; index < buffer.length && this.offset + index < this.maxBytes; index++) { - var c = buffer[index]; - switch (this.state) { - case State.Begin: { - this.stateBegin(c); - break; - } - case State.BOM16BE: { - this.stateBOM16BE(c); - break; - } - case State.BOM16LE: { - this.stateBOM16LE(c); - break; - } - case State.BOM8: { - this.stateBOM8(c); - break; - } - case State.UTF16LE_XML_PREFIX: { - this.stateUTF16LE_XML_PREFIX(c); - break; - } - case State.BeginLT: { - this.stateBeginLT(c); - break; - } - case State.UTF16BE_XML_PREFIX: { - this.stateUTF16BE_XML_PREFIX(c); - break; - } - case State.BeforeTag: { - // Optimization: Skip all characters until we find a `<` - var idx = buffer.indexOf(Chars.LT, index); - if (idx < 0) { - // We are done with this buffer. Stay in the state and try on the next one. - index = buffer.length; - } - else { - index = idx; - this.stateBeforeTag(Chars.LT); - } - break; - } - case State.BeforeTagName: { - this.stateBeforeTagName(c); - break; - } - case State.BeforeCloseTagName: { - this.stateBeforeCloseTagName(c); - break; - } - case State.CommentStart: { - this.stateCommentStart(c); - break; - } - case State.CommentEnd: { - this.stateCommentEnd(c); - break; - } - case State.TagNameMeta: { - this.stateTagNameMeta(c); - break; - } - case State.TagNameOther: { - this.stateTagNameOther(c); - break; - } - case State.XMLDeclaration: { - this.stateXMLDeclaration(c); - break; - } - case State.XMLDeclarationBeforeEncoding: { - this.stateXMLDeclarationBeforeEncoding(c); - break; - } - case State.XMLDeclarationAfterEncoding: { - this.stateXMLDeclarationAfterEncoding(c); - break; - } - case State.XMLDeclarationBeforeValue: { - this.stateXMLDeclarationBeforeValue(c); - break; - } - case State.XMLDeclarationValue: { - this.stateXMLDeclarationValue(c); - break; - } - case State.WeirdTag: { - this.stateWeirdTag(c); - break; - } - case State.BeforeAttribute: { - this.stateBeforeAttribute(c); - break; - } - case State.MetaAttribHttpEquiv: { - this.stateMetaAttribHttpEquiv(c); - break; - } - case State.MetaAttribHttpEquivValue: { - this.stateMetaAttribHttpEquivValue(c); - break; - } - case State.MetaAttribC: { - this.stateMetaAttribC(c); - break; - } - case State.MetaAttribContent: { - this.stateMetaAttribContent(c); - break; - } - case State.MetaAttribCharset: { - this.stateMetaAttribCharset(c); - break; - } - case State.MetaAttribAfterName: { - this.stateMetaAttribAfterName(c); - break; - } - case State.MetaContentValueQuotedBeforeEncoding: { - this.stateMetaContentValueQuotedBeforeEncoding(c); - break; - } - case State.MetaContentValueQuotedAfterEncoding: { - this.stateMetaContentValueQuotedAfterEncoding(c); - break; - } - case State.MetaContentValueQuotedBeforeValue: { - this.stateMetaContentValueQuotedBeforeValue(c); - break; - } - case State.MetaContentValueQuotedValueQuoted: { - this.stateMetaContentValueQuotedValueQuoted(c); - break; - } - case State.MetaContentValueQuotedValueUnquoted: { - this.stateMetaContentValueQuotedValueUnquoted(c); - break; - } - case State.MetaContentValueUnquotedBeforeEncoding: { - this.stateMetaContentValueUnquotedBeforeEncoding(c); - break; - } - case State.MetaContentValueUnquotedBeforeValue: { - this.stateMetaContentValueUnquotedBeforeValue(c); - break; - } - case State.MetaContentValueUnquotedValueQuoted: { - this.stateMetaContentValueUnquotedValueQuoted(c); - break; - } - case State.MetaContentValueUnquotedValueUnquoted: { - this.stateMetaContentValueUnquotedValueUnquoted(c); - break; - } - case State.AnyAttribName: { - this.stateAnyAttribName(c); - break; - } - case State.AfterAttributeName: { - this.stateAfterAttributeName(c); - break; - } - case State.BeforeAttributeValue: { - this.stateBeforeAttributeValue(c); - break; - } - case State.AttributeValueQuoted: { - this.stateAttributeValueQuoted(c); - break; - } - default: { - // (State.AttributeValueUnquoted) - this.stateAttributeValueUnquoted(c); - } - } - } - this.offset += index; - }; - return Sniffer; -}()); -exports.Sniffer = Sniffer; -/** Get the encoding for the passed buffer. */ -function getEncoding(buffer, options) { - var sniffer = new Sniffer(options); - sniffer.write(buffer); - return sniffer.encoding; -} -exports.getEncoding = getEncoding; -//# sourceMappingURL=sniffer.js.map \ No newline at end of file diff --git a/node_modules/encoding-sniffer/dist/commonjs/sniffer.js.map b/node_modules/encoding-sniffer/dist/commonjs/sniffer.js.map deleted file mode 100644 index 77403f3..0000000 --- a/node_modules/encoding-sniffer/dist/commonjs/sniffer.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"sniffer.js","sourceRoot":"","sources":["../../src/sniffer.ts"],"names":[],"mappings":";;;AAAA,mDAA8C;AAE9C,qGAAqG;AAErG,IAAW,KAiEV;AAjED,WAAW,KAAK;IACZ,kFAAkF;IAClF,mCAAK,CAAA;IACL,kBAAkB;IAClB,uCAAO,CAAA;IACP,uCAAO,CAAA;IACP,iCAAI,CAAA;IACJ,aAAa;IACb,6DAAkB,CAAA;IAClB,uCAAO,CAAA;IACP,6DAAkB,CAAA;IAClB,0BAA0B;IAC1B,2CAAS,CAAA;IACT,wBAAwB;IACxB,mDAAa,CAAA;IACb,aAAa;IACb,6DAAkB,CAAA;IAClB,yBAAyB;IACzB,kDAAY,CAAA;IACZ,mBAAmB;IACnB,8CAAU,CAAA;IACV,kCAAkC;IAClC,gDAAW,CAAA;IACX,gCAAgC;IAChC,kDAAY,CAAA;IACZ,kBAAkB;IAClB,sDAAc,CAAA;IACd,kFAA4B,CAAA;IAC5B,gFAA2B,CAAA;IAC3B,4EAAyB,CAAA;IACzB,gEAAmB,CAAA;IACnB,0EAA0E;IAC1E,0CAAQ,CAAA;IAER,wDAAe,CAAA;IAEf;;;OAGG;IACH,gEAAmB,CAAA;IACnB,qCAAqC;IACrC,0EAAwB,CAAA;IACxB,gDAAW,CAAA;IACX,4DAAiB,CAAA;IACjB,4DAAiB,CAAA;IACjB,yBAAyB;IACzB,gEAAmB,CAAA;IACnB,kGAAoC,CAAA;IACpC,gGAAmC,CAAA;IACnC,4FAAiC,CAAA;IACjC,4FAAiC,CAAA;IACjC,gGAAmC,CAAA;IACnC,sGAAsC,CAAA;IACtC,gGAAmC,CAAA;IACnC,gGAAmC,CAAA;IACnC,oGAAqC,CAAA;IAErC,oDAAa,CAAA;IACb,yDAAyD;IACzD,8DAAkB,CAAA;IAClB,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/node_modules/encoding-sniffer/dist/esm/index.d.ts b/node_modules/encoding-sniffer/dist/esm/index.d.ts deleted file mode 100644 index 6215371..0000000 --- a/node_modules/encoding-sniffer/dist/esm/index.d.ts +++ /dev/null @@ -1,33 +0,0 @@ -/// <reference types="node" resolution-mode="require"/> -/// <reference types="node" resolution-mode="require"/> -import { Transform, type TransformCallback } from "node:stream"; -import type { SnifferOptions } from "./sniffer.js"; -/** - * Sniff the encoding of a buffer, then decode it. - * - * @param buffer Buffer to be decoded - * @param options Options for the sniffer - * @returns The decoded buffer - */ -export declare function decodeBuffer(buffer: Buffer, options?: SnifferOptions): string; -/** - * Decodes a stream of buffers into a stream of strings. - * - * Reads the first 1024 bytes and passes them to the sniffer. Once an encoding - * has been determined, it passes all data to iconv-lite's stream and outputs - * the results. - */ -export declare class DecodeStream extends Transform { - private readonly sniffer; - private readonly buffers; - /** The iconv decode stream. If it is set, we have read more than `options.maxBytes` bytes. */ - private iconv; - private readonly maxBytes; - private readBytes; - constructor(options?: SnifferOptions); - _transform(chunk: Uint8Array, _encoding: string, callback: TransformCallback): void; - private getIconvStream; - _flush(callback: TransformCallback): void; -} -export { type SnifferOptions, getEncoding } from "./sniffer.js"; -//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/encoding-sniffer/dist/esm/index.d.ts.map b/node_modules/encoding-sniffer/dist/esm/index.d.ts.map deleted file mode 100644 index 10647e9..0000000 --- a/node_modules/encoding-sniffer/dist/esm/index.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;AAAA,OAAO,EAAE,SAAS,EAAE,KAAK,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAEhE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAGnD;;;;;;GAMG;AACH,wBAAgB,YAAY,CACxB,MAAM,EAAE,MAAM,EACd,OAAO,GAAE,cAAmB,GAC7B,MAAM,CAER;AAED;;;;;;GAMG;AACH,qBAAa,YAAa,SAAQ,SAAS;IACvC,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAU;IAClC,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAoB;IAC5C,8FAA8F;IAC9F,OAAO,CAAC,KAAK,CAAuC;IACpD,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAC;IAC1B,OAAO,CAAC,SAAS,CAAK;gBAEV,OAAO,CAAC,EAAE,cAAc;IAM3B,UAAU,CACf,KAAK,EAAE,UAAU,EACjB,SAAS,EAAE,MAAM,EACjB,QAAQ,EAAE,iBAAiB,GAC5B,IAAI;IAeP,OAAO,CAAC,cAAc;IAmBb,MAAM,CAAC,QAAQ,EAAE,iBAAiB,GAAG,IAAI;CAGrD;AAED,OAAO,EAAE,KAAK,cAAc,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC"} \ No newline at end of file diff --git a/node_modules/encoding-sniffer/dist/esm/index.js b/node_modules/encoding-sniffer/dist/esm/index.js deleted file mode 100644 index df69edc..0000000 --- a/node_modules/encoding-sniffer/dist/esm/index.js +++ /dev/null @@ -1,85 +0,0 @@ -var __extends = (this && this.__extends) || (function () { - 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); - }; - return 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 __()); - }; -})(); -import { Transform } from "node:stream"; -import iconv from "iconv-lite"; -import { Sniffer, getEncoding } from "./sniffer.js"; -/** - * Sniff the encoding of a buffer, then decode it. - * - * @param buffer Buffer to be decoded - * @param options Options for the sniffer - * @returns The decoded buffer - */ -export function decodeBuffer(buffer, options) { - if (options === void 0) { options = {}; } - return iconv.decode(buffer, getEncoding(buffer, options)); -} -/** - * Decodes a stream of buffers into a stream of strings. - * - * Reads the first 1024 bytes and passes them to the sniffer. Once an encoding - * has been determined, it passes all data to iconv-lite's stream and outputs - * the results. - */ -var DecodeStream = /** @class */ (function (_super) { - __extends(DecodeStream, _super); - function DecodeStream(options) { - var _a; - var _this = _super.call(this, { decodeStrings: false, encoding: "utf-8" }) || this; - _this.buffers = []; - /** The iconv decode stream. If it is set, we have read more than `options.maxBytes` bytes. */ - _this.iconv = null; - _this.readBytes = 0; - _this.sniffer = new Sniffer(options); - _this.maxBytes = (_a = options === null || options === void 0 ? void 0 : options.maxBytes) !== null && _a !== void 0 ? _a : 1024; - return _this; - } - DecodeStream.prototype._transform = function (chunk, _encoding, callback) { - if (this.readBytes < this.maxBytes) { - this.sniffer.write(chunk); - this.readBytes += chunk.length; - if (this.readBytes < this.maxBytes) { - this.buffers.push(chunk); - callback(); - return; - } - } - this.getIconvStream().write(chunk, callback); - }; - DecodeStream.prototype.getIconvStream = function () { - var _this = this; - if (this.iconv) { - return this.iconv; - } - var stream = iconv.decodeStream(this.sniffer.encoding); - stream.on("data", function (chunk) { return _this.push(chunk, "utf-8"); }); - stream.on("end", function () { return _this.push(null); }); - this.iconv = stream; - for (var _i = 0, _a = this.buffers; _i < _a.length; _i++) { - var buffer = _a[_i]; - stream.write(buffer); - } - this.buffers.length = 0; - return stream; - }; - DecodeStream.prototype._flush = function (callback) { - this.getIconvStream().end(callback); - }; - return DecodeStream; -}(Transform)); -export { DecodeStream }; -export { getEncoding } from "./sniffer.js"; -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/encoding-sniffer/dist/esm/index.js.map b/node_modules/encoding-sniffer/dist/esm/index.js.map deleted file mode 100644 index be76b8d..0000000 --- a/node_modules/encoding-sniffer/dist/esm/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],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YACX,CAAC;QACL,CAAC;QAED,IAAI,CAAC,cAAc,EAAE,CAAC,KAAK,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAC;IACjD,CAAC;IAEO,qCAAc,GAAtB;QAAA,iBAiBC;QAhBG,IAAI,IAAI,CAAC,KAAK,EAAE,CAAC;YACb,OAAO,IAAI,CAAC,KAAK,CAAC;QACtB,CAAC;QAED,IAAM,MAAM,GAAG,KAAK,CAAC,YAAY,CAAC,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;QACzD,MAAM,CAAC,EAAE,CAAC,MAAM,EAAE,UAAC,KAAa,IAAK,OAAA,KAAI,CAAC,IAAI,CAAC,KAAK,EAAE,OAAO,CAAC,EAAzB,CAAyB,CAAC,CAAC;QAChE,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE,cAAM,OAAA,KAAI,CAAC,IAAI,CAAC,IAAI,CAAC,EAAf,CAAe,CAAC,CAAC;QAExC,IAAI,CAAC,KAAK,GAAG,MAAM,CAAC;QAEpB,KAAqB,UAAY,EAAZ,KAAA,IAAI,CAAC,OAAO,EAAZ,cAAY,EAAZ,IAAY,EAAE,CAAC;YAA/B,IAAM,MAAM,SAAA;YACb,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;QACzB,CAAC;QACD,IAAI,CAAC,OAAO,CAAC,MAAM,GAAG,CAAC,CAAC;QAExB,OAAO,MAAM,CAAC;IAClB,CAAC;IAEQ,6BAAM,GAAf,UAAgB,QAA2B;QACvC,IAAI,CAAC,cAAc,EAAE,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;IACxC,CAAC;IACL,mBAAC;AAAD,CAAC,AAvDD,CAAkC,SAAS,GAuD1C;;AAED,OAAO,EAAuB,WAAW,EAAE,MAAM,cAAc,CAAC"} \ No newline at end of file diff --git a/node_modules/encoding-sniffer/dist/esm/package.json b/node_modules/encoding-sniffer/dist/esm/package.json deleted file mode 100644 index 3dbc1ca..0000000 --- a/node_modules/encoding-sniffer/dist/esm/package.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "type": "module" -} diff --git a/node_modules/encoding-sniffer/dist/esm/sniffer.d.ts b/node_modules/encoding-sniffer/dist/esm/sniffer.d.ts deleted file mode 100644 index e36d703..0000000 --- a/node_modules/encoding-sniffer/dist/esm/sniffer.d.ts +++ /dev/null @@ -1,148 +0,0 @@ -export declare enum ResultType { - BOM = 0, - PASSED = 1, - XML_PREFIX = 2, - META_TAG = 3, - XML_ENCODING = 4, - DEFAULT = 5 -} -export declare const STRINGS: { - UTF8_BOM: Uint8Array; - UTF16LE_BOM: Uint8Array; - UTF16BE_BOM: Uint8Array; - UTF16LE_XML_PREFIX: Uint8Array; - UTF16BE_XML_PREFIX: Uint8Array; - XML_DECLARATION: Uint8Array; - ENCODING: Uint8Array; - META: Uint8Array; - HTTP_EQUIV: Uint8Array; - CONTENT: Uint8Array; - CONTENT_TYPE: Uint8Array; - CHARSET: Uint8Array; - COMMENT_START: Uint8Array; - COMMENT_END: Uint8Array; -}; -export interface SnifferOptions { - /** - * The maximum number of bytes to sniff. - * - * @default 1024 - */ - maxBytes?: number; - /** - * The encoding specified by the user. - */ - userEncoding?: string; - /** - * The encoding specified by the transport layer. - */ - transportLayerEncodingLabel?: string; - /** - * The default encoding to use. - * - * @default "windows-1252" - */ - defaultEncoding?: string; -} -export declare class Sniffer { - /** The maximum number of bytes to sniff. */ - private readonly maxBytes; - /** The offset of the previous buffers. */ - private offset; - private state; - private sectionIndex; - private attribType; - /** - * Indicates if the `http-equiv` is `content-type`. - * - * Initially `null`, a boolean when a value is found. - */ - private gotPragma; - private needsPragma; - private inMetaTag; - encoding: string; - resultType: ResultType; - private setResult; - constructor({ maxBytes, userEncoding, transportLayerEncodingLabel, defaultEncoding, }?: SnifferOptions); - private stateBegin; - private stateBeginLT; - private stateUTF16BE_XML_PREFIX; - private stateUTF16LE_XML_PREFIX; - private stateBOM16LE; - private stateBOM16BE; - private stateBOM8; - private stateBeforeTag; - /** - * We have seen a `<`, and now have to figure out what to do. - * - * Options: - * - `<meta` - * - Any other tag - * - A closing tag - * - `<!--` - * - An XML declaration - * - */ - private stateBeforeTagName; - private stateBeforeCloseTagName; - private stateCommentStart; - private stateCommentEnd; - /** - * Any section starting with `<!`, `<?`, `</`, without being a closing tag or comment. - */ - private stateWeirdTag; - /** - * Advances the section, ignoring upper/lower case. - * - * Make sure the section has left-over characters before calling. - * - * @returns `false` if we did not match the section. - */ - private advanceSectionIC; - /** - * Advances the section. - * - * Make sure the section has left-over characters before calling. - * - * @returns `false` if we did not match the section. - */ - private advanceSection; - private stateTagNameMeta; - private stateTagNameOther; - private stateBeforeAttribute; - private handleMetaAttrib; - private stateMetaAttribHttpEquiv; - private stateMetaAttribC; - private stateMetaAttribCharset; - private stateMetaAttribContent; - private stateMetaAttribAfterName; - private stateAnyAttribName; - private stateAfterAttributeName; - private quoteCharacter; - private readonly attributeValue; - private stateBeforeAttributeValue; - private stateMetaAttribHttpEquivValue; - private handleMetaContentValue; - private handleAttributeValue; - private stateAttributeValueUnquoted; - private findMetaContentEncoding; - private stateMetaContentValueUnquotedBeforeEncoding; - private stateMetaContentValueUnquotedBeforeValue; - private stateMetaContentValueUnquotedValueQuoted; - private stateMetaContentValueUnquotedValueUnquoted; - private stateMetaContentValueQuotedValueUnquoted; - private stateMetaContentValueQuotedValueQuoted; - private stateMetaContentValueQuotedBeforeEncoding; - private stateMetaContentValueQuotedAfterEncoding; - private stateMetaContentValueQuotedBeforeValue; - private stateAttributeValueQuoted; - private stateXMLDeclaration; - private stateXMLDeclarationBeforeEncoding; - private stateXMLDeclarationAfterEncoding; - private stateXMLDeclarationBeforeValue; - private stateXMLDeclarationValue; - write(buffer: Uint8Array): void; -} -/** Get the encoding for the passed buffer. */ -export declare function getEncoding(buffer: Uint8Array, options?: SnifferOptions): string; -//# sourceMappingURL=sniffer.d.ts.map \ No newline at end of file diff --git a/node_modules/encoding-sniffer/dist/esm/sniffer.d.ts.map b/node_modules/encoding-sniffer/dist/esm/sniffer.d.ts.map deleted file mode 100644 index c712c80..0000000 --- a/node_modules/encoding-sniffer/dist/esm/sniffer.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"sniffer.d.ts","sourceRoot":"","sources":["../../src/sniffer.ts"],"names":[],"mappings":"AAuEA,oBAAY,UAAU;IAElB,GAAG,IAAI;IAEP,MAAM,IAAI;IAEV,UAAU,IAAI;IAEd,QAAQ,IAAI;IAEZ,YAAY,IAAI;IAEhB,OAAO,IAAI;CACd;AAgDD,eAAO,MAAM,OAAO;;;;;;;;;;;;;;;CAenB,CAAC;AAaF,MAAM,WAAW,cAAc;IAC3B;;;;OAIG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;OAEG;IACH,2BAA2B,CAAC,EAAE,MAAM,CAAC;IACrC;;;;OAIG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;CAC5B;AAED,qBAAa,OAAO;IAChB,4CAA4C;IAC5C,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAS;IAClC,0CAA0C;IAC1C,OAAO,CAAC,MAAM,CAAK;IAEnB,OAAO,CAAC,KAAK,CAAe;IAC5B,OAAO,CAAC,YAAY,CAAK;IACzB,OAAO,CAAC,UAAU,CAAmB;IACrC;;;;OAIG;IACH,OAAO,CAAC,SAAS,CAAwB;IACzC,OAAO,CAAC,WAAW,CAAuB;IAE1C,OAAO,CAAC,SAAS,CAAS;IAEnB,QAAQ,SAAkB;IAC1B,UAAU,aAAsB;IAEvC,OAAO,CAAC,SAAS;gBAsBL,EACR,QAAe,EACf,YAAY,EACZ,2BAA2B,EAC3B,eAAe,GAClB,GAAE,cAAmB;IAetB,OAAO,CAAC,UAAU;IAmClB,OAAO,CAAC,YAAY;IAapB,OAAO,CAAC,uBAAuB;IAa/B,OAAO,CAAC,uBAAuB;IAa/B,OAAO,CAAC,YAAY;IASpB,OAAO,CAAC,YAAY;IASpB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8B;IAUtC,OAAO,CAAC,wBAAwB;IAgBzB,KAAK,CAAC,MAAM,EAAE,UAAU,GAAG,IAAI;CAoOzC;AAED,8CAA8C;AAC9C,wBAAgB,WAAW,CACvB,MAAM,EAAE,UAAU,EAClB,OAAO,CAAC,EAAE,cAAc,GACzB,MAAM,CAIR"} \ No newline at end of file diff --git a/node_modules/encoding-sniffer/dist/esm/sniffer.js b/node_modules/encoding-sniffer/dist/esm/sniffer.js deleted file mode 100644 index 94be003..0000000 --- a/node_modules/encoding-sniffer/dist/esm/sniffer.js +++ /dev/null @@ -1,988 +0,0 @@ -import { labelToName } from "whatwg-encoding"; -// https://html.spec.whatwg.org/multipage/syntax.html#prescan-a-byte-stream-to-determine-its-encoding -var State; -(function (State) { - // Before anything starts; can be any of BOM, UTF-16 XML declarations or meta tags - State[State["Begin"] = 0] = "Begin"; - // Inside of a BOM - State[State["BOM16BE"] = 1] = "BOM16BE"; - State[State["BOM16LE"] = 2] = "BOM16LE"; - State[State["BOM8"] = 3] = "BOM8"; - // XML prefix - State[State["UTF16LE_XML_PREFIX"] = 4] = "UTF16LE_XML_PREFIX"; - State[State["BeginLT"] = 5] = "BeginLT"; - State[State["UTF16BE_XML_PREFIX"] = 6] = "UTF16BE_XML_PREFIX"; - // Waiting for opening `<` - State[State["BeforeTag"] = 7] = "BeforeTag"; - // After the opening `<` - State[State["BeforeTagName"] = 8] = "BeforeTagName"; - // After `</` - State[State["BeforeCloseTagName"] = 9] = "BeforeCloseTagName"; - // Beginning of a comment - State[State["CommentStart"] = 10] = "CommentStart"; - // End of a comment - State[State["CommentEnd"] = 11] = "CommentEnd"; - // A tag name that could be `meta` - State[State["TagNameMeta"] = 12] = "TagNameMeta"; - // A tag name that is not `meta` - State[State["TagNameOther"] = 13] = "TagNameOther"; - // XML declaration - State[State["XMLDeclaration"] = 14] = "XMLDeclaration"; - State[State["XMLDeclarationBeforeEncoding"] = 15] = "XMLDeclarationBeforeEncoding"; - State[State["XMLDeclarationAfterEncoding"] = 16] = "XMLDeclarationAfterEncoding"; - State[State["XMLDeclarationBeforeValue"] = 17] = "XMLDeclarationBeforeValue"; - State[State["XMLDeclarationValue"] = 18] = "XMLDeclarationValue"; - // Anything that looks like a tag, but doesn't fit in the above categories - State[State["WeirdTag"] = 19] = "WeirdTag"; - State[State["BeforeAttribute"] = 20] = "BeforeAttribute"; - /* - * Attributes in meta tag — we compare them to our set here, and back out - * We care about four attributes: http-equiv, content-type, content, charset - */ - State[State["MetaAttribHttpEquiv"] = 21] = "MetaAttribHttpEquiv"; - // The value has to be `content-type` - State[State["MetaAttribHttpEquivValue"] = 22] = "MetaAttribHttpEquivValue"; - State[State["MetaAttribC"] = 23] = "MetaAttribC"; - State[State["MetaAttribContent"] = 24] = "MetaAttribContent"; - State[State["MetaAttribCharset"] = 25] = "MetaAttribCharset"; - // Waiting for whitespace - State[State["MetaAttribAfterName"] = 26] = "MetaAttribAfterName"; - State[State["MetaContentValueQuotedBeforeEncoding"] = 27] = "MetaContentValueQuotedBeforeEncoding"; - State[State["MetaContentValueQuotedAfterEncoding"] = 28] = "MetaContentValueQuotedAfterEncoding"; - State[State["MetaContentValueQuotedBeforeValue"] = 29] = "MetaContentValueQuotedBeforeValue"; - State[State["MetaContentValueQuotedValueQuoted"] = 30] = "MetaContentValueQuotedValueQuoted"; - State[State["MetaContentValueQuotedValueUnquoted"] = 31] = "MetaContentValueQuotedValueUnquoted"; - State[State["MetaContentValueUnquotedBeforeEncoding"] = 32] = "MetaContentValueUnquotedBeforeEncoding"; - State[State["MetaContentValueUnquotedBeforeValue"] = 33] = "MetaContentValueUnquotedBeforeValue"; - State[State["MetaContentValueUnquotedValueQuoted"] = 34] = "MetaContentValueUnquotedValueQuoted"; - State[State["MetaContentValueUnquotedValueUnquoted"] = 35] = "MetaContentValueUnquotedValueUnquoted"; - State[State["AnyAttribName"] = 36] = "AnyAttribName"; - // After the name of an attribute, before the equals sign - State[State["AfterAttributeName"] = 37] = "AfterAttributeName"; - // After `=` - State[State["BeforeAttributeValue"] = 38] = "BeforeAttributeValue"; - State[State["AttributeValueQuoted"] = 39] = "AttributeValueQuoted"; - State[State["AttributeValueUnquoted"] = 40] = "AttributeValueUnquoted"; -})(State || (State = {})); -export var ResultType; -(function (ResultType) { - // Byte order mark - ResultType[ResultType["BOM"] = 0] = "BOM"; - // User- or transport layer-defined - ResultType[ResultType["PASSED"] = 1] = "PASSED"; - // XML prefixes - ResultType[ResultType["XML_PREFIX"] = 2] = "XML_PREFIX"; - // Meta tag - ResultType[ResultType["META_TAG"] = 3] = "META_TAG"; - // XML encoding - ResultType[ResultType["XML_ENCODING"] = 4] = "XML_ENCODING"; - // Default - ResultType[ResultType["DEFAULT"] = 5] = "DEFAULT"; -})(ResultType || (ResultType = {})); -var AttribType; -(function (AttribType) { - AttribType[AttribType["None"] = 0] = "None"; - AttribType[AttribType["HttpEquiv"] = 1] = "HttpEquiv"; - AttribType[AttribType["Content"] = 2] = "Content"; - AttribType[AttribType["Charset"] = 3] = "Charset"; -})(AttribType || (AttribType = {})); -var Chars; -(function (Chars) { - Chars[Chars["NIL"] = 0] = "NIL"; - Chars[Chars["TAB"] = 9] = "TAB"; - Chars[Chars["LF"] = 10] = "LF"; - Chars[Chars["CR"] = 13] = "CR"; - Chars[Chars["SPACE"] = 32] = "SPACE"; - Chars[Chars["EXCLAMATION"] = 33] = "EXCLAMATION"; - Chars[Chars["DQUOTE"] = 34] = "DQUOTE"; - Chars[Chars["SQUOTE"] = 39] = "SQUOTE"; - Chars[Chars["DASH"] = 45] = "DASH"; - Chars[Chars["SLASH"] = 47] = "SLASH"; - Chars[Chars["SEMICOLON"] = 59] = "SEMICOLON"; - Chars[Chars["LT"] = 60] = "LT"; - Chars[Chars["EQUALS"] = 61] = "EQUALS"; - Chars[Chars["GT"] = 62] = "GT"; - Chars[Chars["QUESTION"] = 63] = "QUESTION"; - Chars[Chars["UpperA"] = 65] = "UpperA"; - Chars[Chars["UpperZ"] = 90] = "UpperZ"; - Chars[Chars["LowerA"] = 97] = "LowerA"; - Chars[Chars["LowerZ"] = 122] = "LowerZ"; -})(Chars || (Chars = {})); -var SPACE_CHARACTERS = new Set([Chars.SPACE, Chars.LF, Chars.CR, Chars.TAB]); -var END_OF_UNQUOTED_ATTRIBUTE_VALUE = new Set([ - Chars.SPACE, - Chars.LF, - Chars.CR, - Chars.TAB, - Chars.GT, -]); -function toUint8Array(str) { - var arr = new Uint8Array(str.length); - for (var i = 0; i < str.length; i++) { - arr[i] = str.charCodeAt(i); - } - return arr; -} -export var STRINGS = { - UTF8_BOM: new Uint8Array([0xef, 0xbb, 0xbf]), - UTF16LE_BOM: new Uint8Array([0xff, 0xfe]), - UTF16BE_BOM: new Uint8Array([0xfe, 0xff]), - UTF16LE_XML_PREFIX: new Uint8Array([0x3c, 0x0, 0x3f, 0x0, 0x78, 0x0]), - UTF16BE_XML_PREFIX: new Uint8Array([0x0, 0x3c, 0x0, 0x3f, 0x0, 0x78]), - XML_DECLARATION: toUint8Array("<?xml"), - ENCODING: toUint8Array("encoding"), - META: toUint8Array("meta"), - HTTP_EQUIV: toUint8Array("http-equiv"), - CONTENT: toUint8Array("content"), - CONTENT_TYPE: toUint8Array("content-type"), - CHARSET: toUint8Array("charset"), - COMMENT_START: toUint8Array("<!--"), - COMMENT_END: toUint8Array("-->"), -}; -function isAsciiAlpha(c) { - return ((c >= Chars.UpperA && c <= Chars.UpperZ) || - (c >= Chars.LowerA && c <= Chars.LowerZ)); -} -function isQuote(c) { - return c === Chars.DQUOTE || c === Chars.SQUOTE; -} -var Sniffer = /** @class */ (function () { - function Sniffer(_a) { - var _b = _a === void 0 ? {} : _a, _c = _b.maxBytes, maxBytes = _c === void 0 ? 1024 : _c, userEncoding = _b.userEncoding, transportLayerEncodingLabel = _b.transportLayerEncodingLabel, defaultEncoding = _b.defaultEncoding; - /** The offset of the previous buffers. */ - this.offset = 0; - this.state = State.Begin; - this.sectionIndex = 0; - this.attribType = AttribType.None; - /** - * Indicates if the `http-equiv` is `content-type`. - * - * Initially `null`, a boolean when a value is found. - */ - this.gotPragma = null; - this.needsPragma = null; - this.inMetaTag = false; - this.encoding = "windows-1252"; - this.resultType = ResultType.DEFAULT; - this.quoteCharacter = 0; - this.attributeValue = []; - this.maxBytes = maxBytes; - if (userEncoding) { - this.setResult(userEncoding, ResultType.PASSED); - } - if (transportLayerEncodingLabel) { - this.setResult(transportLayerEncodingLabel, ResultType.PASSED); - } - if (defaultEncoding) { - this.setResult(defaultEncoding, ResultType.DEFAULT); - } - } - Sniffer.prototype.setResult = function (label, type) { - if (this.resultType === ResultType.DEFAULT || this.resultType > type) { - var encoding = labelToName(label); - if (encoding) { - this.encoding = - // Check if we are in a meta tag and the encoding is `x-user-defined` - type === ResultType.META_TAG && - encoding === "x-user-defined" - ? "windows-1252" - : // Check if we are in a meta tag or xml declaration, and the encoding is UTF-16 - (type === ResultType.META_TAG || - type === ResultType.XML_ENCODING) && - (encoding === "UTF-16LE" || encoding === "UTF-16BE") - ? "UTF-8" - : encoding; - this.resultType = type; - } - } - }; - Sniffer.prototype.stateBegin = function (c) { - switch (c) { - case STRINGS.UTF16BE_BOM[0]: { - this.state = State.BOM16BE; - break; - } - case STRINGS.UTF16LE_BOM[0]: { - this.state = State.BOM16LE; - break; - } - case STRINGS.UTF8_BOM[0]: { - this.sectionIndex = 1; - this.state = State.BOM8; - break; - } - case Chars.NIL: { - this.state = State.UTF16BE_XML_PREFIX; - this.sectionIndex = 1; - break; - } - case Chars.LT: { - this.state = State.BeginLT; - break; - } - default: { - this.state = State.BeforeTag; - } - } - }; - Sniffer.prototype.stateBeginLT = function (c) { - if (c === Chars.NIL) { - this.state = State.UTF16LE_XML_PREFIX; - this.sectionIndex = 2; - } - else if (c === Chars.QUESTION) { - this.state = State.XMLDeclaration; - this.sectionIndex = 2; - } - else { - this.state = State.BeforeTagName; - this.stateBeforeTagName(c); - } - }; - Sniffer.prototype.stateUTF16BE_XML_PREFIX = function (c) { - // Advance position in the section - if (this.advanceSection(STRINGS.UTF16BE_XML_PREFIX, c)) { - if (this.sectionIndex === STRINGS.UTF16BE_XML_PREFIX.length) { - // We have the whole prefix - this.setResult("utf-16be", ResultType.XML_PREFIX); - } - } - else { - this.state = State.BeforeTag; - this.stateBeforeTag(c); - } - }; - Sniffer.prototype.stateUTF16LE_XML_PREFIX = function (c) { - // Advance position in the section - if (this.advanceSection(STRINGS.UTF16LE_XML_PREFIX, c)) { - if (this.sectionIndex === STRINGS.UTF16LE_XML_PREFIX.length) { - // We have the whole prefix - this.setResult("utf-16le", ResultType.XML_PREFIX); - } - } - else { - this.state = State.BeforeTag; - this.stateBeforeTag(c); - } - }; - Sniffer.prototype.stateBOM16LE = function (c) { - if (c === STRINGS.UTF16LE_BOM[1]) { - this.setResult("utf-16le", ResultType.BOM); - } - else { - this.state = State.BeforeTag; - this.stateBeforeTag(c); - } - }; - Sniffer.prototype.stateBOM16BE = function (c) { - if (c === STRINGS.UTF16BE_BOM[1]) { - this.setResult("utf-16be", ResultType.BOM); - } - else { - this.state = State.BeforeTag; - this.stateBeforeTag(c); - } - }; - Sniffer.prototype.stateBOM8 = function (c) { - if (this.advanceSection(STRINGS.UTF8_BOM, c) && - this.sectionIndex === STRINGS.UTF8_BOM.length) { - this.setResult("utf-8", ResultType.BOM); - } - }; - Sniffer.prototype.stateBeforeTag = function (c) { - if (c === Chars.LT) { - this.state = State.BeforeTagName; - this.inMetaTag = false; - } - }; - /** - * We have seen a `<`, and now have to figure out what to do. - * - * Options: - * - `<meta` - * - Any other tag - * - A closing tag - * - `<!--` - * - An XML declaration - * - */ - Sniffer.prototype.stateBeforeTagName = function (c) { - if (isAsciiAlpha(c)) { - if ((c | 0x20) === STRINGS.META[0]) { - this.sectionIndex = 1; - this.state = State.TagNameMeta; - } - else { - this.state = State.TagNameOther; - } - } - else - switch (c) { - case Chars.SLASH: { - this.state = State.BeforeCloseTagName; - break; - } - case Chars.EXCLAMATION: { - this.state = State.CommentStart; - this.sectionIndex = 2; - break; - } - case Chars.QUESTION: { - this.state = State.WeirdTag; - break; - } - default: { - this.state = State.BeforeTag; - this.stateBeforeTag(c); - } - } - }; - Sniffer.prototype.stateBeforeCloseTagName = function (c) { - this.state = isAsciiAlpha(c) - ? // Switch to `TagNameOther`; the HTML spec allows attributes here as well. - State.TagNameOther - : State.WeirdTag; - }; - Sniffer.prototype.stateCommentStart = function (c) { - if (this.advanceSection(STRINGS.COMMENT_START, c)) { - if (this.sectionIndex === STRINGS.COMMENT_START.length) { - this.state = State.CommentEnd; - // The -- of the comment start can be part of the end. - this.sectionIndex = 2; - } - } - else { - this.state = State.WeirdTag; - this.stateWeirdTag(c); - } - }; - Sniffer.prototype.stateCommentEnd = function (c) { - if (this.advanceSection(STRINGS.COMMENT_END, c)) { - if (this.sectionIndex === STRINGS.COMMENT_END.length) { - this.state = State.BeforeTag; - } - } - else if (c === Chars.DASH) { - /* - * If we are here, we know we expected a `>` above. - * Set this to 2, to support many dashes before the closing `>`. - */ - this.sectionIndex = 2; - } - }; - /** - * Any section starting with `<!`, `<?`, `</`, without being a closing tag or comment. - */ - Sniffer.prototype.stateWeirdTag = function (c) { - if (c === Chars.GT) { - this.state = State.BeforeTag; - } - }; - /** - * Advances the section, ignoring upper/lower case. - * - * Make sure the section has left-over characters before calling. - * - * @returns `false` if we did not match the section. - */ - Sniffer.prototype.advanceSectionIC = function (section, c) { - return this.advanceSection(section, c | 0x20); - }; - /** - * Advances the section. - * - * Make sure the section has left-over characters before calling. - * - * @returns `false` if we did not match the section. - */ - Sniffer.prototype.advanceSection = function (section, c) { - if (section[this.sectionIndex] === c) { - this.sectionIndex++; - return true; - } - this.sectionIndex = 0; - return false; - }; - Sniffer.prototype.stateTagNameMeta = function (c) { - if (this.sectionIndex < STRINGS.META.length) { - if (this.advanceSectionIC(STRINGS.META, c)) { - return; - } - } - else if (SPACE_CHARACTERS.has(c)) { - this.inMetaTag = true; - this.gotPragma = null; - this.needsPragma = null; - this.state = State.BeforeAttribute; - return; - } - this.state = State.TagNameOther; - // Reconsume in case there is a `>`. - this.stateTagNameOther(c); - }; - Sniffer.prototype.stateTagNameOther = function (c) { - if (SPACE_CHARACTERS.has(c)) { - this.state = State.BeforeAttribute; - } - else if (c === Chars.GT) { - this.state = State.BeforeTag; - } - }; - Sniffer.prototype.stateBeforeAttribute = function (c) { - if (SPACE_CHARACTERS.has(c)) - return; - if (this.inMetaTag) { - var lower = c | 0x20; - if (lower === STRINGS.HTTP_EQUIV[0]) { - this.sectionIndex = 1; - this.state = State.MetaAttribHttpEquiv; - return; - } - else if (lower === STRINGS.CHARSET[0]) { - this.sectionIndex = 1; - this.state = State.MetaAttribC; - return; - } - } - this.state = - c === Chars.SLASH || c === Chars.GT - ? State.BeforeTag - : State.AnyAttribName; - }; - Sniffer.prototype.handleMetaAttrib = function (c, section, type) { - if (this.advanceSectionIC(section, c)) { - if (this.sectionIndex === section.length) { - this.attribType = type; - this.state = State.MetaAttribAfterName; - } - } - else { - this.state = State.AnyAttribName; - this.stateAnyAttribName(c); - } - }; - Sniffer.prototype.stateMetaAttribHttpEquiv = function (c) { - this.handleMetaAttrib(c, STRINGS.HTTP_EQUIV, AttribType.HttpEquiv); - }; - Sniffer.prototype.stateMetaAttribC = function (c) { - var lower = c | 0x20; - if (lower === STRINGS.CHARSET[1]) { - this.sectionIndex = 2; - this.state = State.MetaAttribCharset; - } - else if (lower === STRINGS.CONTENT[1]) { - this.sectionIndex = 2; - this.state = State.MetaAttribContent; - } - else { - this.state = State.AnyAttribName; - this.stateAnyAttribName(c); - } - }; - Sniffer.prototype.stateMetaAttribCharset = function (c) { - this.handleMetaAttrib(c, STRINGS.CHARSET, AttribType.Charset); - }; - Sniffer.prototype.stateMetaAttribContent = function (c) { - this.handleMetaAttrib(c, STRINGS.CONTENT, AttribType.Content); - }; - Sniffer.prototype.stateMetaAttribAfterName = function (c) { - if (SPACE_CHARACTERS.has(c) || c === Chars.EQUALS) { - this.state = State.AfterAttributeName; - this.stateAfterAttributeName(c); - } - else { - this.state = State.AnyAttribName; - this.stateAnyAttribName(c); - } - }; - Sniffer.prototype.stateAnyAttribName = function (c) { - if (SPACE_CHARACTERS.has(c)) { - this.attribType = AttribType.None; - this.state = State.AfterAttributeName; - } - else if (c === Chars.SLASH || c === Chars.GT) { - this.state = State.BeforeTag; - } - else if (c === Chars.EQUALS) { - this.state = State.BeforeAttributeValue; - } - }; - Sniffer.prototype.stateAfterAttributeName = function (c) { - if (SPACE_CHARACTERS.has(c)) - return; - if (c === Chars.EQUALS) { - this.state = State.BeforeAttributeValue; - } - else { - this.state = State.BeforeAttribute; - this.stateBeforeAttribute(c); - } - }; - Sniffer.prototype.stateBeforeAttributeValue = function (c) { - if (SPACE_CHARACTERS.has(c)) - return; - this.attributeValue.length = 0; - this.sectionIndex = 0; - if (isQuote(c)) { - this.quoteCharacter = c; - this.state = - this.attribType === AttribType.Content - ? State.MetaContentValueQuotedBeforeEncoding - : this.attribType === AttribType.HttpEquiv - ? State.MetaAttribHttpEquivValue - : State.AttributeValueQuoted; - } - else if (this.attribType === AttribType.Content) { - this.state = State.MetaContentValueUnquotedBeforeEncoding; - this.stateMetaContentValueUnquotedBeforeEncoding(c); - } - else if (this.attribType === AttribType.HttpEquiv) { - // We use `quoteCharacter = 0` to signify that the value is unquoted. - this.quoteCharacter = 0; - this.sectionIndex = 0; - this.state = State.MetaAttribHttpEquivValue; - this.stateMetaAttribHttpEquivValue(c); - } - else { - this.state = State.AttributeValueUnquoted; - this.stateAttributeValueUnquoted(c); - } - }; - // The value has to be `content-type` - Sniffer.prototype.stateMetaAttribHttpEquivValue = function (c) { - if (this.sectionIndex === STRINGS.CONTENT_TYPE.length) { - if (this.quoteCharacter === 0 - ? END_OF_UNQUOTED_ATTRIBUTE_VALUE.has(c) - : c === this.quoteCharacter) { - if (this.needsPragma !== null) { - this.setResult(this.needsPragma, ResultType.META_TAG); - } - else if (this.gotPragma === null) { - this.gotPragma = true; - } - this.state = State.BeforeAttribute; - return; - } - } - else if (this.advanceSectionIC(STRINGS.CONTENT_TYPE, c)) { - return; - } - this.gotPragma = false; - if (this.quoteCharacter === 0) { - this.state = State.AttributeValueUnquoted; - this.stateAttributeValueUnquoted(c); - } - else { - this.state = State.AttributeValueQuoted; - this.stateAttributeValueQuoted(c); - } - }; - Sniffer.prototype.handleMetaContentValue = function () { - if (this.attributeValue.length === 0) - return; - var encoding = String.fromCharCode.apply(String, this.attributeValue); - if (this.gotPragma) { - this.setResult(encoding, ResultType.META_TAG); - } - else if (this.needsPragma === null) { - // Don't override a previous result. - this.needsPragma = encoding; - } - this.attributeValue.length = 0; - }; - Sniffer.prototype.handleAttributeValue = function () { - if (this.attribType === AttribType.Charset) { - this.setResult(String.fromCharCode.apply(String, this.attributeValue), ResultType.META_TAG); - } - }; - Sniffer.prototype.stateAttributeValueUnquoted = function (c) { - if (SPACE_CHARACTERS.has(c)) { - this.handleAttributeValue(); - this.state = State.BeforeAttribute; - } - else if (c === Chars.SLASH || c === Chars.GT) { - this.handleAttributeValue(); - this.state = State.BeforeTag; - } - else if (this.attribType === AttribType.Charset) { - this.attributeValue.push(c | 0x20); - } - }; - Sniffer.prototype.findMetaContentEncoding = function (c) { - if (this.advanceSectionIC(STRINGS.CHARSET, c)) { - if (this.sectionIndex === STRINGS.CHARSET.length) { - return true; - } - } - else { - // If we encountered another `c`, assume we started over. - this.sectionIndex = Number(c === STRINGS.CHARSET[0]); - } - return false; - }; - Sniffer.prototype.stateMetaContentValueUnquotedBeforeEncoding = function (c) { - if (END_OF_UNQUOTED_ATTRIBUTE_VALUE.has(c)) { - this.stateAttributeValueUnquoted(c); - } - else if (this.sectionIndex === STRINGS.CHARSET.length) { - if (c === Chars.EQUALS) { - this.state = State.MetaContentValueUnquotedBeforeValue; - } - } - else { - this.findMetaContentEncoding(c); - } - }; - Sniffer.prototype.stateMetaContentValueUnquotedBeforeValue = function (c) { - if (isQuote(c)) { - this.quoteCharacter = c; - this.state = State.MetaContentValueUnquotedValueQuoted; - } - else if (END_OF_UNQUOTED_ATTRIBUTE_VALUE.has(c)) { - // Can't have spaces here, as it would no longer be part of the attribute value. - this.stateAttributeValueUnquoted(c); - } - else { - this.state = State.MetaContentValueUnquotedValueUnquoted; - this.stateMetaContentValueUnquotedValueUnquoted(c); - } - }; - Sniffer.prototype.stateMetaContentValueUnquotedValueQuoted = function (c) { - if (END_OF_UNQUOTED_ATTRIBUTE_VALUE.has(c)) { - // Quotes weren't matched, so we're done. - this.stateAttributeValueUnquoted(c); - } - else if (c === this.quoteCharacter) { - this.handleMetaContentValue(); - this.state = State.AttributeValueUnquoted; - } - else { - this.attributeValue.push(c | 0x20); - } - }; - Sniffer.prototype.stateMetaContentValueUnquotedValueUnquoted = function (c) { - if (END_OF_UNQUOTED_ATTRIBUTE_VALUE.has(c) || c === Chars.SEMICOLON) { - this.handleMetaContentValue(); - this.state = State.AttributeValueUnquoted; - this.stateAttributeValueUnquoted(c); - } - else { - this.attributeValue.push(c | 0x20); - } - }; - Sniffer.prototype.stateMetaContentValueQuotedValueUnquoted = function (c) { - if (isQuote(c) || SPACE_CHARACTERS.has(c) || c === Chars.SEMICOLON) { - this.handleMetaContentValue(); - // We are done with the value, but might not be at the end of the attribute - this.state = State.AttributeValueQuoted; - this.stateAttributeValueQuoted(c); - } - else { - this.attributeValue.push(c | 0x20); - } - }; - Sniffer.prototype.stateMetaContentValueQuotedValueQuoted = function (c) { - if (isQuote(c)) { - // We have reached the end of our value. - if (c !== this.quoteCharacter) { - // Only handle the value if inner quotes were matched. - this.handleMetaContentValue(); - } - this.state = State.AttributeValueQuoted; - this.stateAttributeValueQuoted(c); - } - else { - this.attributeValue.push(c | 0x20); - } - }; - Sniffer.prototype.stateMetaContentValueQuotedBeforeEncoding = function (c) { - if (c === this.quoteCharacter) { - this.stateAttributeValueQuoted(c); - } - else if (this.findMetaContentEncoding(c)) { - this.state = State.MetaContentValueQuotedAfterEncoding; - } - }; - Sniffer.prototype.stateMetaContentValueQuotedAfterEncoding = function (c) { - if (c === Chars.EQUALS) { - this.state = State.MetaContentValueQuotedBeforeValue; - } - else if (!SPACE_CHARACTERS.has(c)) { - // Look for the next encoding - this.state = State.MetaContentValueQuotedBeforeEncoding; - this.stateMetaContentValueQuotedBeforeEncoding(c); - } - }; - Sniffer.prototype.stateMetaContentValueQuotedBeforeValue = function (c) { - if (c === this.quoteCharacter) { - this.stateAttributeValueQuoted(c); - } - else if (isQuote(c)) { - this.state = State.MetaContentValueQuotedValueQuoted; - } - else if (!SPACE_CHARACTERS.has(c)) { - this.state = State.MetaContentValueQuotedValueUnquoted; - this.stateMetaContentValueQuotedValueUnquoted(c); - } - }; - Sniffer.prototype.stateAttributeValueQuoted = function (c) { - if (c === this.quoteCharacter) { - this.handleAttributeValue(); - this.state = State.BeforeAttribute; - } - else if (this.attribType === AttribType.Charset) { - this.attributeValue.push(c | 0x20); - } - }; - // Read STRINGS.XML_DECLARATION - Sniffer.prototype.stateXMLDeclaration = function (c) { - if (this.advanceSection(STRINGS.XML_DECLARATION, c)) { - if (this.sectionIndex === STRINGS.XML_DECLARATION.length) { - this.sectionIndex = 0; - this.state = State.XMLDeclarationBeforeEncoding; - } - } - else { - this.state = State.WeirdTag; - } - }; - Sniffer.prototype.stateXMLDeclarationBeforeEncoding = function (c) { - if (this.advanceSection(STRINGS.ENCODING, c)) { - if (this.sectionIndex === STRINGS.ENCODING.length) { - this.state = State.XMLDeclarationAfterEncoding; - } - } - else if (c === Chars.GT) { - this.state = State.BeforeTag; - } - else { - // If we encountered another `c`, assume we started over. - this.sectionIndex = Number(c === STRINGS.ENCODING[0]); - } - }; - Sniffer.prototype.stateXMLDeclarationAfterEncoding = function (c) { - if (c === Chars.EQUALS) { - this.state = State.XMLDeclarationBeforeValue; - } - else if (c > Chars.SPACE) { - this.state = State.WeirdTag; - this.stateWeirdTag(c); - } - }; - Sniffer.prototype.stateXMLDeclarationBeforeValue = function (c) { - if (isQuote(c)) { - this.attributeValue.length = 0; - this.state = State.XMLDeclarationValue; - } - else if (c > Chars.SPACE) { - this.state = State.WeirdTag; - this.stateWeirdTag(c); - } - }; - Sniffer.prototype.stateXMLDeclarationValue = function (c) { - if (isQuote(c)) { - this.setResult(String.fromCharCode.apply(String, this.attributeValue), ResultType.XML_ENCODING); - this.state = State.WeirdTag; - } - else if (c === Chars.GT) { - this.state = State.BeforeTag; - } - else if (c <= Chars.SPACE) { - this.state = State.WeirdTag; - } - else { - this.attributeValue.push(c | 0x20); - } - }; - Sniffer.prototype.write = function (buffer) { - var index = 0; - for (; index < buffer.length && this.offset + index < this.maxBytes; index++) { - var c = buffer[index]; - switch (this.state) { - case State.Begin: { - this.stateBegin(c); - break; - } - case State.BOM16BE: { - this.stateBOM16BE(c); - break; - } - case State.BOM16LE: { - this.stateBOM16LE(c); - break; - } - case State.BOM8: { - this.stateBOM8(c); - break; - } - case State.UTF16LE_XML_PREFIX: { - this.stateUTF16LE_XML_PREFIX(c); - break; - } - case State.BeginLT: { - this.stateBeginLT(c); - break; - } - case State.UTF16BE_XML_PREFIX: { - this.stateUTF16BE_XML_PREFIX(c); - break; - } - case State.BeforeTag: { - // Optimization: Skip all characters until we find a `<` - var idx = buffer.indexOf(Chars.LT, index); - if (idx < 0) { - // We are done with this buffer. Stay in the state and try on the next one. - index = buffer.length; - } - else { - index = idx; - this.stateBeforeTag(Chars.LT); - } - break; - } - case State.BeforeTagName: { - this.stateBeforeTagName(c); - break; - } - case State.BeforeCloseTagName: { - this.stateBeforeCloseTagName(c); - break; - } - case State.CommentStart: { - this.stateCommentStart(c); - break; - } - case State.CommentEnd: { - this.stateCommentEnd(c); - break; - } - case State.TagNameMeta: { - this.stateTagNameMeta(c); - break; - } - case State.TagNameOther: { - this.stateTagNameOther(c); - break; - } - case State.XMLDeclaration: { - this.stateXMLDeclaration(c); - break; - } - case State.XMLDeclarationBeforeEncoding: { - this.stateXMLDeclarationBeforeEncoding(c); - break; - } - case State.XMLDeclarationAfterEncoding: { - this.stateXMLDeclarationAfterEncoding(c); - break; - } - case State.XMLDeclarationBeforeValue: { - this.stateXMLDeclarationBeforeValue(c); - break; - } - case State.XMLDeclarationValue: { - this.stateXMLDeclarationValue(c); - break; - } - case State.WeirdTag: { - this.stateWeirdTag(c); - break; - } - case State.BeforeAttribute: { - this.stateBeforeAttribute(c); - break; - } - case State.MetaAttribHttpEquiv: { - this.stateMetaAttribHttpEquiv(c); - break; - } - case State.MetaAttribHttpEquivValue: { - this.stateMetaAttribHttpEquivValue(c); - break; - } - case State.MetaAttribC: { - this.stateMetaAttribC(c); - break; - } - case State.MetaAttribContent: { - this.stateMetaAttribContent(c); - break; - } - case State.MetaAttribCharset: { - this.stateMetaAttribCharset(c); - break; - } - case State.MetaAttribAfterName: { - this.stateMetaAttribAfterName(c); - break; - } - case State.MetaContentValueQuotedBeforeEncoding: { - this.stateMetaContentValueQuotedBeforeEncoding(c); - break; - } - case State.MetaContentValueQuotedAfterEncoding: { - this.stateMetaContentValueQuotedAfterEncoding(c); - break; - } - case State.MetaContentValueQuotedBeforeValue: { - this.stateMetaContentValueQuotedBeforeValue(c); - break; - } - case State.MetaContentValueQuotedValueQuoted: { - this.stateMetaContentValueQuotedValueQuoted(c); - break; - } - case State.MetaContentValueQuotedValueUnquoted: { - this.stateMetaContentValueQuotedValueUnquoted(c); - break; - } - case State.MetaContentValueUnquotedBeforeEncoding: { - this.stateMetaContentValueUnquotedBeforeEncoding(c); - break; - } - case State.MetaContentValueUnquotedBeforeValue: { - this.stateMetaContentValueUnquotedBeforeValue(c); - break; - } - case State.MetaContentValueUnquotedValueQuoted: { - this.stateMetaContentValueUnquotedValueQuoted(c); - break; - } - case State.MetaContentValueUnquotedValueUnquoted: { - this.stateMetaContentValueUnquotedValueUnquoted(c); - break; - } - case State.AnyAttribName: { - this.stateAnyAttribName(c); - break; - } - case State.AfterAttributeName: { - this.stateAfterAttributeName(c); - break; - } - case State.BeforeAttributeValue: { - this.stateBeforeAttributeValue(c); - break; - } - case State.AttributeValueQuoted: { - this.stateAttributeValueQuoted(c); - break; - } - default: { - // (State.AttributeValueUnquoted) - this.stateAttributeValueUnquoted(c); - } - } - } - this.offset += index; - }; - return Sniffer; -}()); -export { Sniffer }; -/** Get the encoding for the passed buffer. */ -export function getEncoding(buffer, options) { - var sniffer = new Sniffer(options); - sniffer.write(buffer); - return sniffer.encoding; -} -//# sourceMappingURL=sniffer.js.map \ No newline at end of file diff --git a/node_modules/encoding-sniffer/dist/esm/sniffer.js.map b/node_modules/encoding-sniffer/dist/esm/sniffer.js.map deleted file mode 100644 index 128c39c..0000000 --- a/node_modules/encoding-sniffer/dist/esm/sniffer.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"sniffer.js","sourceRoot":"","sources":["../../src/sniffer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAE9C,qGAAqG;AAErG,IAAW,KAiEV;AAjED,WAAW,KAAK;IACZ,kFAAkF;IAClF,mCAAK,CAAA;IACL,kBAAkB;IAClB,uCAAO,CAAA;IACP,uCAAO,CAAA;IACP,iCAAI,CAAA;IACJ,aAAa;IACb,6DAAkB,CAAA;IAClB,uCAAO,CAAA;IACP,6DAAkB,CAAA;IAClB,0BAA0B;IAC1B,2CAAS,CAAA;IACT,wBAAwB;IACxB,mDAAa,CAAA;IACb,aAAa;IACb,6DAAkB,CAAA;IAClB,yBAAyB;IACzB,kDAAY,CAAA;IACZ,mBAAmB;IACnB,8CAAU,CAAA;IACV,kCAAkC;IAClC,gDAAW,CAAA;IACX,gCAAgC;IAChC,kDAAY,CAAA;IACZ,kBAAkB;IAClB,sDAAc,CAAA;IACd,kFAA4B,CAAA;IAC5B,gFAA2B,CAAA;IAC3B,4EAAyB,CAAA;IACzB,gEAAmB,CAAA;IACnB,0EAA0E;IAC1E,0CAAQ,CAAA;IAER,wDAAe,CAAA;IAEf;;;OAGG;IACH,gEAAmB,CAAA;IACnB,qCAAqC;IACrC,0EAAwB,CAAA;IACxB,gDAAW,CAAA;IACX,4DAAiB,CAAA;IACjB,4DAAiB,CAA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D,CAAC,AAz5BD,IAy5BC;;AAED,8CAA8C;AAC9C,MAAM,UAAU,WAAW,CACvB,MAAkB,EAClB,OAAwB;IAExB,IAAM,OAAO,GAAG,IAAI,OAAO,CAAC,OAAO,CAAC,CAAC;IACrC,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;IACtB,OAAO,OAAO,CAAC,QAAQ,CAAC;AAC5B,CAAC"} \ No newline at end of file diff --git a/node_modules/encoding-sniffer/node_modules/iconv-lite/encodings/dbcs-codec.js b/node_modules/encoding-sniffer/node_modules/iconv-lite/encodings/dbcs-codec.js deleted file mode 100644 index fa83917..0000000 --- a/node_modules/encoding-sniffer/node_modules/iconv-lite/encodings/dbcs-codec.js +++ /dev/null @@ -1,597 +0,0 @@ -"use strict"; -var Buffer = require("safer-buffer").Buffer; - -// Multibyte codec. In this scheme, a character is represented by 1 or more bytes. -// Our codec supports UTF-16 surrogates, extensions for GB18030 and unicode sequences. -// To save memory and loading time, we read table files only when requested. - -exports._dbcs = DBCSCodec; - -var UNASSIGNED = -1, - GB18030_CODE = -2, - SEQ_START = -10, - NODE_START = -1000, - UNASSIGNED_NODE = new Array(0x100), - DEF_CHAR = -1; - -for (var i = 0; i < 0x100; i++) - UNASSIGNED_NODE[i] = UNASSIGNED; - - -// Class DBCSCodec reads and initializes mapping tables. -function DBCSCodec(codecOptions, iconv) { - this.encodingName = codecOptions.encodingName; - if (!codecOptions) - throw new Error("DBCS codec is called without the data.") - if (!codecOptions.table) - throw new Error("Encoding '" + this.encodingName + "' has no data."); - - // Load tables. - var mappingTable = codecOptions.table(); - - - // Decode tables: MBCS -> Unicode. - - // decodeTables is a trie, encoded as an array of arrays of integers. Internal arrays are trie nodes and all have len = 256. - // Trie root is decodeTables[0]. - // Values: >= 0 -> unicode character code. can be > 0xFFFF - // == UNASSIGNED -> unknown/unassigned sequence. - // == GB18030_CODE -> this is the end of a GB18030 4-byte sequence. - // <= NODE_START -> index of the next node in our trie to process next byte. - // <= SEQ_START -> index of the start of a character code sequence, in decodeTableSeq. - this.decodeTables = []; - this.decodeTables[0] = UNASSIGNED_NODE.slice(0); // Create root node. - - // Sometimes a MBCS char corresponds to a sequence of unicode chars. We store them as arrays of integers here. - this.decodeTableSeq = []; - - // Actual mapping tables consist of chunks. Use them to fill up decode tables. - for (var i = 0; i < mappingTable.length; i++) - this._addDecodeChunk(mappingTable[i]); - - // Load & create GB18030 tables when needed. - if (typeof codecOptions.gb18030 === 'function') { - this.gb18030 = codecOptions.gb18030(); // Load GB18030 ranges. - - // Add GB18030 common decode nodes. - var commonThirdByteNodeIdx = this.decodeTables.length; - this.decodeTables.push(UNASSIGNED_NODE.slice(0)); - - var commonFourthByteNodeIdx = this.decodeTables.length; - this.decodeTables.push(UNASSIGNED_NODE.slice(0)); - - // Fill out the tree - var firstByteNode = this.decodeTables[0]; - for (var i = 0x81; i <= 0xFE; i++) { - var secondByteNode = this.decodeTables[NODE_START - firstByteNode[i]]; - for (var j = 0x30; j <= 0x39; j++) { - if (secondByteNode[j] === UNASSIGNED) { - secondByteNode[j] = NODE_START - commonThirdByteNodeIdx; - } else if (secondByteNode[j] > NODE_START) { - throw new Error("gb18030 decode tables conflict at byte 2"); - } - - var thirdByteNode = this.decodeTables[NODE_START - secondByteNode[j]]; - for (var k = 0x81; k <= 0xFE; k++) { - if (thirdByteNode[k] === UNASSIGNED) { - thirdByteNode[k] = NODE_START - commonFourthByteNodeIdx; - } else if (thirdByteNode[k] === NODE_START - commonFourthByteNodeIdx) { - continue; - } else if (thirdByteNode[k] > NODE_START) { - throw new Error("gb18030 decode tables conflict at byte 3"); - } - - var fourthByteNode = this.decodeTables[NODE_START - thirdByteNode[k]]; - for (var l = 0x30; l <= 0x39; l++) { - if (fourthByteNode[l] === UNASSIGNED) - fourthByteNode[l] = GB18030_CODE; - } - } - } - } - } - - this.defaultCharUnicode = iconv.defaultCharUnicode; - - - // Encode tables: Unicode -> DBCS. - - // `encodeTable` is array mapping from unicode char to encoded char. All its values are integers for performance. - // Because it can be sparse, it is represented as array of buckets by 256 chars each. Bucket can be null. - // Values: >= 0 -> it is a normal char. Write the value (if <=256 then 1 byte, if <=65536 then 2 bytes, etc.). - // == UNASSIGNED -> no conversion found. Output a default char. - // <= SEQ_START -> it's an index in encodeTableSeq, see below. The character starts a sequence. - this.encodeTable = []; - - // `encodeTableSeq` is used when a sequence of unicode characters is encoded as a single code. We use a tree of - // objects where keys correspond to characters in sequence and leafs are the encoded dbcs values. A special DEF_CHAR key - // means end of sequence (needed when one sequence is a strict subsequence of another). - // Objects are kept separately from encodeTable to increase performance. - this.encodeTableSeq = []; - - // Some chars can be decoded, but need not be encoded. - var skipEncodeChars = {}; - if (codecOptions.encodeSkipVals) - for (var i = 0; i < codecOptions.encodeSkipVals.length; i++) { - var val = codecOptions.encodeSkipVals[i]; - if (typeof val === 'number') - skipEncodeChars[val] = true; - else - for (var j = val.from; j <= val.to; j++) - skipEncodeChars[j] = true; - } - - // Use decode trie to recursively fill out encode tables. - this._fillEncodeTable(0, 0, skipEncodeChars); - - // Add more encoding pairs when needed. - if (codecOptions.encodeAdd) { - for (var uChar in codecOptions.encodeAdd) - if (Object.prototype.hasOwnProperty.call(codecOptions.encodeAdd, uChar)) - this._setEncodeChar(uChar.charCodeAt(0), codecOptions.encodeAdd[uChar]); - } - - this.defCharSB = this.encodeTable[0][iconv.defaultCharSingleByte.charCodeAt(0)]; - if (this.defCharSB === UNASSIGNED) this.defCharSB = this.encodeTable[0]['?']; - if (this.defCharSB === UNASSIGNED) this.defCharSB = "?".charCodeAt(0); -} - -DBCSCodec.prototype.encoder = DBCSEncoder; -DBCSCodec.prototype.decoder = DBCSDecoder; - -// Decoder helpers -DBCSCodec.prototype._getDecodeTrieNode = function(addr) { - var bytes = []; - for (; addr > 0; addr >>>= 8) - bytes.push(addr & 0xFF); - if (bytes.length == 0) - bytes.push(0); - - var node = this.decodeTables[0]; - for (var i = bytes.length-1; i > 0; i--) { // Traverse nodes deeper into the trie. - var val = node[bytes[i]]; - - if (val == UNASSIGNED) { // Create new node. - node[bytes[i]] = NODE_START - this.decodeTables.length; - this.decodeTables.push(node = UNASSIGNED_NODE.slice(0)); - } - else if (val <= NODE_START) { // Existing node. - node = this.decodeTables[NODE_START - val]; - } - else - throw new Error("Overwrite byte in " + this.encodingName + ", addr: " + addr.toString(16)); - } - return node; -} - - -DBCSCodec.prototype._addDecodeChunk = function(chunk) { - // First element of chunk is the hex mbcs code where we start. - var curAddr = parseInt(chunk[0], 16); - - // Choose the decoding node where we'll write our chars. - var writeTable = this._getDecodeTrieNode(curAddr); - curAddr = curAddr & 0xFF; - - // Write all other elements of the chunk to the table. - for (var k = 1; k < chunk.length; k++) { - var part = chunk[k]; - if (typeof part === "string") { // String, write as-is. - for (var l = 0; l < part.length;) { - var code = part.charCodeAt(l++); - if (0xD800 <= code && code < 0xDC00) { // Decode surrogate - var codeTrail = part.charCodeAt(l++); - if (0xDC00 <= codeTrail && codeTrail < 0xE000) - writeTable[curAddr++] = 0x10000 + (code - 0xD800) * 0x400 + (codeTrail - 0xDC00); - else - throw new Error("Incorrect surrogate pair in " + this.encodingName + " at chunk " + chunk[0]); - } - else if (0x0FF0 < code && code <= 0x0FFF) { // Character sequence (our own encoding used) - var len = 0xFFF - code + 2; - var seq = []; - for (var m = 0; m < len; m++) - seq.push(part.charCodeAt(l++)); // Simple variation: don't support surrogates or subsequences in seq. - - writeTable[curAddr++] = SEQ_START - this.decodeTableSeq.length; - this.decodeTableSeq.push(seq); - } - else - writeTable[curAddr++] = code; // Basic char - } - } - else if (typeof part === "number") { // Integer, meaning increasing sequence starting with prev character. - var charCode = writeTable[curAddr - 1] + 1; - for (var l = 0; l < part; l++) - writeTable[curAddr++] = charCode++; - } - else - throw new Error("Incorrect type '" + typeof part + "' given in " + this.encodingName + " at chunk " + chunk[0]); - } - if (curAddr > 0xFF) - throw new Error("Incorrect chunk in " + this.encodingName + " at addr " + chunk[0] + ": too long" + curAddr); -} - -// Encoder helpers -DBCSCodec.prototype._getEncodeBucket = function(uCode) { - var high = uCode >> 8; // This could be > 0xFF because of astral characters. - if (this.encodeTable[high] === undefined) - this.encodeTable[high] = UNASSIGNED_NODE.slice(0); // Create bucket on demand. - return this.encodeTable[high]; -} - -DBCSCodec.prototype._setEncodeChar = function(uCode, dbcsCode) { - var bucket = this._getEncodeBucket(uCode); - var low = uCode & 0xFF; - if (bucket[low] <= SEQ_START) - this.encodeTableSeq[SEQ_START-bucket[low]][DEF_CHAR] = dbcsCode; // There's already a sequence, set a single-char subsequence of it. - else if (bucket[low] == UNASSIGNED) - bucket[low] = dbcsCode; -} - -DBCSCodec.prototype._setEncodeSequence = function(seq, dbcsCode) { - - // Get the root of character tree according to first character of the sequence. - var uCode = seq[0]; - var bucket = this._getEncodeBucket(uCode); - var low = uCode & 0xFF; - - var node; - if (bucket[low] <= SEQ_START) { - // There's already a sequence with - use it. - node = this.encodeTableSeq[SEQ_START-bucket[low]]; - } - else { - // There was no sequence object - allocate a new one. - node = {}; - if (bucket[low] !== UNASSIGNED) node[DEF_CHAR] = bucket[low]; // If a char was set before - make it a single-char subsequence. - bucket[low] = SEQ_START - this.encodeTableSeq.length; - this.encodeTableSeq.push(node); - } - - // Traverse the character tree, allocating new nodes as needed. - for (var j = 1; j < seq.length-1; j++) { - var oldVal = node[uCode]; - if (typeof oldVal === 'object') - node = oldVal; - else { - node = node[uCode] = {} - if (oldVal !== undefined) - node[DEF_CHAR] = oldVal - } - } - - // Set the leaf to given dbcsCode. - uCode = seq[seq.length-1]; - node[uCode] = dbcsCode; -} - -DBCSCodec.prototype._fillEncodeTable = function(nodeIdx, prefix, skipEncodeChars) { - var node = this.decodeTables[nodeIdx]; - var hasValues = false; - var subNodeEmpty = {}; - for (var i = 0; i < 0x100; i++) { - var uCode = node[i]; - var mbCode = prefix + i; - if (skipEncodeChars[mbCode]) - continue; - - if (uCode >= 0) { - this._setEncodeChar(uCode, mbCode); - hasValues = true; - } else if (uCode <= NODE_START) { - var subNodeIdx = NODE_START - uCode; - if (!subNodeEmpty[subNodeIdx]) { // Skip empty subtrees (they are too large in gb18030). - var newPrefix = (mbCode << 8) >>> 0; // NOTE: '>>> 0' keeps 32-bit num positive. - if (this._fillEncodeTable(subNodeIdx, newPrefix, skipEncodeChars)) - hasValues = true; - else - subNodeEmpty[subNodeIdx] = true; - } - } else if (uCode <= SEQ_START) { - this._setEncodeSequence(this.decodeTableSeq[SEQ_START - uCode], mbCode); - hasValues = true; - } - } - return hasValues; -} - - - -// == Encoder ================================================================== - -function DBCSEncoder(options, codec) { - // Encoder state - this.leadSurrogate = -1; - this.seqObj = undefined; - - // Static data - this.encodeTable = codec.encodeTable; - this.encodeTableSeq = codec.encodeTableSeq; - this.defaultCharSingleByte = codec.defCharSB; - this.gb18030 = codec.gb18030; -} - -DBCSEncoder.prototype.write = function(str) { - var newBuf = Buffer.alloc(str.length * (this.gb18030 ? 4 : 3)), - leadSurrogate = this.leadSurrogate, - seqObj = this.seqObj, nextChar = -1, - i = 0, j = 0; - - while (true) { - // 0. Get next character. - if (nextChar === -1) { - if (i == str.length) break; - var uCode = str.charCodeAt(i++); - } - else { - var uCode = nextChar; - nextChar = -1; - } - - // 1. Handle surrogates. - if (0xD800 <= uCode && uCode < 0xE000) { // Char is one of surrogates. - if (uCode < 0xDC00) { // We've got lead surrogate. - if (leadSurrogate === -1) { - leadSurrogate = uCode; - continue; - } else { - leadSurrogate = uCode; - // Double lead surrogate found. - uCode = UNASSIGNED; - } - } else { // We've got trail surrogate. - if (leadSurrogate !== -1) { - uCode = 0x10000 + (leadSurrogate - 0xD800) * 0x400 + (uCode - 0xDC00); - leadSurrogate = -1; - } else { - // Incomplete surrogate pair - only trail surrogate found. - uCode = UNASSIGNED; - } - - } - } - else if (leadSurrogate !== -1) { - // Incomplete surrogate pair - only lead surrogate found. - nextChar = uCode; uCode = UNASSIGNED; // Write an error, then current char. - leadSurrogate = -1; - } - - // 2. Convert uCode character. - var dbcsCode = UNASSIGNED; - if (seqObj !== undefined && uCode != UNASSIGNED) { // We are in the middle of the sequence - var resCode = seqObj[uCode]; - if (typeof resCode === 'object') { // Sequence continues. - seqObj = resCode; - continue; - - } else if (typeof resCode == 'number') { // Sequence finished. Write it. - dbcsCode = resCode; - - } else if (resCode == undefined) { // Current character is not part of the sequence. - - // Try default character for this sequence - resCode = seqObj[DEF_CHAR]; - if (resCode !== undefined) { - dbcsCode = resCode; // Found. Write it. - nextChar = uCode; // Current character will be written too in the next iteration. - - } else { - // TODO: What if we have no default? (resCode == undefined) - // Then, we should write first char of the sequence as-is and try the rest recursively. - // Didn't do it for now because no encoding has this situation yet. - // Currently, just skip the sequence and write current char. - } - } - seqObj = undefined; - } - else if (uCode >= 0) { // Regular character - var subtable = this.encodeTable[uCode >> 8]; - if (subtable !== undefined) - dbcsCode = subtable[uCode & 0xFF]; - - if (dbcsCode <= SEQ_START) { // Sequence start - seqObj = this.encodeTableSeq[SEQ_START-dbcsCode]; - continue; - } - - if (dbcsCode == UNASSIGNED && this.gb18030) { - // Use GB18030 algorithm to find character(s) to write. - var idx = findIdx(this.gb18030.uChars, uCode); - if (idx != -1) { - var dbcsCode = this.gb18030.gbChars[idx] + (uCode - this.gb18030.uChars[idx]); - newBuf[j++] = 0x81 + Math.floor(dbcsCode / 12600); dbcsCode = dbcsCode % 12600; - newBuf[j++] = 0x30 + Math.floor(dbcsCode / 1260); dbcsCode = dbcsCode % 1260; - newBuf[j++] = 0x81 + Math.floor(dbcsCode / 10); dbcsCode = dbcsCode % 10; - newBuf[j++] = 0x30 + dbcsCode; - continue; - } - } - } - - // 3. Write dbcsCode character. - if (dbcsCode === UNASSIGNED) - dbcsCode = this.defaultCharSingleByte; - - if (dbcsCode < 0x100) { - newBuf[j++] = dbcsCode; - } - else if (dbcsCode < 0x10000) { - newBuf[j++] = dbcsCode >> 8; // high byte - newBuf[j++] = dbcsCode & 0xFF; // low byte - } - else if (dbcsCode < 0x1000000) { - newBuf[j++] = dbcsCode >> 16; - newBuf[j++] = (dbcsCode >> 8) & 0xFF; - newBuf[j++] = dbcsCode & 0xFF; - } else { - newBuf[j++] = dbcsCode >>> 24; - newBuf[j++] = (dbcsCode >>> 16) & 0xFF; - newBuf[j++] = (dbcsCode >>> 8) & 0xFF; - newBuf[j++] = dbcsCode & 0xFF; - } - } - - this.seqObj = seqObj; - this.leadSurrogate = leadSurrogate; - return newBuf.slice(0, j); -} - -DBCSEncoder.prototype.end = function() { - if (this.leadSurrogate === -1 && this.seqObj === undefined) - return; // All clean. Most often case. - - var newBuf = Buffer.alloc(10), j = 0; - - if (this.seqObj) { // We're in the sequence. - var dbcsCode = this.seqObj[DEF_CHAR]; - if (dbcsCode !== undefined) { // Write beginning of the sequence. - if (dbcsCode < 0x100) { - newBuf[j++] = dbcsCode; - } - else { - newBuf[j++] = dbcsCode >> 8; // high byte - newBuf[j++] = dbcsCode & 0xFF; // low byte - } - } else { - // See todo above. - } - this.seqObj = undefined; - } - - if (this.leadSurrogate !== -1) { - // Incomplete surrogate pair - only lead surrogate found. - newBuf[j++] = this.defaultCharSingleByte; - this.leadSurrogate = -1; - } - - return newBuf.slice(0, j); -} - -// Export for testing -DBCSEncoder.prototype.findIdx = findIdx; - - -// == Decoder ================================================================== - -function DBCSDecoder(options, codec) { - // Decoder state - this.nodeIdx = 0; - this.prevBytes = []; - - // Static data - this.decodeTables = codec.decodeTables; - this.decodeTableSeq = codec.decodeTableSeq; - this.defaultCharUnicode = codec.defaultCharUnicode; - this.gb18030 = codec.gb18030; -} - -DBCSDecoder.prototype.write = function(buf) { - var newBuf = Buffer.alloc(buf.length*2), - nodeIdx = this.nodeIdx, - prevBytes = this.prevBytes, prevOffset = this.prevBytes.length, - seqStart = -this.prevBytes.length, // idx of the start of current parsed sequence. - uCode; - - for (var i = 0, j = 0; i < buf.length; i++) { - var curByte = (i >= 0) ? buf[i] : prevBytes[i + prevOffset]; - - // Lookup in current trie node. - var uCode = this.decodeTables[nodeIdx][curByte]; - - if (uCode >= 0) { - // Normal character, just use it. - } - else if (uCode === UNASSIGNED) { // Unknown char. - // TODO: Callback with seq. - uCode = this.defaultCharUnicode.charCodeAt(0); - i = seqStart; // Skip one byte ('i' will be incremented by the for loop) and try to parse again. - } - else if (uCode === GB18030_CODE) { - if (i >= 3) { - var ptr = (buf[i-3]-0x81)*12600 + (buf[i-2]-0x30)*1260 + (buf[i-1]-0x81)*10 + (curByte-0x30); - } else { - var ptr = (prevBytes[i-3+prevOffset]-0x81)*12600 + - (((i-2 >= 0) ? buf[i-2] : prevBytes[i-2+prevOffset])-0x30)*1260 + - (((i-1 >= 0) ? buf[i-1] : prevBytes[i-1+prevOffset])-0x81)*10 + - (curByte-0x30); - } - var idx = findIdx(this.gb18030.gbChars, ptr); - uCode = this.gb18030.uChars[idx] + ptr - this.gb18030.gbChars[idx]; - } - else if (uCode <= NODE_START) { // Go to next trie node. - nodeIdx = NODE_START - uCode; - continue; - } - else if (uCode <= SEQ_START) { // Output a sequence of chars. - var seq = this.decodeTableSeq[SEQ_START - uCode]; - for (var k = 0; k < seq.length - 1; k++) { - uCode = seq[k]; - newBuf[j++] = uCode & 0xFF; - newBuf[j++] = uCode >> 8; - } - uCode = seq[seq.length-1]; - } - else - throw new Error("iconv-lite internal error: invalid decoding table value " + uCode + " at " + nodeIdx + "/" + curByte); - - // Write the character to buffer, handling higher planes using surrogate pair. - if (uCode >= 0x10000) { - uCode -= 0x10000; - var uCodeLead = 0xD800 | (uCode >> 10); - newBuf[j++] = uCodeLead & 0xFF; - newBuf[j++] = uCodeLead >> 8; - - uCode = 0xDC00 | (uCode & 0x3FF); - } - newBuf[j++] = uCode & 0xFF; - newBuf[j++] = uCode >> 8; - - // Reset trie node. - nodeIdx = 0; seqStart = i+1; - } - - this.nodeIdx = nodeIdx; - this.prevBytes = (seqStart >= 0) - ? Array.prototype.slice.call(buf, seqStart) - : prevBytes.slice(seqStart + prevOffset).concat(Array.prototype.slice.call(buf)); - - return newBuf.slice(0, j).toString('ucs2'); -} - -DBCSDecoder.prototype.end = function() { - var ret = ''; - - // Try to parse all remaining chars. - while (this.prevBytes.length > 0) { - // Skip 1 character in the buffer. - ret += this.defaultCharUnicode; - var bytesArr = this.prevBytes.slice(1); - - // Parse remaining as usual. - this.prevBytes = []; - this.nodeIdx = 0; - if (bytesArr.length > 0) - ret += this.write(bytesArr); - } - - this.prevBytes = []; - this.nodeIdx = 0; - return ret; -} - -// Binary search for GB18030. Returns largest i such that table[i] <= val. -function findIdx(table, val) { - if (table[0] > val) - return -1; - - var l = 0, r = table.length; - while (l < r-1) { // always table[l] <= val < table[r] - var mid = l + ((r-l+1) >> 1); - if (table[mid] <= val) - l = mid; - else - r = mid; - } - return l; -} - diff --git a/node_modules/encoding-sniffer/node_modules/iconv-lite/encodings/index.js b/node_modules/encoding-sniffer/node_modules/iconv-lite/encodings/index.js deleted file mode 100644 index d95c244..0000000 --- a/node_modules/encoding-sniffer/node_modules/iconv-lite/encodings/index.js +++ /dev/null @@ -1,23 +0,0 @@ -"use strict"; - -// Update this array if you add/rename/remove files in this directory. -// We support Browserify by skipping automatic module discovery and requiring modules directly. -var modules = [ - require("./internal"), - require("./utf32"), - require("./utf16"), - require("./utf7"), - require("./sbcs-codec"), - require("./sbcs-data"), - require("./sbcs-data-generated"), - require("./dbcs-codec"), - require("./dbcs-data"), -]; - -// Put all encoding/alias/codec definitions to single object and export it. -for (var i = 0; i < modules.length; i++) { - var module = modules[i]; - for (var enc in module) - if (Object.prototype.hasOwnProperty.call(module, enc)) - exports[enc] = module[enc]; -} diff --git a/node_modules/encoding-sniffer/node_modules/iconv-lite/encodings/internal.js b/node_modules/encoding-sniffer/node_modules/iconv-lite/encodings/internal.js deleted file mode 100644 index dc1074f..0000000 --- a/node_modules/encoding-sniffer/node_modules/iconv-lite/encodings/internal.js +++ /dev/null @@ -1,198 +0,0 @@ -"use strict"; -var Buffer = require("safer-buffer").Buffer; - -// Export Node.js internal encodings. - -module.exports = { - // Encodings - utf8: { type: "_internal", bomAware: true}, - cesu8: { type: "_internal", bomAware: true}, - unicode11utf8: "utf8", - - ucs2: { type: "_internal", bomAware: true}, - utf16le: "ucs2", - - binary: { type: "_internal" }, - base64: { type: "_internal" }, - hex: { type: "_internal" }, - - // Codec. - _internal: InternalCodec, -}; - -//------------------------------------------------------------------------------ - -function InternalCodec(codecOptions, iconv) { - this.enc = codecOptions.encodingName; - this.bomAware = codecOptions.bomAware; - - if (this.enc === "base64") - this.encoder = InternalEncoderBase64; - else if (this.enc === "cesu8") { - this.enc = "utf8"; // Use utf8 for decoding. - this.encoder = InternalEncoderCesu8; - - // Add decoder for versions of Node not supporting CESU-8 - if (Buffer.from('eda0bdedb2a9', 'hex').toString() !== '💩') { - this.decoder = InternalDecoderCesu8; - this.defaultCharUnicode = iconv.defaultCharUnicode; - } - } -} - -InternalCodec.prototype.encoder = InternalEncoder; -InternalCodec.prototype.decoder = InternalDecoder; - -//------------------------------------------------------------------------------ - -// We use node.js internal decoder. Its signature is the same as ours. -var StringDecoder = require('string_decoder').StringDecoder; - -if (!StringDecoder.prototype.end) // Node v0.8 doesn't have this method. - StringDecoder.prototype.end = function() {}; - - -function InternalDecoder(options, codec) { - this.decoder = new StringDecoder(codec.enc); -} - -InternalDecoder.prototype.write = function(buf) { - if (!Buffer.isBuffer(buf)) { - buf = Buffer.from(buf); - } - - return this.decoder.write(buf); -} - -InternalDecoder.prototype.end = function() { - return this.decoder.end(); -} - - -//------------------------------------------------------------------------------ -// Encoder is mostly trivial - -function InternalEncoder(options, codec) { - this.enc = codec.enc; -} - -InternalEncoder.prototype.write = function(str) { - return Buffer.from(str, this.enc); -} - -InternalEncoder.prototype.end = function() { -} - - -//------------------------------------------------------------------------------ -// Except base64 encoder, which must keep its state. - -function InternalEncoderBase64(options, codec) { - this.prevStr = ''; -} - -InternalEncoderBase64.prototype.write = function(str) { - str = this.prevStr + str; - var completeQuads = str.length - (str.length % 4); - this.prevStr = str.slice(completeQuads); - str = str.slice(0, completeQuads); - - return Buffer.from(str, "base64"); -} - -InternalEncoderBase64.prototype.end = function() { - return Buffer.from(this.prevStr, "base64"); -} - - -//------------------------------------------------------------------------------ -// CESU-8 encoder is also special. - -function InternalEncoderCesu8(options, codec) { -} - -InternalEncoderCesu8.prototype.write = function(str) { - var buf = Buffer.alloc(str.length * 3), bufIdx = 0; - for (var i = 0; i < str.length; i++) { - var charCode = str.charCodeAt(i); - // Naive implementation, but it works because CESU-8 is especially easy - // to convert from UTF-16 (which all JS strings are encoded in). - if (charCode < 0x80) - buf[bufIdx++] = charCode; - else if (charCode < 0x800) { - buf[bufIdx++] = 0xC0 + (charCode >>> 6); - buf[bufIdx++] = 0x80 + (charCode & 0x3f); - } - else { // charCode will always be < 0x10000 in javascript. - buf[bufIdx++] = 0xE0 + (charCode >>> 12); - buf[bufIdx++] = 0x80 + ((charCode >>> 6) & 0x3f); - buf[bufIdx++] = 0x80 + (charCode & 0x3f); - } - } - return buf.slice(0, bufIdx); -} - -InternalEncoderCesu8.prototype.end = function() { -} - -//------------------------------------------------------------------------------ -// CESU-8 decoder is not implemented in Node v4.0+ - -function InternalDecoderCesu8(options, codec) { - this.acc = 0; - this.contBytes = 0; - this.accBytes = 0; - this.defaultCharUnicode = codec.defaultCharUnicode; -} - -InternalDecoderCesu8.prototype.write = function(buf) { - var acc = this.acc, contBytes = this.contBytes, accBytes = this.accBytes, - res = ''; - for (var i = 0; i < buf.length; i++) { - var curByte = buf[i]; - if ((curByte & 0xC0) !== 0x80) { // Leading byte - if (contBytes > 0) { // Previous code is invalid - res += this.defaultCharUnicode; - contBytes = 0; - } - - if (curByte < 0x80) { // Single-byte code - res += String.fromCharCode(curByte); - } else if (curByte < 0xE0) { // Two-byte code - acc = curByte & 0x1F; - contBytes = 1; accBytes = 1; - } else if (curByte < 0xF0) { // Three-byte code - acc = curByte & 0x0F; - contBytes = 2; accBytes = 1; - } else { // Four or more are not supported for CESU-8. - res += this.defaultCharUnicode; - } - } else { // Continuation byte - if (contBytes > 0) { // We're waiting for it. - acc = (acc << 6) | (curByte & 0x3f); - contBytes--; accBytes++; - if (contBytes === 0) { - // Check for overlong encoding, but support Modified UTF-8 (encoding NULL as C0 80) - if (accBytes === 2 && acc < 0x80 && acc > 0) - res += this.defaultCharUnicode; - else if (accBytes === 3 && acc < 0x800) - res += this.defaultCharUnicode; - else - // Actually add character. - res += String.fromCharCode(acc); - } - } else { // Unexpected continuation byte - res += this.defaultCharUnicode; - } - } - } - this.acc = acc; this.contBytes = contBytes; this.accBytes = accBytes; - return res; -} - -InternalDecoderCesu8.prototype.end = function() { - var res = 0; - if (this.contBytes > 0) - res += this.defaultCharUnicode; - return res; -} diff --git a/node_modules/encoding-sniffer/node_modules/iconv-lite/encodings/tables/gbk-added.json b/node_modules/encoding-sniffer/node_modules/iconv-lite/encodings/tables/gbk-added.json deleted file mode 100644 index b742e36..0000000 --- a/node_modules/encoding-sniffer/node_modules/iconv-lite/encodings/tables/gbk-added.json +++ /dev/null @@ -1,56 +0,0 @@ -[ -["a140","",62], -["a180","",32], -["a240","",62], -["a280","",32], -["a2ab","",5], -["a2e3","€"], -["a2ef",""], -["a2fd",""], -["a340","",62], -["a380","",31," "], -["a440","",62], -["a480","",32], -["a4f4","",10], -["a540","",62], -["a580","",32], -["a5f7","",7], -["a640","",62], -["a680","",32], -["a6b9","",7], -["a6d9","",6], -["a6ec",""], -["a6f3",""], -["a6f6","",8], -["a740","",62], -["a780","",32], -["a7c2","",14], -["a7f2","",12], -["a896","",10], -["a8bc","ḿ"], -["a8bf","ǹ"], -["a8c1",""], -["a8ea","",20], -["a958",""], -["a95b",""], -["a95d",""], -["a989","〾⿰",11], -["a997","",12], -["a9f0","",14], -["aaa1","",93], -["aba1","",93], -["aca1","",93], -["ada1","",93], -["aea1","",93], -["afa1","",93], -["d7fa","",4], -["f8a1","",93], -["f9a1","",93], -["faa1","",93], -["fba1","",93], -["fca1","",93], -["fda1","",93], -["fe50","⺁⺄㑳㑇⺈⺋㖞㘚㘎⺌⺗㥮㤘㧏㧟㩳㧐㭎㱮㳠⺧⺪䁖䅟⺮䌷⺳⺶⺷䎱䎬⺻䏝䓖䙡䙌"], -["fe80","䜣䜩䝼䞍⻊䥇䥺䥽䦂䦃䦅䦆䦟䦛䦷䦶䲣䲟䲠䲡䱷䲢䴓",6,"䶮",93], -["8135f437",""] -] diff --git a/node_modules/encoding-sniffer/node_modules/iconv-lite/lib/index.d.ts b/node_modules/encoding-sniffer/node_modules/iconv-lite/lib/index.d.ts deleted file mode 100644 index 99f200f..0000000 --- a/node_modules/encoding-sniffer/node_modules/iconv-lite/lib/index.d.ts +++ /dev/null @@ -1,41 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - * REQUIREMENT: This definition is dependent on the @types/node definition. - * Install with `npm install @types/node --save-dev` - *--------------------------------------------------------------------------------------------*/ - -declare module 'iconv-lite' { - // Basic API - export function decode(buffer: Buffer, encoding: string, options?: Options): string; - - export function encode(content: string, encoding: string, options?: Options): Buffer; - - export function encodingExists(encoding: string): boolean; - - // Stream API - export function decodeStream(encoding: string, options?: Options): NodeJS.ReadWriteStream; - - export function encodeStream(encoding: string, options?: Options): NodeJS.ReadWriteStream; - - // Low-level stream APIs - export function getEncoder(encoding: string, options?: Options): EncoderStream; - - export function getDecoder(encoding: string, options?: Options): DecoderStream; -} - -export interface Options { - stripBOM?: boolean; - addBOM?: boolean; - defaultEncoding?: string; -} - -export interface EncoderStream { - write(str: string): Buffer; - end(): Buffer | undefined; -} - -export interface DecoderStream { - write(buf: Buffer): string; - end(): string | undefined; -} diff --git a/node_modules/encoding-sniffer/node_modules/iconv-lite/lib/index.js b/node_modules/encoding-sniffer/node_modules/iconv-lite/lib/index.js deleted file mode 100644 index 657701c..0000000 --- a/node_modules/encoding-sniffer/node_modules/iconv-lite/lib/index.js +++ /dev/null @@ -1,180 +0,0 @@ -"use strict"; - -var Buffer = require("safer-buffer").Buffer; - -var bomHandling = require("./bom-handling"), - iconv = module.exports; - -// All codecs and aliases are kept here, keyed by encoding name/alias. -// They are lazy loaded in `iconv.getCodec` from `encodings/index.js`. -iconv.encodings = null; - -// Characters emitted in case of error. -iconv.defaultCharUnicode = '�'; -iconv.defaultCharSingleByte = '?'; - -// Public API. -iconv.encode = function encode(str, encoding, options) { - str = "" + (str || ""); // Ensure string. - - var encoder = iconv.getEncoder(encoding, options); - - var res = encoder.write(str); - var trail = encoder.end(); - - return (trail && trail.length > 0) ? Buffer.concat([res, trail]) : res; -} - -iconv.decode = function decode(buf, encoding, options) { - if (typeof buf === 'string') { - if (!iconv.skipDecodeWarning) { - console.error('Iconv-lite warning: decode()-ing strings is deprecated. Refer to https://github.com/ashtuchkin/iconv-lite/wiki/Use-Buffers-when-decoding'); - iconv.skipDecodeWarning = true; - } - - buf = Buffer.from("" + (buf || ""), "binary"); // Ensure buffer. - } - - var decoder = iconv.getDecoder(encoding, options); - - var res = decoder.write(buf); - var trail = decoder.end(); - - return trail ? (res + trail) : res; -} - -iconv.encodingExists = function encodingExists(enc) { - try { - iconv.getCodec(enc); - return true; - } catch (e) { - return false; - } -} - -// Legacy aliases to convert functions -iconv.toEncoding = iconv.encode; -iconv.fromEncoding = iconv.decode; - -// Search for a codec in iconv.encodings. Cache codec data in iconv._codecDataCache. -iconv._codecDataCache = {}; -iconv.getCodec = function getCodec(encoding) { - if (!iconv.encodings) - iconv.encodings = require("../encodings"); // Lazy load all encoding definitions. - - // Canonicalize encoding name: strip all non-alphanumeric chars and appended year. - var enc = iconv._canonicalizeEncoding(encoding); - - // Traverse iconv.encodings to find actual codec. - var codecOptions = {}; - while (true) { - var codec = iconv._codecDataCache[enc]; - if (codec) - return codec; - - var codecDef = iconv.encodings[enc]; - - switch (typeof codecDef) { - case "string": // Direct alias to other encoding. - enc = codecDef; - break; - - case "object": // Alias with options. Can be layered. - for (var key in codecDef) - codecOptions[key] = codecDef[key]; - - if (!codecOptions.encodingName) - codecOptions.encodingName = enc; - - enc = codecDef.type; - break; - - case "function": // Codec itself. - if (!codecOptions.encodingName) - codecOptions.encodingName = enc; - - // The codec function must load all tables and return object with .encoder and .decoder methods. - // It'll be called only once (for each different options object). - codec = new codecDef(codecOptions, iconv); - - iconv._codecDataCache[codecOptions.encodingName] = codec; // Save it to be reused later. - return codec; - - default: - throw new Error("Encoding not recognized: '" + encoding + "' (searched as: '"+enc+"')"); - } - } -} - -iconv._canonicalizeEncoding = function(encoding) { - // Canonicalize encoding name: strip all non-alphanumeric chars and appended year. - return (''+encoding).toLowerCase().replace(/:\d{4}$|[^0-9a-z]/g, ""); -} - -iconv.getEncoder = function getEncoder(encoding, options) { - var codec = iconv.getCodec(encoding), - encoder = new codec.encoder(options, codec); - - if (codec.bomAware && options && options.addBOM) - encoder = new bomHandling.PrependBOM(encoder, options); - - return encoder; -} - -iconv.getDecoder = function getDecoder(encoding, options) { - var codec = iconv.getCodec(encoding), - decoder = new codec.decoder(options, codec); - - if (codec.bomAware && !(options && options.stripBOM === false)) - decoder = new bomHandling.StripBOM(decoder, options); - - return decoder; -} - -// Streaming API -// NOTE: Streaming API naturally depends on 'stream' module from Node.js. Unfortunately in browser environments this module can add -// up to 100Kb to the output bundle. To avoid unnecessary code bloat, we don't enable Streaming API in browser by default. -// If you would like to enable it explicitly, please add the following code to your app: -// > iconv.enableStreamingAPI(require('stream')); -iconv.enableStreamingAPI = function enableStreamingAPI(stream_module) { - if (iconv.supportsStreams) - return; - - // Dependency-inject stream module to create IconvLite stream classes. - var streams = require("./streams")(stream_module); - - // Not public API yet, but expose the stream classes. - iconv.IconvLiteEncoderStream = streams.IconvLiteEncoderStream; - iconv.IconvLiteDecoderStream = streams.IconvLiteDecoderStream; - - // Streaming API. - iconv.encodeStream = function encodeStream(encoding, options) { - return new iconv.IconvLiteEncoderStream(iconv.getEncoder(encoding, options), options); - } - - iconv.decodeStream = function decodeStream(encoding, options) { - return new iconv.IconvLiteDecoderStream(iconv.getDecoder(encoding, options), options); - } - - iconv.supportsStreams = true; -} - -// Enable Streaming API automatically if 'stream' module is available and non-empty (the majority of environments). -var stream_module; -try { - stream_module = require("stream"); -} catch (e) {} - -if (stream_module && stream_module.Transform) { - iconv.enableStreamingAPI(stream_module); - -} else { - // In rare cases where 'stream' module is not available by default, throw a helpful exception. - iconv.encodeStream = iconv.decodeStream = function() { - throw new Error("iconv-lite Streaming API is not enabled. Use iconv.enableStreamingAPI(require('stream')); to enable it."); - }; -} - -if ("Ā" != "\u0100") { - console.error("iconv-lite warning: js files use non-utf8 encoding. See https://github.com/ashtuchkin/iconv-lite/wiki/Javascript-source-file-encodings for more info."); -} diff --git a/node_modules/encoding-sniffer/node_modules/iconv-lite/lib/streams.js b/node_modules/encoding-sniffer/node_modules/iconv-lite/lib/streams.js deleted file mode 100644 index a150648..0000000 --- a/node_modules/encoding-sniffer/node_modules/iconv-lite/lib/streams.js +++ /dev/null @@ -1,109 +0,0 @@ -"use strict"; - -var Buffer = require("safer-buffer").Buffer; - -// NOTE: Due to 'stream' module being pretty large (~100Kb, significant in browser environments), -// we opt to dependency-inject it instead of creating a hard dependency. -module.exports = function(stream_module) { - var Transform = stream_module.Transform; - - // == Encoder stream ======================================================= - - function IconvLiteEncoderStream(conv, options) { - this.conv = conv; - options = options || {}; - options.decodeStrings = false; // We accept only strings, so we don't need to decode them. - Transform.call(this, options); - } - - IconvLiteEncoderStream.prototype = Object.create(Transform.prototype, { - constructor: { value: IconvLiteEncoderStream } - }); - - IconvLiteEncoderStream.prototype._transform = function(chunk, encoding, done) { - if (typeof chunk != 'string') - return done(new Error("Iconv encoding stream needs strings as its input.")); - try { - var res = this.conv.write(chunk); - if (res && res.length) this.push(res); - done(); - } - catch (e) { - done(e); - } - } - - IconvLiteEncoderStream.prototype._flush = function(done) { - try { - var res = this.conv.end(); - if (res && res.length) this.push(res); - done(); - } - catch (e) { - done(e); - } - } - - IconvLiteEncoderStream.prototype.collect = function(cb) { - var chunks = []; - this.on('error', cb); - this.on('data', function(chunk) { chunks.push(chunk); }); - this.on('end', function() { - cb(null, Buffer.concat(chunks)); - }); - return this; - } - - - // == Decoder stream ======================================================= - - function IconvLiteDecoderStream(conv, options) { - this.conv = conv; - options = options || {}; - options.encoding = this.encoding = 'utf8'; // We output strings. - Transform.call(this, options); - } - - IconvLiteDecoderStream.prototype = Object.create(Transform.prototype, { - constructor: { value: IconvLiteDecoderStream } - }); - - IconvLiteDecoderStream.prototype._transform = function(chunk, encoding, done) { - if (!Buffer.isBuffer(chunk) && !(chunk instanceof Uint8Array)) - return done(new Error("Iconv decoding stream needs buffers as its input.")); - try { - var res = this.conv.write(chunk); - if (res && res.length) this.push(res, this.encoding); - done(); - } - catch (e) { - done(e); - } - } - - IconvLiteDecoderStream.prototype._flush = function(done) { - try { - var res = this.conv.end(); - if (res && res.length) this.push(res, this.encoding); - done(); - } - catch (e) { - done(e); - } - } - - IconvLiteDecoderStream.prototype.collect = function(cb) { - var res = ''; - this.on('error', cb); - this.on('data', function(chunk) { res += chunk; }); - this.on('end', function() { - cb(null, res); - }); - return this; - } - - return { - IconvLiteEncoderStream: IconvLiteEncoderStream, - IconvLiteDecoderStream: IconvLiteDecoderStream, - }; -}; diff --git a/node_modules/encoding-sniffer/package.json b/node_modules/encoding-sniffer/package.json deleted file mode 100644 index ce9cbe5..0000000 --- a/node_modules/encoding-sniffer/package.json +++ /dev/null @@ -1,108 +0,0 @@ -{ - "name": "encoding-sniffer", - "version": "0.2.0", - "description": "Implementation of the HTML encoding sniffer algo, with stream support", - "bugs": { - "url": "https://github.com/fb55/encoding-sniffer/issues" - }, - "repository": { - "type": "git", - "url": "git://github.com/fb55/encoding-sniffer.git" - }, - "funding": "https://github.com/fb55/encoding-sniffer?sponsor=1", - "license": "MIT", - "author": "Felix Boehm <me@feedic.com>", - "type": "module", - "exports": { - ".": { - "import": { - "source": "./src/index.ts", - "types": "./dist/esm/index.d.ts", - "default": "./dist/esm/index.js" - }, - "require": { - "source": "./src/index.ts", - "types": "./dist/commonjs/index.d.ts", - "default": "./dist/commonjs/index.js" - } - }, - "./sniffer": { - "import": { - "source": "./src/sniffer.ts", - "types": "./dist/esm/sniffer.d.ts", - "default": "./dist/esm/sniffer.js" - }, - "require": { - "source": "./src/sniffer.ts", - "types": "./dist/commonjs/sniffer.d.ts", - "default": "./dist/commonjs/sniffer.js" - } - } - }, - "main": "./dist/commonjs/index.js", - "types": "./dist/commonjs/index.d.ts", - "files": [ - "dist" - ], - "scripts": { - "build": "tshy", - "build:docs": "typedoc --hideGenerator src/index.ts", - "format": "npm run format:es && npm run format:prettier", - "format:es": "npm run lint:es -- --fix", - "format:prettier": "npm run prettier -- --write", - "lint": "npm run lint:es && npm run lint:prettier", - "lint:es": "eslint --ignore-path .gitignore .", - "lint:prettier": "npm run prettier -- --check", - "make-cjs": "sed -i '' 's/\"type\": \"module\"/\"type\": \"commonjs\"/g' package.json", - "make-esm": "sed -i '' 's/\"type\": \"commonjs\"/\"type\": \"module\"/g' package.json", - "prepublishOnly": "npm run build", - "prettier": "prettier '**/*.{ts,md,json,yml}'", - "test": "npm run test:jest && npm run lint", - "test:jest": "jest" - }, - "prettier": { - "proseWrap": "always", - "tabWidth": 4 - }, - "jest": { - "coverageProvider": "v8", - "moduleNameMapper": { - "^(.*)\\.js$": [ - "$1", - "$1.js" - ] - }, - "preset": "ts-jest", - "testEnvironment": "node" - }, - "dependencies": { - "iconv-lite": "^0.6.3", - "whatwg-encoding": "^3.1.1" - }, - "devDependencies": { - "@types/jest": "^29.5.12", - "@types/node": "^20.14.2", - "@types/whatwg-encoding": "^2.0.3", - "@typescript-eslint/eslint-plugin": "^7.13.0", - "@typescript-eslint/parser": "^7.13.0", - "eslint": "^8.57.0", - "eslint-config-prettier": "^9.1.0", - "eslint-plugin-n": "^17.9.0", - "eslint-plugin-unicorn": "^54.0.0", - "jest": "^29.7.0", - "prettier": "^3.3.2", - "ts-jest": "^29.1.4", - "tshy": "^1.15.1", - "typedoc": "^0.25.13", - "typescript": "^5.4.5" - }, - "tshy": { - "exports": { - ".": "./src/index.ts", - "./sniffer": "./src/sniffer.ts" - }, - "exclude": [ - "src/**/*.spec.ts" - ] - } -} diff --git a/node_modules/entities/lib/decode.d.ts b/node_modules/entities/lib/decode.d.ts deleted file mode 100644 index ccfd9fb..0000000 --- a/node_modules/entities/lib/decode.d.ts +++ /dev/null @@ -1,211 +0,0 @@ -import htmlDecodeTree from "./generated/decode-data-html.js"; -import xmlDecodeTree from "./generated/decode-data-xml.js"; -import decodeCodePoint from "./decode_codepoint.js"; -export { htmlDecodeTree, xmlDecodeTree, decodeCodePoint }; -export { replaceCodePoint, fromCodePoint } from "./decode_codepoint.js"; -export declare enum BinTrieFlags { - VALUE_LENGTH = 49152, - BRANCH_LENGTH = 16256, - JUMP_TABLE = 127 -} -export declare enum DecodingMode { - /** Entities in text nodes that can end with any character. */ - Legacy = 0, - /** Only allow entities terminated with a semicolon. */ - Strict = 1, - /** Entities in attributes have limitations on ending characters. */ - Attribute = 2 -} -/** - * Producers for character reference errors as defined in the HTML spec. - */ -export interface EntityErrorProducer { - missingSemicolonAfterCharacterReference(): void; - absenceOfDigitsInNumericCharacterReference(consumedCharacters: number): void; - validateNumericCharacterReference(code: number): void; -} -/** - * Token decoder with support of writing partial entities. - */ -export declare class EntityDecoder { - /** The tree used to decode entities. */ - private readonly decodeTree; - /** - * The function that is called when a codepoint is decoded. - * - * For multi-byte named entities, this will be called multiple times, - * with the second codepoint, and the same `consumed` value. - * - * @param codepoint The decoded codepoint. - * @param consumed The number of bytes consumed by the decoder. - */ - private readonly emitCodePoint; - /** An object that is used to produce errors. */ - private readonly errors?; - constructor( - /** The tree used to decode entities. */ - decodeTree: Uint16Array, - /** - * The function that is called when a codepoint is decoded. - * - * For multi-byte named entities, this will be called multiple times, - * with the second codepoint, and the same `consumed` value. - * - * @param codepoint The decoded codepoint. - * @param consumed The number of bytes consumed by the decoder. - */ - emitCodePoint: (cp: number, consumed: number) => void, - /** An object that is used to produce errors. */ - errors?: EntityErrorProducer | undefined); - /** The current state of the decoder. */ - private state; - /** Characters that were consumed while parsing an entity. */ - private consumed; - /** - * The result of the entity. - * - * Either the result index of a numeric entity, or the codepoint of a - * numeric entity. - */ - private result; - /** The current index in the decode tree. */ - private treeIndex; - /** The number of characters that were consumed in excess. */ - private excess; - /** The mode in which the decoder is operating. */ - private decodeMode; - /** Resets the instance to make it reusable. */ - startEntity(decodeMode: DecodingMode): void; - /** - * Write an entity to the decoder. This can be called multiple times with partial entities. - * If the entity is incomplete, the decoder will return -1. - * - * Mirrors the implementation of `getDecoder`, but with the ability to stop decoding if the - * entity is incomplete, and resume when the next string is written. - * - * @param string The string containing the entity (or a continuation of the entity). - * @param offset The offset at which the entity begins. Should be 0 if this is not the first call. - * @returns The number of characters that were consumed, or -1 if the entity is incomplete. - */ - write(str: string, offset: number): number; - /** - * Switches between the numeric decimal and hexadecimal states. - * - * Equivalent to the `Numeric character reference state` in the HTML spec. - * - * @param str The string containing the entity (or a continuation of the entity). - * @param offset The current offset. - * @returns The number of characters that were consumed, or -1 if the entity is incomplete. - */ - private stateNumericStart; - private addToNumericResult; - /** - * Parses a hexadecimal numeric entity. - * - * Equivalent to the `Hexademical character reference state` in the HTML spec. - * - * @param str The string containing the entity (or a continuation of the entity). - * @param offset The current offset. - * @returns The number of characters that were consumed, or -1 if the entity is incomplete. - */ - private stateNumericHex; - /** - * Parses a decimal numeric entity. - * - * Equivalent to the `Decimal character reference state` in the HTML spec. - * - * @param str The string containing the entity (or a continuation of the entity). - * @param offset The current offset. - * @returns The number of characters that were consumed, or -1 if the entity is incomplete. - */ - private stateNumericDecimal; - /** - * Validate and emit a numeric entity. - * - * Implements the logic from the `Hexademical character reference start - * state` and `Numeric character reference end state` in the HTML spec. - * - * @param lastCp The last code point of the entity. Used to see if the - * entity was terminated with a semicolon. - * @param expectedLength The minimum number of characters that should be - * consumed. Used to validate that at least one digit - * was consumed. - * @returns The number of characters that were consumed. - */ - private emitNumericEntity; - /** - * Parses a named entity. - * - * Equivalent to the `Named character reference state` in the HTML spec. - * - * @param str The string containing the entity (or a continuation of the entity). - * @param offset The current offset. - * @returns The number of characters that were consumed, or -1 if the entity is incomplete. - */ - private stateNamedEntity; - /** - * Emit a named entity that was not terminated with a semicolon. - * - * @returns The number of characters consumed. - */ - private emitNotTerminatedNamedEntity; - /** - * Emit a named entity. - * - * @param result The index of the entity in the decode tree. - * @param valueLength The number of bytes in the entity. - * @param consumed The number of characters consumed. - * - * @returns The number of characters consumed. - */ - private emitNamedEntityData; - /** - * Signal to the parser that the end of the input was reached. - * - * Remaining data will be emitted and relevant errors will be produced. - * - * @returns The number of characters consumed. - */ - end(): number; -} -/** - * Determines the branch of the current node that is taken given the current - * character. This function is used to traverse the trie. - * - * @param decodeTree The trie. - * @param current The current node. - * @param nodeIdx The index right after the current node and its value. - * @param char The current character. - * @returns The index of the next node, or -1 if no branch is taken. - */ -export declare function determineBranch(decodeTree: Uint16Array, current: number, nodeIdx: number, char: number): number; -/** - * Decodes an HTML string. - * - * @param str The string to decode. - * @param mode The decoding mode. - * @returns The decoded string. - */ -export declare function decodeHTML(str: string, mode?: DecodingMode): string; -/** - * Decodes an HTML string in an attribute. - * - * @param str The string to decode. - * @returns The decoded string. - */ -export declare function decodeHTMLAttribute(str: string): string; -/** - * Decodes an HTML string, requiring all entities to be terminated by a semicolon. - * - * @param str The string to decode. - * @returns The decoded string. - */ -export declare function decodeHTMLStrict(str: string): string; -/** - * Decodes an XML string, requiring all entities to be terminated by a semicolon. - * - * @param str The string to decode. - * @returns The decoded string. - */ -export declare function decodeXML(str: string): string; -//# sourceMappingURL=decode.d.ts.map \ No newline at end of file diff --git a/node_modules/entities/lib/decode.d.ts.map b/node_modules/entities/lib/decode.d.ts.map deleted file mode 100644 index 4c0b4b4..0000000 --- a/node_modules/entities/lib/decode.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"decode.d.ts","sourceRoot":"https://raw.githubusercontent.com/fb55/entities/61afd4701eaa736978b13c7351cd3de9a96b04bc/src/","sources":["decode.ts"],"names":[],"mappings":"AAAA,OAAO,cAAc,MAAM,iCAA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nB,kDAAkD;IAClD,OAAO,CAAC,UAAU,CAAuB;IAEzC,+CAA+C;IAC/C,WAAW,CAAC,UAAU,EAAE,YAAY,GAAG,IAAI;IAS3C;;;;;;;;;;OAUG;IACH,KAAK,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM;IA8B1C;;;;;;;;OAQG;IACH,OAAO,CAAC,iBAAiB;IAezB,OAAO,CAAC,kBAAkB;IAe1B;;;;;;;;OAQG;IACH,OAAO,CAAC,eAAe;IAkBvB;;;;;;;;OAQG;IACH,OAAO,CAAC,mBAAmB;IAkB3B;;;;;;;;;;;;OAYG;IACH,OAAO,CAAC,iBAAiB;IA6BzB;;;;;;;;OAQG;IACH,OAAO,CAAC,gBAAgB;IAsDxB;;;;OAIG;IACH,OAAO,CAAC,4BAA4B;IAYpC;;;;;;;;OAQG;IACH,OAAO,CAAC,mBAAmB;IAqB3B;;;;;;OAMG;IACH,GAAG,IAAI,MAAM;CA6BhB;AAoDD;;;;;;;;;GASG;AACH,wBAAgB,eAAe,CAC3B,UAAU,EAAE,WAAW,EACvB,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,MAAM,EACf,IAAI,EAAE,MAAM,GACb,MAAM,CAsCR;AAKD;;;;;;GAMG;AACH,wBAAgB,UAAU,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,eAAsB,GAAG,MAAM,CAE1E;AAED;;;;;GAKG;AACH,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAEvD;AAED;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAEpD;AAED;;;;;GAKG;AACH,wBAAgB,SAAS,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAE7C"} \ No newline at end of file diff --git a/node_modules/entities/lib/decode.js b/node_modules/entities/lib/decode.js deleted file mode 100644 index aa4a42c..0000000 --- a/node_modules/entities/lib/decode.js +++ /dev/null @@ -1,536 +0,0 @@ -"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 __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}); -var __importStar = (this && this.__importStar) || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; -}; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.decodeXML = exports.decodeHTMLStrict = exports.decodeHTMLAttribute = exports.decodeHTML = exports.determineBranch = exports.EntityDecoder = exports.DecodingMode = exports.BinTrieFlags = exports.fromCodePoint = exports.replaceCodePoint = exports.decodeCodePoint = exports.xmlDecodeTree = exports.htmlDecodeTree = void 0; -var decode_data_html_js_1 = __importDefault(require("./generated/decode-data-html.js")); -exports.htmlDecodeTree = decode_data_html_js_1.default; -var decode_data_xml_js_1 = __importDefault(require("./generated/decode-data-xml.js")); -exports.xmlDecodeTree = decode_data_xml_js_1.default; -var decode_codepoint_js_1 = __importStar(require("./decode_codepoint.js")); -exports.decodeCodePoint = decode_codepoint_js_1.default; -var decode_codepoint_js_2 = require("./decode_codepoint.js"); -Object.defineProperty(exports, "replaceCodePoint", { enumerable: true, get: function () { return decode_codepoint_js_2.replaceCodePoint; } }); -Object.defineProperty(exports, "fromCodePoint", { enumerable: true, get: function () { return decode_codepoint_js_2.fromCodePoint; } }); -var CharCodes; -(function (CharCodes) { - CharCodes[CharCodes["NUM"] = 35] = "NUM"; - CharCodes[CharCodes["SEMI"] = 59] = "SEMI"; - CharCodes[CharCodes["EQUALS"] = 61] = "EQUALS"; - CharCodes[CharCodes["ZERO"] = 48] = "ZERO"; - CharCodes[CharCodes["NINE"] = 57] = "NINE"; - CharCodes[CharCodes["LOWER_A"] = 97] = "LOWER_A"; - CharCodes[CharCodes["LOWER_F"] = 102] = "LOWER_F"; - CharCodes[CharCodes["LOWER_X"] = 120] = "LOWER_X"; - CharCodes[CharCodes["LOWER_Z"] = 122] = "LOWER_Z"; - CharCodes[CharCodes["UPPER_A"] = 65] = "UPPER_A"; - CharCodes[CharCodes["UPPER_F"] = 70] = "UPPER_F"; - CharCodes[CharCodes["UPPER_Z"] = 90] = "UPPER_Z"; -})(CharCodes || (CharCodes = {})); -/** Bit that needs to be set to convert an upper case ASCII character to lower case */ -var TO_LOWER_BIT = 32; -var BinTrieFlags; -(function (BinTrieFlags) { - BinTrieFlags[BinTrieFlags["VALUE_LENGTH"] = 49152] = "VALUE_LENGTH"; - BinTrieFlags[BinTrieFlags["BRANCH_LENGTH"] = 16256] = "BRANCH_LENGTH"; - BinTrieFlags[BinTrieFlags["JUMP_TABLE"] = 127] = "JUMP_TABLE"; -})(BinTrieFlags = exports.BinTrieFlags || (exports.BinTrieFlags = {})); -function isNumber(code) { - return code >= CharCodes.ZERO && code <= CharCodes.NINE; -} -function isHexadecimalCharacter(code) { - return ((code >= CharCodes.UPPER_A && code <= CharCodes.UPPER_F) || - (code >= CharCodes.LOWER_A && code <= CharCodes.LOWER_F)); -} -function isAsciiAlphaNumeric(code) { - return ((code >= CharCodes.UPPER_A && code <= CharCodes.UPPER_Z) || - (code >= CharCodes.LOWER_A && code <= CharCodes.LOWER_Z) || - isNumber(code)); -} -/** - * Checks if the given character is a valid end character for an entity in an attribute. - * - * Attribute values that aren't terminated properly aren't parsed, and shouldn't lead to a parser error. - * See the example in https://html.spec.whatwg.org/multipage/parsing.html#named-character-reference-state - */ -function isEntityInAttributeInvalidEnd(code) { - return code === CharCodes.EQUALS || isAsciiAlphaNumeric(code); -} -var EntityDecoderState; -(function (EntityDecoderState) { - EntityDecoderState[EntityDecoderState["EntityStart"] = 0] = "EntityStart"; - EntityDecoderState[EntityDecoderState["NumericStart"] = 1] = "NumericStart"; - EntityDecoderState[EntityDecoderState["NumericDecimal"] = 2] = "NumericDecimal"; - EntityDecoderState[EntityDecoderState["NumericHex"] = 3] = "NumericHex"; - EntityDecoderState[EntityDecoderState["NamedEntity"] = 4] = "NamedEntity"; -})(EntityDecoderState || (EntityDecoderState = {})); -var DecodingMode; -(function (DecodingMode) { - /** Entities in text nodes that can end with any character. */ - DecodingMode[DecodingMode["Legacy"] = 0] = "Legacy"; - /** Only allow entities terminated with a semicolon. */ - DecodingMode[DecodingMode["Strict"] = 1] = "Strict"; - /** Entities in attributes have limitations on ending characters. */ - DecodingMode[DecodingMode["Attribute"] = 2] = "Attribute"; -})(DecodingMode = exports.DecodingMode || (exports.DecodingMode = {})); -/** - * Token decoder with support of writing partial entities. - */ -var EntityDecoder = /** @class */ (function () { - function EntityDecoder( - /** The tree used to decode entities. */ - decodeTree, - /** - * The function that is called when a codepoint is decoded. - * - * For multi-byte named entities, this will be called multiple times, - * with the second codepoint, and the same `consumed` value. - * - * @param codepoint The decoded codepoint. - * @param consumed The number of bytes consumed by the decoder. - */ - emitCodePoint, - /** An object that is used to produce errors. */ - errors) { - this.decodeTree = decodeTree; - this.emitCodePoint = emitCodePoint; - this.errors = errors; - /** The current state of the decoder. */ - this.state = EntityDecoderState.EntityStart; - /** Characters that were consumed while parsing an entity. */ - this.consumed = 1; - /** - * The result of the entity. - * - * Either the result index of a numeric entity, or the codepoint of a - * numeric entity. - */ - this.result = 0; - /** The current index in the decode tree. */ - this.treeIndex = 0; - /** The number of characters that were consumed in excess. */ - this.excess = 1; - /** The mode in which the decoder is operating. */ - this.decodeMode = DecodingMode.Strict; - } - /** Resets the instance to make it reusable. */ - EntityDecoder.prototype.startEntity = function (decodeMode) { - this.decodeMode = decodeMode; - this.state = EntityDecoderState.EntityStart; - this.result = 0; - this.treeIndex = 0; - this.excess = 1; - this.consumed = 1; - }; - /** - * Write an entity to the decoder. This can be called multiple times with partial entities. - * If the entity is incomplete, the decoder will return -1. - * - * Mirrors the implementation of `getDecoder`, but with the ability to stop decoding if the - * entity is incomplete, and resume when the next string is written. - * - * @param string The string containing the entity (or a continuation of the entity). - * @param offset The offset at which the entity begins. Should be 0 if this is not the first call. - * @returns The number of characters that were consumed, or -1 if the entity is incomplete. - */ - EntityDecoder.prototype.write = function (str, offset) { - switch (this.state) { - case EntityDecoderState.EntityStart: { - if (str.charCodeAt(offset) === CharCodes.NUM) { - this.state = EntityDecoderState.NumericStart; - this.consumed += 1; - return this.stateNumericStart(str, offset + 1); - } - this.state = EntityDecoderState.NamedEntity; - return this.stateNamedEntity(str, offset); - } - case EntityDecoderState.NumericStart: { - return this.stateNumericStart(str, offset); - } - case EntityDecoderState.NumericDecimal: { - return this.stateNumericDecimal(str, offset); - } - case EntityDecoderState.NumericHex: { - return this.stateNumericHex(str, offset); - } - case EntityDecoderState.NamedEntity: { - return this.stateNamedEntity(str, offset); - } - } - }; - /** - * Switches between the numeric decimal and hexadecimal states. - * - * Equivalent to the `Numeric character reference state` in the HTML spec. - * - * @param str The string containing the entity (or a continuation of the entity). - * @param offset The current offset. - * @returns The number of characters that were consumed, or -1 if the entity is incomplete. - */ - EntityDecoder.prototype.stateNumericStart = function (str, offset) { - if (offset >= str.length) { - return -1; - } - if ((str.charCodeAt(offset) | TO_LOWER_BIT) === CharCodes.LOWER_X) { - this.state = EntityDecoderState.NumericHex; - this.consumed += 1; - return this.stateNumericHex(str, offset + 1); - } - this.state = EntityDecoderState.NumericDecimal; - return this.stateNumericDecimal(str, offset); - }; - EntityDecoder.prototype.addToNumericResult = function (str, start, end, base) { - if (start !== end) { - var digitCount = end - start; - this.result = - this.result * Math.pow(base, digitCount) + - parseInt(str.substr(start, digitCount), base); - this.consumed += digitCount; - } - }; - /** - * Parses a hexadecimal numeric entity. - * - * Equivalent to the `Hexademical character reference state` in the HTML spec. - * - * @param str The string containing the entity (or a continuation of the entity). - * @param offset The current offset. - * @returns The number of characters that were consumed, or -1 if the entity is incomplete. - */ - EntityDecoder.prototype.stateNumericHex = function (str, offset) { - var startIdx = offset; - while (offset < str.length) { - var char = str.charCodeAt(offset); - if (isNumber(char) || isHexadecimalCharacter(char)) { - offset += 1; - } - else { - this.addToNumericResult(str, startIdx, offset, 16); - return this.emitNumericEntity(char, 3); - } - } - this.addToNumericResult(str, startIdx, offset, 16); - return -1; - }; - /** - * Parses a decimal numeric entity. - * - * Equivalent to the `Decimal character reference state` in the HTML spec. - * - * @param str The string containing the entity (or a continuation of the entity). - * @param offset The current offset. - * @returns The number of characters that were consumed, or -1 if the entity is incomplete. - */ - EntityDecoder.prototype.stateNumericDecimal = function (str, offset) { - var startIdx = offset; - while (offset < str.length) { - var char = str.charCodeAt(offset); - if (isNumber(char)) { - offset += 1; - } - else { - this.addToNumericResult(str, startIdx, offset, 10); - return this.emitNumericEntity(char, 2); - } - } - this.addToNumericResult(str, startIdx, offset, 10); - return -1; - }; - /** - * Validate and emit a numeric entity. - * - * Implements the logic from the `Hexademical character reference start - * state` and `Numeric character reference end state` in the HTML spec. - * - * @param lastCp The last code point of the entity. Used to see if the - * entity was terminated with a semicolon. - * @param expectedLength The minimum number of characters that should be - * consumed. Used to validate that at least one digit - * was consumed. - * @returns The number of characters that were consumed. - */ - EntityDecoder.prototype.emitNumericEntity = function (lastCp, expectedLength) { - var _a; - // Ensure we consumed at least one digit. - if (this.consumed <= expectedLength) { - (_a = this.errors) === null || _a === void 0 ? void 0 : _a.absenceOfDigitsInNumericCharacterReference(this.consumed); - return 0; - } - // Figure out if this is a legit end of the entity - if (lastCp === CharCodes.SEMI) { - this.consumed += 1; - } - else if (this.decodeMode === DecodingMode.Strict) { - return 0; - } - this.emitCodePoint((0, decode_codepoint_js_1.replaceCodePoint)(this.result), this.consumed); - if (this.errors) { - if (lastCp !== CharCodes.SEMI) { - this.errors.missingSemicolonAfterCharacterReference(); - } - this.errors.validateNumericCharacterReference(this.result); - } - return this.consumed; - }; - /** - * Parses a named entity. - * - * Equivalent to the `Named character reference state` in the HTML spec. - * - * @param str The string containing the entity (or a continuation of the entity). - * @param offset The current offset. - * @returns The number of characters that were consumed, or -1 if the entity is incomplete. - */ - EntityDecoder.prototype.stateNamedEntity = function (str, offset) { - var decodeTree = this.decodeTree; - var current = decodeTree[this.treeIndex]; - // The mask is the number of bytes of the value, including the current byte. - var valueLength = (current & BinTrieFlags.VALUE_LENGTH) >> 14; - for (; offset < str.length; offset++, this.excess++) { - var char = str.charCodeAt(offset); - this.treeIndex = determineBranch(decodeTree, current, this.treeIndex + Math.max(1, valueLength), char); - if (this.treeIndex < 0) { - return this.result === 0 || - // If we are parsing an attribute - (this.decodeMode === DecodingMode.Attribute && - // We shouldn't have consumed any characters after the entity, - (valueLength === 0 || - // And there should be no invalid characters. - isEntityInAttributeInvalidEnd(char))) - ? 0 - : this.emitNotTerminatedNamedEntity(); - } - current = decodeTree[this.treeIndex]; - valueLength = (current & BinTrieFlags.VALUE_LENGTH) >> 14; - // If the branch is a value, store it and continue - if (valueLength !== 0) { - // If the entity is terminated by a semicolon, we are done. - if (char === CharCodes.SEMI) { - return this.emitNamedEntityData(this.treeIndex, valueLength, this.consumed + this.excess); - } - // If we encounter a non-terminated (legacy) entity while parsing strictly, then ignore it. - if (this.decodeMode !== DecodingMode.Strict) { - this.result = this.treeIndex; - this.consumed += this.excess; - this.excess = 0; - } - } - } - return -1; - }; - /** - * Emit a named entity that was not terminated with a semicolon. - * - * @returns The number of characters consumed. - */ - EntityDecoder.prototype.emitNotTerminatedNamedEntity = function () { - var _a; - var _b = this, result = _b.result, decodeTree = _b.decodeTree; - var valueLength = (decodeTree[result] & BinTrieFlags.VALUE_LENGTH) >> 14; - this.emitNamedEntityData(result, valueLength, this.consumed); - (_a = this.errors) === null || _a === void 0 ? void 0 : _a.missingSemicolonAfterCharacterReference(); - return this.consumed; - }; - /** - * Emit a named entity. - * - * @param result The index of the entity in the decode tree. - * @param valueLength The number of bytes in the entity. - * @param consumed The number of characters consumed. - * - * @returns The number of characters consumed. - */ - EntityDecoder.prototype.emitNamedEntityData = function (result, valueLength, consumed) { - var decodeTree = this.decodeTree; - this.emitCodePoint(valueLength === 1 - ? decodeTree[result] & ~BinTrieFlags.VALUE_LENGTH - : decodeTree[result + 1], consumed); - if (valueLength === 3) { - // For multi-byte values, we need to emit the second byte. - this.emitCodePoint(decodeTree[result + 2], consumed); - } - return consumed; - }; - /** - * Signal to the parser that the end of the input was reached. - * - * Remaining data will be emitted and relevant errors will be produced. - * - * @returns The number of characters consumed. - */ - EntityDecoder.prototype.end = function () { - var _a; - switch (this.state) { - case EntityDecoderState.NamedEntity: { - // Emit a named entity if we have one. - return this.result !== 0 && - (this.decodeMode !== DecodingMode.Attribute || - this.result === this.treeIndex) - ? this.emitNotTerminatedNamedEntity() - : 0; - } - // Otherwise, emit a numeric entity if we have one. - case EntityDecoderState.NumericDecimal: { - return this.emitNumericEntity(0, 2); - } - case EntityDecoderState.NumericHex: { - return this.emitNumericEntity(0, 3); - } - case EntityDecoderState.NumericStart: { - (_a = this.errors) === null || _a === void 0 ? void 0 : _a.absenceOfDigitsInNumericCharacterReference(this.consumed); - return 0; - } - case EntityDecoderState.EntityStart: { - // Return 0 if we have no entity. - return 0; - } - } - }; - return EntityDecoder; -}()); -exports.EntityDecoder = EntityDecoder; -/** - * Creates a function that decodes entities in a string. - * - * @param decodeTree The decode tree. - * @returns A function that decodes entities in a string. - */ -function getDecoder(decodeTree) { - var ret = ""; - var decoder = new EntityDecoder(decodeTree, function (str) { return (ret += (0, decode_codepoint_js_1.fromCodePoint)(str)); }); - return function decodeWithTrie(str, decodeMode) { - var lastIndex = 0; - var offset = 0; - while ((offset = str.indexOf("&", offset)) >= 0) { - ret += str.slice(lastIndex, offset); - decoder.startEntity(decodeMode); - var len = decoder.write(str, - // Skip the "&" - offset + 1); - if (len < 0) { - lastIndex = offset + decoder.end(); - break; - } - lastIndex = offset + len; - // If `len` is 0, skip the current `&` and continue. - offset = len === 0 ? lastIndex + 1 : lastIndex; - } - var result = ret + str.slice(lastIndex); - // Make sure we don't keep a reference to the final string. - ret = ""; - return result; - }; -} -/** - * Determines the branch of the current node that is taken given the current - * character. This function is used to traverse the trie. - * - * @param decodeTree The trie. - * @param current The current node. - * @param nodeIdx The index right after the current node and its value. - * @param char The current character. - * @returns The index of the next node, or -1 if no branch is taken. - */ -function determineBranch(decodeTree, current, nodeIdx, char) { - var branchCount = (current & BinTrieFlags.BRANCH_LENGTH) >> 7; - var jumpOffset = current & BinTrieFlags.JUMP_TABLE; - // Case 1: Single branch encoded in jump offset - if (branchCount === 0) { - return jumpOffset !== 0 && char === jumpOffset ? nodeIdx : -1; - } - // Case 2: Multiple branches encoded in jump table - if (jumpOffset) { - var value = char - jumpOffset; - return value < 0 || value >= branchCount - ? -1 - : decodeTree[nodeIdx + value] - 1; - } - // Case 3: Multiple branches encoded in dictionary - // Binary search for the character. - var lo = nodeIdx; - var hi = lo + branchCount - 1; - while (lo <= hi) { - var mid = (lo + hi) >>> 1; - var midVal = decodeTree[mid]; - if (midVal < char) { - lo = mid + 1; - } - else if (midVal > char) { - hi = mid - 1; - } - else { - return decodeTree[mid + branchCount]; - } - } - return -1; -} -exports.determineBranch = determineBranch; -var htmlDecoder = getDecoder(decode_data_html_js_1.default); -var xmlDecoder = getDecoder(decode_data_xml_js_1.default); -/** - * Decodes an HTML string. - * - * @param str The string to decode. - * @param mode The decoding mode. - * @returns The decoded string. - */ -function decodeHTML(str, mode) { - if (mode === void 0) { mode = DecodingMode.Legacy; } - return htmlDecoder(str, mode); -} -exports.decodeHTML = decodeHTML; -/** - * Decodes an HTML string in an attribute. - * - * @param str The string to decode. - * @returns The decoded string. - */ -function decodeHTMLAttribute(str) { - return htmlDecoder(str, DecodingMode.Attribute); -} -exports.decodeHTMLAttribute = decodeHTMLAttribute; -/** - * Decodes an HTML string, requiring all entities to be terminated by a semicolon. - * - * @param str The string to decode. - * @returns The decoded string. - */ -function decodeHTMLStrict(str) { - return htmlDecoder(str, DecodingMode.Strict); -} -exports.decodeHTMLStrict = decodeHTMLStrict; -/** - * Decodes an XML string, requiring all entities to be terminated by a semicolon. - * - * @param str The string to decode. - * @returns The decoded string. - */ -function decodeXML(str) { - return xmlDecoder(str, DecodingMode.Strict); -} -exports.decodeXML = decodeXML; -//# sourceMappingURL=decode.js.map \ No newline at end of file diff --git a/node_modules/entities/lib/decode.js.map b/node_modules/entities/lib/decode.js.map deleted file mode 100644 index afcad7e..0000000 --- a/node_modules/entities/lib/decode.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"decode.js","sourceRoot":"https://raw.githubusercontent.com/fb55/entities/61afd4701eaa736978b13c7351cd3de9a96b04bc/src/","sources":["decode.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,wFAA6D;AAQpD,yBARF,6BAAc,CAQE;AAPvB,sFAA2D;AAOlC,wBAPlB,4BAAa,CAOkB;AANtC,2EAG+B;AAGS,0BANjC,6BAAe,CAMiC;AACvD,6DAAwE;AAA/D,uHAAA,gBAAgB,OAAA;AAAE,oHAAA,aAAa,OAAA;AAExC,IAAW,SAaV;AAbD,WAAW,SAAS;IAChB,wCAAQ,CAAA;IACR,0CAAS,CAAA;IACT,8CAAW,CAAA;IACX,0CAAS,CAAA;IACT,0CAAS,CAAA;IACT,gDAAY,CAAA;IACZ,iDAAa,CAAA;IACb,iDAAa,CAAA;IACb,iDAAa,CAAA;IACb,gDAAY,CAAA;IACZ,gDAAY,CAAA;IACZ,gDAAY,CAAA;AAChB,CAAC,EAbU,SAAS,KAAT,SAAS,QAanB;AAED,sFAAsF;AACtF,IAAM,YAAY,GAAG,EAAQ,CAAC;AAE9B,IAAY,YAIX;A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D,OAAO,WAAW,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC;AAClC,CAAC;AAFD,gCAEC;AAED;;;;;GAKG;AACH,SAAgB,mBAAmB,CAAC,GAAW;IAC3C,OAAO,WAAW,CAAC,GAAG,EAAE,YAAY,CAAC,SAAS,CAAC,CAAC;AACpD,CAAC;AAFD,kDAEC;AAED;;;;;GAKG;AACH,SAAgB,gBAAgB,CAAC,GAAW;IACxC,OAAO,WAAW,CAAC,GAAG,EAAE,YAAY,CAAC,MAAM,CAAC,CAAC;AACjD,CAAC;AAFD,4CAEC;AAED;;;;;GAKG;AACH,SAAgB,SAAS,CAAC,GAAW;IACjC,OAAO,UAAU,CAAC,GAAG,EAAE,YAAY,CAAC,MAAM,CAAC,CAAC;AAChD,CAAC;AAFD,8BAEC"} \ No newline at end of file diff --git a/node_modules/entities/lib/decode_codepoint.d.ts b/node_modules/entities/lib/decode_codepoint.d.ts deleted file mode 100644 index 84ae206..0000000 --- a/node_modules/entities/lib/decode_codepoint.d.ts +++ /dev/null @@ -1,19 +0,0 @@ -/** - * Polyfill for `String.fromCodePoint`. It is used to create a string from a Unicode code point. - */ -export declare const fromCodePoint: (...codePoints: number[]) => string; -/** - * Replace the given code point with a replacement character if it is a - * surrogate or is outside the valid range. Otherwise return the code - * point unchanged. - */ -export declare function replaceCodePoint(codePoint: number): number; -/** - * Replace the code point if relevant, then convert it to a string. - * - * @deprecated Use `fromCodePoint(replaceCodePoint(codePoint))` instead. - * @param codePoint The code point to decode. - * @returns The decoded code point. - */ -export default function decodeCodePoint(codePoint: number): string; -//# sourceMappingURL=decode_codepoint.d.ts.map \ No newline at end of file diff --git a/node_modules/entities/lib/decode_codepoint.d.ts.map b/node_modules/entities/lib/decode_codepoint.d.ts.map deleted file mode 100644 index 38a8dea..0000000 --- a/node_modules/entities/lib/decode_codepoint.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"decode_codepoint.d.ts","sourceRoot":"https://raw.githubusercontent.com/fb55/entities/61afd4701eaa736978b13c7351cd3de9a96b04bc/src/","sources":["decode_codepoint.ts"],"names":[],"mappings":"AAkCA;;GAEG;AACH,eAAO,MAAM,aAAa,qCAgBrB,CAAC;AAEN;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,SAAS,EAAE,MAAM,UAMjD;AAED;;;;;;GAMG;AACH,MAAM,CAAC,OAAO,UAAU,eAAe,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAEjE"} \ No newline at end of file diff --git a/node_modules/entities/lib/decode_codepoint.js b/node_modules/entities/lib/decode_codepoint.js deleted file mode 100644 index 1205346..0000000 --- a/node_modules/entities/lib/decode_codepoint.js +++ /dev/null @@ -1,76 +0,0 @@ -"use strict"; -// Adapted from https://github.com/mathiasbynens/he/blob/36afe179392226cf1b6ccdb16ebbb7a5a844d93a/src/he.js#L106-L134 -var _a; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.replaceCodePoint = exports.fromCodePoint = void 0; -var decodeMap = new Map([ - [0, 65533], - // C1 Unicode control character reference replacements - [128, 8364], - [130, 8218], - [131, 402], - [132, 8222], - [133, 8230], - [134, 8224], - [135, 8225], - [136, 710], - [137, 8240], - [138, 352], - [139, 8249], - [140, 338], - [142, 381], - [145, 8216], - [146, 8217], - [147, 8220], - [148, 8221], - [149, 8226], - [150, 8211], - [151, 8212], - [152, 732], - [153, 8482], - [154, 353], - [155, 8250], - [156, 339], - [158, 382], - [159, 376], -]); -/** - * Polyfill for `String.fromCodePoint`. It is used to create a string from a Unicode code point. - */ -exports.fromCodePoint = -// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition, node/no-unsupported-features/es-builtins -(_a = String.fromCodePoint) !== null && _a !== void 0 ? _a : function (codePoint) { - var output = ""; - if (codePoint > 0xffff) { - codePoint -= 0x10000; - output += String.fromCharCode(((codePoint >>> 10) & 0x3ff) | 0xd800); - codePoint = 0xdc00 | (codePoint & 0x3ff); - } - output += String.fromCharCode(codePoint); - return output; -}; -/** - * Replace the given code point with a replacement character if it is a - * surrogate or is outside the valid range. Otherwise return the code - * point unchanged. - */ -function replaceCodePoint(codePoint) { - var _a; - if ((codePoint >= 0xd800 && codePoint <= 0xdfff) || codePoint > 0x10ffff) { - return 0xfffd; - } - return (_a = decodeMap.get(codePoint)) !== null && _a !== void 0 ? _a : codePoint; -} -exports.replaceCodePoint = replaceCodePoint; -/** - * Replace the code point if relevant, then convert it to a string. - * - * @deprecated Use `fromCodePoint(replaceCodePoint(codePoint))` instead. - * @param codePoint The code point to decode. - * @returns The decoded code point. - */ -function decodeCodePoint(codePoint) { - return (0, exports.fromCodePoint)(replaceCodePoint(codePoint)); -} -exports.default = decodeCodePoint; -//# sourceMappingURL=decode_codepoint.js.map \ No newline at end of file diff --git a/node_modules/entities/lib/decode_codepoint.js.map b/node_modules/entities/lib/decode_codepoint.js.map deleted file mode 100644 index 2747865..0000000 --- a/node_modules/entities/lib/decode_codepoint.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"decode_codepoint.js","sourceRoot":"https://raw.githubusercontent.com/fb55/entities/61afd4701eaa736978b13c7351cd3de9a96b04bc/src/","sources":["decode_codepoint.ts"],"names":[],"mappings":";AAAA,qHAAqH;;;;AAErH,IAAM,SAAS,GAAG,IAAI,GAAG,CAAC;IACtB,CAAC,CAAC,EAAE,KAAK,CAAC;IACV,sDAAsD;IACtD,CAAC,GAAG,EAAE,IAAI,CAAC;IACX,CAAC,GAAG,EAAE,IAAI,CAAC;IACX,CAAC,GAAG,EAAE,GAAG,CAAC;IACV,CAAC,GAAG,EAAE,IAAI,CAAC;IACX,CAAC,GAAG,EAAE,IAAI,CAAC;IACX,CAAC,GAAG,EAAE,IAAI,CAAC;IACX,CAAC,GAAG,EAAE,IAAI,CAAC;IACX,CAAC,GAAG,EAAE,GAAG,CAAC;IACV,CAAC,GAAG,EAAE,IAAI,CAAC;IACX,CAAC,GAAG,EAAE,GAAG,CAAC;IACV,CAAC,GAAG,EAAE,IAAI,CAAC;IACX,CAAC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ACjB;IAED,OAAO,MAAA,SAAS,CAAC,GAAG,CAAC,SAAS,CAAC,mCAAI,SAAS,CAAC;AACjD,CAAC;AAND,4CAMC;AAED;;;;;;GAMG;AACH,SAAwB,eAAe,CAAC,SAAiB;IACrD,OAAO,IAAA,qBAAa,EAAC,gBAAgB,CAAC,SAAS,CAAC,CAAC,CAAC;AACtD,CAAC;AAFD,kCAEC"} \ No newline at end of file diff --git a/node_modules/entities/lib/encode.d.ts b/node_modules/entities/lib/encode.d.ts deleted file mode 100644 index f09c4ee..0000000 --- a/node_modules/entities/lib/encode.d.ts +++ /dev/null @@ -1,22 +0,0 @@ -/** - * Encodes all characters in the input using HTML entities. This includes - * characters that are valid ASCII characters in HTML documents, such as `#`. - * - * To get a more compact output, consider using the `encodeNonAsciiHTML` - * function, which will only encode characters that are not valid in HTML - * documents, as well as non-ASCII characters. - * - * If a character has no equivalent entity, a numeric hexadecimal reference - * (eg. `ü`) will be used. - */ -export declare function encodeHTML(data: string): string; -/** - * Encodes all non-ASCII characters, as well as characters not valid in HTML - * documents using HTML entities. This function will not encode characters that - * are valid in HTML documents, such as `#`. - * - * If a character has no equivalent entity, a numeric hexadecimal reference - * (eg. `ü`) will be used. - */ -export declare function encodeNonAsciiHTML(data: string): string; -//# sourceMappingURL=encode.d.ts.map \ No newline at end of file diff --git a/node_modules/entities/lib/encode.d.ts.map b/node_modules/entities/lib/encode.d.ts.map deleted file mode 100644 index e24c05b..0000000 --- a/node_modules/entities/lib/encode.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"encode.d.ts","sourceRoot":"https://raw.githubusercontent.com/fb55/entities/61afd4701eaa736978b13c7351cd3de9a96b04bc/src/","sources":["encode.ts"],"names":[],"mappings":"AAKA;;;;;;;;;;GAUG;AACH,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAE/C;AACD;;;;;;;GAOG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAEvD"} \ No newline at end of file diff --git a/node_modules/entities/lib/encode.js b/node_modules/entities/lib/encode.js deleted file mode 100644 index 4786a03..0000000 --- a/node_modules/entities/lib/encode.js +++ /dev/null @@ -1,77 +0,0 @@ -"use strict"; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.encodeNonAsciiHTML = exports.encodeHTML = void 0; -var encode_html_js_1 = __importDefault(require("./generated/encode-html.js")); -var escape_js_1 = require("./escape.js"); -var htmlReplacer = /[\t\n!-,./:-@[-`\f{-}$\x80-\uFFFF]/g; -/** - * Encodes all characters in the input using HTML entities. This includes - * characters that are valid ASCII characters in HTML documents, such as `#`. - * - * To get a more compact output, consider using the `encodeNonAsciiHTML` - * function, which will only encode characters that are not valid in HTML - * documents, as well as non-ASCII characters. - * - * If a character has no equivalent entity, a numeric hexadecimal reference - * (eg. `ü`) will be used. - */ -function encodeHTML(data) { - return encodeHTMLTrieRe(htmlReplacer, data); -} -exports.encodeHTML = encodeHTML; -/** - * Encodes all non-ASCII characters, as well as characters not valid in HTML - * documents using HTML entities. This function will not encode characters that - * are valid in HTML documents, such as `#`. - * - * If a character has no equivalent entity, a numeric hexadecimal reference - * (eg. `ü`) will be used. - */ -function encodeNonAsciiHTML(data) { - return encodeHTMLTrieRe(escape_js_1.xmlReplacer, data); -} -exports.encodeNonAsciiHTML = encodeNonAsciiHTML; -function encodeHTMLTrieRe(regExp, str) { - var ret = ""; - var lastIdx = 0; - var match; - while ((match = regExp.exec(str)) !== null) { - var i = match.index; - ret += str.substring(lastIdx, i); - var char = str.charCodeAt(i); - var next = encode_html_js_1.default.get(char); - if (typeof next === "object") { - // We are in a branch. Try to match the next char. - if (i + 1 < str.length) { - var nextChar = str.charCodeAt(i + 1); - var value = typeof next.n === "number" - ? next.n === nextChar - ? next.o - : undefined - : next.n.get(nextChar); - if (value !== undefined) { - ret += value; - lastIdx = regExp.lastIndex += 1; - continue; - } - } - next = next.v; - } - // We might have a tree node without a value; skip and use a numeric entity. - if (next !== undefined) { - ret += next; - lastIdx = i + 1; - } - else { - var cp = (0, escape_js_1.getCodePoint)(str, i); - ret += "&#x".concat(cp.toString(16), ";"); - // Increase by 1 if we have a surrogate pair - lastIdx = regExp.lastIndex += Number(cp !== char); - } - } - return ret + str.substr(lastIdx); -} -//# sourceMappingURL=encode.js.map \ No newline at end of file diff --git a/node_modules/entities/lib/encode.js.map b/node_modules/entities/lib/encode.js.map deleted file mode 100644 index 9d47162..0000000 --- a/node_modules/entities/lib/encode.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"encode.js","sourceRoot":"https://raw.githubusercontent.com/fb55/entities/61afd4701eaa736978b13c7351cd3de9a96b04bc/src/","sources":["encode.ts"],"names":[],"mappings":";;;;;;AAAA,8EAAkD;AAClD,yCAAwD;AAExD,IAAM,YAAY,GAAG,qCAAqC,CAAC;AAE3D;;;;;;;;;;GAUG;AACH,SAAgB,UAAU,CAAC,IAAY;IACnC,OAAO,gBAAgB,CAAC,YAAY,EAAE,IAAI,CAAC,CAAC;AAChD,CAAC;AAFD,gCAEC;AACD;;;;;;;GAOG;AACH,SAAgB,kBAAkB,CAAC,IAAY;IAC3C,OAAO,gBAAgB,CAAC,uBAAW,EAAE,IAAI,CAAC,CAAC;AAC/C,CAAC;AAFD,gDAEC;AAED,SAAS,gBAAgB,CAAC,MAAc,EAAE,GAAW;IACjD,IAAI,GAAG,GAAG,EAAE,CAAC;IACb,IAAI,OAAO,GAAG,CAAC,CAAC;IAChB,IAAI,KAAK,CAAC;IAEV,OAAO,CAAC,KAAK,GAAG,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,KAAK,IAAI,EAAE;QACxC,IAAM,CAAC,GAAG,KAAK,CAAC,KAAK,CAAC;QACtB,GAAG,IAAI,GAAG,CAAC,SAAS,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC;QACjC,IAAM,IAAI,GAA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No newline at end of file diff --git a/node_modules/entities/lib/escape.d.ts b/node_modules/entities/lib/escape.d.ts deleted file mode 100644 index c07ecdc..0000000 --- a/node_modules/entities/lib/escape.d.ts +++ /dev/null @@ -1,43 +0,0 @@ -export declare const xmlReplacer: RegExp; -export declare const getCodePoint: (str: string, index: number) => number; -/** - * Encodes all non-ASCII characters, as well as characters not valid in XML - * documents using XML entities. - * - * If a character has no equivalent entity, a - * numeric hexadecimal reference (eg. `ü`) will be used. - */ -export declare function encodeXML(str: string): string; -/** - * Encodes all non-ASCII characters, as well as characters not valid in XML - * documents using numeric hexadecimal reference (eg. `ü`). - * - * Have a look at `escapeUTF8` if you want a more concise output at the expense - * of reduced transportability. - * - * @param data String to escape. - */ -export declare const escape: typeof encodeXML; -/** - * Encodes all characters not valid in XML documents using XML entities. - * - * Note that the output will be character-set dependent. - * - * @param data String to escape. - */ -export declare const escapeUTF8: (data: string) => string; -/** - * Encodes all characters that have to be escaped in HTML attributes, - * following {@link https://html.spec.whatwg.org/multipage/parsing.html#escapingString}. - * - * @param data String to escape. - */ -export declare const escapeAttribute: (data: string) => string; -/** - * Encodes all characters that have to be escaped in HTML text, - * following {@link https://html.spec.whatwg.org/multipage/parsing.html#escapingString}. - * - * @param data String to escape. - */ -export declare const escapeText: (data: string) => string; -//# sourceMappingURL=escape.d.ts.map \ No newline at end of file diff --git a/node_modules/entities/lib/escape.d.ts.map b/node_modules/entities/lib/escape.d.ts.map deleted file mode 100644 index fa19825..0000000 --- a/node_modules/entities/lib/escape.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"escape.d.ts","sourceRoot":"https://raw.githubusercontent.com/fb55/entities/61afd4701eaa736978b13c7351cd3de9a96b04bc/src/","sources":["escape.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,WAAW,QAAyB,CAAC;AAWlD,eAAO,MAAM,YAAY,QAGT,MAAM,SAAS,MAAM,KAAG,MAQD,CAAC;AAExC;;;;;;GAMG;AACH,wBAAgB,SAAS,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CA0B7C;AAED;;;;;;;;GAQG;AACH,eAAO,MAAM,MAAM,kBAAY,CAAC;AAqChC;;;;;;GAMG;AACH,eAAO,MAAM,UAAU,SA7Bb,MAAM,KAAK,MA6BuC,CAAC;AAE7D;;;;;GAKG;AACH,eAAO,MAAM,eAAe,SArClB,MAAM,KAAK,MA4CpB,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,UAAU,SApDb,MAAM,KAAK,MA4DpB,CAAC"} \ No newline at end of file diff --git a/node_modules/entities/lib/escape.js b/node_modules/entities/lib/escape.js deleted file mode 100644 index 9f36272..0000000 --- a/node_modules/entities/lib/escape.js +++ /dev/null @@ -1,122 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.escapeText = exports.escapeAttribute = exports.escapeUTF8 = exports.escape = exports.encodeXML = exports.getCodePoint = exports.xmlReplacer = void 0; -exports.xmlReplacer = /["&'<>$\x80-\uFFFF]/g; -var xmlCodeMap = new Map([ - [34, """], - [38, "&"], - [39, "'"], - [60, "<"], - [62, ">"], -]); -// For compatibility with node < 4, we wrap `codePointAt` -exports.getCodePoint = -// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -String.prototype.codePointAt != null - ? function (str, index) { return str.codePointAt(index); } - : // http://mathiasbynens.be/notes/javascript-encoding#surrogate-formulae - function (c, index) { - return (c.charCodeAt(index) & 0xfc00) === 0xd800 - ? (c.charCodeAt(index) - 0xd800) * 0x400 + - c.charCodeAt(index + 1) - - 0xdc00 + - 0x10000 - : c.charCodeAt(index); - }; -/** - * Encodes all non-ASCII characters, as well as characters not valid in XML - * documents using XML entities. - * - * If a character has no equivalent entity, a - * numeric hexadecimal reference (eg. `ü`) will be used. - */ -function encodeXML(str) { - var ret = ""; - var lastIdx = 0; - var match; - while ((match = exports.xmlReplacer.exec(str)) !== null) { - var i = match.index; - var char = str.charCodeAt(i); - var next = xmlCodeMap.get(char); - if (next !== undefined) { - ret += str.substring(lastIdx, i) + next; - lastIdx = i + 1; - } - else { - ret += "".concat(str.substring(lastIdx, i), "&#x").concat((0, exports.getCodePoint)(str, i).toString(16), ";"); - // Increase by 1 if we have a surrogate pair - lastIdx = exports.xmlReplacer.lastIndex += Number((char & 0xfc00) === 0xd800); - } - } - return ret + str.substr(lastIdx); -} -exports.encodeXML = encodeXML; -/** - * Encodes all non-ASCII characters, as well as characters not valid in XML - * documents using numeric hexadecimal reference (eg. `ü`). - * - * Have a look at `escapeUTF8` if you want a more concise output at the expense - * of reduced transportability. - * - * @param data String to escape. - */ -exports.escape = encodeXML; -/** - * Creates a function that escapes all characters matched by the given regular - * expression using the given map of characters to escape to their entities. - * - * @param regex Regular expression to match characters to escape. - * @param map Map of characters to escape to their entities. - * - * @returns Function that escapes all characters matched by the given regular - * expression using the given map of characters to escape to their entities. - */ -function getEscaper(regex, map) { - return function escape(data) { - var match; - var lastIdx = 0; - var result = ""; - while ((match = regex.exec(data))) { - if (lastIdx !== match.index) { - result += data.substring(lastIdx, match.index); - } - // We know that this character will be in the map. - result += map.get(match[0].charCodeAt(0)); - // Every match will be of length 1 - lastIdx = match.index + 1; - } - return result + data.substring(lastIdx); - }; -} -/** - * Encodes all characters not valid in XML documents using XML entities. - * - * Note that the output will be character-set dependent. - * - * @param data String to escape. - */ -exports.escapeUTF8 = getEscaper(/[&<>'"]/g, xmlCodeMap); -/** - * Encodes all characters that have to be escaped in HTML attributes, - * following {@link https://html.spec.whatwg.org/multipage/parsing.html#escapingString}. - * - * @param data String to escape. - */ -exports.escapeAttribute = getEscaper(/["&\u00A0]/g, new Map([ - [34, """], - [38, "&"], - [160, " "], -])); -/** - * Encodes all characters that have to be escaped in HTML text, - * following {@link https://html.spec.whatwg.org/multipage/parsing.html#escapingString}. - * - * @param data String to escape. - */ -exports.escapeText = getEscaper(/[&<>\u00A0]/g, new Map([ - [38, "&"], - [60, "<"], - [62, ">"], - [160, " "], -])); -//# sourceMappingURL=escape.js.map \ No newline at end of file diff --git a/node_modules/entities/lib/escape.js.map b/node_modules/entities/lib/escape.js.map deleted file mode 100644 index f96d022..0000000 --- a/node_modules/entities/lib/escape.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"escape.js","sourceRoot":"https://raw.githubusercontent.com/fb55/entities/61afd4701eaa736978b13c7351cd3de9a96b04bc/src/","sources":["escape.ts"],"names":[],"mappings":";;;AAAa,QAAA,WAAW,GAAG,sBAAsB,CAAC;AAElD,IAAM,UAAU,GAAG,IAAI,GAAG,CAAC;IACvB,CAAC,EAAE,EAAE,QAAQ,CAAC;IACd,CAAC,EAAE,EAAE,OAAO,CAAC;IACb,CAAC,EAAE,EAAE,QAAQ,CAAC;IACd,CAAC,EAAE,EAAE,MAAM,CAAC;IACZ,CAAC,EAAE,EAAE,MAAM,CAAC;CACf,CAAC,CAAC;AAEH,yDAAyD;AAC5C,QAAA,YAAY;AACrB,uEAAuE;AACvE,MAAM,CAAC,SAAS,CAAC,WAAW,IAAI,IAAI;IAChC,CAAC,CAAC,UAAC,GAAW,EAAE,KAAa,IAAa,OAAA,GAAG,CAAC,WAAW,CAAC,KAAK,CAAE,EAAvB,CAAuB;IACjE,CAAC,CAAC,uEAAuE;QACvE,UAAC,CAAS,EAAE,KAAa;YACrB,OAAA,CAAC,CAAC,CAAC,UAAU,CAAC,KAAK,CAAC,GAAG,MAAM,CAAC,KAAK,MAAM;gBACrC,CAAC,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,KAAK,CAAC,GAAG,MAAM,CAAC,GAAG,KAAK;oBACtC,CAAC,CAAC,UAAU,CAAC,KAAK,GAAG,CAAC,CAAC;oBACvB,MAAM;oBACN,OAAO;gBACT,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,KAAK,CAAC;QALzB,CAKyB,CAAC;AAExC;;;;;;GAMG;AACH,SAAgB,SAAS,CAAC,GAAW;IACjC,IAAI,GAAG,GAAG,EAAE,CAAC;IACb,IAAI,OAAO,GAAG,CAAC,CAAC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KAAK,EAAE;gBACzB,MAAM,IAAI,IAAI,CAAC,SAAS,CAAC,OAAO,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC;aAClD;YAED,kDAAkD;YAClD,MAAM,IAAI,GAAG,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,CAAE,CAAC;YAE3C,kCAAkC;YAClC,OAAO,GAAG,KAAK,CAAC,KAAK,GAAG,CAAC,CAAC;SAC7B;QAED,OAAO,MAAM,GAAG,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC;IAC5C,CAAC,CAAC;AACN,CAAC;AAED;;;;;;GAMG;AACU,QAAA,UAAU,GAAG,UAAU,CAAC,UAAU,EAAE,UAAU,CAAC,CAAC;AAE7D;;;;;GAKG;AACU,QAAA,eAAe,GAAG,UAAU,CACrC,aAAa,EACb,IAAI,GAAG,CAAC;IACJ,CAAC,EAAE,EAAE,QAAQ,CAAC;IACd,CAAC,EAAE,EAAE,OAAO,CAAC;IACb,CAAC,GAAG,EAAE,QAAQ,CAAC;CAClB,CAAC,CACL,CAAC;AAEF;;;;;GAKG;AACU,QAAA,UAAU,GAAG,UAAU,CAChC,cAAc,EACd,IAAI,GAAG,CAAC;IACJ,CAAC,EAAE,EAAE,OAAO,CAAC;IACb,CAAC,EAAE,EAAE,MAAM,CAAC;IACZ,CAAC,EAAE,EAAE,MAAM,CAAC;IACZ,CAAC,GAAG,EAAE,QAAQ,CAAC;CAClB,CAAC,CACL,CAAC"} \ No newline at end of file diff --git a/node_modules/entities/lib/esm/decode.d.ts b/node_modules/entities/lib/esm/decode.d.ts deleted file mode 100644 index ccfd9fb..0000000 --- a/node_modules/entities/lib/esm/decode.d.ts +++ /dev/null @@ -1,211 +0,0 @@ -import htmlDecodeTree from "./generated/decode-data-html.js"; -import xmlDecodeTree from "./generated/decode-data-xml.js"; -import decodeCodePoint from "./decode_codepoint.js"; -export { htmlDecodeTree, xmlDecodeTree, decodeCodePoint }; -export { replaceCodePoint, fromCodePoint } from "./decode_codepoint.js"; -export declare enum BinTrieFlags { - VALUE_LENGTH = 49152, - BRANCH_LENGTH = 16256, - JUMP_TABLE = 127 -} -export declare enum DecodingMode { - /** Entities in text nodes that can end with any character. */ - Legacy = 0, - /** Only allow entities terminated with a semicolon. */ - Strict = 1, - /** Entities in attributes have limitations on ending characters. */ - Attribute = 2 -} -/** - * Producers for character reference errors as defined in the HTML spec. - */ -export interface EntityErrorProducer { - missingSemicolonAfterCharacterReference(): void; - absenceOfDigitsInNumericCharacterReference(consumedCharacters: number): void; - validateNumericCharacterReference(code: number): void; -} -/** - * Token decoder with support of writing partial entities. - */ -export declare class EntityDecoder { - /** The tree used to decode entities. */ - private readonly decodeTree; - /** - * The function that is called when a codepoint is decoded. - * - * For multi-byte named entities, this will be called multiple times, - * with the second codepoint, and the same `consumed` value. - * - * @param codepoint The decoded codepoint. - * @param consumed The number of bytes consumed by the decoder. - */ - private readonly emitCodePoint; - /** An object that is used to produce errors. */ - private readonly errors?; - constructor( - /** The tree used to decode entities. */ - decodeTree: Uint16Array, - /** - * The function that is called when a codepoint is decoded. - * - * For multi-byte named entities, this will be called multiple times, - * with the second codepoint, and the same `consumed` value. - * - * @param codepoint The decoded codepoint. - * @param consumed The number of bytes consumed by the decoder. - */ - emitCodePoint: (cp: number, consumed: number) => void, - /** An object that is used to produce errors. */ - errors?: EntityErrorProducer | undefined); - /** The current state of the decoder. */ - private state; - /** Characters that were consumed while parsing an entity. */ - private consumed; - /** - * The result of the entity. - * - * Either the result index of a numeric entity, or the codepoint of a - * numeric entity. - */ - private result; - /** The current index in the decode tree. */ - private treeIndex; - /** The number of characters that were consumed in excess. */ - private excess; - /** The mode in which the decoder is operating. */ - private decodeMode; - /** Resets the instance to make it reusable. */ - startEntity(decodeMode: DecodingMode): void; - /** - * Write an entity to the decoder. This can be called multiple times with partial entities. - * If the entity is incomplete, the decoder will return -1. - * - * Mirrors the implementation of `getDecoder`, but with the ability to stop decoding if the - * entity is incomplete, and resume when the next string is written. - * - * @param string The string containing the entity (or a continuation of the entity). - * @param offset The offset at which the entity begins. Should be 0 if this is not the first call. - * @returns The number of characters that were consumed, or -1 if the entity is incomplete. - */ - write(str: string, offset: number): number; - /** - * Switches between the numeric decimal and hexadecimal states. - * - * Equivalent to the `Numeric character reference state` in the HTML spec. - * - * @param str The string containing the entity (or a continuation of the entity). - * @param offset The current offset. - * @returns The number of characters that were consumed, or -1 if the entity is incomplete. - */ - private stateNumericStart; - private addToNumericResult; - /** - * Parses a hexadecimal numeric entity. - * - * Equivalent to the `Hexademical character reference state` in the HTML spec. - * - * @param str The string containing the entity (or a continuation of the entity). - * @param offset The current offset. - * @returns The number of characters that were consumed, or -1 if the entity is incomplete. - */ - private stateNumericHex; - /** - * Parses a decimal numeric entity. - * - * Equivalent to the `Decimal character reference state` in the HTML spec. - * - * @param str The string containing the entity (or a continuation of the entity). - * @param offset The current offset. - * @returns The number of characters that were consumed, or -1 if the entity is incomplete. - */ - private stateNumericDecimal; - /** - * Validate and emit a numeric entity. - * - * Implements the logic from the `Hexademical character reference start - * state` and `Numeric character reference end state` in the HTML spec. - * - * @param lastCp The last code point of the entity. Used to see if the - * entity was terminated with a semicolon. - * @param expectedLength The minimum number of characters that should be - * consumed. Used to validate that at least one digit - * was consumed. - * @returns The number of characters that were consumed. - */ - private emitNumericEntity; - /** - * Parses a named entity. - * - * Equivalent to the `Named character reference state` in the HTML spec. - * - * @param str The string containing the entity (or a continuation of the entity). - * @param offset The current offset. - * @returns The number of characters that were consumed, or -1 if the entity is incomplete. - */ - private stateNamedEntity; - /** - * Emit a named entity that was not terminated with a semicolon. - * - * @returns The number of characters consumed. - */ - private emitNotTerminatedNamedEntity; - /** - * Emit a named entity. - * - * @param result The index of the entity in the decode tree. - * @param valueLength The number of bytes in the entity. - * @param consumed The number of characters consumed. - * - * @returns The number of characters consumed. - */ - private emitNamedEntityData; - /** - * Signal to the parser that the end of the input was reached. - * - * Remaining data will be emitted and relevant errors will be produced. - * - * @returns The number of characters consumed. - */ - end(): number; -} -/** - * Determines the branch of the current node that is taken given the current - * character. This function is used to traverse the trie. - * - * @param decodeTree The trie. - * @param current The current node. - * @param nodeIdx The index right after the current node and its value. - * @param char The current character. - * @returns The index of the next node, or -1 if no branch is taken. - */ -export declare function determineBranch(decodeTree: Uint16Array, current: number, nodeIdx: number, char: number): number; -/** - * Decodes an HTML string. - * - * @param str The string to decode. - * @param mode The decoding mode. - * @returns The decoded string. - */ -export declare function decodeHTML(str: string, mode?: DecodingMode): string; -/** - * Decodes an HTML string in an attribute. - * - * @param str The string to decode. - * @returns The decoded string. - */ -export declare function decodeHTMLAttribute(str: string): string; -/** - * Decodes an HTML string, requiring all entities to be terminated by a semicolon. - * - * @param str The string to decode. - * @returns The decoded string. - */ -export declare function decodeHTMLStrict(str: string): string; -/** - * Decodes an XML string, requiring all entities to be terminated by a semicolon. - * - * @param str The string to decode. - * @returns The decoded string. - */ -export declare function decodeXML(str: string): string; -//# sourceMappingURL=decode.d.ts.map \ No newline at end of file diff --git a/node_modules/entities/lib/esm/decode.d.ts.map b/node_modules/entities/lib/esm/decode.d.ts.map deleted file mode 100644 index 4c0b4b4..0000000 --- a/node_modules/entities/lib/esm/decode.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"decode.d.ts","sourceRoot":"https://raw.githubusercontent.com/fb55/entities/61afd4701eaa736978b13c7351cd3de9a96b04bc/src/","sources":["decode.ts"],"names":[],"mappings":"AAAA,OAAO,cAAc,MAAM,iCAAiC,CAAC;AAC7D,OAAO,aAAa,MAAM,gCAAgC,CAAC;AAC3D,OAAO,eAGN,MAAM,uBAAuB,CAAC;AAG/B,OAAO,EAAE,cAAc,EAAE,aAAa,EAAE,eAAe,EAAE,CAAC;AAC1D,OAAO,EAAE,gBAAgB,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAoBxE,oBAAY,YAAY;IACpB,YAAY,QAAwB;IACpC,aAAa,QAAwB;IACrC,U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;;;;;;;;OAQG;IACH,OAAO,CAAC,eAAe;IAkBvB;;;;;;;;OAQG;IACH,OAAO,CAAC,mBAAmB;IAkB3B;;;;;;;;;;;;OAYG;IACH,OAAO,CAAC,iBAAiB;IA6BzB;;;;;;;;OAQG;IACH,OAAO,CAAC,gBAAgB;IAsDxB;;;;OAIG;IACH,OAAO,CAAC,4BAA4B;IAYpC;;;;;;;;OAQG;IACH,OAAO,CAAC,mBAAmB;IAqB3B;;;;;;OAMG;IACH,GAAG,IAAI,MAAM;CA6BhB;AAoDD;;;;;;;;;GASG;AACH,wBAAgB,eAAe,CAC3B,UAAU,EAAE,WAAW,EACvB,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,MAAM,EACf,IAAI,EAAE,MAAM,GACb,MAAM,CAsCR;AAKD;;;;;;GAMG;AACH,wBAAgB,UAAU,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,eAAsB,GAAG,MAAM,CAE1E;AAED;;;;;GAKG;AACH,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAEvD;AAED;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAEpD;AAED;;;;;GAKG;AACH,wBAAgB,SAAS,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAE7C"} \ No newline at end of file diff --git a/node_modules/entities/lib/esm/decode.js b/node_modules/entities/lib/esm/decode.js deleted file mode 100644 index de225ec..0000000 --- a/node_modules/entities/lib/esm/decode.js +++ /dev/null @@ -1,496 +0,0 @@ -import htmlDecodeTree from "./generated/decode-data-html.js"; -import xmlDecodeTree from "./generated/decode-data-xml.js"; -import decodeCodePoint, { replaceCodePoint, fromCodePoint, } from "./decode_codepoint.js"; -// Re-export for use by eg. htmlparser2 -export { htmlDecodeTree, xmlDecodeTree, decodeCodePoint }; -export { replaceCodePoint, fromCodePoint } from "./decode_codepoint.js"; -var CharCodes; -(function (CharCodes) { - CharCodes[CharCodes["NUM"] = 35] = "NUM"; - CharCodes[CharCodes["SEMI"] = 59] = "SEMI"; - CharCodes[CharCodes["EQUALS"] = 61] = "EQUALS"; - CharCodes[CharCodes["ZERO"] = 48] = "ZERO"; - CharCodes[CharCodes["NINE"] = 57] = "NINE"; - CharCodes[CharCodes["LOWER_A"] = 97] = "LOWER_A"; - CharCodes[CharCodes["LOWER_F"] = 102] = "LOWER_F"; - CharCodes[CharCodes["LOWER_X"] = 120] = "LOWER_X"; - CharCodes[CharCodes["LOWER_Z"] = 122] = "LOWER_Z"; - CharCodes[CharCodes["UPPER_A"] = 65] = "UPPER_A"; - CharCodes[CharCodes["UPPER_F"] = 70] = "UPPER_F"; - CharCodes[CharCodes["UPPER_Z"] = 90] = "UPPER_Z"; -})(CharCodes || (CharCodes = {})); -/** Bit that needs to be set to convert an upper case ASCII character to lower case */ -const TO_LOWER_BIT = 0b100000; -export var BinTrieFlags; -(function (BinTrieFlags) { - BinTrieFlags[BinTrieFlags["VALUE_LENGTH"] = 49152] = "VALUE_LENGTH"; - BinTrieFlags[BinTrieFlags["BRANCH_LENGTH"] = 16256] = "BRANCH_LENGTH"; - BinTrieFlags[BinTrieFlags["JUMP_TABLE"] = 127] = "JUMP_TABLE"; -})(BinTrieFlags || (BinTrieFlags = {})); -function isNumber(code) { - return code >= CharCodes.ZERO && code <= CharCodes.NINE; -} -function isHexadecimalCharacter(code) { - return ((code >= CharCodes.UPPER_A && code <= CharCodes.UPPER_F) || - (code >= CharCodes.LOWER_A && code <= CharCodes.LOWER_F)); -} -function isAsciiAlphaNumeric(code) { - return ((code >= CharCodes.UPPER_A && code <= CharCodes.UPPER_Z) || - (code >= CharCodes.LOWER_A && code <= CharCodes.LOWER_Z) || - isNumber(code)); -} -/** - * Checks if the given character is a valid end character for an entity in an attribute. - * - * Attribute values that aren't terminated properly aren't parsed, and shouldn't lead to a parser error. - * See the example in https://html.spec.whatwg.org/multipage/parsing.html#named-character-reference-state - */ -function isEntityInAttributeInvalidEnd(code) { - return code === CharCodes.EQUALS || isAsciiAlphaNumeric(code); -} -var EntityDecoderState; -(function (EntityDecoderState) { - EntityDecoderState[EntityDecoderState["EntityStart"] = 0] = "EntityStart"; - EntityDecoderState[EntityDecoderState["NumericStart"] = 1] = "NumericStart"; - EntityDecoderState[EntityDecoderState["NumericDecimal"] = 2] = "NumericDecimal"; - EntityDecoderState[EntityDecoderState["NumericHex"] = 3] = "NumericHex"; - EntityDecoderState[EntityDecoderState["NamedEntity"] = 4] = "NamedEntity"; -})(EntityDecoderState || (EntityDecoderState = {})); -export var DecodingMode; -(function (DecodingMode) { - /** Entities in text nodes that can end with any character. */ - DecodingMode[DecodingMode["Legacy"] = 0] = "Legacy"; - /** Only allow entities terminated with a semicolon. */ - DecodingMode[DecodingMode["Strict"] = 1] = "Strict"; - /** Entities in attributes have limitations on ending characters. */ - DecodingMode[DecodingMode["Attribute"] = 2] = "Attribute"; -})(DecodingMode || (DecodingMode = {})); -/** - * Token decoder with support of writing partial entities. - */ -export class EntityDecoder { - constructor( - /** The tree used to decode entities. */ - decodeTree, - /** - * The function that is called when a codepoint is decoded. - * - * For multi-byte named entities, this will be called multiple times, - * with the second codepoint, and the same `consumed` value. - * - * @param codepoint The decoded codepoint. - * @param consumed The number of bytes consumed by the decoder. - */ - emitCodePoint, - /** An object that is used to produce errors. */ - errors) { - this.decodeTree = decodeTree; - this.emitCodePoint = emitCodePoint; - this.errors = errors; - /** The current state of the decoder. */ - this.state = EntityDecoderState.EntityStart; - /** Characters that were consumed while parsing an entity. */ - this.consumed = 1; - /** - * The result of the entity. - * - * Either the result index of a numeric entity, or the codepoint of a - * numeric entity. - */ - this.result = 0; - /** The current index in the decode tree. */ - this.treeIndex = 0; - /** The number of characters that were consumed in excess. */ - this.excess = 1; - /** The mode in which the decoder is operating. */ - this.decodeMode = DecodingMode.Strict; - } - /** Resets the instance to make it reusable. */ - startEntity(decodeMode) { - this.decodeMode = decodeMode; - this.state = EntityDecoderState.EntityStart; - this.result = 0; - this.treeIndex = 0; - this.excess = 1; - this.consumed = 1; - } - /** - * Write an entity to the decoder. This can be called multiple times with partial entities. - * If the entity is incomplete, the decoder will return -1. - * - * Mirrors the implementation of `getDecoder`, but with the ability to stop decoding if the - * entity is incomplete, and resume when the next string is written. - * - * @param string The string containing the entity (or a continuation of the entity). - * @param offset The offset at which the entity begins. Should be 0 if this is not the first call. - * @returns The number of characters that were consumed, or -1 if the entity is incomplete. - */ - write(str, offset) { - switch (this.state) { - case EntityDecoderState.EntityStart: { - if (str.charCodeAt(offset) === CharCodes.NUM) { - this.state = EntityDecoderState.NumericStart; - this.consumed += 1; - return this.stateNumericStart(str, offset + 1); - } - this.state = EntityDecoderState.NamedEntity; - return this.stateNamedEntity(str, offset); - } - case EntityDecoderState.NumericStart: { - return this.stateNumericStart(str, offset); - } - case EntityDecoderState.NumericDecimal: { - return this.stateNumericDecimal(str, offset); - } - case EntityDecoderState.NumericHex: { - return this.stateNumericHex(str, offset); - } - case EntityDecoderState.NamedEntity: { - return this.stateNamedEntity(str, offset); - } - } - } - /** - * Switches between the numeric decimal and hexadecimal states. - * - * Equivalent to the `Numeric character reference state` in the HTML spec. - * - * @param str The string containing the entity (or a continuation of the entity). - * @param offset The current offset. - * @returns The number of characters that were consumed, or -1 if the entity is incomplete. - */ - stateNumericStart(str, offset) { - if (offset >= str.length) { - return -1; - } - if ((str.charCodeAt(offset) | TO_LOWER_BIT) === CharCodes.LOWER_X) { - this.state = EntityDecoderState.NumericHex; - this.consumed += 1; - return this.stateNumericHex(str, offset + 1); - } - this.state = EntityDecoderState.NumericDecimal; - return this.stateNumericDecimal(str, offset); - } - addToNumericResult(str, start, end, base) { - if (start !== end) { - const digitCount = end - start; - this.result = - this.result * Math.pow(base, digitCount) + - parseInt(str.substr(start, digitCount), base); - this.consumed += digitCount; - } - } - /** - * Parses a hexadecimal numeric entity. - * - * Equivalent to the `Hexademical character reference state` in the HTML spec. - * - * @param str The string containing the entity (or a continuation of the entity). - * @param offset The current offset. - * @returns The number of characters that were consumed, or -1 if the entity is incomplete. - */ - stateNumericHex(str, offset) { - const startIdx = offset; - while (offset < str.length) { - const char = str.charCodeAt(offset); - if (isNumber(char) || isHexadecimalCharacter(char)) { - offset += 1; - } - else { - this.addToNumericResult(str, startIdx, offset, 16); - return this.emitNumericEntity(char, 3); - } - } - this.addToNumericResult(str, startIdx, offset, 16); - return -1; - } - /** - * Parses a decimal numeric entity. - * - * Equivalent to the `Decimal character reference state` in the HTML spec. - * - * @param str The string containing the entity (or a continuation of the entity). - * @param offset The current offset. - * @returns The number of characters that were consumed, or -1 if the entity is incomplete. - */ - stateNumericDecimal(str, offset) { - const startIdx = offset; - while (offset < str.length) { - const char = str.charCodeAt(offset); - if (isNumber(char)) { - offset += 1; - } - else { - this.addToNumericResult(str, startIdx, offset, 10); - return this.emitNumericEntity(char, 2); - } - } - this.addToNumericResult(str, startIdx, offset, 10); - return -1; - } - /** - * Validate and emit a numeric entity. - * - * Implements the logic from the `Hexademical character reference start - * state` and `Numeric character reference end state` in the HTML spec. - * - * @param lastCp The last code point of the entity. Used to see if the - * entity was terminated with a semicolon. - * @param expectedLength The minimum number of characters that should be - * consumed. Used to validate that at least one digit - * was consumed. - * @returns The number of characters that were consumed. - */ - emitNumericEntity(lastCp, expectedLength) { - var _a; - // Ensure we consumed at least one digit. - if (this.consumed <= expectedLength) { - (_a = this.errors) === null || _a === void 0 ? void 0 : _a.absenceOfDigitsInNumericCharacterReference(this.consumed); - return 0; - } - // Figure out if this is a legit end of the entity - if (lastCp === CharCodes.SEMI) { - this.consumed += 1; - } - else if (this.decodeMode === DecodingMode.Strict) { - return 0; - } - this.emitCodePoint(replaceCodePoint(this.result), this.consumed); - if (this.errors) { - if (lastCp !== CharCodes.SEMI) { - this.errors.missingSemicolonAfterCharacterReference(); - } - this.errors.validateNumericCharacterReference(this.result); - } - return this.consumed; - } - /** - * Parses a named entity. - * - * Equivalent to the `Named character reference state` in the HTML spec. - * - * @param str The string containing the entity (or a continuation of the entity). - * @param offset The current offset. - * @returns The number of characters that were consumed, or -1 if the entity is incomplete. - */ - stateNamedEntity(str, offset) { - const { decodeTree } = this; - let current = decodeTree[this.treeIndex]; - // The mask is the number of bytes of the value, including the current byte. - let valueLength = (current & BinTrieFlags.VALUE_LENGTH) >> 14; - for (; offset < str.length; offset++, this.excess++) { - const char = str.charCodeAt(offset); - this.treeIndex = determineBranch(decodeTree, current, this.treeIndex + Math.max(1, valueLength), char); - if (this.treeIndex < 0) { - return this.result === 0 || - // If we are parsing an attribute - (this.decodeMode === DecodingMode.Attribute && - // We shouldn't have consumed any characters after the entity, - (valueLength === 0 || - // And there should be no invalid characters. - isEntityInAttributeInvalidEnd(char))) - ? 0 - : this.emitNotTerminatedNamedEntity(); - } - current = decodeTree[this.treeIndex]; - valueLength = (current & BinTrieFlags.VALUE_LENGTH) >> 14; - // If the branch is a value, store it and continue - if (valueLength !== 0) { - // If the entity is terminated by a semicolon, we are done. - if (char === CharCodes.SEMI) { - return this.emitNamedEntityData(this.treeIndex, valueLength, this.consumed + this.excess); - } - // If we encounter a non-terminated (legacy) entity while parsing strictly, then ignore it. - if (this.decodeMode !== DecodingMode.Strict) { - this.result = this.treeIndex; - this.consumed += this.excess; - this.excess = 0; - } - } - } - return -1; - } - /** - * Emit a named entity that was not terminated with a semicolon. - * - * @returns The number of characters consumed. - */ - emitNotTerminatedNamedEntity() { - var _a; - const { result, decodeTree } = this; - const valueLength = (decodeTree[result] & BinTrieFlags.VALUE_LENGTH) >> 14; - this.emitNamedEntityData(result, valueLength, this.consumed); - (_a = this.errors) === null || _a === void 0 ? void 0 : _a.missingSemicolonAfterCharacterReference(); - return this.consumed; - } - /** - * Emit a named entity. - * - * @param result The index of the entity in the decode tree. - * @param valueLength The number of bytes in the entity. - * @param consumed The number of characters consumed. - * - * @returns The number of characters consumed. - */ - emitNamedEntityData(result, valueLength, consumed) { - const { decodeTree } = this; - this.emitCodePoint(valueLength === 1 - ? decodeTree[result] & ~BinTrieFlags.VALUE_LENGTH - : decodeTree[result + 1], consumed); - if (valueLength === 3) { - // For multi-byte values, we need to emit the second byte. - this.emitCodePoint(decodeTree[result + 2], consumed); - } - return consumed; - } - /** - * Signal to the parser that the end of the input was reached. - * - * Remaining data will be emitted and relevant errors will be produced. - * - * @returns The number of characters consumed. - */ - end() { - var _a; - switch (this.state) { - case EntityDecoderState.NamedEntity: { - // Emit a named entity if we have one. - return this.result !== 0 && - (this.decodeMode !== DecodingMode.Attribute || - this.result === this.treeIndex) - ? this.emitNotTerminatedNamedEntity() - : 0; - } - // Otherwise, emit a numeric entity if we have one. - case EntityDecoderState.NumericDecimal: { - return this.emitNumericEntity(0, 2); - } - case EntityDecoderState.NumericHex: { - return this.emitNumericEntity(0, 3); - } - case EntityDecoderState.NumericStart: { - (_a = this.errors) === null || _a === void 0 ? void 0 : _a.absenceOfDigitsInNumericCharacterReference(this.consumed); - return 0; - } - case EntityDecoderState.EntityStart: { - // Return 0 if we have no entity. - return 0; - } - } - } -} -/** - * Creates a function that decodes entities in a string. - * - * @param decodeTree The decode tree. - * @returns A function that decodes entities in a string. - */ -function getDecoder(decodeTree) { - let ret = ""; - const decoder = new EntityDecoder(decodeTree, (str) => (ret += fromCodePoint(str))); - return function decodeWithTrie(str, decodeMode) { - let lastIndex = 0; - let offset = 0; - while ((offset = str.indexOf("&", offset)) >= 0) { - ret += str.slice(lastIndex, offset); - decoder.startEntity(decodeMode); - const len = decoder.write(str, - // Skip the "&" - offset + 1); - if (len < 0) { - lastIndex = offset + decoder.end(); - break; - } - lastIndex = offset + len; - // If `len` is 0, skip the current `&` and continue. - offset = len === 0 ? lastIndex + 1 : lastIndex; - } - const result = ret + str.slice(lastIndex); - // Make sure we don't keep a reference to the final string. - ret = ""; - return result; - }; -} -/** - * Determines the branch of the current node that is taken given the current - * character. This function is used to traverse the trie. - * - * @param decodeTree The trie. - * @param current The current node. - * @param nodeIdx The index right after the current node and its value. - * @param char The current character. - * @returns The index of the next node, or -1 if no branch is taken. - */ -export function determineBranch(decodeTree, current, nodeIdx, char) { - const branchCount = (current & BinTrieFlags.BRANCH_LENGTH) >> 7; - const jumpOffset = current & BinTrieFlags.JUMP_TABLE; - // Case 1: Single branch encoded in jump offset - if (branchCount === 0) { - return jumpOffset !== 0 && char === jumpOffset ? nodeIdx : -1; - } - // Case 2: Multiple branches encoded in jump table - if (jumpOffset) { - const value = char - jumpOffset; - return value < 0 || value >= branchCount - ? -1 - : decodeTree[nodeIdx + value] - 1; - } - // Case 3: Multiple branches encoded in dictionary - // Binary search for the character. - let lo = nodeIdx; - let hi = lo + branchCount - 1; - while (lo <= hi) { - const mid = (lo + hi) >>> 1; - const midVal = decodeTree[mid]; - if (midVal < char) { - lo = mid + 1; - } - else if (midVal > char) { - hi = mid - 1; - } - else { - return decodeTree[mid + branchCount]; - } - } - return -1; -} -const htmlDecoder = getDecoder(htmlDecodeTree); -const xmlDecoder = getDecoder(xmlDecodeTree); -/** - * Decodes an HTML string. - * - * @param str The string to decode. - * @param mode The decoding mode. - * @returns The decoded string. - */ -export function decodeHTML(str, mode = DecodingMode.Legacy) { - return htmlDecoder(str, mode); -} -/** - * Decodes an HTML string in an attribute. - * - * @param str The string to decode. - * @returns The decoded string. - */ -export function decodeHTMLAttribute(str) { - return htmlDecoder(str, DecodingMode.Attribute); -} -/** - * Decodes an HTML string, requiring all entities to be terminated by a semicolon. - * - * @param str The string to decode. - * @returns The decoded string. - */ -export function decodeHTMLStrict(str) { - return htmlDecoder(str, DecodingMode.Strict); -} -/** - * Decodes an XML string, requiring all entities to be terminated by a semicolon. - * - * @param str The string to decode. - * @returns The decoded string. - */ -export function decodeXML(str) { - return xmlDecoder(str, DecodingMode.Strict); -} -//# sourceMappingURL=decode.js.map \ No newline at end of file diff --git a/node_modules/entities/lib/esm/decode.js.map b/node_modules/entities/lib/esm/decode.js.map deleted file mode 100644 index 2db1510..0000000 --- a/node_modules/entities/lib/esm/decode.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"decode.js","sourceRoot":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GAAG,CAAC,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC,CAAC;QAC5B,MAAM,MAAM,GAAG,UAAU,CAAC,GAAG,CAAC,CAAC;QAE/B,IAAI,MAAM,GAAG,IAAI,EAAE;YACf,EAAE,GAAG,GAAG,GAAG,CAAC,CAAC;SAChB;aAAM,IAAI,MAAM,GAAG,IAAI,EAAE;YACtB,EAAE,GAAG,GAAG,GAAG,CAAC,CAAC;SAChB;aAAM;YACH,OAAO,UAAU,CAAC,GAAG,GAAG,WAAW,CAAC,CAAC;SACxC;KACJ;IAED,OAAO,CAAC,CAAC,CAAC;AACd,CAAC;AAED,MAAM,WAAW,GAAG,UAAU,CAAC,cAAc,CAAC,CAAC;AAC/C,MAAM,UAAU,GAAG,UAAU,CAAC,aAAa,CAAC,CAAC;AAE7C;;;;;;GAMG;AACH,MAAM,UAAU,UAAU,CAAC,GAAW,EAAE,IAAI,GAAG,YAAY,CAAC,MAAM;IAC9D,OAAO,WAAW,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC;AAClC,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,mBAAmB,CAAC,GAAW;IAC3C,OAAO,WAAW,CAAC,GAAG,EAAE,YAAY,CAAC,SAAS,CAAC,CAAC;AACpD,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,gBAAgB,CAAC,GAAW;IACxC,OAAO,WAAW,CAAC,GAAG,EAAE,YAAY,CAAC,MAAM,CAAC,CAAC;AACjD,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,SAAS,CAAC,GAAW;IACjC,OAAO,UAAU,CAAC,GAAG,EAAE,YAAY,CAAC,MAAM,CAAC,CAAC;AAChD,CAAC"} \ No newline at end of file diff --git a/node_modules/entities/lib/esm/decode_codepoint.d.ts b/node_modules/entities/lib/esm/decode_codepoint.d.ts deleted file mode 100644 index 84ae206..0000000 --- a/node_modules/entities/lib/esm/decode_codepoint.d.ts +++ /dev/null @@ -1,19 +0,0 @@ -/** - * Polyfill for `String.fromCodePoint`. It is used to create a string from a Unicode code point. - */ -export declare const fromCodePoint: (...codePoints: number[]) => string; -/** - * Replace the given code point with a replacement character if it is a - * surrogate or is outside the valid range. Otherwise return the code - * point unchanged. - */ -export declare function replaceCodePoint(codePoint: number): number; -/** - * Replace the code point if relevant, then convert it to a string. - * - * @deprecated Use `fromCodePoint(replaceCodePoint(codePoint))` instead. - * @param codePoint The code point to decode. - * @returns The decoded code point. - */ -export default function decodeCodePoint(codePoint: number): string; -//# sourceMappingURL=decode_codepoint.d.ts.map \ No newline at end of file diff --git a/node_modules/entities/lib/esm/decode_codepoint.d.ts.map b/node_modules/entities/lib/esm/decode_codepoint.d.ts.map deleted file mode 100644 index 38a8dea..0000000 --- a/node_modules/entities/lib/esm/decode_codepoint.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"decode_codepoint.d.ts","sourceRoot":"https://raw.githubusercontent.com/fb55/entities/61afd4701eaa736978b13c7351cd3de9a96b04bc/src/","sources":["decode_codepoint.ts"],"names":[],"mappings":"AAkCA;;GAEG;AACH,eAAO,MAAM,aAAa,qCAgBrB,CAAC;AAEN;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,SAAS,EAAE,MAAM,UAMjD;AAED;;;;;;GAMG;AACH,MAAM,CAAC,OAAO,UAAU,eAAe,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAEjE"} \ No newline at end of file diff --git a/node_modules/entities/lib/esm/decode_codepoint.js b/node_modules/entities/lib/esm/decode_codepoint.js deleted file mode 100644 index 4d8281e..0000000 --- a/node_modules/entities/lib/esm/decode_codepoint.js +++ /dev/null @@ -1,71 +0,0 @@ -// Adapted from https://github.com/mathiasbynens/he/blob/36afe179392226cf1b6ccdb16ebbb7a5a844d93a/src/he.js#L106-L134 -var _a; -const decodeMap = new Map([ - [0, 65533], - // C1 Unicode control character reference replacements - [128, 8364], - [130, 8218], - [131, 402], - [132, 8222], - [133, 8230], - [134, 8224], - [135, 8225], - [136, 710], - [137, 8240], - [138, 352], - [139, 8249], - [140, 338], - [142, 381], - [145, 8216], - [146, 8217], - [147, 8220], - [148, 8221], - [149, 8226], - [150, 8211], - [151, 8212], - [152, 732], - [153, 8482], - [154, 353], - [155, 8250], - [156, 339], - [158, 382], - [159, 376], -]); -/** - * Polyfill for `String.fromCodePoint`. It is used to create a string from a Unicode code point. - */ -export const fromCodePoint = -// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition, node/no-unsupported-features/es-builtins -(_a = String.fromCodePoint) !== null && _a !== void 0 ? _a : function (codePoint) { - let output = ""; - if (codePoint > 0xffff) { - codePoint -= 0x10000; - output += String.fromCharCode(((codePoint >>> 10) & 0x3ff) | 0xd800); - codePoint = 0xdc00 | (codePoint & 0x3ff); - } - output += String.fromCharCode(codePoint); - return output; -}; -/** - * Replace the given code point with a replacement character if it is a - * surrogate or is outside the valid range. Otherwise return the code - * point unchanged. - */ -export function replaceCodePoint(codePoint) { - var _a; - if ((codePoint >= 0xd800 && codePoint <= 0xdfff) || codePoint > 0x10ffff) { - return 0xfffd; - } - return (_a = decodeMap.get(codePoint)) !== null && _a !== void 0 ? _a : codePoint; -} -/** - * Replace the code point if relevant, then convert it to a string. - * - * @deprecated Use `fromCodePoint(replaceCodePoint(codePoint))` instead. - * @param codePoint The code point to decode. - * @returns The decoded code point. - */ -export default function decodeCodePoint(codePoint) { - return fromCodePoint(replaceCodePoint(codePoint)); -} -//# sourceMappingURL=decode_codepoint.js.map \ No newline at end of file diff --git a/node_modules/entities/lib/esm/decode_codepoint.js.map b/node_modules/entities/lib/esm/decode_codepoint.js.map deleted file mode 100644 index 53a32b6..0000000 --- a/node_modules/entities/lib/esm/decode_codepoint.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"decode_codepoint.js","sourceRoot":"https://raw.githubusercontent.com/fb55/entities/61afd4701eaa736978b13c7351cd3de9a96b04bc/src/","sources":["decode_codepoint.ts"],"names":[],"mappings":"AAAA,qHAAqH;;AAErH,MAA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S,IAAI,OAAO,CAAC;QACrB,MAAM,IAAI,MAAM,CAAC,YAAY,CACzB,CAAC,CAAC,SAAS,KAAK,EAAE,CAAC,GAAG,KAAK,CAAC,GAAG,MAAM,CACxC,CAAC;QACF,SAAS,GAAG,MAAM,GAAG,CAAC,SAAS,GAAG,KAAK,CAAC,CAAC;KAC5C;IAED,MAAM,IAAI,MAAM,CAAC,YAAY,CAAC,SAAS,CAAC,CAAC;IACzC,OAAO,MAAM,CAAC;AAClB,CAAC,CAAC;AAEN;;;;GAIG;AACH,MAAM,UAAU,gBAAgB,CAAC,SAAiB;;IAC9C,IAAI,CAAC,SAAS,IAAI,MAAM,IAAI,SAAS,IAAI,MAAM,CAAC,IAAI,SAAS,GAAG,QAAQ,EAAE;QACtE,OAAO,MAAM,CAAC;KACjB;IAED,OAAO,MAAA,SAAS,CAAC,GAAG,CAAC,SAAS,CAAC,mCAAI,SAAS,CAAC;AACjD,CAAC;AAED;;;;;;GAMG;AACH,MAAM,CAAC,OAAO,UAAU,eAAe,CAAC,SAAiB;IACrD,OAAO,aAAa,CAAC,gBAAgB,CAAC,SAAS,CAAC,CAAC,CAAC;AACtD,CAAC"} \ No newline at end of file diff --git a/node_modules/entities/lib/esm/encode.d.ts b/node_modules/entities/lib/esm/encode.d.ts deleted file mode 100644 index f09c4ee..0000000 --- a/node_modules/entities/lib/esm/encode.d.ts +++ /dev/null @@ -1,22 +0,0 @@ -/** - * Encodes all characters in the input using HTML entities. This includes - * characters that are valid ASCII characters in HTML documents, such as `#`. - * - * To get a more compact output, consider using the `encodeNonAsciiHTML` - * function, which will only encode characters that are not valid in HTML - * documents, as well as non-ASCII characters. - * - * If a character has no equivalent entity, a numeric hexadecimal reference - * (eg. `ü`) will be used. - */ -export declare function encodeHTML(data: string): string; -/** - * Encodes all non-ASCII characters, as well as characters not valid in HTML - * documents using HTML entities. This function will not encode characters that - * are valid in HTML documents, such as `#`. - * - * If a character has no equivalent entity, a numeric hexadecimal reference - * (eg. `ü`) will be used. - */ -export declare function encodeNonAsciiHTML(data: string): string; -//# sourceMappingURL=encode.d.ts.map \ No newline at end of file diff --git a/node_modules/entities/lib/esm/encode.d.ts.map b/node_modules/entities/lib/esm/encode.d.ts.map deleted file mode 100644 index e24c05b..0000000 --- a/node_modules/entities/lib/esm/encode.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"encode.d.ts","sourceRoot":"https://raw.githubusercontent.com/fb55/entities/61afd4701eaa736978b13c7351cd3de9a96b04bc/src/","sources":["encode.ts"],"names":[],"mappings":"AAKA;;;;;;;;;;GAUG;AACH,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAE/C;AACD;;;;;;;GAOG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAEvD"} \ No newline at end of file diff --git a/node_modules/entities/lib/esm/encode.js b/node_modules/entities/lib/esm/encode.js deleted file mode 100644 index 9c2364f..0000000 --- a/node_modules/entities/lib/esm/encode.js +++ /dev/null @@ -1,69 +0,0 @@ -import htmlTrie from "./generated/encode-html.js"; -import { xmlReplacer, getCodePoint } from "./escape.js"; -const htmlReplacer = /[\t\n!-,./:-@[-`\f{-}$\x80-\uFFFF]/g; -/** - * Encodes all characters in the input using HTML entities. This includes - * characters that are valid ASCII characters in HTML documents, such as `#`. - * - * To get a more compact output, consider using the `encodeNonAsciiHTML` - * function, which will only encode characters that are not valid in HTML - * documents, as well as non-ASCII characters. - * - * If a character has no equivalent entity, a numeric hexadecimal reference - * (eg. `ü`) will be used. - */ -export function encodeHTML(data) { - return encodeHTMLTrieRe(htmlReplacer, data); -} -/** - * Encodes all non-ASCII characters, as well as characters not valid in HTML - * documents using HTML entities. This function will not encode characters that - * are valid in HTML documents, such as `#`. - * - * If a character has no equivalent entity, a numeric hexadecimal reference - * (eg. `ü`) will be used. - */ -export function encodeNonAsciiHTML(data) { - return encodeHTMLTrieRe(xmlReplacer, data); -} -function encodeHTMLTrieRe(regExp, str) { - let ret = ""; - let lastIdx = 0; - let match; - while ((match = regExp.exec(str)) !== null) { - const i = match.index; - ret += str.substring(lastIdx, i); - const char = str.charCodeAt(i); - let next = htmlTrie.get(char); - if (typeof next === "object") { - // We are in a branch. Try to match the next char. - if (i + 1 < str.length) { - const nextChar = str.charCodeAt(i + 1); - const value = typeof next.n === "number" - ? next.n === nextChar - ? next.o - : undefined - : next.n.get(nextChar); - if (value !== undefined) { - ret += value; - lastIdx = regExp.lastIndex += 1; - continue; - } - } - next = next.v; - } - // We might have a tree node without a value; skip and use a numeric entity. - if (next !== undefined) { - ret += next; - lastIdx = i + 1; - } - else { - const cp = getCodePoint(str, i); - ret += `&#x${cp.toString(16)};`; - // Increase by 1 if we have a surrogate pair - lastIdx = regExp.lastIndex += Number(cp !== char); - } - } - return ret + str.substr(lastIdx); -} -//# sourceMappingURL=encode.js.map \ No newline at end of file diff --git a/node_modules/entities/lib/esm/encode.js.map b/node_modules/entities/lib/esm/encode.js.map deleted file mode 100644 index 14ac068..0000000 --- a/node_modules/entities/lib/esm/encode.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"encode.js","sourceRoot":"https://raw.githubusercontent.com/fb55/entities/61afd4701eaa736978b13c7351cd3de9a96b04bc/src/","sources":["encode.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,MAAM,4BAA4B,CAAC;AAClD,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAExD,MAAM,YAAY,GAAG,qCAAqC,CAAC;AAE3D;;;;;;;;;;GAUG;AACH,MAAM,UAAU,UAAU,CAAC,IAAY;IACnC,OAAO,gBAAgB,CAAC,YAAY,EAAE,IAAI,CAAC,CAAC;AAChD,CAAC;AACD;;;;;;;GAOG;AACH,MAAM,UAAU,kBAAkB,CAAC,IAAY;IAC3C,OAAO,gBAAgB,CAAC,WAAW,EAAE,IAAI,CAAC,CAAC;AAC/C,CAAC;AAED,SAAS,gBAAgB,CAAC,MAAc,EA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H,MAAM,EAAE,GAAG,YAAY,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC;YAChC,GAAG,IAAI,MAAM,EAAE,CAAC,QAAQ,CAAC,EAAE,CAAC,GAAG,CAAC;YAChC,4CAA4C;YAC5C,OAAO,GAAG,MAAM,CAAC,SAAS,IAAI,MAAM,CAAC,EAAE,KAAK,IAAI,CAAC,CAAC;SACrD;KACJ;IAED,OAAO,GAAG,GAAG,GAAG,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;AACrC,CAAC"} \ No newline at end of file diff --git a/node_modules/entities/lib/esm/escape.d.ts b/node_modules/entities/lib/esm/escape.d.ts deleted file mode 100644 index c07ecdc..0000000 --- a/node_modules/entities/lib/esm/escape.d.ts +++ /dev/null @@ -1,43 +0,0 @@ -export declare const xmlReplacer: RegExp; -export declare const getCodePoint: (str: string, index: number) => number; -/** - * Encodes all non-ASCII characters, as well as characters not valid in XML - * documents using XML entities. - * - * If a character has no equivalent entity, a - * numeric hexadecimal reference (eg. `ü`) will be used. - */ -export declare function encodeXML(str: string): string; -/** - * Encodes all non-ASCII characters, as well as characters not valid in XML - * documents using numeric hexadecimal reference (eg. `ü`). - * - * Have a look at `escapeUTF8` if you want a more concise output at the expense - * of reduced transportability. - * - * @param data String to escape. - */ -export declare const escape: typeof encodeXML; -/** - * Encodes all characters not valid in XML documents using XML entities. - * - * Note that the output will be character-set dependent. - * - * @param data String to escape. - */ -export declare const escapeUTF8: (data: string) => string; -/** - * Encodes all characters that have to be escaped in HTML attributes, - * following {@link https://html.spec.whatwg.org/multipage/parsing.html#escapingString}. - * - * @param data String to escape. - */ -export declare const escapeAttribute: (data: string) => string; -/** - * Encodes all characters that have to be escaped in HTML text, - * following {@link https://html.spec.whatwg.org/multipage/parsing.html#escapingString}. - * - * @param data String to escape. - */ -export declare const escapeText: (data: string) => string; -//# sourceMappingURL=escape.d.ts.map \ No newline at end of file diff --git a/node_modules/entities/lib/esm/escape.d.ts.map b/node_modules/entities/lib/esm/escape.d.ts.map deleted file mode 100644 index fa19825..0000000 --- a/node_modules/entities/lib/esm/escape.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"escape.d.ts","sourceRoot":"https://raw.githubusercontent.com/fb55/entities/61afd4701eaa736978b13c7351cd3de9a96b04bc/src/","sources":["escape.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,WAAW,QAAyB,CAAC;AAWlD,eAAO,MAAM,YAAY,QAGT,MAAM,SAAS,MAAM,KAAG,MAQD,CAAC;AAExC;;;;;;GAMG;AACH,wBAAgB,SAAS,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CA0B7C;AAED;;;;;;;;GAQG;AACH,eAAO,MAAM,MAAM,kBAAY,CAAC;AAqChC;;;;;;GAMG;AACH,eAAO,MAAM,UAAU,SA7Bb,MAAM,KAAK,MA6BuC,CAAC;AAE7D;;;;;GAKG;AACH,eAAO,MAAM,eAAe,SArClB,MAAM,KAAK,MA4CpB,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,UAAU,SApDb,MAAM,KAAK,MA4DpB,CAAC"} \ No newline at end of file diff --git a/node_modules/entities/lib/esm/escape.js b/node_modules/entities/lib/esm/escape.js deleted file mode 100644 index c64da6e..0000000 --- a/node_modules/entities/lib/esm/escape.js +++ /dev/null @@ -1,116 +0,0 @@ -export const xmlReplacer = /["&'<>$\x80-\uFFFF]/g; -const xmlCodeMap = new Map([ - [34, """], - [38, "&"], - [39, "'"], - [60, "<"], - [62, ">"], -]); -// For compatibility with node < 4, we wrap `codePointAt` -export const getCodePoint = -// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -String.prototype.codePointAt != null - ? (str, index) => str.codePointAt(index) - : // http://mathiasbynens.be/notes/javascript-encoding#surrogate-formulae - (c, index) => (c.charCodeAt(index) & 0xfc00) === 0xd800 - ? (c.charCodeAt(index) - 0xd800) * 0x400 + - c.charCodeAt(index + 1) - - 0xdc00 + - 0x10000 - : c.charCodeAt(index); -/** - * Encodes all non-ASCII characters, as well as characters not valid in XML - * documents using XML entities. - * - * If a character has no equivalent entity, a - * numeric hexadecimal reference (eg. `ü`) will be used. - */ -export function encodeXML(str) { - let ret = ""; - let lastIdx = 0; - let match; - while ((match = xmlReplacer.exec(str)) !== null) { - const i = match.index; - const char = str.charCodeAt(i); - const next = xmlCodeMap.get(char); - if (next !== undefined) { - ret += str.substring(lastIdx, i) + next; - lastIdx = i + 1; - } - else { - ret += `${str.substring(lastIdx, i)}&#x${getCodePoint(str, i).toString(16)};`; - // Increase by 1 if we have a surrogate pair - lastIdx = xmlReplacer.lastIndex += Number((char & 0xfc00) === 0xd800); - } - } - return ret + str.substr(lastIdx); -} -/** - * Encodes all non-ASCII characters, as well as characters not valid in XML - * documents using numeric hexadecimal reference (eg. `ü`). - * - * Have a look at `escapeUTF8` if you want a more concise output at the expense - * of reduced transportability. - * - * @param data String to escape. - */ -export const escape = encodeXML; -/** - * Creates a function that escapes all characters matched by the given regular - * expression using the given map of characters to escape to their entities. - * - * @param regex Regular expression to match characters to escape. - * @param map Map of characters to escape to their entities. - * - * @returns Function that escapes all characters matched by the given regular - * expression using the given map of characters to escape to their entities. - */ -function getEscaper(regex, map) { - return function escape(data) { - let match; - let lastIdx = 0; - let result = ""; - while ((match = regex.exec(data))) { - if (lastIdx !== match.index) { - result += data.substring(lastIdx, match.index); - } - // We know that this character will be in the map. - result += map.get(match[0].charCodeAt(0)); - // Every match will be of length 1 - lastIdx = match.index + 1; - } - return result + data.substring(lastIdx); - }; -} -/** - * Encodes all characters not valid in XML documents using XML entities. - * - * Note that the output will be character-set dependent. - * - * @param data String to escape. - */ -export const escapeUTF8 = getEscaper(/[&<>'"]/g, xmlCodeMap); -/** - * Encodes all characters that have to be escaped in HTML attributes, - * following {@link https://html.spec.whatwg.org/multipage/parsing.html#escapingString}. - * - * @param data String to escape. - */ -export const escapeAttribute = getEscaper(/["&\u00A0]/g, new Map([ - [34, """], - [38, "&"], - [160, " "], -])); -/** - * Encodes all characters that have to be escaped in HTML text, - * following {@link https://html.spec.whatwg.org/multipage/parsing.html#escapingString}. - * - * @param data String to escape. - */ -export const escapeText = getEscaper(/[&<>\u00A0]/g, new Map([ - [38, "&"], - [60, "<"], - [62, ">"], - [160, " "], -])); -//# sourceMappingURL=escape.js.map \ No newline at end of file diff --git a/node_modules/entities/lib/esm/escape.js.map b/node_modules/entities/lib/esm/escape.js.map deleted file mode 100644 index 164301c..0000000 --- a/node_modules/entities/lib/esm/escape.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"escape.js","sourceRoot":"https://raw.githubusercontent.com/fb55/entities/61afd4701eaa736978b13c7351cd3de9a96b04bc/src/","sources":["escape.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,WAAW,GAAG,sBAAsB,CAAC;AAElD,MAAM,UAAU,GAAG,IAAI,GAAG,CAAC;IACvB,CAAC,EAAE,EAAE,QAAQ,CAAC;IACd,CAAC,EAAE,EAAE,OAAO,CAAC;IACb,CAAC,EAAE,EAAE,QAAQ,CAAC;IACd,CAAC,EAAE,EAAE,MAAM,CAAC;IACZ,CAAC,EAAE,EAAE,MAAM,CAAC;CACf,CAAC,CAAC;AAEH,yDAAyD;AACzD,MAAM,CAAC,MAAM,YAAY;AACrB,uEAAuE;AACvE,MAAM,CAAC,SAAS,CAAC,WAAW,IAAI,IAAI;IAChC,CAAC,CAAC,CAAC,GAAW,EAAE,KAAa,EAAU,EAAE,CAAC,GAAG,CAAC,WAAW,CAAC,KAAK,CAAE;IACjE,CAAC,CAAC,uEAAuE;QACvE,CAAC,CAAS,EAAE,KAAa,EAAU,EAAE,CACjC,CAAC,CAAC,CAAC,UAAU,CAAC,KAAK,CAAC,GAAG,MAAM,CAAC,KAAK,MAAM;YACrC,CAAC,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,KAAK,CAAC,GAAG,MAAM,CAAC,GAAG,KAAK;gBACtC,CAAC,CAAC,UAAU,CAAC,KAAK,GAAG,CAAC,CAAC;gBACvB,MAAM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AI,OAAO,GAAG,CAAC,CAAC;QAChB,IAAI,MAAM,GAAG,EAAE,CAAC;QAEhB,OAAO,CAAC,KAAK,GAAG,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,EAAE;YAC/B,IAAI,OAAO,KAAK,KAAK,CAAC,KAAK,EAAE;gBACzB,MAAM,IAAI,IAAI,CAAC,SAAS,CAAC,OAAO,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC;aAClD;YAED,kDAAkD;YAClD,MAAM,IAAI,GAAG,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,CAAE,CAAC;YAE3C,kCAAkC;YAClC,OAAO,GAAG,KAAK,CAAC,KAAK,GAAG,CAAC,CAAC;SAC7B;QAED,OAAO,MAAM,GAAG,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC;IAC5C,CAAC,CAAC;AACN,CAAC;AAED;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG,UAAU,CAAC,UAAU,EAAE,UAAU,CAAC,CAAC;AAE7D;;;;;GAKG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,UAAU,CACrC,aAAa,EACb,IAAI,GAAG,CAAC;IACJ,CAAC,EAAE,EAAE,QAAQ,CAAC;IACd,CAAC,EAAE,EAAE,OAAO,CAAC;IACb,CAAC,GAAG,EAAE,QAAQ,CAAC;CAClB,CAAC,CACL,CAAC;AAEF;;;;;GAKG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG,UAAU,CAChC,cAAc,EACd,IAAI,GAAG,CAAC;IACJ,CAAC,EAAE,EAAE,OAAO,CAAC;IACb,CAAC,EAAE,EAAE,MAAM,CAAC;IACZ,CAAC,EAAE,EAAE,MAAM,CAAC;IACZ,CAAC,GAAG,EAAE,QAAQ,CAAC;CAClB,CAAC,CACL,CAAC"} \ No newline at end of file diff --git a/node_modules/entities/lib/esm/generated/decode-data-html.d.ts b/node_modules/entities/lib/esm/generated/decode-data-html.d.ts deleted file mode 100644 index 9cfc4f4..0000000 --- a/node_modules/entities/lib/esm/generated/decode-data-html.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -declare const _default: Uint16Array; -export default _default; -//# sourceMappingURL=decode-data-html.d.ts.map \ No newline at end of file diff --git a/node_modules/entities/lib/esm/generated/decode-data-html.d.ts.map b/node_modules/entities/lib/esm/generated/decode-data-html.d.ts.map deleted file mode 100644 index 6d4d64b..0000000 --- a/node_modules/entities/lib/esm/generated/decode-data-html.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"decode-data-html.d.ts","sourceRoot":"https://raw.githubusercontent.com/fb55/entities/61afd4701eaa736978b13c7351cd3de9a96b04bc/src/","sources":["generated/decode-data-html.ts"],"names":[],"mappings":";AAEA,wBAKE"} \ No newline at end of file diff --git a/node_modules/entities/lib/esm/generated/decode-data-html.js b/node_modules/entities/lib/esm/generated/decode-data-html.js deleted file mode 100644 index 0791b55..0000000 --- a/node_modules/entities/lib/esm/generated/decode-data-html.js +++ /dev/null @@ -1,7 +0,0 @@ -// Generated using scripts/write-decode-map.ts -export default new Uint16Array( -// prettier-ignore -"\u1d41<\xd5\u0131\u028a\u049d\u057b\u05d0\u0675\u06de\u07a2\u07d6\u080f\u0a4a\u0a91\u0da1\u0e6d\u0f09\u0f26\u10ca\u1228\u12e1\u1415\u149d\u14c3\u14df\u1525\0\0\0\0\0\0\u156b\u16cd\u198d\u1c12\u1ddd\u1f7e\u2060\u21b0\u228d\u23c0\u23fb\u2442\u2824\u2912\u2d08\u2e48\u2fce\u3016\u32ba\u3639\u37ac\u38fe\u3a28\u3a71\u3ae0\u3b2e\u0800EMabcfglmnoprstu\\bfms\x7f\x84\x8b\x90\x95\x98\xa6\xb3\xb9\xc8\xcflig\u803b\xc6\u40c6P\u803b&\u4026cute\u803b\xc1\u40c1reve;\u4102\u0100iyx}rc\u803b\xc2\u40c2;\u4410r;\uc000\ud835\udd04rave\u803b\xc0\u40c0pha;\u4391acr;\u4100d;\u6a53\u0100gp\x9d\xa1on;\u4104f;\uc000\ud835\udd38plyFunction;\u6061ing\u803b\xc5\u40c5\u0100cs\xbe\xc3r;\uc000\ud835\udc9cign;\u6254ilde\u803b\xc3\u40c3ml\u803b\xc4\u40c4\u0400aceforsu\xe5\xfb\xfe\u0117\u011c\u0122\u0127\u012a\u0100cr\xea\xf2kslash;\u6216\u0176\xf6\xf8;\u6ae7ed;\u6306y;\u4411\u0180crt\u0105\u010b\u0114ause;\u6235noullis;\u612ca;\u4392r;\uc000\ud835\udd05pf;\uc000\ud835\udd39eve;\u42d8c\xf2\u0113mpeq;\u624e\u0700HOacdefhilorsu\u014d\u0151\u0156\u0180\u019e\u01a2\u01b5\u01b7\u01ba\u01dc\u0215\u0273\u0278\u027ecy;\u4427PY\u803b\xa9\u40a9\u0180cpy\u015d\u0162\u017aute;\u4106\u0100;i\u0167\u0168\u62d2talDifferentialD;\u6145leys;\u612d\u0200aeio\u0189\u018e\u0194\u0198ron;\u410cdil\u803b\xc7\u40c7rc;\u4108nint;\u6230ot;\u410a\u0100dn\u01a7\u01adilla;\u40b8terDot;\u40b7\xf2\u017fi;\u43a7rcle\u0200DMPT\u01c7\u01cb\u01d1\u01d6ot;\u6299inus;\u6296lus;\u6295imes;\u6297o\u0100cs\u01e2\u01f8kwiseContourIntegral;\u6232eCurly\u0100DQ\u0203\u020foubleQuote;\u601duote;\u6019\u0200lnpu\u021e\u0228\u0247\u0255on\u0100;e\u0225\u0226\u6237;\u6a74\u0180git\u022f\u0236\u023aruent;\u6261nt;\u622fourIntegral;\u622e\u0100fr\u024c\u024e;\u6102oduct;\u6210nterClockwiseContourIntegral;\u6233oss;\u6a2fcr;\uc000\ud835\udc9ep\u0100;C\u0284\u0285\u62d3ap;\u624d\u0580DJSZacefios\u02a0\u02ac\u02b0\u02b4\u02b8\u02cb\u02d7\u02e1\u02e6\u0333\u048d\u0100;o\u0179\u02a5trahd;\u6911cy;\u4402cy;\u4405cy;\u440f\u0180grs\u02bf\u02c4\u02c7ger;\u6021r;\u61a1hv;\u6ae4\u0100ay\u02d0\u02d5ron;\u410e;\u4414l\u0100;t\u02dd\u02de\u6207a;\u4394r;\uc000\ud835\udd07\u0100af\u02eb\u0327\u0100cm\u02f0\u0322ritical\u0200ADGT\u0300\u0306\u0316\u031ccute;\u40b4o\u0174\u030b\u030d;\u42d9bleAcute;\u42ddrave;\u4060ilde;\u42dcond;\u62c4ferentialD;\u6146\u0470\u033d\0\0\0\u0342\u0354\0\u0405f;\uc000\ud835\udd3b\u0180;DE\u0348\u0349\u034d\u40a8ot;\u60dcqual;\u6250ble\u0300CDLRUV\u0363\u0372\u0382\u03cf\u03e2\u03f8ontourIntegra\xec\u0239o\u0274\u0379\0\0\u037b\xbb\u0349nArrow;\u61d3\u0100eo\u0387\u03a4ft\u0180ART\u0390\u0396\u03a1rrow;\u61d0ightArrow;\u61d4e\xe5\u02cang\u0100LR\u03ab\u03c4eft\u0100AR\u03b3\u03b9rrow;\u67f8ightArrow;\u67faightArrow;\u67f9ight\u0100AT\u03d8\u03derrow;\u61d2ee;\u62a8p\u0241\u03e9\0\0\u03efrrow;\u61d1ownArrow;\u61d5erticalBar;\u6225n\u0300ABLRTa\u0412\u042a\u0430\u045e\u047f\u037crrow\u0180;BU\u041d\u041e\u0422\u6193ar;\u6913pArrow;\u61f5reve;\u4311eft\u02d2\u043a\0\u0446\0\u0450ightVector;\u6950eeVector;\u695eector\u0100;B\u0459\u045a\u61bdar;\u6956ight\u01d4\u0467\0\u0471eeVector;\u695fector\u0100;B\u047a\u047b\u61c1ar;\u6957ee\u0100;A\u0486\u0487\u62a4rrow;\u61a7\u0100ct\u0492\u0497r;\uc000\ud835\udc9frok;\u4110\u0800NTacdfglmopqstux\u04bd\u04c0\u04c4\u04cb\u04de\u04e2\u04e7\u04ee\u04f5\u0521\u052f\u0536\u0552\u055d\u0560\u0565G;\u414aH\u803b\xd0\u40d0cute\u803b\xc9\u40c9\u0180aiy\u04d2\u04d7\u04dcron;\u411arc\u803b\xca\u40ca;\u442dot;\u4116r;\uc000\ud835\udd08rave\u803b\xc8\u40c8ement;\u6208\u0100ap\u04fa\u04fecr;\u4112ty\u0253\u0506\0\0\u0512mallSquare;\u65fberySmallSquare;\u65ab\u0100gp\u0526\u052aon;\u4118f;\uc000\ud835\udd3csilon;\u4395u\u0100ai\u053c\u0549l\u0100;T\u0542\u0543\u6a75ilde;\u6242librium;\u61cc\u0100ci\u0557\u055ar;\u6130m;\u6a73a;\u4397ml\u803b\xcb\u40cb\u0100ip\u056a\u056fsts;\u6203onentialE;\u6147\u0280cfios\u0585\u0588\u058d\u05b2\u05ccy;\u4424r;\uc000\ud835\udd09lled\u0253\u0597\0\0\u05a3mallSquare;\u65fcerySmallSquare;\u65aa\u0370\u05ba\0\u05bf\0\0\u05c4f;\uc000\ud835\udd3dAll;\u6200riertrf;\u6131c\xf2\u05cb\u0600JTabcdfgorst\u05e8\u05ec\u05ef\u05fa\u0600\u0612\u0616\u061b\u061d\u0623\u066c\u0672cy;\u4403\u803b>\u403emma\u0100;d\u05f7\u05f8\u4393;\u43dcreve;\u411e\u0180eiy\u0607\u060c\u0610dil;\u4122rc;\u411c;\u4413ot;\u4120r;\uc000\ud835\udd0a;\u62d9pf;\uc000\ud835\udd3eeater\u0300EFGLST\u0635\u0644\u064e\u0656\u065b\u0666qual\u0100;L\u063e\u063f\u6265ess;\u62dbullEqual;\u6267reater;\u6aa2ess;\u6277lantEqual;\u6a7eilde;\u6273cr;\uc000\ud835\udca2;\u626b\u0400Aacfiosu\u0685\u068b\u0696\u069b\u069e\u06aa\u06be\u06caRDcy;\u442a\u0100ct\u0690\u0694ek;\u42c7;\u405eirc;\u4124r;\u610clbertSpace;\u610b\u01f0\u06af\0\u06b2f;\u610dizontalLine;\u6500\u0100ct\u06c3\u06c5\xf2\u06a9rok;\u4126mp\u0144\u06d0\u06d8ownHum\xf0\u012fqual;\u624f\u0700EJOacdfgmnostu\u06fa\u06fe\u0703\u0707\u070e\u071a\u071e\u0721\u0728\u0744\u0778\u078b\u078f\u0795cy;\u4415lig;\u4132cy;\u4401cute\u803b\xcd\u40cd\u0100iy\u0713\u0718rc\u803b\xce\u40ce;\u4418ot;\u4130r;\u6111rave\u803b\xcc\u40cc\u0180;ap\u0720\u072f\u073f\u0100cg\u0734\u0737r;\u412ainaryI;\u6148lie\xf3\u03dd\u01f4\u0749\0\u0762\u0100;e\u074d\u074e\u622c\u0100gr\u0753\u0758ral;\u622bsection;\u62c2isible\u0100CT\u076c\u0772omma;\u6063imes;\u6062\u0180gpt\u077f\u0783\u0788on;\u412ef;\uc000\ud835\udd40a;\u4399cr;\u6110ilde;\u4128\u01eb\u079a\0\u079ecy;\u4406l\u803b\xcf\u40cf\u0280cfosu\u07ac\u07b7\u07bc\u07c2\u07d0\u0100iy\u07b1\u07b5rc;\u4134;\u4419r;\uc000\ud835\udd0dpf;\uc000\ud835\udd41\u01e3\u07c7\0\u07ccr;\uc000\ud835\udca5rcy;\u4408kcy;\u4404\u0380HJacfos\u07e4\u07e8\u07ec\u07f1\u07fd\u0802\u0808cy;\u4425cy;\u440cppa;\u439a\u0100ey\u07f6\u07fbdil;\u4136;\u441ar;\uc000\ud835\udd0epf;\uc000\ud835\udd42cr;\uc000\ud835\udca6\u0580JTaceflmost\u0825\u0829\u082c\u0850\u0863\u09b3\u09b8\u09c7\u09cd\u0a37\u0a47cy;\u4409\u803b<\u403c\u0280cmnpr\u0837\u083c\u0841\u0844\u084dute;\u4139bda;\u439bg;\u67ealacetrf;\u6112r;\u619e\u0180aey\u0857\u085c\u0861ron;\u413ddil;\u413b;\u441b\u0100fs\u0868\u0970t\u0500ACDFRTUVar\u087e\u08a9\u08b1\u08e0\u08e6\u08fc\u092f\u095b\u0390\u096a\u0100nr\u0883\u088fgleBracket;\u67e8row\u0180;BR\u0899\u089a\u089e\u6190ar;\u61e4ightArrow;\u61c6eiling;\u6308o\u01f5\u08b7\0\u08c3bleBracket;\u67e6n\u01d4\u08c8\0\u08d2eeVector;\u6961ector\u0100;B\u08db\u08dc\u61c3ar;\u6959loor;\u630aight\u0100AV\u08ef\u08f5rrow;\u6194ector;\u694e\u0100er\u0901\u0917e\u0180;AV\u0909\u090a\u0910\u62a3rrow;\u61a4ector;\u695aiangle\u0180;BE\u0924\u0925\u0929\u62b2ar;\u69cfqual;\u62b4p\u0180DTV\u0937\u0942\u094cownVector;\u6951eeVector;\u6960ector\u0100;B\u0956\u0957\u61bfar;\u6958ector\u0100;B\u0965\u0966\u61bcar;\u6952ight\xe1\u039cs\u0300EFGLST\u097e\u098b\u0995\u099d\u09a2\u09adqualGreater;\u62daullEqual;\u6266reater;\u6276ess;\u6aa1lantEqual;\u6a7dilde;\u6272r;\uc000\ud835\udd0f\u0100;e\u09bd\u09be\u62d8ftarrow;\u61daidot;\u413f\u0180npw\u09d4\u0a16\u0a1bg\u0200LRlr\u09de\u09f7\u0a02\u0a10eft\u0100AR\u09e6\u09ecrrow;\u67f5ightArrow;\u67f7ightArrow;\u67f6eft\u0100ar\u03b3\u0a0aight\xe1\u03bfight\xe1\u03caf;\uc000\ud835\udd43er\u0100LR\u0a22\u0a2ceftArrow;\u6199ightArrow;\u6198\u0180cht\u0a3e\u0a40\u0a42\xf2\u084c;\u61b0rok;\u4141;\u626a\u0400acefiosu\u0a5a\u0a5d\u0a60\u0a77\u0a7c\u0a85\u0a8b\u0a8ep;\u6905y;\u441c\u0100dl\u0a65\u0a6fiumSpace;\u605flintrf;\u6133r;\uc000\ud835\udd10nusPlus;\u6213pf;\uc000\ud835\udd44c\xf2\u0a76;\u439c\u0480Jacefostu\u0aa3\u0aa7\u0aad\u0ac0\u0b14\u0b19\u0d91\u0d97\u0d9ecy;\u440acute;\u4143\u0180aey\u0ab4\u0ab9\u0aberon;\u4147dil;\u4145;\u441d\u0180gsw\u0ac7\u0af0\u0b0eative\u0180MTV\u0ad3\u0adf\u0ae8ediumSpace;\u600bhi\u0100cn\u0ae6\u0ad8\xeb\u0ad9eryThi\xee\u0ad9ted\u0100GL\u0af8\u0b06reaterGreate\xf2\u0673essLes\xf3\u0a48Line;\u400ar;\uc000\ud835\udd11\u0200Bnpt\u0b22\u0b28\u0b37\u0b3areak;\u6060BreakingSpace;\u40a0f;\u6115\u0680;CDEGHLNPRSTV\u0b55\u0b56\u0b6a\u0b7c\u0ba1\u0beb\u0c04\u0c5e\u0c84\u0ca6\u0cd8\u0d61\u0d85\u6aec\u0100ou\u0b5b\u0b64ngruent;\u6262pCap;\u626doubleVerticalBar;\u6226\u0180lqx\u0b83\u0b8a\u0b9bement;\u6209ual\u0100;T\u0b92\u0b93\u6260ilde;\uc000\u2242\u0338ists;\u6204reater\u0380;EFGLST\u0bb6\u0bb7\u0bbd\u0bc9\u0bd3\u0bd8\u0be5\u626fqual;\u6271ullEqual;\uc000\u2267\u0338reater;\uc000\u226b\u0338ess;\u6279lantEqual;\uc000\u2a7e\u0338ilde;\u6275ump\u0144\u0bf2\u0bfdownHump;\uc000\u224e\u0338qual;\uc000\u224f\u0338e\u0100fs\u0c0a\u0c27tTriangle\u0180;BE\u0c1a\u0c1b\u0c21\u62eaar;\uc000\u29cf\u0338qual;\u62ecs\u0300;EGLST\u0c35\u0c36\u0c3c\u0c44\u0c4b\u0c58\u626equal;\u6270reater;\u6278ess;\uc000\u226a\u0338lantEqual;\uc000\u2a7d\u0338ilde;\u6274ested\u0100GL\u0c68\u0c79reaterGreater;\uc000\u2aa2\u0338essLess;\uc000\u2aa1\u0338recedes\u0180;ES\u0c92\u0c93\u0c9b\u6280qual;\uc000\u2aaf\u0338lantEqual;\u62e0\u0100ei\u0cab\u0cb9verseElement;\u620cghtTriangle\u0180;BE\u0ccb\u0ccc\u0cd2\u62ebar;\uc000\u29d0\u0338qual;\u62ed\u0100qu\u0cdd\u0d0cuareSu\u0100bp\u0ce8\u0cf9set\u0100;E\u0cf0\u0cf3\uc000\u228f\u0338qual;\u62e2erset\u0100;E\u0d03\u0d06\uc000\u2290\u0338qual;\u62e3\u0180bcp\u0d13\u0d24\u0d4eset\u0100;E\u0d1b\u0d1e\uc000\u2282\u20d2qual;\u6288ceeds\u0200;EST\u0d32\u0d33\u0d3b\u0d46\u6281qual;\uc000\u2ab0\u0338lantEqual;\u62e1ilde;\uc000\u227f\u0338erset\u0100;E\u0d58\u0d5b\uc000\u2283\u20d2qual;\u6289ilde\u0200;EFT\u0d6e\u0d6f\u0d75\u0d7f\u6241qual;\u6244ullEqual;\u6247ilde;\u6249erticalBar;\u6224cr;\uc000\ud835\udca9ilde\u803b\xd1\u40d1;\u439d\u0700Eacdfgmoprstuv\u0dbd\u0dc2\u0dc9\u0dd5\u0ddb\u0de0\u0de7\u0dfc\u0e02\u0e20\u0e22\u0e32\u0e3f\u0e44lig;\u4152cute\u803b\xd3\u40d3\u0100iy\u0dce\u0dd3rc\u803b\xd4\u40d4;\u441eblac;\u4150r;\uc000\ud835\udd12rave\u803b\xd2\u40d2\u0180aei\u0dee\u0df2\u0df6cr;\u414cga;\u43a9cron;\u439fpf;\uc000\ud835\udd46enCurly\u0100DQ\u0e0e\u0e1aoubleQuote;\u601cuote;\u6018;\u6a54\u0100cl\u0e27\u0e2cr;\uc000\ud835\udcaaash\u803b\xd8\u40d8i\u016c\u0e37\u0e3cde\u803b\xd5\u40d5es;\u6a37ml\u803b\xd6\u40d6er\u0100BP\u0e4b\u0e60\u0100ar\u0e50\u0e53r;\u603eac\u0100ek\u0e5a\u0e5c;\u63deet;\u63b4arenthesis;\u63dc\u0480acfhilors\u0e7f\u0e87\u0e8a\u0e8f\u0e92\u0e94\u0e9d\u0eb0\u0efcrtialD;\u6202y;\u441fr;\uc000\ud835\udd13i;\u43a6;\u43a0usMinus;\u40b1\u0100ip\u0ea2\u0eadncareplan\xe5\u069df;\u6119\u0200;eio\u0eb9\u0eba\u0ee0\u0ee4\u6abbcedes\u0200;EST\u0ec8\u0ec9\u0ecf\u0eda\u627aqual;\u6aaflantEqual;\u627cilde;\u627eme;\u6033\u0100dp\u0ee9\u0eeeuct;\u620fortion\u0100;a\u0225\u0ef9l;\u621d\u0100ci\u0f01\u0f06r;\uc000\ud835\udcab;\u43a8\u0200Ufos\u0f11\u0f16\u0f1b\u0f1fOT\u803b\"\u4022r;\uc000\ud835\udd14pf;\u611acr;\uc000\ud835\udcac\u0600BEacefhiorsu\u0f3e\u0f43\u0f47\u0f60\u0f73\u0fa7\u0faa\u0fad\u1096\u10a9\u10b4\u10bearr;\u6910G\u803b\xae\u40ae\u0180cnr\u0f4e\u0f53\u0f56ute;\u4154g;\u67ebr\u0100;t\u0f5c\u0f5d\u61a0l;\u6916\u0180aey\u0f67\u0f6c\u0f71ron;\u4158dil;\u4156;\u4420\u0100;v\u0f78\u0f79\u611cerse\u0100EU\u0f82\u0f99\u0100lq\u0f87\u0f8eement;\u620builibrium;\u61cbpEquilibrium;\u696fr\xbb\u0f79o;\u43a1ght\u0400ACDFTUVa\u0fc1\u0feb\u0ff3\u1022\u1028\u105b\u1087\u03d8\u0100nr\u0fc6\u0fd2gleBracket;\u67e9row\u0180;BL\u0fdc\u0fdd\u0fe1\u6192ar;\u61e5eftArrow;\u61c4eiling;\u6309o\u01f5\u0ff9\0\u1005bleBracket;\u67e7n\u01d4\u100a\0\u1014eeVector;\u695dector\u0100;B\u101d\u101e\u61c2ar;\u6955loor;\u630b\u0100er\u102d\u1043e\u0180;AV\u1035\u1036\u103c\u62a2rrow;\u61a6ector;\u695biangle\u0180;BE\u1050\u1051\u1055\u62b3ar;\u69d0qual;\u62b5p\u0180DTV\u1063\u106e\u1078ownVector;\u694feeVector;\u695cector\u0100;B\u1082\u1083\u61bear;\u6954ector\u0100;B\u1091\u1092\u61c0ar;\u6953\u0100pu\u109b\u109ef;\u611dndImplies;\u6970ightarrow;\u61db\u0100ch\u10b9\u10bcr;\u611b;\u61b1leDelayed;\u69f4\u0680HOacfhimoqstu\u10e4\u10f1\u10f7\u10fd\u1119\u111e\u1151\u1156\u1161\u1167\u11b5\u11bb\u11bf\u0100Cc\u10e9\u10eeHcy;\u4429y;\u4428FTcy;\u442ccute;\u415a\u0280;aeiy\u1108\u1109\u110e\u1113\u1117\u6abcron;\u4160dil;\u415erc;\u415c;\u4421r;\uc000\ud835\udd16ort\u0200DLRU\u112a\u1134\u113e\u1149ownArrow\xbb\u041eeftArrow\xbb\u089aightArrow\xbb\u0fddpArrow;\u6191gma;\u43a3allCircle;\u6218pf;\uc000\ud835\udd4a\u0272\u116d\0\0\u1170t;\u621aare\u0200;ISU\u117b\u117c\u1189\u11af\u65a1ntersection;\u6293u\u0100bp\u118f\u119eset\u0100;E\u1197\u1198\u628fqual;\u6291erset\u0100;E\u11a8\u11a9\u6290qual;\u6292nion;\u6294cr;\uc000\ud835\udcaear;\u62c6\u0200bcmp\u11c8\u11db\u1209\u120b\u0100;s\u11cd\u11ce\u62d0et\u0100;E\u11cd\u11d5qual;\u6286\u0100ch\u11e0\u1205eeds\u0200;EST\u11ed\u11ee\u11f4\u11ff\u627bqual;\u6ab0lantEqual;\u627dilde;\u627fTh\xe1\u0f8c;\u6211\u0180;es\u1212\u1213\u1223\u62d1rset\u0100;E\u121c\u121d\u6283qual;\u6287et\xbb\u1213\u0580HRSacfhiors\u123e\u1244\u1249\u1255\u125e\u1271\u1276\u129f\u12c2\u12c8\u12d1ORN\u803b\xde\u40deADE;\u6122\u0100Hc\u124e\u1252cy;\u440by;\u4426\u0100bu\u125a\u125c;\u4009;\u43a4\u0180aey\u1265\u126a\u126fron;\u4164dil;\u4162;\u4422r;\uc000\ud835\udd17\u0100ei\u127b\u1289\u01f2\u1280\0\u1287efore;\u6234a;\u4398\u0100cn\u128e\u1298kSpace;\uc000\u205f\u200aSpace;\u6009lde\u0200;EFT\u12ab\u12ac\u12b2\u12bc\u623cqual;\u6243ullEqual;\u6245ilde;\u6248pf;\uc000\ud835\udd4bipleDot;\u60db\u0100ct\u12d6\u12dbr;\uc000\ud835\udcafrok;\u4166\u0ae1\u12f7\u130e\u131a\u1326\0\u132c\u1331\0\0\0\0\0\u1338\u133d\u1377\u1385\0\u13ff\u1404\u140a\u1410\u0100cr\u12fb\u1301ute\u803b\xda\u40dar\u0100;o\u1307\u1308\u619fcir;\u6949r\u01e3\u1313\0\u1316y;\u440eve;\u416c\u0100iy\u131e\u1323rc\u803b\xdb\u40db;\u4423blac;\u4170r;\uc000\ud835\udd18rave\u803b\xd9\u40d9acr;\u416a\u0100di\u1341\u1369er\u0100BP\u1348\u135d\u0100ar\u134d\u1350r;\u405fac\u0100ek\u1357\u1359;\u63dfet;\u63b5arenthesis;\u63ddon\u0100;P\u1370\u1371\u62c3lus;\u628e\u0100gp\u137b\u137fon;\u4172f;\uc000\ud835\udd4c\u0400ADETadps\u1395\u13ae\u13b8\u13c4\u03e8\u13d2\u13d7\u13f3rrow\u0180;BD\u1150\u13a0\u13a4ar;\u6912ownArrow;\u61c5ownArrow;\u6195quilibrium;\u696eee\u0100;A\u13cb\u13cc\u62a5rrow;\u61a5own\xe1\u03f3er\u0100LR\u13de\u13e8eftArrow;\u6196ightArrow;\u6197i\u0100;l\u13f9\u13fa\u43d2on;\u43a5ing;\u416ecr;\uc000\ud835\udcb0ilde;\u4168ml\u803b\xdc\u40dc\u0480Dbcdefosv\u1427\u142c\u1430\u1433\u143e\u1485\u148a\u1490\u1496ash;\u62abar;\u6aeby;\u4412ash\u0100;l\u143b\u143c\u62a9;\u6ae6\u0100er\u1443\u1445;\u62c1\u0180bty\u144c\u1450\u147aar;\u6016\u0100;i\u144f\u1455cal\u0200BLST\u1461\u1465\u146a\u1474ar;\u6223ine;\u407ceparator;\u6758ilde;\u6240ThinSpace;\u600ar;\uc000\ud835\udd19pf;\uc000\ud835\udd4dcr;\uc000\ud835\udcb1dash;\u62aa\u0280cefos\u14a7\u14ac\u14b1\u14b6\u14bcirc;\u4174dge;\u62c0r;\uc000\ud835\udd1apf;\uc000\ud835\udd4ecr;\uc000\ud835\udcb2\u0200fios\u14cb\u14d0\u14d2\u14d8r;\uc000\ud835\udd1b;\u439epf;\uc000\ud835\udd4fcr;\uc000\ud835\udcb3\u0480AIUacfosu\u14f1\u14f5\u14f9\u14fd\u1504\u150f\u1514\u151a\u1520cy;\u442fcy;\u4407cy;\u442ecute\u803b\xdd\u40dd\u0100iy\u1509\u150drc;\u4176;\u442br;\uc000\ud835\udd1cpf;\uc000\ud835\udd50cr;\uc000\ud835\udcb4ml;\u4178\u0400Hacdefos\u1535\u1539\u153f\u154b\u154f\u155d\u1560\u1564cy;\u4416cute;\u4179\u0100ay\u1544\u1549ron;\u417d;\u4417ot;\u417b\u01f2\u1554\0\u155boWidt\xe8\u0ad9a;\u4396r;\u6128pf;\u6124cr;\uc000\ud835\udcb5\u0be1\u1583\u158a\u1590\0\u15b0\u15b6\u15bf\0\0\0\0\u15c6\u15db\u15eb\u165f\u166d\0\u1695\u169b\u16b2\u16b9\0\u16becute\u803b\xe1\u40e1reve;\u4103\u0300;Ediuy\u159c\u159d\u15a1\u15a3\u15a8\u15ad\u623e;\uc000\u223e\u0333;\u623frc\u803b\xe2\u40e2te\u80bb\xb4\u0306;\u4430lig\u803b\xe6\u40e6\u0100;r\xb2\u15ba;\uc000\ud835\udd1erave\u803b\xe0\u40e0\u0100ep\u15ca\u15d6\u0100fp\u15cf\u15d4sym;\u6135\xe8\u15d3ha;\u43b1\u0100ap\u15dfc\u0100cl\u15e4\u15e7r;\u4101g;\u6a3f\u0264\u15f0\0\0\u160a\u0280;adsv\u15fa\u15fb\u15ff\u1601\u1607\u6227nd;\u6a55;\u6a5clope;\u6a58;\u6a5a\u0380;elmrsz\u1618\u1619\u161b\u161e\u163f\u164f\u1659\u6220;\u69a4e\xbb\u1619sd\u0100;a\u1625\u1626\u6221\u0461\u1630\u1632\u1634\u1636\u1638\u163a\u163c\u163e;\u69a8;\u69a9;\u69aa;\u69ab;\u69ac;\u69ad;\u69ae;\u69aft\u0100;v\u1645\u1646\u621fb\u0100;d\u164c\u164d\u62be;\u699d\u0100pt\u1654\u1657h;\u6222\xbb\xb9arr;\u637c\u0100gp\u1663\u1667on;\u4105f;\uc000\ud835\udd52\u0380;Eaeiop\u12c1\u167b\u167d\u1682\u1684\u1687\u168a;\u6a70cir;\u6a6f;\u624ad;\u624bs;\u4027rox\u0100;e\u12c1\u1692\xf1\u1683ing\u803b\xe5\u40e5\u0180cty\u16a1\u16a6\u16a8r;\uc000\ud835\udcb6;\u402amp\u0100;e\u12c1\u16af\xf1\u0288ilde\u803b\xe3\u40e3ml\u803b\xe4\u40e4\u0100ci\u16c2\u16c8onin\xf4\u0272nt;\u6a11\u0800Nabcdefiklnoprsu\u16ed\u16f1\u1730\u173c\u1743\u1748\u1778\u177d\u17e0\u17e6\u1839\u1850\u170d\u193d\u1948\u1970ot;\u6aed\u0100cr\u16f6\u171ek\u0200ceps\u1700\u1705\u170d\u1713ong;\u624cpsilon;\u43f6rime;\u6035im\u0100;e\u171a\u171b\u623dq;\u62cd\u0176\u1722\u1726ee;\u62bded\u0100;g\u172c\u172d\u6305e\xbb\u172drk\u0100;t\u135c\u1737brk;\u63b6\u0100oy\u1701\u1741;\u4431quo;\u601e\u0280cmprt\u1753\u175b\u1761\u1764\u1768aus\u0100;e\u010a\u0109ptyv;\u69b0s\xe9\u170cno\xf5\u0113\u0180ahw\u176f\u1771\u1773;\u43b2;\u6136een;\u626cr;\uc000\ud835\udd1fg\u0380costuvw\u178d\u179d\u17b3\u17c1\u17d5\u17db\u17de\u0180aiu\u1794\u1796\u179a\xf0\u0760rc;\u65efp\xbb\u1371\u0180dpt\u17a4\u17a8\u17adot;\u6a00lus;\u6a01imes;\u6a02\u0271\u17b9\0\0\u17becup;\u6a06ar;\u6605riangle\u0100du\u17cd\u17d2own;\u65bdp;\u65b3plus;\u6a04e\xe5\u1444\xe5\u14adarow;\u690d\u0180ako\u17ed\u1826\u1835\u0100cn\u17f2\u1823k\u0180lst\u17fa\u05ab\u1802ozenge;\u69ebriangle\u0200;dlr\u1812\u1813\u1818\u181d\u65b4own;\u65beeft;\u65c2ight;\u65b8k;\u6423\u01b1\u182b\0\u1833\u01b2\u182f\0\u1831;\u6592;\u65914;\u6593ck;\u6588\u0100eo\u183e\u184d\u0100;q\u1843\u1846\uc000=\u20e5uiv;\uc000\u2261\u20e5t;\u6310\u0200ptwx\u1859\u185e\u1867\u186cf;\uc000\ud835\udd53\u0100;t\u13cb\u1863om\xbb\u13cctie;\u62c8\u0600DHUVbdhmptuv\u1885\u1896\u18aa\u18bb\u18d7\u18db\u18ec\u18ff\u1905\u190a\u1910\u1921\u0200LRlr\u188e\u1890\u1892\u1894;\u6557;\u6554;\u6556;\u6553\u0280;DUdu\u18a1\u18a2\u18a4\u18a6\u18a8\u6550;\u6566;\u6569;\u6564;\u6567\u0200LRlr\u18b3\u18b5\u18b7\u18b9;\u655d;\u655a;\u655c;\u6559\u0380;HLRhlr\u18ca\u18cb\u18cd\u18cf\u18d1\u18d3\u18d5\u6551;\u656c;\u6563;\u6560;\u656b;\u6562;\u655fox;\u69c9\u0200LRlr\u18e4\u18e6\u18e8\u18ea;\u6555;\u6552;\u6510;\u650c\u0280;DUdu\u06bd\u18f7\u18f9\u18fb\u18fd;\u6565;\u6568;\u652c;\u6534inus;\u629flus;\u629eimes;\u62a0\u0200LRlr\u1919\u191b\u191d\u191f;\u655b;\u6558;\u6518;\u6514\u0380;HLRhlr\u1930\u1931\u1933\u1935\u1937\u1939\u193b\u6502;\u656a;\u6561;\u655e;\u653c;\u6524;\u651c\u0100ev\u0123\u1942bar\u803b\xa6\u40a6\u0200ceio\u1951\u1956\u195a\u1960r;\uc000\ud835\udcb7mi;\u604fm\u0100;e\u171a\u171cl\u0180;bh\u1968\u1969\u196b\u405c;\u69c5sub;\u67c8\u016c\u1974\u197el\u0100;e\u1979\u197a\u6022t\xbb\u197ap\u0180;Ee\u012f\u1985\u1987;\u6aae\u0100;q\u06dc\u06db\u0ce1\u19a7\0\u19e8\u1a11\u1a15\u1a32\0\u1a37\u1a50\0\0\u1ab4\0\0\u1ac1\0\0\u1b21\u1b2e\u1b4d\u1b52\0\u1bfd\0\u1c0c\u0180cpr\u19ad\u19b2\u19ddute;\u4107\u0300;abcds\u19bf\u19c0\u19c4\u19ca\u19d5\u19d9\u6229nd;\u6a44rcup;\u6a49\u0100au\u19cf\u19d2p;\u6a4bp;\u6a47ot;\u6a40;\uc000\u2229\ufe00\u0100eo\u19e2\u19e5t;\u6041\xee\u0693\u0200aeiu\u19f0\u19fb\u1a01\u1a05\u01f0\u19f5\0\u19f8s;\u6a4don;\u410ddil\u803b\xe7\u40e7rc;\u4109ps\u0100;s\u1a0c\u1a0d\u6a4cm;\u6a50ot;\u410b\u0180dmn\u1a1b\u1a20\u1a26il\u80bb\xb8\u01adptyv;\u69b2t\u8100\xa2;e\u1a2d\u1a2e\u40a2r\xe4\u01b2r;\uc000\ud835\udd20\u0180cei\u1a3d\u1a40\u1a4dy;\u4447ck\u0100;m\u1a47\u1a48\u6713ark\xbb\u1a48;\u43c7r\u0380;Ecefms\u1a5f\u1a60\u1a62\u1a6b\u1aa4\u1aaa\u1aae\u65cb;\u69c3\u0180;el\u1a69\u1a6a\u1a6d\u42c6q;\u6257e\u0261\u1a74\0\0\u1a88rrow\u0100lr\u1a7c\u1a81eft;\u61baight;\u61bb\u0280RSacd\u1a92\u1a94\u1a96\u1a9a\u1a9f\xbb\u0f47;\u64c8st;\u629birc;\u629aash;\u629dnint;\u6a10id;\u6aefcir;\u69c2ubs\u0100;u\u1abb\u1abc\u6663it\xbb\u1abc\u02ec\u1ac7\u1ad4\u1afa\0\u1b0aon\u0100;e\u1acd\u1ace\u403a\u0100;q\xc7\xc6\u026d\u1ad9\0\0\u1ae2a\u0100;t\u1ade\u1adf\u402c;\u4040\u0180;fl\u1ae8\u1ae9\u1aeb\u6201\xee\u1160e\u0100mx\u1af1\u1af6ent\xbb\u1ae9e\xf3\u024d\u01e7\u1afe\0\u1b07\u0100;d\u12bb\u1b02ot;\u6a6dn\xf4\u0246\u0180fry\u1b10\u1b14\u1b17;\uc000\ud835\udd54o\xe4\u0254\u8100\xa9;s\u0155\u1b1dr;\u6117\u0100ao\u1b25\u1b29rr;\u61b5ss;\u6717\u0100cu\u1b32\u1b37r;\uc000\ud835\udcb8\u0100bp\u1b3c\u1b44\u0100;e\u1b41\u1b42\u6acf;\u6ad1\u0100;e\u1b49\u1b4a\u6ad0;\u6ad2dot;\u62ef\u0380delprvw\u1b60\u1b6c\u1b77\u1b82\u1bac\u1bd4\u1bf9arr\u0100lr\u1b68\u1b6a;\u6938;\u6935\u0270\u1b72\0\0\u1b75r;\u62dec;\u62dfarr\u0100;p\u1b7f\u1b80\u61b6;\u693d\u0300;bcdos\u1b8f\u1b90\u1b96\u1ba1\u1ba5\u1ba8\u622arcap;\u6a48\u0100au\u1b9b\u1b9ep;\u6a46p;\u6a4aot;\u628dr;\u6a45;\uc000\u222a\ufe00\u0200alrv\u1bb5\u1bbf\u1bde\u1be3rr\u0100;m\u1bbc\u1bbd\u61b7;\u693cy\u0180evw\u1bc7\u1bd4\u1bd8q\u0270\u1bce\0\0\u1bd2re\xe3\u1b73u\xe3\u1b75ee;\u62ceedge;\u62cfen\u803b\xa4\u40a4earrow\u0100lr\u1bee\u1bf3eft\xbb\u1b80ight\xbb\u1bbde\xe4\u1bdd\u0100ci\u1c01\u1c07onin\xf4\u01f7nt;\u6231lcty;\u632d\u0980AHabcdefhijlorstuwz\u1c38\u1c3b\u1c3f\u1c5d\u1c69\u1c75\u1c8a\u1c9e\u1cac\u1cb7\u1cfb\u1cff\u1d0d\u1d7b\u1d91\u1dab\u1dbb\u1dc6\u1dcdr\xf2\u0381ar;\u6965\u0200glrs\u1c48\u1c4d\u1c52\u1c54ger;\u6020eth;\u6138\xf2\u1133h\u0100;v\u1c5a\u1c5b\u6010\xbb\u090a\u016b\u1c61\u1c67arow;\u690fa\xe3\u0315\u0100ay\u1c6e\u1c73ron;\u410f;\u4434\u0180;ao\u0332\u1c7c\u1c84\u0100gr\u02bf\u1c81r;\u61catseq;\u6a77\u0180glm\u1c91\u1c94\u1c98\u803b\xb0\u40b0ta;\u43b4ptyv;\u69b1\u0100ir\u1ca3\u1ca8sht;\u697f;\uc000\ud835\udd21ar\u0100lr\u1cb3\u1cb5\xbb\u08dc\xbb\u101e\u0280aegsv\u1cc2\u0378\u1cd6\u1cdc\u1ce0m\u0180;os\u0326\u1cca\u1cd4nd\u0100;s\u0326\u1cd1uit;\u6666amma;\u43ddin;\u62f2\u0180;io\u1ce7\u1ce8\u1cf8\u40f7de\u8100\xf7;o\u1ce7\u1cf0ntimes;\u62c7n\xf8\u1cf7cy;\u4452c\u026f\u1d06\0\0\u1d0arn;\u631eop;\u630d\u0280lptuw\u1d18\u1d1d\u1d22\u1d49\u1d55lar;\u4024f;\uc000\ud835\udd55\u0280;emps\u030b\u1d2d\u1d37\u1d3d\u1d42q\u0100;d\u0352\u1d33ot;\u6251inus;\u6238lus;\u6214quare;\u62a1blebarwedg\xe5\xfan\u0180adh\u112e\u1d5d\u1d67ownarrow\xf3\u1c83arpoon\u0100lr\u1d72\u1d76ef\xf4\u1cb4igh\xf4\u1cb6\u0162\u1d7f\u1d85karo\xf7\u0f42\u026f\u1d8a\0\0\u1d8ern;\u631fop;\u630c\u0180cot\u1d98\u1da3\u1da6\u0100ry\u1d9d\u1da1;\uc000\ud835\udcb9;\u4455l;\u69f6rok;\u4111\u0100dr\u1db0\u1db4ot;\u62f1i\u0100;f\u1dba\u1816\u65bf\u0100ah\u1dc0\u1dc3r\xf2\u0429a\xf2\u0fa6angle;\u69a6\u0100ci\u1dd2\u1dd5y;\u445fgrarr;\u67ff\u0900Dacdefglmnopqrstux\u1e01\u1e09\u1e19\u1e38\u0578\u1e3c\u1e49\u1e61\u1e7e\u1ea5\u1eaf\u1ebd\u1ee1\u1f2a\u1f37\u1f44\u1f4e\u1f5a\u0100Do\u1e06\u1d34o\xf4\u1c89\u0100cs\u1e0e\u1e14ute\u803b\xe9\u40e9ter;\u6a6e\u0200aioy\u1e22\u1e27\u1e31\u1e36ron;\u411br\u0100;c\u1e2d\u1e2e\u6256\u803b\xea\u40ealon;\u6255;\u444dot;\u4117\u0100Dr\u1e41\u1e45ot;\u6252;\uc000\ud835\udd22\u0180;rs\u1e50\u1e51\u1e57\u6a9aave\u803b\xe8\u40e8\u0100;d\u1e5c\u1e5d\u6a96ot;\u6a98\u0200;ils\u1e6a\u1e6b\u1e72\u1e74\u6a99nters;\u63e7;\u6113\u0100;d\u1e79\u1e7a\u6a95ot;\u6a97\u0180aps\u1e85\u1e89\u1e97cr;\u4113ty\u0180;sv\u1e92\u1e93\u1e95\u6205et\xbb\u1e93p\u01001;\u1e9d\u1ea4\u0133\u1ea1\u1ea3;\u6004;\u6005\u6003\u0100gs\u1eaa\u1eac;\u414bp;\u6002\u0100gp\u1eb4\u1eb8on;\u4119f;\uc000\ud835\udd56\u0180als\u1ec4\u1ece\u1ed2r\u0100;s\u1eca\u1ecb\u62d5l;\u69e3us;\u6a71i\u0180;lv\u1eda\u1edb\u1edf\u43b5on\xbb\u1edb;\u43f5\u0200csuv\u1eea\u1ef3\u1f0b\u1f23\u0100io\u1eef\u1e31rc\xbb\u1e2e\u0269\u1ef9\0\0\u1efb\xed\u0548ant\u0100gl\u1f02\u1f06tr\xbb\u1e5dess\xbb\u1e7a\u0180aei\u1f12\u1f16\u1f1als;\u403dst;\u625fv\u0100;D\u0235\u1f20D;\u6a78parsl;\u69e5\u0100Da\u1f2f\u1f33ot;\u6253rr;\u6971\u0180cdi\u1f3e\u1f41\u1ef8r;\u612fo\xf4\u0352\u0100ah\u1f49\u1f4b;\u43b7\u803b\xf0\u40f0\u0100mr\u1f53\u1f57l\u803b\xeb\u40ebo;\u60ac\u0180cip\u1f61\u1f64\u1f67l;\u4021s\xf4\u056e\u0100eo\u1f6c\u1f74ctatio\xee\u0559nential\xe5\u0579\u09e1\u1f92\0\u1f9e\0\u1fa1\u1fa7\0\0\u1fc6\u1fcc\0\u1fd3\0\u1fe6\u1fea\u2000\0\u2008\u205allingdotse\xf1\u1e44y;\u4444male;\u6640\u0180ilr\u1fad\u1fb3\u1fc1lig;\u8000\ufb03\u0269\u1fb9\0\0\u1fbdg;\u8000\ufb00ig;\u8000\ufb04;\uc000\ud835\udd23lig;\u8000\ufb01lig;\uc000fj\u0180alt\u1fd9\u1fdc\u1fe1t;\u666dig;\u8000\ufb02ns;\u65b1of;\u4192\u01f0\u1fee\0\u1ff3f;\uc000\ud835\udd57\u0100ak\u05bf\u1ff7\u0100;v\u1ffc\u1ffd\u62d4;\u6ad9artint;\u6a0d\u0100ao\u200c\u2055\u0100cs\u2011\u2052\u03b1\u201a\u2030\u2038\u2045\u2048\0\u2050\u03b2\u2022\u2025\u2027\u202a\u202c\0\u202e\u803b\xbd\u40bd;\u6153\u803b\xbc\u40bc;\u6155;\u6159;\u615b\u01b3\u2034\0\u2036;\u6154;\u6156\u02b4\u203e\u2041\0\0\u2043\u803b\xbe\u40be;\u6157;\u615c5;\u6158\u01b6\u204c\0\u204e;\u615a;\u615d8;\u615el;\u6044wn;\u6322cr;\uc000\ud835\udcbb\u0880Eabcdefgijlnorstv\u2082\u2089\u209f\u20a5\u20b0\u20b4\u20f0\u20f5\u20fa\u20ff\u2103\u2112\u2138\u0317\u213e\u2152\u219e\u0100;l\u064d\u2087;\u6a8c\u0180cmp\u2090\u2095\u209dute;\u41f5ma\u0100;d\u209c\u1cda\u43b3;\u6a86reve;\u411f\u0100iy\u20aa\u20aerc;\u411d;\u4433ot;\u4121\u0200;lqs\u063e\u0642\u20bd\u20c9\u0180;qs\u063e\u064c\u20c4lan\xf4\u0665\u0200;cdl\u0665\u20d2\u20d5\u20e5c;\u6aa9ot\u0100;o\u20dc\u20dd\u6a80\u0100;l\u20e2\u20e3\u6a82;\u6a84\u0100;e\u20ea\u20ed\uc000\u22db\ufe00s;\u6a94r;\uc000\ud835\udd24\u0100;g\u0673\u061bmel;\u6137cy;\u4453\u0200;Eaj\u065a\u210c\u210e\u2110;\u6a92;\u6aa5;\u6aa4\u0200Eaes\u211b\u211d\u2129\u2134;\u6269p\u0100;p\u2123\u2124\u6a8arox\xbb\u2124\u0100;q\u212e\u212f\u6a88\u0100;q\u212e\u211bim;\u62e7pf;\uc000\ud835\udd58\u0100ci\u2143\u2146r;\u610am\u0180;el\u066b\u214e\u2150;\u6a8e;\u6a90\u8300>;cdlqr\u05ee\u2160\u216a\u216e\u2173\u2179\u0100ci\u2165\u2167;\u6aa7r;\u6a7aot;\u62d7Par;\u6995uest;\u6a7c\u0280adels\u2184\u216a\u2190\u0656\u219b\u01f0\u2189\0\u218epro\xf8\u209er;\u6978q\u0100lq\u063f\u2196les\xf3\u2088i\xed\u066b\u0100en\u21a3\u21adrtneqq;\uc000\u2269\ufe00\xc5\u21aa\u0500Aabcefkosy\u21c4\u21c7\u21f1\u21f5\u21fa\u2218\u221d\u222f\u2268\u227dr\xf2\u03a0\u0200ilmr\u21d0\u21d4\u21d7\u21dbrs\xf0\u1484f\xbb\u2024il\xf4\u06a9\u0100dr\u21e0\u21e4cy;\u444a\u0180;cw\u08f4\u21eb\u21efir;\u6948;\u61adar;\u610firc;\u4125\u0180alr\u2201\u220e\u2213rts\u0100;u\u2209\u220a\u6665it\xbb\u220alip;\u6026con;\u62b9r;\uc000\ud835\udd25s\u0100ew\u2223\u2229arow;\u6925arow;\u6926\u0280amopr\u223a\u223e\u2243\u225e\u2263rr;\u61fftht;\u623bk\u0100lr\u2249\u2253eftarrow;\u61a9ightarrow;\u61aaf;\uc000\ud835\udd59bar;\u6015\u0180clt\u226f\u2274\u2278r;\uc000\ud835\udcbdas\xe8\u21f4rok;\u4127\u0100bp\u2282\u2287ull;\u6043hen\xbb\u1c5b\u0ae1\u22a3\0\u22aa\0\u22b8\u22c5\u22ce\0\u22d5\u22f3\0\0\u22f8\u2322\u2367\u2362\u237f\0\u2386\u23aa\u23b4cute\u803b\xed\u40ed\u0180;iy\u0771\u22b0\u22b5rc\u803b\xee\u40ee;\u4438\u0100cx\u22bc\u22bfy;\u4435cl\u803b\xa1\u40a1\u0100fr\u039f\u22c9;\uc000\ud835\udd26rave\u803b\xec\u40ec\u0200;ino\u073e\u22dd\u22e9\u22ee\u0100in\u22e2\u22e6nt;\u6a0ct;\u622dfin;\u69dcta;\u6129lig;\u4133\u0180aop\u22fe\u231a\u231d\u0180cgt\u2305\u2308\u2317r;\u412b\u0180elp\u071f\u230f\u2313in\xe5\u078ear\xf4\u0720h;\u4131f;\u62b7ed;\u41b5\u0280;cfot\u04f4\u232c\u2331\u233d\u2341are;\u6105in\u0100;t\u2338\u2339\u621eie;\u69dddo\xf4\u2319\u0280;celp\u0757\u234c\u2350\u235b\u2361al;\u62ba\u0100gr\u2355\u2359er\xf3\u1563\xe3\u234darhk;\u6a17rod;\u6a3c\u0200cgpt\u236f\u2372\u2376\u237by;\u4451on;\u412ff;\uc000\ud835\udd5aa;\u43b9uest\u803b\xbf\u40bf\u0100ci\u238a\u238fr;\uc000\ud835\udcben\u0280;Edsv\u04f4\u239b\u239d\u23a1\u04f3;\u62f9ot;\u62f5\u0100;v\u23a6\u23a7\u62f4;\u62f3\u0100;i\u0777\u23aelde;\u4129\u01eb\u23b8\0\u23bccy;\u4456l\u803b\xef\u40ef\u0300cfmosu\u23cc\u23d7\u23dc\u23e1\u23e7\u23f5\u0100iy\u23d1\u23d5rc;\u4135;\u4439r;\uc000\ud835\udd27ath;\u4237pf;\uc000\ud835\udd5b\u01e3\u23ec\0\u23f1r;\uc000\ud835\udcbfrcy;\u4458kcy;\u4454\u0400acfghjos\u240b\u2416\u2422\u2427\u242d\u2431\u2435\u243bppa\u0100;v\u2413\u2414\u43ba;\u43f0\u0100ey\u241b\u2420dil;\u4137;\u443ar;\uc000\ud835\udd28reen;\u4138cy;\u4445cy;\u445cpf;\uc000\ud835\udd5ccr;\uc000\ud835\udcc0\u0b80ABEHabcdefghjlmnoprstuv\u2470\u2481\u2486\u248d\u2491\u250e\u253d\u255a\u2580\u264e\u265e\u2665\u2679\u267d\u269a\u26b2\u26d8\u275d\u2768\u278b\u27c0\u2801\u2812\u0180art\u2477\u247a\u247cr\xf2\u09c6\xf2\u0395ail;\u691barr;\u690e\u0100;g\u0994\u248b;\u6a8bar;\u6962\u0963\u24a5\0\u24aa\0\u24b1\0\0\0\0\0\u24b5\u24ba\0\u24c6\u24c8\u24cd\0\u24f9ute;\u413amptyv;\u69b4ra\xee\u084cbda;\u43bbg\u0180;dl\u088e\u24c1\u24c3;\u6991\xe5\u088e;\u6a85uo\u803b\xab\u40abr\u0400;bfhlpst\u0899\u24de\u24e6\u24e9\u24eb\u24ee\u24f1\u24f5\u0100;f\u089d\u24e3s;\u691fs;\u691d\xeb\u2252p;\u61abl;\u6939im;\u6973l;\u61a2\u0180;ae\u24ff\u2500\u2504\u6aabil;\u6919\u0100;s\u2509\u250a\u6aad;\uc000\u2aad\ufe00\u0180abr\u2515\u2519\u251drr;\u690crk;\u6772\u0100ak\u2522\u252cc\u0100ek\u2528\u252a;\u407b;\u405b\u0100es\u2531\u2533;\u698bl\u0100du\u2539\u253b;\u698f;\u698d\u0200aeuy\u2546\u254b\u2556\u2558ron;\u413e\u0100di\u2550\u2554il;\u413c\xec\u08b0\xe2\u2529;\u443b\u0200cqrs\u2563\u2566\u256d\u257da;\u6936uo\u0100;r\u0e19\u1746\u0100du\u2572\u2577har;\u6967shar;\u694bh;\u61b2\u0280;fgqs\u258b\u258c\u0989\u25f3\u25ff\u6264t\u0280ahlrt\u2598\u25a4\u25b7\u25c2\u25e8rrow\u0100;t\u0899\u25a1a\xe9\u24f6arpoon\u0100du\u25af\u25b4own\xbb\u045ap\xbb\u0966eftarrows;\u61c7ight\u0180ahs\u25cd\u25d6\u25derrow\u0100;s\u08f4\u08a7arpoon\xf3\u0f98quigarro\xf7\u21f0hreetimes;\u62cb\u0180;qs\u258b\u0993\u25falan\xf4\u09ac\u0280;cdgs\u09ac\u260a\u260d\u261d\u2628c;\u6aa8ot\u0100;o\u2614\u2615\u6a7f\u0100;r\u261a\u261b\u6a81;\u6a83\u0100;e\u2622\u2625\uc000\u22da\ufe00s;\u6a93\u0280adegs\u2633\u2639\u263d\u2649\u264bppro\xf8\u24c6ot;\u62d6q\u0100gq\u2643\u2645\xf4\u0989gt\xf2\u248c\xf4\u099bi\xed\u09b2\u0180ilr\u2655\u08e1\u265asht;\u697c;\uc000\ud835\udd29\u0100;E\u099c\u2663;\u6a91\u0161\u2669\u2676r\u0100du\u25b2\u266e\u0100;l\u0965\u2673;\u696alk;\u6584cy;\u4459\u0280;acht\u0a48\u2688\u268b\u2691\u2696r\xf2\u25c1orne\xf2\u1d08ard;\u696bri;\u65fa\u0100io\u269f\u26a4dot;\u4140ust\u0100;a\u26ac\u26ad\u63b0che\xbb\u26ad\u0200Eaes\u26bb\u26bd\u26c9\u26d4;\u6268p\u0100;p\u26c3\u26c4\u6a89rox\xbb\u26c4\u0100;q\u26ce\u26cf\u6a87\u0100;q\u26ce\u26bbim;\u62e6\u0400abnoptwz\u26e9\u26f4\u26f7\u271a\u272f\u2741\u2747\u2750\u0100nr\u26ee\u26f1g;\u67ecr;\u61fdr\xeb\u08c1g\u0180lmr\u26ff\u270d\u2714eft\u0100ar\u09e6\u2707ight\xe1\u09f2apsto;\u67fcight\xe1\u09fdparrow\u0100lr\u2725\u2729ef\xf4\u24edight;\u61ac\u0180afl\u2736\u2739\u273dr;\u6985;\uc000\ud835\udd5dus;\u6a2dimes;\u6a34\u0161\u274b\u274fst;\u6217\xe1\u134e\u0180;ef\u2757\u2758\u1800\u65cange\xbb\u2758ar\u0100;l\u2764\u2765\u4028t;\u6993\u0280achmt\u2773\u2776\u277c\u2785\u2787r\xf2\u08a8orne\xf2\u1d8car\u0100;d\u0f98\u2783;\u696d;\u600eri;\u62bf\u0300achiqt\u2798\u279d\u0a40\u27a2\u27ae\u27bbquo;\u6039r;\uc000\ud835\udcc1m\u0180;eg\u09b2\u27aa\u27ac;\u6a8d;\u6a8f\u0100bu\u252a\u27b3o\u0100;r\u0e1f\u27b9;\u601arok;\u4142\u8400<;cdhilqr\u082b\u27d2\u2639\u27dc\u27e0\u27e5\u27ea\u27f0\u0100ci\u27d7\u27d9;\u6aa6r;\u6a79re\xe5\u25f2mes;\u62c9arr;\u6976uest;\u6a7b\u0100Pi\u27f5\u27f9ar;\u6996\u0180;ef\u2800\u092d\u181b\u65c3r\u0100du\u2807\u280dshar;\u694ahar;\u6966\u0100en\u2817\u2821rtneqq;\uc000\u2268\ufe00\xc5\u281e\u0700Dacdefhilnopsu\u2840\u2845\u2882\u288e\u2893\u28a0\u28a5\u28a8\u28da\u28e2\u28e4\u0a83\u28f3\u2902Dot;\u623a\u0200clpr\u284e\u2852\u2863\u287dr\u803b\xaf\u40af\u0100et\u2857\u2859;\u6642\u0100;e\u285e\u285f\u6720se\xbb\u285f\u0100;s\u103b\u2868to\u0200;dlu\u103b\u2873\u2877\u287bow\xee\u048cef\xf4\u090f\xf0\u13d1ker;\u65ae\u0100oy\u2887\u288cmma;\u6a29;\u443cash;\u6014asuredangle\xbb\u1626r;\uc000\ud835\udd2ao;\u6127\u0180cdn\u28af\u28b4\u28c9ro\u803b\xb5\u40b5\u0200;acd\u1464\u28bd\u28c0\u28c4s\xf4\u16a7ir;\u6af0ot\u80bb\xb7\u01b5us\u0180;bd\u28d2\u1903\u28d3\u6212\u0100;u\u1d3c\u28d8;\u6a2a\u0163\u28de\u28e1p;\u6adb\xf2\u2212\xf0\u0a81\u0100dp\u28e9\u28eeels;\u62a7f;\uc000\ud835\udd5e\u0100ct\u28f8\u28fdr;\uc000\ud835\udcc2pos\xbb\u159d\u0180;lm\u2909\u290a\u290d\u43bctimap;\u62b8\u0c00GLRVabcdefghijlmoprstuvw\u2942\u2953\u297e\u2989\u2998\u29da\u29e9\u2a15\u2a1a\u2a58\u2a5d\u2a83\u2a95\u2aa4\u2aa8\u2b04\u2b07\u2b44\u2b7f\u2bae\u2c34\u2c67\u2c7c\u2ce9\u0100gt\u2947\u294b;\uc000\u22d9\u0338\u0100;v\u2950\u0bcf\uc000\u226b\u20d2\u0180elt\u295a\u2972\u2976ft\u0100ar\u2961\u2967rrow;\u61cdightarrow;\u61ce;\uc000\u22d8\u0338\u0100;v\u297b\u0c47\uc000\u226a\u20d2ightarrow;\u61cf\u0100Dd\u298e\u2993ash;\u62afash;\u62ae\u0280bcnpt\u29a3\u29a7\u29ac\u29b1\u29ccla\xbb\u02deute;\u4144g;\uc000\u2220\u20d2\u0280;Eiop\u0d84\u29bc\u29c0\u29c5\u29c8;\uc000\u2a70\u0338d;\uc000\u224b\u0338s;\u4149ro\xf8\u0d84ur\u0100;a\u29d3\u29d4\u666el\u0100;s\u29d3\u0b38\u01f3\u29df\0\u29e3p\u80bb\xa0\u0b37mp\u0100;e\u0bf9\u0c00\u0280aeouy\u29f4\u29fe\u2a03\u2a10\u2a13\u01f0\u29f9\0\u29fb;\u6a43on;\u4148dil;\u4146ng\u0100;d\u0d7e\u2a0aot;\uc000\u2a6d\u0338p;\u6a42;\u443dash;\u6013\u0380;Aadqsx\u0b92\u2a29\u2a2d\u2a3b\u2a41\u2a45\u2a50rr;\u61d7r\u0100hr\u2a33\u2a36k;\u6924\u0100;o\u13f2\u13f0ot;\uc000\u2250\u0338ui\xf6\u0b63\u0100ei\u2a4a\u2a4ear;\u6928\xed\u0b98ist\u0100;s\u0ba0\u0b9fr;\uc000\ud835\udd2b\u0200Eest\u0bc5\u2a66\u2a79\u2a7c\u0180;qs\u0bbc\u2a6d\u0be1\u0180;qs\u0bbc\u0bc5\u2a74lan\xf4\u0be2i\xed\u0bea\u0100;r\u0bb6\u2a81\xbb\u0bb7\u0180Aap\u2a8a\u2a8d\u2a91r\xf2\u2971rr;\u61aear;\u6af2\u0180;sv\u0f8d\u2a9c\u0f8c\u0100;d\u2aa1\u2aa2\u62fc;\u62facy;\u445a\u0380AEadest\u2ab7\u2aba\u2abe\u2ac2\u2ac5\u2af6\u2af9r\xf2\u2966;\uc000\u2266\u0338rr;\u619ar;\u6025\u0200;fqs\u0c3b\u2ace\u2ae3\u2aeft\u0100ar\u2ad4\u2ad9rro\xf7\u2ac1ightarro\xf7\u2a90\u0180;qs\u0c3b\u2aba\u2aealan\xf4\u0c55\u0100;s\u0c55\u2af4\xbb\u0c36i\xed\u0c5d\u0100;r\u0c35\u2afei\u0100;e\u0c1a\u0c25i\xe4\u0d90\u0100pt\u2b0c\u2b11f;\uc000\ud835\udd5f\u8180\xac;in\u2b19\u2b1a\u2b36\u40acn\u0200;Edv\u0b89\u2b24\u2b28\u2b2e;\uc000\u22f9\u0338ot;\uc000\u22f5\u0338\u01e1\u0b89\u2b33\u2b35;\u62f7;\u62f6i\u0100;v\u0cb8\u2b3c\u01e1\u0cb8\u2b41\u2b43;\u62fe;\u62fd\u0180aor\u2b4b\u2b63\u2b69r\u0200;ast\u0b7b\u2b55\u2b5a\u2b5flle\xec\u0b7bl;\uc000\u2afd\u20e5;\uc000\u2202\u0338lint;\u6a14\u0180;ce\u0c92\u2b70\u2b73u\xe5\u0ca5\u0100;c\u0c98\u2b78\u0100;e\u0c92\u2b7d\xf1\u0c98\u0200Aait\u2b88\u2b8b\u2b9d\u2ba7r\xf2\u2988rr\u0180;cw\u2b94\u2b95\u2b99\u619b;\uc000\u2933\u0338;\uc000\u219d\u0338ghtarrow\xbb\u2b95ri\u0100;e\u0ccb\u0cd6\u0380chimpqu\u2bbd\u2bcd\u2bd9\u2b04\u0b78\u2be4\u2bef\u0200;cer\u0d32\u2bc6\u0d37\u2bc9u\xe5\u0d45;\uc000\ud835\udcc3ort\u026d\u2b05\0\0\u2bd6ar\xe1\u2b56m\u0100;e\u0d6e\u2bdf\u0100;q\u0d74\u0d73su\u0100bp\u2beb\u2bed\xe5\u0cf8\xe5\u0d0b\u0180bcp\u2bf6\u2c11\u2c19\u0200;Ees\u2bff\u2c00\u0d22\u2c04\u6284;\uc000\u2ac5\u0338et\u0100;e\u0d1b\u2c0bq\u0100;q\u0d23\u2c00c\u0100;e\u0d32\u2c17\xf1\u0d38\u0200;Ees\u2c22\u2c23\u0d5f\u2c27\u6285;\uc000\u2ac6\u0338et\u0100;e\u0d58\u2c2eq\u0100;q\u0d60\u2c23\u0200gilr\u2c3d\u2c3f\u2c45\u2c47\xec\u0bd7lde\u803b\xf1\u40f1\xe7\u0c43iangle\u0100lr\u2c52\u2c5ceft\u0100;e\u0c1a\u2c5a\xf1\u0c26ight\u0100;e\u0ccb\u2c65\xf1\u0cd7\u0100;m\u2c6c\u2c6d\u43bd\u0180;es\u2c74\u2c75\u2c79\u4023ro;\u6116p;\u6007\u0480DHadgilrs\u2c8f\u2c94\u2c99\u2c9e\u2ca3\u2cb0\u2cb6\u2cd3\u2ce3ash;\u62adarr;\u6904p;\uc000\u224d\u20d2ash;\u62ac\u0100et\u2ca8\u2cac;\uc000\u2265\u20d2;\uc000>\u20d2nfin;\u69de\u0180Aet\u2cbd\u2cc1\u2cc5rr;\u6902;\uc000\u2264\u20d2\u0100;r\u2cca\u2ccd\uc000<\u20d2ie;\uc000\u22b4\u20d2\u0100At\u2cd8\u2cdcrr;\u6903rie;\uc000\u22b5\u20d2im;\uc000\u223c\u20d2\u0180Aan\u2cf0\u2cf4\u2d02rr;\u61d6r\u0100hr\u2cfa\u2cfdk;\u6923\u0100;o\u13e7\u13e5ear;\u6927\u1253\u1a95\0\0\0\0\0\0\0\0\0\0\0\0\0\u2d2d\0\u2d38\u2d48\u2d60\u2d65\u2d72\u2d84\u1b07\0\0\u2d8d\u2dab\0\u2dc8\u2dce\0\u2ddc\u2e19\u2e2b\u2e3e\u2e43\u0100cs\u2d31\u1a97ute\u803b\xf3\u40f3\u0100iy\u2d3c\u2d45r\u0100;c\u1a9e\u2d42\u803b\xf4\u40f4;\u443e\u0280abios\u1aa0\u2d52\u2d57\u01c8\u2d5alac;\u4151v;\u6a38old;\u69bclig;\u4153\u0100cr\u2d69\u2d6dir;\u69bf;\uc000\ud835\udd2c\u036f\u2d79\0\0\u2d7c\0\u2d82n;\u42dbave\u803b\xf2\u40f2;\u69c1\u0100bm\u2d88\u0df4ar;\u69b5\u0200acit\u2d95\u2d98\u2da5\u2da8r\xf2\u1a80\u0100ir\u2d9d\u2da0r;\u69beoss;\u69bbn\xe5\u0e52;\u69c0\u0180aei\u2db1\u2db5\u2db9cr;\u414dga;\u43c9\u0180cdn\u2dc0\u2dc5\u01cdron;\u43bf;\u69b6pf;\uc000\ud835\udd60\u0180ael\u2dd4\u2dd7\u01d2r;\u69b7rp;\u69b9\u0380;adiosv\u2dea\u2deb\u2dee\u2e08\u2e0d\u2e10\u2e16\u6228r\xf2\u1a86\u0200;efm\u2df7\u2df8\u2e02\u2e05\u6a5dr\u0100;o\u2dfe\u2dff\u6134f\xbb\u2dff\u803b\xaa\u40aa\u803b\xba\u40bagof;\u62b6r;\u6a56lope;\u6a57;\u6a5b\u0180clo\u2e1f\u2e21\u2e27\xf2\u2e01ash\u803b\xf8\u40f8l;\u6298i\u016c\u2e2f\u2e34de\u803b\xf5\u40f5es\u0100;a\u01db\u2e3as;\u6a36ml\u803b\xf6\u40f6bar;\u633d\u0ae1\u2e5e\0\u2e7d\0\u2e80\u2e9d\0\u2ea2\u2eb9\0\0\u2ecb\u0e9c\0\u2f13\0\0\u2f2b\u2fbc\0\u2fc8r\u0200;ast\u0403\u2e67\u2e72\u0e85\u8100\xb6;l\u2e6d\u2e6e\u40b6le\xec\u0403\u0269\u2e78\0\0\u2e7bm;\u6af3;\u6afdy;\u443fr\u0280cimpt\u2e8b\u2e8f\u2e93\u1865\u2e97nt;\u4025od;\u402eil;\u6030enk;\u6031r;\uc000\ud835\udd2d\u0180imo\u2ea8\u2eb0\u2eb4\u0100;v\u2ead\u2eae\u43c6;\u43d5ma\xf4\u0a76ne;\u660e\u0180;tv\u2ebf\u2ec0\u2ec8\u43c0chfork\xbb\u1ffd;\u43d6\u0100au\u2ecf\u2edfn\u0100ck\u2ed5\u2eddk\u0100;h\u21f4\u2edb;\u610e\xf6\u21f4s\u0480;abcdemst\u2ef3\u2ef4\u1908\u2ef9\u2efd\u2f04\u2f06\u2f0a\u2f0e\u402bcir;\u6a23ir;\u6a22\u0100ou\u1d40\u2f02;\u6a25;\u6a72n\u80bb\xb1\u0e9dim;\u6a26wo;\u6a27\u0180ipu\u2f19\u2f20\u2f25ntint;\u6a15f;\uc000\ud835\udd61nd\u803b\xa3\u40a3\u0500;Eaceinosu\u0ec8\u2f3f\u2f41\u2f44\u2f47\u2f81\u2f89\u2f92\u2f7e\u2fb6;\u6ab3p;\u6ab7u\xe5\u0ed9\u0100;c\u0ece\u2f4c\u0300;acens\u0ec8\u2f59\u2f5f\u2f66\u2f68\u2f7eppro\xf8\u2f43urlye\xf1\u0ed9\xf1\u0ece\u0180aes\u2f6f\u2f76\u2f7approx;\u6ab9qq;\u6ab5im;\u62e8i\xed\u0edfme\u0100;s\u2f88\u0eae\u6032\u0180Eas\u2f78\u2f90\u2f7a\xf0\u2f75\u0180dfp\u0eec\u2f99\u2faf\u0180als\u2fa0\u2fa5\u2faalar;\u632eine;\u6312urf;\u6313\u0100;t\u0efb\u2fb4\xef\u0efbrel;\u62b0\u0100ci\u2fc0\u2fc5r;\uc000\ud835\udcc5;\u43c8ncsp;\u6008\u0300fiopsu\u2fda\u22e2\u2fdf\u2fe5\u2feb\u2ff1r;\uc000\ud835\udd2epf;\uc000\ud835\udd62rime;\u6057cr;\uc000\ud835\udcc6\u0180aeo\u2ff8\u3009\u3013t\u0100ei\u2ffe\u3005rnion\xf3\u06b0nt;\u6a16st\u0100;e\u3010\u3011\u403f\xf1\u1f19\xf4\u0f14\u0a80ABHabcdefhilmnoprstux\u3040\u3051\u3055\u3059\u30e0\u310e\u312b\u3147\u3162\u3172\u318e\u3206\u3215\u3224\u3229\u3258\u326e\u3272\u3290\u32b0\u32b7\u0180art\u3047\u304a\u304cr\xf2\u10b3\xf2\u03ddail;\u691car\xf2\u1c65ar;\u6964\u0380cdenqrt\u3068\u3075\u3078\u307f\u308f\u3094\u30cc\u0100eu\u306d\u3071;\uc000\u223d\u0331te;\u4155i\xe3\u116emptyv;\u69b3g\u0200;del\u0fd1\u3089\u308b\u308d;\u6992;\u69a5\xe5\u0fd1uo\u803b\xbb\u40bbr\u0580;abcfhlpstw\u0fdc\u30ac\u30af\u30b7\u30b9\u30bc\u30be\u30c0\u30c3\u30c7\u30cap;\u6975\u0100;f\u0fe0\u30b4s;\u6920;\u6933s;\u691e\xeb\u225d\xf0\u272el;\u6945im;\u6974l;\u61a3;\u619d\u0100ai\u30d1\u30d5il;\u691ao\u0100;n\u30db\u30dc\u6236al\xf3\u0f1e\u0180abr\u30e7\u30ea\u30eer\xf2\u17e5rk;\u6773\u0100ak\u30f3\u30fdc\u0100ek\u30f9\u30fb;\u407d;\u405d\u0100es\u3102\u3104;\u698cl\u0100du\u310a\u310c;\u698e;\u6990\u0200aeuy\u3117\u311c\u3127\u3129ron;\u4159\u0100di\u3121\u3125il;\u4157\xec\u0ff2\xe2\u30fa;\u4440\u0200clqs\u3134\u3137\u313d\u3144a;\u6937dhar;\u6969uo\u0100;r\u020e\u020dh;\u61b3\u0180acg\u314e\u315f\u0f44l\u0200;ips\u0f78\u3158\u315b\u109cn\xe5\u10bbar\xf4\u0fa9t;\u65ad\u0180ilr\u3169\u1023\u316esht;\u697d;\uc000\ud835\udd2f\u0100ao\u3177\u3186r\u0100du\u317d\u317f\xbb\u047b\u0100;l\u1091\u3184;\u696c\u0100;v\u318b\u318c\u43c1;\u43f1\u0180gns\u3195\u31f9\u31fcht\u0300ahlrst\u31a4\u31b0\u31c2\u31d8\u31e4\u31eerrow\u0100;t\u0fdc\u31ada\xe9\u30c8arpoon\u0100du\u31bb\u31bfow\xee\u317ep\xbb\u1092eft\u0100ah\u31ca\u31d0rrow\xf3\u0feaarpoon\xf3\u0551ightarrows;\u61c9quigarro\xf7\u30cbhreetimes;\u62ccg;\u42daingdotse\xf1\u1f32\u0180ahm\u320d\u3210\u3213r\xf2\u0feaa\xf2\u0551;\u600foust\u0100;a\u321e\u321f\u63b1che\xbb\u321fmid;\u6aee\u0200abpt\u3232\u323d\u3240\u3252\u0100nr\u3237\u323ag;\u67edr;\u61fer\xeb\u1003\u0180afl\u3247\u324a\u324er;\u6986;\uc000\ud835\udd63us;\u6a2eimes;\u6a35\u0100ap\u325d\u3267r\u0100;g\u3263\u3264\u4029t;\u6994olint;\u6a12ar\xf2\u31e3\u0200achq\u327b\u3280\u10bc\u3285quo;\u603ar;\uc000\ud835\udcc7\u0100bu\u30fb\u328ao\u0100;r\u0214\u0213\u0180hir\u3297\u329b\u32a0re\xe5\u31f8mes;\u62cai\u0200;efl\u32aa\u1059\u1821\u32ab\u65b9tri;\u69celuhar;\u6968;\u611e\u0d61\u32d5\u32db\u32df\u332c\u3338\u3371\0\u337a\u33a4\0\0\u33ec\u33f0\0\u3428\u3448\u345a\u34ad\u34b1\u34ca\u34f1\0\u3616\0\0\u3633cute;\u415bqu\xef\u27ba\u0500;Eaceinpsy\u11ed\u32f3\u32f5\u32ff\u3302\u330b\u330f\u331f\u3326\u3329;\u6ab4\u01f0\u32fa\0\u32fc;\u6ab8on;\u4161u\xe5\u11fe\u0100;d\u11f3\u3307il;\u415frc;\u415d\u0180Eas\u3316\u3318\u331b;\u6ab6p;\u6abaim;\u62e9olint;\u6a13i\xed\u1204;\u4441ot\u0180;be\u3334\u1d47\u3335\u62c5;\u6a66\u0380Aacmstx\u3346\u334a\u3357\u335b\u335e\u3363\u336drr;\u61d8r\u0100hr\u3350\u3352\xeb\u2228\u0100;o\u0a36\u0a34t\u803b\xa7\u40a7i;\u403bwar;\u6929m\u0100in\u3369\xf0nu\xf3\xf1t;\u6736r\u0100;o\u3376\u2055\uc000\ud835\udd30\u0200acoy\u3382\u3386\u3391\u33a0rp;\u666f\u0100hy\u338b\u338fcy;\u4449;\u4448rt\u026d\u3399\0\0\u339ci\xe4\u1464ara\xec\u2e6f\u803b\xad\u40ad\u0100gm\u33a8\u33b4ma\u0180;fv\u33b1\u33b2\u33b2\u43c3;\u43c2\u0400;deglnpr\u12ab\u33c5\u33c9\u33ce\u33d6\u33de\u33e1\u33e6ot;\u6a6a\u0100;q\u12b1\u12b0\u0100;E\u33d3\u33d4\u6a9e;\u6aa0\u0100;E\u33db\u33dc\u6a9d;\u6a9fe;\u6246lus;\u6a24arr;\u6972ar\xf2\u113d\u0200aeit\u33f8\u3408\u340f\u3417\u0100ls\u33fd\u3404lsetm\xe9\u336ahp;\u6a33parsl;\u69e4\u0100dl\u1463\u3414e;\u6323\u0100;e\u341c\u341d\u6aaa\u0100;s\u3422\u3423\u6aac;\uc000\u2aac\ufe00\u0180flp\u342e\u3433\u3442tcy;\u444c\u0100;b\u3438\u3439\u402f\u0100;a\u343e\u343f\u69c4r;\u633ff;\uc000\ud835\udd64a\u0100dr\u344d\u0402es\u0100;u\u3454\u3455\u6660it\xbb\u3455\u0180csu\u3460\u3479\u349f\u0100au\u3465\u346fp\u0100;s\u1188\u346b;\uc000\u2293\ufe00p\u0100;s\u11b4\u3475;\uc000\u2294\ufe00u\u0100bp\u347f\u348f\u0180;es\u1197\u119c\u3486et\u0100;e\u1197\u348d\xf1\u119d\u0180;es\u11a8\u11ad\u3496et\u0100;e\u11a8\u349d\xf1\u11ae\u0180;af\u117b\u34a6\u05b0r\u0165\u34ab\u05b1\xbb\u117car\xf2\u1148\u0200cemt\u34b9\u34be\u34c2\u34c5r;\uc000\ud835\udcc8tm\xee\xf1i\xec\u3415ar\xe6\u11be\u0100ar\u34ce\u34d5r\u0100;f\u34d4\u17bf\u6606\u0100an\u34da\u34edight\u0100ep\u34e3\u34eapsilo\xee\u1ee0h\xe9\u2eafs\xbb\u2852\u0280bcmnp\u34fb\u355e\u1209\u358b\u358e\u0480;Edemnprs\u350e\u350f\u3511\u3515\u351e\u3523\u352c\u3531\u3536\u6282;\u6ac5ot;\u6abd\u0100;d\u11da\u351aot;\u6ac3ult;\u6ac1\u0100Ee\u3528\u352a;\u6acb;\u628alus;\u6abfarr;\u6979\u0180eiu\u353d\u3552\u3555t\u0180;en\u350e\u3545\u354bq\u0100;q\u11da\u350feq\u0100;q\u352b\u3528m;\u6ac7\u0100bp\u355a\u355c;\u6ad5;\u6ad3c\u0300;acens\u11ed\u356c\u3572\u3579\u357b\u3326ppro\xf8\u32faurlye\xf1\u11fe\xf1\u11f3\u0180aes\u3582\u3588\u331bppro\xf8\u331aq\xf1\u3317g;\u666a\u0680123;Edehlmnps\u35a9\u35ac\u35af\u121c\u35b2\u35b4\u35c0\u35c9\u35d5\u35da\u35df\u35e8\u35ed\u803b\xb9\u40b9\u803b\xb2\u40b2\u803b\xb3\u40b3;\u6ac6\u0100os\u35b9\u35bct;\u6abeub;\u6ad8\u0100;d\u1222\u35c5ot;\u6ac4s\u0100ou\u35cf\u35d2l;\u67c9b;\u6ad7arr;\u697bult;\u6ac2\u0100Ee\u35e4\u35e6;\u6acc;\u628blus;\u6ac0\u0180eiu\u35f4\u3609\u360ct\u0180;en\u121c\u35fc\u3602q\u0100;q\u1222\u35b2eq\u0100;q\u35e7\u35e4m;\u6ac8\u0100bp\u3611\u3613;\u6ad4;\u6ad6\u0180Aan\u361c\u3620\u362drr;\u61d9r\u0100hr\u3626\u3628\xeb\u222e\u0100;o\u0a2b\u0a29war;\u692alig\u803b\xdf\u40df\u0be1\u3651\u365d\u3660\u12ce\u3673\u3679\0\u367e\u36c2\0\0\0\0\0\u36db\u3703\0\u3709\u376c\0\0\0\u3787\u0272\u3656\0\0\u365bget;\u6316;\u43c4r\xeb\u0e5f\u0180aey\u3666\u366b\u3670ron;\u4165dil;\u4163;\u4442lrec;\u6315r;\uc000\ud835\udd31\u0200eiko\u3686\u369d\u36b5\u36bc\u01f2\u368b\0\u3691e\u01004f\u1284\u1281a\u0180;sv\u3698\u3699\u369b\u43b8ym;\u43d1\u0100cn\u36a2\u36b2k\u0100as\u36a8\u36aeppro\xf8\u12c1im\xbb\u12acs\xf0\u129e\u0100as\u36ba\u36ae\xf0\u12c1rn\u803b\xfe\u40fe\u01ec\u031f\u36c6\u22e7es\u8180\xd7;bd\u36cf\u36d0\u36d8\u40d7\u0100;a\u190f\u36d5r;\u6a31;\u6a30\u0180eps\u36e1\u36e3\u3700\xe1\u2a4d\u0200;bcf\u0486\u36ec\u36f0\u36f4ot;\u6336ir;\u6af1\u0100;o\u36f9\u36fc\uc000\ud835\udd65rk;\u6ada\xe1\u3362rime;\u6034\u0180aip\u370f\u3712\u3764d\xe5\u1248\u0380adempst\u3721\u374d\u3740\u3751\u3757\u375c\u375fngle\u0280;dlqr\u3730\u3731\u3736\u3740\u3742\u65b5own\xbb\u1dbbeft\u0100;e\u2800\u373e\xf1\u092e;\u625cight\u0100;e\u32aa\u374b\xf1\u105aot;\u65ecinus;\u6a3alus;\u6a39b;\u69cdime;\u6a3bezium;\u63e2\u0180cht\u3772\u377d\u3781\u0100ry\u3777\u377b;\uc000\ud835\udcc9;\u4446cy;\u445brok;\u4167\u0100io\u378b\u378ex\xf4\u1777head\u0100lr\u3797\u37a0eftarro\xf7\u084fightarrow\xbb\u0f5d\u0900AHabcdfghlmoprstuw\u37d0\u37d3\u37d7\u37e4\u37f0\u37fc\u380e\u381c\u3823\u3834\u3851\u385d\u386b\u38a9\u38cc\u38d2\u38ea\u38f6r\xf2\u03edar;\u6963\u0100cr\u37dc\u37e2ute\u803b\xfa\u40fa\xf2\u1150r\u01e3\u37ea\0\u37edy;\u445eve;\u416d\u0100iy\u37f5\u37farc\u803b\xfb\u40fb;\u4443\u0180abh\u3803\u3806\u380br\xf2\u13adlac;\u4171a\xf2\u13c3\u0100ir\u3813\u3818sht;\u697e;\uc000\ud835\udd32rave\u803b\xf9\u40f9\u0161\u3827\u3831r\u0100lr\u382c\u382e\xbb\u0957\xbb\u1083lk;\u6580\u0100ct\u3839\u384d\u026f\u383f\0\0\u384arn\u0100;e\u3845\u3846\u631cr\xbb\u3846op;\u630fri;\u65f8\u0100al\u3856\u385acr;\u416b\u80bb\xa8\u0349\u0100gp\u3862\u3866on;\u4173f;\uc000\ud835\udd66\u0300adhlsu\u114b\u3878\u387d\u1372\u3891\u38a0own\xe1\u13b3arpoon\u0100lr\u3888\u388cef\xf4\u382digh\xf4\u382fi\u0180;hl\u3899\u389a\u389c\u43c5\xbb\u13faon\xbb\u389aparrows;\u61c8\u0180cit\u38b0\u38c4\u38c8\u026f\u38b6\0\0\u38c1rn\u0100;e\u38bc\u38bd\u631dr\xbb\u38bdop;\u630eng;\u416fri;\u65f9cr;\uc000\ud835\udcca\u0180dir\u38d9\u38dd\u38e2ot;\u62f0lde;\u4169i\u0100;f\u3730\u38e8\xbb\u1813\u0100am\u38ef\u38f2r\xf2\u38a8l\u803b\xfc\u40fcangle;\u69a7\u0780ABDacdeflnoprsz\u391c\u391f\u3929\u392d\u39b5\u39b8\u39bd\u39df\u39e4\u39e8\u39f3\u39f9\u39fd\u3a01\u3a20r\xf2\u03f7ar\u0100;v\u3926\u3927\u6ae8;\u6ae9as\xe8\u03e1\u0100nr\u3932\u3937grt;\u699c\u0380eknprst\u34e3\u3946\u394b\u3952\u395d\u3964\u3996app\xe1\u2415othin\xe7\u1e96\u0180hir\u34eb\u2ec8\u3959op\xf4\u2fb5\u0100;h\u13b7\u3962\xef\u318d\u0100iu\u3969\u396dgm\xe1\u33b3\u0100bp\u3972\u3984setneq\u0100;q\u397d\u3980\uc000\u228a\ufe00;\uc000\u2acb\ufe00setneq\u0100;q\u398f\u3992\uc000\u228b\ufe00;\uc000\u2acc\ufe00\u0100hr\u399b\u399fet\xe1\u369ciangle\u0100lr\u39aa\u39afeft\xbb\u0925ight\xbb\u1051y;\u4432ash\xbb\u1036\u0180elr\u39c4\u39d2\u39d7\u0180;be\u2dea\u39cb\u39cfar;\u62bbq;\u625alip;\u62ee\u0100bt\u39dc\u1468a\xf2\u1469r;\uc000\ud835\udd33tr\xe9\u39aesu\u0100bp\u39ef\u39f1\xbb\u0d1c\xbb\u0d59pf;\uc000\ud835\udd67ro\xf0\u0efbtr\xe9\u39b4\u0100cu\u3a06\u3a0br;\uc000\ud835\udccb\u0100bp\u3a10\u3a18n\u0100Ee\u3980\u3a16\xbb\u397en\u0100Ee\u3992\u3a1e\xbb\u3990igzag;\u699a\u0380cefoprs\u3a36\u3a3b\u3a56\u3a5b\u3a54\u3a61\u3a6airc;\u4175\u0100di\u3a40\u3a51\u0100bg\u3a45\u3a49ar;\u6a5fe\u0100;q\u15fa\u3a4f;\u6259erp;\u6118r;\uc000\ud835\udd34pf;\uc000\ud835\udd68\u0100;e\u1479\u3a66at\xe8\u1479cr;\uc000\ud835\udccc\u0ae3\u178e\u3a87\0\u3a8b\0\u3a90\u3a9b\0\0\u3a9d\u3aa8\u3aab\u3aaf\0\0\u3ac3\u3ace\0\u3ad8\u17dc\u17dftr\xe9\u17d1r;\uc000\ud835\udd35\u0100Aa\u3a94\u3a97r\xf2\u03c3r\xf2\u09f6;\u43be\u0100Aa\u3aa1\u3aa4r\xf2\u03b8r\xf2\u09eba\xf0\u2713is;\u62fb\u0180dpt\u17a4\u3ab5\u3abe\u0100fl\u3aba\u17a9;\uc000\ud835\udd69im\xe5\u17b2\u0100Aa\u3ac7\u3acar\xf2\u03cer\xf2\u0a01\u0100cq\u3ad2\u17b8r;\uc000\ud835\udccd\u0100pt\u17d6\u3adcr\xe9\u17d4\u0400acefiosu\u3af0\u3afd\u3b08\u3b0c\u3b11\u3b15\u3b1b\u3b21c\u0100uy\u3af6\u3afbte\u803b\xfd\u40fd;\u444f\u0100iy\u3b02\u3b06rc;\u4177;\u444bn\u803b\xa5\u40a5r;\uc000\ud835\udd36cy;\u4457pf;\uc000\ud835\udd6acr;\uc000\ud835\udcce\u0100cm\u3b26\u3b29y;\u444el\u803b\xff\u40ff\u0500acdefhiosw\u3b42\u3b48\u3b54\u3b58\u3b64\u3b69\u3b6d\u3b74\u3b7a\u3b80cute;\u417a\u0100ay\u3b4d\u3b52ron;\u417e;\u4437ot;\u417c\u0100et\u3b5d\u3b61tr\xe6\u155fa;\u43b6r;\uc000\ud835\udd37cy;\u4436grarr;\u61ddpf;\uc000\ud835\udd6bcr;\uc000\ud835\udccf\u0100jn\u3b85\u3b87;\u600dj;\u600c" - .split("") - .map((c) => c.charCodeAt(0))); -//# sourceMappingURL=decode-data-html.js.map \ No newline at end of file diff --git a/node_modules/entities/lib/esm/generated/decode-data-html.js.map b/node_modules/entities/lib/esm/generated/decode-data-html.js.map deleted file mode 100644 index c4b1e6b..0000000 --- a/node_modules/entities/lib/esm/generated/decode-data-html.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"decode-data-html.js","sourceRoot":"https://raw.githubusercontent.com/fb55/entities/61afd4701eaa736978b13c7351cd3de9a96b04bc/src/","sources":["generated/decode-data-html.ts"],"names":[],"mappings":"AAAA,8CAA8C;AAE9C,eAAe,IAAI,WAAW;AAC1B,kBAAkB;AAClB,268CAA268C;KACt68C,KAAK,CAAC,EAAE,CAAC;KACT,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CACnC,CAAC"} \ No newline at end of file diff --git a/node_modules/entities/lib/esm/generated/decode-data-xml.d.ts b/node_modules/entities/lib/esm/generated/decode-data-xml.d.ts deleted file mode 100644 index 4a3f533..0000000 --- a/node_modules/entities/lib/esm/generated/decode-data-xml.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -declare const _default: Uint16Array; -export default _default; -//# sourceMappingURL=decode-data-xml.d.ts.map \ No newline at end of file diff --git a/node_modules/entities/lib/esm/generated/decode-data-xml.d.ts.map b/node_modules/entities/lib/esm/generated/decode-data-xml.d.ts.map deleted file mode 100644 index be2a9a2..0000000 --- a/node_modules/entities/lib/esm/generated/decode-data-xml.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"decode-data-xml.d.ts","sourceRoot":"https://raw.githubusercontent.com/fb55/entities/61afd4701eaa736978b13c7351cd3de9a96b04bc/src/","sources":["generated/decode-data-xml.ts"],"names":[],"mappings":";AAEA,wBAKE"} \ No newline at end of file diff --git a/node_modules/entities/lib/esm/generated/decode-data-xml.js b/node_modules/entities/lib/esm/generated/decode-data-xml.js deleted file mode 100644 index b01dec7..0000000 --- a/node_modules/entities/lib/esm/generated/decode-data-xml.js +++ /dev/null @@ -1,7 +0,0 @@ -// Generated using scripts/write-decode-map.ts -export default new Uint16Array( -// prettier-ignore -"\u0200aglq\t\x15\x18\x1b\u026d\x0f\0\0\x12p;\u4026os;\u4027t;\u403et;\u403cuot;\u4022" - .split("") - .map((c) => c.charCodeAt(0))); -//# sourceMappingURL=decode-data-xml.js.map \ No newline at end of file diff --git a/node_modules/entities/lib/esm/generated/decode-data-xml.js.map b/node_modules/entities/lib/esm/generated/decode-data-xml.js.map deleted file mode 100644 index 86f7150..0000000 --- a/node_modules/entities/lib/esm/generated/decode-data-xml.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"decode-data-xml.js","sourceRoot":"https://raw.githubusercontent.com/fb55/entities/61afd4701eaa736978b13c7351cd3de9a96b04bc/src/","sources":["generated/decode-data-xml.ts"],"names":[],"mappings":"AAAA,8CAA8C;AAE9C,eAAe,IAAI,WAAW;AAC1B,kBAAkB;AAClB,uFAAuF;KAClF,KAAK,CAAC,EAAE,CAAC;KACT,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CACnC,CAAC"} \ No newline at end of file diff --git a/node_modules/entities/lib/esm/generated/encode-html.d.ts b/node_modules/entities/lib/esm/generated/encode-html.d.ts deleted file mode 100644 index 0704827..0000000 --- a/node_modules/entities/lib/esm/generated/encode-html.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -type EncodeTrieNode = string | { - v?: string; - n: number | Map<number, EncodeTrieNode>; - o?: string; -}; -declare const _default: Map<number, EncodeTrieNode>; -export default _default; -//# sourceMappingURL=encode-html.d.ts.map \ No newline at end of file diff --git a/node_modules/entities/lib/esm/generated/encode-html.d.ts.map b/node_modules/entities/lib/esm/generated/encode-html.d.ts.map deleted file mode 100644 index e665a6e..0000000 --- a/node_modules/entities/lib/esm/generated/encode-html.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"encode-html.d.ts","sourceRoot":"https://raw.githubusercontent.com/fb55/entities/61afd4701eaa736978b13c7351cd3de9a96b04bc/src/","sources":["generated/encode-html.ts"],"names":[],"mappings":"AAEA,KAAK,cAAc,GACb,MAAM,GACN;IAAE,CAAC,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,GAAG,GAAG,CAAC,MAAM,EAAE,cAAc,CAAC,CAAC;IAAC,CAAC,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC;;AAY1E,wBAAo+tB"} \ No newline at end of file diff --git a/node_modules/entities/lib/esm/generated/encode-html.js b/node_modules/entities/lib/esm/generated/encode-html.js deleted file mode 100644 index 9f1858b..0000000 --- a/node_modules/entities/lib/esm/generated/encode-html.js +++ /dev/null @@ -1,10 +0,0 @@ -// Generated using scripts/write-encode-map.ts -function restoreDiff(arr) { - for (let i = 1; i < arr.length; i++) { - arr[i][0] += arr[i - 1][0] + 1; - } - return arr; -} -// prettier-ignore -export default new Map(/* #__PURE__ */ restoreDiff([[9, "	"], [0, "
"], [22, "!"], [0, """], [0, "#"], [0, "$"], [0, "%"], [0, "&"], [0, "'"], [0, "("], [0, ")"], [0, "*"], [0, "+"], [0, ","], [1, "."], [0, "/"], [10, ":"], [0, ";"], [0, { v: "<", n: 8402, o: "<⃒" }], [0, { v: "=", n: 8421, o: "=⃥" }], [0, { v: ">", n: 8402, o: ">⃒" }], [0, "?"], [0, "@"], [26, "["], [0, "\"], [0, "]"], [0, "^"], [0, "_"], [0, "`"], [5, { n: 106, o: "fj" }], [20, "{"], [0, "|"], [0, "}"], [34, " "], [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, "Á"], [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, "â"], [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, "ă"], [0, "Ą"], [0, "ą"], [0, "Ć"], [0, "ć"], [0, "Ĉ"], [0, "ĉ"], [0, "Ċ"], [0, "ċ"], [0, "Č"], [0, "č"], [0, "Ď"], [0, "ď"], [0, "Đ"], [0, "đ"], [0, "Ē"], [0, "ē"], [2, "Ė"], [0, "ė"], [0, "Ę"], [0, "ę"], [0, "Ě"], [0, "ě"], [0, "Ĝ"], [0, "ĝ"], [0, "Ğ"], [0, "ğ"], [0, "Ġ"], [0, "ġ"], [0, "Ģ"], [1, "Ĥ"], [0, "ĥ"], [0, "Ħ"], [0, "ħ"], [0, "Ĩ"], [0, "ĩ"], [0, "Ī"], [0, "ī"], [2, "Į"], [0, "į"], [0, "İ"], [0, "ı"], [0, "IJ"], [0, "ij"], [0, "Ĵ"], [0, "ĵ"], [0, "Ķ"], [0, "ķ"], [0, "ĸ"], [0, "Ĺ"], [0, "ĺ"], [0, "Ļ"], [0, "ļ"], [0, "Ľ"], [0, "ľ"], [0, "Ŀ"], [0, "ŀ"], [0, "Ł"], [0, "ł"], [0, "Ń"], [0, "ń"], [0, "Ņ"], [0, "ņ"], [0, "Ň"], [0, "ň"], [0, "ʼn"], [0, "Ŋ"], [0, "ŋ"], [0, "Ō"], [0, "ō"], [2, "Ő"], [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, "ű"], [0, "Ų"], [0, "ų"], [0, "Ŵ"], [0, "ŵ"], [0, "Ŷ"], [0, "ŷ"], [0, "Ÿ"], [0, "Ź"], [0, "ź"], [0, "Ż"], [0, "ż"], [0, "Ž"], [0, "ž"], [19, "ƒ"], [34, "Ƶ"], [63, "ǵ"], [65, "ȷ"], [142, "ˆ"], [0, "ˇ"], [16, "˘"], [0, "˙"], [0, "˚"], [0, "˛"], [0, "˜"], [0, "˝"], [51, "̑"], [127, "Α"], [0, "Β"], [0, "Γ"], [0, "Δ"], [0, "Ε"], [0, "Ζ"], [0, "Η"], [0, "Θ"], [0, "Ι"], [0, "Κ"], [0, "Λ"], [0, "Μ"], [0, "Ν"], [0, "Ξ"], [0, "Ο"], [0, "Π"], [0, "Ρ"], [1, "Σ"], [0, "Τ"], [0, "Υ"], [0, "Φ"], [0, "Χ"], [0, "Ψ"], [0, "Ω"], [7, "α"], [0, "β"], [0, "γ"], [0, "δ"], [0, "ε"], [0, "ζ"], [0, "η"], [0, "θ"], [0, "ι"], [0, "κ"], [0, "λ"], [0, "μ"], [0, "ν"], [0, "ξ"], [0, "ο"], [0, "π"], [0, "ρ"], [0, "ς"], [0, "σ"], [0, "τ"], [0, "υ"], [0, "φ"], [0, "χ"], [0, "ψ"], [0, "ω"], [7, "ϑ"], [0, "ϒ"], [2, "ϕ"], [0, "ϖ"], [5, "Ϝ"], [0, "ϝ"], [18, "ϰ"], [0, "ϱ"], [3, "ϵ"], [0, "϶"], [10, "Ё"], [0, "Ђ"], [0, "Ѓ"], [0, "Є"], [0, "Ѕ"], [0, "І"], [0, "Ї"], [0, "Ј"], [0, "Љ"], [0, "Њ"], [0, "Ћ"], [0, "Ќ"], [1, "Ў"], [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, "Я"], [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, "ђ"], [0, "ѓ"], [0, "є"], [0, "ѕ"], [0, "і"], [0, "ї"], [0, "ј"], [0, "љ"], [0, "њ"], [0, "ћ"], [0, "ќ"], [1, "ў"], [0, "џ"], [7074, " "], [0, " "], [0, " "], [0, " "], [1, " "], [0, " "], [0, " "], [0, " "], [0, "​"], [0, "‌"], [0, "‍"], [0, "‎"], [0, "‏"], [0, "‐"], [2, "–"], [0, "—"], [0, "―"], [0, "‖"], [1, "‘"], [0, "’"], [0, "‚"], [1, "“"], [0, "”"], [0, "„"], [1, "†"], [0, "‡"], [0, "•"], [2, "‥"], [0, "…"], [9, "‰"], [0, "‱"], [0, "′"], [0, "″"], [0, "‴"], [0, "‵"], [3, "‹"], [0, "›"], [3, "‾"], [2, "⁁"], [1, "⁃"], [0, "⁄"], [10, "⁏"], [7, "⁗"], [7, { v: " ", n: 8202, o: "  " }], [0, "⁠"], [0, "⁡"], [0, "⁢"], [0, "⁣"], [72, "€"], [46, "⃛"], [0, "⃜"], [37, "ℂ"], [2, "℅"], [4, "ℊ"], [0, "ℋ"], [0, "ℌ"], [0, "ℍ"], [0, "ℎ"], [0, "ℏ"], [0, "ℐ"], [0, "ℑ"], [0, "ℒ"], [0, "ℓ"], [1, "ℕ"], [0, "№"], [0, "℗"], [0, "℘"], [0, "ℙ"], [0, "ℚ"], [0, "ℛ"], [0, "ℜ"], [0, "ℝ"], [0, "℞"], [3, "™"], [1, "ℤ"], [2, "℧"], [0, "ℨ"], [0, "℩"], [2, "ℬ"], [0, "ℭ"], [1, "ℯ"], [0, "ℰ"], [0, "ℱ"], [1, "ℳ"], [0, "ℴ"], [0, "ℵ"], [0, "ℶ"], [0, "ℷ"], [0, "ℸ"], [12, "ⅅ"], [0, "ⅆ"], [0, "ⅇ"], [0, "ⅈ"], [10, "⅓"], [0, "⅔"], [0, "⅕"], [0, "⅖"], [0, "⅗"], [0, "⅘"], [0, "⅙"], [0, "⅚"], [0, "⅛"], [0, "⅜"], [0, "⅝"], [0, "⅞"], [49, "←"], [0, "↑"], [0, "→"], [0, "↓"], [0, "↔"], [0, "↕"], [0, "↖"], [0, "↗"], [0, "↘"], [0, "↙"], [0, "↚"], [0, "↛"], [1, { v: "↝", n: 824, o: "↝̸" }], [0, "↞"], [0, "↟"], [0, "↠"], [0, "↡"], [0, "↢"], [0, "↣"], [0, "↤"], [0, "↥"], [0, "↦"], [0, "↧"], [1, "↩"], [0, "↪"], [0, "↫"], [0, "↬"], [0, "↭"], [0, "↮"], [1, "↰"], [0, "↱"], [0, "↲"], [0, "↳"], [1, "↵"], [0, "↶"], [0, "↷"], [2, "↺"], [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, "⇝"], [6, "⇤"], [0, "⇥"], [15, "⇵"], [7, "⇽"], [0, "⇾"], [0, "⇿"], [0, "∀"], [0, "∁"], [0, { v: "∂", n: 824, o: "∂̸" }], [0, "∃"], [0, "∄"], [0, "∅"], [1, "∇"], [0, "∈"], [0, "∉"], [1, "∋"], [0, "∌"], [2, "∏"], [0, "∐"], [0, "∑"], [0, "−"], [0, "∓"], [0, "∔"], [1, "∖"], [0, "∗"], [0, "∘"], [1, "√"], [2, "∝"], [0, "∞"], [0, "∟"], [0, { v: "∠", n: 8402, o: "∠⃒" }], [0, "∡"], [0, "∢"], [0, "∣"], [0, "∤"], [0, "∥"], [0, "∦"], [0, "∧"], [0, "∨"], [0, { v: "∩", n: 65024, o: "∩︀" }], [0, { v: "∪", n: 65024, o: "∪︀" }], [0, "∫"], [0, "∬"], [0, "∭"], [0, "∮"], [0, "∯"], [0, "∰"], [0, "∱"], [0, "∲"], [0, "∳"], [0, "∴"], [0, "∵"], [0, "∶"], [0, "∷"], [0, "∸"], [1, "∺"], [0, "∻"], [0, { v: "∼", n: 8402, o: "∼⃒" }], [0, { v: "∽", n: 817, o: "∽̱" }], [0, { v: "∾", n: 819, o: "∾̳" }], [0, "∿"], [0, "≀"], [0, "≁"], [0, { v: "≂", n: 824, o: "≂̸" }], [0, "≃"], [0, "≄"], [0, "≅"], [0, "≆"], [0, "≇"], [0, "≈"], [0, "≉"], [0, "≊"], [0, { v: "≋", n: 824, o: "≋̸" }], [0, "≌"], [0, { v: "≍", n: 8402, o: "≍⃒" }], [0, { v: "≎", n: 824, o: "≎̸" }], [0, { v: "≏", n: 824, o: "≏̸" }], [0, { v: "≐", n: 824, o: "≐̸" }], [0, "≑"], [0, "≒"], [0, "≓"], [0, "≔"], [0, "≕"], [0, "≖"], [0, "≗"], [1, "≙"], [0, "≚"], [1, "≜"], [2, "≟"], [0, "≠"], [0, { v: "≡", n: 8421, o: "≡⃥" }], [0, "≢"], [1, { v: "≤", n: 8402, o: "≤⃒" }], [0, { v: "≥", n: 8402, o: "≥⃒" }], [0, { v: "≦", n: 824, o: "≦̸" }], [0, { v: "≧", n: 824, o: "≧̸" }], [0, { v: "≨", n: 65024, o: "≨︀" }], [0, { v: "≩", n: 65024, o: "≩︀" }], [0, { v: "≪", n: new Map(/* #__PURE__ */ restoreDiff([[824, "≪̸"], [7577, "≪⃒"]])) }], [0, { v: "≫", n: new Map(/* #__PURE__ */ restoreDiff([[824, "≫̸"], [7577, "≫⃒"]])) }], [0, "≬"], [0, "≭"], [0, "≮"], [0, "≯"], [0, "≰"], [0, "≱"], [0, "≲"], [0, "≳"], [0, "≴"], [0, "≵"], [0, "≶"], [0, "≷"], [0, "≸"], [0, "≹"], [0, "≺"], [0, "≻"], [0, "≼"], [0, "≽"], [0, "≾"], [0, { v: "≿", n: 824, o: "≿̸" }], [0, "⊀"], [0, "⊁"], [0, { v: "⊂", n: 8402, o: "⊂⃒" }], [0, { v: "⊃", n: 8402, o: "⊃⃒" }], [0, "⊄"], [0, "⊅"], [0, "⊆"], [0, "⊇"], [0, "⊈"], [0, "⊉"], [0, { v: "⊊", n: 65024, o: "⊊︀" }], [0, { v: "⊋", n: 65024, o: "⊋︀" }], [1, "⊍"], [0, "⊎"], [0, { v: "⊏", n: 824, o: "⊏̸" }], [0, { v: "⊐", n: 824, o: "⊐̸" }], [0, "⊑"], [0, "⊒"], [0, { v: "⊓", n: 65024, o: "⊓︀" }], [0, { v: "⊔", n: 65024, o: "⊔︀" }], [0, "⊕"], [0, "⊖"], [0, "⊗"], [0, "⊘"], [0, "⊙"], [0, "⊚"], [0, "⊛"], [1, "⊝"], [0, "⊞"], [0, "⊟"], [0, "⊠"], [0, "⊡"], [0, "⊢"], [0, "⊣"], [0, "⊤"], [0, "⊥"], [1, "⊧"], [0, "⊨"], [0, "⊩"], [0, "⊪"], [0, "⊫"], [0, "⊬"], [0, "⊭"], [0, "⊮"], [0, "⊯"], [0, "⊰"], [1, "⊲"], [0, "⊳"], [0, { v: "⊴", n: 8402, o: "⊴⃒" }], [0, { v: "⊵", n: 8402, o: "⊵⃒" }], [0, "⊶"], [0, "⊷"], [0, "⊸"], [0, "⊹"], [0, "⊺"], [0, "⊻"], [1, "⊽"], [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, { v: "⋘", n: 824, o: "⋘̸" }], [0, { v: "⋙", n: 824, o: "⋙̸" }], [0, { v: "⋚", n: 65024, o: "⋚︀" }], [0, { v: "⋛", n: 65024, o: "⋛︀" }], [2, "⋞"], [0, "⋟"], [0, "⋠"], [0, "⋡"], [0, "⋢"], [0, "⋣"], [2, "⋦"], [0, "⋧"], [0, "⋨"], [0, "⋩"], [0, "⋪"], [0, "⋫"], [0, "⋬"], [0, "⋭"], [0, "⋮"], [0, "⋯"], [0, "⋰"], [0, "⋱"], [0, "⋲"], [0, "⋳"], [0, "⋴"], [0, { v: "⋵", n: 824, o: "⋵̸" }], [0, "⋶"], [0, "⋷"], [1, { v: "⋹", n: 824, o: "⋹̸" }], [0, "⋺"], [0, "⋻"], [0, "⋼"], [0, "⋽"], [0, "⋾"], [6, "⌅"], [0, "⌆"], [1, "⌈"], [0, "⌉"], [0, "⌊"], [0, "⌋"], [0, "⌌"], [0, "⌍"], [0, "⌎"], [0, "⌏"], [0, "⌐"], [1, "⌒"], [0, "⌓"], [1, "⌕"], [0, "⌖"], [5, "⌜"], [0, "⌝"], [0, "⌞"], [0, "⌟"], [2, "⌢"], [0, "⌣"], [9, "⌭"], [0, "⌮"], [7, "⌶"], [6, "⌽"], [1, "⌿"], [60, "⍼"], [51, "⎰"], [0, "⎱"], [2, "⎴"], [0, "⎵"], [0, "⎶"], [37, "⏜"], [0, "⏝"], [0, "⏞"], [0, "⏟"], [2, "⏢"], [4, "⏧"], [59, "␣"], [164, "Ⓢ"], [55, "─"], [1, "│"], [9, "┌"], [3, "┐"], [3, "└"], [3, "┘"], [3, "├"], [7, "┤"], [7, "┬"], [7, "┴"], [7, "┼"], [19, "═"], [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, "╬"], [19, "▀"], [3, "▄"], [3, "█"], [8, "░"], [0, "▒"], [0, "▓"], [13, "□"], [8, "▪"], [0, "▫"], [1, "▭"], [0, "▮"], [2, "▱"], [1, "△"], [0, "▴"], [0, "▵"], [2, "▸"], [0, "▹"], [3, "▽"], [0, "▾"], [0, "▿"], [2, "◂"], [0, "◃"], [6, "◊"], [0, "○"], [32, "◬"], [2, "◯"], [8, "◸"], [0, "◹"], [0, "◺"], [0, "◻"], [0, "◼"], [8, "★"], [0, "☆"], [7, "☎"], [49, "♀"], [1, "♂"], [29, "♠"], [2, "♣"], [1, "♥"], [0, "♦"], [3, "♪"], [2, "♭"], [0, "♮"], [0, "♯"], [163, "✓"], [3, "✗"], [8, "✠"], [21, "✶"], [33, "❘"], [25, "❲"], [0, "❳"], [84, "⟈"], [0, "⟉"], [28, "⟦"], [0, "⟧"], [0, "⟨"], [0, "⟩"], [0, "⟪"], [0, "⟫"], [0, "⟬"], [0, "⟭"], [7, "⟵"], [0, "⟶"], [0, "⟷"], [0, "⟸"], [0, "⟹"], [0, "⟺"], [1, "⟼"], [2, "⟿"], [258, "⤂"], [0, "⤃"], [0, "⤄"], [0, "⤅"], [6, "⤌"], [0, "⤍"], [0, "⤎"], [0, "⤏"], [0, "⤐"], [0, "⤑"], [0, "⤒"], [0, "⤓"], [2, "⤖"], [2, "⤙"], [0, "⤚"], [0, "⤛"], [0, "⤜"], [0, "⤝"], [0, "⤞"], [0, "⤟"], [0, "⤠"], [2, "⤣"], [0, "⤤"], [0, "⤥"], [0, "⤦"], [0, "⤧"], [0, "⤨"], [0, "⤩"], [0, "⤪"], [8, { v: "⤳", n: 824, o: "⤳̸" }], [1, "⤵"], [0, "⤶"], [0, "⤷"], [0, "⤸"], [0, "⤹"], [2, "⤼"], [0, "⤽"], [7, "⥅"], [2, "⥈"], [0, "⥉"], [0, "⥊"], [0, "⥋"], [2, "⥎"], [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, "⥯"], [0, "⥰"], [0, "⥱"], [0, "⥲"], [0, "⥳"], [0, "⥴"], [0, "⥵"], [0, "⥶"], [1, "⥸"], [0, "⥹"], [1, "⥻"], [0, "⥼"], [0, "⥽"], [0, "⥾"], [0, "⥿"], [5, "⦅"], [0, "⦆"], [4, "⦋"], [0, "⦌"], [0, "⦍"], [0, "⦎"], [0, "⦏"], [0, "⦐"], [0, "⦑"], [0, "⦒"], [0, "⦓"], [0, "⦔"], [0, "⦕"], [0, "⦖"], [3, "⦚"], [1, "⦜"], [0, "⦝"], [6, "⦤"], [0, "⦥"], [0, "⦦"], [0, "⦧"], [0, "⦨"], [0, "⦩"], [0, "⦪"], [0, "⦫"], [0, "⦬"], [0, "⦭"], [0, "⦮"], [0, "⦯"], [0, "⦰"], [0, "⦱"], [0, "⦲"], [0, "⦳"], [0, "⦴"], [0, "⦵"], [0, "⦶"], [0, "⦷"], [1, "⦹"], [1, "⦻"], [0, "⦼"], [1, "⦾"], [0, "⦿"], [0, "⧀"], [0, "⧁"], [0, "⧂"], [0, "⧃"], [0, "⧄"], [0, "⧅"], [3, "⧉"], [3, "⧍"], [0, "⧎"], [0, { v: "⧏", n: 824, o: "⧏̸" }], [0, { v: "⧐", n: 824, o: "⧐̸" }], [11, "⧜"], [0, "⧝"], [0, "⧞"], [4, "⧣"], [0, "⧤"], [0, "⧥"], [5, "⧫"], [8, "⧴"], [1, "⧶"], [9, "⨀"], [0, "⨁"], [0, "⨂"], [1, "⨄"], [1, "⨆"], [5, "⨌"], [0, "⨍"], [2, "⨐"], [0, "⨑"], [0, "⨒"], [0, "⨓"], [0, "⨔"], [0, "⨕"], [0, "⨖"], [0, "⨗"], [10, "⨢"], [0, "⨣"], [0, "⨤"], [0, "⨥"], [0, "⨦"], [0, "⨧"], [1, "⨩"], [0, "⨪"], [2, "⨭"], [0, "⨮"], [0, "⨯"], [0, "⨰"], [0, "⨱"], [1, "⨳"], [0, "⨴"], [0, "⨵"], [0, "⨶"], [0, "⨷"], [0, "⨸"], [0, "⨹"], [0, "⨺"], [0, "⨻"], [0, "⨼"], [2, "⨿"], [0, "⩀"], [1, "⩂"], [0, "⩃"], [0, "⩄"], [0, "⩅"], [0, "⩆"], [0, "⩇"], [0, "⩈"], [0, "⩉"], [0, "⩊"], [0, "⩋"], [0, "⩌"], [0, "⩍"], [2, "⩐"], [2, "⩓"], [0, "⩔"], [0, "⩕"], [0, "⩖"], [0, "⩗"], [0, "⩘"], [1, "⩚"], [0, "⩛"], [0, "⩜"], [0, "⩝"], [1, "⩟"], [6, "⩦"], [3, "⩪"], [2, { v: "⩭", n: 824, o: "⩭̸" }], [0, "⩮"], [0, "⩯"], [0, { v: "⩰", n: 824, o: "⩰̸" }], [0, "⩱"], [0, "⩲"], [0, "⩳"], [0, "⩴"], [0, "⩵"], [1, "⩷"], [0, "⩸"], [0, "⩹"], [0, "⩺"], [0, "⩻"], [0, "⩼"], [0, { v: "⩽", n: 824, o: "⩽̸" }], [0, { v: "⩾", n: 824, o: "⩾̸" }], [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, "⪚"], [2, "⪝"], [0, "⪞"], [0, "⪟"], [0, "⪠"], [0, { v: "⪡", n: 824, o: "⪡̸" }], [0, { v: "⪢", n: 824, o: "⪢̸" }], [1, "⪤"], [0, "⪥"], [0, "⪦"], [0, "⪧"], [0, "⪨"], [0, "⪩"], [0, "⪪"], [0, "⪫"], [0, { v: "⪬", n: 65024, o: "⪬︀" }], [0, { v: "⪭", n: 65024, o: "⪭︀" }], [0, "⪮"], [0, { v: "⪯", n: 824, o: "⪯̸" }], [0, { v: "⪰", n: 824, o: "⪰̸" }], [2, "⪳"], [0, "⪴"], [0, "⪵"], [0, "⪶"], [0, "⪷"], [0, "⪸"], [0, "⪹"], [0, "⪺"], [0, "⪻"], [0, "⪼"], [0, "⪽"], [0, "⪾"], [0, "⪿"], [0, "⫀"], [0, "⫁"], [0, "⫂"], [0, "⫃"], [0, "⫄"], [0, { v: "⫅", n: 824, o: "⫅̸" }], [0, { v: "⫆", n: 824, o: "⫆̸" }], [0, "⫇"], [0, "⫈"], [2, { v: "⫋", n: 65024, o: "⫋︀" }], [0, { v: "⫌", n: 65024, o: "⫌︀" }], [2, "⫏"], [0, "⫐"], [0, "⫑"], [0, "⫒"], [0, "⫓"], [0, "⫔"], [0, "⫕"], [0, "⫖"], [0, "⫗"], [0, "⫘"], [0, "⫙"], [0, "⫚"], [0, "⫛"], [8, "⫤"], [1, "⫦"], [0, "⫧"], [0, "⫨"], [0, "⫩"], [1, "⫫"], [0, "⫬"], [0, "⫭"], [0, "⫮"], [0, "⫯"], [0, "⫰"], [0, "⫱"], [0, "⫲"], [0, "⫳"], [9, { v: "⫽", n: 8421, o: "⫽⃥" }], [44343, { n: new Map(/* #__PURE__ */ restoreDiff([[56476, "𝒜"], [1, "𝒞"], [0, "𝒟"], [2, "𝒢"], [2, "𝒥"], [0, "𝒦"], [2, "𝒩"], [0, "𝒪"], [0, "𝒫"], [0, "𝒬"], [1, "𝒮"], [0, "𝒯"], [0, "𝒰"], [0, "𝒱"], [0, "𝒲"], [0, "𝒳"], [0, "𝒴"], [0, "𝒵"], [0, "𝒶"], [0, "𝒷"], [0, "𝒸"], [0, "𝒹"], [1, "𝒻"], [1, "𝒽"], [0, "𝒾"], [0, "𝒿"], [0, "𝓀"], [0, "𝓁"], [0, "𝓂"], [0, "𝓃"], [1, "𝓅"], [0, "𝓆"], [0, "𝓇"], [0, "𝓈"], [0, "𝓉"], [0, "𝓊"], [0, "𝓋"], [0, "𝓌"], [0, "𝓍"], [0, "𝓎"], [0, "𝓏"], [52, "𝔄"], [0, "𝔅"], [1, "𝔇"], [0, "𝔈"], [0, "𝔉"], [0, "𝔊"], [2, "𝔍"], [0, "𝔎"], [0, "𝔏"], [0, "𝔐"], [0, "𝔑"], [0, "𝔒"], [0, "𝔓"], [0, "𝔔"], [1, "𝔖"], [0, "𝔗"], [0, "𝔘"], [0, "𝔙"], [0, "𝔚"], [0, "𝔛"], [0, "𝔜"], [1, "𝔞"], [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, "𝔼"], [0, "𝔽"], [0, "𝔾"], [1, "𝕀"], [0, "𝕁"], [0, "𝕂"], [0, "𝕃"], [0, "𝕄"], [1, "𝕆"], [3, "𝕊"], [0, "𝕋"], [0, "𝕌"], [0, "𝕍"], [0, "𝕎"], [0, "𝕏"], [0, "𝕐"], [1, "𝕒"], [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, "𝕫"]])) }], [8906, "ff"], [0, "fi"], [0, "fl"], [0, "ffi"], [0, "ffl"]])); -//# sourceMappingURL=encode-html.js.map \ No newline at end of file diff --git a/node_modules/entities/lib/esm/generated/encode-html.js.map b/node_modules/entities/lib/esm/generated/encode-html.js.map deleted file mode 100644 index 8906ff8..0000000 --- a/node_modules/entities/lib/esm/generated/encode-html.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"encode-html.js","sourceRoot":"https://raw.githubusercontent.com/fb55/entities/61afd4701eaa736978b13c7351cd3de9a96b04bc/src/","sources":["generated/encode-html.ts"],"names":[],"mappings":"AAAA,8CAA8C;AAM9C,SAAS,WAAW,CAChB,GAAM;IAEN,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,GAAG,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;QACjC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;KAClC;IACD,OAAO,GAAG,CAAC;AACf,CAAC;AAED,kBAAkB;AAClB,eAAe,IAAI,GAAG,CAAwB,eAAe,CAAA,WAAW,CAAC,CAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,EAAE,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAA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C,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,EAAC,CAAC,EAAC,CAAC,IAAI,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/entities/lib/esm/index.d.ts b/node_modules/entities/lib/esm/index.d.ts deleted file mode 100644 index dd4eb11..0000000 --- a/node_modules/entities/lib/esm/index.d.ts +++ /dev/null @@ -1,96 +0,0 @@ -import { DecodingMode } from "./decode.js"; -/** The level of entities to support. */ -export declare enum EntityLevel { - /** Support only XML entities. */ - XML = 0, - /** Support HTML entities, which are a superset of XML entities. */ - HTML = 1 -} -export declare enum EncodingMode { - /** - * The output is UTF-8 encoded. Only characters that need escaping within - * XML will be escaped. - */ - UTF8 = 0, - /** - * The output consists only of ASCII characters. Characters that need - * escaping within HTML, and characters that aren't ASCII characters will - * be escaped. - */ - ASCII = 1, - /** - * Encode all characters that have an equivalent entity, as well as all - * characters that are not ASCII characters. - */ - Extensive = 2, - /** - * Encode all characters that have to be escaped in HTML attributes, - * following {@link https://html.spec.whatwg.org/multipage/parsing.html#escapingString}. - */ - Attribute = 3, - /** - * Encode all characters that have to be escaped in HTML text, - * following {@link https://html.spec.whatwg.org/multipage/parsing.html#escapingString}. - */ - Text = 4 -} -export interface DecodingOptions { - /** - * The level of entities to support. - * @default {@link EntityLevel.XML} - */ - level?: EntityLevel; - /** - * Decoding mode. If `Legacy`, will support legacy entities not terminated - * with a semicolon (`;`). - * - * Always `Strict` for XML. For HTML, set this to `true` if you are parsing - * an attribute value. - * - * The deprecated `decodeStrict` function defaults this to `Strict`. - * - * @default {@link DecodingMode.Legacy} - */ - mode?: DecodingMode | undefined; -} -/** - * Decodes a string with entities. - * - * @param data String to decode. - * @param options Decoding options. - */ -export declare function decode(data: string, options?: DecodingOptions | EntityLevel): string; -/** - * Decodes a string with entities. Does not allow missing trailing semicolons for entities. - * - * @param data String to decode. - * @param options Decoding options. - * @deprecated Use `decode` with the `mode` set to `Strict`. - */ -export declare function decodeStrict(data: string, options?: DecodingOptions | EntityLevel): string; -/** - * Options for `encode`. - */ -export interface EncodingOptions { - /** - * The level of entities to support. - * @default {@link EntityLevel.XML} - */ - level?: EntityLevel; - /** - * Output format. - * @default {@link EncodingMode.Extensive} - */ - mode?: EncodingMode; -} -/** - * Encodes a string with entities. - * - * @param data String to encode. - * @param options Encoding options. - */ -export declare function encode(data: string, options?: EncodingOptions | EntityLevel): string; -export { encodeXML, escape, escapeUTF8, escapeAttribute, escapeText, } from "./escape.js"; -export { encodeHTML, encodeNonAsciiHTML, encodeHTML as encodeHTML4, encodeHTML as encodeHTML5, } from "./encode.js"; -export { EntityDecoder, DecodingMode, decodeXML, decodeHTML, decodeHTMLStrict, decodeHTMLAttribute, decodeHTML as decodeHTML4, decodeHTML as decodeHTML5, decodeHTMLStrict as decodeHTML4Strict, decodeHTMLStrict as decodeHTML5Strict, decodeXML as decodeXMLStrict, } from "./decode.js"; -//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/entities/lib/esm/index.d.ts.map b/node_modules/entities/lib/esm/index.d.ts.map deleted file mode 100644 index cfeef9f..0000000 --- a/node_modules/entities/lib/esm/index.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"https://raw.githubusercontent.com/fb55/entities/61afd4701eaa736978b13c7351cd3de9a96b04bc/src/","sources":["index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAyB,YAAY,EAAE,MAAM,aAAa,CAAC;AASlE,wCAAwC;AACxC,oBAAY,WAAW;IACnB,iCAAiC;IACjC,GAAG,IAAI;IACP,mEAAmE;IACnE,IAAI,IAAI;CACX;AAED,oBAAY,YAAY;IACpB;;;OAGG;IACH,IAAI,IAAA;IACJ;;;;OAIG;IACH,KAAK,IAAA;IACL;;;OAGG;IACH,SAAS,IAAA;IACT;;;OAGG;IACH,SAAS,IAAA;IACT;;;OAGG;IACH,IAAI,IAAA;CACP;AAED,MAAM,WAAW,eAAe;IAC5B;;;OAGG;IACH,KAAK,CAAC,EAAE,WAAW,CAAC;IACpB;;;;;;;;;;OAUG;IACH,IAAI,CAAC,EAAE,YAAY,GAAG,SAAS,CAAC;CACnC;AAED;;;;;GAKG;AACH,wBAAgB,MAAM,CAClB,IAAI,EAAE,MAAM,EACZ,OAAO,GAAE,eAAe,GAAG,WAA6B,GACzD,MAAM,CASR;AAED;;;;;;GAMG;AACH,wBAAgB,YAAY,CACxB,IAAI,EAAE,MAAM,EACZ,OAAO,GAAE,eAAe,GAAG,WAA6B,GACzD,MAAM,CAKR;AAED;;GAEG;AACH,MAAM,WAAW,eAAe;IAC5B;;;OAGG;IACH,KAAK,CAAC,EAAE,WAAW,CAAC;IACpB;;;OAGG;IACH,IAAI,CAAC,EAAE,YAAY,CAAC;CACvB;AAED;;;;;GAKG;AACH,wBAAgB,MAAM,CAClB,IAAI,EAAE,MAAM,EACZ,OAAO,GAAE,eAAe,GAAG,WAA6B,GACzD,MAAM,CAkBR;AAED,OAAO,EACH,SAAS,EACT,MAAM,EACN,UAAU,EACV,eAAe,EACf,UAAU,GACb,MAAM,aAAa,CAAC;AAErB,OAAO,EACH,UAAU,EACV,kBAAkB,EAElB,UAAU,IAAI,WAAW,EACzB,UAAU,IAAI,WAAW,GAC5B,MAAM,aAAa,CAAC;AAErB,OAAO,EACH,aAAa,EACb,YAAY,EACZ,SAAS,EACT,UAAU,EACV,gBAAgB,EAChB,mBAAmB,EAEnB,UAAU,IAAI,WAAW,EACzB,UAAU,IAAI,WAAW,EACzB,gBAAgB,IAAI,iBAAiB,EACrC,gBAAgB,IAAI,iBAAiB,EACrC,SAAS,IAAI,eAAe,GAC/B,MAAM,aAAa,CAAC"} \ No newline at end of file diff --git a/node_modules/entities/lib/esm/index.js b/node_modules/entities/lib/esm/index.js deleted file mode 100644 index acc6dbe..0000000 --- a/node_modules/entities/lib/esm/index.js +++ /dev/null @@ -1,99 +0,0 @@ -import { decodeXML, decodeHTML, DecodingMode } from "./decode.js"; -import { encodeHTML, encodeNonAsciiHTML } from "./encode.js"; -import { encodeXML, escapeUTF8, escapeAttribute, escapeText, } from "./escape.js"; -/** The level of entities to support. */ -export var EntityLevel; -(function (EntityLevel) { - /** Support only XML entities. */ - EntityLevel[EntityLevel["XML"] = 0] = "XML"; - /** Support HTML entities, which are a superset of XML entities. */ - EntityLevel[EntityLevel["HTML"] = 1] = "HTML"; -})(EntityLevel || (EntityLevel = {})); -export var EncodingMode; -(function (EncodingMode) { - /** - * The output is UTF-8 encoded. Only characters that need escaping within - * XML will be escaped. - */ - EncodingMode[EncodingMode["UTF8"] = 0] = "UTF8"; - /** - * The output consists only of ASCII characters. Characters that need - * escaping within HTML, and characters that aren't ASCII characters will - * be escaped. - */ - EncodingMode[EncodingMode["ASCII"] = 1] = "ASCII"; - /** - * Encode all characters that have an equivalent entity, as well as all - * characters that are not ASCII characters. - */ - EncodingMode[EncodingMode["Extensive"] = 2] = "Extensive"; - /** - * Encode all characters that have to be escaped in HTML attributes, - * following {@link https://html.spec.whatwg.org/multipage/parsing.html#escapingString}. - */ - EncodingMode[EncodingMode["Attribute"] = 3] = "Attribute"; - /** - * Encode all characters that have to be escaped in HTML text, - * following {@link https://html.spec.whatwg.org/multipage/parsing.html#escapingString}. - */ - EncodingMode[EncodingMode["Text"] = 4] = "Text"; -})(EncodingMode || (EncodingMode = {})); -/** - * Decodes a string with entities. - * - * @param data String to decode. - * @param options Decoding options. - */ -export function decode(data, options = EntityLevel.XML) { - const level = typeof options === "number" ? options : options.level; - if (level === EntityLevel.HTML) { - const mode = typeof options === "object" ? options.mode : undefined; - return decodeHTML(data, mode); - } - return decodeXML(data); -} -/** - * Decodes a string with entities. Does not allow missing trailing semicolons for entities. - * - * @param data String to decode. - * @param options Decoding options. - * @deprecated Use `decode` with the `mode` set to `Strict`. - */ -export function decodeStrict(data, options = EntityLevel.XML) { - var _a; - const opts = typeof options === "number" ? { level: options } : options; - (_a = opts.mode) !== null && _a !== void 0 ? _a : (opts.mode = DecodingMode.Strict); - return decode(data, opts); -} -/** - * Encodes a string with entities. - * - * @param data String to encode. - * @param options Encoding options. - */ -export function encode(data, options = EntityLevel.XML) { - const opts = typeof options === "number" ? { level: options } : options; - // Mode `UTF8` just escapes XML entities - if (opts.mode === EncodingMode.UTF8) - return escapeUTF8(data); - if (opts.mode === EncodingMode.Attribute) - return escapeAttribute(data); - if (opts.mode === EncodingMode.Text) - return escapeText(data); - if (opts.level === EntityLevel.HTML) { - if (opts.mode === EncodingMode.ASCII) { - return encodeNonAsciiHTML(data); - } - return encodeHTML(data); - } - // ASCII and Extensive are equivalent - return encodeXML(data); -} -export { encodeXML, escape, escapeUTF8, escapeAttribute, escapeText, } from "./escape.js"; -export { encodeHTML, encodeNonAsciiHTML, -// Legacy aliases (deprecated) -encodeHTML as encodeHTML4, encodeHTML as encodeHTML5, } from "./encode.js"; -export { EntityDecoder, DecodingMode, decodeXML, decodeHTML, decodeHTMLStrict, decodeHTMLAttribute, -// Legacy aliases (deprecated) -decodeHTML as decodeHTML4, decodeHTML as decodeHTML5, decodeHTMLStrict as decodeHTML4Strict, decodeHTMLStrict as decodeHTML5Strict, decodeXML as decodeXMLStrict, } from "./decode.js"; -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/entities/lib/esm/index.js.map b/node_modules/entities/lib/esm/index.js.map deleted file mode 100644 index 5f634fc..0000000 --- a/node_modules/entities/lib/esm/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sourceRoot":"https://raw.githubusercontent.com/fb55/entities/61afd4701eaa736978b13c7351cd3de9a96b04bc/src/","sources":["index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAClE,OAAO,EAAE,UAAU,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAC7D,OAAO,EACH,SAAS,EACT,UAAU,EACV,eAAe,EACf,UAAU,GACb,MAAM,aAAa,CAAC;AAErB,wCAAwC;AACxC,MAAM,CAAN,IAAY,WAKX;AALD,WAAY,WAAW;IACnB,iCAAiC;IACjC,2CAAO,CAAA;IACP,mEAAmE;IACnE,6CAAQ,CAAA;AACZ,CAAC,EALW,WAAW,KAAX,WAAW,QAKtB;AAED,MAAM,CAAN,IAAY,YA2BX;AA3BD,WAAY,YAAY;IACpB;;;OAGG;IACH,+CAAI,CAAA;IACJ;;;;OAIG;IACH,iDAAK,CAAA;IACL;;;OAGG;IACH,yDAAS,CAAA;IACT;;;OAGG;IACH,yDAAS,CAAA;IACT;;;OAGG;IACH,+CAAI,CAAA;AACR,CAAC,EA3BW,YAAY,KAAZ,YAAY,QA2BvB;AAsBD;;;;;GAKG;AACH,MAAM,UAAU,MAAM,CAClB,IAAY,EACZ,UAAyC,WAAW,CAAC,GAAG;IAExD,MAAM,KAAK,GAAG,OAAO,OAAO,KAAK,QAAQ,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC;IAEpE,IAAI,KAAK,KAAK,WAAW,CAAC,IAAI,EAAE;QAC5B,MAAM,IAAI,GAAG,OAAO,OAAO,KAAK,QAAQ,CAAC,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC;QAC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OAAO,SAAS,CAAC,IAAI,CAAC,CAAC;AAC3B,CAAC;AAED,OAAO,EACH,SAAS,EACT,MAAM,EACN,UAAU,EACV,eAAe,EACf,UAAU,GACb,MAAM,aAAa,CAAC;AAErB,OAAO,EACH,UAAU,EACV,kBAAkB;AAClB,8BAA8B;AAC9B,UAAU,IAAI,WAAW,EACzB,UAAU,IAAI,WAAW,GAC5B,MAAM,aAAa,CAAC;AAErB,OAAO,EACH,aAAa,EACb,YAAY,EACZ,SAAS,EACT,UAAU,EACV,gBAAgB,EAChB,mBAAmB;AACnB,8BAA8B;AAC9B,UAAU,IAAI,WAAW,EACzB,UAAU,IAAI,WAAW,EACzB,gBAAgB,IAAI,iBAAiB,EACrC,gBAAgB,IAAI,iBAAiB,EACrC,SAAS,IAAI,eAAe,GAC/B,MAAM,aAAa,CAAC"} \ No newline at end of file diff --git a/node_modules/entities/lib/esm/package.json b/node_modules/entities/lib/esm/package.json deleted file mode 100644 index 089153b..0000000 --- a/node_modules/entities/lib/esm/package.json +++ /dev/null @@ -1 +0,0 @@ -{"type":"module"} diff --git a/node_modules/entities/lib/generated/decode-data-html.d.ts b/node_modules/entities/lib/generated/decode-data-html.d.ts deleted file mode 100644 index 9cfc4f4..0000000 --- a/node_modules/entities/lib/generated/decode-data-html.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -declare const _default: Uint16Array; -export default _default; -//# sourceMappingURL=decode-data-html.d.ts.map \ No newline at end of file diff --git a/node_modules/entities/lib/generated/decode-data-html.d.ts.map b/node_modules/entities/lib/generated/decode-data-html.d.ts.map deleted file mode 100644 index 6d4d64b..0000000 --- a/node_modules/entities/lib/generated/decode-data-html.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"decode-data-html.d.ts","sourceRoot":"https://raw.githubusercontent.com/fb55/entities/61afd4701eaa736978b13c7351cd3de9a96b04bc/src/","sources":["generated/decode-data-html.ts"],"names":[],"mappings":";AAEA,wBAKE"} \ No newline at end of file diff --git a/node_modules/entities/lib/generated/decode-data-html.js b/node_modules/entities/lib/generated/decode-data-html.js deleted file mode 100644 index 295cd9b..0000000 --- a/node_modules/entities/lib/generated/decode-data-html.js +++ /dev/null @@ -1,9 +0,0 @@ -"use strict"; -// Generated using scripts/write-decode-map.ts -Object.defineProperty(exports, "__esModule", { value: true }); -exports.default = new Uint16Array( -// prettier-ignore -"\u1d41<\xd5\u0131\u028a\u049d\u057b\u05d0\u0675\u06de\u07a2\u07d6\u080f\u0a4a\u0a91\u0da1\u0e6d\u0f09\u0f26\u10ca\u1228\u12e1\u1415\u149d\u14c3\u14df\u1525\0\0\0\0\0\0\u156b\u16cd\u198d\u1c12\u1ddd\u1f7e\u2060\u21b0\u228d\u23c0\u23fb\u2442\u2824\u2912\u2d08\u2e48\u2fce\u3016\u32ba\u3639\u37ac\u38fe\u3a28\u3a71\u3ae0\u3b2e\u0800EMabcfglmnoprstu\\bfms\x7f\x84\x8b\x90\x95\x98\xa6\xb3\xb9\xc8\xcflig\u803b\xc6\u40c6P\u803b&\u4026cute\u803b\xc1\u40c1reve;\u4102\u0100iyx}rc\u803b\xc2\u40c2;\u4410r;\uc000\ud835\udd04rave\u803b\xc0\u40c0pha;\u4391acr;\u4100d;\u6a53\u0100gp\x9d\xa1on;\u4104f;\uc000\ud835\udd38plyFunction;\u6061ing\u803b\xc5\u40c5\u0100cs\xbe\xc3r;\uc000\ud835\udc9cign;\u6254ilde\u803b\xc3\u40c3ml\u803b\xc4\u40c4\u0400aceforsu\xe5\xfb\xfe\u0117\u011c\u0122\u0127\u012a\u0100cr\xea\xf2kslash;\u6216\u0176\xf6\xf8;\u6ae7ed;\u6306y;\u4411\u0180crt\u0105\u010b\u0114ause;\u6235noullis;\u612ca;\u4392r;\uc000\ud835\udd05pf;\uc000\ud835\udd39eve;\u42d8c\xf2\u0113mpeq;\u624e\u0700HOacdefhilorsu\u014d\u0151\u0156\u0180\u019e\u01a2\u01b5\u01b7\u01ba\u01dc\u0215\u0273\u0278\u027ecy;\u4427PY\u803b\xa9\u40a9\u0180cpy\u015d\u0162\u017aute;\u4106\u0100;i\u0167\u0168\u62d2talDifferentialD;\u6145leys;\u612d\u0200aeio\u0189\u018e\u0194\u0198ron;\u410cdil\u803b\xc7\u40c7rc;\u4108nint;\u6230ot;\u410a\u0100dn\u01a7\u01adilla;\u40b8terDot;\u40b7\xf2\u017fi;\u43a7rcle\u0200DMPT\u01c7\u01cb\u01d1\u01d6ot;\u6299inus;\u6296lus;\u6295imes;\u6297o\u0100cs\u01e2\u01f8kwiseContourIntegral;\u6232eCurly\u0100DQ\u0203\u020foubleQuote;\u601duote;\u6019\u0200lnpu\u021e\u0228\u0247\u0255on\u0100;e\u0225\u0226\u6237;\u6a74\u0180git\u022f\u0236\u023aruent;\u6261nt;\u622fourIntegral;\u622e\u0100fr\u024c\u024e;\u6102oduct;\u6210nterClockwiseContourIntegral;\u6233oss;\u6a2fcr;\uc000\ud835\udc9ep\u0100;C\u0284\u0285\u62d3ap;\u624d\u0580DJSZacefios\u02a0\u02ac\u02b0\u02b4\u02b8\u02cb\u02d7\u02e1\u02e6\u0333\u048d\u0100;o\u0179\u02a5trahd;\u6911cy;\u4402cy;\u4405cy;\u440f\u0180grs\u02bf\u02c4\u02c7ger;\u6021r;\u61a1hv;\u6ae4\u0100ay\u02d0\u02d5ron;\u410e;\u4414l\u0100;t\u02dd\u02de\u6207a;\u4394r;\uc000\ud835\udd07\u0100af\u02eb\u0327\u0100cm\u02f0\u0322ritical\u0200ADGT\u0300\u0306\u0316\u031ccute;\u40b4o\u0174\u030b\u030d;\u42d9bleAcute;\u42ddrave;\u4060ilde;\u42dcond;\u62c4ferentialD;\u6146\u0470\u033d\0\0\0\u0342\u0354\0\u0405f;\uc000\ud835\udd3b\u0180;DE\u0348\u0349\u034d\u40a8ot;\u60dcqual;\u6250ble\u0300CDLRUV\u0363\u0372\u0382\u03cf\u03e2\u03f8ontourIntegra\xec\u0239o\u0274\u0379\0\0\u037b\xbb\u0349nArrow;\u61d3\u0100eo\u0387\u03a4ft\u0180ART\u0390\u0396\u03a1rrow;\u61d0ightArrow;\u61d4e\xe5\u02cang\u0100LR\u03ab\u03c4eft\u0100AR\u03b3\u03b9rrow;\u67f8ightArrow;\u67faightArrow;\u67f9ight\u0100AT\u03d8\u03derrow;\u61d2ee;\u62a8p\u0241\u03e9\0\0\u03efrrow;\u61d1ownArrow;\u61d5erticalBar;\u6225n\u0300ABLRTa\u0412\u042a\u0430\u045e\u047f\u037crrow\u0180;BU\u041d\u041e\u0422\u6193ar;\u6913pArrow;\u61f5reve;\u4311eft\u02d2\u043a\0\u0446\0\u0450ightVector;\u6950eeVector;\u695eector\u0100;B\u0459\u045a\u61bdar;\u6956ight\u01d4\u0467\0\u0471eeVector;\u695fector\u0100;B\u047a\u047b\u61c1ar;\u6957ee\u0100;A\u0486\u0487\u62a4rrow;\u61a7\u0100ct\u0492\u0497r;\uc000\ud835\udc9frok;\u4110\u0800NTacdfglmopqstux\u04bd\u04c0\u04c4\u04cb\u04de\u04e2\u04e7\u04ee\u04f5\u0521\u052f\u0536\u0552\u055d\u0560\u0565G;\u414aH\u803b\xd0\u40d0cute\u803b\xc9\u40c9\u0180aiy\u04d2\u04d7\u04dcron;\u411arc\u803b\xca\u40ca;\u442dot;\u4116r;\uc000\ud835\udd08rave\u803b\xc8\u40c8ement;\u6208\u0100ap\u04fa\u04fecr;\u4112ty\u0253\u0506\0\0\u0512mallSquare;\u65fberySmallSquare;\u65ab\u0100gp\u0526\u052aon;\u4118f;\uc000\ud835\udd3csilon;\u4395u\u0100ai\u053c\u0549l\u0100;T\u0542\u0543\u6a75ilde;\u6242librium;\u61cc\u0100ci\u0557\u055ar;\u6130m;\u6a73a;\u4397ml\u803b\xcb\u40cb\u0100ip\u056a\u056fsts;\u6203onentialE;\u6147\u0280cfios\u0585\u0588\u058d\u05b2\u05ccy;\u4424r;\uc000\ud835\udd09lled\u0253\u0597\0\0\u05a3mallSquare;\u65fcerySmallSquare;\u65aa\u0370\u05ba\0\u05bf\0\0\u05c4f;\uc000\ud835\udd3dAll;\u6200riertrf;\u6131c\xf2\u05cb\u0600JTabcdfgorst\u05e8\u05ec\u05ef\u05fa\u0600\u0612\u0616\u061b\u061d\u0623\u066c\u0672cy;\u4403\u803b>\u403emma\u0100;d\u05f7\u05f8\u4393;\u43dcreve;\u411e\u0180eiy\u0607\u060c\u0610dil;\u4122rc;\u411c;\u4413ot;\u4120r;\uc000\ud835\udd0a;\u62d9pf;\uc000\ud835\udd3eeater\u0300EFGLST\u0635\u0644\u064e\u0656\u065b\u0666qual\u0100;L\u063e\u063f\u6265ess;\u62dbullEqual;\u6267reater;\u6aa2ess;\u6277lantEqual;\u6a7eilde;\u6273cr;\uc000\ud835\udca2;\u626b\u0400Aacfiosu\u0685\u068b\u0696\u069b\u069e\u06aa\u06be\u06caRDcy;\u442a\u0100ct\u0690\u0694ek;\u42c7;\u405eirc;\u4124r;\u610clbertSpace;\u610b\u01f0\u06af\0\u06b2f;\u610dizontalLine;\u6500\u0100ct\u06c3\u06c5\xf2\u06a9rok;\u4126mp\u0144\u06d0\u06d8ownHum\xf0\u012fqual;\u624f\u0700EJOacdfgmnostu\u06fa\u06fe\u0703\u0707\u070e\u071a\u071e\u0721\u0728\u0744\u0778\u078b\u078f\u0795cy;\u4415lig;\u4132cy;\u4401cute\u803b\xcd\u40cd\u0100iy\u0713\u0718rc\u803b\xce\u40ce;\u4418ot;\u4130r;\u6111rave\u803b\xcc\u40cc\u0180;ap\u0720\u072f\u073f\u0100cg\u0734\u0737r;\u412ainaryI;\u6148lie\xf3\u03dd\u01f4\u0749\0\u0762\u0100;e\u074d\u074e\u622c\u0100gr\u0753\u0758ral;\u622bsection;\u62c2isible\u0100CT\u076c\u0772omma;\u6063imes;\u6062\u0180gpt\u077f\u0783\u0788on;\u412ef;\uc000\ud835\udd40a;\u4399cr;\u6110ilde;\u4128\u01eb\u079a\0\u079ecy;\u4406l\u803b\xcf\u40cf\u0280cfosu\u07ac\u07b7\u07bc\u07c2\u07d0\u0100iy\u07b1\u07b5rc;\u4134;\u4419r;\uc000\ud835\udd0dpf;\uc000\ud835\udd41\u01e3\u07c7\0\u07ccr;\uc000\ud835\udca5rcy;\u4408kcy;\u4404\u0380HJacfos\u07e4\u07e8\u07ec\u07f1\u07fd\u0802\u0808cy;\u4425cy;\u440cppa;\u439a\u0100ey\u07f6\u07fbdil;\u4136;\u441ar;\uc000\ud835\udd0epf;\uc000\ud835\udd42cr;\uc000\ud835\udca6\u0580JTaceflmost\u0825\u0829\u082c\u0850\u0863\u09b3\u09b8\u09c7\u09cd\u0a37\u0a47cy;\u4409\u803b<\u403c\u0280cmnpr\u0837\u083c\u0841\u0844\u084dute;\u4139bda;\u439bg;\u67ealacetrf;\u6112r;\u619e\u0180aey\u0857\u085c\u0861ron;\u413ddil;\u413b;\u441b\u0100fs\u0868\u0970t\u0500ACDFRTUVar\u087e\u08a9\u08b1\u08e0\u08e6\u08fc\u092f\u095b\u0390\u096a\u0100nr\u0883\u088fgleBracket;\u67e8row\u0180;BR\u0899\u089a\u089e\u6190ar;\u61e4ightArrow;\u61c6eiling;\u6308o\u01f5\u08b7\0\u08c3bleBracket;\u67e6n\u01d4\u08c8\0\u08d2eeVector;\u6961ector\u0100;B\u08db\u08dc\u61c3ar;\u6959loor;\u630aight\u0100AV\u08ef\u08f5rrow;\u6194ector;\u694e\u0100er\u0901\u0917e\u0180;AV\u0909\u090a\u0910\u62a3rrow;\u61a4ector;\u695aiangle\u0180;BE\u0924\u0925\u0929\u62b2ar;\u69cfqual;\u62b4p\u0180DTV\u0937\u0942\u094cownVector;\u6951eeVector;\u6960ector\u0100;B\u0956\u0957\u61bfar;\u6958ector\u0100;B\u0965\u0966\u61bcar;\u6952ight\xe1\u039cs\u0300EFGLST\u097e\u098b\u0995\u099d\u09a2\u09adqualGreater;\u62daullEqual;\u6266reater;\u6276ess;\u6aa1lantEqual;\u6a7dilde;\u6272r;\uc000\ud835\udd0f\u0100;e\u09bd\u09be\u62d8ftarrow;\u61daidot;\u413f\u0180npw\u09d4\u0a16\u0a1bg\u0200LRlr\u09de\u09f7\u0a02\u0a10eft\u0100AR\u09e6\u09ecrrow;\u67f5ightArrow;\u67f7ightArrow;\u67f6eft\u0100ar\u03b3\u0a0aight\xe1\u03bfight\xe1\u03caf;\uc000\ud835\udd43er\u0100LR\u0a22\u0a2ceftArrow;\u6199ightArrow;\u6198\u0180cht\u0a3e\u0a40\u0a42\xf2\u084c;\u61b0rok;\u4141;\u626a\u0400acefiosu\u0a5a\u0a5d\u0a60\u0a77\u0a7c\u0a85\u0a8b\u0a8ep;\u6905y;\u441c\u0100dl\u0a65\u0a6fiumSpace;\u605flintrf;\u6133r;\uc000\ud835\udd10nusPlus;\u6213pf;\uc000\ud835\udd44c\xf2\u0a76;\u439c\u0480Jacefostu\u0aa3\u0aa7\u0aad\u0ac0\u0b14\u0b19\u0d91\u0d97\u0d9ecy;\u440acute;\u4143\u0180aey\u0ab4\u0ab9\u0aberon;\u4147dil;\u4145;\u441d\u0180gsw\u0ac7\u0af0\u0b0eative\u0180MTV\u0ad3\u0adf\u0ae8ediumSpace;\u600bhi\u0100cn\u0ae6\u0ad8\xeb\u0ad9eryThi\xee\u0ad9ted\u0100GL\u0af8\u0b06reaterGreate\xf2\u0673essLes\xf3\u0a48Line;\u400ar;\uc000\ud835\udd11\u0200Bnpt\u0b22\u0b28\u0b37\u0b3areak;\u6060BreakingSpace;\u40a0f;\u6115\u0680;CDEGHLNPRSTV\u0b55\u0b56\u0b6a\u0b7c\u0ba1\u0beb\u0c04\u0c5e\u0c84\u0ca6\u0cd8\u0d61\u0d85\u6aec\u0100ou\u0b5b\u0b64ngruent;\u6262pCap;\u626doubleVerticalBar;\u6226\u0180lqx\u0b83\u0b8a\u0b9bement;\u6209ual\u0100;T\u0b92\u0b93\u6260ilde;\uc000\u2242\u0338ists;\u6204reater\u0380;EFGLST\u0bb6\u0bb7\u0bbd\u0bc9\u0bd3\u0bd8\u0be5\u626fqual;\u6271ullEqual;\uc000\u2267\u0338reater;\uc000\u226b\u0338ess;\u6279lantEqual;\uc000\u2a7e\u0338ilde;\u6275ump\u0144\u0bf2\u0bfdownHump;\uc000\u224e\u0338qual;\uc000\u224f\u0338e\u0100fs\u0c0a\u0c27tTriangle\u0180;BE\u0c1a\u0c1b\u0c21\u62eaar;\uc000\u29cf\u0338qual;\u62ecs\u0300;EGLST\u0c35\u0c36\u0c3c\u0c44\u0c4b\u0c58\u626equal;\u6270reater;\u6278ess;\uc000\u226a\u0338lantEqual;\uc000\u2a7d\u0338ilde;\u6274ested\u0100GL\u0c68\u0c79reaterGreater;\uc000\u2aa2\u0338essLess;\uc000\u2aa1\u0338recedes\u0180;ES\u0c92\u0c93\u0c9b\u6280qual;\uc000\u2aaf\u0338lantEqual;\u62e0\u0100ei\u0cab\u0cb9verseElement;\u620cghtTriangle\u0180;BE\u0ccb\u0ccc\u0cd2\u62ebar;\uc000\u29d0\u0338qual;\u62ed\u0100qu\u0cdd\u0d0cuareSu\u0100bp\u0ce8\u0cf9set\u0100;E\u0cf0\u0cf3\uc000\u228f\u0338qual;\u62e2erset\u0100;E\u0d03\u0d06\uc000\u2290\u0338qual;\u62e3\u0180bcp\u0d13\u0d24\u0d4eset\u0100;E\u0d1b\u0d1e\uc000\u2282\u20d2qual;\u6288ceeds\u0200;EST\u0d32\u0d33\u0d3b\u0d46\u6281qual;\uc000\u2ab0\u0338lantEqual;\u62e1ilde;\uc000\u227f\u0338erset\u0100;E\u0d58\u0d5b\uc000\u2283\u20d2qual;\u6289ilde\u0200;EFT\u0d6e\u0d6f\u0d75\u0d7f\u6241qual;\u6244ullEqual;\u6247ilde;\u6249erticalBar;\u6224cr;\uc000\ud835\udca9ilde\u803b\xd1\u40d1;\u439d\u0700Eacdfgmoprstuv\u0dbd\u0dc2\u0dc9\u0dd5\u0ddb\u0de0\u0de7\u0dfc\u0e02\u0e20\u0e22\u0e32\u0e3f\u0e44lig;\u4152cute\u803b\xd3\u40d3\u0100iy\u0dce\u0dd3rc\u803b\xd4\u40d4;\u441eblac;\u4150r;\uc000\ud835\udd12rave\u803b\xd2\u40d2\u0180aei\u0dee\u0df2\u0df6cr;\u414cga;\u43a9cron;\u439fpf;\uc000\ud835\udd46enCurly\u0100DQ\u0e0e\u0e1aoubleQuote;\u601cuote;\u6018;\u6a54\u0100cl\u0e27\u0e2cr;\uc000\ud835\udcaaash\u803b\xd8\u40d8i\u016c\u0e37\u0e3cde\u803b\xd5\u40d5es;\u6a37ml\u803b\xd6\u40d6er\u0100BP\u0e4b\u0e60\u0100ar\u0e50\u0e53r;\u603eac\u0100ek\u0e5a\u0e5c;\u63deet;\u63b4arenthesis;\u63dc\u0480acfhilors\u0e7f\u0e87\u0e8a\u0e8f\u0e92\u0e94\u0e9d\u0eb0\u0efcrtialD;\u6202y;\u441fr;\uc000\ud835\udd13i;\u43a6;\u43a0usMinus;\u40b1\u0100ip\u0ea2\u0eadncareplan\xe5\u069df;\u6119\u0200;eio\u0eb9\u0eba\u0ee0\u0ee4\u6abbcedes\u0200;EST\u0ec8\u0ec9\u0ecf\u0eda\u627aqual;\u6aaflantEqual;\u627cilde;\u627eme;\u6033\u0100dp\u0ee9\u0eeeuct;\u620fortion\u0100;a\u0225\u0ef9l;\u621d\u0100ci\u0f01\u0f06r;\uc000\ud835\udcab;\u43a8\u0200Ufos\u0f11\u0f16\u0f1b\u0f1fOT\u803b\"\u4022r;\uc000\ud835\udd14pf;\u611acr;\uc000\ud835\udcac\u0600BEacefhiorsu\u0f3e\u0f43\u0f47\u0f60\u0f73\u0fa7\u0faa\u0fad\u1096\u10a9\u10b4\u10bearr;\u6910G\u803b\xae\u40ae\u0180cnr\u0f4e\u0f53\u0f56ute;\u4154g;\u67ebr\u0100;t\u0f5c\u0f5d\u61a0l;\u6916\u0180aey\u0f67\u0f6c\u0f71ron;\u4158dil;\u4156;\u4420\u0100;v\u0f78\u0f79\u611cerse\u0100EU\u0f82\u0f99\u0100lq\u0f87\u0f8eement;\u620builibrium;\u61cbpEquilibrium;\u696fr\xbb\u0f79o;\u43a1ght\u0400ACDFTUVa\u0fc1\u0feb\u0ff3\u1022\u1028\u105b\u1087\u03d8\u0100nr\u0fc6\u0fd2gleBracket;\u67e9row\u0180;BL\u0fdc\u0fdd\u0fe1\u6192ar;\u61e5eftArrow;\u61c4eiling;\u6309o\u01f5\u0ff9\0\u1005bleBracket;\u67e7n\u01d4\u100a\0\u1014eeVector;\u695dector\u0100;B\u101d\u101e\u61c2ar;\u6955loor;\u630b\u0100er\u102d\u1043e\u0180;AV\u1035\u1036\u103c\u62a2rrow;\u61a6ector;\u695biangle\u0180;BE\u1050\u1051\u1055\u62b3ar;\u69d0qual;\u62b5p\u0180DTV\u1063\u106e\u1078ownVector;\u694feeVector;\u695cector\u0100;B\u1082\u1083\u61bear;\u6954ector\u0100;B\u1091\u1092\u61c0ar;\u6953\u0100pu\u109b\u109ef;\u611dndImplies;\u6970ightarrow;\u61db\u0100ch\u10b9\u10bcr;\u611b;\u61b1leDelayed;\u69f4\u0680HOacfhimoqstu\u10e4\u10f1\u10f7\u10fd\u1119\u111e\u1151\u1156\u1161\u1167\u11b5\u11bb\u11bf\u0100Cc\u10e9\u10eeHcy;\u4429y;\u4428FTcy;\u442ccute;\u415a\u0280;aeiy\u1108\u1109\u110e\u1113\u1117\u6abcron;\u4160dil;\u415erc;\u415c;\u4421r;\uc000\ud835\udd16ort\u0200DLRU\u112a\u1134\u113e\u1149ownArrow\xbb\u041eeftArrow\xbb\u089aightArrow\xbb\u0fddpArrow;\u6191gma;\u43a3allCircle;\u6218pf;\uc000\ud835\udd4a\u0272\u116d\0\0\u1170t;\u621aare\u0200;ISU\u117b\u117c\u1189\u11af\u65a1ntersection;\u6293u\u0100bp\u118f\u119eset\u0100;E\u1197\u1198\u628fqual;\u6291erset\u0100;E\u11a8\u11a9\u6290qual;\u6292nion;\u6294cr;\uc000\ud835\udcaear;\u62c6\u0200bcmp\u11c8\u11db\u1209\u120b\u0100;s\u11cd\u11ce\u62d0et\u0100;E\u11cd\u11d5qual;\u6286\u0100ch\u11e0\u1205eeds\u0200;EST\u11ed\u11ee\u11f4\u11ff\u627bqual;\u6ab0lantEqual;\u627dilde;\u627fTh\xe1\u0f8c;\u6211\u0180;es\u1212\u1213\u1223\u62d1rset\u0100;E\u121c\u121d\u6283qual;\u6287et\xbb\u1213\u0580HRSacfhiors\u123e\u1244\u1249\u1255\u125e\u1271\u1276\u129f\u12c2\u12c8\u12d1ORN\u803b\xde\u40deADE;\u6122\u0100Hc\u124e\u1252cy;\u440by;\u4426\u0100bu\u125a\u125c;\u4009;\u43a4\u0180aey\u1265\u126a\u126fron;\u4164dil;\u4162;\u4422r;\uc000\ud835\udd17\u0100ei\u127b\u1289\u01f2\u1280\0\u1287efore;\u6234a;\u4398\u0100cn\u128e\u1298kSpace;\uc000\u205f\u200aSpace;\u6009lde\u0200;EFT\u12ab\u12ac\u12b2\u12bc\u623cqual;\u6243ullEqual;\u6245ilde;\u6248pf;\uc000\ud835\udd4bipleDot;\u60db\u0100ct\u12d6\u12dbr;\uc000\ud835\udcafrok;\u4166\u0ae1\u12f7\u130e\u131a\u1326\0\u132c\u1331\0\0\0\0\0\u1338\u133d\u1377\u1385\0\u13ff\u1404\u140a\u1410\u0100cr\u12fb\u1301ute\u803b\xda\u40dar\u0100;o\u1307\u1308\u619fcir;\u6949r\u01e3\u1313\0\u1316y;\u440eve;\u416c\u0100iy\u131e\u1323rc\u803b\xdb\u40db;\u4423blac;\u4170r;\uc000\ud835\udd18rave\u803b\xd9\u40d9acr;\u416a\u0100di\u1341\u1369er\u0100BP\u1348\u135d\u0100ar\u134d\u1350r;\u405fac\u0100ek\u1357\u1359;\u63dfet;\u63b5arenthesis;\u63ddon\u0100;P\u1370\u1371\u62c3lus;\u628e\u0100gp\u137b\u137fon;\u4172f;\uc000\ud835\udd4c\u0400ADETadps\u1395\u13ae\u13b8\u13c4\u03e8\u13d2\u13d7\u13f3rrow\u0180;BD\u1150\u13a0\u13a4ar;\u6912ownArrow;\u61c5ownArrow;\u6195quilibrium;\u696eee\u0100;A\u13cb\u13cc\u62a5rrow;\u61a5own\xe1\u03f3er\u0100LR\u13de\u13e8eftArrow;\u6196ightArrow;\u6197i\u0100;l\u13f9\u13fa\u43d2on;\u43a5ing;\u416ecr;\uc000\ud835\udcb0ilde;\u4168ml\u803b\xdc\u40dc\u0480Dbcdefosv\u1427\u142c\u1430\u1433\u143e\u1485\u148a\u1490\u1496ash;\u62abar;\u6aeby;\u4412ash\u0100;l\u143b\u143c\u62a9;\u6ae6\u0100er\u1443\u1445;\u62c1\u0180bty\u144c\u1450\u147aar;\u6016\u0100;i\u144f\u1455cal\u0200BLST\u1461\u1465\u146a\u1474ar;\u6223ine;\u407ceparator;\u6758ilde;\u6240ThinSpace;\u600ar;\uc000\ud835\udd19pf;\uc000\ud835\udd4dcr;\uc000\ud835\udcb1dash;\u62aa\u0280cefos\u14a7\u14ac\u14b1\u14b6\u14bcirc;\u4174dge;\u62c0r;\uc000\ud835\udd1apf;\uc000\ud835\udd4ecr;\uc000\ud835\udcb2\u0200fios\u14cb\u14d0\u14d2\u14d8r;\uc000\ud835\udd1b;\u439epf;\uc000\ud835\udd4fcr;\uc000\ud835\udcb3\u0480AIUacfosu\u14f1\u14f5\u14f9\u14fd\u1504\u150f\u1514\u151a\u1520cy;\u442fcy;\u4407cy;\u442ecute\u803b\xdd\u40dd\u0100iy\u1509\u150drc;\u4176;\u442br;\uc000\ud835\udd1cpf;\uc000\ud835\udd50cr;\uc000\ud835\udcb4ml;\u4178\u0400Hacdefos\u1535\u1539\u153f\u154b\u154f\u155d\u1560\u1564cy;\u4416cute;\u4179\u0100ay\u1544\u1549ron;\u417d;\u4417ot;\u417b\u01f2\u1554\0\u155boWidt\xe8\u0ad9a;\u4396r;\u6128pf;\u6124cr;\uc000\ud835\udcb5\u0be1\u1583\u158a\u1590\0\u15b0\u15b6\u15bf\0\0\0\0\u15c6\u15db\u15eb\u165f\u166d\0\u1695\u169b\u16b2\u16b9\0\u16becute\u803b\xe1\u40e1reve;\u4103\u0300;Ediuy\u159c\u159d\u15a1\u15a3\u15a8\u15ad\u623e;\uc000\u223e\u0333;\u623frc\u803b\xe2\u40e2te\u80bb\xb4\u0306;\u4430lig\u803b\xe6\u40e6\u0100;r\xb2\u15ba;\uc000\ud835\udd1erave\u803b\xe0\u40e0\u0100ep\u15ca\u15d6\u0100fp\u15cf\u15d4sym;\u6135\xe8\u15d3ha;\u43b1\u0100ap\u15dfc\u0100cl\u15e4\u15e7r;\u4101g;\u6a3f\u0264\u15f0\0\0\u160a\u0280;adsv\u15fa\u15fb\u15ff\u1601\u1607\u6227nd;\u6a55;\u6a5clope;\u6a58;\u6a5a\u0380;elmrsz\u1618\u1619\u161b\u161e\u163f\u164f\u1659\u6220;\u69a4e\xbb\u1619sd\u0100;a\u1625\u1626\u6221\u0461\u1630\u1632\u1634\u1636\u1638\u163a\u163c\u163e;\u69a8;\u69a9;\u69aa;\u69ab;\u69ac;\u69ad;\u69ae;\u69aft\u0100;v\u1645\u1646\u621fb\u0100;d\u164c\u164d\u62be;\u699d\u0100pt\u1654\u1657h;\u6222\xbb\xb9arr;\u637c\u0100gp\u1663\u1667on;\u4105f;\uc000\ud835\udd52\u0380;Eaeiop\u12c1\u167b\u167d\u1682\u1684\u1687\u168a;\u6a70cir;\u6a6f;\u624ad;\u624bs;\u4027rox\u0100;e\u12c1\u1692\xf1\u1683ing\u803b\xe5\u40e5\u0180cty\u16a1\u16a6\u16a8r;\uc000\ud835\udcb6;\u402amp\u0100;e\u12c1\u16af\xf1\u0288ilde\u803b\xe3\u40e3ml\u803b\xe4\u40e4\u0100ci\u16c2\u16c8onin\xf4\u0272nt;\u6a11\u0800Nabcdefiklnoprsu\u16ed\u16f1\u1730\u173c\u1743\u1748\u1778\u177d\u17e0\u17e6\u1839\u1850\u170d\u193d\u1948\u1970ot;\u6aed\u0100cr\u16f6\u171ek\u0200ceps\u1700\u1705\u170d\u1713ong;\u624cpsilon;\u43f6rime;\u6035im\u0100;e\u171a\u171b\u623dq;\u62cd\u0176\u1722\u1726ee;\u62bded\u0100;g\u172c\u172d\u6305e\xbb\u172drk\u0100;t\u135c\u1737brk;\u63b6\u0100oy\u1701\u1741;\u4431quo;\u601e\u0280cmprt\u1753\u175b\u1761\u1764\u1768aus\u0100;e\u010a\u0109ptyv;\u69b0s\xe9\u170cno\xf5\u0113\u0180ahw\u176f\u1771\u1773;\u43b2;\u6136een;\u626cr;\uc000\ud835\udd1fg\u0380costuvw\u178d\u179d\u17b3\u17c1\u17d5\u17db\u17de\u0180aiu\u1794\u1796\u179a\xf0\u0760rc;\u65efp\xbb\u1371\u0180dpt\u17a4\u17a8\u17adot;\u6a00lus;\u6a01imes;\u6a02\u0271\u17b9\0\0\u17becup;\u6a06ar;\u6605riangle\u0100du\u17cd\u17d2own;\u65bdp;\u65b3plus;\u6a04e\xe5\u1444\xe5\u14adarow;\u690d\u0180ako\u17ed\u1826\u1835\u0100cn\u17f2\u1823k\u0180lst\u17fa\u05ab\u1802ozenge;\u69ebriangle\u0200;dlr\u1812\u1813\u1818\u181d\u65b4own;\u65beeft;\u65c2ight;\u65b8k;\u6423\u01b1\u182b\0\u1833\u01b2\u182f\0\u1831;\u6592;\u65914;\u6593ck;\u6588\u0100eo\u183e\u184d\u0100;q\u1843\u1846\uc000=\u20e5uiv;\uc000\u2261\u20e5t;\u6310\u0200ptwx\u1859\u185e\u1867\u186cf;\uc000\ud835\udd53\u0100;t\u13cb\u1863om\xbb\u13cctie;\u62c8\u0600DHUVbdhmptuv\u1885\u1896\u18aa\u18bb\u18d7\u18db\u18ec\u18ff\u1905\u190a\u1910\u1921\u0200LRlr\u188e\u1890\u1892\u1894;\u6557;\u6554;\u6556;\u6553\u0280;DUdu\u18a1\u18a2\u18a4\u18a6\u18a8\u6550;\u6566;\u6569;\u6564;\u6567\u0200LRlr\u18b3\u18b5\u18b7\u18b9;\u655d;\u655a;\u655c;\u6559\u0380;HLRhlr\u18ca\u18cb\u18cd\u18cf\u18d1\u18d3\u18d5\u6551;\u656c;\u6563;\u6560;\u656b;\u6562;\u655fox;\u69c9\u0200LRlr\u18e4\u18e6\u18e8\u18ea;\u6555;\u6552;\u6510;\u650c\u0280;DUdu\u06bd\u18f7\u18f9\u18fb\u18fd;\u6565;\u6568;\u652c;\u6534inus;\u629flus;\u629eimes;\u62a0\u0200LRlr\u1919\u191b\u191d\u191f;\u655b;\u6558;\u6518;\u6514\u0380;HLRhlr\u1930\u1931\u1933\u1935\u1937\u1939\u193b\u6502;\u656a;\u6561;\u655e;\u653c;\u6524;\u651c\u0100ev\u0123\u1942bar\u803b\xa6\u40a6\u0200ceio\u1951\u1956\u195a\u1960r;\uc000\ud835\udcb7mi;\u604fm\u0100;e\u171a\u171cl\u0180;bh\u1968\u1969\u196b\u405c;\u69c5sub;\u67c8\u016c\u1974\u197el\u0100;e\u1979\u197a\u6022t\xbb\u197ap\u0180;Ee\u012f\u1985\u1987;\u6aae\u0100;q\u06dc\u06db\u0ce1\u19a7\0\u19e8\u1a11\u1a15\u1a32\0\u1a37\u1a50\0\0\u1ab4\0\0\u1ac1\0\0\u1b21\u1b2e\u1b4d\u1b52\0\u1bfd\0\u1c0c\u0180cpr\u19ad\u19b2\u19ddute;\u4107\u0300;abcds\u19bf\u19c0\u19c4\u19ca\u19d5\u19d9\u6229nd;\u6a44rcup;\u6a49\u0100au\u19cf\u19d2p;\u6a4bp;\u6a47ot;\u6a40;\uc000\u2229\ufe00\u0100eo\u19e2\u19e5t;\u6041\xee\u0693\u0200aeiu\u19f0\u19fb\u1a01\u1a05\u01f0\u19f5\0\u19f8s;\u6a4don;\u410ddil\u803b\xe7\u40e7rc;\u4109ps\u0100;s\u1a0c\u1a0d\u6a4cm;\u6a50ot;\u410b\u0180dmn\u1a1b\u1a20\u1a26il\u80bb\xb8\u01adptyv;\u69b2t\u8100\xa2;e\u1a2d\u1a2e\u40a2r\xe4\u01b2r;\uc000\ud835\udd20\u0180cei\u1a3d\u1a40\u1a4dy;\u4447ck\u0100;m\u1a47\u1a48\u6713ark\xbb\u1a48;\u43c7r\u0380;Ecefms\u1a5f\u1a60\u1a62\u1a6b\u1aa4\u1aaa\u1aae\u65cb;\u69c3\u0180;el\u1a69\u1a6a\u1a6d\u42c6q;\u6257e\u0261\u1a74\0\0\u1a88rrow\u0100lr\u1a7c\u1a81eft;\u61baight;\u61bb\u0280RSacd\u1a92\u1a94\u1a96\u1a9a\u1a9f\xbb\u0f47;\u64c8st;\u629birc;\u629aash;\u629dnint;\u6a10id;\u6aefcir;\u69c2ubs\u0100;u\u1abb\u1abc\u6663it\xbb\u1abc\u02ec\u1ac7\u1ad4\u1afa\0\u1b0aon\u0100;e\u1acd\u1ace\u403a\u0100;q\xc7\xc6\u026d\u1ad9\0\0\u1ae2a\u0100;t\u1ade\u1adf\u402c;\u4040\u0180;fl\u1ae8\u1ae9\u1aeb\u6201\xee\u1160e\u0100mx\u1af1\u1af6ent\xbb\u1ae9e\xf3\u024d\u01e7\u1afe\0\u1b07\u0100;d\u12bb\u1b02ot;\u6a6dn\xf4\u0246\u0180fry\u1b10\u1b14\u1b17;\uc000\ud835\udd54o\xe4\u0254\u8100\xa9;s\u0155\u1b1dr;\u6117\u0100ao\u1b25\u1b29rr;\u61b5ss;\u6717\u0100cu\u1b32\u1b37r;\uc000\ud835\udcb8\u0100bp\u1b3c\u1b44\u0100;e\u1b41\u1b42\u6acf;\u6ad1\u0100;e\u1b49\u1b4a\u6ad0;\u6ad2dot;\u62ef\u0380delprvw\u1b60\u1b6c\u1b77\u1b82\u1bac\u1bd4\u1bf9arr\u0100lr\u1b68\u1b6a;\u6938;\u6935\u0270\u1b72\0\0\u1b75r;\u62dec;\u62dfarr\u0100;p\u1b7f\u1b80\u61b6;\u693d\u0300;bcdos\u1b8f\u1b90\u1b96\u1ba1\u1ba5\u1ba8\u622arcap;\u6a48\u0100au\u1b9b\u1b9ep;\u6a46p;\u6a4aot;\u628dr;\u6a45;\uc000\u222a\ufe00\u0200alrv\u1bb5\u1bbf\u1bde\u1be3rr\u0100;m\u1bbc\u1bbd\u61b7;\u693cy\u0180evw\u1bc7\u1bd4\u1bd8q\u0270\u1bce\0\0\u1bd2re\xe3\u1b73u\xe3\u1b75ee;\u62ceedge;\u62cfen\u803b\xa4\u40a4earrow\u0100lr\u1bee\u1bf3eft\xbb\u1b80ight\xbb\u1bbde\xe4\u1bdd\u0100ci\u1c01\u1c07onin\xf4\u01f7nt;\u6231lcty;\u632d\u0980AHabcdefhijlorstuwz\u1c38\u1c3b\u1c3f\u1c5d\u1c69\u1c75\u1c8a\u1c9e\u1cac\u1cb7\u1cfb\u1cff\u1d0d\u1d7b\u1d91\u1dab\u1dbb\u1dc6\u1dcdr\xf2\u0381ar;\u6965\u0200glrs\u1c48\u1c4d\u1c52\u1c54ger;\u6020eth;\u6138\xf2\u1133h\u0100;v\u1c5a\u1c5b\u6010\xbb\u090a\u016b\u1c61\u1c67arow;\u690fa\xe3\u0315\u0100ay\u1c6e\u1c73ron;\u410f;\u4434\u0180;ao\u0332\u1c7c\u1c84\u0100gr\u02bf\u1c81r;\u61catseq;\u6a77\u0180glm\u1c91\u1c94\u1c98\u803b\xb0\u40b0ta;\u43b4ptyv;\u69b1\u0100ir\u1ca3\u1ca8sht;\u697f;\uc000\ud835\udd21ar\u0100lr\u1cb3\u1cb5\xbb\u08dc\xbb\u101e\u0280aegsv\u1cc2\u0378\u1cd6\u1cdc\u1ce0m\u0180;os\u0326\u1cca\u1cd4nd\u0100;s\u0326\u1cd1uit;\u6666amma;\u43ddin;\u62f2\u0180;io\u1ce7\u1ce8\u1cf8\u40f7de\u8100\xf7;o\u1ce7\u1cf0ntimes;\u62c7n\xf8\u1cf7cy;\u4452c\u026f\u1d06\0\0\u1d0arn;\u631eop;\u630d\u0280lptuw\u1d18\u1d1d\u1d22\u1d49\u1d55lar;\u4024f;\uc000\ud835\udd55\u0280;emps\u030b\u1d2d\u1d37\u1d3d\u1d42q\u0100;d\u0352\u1d33ot;\u6251inus;\u6238lus;\u6214quare;\u62a1blebarwedg\xe5\xfan\u0180adh\u112e\u1d5d\u1d67ownarrow\xf3\u1c83arpoon\u0100lr\u1d72\u1d76ef\xf4\u1cb4igh\xf4\u1cb6\u0162\u1d7f\u1d85karo\xf7\u0f42\u026f\u1d8a\0\0\u1d8ern;\u631fop;\u630c\u0180cot\u1d98\u1da3\u1da6\u0100ry\u1d9d\u1da1;\uc000\ud835\udcb9;\u4455l;\u69f6rok;\u4111\u0100dr\u1db0\u1db4ot;\u62f1i\u0100;f\u1dba\u1816\u65bf\u0100ah\u1dc0\u1dc3r\xf2\u0429a\xf2\u0fa6angle;\u69a6\u0100ci\u1dd2\u1dd5y;\u445fgrarr;\u67ff\u0900Dacdefglmnopqrstux\u1e01\u1e09\u1e19\u1e38\u0578\u1e3c\u1e49\u1e61\u1e7e\u1ea5\u1eaf\u1ebd\u1ee1\u1f2a\u1f37\u1f44\u1f4e\u1f5a\u0100Do\u1e06\u1d34o\xf4\u1c89\u0100cs\u1e0e\u1e14ute\u803b\xe9\u40e9ter;\u6a6e\u0200aioy\u1e22\u1e27\u1e31\u1e36ron;\u411br\u0100;c\u1e2d\u1e2e\u6256\u803b\xea\u40ealon;\u6255;\u444dot;\u4117\u0100Dr\u1e41\u1e45ot;\u6252;\uc000\ud835\udd22\u0180;rs\u1e50\u1e51\u1e57\u6a9aave\u803b\xe8\u40e8\u0100;d\u1e5c\u1e5d\u6a96ot;\u6a98\u0200;ils\u1e6a\u1e6b\u1e72\u1e74\u6a99nters;\u63e7;\u6113\u0100;d\u1e79\u1e7a\u6a95ot;\u6a97\u0180aps\u1e85\u1e89\u1e97cr;\u4113ty\u0180;sv\u1e92\u1e93\u1e95\u6205et\xbb\u1e93p\u01001;\u1e9d\u1ea4\u0133\u1ea1\u1ea3;\u6004;\u6005\u6003\u0100gs\u1eaa\u1eac;\u414bp;\u6002\u0100gp\u1eb4\u1eb8on;\u4119f;\uc000\ud835\udd56\u0180als\u1ec4\u1ece\u1ed2r\u0100;s\u1eca\u1ecb\u62d5l;\u69e3us;\u6a71i\u0180;lv\u1eda\u1edb\u1edf\u43b5on\xbb\u1edb;\u43f5\u0200csuv\u1eea\u1ef3\u1f0b\u1f23\u0100io\u1eef\u1e31rc\xbb\u1e2e\u0269\u1ef9\0\0\u1efb\xed\u0548ant\u0100gl\u1f02\u1f06tr\xbb\u1e5dess\xbb\u1e7a\u0180aei\u1f12\u1f16\u1f1als;\u403dst;\u625fv\u0100;D\u0235\u1f20D;\u6a78parsl;\u69e5\u0100Da\u1f2f\u1f33ot;\u6253rr;\u6971\u0180cdi\u1f3e\u1f41\u1ef8r;\u612fo\xf4\u0352\u0100ah\u1f49\u1f4b;\u43b7\u803b\xf0\u40f0\u0100mr\u1f53\u1f57l\u803b\xeb\u40ebo;\u60ac\u0180cip\u1f61\u1f64\u1f67l;\u4021s\xf4\u056e\u0100eo\u1f6c\u1f74ctatio\xee\u0559nential\xe5\u0579\u09e1\u1f92\0\u1f9e\0\u1fa1\u1fa7\0\0\u1fc6\u1fcc\0\u1fd3\0\u1fe6\u1fea\u2000\0\u2008\u205allingdotse\xf1\u1e44y;\u4444male;\u6640\u0180ilr\u1fad\u1fb3\u1fc1lig;\u8000\ufb03\u0269\u1fb9\0\0\u1fbdg;\u8000\ufb00ig;\u8000\ufb04;\uc000\ud835\udd23lig;\u8000\ufb01lig;\uc000fj\u0180alt\u1fd9\u1fdc\u1fe1t;\u666dig;\u8000\ufb02ns;\u65b1of;\u4192\u01f0\u1fee\0\u1ff3f;\uc000\ud835\udd57\u0100ak\u05bf\u1ff7\u0100;v\u1ffc\u1ffd\u62d4;\u6ad9artint;\u6a0d\u0100ao\u200c\u2055\u0100cs\u2011\u2052\u03b1\u201a\u2030\u2038\u2045\u2048\0\u2050\u03b2\u2022\u2025\u2027\u202a\u202c\0\u202e\u803b\xbd\u40bd;\u6153\u803b\xbc\u40bc;\u6155;\u6159;\u615b\u01b3\u2034\0\u2036;\u6154;\u6156\u02b4\u203e\u2041\0\0\u2043\u803b\xbe\u40be;\u6157;\u615c5;\u6158\u01b6\u204c\0\u204e;\u615a;\u615d8;\u615el;\u6044wn;\u6322cr;\uc000\ud835\udcbb\u0880Eabcdefgijlnorstv\u2082\u2089\u209f\u20a5\u20b0\u20b4\u20f0\u20f5\u20fa\u20ff\u2103\u2112\u2138\u0317\u213e\u2152\u219e\u0100;l\u064d\u2087;\u6a8c\u0180cmp\u2090\u2095\u209dute;\u41f5ma\u0100;d\u209c\u1cda\u43b3;\u6a86reve;\u411f\u0100iy\u20aa\u20aerc;\u411d;\u4433ot;\u4121\u0200;lqs\u063e\u0642\u20bd\u20c9\u0180;qs\u063e\u064c\u20c4lan\xf4\u0665\u0200;cdl\u0665\u20d2\u20d5\u20e5c;\u6aa9ot\u0100;o\u20dc\u20dd\u6a80\u0100;l\u20e2\u20e3\u6a82;\u6a84\u0100;e\u20ea\u20ed\uc000\u22db\ufe00s;\u6a94r;\uc000\ud835\udd24\u0100;g\u0673\u061bmel;\u6137cy;\u4453\u0200;Eaj\u065a\u210c\u210e\u2110;\u6a92;\u6aa5;\u6aa4\u0200Eaes\u211b\u211d\u2129\u2134;\u6269p\u0100;p\u2123\u2124\u6a8arox\xbb\u2124\u0100;q\u212e\u212f\u6a88\u0100;q\u212e\u211bim;\u62e7pf;\uc000\ud835\udd58\u0100ci\u2143\u2146r;\u610am\u0180;el\u066b\u214e\u2150;\u6a8e;\u6a90\u8300>;cdlqr\u05ee\u2160\u216a\u216e\u2173\u2179\u0100ci\u2165\u2167;\u6aa7r;\u6a7aot;\u62d7Par;\u6995uest;\u6a7c\u0280adels\u2184\u216a\u2190\u0656\u219b\u01f0\u2189\0\u218epro\xf8\u209er;\u6978q\u0100lq\u063f\u2196les\xf3\u2088i\xed\u066b\u0100en\u21a3\u21adrtneqq;\uc000\u2269\ufe00\xc5\u21aa\u0500Aabcefkosy\u21c4\u21c7\u21f1\u21f5\u21fa\u2218\u221d\u222f\u2268\u227dr\xf2\u03a0\u0200ilmr\u21d0\u21d4\u21d7\u21dbrs\xf0\u1484f\xbb\u2024il\xf4\u06a9\u0100dr\u21e0\u21e4cy;\u444a\u0180;cw\u08f4\u21eb\u21efir;\u6948;\u61adar;\u610firc;\u4125\u0180alr\u2201\u220e\u2213rts\u0100;u\u2209\u220a\u6665it\xbb\u220alip;\u6026con;\u62b9r;\uc000\ud835\udd25s\u0100ew\u2223\u2229arow;\u6925arow;\u6926\u0280amopr\u223a\u223e\u2243\u225e\u2263rr;\u61fftht;\u623bk\u0100lr\u2249\u2253eftarrow;\u61a9ightarrow;\u61aaf;\uc000\ud835\udd59bar;\u6015\u0180clt\u226f\u2274\u2278r;\uc000\ud835\udcbdas\xe8\u21f4rok;\u4127\u0100bp\u2282\u2287ull;\u6043hen\xbb\u1c5b\u0ae1\u22a3\0\u22aa\0\u22b8\u22c5\u22ce\0\u22d5\u22f3\0\0\u22f8\u2322\u2367\u2362\u237f\0\u2386\u23aa\u23b4cute\u803b\xed\u40ed\u0180;iy\u0771\u22b0\u22b5rc\u803b\xee\u40ee;\u4438\u0100cx\u22bc\u22bfy;\u4435cl\u803b\xa1\u40a1\u0100fr\u039f\u22c9;\uc000\ud835\udd26rave\u803b\xec\u40ec\u0200;ino\u073e\u22dd\u22e9\u22ee\u0100in\u22e2\u22e6nt;\u6a0ct;\u622dfin;\u69dcta;\u6129lig;\u4133\u0180aop\u22fe\u231a\u231d\u0180cgt\u2305\u2308\u2317r;\u412b\u0180elp\u071f\u230f\u2313in\xe5\u078ear\xf4\u0720h;\u4131f;\u62b7ed;\u41b5\u0280;cfot\u04f4\u232c\u2331\u233d\u2341are;\u6105in\u0100;t\u2338\u2339\u621eie;\u69dddo\xf4\u2319\u0280;celp\u0757\u234c\u2350\u235b\u2361al;\u62ba\u0100gr\u2355\u2359er\xf3\u1563\xe3\u234darhk;\u6a17rod;\u6a3c\u0200cgpt\u236f\u2372\u2376\u237by;\u4451on;\u412ff;\uc000\ud835\udd5aa;\u43b9uest\u803b\xbf\u40bf\u0100ci\u238a\u238fr;\uc000\ud835\udcben\u0280;Edsv\u04f4\u239b\u239d\u23a1\u04f3;\u62f9ot;\u62f5\u0100;v\u23a6\u23a7\u62f4;\u62f3\u0100;i\u0777\u23aelde;\u4129\u01eb\u23b8\0\u23bccy;\u4456l\u803b\xef\u40ef\u0300cfmosu\u23cc\u23d7\u23dc\u23e1\u23e7\u23f5\u0100iy\u23d1\u23d5rc;\u4135;\u4439r;\uc000\ud835\udd27ath;\u4237pf;\uc000\ud835\udd5b\u01e3\u23ec\0\u23f1r;\uc000\ud835\udcbfrcy;\u4458kcy;\u4454\u0400acfghjos\u240b\u2416\u2422\u2427\u242d\u2431\u2435\u243bppa\u0100;v\u2413\u2414\u43ba;\u43f0\u0100ey\u241b\u2420dil;\u4137;\u443ar;\uc000\ud835\udd28reen;\u4138cy;\u4445cy;\u445cpf;\uc000\ud835\udd5ccr;\uc000\ud835\udcc0\u0b80ABEHabcdefghjlmnoprstuv\u2470\u2481\u2486\u248d\u2491\u250e\u253d\u255a\u2580\u264e\u265e\u2665\u2679\u267d\u269a\u26b2\u26d8\u275d\u2768\u278b\u27c0\u2801\u2812\u0180art\u2477\u247a\u247cr\xf2\u09c6\xf2\u0395ail;\u691barr;\u690e\u0100;g\u0994\u248b;\u6a8bar;\u6962\u0963\u24a5\0\u24aa\0\u24b1\0\0\0\0\0\u24b5\u24ba\0\u24c6\u24c8\u24cd\0\u24f9ute;\u413amptyv;\u69b4ra\xee\u084cbda;\u43bbg\u0180;dl\u088e\u24c1\u24c3;\u6991\xe5\u088e;\u6a85uo\u803b\xab\u40abr\u0400;bfhlpst\u0899\u24de\u24e6\u24e9\u24eb\u24ee\u24f1\u24f5\u0100;f\u089d\u24e3s;\u691fs;\u691d\xeb\u2252p;\u61abl;\u6939im;\u6973l;\u61a2\u0180;ae\u24ff\u2500\u2504\u6aabil;\u6919\u0100;s\u2509\u250a\u6aad;\uc000\u2aad\ufe00\u0180abr\u2515\u2519\u251drr;\u690crk;\u6772\u0100ak\u2522\u252cc\u0100ek\u2528\u252a;\u407b;\u405b\u0100es\u2531\u2533;\u698bl\u0100du\u2539\u253b;\u698f;\u698d\u0200aeuy\u2546\u254b\u2556\u2558ron;\u413e\u0100di\u2550\u2554il;\u413c\xec\u08b0\xe2\u2529;\u443b\u0200cqrs\u2563\u2566\u256d\u257da;\u6936uo\u0100;r\u0e19\u1746\u0100du\u2572\u2577har;\u6967shar;\u694bh;\u61b2\u0280;fgqs\u258b\u258c\u0989\u25f3\u25ff\u6264t\u0280ahlrt\u2598\u25a4\u25b7\u25c2\u25e8rrow\u0100;t\u0899\u25a1a\xe9\u24f6arpoon\u0100du\u25af\u25b4own\xbb\u045ap\xbb\u0966eftarrows;\u61c7ight\u0180ahs\u25cd\u25d6\u25derrow\u0100;s\u08f4\u08a7arpoon\xf3\u0f98quigarro\xf7\u21f0hreetimes;\u62cb\u0180;qs\u258b\u0993\u25falan\xf4\u09ac\u0280;cdgs\u09ac\u260a\u260d\u261d\u2628c;\u6aa8ot\u0100;o\u2614\u2615\u6a7f\u0100;r\u261a\u261b\u6a81;\u6a83\u0100;e\u2622\u2625\uc000\u22da\ufe00s;\u6a93\u0280adegs\u2633\u2639\u263d\u2649\u264bppro\xf8\u24c6ot;\u62d6q\u0100gq\u2643\u2645\xf4\u0989gt\xf2\u248c\xf4\u099bi\xed\u09b2\u0180ilr\u2655\u08e1\u265asht;\u697c;\uc000\ud835\udd29\u0100;E\u099c\u2663;\u6a91\u0161\u2669\u2676r\u0100du\u25b2\u266e\u0100;l\u0965\u2673;\u696alk;\u6584cy;\u4459\u0280;acht\u0a48\u2688\u268b\u2691\u2696r\xf2\u25c1orne\xf2\u1d08ard;\u696bri;\u65fa\u0100io\u269f\u26a4dot;\u4140ust\u0100;a\u26ac\u26ad\u63b0che\xbb\u26ad\u0200Eaes\u26bb\u26bd\u26c9\u26d4;\u6268p\u0100;p\u26c3\u26c4\u6a89rox\xbb\u26c4\u0100;q\u26ce\u26cf\u6a87\u0100;q\u26ce\u26bbim;\u62e6\u0400abnoptwz\u26e9\u26f4\u26f7\u271a\u272f\u2741\u2747\u2750\u0100nr\u26ee\u26f1g;\u67ecr;\u61fdr\xeb\u08c1g\u0180lmr\u26ff\u270d\u2714eft\u0100ar\u09e6\u2707ight\xe1\u09f2apsto;\u67fcight\xe1\u09fdparrow\u0100lr\u2725\u2729ef\xf4\u24edight;\u61ac\u0180afl\u2736\u2739\u273dr;\u6985;\uc000\ud835\udd5dus;\u6a2dimes;\u6a34\u0161\u274b\u274fst;\u6217\xe1\u134e\u0180;ef\u2757\u2758\u1800\u65cange\xbb\u2758ar\u0100;l\u2764\u2765\u4028t;\u6993\u0280achmt\u2773\u2776\u277c\u2785\u2787r\xf2\u08a8orne\xf2\u1d8car\u0100;d\u0f98\u2783;\u696d;\u600eri;\u62bf\u0300achiqt\u2798\u279d\u0a40\u27a2\u27ae\u27bbquo;\u6039r;\uc000\ud835\udcc1m\u0180;eg\u09b2\u27aa\u27ac;\u6a8d;\u6a8f\u0100bu\u252a\u27b3o\u0100;r\u0e1f\u27b9;\u601arok;\u4142\u8400<;cdhilqr\u082b\u27d2\u2639\u27dc\u27e0\u27e5\u27ea\u27f0\u0100ci\u27d7\u27d9;\u6aa6r;\u6a79re\xe5\u25f2mes;\u62c9arr;\u6976uest;\u6a7b\u0100Pi\u27f5\u27f9ar;\u6996\u0180;ef\u2800\u092d\u181b\u65c3r\u0100du\u2807\u280dshar;\u694ahar;\u6966\u0100en\u2817\u2821rtneqq;\uc000\u2268\ufe00\xc5\u281e\u0700Dacdefhilnopsu\u2840\u2845\u2882\u288e\u2893\u28a0\u28a5\u28a8\u28da\u28e2\u28e4\u0a83\u28f3\u2902Dot;\u623a\u0200clpr\u284e\u2852\u2863\u287dr\u803b\xaf\u40af\u0100et\u2857\u2859;\u6642\u0100;e\u285e\u285f\u6720se\xbb\u285f\u0100;s\u103b\u2868to\u0200;dlu\u103b\u2873\u2877\u287bow\xee\u048cef\xf4\u090f\xf0\u13d1ker;\u65ae\u0100oy\u2887\u288cmma;\u6a29;\u443cash;\u6014asuredangle\xbb\u1626r;\uc000\ud835\udd2ao;\u6127\u0180cdn\u28af\u28b4\u28c9ro\u803b\xb5\u40b5\u0200;acd\u1464\u28bd\u28c0\u28c4s\xf4\u16a7ir;\u6af0ot\u80bb\xb7\u01b5us\u0180;bd\u28d2\u1903\u28d3\u6212\u0100;u\u1d3c\u28d8;\u6a2a\u0163\u28de\u28e1p;\u6adb\xf2\u2212\xf0\u0a81\u0100dp\u28e9\u28eeels;\u62a7f;\uc000\ud835\udd5e\u0100ct\u28f8\u28fdr;\uc000\ud835\udcc2pos\xbb\u159d\u0180;lm\u2909\u290a\u290d\u43bctimap;\u62b8\u0c00GLRVabcdefghijlmoprstuvw\u2942\u2953\u297e\u2989\u2998\u29da\u29e9\u2a15\u2a1a\u2a58\u2a5d\u2a83\u2a95\u2aa4\u2aa8\u2b04\u2b07\u2b44\u2b7f\u2bae\u2c34\u2c67\u2c7c\u2ce9\u0100gt\u2947\u294b;\uc000\u22d9\u0338\u0100;v\u2950\u0bcf\uc000\u226b\u20d2\u0180elt\u295a\u2972\u2976ft\u0100ar\u2961\u2967rrow;\u61cdightarrow;\u61ce;\uc000\u22d8\u0338\u0100;v\u297b\u0c47\uc000\u226a\u20d2ightarrow;\u61cf\u0100Dd\u298e\u2993ash;\u62afash;\u62ae\u0280bcnpt\u29a3\u29a7\u29ac\u29b1\u29ccla\xbb\u02deute;\u4144g;\uc000\u2220\u20d2\u0280;Eiop\u0d84\u29bc\u29c0\u29c5\u29c8;\uc000\u2a70\u0338d;\uc000\u224b\u0338s;\u4149ro\xf8\u0d84ur\u0100;a\u29d3\u29d4\u666el\u0100;s\u29d3\u0b38\u01f3\u29df\0\u29e3p\u80bb\xa0\u0b37mp\u0100;e\u0bf9\u0c00\u0280aeouy\u29f4\u29fe\u2a03\u2a10\u2a13\u01f0\u29f9\0\u29fb;\u6a43on;\u4148dil;\u4146ng\u0100;d\u0d7e\u2a0aot;\uc000\u2a6d\u0338p;\u6a42;\u443dash;\u6013\u0380;Aadqsx\u0b92\u2a29\u2a2d\u2a3b\u2a41\u2a45\u2a50rr;\u61d7r\u0100hr\u2a33\u2a36k;\u6924\u0100;o\u13f2\u13f0ot;\uc000\u2250\u0338ui\xf6\u0b63\u0100ei\u2a4a\u2a4ear;\u6928\xed\u0b98ist\u0100;s\u0ba0\u0b9fr;\uc000\ud835\udd2b\u0200Eest\u0bc5\u2a66\u2a79\u2a7c\u0180;qs\u0bbc\u2a6d\u0be1\u0180;qs\u0bbc\u0bc5\u2a74lan\xf4\u0be2i\xed\u0bea\u0100;r\u0bb6\u2a81\xbb\u0bb7\u0180Aap\u2a8a\u2a8d\u2a91r\xf2\u2971rr;\u61aear;\u6af2\u0180;sv\u0f8d\u2a9c\u0f8c\u0100;d\u2aa1\u2aa2\u62fc;\u62facy;\u445a\u0380AEadest\u2ab7\u2aba\u2abe\u2ac2\u2ac5\u2af6\u2af9r\xf2\u2966;\uc000\u2266\u0338rr;\u619ar;\u6025\u0200;fqs\u0c3b\u2ace\u2ae3\u2aeft\u0100ar\u2ad4\u2ad9rro\xf7\u2ac1ightarro\xf7\u2a90\u0180;qs\u0c3b\u2aba\u2aealan\xf4\u0c55\u0100;s\u0c55\u2af4\xbb\u0c36i\xed\u0c5d\u0100;r\u0c35\u2afei\u0100;e\u0c1a\u0c25i\xe4\u0d90\u0100pt\u2b0c\u2b11f;\uc000\ud835\udd5f\u8180\xac;in\u2b19\u2b1a\u2b36\u40acn\u0200;Edv\u0b89\u2b24\u2b28\u2b2e;\uc000\u22f9\u0338ot;\uc000\u22f5\u0338\u01e1\u0b89\u2b33\u2b35;\u62f7;\u62f6i\u0100;v\u0cb8\u2b3c\u01e1\u0cb8\u2b41\u2b43;\u62fe;\u62fd\u0180aor\u2b4b\u2b63\u2b69r\u0200;ast\u0b7b\u2b55\u2b5a\u2b5flle\xec\u0b7bl;\uc000\u2afd\u20e5;\uc000\u2202\u0338lint;\u6a14\u0180;ce\u0c92\u2b70\u2b73u\xe5\u0ca5\u0100;c\u0c98\u2b78\u0100;e\u0c92\u2b7d\xf1\u0c98\u0200Aait\u2b88\u2b8b\u2b9d\u2ba7r\xf2\u2988rr\u0180;cw\u2b94\u2b95\u2b99\u619b;\uc000\u2933\u0338;\uc000\u219d\u0338ghtarrow\xbb\u2b95ri\u0100;e\u0ccb\u0cd6\u0380chimpqu\u2bbd\u2bcd\u2bd9\u2b04\u0b78\u2be4\u2bef\u0200;cer\u0d32\u2bc6\u0d37\u2bc9u\xe5\u0d45;\uc000\ud835\udcc3ort\u026d\u2b05\0\0\u2bd6ar\xe1\u2b56m\u0100;e\u0d6e\u2bdf\u0100;q\u0d74\u0d73su\u0100bp\u2beb\u2bed\xe5\u0cf8\xe5\u0d0b\u0180bcp\u2bf6\u2c11\u2c19\u0200;Ees\u2bff\u2c00\u0d22\u2c04\u6284;\uc000\u2ac5\u0338et\u0100;e\u0d1b\u2c0bq\u0100;q\u0d23\u2c00c\u0100;e\u0d32\u2c17\xf1\u0d38\u0200;Ees\u2c22\u2c23\u0d5f\u2c27\u6285;\uc000\u2ac6\u0338et\u0100;e\u0d58\u2c2eq\u0100;q\u0d60\u2c23\u0200gilr\u2c3d\u2c3f\u2c45\u2c47\xec\u0bd7lde\u803b\xf1\u40f1\xe7\u0c43iangle\u0100lr\u2c52\u2c5ceft\u0100;e\u0c1a\u2c5a\xf1\u0c26ight\u0100;e\u0ccb\u2c65\xf1\u0cd7\u0100;m\u2c6c\u2c6d\u43bd\u0180;es\u2c74\u2c75\u2c79\u4023ro;\u6116p;\u6007\u0480DHadgilrs\u2c8f\u2c94\u2c99\u2c9e\u2ca3\u2cb0\u2cb6\u2cd3\u2ce3ash;\u62adarr;\u6904p;\uc000\u224d\u20d2ash;\u62ac\u0100et\u2ca8\u2cac;\uc000\u2265\u20d2;\uc000>\u20d2nfin;\u69de\u0180Aet\u2cbd\u2cc1\u2cc5rr;\u6902;\uc000\u2264\u20d2\u0100;r\u2cca\u2ccd\uc000<\u20d2ie;\uc000\u22b4\u20d2\u0100At\u2cd8\u2cdcrr;\u6903rie;\uc000\u22b5\u20d2im;\uc000\u223c\u20d2\u0180Aan\u2cf0\u2cf4\u2d02rr;\u61d6r\u0100hr\u2cfa\u2cfdk;\u6923\u0100;o\u13e7\u13e5ear;\u6927\u1253\u1a95\0\0\0\0\0\0\0\0\0\0\0\0\0\u2d2d\0\u2d38\u2d48\u2d60\u2d65\u2d72\u2d84\u1b07\0\0\u2d8d\u2dab\0\u2dc8\u2dce\0\u2ddc\u2e19\u2e2b\u2e3e\u2e43\u0100cs\u2d31\u1a97ute\u803b\xf3\u40f3\u0100iy\u2d3c\u2d45r\u0100;c\u1a9e\u2d42\u803b\xf4\u40f4;\u443e\u0280abios\u1aa0\u2d52\u2d57\u01c8\u2d5alac;\u4151v;\u6a38old;\u69bclig;\u4153\u0100cr\u2d69\u2d6dir;\u69bf;\uc000\ud835\udd2c\u036f\u2d79\0\0\u2d7c\0\u2d82n;\u42dbave\u803b\xf2\u40f2;\u69c1\u0100bm\u2d88\u0df4ar;\u69b5\u0200acit\u2d95\u2d98\u2da5\u2da8r\xf2\u1a80\u0100ir\u2d9d\u2da0r;\u69beoss;\u69bbn\xe5\u0e52;\u69c0\u0180aei\u2db1\u2db5\u2db9cr;\u414dga;\u43c9\u0180cdn\u2dc0\u2dc5\u01cdron;\u43bf;\u69b6pf;\uc000\ud835\udd60\u0180ael\u2dd4\u2dd7\u01d2r;\u69b7rp;\u69b9\u0380;adiosv\u2dea\u2deb\u2dee\u2e08\u2e0d\u2e10\u2e16\u6228r\xf2\u1a86\u0200;efm\u2df7\u2df8\u2e02\u2e05\u6a5dr\u0100;o\u2dfe\u2dff\u6134f\xbb\u2dff\u803b\xaa\u40aa\u803b\xba\u40bagof;\u62b6r;\u6a56lope;\u6a57;\u6a5b\u0180clo\u2e1f\u2e21\u2e27\xf2\u2e01ash\u803b\xf8\u40f8l;\u6298i\u016c\u2e2f\u2e34de\u803b\xf5\u40f5es\u0100;a\u01db\u2e3as;\u6a36ml\u803b\xf6\u40f6bar;\u633d\u0ae1\u2e5e\0\u2e7d\0\u2e80\u2e9d\0\u2ea2\u2eb9\0\0\u2ecb\u0e9c\0\u2f13\0\0\u2f2b\u2fbc\0\u2fc8r\u0200;ast\u0403\u2e67\u2e72\u0e85\u8100\xb6;l\u2e6d\u2e6e\u40b6le\xec\u0403\u0269\u2e78\0\0\u2e7bm;\u6af3;\u6afdy;\u443fr\u0280cimpt\u2e8b\u2e8f\u2e93\u1865\u2e97nt;\u4025od;\u402eil;\u6030enk;\u6031r;\uc000\ud835\udd2d\u0180imo\u2ea8\u2eb0\u2eb4\u0100;v\u2ead\u2eae\u43c6;\u43d5ma\xf4\u0a76ne;\u660e\u0180;tv\u2ebf\u2ec0\u2ec8\u43c0chfork\xbb\u1ffd;\u43d6\u0100au\u2ecf\u2edfn\u0100ck\u2ed5\u2eddk\u0100;h\u21f4\u2edb;\u610e\xf6\u21f4s\u0480;abcdemst\u2ef3\u2ef4\u1908\u2ef9\u2efd\u2f04\u2f06\u2f0a\u2f0e\u402bcir;\u6a23ir;\u6a22\u0100ou\u1d40\u2f02;\u6a25;\u6a72n\u80bb\xb1\u0e9dim;\u6a26wo;\u6a27\u0180ipu\u2f19\u2f20\u2f25ntint;\u6a15f;\uc000\ud835\udd61nd\u803b\xa3\u40a3\u0500;Eaceinosu\u0ec8\u2f3f\u2f41\u2f44\u2f47\u2f81\u2f89\u2f92\u2f7e\u2fb6;\u6ab3p;\u6ab7u\xe5\u0ed9\u0100;c\u0ece\u2f4c\u0300;acens\u0ec8\u2f59\u2f5f\u2f66\u2f68\u2f7eppro\xf8\u2f43urlye\xf1\u0ed9\xf1\u0ece\u0180aes\u2f6f\u2f76\u2f7approx;\u6ab9qq;\u6ab5im;\u62e8i\xed\u0edfme\u0100;s\u2f88\u0eae\u6032\u0180Eas\u2f78\u2f90\u2f7a\xf0\u2f75\u0180dfp\u0eec\u2f99\u2faf\u0180als\u2fa0\u2fa5\u2faalar;\u632eine;\u6312urf;\u6313\u0100;t\u0efb\u2fb4\xef\u0efbrel;\u62b0\u0100ci\u2fc0\u2fc5r;\uc000\ud835\udcc5;\u43c8ncsp;\u6008\u0300fiopsu\u2fda\u22e2\u2fdf\u2fe5\u2feb\u2ff1r;\uc000\ud835\udd2epf;\uc000\ud835\udd62rime;\u6057cr;\uc000\ud835\udcc6\u0180aeo\u2ff8\u3009\u3013t\u0100ei\u2ffe\u3005rnion\xf3\u06b0nt;\u6a16st\u0100;e\u3010\u3011\u403f\xf1\u1f19\xf4\u0f14\u0a80ABHabcdefhilmnoprstux\u3040\u3051\u3055\u3059\u30e0\u310e\u312b\u3147\u3162\u3172\u318e\u3206\u3215\u3224\u3229\u3258\u326e\u3272\u3290\u32b0\u32b7\u0180art\u3047\u304a\u304cr\xf2\u10b3\xf2\u03ddail;\u691car\xf2\u1c65ar;\u6964\u0380cdenqrt\u3068\u3075\u3078\u307f\u308f\u3094\u30cc\u0100eu\u306d\u3071;\uc000\u223d\u0331te;\u4155i\xe3\u116emptyv;\u69b3g\u0200;del\u0fd1\u3089\u308b\u308d;\u6992;\u69a5\xe5\u0fd1uo\u803b\xbb\u40bbr\u0580;abcfhlpstw\u0fdc\u30ac\u30af\u30b7\u30b9\u30bc\u30be\u30c0\u30c3\u30c7\u30cap;\u6975\u0100;f\u0fe0\u30b4s;\u6920;\u6933s;\u691e\xeb\u225d\xf0\u272el;\u6945im;\u6974l;\u61a3;\u619d\u0100ai\u30d1\u30d5il;\u691ao\u0100;n\u30db\u30dc\u6236al\xf3\u0f1e\u0180abr\u30e7\u30ea\u30eer\xf2\u17e5rk;\u6773\u0100ak\u30f3\u30fdc\u0100ek\u30f9\u30fb;\u407d;\u405d\u0100es\u3102\u3104;\u698cl\u0100du\u310a\u310c;\u698e;\u6990\u0200aeuy\u3117\u311c\u3127\u3129ron;\u4159\u0100di\u3121\u3125il;\u4157\xec\u0ff2\xe2\u30fa;\u4440\u0200clqs\u3134\u3137\u313d\u3144a;\u6937dhar;\u6969uo\u0100;r\u020e\u020dh;\u61b3\u0180acg\u314e\u315f\u0f44l\u0200;ips\u0f78\u3158\u315b\u109cn\xe5\u10bbar\xf4\u0fa9t;\u65ad\u0180ilr\u3169\u1023\u316esht;\u697d;\uc000\ud835\udd2f\u0100ao\u3177\u3186r\u0100du\u317d\u317f\xbb\u047b\u0100;l\u1091\u3184;\u696c\u0100;v\u318b\u318c\u43c1;\u43f1\u0180gns\u3195\u31f9\u31fcht\u0300ahlrst\u31a4\u31b0\u31c2\u31d8\u31e4\u31eerrow\u0100;t\u0fdc\u31ada\xe9\u30c8arpoon\u0100du\u31bb\u31bfow\xee\u317ep\xbb\u1092eft\u0100ah\u31ca\u31d0rrow\xf3\u0feaarpoon\xf3\u0551ightarrows;\u61c9quigarro\xf7\u30cbhreetimes;\u62ccg;\u42daingdotse\xf1\u1f32\u0180ahm\u320d\u3210\u3213r\xf2\u0feaa\xf2\u0551;\u600foust\u0100;a\u321e\u321f\u63b1che\xbb\u321fmid;\u6aee\u0200abpt\u3232\u323d\u3240\u3252\u0100nr\u3237\u323ag;\u67edr;\u61fer\xeb\u1003\u0180afl\u3247\u324a\u324er;\u6986;\uc000\ud835\udd63us;\u6a2eimes;\u6a35\u0100ap\u325d\u3267r\u0100;g\u3263\u3264\u4029t;\u6994olint;\u6a12ar\xf2\u31e3\u0200achq\u327b\u3280\u10bc\u3285quo;\u603ar;\uc000\ud835\udcc7\u0100bu\u30fb\u328ao\u0100;r\u0214\u0213\u0180hir\u3297\u329b\u32a0re\xe5\u31f8mes;\u62cai\u0200;efl\u32aa\u1059\u1821\u32ab\u65b9tri;\u69celuhar;\u6968;\u611e\u0d61\u32d5\u32db\u32df\u332c\u3338\u3371\0\u337a\u33a4\0\0\u33ec\u33f0\0\u3428\u3448\u345a\u34ad\u34b1\u34ca\u34f1\0\u3616\0\0\u3633cute;\u415bqu\xef\u27ba\u0500;Eaceinpsy\u11ed\u32f3\u32f5\u32ff\u3302\u330b\u330f\u331f\u3326\u3329;\u6ab4\u01f0\u32fa\0\u32fc;\u6ab8on;\u4161u\xe5\u11fe\u0100;d\u11f3\u3307il;\u415frc;\u415d\u0180Eas\u3316\u3318\u331b;\u6ab6p;\u6abaim;\u62e9olint;\u6a13i\xed\u1204;\u4441ot\u0180;be\u3334\u1d47\u3335\u62c5;\u6a66\u0380Aacmstx\u3346\u334a\u3357\u335b\u335e\u3363\u336drr;\u61d8r\u0100hr\u3350\u3352\xeb\u2228\u0100;o\u0a36\u0a34t\u803b\xa7\u40a7i;\u403bwar;\u6929m\u0100in\u3369\xf0nu\xf3\xf1t;\u6736r\u0100;o\u3376\u2055\uc000\ud835\udd30\u0200acoy\u3382\u3386\u3391\u33a0rp;\u666f\u0100hy\u338b\u338fcy;\u4449;\u4448rt\u026d\u3399\0\0\u339ci\xe4\u1464ara\xec\u2e6f\u803b\xad\u40ad\u0100gm\u33a8\u33b4ma\u0180;fv\u33b1\u33b2\u33b2\u43c3;\u43c2\u0400;deglnpr\u12ab\u33c5\u33c9\u33ce\u33d6\u33de\u33e1\u33e6ot;\u6a6a\u0100;q\u12b1\u12b0\u0100;E\u33d3\u33d4\u6a9e;\u6aa0\u0100;E\u33db\u33dc\u6a9d;\u6a9fe;\u6246lus;\u6a24arr;\u6972ar\xf2\u113d\u0200aeit\u33f8\u3408\u340f\u3417\u0100ls\u33fd\u3404lsetm\xe9\u336ahp;\u6a33parsl;\u69e4\u0100dl\u1463\u3414e;\u6323\u0100;e\u341c\u341d\u6aaa\u0100;s\u3422\u3423\u6aac;\uc000\u2aac\ufe00\u0180flp\u342e\u3433\u3442tcy;\u444c\u0100;b\u3438\u3439\u402f\u0100;a\u343e\u343f\u69c4r;\u633ff;\uc000\ud835\udd64a\u0100dr\u344d\u0402es\u0100;u\u3454\u3455\u6660it\xbb\u3455\u0180csu\u3460\u3479\u349f\u0100au\u3465\u346fp\u0100;s\u1188\u346b;\uc000\u2293\ufe00p\u0100;s\u11b4\u3475;\uc000\u2294\ufe00u\u0100bp\u347f\u348f\u0180;es\u1197\u119c\u3486et\u0100;e\u1197\u348d\xf1\u119d\u0180;es\u11a8\u11ad\u3496et\u0100;e\u11a8\u349d\xf1\u11ae\u0180;af\u117b\u34a6\u05b0r\u0165\u34ab\u05b1\xbb\u117car\xf2\u1148\u0200cemt\u34b9\u34be\u34c2\u34c5r;\uc000\ud835\udcc8tm\xee\xf1i\xec\u3415ar\xe6\u11be\u0100ar\u34ce\u34d5r\u0100;f\u34d4\u17bf\u6606\u0100an\u34da\u34edight\u0100ep\u34e3\u34eapsilo\xee\u1ee0h\xe9\u2eafs\xbb\u2852\u0280bcmnp\u34fb\u355e\u1209\u358b\u358e\u0480;Edemnprs\u350e\u350f\u3511\u3515\u351e\u3523\u352c\u3531\u3536\u6282;\u6ac5ot;\u6abd\u0100;d\u11da\u351aot;\u6ac3ult;\u6ac1\u0100Ee\u3528\u352a;\u6acb;\u628alus;\u6abfarr;\u6979\u0180eiu\u353d\u3552\u3555t\u0180;en\u350e\u3545\u354bq\u0100;q\u11da\u350feq\u0100;q\u352b\u3528m;\u6ac7\u0100bp\u355a\u355c;\u6ad5;\u6ad3c\u0300;acens\u11ed\u356c\u3572\u3579\u357b\u3326ppro\xf8\u32faurlye\xf1\u11fe\xf1\u11f3\u0180aes\u3582\u3588\u331bppro\xf8\u331aq\xf1\u3317g;\u666a\u0680123;Edehlmnps\u35a9\u35ac\u35af\u121c\u35b2\u35b4\u35c0\u35c9\u35d5\u35da\u35df\u35e8\u35ed\u803b\xb9\u40b9\u803b\xb2\u40b2\u803b\xb3\u40b3;\u6ac6\u0100os\u35b9\u35bct;\u6abeub;\u6ad8\u0100;d\u1222\u35c5ot;\u6ac4s\u0100ou\u35cf\u35d2l;\u67c9b;\u6ad7arr;\u697bult;\u6ac2\u0100Ee\u35e4\u35e6;\u6acc;\u628blus;\u6ac0\u0180eiu\u35f4\u3609\u360ct\u0180;en\u121c\u35fc\u3602q\u0100;q\u1222\u35b2eq\u0100;q\u35e7\u35e4m;\u6ac8\u0100bp\u3611\u3613;\u6ad4;\u6ad6\u0180Aan\u361c\u3620\u362drr;\u61d9r\u0100hr\u3626\u3628\xeb\u222e\u0100;o\u0a2b\u0a29war;\u692alig\u803b\xdf\u40df\u0be1\u3651\u365d\u3660\u12ce\u3673\u3679\0\u367e\u36c2\0\0\0\0\0\u36db\u3703\0\u3709\u376c\0\0\0\u3787\u0272\u3656\0\0\u365bget;\u6316;\u43c4r\xeb\u0e5f\u0180aey\u3666\u366b\u3670ron;\u4165dil;\u4163;\u4442lrec;\u6315r;\uc000\ud835\udd31\u0200eiko\u3686\u369d\u36b5\u36bc\u01f2\u368b\0\u3691e\u01004f\u1284\u1281a\u0180;sv\u3698\u3699\u369b\u43b8ym;\u43d1\u0100cn\u36a2\u36b2k\u0100as\u36a8\u36aeppro\xf8\u12c1im\xbb\u12acs\xf0\u129e\u0100as\u36ba\u36ae\xf0\u12c1rn\u803b\xfe\u40fe\u01ec\u031f\u36c6\u22e7es\u8180\xd7;bd\u36cf\u36d0\u36d8\u40d7\u0100;a\u190f\u36d5r;\u6a31;\u6a30\u0180eps\u36e1\u36e3\u3700\xe1\u2a4d\u0200;bcf\u0486\u36ec\u36f0\u36f4ot;\u6336ir;\u6af1\u0100;o\u36f9\u36fc\uc000\ud835\udd65rk;\u6ada\xe1\u3362rime;\u6034\u0180aip\u370f\u3712\u3764d\xe5\u1248\u0380adempst\u3721\u374d\u3740\u3751\u3757\u375c\u375fngle\u0280;dlqr\u3730\u3731\u3736\u3740\u3742\u65b5own\xbb\u1dbbeft\u0100;e\u2800\u373e\xf1\u092e;\u625cight\u0100;e\u32aa\u374b\xf1\u105aot;\u65ecinus;\u6a3alus;\u6a39b;\u69cdime;\u6a3bezium;\u63e2\u0180cht\u3772\u377d\u3781\u0100ry\u3777\u377b;\uc000\ud835\udcc9;\u4446cy;\u445brok;\u4167\u0100io\u378b\u378ex\xf4\u1777head\u0100lr\u3797\u37a0eftarro\xf7\u084fightarrow\xbb\u0f5d\u0900AHabcdfghlmoprstuw\u37d0\u37d3\u37d7\u37e4\u37f0\u37fc\u380e\u381c\u3823\u3834\u3851\u385d\u386b\u38a9\u38cc\u38d2\u38ea\u38f6r\xf2\u03edar;\u6963\u0100cr\u37dc\u37e2ute\u803b\xfa\u40fa\xf2\u1150r\u01e3\u37ea\0\u37edy;\u445eve;\u416d\u0100iy\u37f5\u37farc\u803b\xfb\u40fb;\u4443\u0180abh\u3803\u3806\u380br\xf2\u13adlac;\u4171a\xf2\u13c3\u0100ir\u3813\u3818sht;\u697e;\uc000\ud835\udd32rave\u803b\xf9\u40f9\u0161\u3827\u3831r\u0100lr\u382c\u382e\xbb\u0957\xbb\u1083lk;\u6580\u0100ct\u3839\u384d\u026f\u383f\0\0\u384arn\u0100;e\u3845\u3846\u631cr\xbb\u3846op;\u630fri;\u65f8\u0100al\u3856\u385acr;\u416b\u80bb\xa8\u0349\u0100gp\u3862\u3866on;\u4173f;\uc000\ud835\udd66\u0300adhlsu\u114b\u3878\u387d\u1372\u3891\u38a0own\xe1\u13b3arpoon\u0100lr\u3888\u388cef\xf4\u382digh\xf4\u382fi\u0180;hl\u3899\u389a\u389c\u43c5\xbb\u13faon\xbb\u389aparrows;\u61c8\u0180cit\u38b0\u38c4\u38c8\u026f\u38b6\0\0\u38c1rn\u0100;e\u38bc\u38bd\u631dr\xbb\u38bdop;\u630eng;\u416fri;\u65f9cr;\uc000\ud835\udcca\u0180dir\u38d9\u38dd\u38e2ot;\u62f0lde;\u4169i\u0100;f\u3730\u38e8\xbb\u1813\u0100am\u38ef\u38f2r\xf2\u38a8l\u803b\xfc\u40fcangle;\u69a7\u0780ABDacdeflnoprsz\u391c\u391f\u3929\u392d\u39b5\u39b8\u39bd\u39df\u39e4\u39e8\u39f3\u39f9\u39fd\u3a01\u3a20r\xf2\u03f7ar\u0100;v\u3926\u3927\u6ae8;\u6ae9as\xe8\u03e1\u0100nr\u3932\u3937grt;\u699c\u0380eknprst\u34e3\u3946\u394b\u3952\u395d\u3964\u3996app\xe1\u2415othin\xe7\u1e96\u0180hir\u34eb\u2ec8\u3959op\xf4\u2fb5\u0100;h\u13b7\u3962\xef\u318d\u0100iu\u3969\u396dgm\xe1\u33b3\u0100bp\u3972\u3984setneq\u0100;q\u397d\u3980\uc000\u228a\ufe00;\uc000\u2acb\ufe00setneq\u0100;q\u398f\u3992\uc000\u228b\ufe00;\uc000\u2acc\ufe00\u0100hr\u399b\u399fet\xe1\u369ciangle\u0100lr\u39aa\u39afeft\xbb\u0925ight\xbb\u1051y;\u4432ash\xbb\u1036\u0180elr\u39c4\u39d2\u39d7\u0180;be\u2dea\u39cb\u39cfar;\u62bbq;\u625alip;\u62ee\u0100bt\u39dc\u1468a\xf2\u1469r;\uc000\ud835\udd33tr\xe9\u39aesu\u0100bp\u39ef\u39f1\xbb\u0d1c\xbb\u0d59pf;\uc000\ud835\udd67ro\xf0\u0efbtr\xe9\u39b4\u0100cu\u3a06\u3a0br;\uc000\ud835\udccb\u0100bp\u3a10\u3a18n\u0100Ee\u3980\u3a16\xbb\u397en\u0100Ee\u3992\u3a1e\xbb\u3990igzag;\u699a\u0380cefoprs\u3a36\u3a3b\u3a56\u3a5b\u3a54\u3a61\u3a6airc;\u4175\u0100di\u3a40\u3a51\u0100bg\u3a45\u3a49ar;\u6a5fe\u0100;q\u15fa\u3a4f;\u6259erp;\u6118r;\uc000\ud835\udd34pf;\uc000\ud835\udd68\u0100;e\u1479\u3a66at\xe8\u1479cr;\uc000\ud835\udccc\u0ae3\u178e\u3a87\0\u3a8b\0\u3a90\u3a9b\0\0\u3a9d\u3aa8\u3aab\u3aaf\0\0\u3ac3\u3ace\0\u3ad8\u17dc\u17dftr\xe9\u17d1r;\uc000\ud835\udd35\u0100Aa\u3a94\u3a97r\xf2\u03c3r\xf2\u09f6;\u43be\u0100Aa\u3aa1\u3aa4r\xf2\u03b8r\xf2\u09eba\xf0\u2713is;\u62fb\u0180dpt\u17a4\u3ab5\u3abe\u0100fl\u3aba\u17a9;\uc000\ud835\udd69im\xe5\u17b2\u0100Aa\u3ac7\u3acar\xf2\u03cer\xf2\u0a01\u0100cq\u3ad2\u17b8r;\uc000\ud835\udccd\u0100pt\u17d6\u3adcr\xe9\u17d4\u0400acefiosu\u3af0\u3afd\u3b08\u3b0c\u3b11\u3b15\u3b1b\u3b21c\u0100uy\u3af6\u3afbte\u803b\xfd\u40fd;\u444f\u0100iy\u3b02\u3b06rc;\u4177;\u444bn\u803b\xa5\u40a5r;\uc000\ud835\udd36cy;\u4457pf;\uc000\ud835\udd6acr;\uc000\ud835\udcce\u0100cm\u3b26\u3b29y;\u444el\u803b\xff\u40ff\u0500acdefhiosw\u3b42\u3b48\u3b54\u3b58\u3b64\u3b69\u3b6d\u3b74\u3b7a\u3b80cute;\u417a\u0100ay\u3b4d\u3b52ron;\u417e;\u4437ot;\u417c\u0100et\u3b5d\u3b61tr\xe6\u155fa;\u43b6r;\uc000\ud835\udd37cy;\u4436grarr;\u61ddpf;\uc000\ud835\udd6bcr;\uc000\ud835\udccf\u0100jn\u3b85\u3b87;\u600dj;\u600c" - .split("") - .map(function (c) { return c.charCodeAt(0); })); -//# sourceMappingURL=decode-data-html.js.map \ No newline at end of file diff --git a/node_modules/entities/lib/generated/decode-data-html.js.map b/node_modules/entities/lib/generated/decode-data-html.js.map deleted file mode 100644 index 5732f6f..0000000 --- a/node_modules/entities/lib/generated/decode-data-html.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"decode-data-html.js","sourceRoot":"https://raw.githubusercontent.com/fb55/entities/61afd4701eaa736978b13c7351cd3de9a96b04bc/src/","sources":["generated/decode-data-html.ts"],"names":[],"mappings":";AAAA,8CAA8C;;AAE9C,kBAAe,IAAI,WAAW;AAC1B,kBAAkB;AAClB,268CAA268C;KACt68C,KAAK,CAAC,EAAE,CAAC;KACT,GAAG,CAAC,UAAC,CAAC,IAAK,OAAA,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,EAAf,CAAe,CAAC,CACnC,CAAC"} \ No newline at end of file diff --git a/node_modules/entities/lib/generated/decode-data-xml.d.ts b/node_modules/entities/lib/generated/decode-data-xml.d.ts deleted file mode 100644 index 4a3f533..0000000 --- a/node_modules/entities/lib/generated/decode-data-xml.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -declare const _default: Uint16Array; -export default _default; -//# sourceMappingURL=decode-data-xml.d.ts.map \ No newline at end of file diff --git a/node_modules/entities/lib/generated/decode-data-xml.d.ts.map b/node_modules/entities/lib/generated/decode-data-xml.d.ts.map deleted file mode 100644 index be2a9a2..0000000 --- a/node_modules/entities/lib/generated/decode-data-xml.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"decode-data-xml.d.ts","sourceRoot":"https://raw.githubusercontent.com/fb55/entities/61afd4701eaa736978b13c7351cd3de9a96b04bc/src/","sources":["generated/decode-data-xml.ts"],"names":[],"mappings":";AAEA,wBAKE"} \ No newline at end of file diff --git a/node_modules/entities/lib/generated/decode-data-xml.js b/node_modules/entities/lib/generated/decode-data-xml.js deleted file mode 100644 index 8fee783..0000000 --- a/node_modules/entities/lib/generated/decode-data-xml.js +++ /dev/null @@ -1,9 +0,0 @@ -"use strict"; -// Generated using scripts/write-decode-map.ts -Object.defineProperty(exports, "__esModule", { value: true }); -exports.default = new Uint16Array( -// prettier-ignore -"\u0200aglq\t\x15\x18\x1b\u026d\x0f\0\0\x12p;\u4026os;\u4027t;\u403et;\u403cuot;\u4022" - .split("") - .map(function (c) { return c.charCodeAt(0); })); -//# sourceMappingURL=decode-data-xml.js.map \ No newline at end of file diff --git a/node_modules/entities/lib/generated/decode-data-xml.js.map b/node_modules/entities/lib/generated/decode-data-xml.js.map deleted file mode 100644 index 569fef4..0000000 --- a/node_modules/entities/lib/generated/decode-data-xml.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"decode-data-xml.js","sourceRoot":"https://raw.githubusercontent.com/fb55/entities/61afd4701eaa736978b13c7351cd3de9a96b04bc/src/","sources":["generated/decode-data-xml.ts"],"names":[],"mappings":";AAAA,8CAA8C;;AAE9C,kBAAe,IAAI,WAAW;AAC1B,kBAAkB;AAClB,uFAAuF;KAClF,KAAK,CAAC,EAAE,CAAC;KACT,GAAG,CAAC,UAAC,CAAC,IAAK,OAAA,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,EAAf,CAAe,CAAC,CACnC,CAAC"} \ No newline at end of file diff --git a/node_modules/entities/lib/generated/encode-html.d.ts b/node_modules/entities/lib/generated/encode-html.d.ts deleted file mode 100644 index 0704827..0000000 --- a/node_modules/entities/lib/generated/encode-html.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -type EncodeTrieNode = string | { - v?: string; - n: number | Map<number, EncodeTrieNode>; - o?: string; -}; -declare const _default: Map<number, EncodeTrieNode>; -export default _default; -//# sourceMappingURL=encode-html.d.ts.map \ No newline at end of file diff --git a/node_modules/entities/lib/generated/encode-html.d.ts.map b/node_modules/entities/lib/generated/encode-html.d.ts.map deleted file mode 100644 index e665a6e..0000000 --- a/node_modules/entities/lib/generated/encode-html.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"encode-html.d.ts","sourceRoot":"https://raw.githubusercontent.com/fb55/entities/61afd4701eaa736978b13c7351cd3de9a96b04bc/src/","sources":["generated/encode-html.ts"],"names":[],"mappings":"AAEA,KAAK,cAAc,GACb,MAAM,GACN;IAAE,CAAC,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,GAAG,GAAG,CAAC,MAAM,EAAE,cAAc,CAAC,CAAC;IAAC,CAAC,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC;;AAY1E,wBAAo+tB"} \ No newline at end of file diff --git a/node_modules/entities/lib/generated/encode-html.js b/node_modules/entities/lib/generated/encode-html.js deleted file mode 100644 index 071e853..0000000 --- a/node_modules/entities/lib/generated/encode-html.js +++ /dev/null @@ -1,12 +0,0 @@ -"use strict"; -// Generated using scripts/write-encode-map.ts -Object.defineProperty(exports, "__esModule", { value: true }); -function restoreDiff(arr) { - for (var i = 1; i < arr.length; i++) { - arr[i][0] += arr[i - 1][0] + 1; - } - return arr; -} -// prettier-ignore -exports.default = new Map(/* #__PURE__ */ restoreDiff([[9, "	"], [0, "
"], [22, "!"], [0, """], [0, "#"], [0, "$"], [0, "%"], [0, "&"], [0, "'"], [0, "("], [0, ")"], [0, "*"], [0, "+"], [0, ","], [1, "."], [0, "/"], [10, ":"], [0, ";"], [0, { v: "<", n: 8402, o: "<⃒" }], [0, { v: "=", n: 8421, o: "=⃥" }], [0, { v: ">", n: 8402, o: ">⃒" }], [0, "?"], [0, "@"], [26, "["], [0, "\"], [0, "]"], [0, "^"], [0, "_"], [0, "`"], [5, { n: 106, o: "fj" }], [20, "{"], [0, "|"], [0, "}"], [34, " "], [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, "Á"], [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, "â"], [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, "ă"], [0, "Ą"], [0, "ą"], [0, "Ć"], [0, "ć"], [0, "Ĉ"], [0, "ĉ"], [0, "Ċ"], [0, "ċ"], [0, "Č"], [0, "č"], [0, "Ď"], [0, "ď"], [0, "Đ"], [0, "đ"], [0, "Ē"], [0, "ē"], [2, "Ė"], [0, "ė"], [0, "Ę"], [0, "ę"], [0, "Ě"], [0, "ě"], [0, "Ĝ"], [0, "ĝ"], [0, "Ğ"], [0, "ğ"], [0, "Ġ"], [0, "ġ"], [0, "Ģ"], [1, "Ĥ"], [0, "ĥ"], [0, "Ħ"], [0, "ħ"], [0, "Ĩ"], [0, "ĩ"], [0, "Ī"], [0, "ī"], [2, "Į"], [0, "į"], [0, "İ"], [0, "ı"], [0, "IJ"], [0, "ij"], [0, "Ĵ"], [0, "ĵ"], [0, "Ķ"], [0, "ķ"], [0, "ĸ"], [0, "Ĺ"], [0, "ĺ"], [0, "Ļ"], [0, "ļ"], [0, "Ľ"], [0, "ľ"], [0, "Ŀ"], [0, "ŀ"], [0, "Ł"], [0, "ł"], [0, "Ń"], [0, "ń"], [0, "Ņ"], [0, "ņ"], [0, "Ň"], [0, "ň"], [0, "ʼn"], [0, "Ŋ"], [0, "ŋ"], [0, "Ō"], [0, "ō"], [2, "Ő"], [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, "ű"], [0, "Ų"], [0, "ų"], [0, "Ŵ"], [0, "ŵ"], [0, "Ŷ"], [0, "ŷ"], [0, "Ÿ"], [0, "Ź"], [0, "ź"], [0, "Ż"], [0, "ż"], [0, "Ž"], [0, "ž"], [19, "ƒ"], [34, "Ƶ"], [63, "ǵ"], [65, "ȷ"], [142, "ˆ"], [0, "ˇ"], [16, "˘"], [0, "˙"], [0, "˚"], [0, "˛"], [0, "˜"], [0, "˝"], [51, "̑"], [127, "Α"], [0, "Β"], [0, "Γ"], [0, "Δ"], [0, "Ε"], [0, "Ζ"], [0, "Η"], [0, "Θ"], [0, "Ι"], [0, "Κ"], [0, "Λ"], [0, "Μ"], [0, "Ν"], [0, "Ξ"], [0, "Ο"], [0, "Π"], [0, "Ρ"], [1, "Σ"], [0, "Τ"], [0, "Υ"], [0, "Φ"], [0, "Χ"], [0, "Ψ"], [0, "Ω"], [7, "α"], [0, "β"], [0, "γ"], [0, "δ"], [0, "ε"], [0, "ζ"], [0, "η"], [0, "θ"], [0, "ι"], [0, "κ"], [0, "λ"], [0, "μ"], [0, "ν"], [0, "ξ"], [0, "ο"], [0, "π"], [0, "ρ"], [0, "ς"], [0, "σ"], [0, "τ"], [0, "υ"], [0, "φ"], [0, "χ"], [0, "ψ"], [0, "ω"], [7, "ϑ"], [0, "ϒ"], [2, "ϕ"], [0, "ϖ"], [5, "Ϝ"], [0, "ϝ"], [18, "ϰ"], [0, "ϱ"], [3, "ϵ"], [0, "϶"], [10, "Ё"], [0, "Ђ"], [0, "Ѓ"], [0, "Є"], [0, "Ѕ"], [0, "І"], [0, "Ї"], [0, "Ј"], [0, "Љ"], [0, "Њ"], [0, "Ћ"], [0, "Ќ"], [1, "Ў"], [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, "Я"], [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, "ђ"], [0, "ѓ"], [0, "є"], [0, "ѕ"], [0, "і"], [0, "ї"], [0, "ј"], [0, "љ"], [0, "њ"], [0, "ћ"], [0, "ќ"], [1, "ў"], [0, "џ"], [7074, " "], [0, " "], [0, " "], [0, " "], [1, " "], [0, " "], [0, " "], [0, " "], [0, "​"], [0, "‌"], [0, "‍"], [0, "‎"], [0, "‏"], [0, "‐"], [2, "–"], [0, "—"], [0, "―"], [0, "‖"], [1, "‘"], [0, "’"], [0, "‚"], [1, "“"], [0, "”"], [0, "„"], [1, "†"], [0, "‡"], [0, "•"], [2, "‥"], [0, "…"], [9, "‰"], [0, "‱"], [0, "′"], [0, "″"], [0, "‴"], [0, "‵"], [3, "‹"], [0, "›"], [3, "‾"], [2, "⁁"], [1, "⁃"], [0, "⁄"], [10, "⁏"], [7, "⁗"], [7, { v: " ", n: 8202, o: "  " }], [0, "⁠"], [0, "⁡"], [0, "⁢"], [0, "⁣"], [72, "€"], [46, "⃛"], [0, "⃜"], [37, "ℂ"], [2, "℅"], [4, "ℊ"], [0, "ℋ"], [0, "ℌ"], [0, "ℍ"], [0, "ℎ"], [0, "ℏ"], [0, "ℐ"], [0, "ℑ"], [0, "ℒ"], [0, "ℓ"], [1, "ℕ"], [0, "№"], [0, "℗"], [0, "℘"], [0, "ℙ"], [0, "ℚ"], [0, "ℛ"], [0, "ℜ"], [0, "ℝ"], [0, "℞"], [3, "™"], [1, "ℤ"], [2, "℧"], [0, "ℨ"], [0, "℩"], [2, "ℬ"], [0, "ℭ"], [1, "ℯ"], [0, "ℰ"], [0, "ℱ"], [1, "ℳ"], [0, "ℴ"], [0, "ℵ"], [0, "ℶ"], [0, "ℷ"], [0, "ℸ"], [12, "ⅅ"], [0, "ⅆ"], [0, "ⅇ"], [0, "ⅈ"], [10, "⅓"], [0, "⅔"], [0, "⅕"], [0, "⅖"], [0, "⅗"], [0, "⅘"], [0, "⅙"], [0, "⅚"], [0, "⅛"], [0, "⅜"], [0, "⅝"], [0, "⅞"], [49, "←"], [0, "↑"], [0, "→"], [0, "↓"], [0, "↔"], [0, "↕"], [0, "↖"], [0, "↗"], [0, "↘"], [0, "↙"], [0, "↚"], [0, "↛"], [1, { v: "↝", n: 824, o: "↝̸" }], [0, "↞"], [0, "↟"], [0, "↠"], [0, "↡"], [0, "↢"], [0, "↣"], [0, "↤"], [0, "↥"], [0, "↦"], [0, "↧"], [1, "↩"], [0, "↪"], [0, "↫"], [0, "↬"], [0, "↭"], [0, "↮"], [1, "↰"], [0, "↱"], [0, "↲"], [0, "↳"], [1, "↵"], [0, "↶"], [0, "↷"], [2, "↺"], [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, "⇝"], [6, "⇤"], [0, "⇥"], [15, "⇵"], [7, "⇽"], [0, "⇾"], [0, "⇿"], [0, "∀"], [0, "∁"], [0, { v: "∂", n: 824, o: "∂̸" }], [0, "∃"], [0, "∄"], [0, "∅"], [1, "∇"], [0, "∈"], [0, "∉"], [1, "∋"], [0, "∌"], [2, "∏"], [0, "∐"], [0, "∑"], [0, "−"], [0, "∓"], [0, "∔"], [1, "∖"], [0, "∗"], [0, "∘"], [1, "√"], [2, "∝"], [0, "∞"], [0, "∟"], [0, { v: "∠", n: 8402, o: "∠⃒" }], [0, "∡"], [0, "∢"], [0, "∣"], [0, "∤"], [0, "∥"], [0, "∦"], [0, "∧"], [0, "∨"], [0, { v: "∩", n: 65024, o: "∩︀" }], [0, { v: "∪", n: 65024, o: "∪︀" }], [0, "∫"], [0, "∬"], [0, "∭"], [0, "∮"], [0, "∯"], [0, "∰"], [0, "∱"], [0, "∲"], [0, "∳"], [0, "∴"], [0, "∵"], [0, "∶"], [0, "∷"], [0, "∸"], [1, "∺"], [0, "∻"], [0, { v: "∼", n: 8402, o: "∼⃒" }], [0, { v: "∽", n: 817, o: "∽̱" }], [0, { v: "∾", n: 819, o: "∾̳" }], [0, "∿"], [0, "≀"], [0, "≁"], [0, { v: "≂", n: 824, o: "≂̸" }], [0, "≃"], [0, "≄"], [0, "≅"], [0, "≆"], [0, "≇"], [0, "≈"], [0, "≉"], [0, "≊"], [0, { v: "≋", n: 824, o: "≋̸" }], [0, "≌"], [0, { v: "≍", n: 8402, o: "≍⃒" }], [0, { v: "≎", n: 824, o: "≎̸" }], [0, { v: "≏", n: 824, o: "≏̸" }], [0, { v: "≐", n: 824, o: "≐̸" }], [0, "≑"], [0, "≒"], [0, "≓"], [0, "≔"], [0, "≕"], [0, "≖"], [0, "≗"], [1, "≙"], [0, "≚"], [1, "≜"], [2, "≟"], [0, "≠"], [0, { v: "≡", n: 8421, o: "≡⃥" }], [0, "≢"], [1, { v: "≤", n: 8402, o: "≤⃒" }], [0, { v: "≥", n: 8402, o: "≥⃒" }], [0, { v: "≦", n: 824, o: "≦̸" }], [0, { v: "≧", n: 824, o: "≧̸" }], [0, { v: "≨", n: 65024, o: "≨︀" }], [0, { v: "≩", n: 65024, o: "≩︀" }], [0, { v: "≪", n: new Map(/* #__PURE__ */ restoreDiff([[824, "≪̸"], [7577, "≪⃒"]])) }], [0, { v: "≫", n: new Map(/* #__PURE__ */ restoreDiff([[824, "≫̸"], [7577, "≫⃒"]])) }], [0, "≬"], [0, "≭"], [0, "≮"], [0, "≯"], [0, "≰"], [0, "≱"], [0, "≲"], [0, "≳"], [0, "≴"], [0, "≵"], [0, "≶"], [0, "≷"], [0, "≸"], [0, "≹"], [0, "≺"], [0, "≻"], [0, "≼"], [0, "≽"], [0, "≾"], [0, { v: "≿", n: 824, o: "≿̸" }], [0, "⊀"], [0, "⊁"], [0, { v: "⊂", n: 8402, o: "⊂⃒" }], [0, { v: "⊃", n: 8402, o: "⊃⃒" }], [0, "⊄"], [0, "⊅"], [0, "⊆"], [0, "⊇"], [0, "⊈"], [0, "⊉"], [0, { v: "⊊", n: 65024, o: "⊊︀" }], [0, { v: "⊋", n: 65024, o: "⊋︀" }], [1, "⊍"], [0, "⊎"], [0, { v: "⊏", n: 824, o: "⊏̸" }], [0, { v: "⊐", n: 824, o: "⊐̸" }], [0, "⊑"], [0, "⊒"], [0, { v: "⊓", n: 65024, o: "⊓︀" }], [0, { v: "⊔", n: 65024, o: "⊔︀" }], [0, "⊕"], [0, "⊖"], [0, "⊗"], [0, "⊘"], [0, "⊙"], [0, "⊚"], [0, "⊛"], [1, "⊝"], [0, "⊞"], [0, "⊟"], [0, "⊠"], [0, "⊡"], [0, "⊢"], [0, "⊣"], [0, "⊤"], [0, "⊥"], [1, "⊧"], [0, "⊨"], [0, "⊩"], [0, "⊪"], [0, "⊫"], [0, "⊬"], [0, "⊭"], [0, "⊮"], [0, "⊯"], [0, "⊰"], [1, "⊲"], [0, "⊳"], [0, { v: "⊴", n: 8402, o: "⊴⃒" }], [0, { v: "⊵", n: 8402, o: "⊵⃒" }], [0, "⊶"], [0, "⊷"], [0, "⊸"], [0, "⊹"], [0, "⊺"], [0, "⊻"], [1, "⊽"], [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, { v: "⋘", n: 824, o: "⋘̸" }], [0, { v: "⋙", n: 824, o: "⋙̸" }], [0, { v: "⋚", n: 65024, o: "⋚︀" }], [0, { v: "⋛", n: 65024, o: "⋛︀" }], [2, "⋞"], [0, "⋟"], [0, "⋠"], [0, "⋡"], [0, "⋢"], [0, "⋣"], [2, "⋦"], [0, "⋧"], [0, "⋨"], [0, "⋩"], [0, "⋪"], [0, "⋫"], [0, "⋬"], [0, "⋭"], [0, "⋮"], [0, "⋯"], [0, "⋰"], [0, "⋱"], [0, "⋲"], [0, "⋳"], [0, "⋴"], [0, { v: "⋵", n: 824, o: "⋵̸" }], [0, "⋶"], [0, "⋷"], [1, { v: "⋹", n: 824, o: "⋹̸" }], [0, "⋺"], [0, "⋻"], [0, "⋼"], [0, "⋽"], [0, "⋾"], [6, "⌅"], [0, "⌆"], [1, "⌈"], [0, "⌉"], [0, "⌊"], [0, "⌋"], [0, "⌌"], [0, "⌍"], [0, "⌎"], [0, "⌏"], [0, "⌐"], [1, "⌒"], [0, "⌓"], [1, "⌕"], [0, "⌖"], [5, "⌜"], [0, "⌝"], [0, "⌞"], [0, "⌟"], [2, "⌢"], [0, "⌣"], [9, "⌭"], [0, "⌮"], [7, "⌶"], [6, "⌽"], [1, "⌿"], [60, "⍼"], [51, "⎰"], [0, "⎱"], [2, "⎴"], [0, "⎵"], [0, "⎶"], [37, "⏜"], [0, "⏝"], [0, "⏞"], [0, "⏟"], [2, "⏢"], [4, "⏧"], [59, "␣"], [164, "Ⓢ"], [55, "─"], [1, "│"], [9, "┌"], [3, "┐"], [3, "└"], [3, "┘"], [3, "├"], [7, "┤"], [7, "┬"], [7, "┴"], [7, "┼"], [19, "═"], [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, "╬"], [19, "▀"], [3, "▄"], [3, "█"], [8, "░"], [0, "▒"], [0, "▓"], [13, "□"], [8, "▪"], [0, "▫"], [1, "▭"], [0, "▮"], [2, "▱"], [1, "△"], [0, "▴"], [0, "▵"], [2, "▸"], [0, "▹"], [3, "▽"], [0, "▾"], [0, "▿"], [2, "◂"], [0, "◃"], [6, "◊"], [0, "○"], [32, "◬"], [2, "◯"], [8, "◸"], [0, "◹"], [0, "◺"], [0, "◻"], [0, "◼"], [8, "★"], [0, "☆"], [7, "☎"], [49, "♀"], [1, "♂"], [29, "♠"], [2, "♣"], [1, "♥"], [0, "♦"], [3, "♪"], [2, "♭"], [0, "♮"], [0, "♯"], [163, "✓"], [3, "✗"], [8, "✠"], [21, "✶"], [33, "❘"], [25, "❲"], [0, "❳"], [84, "⟈"], [0, "⟉"], [28, "⟦"], [0, "⟧"], [0, "⟨"], [0, "⟩"], [0, "⟪"], [0, "⟫"], [0, "⟬"], [0, "⟭"], [7, "⟵"], [0, "⟶"], [0, "⟷"], [0, "⟸"], [0, "⟹"], [0, "⟺"], [1, "⟼"], [2, "⟿"], [258, "⤂"], [0, "⤃"], [0, "⤄"], [0, "⤅"], [6, "⤌"], [0, "⤍"], [0, "⤎"], [0, "⤏"], [0, "⤐"], [0, "⤑"], [0, "⤒"], [0, "⤓"], [2, "⤖"], [2, "⤙"], [0, "⤚"], [0, "⤛"], [0, "⤜"], [0, "⤝"], [0, "⤞"], [0, "⤟"], [0, "⤠"], [2, "⤣"], [0, "⤤"], [0, "⤥"], [0, "⤦"], [0, "⤧"], [0, "⤨"], [0, "⤩"], [0, "⤪"], [8, { v: "⤳", n: 824, o: "⤳̸" }], [1, "⤵"], [0, "⤶"], [0, "⤷"], [0, "⤸"], [0, "⤹"], [2, "⤼"], [0, "⤽"], [7, "⥅"], [2, "⥈"], [0, "⥉"], [0, "⥊"], [0, "⥋"], [2, "⥎"], [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, "⥯"], [0, "⥰"], [0, "⥱"], [0, "⥲"], [0, "⥳"], [0, "⥴"], [0, "⥵"], [0, "⥶"], [1, "⥸"], [0, "⥹"], [1, "⥻"], [0, "⥼"], [0, "⥽"], [0, "⥾"], [0, "⥿"], [5, "⦅"], [0, "⦆"], [4, "⦋"], [0, "⦌"], [0, "⦍"], [0, "⦎"], [0, "⦏"], [0, "⦐"], [0, "⦑"], [0, "⦒"], [0, "⦓"], [0, "⦔"], [0, "⦕"], [0, "⦖"], [3, "⦚"], [1, "⦜"], [0, "⦝"], [6, "⦤"], [0, "⦥"], [0, "⦦"], [0, "⦧"], [0, "⦨"], [0, "⦩"], [0, "⦪"], [0, "⦫"], [0, "⦬"], [0, "⦭"], [0, "⦮"], [0, "⦯"], [0, "⦰"], [0, "⦱"], [0, "⦲"], [0, "⦳"], [0, "⦴"], [0, "⦵"], [0, "⦶"], [0, "⦷"], [1, "⦹"], [1, "⦻"], [0, "⦼"], [1, "⦾"], [0, "⦿"], [0, "⧀"], [0, "⧁"], [0, "⧂"], [0, "⧃"], [0, "⧄"], [0, "⧅"], [3, "⧉"], [3, "⧍"], [0, "⧎"], [0, { v: "⧏", n: 824, o: "⧏̸" }], [0, { v: "⧐", n: 824, o: "⧐̸" }], [11, "⧜"], [0, "⧝"], [0, "⧞"], [4, "⧣"], [0, "⧤"], [0, "⧥"], [5, "⧫"], [8, "⧴"], [1, "⧶"], [9, "⨀"], [0, "⨁"], [0, "⨂"], [1, "⨄"], [1, "⨆"], [5, "⨌"], [0, "⨍"], [2, "⨐"], [0, "⨑"], [0, "⨒"], [0, "⨓"], [0, "⨔"], [0, "⨕"], [0, "⨖"], [0, "⨗"], [10, "⨢"], [0, "⨣"], [0, "⨤"], [0, "⨥"], [0, "⨦"], [0, "⨧"], [1, "⨩"], [0, "⨪"], [2, "⨭"], [0, "⨮"], [0, "⨯"], [0, "⨰"], [0, "⨱"], [1, "⨳"], [0, "⨴"], [0, "⨵"], [0, "⨶"], [0, "⨷"], [0, "⨸"], [0, "⨹"], [0, "⨺"], [0, "⨻"], [0, "⨼"], [2, "⨿"], [0, "⩀"], [1, "⩂"], [0, "⩃"], [0, "⩄"], [0, "⩅"], [0, "⩆"], [0, "⩇"], [0, "⩈"], [0, "⩉"], [0, "⩊"], [0, "⩋"], [0, "⩌"], [0, "⩍"], [2, "⩐"], [2, "⩓"], [0, "⩔"], [0, "⩕"], [0, "⩖"], [0, "⩗"], [0, "⩘"], [1, "⩚"], [0, "⩛"], [0, "⩜"], [0, "⩝"], [1, "⩟"], [6, "⩦"], [3, "⩪"], [2, { v: "⩭", n: 824, o: "⩭̸" }], [0, "⩮"], [0, "⩯"], [0, { v: "⩰", n: 824, o: "⩰̸" }], [0, "⩱"], [0, "⩲"], [0, "⩳"], [0, "⩴"], [0, "⩵"], [1, "⩷"], [0, "⩸"], [0, "⩹"], [0, "⩺"], [0, "⩻"], [0, "⩼"], [0, { v: "⩽", n: 824, o: "⩽̸" }], [0, { v: "⩾", n: 824, o: "⩾̸" }], [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, "⪚"], [2, "⪝"], [0, "⪞"], [0, "⪟"], [0, "⪠"], [0, { v: "⪡", n: 824, o: "⪡̸" }], [0, { v: "⪢", n: 824, o: "⪢̸" }], [1, "⪤"], [0, "⪥"], [0, "⪦"], [0, "⪧"], [0, "⪨"], [0, "⪩"], [0, "⪪"], [0, "⪫"], [0, { v: "⪬", n: 65024, o: "⪬︀" }], [0, { v: "⪭", n: 65024, o: "⪭︀" }], [0, "⪮"], [0, { v: "⪯", n: 824, o: "⪯̸" }], [0, { v: "⪰", n: 824, o: "⪰̸" }], [2, "⪳"], [0, "⪴"], [0, "⪵"], [0, "⪶"], [0, "⪷"], [0, "⪸"], [0, "⪹"], [0, "⪺"], [0, "⪻"], [0, "⪼"], [0, "⪽"], [0, "⪾"], [0, "⪿"], [0, "⫀"], [0, "⫁"], [0, "⫂"], [0, "⫃"], [0, "⫄"], [0, { v: "⫅", n: 824, o: "⫅̸" }], [0, { v: "⫆", n: 824, o: "⫆̸" }], [0, "⫇"], [0, "⫈"], [2, { v: "⫋", n: 65024, o: "⫋︀" }], [0, { v: "⫌", n: 65024, o: "⫌︀" }], [2, "⫏"], [0, "⫐"], [0, "⫑"], [0, "⫒"], [0, "⫓"], [0, "⫔"], [0, "⫕"], [0, "⫖"], [0, "⫗"], [0, "⫘"], [0, "⫙"], [0, "⫚"], [0, "⫛"], [8, "⫤"], [1, "⫦"], [0, "⫧"], [0, "⫨"], [0, "⫩"], [1, "⫫"], [0, "⫬"], [0, "⫭"], [0, "⫮"], [0, "⫯"], [0, "⫰"], [0, "⫱"], [0, "⫲"], [0, "⫳"], [9, { v: "⫽", n: 8421, o: "⫽⃥" }], [44343, { n: new Map(/* #__PURE__ */ restoreDiff([[56476, "𝒜"], [1, "𝒞"], [0, "𝒟"], [2, "𝒢"], [2, "𝒥"], [0, "𝒦"], [2, "𝒩"], [0, "𝒪"], [0, "𝒫"], [0, "𝒬"], [1, "𝒮"], [0, "𝒯"], [0, "𝒰"], [0, "𝒱"], [0, "𝒲"], [0, "𝒳"], [0, "𝒴"], [0, "𝒵"], [0, "𝒶"], [0, "𝒷"], [0, "𝒸"], [0, "𝒹"], [1, "𝒻"], [1, "𝒽"], [0, "𝒾"], [0, "𝒿"], [0, "𝓀"], [0, "𝓁"], [0, "𝓂"], [0, "𝓃"], [1, "𝓅"], [0, "𝓆"], [0, "𝓇"], [0, "𝓈"], [0, "𝓉"], [0, "𝓊"], [0, "𝓋"], [0, "𝓌"], [0, "𝓍"], [0, "𝓎"], [0, "𝓏"], [52, "𝔄"], [0, "𝔅"], [1, "𝔇"], [0, "𝔈"], [0, "𝔉"], [0, "𝔊"], [2, "𝔍"], [0, "𝔎"], [0, "𝔏"], [0, "𝔐"], [0, "𝔑"], [0, "𝔒"], [0, "𝔓"], [0, "𝔔"], [1, "𝔖"], [0, "𝔗"], [0, "𝔘"], [0, "𝔙"], [0, "𝔚"], [0, "𝔛"], [0, "𝔜"], [1, "𝔞"], [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, "𝔼"], [0, "𝔽"], [0, "𝔾"], [1, "𝕀"], [0, "𝕁"], [0, "𝕂"], [0, "𝕃"], [0, "𝕄"], [1, "𝕆"], [3, "𝕊"], [0, "𝕋"], [0, "𝕌"], [0, "𝕍"], [0, "𝕎"], [0, "𝕏"], [0, "𝕐"], [1, "𝕒"], [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, "𝕫"]])) }], [8906, "ff"], [0, "fi"], [0, "fl"], [0, "ffi"], [0, "ffl"]])); -//# sourceMappingURL=encode-html.js.map \ No newline at end of file diff --git a/node_modules/entities/lib/generated/encode-html.js.map b/node_modules/entities/lib/generated/encode-html.js.map deleted file mode 100644 index 2d2d9be..0000000 --- a/node_modules/entities/lib/generated/encode-html.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"encode-html.js","sourceRoot":"https://raw.githubusercontent.com/fb55/entities/61afd4701eaa736978b13c7351cd3de9a96b04bc/src/","sources":["generated/encode-html.ts"],"names":[],"mappings":";AAAA,8CAA8C;;AAM9C,SAAS,WAAW,CAChB,GAAM;IAEN,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,GAAG,CAAC,MAAM,EAAE,CAAC,EAAE,EAA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AAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/entities/lib/index.d.ts b/node_modules/entities/lib/index.d.ts deleted file mode 100644 index dd4eb11..0000000 --- a/node_modules/entities/lib/index.d.ts +++ /dev/null @@ -1,96 +0,0 @@ -import { DecodingMode } from "./decode.js"; -/** The level of entities to support. */ -export declare enum EntityLevel { - /** Support only XML entities. */ - XML = 0, - /** Support HTML entities, which are a superset of XML entities. */ - HTML = 1 -} -export declare enum EncodingMode { - /** - * The output is UTF-8 encoded. Only characters that need escaping within - * XML will be escaped. - */ - UTF8 = 0, - /** - * The output consists only of ASCII characters. Characters that need - * escaping within HTML, and characters that aren't ASCII characters will - * be escaped. - */ - ASCII = 1, - /** - * Encode all characters that have an equivalent entity, as well as all - * characters that are not ASCII characters. - */ - Extensive = 2, - /** - * Encode all characters that have to be escaped in HTML attributes, - * following {@link https://html.spec.whatwg.org/multipage/parsing.html#escapingString}. - */ - Attribute = 3, - /** - * Encode all characters that have to be escaped in HTML text, - * following {@link https://html.spec.whatwg.org/multipage/parsing.html#escapingString}. - */ - Text = 4 -} -export interface DecodingOptions { - /** - * The level of entities to support. - * @default {@link EntityLevel.XML} - */ - level?: EntityLevel; - /** - * Decoding mode. If `Legacy`, will support legacy entities not terminated - * with a semicolon (`;`). - * - * Always `Strict` for XML. For HTML, set this to `true` if you are parsing - * an attribute value. - * - * The deprecated `decodeStrict` function defaults this to `Strict`. - * - * @default {@link DecodingMode.Legacy} - */ - mode?: DecodingMode | undefined; -} -/** - * Decodes a string with entities. - * - * @param data String to decode. - * @param options Decoding options. - */ -export declare function decode(data: string, options?: DecodingOptions | EntityLevel): string; -/** - * Decodes a string with entities. Does not allow missing trailing semicolons for entities. - * - * @param data String to decode. - * @param options Decoding options. - * @deprecated Use `decode` with the `mode` set to `Strict`. - */ -export declare function decodeStrict(data: string, options?: DecodingOptions | EntityLevel): string; -/** - * Options for `encode`. - */ -export interface EncodingOptions { - /** - * The level of entities to support. - * @default {@link EntityLevel.XML} - */ - level?: EntityLevel; - /** - * Output format. - * @default {@link EncodingMode.Extensive} - */ - mode?: EncodingMode; -} -/** - * Encodes a string with entities. - * - * @param data String to encode. - * @param options Encoding options. - */ -export declare function encode(data: string, options?: EncodingOptions | EntityLevel): string; -export { encodeXML, escape, escapeUTF8, escapeAttribute, escapeText, } from "./escape.js"; -export { encodeHTML, encodeNonAsciiHTML, encodeHTML as encodeHTML4, encodeHTML as encodeHTML5, } from "./encode.js"; -export { EntityDecoder, DecodingMode, decodeXML, decodeHTML, decodeHTMLStrict, decodeHTMLAttribute, decodeHTML as decodeHTML4, decodeHTML as decodeHTML5, decodeHTMLStrict as decodeHTML4Strict, decodeHTMLStrict as decodeHTML5Strict, decodeXML as decodeXMLStrict, } from "./decode.js"; -//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/entities/lib/index.d.ts.map b/node_modules/entities/lib/index.d.ts.map deleted file mode 100644 index cfeef9f..0000000 --- a/node_modules/entities/lib/index.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"https://raw.githubusercontent.com/fb55/entities/61afd4701eaa736978b13c7351cd3de9a96b04bc/src/","sources":["index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAyB,YAAY,EAAE,MAAM,aAAa,CAAC;AASlE,wCAAwC;AACxC,oBAAY,WAAW;IACnB,iCAAiC;IACjC,GAAG,IAAI;IACP,mEAAmE;IACnE,IAAI,IAAI;CACX;AAED,oBAAY,YAAY;IACpB;;;OAGG;IACH,IAAI,IAAA;IACJ;;;;OAIG;IACH,KAAK,IAAA;IACL;;;OAGG;IACH,SAAS,IAAA;IACT;;;OAGG;IACH,SAAS,IAAA;IACT;;;OAGG;IACH,IAAI,IAAA;CACP;AAED,MAAM,WAAW,eAAe;IAC5B;;;OAGG;IACH,KAAK,CAAC,EAAE,WAAW,CAAC;IACpB;;;;;;;;;;OAUG;IACH,IAAI,CAAC,EAAE,YAAY,GAAG,SAAS,CAAC;CACnC;AAED;;;;;GAKG;AACH,wBAAgB,MAAM,CAClB,IAAI,EAAE,MAAM,EACZ,OAAO,GAAE,eAAe,GAAG,WAA6B,GACzD,MAAM,CASR;AAED;;;;;;GAMG;AACH,wBAAgB,YAAY,CACxB,IAAI,EAAE,MAAM,EACZ,OAAO,GAAE,eAAe,GAAG,WAA6B,GACzD,MAAM,CAKR;AAED;;GAEG;AACH,MAAM,WAAW,eAAe;IAC5B;;;OAGG;IACH,KAAK,CAAC,EAAE,WAAW,CAAC;IACpB;;;OAGG;IACH,IAAI,CAAC,EAAE,YAAY,CAAC;CACvB;AAED;;;;;GAKG;AACH,wBAAgB,MAAM,CAClB,IAAI,EAAE,MAAM,EACZ,OAAO,GAAE,eAAe,GAAG,WAA6B,GACzD,MAAM,CAkBR;AAED,OAAO,EACH,SAAS,EACT,MAAM,EACN,UAAU,EACV,eAAe,EACf,UAAU,GACb,MAAM,aAAa,CAAC;AAErB,OAAO,EACH,UAAU,EACV,kBAAkB,EAElB,UAAU,IAAI,WAAW,EACzB,UAAU,IAAI,WAAW,GAC5B,MAAM,aAAa,CAAC;AAErB,OAAO,EACH,aAAa,EACb,YAAY,EACZ,SAAS,EACT,UAAU,EACV,gBAAgB,EAChB,mBAAmB,EAEnB,UAAU,IAAI,WAAW,EACzB,UAAU,IAAI,WAAW,EACzB,gBAAgB,IAAI,iBAAiB,EACrC,gBAAgB,IAAI,iBAAiB,EACrC,SAAS,IAAI,eAAe,GAC/B,MAAM,aAAa,CAAC"} \ No newline at end of file diff --git a/node_modules/entities/lib/index.js b/node_modules/entities/lib/index.js deleted file mode 100644 index f809b1b..0000000 --- a/node_modules/entities/lib/index.js +++ /dev/null @@ -1,126 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.decodeXMLStrict = exports.decodeHTML5Strict = exports.decodeHTML4Strict = exports.decodeHTML5 = exports.decodeHTML4 = exports.decodeHTMLAttribute = exports.decodeHTMLStrict = exports.decodeHTML = exports.decodeXML = exports.DecodingMode = exports.EntityDecoder = exports.encodeHTML5 = exports.encodeHTML4 = exports.encodeNonAsciiHTML = exports.encodeHTML = exports.escapeText = exports.escapeAttribute = exports.escapeUTF8 = exports.escape = exports.encodeXML = exports.encode = exports.decodeStrict = exports.decode = exports.EncodingMode = exports.EntityLevel = void 0; -var decode_js_1 = require("./decode.js"); -var encode_js_1 = require("./encode.js"); -var escape_js_1 = require("./escape.js"); -/** The level of entities to support. */ -var EntityLevel; -(function (EntityLevel) { - /** Support only XML entities. */ - EntityLevel[EntityLevel["XML"] = 0] = "XML"; - /** Support HTML entities, which are a superset of XML entities. */ - EntityLevel[EntityLevel["HTML"] = 1] = "HTML"; -})(EntityLevel = exports.EntityLevel || (exports.EntityLevel = {})); -var EncodingMode; -(function (EncodingMode) { - /** - * The output is UTF-8 encoded. Only characters that need escaping within - * XML will be escaped. - */ - EncodingMode[EncodingMode["UTF8"] = 0] = "UTF8"; - /** - * The output consists only of ASCII characters. Characters that need - * escaping within HTML, and characters that aren't ASCII characters will - * be escaped. - */ - EncodingMode[EncodingMode["ASCII"] = 1] = "ASCII"; - /** - * Encode all characters that have an equivalent entity, as well as all - * characters that are not ASCII characters. - */ - EncodingMode[EncodingMode["Extensive"] = 2] = "Extensive"; - /** - * Encode all characters that have to be escaped in HTML attributes, - * following {@link https://html.spec.whatwg.org/multipage/parsing.html#escapingString}. - */ - EncodingMode[EncodingMode["Attribute"] = 3] = "Attribute"; - /** - * Encode all characters that have to be escaped in HTML text, - * following {@link https://html.spec.whatwg.org/multipage/parsing.html#escapingString}. - */ - EncodingMode[EncodingMode["Text"] = 4] = "Text"; -})(EncodingMode = exports.EncodingMode || (exports.EncodingMode = {})); -/** - * Decodes a string with entities. - * - * @param data String to decode. - * @param options Decoding options. - */ -function decode(data, options) { - if (options === void 0) { options = EntityLevel.XML; } - var level = typeof options === "number" ? options : options.level; - if (level === EntityLevel.HTML) { - var mode = typeof options === "object" ? options.mode : undefined; - return (0, decode_js_1.decodeHTML)(data, mode); - } - return (0, decode_js_1.decodeXML)(data); -} -exports.decode = decode; -/** - * Decodes a string with entities. Does not allow missing trailing semicolons for entities. - * - * @param data String to decode. - * @param options Decoding options. - * @deprecated Use `decode` with the `mode` set to `Strict`. - */ -function decodeStrict(data, options) { - var _a; - if (options === void 0) { options = EntityLevel.XML; } - var opts = typeof options === "number" ? { level: options } : options; - (_a = opts.mode) !== null && _a !== void 0 ? _a : (opts.mode = decode_js_1.DecodingMode.Strict); - return decode(data, opts); -} -exports.decodeStrict = decodeStrict; -/** - * Encodes a string with entities. - * - * @param data String to encode. - * @param options Encoding options. - */ -function encode(data, options) { - if (options === void 0) { options = EntityLevel.XML; } - var opts = typeof options === "number" ? { level: options } : options; - // Mode `UTF8` just escapes XML entities - if (opts.mode === EncodingMode.UTF8) - return (0, escape_js_1.escapeUTF8)(data); - if (opts.mode === EncodingMode.Attribute) - return (0, escape_js_1.escapeAttribute)(data); - if (opts.mode === EncodingMode.Text) - return (0, escape_js_1.escapeText)(data); - if (opts.level === EntityLevel.HTML) { - if (opts.mode === EncodingMode.ASCII) { - return (0, encode_js_1.encodeNonAsciiHTML)(data); - } - return (0, encode_js_1.encodeHTML)(data); - } - // ASCII and Extensive are equivalent - return (0, escape_js_1.encodeXML)(data); -} -exports.encode = encode; -var escape_js_2 = require("./escape.js"); -Object.defineProperty(exports, "encodeXML", { enumerable: true, get: function () { return escape_js_2.encodeXML; } }); -Object.defineProperty(exports, "escape", { enumerable: true, get: function () { return escape_js_2.escape; } }); -Object.defineProperty(exports, "escapeUTF8", { enumerable: true, get: function () { return escape_js_2.escapeUTF8; } }); -Object.defineProperty(exports, "escapeAttribute", { enumerable: true, get: function () { return escape_js_2.escapeAttribute; } }); -Object.defineProperty(exports, "escapeText", { enumerable: true, get: function () { return escape_js_2.escapeText; } }); -var encode_js_2 = require("./encode.js"); -Object.defineProperty(exports, "encodeHTML", { enumerable: true, get: function () { return encode_js_2.encodeHTML; } }); -Object.defineProperty(exports, "encodeNonAsciiHTML", { enumerable: true, get: function () { return encode_js_2.encodeNonAsciiHTML; } }); -// Legacy aliases (deprecated) -Object.defineProperty(exports, "encodeHTML4", { enumerable: true, get: function () { return encode_js_2.encodeHTML; } }); -Object.defineProperty(exports, "encodeHTML5", { enumerable: true, get: function () { return encode_js_2.encodeHTML; } }); -var decode_js_2 = require("./decode.js"); -Object.defineProperty(exports, "EntityDecoder", { enumerable: true, get: function () { return decode_js_2.EntityDecoder; } }); -Object.defineProperty(exports, "DecodingMode", { enumerable: true, get: function () { return decode_js_2.DecodingMode; } }); -Object.defineProperty(exports, "decodeXML", { enumerable: true, get: function () { return decode_js_2.decodeXML; } }); -Object.defineProperty(exports, "decodeHTML", { enumerable: true, get: function () { return decode_js_2.decodeHTML; } }); -Object.defineProperty(exports, "decodeHTMLStrict", { enumerable: true, get: function () { return decode_js_2.decodeHTMLStrict; } }); -Object.defineProperty(exports, "decodeHTMLAttribute", { enumerable: true, get: function () { return decode_js_2.decodeHTMLAttribute; } }); -// Legacy aliases (deprecated) -Object.defineProperty(exports, "decodeHTML4", { enumerable: true, get: function () { return decode_js_2.decodeHTML; } }); -Object.defineProperty(exports, "decodeHTML5", { enumerable: true, get: function () { return decode_js_2.decodeHTML; } }); -Object.defineProperty(exports, "decodeHTML4Strict", { enumerable: true, get: function () { return decode_js_2.decodeHTMLStrict; } }); -Object.defineProperty(exports, "decodeHTML5Strict", { enumerable: true, get: function () { return decode_js_2.decodeHTMLStrict; } }); -Object.defineProperty(exports, "decodeXMLStrict", { enumerable: true, get: function () { return decode_js_2.decodeXML; } }); -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/entities/lib/index.js.map b/node_modules/entities/lib/index.js.map deleted file mode 100644 index 2ef7751..0000000 --- a/node_modules/entities/lib/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sourceRoot":"https://raw.githubusercontent.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,eAAe,OAAA;AACf,uGAAA,UAAU,OAAA;AAGd,yCAMqB;AALjB,uGAAA,UAAU,OAAA;AACV,+GAAA,kBAAkB,OAAA;AAClB,8BAA8B;AAC9B,wGAAA,UAAU,OAAe;AACzB,wGAAA,UAAU,OAAe;AAG7B,yCAaqB;AAZjB,0GAAA,aAAa,OAAA;AACb,yGAAA,YAAY,OAAA;AACZ,sGAAA,SAAS,OAAA;AACT,uGAAA,UAAU,OAAA;AACV,6GAAA,gBAAgB,OAAA;AAChB,gHAAA,mBAAmB,OAAA;AACnB,8BAA8B;AAC9B,wGAAA,UAAU,OAAe;AACzB,wGAAA,UAAU,OAAe;AACzB,8GAAA,gBAAgB,OAAqB;AACrC,8GAAA,gBAAgB,OAAqB;AACrC,4GAAA,SAAS,OAAmB"} \ No newline at end of file diff --git a/node_modules/entities/package.json b/node_modules/entities/package.json deleted file mode 100644 index 2e857f8..0000000 --- a/node_modules/entities/package.json +++ /dev/null @@ -1,90 +0,0 @@ -{ - "name": "entities", - "version": "4.5.0", - "description": "Encode & decode XML and HTML entities with ease & speed", - "author": "Felix Boehm <me@feedic.com>", - "funding": "https://github.com/fb55/entities?sponsor=1", - "sideEffects": false, - "keywords": [ - "entity", - "decoding", - "encoding", - "html", - "xml", - "html entities" - ], - "directories": { - "lib": "lib/" - }, - "main": "lib/index.js", - "types": "lib/index.d.ts", - "module": "lib/esm/index.js", - "exports": { - ".": { - "require": "./lib/index.js", - "import": "./lib/esm/index.js" - }, - "./lib/decode.js": { - "require": "./lib/decode.js", - "import": "./lib/esm/decode.js" - }, - "./lib/escape.js": { - "require": "./lib/escape.js", - "import": "./lib/esm/escape.js" - } - }, - "files": [ - "lib/**/*" - ], - "engines": { - "node": ">=0.12" - }, - "devDependencies": { - "@types/jest": "^28.1.8", - "@types/node": "^18.15.11", - "@typescript-eslint/eslint-plugin": "^5.58.0", - "@typescript-eslint/parser": "^5.58.0", - "eslint": "^8.38.0", - "eslint-config-prettier": "^8.8.0", - "eslint-plugin-node": "^11.1.0", - "jest": "^28.1.3", - "prettier": "^2.8.7", - "ts-jest": "^28.0.8", - "typedoc": "^0.24.1", - "typescript": "^5.0.4" - }, - "scripts": { - "test": "npm run test:jest && npm run lint", - "test:jest": "jest", - "lint": "npm run lint:es && npm run lint:prettier", - "lint:es": "eslint .", - "lint:prettier": "npm run prettier -- --check", - "format": "npm run format:es && npm run format:prettier", - "format:es": "npm run lint:es -- --fix", - "format:prettier": "npm run prettier -- --write", - "prettier": "prettier '**/*.{ts,md,json,yml}'", - "build": "npm run build:cjs && npm run build:esm", - "build:cjs": "tsc --sourceRoot https://raw.githubusercontent.com/fb55/entities/$(git rev-parse HEAD)/src/", - "build:esm": "npm run build:cjs -- --module esnext --target es2019 --outDir lib/esm && echo '{\"type\":\"module\"}' > lib/esm/package.json", - "build:docs": "typedoc --hideGenerator src/index.ts", - "build:trie": "ts-node scripts/write-decode-map.ts", - "build:encode-trie": "ts-node scripts/write-encode-map.ts", - "prepare": "npm run build" - }, - "repository": { - "type": "git", - "url": "git://github.com/fb55/entities.git" - }, - "license": "BSD-2-Clause", - "jest": { - "preset": "ts-jest", - "coverageProvider": "v8", - "moduleNameMapper": { - "^(.*)\\.js$": "$1" - } - }, - "prettier": { - "tabWidth": 4, - "proseWrap": "always" - } -} diff --git a/node_modules/escalade/dist/index.js b/node_modules/escalade/dist/index.js deleted file mode 100644 index ad236c4..0000000 --- a/node_modules/escalade/dist/index.js +++ /dev/null @@ -1,22 +0,0 @@ -const { dirname, resolve } = require('path'); -const { readdir, stat } = require('fs'); -const { promisify } = require('util'); - -const toStats = promisify(stat); -const toRead = promisify(readdir); - -module.exports = async function (start, callback) { - let dir = resolve('.', start); - let tmp, stats = await toStats(dir); - - if (!stats.isDirectory()) { - dir = dirname(dir); - } - - while (true) { - tmp = await callback(dir, await toRead(dir)); - if (tmp) return resolve(dir, tmp); - dir = dirname(tmp = dir); - if (tmp === dir) break; - } -} diff --git a/node_modules/escalade/dist/index.mjs b/node_modules/escalade/dist/index.mjs deleted file mode 100644 index bf95be0..0000000 --- a/node_modules/escalade/dist/index.mjs +++ /dev/null @@ -1,22 +0,0 @@ -import { dirname, resolve } from 'path'; -import { readdir, stat } from 'fs'; -import { promisify } from 'util'; - -const toStats = promisify(stat); -const toRead = promisify(readdir); - -export default async function (start, callback) { - let dir = resolve('.', start); - let tmp, stats = await toStats(dir); - - if (!stats.isDirectory()) { - dir = dirname(dir); - } - - while (true) { - tmp = await callback(dir, await toRead(dir)); - if (tmp) return resolve(dir, tmp); - dir = dirname(tmp = dir); - if (tmp === dir) break; - } -} diff --git a/node_modules/escalade/index.d.mts b/node_modules/escalade/index.d.mts deleted file mode 100644 index 550699c..0000000 --- a/node_modules/escalade/index.d.mts +++ /dev/null @@ -1,11 +0,0 @@ -type Promisable<T> = T | Promise<T>; - -export type Callback = ( - directory: string, - files: string[], -) => Promisable<string | false | void>; - -export default function ( - directory: string, - callback: Callback, -): Promise<string | void>; diff --git a/node_modules/escalade/index.d.ts b/node_modules/escalade/index.d.ts deleted file mode 100644 index 26c58f2..0000000 --- a/node_modules/escalade/index.d.ts +++ /dev/null @@ -1,15 +0,0 @@ -type Promisable<T> = T | Promise<T>; - -declare namespace escalade { - export type Callback = ( - directory: string, - files: string[], - ) => Promisable<string | false | void>; -} - -declare function escalade( - directory: string, - callback: escalade.Callback, -): Promise<string | void>; - -export = escalade; diff --git a/node_modules/escalade/package.json b/node_modules/escalade/package.json deleted file mode 100644 index 1eed4f9..0000000 --- a/node_modules/escalade/package.json +++ /dev/null @@ -1,74 +0,0 @@ -{ - "name": "escalade", - "version": "3.2.0", - "repository": "lukeed/escalade", - "description": "A tiny (183B to 210B) and fast utility to ascend parent directories", - "module": "dist/index.mjs", - "main": "dist/index.js", - "types": "index.d.ts", - "license": "MIT", - "author": { - "name": "Luke Edwards", - "email": "luke.edwards05@gmail.com", - "url": "https://lukeed.com" - }, - "exports": { - ".": [ - { - "import": { - "types": "./index.d.mts", - "default": "./dist/index.mjs" - }, - "require": { - "types": "./index.d.ts", - "default": "./dist/index.js" - } - }, - "./dist/index.js" - ], - "./sync": [ - { - "import": { - "types": "./sync/index.d.mts", - "default": "./sync/index.mjs" - }, - "require": { - "types": "./sync/index.d.ts", - "default": "./sync/index.js" - } - }, - "./sync/index.js" - ] - }, - "files": [ - "*.d.mts", - "*.d.ts", - "dist", - "sync" - ], - "modes": { - "sync": "src/sync.js", - "default": "src/async.js" - }, - "engines": { - "node": ">=6" - }, - "scripts": { - "build": "bundt", - "pretest": "npm run build", - "test": "uvu -r esm test -i fixtures" - }, - "keywords": [ - "find", - "parent", - "parents", - "directory", - "search", - "walk" - ], - "devDependencies": { - "bundt": "1.1.1", - "esm": "3.2.25", - "uvu": "0.3.3" - } -} diff --git a/node_modules/escalade/sync/index.d.mts b/node_modules/escalade/sync/index.d.mts deleted file mode 100644 index c023d37..0000000 --- a/node_modules/escalade/sync/index.d.mts +++ /dev/null @@ -1,9 +0,0 @@ -export type Callback = ( - directory: string, - files: string[], -) => string | false | void; - -export default function ( - directory: string, - callback: Callback, -): string | void; diff --git a/node_modules/escalade/sync/index.d.ts b/node_modules/escalade/sync/index.d.ts deleted file mode 100644 index 9d5b589..0000000 --- a/node_modules/escalade/sync/index.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -declare namespace escalade { - export type Callback = ( - directory: string, - files: string[], - ) => string | false | void; -} - -declare function escalade( - directory: string, - callback: escalade.Callback, -): string | void; - -export = escalade; diff --git a/node_modules/escalade/sync/index.js b/node_modules/escalade/sync/index.js deleted file mode 100644 index 902cc46..0000000 --- a/node_modules/escalade/sync/index.js +++ /dev/null @@ -1,18 +0,0 @@ -const { dirname, resolve } = require('path'); -const { readdirSync, statSync } = require('fs'); - -module.exports = function (start, callback) { - let dir = resolve('.', start); - let tmp, stats = statSync(dir); - - if (!stats.isDirectory()) { - dir = dirname(dir); - } - - while (true) { - tmp = callback(dir, readdirSync(dir)); - if (tmp) return resolve(dir, tmp); - dir = dirname(tmp = dir); - if (tmp === dir) break; - } -} diff --git a/node_modules/escalade/sync/index.mjs b/node_modules/escalade/sync/index.mjs deleted file mode 100644 index 3cdc5bd..0000000 --- a/node_modules/escalade/sync/index.mjs +++ /dev/null @@ -1,18 +0,0 @@ -import { dirname, resolve } from 'path'; -import { readdirSync, statSync } from 'fs'; - -export default function (start, callback) { - let dir = resolve('.', start); - let tmp, stats = statSync(dir); - - if (!stats.isDirectory()) { - dir = dirname(dir); - } - - while (true) { - tmp = callback(dir, readdirSync(dir)); - if (tmp) return resolve(dir, tmp); - dir = dirname(tmp = dir); - if (tmp === dir) break; - } -} diff --git a/node_modules/express/node_modules/body-parser/index.js b/node_modules/express/node_modules/body-parser/index.js new file mode 100644 index 0000000..bb24d73 --- /dev/null +++ b/node_modules/express/node_modules/body-parser/index.js @@ -0,0 +1,156 @@ +/*! + * body-parser + * Copyright(c) 2014-2015 Douglas Christopher Wilson + * MIT Licensed + */ + +'use strict' + +/** + * Module dependencies. + * @private + */ + +var deprecate = require('depd')('body-parser') + +/** + * Cache of loaded parsers. + * @private + */ + +var parsers = Object.create(null) + +/** + * @typedef Parsers + * @type {function} + * @property {function} json + * @property {function} raw + * @property {function} text + * @property {function} urlencoded + */ + +/** + * Module exports. + * @type {Parsers} + */ + +exports = module.exports = deprecate.function(bodyParser, + 'bodyParser: use individual json/urlencoded middlewares') + +/** + * JSON parser. + * @public + */ + +Object.defineProperty(exports, 'json', { + configurable: true, + enumerable: true, + get: createParserGetter('json') +}) + +/** + * Raw parser. + * @public + */ + +Object.defineProperty(exports, 'raw', { + configurable: true, + enumerable: true, + get: createParserGetter('raw') +}) + +/** + * Text parser. + * @public + */ + +Object.defineProperty(exports, 'text', { + configurable: true, + enumerable: true, + get: createParserGetter('text') +}) + +/** + * URL-encoded parser. + * @public + */ + +Object.defineProperty(exports, 'urlencoded', { + configurable: true, + enumerable: true, + get: createParserGetter('urlencoded') +}) + +/** + * Create a middleware to parse json and urlencoded bodies. + * + * @param {object} [options] + * @return {function} + * @deprecated + * @public + */ + +function bodyParser (options) { + // use default type for parsers + var opts = Object.create(options || null, { + type: { + configurable: true, + enumerable: true, + value: undefined, + writable: true + } + }) + + var _urlencoded = exports.urlencoded(opts) + var _json = exports.json(opts) + + return function bodyParser (req, res, next) { + _json(req, res, function (err) { + if (err) return next(err) + _urlencoded(req, res, next) + }) + } +} + +/** + * Create a getter for loading a parser. + * @private + */ + +function createParserGetter (name) { + return function get () { + return loadParser(name) + } +} + +/** + * Load a parser module. + * @private + */ + +function loadParser (parserName) { + var parser = parsers[parserName] + + if (parser !== undefined) { + return parser + } + + // this uses a switch for static require analysis + switch (parserName) { + case 'json': + parser = require('./lib/types/json') + break + case 'raw': + parser = require('./lib/types/raw') + break + case 'text': + parser = require('./lib/types/text') + break + case 'urlencoded': + parser = require('./lib/types/urlencoded') + break + } + + // store to prevent invoking require() + return (parsers[parserName] = parser) +} diff --git a/node_modules/express/node_modules/body-parser/lib/read.js b/node_modules/express/node_modules/body-parser/lib/read.js new file mode 100644 index 0000000..fce6283 --- /dev/null +++ b/node_modules/express/node_modules/body-parser/lib/read.js @@ -0,0 +1,205 @@ +/*! + * body-parser + * Copyright(c) 2014-2015 Douglas Christopher Wilson + * MIT Licensed + */ + +'use strict' + +/** + * Module dependencies. + * @private + */ + +var createError = require('http-errors') +var destroy = require('destroy') +var getBody = require('raw-body') +var iconv = require('iconv-lite') +var onFinished = require('on-finished') +var unpipe = require('unpipe') +var zlib = require('zlib') + +/** + * Module exports. + */ + +module.exports = read + +/** + * Read a request into a buffer and parse. + * + * @param {object} req + * @param {object} res + * @param {function} next + * @param {function} parse + * @param {function} debug + * @param {object} options + * @private + */ + +function read (req, res, next, parse, debug, options) { + var length + var opts = options + var stream + + // flag as parsed + req._body = true + + // read options + var encoding = opts.encoding !== null + ? opts.encoding + : null + var verify = opts.verify + + try { + // get the content stream + stream = contentstream(req, debug, opts.inflate) + length = stream.length + stream.length = undefined + } catch (err) { + return next(err) + } + + // set raw-body options + opts.length = length + opts.encoding = verify + ? null + : encoding + + // assert charset is supported + if (opts.encoding === null && encoding !== null && !iconv.encodingExists(encoding)) { + return next(createError(415, 'unsupported charset "' + encoding.toUpperCase() + '"', { + charset: encoding.toLowerCase(), + type: 'charset.unsupported' + })) + } + + // read body + debug('read body') + getBody(stream, opts, function (error, body) { + if (error) { + var _error + + if (error.type === 'encoding.unsupported') { + // echo back charset + _error = createError(415, 'unsupported charset "' + encoding.toUpperCase() + '"', { + charset: encoding.toLowerCase(), + type: 'charset.unsupported' + }) + } else { + // set status code on error + _error = createError(400, error) + } + + // unpipe from stream and destroy + if (stream !== req) { + unpipe(req) + destroy(stream, true) + } + + // read off entire request + dump(req, function onfinished () { + next(createError(400, _error)) + }) + return + } + + // verify + if (verify) { + try { + debug('verify body') + verify(req, res, body, encoding) + } catch (err) { + next(createError(403, err, { + body: body, + type: err.type || 'entity.verify.failed' + })) + return + } + } + + // parse + var str = body + try { + debug('parse body') + str = typeof body !== 'string' && encoding !== null + ? iconv.decode(body, encoding) + : body + req.body = parse(str) + } catch (err) { + next(createError(400, err, { + body: str, + type: err.type || 'entity.parse.failed' + })) + return + } + + next() + }) +} + +/** + * Get the content stream of the request. + * + * @param {object} req + * @param {function} debug + * @param {boolean} [inflate=true] + * @return {object} + * @api private + */ + +function contentstream (req, debug, inflate) { + var encoding = (req.headers['content-encoding'] || 'identity').toLowerCase() + var length = req.headers['content-length'] + var stream + + debug('content-encoding "%s"', encoding) + + if (inflate === false && encoding !== 'identity') { + throw createError(415, 'content encoding unsupported', { + encoding: encoding, + type: 'encoding.unsupported' + }) + } + + switch (encoding) { + case 'deflate': + stream = zlib.createInflate() + debug('inflate body') + req.pipe(stream) + break + case 'gzip': + stream = zlib.createGunzip() + debug('gunzip body') + req.pipe(stream) + break + case 'identity': + stream = req + stream.length = length + break + default: + throw createError(415, 'unsupported content encoding "' + encoding + '"', { + encoding: encoding, + type: 'encoding.unsupported' + }) + } + + return stream +} + +/** + * Dump the contents of a request. + * + * @param {object} req + * @param {function} callback + * @api private + */ + +function dump (req, callback) { + if (onFinished.isFinished(req)) { + callback(null) + } else { + onFinished(req, callback) + req.resume() + } +} diff --git a/node_modules/express/node_modules/body-parser/lib/types/json.js b/node_modules/express/node_modules/body-parser/lib/types/json.js new file mode 100644 index 0000000..59f3f7e --- /dev/null +++ b/node_modules/express/node_modules/body-parser/lib/types/json.js @@ -0,0 +1,247 @@ +/*! + * body-parser + * Copyright(c) 2014 Jonathan Ong + * Copyright(c) 2014-2015 Douglas Christopher Wilson + * MIT Licensed + */ + +'use strict' + +/** + * Module dependencies. + * @private + */ + +var bytes = require('bytes') +var contentType = require('content-type') +var createError = require('http-errors') +var debug = require('debug')('body-parser:json') +var read = require('../read') +var typeis = require('type-is') + +/** + * Module exports. + */ + +module.exports = json + +/** + * RegExp to match the first non-space in a string. + * + * Allowed whitespace is defined in RFC 7159: + * + * ws = *( + * %x20 / ; Space + * %x09 / ; Horizontal tab + * %x0A / ; Line feed or New line + * %x0D ) ; Carriage return + */ + +var FIRST_CHAR_REGEXP = /^[\x20\x09\x0a\x0d]*([^\x20\x09\x0a\x0d])/ // eslint-disable-line no-control-regex + +var JSON_SYNTAX_CHAR = '#' +var JSON_SYNTAX_REGEXP = /#+/g + +/** + * Create a middleware to parse JSON bodies. + * + * @param {object} [options] + * @return {function} + * @public + */ + +function json (options) { + var opts = options || {} + + var limit = typeof opts.limit !== 'number' + ? bytes.parse(opts.limit || '100kb') + : opts.limit + var inflate = opts.inflate !== false + var reviver = opts.reviver + var strict = opts.strict !== false + var type = opts.type || 'application/json' + var verify = opts.verify || false + + if (verify !== false && typeof verify !== 'function') { + throw new TypeError('option verify must be function') + } + + // create the appropriate type checking function + var shouldParse = typeof type !== 'function' + ? typeChecker(type) + : type + + function parse (body) { + if (body.length === 0) { + // special-case empty json body, as it's a common client-side mistake + // TODO: maybe make this configurable or part of "strict" option + return {} + } + + if (strict) { + var first = firstchar(body) + + if (first !== '{' && first !== '[') { + debug('strict violation') + throw createStrictSyntaxError(body, first) + } + } + + try { + debug('parse json') + return JSON.parse(body, reviver) + } catch (e) { + throw normalizeJsonSyntaxError(e, { + message: e.message, + stack: e.stack + }) + } + } + + return function jsonParser (req, res, next) { + if (req._body) { + debug('body already parsed') + next() + return + } + + req.body = req.body || {} + + // skip requests without bodies + if (!typeis.hasBody(req)) { + debug('skip empty body') + next() + return + } + + debug('content-type %j', req.headers['content-type']) + + // determine if request should be parsed + if (!shouldParse(req)) { + debug('skip parsing') + next() + return + } + + // assert charset per RFC 7159 sec 8.1 + var charset = getCharset(req) || 'utf-8' + if (charset.slice(0, 4) !== 'utf-') { + debug('invalid charset') + next(createError(415, 'unsupported charset "' + charset.toUpperCase() + '"', { + charset: charset, + type: 'charset.unsupported' + })) + return + } + + // read + read(req, res, next, parse, debug, { + encoding: charset, + inflate: inflate, + limit: limit, + verify: verify + }) + } +} + +/** + * Create strict violation syntax error matching native error. + * + * @param {string} str + * @param {string} char + * @return {Error} + * @private + */ + +function createStrictSyntaxError (str, char) { + var index = str.indexOf(char) + var partial = '' + + if (index !== -1) { + partial = str.substring(0, index) + JSON_SYNTAX_CHAR + + for (var i = index + 1; i < str.length; i++) { + partial += JSON_SYNTAX_CHAR + } + } + + try { + JSON.parse(partial); /* istanbul ignore next */ throw new SyntaxError('strict violation') + } catch (e) { + return normalizeJsonSyntaxError(e, { + message: e.message.replace(JSON_SYNTAX_REGEXP, function (placeholder) { + return str.substring(index, index + placeholder.length) + }), + stack: e.stack + }) + } +} + +/** + * Get the first non-whitespace character in a string. + * + * @param {string} str + * @return {function} + * @private + */ + +function firstchar (str) { + var match = FIRST_CHAR_REGEXP.exec(str) + + return match + ? match[1] + : undefined +} + +/** + * Get the charset of a request. + * + * @param {object} req + * @api private + */ + +function getCharset (req) { + try { + return (contentType.parse(req).parameters.charset || '').toLowerCase() + } catch (e) { + return undefined + } +} + +/** + * Normalize a SyntaxError for JSON.parse. + * + * @param {SyntaxError} error + * @param {object} obj + * @return {SyntaxError} + */ + +function normalizeJsonSyntaxError (error, obj) { + var keys = Object.getOwnPropertyNames(error) + + for (var i = 0; i < keys.length; i++) { + var key = keys[i] + if (key !== 'stack' && key !== 'message') { + delete error[key] + } + } + + // replace stack before message for Node.js 0.10 and below + error.stack = obj.stack.replace(error.message, obj.message) + error.message = obj.message + + return error +} + +/** + * Get the simple type checker. + * + * @param {string} type + * @return {function} + */ + +function typeChecker (type) { + return function checkType (req) { + return Boolean(typeis(req, type)) + } +} diff --git a/node_modules/express/node_modules/body-parser/lib/types/raw.js b/node_modules/express/node_modules/body-parser/lib/types/raw.js new file mode 100644 index 0000000..f5d1b67 --- /dev/null +++ b/node_modules/express/node_modules/body-parser/lib/types/raw.js @@ -0,0 +1,101 @@ +/*! + * body-parser + * Copyright(c) 2014-2015 Douglas Christopher Wilson + * MIT Licensed + */ + +'use strict' + +/** + * Module dependencies. + */ + +var bytes = require('bytes') +var debug = require('debug')('body-parser:raw') +var read = require('../read') +var typeis = require('type-is') + +/** + * Module exports. + */ + +module.exports = raw + +/** + * Create a middleware to parse raw bodies. + * + * @param {object} [options] + * @return {function} + * @api public + */ + +function raw (options) { + var opts = options || {} + + var inflate = opts.inflate !== false + var limit = typeof opts.limit !== 'number' + ? bytes.parse(opts.limit || '100kb') + : opts.limit + var type = opts.type || 'application/octet-stream' + var verify = opts.verify || false + + if (verify !== false && typeof verify !== 'function') { + throw new TypeError('option verify must be function') + } + + // create the appropriate type checking function + var shouldParse = typeof type !== 'function' + ? typeChecker(type) + : type + + function parse (buf) { + return buf + } + + return function rawParser (req, res, next) { + if (req._body) { + debug('body already parsed') + next() + return + } + + req.body = req.body || {} + + // skip requests without bodies + if (!typeis.hasBody(req)) { + debug('skip empty body') + next() + return + } + + debug('content-type %j', req.headers['content-type']) + + // determine if request should be parsed + if (!shouldParse(req)) { + debug('skip parsing') + next() + return + } + + // read + read(req, res, next, parse, debug, { + encoding: null, + inflate: inflate, + limit: limit, + verify: verify + }) + } +} + +/** + * Get the simple type checker. + * + * @param {string} type + * @return {function} + */ + +function typeChecker (type) { + return function checkType (req) { + return Boolean(typeis(req, type)) + } +} diff --git a/node_modules/express/node_modules/body-parser/lib/types/text.js b/node_modules/express/node_modules/body-parser/lib/types/text.js new file mode 100644 index 0000000..083a009 --- /dev/null +++ b/node_modules/express/node_modules/body-parser/lib/types/text.js @@ -0,0 +1,121 @@ +/*! + * body-parser + * Copyright(c) 2014-2015 Douglas Christopher Wilson + * MIT Licensed + */ + +'use strict' + +/** + * Module dependencies. + */ + +var bytes = require('bytes') +var contentType = require('content-type') +var debug = require('debug')('body-parser:text') +var read = require('../read') +var typeis = require('type-is') + +/** + * Module exports. + */ + +module.exports = text + +/** + * Create a middleware to parse text bodies. + * + * @param {object} [options] + * @return {function} + * @api public + */ + +function text (options) { + var opts = options || {} + + var defaultCharset = opts.defaultCharset || 'utf-8' + var inflate = opts.inflate !== false + var limit = typeof opts.limit !== 'number' + ? bytes.parse(opts.limit || '100kb') + : opts.limit + var type = opts.type || 'text/plain' + var verify = opts.verify || false + + if (verify !== false && typeof verify !== 'function') { + throw new TypeError('option verify must be function') + } + + // create the appropriate type checking function + var shouldParse = typeof type !== 'function' + ? typeChecker(type) + : type + + function parse (buf) { + return buf + } + + return function textParser (req, res, next) { + if (req._body) { + debug('body already parsed') + next() + return + } + + req.body = req.body || {} + + // skip requests without bodies + if (!typeis.hasBody(req)) { + debug('skip empty body') + next() + return + } + + debug('content-type %j', req.headers['content-type']) + + // determine if request should be parsed + if (!shouldParse(req)) { + debug('skip parsing') + next() + return + } + + // get charset + var charset = getCharset(req) || defaultCharset + + // read + read(req, res, next, parse, debug, { + encoding: charset, + inflate: inflate, + limit: limit, + verify: verify + }) + } +} + +/** + * Get the charset of a request. + * + * @param {object} req + * @api private + */ + +function getCharset (req) { + try { + return (contentType.parse(req).parameters.charset || '').toLowerCase() + } catch (e) { + return undefined + } +} + +/** + * Get the simple type checker. + * + * @param {string} type + * @return {function} + */ + +function typeChecker (type) { + return function checkType (req) { + return Boolean(typeis(req, type)) + } +} diff --git a/node_modules/express/node_modules/body-parser/lib/types/urlencoded.js b/node_modules/express/node_modules/body-parser/lib/types/urlencoded.js new file mode 100644 index 0000000..2bd4485 --- /dev/null +++ b/node_modules/express/node_modules/body-parser/lib/types/urlencoded.js @@ -0,0 +1,307 @@ +/*! + * body-parser + * Copyright(c) 2014 Jonathan Ong + * Copyright(c) 2014-2015 Douglas Christopher Wilson + * MIT Licensed + */ + +'use strict' + +/** + * Module dependencies. + * @private + */ + +var bytes = require('bytes') +var contentType = require('content-type') +var createError = require('http-errors') +var debug = require('debug')('body-parser:urlencoded') +var deprecate = require('depd')('body-parser') +var read = require('../read') +var typeis = require('type-is') + +/** + * Module exports. + */ + +module.exports = urlencoded + +/** + * Cache of parser modules. + */ + +var parsers = Object.create(null) + +/** + * Create a middleware to parse urlencoded bodies. + * + * @param {object} [options] + * @return {function} + * @public + */ + +function urlencoded (options) { + var opts = options || {} + + // notice because option default will flip in next major + if (opts.extended === undefined) { + deprecate('undefined extended: provide extended option') + } + + var extended = opts.extended !== false + var inflate = opts.inflate !== false + var limit = typeof opts.limit !== 'number' + ? bytes.parse(opts.limit || '100kb') + : opts.limit + var type = opts.type || 'application/x-www-form-urlencoded' + var verify = opts.verify || false + var depth = typeof opts.depth !== 'number' + ? Number(opts.depth || 32) + : opts.depth + + if (verify !== false && typeof verify !== 'function') { + throw new TypeError('option verify must be function') + } + + // create the appropriate query parser + var queryparse = extended + ? extendedparser(opts) + : simpleparser(opts) + + // create the appropriate type checking function + var shouldParse = typeof type !== 'function' + ? typeChecker(type) + : type + + function parse (body) { + return body.length + ? queryparse(body) + : {} + } + + return function urlencodedParser (req, res, next) { + if (req._body) { + debug('body already parsed') + next() + return + } + + req.body = req.body || {} + + // skip requests without bodies + if (!typeis.hasBody(req)) { + debug('skip empty body') + next() + return + } + + debug('content-type %j', req.headers['content-type']) + + // determine if request should be parsed + if (!shouldParse(req)) { + debug('skip parsing') + next() + return + } + + // assert charset + var charset = getCharset(req) || 'utf-8' + if (charset !== 'utf-8') { + debug('invalid charset') + next(createError(415, 'unsupported charset "' + charset.toUpperCase() + '"', { + charset: charset, + type: 'charset.unsupported' + })) + return + } + + // read + read(req, res, next, parse, debug, { + debug: debug, + encoding: charset, + inflate: inflate, + limit: limit, + verify: verify, + depth: depth + }) + } +} + +/** + * Get the extended query parser. + * + * @param {object} options + */ + +function extendedparser (options) { + var parameterLimit = options.parameterLimit !== undefined + ? options.parameterLimit + : 1000 + + var depth = typeof options.depth !== 'number' + ? Number(options.depth || 32) + : options.depth + var parse = parser('qs') + + if (isNaN(parameterLimit) || parameterLimit < 1) { + throw new TypeError('option parameterLimit must be a positive number') + } + + if (isNaN(depth) || depth < 0) { + throw new TypeError('option depth must be a zero or a positive number') + } + + if (isFinite(parameterLimit)) { + parameterLimit = parameterLimit | 0 + } + + return function queryparse (body) { + var paramCount = parameterCount(body, parameterLimit) + + if (paramCount === undefined) { + debug('too many parameters') + throw createError(413, 'too many parameters', { + type: 'parameters.too.many' + }) + } + + var arrayLimit = Math.max(100, paramCount) + + debug('parse extended urlencoding') + try { + return parse(body, { + allowPrototypes: true, + arrayLimit: arrayLimit, + depth: depth, + strictDepth: true, + parameterLimit: parameterLimit + }) + } catch (err) { + if (err instanceof RangeError) { + throw createError(400, 'The input exceeded the depth', { + type: 'querystring.parse.rangeError' + }) + } else { + throw err + } + } + } +} + +/** + * Get the charset of a request. + * + * @param {object} req + * @api private + */ + +function getCharset (req) { + try { + return (contentType.parse(req).parameters.charset || '').toLowerCase() + } catch (e) { + return undefined + } +} + +/** + * Count the number of parameters, stopping once limit reached + * + * @param {string} body + * @param {number} limit + * @api private + */ + +function parameterCount (body, limit) { + var count = 0 + var index = 0 + + while ((index = body.indexOf('&', index)) !== -1) { + count++ + index++ + + if (count === limit) { + return undefined + } + } + + return count +} + +/** + * Get parser for module name dynamically. + * + * @param {string} name + * @return {function} + * @api private + */ + +function parser (name) { + var mod = parsers[name] + + if (mod !== undefined) { + return mod.parse + } + + // this uses a switch for static require analysis + switch (name) { + case 'qs': + mod = require('qs') + break + case 'querystring': + mod = require('querystring') + break + } + + // store to prevent invoking require() + parsers[name] = mod + + return mod.parse +} + +/** + * Get the simple query parser. + * + * @param {object} options + */ + +function simpleparser (options) { + var parameterLimit = options.parameterLimit !== undefined + ? options.parameterLimit + : 1000 + var parse = parser('querystring') + + if (isNaN(parameterLimit) || parameterLimit < 1) { + throw new TypeError('option parameterLimit must be a positive number') + } + + if (isFinite(parameterLimit)) { + parameterLimit = parameterLimit | 0 + } + + return function queryparse (body) { + var paramCount = parameterCount(body, parameterLimit) + + if (paramCount === undefined) { + debug('too many parameters') + throw createError(413, 'too many parameters', { + type: 'parameters.too.many' + }) + } + + debug('parse urlencoding') + return parse(body, undefined, undefined, { maxKeys: parameterLimit }) + } +} + +/** + * Get the simple type checker. + * + * @param {string} type + * @return {function} + */ + +function typeChecker (type) { + return function checkType (req) { + return Boolean(typeis(req, type)) + } +} diff --git a/node_modules/express/node_modules/body-parser/package.json b/node_modules/express/node_modules/body-parser/package.json new file mode 100644 index 0000000..3c9926f --- /dev/null +++ b/node_modules/express/node_modules/body-parser/package.json @@ -0,0 +1,56 @@ +{ + "name": "body-parser", + "description": "Node.js body parsing middleware", + "version": "1.20.3", + "contributors": [ + "Douglas Christopher Wilson <doug@somethingdoug.com>", + "Jonathan Ong <me@jongleberry.com> (http://jongleberry.com)" + ], + "license": "MIT", + "repository": "expressjs/body-parser", + "dependencies": { + "bytes": "3.1.2", + "content-type": "~1.0.5", + "debug": "2.6.9", + "depd": "2.0.0", + "destroy": "1.2.0", + "http-errors": "2.0.0", + "iconv-lite": "0.4.24", + "on-finished": "2.4.1", + "qs": "6.13.0", + "raw-body": "2.5.2", + "type-is": "~1.6.18", + "unpipe": "1.0.0" + }, + "devDependencies": { + "eslint": "8.34.0", + "eslint-config-standard": "14.1.1", + "eslint-plugin-import": "2.27.5", + "eslint-plugin-markdown": "3.0.0", + "eslint-plugin-node": "11.1.0", + "eslint-plugin-promise": "6.1.1", + "eslint-plugin-standard": "4.1.0", + "methods": "1.1.2", + "mocha": "10.2.0", + "nyc": "15.1.0", + "safe-buffer": "5.2.1", + "supertest": "6.3.3" + }, + "files": [ + "lib/", + "LICENSE", + "HISTORY.md", + "SECURITY.md", + "index.js" + ], + "engines": { + "node": ">= 0.8", + "npm": "1.2.8000 || >= 1.4.16" + }, + "scripts": { + "lint": "eslint .", + "test": "mocha --require test/support/env --reporter spec --check-leaks --bail test/", + "test-ci": "nyc --reporter=lcov --reporter=text npm test", + "test-cov": "nyc --reporter=html --reporter=text npm test" + } +} diff --git a/node_modules/whatwg-encoding/node_modules/iconv-lite/encodings/dbcs-codec.js b/node_modules/express/node_modules/iconv-lite/encodings/dbcs-codec.js similarity index 82% rename from node_modules/whatwg-encoding/node_modules/iconv-lite/encodings/dbcs-codec.js rename to node_modules/express/node_modules/iconv-lite/encodings/dbcs-codec.js index fa83917..1fe3e16 100644 --- a/node_modules/whatwg-encoding/node_modules/iconv-lite/encodings/dbcs-codec.js +++ b/node_modules/express/node_modules/iconv-lite/encodings/dbcs-codec.js @@ -49,48 +49,6 @@ function DBCSCodec(codecOptions, iconv) { for (var i = 0; i < mappingTable.length; i++) this._addDecodeChunk(mappingTable[i]); - // Load & create GB18030 tables when needed. - if (typeof codecOptions.gb18030 === 'function') { - this.gb18030 = codecOptions.gb18030(); // Load GB18030 ranges. - - // Add GB18030 common decode nodes. - var commonThirdByteNodeIdx = this.decodeTables.length; - this.decodeTables.push(UNASSIGNED_NODE.slice(0)); - - var commonFourthByteNodeIdx = this.decodeTables.length; - this.decodeTables.push(UNASSIGNED_NODE.slice(0)); - - // Fill out the tree - var firstByteNode = this.decodeTables[0]; - for (var i = 0x81; i <= 0xFE; i++) { - var secondByteNode = this.decodeTables[NODE_START - firstByteNode[i]]; - for (var j = 0x30; j <= 0x39; j++) { - if (secondByteNode[j] === UNASSIGNED) { - secondByteNode[j] = NODE_START - commonThirdByteNodeIdx; - } else if (secondByteNode[j] > NODE_START) { - throw new Error("gb18030 decode tables conflict at byte 2"); - } - - var thirdByteNode = this.decodeTables[NODE_START - secondByteNode[j]]; - for (var k = 0x81; k <= 0xFE; k++) { - if (thirdByteNode[k] === UNASSIGNED) { - thirdByteNode[k] = NODE_START - commonFourthByteNodeIdx; - } else if (thirdByteNode[k] === NODE_START - commonFourthByteNodeIdx) { - continue; - } else if (thirdByteNode[k] > NODE_START) { - throw new Error("gb18030 decode tables conflict at byte 3"); - } - - var fourthByteNode = this.decodeTables[NODE_START - thirdByteNode[k]]; - for (var l = 0x30; l <= 0x39; l++) { - if (fourthByteNode[l] === UNASSIGNED) - fourthByteNode[l] = GB18030_CODE; - } - } - } - } - } - this.defaultCharUnicode = iconv.defaultCharUnicode; @@ -134,6 +92,30 @@ function DBCSCodec(codecOptions, iconv) { this.defCharSB = this.encodeTable[0][iconv.defaultCharSingleByte.charCodeAt(0)]; if (this.defCharSB === UNASSIGNED) this.defCharSB = this.encodeTable[0]['?']; if (this.defCharSB === UNASSIGNED) this.defCharSB = "?".charCodeAt(0); + + + // Load & create GB18030 tables when needed. + if (typeof codecOptions.gb18030 === 'function') { + this.gb18030 = codecOptions.gb18030(); // Load GB18030 ranges. + + // Add GB18030 decode tables. + var thirdByteNodeIdx = this.decodeTables.length; + var thirdByteNode = this.decodeTables[thirdByteNodeIdx] = UNASSIGNED_NODE.slice(0); + + var fourthByteNodeIdx = this.decodeTables.length; + var fourthByteNode = this.decodeTables[fourthByteNodeIdx] = UNASSIGNED_NODE.slice(0); + + for (var i = 0x81; i <= 0xFE; i++) { + var secondByteNodeIdx = NODE_START - this.decodeTables[0][i]; + var secondByteNode = this.decodeTables[secondByteNodeIdx]; + for (var j = 0x30; j <= 0x39; j++) + secondByteNode[j] = NODE_START - thirdByteNodeIdx; + } + for (var i = 0x81; i <= 0xFE; i++) + thirdByteNode[i] = NODE_START - fourthByteNodeIdx; + for (var i = 0x30; i <= 0x39; i++) + fourthByteNode[i] = GB18030_CODE + } } DBCSCodec.prototype.encoder = DBCSEncoder; @@ -142,7 +124,7 @@ DBCSCodec.prototype.decoder = DBCSDecoder; // Decoder helpers DBCSCodec.prototype._getDecodeTrieNode = function(addr) { var bytes = []; - for (; addr > 0; addr >>>= 8) + for (; addr > 0; addr >>= 8) bytes.push(addr & 0xFF); if (bytes.length == 0) bytes.push(0); @@ -267,32 +249,19 @@ DBCSCodec.prototype._setEncodeSequence = function(seq, dbcsCode) { DBCSCodec.prototype._fillEncodeTable = function(nodeIdx, prefix, skipEncodeChars) { var node = this.decodeTables[nodeIdx]; - var hasValues = false; - var subNodeEmpty = {}; for (var i = 0; i < 0x100; i++) { var uCode = node[i]; var mbCode = prefix + i; if (skipEncodeChars[mbCode]) continue; - if (uCode >= 0) { + if (uCode >= 0) this._setEncodeChar(uCode, mbCode); - hasValues = true; - } else if (uCode <= NODE_START) { - var subNodeIdx = NODE_START - uCode; - if (!subNodeEmpty[subNodeIdx]) { // Skip empty subtrees (they are too large in gb18030). - var newPrefix = (mbCode << 8) >>> 0; // NOTE: '>>> 0' keeps 32-bit num positive. - if (this._fillEncodeTable(subNodeIdx, newPrefix, skipEncodeChars)) - hasValues = true; - else - subNodeEmpty[subNodeIdx] = true; - } - } else if (uCode <= SEQ_START) { + else if (uCode <= NODE_START) + this._fillEncodeTable(NODE_START - uCode, mbCode << 8, skipEncodeChars); + else if (uCode <= SEQ_START) this._setEncodeSequence(this.decodeTableSeq[SEQ_START - uCode], mbCode); - hasValues = true; - } } - return hasValues; } @@ -419,15 +388,10 @@ DBCSEncoder.prototype.write = function(str) { newBuf[j++] = dbcsCode >> 8; // high byte newBuf[j++] = dbcsCode & 0xFF; // low byte } - else if (dbcsCode < 0x1000000) { + else { newBuf[j++] = dbcsCode >> 16; newBuf[j++] = (dbcsCode >> 8) & 0xFF; newBuf[j++] = dbcsCode & 0xFF; - } else { - newBuf[j++] = dbcsCode >>> 24; - newBuf[j++] = (dbcsCode >>> 16) & 0xFF; - newBuf[j++] = (dbcsCode >>> 8) & 0xFF; - newBuf[j++] = dbcsCode & 0xFF; } } @@ -476,7 +440,7 @@ DBCSEncoder.prototype.findIdx = findIdx; function DBCSDecoder(options, codec) { // Decoder state this.nodeIdx = 0; - this.prevBytes = []; + this.prevBuf = Buffer.alloc(0); // Static data this.decodeTables = codec.decodeTables; @@ -488,12 +452,15 @@ function DBCSDecoder(options, codec) { DBCSDecoder.prototype.write = function(buf) { var newBuf = Buffer.alloc(buf.length*2), nodeIdx = this.nodeIdx, - prevBytes = this.prevBytes, prevOffset = this.prevBytes.length, - seqStart = -this.prevBytes.length, // idx of the start of current parsed sequence. + prevBuf = this.prevBuf, prevBufOffset = this.prevBuf.length, + seqStart = -this.prevBuf.length, // idx of the start of current parsed sequence. uCode; + if (prevBufOffset > 0) // Make prev buf overlap a little to make it easier to slice later. + prevBuf = Buffer.concat([prevBuf, buf.slice(0, 10)]); + for (var i = 0, j = 0; i < buf.length; i++) { - var curByte = (i >= 0) ? buf[i] : prevBytes[i + prevOffset]; + var curByte = (i >= 0) ? buf[i] : prevBuf[i + prevBufOffset]; // Lookup in current trie node. var uCode = this.decodeTables[nodeIdx][curByte]; @@ -503,18 +470,13 @@ DBCSDecoder.prototype.write = function(buf) { } else if (uCode === UNASSIGNED) { // Unknown char. // TODO: Callback with seq. + //var curSeq = (seqStart >= 0) ? buf.slice(seqStart, i+1) : prevBuf.slice(seqStart + prevBufOffset, i+1 + prevBufOffset); + i = seqStart; // Try to parse again, after skipping first byte of the sequence ('i' will be incremented by 'for' cycle). uCode = this.defaultCharUnicode.charCodeAt(0); - i = seqStart; // Skip one byte ('i' will be incremented by the for loop) and try to parse again. } else if (uCode === GB18030_CODE) { - if (i >= 3) { - var ptr = (buf[i-3]-0x81)*12600 + (buf[i-2]-0x30)*1260 + (buf[i-1]-0x81)*10 + (curByte-0x30); - } else { - var ptr = (prevBytes[i-3+prevOffset]-0x81)*12600 + - (((i-2 >= 0) ? buf[i-2] : prevBytes[i-2+prevOffset])-0x30)*1260 + - (((i-1 >= 0) ? buf[i-1] : prevBytes[i-1+prevOffset])-0x81)*10 + - (curByte-0x30); - } + var curSeq = (seqStart >= 0) ? buf.slice(seqStart, i+1) : prevBuf.slice(seqStart + prevBufOffset, i+1 + prevBufOffset); + var ptr = (curSeq[0]-0x81)*12600 + (curSeq[1]-0x30)*1260 + (curSeq[2]-0x81)*10 + (curSeq[3]-0x30); var idx = findIdx(this.gb18030.gbChars, ptr); uCode = this.gb18030.uChars[idx] + ptr - this.gb18030.gbChars[idx]; } @@ -535,13 +497,13 @@ DBCSDecoder.prototype.write = function(buf) { throw new Error("iconv-lite internal error: invalid decoding table value " + uCode + " at " + nodeIdx + "/" + curByte); // Write the character to buffer, handling higher planes using surrogate pair. - if (uCode >= 0x10000) { + if (uCode > 0xFFFF) { uCode -= 0x10000; - var uCodeLead = 0xD800 | (uCode >> 10); + var uCodeLead = 0xD800 + Math.floor(uCode / 0x400); newBuf[j++] = uCodeLead & 0xFF; newBuf[j++] = uCodeLead >> 8; - uCode = 0xDC00 | (uCode & 0x3FF); + uCode = 0xDC00 + uCode % 0x400; } newBuf[j++] = uCode & 0xFF; newBuf[j++] = uCode >> 8; @@ -551,10 +513,7 @@ DBCSDecoder.prototype.write = function(buf) { } this.nodeIdx = nodeIdx; - this.prevBytes = (seqStart >= 0) - ? Array.prototype.slice.call(buf, seqStart) - : prevBytes.slice(seqStart + prevOffset).concat(Array.prototype.slice.call(buf)); - + this.prevBuf = (seqStart >= 0) ? buf.slice(seqStart) : prevBuf.slice(seqStart + prevBufOffset); return newBuf.slice(0, j).toString('ucs2'); } @@ -562,19 +521,18 @@ DBCSDecoder.prototype.end = function() { var ret = ''; // Try to parse all remaining chars. - while (this.prevBytes.length > 0) { + while (this.prevBuf.length > 0) { // Skip 1 character in the buffer. ret += this.defaultCharUnicode; - var bytesArr = this.prevBytes.slice(1); + var buf = this.prevBuf.slice(1); // Parse remaining as usual. - this.prevBytes = []; + this.prevBuf = Buffer.alloc(0); this.nodeIdx = 0; - if (bytesArr.length > 0) - ret += this.write(bytesArr); + if (buf.length > 0) + ret += this.write(buf); } - this.prevBytes = []; this.nodeIdx = 0; return ret; } @@ -586,7 +544,7 @@ function findIdx(table, val) { var l = 0, r = table.length; while (l < r-1) { // always table[l] <= val < table[r] - var mid = l + ((r-l+1) >> 1); + var mid = l + Math.floor((r-l+1)/2); if (table[mid] <= val) l = mid; else diff --git a/node_modules/encoding-sniffer/node_modules/iconv-lite/encodings/dbcs-data.js b/node_modules/express/node_modules/iconv-lite/encodings/dbcs-data.js similarity index 87% rename from node_modules/encoding-sniffer/node_modules/iconv-lite/encodings/dbcs-data.js rename to node_modules/express/node_modules/iconv-lite/encodings/dbcs-data.js index 0d17e58..4b61914 100644 --- a/node_modules/encoding-sniffer/node_modules/iconv-lite/encodings/dbcs-data.js +++ b/node_modules/express/node_modules/iconv-lite/encodings/dbcs-data.js @@ -167,19 +167,7 @@ module.exports = { 'big5hkscs': { type: '_dbcs', table: function() { return require('./tables/cp950.json').concat(require('./tables/big5-added.json')) }, - encodeSkipVals: [ - // Although Encoding Standard says we should avoid encoding to HKSCS area (See Step 1 of - // https://encoding.spec.whatwg.org/#index-big5-pointer), we still do it to increase compatibility with ICU. - // But if a single unicode point can be encoded both as HKSCS and regular Big5, we prefer the latter. - 0x8e69, 0x8e6f, 0x8e7e, 0x8eab, 0x8eb4, 0x8ecd, 0x8ed0, 0x8f57, 0x8f69, 0x8f6e, 0x8fcb, 0x8ffe, - 0x906d, 0x907a, 0x90c4, 0x90dc, 0x90f1, 0x91bf, 0x92af, 0x92b0, 0x92b1, 0x92b2, 0x92d1, 0x9447, 0x94ca, - 0x95d9, 0x96fc, 0x9975, 0x9b76, 0x9b78, 0x9b7b, 0x9bc6, 0x9bde, 0x9bec, 0x9bf6, 0x9c42, 0x9c53, 0x9c62, - 0x9c68, 0x9c6b, 0x9c77, 0x9cbc, 0x9cbd, 0x9cd0, 0x9d57, 0x9d5a, 0x9dc4, 0x9def, 0x9dfb, 0x9ea9, 0x9eef, - 0x9efd, 0x9f60, 0x9fcb, 0xa077, 0xa0dc, 0xa0df, 0x8fcc, 0x92c8, 0x9644, 0x96ed, - - // Step 2 of https://encoding.spec.whatwg.org/#index-big5-pointer: Use last pointer for U+2550, U+255E, U+2561, U+256A, U+5341, or U+5345 - 0xa2a4, 0xa2a5, 0xa2a7, 0xa2a6, 0xa2cc, 0xa2ce, - ], + encodeSkipVals: [0xa2cc], }, 'cnbig5': 'big5hkscs', diff --git a/node_modules/whatwg-encoding/node_modules/iconv-lite/encodings/index.js b/node_modules/express/node_modules/iconv-lite/encodings/index.js similarity index 95% rename from node_modules/whatwg-encoding/node_modules/iconv-lite/encodings/index.js rename to node_modules/express/node_modules/iconv-lite/encodings/index.js index d95c244..e304003 100644 --- a/node_modules/whatwg-encoding/node_modules/iconv-lite/encodings/index.js +++ b/node_modules/express/node_modules/iconv-lite/encodings/index.js @@ -4,7 +4,6 @@ // We support Browserify by skipping automatic module discovery and requiring modules directly. var modules = [ require("./internal"), - require("./utf32"), require("./utf16"), require("./utf7"), require("./sbcs-codec"), @@ -14,7 +13,7 @@ var modules = [ require("./dbcs-data"), ]; -// Put all encoding/alias/codec definitions to single object and export it. +// Put all encoding/alias/codec definitions to single object and export it. for (var i = 0; i < modules.length; i++) { var module = modules[i]; for (var enc in module) diff --git a/node_modules/whatwg-encoding/node_modules/iconv-lite/encodings/internal.js b/node_modules/express/node_modules/iconv-lite/encodings/internal.js similarity index 95% rename from node_modules/whatwg-encoding/node_modules/iconv-lite/encodings/internal.js rename to node_modules/express/node_modules/iconv-lite/encodings/internal.js index dc1074f..05ce38b 100644 --- a/node_modules/whatwg-encoding/node_modules/iconv-lite/encodings/internal.js +++ b/node_modules/express/node_modules/iconv-lite/encodings/internal.js @@ -53,20 +53,10 @@ if (!StringDecoder.prototype.end) // Node v0.8 doesn't have this method. function InternalDecoder(options, codec) { - this.decoder = new StringDecoder(codec.enc); + StringDecoder.call(this, codec.enc); } -InternalDecoder.prototype.write = function(buf) { - if (!Buffer.isBuffer(buf)) { - buf = Buffer.from(buf); - } - - return this.decoder.write(buf); -} - -InternalDecoder.prototype.end = function() { - return this.decoder.end(); -} +InternalDecoder.prototype = StringDecoder.prototype; //------------------------------------------------------------------------------ diff --git a/node_modules/encoding-sniffer/node_modules/iconv-lite/encodings/sbcs-codec.js b/node_modules/express/node_modules/iconv-lite/encodings/sbcs-codec.js similarity index 100% rename from node_modules/encoding-sniffer/node_modules/iconv-lite/encodings/sbcs-codec.js rename to node_modules/express/node_modules/iconv-lite/encodings/sbcs-codec.js diff --git a/node_modules/encoding-sniffer/node_modules/iconv-lite/encodings/sbcs-data-generated.js b/node_modules/express/node_modules/iconv-lite/encodings/sbcs-data-generated.js similarity index 100% rename from node_modules/encoding-sniffer/node_modules/iconv-lite/encodings/sbcs-data-generated.js rename to node_modules/express/node_modules/iconv-lite/encodings/sbcs-data-generated.js diff --git a/node_modules/encoding-sniffer/node_modules/iconv-lite/encodings/sbcs-data.js b/node_modules/express/node_modules/iconv-lite/encodings/sbcs-data.js similarity index 91% rename from node_modules/encoding-sniffer/node_modules/iconv-lite/encodings/sbcs-data.js rename to node_modules/express/node_modules/iconv-lite/encodings/sbcs-data.js index 066f904..fdb81a3 100644 --- a/node_modules/encoding-sniffer/node_modules/iconv-lite/encodings/sbcs-data.js +++ b/node_modules/express/node_modules/iconv-lite/encodings/sbcs-data.js @@ -22,11 +22,6 @@ module.exports = { "chars": "АБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыьэюя└┴┬├─┼╣║╚╔╩╦╠═╬┐░▒▓│┤№§╗╝┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ " }, - "cp720": { - "type": "_sbcs", - "chars": "\x80\x81éâ\x84à\x86çêëèïî\x8d\x8e\x8f\x90\u0651\u0652ô¤ـûùءآأؤ£إئابةتثجحخدذرزسشص«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀ضطظعغفµقكلمنهوىي≡\u064b\u064c\u064d\u064e\u064f\u0650≈°∙·√ⁿ²■\u00a0" - }, - // Aliases of generated encodings. "ascii8bit": "ascii", "usascii": "ascii", diff --git a/node_modules/encoding-sniffer/node_modules/iconv-lite/encodings/tables/big5-added.json b/node_modules/express/node_modules/iconv-lite/encodings/tables/big5-added.json similarity index 100% rename from node_modules/encoding-sniffer/node_modules/iconv-lite/encodings/tables/big5-added.json rename to node_modules/express/node_modules/iconv-lite/encodings/tables/big5-added.json diff --git a/node_modules/encoding-sniffer/node_modules/iconv-lite/encodings/tables/cp936.json b/node_modules/express/node_modules/iconv-lite/encodings/tables/cp936.json similarity index 100% rename from node_modules/encoding-sniffer/node_modules/iconv-lite/encodings/tables/cp936.json rename to node_modules/express/node_modules/iconv-lite/encodings/tables/cp936.json diff --git a/node_modules/encoding-sniffer/node_modules/iconv-lite/encodings/tables/cp949.json b/node_modules/express/node_modules/iconv-lite/encodings/tables/cp949.json similarity index 100% rename from node_modules/encoding-sniffer/node_modules/iconv-lite/encodings/tables/cp949.json rename to node_modules/express/node_modules/iconv-lite/encodings/tables/cp949.json diff --git a/node_modules/encoding-sniffer/node_modules/iconv-lite/encodings/tables/cp950.json b/node_modules/express/node_modules/iconv-lite/encodings/tables/cp950.json similarity index 100% rename from node_modules/encoding-sniffer/node_modules/iconv-lite/encodings/tables/cp950.json rename to node_modules/express/node_modules/iconv-lite/encodings/tables/cp950.json diff --git a/node_modules/encoding-sniffer/node_modules/iconv-lite/encodings/tables/eucjp.json b/node_modules/express/node_modules/iconv-lite/encodings/tables/eucjp.json similarity index 100% rename from node_modules/encoding-sniffer/node_modules/iconv-lite/encodings/tables/eucjp.json rename to node_modules/express/node_modules/iconv-lite/encodings/tables/eucjp.json diff --git a/node_modules/encoding-sniffer/node_modules/iconv-lite/encodings/tables/gb18030-ranges.json b/node_modules/express/node_modules/iconv-lite/encodings/tables/gb18030-ranges.json similarity index 100% rename from node_modules/encoding-sniffer/node_modules/iconv-lite/encodings/tables/gb18030-ranges.json rename to node_modules/express/node_modules/iconv-lite/encodings/tables/gb18030-ranges.json diff --git a/node_modules/whatwg-encoding/node_modules/iconv-lite/encodings/tables/gbk-added.json b/node_modules/express/node_modules/iconv-lite/encodings/tables/gbk-added.json similarity index 93% rename from node_modules/whatwg-encoding/node_modules/iconv-lite/encodings/tables/gbk-added.json rename to node_modules/express/node_modules/iconv-lite/encodings/tables/gbk-added.json index b742e36..8abfa9f 100644 --- a/node_modules/whatwg-encoding/node_modules/iconv-lite/encodings/tables/gbk-added.json +++ b/node_modules/express/node_modules/iconv-lite/encodings/tables/gbk-added.json @@ -27,7 +27,7 @@ ["a7c2","",14], ["a7f2","",12], ["a896","",10], -["a8bc","ḿ"], +["a8bc",""], ["a8bf","ǹ"], ["a8c1",""], ["a8ea","",20], @@ -51,6 +51,5 @@ ["fca1","",93], ["fda1","",93], ["fe50","⺁⺄㑳㑇⺈⺋㖞㘚㘎⺌⺗㥮㤘㧏㧟㩳㧐㭎㱮㳠⺧⺪䁖䅟⺮䌷⺳⺶⺷䎱䎬⺻䏝䓖䙡䙌"], -["fe80","䜣䜩䝼䞍⻊䥇䥺䥽䦂䦃䦅䦆䦟䦛䦷䦶䲣䲟䲠䲡䱷䲢䴓",6,"䶮",93], -["8135f437",""] +["fe80","䜣䜩䝼䞍⻊䥇䥺䥽䦂䦃䦅䦆䦟䦛䦷䦶䲣䲟䲠䲡䱷䲢䴓",6,"䶮",93] ] diff --git a/node_modules/encoding-sniffer/node_modules/iconv-lite/encodings/tables/shiftjis.json b/node_modules/express/node_modules/iconv-lite/encodings/tables/shiftjis.json similarity index 100% rename from node_modules/encoding-sniffer/node_modules/iconv-lite/encodings/tables/shiftjis.json rename to node_modules/express/node_modules/iconv-lite/encodings/tables/shiftjis.json diff --git a/node_modules/encoding-sniffer/node_modules/iconv-lite/encodings/utf16.js b/node_modules/express/node_modules/iconv-lite/encodings/utf16.js similarity index 57% rename from node_modules/encoding-sniffer/node_modules/iconv-lite/encodings/utf16.js rename to node_modules/express/node_modules/iconv-lite/encodings/utf16.js index 97d0669..54765ae 100644 --- a/node_modules/encoding-sniffer/node_modules/iconv-lite/encodings/utf16.js +++ b/node_modules/express/node_modules/iconv-lite/encodings/utf16.js @@ -61,7 +61,6 @@ Utf16BEDecoder.prototype.write = function(buf) { } Utf16BEDecoder.prototype.end = function() { - this.overflowByte = -1; } @@ -104,8 +103,8 @@ Utf16Encoder.prototype.end = function() { function Utf16Decoder(options, codec) { this.decoder = null; - this.initialBufs = []; - this.initialBufsLen = 0; + this.initialBytes = []; + this.initialBytesLen = 0; this.options = options || {}; this.iconv = codec.iconv; @@ -114,22 +113,17 @@ function Utf16Decoder(options, codec) { Utf16Decoder.prototype.write = function(buf) { if (!this.decoder) { // Codec is not chosen yet. Accumulate initial bytes. - this.initialBufs.push(buf); - this.initialBufsLen += buf.length; + this.initialBytes.push(buf); + this.initialBytesLen += buf.length; - if (this.initialBufsLen < 16) // We need more bytes to use space heuristic (see below) + if (this.initialBytesLen < 16) // We need more bytes to use space heuristic (see below) return ''; // We have enough bytes -> detect endianness. - var encoding = detectEncoding(this.initialBufs, this.options.defaultEncoding); + var buf = Buffer.concat(this.initialBytes), + encoding = detectEncoding(buf, this.options.defaultEncoding); this.decoder = this.iconv.getDecoder(encoding, this.options); - - var resStr = ''; - for (var i = 0; i < this.initialBufs.length; i++) - resStr += this.decoder.write(this.initialBufs[i]); - - this.initialBufs.length = this.initialBufsLen = 0; - return resStr; + this.initialBytes.length = this.initialBytesLen = 0; } return this.decoder.write(buf); @@ -137,61 +131,47 @@ Utf16Decoder.prototype.write = function(buf) { Utf16Decoder.prototype.end = function() { if (!this.decoder) { - var encoding = detectEncoding(this.initialBufs, this.options.defaultEncoding); + var buf = Buffer.concat(this.initialBytes), + encoding = detectEncoding(buf, this.options.defaultEncoding); this.decoder = this.iconv.getDecoder(encoding, this.options); - var resStr = ''; - for (var i = 0; i < this.initialBufs.length; i++) - resStr += this.decoder.write(this.initialBufs[i]); + var res = this.decoder.write(buf), + trail = this.decoder.end(); - var trail = this.decoder.end(); - if (trail) - resStr += trail; - - this.initialBufs.length = this.initialBufsLen = 0; - return resStr; + return trail ? (res + trail) : res; } return this.decoder.end(); } -function detectEncoding(bufs, defaultEncoding) { - var b = []; - var charsProcessed = 0; - var asciiCharsLE = 0, asciiCharsBE = 0; // Number of ASCII chars when decoded as LE or BE. +function detectEncoding(buf, defaultEncoding) { + var enc = defaultEncoding || 'utf-16le'; - outer_loop: - for (var i = 0; i < bufs.length; i++) { - var buf = bufs[i]; - for (var j = 0; j < buf.length; j++) { - b.push(buf[j]); - if (b.length === 2) { - if (charsProcessed === 0) { - // Check BOM first. - if (b[0] === 0xFF && b[1] === 0xFE) return 'utf-16le'; - if (b[0] === 0xFE && b[1] === 0xFF) return 'utf-16be'; - } + if (buf.length >= 2) { + // Check BOM. + if (buf[0] == 0xFE && buf[1] == 0xFF) // UTF-16BE BOM + enc = 'utf-16be'; + else if (buf[0] == 0xFF && buf[1] == 0xFE) // UTF-16LE BOM + enc = 'utf-16le'; + else { + // No BOM found. Try to deduce encoding from initial content. + // Most of the time, the content has ASCII chars (U+00**), but the opposite (U+**00) is uncommon. + // So, we count ASCII as if it was LE or BE, and decide from that. + var asciiCharsLE = 0, asciiCharsBE = 0, // Counts of chars in both positions + _len = Math.min(buf.length - (buf.length % 2), 64); // Len is always even. - if (b[0] === 0 && b[1] !== 0) asciiCharsBE++; - if (b[0] !== 0 && b[1] === 0) asciiCharsLE++; - - b.length = 0; - charsProcessed++; - - if (charsProcessed >= 100) { - break outer_loop; - } + for (var i = 0; i < _len; i += 2) { + if (buf[i] === 0 && buf[i+1] !== 0) asciiCharsBE++; + if (buf[i] !== 0 && buf[i+1] === 0) asciiCharsLE++; } + + if (asciiCharsBE > asciiCharsLE) + enc = 'utf-16be'; + else if (asciiCharsBE < asciiCharsLE) + enc = 'utf-16le'; } } - // Make decisions. - // Most of the time, the content has ASCII chars (U+00**), but the opposite (U+**00) is uncommon. - // So, we count ASCII as if it was LE or BE, and decide from that. - if (asciiCharsBE > asciiCharsLE) return 'utf-16be'; - if (asciiCharsBE < asciiCharsLE) return 'utf-16le'; - - // Couldn't decide (likely all zeros or not enough data). - return defaultEncoding || 'utf-16le'; + return enc; } diff --git a/node_modules/encoding-sniffer/node_modules/iconv-lite/encodings/utf7.js b/node_modules/express/node_modules/iconv-lite/encodings/utf7.js similarity index 95% rename from node_modules/encoding-sniffer/node_modules/iconv-lite/encodings/utf7.js rename to node_modules/express/node_modules/iconv-lite/encodings/utf7.js index eacae34..b7631c2 100644 --- a/node_modules/encoding-sniffer/node_modules/iconv-lite/encodings/utf7.js +++ b/node_modules/express/node_modules/iconv-lite/encodings/utf7.js @@ -74,7 +74,7 @@ Utf7Decoder.prototype.write = function(buf) { if (i == lastI && buf[i] == minusChar) {// "+-" -> "+" res += "+"; } else { - var b64str = base64Accum + this.iconv.decode(buf.slice(lastI, i), "ascii"); + var b64str = base64Accum + buf.slice(lastI, i).toString(); res += this.iconv.decode(Buffer.from(b64str, 'base64'), "utf16-be"); } @@ -91,7 +91,7 @@ Utf7Decoder.prototype.write = function(buf) { if (!inBase64) { res += this.iconv.decode(buf.slice(lastI), "ascii"); // Write direct chars. } else { - var b64str = base64Accum + this.iconv.decode(buf.slice(lastI), "ascii"); + var b64str = base64Accum + buf.slice(lastI).toString(); var canBeDecoded = b64str.length - (b64str.length % 8); // Minimal chunk: 2 quads -> 2x3 bytes -> 3 chars. base64Accum = b64str.slice(canBeDecoded); // The rest will be decoded in future. @@ -245,7 +245,7 @@ Utf7IMAPDecoder.prototype.write = function(buf) { if (i == lastI && buf[i] == minusChar) { // "&-" -> "&" res += "&"; } else { - var b64str = base64Accum + this.iconv.decode(buf.slice(lastI, i), "ascii").replace(/,/g, '/'); + var b64str = base64Accum + buf.slice(lastI, i).toString().replace(/,/g, '/'); res += this.iconv.decode(Buffer.from(b64str, 'base64'), "utf16-be"); } @@ -262,7 +262,7 @@ Utf7IMAPDecoder.prototype.write = function(buf) { if (!inBase64) { res += this.iconv.decode(buf.slice(lastI), "ascii"); // Write direct chars. } else { - var b64str = base64Accum + this.iconv.decode(buf.slice(lastI), "ascii").replace(/,/g, '/'); + var b64str = base64Accum + buf.slice(lastI).toString().replace(/,/g, '/'); var canBeDecoded = b64str.length - (b64str.length % 8); // Minimal chunk: 2 quads -> 2x3 bytes -> 3 chars. base64Accum = b64str.slice(canBeDecoded); // The rest will be decoded in future. diff --git a/node_modules/encoding-sniffer/node_modules/iconv-lite/lib/bom-handling.js b/node_modules/express/node_modules/iconv-lite/lib/bom-handling.js similarity index 100% rename from node_modules/encoding-sniffer/node_modules/iconv-lite/lib/bom-handling.js rename to node_modules/express/node_modules/iconv-lite/lib/bom-handling.js diff --git a/node_modules/iconv-lite/lib/extend-node.js b/node_modules/express/node_modules/iconv-lite/lib/extend-node.js similarity index 100% rename from node_modules/iconv-lite/lib/extend-node.js rename to node_modules/express/node_modules/iconv-lite/lib/extend-node.js diff --git a/node_modules/whatwg-encoding/node_modules/iconv-lite/lib/index.d.ts b/node_modules/express/node_modules/iconv-lite/lib/index.d.ts similarity index 70% rename from node_modules/whatwg-encoding/node_modules/iconv-lite/lib/index.d.ts rename to node_modules/express/node_modules/iconv-lite/lib/index.d.ts index 99f200f..0547eb3 100644 --- a/node_modules/whatwg-encoding/node_modules/iconv-lite/lib/index.d.ts +++ b/node_modules/express/node_modules/iconv-lite/lib/index.d.ts @@ -6,22 +6,15 @@ *--------------------------------------------------------------------------------------------*/ declare module 'iconv-lite' { - // Basic API export function decode(buffer: Buffer, encoding: string, options?: Options): string; export function encode(content: string, encoding: string, options?: Options): Buffer; export function encodingExists(encoding: string): boolean; - // Stream API export function decodeStream(encoding: string, options?: Options): NodeJS.ReadWriteStream; export function encodeStream(encoding: string, options?: Options): NodeJS.ReadWriteStream; - - // Low-level stream APIs - export function getEncoder(encoding: string, options?: Options): EncoderStream; - - export function getDecoder(encoding: string, options?: Options): DecoderStream; } export interface Options { @@ -29,13 +22,3 @@ export interface Options { addBOM?: boolean; defaultEncoding?: string; } - -export interface EncoderStream { - write(str: string): Buffer; - end(): Buffer | undefined; -} - -export interface DecoderStream { - write(buf: Buffer): string; - end(): string | undefined; -} diff --git a/node_modules/whatwg-encoding/node_modules/iconv-lite/lib/index.js b/node_modules/express/node_modules/iconv-lite/lib/index.js similarity index 68% rename from node_modules/whatwg-encoding/node_modules/iconv-lite/lib/index.js rename to node_modules/express/node_modules/iconv-lite/lib/index.js index 657701c..5391919 100644 --- a/node_modules/whatwg-encoding/node_modules/iconv-lite/lib/index.js +++ b/node_modules/express/node_modules/iconv-lite/lib/index.js @@ -1,5 +1,7 @@ "use strict"; +// Some environments don't have global Buffer (e.g. React Native). +// Solution would be installing npm modules "buffer" and "stream" explicitly. var Buffer = require("safer-buffer").Buffer; var bomHandling = require("./bom-handling"), @@ -131,50 +133,21 @@ iconv.getDecoder = function getDecoder(encoding, options) { return decoder; } -// Streaming API -// NOTE: Streaming API naturally depends on 'stream' module from Node.js. Unfortunately in browser environments this module can add -// up to 100Kb to the output bundle. To avoid unnecessary code bloat, we don't enable Streaming API in browser by default. -// If you would like to enable it explicitly, please add the following code to your app: -// > iconv.enableStreamingAPI(require('stream')); -iconv.enableStreamingAPI = function enableStreamingAPI(stream_module) { - if (iconv.supportsStreams) - return; - // Dependency-inject stream module to create IconvLite stream classes. - var streams = require("./streams")(stream_module); +// Load extensions in Node. All of them are omitted in Browserify build via 'browser' field in package.json. +var nodeVer = typeof process !== 'undefined' && process.versions && process.versions.node; +if (nodeVer) { - // Not public API yet, but expose the stream classes. - iconv.IconvLiteEncoderStream = streams.IconvLiteEncoderStream; - iconv.IconvLiteDecoderStream = streams.IconvLiteDecoderStream; - - // Streaming API. - iconv.encodeStream = function encodeStream(encoding, options) { - return new iconv.IconvLiteEncoderStream(iconv.getEncoder(encoding, options), options); + // Load streaming support in Node v0.10+ + var nodeVerArr = nodeVer.split(".").map(Number); + if (nodeVerArr[0] > 0 || nodeVerArr[1] >= 10) { + require("./streams")(iconv); } - iconv.decodeStream = function decodeStream(encoding, options) { - return new iconv.IconvLiteDecoderStream(iconv.getDecoder(encoding, options), options); - } - - iconv.supportsStreams = true; -} - -// Enable Streaming API automatically if 'stream' module is available and non-empty (the majority of environments). -var stream_module; -try { - stream_module = require("stream"); -} catch (e) {} - -if (stream_module && stream_module.Transform) { - iconv.enableStreamingAPI(stream_module); - -} else { - // In rare cases where 'stream' module is not available by default, throw a helpful exception. - iconv.encodeStream = iconv.decodeStream = function() { - throw new Error("iconv-lite Streaming API is not enabled. Use iconv.enableStreamingAPI(require('stream')); to enable it."); - }; + // Load Node primitive extensions. + require("./extend-node")(iconv); } if ("Ā" != "\u0100") { - console.error("iconv-lite warning: js files use non-utf8 encoding. See https://github.com/ashtuchkin/iconv-lite/wiki/Javascript-source-file-encodings for more info."); + console.error("iconv-lite warning: javascript files use encoding different from utf-8. See https://github.com/ashtuchkin/iconv-lite/wiki/Javascript-source-file-encodings for more info."); } diff --git a/node_modules/express/node_modules/iconv-lite/lib/streams.js b/node_modules/express/node_modules/iconv-lite/lib/streams.js new file mode 100644 index 0000000..4409552 --- /dev/null +++ b/node_modules/express/node_modules/iconv-lite/lib/streams.js @@ -0,0 +1,121 @@ +"use strict"; + +var Buffer = require("buffer").Buffer, + Transform = require("stream").Transform; + + +// == Exports ================================================================== +module.exports = function(iconv) { + + // Additional Public API. + iconv.encodeStream = function encodeStream(encoding, options) { + return new IconvLiteEncoderStream(iconv.getEncoder(encoding, options), options); + } + + iconv.decodeStream = function decodeStream(encoding, options) { + return new IconvLiteDecoderStream(iconv.getDecoder(encoding, options), options); + } + + iconv.supportsStreams = true; + + + // Not published yet. + iconv.IconvLiteEncoderStream = IconvLiteEncoderStream; + iconv.IconvLiteDecoderStream = IconvLiteDecoderStream; + iconv._collect = IconvLiteDecoderStream.prototype.collect; +}; + + +// == Encoder stream ======================================================= +function IconvLiteEncoderStream(conv, options) { + this.conv = conv; + options = options || {}; + options.decodeStrings = false; // We accept only strings, so we don't need to decode them. + Transform.call(this, options); +} + +IconvLiteEncoderStream.prototype = Object.create(Transform.prototype, { + constructor: { value: IconvLiteEncoderStream } +}); + +IconvLiteEncoderStream.prototype._transform = function(chunk, encoding, done) { + if (typeof chunk != 'string') + return done(new Error("Iconv encoding stream needs strings as its input.")); + try { + var res = this.conv.write(chunk); + if (res && res.length) this.push(res); + done(); + } + catch (e) { + done(e); + } +} + +IconvLiteEncoderStream.prototype._flush = function(done) { + try { + var res = this.conv.end(); + if (res && res.length) this.push(res); + done(); + } + catch (e) { + done(e); + } +} + +IconvLiteEncoderStream.prototype.collect = function(cb) { + var chunks = []; + this.on('error', cb); + this.on('data', function(chunk) { chunks.push(chunk); }); + this.on('end', function() { + cb(null, Buffer.concat(chunks)); + }); + return this; +} + + +// == Decoder stream ======================================================= +function IconvLiteDecoderStream(conv, options) { + this.conv = conv; + options = options || {}; + options.encoding = this.encoding = 'utf8'; // We output strings. + Transform.call(this, options); +} + +IconvLiteDecoderStream.prototype = Object.create(Transform.prototype, { + constructor: { value: IconvLiteDecoderStream } +}); + +IconvLiteDecoderStream.prototype._transform = function(chunk, encoding, done) { + if (!Buffer.isBuffer(chunk)) + return done(new Error("Iconv decoding stream needs buffers as its input.")); + try { + var res = this.conv.write(chunk); + if (res && res.length) this.push(res, this.encoding); + done(); + } + catch (e) { + done(e); + } +} + +IconvLiteDecoderStream.prototype._flush = function(done) { + try { + var res = this.conv.end(); + if (res && res.length) this.push(res, this.encoding); + done(); + } + catch (e) { + done(e); + } +} + +IconvLiteDecoderStream.prototype.collect = function(cb) { + var res = ''; + this.on('error', cb); + this.on('data', function(chunk) { res += chunk; }); + this.on('end', function() { + cb(null, res); + }); + return this; +} + diff --git a/node_modules/encoding-sniffer/node_modules/iconv-lite/package.json b/node_modules/express/node_modules/iconv-lite/package.json similarity index 63% rename from node_modules/encoding-sniffer/node_modules/iconv-lite/package.json rename to node_modules/express/node_modules/iconv-lite/package.json index d351115..a7c74fc 100644 --- a/node_modules/encoding-sniffer/node_modules/iconv-lite/package.json +++ b/node_modules/express/node_modules/iconv-lite/package.json @@ -1,7 +1,7 @@ { "name": "iconv-lite", "description": "Convert character encodings in pure javascript.", - "version": "0.6.3", + "version": "0.4.24", "license": "MIT", "keywords": [ "iconv", @@ -22,23 +22,25 @@ "node": ">=0.10.0" }, "scripts": { - "coverage": "c8 _mocha --grep .", + "coverage": "istanbul cover _mocha -- --grep .", + "coverage-open": "open coverage/lcov-report/index.html", "test": "mocha --reporter spec --grep ." }, "browser": { - "stream": false + "./lib/extend-node": false, + "./lib/streams": false }, "devDependencies": { - "async": "^3.2.0", - "c8": "^7.2.0", - "errto": "^0.2.1", - "iconv": "^2.3.5", - "mocha": "^3.5.3", - "request": "^2.88.2", - "semver": "^6.3.0", - "unorm": "^1.6.0" + "mocha": "^3.1.0", + "request": "~2.87.0", + "unorm": "*", + "errto": "*", + "async": "*", + "istanbul": "*", + "semver": "*", + "iconv": "*" }, "dependencies": { - "safer-buffer": ">= 2.1.2 < 3.0.0" + "safer-buffer": ">= 2.1.2 < 3" } } diff --git a/node_modules/express/node_modules/raw-body/index.d.ts b/node_modules/express/node_modules/raw-body/index.d.ts new file mode 100644 index 0000000..dcbbebd --- /dev/null +++ b/node_modules/express/node_modules/raw-body/index.d.ts @@ -0,0 +1,87 @@ +import { Readable } from 'stream'; + +declare namespace getRawBody { + export type Encoding = string | true; + + export interface Options { + /** + * The expected length of the stream. + */ + length?: number | string | null; + /** + * The byte limit of the body. This is the number of bytes or any string + * format supported by `bytes`, for example `1000`, `'500kb'` or `'3mb'`. + */ + limit?: number | string | null; + /** + * The encoding to use to decode the body into a string. By default, a + * `Buffer` instance will be returned when no encoding is specified. Most + * likely, you want `utf-8`, so setting encoding to `true` will decode as + * `utf-8`. You can use any type of encoding supported by `iconv-lite`. + */ + encoding?: Encoding | null; + } + + export interface RawBodyError extends Error { + /** + * The limit in bytes. + */ + limit?: number; + /** + * The expected length of the stream. + */ + length?: number; + expected?: number; + /** + * The received bytes. + */ + received?: number; + /** + * The encoding. + */ + encoding?: string; + /** + * The corresponding status code for the error. + */ + status: number; + statusCode: number; + /** + * The error type. + */ + type: string; + } +} + +/** + * Gets the entire buffer of a stream either as a `Buffer` or a string. + * Validates the stream's length against an expected length and maximum + * limit. Ideal for parsing request bodies. + */ +declare function getRawBody( + stream: Readable, + callback: (err: getRawBody.RawBodyError, body: Buffer) => void +): void; + +declare function getRawBody( + stream: Readable, + options: (getRawBody.Options & { encoding: getRawBody.Encoding }) | getRawBody.Encoding, + callback: (err: getRawBody.RawBodyError, body: string) => void +): void; + +declare function getRawBody( + stream: Readable, + options: getRawBody.Options, + callback: (err: getRawBody.RawBodyError, body: Buffer) => void +): void; + +declare function getRawBody( + stream: Readable, + options: (getRawBody.Options & { encoding: getRawBody.Encoding }) | getRawBody.Encoding +): Promise<string>; + +declare function getRawBody( + stream: Readable, + options?: getRawBody.Options +): Promise<Buffer>; + +export = getRawBody; diff --git a/node_modules/express/node_modules/raw-body/index.js b/node_modules/express/node_modules/raw-body/index.js new file mode 100644 index 0000000..9cdcd12 --- /dev/null +++ b/node_modules/express/node_modules/raw-body/index.js @@ -0,0 +1,336 @@ +/*! + * raw-body + * Copyright(c) 2013-2014 Jonathan Ong + * Copyright(c) 2014-2022 Douglas Christopher Wilson + * MIT Licensed + */ + +'use strict' + +/** + * Module dependencies. + * @private + */ + +var asyncHooks = tryRequireAsyncHooks() +var bytes = require('bytes') +var createError = require('http-errors') +var iconv = require('iconv-lite') +var unpipe = require('unpipe') + +/** + * Module exports. + * @public + */ + +module.exports = getRawBody + +/** + * Module variables. + * @private + */ + +var ICONV_ENCODING_MESSAGE_REGEXP = /^Encoding not recognized: / + +/** + * Get the decoder for a given encoding. + * + * @param {string} encoding + * @private + */ + +function getDecoder (encoding) { + if (!encoding) return null + + try { + return iconv.getDecoder(encoding) + } catch (e) { + // error getting decoder + if (!ICONV_ENCODING_MESSAGE_REGEXP.test(e.message)) throw e + + // the encoding was not found + throw createError(415, 'specified encoding unsupported', { + encoding: encoding, + type: 'encoding.unsupported' + }) + } +} + +/** + * Get the raw body of a stream (typically HTTP). + * + * @param {object} stream + * @param {object|string|function} [options] + * @param {function} [callback] + * @public + */ + +function getRawBody (stream, options, callback) { + var done = callback + var opts = options || {} + + // light validation + if (stream === undefined) { + throw new TypeError('argument stream is required') + } else if (typeof stream !== 'object' || stream === null || typeof stream.on !== 'function') { + throw new TypeError('argument stream must be a stream') + } + + if (options === true || typeof options === 'string') { + // short cut for encoding + opts = { + encoding: options + } + } + + if (typeof options === 'function') { + done = options + opts = {} + } + + // validate callback is a function, if provided + if (done !== undefined && typeof done !== 'function') { + throw new TypeError('argument callback must be a function') + } + + // require the callback without promises + if (!done && !global.Promise) { + throw new TypeError('argument callback is required') + } + + // get encoding + var encoding = opts.encoding !== true + ? opts.encoding + : 'utf-8' + + // convert the limit to an integer + var limit = bytes.parse(opts.limit) + + // convert the expected length to an integer + var length = opts.length != null && !isNaN(opts.length) + ? parseInt(opts.length, 10) + : null + + if (done) { + // classic callback style + return readStream(stream, encoding, length, limit, wrap(done)) + } + + return new Promise(function executor (resolve, reject) { + readStream(stream, encoding, length, limit, function onRead (err, buf) { + if (err) return reject(err) + resolve(buf) + }) + }) +} + +/** + * Halt a stream. + * + * @param {Object} stream + * @private + */ + +function halt (stream) { + // unpipe everything from the stream + unpipe(stream) + + // pause stream + if (typeof stream.pause === 'function') { + stream.pause() + } +} + +/** + * Read the data from the stream. + * + * @param {object} stream + * @param {string} encoding + * @param {number} length + * @param {number} limit + * @param {function} callback + * @public + */ + +function readStream (stream, encoding, length, limit, callback) { + var complete = false + var sync = true + + // check the length and limit options. + // note: we intentionally leave the stream paused, + // so users should handle the stream themselves. + if (limit !== null && length !== null && length > limit) { + return done(createError(413, 'request entity too large', { + expected: length, + length: length, + limit: limit, + type: 'entity.too.large' + })) + } + + // streams1: assert request encoding is buffer. + // streams2+: assert the stream encoding is buffer. + // stream._decoder: streams1 + // state.encoding: streams2 + // state.decoder: streams2, specifically < 0.10.6 + var state = stream._readableState + if (stream._decoder || (state && (state.encoding || state.decoder))) { + // developer error + return done(createError(500, 'stream encoding should not be set', { + type: 'stream.encoding.set' + })) + } + + if (typeof stream.readable !== 'undefined' && !stream.readable) { + return done(createError(500, 'stream is not readable', { + type: 'stream.not.readable' + })) + } + + var received = 0 + var decoder + + try { + decoder = getDecoder(encoding) + } catch (err) { + return done(err) + } + + var buffer = decoder + ? '' + : [] + + // attach listeners + stream.on('aborted', onAborted) + stream.on('close', cleanup) + stream.on('data', onData) + stream.on('end', onEnd) + stream.on('error', onEnd) + + // mark sync section complete + sync = false + + function done () { + var args = new Array(arguments.length) + + // copy arguments + for (var i = 0; i < args.length; i++) { + args[i] = arguments[i] + } + + // mark complete + complete = true + + if (sync) { + process.nextTick(invokeCallback) + } else { + invokeCallback() + } + + function invokeCallback () { + cleanup() + + if (args[0]) { + // halt the stream on error + halt(stream) + } + + callback.apply(null, args) + } + } + + function onAborted () { + if (complete) return + + done(createError(400, 'request aborted', { + code: 'ECONNABORTED', + expected: length, + length: length, + received: received, + type: 'request.aborted' + })) + } + + function onData (chunk) { + if (complete) return + + received += chunk.length + + if (limit !== null && received > limit) { + done(createError(413, 'request entity too large', { + limit: limit, + received: received, + type: 'entity.too.large' + })) + } else if (decoder) { + buffer += decoder.write(chunk) + } else { + buffer.push(chunk) + } + } + + function onEnd (err) { + if (complete) return + if (err) return done(err) + + if (length !== null && received !== length) { + done(createError(400, 'request size did not match content length', { + expected: length, + length: length, + received: received, + type: 'request.size.invalid' + })) + } else { + var string = decoder + ? buffer + (decoder.end() || '') + : Buffer.concat(buffer) + done(null, string) + } + } + + function cleanup () { + buffer = null + + stream.removeListener('aborted', onAborted) + stream.removeListener('data', onData) + stream.removeListener('end', onEnd) + stream.removeListener('error', onEnd) + stream.removeListener('close', cleanup) + } +} + +/** + * Try to require async_hooks + * @private + */ + +function tryRequireAsyncHooks () { + try { + return require('async_hooks') + } catch (e) { + return {} + } +} + +/** + * Wrap function with async resource, if possible. + * AsyncResource.bind static method backported. + * @private + */ + +function wrap (fn) { + var res + + // create anonymous resource + if (asyncHooks.AsyncResource) { + res = new asyncHooks.AsyncResource(fn.name || 'bound-anonymous-fn') + } + + // incompatible node.js + if (!res || !res.runInAsyncScope) { + return fn + } + + // return bound function + return res.runInAsyncScope.bind(res, fn, null) +} diff --git a/node_modules/express/node_modules/raw-body/package.json b/node_modules/express/node_modules/raw-body/package.json new file mode 100644 index 0000000..aabb1c3 --- /dev/null +++ b/node_modules/express/node_modules/raw-body/package.json @@ -0,0 +1,49 @@ +{ + "name": "raw-body", + "description": "Get and validate the raw body of a readable stream.", + "version": "2.5.2", + "author": "Jonathan Ong <me@jongleberry.com> (http://jongleberry.com)", + "contributors": [ + "Douglas Christopher Wilson <doug@somethingdoug.com>", + "Raynos <raynos2@gmail.com>" + ], + "license": "MIT", + "repository": "stream-utils/raw-body", + "dependencies": { + "bytes": "3.1.2", + "http-errors": "2.0.0", + "iconv-lite": "0.4.24", + "unpipe": "1.0.0" + }, + "devDependencies": { + "bluebird": "3.7.2", + "eslint": "8.34.0", + "eslint-config-standard": "15.0.1", + "eslint-plugin-import": "2.27.5", + "eslint-plugin-markdown": "3.0.0", + "eslint-plugin-node": "11.1.0", + "eslint-plugin-promise": "6.1.1", + "eslint-plugin-standard": "4.1.0", + "mocha": "10.2.0", + "nyc": "15.1.0", + "readable-stream": "2.3.7", + "safe-buffer": "5.2.1" + }, + "engines": { + "node": ">= 0.8" + }, + "files": [ + "HISTORY.md", + "LICENSE", + "README.md", + "SECURITY.md", + "index.d.ts", + "index.js" + ], + "scripts": { + "lint": "eslint .", + "test": "mocha --trace-deprecation --reporter spec --bail --check-leaks test/", + "test-ci": "nyc --reporter=lcovonly --reporter=text npm test", + "test-cov": "nyc --reporter=html --reporter=text npm test" + } +} diff --git a/node_modules/fill-range/index.js b/node_modules/fill-range/index.js deleted file mode 100644 index ddb212e..0000000 --- a/node_modules/fill-range/index.js +++ /dev/null @@ -1,248 +0,0 @@ -/*! - * fill-range <https://github.com/jonschlinkert/fill-range> - * - * Copyright (c) 2014-present, Jon Schlinkert. - * Licensed under the MIT License. - */ - -'use strict'; - -const util = require('util'); -const toRegexRange = require('to-regex-range'); - -const isObject = val => val !== null && typeof val === 'object' && !Array.isArray(val); - -const transform = toNumber => { - return value => toNumber === true ? Number(value) : String(value); -}; - -const isValidValue = value => { - return typeof value === 'number' || (typeof value === 'string' && value !== ''); -}; - -const isNumber = num => Number.isInteger(+num); - -const zeros = input => { - let value = `${input}`; - let index = -1; - if (value[0] === '-') value = value.slice(1); - if (value === '0') return false; - while (value[++index] === '0'); - return index > 0; -}; - -const stringify = (start, end, options) => { - if (typeof start === 'string' || typeof end === 'string') { - return true; - } - return options.stringify === true; -}; - -const pad = (input, maxLength, toNumber) => { - if (maxLength > 0) { - let dash = input[0] === '-' ? '-' : ''; - if (dash) input = input.slice(1); - input = (dash + input.padStart(dash ? maxLength - 1 : maxLength, '0')); - } - if (toNumber === false) { - return String(input); - } - return input; -}; - -const toMaxLen = (input, maxLength) => { - let negative = input[0] === '-' ? '-' : ''; - if (negative) { - input = input.slice(1); - maxLength--; - } - while (input.length < maxLength) input = '0' + input; - return negative ? ('-' + input) : input; -}; - -const toSequence = (parts, options, maxLen) => { - parts.negatives.sort((a, b) => a < b ? -1 : a > b ? 1 : 0); - parts.positives.sort((a, b) => a < b ? -1 : a > b ? 1 : 0); - - let prefix = options.capture ? '' : '?:'; - let positives = ''; - let negatives = ''; - let result; - - if (parts.positives.length) { - positives = parts.positives.map(v => toMaxLen(String(v), maxLen)).join('|'); - } - - if (parts.negatives.length) { - negatives = `-(${prefix}${parts.negatives.map(v => toMaxLen(String(v), maxLen)).join('|')})`; - } - - if (positives && negatives) { - result = `${positives}|${negatives}`; - } else { - result = positives || negatives; - } - - if (options.wrap) { - return `(${prefix}${result})`; - } - - return result; -}; - -const toRange = (a, b, isNumbers, options) => { - if (isNumbers) { - return toRegexRange(a, b, { wrap: false, ...options }); - } - - let start = String.fromCharCode(a); - if (a === b) return start; - - let stop = String.fromCharCode(b); - return `[${start}-${stop}]`; -}; - -const toRegex = (start, end, options) => { - if (Array.isArray(start)) { - let wrap = options.wrap === true; - let prefix = options.capture ? '' : '?:'; - return wrap ? `(${prefix}${start.join('|')})` : start.join('|'); - } - return toRegexRange(start, end, options); -}; - -const rangeError = (...args) => { - return new RangeError('Invalid range arguments: ' + util.inspect(...args)); -}; - -const invalidRange = (start, end, options) => { - if (options.strictRanges === true) throw rangeError([start, end]); - return []; -}; - -const invalidStep = (step, options) => { - if (options.strictRanges === true) { - throw new TypeError(`Expected step "${step}" to be a number`); - } - return []; -}; - -const fillNumbers = (start, end, step = 1, options = {}) => { - let a = Number(start); - let b = Number(end); - - if (!Number.isInteger(a) || !Number.isInteger(b)) { - if (options.strictRanges === true) throw rangeError([start, end]); - return []; - } - - // fix negative zero - if (a === 0) a = 0; - if (b === 0) b = 0; - - let descending = a > b; - let startString = String(start); - let endString = String(end); - let stepString = String(step); - step = Math.max(Math.abs(step), 1); - - let padded = zeros(startString) || zeros(endString) || zeros(stepString); - let maxLen = padded ? Math.max(startString.length, endString.length, stepString.length) : 0; - let toNumber = padded === false && stringify(start, end, options) === false; - let format = options.transform || transform(toNumber); - - if (options.toRegex && step === 1) { - return toRange(toMaxLen(start, maxLen), toMaxLen(end, maxLen), true, options); - } - - let parts = { negatives: [], positives: [] }; - let push = num => parts[num < 0 ? 'negatives' : 'positives'].push(Math.abs(num)); - let range = []; - let index = 0; - - while (descending ? a >= b : a <= b) { - if (options.toRegex === true && step > 1) { - push(a); - } else { - range.push(pad(format(a, index), maxLen, toNumber)); - } - a = descending ? a - step : a + step; - index++; - } - - if (options.toRegex === true) { - return step > 1 - ? toSequence(parts, options, maxLen) - : toRegex(range, null, { wrap: false, ...options }); - } - - return range; -}; - -const fillLetters = (start, end, step = 1, options = {}) => { - if ((!isNumber(start) && start.length > 1) || (!isNumber(end) && end.length > 1)) { - return invalidRange(start, end, options); - } - - let format = options.transform || (val => String.fromCharCode(val)); - let a = `${start}`.charCodeAt(0); - let b = `${end}`.charCodeAt(0); - - let descending = a > b; - let min = Math.min(a, b); - let max = Math.max(a, b); - - if (options.toRegex && step === 1) { - return toRange(min, max, false, options); - } - - let range = []; - let index = 0; - - while (descending ? a >= b : a <= b) { - range.push(format(a, index)); - a = descending ? a - step : a + step; - index++; - } - - if (options.toRegex === true) { - return toRegex(range, null, { wrap: false, options }); - } - - return range; -}; - -const fill = (start, end, step, options = {}) => { - if (end == null && isValidValue(start)) { - return [start]; - } - - if (!isValidValue(start) || !isValidValue(end)) { - return invalidRange(start, end, options); - } - - if (typeof step === 'function') { - return fill(start, end, 1, { transform: step }); - } - - if (isObject(step)) { - return fill(start, end, 0, step); - } - - let opts = { ...options }; - if (opts.capture === true) opts.wrap = true; - step = step || opts.step || 1; - - if (!isNumber(step)) { - if (step != null && !isObject(step)) return invalidStep(step, opts); - return fill(start, end, 1, step); - } - - if (isNumber(start) && isNumber(end)) { - return fillNumbers(start, end, step, opts); - } - - return fillLetters(start, end, Math.max(Math.abs(step), 1), opts); -}; - -module.exports = fill; diff --git a/node_modules/fill-range/package.json b/node_modules/fill-range/package.json deleted file mode 100644 index 582357f..0000000 --- a/node_modules/fill-range/package.json +++ /dev/null @@ -1,74 +0,0 @@ -{ - "name": "fill-range", - "description": "Fill in a range of numbers or letters, optionally passing an increment or `step` to use, or create a regex-compatible range with `options.toRegex`", - "version": "7.1.1", - "homepage": "https://github.com/jonschlinkert/fill-range", - "author": "Jon Schlinkert (https://github.com/jonschlinkert)", - "contributors": [ - "Edo Rivai (edo.rivai.nl)", - "Jon Schlinkert (http://twitter.com/jonschlinkert)", - "Paul Miller (paulmillr.com)", - "Rouven Weßling (www.rouvenwessling.de)", - "(https://github.com/wtgtybhertgeghgtwtg)" - ], - "repository": "jonschlinkert/fill-range", - "bugs": { - "url": "https://github.com/jonschlinkert/fill-range/issues" - }, - "license": "MIT", - "files": [ - "index.js" - ], - "main": "index.js", - "engines": { - "node": ">=8" - }, - "scripts": { - "lint": "eslint --cache --cache-location node_modules/.cache/.eslintcache --report-unused-disable-directives --ignore-path .gitignore .", - "mocha": "mocha --reporter dot", - "test": "npm run lint && npm run mocha", - "test:ci": "npm run test:cover", - "test:cover": "nyc npm run mocha" - }, - "dependencies": { - "to-regex-range": "^5.0.1" - }, - "devDependencies": { - "gulp-format-md": "^2.0.0", - "mocha": "^6.1.1", - "nyc": "^15.1.0" - }, - "keywords": [ - "alpha", - "alphabetical", - "array", - "bash", - "brace", - "expand", - "expansion", - "fill", - "glob", - "match", - "matches", - "matching", - "number", - "numerical", - "range", - "ranges", - "regex", - "sh" - ], - "verb": { - "toc": false, - "layout": "default", - "tasks": [ - "readme" - ], - "plugins": [ - "gulp-format-md" - ], - "lint": { - "reflinks": true - } - } -} diff --git a/node_modules/fs.realpath/index.js b/node_modules/fs.realpath/index.js deleted file mode 100644 index b09c7c7..0000000 --- a/node_modules/fs.realpath/index.js +++ /dev/null @@ -1,66 +0,0 @@ -module.exports = realpath -realpath.realpath = realpath -realpath.sync = realpathSync -realpath.realpathSync = realpathSync -realpath.monkeypatch = monkeypatch -realpath.unmonkeypatch = unmonkeypatch - -var fs = require('fs') -var origRealpath = fs.realpath -var origRealpathSync = fs.realpathSync - -var version = process.version -var ok = /^v[0-5]\./.test(version) -var old = require('./old.js') - -function newError (er) { - return er && er.syscall === 'realpath' && ( - er.code === 'ELOOP' || - er.code === 'ENOMEM' || - er.code === 'ENAMETOOLONG' - ) -} - -function realpath (p, cache, cb) { - if (ok) { - return origRealpath(p, cache, cb) - } - - if (typeof cache === 'function') { - cb = cache - cache = null - } - origRealpath(p, cache, function (er, result) { - if (newError(er)) { - old.realpath(p, cache, cb) - } else { - cb(er, result) - } - }) -} - -function realpathSync (p, cache) { - if (ok) { - return origRealpathSync(p, cache) - } - - try { - return origRealpathSync(p, cache) - } catch (er) { - if (newError(er)) { - return old.realpathSync(p, cache) - } else { - throw er - } - } -} - -function monkeypatch () { - fs.realpath = realpath - fs.realpathSync = realpathSync -} - -function unmonkeypatch () { - fs.realpath = origRealpath - fs.realpathSync = origRealpathSync -} diff --git a/node_modules/fs.realpath/old.js b/node_modules/fs.realpath/old.js deleted file mode 100644 index b40305e..0000000 --- a/node_modules/fs.realpath/old.js +++ /dev/null @@ -1,303 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -var pathModule = require('path'); -var isWindows = process.platform === 'win32'; -var fs = require('fs'); - -// JavaScript implementation of realpath, ported from node pre-v6 - -var DEBUG = process.env.NODE_DEBUG && /fs/.test(process.env.NODE_DEBUG); - -function rethrow() { - // Only enable in debug mode. A backtrace uses ~1000 bytes of heap space and - // is fairly slow to generate. - var callback; - if (DEBUG) { - var backtrace = new Error; - callback = debugCallback; - } else - callback = missingCallback; - - return callback; - - function debugCallback(err) { - if (err) { - backtrace.message = err.message; - err = backtrace; - missingCallback(err); - } - } - - function missingCallback(err) { - if (err) { - if (process.throwDeprecation) - throw err; // Forgot a callback but don't know where? Use NODE_DEBUG=fs - else if (!process.noDeprecation) { - var msg = 'fs: missing callback ' + (err.stack || err.message); - if (process.traceDeprecation) - console.trace(msg); - else - console.error(msg); - } - } - } -} - -function maybeCallback(cb) { - return typeof cb === 'function' ? cb : rethrow(); -} - -var normalize = pathModule.normalize; - -// Regexp that finds the next partion of a (partial) path -// result is [base_with_slash, base], e.g. ['somedir/', 'somedir'] -if (isWindows) { - var nextPartRe = /(.*?)(?:[\/\\]+|$)/g; -} else { - var nextPartRe = /(.*?)(?:[\/]+|$)/g; -} - -// Regex to find the device root, including trailing slash. E.g. 'c:\\'. -if (isWindows) { - var splitRootRe = /^(?:[a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/][^\\\/]+)?[\\\/]*/; -} else { - var splitRootRe = /^[\/]*/; -} - -exports.realpathSync = function realpathSync(p, cache) { - // make p is absolute - p = pathModule.resolve(p); - - if (cache && Object.prototype.hasOwnProperty.call(cache, p)) { - return cache[p]; - } - - var original = p, - seenLinks = {}, - knownHard = {}; - - // current character position in p - var pos; - // the partial path so far, including a trailing slash if any - var current; - // the partial path without a trailing slash (except when pointing at a root) - var base; - // the partial path scanned in the previous round, with slash - var previous; - - start(); - - function start() { - // Skip over roots - var m = splitRootRe.exec(p); - pos = m[0].length; - current = m[0]; - base = m[0]; - previous = ''; - - // On windows, check that the root exists. On unix there is no need. - if (isWindows && !knownHard[base]) { - fs.lstatSync(base); - knownHard[base] = true; - } - } - - // walk down the path, swapping out linked pathparts for their real - // values - // NB: p.length changes. - while (pos < p.length) { - // find the next part - nextPartRe.lastIndex = pos; - var result = nextPartRe.exec(p); - previous = current; - current += result[0]; - base = previous + result[1]; - pos = nextPartRe.lastIndex; - - // continue if not a symlink - if (knownHard[base] || (cache && cache[base] === base)) { - continue; - } - - var resolvedLink; - if (cache && Object.prototype.hasOwnProperty.call(cache, base)) { - // some known symbolic link. no need to stat again. - resolvedLink = cache[base]; - } else { - var stat = fs.lstatSync(base); - if (!stat.isSymbolicLink()) { - knownHard[base] = true; - if (cache) cache[base] = base; - continue; - } - - // read the link if it wasn't read before - // dev/ino always return 0 on windows, so skip the check. - var linkTarget = null; - if (!isWindows) { - var id = stat.dev.toString(32) + ':' + stat.ino.toString(32); - if (seenLinks.hasOwnProperty(id)) { - linkTarget = seenLinks[id]; - } - } - if (linkTarget === null) { - fs.statSync(base); - linkTarget = fs.readlinkSync(base); - } - resolvedLink = pathModule.resolve(previous, linkTarget); - // track this, if given a cache. - if (cache) cache[base] = resolvedLink; - if (!isWindows) seenLinks[id] = linkTarget; - } - - // resolve the link, then start over - p = pathModule.resolve(resolvedLink, p.slice(pos)); - start(); - } - - if (cache) cache[original] = p; - - return p; -}; - - -exports.realpath = function realpath(p, cache, cb) { - if (typeof cb !== 'function') { - cb = maybeCallback(cache); - cache = null; - } - - // make p is absolute - p = pathModule.resolve(p); - - if (cache && Object.prototype.hasOwnProperty.call(cache, p)) { - return process.nextTick(cb.bind(null, null, cache[p])); - } - - var original = p, - seenLinks = {}, - knownHard = {}; - - // current character position in p - var pos; - // the partial path so far, including a trailing slash if any - var current; - // the partial path without a trailing slash (except when pointing at a root) - var base; - // the partial path scanned in the previous round, with slash - var previous; - - start(); - - function start() { - // Skip over roots - var m = splitRootRe.exec(p); - pos = m[0].length; - current = m[0]; - base = m[0]; - previous = ''; - - // On windows, check that the root exists. On unix there is no need. - if (isWindows && !knownHard[base]) { - fs.lstat(base, function(err) { - if (err) return cb(err); - knownHard[base] = true; - LOOP(); - }); - } else { - process.nextTick(LOOP); - } - } - - // walk down the path, swapping out linked pathparts for their real - // values - function LOOP() { - // stop if scanned past end of path - if (pos >= p.length) { - if (cache) cache[original] = p; - return cb(null, p); - } - - // find the next part - nextPartRe.lastIndex = pos; - var result = nextPartRe.exec(p); - previous = current; - current += result[0]; - base = previous + result[1]; - pos = nextPartRe.lastIndex; - - // continue if not a symlink - if (knownHard[base] || (cache && cache[base] === base)) { - return process.nextTick(LOOP); - } - - if (cache && Object.prototype.hasOwnProperty.call(cache, base)) { - // known symbolic link. no need to stat again. - return gotResolvedLink(cache[base]); - } - - return fs.lstat(base, gotStat); - } - - function gotStat(err, stat) { - if (err) return cb(err); - - // if not a symlink, skip to the next path part - if (!stat.isSymbolicLink()) { - knownHard[base] = true; - if (cache) cache[base] = base; - return process.nextTick(LOOP); - } - - // stat & read the link if not read before - // call gotTarget as soon as the link target is known - // dev/ino always return 0 on windows, so skip the check. - if (!isWindows) { - var id = stat.dev.toString(32) + ':' + stat.ino.toString(32); - if (seenLinks.hasOwnProperty(id)) { - return gotTarget(null, seenLinks[id], base); - } - } - fs.stat(base, function(err) { - if (err) return cb(err); - - fs.readlink(base, function(err, target) { - if (!isWindows) seenLinks[id] = target; - gotTarget(err, target); - }); - }); - } - - function gotTarget(err, target, base) { - if (err) return cb(err); - - var resolvedLink = pathModule.resolve(previous, target); - if (cache) cache[base] = resolvedLink; - gotResolvedLink(resolvedLink); - } - - function gotResolvedLink(resolvedLink) { - // resolve the link, then start over - p = pathModule.resolve(resolvedLink, p.slice(pos)); - start(); - } -}; diff --git a/node_modules/fs.realpath/package.json b/node_modules/fs.realpath/package.json deleted file mode 100644 index 3edc57d..0000000 --- a/node_modules/fs.realpath/package.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "name": "fs.realpath", - "version": "1.0.0", - "description": "Use node's fs.realpath, but fall back to the JS implementation if the native one fails", - "main": "index.js", - "dependencies": {}, - "devDependencies": {}, - "scripts": { - "test": "tap test/*.js --cov" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/isaacs/fs.realpath.git" - }, - "keywords": [ - "realpath", - "fs", - "polyfill" - ], - "author": "Isaac Z. Schlueter <i@izs.me> (http://blog.izs.me/)", - "license": "ISC", - "files": [ - "old.js", - "index.js" - ] -} diff --git a/node_modules/get-caller-file/index.d.ts b/node_modules/get-caller-file/index.d.ts deleted file mode 100644 index babed69..0000000 --- a/node_modules/get-caller-file/index.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -declare const _default: (position?: number) => any; -export = _default; diff --git a/node_modules/get-caller-file/index.js b/node_modules/get-caller-file/index.js deleted file mode 100644 index 57304f8..0000000 --- a/node_modules/get-caller-file/index.js +++ /dev/null @@ -1,22 +0,0 @@ -"use strict"; -// Call this function in a another function to find out the file from -// which that function was called from. (Inspects the v8 stack trace) -// -// Inspired by http://stackoverflow.com/questions/13227489 -module.exports = function getCallerFile(position) { - if (position === void 0) { position = 2; } - if (position >= Error.stackTraceLimit) { - throw new TypeError('getCallerFile(position) requires position be less then Error.stackTraceLimit but position was: `' + position + '` and Error.stackTraceLimit was: `' + Error.stackTraceLimit + '`'); - } - var oldPrepareStackTrace = Error.prepareStackTrace; - Error.prepareStackTrace = function (_, stack) { return stack; }; - var stack = new Error().stack; - Error.prepareStackTrace = oldPrepareStackTrace; - if (stack !== null && typeof stack === 'object') { - // stack[0] holds this file - // stack[1] holds where this function was called - // stack[2] holds the file we're interested in - return stack[position] ? stack[position].getFileName() : undefined; - } -}; -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/get-caller-file/index.js.map b/node_modules/get-caller-file/index.js.map deleted file mode 100644 index 89c655c..0000000 --- a/node_modules/get-caller-file/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,qEAAqE;AACrE,EAAE;AACF,0DAA0D;AAE1D,iBAAS,SAAS,aAAa,CAAC,QAAY;IAAZ,yBAAA,EAAA,YAAY;IAC1C,IAAI,QAAQ,IAAI,KAAK,CAAC,eAAe,EAAE;QACrC,MAAM,IAAI,SAAS,CAAC,kGAAkG,GAAG,QAAQ,GAAG,oCAAoC,GAAG,KAAK,CAAC,eAAe,GAAG,GAAG,CAAC,CAAC;KACzM;IAED,IAAM,oBAAoB,GAAG,KAAK,CAAC,iBAAiB,CAAC;IACrD,KAAK,CAAC,iBAAiB,GAAG,UAAC,CAAC,EAAE,KAAK,IAAM,OAAA,KAAK,EAAL,CAAK,CAAC;IAC/C,IAAM,KAAK,GAAG,IAAI,KAAK,EAAE,CAAC,KAAK,CAAC;IAChC,KAAK,CAAC,iBAAiB,GAAG,oBAAoB,CAAC;IAG/C,IAAI,KAAK,KAAK,IAAI,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE;QAC/C,2BAA2B;QAC3B,gDAAgD;QAChD,8CAA8C;QAC9C,OAAO,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAE,KAAK,CAAC,QAAQ,CAAS,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC;KAC7E;AACH,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/get-caller-file/package.json b/node_modules/get-caller-file/package.json deleted file mode 100644 index b0dd571..0000000 --- a/node_modules/get-caller-file/package.json +++ /dev/null @@ -1,42 +0,0 @@ -{ - "name": "get-caller-file", - "version": "2.0.5", - "description": "", - "main": "index.js", - "directories": { - "test": "tests" - }, - "files": [ - "index.js", - "index.js.map", - "index.d.ts" - ], - "scripts": { - "prepare": "tsc", - "test": "mocha test", - "test:debug": "mocha test" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/stefanpenner/get-caller-file.git" - }, - "author": "Stefan Penner", - "license": "ISC", - "bugs": { - "url": "https://github.com/stefanpenner/get-caller-file/issues" - }, - "homepage": "https://github.com/stefanpenner/get-caller-file#readme", - "devDependencies": { - "@types/chai": "^4.1.7", - "@types/ensure-posix-path": "^1.0.0", - "@types/mocha": "^5.2.6", - "@types/node": "^11.10.5", - "chai": "^4.1.2", - "ensure-posix-path": "^1.0.1", - "mocha": "^5.2.0", - "typescript": "^3.3.3333" - }, - "engines": { - "node": "6.* || 8.* || >= 10.*" - } -} diff --git a/node_modules/glob-parent/index.js b/node_modules/glob-parent/index.js deleted file mode 100644 index 09e257e..0000000 --- a/node_modules/glob-parent/index.js +++ /dev/null @@ -1,42 +0,0 @@ -'use strict'; - -var isGlob = require('is-glob'); -var pathPosixDirname = require('path').posix.dirname; -var isWin32 = require('os').platform() === 'win32'; - -var slash = '/'; -var backslash = /\\/g; -var enclosure = /[\{\[].*[\}\]]$/; -var globby = /(^|[^\\])([\{\[]|\([^\)]+$)/; -var escaped = /\\([\!\*\?\|\[\]\(\)\{\}])/g; - -/** - * @param {string} str - * @param {Object} opts - * @param {boolean} [opts.flipBackslashes=true] - * @returns {string} - */ -module.exports = function globParent(str, opts) { - var options = Object.assign({ flipBackslashes: true }, opts); - - // flip windows path separators - if (options.flipBackslashes && isWin32 && str.indexOf(slash) < 0) { - str = str.replace(backslash, slash); - } - - // special case for strings ending in enclosure containing path separator - if (enclosure.test(str)) { - str += slash; - } - - // preserves full path in case of trailing path separator - str += 'a'; - - // remove path parts that are globby - do { - str = pathPosixDirname(str); - } while (isGlob(str) || globby.test(str)); - - // remove escape chars and return result - return str.replace(escaped, '$1'); -}; diff --git a/node_modules/glob-parent/package.json b/node_modules/glob-parent/package.json deleted file mode 100644 index 125c971..0000000 --- a/node_modules/glob-parent/package.json +++ /dev/null @@ -1,48 +0,0 @@ -{ - "name": "glob-parent", - "version": "5.1.2", - "description": "Extract the non-magic parent path from a glob string.", - "author": "Gulp Team <team@gulpjs.com> (https://gulpjs.com/)", - "contributors": [ - "Elan Shanker (https://github.com/es128)", - "Blaine Bublitz <blaine.bublitz@gmail.com>" - ], - "repository": "gulpjs/glob-parent", - "license": "ISC", - "engines": { - "node": ">= 6" - }, - "main": "index.js", - "files": [ - "LICENSE", - "index.js" - ], - "scripts": { - "lint": "eslint .", - "pretest": "npm run lint", - "test": "nyc mocha --async-only", - "azure-pipelines": "nyc mocha --async-only --reporter xunit -O output=test.xunit", - "coveralls": "nyc report --reporter=text-lcov | coveralls" - }, - "dependencies": { - "is-glob": "^4.0.1" - }, - "devDependencies": { - "coveralls": "^3.0.11", - "eslint": "^2.13.1", - "eslint-config-gulp": "^3.0.1", - "expect": "^1.20.2", - "mocha": "^6.0.2", - "nyc": "^13.3.0" - }, - "keywords": [ - "glob", - "parent", - "strip", - "path", - "dirname", - "directory", - "base", - "wildcard" - ] -} diff --git a/node_modules/has-flag/index.js b/node_modules/has-flag/index.js deleted file mode 100644 index 5139728..0000000 --- a/node_modules/has-flag/index.js +++ /dev/null @@ -1,8 +0,0 @@ -'use strict'; -module.exports = (flag, argv) => { - argv = argv || process.argv; - const prefix = flag.startsWith('-') ? '' : (flag.length === 1 ? '-' : '--'); - const pos = argv.indexOf(prefix + flag); - const terminatorPos = argv.indexOf('--'); - return pos !== -1 && (terminatorPos === -1 ? true : pos < terminatorPos); -}; diff --git a/node_modules/has-flag/package.json b/node_modules/has-flag/package.json deleted file mode 100644 index e1eb17a..0000000 --- a/node_modules/has-flag/package.json +++ /dev/null @@ -1,44 +0,0 @@ -{ - "name": "has-flag", - "version": "3.0.0", - "description": "Check if argv has a specific flag", - "license": "MIT", - "repository": "sindresorhus/has-flag", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "engines": { - "node": ">=4" - }, - "scripts": { - "test": "xo && ava" - }, - "files": [ - "index.js" - ], - "keywords": [ - "has", - "check", - "detect", - "contains", - "find", - "flag", - "cli", - "command-line", - "argv", - "process", - "arg", - "args", - "argument", - "arguments", - "getopt", - "minimist", - "optimist" - ], - "devDependencies": { - "ava": "*", - "xo": "*" - } -} diff --git a/node_modules/he/man/he.1 b/node_modules/he/man/he.1 deleted file mode 100644 index 7696628..0000000 --- a/node_modules/he/man/he.1 +++ /dev/null @@ -1,78 +0,0 @@ -.Dd April 5, 2016 -.Dt he 1 -.Sh NAME -.Nm he -.Nd encode/decode HTML entities just like a browser would -.Sh SYNOPSIS -.Nm -.Op Fl -escape Ar string -.br -.Op Fl -encode Ar string -.br -.Op Fl -encode Fl -use-named-refs Fl -everything Fl -allow-unsafe Ar string -.br -.Op Fl -decode Ar string -.br -.Op Fl -decode Fl -attribute Ar string -.br -.Op Fl -decode Fl -strict Ar string -.br -.Op Fl v | -version -.br -.Op Fl h | -help -.Sh DESCRIPTION -.Nm -encodes/decodes HTML entities in strings just like a browser would. -.Sh OPTIONS -.Bl -ohang -offset -.It Sy "--escape" -Take a string of text and escape it for use in text contexts in XML or HTML documents. Only the following characters are escaped: `&`, `<`, `>`, `"`, and `'`. -.It Sy "--encode" -Take a string of text and encode any symbols that aren't printable ASCII symbols and that can be replaced with character references. For example, it would turn `©` into `©`, but it wouldn't turn `+` into `+` since there is no point in doing so. Additionally, it replaces any remaining non-ASCII symbols with a hexadecimal escape sequence (e.g. `𝌆`). The return value of this function is always valid HTML. -.It Sy "--encode --use-named-refs" -Enable the use of named character references (like `©`) in the output. If compatibility with older browsers is a concern, don't use this option. -.It Sy "--encode --everything" -Encode every symbol in the input string, even safe printable ASCII symbols. -.It Sy "--encode --allow-unsafe" -Encode non-ASCII characters only. This leaves unsafe HTML/XML symbols like `&`, `<`, `>`, `"`, and `'` intact. -.It Sy "--encode --decimal" -Use decimal digits rather than hexadecimal digits for encoded character references, e.g. output `©` instead of `©`. -.It Sy "--decode" -Takes a string of HTML and decode any named and numerical character references in it using the algorithm described in the HTML spec. -.It Sy "--decode --attribute" -Parse the input as if it was an HTML attribute value rather than a string in an HTML text content. -.It Sy "--decode --strict" -Throw an error if an invalid character reference is encountered. -.It Sy "-v, --version" -Print he's version. -.It Sy "-h, --help" -Show the help screen. -.El -.Sh EXIT STATUS -The -.Nm he -utility exits with one of the following values: -.Pp -.Bl -tag -width flag -compact -.It Li 0 -.Nm -did what it was instructed to do successfully; either it encoded/decoded the input and printed the result, or it printed the version or usage message. -.It Li 1 -.Nm -encountered an error. -.El -.Sh EXAMPLES -.Bl -ohang -offset -.It Sy "he --escape '<script>alert(1)</script>'" -Print an escaped version of the given string that is safe for use in HTML text contexts, escaping only `&`, `<`, `>`, `"`, and `'`. -.It Sy "he --decode '©𝌆'" -Print the decoded version of the given HTML string. -.It Sy "echo\ '©𝌆'\ |\ he --decode" -Print the decoded version of the HTML string that gets piped in. -.El -.Sh BUGS -he's bug tracker is located at <https://github.com/mathiasbynens/he/issues>. -.Sh AUTHOR -Mathias Bynens <https://mathiasbynens.be/> -.Sh WWW -<https://mths.be/he> diff --git a/node_modules/htmlparser2/lib/Parser.d.ts b/node_modules/htmlparser2/lib/Parser.d.ts deleted file mode 100644 index b617674..0000000 --- a/node_modules/htmlparser2/lib/Parser.d.ts +++ /dev/null @@ -1,198 +0,0 @@ -import Tokenizer, { type Callbacks, QuoteType } from "./Tokenizer.js"; -export interface ParserOptions { - /** - * Indicates whether special tags (`<script>`, `<style>`, and `<title>`) should get special treatment - * and if "empty" tags (eg. `<br>`) can have children. If `false`, the content of special tags - * will be text only. For feeds and other XML content (documents that don't consist of HTML), - * set this to `true`. - * - * @default false - */ - xmlMode?: boolean; - /** - * Decode entities within the document. - * - * @default true - */ - decodeEntities?: boolean; - /** - * If set to true, all tags will be lowercased. - * - * @default !xmlMode - */ - lowerCaseTags?: boolean; - /** - * If set to `true`, all attribute names will be lowercased. This has noticeable impact on speed. - * - * @default !xmlMode - */ - lowerCaseAttributeNames?: boolean; - /** - * If set to true, CDATA sections will be recognized as text even if the xmlMode option is not enabled. - * NOTE: If xmlMode is set to `true` then CDATA sections will always be recognized as text. - * - * @default xmlMode - */ - recognizeCDATA?: boolean; - /** - * If set to `true`, self-closing tags will trigger the onclosetag event even if xmlMode is not set to `true`. - * NOTE: If xmlMode is set to `true` then self-closing tags will always be recognized. - * - * @default xmlMode - */ - recognizeSelfClosing?: boolean; - /** - * Allows the default tokenizer to be overwritten. - */ - Tokenizer?: typeof Tokenizer; -} -export interface Handler { - onparserinit(parser: Parser): void; - /** - * Resets the handler back to starting state - */ - onreset(): void; - /** - * Signals the handler that parsing is done - */ - onend(): void; - onerror(error: Error): void; - onclosetag(name: string, isImplied: boolean): void; - onopentagname(name: string): void; - /** - * - * @param name Name of the attribute - * @param value Value of the attribute. - * @param quote Quotes used around the attribute. `null` if the attribute has no quotes around the value, `undefined` if the attribute has no value. - */ - onattribute(name: string, value: string, quote?: string | undefined | null): void; - onopentag(name: string, attribs: { - [s: string]: string; - }, isImplied: boolean): void; - ontext(data: string): void; - oncomment(data: string): void; - oncdatastart(): void; - oncdataend(): void; - oncommentend(): void; - onprocessinginstruction(name: string, data: string): void; -} -export declare class Parser implements Callbacks { - private readonly options; - /** The start index of the last event. */ - startIndex: number; - /** The end index of the last event. */ - endIndex: number; - /** - * Store the start index of the current open tag, - * so we can update the start index for attributes. - */ - private openTagStart; - private tagname; - private attribname; - private attribvalue; - private attribs; - private readonly stack; - /** Determines whether self-closing tags are recognized. */ - private readonly foreignContext; - private readonly cbs; - private readonly lowerCaseTagNames; - private readonly lowerCaseAttributeNames; - private readonly recognizeSelfClosing; - /** We are parsing HTML. Inverse of the `xmlMode` option. */ - private readonly htmlMode; - private readonly tokenizer; - private readonly buffers; - private bufferOffset; - /** The index of the last written buffer. Used when resuming after a `pause()`. */ - private writeIndex; - /** Indicates whether the parser has finished running / `.end` has been called. */ - private ended; - constructor(cbs?: Partial<Handler> | null, options?: ParserOptions); - /** @internal */ - ontext(start: number, endIndex: number): void; - /** @internal */ - ontextentity(cp: number, endIndex: number): void; - /** - * Checks if the current tag is a void element. Override this if you want - * to specify your own additional void elements. - */ - protected isVoidElement(name: string): boolean; - /** @internal */ - onopentagname(start: number, endIndex: number): void; - private emitOpenTag; - private endOpenTag; - /** @internal */ - onopentagend(endIndex: number): void; - /** @internal */ - onclosetag(start: number, endIndex: number): void; - /** @internal */ - onselfclosingtag(endIndex: number): void; - private closeCurrentTag; - /** @internal */ - onattribname(start: number, endIndex: number): void; - /** @internal */ - onattribdata(start: number, endIndex: number): void; - /** @internal */ - onattribentity(cp: number): void; - /** @internal */ - onattribend(quote: QuoteType, endIndex: number): void; - private getInstructionName; - /** @internal */ - ondeclaration(start: number, endIndex: number): void; - /** @internal */ - onprocessinginstruction(start: number, endIndex: number): void; - /** @internal */ - oncomment(start: number, endIndex: number, offset: number): void; - /** @internal */ - oncdata(start: number, endIndex: number, offset: number): void; - /** @internal */ - onend(): void; - /** - * Resets the parser to a blank state, ready to parse a new HTML document - */ - reset(): void; - /** - * Resets the parser, then parses a complete document and - * pushes it to the handler. - * - * @param data Document to parse. - */ - parseComplete(data: string): void; - private getSlice; - private shiftBuffer; - /** - * Parses a chunk of data and calls the corresponding callbacks. - * - * @param chunk Chunk to parse. - */ - write(chunk: string): void; - /** - * Parses the end of the buffer and clears the stack, calls onend. - * - * @param chunk Optional final chunk to parse. - */ - end(chunk?: string): void; - /** - * Pauses parsing. The parser won't emit events until `resume` is called. - */ - pause(): void; - /** - * Resumes parsing after `pause` was called. - */ - resume(): void; - /** - * Alias of `write`, for backwards compatibility. - * - * @param chunk Chunk to parse. - * @deprecated - */ - parseChunk(chunk: string): void; - /** - * Alias of `end`, for backwards compatibility. - * - * @param chunk Optional final chunk to parse. - * @deprecated - */ - done(chunk?: string): void; -} -//# sourceMappingURL=Parser.d.ts.map \ No newline at end of file diff --git a/node_modules/htmlparser2/lib/Parser.d.ts.map b/node_modules/htmlparser2/lib/Parser.d.ts.map deleted file mode 100644 index 3078c42..0000000 --- a/node_modules/htmlparser2/lib/Parser.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Parser.d.ts","sourceRoot":"https://raw.githubusercontent.com/fb55/htmlparser2/e2939a6c7b05d5c4845b4a2e458a4fc0a65a321d/src/","sources":["Parser.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,EAAE,EAAE,KAAK,SAAS,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAuGtE,MAAM,WAAW,aAAa;IAC1B;;;;;;;OAOG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAElB;;;;OAIG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;IAEzB;;;;OAIG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;IAExB;;;;OAIG;IACH,uBAAuB,CAAC,EAAE,OAAO,CAAC;IAElC;;;;;OAKG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;IAEzB;;;;;OAKG;IACH,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAE/B;;OAEG;IACH,SAAS,CAAC,EAAE,OAAO,SAAS,CAAC;CAChC;AAED,MAAM,WAAW,OAAO;IACpB,YAAY,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IAEnC;;OAEG;IACH,OAAO,IAAI,IAAI,CAAC;I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AI;CAGpC"} \ No newline at end of file diff --git a/node_modules/htmlparser2/lib/Parser.js b/node_modules/htmlparser2/lib/Parser.js deleted file mode 100644 index 77cf9d3..0000000 --- a/node_modules/htmlparser2/lib/Parser.js +++ /dev/null @@ -1,519 +0,0 @@ -"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 __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}); -var __importStar = (this && this.__importStar) || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.Parser = void 0; -var Tokenizer_js_1 = __importStar(require("./Tokenizer.js")); -var decode_js_1 = require("entities/lib/decode.js"); -var formTags = new Set([ - "input", - "option", - "optgroup", - "select", - "button", - "datalist", - "textarea", -]); -var pTag = new Set(["p"]); -var tableSectionTags = new Set(["thead", "tbody"]); -var ddtTags = new Set(["dd", "dt"]); -var rtpTags = new Set(["rt", "rp"]); -var openImpliesClose = new Map([ - ["tr", new Set(["tr", "th", "td"])], - ["th", new Set(["th"])], - ["td", new Set(["thead", "th", "td"])], - ["body", new Set(["head", "link", "script"])], - ["li", new Set(["li"])], - ["p", pTag], - ["h1", pTag], - ["h2", pTag], - ["h3", pTag], - ["h4", pTag], - ["h5", pTag], - ["h6", pTag], - ["select", formTags], - ["input", formTags], - ["output", formTags], - ["button", formTags], - ["datalist", formTags], - ["textarea", formTags], - ["option", new Set(["option"])], - ["optgroup", new Set(["optgroup", "option"])], - ["dd", ddtTags], - ["dt", ddtTags], - ["address", pTag], - ["article", pTag], - ["aside", pTag], - ["blockquote", pTag], - ["details", pTag], - ["div", pTag], - ["dl", pTag], - ["fieldset", pTag], - ["figcaption", pTag], - ["figure", pTag], - ["footer", pTag], - ["form", pTag], - ["header", pTag], - ["hr", pTag], - ["main", pTag], - ["nav", pTag], - ["ol", pTag], - ["pre", pTag], - ["section", pTag], - ["table", pTag], - ["ul", pTag], - ["rt", rtpTags], - ["rp", rtpTags], - ["tbody", tableSectionTags], - ["tfoot", tableSectionTags], -]); -var voidElements = new Set([ - "area", - "base", - "basefont", - "br", - "col", - "command", - "embed", - "frame", - "hr", - "img", - "input", - "isindex", - "keygen", - "link", - "meta", - "param", - "source", - "track", - "wbr", -]); -var foreignContextElements = new Set(["math", "svg"]); -var htmlIntegrationElements = new Set([ - "mi", - "mo", - "mn", - "ms", - "mtext", - "annotation-xml", - "foreignobject", - "desc", - "title", -]); -var reNameEnd = /\s|\//; -var Parser = /** @class */ (function () { - function Parser(cbs, options) { - if (options === void 0) { options = {}; } - var _a, _b, _c, _d, _e, _f; - this.options = options; - /** The start index of the last event. */ - this.startIndex = 0; - /** The end index of the last event. */ - this.endIndex = 0; - /** - * Store the start index of the current open tag, - * so we can update the start index for attributes. - */ - this.openTagStart = 0; - this.tagname = ""; - this.attribname = ""; - this.attribvalue = ""; - this.attribs = null; - this.stack = []; - this.buffers = []; - this.bufferOffset = 0; - /** The index of the last written buffer. Used when resuming after a `pause()`. */ - this.writeIndex = 0; - /** Indicates whether the parser has finished running / `.end` has been called. */ - this.ended = false; - this.cbs = cbs !== null && cbs !== void 0 ? cbs : {}; - this.htmlMode = !this.options.xmlMode; - this.lowerCaseTagNames = (_a = options.lowerCaseTags) !== null && _a !== void 0 ? _a : this.htmlMode; - this.lowerCaseAttributeNames = - (_b = options.lowerCaseAttributeNames) !== null && _b !== void 0 ? _b : this.htmlMode; - this.recognizeSelfClosing = - (_c = options.recognizeSelfClosing) !== null && _c !== void 0 ? _c : !this.htmlMode; - this.tokenizer = new ((_d = options.Tokenizer) !== null && _d !== void 0 ? _d : Tokenizer_js_1.default)(this.options, this); - this.foreignContext = [!this.htmlMode]; - (_f = (_e = this.cbs).onparserinit) === null || _f === void 0 ? void 0 : _f.call(_e, this); - } - // Tokenizer event handlers - /** @internal */ - Parser.prototype.ontext = function (start, endIndex) { - var _a, _b; - var data = this.getSlice(start, endIndex); - this.endIndex = endIndex - 1; - (_b = (_a = this.cbs).ontext) === null || _b === void 0 ? void 0 : _b.call(_a, data); - this.startIndex = endIndex; - }; - /** @internal */ - Parser.prototype.ontextentity = function (cp, endIndex) { - var _a, _b; - this.endIndex = endIndex - 1; - (_b = (_a = this.cbs).ontext) === null || _b === void 0 ? void 0 : _b.call(_a, (0, decode_js_1.fromCodePoint)(cp)); - this.startIndex = endIndex; - }; - /** - * Checks if the current tag is a void element. Override this if you want - * to specify your own additional void elements. - */ - Parser.prototype.isVoidElement = function (name) { - return this.htmlMode && voidElements.has(name); - }; - /** @internal */ - Parser.prototype.onopentagname = function (start, endIndex) { - this.endIndex = endIndex; - var name = this.getSlice(start, endIndex); - if (this.lowerCaseTagNames) { - name = name.toLowerCase(); - } - this.emitOpenTag(name); - }; - Parser.prototype.emitOpenTag = function (name) { - var _a, _b, _c, _d; - this.openTagStart = this.startIndex; - this.tagname = name; - var impliesClose = this.htmlMode && openImpliesClose.get(name); - if (impliesClose) { - while (this.stack.length > 0 && impliesClose.has(this.stack[0])) { - var element = this.stack.shift(); - (_b = (_a = this.cbs).onclosetag) === null || _b === void 0 ? void 0 : _b.call(_a, element, true); - } - } - if (!this.isVoidElement(name)) { - this.stack.unshift(name); - if (this.htmlMode) { - if (foreignContextElements.has(name)) { - this.foreignContext.unshift(true); - } - else if (htmlIntegrationElements.has(name)) { - this.foreignContext.unshift(false); - } - } - } - (_d = (_c = this.cbs).onopentagname) === null || _d === void 0 ? void 0 : _d.call(_c, name); - if (this.cbs.onopentag) - this.attribs = {}; - }; - Parser.prototype.endOpenTag = function (isImplied) { - var _a, _b; - this.startIndex = this.openTagStart; - if (this.attribs) { - (_b = (_a = this.cbs).onopentag) === null || _b === void 0 ? void 0 : _b.call(_a, this.tagname, this.attribs, isImplied); - this.attribs = null; - } - if (this.cbs.onclosetag && this.isVoidElement(this.tagname)) { - this.cbs.onclosetag(this.tagname, true); - } - this.tagname = ""; - }; - /** @internal */ - Parser.prototype.onopentagend = function (endIndex) { - this.endIndex = endIndex; - this.endOpenTag(false); - // Set `startIndex` for next node - this.startIndex = endIndex + 1; - }; - /** @internal */ - Parser.prototype.onclosetag = function (start, endIndex) { - var _a, _b, _c, _d, _e, _f, _g, _h; - this.endIndex = endIndex; - var name = this.getSlice(start, endIndex); - if (this.lowerCaseTagNames) { - name = name.toLowerCase(); - } - if (this.htmlMode && - (foreignContextElements.has(name) || - htmlIntegrationElements.has(name))) { - this.foreignContext.shift(); - } - if (!this.isVoidElement(name)) { - var pos = this.stack.indexOf(name); - if (pos !== -1) { - for (var index = 0; index <= pos; index++) { - var element = this.stack.shift(); - // We know the stack has sufficient elements. - (_b = (_a = this.cbs).onclosetag) === null || _b === void 0 ? void 0 : _b.call(_a, element, index !== pos); - } - } - else if (this.htmlMode && name === "p") { - // Implicit open before close - this.emitOpenTag("p"); - this.closeCurrentTag(true); - } - } - else if (this.htmlMode && name === "br") { - // We can't use `emitOpenTag` for implicit open, as `br` would be implicitly closed. - (_d = (_c = this.cbs).onopentagname) === null || _d === void 0 ? void 0 : _d.call(_c, "br"); - (_f = (_e = this.cbs).onopentag) === null || _f === void 0 ? void 0 : _f.call(_e, "br", {}, true); - (_h = (_g = this.cbs).onclosetag) === null || _h === void 0 ? void 0 : _h.call(_g, "br", false); - } - // Set `startIndex` for next node - this.startIndex = endIndex + 1; - }; - /** @internal */ - Parser.prototype.onselfclosingtag = function (endIndex) { - this.endIndex = endIndex; - if (this.recognizeSelfClosing || this.foreignContext[0]) { - this.closeCurrentTag(false); - // Set `startIndex` for next node - this.startIndex = endIndex + 1; - } - else { - // Ignore the fact that the tag is self-closing. - this.onopentagend(endIndex); - } - }; - Parser.prototype.closeCurrentTag = function (isOpenImplied) { - var _a, _b; - var name = this.tagname; - this.endOpenTag(isOpenImplied); - // Self-closing tags will be on the top of the stack - if (this.stack[0] === name) { - // If the opening tag isn't implied, the closing tag has to be implied. - (_b = (_a = this.cbs).onclosetag) === null || _b === void 0 ? void 0 : _b.call(_a, name, !isOpenImplied); - this.stack.shift(); - } - }; - /** @internal */ - Parser.prototype.onattribname = function (start, endIndex) { - this.startIndex = start; - var name = this.getSlice(start, endIndex); - this.attribname = this.lowerCaseAttributeNames - ? name.toLowerCase() - : name; - }; - /** @internal */ - Parser.prototype.onattribdata = function (start, endIndex) { - this.attribvalue += this.getSlice(start, endIndex); - }; - /** @internal */ - Parser.prototype.onattribentity = function (cp) { - this.attribvalue += (0, decode_js_1.fromCodePoint)(cp); - }; - /** @internal */ - Parser.prototype.onattribend = function (quote, endIndex) { - var _a, _b; - this.endIndex = endIndex; - (_b = (_a = this.cbs).onattribute) === null || _b === void 0 ? void 0 : _b.call(_a, this.attribname, this.attribvalue, quote === Tokenizer_js_1.QuoteType.Double - ? '"' - : quote === Tokenizer_js_1.QuoteType.Single - ? "'" - : quote === Tokenizer_js_1.QuoteType.NoValue - ? undefined - : null); - if (this.attribs && - !Object.prototype.hasOwnProperty.call(this.attribs, this.attribname)) { - this.attribs[this.attribname] = this.attribvalue; - } - this.attribvalue = ""; - }; - Parser.prototype.getInstructionName = function (value) { - var index = value.search(reNameEnd); - var name = index < 0 ? value : value.substr(0, index); - if (this.lowerCaseTagNames) { - name = name.toLowerCase(); - } - return name; - }; - /** @internal */ - Parser.prototype.ondeclaration = function (start, endIndex) { - this.endIndex = endIndex; - var value = this.getSlice(start, endIndex); - if (this.cbs.onprocessinginstruction) { - var name = this.getInstructionName(value); - this.cbs.onprocessinginstruction("!".concat(name), "!".concat(value)); - } - // Set `startIndex` for next node - this.startIndex = endIndex + 1; - }; - /** @internal */ - Parser.prototype.onprocessinginstruction = function (start, endIndex) { - this.endIndex = endIndex; - var value = this.getSlice(start, endIndex); - if (this.cbs.onprocessinginstruction) { - var name = this.getInstructionName(value); - this.cbs.onprocessinginstruction("?".concat(name), "?".concat(value)); - } - // Set `startIndex` for next node - this.startIndex = endIndex + 1; - }; - /** @internal */ - Parser.prototype.oncomment = function (start, endIndex, offset) { - var _a, _b, _c, _d; - this.endIndex = endIndex; - (_b = (_a = this.cbs).oncomment) === null || _b === void 0 ? void 0 : _b.call(_a, this.getSlice(start, endIndex - offset)); - (_d = (_c = this.cbs).oncommentend) === null || _d === void 0 ? void 0 : _d.call(_c); - // Set `startIndex` for next node - this.startIndex = endIndex + 1; - }; - /** @internal */ - Parser.prototype.oncdata = function (start, endIndex, offset) { - var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k; - this.endIndex = endIndex; - var value = this.getSlice(start, endIndex - offset); - if (!this.htmlMode || this.options.recognizeCDATA) { - (_b = (_a = this.cbs).oncdatastart) === null || _b === void 0 ? void 0 : _b.call(_a); - (_d = (_c = this.cbs).ontext) === null || _d === void 0 ? void 0 : _d.call(_c, value); - (_f = (_e = this.cbs).oncdataend) === null || _f === void 0 ? void 0 : _f.call(_e); - } - else { - (_h = (_g = this.cbs).oncomment) === null || _h === void 0 ? void 0 : _h.call(_g, "[CDATA[".concat(value, "]]")); - (_k = (_j = this.cbs).oncommentend) === null || _k === void 0 ? void 0 : _k.call(_j); - } - // Set `startIndex` for next node - this.startIndex = endIndex + 1; - }; - /** @internal */ - Parser.prototype.onend = function () { - var _a, _b; - if (this.cbs.onclosetag) { - // Set the end index for all remaining tags - this.endIndex = this.startIndex; - for (var index = 0; index < this.stack.length; index++) { - this.cbs.onclosetag(this.stack[index], true); - } - } - (_b = (_a = this.cbs).onend) === null || _b === void 0 ? void 0 : _b.call(_a); - }; - /** - * Resets the parser to a blank state, ready to parse a new HTML document - */ - Parser.prototype.reset = function () { - var _a, _b, _c, _d; - (_b = (_a = this.cbs).onreset) === null || _b === void 0 ? void 0 : _b.call(_a); - this.tokenizer.reset(); - this.tagname = ""; - this.attribname = ""; - this.attribs = null; - this.stack.length = 0; - this.startIndex = 0; - this.endIndex = 0; - (_d = (_c = this.cbs).onparserinit) === null || _d === void 0 ? void 0 : _d.call(_c, this); - this.buffers.length = 0; - this.foreignContext.length = 0; - this.foreignContext.unshift(!this.htmlMode); - this.bufferOffset = 0; - this.writeIndex = 0; - this.ended = false; - }; - /** - * Resets the parser, then parses a complete document and - * pushes it to the handler. - * - * @param data Document to parse. - */ - Parser.prototype.parseComplete = function (data) { - this.reset(); - this.end(data); - }; - Parser.prototype.getSlice = function (start, end) { - while (start - this.bufferOffset >= this.buffers[0].length) { - this.shiftBuffer(); - } - var slice = this.buffers[0].slice(start - this.bufferOffset, end - this.bufferOffset); - while (end - this.bufferOffset > this.buffers[0].length) { - this.shiftBuffer(); - slice += this.buffers[0].slice(0, end - this.bufferOffset); - } - return slice; - }; - Parser.prototype.shiftBuffer = function () { - this.bufferOffset += this.buffers[0].length; - this.writeIndex--; - this.buffers.shift(); - }; - /** - * Parses a chunk of data and calls the corresponding callbacks. - * - * @param chunk Chunk to parse. - */ - Parser.prototype.write = function (chunk) { - var _a, _b; - if (this.ended) { - (_b = (_a = this.cbs).onerror) === null || _b === void 0 ? void 0 : _b.call(_a, new Error(".write() after done!")); - return; - } - this.buffers.push(chunk); - if (this.tokenizer.running) { - this.tokenizer.write(chunk); - this.writeIndex++; - } - }; - /** - * Parses the end of the buffer and clears the stack, calls onend. - * - * @param chunk Optional final chunk to parse. - */ - Parser.prototype.end = function (chunk) { - var _a, _b; - if (this.ended) { - (_b = (_a = this.cbs).onerror) === null || _b === void 0 ? void 0 : _b.call(_a, new Error(".end() after done!")); - return; - } - if (chunk) - this.write(chunk); - this.ended = true; - this.tokenizer.end(); - }; - /** - * Pauses parsing. The parser won't emit events until `resume` is called. - */ - Parser.prototype.pause = function () { - this.tokenizer.pause(); - }; - /** - * Resumes parsing after `pause` was called. - */ - Parser.prototype.resume = function () { - this.tokenizer.resume(); - while (this.tokenizer.running && - this.writeIndex < this.buffers.length) { - this.tokenizer.write(this.buffers[this.writeIndex++]); - } - if (this.ended) - this.tokenizer.end(); - }; - /** - * Alias of `write`, for backwards compatibility. - * - * @param chunk Chunk to parse. - * @deprecated - */ - Parser.prototype.parseChunk = function (chunk) { - this.write(chunk); - }; - /** - * Alias of `end`, for backwards compatibility. - * - * @param chunk Optional final chunk to parse. - * @deprecated - */ - Parser.prototype.done = function (chunk) { - this.end(chunk); - }; - return Parser; -}()); -exports.Parser = Parser; -//# sourceMappingURL=Parser.js.map \ No newline at end of file diff --git a/node_modules/htmlparser2/lib/Parser.js.map b/node_modules/htmlparser2/lib/Parser.js.map deleted file mode 100644 index 4083cb1..0000000 --- a/node_modules/htmlparser2/lib/Parser.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Parser.js","sourceRoot":"https://raw.githubusercontent.com/fb55/htmlparser2/e2939a6c7b05d5c4845b4a2e458a4fc0a65a321d/src/","sources":["Parser.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6DAAsE;AACtE,oDAAuD;AAEvD,IAAM,QAAQ,GAAG,IAAI,GAAG,CAAC;IACrB,OAAO;IACP,QAAQ;IACR,UAAU;IACV,QAAQ;IACR,QAAQ;IACR,UAAU;IACV,UAAU;CACb,CAAC,CAAC;AACH,IAAM,IAAI,GAAG,IAAI,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;AAC5B,IAAM,gBAAgB,GAAG,IAAI,GAAG,CAAC,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC;AACrD,IAAM,OAAO,GAAG,IAAI,GAAG,CAAC,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC,CAAC;AACtC,IAAM,OAAO,GAAG,IAAI,GAAG,CA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AC;IACpB,CAAC;IACL,aAAC;AAAD,CAAC,AAhdD,IAgdC;AAhdY,wBAAM"} \ No newline at end of file diff --git a/node_modules/htmlparser2/lib/Tokenizer.d.ts b/node_modules/htmlparser2/lib/Tokenizer.d.ts deleted file mode 100644 index 8472742..0000000 --- a/node_modules/htmlparser2/lib/Tokenizer.d.ts +++ /dev/null @@ -1,126 +0,0 @@ -export declare enum QuoteType { - NoValue = 0, - Unquoted = 1, - Single = 2, - Double = 3 -} -export interface Callbacks { - onattribdata(start: number, endIndex: number): void; - onattribentity(codepoint: number): void; - onattribend(quote: QuoteType, endIndex: number): void; - onattribname(start: number, endIndex: number): void; - oncdata(start: number, endIndex: number, endOffset: number): void; - onclosetag(start: number, endIndex: number): void; - oncomment(start: number, endIndex: number, endOffset: number): void; - ondeclaration(start: number, endIndex: number): void; - onend(): void; - onopentagend(endIndex: number): void; - onopentagname(start: number, endIndex: number): void; - onprocessinginstruction(start: number, endIndex: number): void; - onselfclosingtag(endIndex: number): void; - ontext(start: number, endIndex: number): void; - ontextentity(codepoint: number, endIndex: number): void; -} -export default class Tokenizer { - private readonly cbs; - /** The current state the tokenizer is in. */ - private state; - /** The read buffer. */ - private buffer; - /** The beginning of the section that is currently being read. */ - private sectionStart; - /** The index within the buffer that we are currently looking at. */ - private index; - /** The start of the last entity. */ - private entityStart; - /** Some behavior, eg. when decoding entities, is done while we are in another state. This keeps track of the other state type. */ - private baseState; - /** For special parsing behavior inside of script and style tags. */ - private isSpecial; - /** Indicates whether the tokenizer has been paused. */ - running: boolean; - /** The offset of the current buffer. */ - private offset; - private readonly xmlMode; - private readonly decodeEntities; - private readonly entityDecoder; - constructor({ xmlMode, decodeEntities, }: { - xmlMode?: boolean; - decodeEntities?: boolean; - }, cbs: Callbacks); - reset(): void; - write(chunk: string): void; - end(): void; - pause(): void; - resume(): void; - private stateText; - private currentSequence; - private sequenceIndex; - private stateSpecialStartSequence; - /** Look for an end tag. For <title> tags, also decode entities. */ - private stateInSpecialTag; - private stateCDATASequence; - /** - * When we wait for one specific character, we can speed things up - * by skipping through the buffer until we find it. - * - * @returns Whether the character was found. - */ - private fastForwardTo; - /** - * Comments and CDATA end with `-->` and `]]>`. - * - * Their common qualities are: - * - Their end sequences have a distinct character they start with. - * - That character is then repeated, so we have to check multiple repeats. - * - All characters but the start character of the sequence can be skipped. - */ - private stateInCommentLike; - /** - * HTML only allows ASCII alpha characters (a-z and A-Z) at the beginning of a tag name. - * - * XML allows a lot more characters here (@see https://www.w3.org/TR/REC-xml/#NT-NameStartChar). - * We allow anything that wouldn't end the tag. - */ - private isTagStartChar; - private startSpecial; - private stateBeforeTagName; - private stateInTagName; - private stateBeforeClosingTagName; - private stateInClosingTagName; - private stateAfterClosingTagName; - private stateBeforeAttributeName; - private stateInSelfClosingTag; - private stateInAttributeName; - private stateAfterAttributeName; - private stateBeforeAttributeValue; - private handleInAttributeValue; - private stateInAttributeValueDoubleQuotes; - private stateInAttributeValueSingleQuotes; - private stateInAttributeValueNoQuotes; - private stateBeforeDeclaration; - private stateInDeclaration; - private stateInProcessingInstruction; - private stateBeforeComment; - private stateInSpecialComment; - private stateBeforeSpecialS; - private stateBeforeSpecialT; - private startEntity; - private stateInEntity; - /** - * Remove data that has already been consumed from the buffer. - */ - private cleanup; - private shouldContinue; - /** - * Iterates through the buffer, calling the function corresponding to the current state. - * - * States that are more likely to be hit are higher up, as a performance improvement. - */ - private parse; - private finish; - /** Handle any trailing data. */ - private handleTrailingData; - private emitCodePoint; -} -//# sourceMappingURL=Tokenizer.d.ts.map \ No newline at end of file diff --git a/node_modules/htmlparser2/lib/Tokenizer.d.ts.map b/node_modules/htmlparser2/lib/Tokenizer.d.ts.map deleted file mode 100644 index 31148ea..0000000 --- a/node_modules/htmlparser2/lib/Tokenizer.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Tokenizer.d.ts","sourceRoot":"https://raw.githubusercontent.com/fb55/htmlparser2/e2939a6c7b05d5c4845b4a2e458a4fc0a65a321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1B;;;;;OAKG;IACH,OAAO,CAAC,cAAc;IAItB,OAAO,CAAC,YAAY;IAOpB,OAAO,CAAC,kBAAkB;IA0B1B,OAAO,CAAC,cAAc;IAQtB,OAAO,CAAC,yBAAyB;IAYjC,OAAO,CAAC,qBAAqB;IAQ7B,OAAO,CAAC,wBAAwB;IAOhC,OAAO,CAAC,wBAAwB;IAiBhC,OAAO,CAAC,qBAAqB;IAW7B,OAAO,CAAC,oBAAoB;IAQ5B,OAAO,CAAC,uBAAuB;IAc/B,OAAO,CAAC,yBAAyB;IAajC,OAAO,CAAC,sBAAsB;IAkB9B,OAAO,CAAC,iCAAiC;IAGzC,OAAO,CAAC,iCAAiC;IAGzC,OAAO,CAAC,6BAA6B;IAWrC,OAAO,CAAC,sBAAsB;IAW9B,OAAO,CAAC,kBAAkB;IAO1B,OAAO,CAAC,4BAA4B;IAOpC,OAAO,CAAC,kBAAkB;IAW1B,OAAO,CAAC,qBAAqB;IAO7B,OAAO,CAAC,mBAAmB;IAY3B,OAAO,CAAC,mBAAmB;IAY3B,OAAO,CAAC,WAAW;IAcnB,OAAO,CAAC,aAAa;IAmBrB;;OAEG;IACH,OAAO,CAAC,OAAO;IAoBf,OAAO,CAAC,cAAc;IAItB;;;;OAIG;IACH,OAAO,CAAC,KAAK;IAkHb,OAAO,CAAC,MAAM;IAWd,gCAAgC;IAChC,OAAO,CAAC,kBAAkB;IAkC1B,OAAO,CAAC,aAAa;CAsBxB"} \ No newline at end of file diff --git a/node_modules/htmlparser2/lib/Tokenizer.js b/node_modules/htmlparser2/lib/Tokenizer.js deleted file mode 100644 index d7cdd34..0000000 --- a/node_modules/htmlparser2/lib/Tokenizer.js +++ /dev/null @@ -1,791 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.QuoteType = void 0; -var decode_js_1 = require("entities/lib/decode.js"); -var CharCodes; -(function (CharCodes) { - CharCodes[CharCodes["Tab"] = 9] = "Tab"; - CharCodes[CharCodes["NewLine"] = 10] = "NewLine"; - CharCodes[CharCodes["FormFeed"] = 12] = "FormFeed"; - CharCodes[CharCodes["CarriageReturn"] = 13] = "CarriageReturn"; - CharCodes[CharCodes["Space"] = 32] = "Space"; - CharCodes[CharCodes["ExclamationMark"] = 33] = "ExclamationMark"; - CharCodes[CharCodes["Number"] = 35] = "Number"; - CharCodes[CharCodes["Amp"] = 38] = "Amp"; - CharCodes[CharCodes["SingleQuote"] = 39] = "SingleQuote"; - CharCodes[CharCodes["DoubleQuote"] = 34] = "DoubleQuote"; - CharCodes[CharCodes["Dash"] = 45] = "Dash"; - CharCodes[CharCodes["Slash"] = 47] = "Slash"; - CharCodes[CharCodes["Zero"] = 48] = "Zero"; - CharCodes[CharCodes["Nine"] = 57] = "Nine"; - CharCodes[CharCodes["Semi"] = 59] = "Semi"; - CharCodes[CharCodes["Lt"] = 60] = "Lt"; - CharCodes[CharCodes["Eq"] = 61] = "Eq"; - CharCodes[CharCodes["Gt"] = 62] = "Gt"; - CharCodes[CharCodes["Questionmark"] = 63] = "Questionmark"; - CharCodes[CharCodes["UpperA"] = 65] = "UpperA"; - CharCodes[CharCodes["LowerA"] = 97] = "LowerA"; - CharCodes[CharCodes["UpperF"] = 70] = "UpperF"; - CharCodes[CharCodes["LowerF"] = 102] = "LowerF"; - CharCodes[CharCodes["UpperZ"] = 90] = "UpperZ"; - CharCodes[CharCodes["LowerZ"] = 122] = "LowerZ"; - CharCodes[CharCodes["LowerX"] = 120] = "LowerX"; - CharCodes[CharCodes["OpeningSquareBracket"] = 91] = "OpeningSquareBracket"; -})(CharCodes || (CharCodes = {})); -/** All the states the tokenizer can be in. */ -var State; -(function (State) { - State[State["Text"] = 1] = "Text"; - State[State["BeforeTagName"] = 2] = "BeforeTagName"; - State[State["InTagName"] = 3] = "InTagName"; - State[State["InSelfClosingTag"] = 4] = "InSelfClosingTag"; - State[State["BeforeClosingTagName"] = 5] = "BeforeClosingTagName"; - State[State["InClosingTagName"] = 6] = "InClosingTagName"; - State[State["AfterClosingTagName"] = 7] = "AfterClosingTagName"; - // Attributes - State[State["BeforeAttributeName"] = 8] = "BeforeAttributeName"; - State[State["InAttributeName"] = 9] = "InAttributeName"; - State[State["AfterAttributeName"] = 10] = "AfterAttributeName"; - State[State["BeforeAttributeValue"] = 11] = "BeforeAttributeValue"; - State[State["InAttributeValueDq"] = 12] = "InAttributeValueDq"; - State[State["InAttributeValueSq"] = 13] = "InAttributeValueSq"; - State[State["InAttributeValueNq"] = 14] = "InAttributeValueNq"; - // Declarations - State[State["BeforeDeclaration"] = 15] = "BeforeDeclaration"; - State[State["InDeclaration"] = 16] = "InDeclaration"; - // Processing instructions - State[State["InProcessingInstruction"] = 17] = "InProcessingInstruction"; - // Comments & CDATA - State[State["BeforeComment"] = 18] = "BeforeComment"; - State[State["CDATASequence"] = 19] = "CDATASequence"; - State[State["InSpecialComment"] = 20] = "InSpecialComment"; - State[State["InCommentLike"] = 21] = "InCommentLike"; - // Special tags - State[State["BeforeSpecialS"] = 22] = "BeforeSpecialS"; - State[State["BeforeSpecialT"] = 23] = "BeforeSpecialT"; - State[State["SpecialStartSequence"] = 24] = "SpecialStartSequence"; - State[State["InSpecialTag"] = 25] = "InSpecialTag"; - State[State["InEntity"] = 26] = "InEntity"; -})(State || (State = {})); -function isWhitespace(c) { - return (c === CharCodes.Space || - c === CharCodes.NewLine || - c === CharCodes.Tab || - c === CharCodes.FormFeed || - c === CharCodes.CarriageReturn); -} -function isEndOfTagSection(c) { - return c === CharCodes.Slash || c === CharCodes.Gt || isWhitespace(c); -} -function isASCIIAlpha(c) { - return ((c >= CharCodes.LowerA && c <= CharCodes.LowerZ) || - (c >= CharCodes.UpperA && c <= CharCodes.UpperZ)); -} -var QuoteType; -(function (QuoteType) { - QuoteType[QuoteType["NoValue"] = 0] = "NoValue"; - QuoteType[QuoteType["Unquoted"] = 1] = "Unquoted"; - QuoteType[QuoteType["Single"] = 2] = "Single"; - QuoteType[QuoteType["Double"] = 3] = "Double"; -})(QuoteType || (exports.QuoteType = QuoteType = {})); -/** - * Sequences used to match longer strings. - * - * We don't have `Script`, `Style`, or `Title` here. Instead, we re-use the *End - * sequences with an increased offset. - */ -var Sequences = { - Cdata: new Uint8Array([0x43, 0x44, 0x41, 0x54, 0x41, 0x5b]), // CDATA[ - CdataEnd: new Uint8Array([0x5d, 0x5d, 0x3e]), // ]]> - CommentEnd: new Uint8Array([0x2d, 0x2d, 0x3e]), // `-->` - ScriptEnd: new Uint8Array([0x3c, 0x2f, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74]), // `</script` - StyleEnd: new Uint8Array([0x3c, 0x2f, 0x73, 0x74, 0x79, 0x6c, 0x65]), // `</style` - TitleEnd: new Uint8Array([0x3c, 0x2f, 0x74, 0x69, 0x74, 0x6c, 0x65]), // `</title` - TextareaEnd: new Uint8Array([ - 0x3c, 0x2f, 0x74, 0x65, 0x78, 0x74, 0x61, 0x72, 0x65, 0x61, - ]), // `</textarea` -}; -var Tokenizer = /** @class */ (function () { - function Tokenizer(_a, cbs) { - var _b = _a.xmlMode, xmlMode = _b === void 0 ? false : _b, _c = _a.decodeEntities, decodeEntities = _c === void 0 ? true : _c; - var _this = this; - this.cbs = cbs; - /** The current state the tokenizer is in. */ - this.state = State.Text; - /** The read buffer. */ - this.buffer = ""; - /** The beginning of the section that is currently being read. */ - this.sectionStart = 0; - /** The index within the buffer that we are currently looking at. */ - this.index = 0; - /** The start of the last entity. */ - this.entityStart = 0; - /** Some behavior, eg. when decoding entities, is done while we are in another state. This keeps track of the other state type. */ - this.baseState = State.Text; - /** For special parsing behavior inside of script and style tags. */ - this.isSpecial = false; - /** Indicates whether the tokenizer has been paused. */ - this.running = true; - /** The offset of the current buffer. */ - this.offset = 0; - this.currentSequence = undefined; - this.sequenceIndex = 0; - this.xmlMode = xmlMode; - this.decodeEntities = decodeEntities; - this.entityDecoder = new decode_js_1.EntityDecoder(xmlMode ? decode_js_1.xmlDecodeTree : decode_js_1.htmlDecodeTree, function (cp, consumed) { return _this.emitCodePoint(cp, consumed); }); - } - Tokenizer.prototype.reset = function () { - this.state = State.Text; - this.buffer = ""; - this.sectionStart = 0; - this.index = 0; - this.baseState = State.Text; - this.currentSequence = undefined; - this.running = true; - this.offset = 0; - }; - Tokenizer.prototype.write = function (chunk) { - this.offset += this.buffer.length; - this.buffer = chunk; - this.parse(); - }; - Tokenizer.prototype.end = function () { - if (this.running) - this.finish(); - }; - Tokenizer.prototype.pause = function () { - this.running = false; - }; - Tokenizer.prototype.resume = function () { - this.running = true; - if (this.index < this.buffer.length + this.offset) { - this.parse(); - } - }; - Tokenizer.prototype.stateText = function (c) { - if (c === CharCodes.Lt || - (!this.decodeEntities && this.fastForwardTo(CharCodes.Lt))) { - if (this.index > this.sectionStart) { - this.cbs.ontext(this.sectionStart, this.index); - } - this.state = State.BeforeTagName; - this.sectionStart = this.index; - } - else if (this.decodeEntities && c === CharCodes.Amp) { - this.startEntity(); - } - }; - Tokenizer.prototype.stateSpecialStartSequence = function (c) { - var isEnd = this.sequenceIndex === this.currentSequence.length; - var isMatch = isEnd - ? // If we are at the end of the sequence, make sure the tag name has ended - isEndOfTagSection(c) - : // Otherwise, do a case-insensitive comparison - (c | 0x20) === this.currentSequence[this.sequenceIndex]; - if (!isMatch) { - this.isSpecial = false; - } - else if (!isEnd) { - this.sequenceIndex++; - return; - } - this.sequenceIndex = 0; - this.state = State.InTagName; - this.stateInTagName(c); - }; - /** Look for an end tag. For <title> tags, also decode entities. */ - Tokenizer.prototype.stateInSpecialTag = function (c) { - if (this.sequenceIndex === this.currentSequence.length) { - if (c === CharCodes.Gt || isWhitespace(c)) { - var endOfText = this.index - this.currentSequence.length; - if (this.sectionStart < endOfText) { - // Spoof the index so that reported locations match up. - var actualIndex = this.index; - this.index = endOfText; - this.cbs.ontext(this.sectionStart, endOfText); - this.index = actualIndex; - } - this.isSpecial = false; - this.sectionStart = endOfText + 2; // Skip over the `</` - this.stateInClosingTagName(c); - return; // We are done; skip the rest of the function. - } - this.sequenceIndex = 0; - } - if ((c | 0x20) === this.currentSequence[this.sequenceIndex]) { - this.sequenceIndex += 1; - } - else if (this.sequenceIndex === 0) { - if (this.currentSequence === Sequences.TitleEnd) { - // We have to parse entities in <title> tags. - if (this.decodeEntities && c === CharCodes.Amp) { - this.startEntity(); - } - } - else if (this.fastForwardTo(CharCodes.Lt)) { - // Outside of <title> tags, we can fast-forward. - this.sequenceIndex = 1; - } - } - else { - // If we see a `<`, set the sequence index to 1; useful for eg. `<</script>`. - this.sequenceIndex = Number(c === CharCodes.Lt); - } - }; - Tokenizer.prototype.stateCDATASequence = function (c) { - if (c === Sequences.Cdata[this.sequenceIndex]) { - if (++this.sequenceIndex === Sequences.Cdata.length) { - this.state = State.InCommentLike; - this.currentSequence = Sequences.CdataEnd; - this.sequenceIndex = 0; - this.sectionStart = this.index + 1; - } - } - else { - this.sequenceIndex = 0; - this.state = State.InDeclaration; - this.stateInDeclaration(c); // Reconsume the character - } - }; - /** - * When we wait for one specific character, we can speed things up - * by skipping through the buffer until we find it. - * - * @returns Whether the character was found. - */ - Tokenizer.prototype.fastForwardTo = function (c) { - while (++this.index < this.buffer.length + this.offset) { - if (this.buffer.charCodeAt(this.index - this.offset) === c) { - return true; - } - } - /* - * We increment the index at the end of the `parse` loop, - * so set it to `buffer.length - 1` here. - * - * TODO: Refactor `parse` to increment index before calling states. - */ - this.index = this.buffer.length + this.offset - 1; - return false; - }; - /** - * Comments and CDATA end with `-->` and `]]>`. - * - * Their common qualities are: - * - Their end sequences have a distinct character they start with. - * - That character is then repeated, so we have to check multiple repeats. - * - All characters but the start character of the sequence can be skipped. - */ - Tokenizer.prototype.stateInCommentLike = function (c) { - if (c === this.currentSequence[this.sequenceIndex]) { - if (++this.sequenceIndex === this.currentSequence.length) { - if (this.currentSequence === Sequences.CdataEnd) { - this.cbs.oncdata(this.sectionStart, this.index, 2); - } - else { - this.cbs.oncomment(this.sectionStart, this.index, 2); - } - this.sequenceIndex = 0; - this.sectionStart = this.index + 1; - this.state = State.Text; - } - } - else if (this.sequenceIndex === 0) { - // Fast-forward to the first character of the sequence - if (this.fastForwardTo(this.currentSequence[0])) { - this.sequenceIndex = 1; - } - } - else if (c !== this.currentSequence[this.sequenceIndex - 1]) { - // Allow long sequences, eg. --->, ]]]> - this.sequenceIndex = 0; - } - }; - /** - * HTML only allows ASCII alpha characters (a-z and A-Z) at the beginning of a tag name. - * - * XML allows a lot more characters here (@see https://www.w3.org/TR/REC-xml/#NT-NameStartChar). - * We allow anything that wouldn't end the tag. - */ - Tokenizer.prototype.isTagStartChar = function (c) { - return this.xmlMode ? !isEndOfTagSection(c) : isASCIIAlpha(c); - }; - Tokenizer.prototype.startSpecial = function (sequence, offset) { - this.isSpecial = true; - this.currentSequence = sequence; - this.sequenceIndex = offset; - this.state = State.SpecialStartSequence; - }; - Tokenizer.prototype.stateBeforeTagName = function (c) { - if (c === CharCodes.ExclamationMark) { - this.state = State.BeforeDeclaration; - this.sectionStart = this.index + 1; - } - else if (c === CharCodes.Questionmark) { - this.state = State.InProcessingInstruction; - this.sectionStart = this.index + 1; - } - else if (this.isTagStartChar(c)) { - var lower = c | 0x20; - this.sectionStart = this.index; - if (this.xmlMode) { - this.state = State.InTagName; - } - else if (lower === Sequences.ScriptEnd[2]) { - this.state = State.BeforeSpecialS; - } - else if (lower === Sequences.TitleEnd[2]) { - this.state = State.BeforeSpecialT; - } - else { - this.state = State.InTagName; - } - } - else if (c === CharCodes.Slash) { - this.state = State.BeforeClosingTagName; - } - else { - this.state = State.Text; - this.stateText(c); - } - }; - Tokenizer.prototype.stateInTagName = function (c) { - if (isEndOfTagSection(c)) { - this.cbs.onopentagname(this.sectionStart, this.index); - this.sectionStart = -1; - this.state = State.BeforeAttributeName; - this.stateBeforeAttributeName(c); - } - }; - Tokenizer.prototype.stateBeforeClosingTagName = function (c) { - if (isWhitespace(c)) { - // Ignore - } - else if (c === CharCodes.Gt) { - this.state = State.Text; - } - else { - this.state = this.isTagStartChar(c) - ? State.InClosingTagName - : State.InSpecialComment; - this.sectionStart = this.index; - } - }; - Tokenizer.prototype.stateInClosingTagName = function (c) { - if (c === CharCodes.Gt || isWhitespace(c)) { - this.cbs.onclosetag(this.sectionStart, this.index); - this.sectionStart = -1; - this.state = State.AfterClosingTagName; - this.stateAfterClosingTagName(c); - } - }; - Tokenizer.prototype.stateAfterClosingTagName = function (c) { - // Skip everything until ">" - if (c === CharCodes.Gt || this.fastForwardTo(CharCodes.Gt)) { - this.state = State.Text; - this.sectionStart = this.index + 1; - } - }; - Tokenizer.prototype.stateBeforeAttributeName = function (c) { - if (c === CharCodes.Gt) { - this.cbs.onopentagend(this.index); - if (this.isSpecial) { - this.state = State.InSpecialTag; - this.sequenceIndex = 0; - } - else { - this.state = State.Text; - } - this.sectionStart = this.index + 1; - } - else if (c === CharCodes.Slash) { - this.state = State.InSelfClosingTag; - } - else if (!isWhitespace(c)) { - this.state = State.InAttributeName; - this.sectionStart = this.index; - } - }; - Tokenizer.prototype.stateInSelfClosingTag = function (c) { - if (c === CharCodes.Gt) { - this.cbs.onselfclosingtag(this.index); - this.state = State.Text; - this.sectionStart = this.index + 1; - this.isSpecial = false; // Reset special state, in case of self-closing special tags - } - else if (!isWhitespace(c)) { - this.state = State.BeforeAttributeName; - this.stateBeforeAttributeName(c); - } - }; - Tokenizer.prototype.stateInAttributeName = function (c) { - if (c === CharCodes.Eq || isEndOfTagSection(c)) { - this.cbs.onattribname(this.sectionStart, this.index); - this.sectionStart = this.index; - this.state = State.AfterAttributeName; - this.stateAfterAttributeName(c); - } - }; - Tokenizer.prototype.stateAfterAttributeName = function (c) { - if (c === CharCodes.Eq) { - this.state = State.BeforeAttributeValue; - } - else if (c === CharCodes.Slash || c === CharCodes.Gt) { - this.cbs.onattribend(QuoteType.NoValue, this.sectionStart); - this.sectionStart = -1; - this.state = State.BeforeAttributeName; - this.stateBeforeAttributeName(c); - } - else if (!isWhitespace(c)) { - this.cbs.onattribend(QuoteType.NoValue, this.sectionStart); - this.state = State.InAttributeName; - this.sectionStart = this.index; - } - }; - Tokenizer.prototype.stateBeforeAttributeValue = function (c) { - if (c === CharCodes.DoubleQuote) { - this.state = State.InAttributeValueDq; - this.sectionStart = this.index + 1; - } - else if (c === CharCodes.SingleQuote) { - this.state = State.InAttributeValueSq; - this.sectionStart = this.index + 1; - } - else if (!isWhitespace(c)) { - this.sectionStart = this.index; - this.state = State.InAttributeValueNq; - this.stateInAttributeValueNoQuotes(c); // Reconsume token - } - }; - Tokenizer.prototype.handleInAttributeValue = function (c, quote) { - if (c === quote || - (!this.decodeEntities && this.fastForwardTo(quote))) { - this.cbs.onattribdata(this.sectionStart, this.index); - this.sectionStart = -1; - this.cbs.onattribend(quote === CharCodes.DoubleQuote - ? QuoteType.Double - : QuoteType.Single, this.index + 1); - this.state = State.BeforeAttributeName; - } - else if (this.decodeEntities && c === CharCodes.Amp) { - this.startEntity(); - } - }; - Tokenizer.prototype.stateInAttributeValueDoubleQuotes = function (c) { - this.handleInAttributeValue(c, CharCodes.DoubleQuote); - }; - Tokenizer.prototype.stateInAttributeValueSingleQuotes = function (c) { - this.handleInAttributeValue(c, CharCodes.SingleQuote); - }; - Tokenizer.prototype.stateInAttributeValueNoQuotes = function (c) { - if (isWhitespace(c) || c === CharCodes.Gt) { - this.cbs.onattribdata(this.sectionStart, this.index); - this.sectionStart = -1; - this.cbs.onattribend(QuoteType.Unquoted, this.index); - this.state = State.BeforeAttributeName; - this.stateBeforeAttributeName(c); - } - else if (this.decodeEntities && c === CharCodes.Amp) { - this.startEntity(); - } - }; - Tokenizer.prototype.stateBeforeDeclaration = function (c) { - if (c === CharCodes.OpeningSquareBracket) { - this.state = State.CDATASequence; - this.sequenceIndex = 0; - } - else { - this.state = - c === CharCodes.Dash - ? State.BeforeComment - : State.InDeclaration; - } - }; - Tokenizer.prototype.stateInDeclaration = function (c) { - if (c === CharCodes.Gt || this.fastForwardTo(CharCodes.Gt)) { - this.cbs.ondeclaration(this.sectionStart, this.index); - this.state = State.Text; - this.sectionStart = this.index + 1; - } - }; - Tokenizer.prototype.stateInProcessingInstruction = function (c) { - if (c === CharCodes.Gt || this.fastForwardTo(CharCodes.Gt)) { - this.cbs.onprocessinginstruction(this.sectionStart, this.index); - this.state = State.Text; - this.sectionStart = this.index + 1; - } - }; - Tokenizer.prototype.stateBeforeComment = function (c) { - if (c === CharCodes.Dash) { - this.state = State.InCommentLike; - this.currentSequence = Sequences.CommentEnd; - // Allow short comments (eg. <!-->) - this.sequenceIndex = 2; - this.sectionStart = this.index + 1; - } - else { - this.state = State.InDeclaration; - } - }; - Tokenizer.prototype.stateInSpecialComment = function (c) { - if (c === CharCodes.Gt || this.fastForwardTo(CharCodes.Gt)) { - this.cbs.oncomment(this.sectionStart, this.index, 0); - this.state = State.Text; - this.sectionStart = this.index + 1; - } - }; - Tokenizer.prototype.stateBeforeSpecialS = function (c) { - var lower = c | 0x20; - if (lower === Sequences.ScriptEnd[3]) { - this.startSpecial(Sequences.ScriptEnd, 4); - } - else if (lower === Sequences.StyleEnd[3]) { - this.startSpecial(Sequences.StyleEnd, 4); - } - else { - this.state = State.InTagName; - this.stateInTagName(c); // Consume the token again - } - }; - Tokenizer.prototype.stateBeforeSpecialT = function (c) { - var lower = c | 0x20; - if (lower === Sequences.TitleEnd[3]) { - this.startSpecial(Sequences.TitleEnd, 4); - } - else if (lower === Sequences.TextareaEnd[3]) { - this.startSpecial(Sequences.TextareaEnd, 4); - } - else { - this.state = State.InTagName; - this.stateInTagName(c); // Consume the token again - } - }; - Tokenizer.prototype.startEntity = function () { - this.baseState = this.state; - this.state = State.InEntity; - this.entityStart = this.index; - this.entityDecoder.startEntity(this.xmlMode - ? decode_js_1.DecodingMode.Strict - : this.baseState === State.Text || - this.baseState === State.InSpecialTag - ? decode_js_1.DecodingMode.Legacy - : decode_js_1.DecodingMode.Attribute); - }; - Tokenizer.prototype.stateInEntity = function () { - var length = this.entityDecoder.write(this.buffer, this.index - this.offset); - // If `length` is positive, we are done with the entity. - if (length >= 0) { - this.state = this.baseState; - if (length === 0) { - this.index = this.entityStart; - } - } - else { - // Mark buffer as consumed. - this.index = this.offset + this.buffer.length - 1; - } - }; - /** - * Remove data that has already been consumed from the buffer. - */ - Tokenizer.prototype.cleanup = function () { - // If we are inside of text or attributes, emit what we already have. - if (this.running && this.sectionStart !== this.index) { - if (this.state === State.Text || - (this.state === State.InSpecialTag && this.sequenceIndex === 0)) { - this.cbs.ontext(this.sectionStart, this.index); - this.sectionStart = this.index; - } - else if (this.state === State.InAttributeValueDq || - this.state === State.InAttributeValueSq || - this.state === State.InAttributeValueNq) { - this.cbs.onattribdata(this.sectionStart, this.index); - this.sectionStart = this.index; - } - } - }; - Tokenizer.prototype.shouldContinue = function () { - return this.index < this.buffer.length + this.offset && this.running; - }; - /** - * Iterates through the buffer, calling the function corresponding to the current state. - * - * States that are more likely to be hit are higher up, as a performance improvement. - */ - Tokenizer.prototype.parse = function () { - while (this.shouldContinue()) { - var c = this.buffer.charCodeAt(this.index - this.offset); - switch (this.state) { - case State.Text: { - this.stateText(c); - break; - } - case State.SpecialStartSequence: { - this.stateSpecialStartSequence(c); - break; - } - case State.InSpecialTag: { - this.stateInSpecialTag(c); - break; - } - case State.CDATASequence: { - this.stateCDATASequence(c); - break; - } - case State.InAttributeValueDq: { - this.stateInAttributeValueDoubleQuotes(c); - break; - } - case State.InAttributeName: { - this.stateInAttributeName(c); - break; - } - case State.InCommentLike: { - this.stateInCommentLike(c); - break; - } - case State.InSpecialComment: { - this.stateInSpecialComment(c); - break; - } - case State.BeforeAttributeName: { - this.stateBeforeAttributeName(c); - break; - } - case State.InTagName: { - this.stateInTagName(c); - break; - } - case State.InClosingTagName: { - this.stateInClosingTagName(c); - break; - } - case State.BeforeTagName: { - this.stateBeforeTagName(c); - break; - } - case State.AfterAttributeName: { - this.stateAfterAttributeName(c); - break; - } - case State.InAttributeValueSq: { - this.stateInAttributeValueSingleQuotes(c); - break; - } - case State.BeforeAttributeValue: { - this.stateBeforeAttributeValue(c); - break; - } - case State.BeforeClosingTagName: { - this.stateBeforeClosingTagName(c); - break; - } - case State.AfterClosingTagName: { - this.stateAfterClosingTagName(c); - break; - } - case State.BeforeSpecialS: { - this.stateBeforeSpecialS(c); - break; - } - case State.BeforeSpecialT: { - this.stateBeforeSpecialT(c); - break; - } - case State.InAttributeValueNq: { - this.stateInAttributeValueNoQuotes(c); - break; - } - case State.InSelfClosingTag: { - this.stateInSelfClosingTag(c); - break; - } - case State.InDeclaration: { - this.stateInDeclaration(c); - break; - } - case State.BeforeDeclaration: { - this.stateBeforeDeclaration(c); - break; - } - case State.BeforeComment: { - this.stateBeforeComment(c); - break; - } - case State.InProcessingInstruction: { - this.stateInProcessingInstruction(c); - break; - } - case State.InEntity: { - this.stateInEntity(); - break; - } - } - this.index++; - } - this.cleanup(); - }; - Tokenizer.prototype.finish = function () { - if (this.state === State.InEntity) { - this.entityDecoder.end(); - this.state = this.baseState; - } - this.handleTrailingData(); - this.cbs.onend(); - }; - /** Handle any trailing data. */ - Tokenizer.prototype.handleTrailingData = function () { - var endIndex = this.buffer.length + this.offset; - // If there is no remaining data, we are done. - if (this.sectionStart >= endIndex) { - return; - } - if (this.state === State.InCommentLike) { - if (this.currentSequence === Sequences.CdataEnd) { - this.cbs.oncdata(this.sectionStart, endIndex, 0); - } - else { - this.cbs.oncomment(this.sectionStart, endIndex, 0); - } - } - else if (this.state === State.InTagName || - this.state === State.BeforeAttributeName || - this.state === State.BeforeAttributeValue || - this.state === State.AfterAttributeName || - this.state === State.InAttributeName || - this.state === State.InAttributeValueSq || - this.state === State.InAttributeValueDq || - this.state === State.InAttributeValueNq || - this.state === State.InClosingTagName) { - /* - * If we are currently in an opening or closing tag, us not calling the - * respective callback signals that the tag should be ignored. - */ - } - else { - this.cbs.ontext(this.sectionStart, endIndex); - } - }; - Tokenizer.prototype.emitCodePoint = function (cp, consumed) { - if (this.baseState !== State.Text && - this.baseState !== State.InSpecialTag) { - if (this.sectionStart < this.entityStart) { - this.cbs.onattribdata(this.sectionStart, this.entityStart); - } - this.sectionStart = this.entityStart + consumed; - this.index = this.sectionStart - 1; - this.cbs.onattribentity(cp); - } - else { - if (this.sectionStart < this.entityStart) { - this.cbs.ontext(this.sectionStart, this.entityStart); - } - this.sectionStart = this.entityStart + consumed; - this.index = this.sectionStart - 1; - this.cbs.ontextentity(cp, this.sectionStart); - } - }; - return Tokenizer; -}()); -exports.default = Tokenizer; -//# sourceMappingURL=Tokenizer.js.map \ No newline at end of file diff --git a/node_modules/htmlparser2/lib/Tokenizer.js.map b/node_modules/htmlparser2/lib/Tokenizer.js.map deleted file mode 100644 index 59b8871..0000000 --- a/node_modules/htmlparser2/lib/Tokenizer.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Tokenizer.js","sourceRoot":"https://raw.githubusercontent.com/fb55/htmlparser2/e2939a6c7b05d5c4845b4a2e458a4fc0a65a321d/src/","sources":["Tokenizer.ts"],"names":[],"mappings":";;;AAAA,oDAKgC;AAEhC,IAAW,SA4BV;AA5BD,WAAW,SAAS;IAChB,uCAAS,CAAA;IACT,gDAAa,CAAA;IACb,kDAAc,CAAA;IACd,8DAAoB,CAAA;IACpB,4CAAY,CAAA;IACZ,gEAAsB,CAAA;IACtB,8CAAa,CAAA;IACb,wCAAU,CAAA;IACV,wDAAkB,CAAA;IAClB,wDAAkB,CAAA;IAClB,0CAAW,CAAA;IACX,4CAAY,CAAA;IACZ,0CAAW,CAAA;IACX,0CAAW,CAAA;IACX,0CAAW,CAAA;IACX,sCAAS,CAAA;IACT,sCAAS,CAAA;IACT,sCAAS,CAAA;IACT,0DAAmB,CAAA;IACnB,8CAAa,CAAA;IACb,8CAAa,CAAA;IACb,8CAAa,CAAA;IACb,+CAAa,CAAA;IACb,8CAAa,CAAA;IACb,+CAAa,CAAA;IACb,+CAAa,CAAA;IACb,0EAA2B,CAAA;AAC/B,CAAC,EA5BU,SAAS,KAAT,SAAS,QA4BnB;AAED,8CAA8C;AAC9C,IAAW,KAsCV;AAtCD,WAAW,KAAK;IACZ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QAChC,CAAC;aAAM,CAAC;YACJ,IAAI,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,WAAW,EAAE,CAAC;gBACvC,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,YAAY,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC;YACzD,CAAC;YACD,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,WAAW,GAAG,QAAQ,CAAC;YAChD,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,YAAY,GAAG,CAAC,CAAC;YAEnC,IAAI,CAAC,GAAG,CAAC,YAAY,CAAC,EAAE,EAAE,IAAI,CAAC,YAAY,CAAC,CAAC;QACjD,CAAC;IACL,CAAC;IACL,gBAAC;AAAD,CAAC,AAtsBD,IAssBC"} \ No newline at end of file diff --git a/node_modules/htmlparser2/lib/WritableStream.d.ts b/node_modules/htmlparser2/lib/WritableStream.d.ts deleted file mode 100644 index 0459e27..0000000 --- a/node_modules/htmlparser2/lib/WritableStream.d.ts +++ /dev/null @@ -1,17 +0,0 @@ -/// <reference types="node" /> -/// <reference types="node" /> -import { type Handler, type ParserOptions } from "./Parser.js"; -import { Writable } from "node:stream"; -/** - * WritableStream makes the `Parser` interface available as a NodeJS stream. - * - * @see Parser - */ -export declare class WritableStream extends Writable { - private readonly _parser; - private readonly _decoder; - constructor(cbs: Partial<Handler>, options?: ParserOptions); - _write(chunk: string | Buffer, encoding: string, callback: () => void): void; - _final(callback: () => void): void; -} -//# sourceMappingURL=WritableStream.d.ts.map \ No newline at end of file diff --git a/node_modules/htmlparser2/lib/WritableStream.d.ts.map b/node_modules/htmlparser2/lib/WritableStream.d.ts.map deleted file mode 100644 index dccb10e..0000000 --- a/node_modules/htmlparser2/lib/WritableStream.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"WritableStream.d.ts","sourceRoot":"https://raw.githubusercontent.com/fb55/htmlparser2/e2939a6c7b05d5c4845b4a2e458a4fc0a65a321d/src/","sources":["WritableStream.ts"],"names":[],"mappings":";;AAAA,OAAO,EAAU,KAAK,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,aAAa,CAAC;AAKvE,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAQvC;;;;GAIG;AACH,qBAAa,cAAe,SAAQ,QAAQ;IACxC,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAS;IACjC,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAuB;gBAEpC,GAAG,EAAE,OAAO,CAAC,OAAO,CAAC,EAAE,OAAO,CAAC,EAAE,aAAa;IAKjD,MAAM,CACX,KAAK,EAAE,MAAM,GAAG,MAAM,EACtB,QAAQ,EAAE,MAAM,EAChB,QAAQ,EAAE,MAAM,IAAI,GACrB,IAAI;IAOE,MAAM,CAAC,QAAQ,EAAE,MAAM,IAAI,GAAG,IAAI;CAI9C"} \ No newline at end of file diff --git a/node_modules/htmlparser2/lib/WritableStream.js b/node_modules/htmlparser2/lib/WritableStream.js deleted file mode 100644 index 3614c31..0000000 --- a/node_modules/htmlparser2/lib/WritableStream.js +++ /dev/null @@ -1,54 +0,0 @@ -"use strict"; -var __extends = (this && this.__extends) || (function () { - 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); - }; - return 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 __()); - }; -})(); -Object.defineProperty(exports, "__esModule", { value: true }); -exports.WritableStream = void 0; -var Parser_js_1 = require("./Parser.js"); -/* - * NOTE: If either of these two imports produces a type error, - * please update your @types/node dependency! - */ -var node_stream_1 = require("node:stream"); -var node_string_decoder_1 = require("node:string_decoder"); -// Following the example in https://nodejs.org/api/stream.html#stream_decoding_buffers_in_a_writable_stream -function isBuffer(_chunk, encoding) { - return encoding === "buffer"; -} -/** - * WritableStream makes the `Parser` interface available as a NodeJS stream. - * - * @see Parser - */ -var WritableStream = /** @class */ (function (_super) { - __extends(WritableStream, _super); - function WritableStream(cbs, options) { - var _this = _super.call(this, { decodeStrings: false }) || this; - _this._decoder = new node_string_decoder_1.StringDecoder(); - _this._parser = new Parser_js_1.Parser(cbs, options); - return _this; - } - WritableStream.prototype._write = function (chunk, encoding, callback) { - this._parser.write(isBuffer(chunk, encoding) ? this._decoder.write(chunk) : chunk); - callback(); - }; - WritableStream.prototype._final = function (callback) { - this._parser.end(this._decoder.end()); - callback(); - }; - return WritableStream; -}(node_stream_1.Writable)); -exports.WritableStream = WritableStream; -//# sourceMappingURL=WritableStream.js.map \ No newline at end of file diff --git a/node_modules/htmlparser2/lib/WritableStream.js.map b/node_modules/htmlparser2/lib/WritableStream.js.map deleted file mode 100644 index a33c95d..0000000 --- a/node_modules/htmlparser2/lib/WritableStream.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"WritableStream.js","sourceRoot":"https://raw.githubusercontent.com/fb55/htmlparser2/e2939a6c7b05d5c4845b4a2e458a4fc0a65a321d/src/","sources":["WritableStream.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,yCAAuE;AACvE;;;GAGG;AACH,2CAAuC;AACvC,2DAAoD;AAEpD,2GAA2G;AAC3G,SAAS,QAAQ,CAAC,MAAuB,EAAE,QAAgB;IACvD,OAAO,QAAQ,KAAK,QAAQ,CAAC;AACjC,CAAC;AAED;;;;GAIG;AACH;IAAoC,kCAAQ;IAIxC,wBAAY,GAAqB,EAAE,OAAuB;QACtD,YAAA,MAAK,YAAC,EAAE,aAAa,EAAE,KAAK,EAAE,CAAC,SAAC;QAHnB,cAAQ,GAAG,IAAI,mCAAa,EAAE,CAAC;QAI5C,KAAI,CAAC,OAAO,GAAG,IAAI,kBAAM,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC;;IAC5C,CAAC;IAEQ,+BAAM,GAAf,UACI,KAAsB,EACtB,QAAgB,EAChB,QAAoB;QAEpB,IAAI,CAAC,OAAO,CAAC,KAAK,CACd,QAAQ,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CACjE,CAAC;QACF,QAAQ,EAAE,CAAC;IACf,CAAC;IAEQ,+BAAM,GAAf,UAAgB,QAAoB;QAChC,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAC,GAAG,EAAE,CAAC,CAAC;QACtC,QAAQ,EAAE,CAAC;IACf,CAAC;IACL,qBAAC;AAAD,CAAC,AAxBD,CAAoC,sBAAQ,GAwB3C;AAxBY,wCAAc"} \ No newline at end of file diff --git a/node_modules/htmlparser2/lib/esm/Parser.d.ts b/node_modules/htmlparser2/lib/esm/Parser.d.ts deleted file mode 100644 index b617674..0000000 --- a/node_modules/htmlparser2/lib/esm/Parser.d.ts +++ /dev/null @@ -1,198 +0,0 @@ -import Tokenizer, { type Callbacks, QuoteType } from "./Tokenizer.js"; -export interface ParserOptions { - /** - * Indicates whether special tags (`<script>`, `<style>`, and `<title>`) should get special treatment - * and if "empty" tags (eg. `<br>`) can have children. If `false`, the content of special tags - * will be text only. For feeds and other XML content (documents that don't consist of HTML), - * set this to `true`. - * - * @default false - */ - xmlMode?: boolean; - /** - * Decode entities within the document. - * - * @default true - */ - decodeEntities?: boolean; - /** - * If set to true, all tags will be lowercased. - * - * @default !xmlMode - */ - lowerCaseTags?: boolean; - /** - * If set to `true`, all attribute names will be lowercased. This has noticeable impact on speed. - * - * @default !xmlMode - */ - lowerCaseAttributeNames?: boolean; - /** - * If set to true, CDATA sections will be recognized as text even if the xmlMode option is not enabled. - * NOTE: If xmlMode is set to `true` then CDATA sections will always be recognized as text. - * - * @default xmlMode - */ - recognizeCDATA?: boolean; - /** - * If set to `true`, self-closing tags will trigger the onclosetag event even if xmlMode is not set to `true`. - * NOTE: If xmlMode is set to `true` then self-closing tags will always be recognized. - * - * @default xmlMode - */ - recognizeSelfClosing?: boolean; - /** - * Allows the default tokenizer to be overwritten. - */ - Tokenizer?: typeof Tokenizer; -} -export interface Handler { - onparserinit(parser: Parser): void; - /** - * Resets the handler back to starting state - */ - onreset(): void; - /** - * Signals the handler that parsing is done - */ - onend(): void; - onerror(error: Error): void; - onclosetag(name: string, isImplied: boolean): void; - onopentagname(name: string): void; - /** - * - * @param name Name of the attribute - * @param value Value of the attribute. - * @param quote Quotes used around the attribute. `null` if the attribute has no quotes around the value, `undefined` if the attribute has no value. - */ - onattribute(name: string, value: string, quote?: string | undefined | null): void; - onopentag(name: string, attribs: { - [s: string]: string; - }, isImplied: boolean): void; - ontext(data: string): void; - oncomment(data: string): void; - oncdatastart(): void; - oncdataend(): void; - oncommentend(): void; - onprocessinginstruction(name: string, data: string): void; -} -export declare class Parser implements Callbacks { - private readonly options; - /** The start index of the last event. */ - startIndex: number; - /** The end index of the last event. */ - endIndex: number; - /** - * Store the start index of the current open tag, - * so we can update the start index for attributes. - */ - private openTagStart; - private tagname; - private attribname; - private attribvalue; - private attribs; - private readonly stack; - /** Determines whether self-closing tags are recognized. */ - private readonly foreignContext; - private readonly cbs; - private readonly lowerCaseTagNames; - private readonly lowerCaseAttributeNames; - private readonly recognizeSelfClosing; - /** We are parsing HTML. Inverse of the `xmlMode` option. */ - private readonly htmlMode; - private readonly tokenizer; - private readonly buffers; - private bufferOffset; - /** The index of the last written buffer. Used when resuming after a `pause()`. */ - private writeIndex; - /** Indicates whether the parser has finished running / `.end` has been called. */ - private ended; - constructor(cbs?: Partial<Handler> | null, options?: ParserOptions); - /** @internal */ - ontext(start: number, endIndex: number): void; - /** @internal */ - ontextentity(cp: number, endIndex: number): void; - /** - * Checks if the current tag is a void element. Override this if you want - * to specify your own additional void elements. - */ - protected isVoidElement(name: string): boolean; - /** @internal */ - onopentagname(start: number, endIndex: number): void; - private emitOpenTag; - private endOpenTag; - /** @internal */ - onopentagend(endIndex: number): void; - /** @internal */ - onclosetag(start: number, endIndex: number): void; - /** @internal */ - onselfclosingtag(endIndex: number): void; - private closeCurrentTag; - /** @internal */ - onattribname(start: number, endIndex: number): void; - /** @internal */ - onattribdata(start: number, endIndex: number): void; - /** @internal */ - onattribentity(cp: number): void; - /** @internal */ - onattribend(quote: QuoteType, endIndex: number): void; - private getInstructionName; - /** @internal */ - ondeclaration(start: number, endIndex: number): void; - /** @internal */ - onprocessinginstruction(start: number, endIndex: number): void; - /** @internal */ - oncomment(start: number, endIndex: number, offset: number): void; - /** @internal */ - oncdata(start: number, endIndex: number, offset: number): void; - /** @internal */ - onend(): void; - /** - * Resets the parser to a blank state, ready to parse a new HTML document - */ - reset(): void; - /** - * Resets the parser, then parses a complete document and - * pushes it to the handler. - * - * @param data Document to parse. - */ - parseComplete(data: string): void; - private getSlice; - private shiftBuffer; - /** - * Parses a chunk of data and calls the corresponding callbacks. - * - * @param chunk Chunk to parse. - */ - write(chunk: string): void; - /** - * Parses the end of the buffer and clears the stack, calls onend. - * - * @param chunk Optional final chunk to parse. - */ - end(chunk?: string): void; - /** - * Pauses parsing. The parser won't emit events until `resume` is called. - */ - pause(): void; - /** - * Resumes parsing after `pause` was called. - */ - resume(): void; - /** - * Alias of `write`, for backwards compatibility. - * - * @param chunk Chunk to parse. - * @deprecated - */ - parseChunk(chunk: string): void; - /** - * Alias of `end`, for backwards compatibility. - * - * @param chunk Optional final chunk to parse. - * @deprecated - */ - done(chunk?: string): void; -} -//# sourceMappingURL=Parser.d.ts.map \ No newline at end of file diff --git a/node_modules/htmlparser2/lib/esm/Parser.d.ts.map b/node_modules/htmlparser2/lib/esm/Parser.d.ts.map deleted file mode 100644 index 3078c42..0000000 --- a/node_modules/htmlparser2/lib/esm/Parser.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Par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AK,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,IAAI;IAUhE,gBAAgB;IAChB,OAAO,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,IAAI;IAiB9D,gBAAgB;IAChB,KAAK,IAAI,IAAI;IAWb;;OAEG;IACI,KAAK,IAAI,IAAI;IAkBpB;;;;;OAKG;IACI,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI;IAKxC,OAAO,CAAC,QAAQ;IAkBhB,OAAO,CAAC,WAAW;IAMnB;;;;OAIG;IACI,KAAK,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI;IAajC;;;;OAIG;IACI,GAAG,CAAC,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI;IAWhC;;OAEG;IACI,KAAK,IAAI,IAAI;IAIpB;;OAEG;IACI,MAAM,IAAI,IAAI;IAarB;;;;;OAKG;IACI,UAAU,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI;IAGtC;;;;;OAKG;IACI,IAAI,CAAC,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI;CAGpC"} \ No newline at end of file diff --git a/node_modules/htmlparser2/lib/esm/Parser.js b/node_modules/htmlparser2/lib/esm/Parser.js deleted file mode 100644 index 8500f09..0000000 --- a/node_modules/htmlparser2/lib/esm/Parser.js +++ /dev/null @@ -1,490 +0,0 @@ -import Tokenizer, { QuoteType } from "./Tokenizer.js"; -import { fromCodePoint } from "entities/lib/decode.js"; -const formTags = new Set([ - "input", - "option", - "optgroup", - "select", - "button", - "datalist", - "textarea", -]); -const pTag = new Set(["p"]); -const tableSectionTags = new Set(["thead", "tbody"]); -const ddtTags = new Set(["dd", "dt"]); -const rtpTags = new Set(["rt", "rp"]); -const openImpliesClose = new Map([ - ["tr", new Set(["tr", "th", "td"])], - ["th", new Set(["th"])], - ["td", new Set(["thead", "th", "td"])], - ["body", new Set(["head", "link", "script"])], - ["li", new Set(["li"])], - ["p", pTag], - ["h1", pTag], - ["h2", pTag], - ["h3", pTag], - ["h4", pTag], - ["h5", pTag], - ["h6", pTag], - ["select", formTags], - ["input", formTags], - ["output", formTags], - ["button", formTags], - ["datalist", formTags], - ["textarea", formTags], - ["option", new Set(["option"])], - ["optgroup", new Set(["optgroup", "option"])], - ["dd", ddtTags], - ["dt", ddtTags], - ["address", pTag], - ["article", pTag], - ["aside", pTag], - ["blockquote", pTag], - ["details", pTag], - ["div", pTag], - ["dl", pTag], - ["fieldset", pTag], - ["figcaption", pTag], - ["figure", pTag], - ["footer", pTag], - ["form", pTag], - ["header", pTag], - ["hr", pTag], - ["main", pTag], - ["nav", pTag], - ["ol", pTag], - ["pre", pTag], - ["section", pTag], - ["table", pTag], - ["ul", pTag], - ["rt", rtpTags], - ["rp", rtpTags], - ["tbody", tableSectionTags], - ["tfoot", tableSectionTags], -]); -const voidElements = new Set([ - "area", - "base", - "basefont", - "br", - "col", - "command", - "embed", - "frame", - "hr", - "img", - "input", - "isindex", - "keygen", - "link", - "meta", - "param", - "source", - "track", - "wbr", -]); -const foreignContextElements = new Set(["math", "svg"]); -const htmlIntegrationElements = new Set([ - "mi", - "mo", - "mn", - "ms", - "mtext", - "annotation-xml", - "foreignobject", - "desc", - "title", -]); -const reNameEnd = /\s|\//; -export class Parser { - constructor(cbs, options = {}) { - var _a, _b, _c, _d, _e, _f; - this.options = options; - /** The start index of the last event. */ - this.startIndex = 0; - /** The end index of the last event. */ - this.endIndex = 0; - /** - * Store the start index of the current open tag, - * so we can update the start index for attributes. - */ - this.openTagStart = 0; - this.tagname = ""; - this.attribname = ""; - this.attribvalue = ""; - this.attribs = null; - this.stack = []; - this.buffers = []; - this.bufferOffset = 0; - /** The index of the last written buffer. Used when resuming after a `pause()`. */ - this.writeIndex = 0; - /** Indicates whether the parser has finished running / `.end` has been called. */ - this.ended = false; - this.cbs = cbs !== null && cbs !== void 0 ? cbs : {}; - this.htmlMode = !this.options.xmlMode; - this.lowerCaseTagNames = (_a = options.lowerCaseTags) !== null && _a !== void 0 ? _a : this.htmlMode; - this.lowerCaseAttributeNames = - (_b = options.lowerCaseAttributeNames) !== null && _b !== void 0 ? _b : this.htmlMode; - this.recognizeSelfClosing = - (_c = options.recognizeSelfClosing) !== null && _c !== void 0 ? _c : !this.htmlMode; - this.tokenizer = new ((_d = options.Tokenizer) !== null && _d !== void 0 ? _d : Tokenizer)(this.options, this); - this.foreignContext = [!this.htmlMode]; - (_f = (_e = this.cbs).onparserinit) === null || _f === void 0 ? void 0 : _f.call(_e, this); - } - // Tokenizer event handlers - /** @internal */ - ontext(start, endIndex) { - var _a, _b; - const data = this.getSlice(start, endIndex); - this.endIndex = endIndex - 1; - (_b = (_a = this.cbs).ontext) === null || _b === void 0 ? void 0 : _b.call(_a, data); - this.startIndex = endIndex; - } - /** @internal */ - ontextentity(cp, endIndex) { - var _a, _b; - this.endIndex = endIndex - 1; - (_b = (_a = this.cbs).ontext) === null || _b === void 0 ? void 0 : _b.call(_a, fromCodePoint(cp)); - this.startIndex = endIndex; - } - /** - * Checks if the current tag is a void element. Override this if you want - * to specify your own additional void elements. - */ - isVoidElement(name) { - return this.htmlMode && voidElements.has(name); - } - /** @internal */ - onopentagname(start, endIndex) { - this.endIndex = endIndex; - let name = this.getSlice(start, endIndex); - if (this.lowerCaseTagNames) { - name = name.toLowerCase(); - } - this.emitOpenTag(name); - } - emitOpenTag(name) { - var _a, _b, _c, _d; - this.openTagStart = this.startIndex; - this.tagname = name; - const impliesClose = this.htmlMode && openImpliesClose.get(name); - if (impliesClose) { - while (this.stack.length > 0 && impliesClose.has(this.stack[0])) { - const element = this.stack.shift(); - (_b = (_a = this.cbs).onclosetag) === null || _b === void 0 ? void 0 : _b.call(_a, element, true); - } - } - if (!this.isVoidElement(name)) { - this.stack.unshift(name); - if (this.htmlMode) { - if (foreignContextElements.has(name)) { - this.foreignContext.unshift(true); - } - else if (htmlIntegrationElements.has(name)) { - this.foreignContext.unshift(false); - } - } - } - (_d = (_c = this.cbs).onopentagname) === null || _d === void 0 ? void 0 : _d.call(_c, name); - if (this.cbs.onopentag) - this.attribs = {}; - } - endOpenTag(isImplied) { - var _a, _b; - this.startIndex = this.openTagStart; - if (this.attribs) { - (_b = (_a = this.cbs).onopentag) === null || _b === void 0 ? void 0 : _b.call(_a, this.tagname, this.attribs, isImplied); - this.attribs = null; - } - if (this.cbs.onclosetag && this.isVoidElement(this.tagname)) { - this.cbs.onclosetag(this.tagname, true); - } - this.tagname = ""; - } - /** @internal */ - onopentagend(endIndex) { - this.endIndex = endIndex; - this.endOpenTag(false); - // Set `startIndex` for next node - this.startIndex = endIndex + 1; - } - /** @internal */ - onclosetag(start, endIndex) { - var _a, _b, _c, _d, _e, _f, _g, _h; - this.endIndex = endIndex; - let name = this.getSlice(start, endIndex); - if (this.lowerCaseTagNames) { - name = name.toLowerCase(); - } - if (this.htmlMode && - (foreignContextElements.has(name) || - htmlIntegrationElements.has(name))) { - this.foreignContext.shift(); - } - if (!this.isVoidElement(name)) { - const pos = this.stack.indexOf(name); - if (pos !== -1) { - for (let index = 0; index <= pos; index++) { - const element = this.stack.shift(); - // We know the stack has sufficient elements. - (_b = (_a = this.cbs).onclosetag) === null || _b === void 0 ? void 0 : _b.call(_a, element, index !== pos); - } - } - else if (this.htmlMode && name === "p") { - // Implicit open before close - this.emitOpenTag("p"); - this.closeCurrentTag(true); - } - } - else if (this.htmlMode && name === "br") { - // We can't use `emitOpenTag` for implicit open, as `br` would be implicitly closed. - (_d = (_c = this.cbs).onopentagname) === null || _d === void 0 ? void 0 : _d.call(_c, "br"); - (_f = (_e = this.cbs).onopentag) === null || _f === void 0 ? void 0 : _f.call(_e, "br", {}, true); - (_h = (_g = this.cbs).onclosetag) === null || _h === void 0 ? void 0 : _h.call(_g, "br", false); - } - // Set `startIndex` for next node - this.startIndex = endIndex + 1; - } - /** @internal */ - onselfclosingtag(endIndex) { - this.endIndex = endIndex; - if (this.recognizeSelfClosing || this.foreignContext[0]) { - this.closeCurrentTag(false); - // Set `startIndex` for next node - this.startIndex = endIndex + 1; - } - else { - // Ignore the fact that the tag is self-closing. - this.onopentagend(endIndex); - } - } - closeCurrentTag(isOpenImplied) { - var _a, _b; - const name = this.tagname; - this.endOpenTag(isOpenImplied); - // Self-closing tags will be on the top of the stack - if (this.stack[0] === name) { - // If the opening tag isn't implied, the closing tag has to be implied. - (_b = (_a = this.cbs).onclosetag) === null || _b === void 0 ? void 0 : _b.call(_a, name, !isOpenImplied); - this.stack.shift(); - } - } - /** @internal */ - onattribname(start, endIndex) { - this.startIndex = start; - const name = this.getSlice(start, endIndex); - this.attribname = this.lowerCaseAttributeNames - ? name.toLowerCase() - : name; - } - /** @internal */ - onattribdata(start, endIndex) { - this.attribvalue += this.getSlice(start, endIndex); - } - /** @internal */ - onattribentity(cp) { - this.attribvalue += fromCodePoint(cp); - } - /** @internal */ - onattribend(quote, endIndex) { - var _a, _b; - this.endIndex = endIndex; - (_b = (_a = this.cbs).onattribute) === null || _b === void 0 ? void 0 : _b.call(_a, this.attribname, this.attribvalue, quote === QuoteType.Double - ? '"' - : quote === QuoteType.Single - ? "'" - : quote === QuoteType.NoValue - ? undefined - : null); - if (this.attribs && - !Object.prototype.hasOwnProperty.call(this.attribs, this.attribname)) { - this.attribs[this.attribname] = this.attribvalue; - } - this.attribvalue = ""; - } - getInstructionName(value) { - const index = value.search(reNameEnd); - let name = index < 0 ? value : value.substr(0, index); - if (this.lowerCaseTagNames) { - name = name.toLowerCase(); - } - return name; - } - /** @internal */ - ondeclaration(start, endIndex) { - this.endIndex = endIndex; - const value = this.getSlice(start, endIndex); - if (this.cbs.onprocessinginstruction) { - const name = this.getInstructionName(value); - this.cbs.onprocessinginstruction(`!${name}`, `!${value}`); - } - // Set `startIndex` for next node - this.startIndex = endIndex + 1; - } - /** @internal */ - onprocessinginstruction(start, endIndex) { - this.endIndex = endIndex; - const value = this.getSlice(start, endIndex); - if (this.cbs.onprocessinginstruction) { - const name = this.getInstructionName(value); - this.cbs.onprocessinginstruction(`?${name}`, `?${value}`); - } - // Set `startIndex` for next node - this.startIndex = endIndex + 1; - } - /** @internal */ - oncomment(start, endIndex, offset) { - var _a, _b, _c, _d; - this.endIndex = endIndex; - (_b = (_a = this.cbs).oncomment) === null || _b === void 0 ? void 0 : _b.call(_a, this.getSlice(start, endIndex - offset)); - (_d = (_c = this.cbs).oncommentend) === null || _d === void 0 ? void 0 : _d.call(_c); - // Set `startIndex` for next node - this.startIndex = endIndex + 1; - } - /** @internal */ - oncdata(start, endIndex, offset) { - var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k; - this.endIndex = endIndex; - const value = this.getSlice(start, endIndex - offset); - if (!this.htmlMode || this.options.recognizeCDATA) { - (_b = (_a = this.cbs).oncdatastart) === null || _b === void 0 ? void 0 : _b.call(_a); - (_d = (_c = this.cbs).ontext) === null || _d === void 0 ? void 0 : _d.call(_c, value); - (_f = (_e = this.cbs).oncdataend) === null || _f === void 0 ? void 0 : _f.call(_e); - } - else { - (_h = (_g = this.cbs).oncomment) === null || _h === void 0 ? void 0 : _h.call(_g, `[CDATA[${value}]]`); - (_k = (_j = this.cbs).oncommentend) === null || _k === void 0 ? void 0 : _k.call(_j); - } - // Set `startIndex` for next node - this.startIndex = endIndex + 1; - } - /** @internal */ - onend() { - var _a, _b; - if (this.cbs.onclosetag) { - // Set the end index for all remaining tags - this.endIndex = this.startIndex; - for (let index = 0; index < this.stack.length; index++) { - this.cbs.onclosetag(this.stack[index], true); - } - } - (_b = (_a = this.cbs).onend) === null || _b === void 0 ? void 0 : _b.call(_a); - } - /** - * Resets the parser to a blank state, ready to parse a new HTML document - */ - reset() { - var _a, _b, _c, _d; - (_b = (_a = this.cbs).onreset) === null || _b === void 0 ? void 0 : _b.call(_a); - this.tokenizer.reset(); - this.tagname = ""; - this.attribname = ""; - this.attribs = null; - this.stack.length = 0; - this.startIndex = 0; - this.endIndex = 0; - (_d = (_c = this.cbs).onparserinit) === null || _d === void 0 ? void 0 : _d.call(_c, this); - this.buffers.length = 0; - this.foreignContext.length = 0; - this.foreignContext.unshift(!this.htmlMode); - this.bufferOffset = 0; - this.writeIndex = 0; - this.ended = false; - } - /** - * Resets the parser, then parses a complete document and - * pushes it to the handler. - * - * @param data Document to parse. - */ - parseComplete(data) { - this.reset(); - this.end(data); - } - getSlice(start, end) { - while (start - this.bufferOffset >= this.buffers[0].length) { - this.shiftBuffer(); - } - let slice = this.buffers[0].slice(start - this.bufferOffset, end - this.bufferOffset); - while (end - this.bufferOffset > this.buffers[0].length) { - this.shiftBuffer(); - slice += this.buffers[0].slice(0, end - this.bufferOffset); - } - return slice; - } - shiftBuffer() { - this.bufferOffset += this.buffers[0].length; - this.writeIndex--; - this.buffers.shift(); - } - /** - * Parses a chunk of data and calls the corresponding callbacks. - * - * @param chunk Chunk to parse. - */ - write(chunk) { - var _a, _b; - if (this.ended) { - (_b = (_a = this.cbs).onerror) === null || _b === void 0 ? void 0 : _b.call(_a, new Error(".write() after done!")); - return; - } - this.buffers.push(chunk); - if (this.tokenizer.running) { - this.tokenizer.write(chunk); - this.writeIndex++; - } - } - /** - * Parses the end of the buffer and clears the stack, calls onend. - * - * @param chunk Optional final chunk to parse. - */ - end(chunk) { - var _a, _b; - if (this.ended) { - (_b = (_a = this.cbs).onerror) === null || _b === void 0 ? void 0 : _b.call(_a, new Error(".end() after done!")); - return; - } - if (chunk) - this.write(chunk); - this.ended = true; - this.tokenizer.end(); - } - /** - * Pauses parsing. The parser won't emit events until `resume` is called. - */ - pause() { - this.tokenizer.pause(); - } - /** - * Resumes parsing after `pause` was called. - */ - resume() { - this.tokenizer.resume(); - while (this.tokenizer.running && - this.writeIndex < this.buffers.length) { - this.tokenizer.write(this.buffers[this.writeIndex++]); - } - if (this.ended) - this.tokenizer.end(); - } - /** - * Alias of `write`, for backwards compatibility. - * - * @param chunk Chunk to parse. - * @deprecated - */ - parseChunk(chunk) { - this.write(chunk); - } - /** - * Alias of `end`, for backwards compatibility. - * - * @param chunk Optional final chunk to parse. - * @deprecated - */ - done(chunk) { - this.end(chunk); - } -} -//# sourceMappingURL=Parser.js.map \ No newline at end of file diff --git a/node_modules/htmlparser2/lib/esm/Parser.js.map b/node_modules/htmlparser2/lib/esm/Parser.js.map deleted file mode 100644 index 171f93f..0000000 --- a/node_modules/htmlparser2/lib/esm/Parser.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Parser.js","sourceRoot":"https://raw.githubusercontent.com/fb55/htmlparser2/e2939a6c7b05d5c4845b4a2e458a4fc0a65a321d/src/","sources":["Parser.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,EAAE,EAAkB,SAAS,EAAE,MAAM,gBAAgB,CAAC;AACtE,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAEvD,MAAM,QAAQ,GAAG,IAAI,GAAG,CAAC;IACrB,OAAO;IACP,QAAQ;IACR,UAAU;IACV,QAAQ;IACR,QAAQ;IACR,UAAU;IACV,UAAU;CACb,CAAC,CAAC;AACH,MAAM,IAAI,GAAG,IAAI,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;AAC5B,MAAM,gBAAgB,GAAG,IAAI,GAAG,CAAC,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC;AACrD,MAAM,OAAO,GAAG,IAAI,GAAG,CAAC,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC,CAAC;AACtC,MAAM,OAAO,GAAG,IAAI,GAAG,CAAC,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC,CAAC;AAEtC,MAAM,gBAAgB,GAAG,IAAI,GAAG,CAAsB;IAClD,CAAC,IAAI,EAAE,IAAI,GAAG,CAAC,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC,CAAC;IACnC,CAAC,IAAI,EAAE,IAAI,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC;IACvB,CAAC,IAAI,EAAE,IAAI,GAAG,CAAC,CAAC,OAAO,EAAE,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AK;QACR,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE,CAAC;IAC3B,CAAC;IAED;;OAEG;IACI,MAAM;QACT,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,CAAC;QAExB,OACI,IAAI,CAAC,SAAS,CAAC,OAAO;YACtB,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,OAAO,CAAC,MAAM,EACvC,CAAC;YACC,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,UAAU,EAAE,CAAC,CAAC,CAAC;QAC1D,CAAC;QAED,IAAI,IAAI,CAAC,KAAK;YAAE,IAAI,CAAC,SAAS,CAAC,GAAG,EAAE,CAAC;IACzC,CAAC;IAED;;;;;OAKG;IACI,UAAU,CAAC,KAAa;QAC3B,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;IACtB,CAAC;IACD;;;;;OAKG;IACI,IAAI,CAAC,KAAc;QACtB,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;IACpB,CAAC;CACJ"} \ No newline at end of file diff --git a/node_modules/htmlparser2/lib/esm/Tokenizer.d.ts b/node_modules/htmlparser2/lib/esm/Tokenizer.d.ts deleted file mode 100644 index 8472742..0000000 --- a/node_modules/htmlparser2/lib/esm/Tokenizer.d.ts +++ /dev/null @@ -1,126 +0,0 @@ -export declare enum QuoteType { - NoValue = 0, - Unquoted = 1, - Single = 2, - Double = 3 -} -export interface Callbacks { - onattribdata(start: number, endIndex: number): void; - onattribentity(codepoint: number): void; - onattribend(quote: QuoteType, endIndex: number): void; - onattribname(start: number, endIndex: number): void; - oncdata(start: number, endIndex: number, endOffset: number): void; - onclosetag(start: number, endIndex: number): void; - oncomment(start: number, endIndex: number, endOffset: number): void; - ondeclaration(start: number, endIndex: number): void; - onend(): void; - onopentagend(endIndex: number): void; - onopentagname(start: number, endIndex: number): void; - onprocessinginstruction(start: number, endIndex: number): void; - onselfclosingtag(endIndex: number): void; - ontext(start: number, endIndex: number): void; - ontextentity(codepoint: number, endIndex: number): void; -} -export default class Tokenizer { - private readonly cbs; - /** The current state the tokenizer is in. */ - private state; - /** The read buffer. */ - private buffer; - /** The beginning of the section that is currently being read. */ - private sectionStart; - /** The index within the buffer that we are currently looking at. */ - private index; - /** The start of the last entity. */ - private entityStart; - /** Some behavior, eg. when decoding entities, is done while we are in another state. This keeps track of the other state type. */ - private baseState; - /** For special parsing behavior inside of script and style tags. */ - private isSpecial; - /** Indicates whether the tokenizer has been paused. */ - running: boolean; - /** The offset of the current buffer. */ - private offset; - private readonly xmlMode; - private readonly decodeEntities; - private readonly entityDecoder; - constructor({ xmlMode, decodeEntities, }: { - xmlMode?: boolean; - decodeEntities?: boolean; - }, cbs: Callbacks); - reset(): void; - write(chunk: string): void; - end(): void; - pause(): void; - resume(): void; - private stateText; - private currentSequence; - private sequenceIndex; - private stateSpecialStartSequence; - /** Look for an end tag. For <title> tags, also decode entities. */ - private stateInSpecialTag; - private stateCDATASequence; - /** - * When we wait for one specific character, we can speed things up - * by skipping through the buffer until we find it. - * - * @returns Whether the character was found. - */ - private fastForwardTo; - /** - * Comments and CDATA end with `-->` and `]]>`. - * - * Their common qualities are: - * - Their end sequences have a distinct character they start with. - * - That character is then repeated, so we have to check multiple repeats. - * - All characters but the start character of the sequence can be skipped. - */ - private stateInCommentLike; - /** - * HTML only allows ASCII alpha characters (a-z and A-Z) at the beginning of a tag name. - * - * XML allows a lot more characters here (@see https://www.w3.org/TR/REC-xml/#NT-NameStartChar). - * We allow anything that wouldn't end the tag. - */ - private isTagStartChar; - private startSpecial; - private stateBeforeTagName; - private stateInTagName; - private stateBeforeClosingTagName; - private stateInClosingTagName; - private stateAfterClosingTagName; - private stateBeforeAttributeName; - private stateInSelfClosingTag; - private stateInAttributeName; - private stateAfterAttributeName; - private stateBeforeAttributeValue; - private handleInAttributeValue; - private stateInAttributeValueDoubleQuotes; - private stateInAttributeValueSingleQuotes; - private stateInAttributeValueNoQuotes; - private stateBeforeDeclaration; - private stateInDeclaration; - private stateInProcessingInstruction; - private stateBeforeComment; - private stateInSpecialComment; - private stateBeforeSpecialS; - private stateBeforeSpecialT; - private startEntity; - private stateInEntity; - /** - * Remove data that has already been consumed from the buffer. - */ - private cleanup; - private shouldContinue; - /** - * Iterates through the buffer, calling the function corresponding to the current state. - * - * States that are more likely to be hit are higher up, as a performance improvement. - */ - private parse; - private finish; - /** Handle any trailing data. */ - private handleTrailingData; - private emitCodePoint; -} -//# sourceMappingURL=Tokenizer.d.ts.map \ No newline at end of file diff --git a/node_modules/htmlparser2/lib/esm/Tokenizer.d.ts.map b/node_modules/htmlparser2/lib/esm/Tokenizer.d.ts.map deleted file mode 100644 index 31148ea..0000000 --- a/node_modules/htmlparser2/lib/esm/Tokenizer.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Tokenizer.d.ts","sourceRoot":"https://raw.githubusercontent.com/fb55/htmlparser2/e2939a6c7b05d5c4845b4a2e458a4fc0a65a321d/src/","sources":["Tokenizer.ts"],"names":[],"mappings":"AAmGA,oBAAY,SAAS;IACjB,OAAO,IAAI;IACX,QAAQ,IAAI;IACZ,MAAM,IAAI;IACV,MAAM,IAAI;CACb;AAED,MAAM,WAAW,SAAS;IACtB,YAAY,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACpD,cAAc,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACxC,WAAW,CAAC,KAAK,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACtD,YAAY,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACpD,OAAO,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IAClE,UAAU,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAA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IAY3B,OAAO,CAAC,mBAAmB;IAY3B,OAAO,CAAC,WAAW;IAcnB,OAAO,CAAC,aAAa;IAmBrB;;OAEG;IACH,OAAO,CAAC,OAAO;IAoBf,OAAO,CAAC,cAAc;IAItB;;;;OAIG;IACH,OAAO,CAAC,KAAK;IAkHb,OAAO,CAAC,MAAM;IAWd,gCAAgC;IAChC,OAAO,CAAC,kBAAkB;IAkC1B,OAAO,CAAC,aAAa;CAsBxB"} \ No newline at end of file diff --git a/node_modules/htmlparser2/lib/esm/Tokenizer.js b/node_modules/htmlparser2/lib/esm/Tokenizer.js deleted file mode 100644 index 0508d3f..0000000 --- a/node_modules/htmlparser2/lib/esm/Tokenizer.js +++ /dev/null @@ -1,784 +0,0 @@ -import { EntityDecoder, DecodingMode, htmlDecodeTree, xmlDecodeTree, } from "entities/lib/decode.js"; -var CharCodes; -(function (CharCodes) { - CharCodes[CharCodes["Tab"] = 9] = "Tab"; - CharCodes[CharCodes["NewLine"] = 10] = "NewLine"; - CharCodes[CharCodes["FormFeed"] = 12] = "FormFeed"; - CharCodes[CharCodes["CarriageReturn"] = 13] = "CarriageReturn"; - CharCodes[CharCodes["Space"] = 32] = "Space"; - CharCodes[CharCodes["ExclamationMark"] = 33] = "ExclamationMark"; - CharCodes[CharCodes["Number"] = 35] = "Number"; - CharCodes[CharCodes["Amp"] = 38] = "Amp"; - CharCodes[CharCodes["SingleQuote"] = 39] = "SingleQuote"; - CharCodes[CharCodes["DoubleQuote"] = 34] = "DoubleQuote"; - CharCodes[CharCodes["Dash"] = 45] = "Dash"; - CharCodes[CharCodes["Slash"] = 47] = "Slash"; - CharCodes[CharCodes["Zero"] = 48] = "Zero"; - CharCodes[CharCodes["Nine"] = 57] = "Nine"; - CharCodes[CharCodes["Semi"] = 59] = "Semi"; - CharCodes[CharCodes["Lt"] = 60] = "Lt"; - CharCodes[CharCodes["Eq"] = 61] = "Eq"; - CharCodes[CharCodes["Gt"] = 62] = "Gt"; - CharCodes[CharCodes["Questionmark"] = 63] = "Questionmark"; - CharCodes[CharCodes["UpperA"] = 65] = "UpperA"; - CharCodes[CharCodes["LowerA"] = 97] = "LowerA"; - CharCodes[CharCodes["UpperF"] = 70] = "UpperF"; - CharCodes[CharCodes["LowerF"] = 102] = "LowerF"; - CharCodes[CharCodes["UpperZ"] = 90] = "UpperZ"; - CharCodes[CharCodes["LowerZ"] = 122] = "LowerZ"; - CharCodes[CharCodes["LowerX"] = 120] = "LowerX"; - CharCodes[CharCodes["OpeningSquareBracket"] = 91] = "OpeningSquareBracket"; -})(CharCodes || (CharCodes = {})); -/** All the states the tokenizer can be in. */ -var State; -(function (State) { - State[State["Text"] = 1] = "Text"; - State[State["BeforeTagName"] = 2] = "BeforeTagName"; - State[State["InTagName"] = 3] = "InTagName"; - State[State["InSelfClosingTag"] = 4] = "InSelfClosingTag"; - State[State["BeforeClosingTagName"] = 5] = "BeforeClosingTagName"; - State[State["InClosingTagName"] = 6] = "InClosingTagName"; - State[State["AfterClosingTagName"] = 7] = "AfterClosingTagName"; - // Attributes - State[State["BeforeAttributeName"] = 8] = "BeforeAttributeName"; - State[State["InAttributeName"] = 9] = "InAttributeName"; - State[State["AfterAttributeName"] = 10] = "AfterAttributeName"; - State[State["BeforeAttributeValue"] = 11] = "BeforeAttributeValue"; - State[State["InAttributeValueDq"] = 12] = "InAttributeValueDq"; - State[State["InAttributeValueSq"] = 13] = "InAttributeValueSq"; - State[State["InAttributeValueNq"] = 14] = "InAttributeValueNq"; - // Declarations - State[State["BeforeDeclaration"] = 15] = "BeforeDeclaration"; - State[State["InDeclaration"] = 16] = "InDeclaration"; - // Processing instructions - State[State["InProcessingInstruction"] = 17] = "InProcessingInstruction"; - // Comments & CDATA - State[State["BeforeComment"] = 18] = "BeforeComment"; - State[State["CDATASequence"] = 19] = "CDATASequence"; - State[State["InSpecialComment"] = 20] = "InSpecialComment"; - State[State["InCommentLike"] = 21] = "InCommentLike"; - // Special tags - State[State["BeforeSpecialS"] = 22] = "BeforeSpecialS"; - State[State["BeforeSpecialT"] = 23] = "BeforeSpecialT"; - State[State["SpecialStartSequence"] = 24] = "SpecialStartSequence"; - State[State["InSpecialTag"] = 25] = "InSpecialTag"; - State[State["InEntity"] = 26] = "InEntity"; -})(State || (State = {})); -function isWhitespace(c) { - return (c === CharCodes.Space || - c === CharCodes.NewLine || - c === CharCodes.Tab || - c === CharCodes.FormFeed || - c === CharCodes.CarriageReturn); -} -function isEndOfTagSection(c) { - return c === CharCodes.Slash || c === CharCodes.Gt || isWhitespace(c); -} -function isASCIIAlpha(c) { - return ((c >= CharCodes.LowerA && c <= CharCodes.LowerZ) || - (c >= CharCodes.UpperA && c <= CharCodes.UpperZ)); -} -export var QuoteType; -(function (QuoteType) { - QuoteType[QuoteType["NoValue"] = 0] = "NoValue"; - QuoteType[QuoteType["Unquoted"] = 1] = "Unquoted"; - QuoteType[QuoteType["Single"] = 2] = "Single"; - QuoteType[QuoteType["Double"] = 3] = "Double"; -})(QuoteType || (QuoteType = {})); -/** - * Sequences used to match longer strings. - * - * We don't have `Script`, `Style`, or `Title` here. Instead, we re-use the *End - * sequences with an increased offset. - */ -const Sequences = { - Cdata: new Uint8Array([0x43, 0x44, 0x41, 0x54, 0x41, 0x5b]), // CDATA[ - CdataEnd: new Uint8Array([0x5d, 0x5d, 0x3e]), // ]]> - CommentEnd: new Uint8Array([0x2d, 0x2d, 0x3e]), // `-->` - ScriptEnd: new Uint8Array([0x3c, 0x2f, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74]), // `</script` - StyleEnd: new Uint8Array([0x3c, 0x2f, 0x73, 0x74, 0x79, 0x6c, 0x65]), // `</style` - TitleEnd: new Uint8Array([0x3c, 0x2f, 0x74, 0x69, 0x74, 0x6c, 0x65]), // `</title` - TextareaEnd: new Uint8Array([ - 0x3c, 0x2f, 0x74, 0x65, 0x78, 0x74, 0x61, 0x72, 0x65, 0x61, - ]), // `</textarea` -}; -export default class Tokenizer { - constructor({ xmlMode = false, decodeEntities = true, }, cbs) { - this.cbs = cbs; - /** The current state the tokenizer is in. */ - this.state = State.Text; - /** The read buffer. */ - this.buffer = ""; - /** The beginning of the section that is currently being read. */ - this.sectionStart = 0; - /** The index within the buffer that we are currently looking at. */ - this.index = 0; - /** The start of the last entity. */ - this.entityStart = 0; - /** Some behavior, eg. when decoding entities, is done while we are in another state. This keeps track of the other state type. */ - this.baseState = State.Text; - /** For special parsing behavior inside of script and style tags. */ - this.isSpecial = false; - /** Indicates whether the tokenizer has been paused. */ - this.running = true; - /** The offset of the current buffer. */ - this.offset = 0; - this.currentSequence = undefined; - this.sequenceIndex = 0; - this.xmlMode = xmlMode; - this.decodeEntities = decodeEntities; - this.entityDecoder = new EntityDecoder(xmlMode ? xmlDecodeTree : htmlDecodeTree, (cp, consumed) => this.emitCodePoint(cp, consumed)); - } - reset() { - this.state = State.Text; - this.buffer = ""; - this.sectionStart = 0; - this.index = 0; - this.baseState = State.Text; - this.currentSequence = undefined; - this.running = true; - this.offset = 0; - } - write(chunk) { - this.offset += this.buffer.length; - this.buffer = chunk; - this.parse(); - } - end() { - if (this.running) - this.finish(); - } - pause() { - this.running = false; - } - resume() { - this.running = true; - if (this.index < this.buffer.length + this.offset) { - this.parse(); - } - } - stateText(c) { - if (c === CharCodes.Lt || - (!this.decodeEntities && this.fastForwardTo(CharCodes.Lt))) { - if (this.index > this.sectionStart) { - this.cbs.ontext(this.sectionStart, this.index); - } - this.state = State.BeforeTagName; - this.sectionStart = this.index; - } - else if (this.decodeEntities && c === CharCodes.Amp) { - this.startEntity(); - } - } - stateSpecialStartSequence(c) { - const isEnd = this.sequenceIndex === this.currentSequence.length; - const isMatch = isEnd - ? // If we are at the end of the sequence, make sure the tag name has ended - isEndOfTagSection(c) - : // Otherwise, do a case-insensitive comparison - (c | 0x20) === this.currentSequence[this.sequenceIndex]; - if (!isMatch) { - this.isSpecial = false; - } - else if (!isEnd) { - this.sequenceIndex++; - return; - } - this.sequenceIndex = 0; - this.state = State.InTagName; - this.stateInTagName(c); - } - /** Look for an end tag. For <title> tags, also decode entities. */ - stateInSpecialTag(c) { - if (this.sequenceIndex === this.currentSequence.length) { - if (c === CharCodes.Gt || isWhitespace(c)) { - const endOfText = this.index - this.currentSequence.length; - if (this.sectionStart < endOfText) { - // Spoof the index so that reported locations match up. - const actualIndex = this.index; - this.index = endOfText; - this.cbs.ontext(this.sectionStart, endOfText); - this.index = actualIndex; - } - this.isSpecial = false; - this.sectionStart = endOfText + 2; // Skip over the `</` - this.stateInClosingTagName(c); - return; // We are done; skip the rest of the function. - } - this.sequenceIndex = 0; - } - if ((c | 0x20) === this.currentSequence[this.sequenceIndex]) { - this.sequenceIndex += 1; - } - else if (this.sequenceIndex === 0) { - if (this.currentSequence === Sequences.TitleEnd) { - // We have to parse entities in <title> tags. - if (this.decodeEntities && c === CharCodes.Amp) { - this.startEntity(); - } - } - else if (this.fastForwardTo(CharCodes.Lt)) { - // Outside of <title> tags, we can fast-forward. - this.sequenceIndex = 1; - } - } - else { - // If we see a `<`, set the sequence index to 1; useful for eg. `<</script>`. - this.sequenceIndex = Number(c === CharCodes.Lt); - } - } - stateCDATASequence(c) { - if (c === Sequences.Cdata[this.sequenceIndex]) { - if (++this.sequenceIndex === Sequences.Cdata.length) { - this.state = State.InCommentLike; - this.currentSequence = Sequences.CdataEnd; - this.sequenceIndex = 0; - this.sectionStart = this.index + 1; - } - } - else { - this.sequenceIndex = 0; - this.state = State.InDeclaration; - this.stateInDeclaration(c); // Reconsume the character - } - } - /** - * When we wait for one specific character, we can speed things up - * by skipping through the buffer until we find it. - * - * @returns Whether the character was found. - */ - fastForwardTo(c) { - while (++this.index < this.buffer.length + this.offset) { - if (this.buffer.charCodeAt(this.index - this.offset) === c) { - return true; - } - } - /* - * We increment the index at the end of the `parse` loop, - * so set it to `buffer.length - 1` here. - * - * TODO: Refactor `parse` to increment index before calling states. - */ - this.index = this.buffer.length + this.offset - 1; - return false; - } - /** - * Comments and CDATA end with `-->` and `]]>`. - * - * Their common qualities are: - * - Their end sequences have a distinct character they start with. - * - That character is then repeated, so we have to check multiple repeats. - * - All characters but the start character of the sequence can be skipped. - */ - stateInCommentLike(c) { - if (c === this.currentSequence[this.sequenceIndex]) { - if (++this.sequenceIndex === this.currentSequence.length) { - if (this.currentSequence === Sequences.CdataEnd) { - this.cbs.oncdata(this.sectionStart, this.index, 2); - } - else { - this.cbs.oncomment(this.sectionStart, this.index, 2); - } - this.sequenceIndex = 0; - this.sectionStart = this.index + 1; - this.state = State.Text; - } - } - else if (this.sequenceIndex === 0) { - // Fast-forward to the first character of the sequence - if (this.fastForwardTo(this.currentSequence[0])) { - this.sequenceIndex = 1; - } - } - else if (c !== this.currentSequence[this.sequenceIndex - 1]) { - // Allow long sequences, eg. --->, ]]]> - this.sequenceIndex = 0; - } - } - /** - * HTML only allows ASCII alpha characters (a-z and A-Z) at the beginning of a tag name. - * - * XML allows a lot more characters here (@see https://www.w3.org/TR/REC-xml/#NT-NameStartChar). - * We allow anything that wouldn't end the tag. - */ - isTagStartChar(c) { - return this.xmlMode ? !isEndOfTagSection(c) : isASCIIAlpha(c); - } - startSpecial(sequence, offset) { - this.isSpecial = true; - this.currentSequence = sequence; - this.sequenceIndex = offset; - this.state = State.SpecialStartSequence; - } - stateBeforeTagName(c) { - if (c === CharCodes.ExclamationMark) { - this.state = State.BeforeDeclaration; - this.sectionStart = this.index + 1; - } - else if (c === CharCodes.Questionmark) { - this.state = State.InProcessingInstruction; - this.sectionStart = this.index + 1; - } - else if (this.isTagStartChar(c)) { - const lower = c | 0x20; - this.sectionStart = this.index; - if (this.xmlMode) { - this.state = State.InTagName; - } - else if (lower === Sequences.ScriptEnd[2]) { - this.state = State.BeforeSpecialS; - } - else if (lower === Sequences.TitleEnd[2]) { - this.state = State.BeforeSpecialT; - } - else { - this.state = State.InTagName; - } - } - else if (c === CharCodes.Slash) { - this.state = State.BeforeClosingTagName; - } - else { - this.state = State.Text; - this.stateText(c); - } - } - stateInTagName(c) { - if (isEndOfTagSection(c)) { - this.cbs.onopentagname(this.sectionStart, this.index); - this.sectionStart = -1; - this.state = State.BeforeAttributeName; - this.stateBeforeAttributeName(c); - } - } - stateBeforeClosingTagName(c) { - if (isWhitespace(c)) { - // Ignore - } - else if (c === CharCodes.Gt) { - this.state = State.Text; - } - else { - this.state = this.isTagStartChar(c) - ? State.InClosingTagName - : State.InSpecialComment; - this.sectionStart = this.index; - } - } - stateInClosingTagName(c) { - if (c === CharCodes.Gt || isWhitespace(c)) { - this.cbs.onclosetag(this.sectionStart, this.index); - this.sectionStart = -1; - this.state = State.AfterClosingTagName; - this.stateAfterClosingTagName(c); - } - } - stateAfterClosingTagName(c) { - // Skip everything until ">" - if (c === CharCodes.Gt || this.fastForwardTo(CharCodes.Gt)) { - this.state = State.Text; - this.sectionStart = this.index + 1; - } - } - stateBeforeAttributeName(c) { - if (c === CharCodes.Gt) { - this.cbs.onopentagend(this.index); - if (this.isSpecial) { - this.state = State.InSpecialTag; - this.sequenceIndex = 0; - } - else { - this.state = State.Text; - } - this.sectionStart = this.index + 1; - } - else if (c === CharCodes.Slash) { - this.state = State.InSelfClosingTag; - } - else if (!isWhitespace(c)) { - this.state = State.InAttributeName; - this.sectionStart = this.index; - } - } - stateInSelfClosingTag(c) { - if (c === CharCodes.Gt) { - this.cbs.onselfclosingtag(this.index); - this.state = State.Text; - this.sectionStart = this.index + 1; - this.isSpecial = false; // Reset special state, in case of self-closing special tags - } - else if (!isWhitespace(c)) { - this.state = State.BeforeAttributeName; - this.stateBeforeAttributeName(c); - } - } - stateInAttributeName(c) { - if (c === CharCodes.Eq || isEndOfTagSection(c)) { - this.cbs.onattribname(this.sectionStart, this.index); - this.sectionStart = this.index; - this.state = State.AfterAttributeName; - this.stateAfterAttributeName(c); - } - } - stateAfterAttributeName(c) { - if (c === CharCodes.Eq) { - this.state = State.BeforeAttributeValue; - } - else if (c === CharCodes.Slash || c === CharCodes.Gt) { - this.cbs.onattribend(QuoteType.NoValue, this.sectionStart); - this.sectionStart = -1; - this.state = State.BeforeAttributeName; - this.stateBeforeAttributeName(c); - } - else if (!isWhitespace(c)) { - this.cbs.onattribend(QuoteType.NoValue, this.sectionStart); - this.state = State.InAttributeName; - this.sectionStart = this.index; - } - } - stateBeforeAttributeValue(c) { - if (c === CharCodes.DoubleQuote) { - this.state = State.InAttributeValueDq; - this.sectionStart = this.index + 1; - } - else if (c === CharCodes.SingleQuote) { - this.state = State.InAttributeValueSq; - this.sectionStart = this.index + 1; - } - else if (!isWhitespace(c)) { - this.sectionStart = this.index; - this.state = State.InAttributeValueNq; - this.stateInAttributeValueNoQuotes(c); // Reconsume token - } - } - handleInAttributeValue(c, quote) { - if (c === quote || - (!this.decodeEntities && this.fastForwardTo(quote))) { - this.cbs.onattribdata(this.sectionStart, this.index); - this.sectionStart = -1; - this.cbs.onattribend(quote === CharCodes.DoubleQuote - ? QuoteType.Double - : QuoteType.Single, this.index + 1); - this.state = State.BeforeAttributeName; - } - else if (this.decodeEntities && c === CharCodes.Amp) { - this.startEntity(); - } - } - stateInAttributeValueDoubleQuotes(c) { - this.handleInAttributeValue(c, CharCodes.DoubleQuote); - } - stateInAttributeValueSingleQuotes(c) { - this.handleInAttributeValue(c, CharCodes.SingleQuote); - } - stateInAttributeValueNoQuotes(c) { - if (isWhitespace(c) || c === CharCodes.Gt) { - this.cbs.onattribdata(this.sectionStart, this.index); - this.sectionStart = -1; - this.cbs.onattribend(QuoteType.Unquoted, this.index); - this.state = State.BeforeAttributeName; - this.stateBeforeAttributeName(c); - } - else if (this.decodeEntities && c === CharCodes.Amp) { - this.startEntity(); - } - } - stateBeforeDeclaration(c) { - if (c === CharCodes.OpeningSquareBracket) { - this.state = State.CDATASequence; - this.sequenceIndex = 0; - } - else { - this.state = - c === CharCodes.Dash - ? State.BeforeComment - : State.InDeclaration; - } - } - stateInDeclaration(c) { - if (c === CharCodes.Gt || this.fastForwardTo(CharCodes.Gt)) { - this.cbs.ondeclaration(this.sectionStart, this.index); - this.state = State.Text; - this.sectionStart = this.index + 1; - } - } - stateInProcessingInstruction(c) { - if (c === CharCodes.Gt || this.fastForwardTo(CharCodes.Gt)) { - this.cbs.onprocessinginstruction(this.sectionStart, this.index); - this.state = State.Text; - this.sectionStart = this.index + 1; - } - } - stateBeforeComment(c) { - if (c === CharCodes.Dash) { - this.state = State.InCommentLike; - this.currentSequence = Sequences.CommentEnd; - // Allow short comments (eg. <!-->) - this.sequenceIndex = 2; - this.sectionStart = this.index + 1; - } - else { - this.state = State.InDeclaration; - } - } - stateInSpecialComment(c) { - if (c === CharCodes.Gt || this.fastForwardTo(CharCodes.Gt)) { - this.cbs.oncomment(this.sectionStart, this.index, 0); - this.state = State.Text; - this.sectionStart = this.index + 1; - } - } - stateBeforeSpecialS(c) { - const lower = c | 0x20; - if (lower === Sequences.ScriptEnd[3]) { - this.startSpecial(Sequences.ScriptEnd, 4); - } - else if (lower === Sequences.StyleEnd[3]) { - this.startSpecial(Sequences.StyleEnd, 4); - } - else { - this.state = State.InTagName; - this.stateInTagName(c); // Consume the token again - } - } - stateBeforeSpecialT(c) { - const lower = c | 0x20; - if (lower === Sequences.TitleEnd[3]) { - this.startSpecial(Sequences.TitleEnd, 4); - } - else if (lower === Sequences.TextareaEnd[3]) { - this.startSpecial(Sequences.TextareaEnd, 4); - } - else { - this.state = State.InTagName; - this.stateInTagName(c); // Consume the token again - } - } - startEntity() { - this.baseState = this.state; - this.state = State.InEntity; - this.entityStart = this.index; - this.entityDecoder.startEntity(this.xmlMode - ? DecodingMode.Strict - : this.baseState === State.Text || - this.baseState === State.InSpecialTag - ? DecodingMode.Legacy - : DecodingMode.Attribute); - } - stateInEntity() { - const length = this.entityDecoder.write(this.buffer, this.index - this.offset); - // If `length` is positive, we are done with the entity. - if (length >= 0) { - this.state = this.baseState; - if (length === 0) { - this.index = this.entityStart; - } - } - else { - // Mark buffer as consumed. - this.index = this.offset + this.buffer.length - 1; - } - } - /** - * Remove data that has already been consumed from the buffer. - */ - cleanup() { - // If we are inside of text or attributes, emit what we already have. - if (this.running && this.sectionStart !== this.index) { - if (this.state === State.Text || - (this.state === State.InSpecialTag && this.sequenceIndex === 0)) { - this.cbs.ontext(this.sectionStart, this.index); - this.sectionStart = this.index; - } - else if (this.state === State.InAttributeValueDq || - this.state === State.InAttributeValueSq || - this.state === State.InAttributeValueNq) { - this.cbs.onattribdata(this.sectionStart, this.index); - this.sectionStart = this.index; - } - } - } - shouldContinue() { - return this.index < this.buffer.length + this.offset && this.running; - } - /** - * Iterates through the buffer, calling the function corresponding to the current state. - * - * States that are more likely to be hit are higher up, as a performance improvement. - */ - parse() { - while (this.shouldContinue()) { - const c = this.buffer.charCodeAt(this.index - this.offset); - switch (this.state) { - case State.Text: { - this.stateText(c); - break; - } - case State.SpecialStartSequence: { - this.stateSpecialStartSequence(c); - break; - } - case State.InSpecialTag: { - this.stateInSpecialTag(c); - break; - } - case State.CDATASequence: { - this.stateCDATASequence(c); - break; - } - case State.InAttributeValueDq: { - this.stateInAttributeValueDoubleQuotes(c); - break; - } - case State.InAttributeName: { - this.stateInAttributeName(c); - break; - } - case State.InCommentLike: { - this.stateInCommentLike(c); - break; - } - case State.InSpecialComment: { - this.stateInSpecialComment(c); - break; - } - case State.BeforeAttributeName: { - this.stateBeforeAttributeName(c); - break; - } - case State.InTagName: { - this.stateInTagName(c); - break; - } - case State.InClosingTagName: { - this.stateInClosingTagName(c); - break; - } - case State.BeforeTagName: { - this.stateBeforeTagName(c); - break; - } - case State.AfterAttributeName: { - this.stateAfterAttributeName(c); - break; - } - case State.InAttributeValueSq: { - this.stateInAttributeValueSingleQuotes(c); - break; - } - case State.BeforeAttributeValue: { - this.stateBeforeAttributeValue(c); - break; - } - case State.BeforeClosingTagName: { - this.stateBeforeClosingTagName(c); - break; - } - case State.AfterClosingTagName: { - this.stateAfterClosingTagName(c); - break; - } - case State.BeforeSpecialS: { - this.stateBeforeSpecialS(c); - break; - } - case State.BeforeSpecialT: { - this.stateBeforeSpecialT(c); - break; - } - case State.InAttributeValueNq: { - this.stateInAttributeValueNoQuotes(c); - break; - } - case State.InSelfClosingTag: { - this.stateInSelfClosingTag(c); - break; - } - case State.InDeclaration: { - this.stateInDeclaration(c); - break; - } - case State.BeforeDeclaration: { - this.stateBeforeDeclaration(c); - break; - } - case State.BeforeComment: { - this.stateBeforeComment(c); - break; - } - case State.InProcessingInstruction: { - this.stateInProcessingInstruction(c); - break; - } - case State.InEntity: { - this.stateInEntity(); - break; - } - } - this.index++; - } - this.cleanup(); - } - finish() { - if (this.state === State.InEntity) { - this.entityDecoder.end(); - this.state = this.baseState; - } - this.handleTrailingData(); - this.cbs.onend(); - } - /** Handle any trailing data. */ - handleTrailingData() { - const endIndex = this.buffer.length + this.offset; - // If there is no remaining data, we are done. - if (this.sectionStart >= endIndex) { - return; - } - if (this.state === State.InCommentLike) { - if (this.currentSequence === Sequences.CdataEnd) { - this.cbs.oncdata(this.sectionStart, endIndex, 0); - } - else { - this.cbs.oncomment(this.sectionStart, endIndex, 0); - } - } - else if (this.state === State.InTagName || - this.state === State.BeforeAttributeName || - this.state === State.BeforeAttributeValue || - this.state === State.AfterAttributeName || - this.state === State.InAttributeName || - this.state === State.InAttributeValueSq || - this.state === State.InAttributeValueDq || - this.state === State.InAttributeValueNq || - this.state === State.InClosingTagName) { - /* - * If we are currently in an opening or closing tag, us not calling the - * respective callback signals that the tag should be ignored. - */ - } - else { - this.cbs.ontext(this.sectionStart, endIndex); - } - } - emitCodePoint(cp, consumed) { - if (this.baseState !== State.Text && - this.baseState !== State.InSpecialTag) { - if (this.sectionStart < this.entityStart) { - this.cbs.onattribdata(this.sectionStart, this.entityStart); - } - this.sectionStart = this.entityStart + consumed; - this.index = this.sectionStart - 1; - this.cbs.onattribentity(cp); - } - else { - if (this.sectionStart < this.entityStart) { - this.cbs.ontext(this.sectionStart, this.entityStart); - } - this.sectionStart = this.entityStart + consumed; - this.index = this.sectionStart - 1; - this.cbs.ontextentity(cp, this.sectionStart); - } - } -} -//# sourceMappingURL=Tokenizer.js.map \ No newline at end of file diff --git a/node_modules/htmlparser2/lib/esm/Tokenizer.js.map b/node_modules/htmlparser2/lib/esm/Tokenizer.js.map deleted file mode 100644 index 01b7b49..0000000 --- a/node_modules/htmlparser2/lib/esm/Tokenizer.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Tokenizer.js","sourceRoot":"https://raw.githubusercontent.com/fb55/htmlparser2/e2939a6c7b05d5c4845b4a2e458a4fc0a65a321d/src/","sources":["Tokenizer.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,aAAa,EACb,YAAY,EACZ,cAAc,EACd,aAAa,GAChB,MAAM,wBAAwB,CAAC;AAEhC,IAAW,SA4BV;AA5BD,WAAW,SAAS;IAChB,uCAAS,CAAA;IACT,gDAAa,CAAA;IACb,kDAAc,CAAA;IACd,8DAAoB,CAAA;IACpB,4CAAY,CAAA;IACZ,gEAAsB,CAAA;IACtB,8CAAa,CAAA;IACb,wCAAU,CAAA;IACV,wDAAkB,CAAA;IAClB,wDAAkB,CAAA;IAClB,0CAAW,CAAA;IACX,4CAAY,CAAA;IACZ,0CAAW,CAAA;IACX,0CAAW,CAAA;IACX,0CAAW,CAAA;IACX,sCAAS,CAAA;IACT,sCAAS,CAAA;IACT,sCAAS,CAAA;IACT,0DAAmB,CAAA;IACnB,8CAAa,CAAA;IACb,8CAAa,CAAA;IACb,8CAAa,CAAA;IACb,+CAAa,CAAA;IACb,8CAAa,CAAA;IACb,+CAAa,CAAA;IACb,+CAAa,CAAA;IACb,0EAA2B,CAAA;AAC/B,CAAC,EA5BU,SAAS,KAAT,SAAS,QA4BnB;AAED,8CAA8C;AAC9C,IAAW,KAsCV;AAtCD,WAAW,KAAK;IACZ,iCAAQ,CAAA;IACR,mDAAa,CAAA;IACb,2CAAS,CAAA;IACT,yDAAgB,CAAA;IAChB,iEAAoB,CAAA;IACpB,yDAAgB,CAAA;IAChB,+DAAmB,CAAA;IAEnB,aAAa;IACb,+DAAmB,CAAA;IACnB,uDAAe,CAAA;IACf,8DAAkB,CAAA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QACP,CAAC;aAAM,CAAC;YACJ,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,YAAY,EAAE,QAAQ,CAAC,CAAC;QACjD,CAAC;IACL,CAAC;IAEO,aAAa,CAAC,EAAU,EAAE,QAAgB;QAC9C,IACI,IAAI,CAAC,SAAS,KAAK,KAAK,CAAC,IAAI;YAC7B,IAAI,CAAC,SAAS,KAAK,KAAK,CAAC,YAAY,EACvC,CAAC;YACC,IAAI,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,WAAW,EAAE,CAAC;gBACvC,IAAI,CAAC,GAAG,CAAC,YAAY,CAAC,IAAI,CAAC,YAAY,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC;YAC/D,CAAC;YACD,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,WAAW,GAAG,QAAQ,CAAC;YAChD,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,YAAY,GAAG,CAAC,CAAC;YAEnC,IAAI,CAAC,GAAG,CAAC,cAAc,CAAC,EAAE,CAAC,CAAC;QAChC,CAAC;aAAM,CAAC;YACJ,IAAI,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,WAAW,EAAE,CAAC;gBACvC,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,YAAY,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC;YACzD,CAAC;YACD,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,WAAW,GAAG,QAAQ,CAAC;YAChD,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,YAAY,GAAG,CAAC,CAAC;YAEnC,IAAI,CAAC,GAAG,CAAC,YAAY,CAAC,EAAE,EAAE,IAAI,CAAC,YAAY,CAAC,CAAC;QACjD,CAAC;IACL,CAAC;CACJ"} \ No newline at end of file diff --git a/node_modules/htmlparser2/lib/esm/WritableStream.d.ts b/node_modules/htmlparser2/lib/esm/WritableStream.d.ts deleted file mode 100644 index 0459e27..0000000 --- a/node_modules/htmlparser2/lib/esm/WritableStream.d.ts +++ /dev/null @@ -1,17 +0,0 @@ -/// <reference types="node" /> -/// <reference types="node" /> -import { type Handler, type ParserOptions } from "./Parser.js"; -import { Writable } from "node:stream"; -/** - * WritableStream makes the `Parser` interface available as a NodeJS stream. - * - * @see Parser - */ -export declare class WritableStream extends Writable { - private readonly _parser; - private readonly _decoder; - constructor(cbs: Partial<Handler>, options?: ParserOptions); - _write(chunk: string | Buffer, encoding: string, callback: () => void): void; - _final(callback: () => void): void; -} -//# sourceMappingURL=WritableStream.d.ts.map \ No newline at end of file diff --git a/node_modules/htmlparser2/lib/esm/WritableStream.d.ts.map b/node_modules/htmlparser2/lib/esm/WritableStream.d.ts.map deleted file mode 100644 index dccb10e..0000000 --- a/node_modules/htmlparser2/lib/esm/WritableStream.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"WritableStream.d.ts","sourceRoot":"https://raw.githubusercontent.com/fb55/htmlparser2/e2939a6c7b05d5c4845b4a2e458a4fc0a65a321d/src/","sources":["WritableStream.ts"],"names":[],"mappings":";;AAAA,OAAO,EAAU,KAAK,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,aAAa,CAAC;AAKvE,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAQvC;;;;GAIG;AACH,qBAAa,cAAe,SAAQ,QAAQ;IACxC,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAS;IACjC,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAuB;gBAEpC,GAAG,EAAE,OAAO,CAAC,OAAO,CAAC,EAAE,OAAO,CAAC,EAAE,aAAa;IAKjD,MAAM,CACX,KAAK,EAAE,MAAM,GAAG,MAAM,EACtB,QAAQ,EAAE,MAAM,EAChB,QAAQ,EAAE,MAAM,IAAI,GACrB,IAAI;IAOE,MAAM,CAAC,QAAQ,EAAE,MAAM,IAAI,GAAG,IAAI;CAI9C"} \ No newline at end of file diff --git a/node_modules/htmlparser2/lib/esm/WritableStream.js b/node_modules/htmlparser2/lib/esm/WritableStream.js deleted file mode 100644 index bf6093e..0000000 --- a/node_modules/htmlparser2/lib/esm/WritableStream.js +++ /dev/null @@ -1,32 +0,0 @@ -import { Parser } from "./Parser.js"; -/* - * NOTE: If either of these two imports produces a type error, - * please update your @types/node dependency! - */ -import { Writable } from "node:stream"; -import { StringDecoder } from "node:string_decoder"; -// Following the example in https://nodejs.org/api/stream.html#stream_decoding_buffers_in_a_writable_stream -function isBuffer(_chunk, encoding) { - return encoding === "buffer"; -} -/** - * WritableStream makes the `Parser` interface available as a NodeJS stream. - * - * @see Parser - */ -export class WritableStream extends Writable { - constructor(cbs, options) { - super({ decodeStrings: false }); - this._decoder = new StringDecoder(); - this._parser = new Parser(cbs, options); - } - _write(chunk, encoding, callback) { - this._parser.write(isBuffer(chunk, encoding) ? this._decoder.write(chunk) : chunk); - callback(); - } - _final(callback) { - this._parser.end(this._decoder.end()); - callback(); - } -} -//# sourceMappingURL=WritableStream.js.map \ No newline at end of file diff --git a/node_modules/htmlparser2/lib/esm/WritableStream.js.map b/node_modules/htmlparser2/lib/esm/WritableStream.js.map deleted file mode 100644 index 22eba8e..0000000 --- a/node_modules/htmlparser2/lib/esm/WritableStream.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"WritableStream.js","sourceRoot":"https://raw.githubusercontent.com/fb55/htmlparser2/e2939a6c7b05d5c4845b4a2e458a4fc0a65a321d/src/","sources":["WritableStream.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAoC,MAAM,aAAa,CAAC;AACvE;;;GAGG;AACH,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEpD,2GAA2G;AAC3G,SAAS,QAAQ,CAAC,MAAuB,EAAE,QAAgB;IACvD,OAAO,QAAQ,KAAK,QAAQ,CAAC;AACjC,CAAC;AAED;;;;GAIG;AACH,MAAM,OAAO,cAAe,SAAQ,QAAQ;IAIxC,YAAY,GAAqB,EAAE,OAAuB;QACtD,KAAK,CAAC,EAAE,aAAa,EAAE,KAAK,EAAE,CAAC,CAAC;QAHnB,aAAQ,GAAG,IAAI,aAAa,EAAE,CAAC;QAI5C,IAAI,CAAC,OAAO,GAAG,IAAI,MAAM,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC;IAC5C,CAAC;IAEQ,MAAM,CACX,KAAsB,EACtB,QAAgB,EAChB,QAAoB;QAEpB,IAAI,CAAC,OAAO,CAAC,KAAK,CACd,QAAQ,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CACjE,CAAC;QACF,QAAQ,EAAE,CAAC;IACf,CAAC;IAEQ,MAAM,CAAC,QAAoB;QAChC,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAC,GAAG,EAAE,CAAC,CAAC;QACtC,QAAQ,EAAE,CAAC;IACf,CAAC;CACJ"} \ No newline at end of file diff --git a/node_modules/htmlparser2/lib/esm/index.d.ts b/node_modules/htmlparser2/lib/esm/index.d.ts deleted file mode 100644 index c906b7f..0000000 --- a/node_modules/htmlparser2/lib/esm/index.d.ts +++ /dev/null @@ -1,54 +0,0 @@ -import { Parser, type ParserOptions } from "./Parser.js"; -export type { Handler, ParserOptions } from "./Parser.js"; -export { Parser } from "./Parser.js"; -import { type DomHandlerOptions, type ChildNode, type Element, type Document } from "domhandler"; -export { DomHandler, DomHandler as DefaultHandler, type DomHandlerOptions, } from "domhandler"; -export type Options = ParserOptions & DomHandlerOptions; -/** - * Parses the data, returns the resulting document. - * - * @param data The data that should be parsed. - * @param options Optional options for the parser and DOM handler. - */ -export declare function parseDocument(data: string, options?: Options): Document; -/** - * Parses data, returns an array of the root nodes. - * - * Note that the root nodes still have a `Document` node as their parent. - * Use `parseDocument` to get the `Document` node instead. - * - * @param data The data that should be parsed. - * @param options Optional options for the parser and DOM handler. - * @deprecated Use `parseDocument` instead. - */ -export declare function parseDOM(data: string, options?: Options): ChildNode[]; -/** - * Creates a parser instance, with an attached DOM handler. - * - * @param callback A callback that will be called once parsing has been completed, with the resulting document. - * @param options Optional options for the parser and DOM handler. - * @param elementCallback An optional callback that will be called every time a tag has been completed inside of the DOM. - */ -export declare function createDocumentStream(callback: (error: Error | null, document: Document) => void, options?: Options, elementCallback?: (element: Element) => void): Parser; -/** - * Creates a parser instance, with an attached DOM handler. - * - * @param callback A callback that will be called once parsing has been completed, with an array of root nodes. - * @param options Optional options for the parser and DOM handler. - * @param elementCallback An optional callback that will be called every time a tag has been completed inside of the DOM. - * @deprecated Use `createDocumentStream` instead. - */ -export declare function createDomStream(callback: (error: Error | null, dom: ChildNode[]) => void, options?: Options, elementCallback?: (element: Element) => void): Parser; -export { default as Tokenizer, type Callbacks as TokenizerCallbacks, QuoteType, } from "./Tokenizer.js"; -export * as ElementType from "domelementtype"; -import { type Feed } from "domutils"; -export { getFeed, type Feed } from "domutils"; -/** - * Parse a feed. - * - * @param feed The feed that should be parsed, as a string. - * @param options Optionally, options for parsing. When using this, you should set `xmlMode` to `true`. - */ -export declare function parseFeed(feed: string, options?: Options): Feed | null; -export * as DomUtils from "domutils"; -//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/htmlparser2/lib/esm/index.d.ts.map b/node_modules/htmlparser2/lib/esm/index.d.ts.map deleted file mode 100644 index a3745e3..0000000 --- a/node_modules/htmlparser2/lib/esm/index.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"https://raw.githubusercontent.com/fb55/htmlparser2/e2939a6c7b05d5c4845b4a2e458a4fc0a65a321d/src/","sources":["index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,KAAK,aAAa,EAAE,MAAM,aAAa,CAAC;AACzD,YAAY,EAAE,OAAO,EAAE,aAAa,EAAE,MA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,MAAM,UAAU,CAAC;AAE9C,OAAO,EAAE,OAAO,EAAE,KAAK,IAAI,EAAE,MAAM,UAAU,CAAC;AAI9C;;;;;GAKG;AACH,wBAAgB,SAAS,CACrB,IAAI,EAAE,MAAM,EACZ,OAAO,GAAE,OAAiC,GAC3C,IAAI,GAAG,IAAI,CAEb;AAED,OAAO,KAAK,QAAQ,MAAM,UAAU,CAAC"} \ No newline at end of file diff --git a/node_modules/htmlparser2/lib/esm/index.js b/node_modules/htmlparser2/lib/esm/index.js deleted file mode 100644 index 38bfe96..0000000 --- a/node_modules/htmlparser2/lib/esm/index.js +++ /dev/null @@ -1,74 +0,0 @@ -import { Parser } from "./Parser.js"; -export { Parser } from "./Parser.js"; -import { DomHandler, } from "domhandler"; -export { DomHandler, -// Old name for DomHandler -DomHandler as DefaultHandler, } from "domhandler"; -// Helper methods -/** - * Parses the data, returns the resulting document. - * - * @param data The data that should be parsed. - * @param options Optional options for the parser and DOM handler. - */ -export function parseDocument(data, options) { - const handler = new DomHandler(undefined, options); - new Parser(handler, options).end(data); - return handler.root; -} -/** - * Parses data, returns an array of the root nodes. - * - * Note that the root nodes still have a `Document` node as their parent. - * Use `parseDocument` to get the `Document` node instead. - * - * @param data The data that should be parsed. - * @param options Optional options for the parser and DOM handler. - * @deprecated Use `parseDocument` instead. - */ -export function parseDOM(data, options) { - return parseDocument(data, options).children; -} -/** - * Creates a parser instance, with an attached DOM handler. - * - * @param callback A callback that will be called once parsing has been completed, with the resulting document. - * @param options Optional options for the parser and DOM handler. - * @param elementCallback An optional callback that will be called every time a tag has been completed inside of the DOM. - */ -export function createDocumentStream(callback, options, elementCallback) { - const handler = new DomHandler((error) => callback(error, handler.root), options, elementCallback); - return new Parser(handler, options); -} -/** - * Creates a parser instance, with an attached DOM handler. - * - * @param callback A callback that will be called once parsing has been completed, with an array of root nodes. - * @param options Optional options for the parser and DOM handler. - * @param elementCallback An optional callback that will be called every time a tag has been completed inside of the DOM. - * @deprecated Use `createDocumentStream` instead. - */ -export function createDomStream(callback, options, elementCallback) { - const handler = new DomHandler(callback, options, elementCallback); - return new Parser(handler, options); -} -export { default as Tokenizer, QuoteType, } from "./Tokenizer.js"; -/* - * All of the following exports exist for backwards-compatibility. - * They should probably be removed eventually. - */ -export * as ElementType from "domelementtype"; -import { getFeed } from "domutils"; -export { getFeed } from "domutils"; -const parseFeedDefaultOptions = { xmlMode: true }; -/** - * Parse a feed. - * - * @param feed The feed that should be parsed, as a string. - * @param options Optionally, options for parsing. When using this, you should set `xmlMode` to `true`. - */ -export function parseFeed(feed, options = parseFeedDefaultOptions) { - return getFeed(parseDOM(feed, options)); -} -export * as DomUtils from "domutils"; -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/htmlparser2/lib/esm/index.js.map b/node_modules/htmlparser2/lib/esm/index.js.map deleted file mode 100644 index e6c9566..0000000 --- a/node_modules/htmlparser2/lib/esm/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sourceRoot":"https://raw.githubusercontent.com/fb55/htmlparser2/e2939a6c7b05d5c4845b4a2e458a4fc0a65a321d/src/","sources":["index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAsB,MAAM,aAAa,CAAC;AAEzD,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAErC,OAAO,EACH,UAAU,GAKb,MAAM,YAAY,CAAC;AAEpB,OAAO,EACH,UAAU;AACV,0BAA0B;AAC1B,UAAU,IAAI,cAAc,GAE/B,MAAM,YAAY,CAAC;AAIpB,iBAAiB;AAEjB;;;;;GAKG;AACH,MAAM,UAAU,aAAa,CAAC,IAAY,EAAE,OAAiB;IACzD,MAAM,OAAO,GAAG,IAAI,UAAU,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC;IACnD,IAAI,MAAM,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;IACvC,OAAO,OAAO,CAAC,IAAI,CAAC;AACxB,CA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ser2/lib/esm/package.json b/node_modules/htmlparser2/lib/esm/package.json deleted file mode 100644 index 089153b..0000000 --- a/node_modules/htmlparser2/lib/esm/package.json +++ /dev/null @@ -1 +0,0 @@ -{"type":"module"} diff --git a/node_modules/htmlparser2/lib/index.d.ts b/node_modules/htmlparser2/lib/index.d.ts deleted file mode 100644 index c906b7f..0000000 --- a/node_modules/htmlparser2/lib/index.d.ts +++ /dev/null @@ -1,54 +0,0 @@ -import { Parser, type ParserOptions } from "./Parser.js"; -export type { Handler, ParserOptions } from "./Parser.js"; -export { Parser } from "./Parser.js"; -import { type DomHandlerOptions, type ChildNode, type Element, type Document } from "domhandler"; -export { DomHandler, DomHandler as DefaultHandler, type DomHandlerOptions, } from "domhandler"; -export type Options = ParserOptions & DomHandlerOptions; -/** - * Parses the data, returns the resulting document. - * - * @param data The data that should be parsed. - * @param options Optional options for the parser and DOM handler. - */ -export declare function parseDocument(data: string, options?: Options): Document; -/** - * Parses data, returns an array of the root nodes. - * - * Note that the root nodes still have a `Document` node as their parent. - * Use `parseDocument` to get the `Document` node instead. - * - * @param data The data that should be parsed. - * @param options Optional options for the parser and DOM handler. - * @deprecated Use `parseDocument` instead. - */ -export declare function parseDOM(data: string, options?: Options): ChildNode[]; -/** - * Creates a parser instance, with an attached DOM handler. - * - * @param callback A callback that will be called once parsing has been completed, with the resulting document. - * @param options Optional options for the parser and DOM handler. - * @param elementCallback An optional callback that will be called every time a tag has been completed inside of the DOM. - */ -export declare function createDocumentStream(callback: (error: Error | null, document: Document) => void, options?: Options, elementCallback?: (element: Element) => void): Parser; -/** - * Creates a parser instance, with an attached DOM handler. - * - * @param callback A callback that will be called once parsing has been completed, with an array of root nodes. - * @param options Optional options for the parser and DOM handler. - * @param elementCallback An optional callback that will be called every time a tag has been completed inside of the DOM. - * @deprecated Use `createDocumentStream` instead. - */ -export declare function createDomStream(callback: (error: Error | null, dom: ChildNode[]) => void, options?: Options, elementCallback?: (element: Element) => void): Parser; -export { default as Tokenizer, type Callbacks as TokenizerCallbacks, QuoteType, } from "./Tokenizer.js"; -export * as ElementType from "domelementtype"; -import { type Feed } from "domutils"; -export { getFeed, type Feed } from "domutils"; -/** - * Parse a feed. - * - * @param feed The feed that should be parsed, as a string. - * @param options Optionally, options for parsing. When using this, you should set `xmlMode` to `true`. - */ -export declare function parseFeed(feed: string, options?: Options): Feed | null; -export * as DomUtils from "domutils"; -//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/htmlparser2/lib/index.d.ts.map b/node_modules/htmlparser2/lib/index.d.ts.map deleted file mode 100644 index a3745e3..0000000 --- a/node_modules/htmlparser2/lib/index.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"https://raw.githubusercontent.com/fb55/htmlparser2/e2939a6c7b05d5c4845b4a2e458a4fc0a65a321d/src/","sources":["index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,KAAK,aAAa,EAAE,MAAM,aAAa,CAAC;AACzD,YAAY,EAAE,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC1D,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAErC,OAAO,EAEH,KAAK,iBAAiB,EACtB,KAAK,SAAS,EACd,KAAK,OAAO,EACZ,KAAK,QAAQ,EAChB,MAAM,YAAY,CAAC;AAEpB,OAAO,EACH,UAAU,EAEV,UAAU,IAAI,cAAc,EAC5B,KAAK,iBAAiB,GACzB,MAAM,YAAY,CAAC;AAEpB,MAAM,MAAM,OAAO,GAAG,aAAa,GAAG,iBAAiB,CAAC;AAIxD;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,OAAO,GAAG,QAAQ,CAIvE;AACD;;;;;;;;;GASG;AACH,wBAAgB,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,OAAO,GAAG,SAAS,EAAE,CAErE;AACD;;;;;;GAMG;AACH,wBAAgB,oBAAoB,CAChC,QAAQ,EAAE,CAAC,KAAK,EAAE,KAAK,GAAG,IAAI,EAAE,QAAQ,EAAE,QAAQ,KAAK,IAAI,EAC3D,OAAO,CAAC,EAAE,OAAO,EACjB,eAAe,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,GAC7C,MAAM,CAOR;AACD;;;;;;;GAOG;AACH,wBAAgB,eAAe,CAC3B,QAAQ,EAAE,CAAC,KAAK,EAAE,KAAK,GAAG,IAAI,EAAE,GAAG,EAAE,SAAS,EAAE,KAAK,IAAI,EACzD,OAAO,CAAC,EAAE,OAAO,EACjB,eAAe,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,GAC7C,MAAM,CAGR;AAED,OAAO,EACH,OAAO,IAAI,SAAS,EACpB,KAAK,SAAS,IAAI,kBAAkB,EACpC,SAAS,GACZ,MAAM,gBAAgB,CAAC;AAMxB,OAAO,KAAK,WAAW,MAAM,gBAAgB,CAAC;AAE9C,OAAO,EAAW,KAAK,IAAI,EAAE,MAAM,UAAU,CAAC;AAE9C,OAAO,EAAE,OAAO,EAAE,KAAK,IAAI,EAAE,MAAM,UAAU,CAAC;AAI9C;;;;;GAKG;AACH,wBAAgB,SAAS,CACrB,IAAI,EAAE,MAAM,EACZ,OAAO,GAAE,OAAiC,GAC3C,IAAI,GAAG,IAAI,CAEb;AAED,OAAO,KAAK,QAAQ,MAAM,UAAU,CAAC"} \ No newline at end of file diff --git a/node_modules/htmlparser2/lib/index.js b/node_modules/htmlparser2/lib/index.js deleted file mode 100644 index a56fb98..0000000 --- a/node_modules/htmlparser2/lib/index.js +++ /dev/null @@ -1,114 +0,0 @@ -"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 __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}); -var __importStar = (this && this.__importStar) || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; -}; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.DomUtils = exports.parseFeed = exports.getFeed = exports.ElementType = exports.QuoteType = exports.Tokenizer = exports.createDomStream = exports.createDocumentStream = exports.parseDOM = exports.parseDocument = exports.DefaultHandler = exports.DomHandler = exports.Parser = void 0; -var Parser_js_1 = require("./Parser.js"); -var Parser_js_2 = require("./Parser.js"); -Object.defineProperty(exports, "Parser", { enumerable: true, get: function () { return Parser_js_2.Parser; } }); -var domhandler_1 = require("domhandler"); -var domhandler_2 = require("domhandler"); -Object.defineProperty(exports, "DomHandler", { enumerable: true, get: function () { return domhandler_2.DomHandler; } }); -// Old name for DomHandler -Object.defineProperty(exports, "DefaultHandler", { enumerable: true, get: function () { return domhandler_2.DomHandler; } }); -// Helper methods -/** - * Parses the data, returns the resulting document. - * - * @param data The data that should be parsed. - * @param options Optional options for the parser and DOM handler. - */ -function parseDocument(data, options) { - var handler = new domhandler_1.DomHandler(undefined, options); - new Parser_js_1.Parser(handler, options).end(data); - return handler.root; -} -exports.parseDocument = parseDocument; -/** - * Parses data, returns an array of the root nodes. - * - * Note that the root nodes still have a `Document` node as their parent. - * Use `parseDocument` to get the `Document` node instead. - * - * @param data The data that should be parsed. - * @param options Optional options for the parser and DOM handler. - * @deprecated Use `parseDocument` instead. - */ -function parseDOM(data, options) { - return parseDocument(data, options).children; -} -exports.parseDOM = parseDOM; -/** - * Creates a parser instance, with an attached DOM handler. - * - * @param callback A callback that will be called once parsing has been completed, with the resulting document. - * @param options Optional options for the parser and DOM handler. - * @param elementCallback An optional callback that will be called every time a tag has been completed inside of the DOM. - */ -function createDocumentStream(callback, options, elementCallback) { - var handler = new domhandler_1.DomHandler(function (error) { return callback(error, handler.root); }, options, elementCallback); - return new Parser_js_1.Parser(handler, options); -} -exports.createDocumentStream = createDocumentStream; -/** - * Creates a parser instance, with an attached DOM handler. - * - * @param callback A callback that will be called once parsing has been completed, with an array of root nodes. - * @param options Optional options for the parser and DOM handler. - * @param elementCallback An optional callback that will be called every time a tag has been completed inside of the DOM. - * @deprecated Use `createDocumentStream` instead. - */ -function createDomStream(callback, options, elementCallback) { - var handler = new domhandler_1.DomHandler(callback, options, elementCallback); - return new Parser_js_1.Parser(handler, options); -} -exports.createDomStream = createDomStream; -var Tokenizer_js_1 = require("./Tokenizer.js"); -Object.defineProperty(exports, "Tokenizer", { enumerable: true, get: function () { return __importDefault(Tokenizer_js_1).default; } }); -Object.defineProperty(exports, "QuoteType", { enumerable: true, get: function () { return Tokenizer_js_1.QuoteType; } }); -/* - * All of the following exports exist for backwards-compatibility. - * They should probably be removed eventually. - */ -exports.ElementType = __importStar(require("domelementtype")); -var domutils_1 = require("domutils"); -var domutils_2 = require("domutils"); -Object.defineProperty(exports, "getFeed", { enumerable: true, get: function () { return domutils_2.getFeed; } }); -var parseFeedDefaultOptions = { xmlMode: true }; -/** - * Parse a feed. - * - * @param feed The feed that should be parsed, as a string. - * @param options Optionally, options for parsing. When using this, you should set `xmlMode` to `true`. - */ -function parseFeed(feed, options) { - if (options === void 0) { options = parseFeedDefaultOptions; } - return (0, domutils_1.getFeed)(parseDOM(feed, options)); -} -exports.parseFeed = parseFeed; -exports.DomUtils = __importStar(require("domutils")); -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/htmlparser2/lib/index.js.map b/node_modules/htmlparser2/lib/index.js.map deleted file mode 100644 index e8c2f54..0000000 --- a/node_modules/htmlparser2/lib/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sourceRoot":"https://raw.githubusercontent.com/fb55/htmlparser2/e2939a6c7b05d5c4845b4a2e458a4fc0a65a321d/src/","sources":["index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,yCAAyD;AAEzD,yCAAqC;AAA5B,mGAAA,MAAM,OAAA;AAEf,yCAMoB;AAEpB,yCAKoB;AAJhB,wGAAA,UAAU,OAAA;AACV,0BAA0B;AAC1B,4GAAA,UAAU,OAAkB;AAMhC,iBAAiB;AAEjB;;;;;GAKG;AACH,SAAgB,aAAa,CAAC,IAAY,EAAE,OAAiB;IACzD,IAAM,OAAO,GAAG,IAAI,uBAAU,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC;IACnD,IAAI,kBAAM,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;IACvC,OAAO,OAAO,CAAC,IAAI,CAAC;AACxB,CAAC;AAJD,sCAIC;AACD;;;;;;;;;GASG;AACH,SAAgB,QAAQ,CAAC,IAAY,EAAE,OAAiB;IACpD,OAAO,aAAa,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC,QAAQ,CAAC;AACjD,CAAC;AAFD,4BAEC;AACD;;;;;;GAMG;AACH,SAAgB,oBAAoB,CAChC,QAA2D,EAC3D,OAAiB,EACjB,eAA4C;IAE5C,IAAM,OAAO,GAAe,IAAI,uBAAU,CACtC,UAAC,KAAmB,IAAK,OAAA,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAC,IAAI,CAAC,EAA7B,CAA6B,EACtD,OAAO,EACP,eAAe,CAClB,CAAC;IACF,OAAO,IAAI,kBAAM,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;AACxC,CAAC;AAXD,oDAWC;AACD;;;;;;;GAOG;AACH,SAAgB,eAAe,CAC3B,QAAyD,EACzD,OAAiB,EACjB,eAA4C;IAE5C,IAAM,OAAO,GAAG,IAAI,uBAAU,CAAC,QAAQ,EAAE,OAAO,EAAE,eAAe,CAAC,CAAC;IACnE,OAAO,IAAI,kBAAM,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;AACxC,CAAC;AAPD,0CAOC;AAED,+CAIwB;AAHpB,0HAAA,OAAO,OAAa;AAEpB,yGAAA,SAAS,OAAA;AAGb;;;GAGG;AACH,8DAA8C;AAE9C,qCAA8C;AAE9C,qCAA8C;AAArC,mGAAA,OAAO,OAAA;AAEhB,IAAM,uBAAuB,GAAG,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;AAElD;;;;;GAKG;AACH,SAAgB,SAAS,CACrB,IAAY,EACZ,OAA0C;IAA1C,wBAAA,EAAA,iCAA0C;IAE1C,OAAO,IAAA,kBAAO,EAAC,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC,CAAC;AAC5C,CAAC;AALD,8BAKC;AAED,qDAAqC"} \ No newline at end of file diff --git a/node_modules/htmlparser2/package.json b/node_modules/htmlparser2/package.json deleted file mode 100644 index 708f6a4..0000000 --- a/node_modules/htmlparser2/package.json +++ /dev/null @@ -1,97 +0,0 @@ -{ - "name": "htmlparser2", - "description": "Fast & forgiving HTML/XML parser", - "version": "9.1.0", - "author": "Felix Boehm <me@feedic.com>", - "funding": [ - "https://github.com/fb55/htmlparser2?sponsor=1", - { - "type": "github", - "url": "https://github.com/sponsors/fb55" - } - ], - "license": "MIT", - "sideEffects": false, - "keywords": [ - "html", - "parser", - "streams", - "xml", - "dom", - "rss", - "feed", - "atom" - ], - "repository": { - "type": "git", - "url": "git://github.com/fb55/htmlparser2.git" - }, - "directories": { - "lib": "lib/" - }, - "main": "lib/index.js", - "types": "lib/index.d.ts", - "module": "lib/esm/index.js", - "exports": { - ".": { - "require": "./lib/index.js", - "import": "./lib/esm/index.js" - }, - "./lib/WritableStream": { - "require": "./lib/WritableStream.js", - "import": "./lib/esm/WritableStream.js" - } - }, - "files": [ - "lib/**/*" - ], - "scripts": { - "test": "npm run test:jest && npm run lint", - "test:jest": "jest", - "lint": "npm run lint:es && npm run lint:prettier", - "lint:es": "eslint src", - "lint:prettier": "npm run format:prettier:raw -- --check", - "format": "npm run format:es && npm run format:prettier", - "format:es": "npm run lint:es -- --fix", - "format:prettier": "npm run format:prettier:raw -- --write", - "format:prettier:raw": "prettier '**/*.{ts,md,json,yml}'", - "build": "npm run build:cjs && npm run build:esm", - "build:cjs": "tsc --sourceRoot https://raw.githubusercontent.com/fb55/htmlparser2/$(git rev-parse HEAD)/src/", - "build:esm": "npm run build:cjs -- --module esnext --target es2019 --outDir lib/esm && echo '{\"type\":\"module\"}' > lib/esm/package.json", - "prepare": "npm run build" - }, - "dependencies": { - "domelementtype": "^2.3.0", - "domhandler": "^5.0.3", - "domutils": "^3.1.0", - "entities": "^4.5.0" - }, - "devDependencies": { - "@types/jest": "^29.5.11", - "@types/node": "^20.10.6", - "@typescript-eslint/eslint-plugin": "^6.17.0", - "@typescript-eslint/parser": "^6.17.0", - "eslint": "^8.56.0", - "eslint-config-prettier": "^9.1.0", - "eslint-plugin-n": "^16.6.1", - "eslint-plugin-unicorn": "^50.0.1", - "jest": "^29.7.0", - "prettier": "^3.1.1", - "ts-jest": "^29.1.1", - "typescript": "^5.3.3" - }, - "jest": { - "preset": "ts-jest", - "testEnvironment": "node", - "coverageProvider": "v8", - "moduleNameMapper": { - "^(.*)\\.js$": [ - "$1", - "$1.js" - ] - } - }, - "prettier": { - "tabWidth": 4 - } -} diff --git a/node_modules/iconv-lite/encodings/dbcs-codec.js b/node_modules/iconv-lite/encodings/dbcs-codec.js index 1fe3e16..fa83917 100644 --- a/node_modules/iconv-lite/encodings/dbcs-codec.js +++ b/node_modules/iconv-lite/encodings/dbcs-codec.js @@ -49,6 +49,48 @@ function DBCSCodec(codecOptions, iconv) { for (var i = 0; i < mappingTable.length; i++) this._addDecodeChunk(mappingTable[i]); + // Load & create GB18030 tables when needed. + if (typeof codecOptions.gb18030 === 'function') { + this.gb18030 = codecOptions.gb18030(); // Load GB18030 ranges. + + // Add GB18030 common decode nodes. + var commonThirdByteNodeIdx = this.decodeTables.length; + this.decodeTables.push(UNASSIGNED_NODE.slice(0)); + + var commonFourthByteNodeIdx = this.decodeTables.length; + this.decodeTables.push(UNASSIGNED_NODE.slice(0)); + + // Fill out the tree + var firstByteNode = this.decodeTables[0]; + for (var i = 0x81; i <= 0xFE; i++) { + var secondByteNode = this.decodeTables[NODE_START - firstByteNode[i]]; + for (var j = 0x30; j <= 0x39; j++) { + if (secondByteNode[j] === UNASSIGNED) { + secondByteNode[j] = NODE_START - commonThirdByteNodeIdx; + } else if (secondByteNode[j] > NODE_START) { + throw new Error("gb18030 decode tables conflict at byte 2"); + } + + var thirdByteNode = this.decodeTables[NODE_START - secondByteNode[j]]; + for (var k = 0x81; k <= 0xFE; k++) { + if (thirdByteNode[k] === UNASSIGNED) { + thirdByteNode[k] = NODE_START - commonFourthByteNodeIdx; + } else if (thirdByteNode[k] === NODE_START - commonFourthByteNodeIdx) { + continue; + } else if (thirdByteNode[k] > NODE_START) { + throw new Error("gb18030 decode tables conflict at byte 3"); + } + + var fourthByteNode = this.decodeTables[NODE_START - thirdByteNode[k]]; + for (var l = 0x30; l <= 0x39; l++) { + if (fourthByteNode[l] === UNASSIGNED) + fourthByteNode[l] = GB18030_CODE; + } + } + } + } + } + this.defaultCharUnicode = iconv.defaultCharUnicode; @@ -92,30 +134,6 @@ function DBCSCodec(codecOptions, iconv) { this.defCharSB = this.encodeTable[0][iconv.defaultCharSingleByte.charCodeAt(0)]; if (this.defCharSB === UNASSIGNED) this.defCharSB = this.encodeTable[0]['?']; if (this.defCharSB === UNASSIGNED) this.defCharSB = "?".charCodeAt(0); - - - // Load & create GB18030 tables when needed. - if (typeof codecOptions.gb18030 === 'function') { - this.gb18030 = codecOptions.gb18030(); // Load GB18030 ranges. - - // Add GB18030 decode tables. - var thirdByteNodeIdx = this.decodeTables.length; - var thirdByteNode = this.decodeTables[thirdByteNodeIdx] = UNASSIGNED_NODE.slice(0); - - var fourthByteNodeIdx = this.decodeTables.length; - var fourthByteNode = this.decodeTables[fourthByteNodeIdx] = UNASSIGNED_NODE.slice(0); - - for (var i = 0x81; i <= 0xFE; i++) { - var secondByteNodeIdx = NODE_START - this.decodeTables[0][i]; - var secondByteNode = this.decodeTables[secondByteNodeIdx]; - for (var j = 0x30; j <= 0x39; j++) - secondByteNode[j] = NODE_START - thirdByteNodeIdx; - } - for (var i = 0x81; i <= 0xFE; i++) - thirdByteNode[i] = NODE_START - fourthByteNodeIdx; - for (var i = 0x30; i <= 0x39; i++) - fourthByteNode[i] = GB18030_CODE - } } DBCSCodec.prototype.encoder = DBCSEncoder; @@ -124,7 +142,7 @@ DBCSCodec.prototype.decoder = DBCSDecoder; // Decoder helpers DBCSCodec.prototype._getDecodeTrieNode = function(addr) { var bytes = []; - for (; addr > 0; addr >>= 8) + for (; addr > 0; addr >>>= 8) bytes.push(addr & 0xFF); if (bytes.length == 0) bytes.push(0); @@ -249,19 +267,32 @@ DBCSCodec.prototype._setEncodeSequence = function(seq, dbcsCode) { DBCSCodec.prototype._fillEncodeTable = function(nodeIdx, prefix, skipEncodeChars) { var node = this.decodeTables[nodeIdx]; + var hasValues = false; + var subNodeEmpty = {}; for (var i = 0; i < 0x100; i++) { var uCode = node[i]; var mbCode = prefix + i; if (skipEncodeChars[mbCode]) continue; - if (uCode >= 0) + if (uCode >= 0) { this._setEncodeChar(uCode, mbCode); - else if (uCode <= NODE_START) - this._fillEncodeTable(NODE_START - uCode, mbCode << 8, skipEncodeChars); - else if (uCode <= SEQ_START) + hasValues = true; + } else if (uCode <= NODE_START) { + var subNodeIdx = NODE_START - uCode; + if (!subNodeEmpty[subNodeIdx]) { // Skip empty subtrees (they are too large in gb18030). + var newPrefix = (mbCode << 8) >>> 0; // NOTE: '>>> 0' keeps 32-bit num positive. + if (this._fillEncodeTable(subNodeIdx, newPrefix, skipEncodeChars)) + hasValues = true; + else + subNodeEmpty[subNodeIdx] = true; + } + } else if (uCode <= SEQ_START) { this._setEncodeSequence(this.decodeTableSeq[SEQ_START - uCode], mbCode); + hasValues = true; + } } + return hasValues; } @@ -388,10 +419,15 @@ DBCSEncoder.prototype.write = function(str) { newBuf[j++] = dbcsCode >> 8; // high byte newBuf[j++] = dbcsCode & 0xFF; // low byte } - else { + else if (dbcsCode < 0x1000000) { newBuf[j++] = dbcsCode >> 16; newBuf[j++] = (dbcsCode >> 8) & 0xFF; newBuf[j++] = dbcsCode & 0xFF; + } else { + newBuf[j++] = dbcsCode >>> 24; + newBuf[j++] = (dbcsCode >>> 16) & 0xFF; + newBuf[j++] = (dbcsCode >>> 8) & 0xFF; + newBuf[j++] = dbcsCode & 0xFF; } } @@ -440,7 +476,7 @@ DBCSEncoder.prototype.findIdx = findIdx; function DBCSDecoder(options, codec) { // Decoder state this.nodeIdx = 0; - this.prevBuf = Buffer.alloc(0); + this.prevBytes = []; // Static data this.decodeTables = codec.decodeTables; @@ -452,15 +488,12 @@ function DBCSDecoder(options, codec) { DBCSDecoder.prototype.write = function(buf) { var newBuf = Buffer.alloc(buf.length*2), nodeIdx = this.nodeIdx, - prevBuf = this.prevBuf, prevBufOffset = this.prevBuf.length, - seqStart = -this.prevBuf.length, // idx of the start of current parsed sequence. + prevBytes = this.prevBytes, prevOffset = this.prevBytes.length, + seqStart = -this.prevBytes.length, // idx of the start of current parsed sequence. uCode; - if (prevBufOffset > 0) // Make prev buf overlap a little to make it easier to slice later. - prevBuf = Buffer.concat([prevBuf, buf.slice(0, 10)]); - for (var i = 0, j = 0; i < buf.length; i++) { - var curByte = (i >= 0) ? buf[i] : prevBuf[i + prevBufOffset]; + var curByte = (i >= 0) ? buf[i] : prevBytes[i + prevOffset]; // Lookup in current trie node. var uCode = this.decodeTables[nodeIdx][curByte]; @@ -470,13 +503,18 @@ DBCSDecoder.prototype.write = function(buf) { } else if (uCode === UNASSIGNED) { // Unknown char. // TODO: Callback with seq. - //var curSeq = (seqStart >= 0) ? buf.slice(seqStart, i+1) : prevBuf.slice(seqStart + prevBufOffset, i+1 + prevBufOffset); - i = seqStart; // Try to parse again, after skipping first byte of the sequence ('i' will be incremented by 'for' cycle). uCode = this.defaultCharUnicode.charCodeAt(0); + i = seqStart; // Skip one byte ('i' will be incremented by the for loop) and try to parse again. } else if (uCode === GB18030_CODE) { - var curSeq = (seqStart >= 0) ? buf.slice(seqStart, i+1) : prevBuf.slice(seqStart + prevBufOffset, i+1 + prevBufOffset); - var ptr = (curSeq[0]-0x81)*12600 + (curSeq[1]-0x30)*1260 + (curSeq[2]-0x81)*10 + (curSeq[3]-0x30); + if (i >= 3) { + var ptr = (buf[i-3]-0x81)*12600 + (buf[i-2]-0x30)*1260 + (buf[i-1]-0x81)*10 + (curByte-0x30); + } else { + var ptr = (prevBytes[i-3+prevOffset]-0x81)*12600 + + (((i-2 >= 0) ? buf[i-2] : prevBytes[i-2+prevOffset])-0x30)*1260 + + (((i-1 >= 0) ? buf[i-1] : prevBytes[i-1+prevOffset])-0x81)*10 + + (curByte-0x30); + } var idx = findIdx(this.gb18030.gbChars, ptr); uCode = this.gb18030.uChars[idx] + ptr - this.gb18030.gbChars[idx]; } @@ -497,13 +535,13 @@ DBCSDecoder.prototype.write = function(buf) { throw new Error("iconv-lite internal error: invalid decoding table value " + uCode + " at " + nodeIdx + "/" + curByte); // Write the character to buffer, handling higher planes using surrogate pair. - if (uCode > 0xFFFF) { + if (uCode >= 0x10000) { uCode -= 0x10000; - var uCodeLead = 0xD800 + Math.floor(uCode / 0x400); + var uCodeLead = 0xD800 | (uCode >> 10); newBuf[j++] = uCodeLead & 0xFF; newBuf[j++] = uCodeLead >> 8; - uCode = 0xDC00 + uCode % 0x400; + uCode = 0xDC00 | (uCode & 0x3FF); } newBuf[j++] = uCode & 0xFF; newBuf[j++] = uCode >> 8; @@ -513,7 +551,10 @@ DBCSDecoder.prototype.write = function(buf) { } this.nodeIdx = nodeIdx; - this.prevBuf = (seqStart >= 0) ? buf.slice(seqStart) : prevBuf.slice(seqStart + prevBufOffset); + this.prevBytes = (seqStart >= 0) + ? Array.prototype.slice.call(buf, seqStart) + : prevBytes.slice(seqStart + prevOffset).concat(Array.prototype.slice.call(buf)); + return newBuf.slice(0, j).toString('ucs2'); } @@ -521,18 +562,19 @@ DBCSDecoder.prototype.end = function() { var ret = ''; // Try to parse all remaining chars. - while (this.prevBuf.length > 0) { + while (this.prevBytes.length > 0) { // Skip 1 character in the buffer. ret += this.defaultCharUnicode; - var buf = this.prevBuf.slice(1); + var bytesArr = this.prevBytes.slice(1); // Parse remaining as usual. - this.prevBuf = Buffer.alloc(0); + this.prevBytes = []; this.nodeIdx = 0; - if (buf.length > 0) - ret += this.write(buf); + if (bytesArr.length > 0) + ret += this.write(bytesArr); } + this.prevBytes = []; this.nodeIdx = 0; return ret; } @@ -544,7 +586,7 @@ function findIdx(table, val) { var l = 0, r = table.length; while (l < r-1) { // always table[l] <= val < table[r] - var mid = l + Math.floor((r-l+1)/2); + var mid = l + ((r-l+1) >> 1); if (table[mid] <= val) l = mid; else diff --git a/node_modules/iconv-lite/encodings/dbcs-data.js b/node_modules/iconv-lite/encodings/dbcs-data.js index 4b61914..0d17e58 100644 --- a/node_modules/iconv-lite/encodings/dbcs-data.js +++ b/node_modules/iconv-lite/encodings/dbcs-data.js @@ -167,7 +167,19 @@ module.exports = { 'big5hkscs': { type: '_dbcs', table: function() { return require('./tables/cp950.json').concat(require('./tables/big5-added.json')) }, - encodeSkipVals: [0xa2cc], + encodeSkipVals: [ + // Although Encoding Standard says we should avoid encoding to HKSCS area (See Step 1 of + // https://encoding.spec.whatwg.org/#index-big5-pointer), we still do it to increase compatibility with ICU. + // But if a single unicode point can be encoded both as HKSCS and regular Big5, we prefer the latter. + 0x8e69, 0x8e6f, 0x8e7e, 0x8eab, 0x8eb4, 0x8ecd, 0x8ed0, 0x8f57, 0x8f69, 0x8f6e, 0x8fcb, 0x8ffe, + 0x906d, 0x907a, 0x90c4, 0x90dc, 0x90f1, 0x91bf, 0x92af, 0x92b0, 0x92b1, 0x92b2, 0x92d1, 0x9447, 0x94ca, + 0x95d9, 0x96fc, 0x9975, 0x9b76, 0x9b78, 0x9b7b, 0x9bc6, 0x9bde, 0x9bec, 0x9bf6, 0x9c42, 0x9c53, 0x9c62, + 0x9c68, 0x9c6b, 0x9c77, 0x9cbc, 0x9cbd, 0x9cd0, 0x9d57, 0x9d5a, 0x9dc4, 0x9def, 0x9dfb, 0x9ea9, 0x9eef, + 0x9efd, 0x9f60, 0x9fcb, 0xa077, 0xa0dc, 0xa0df, 0x8fcc, 0x92c8, 0x9644, 0x96ed, + + // Step 2 of https://encoding.spec.whatwg.org/#index-big5-pointer: Use last pointer for U+2550, U+255E, U+2561, U+256A, U+5341, or U+5345 + 0xa2a4, 0xa2a5, 0xa2a7, 0xa2a6, 0xa2cc, 0xa2ce, + ], }, 'cnbig5': 'big5hkscs', diff --git a/node_modules/iconv-lite/encodings/index.js b/node_modules/iconv-lite/encodings/index.js index e304003..d95c244 100644 --- a/node_modules/iconv-lite/encodings/index.js +++ b/node_modules/iconv-lite/encodings/index.js @@ -4,6 +4,7 @@ // We support Browserify by skipping automatic module discovery and requiring modules directly. var modules = [ require("./internal"), + require("./utf32"), require("./utf16"), require("./utf7"), require("./sbcs-codec"), @@ -13,7 +14,7 @@ var modules = [ require("./dbcs-data"), ]; -// Put all encoding/alias/codec definitions to single object and export it. +// Put all encoding/alias/codec definitions to single object and export it. for (var i = 0; i < modules.length; i++) { var module = modules[i]; for (var enc in module) diff --git a/node_modules/iconv-lite/encodings/internal.js b/node_modules/iconv-lite/encodings/internal.js index 05ce38b..dc1074f 100644 --- a/node_modules/iconv-lite/encodings/internal.js +++ b/node_modules/iconv-lite/encodings/internal.js @@ -53,10 +53,20 @@ if (!StringDecoder.prototype.end) // Node v0.8 doesn't have this method. function InternalDecoder(options, codec) { - StringDecoder.call(this, codec.enc); + this.decoder = new StringDecoder(codec.enc); } -InternalDecoder.prototype = StringDecoder.prototype; +InternalDecoder.prototype.write = function(buf) { + if (!Buffer.isBuffer(buf)) { + buf = Buffer.from(buf); + } + + return this.decoder.write(buf); +} + +InternalDecoder.prototype.end = function() { + return this.decoder.end(); +} //------------------------------------------------------------------------------ diff --git a/node_modules/iconv-lite/encodings/sbcs-data.js b/node_modules/iconv-lite/encodings/sbcs-data.js index fdb81a3..066f904 100644 --- a/node_modules/iconv-lite/encodings/sbcs-data.js +++ b/node_modules/iconv-lite/encodings/sbcs-data.js @@ -22,6 +22,11 @@ module.exports = { "chars": "АБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыьэюя└┴┬├─┼╣║╚╔╩╦╠═╬┐░▒▓│┤№§╗╝┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ " }, + "cp720": { + "type": "_sbcs", + "chars": "\x80\x81éâ\x84à\x86çêëèïî\x8d\x8e\x8f\x90\u0651\u0652ô¤ـûùءآأؤ£إئابةتثجحخدذرزسشص«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀ضطظعغفµقكلمنهوىي≡\u064b\u064c\u064d\u064e\u064f\u0650≈°∙·√ⁿ²■\u00a0" + }, + // Aliases of generated encodings. "ascii8bit": "ascii", "usascii": "ascii", diff --git a/node_modules/iconv-lite/encodings/tables/gbk-added.json b/node_modules/iconv-lite/encodings/tables/gbk-added.json index 8abfa9f..b742e36 100644 --- a/node_modules/iconv-lite/encodings/tables/gbk-added.json +++ b/node_modules/iconv-lite/encodings/tables/gbk-added.json @@ -27,7 +27,7 @@ ["a7c2","",14], ["a7f2","",12], ["a896","",10], -["a8bc",""], +["a8bc","ḿ"], ["a8bf","ǹ"], ["a8c1",""], ["a8ea","",20], @@ -51,5 +51,6 @@ ["fca1","",93], ["fda1","",93], ["fe50","⺁⺄㑳㑇⺈⺋㖞㘚㘎⺌⺗㥮㤘㧏㧟㩳㧐㭎㱮㳠⺧⺪䁖䅟⺮䌷⺳⺶⺷䎱䎬⺻䏝䓖䙡䙌"], -["fe80","䜣䜩䝼䞍⻊䥇䥺䥽䦂䦃䦅䦆䦟䦛䦷䦶䲣䲟䲠䲡䱷䲢䴓",6,"䶮",93] +["fe80","䜣䜩䝼䞍⻊䥇䥺䥽䦂䦃䦅䦆䦟䦛䦷䦶䲣䲟䲠䲡䱷䲢䴓",6,"䶮",93], +["8135f437",""] ] diff --git a/node_modules/iconv-lite/encodings/utf16.js b/node_modules/iconv-lite/encodings/utf16.js index 54765ae..97d0669 100644 --- a/node_modules/iconv-lite/encodings/utf16.js +++ b/node_modules/iconv-lite/encodings/utf16.js @@ -61,6 +61,7 @@ Utf16BEDecoder.prototype.write = function(buf) { } Utf16BEDecoder.prototype.end = function() { + this.overflowByte = -1; } @@ -103,8 +104,8 @@ Utf16Encoder.prototype.end = function() { function Utf16Decoder(options, codec) { this.decoder = null; - this.initialBytes = []; - this.initialBytesLen = 0; + this.initialBufs = []; + this.initialBufsLen = 0; this.options = options || {}; this.iconv = codec.iconv; @@ -113,17 +114,22 @@ function Utf16Decoder(options, codec) { Utf16Decoder.prototype.write = function(buf) { if (!this.decoder) { // Codec is not chosen yet. Accumulate initial bytes. - this.initialBytes.push(buf); - this.initialBytesLen += buf.length; + this.initialBufs.push(buf); + this.initialBufsLen += buf.length; - if (this.initialBytesLen < 16) // We need more bytes to use space heuristic (see below) + if (this.initialBufsLen < 16) // We need more bytes to use space heuristic (see below) return ''; // We have enough bytes -> detect endianness. - var buf = Buffer.concat(this.initialBytes), - encoding = detectEncoding(buf, this.options.defaultEncoding); + var encoding = detectEncoding(this.initialBufs, this.options.defaultEncoding); this.decoder = this.iconv.getDecoder(encoding, this.options); - this.initialBytes.length = this.initialBytesLen = 0; + + var resStr = ''; + for (var i = 0; i < this.initialBufs.length; i++) + resStr += this.decoder.write(this.initialBufs[i]); + + this.initialBufs.length = this.initialBufsLen = 0; + return resStr; } return this.decoder.write(buf); @@ -131,47 +137,61 @@ Utf16Decoder.prototype.write = function(buf) { Utf16Decoder.prototype.end = function() { if (!this.decoder) { - var buf = Buffer.concat(this.initialBytes), - encoding = detectEncoding(buf, this.options.defaultEncoding); + var encoding = detectEncoding(this.initialBufs, this.options.defaultEncoding); this.decoder = this.iconv.getDecoder(encoding, this.options); - var res = this.decoder.write(buf), - trail = this.decoder.end(); + var resStr = ''; + for (var i = 0; i < this.initialBufs.length; i++) + resStr += this.decoder.write(this.initialBufs[i]); - return trail ? (res + trail) : res; + var trail = this.decoder.end(); + if (trail) + resStr += trail; + + this.initialBufs.length = this.initialBufsLen = 0; + return resStr; } return this.decoder.end(); } -function detectEncoding(buf, defaultEncoding) { - var enc = defaultEncoding || 'utf-16le'; +function detectEncoding(bufs, defaultEncoding) { + var b = []; + var charsProcessed = 0; + var asciiCharsLE = 0, asciiCharsBE = 0; // Number of ASCII chars when decoded as LE or BE. - if (buf.length >= 2) { - // Check BOM. - if (buf[0] == 0xFE && buf[1] == 0xFF) // UTF-16BE BOM - enc = 'utf-16be'; - else if (buf[0] == 0xFF && buf[1] == 0xFE) // UTF-16LE BOM - enc = 'utf-16le'; - else { - // No BOM found. Try to deduce encoding from initial content. - // Most of the time, the content has ASCII chars (U+00**), but the opposite (U+**00) is uncommon. - // So, we count ASCII as if it was LE or BE, and decide from that. - var asciiCharsLE = 0, asciiCharsBE = 0, // Counts of chars in both positions - _len = Math.min(buf.length - (buf.length % 2), 64); // Len is always even. + outer_loop: + for (var i = 0; i < bufs.length; i++) { + var buf = bufs[i]; + for (var j = 0; j < buf.length; j++) { + b.push(buf[j]); + if (b.length === 2) { + if (charsProcessed === 0) { + // Check BOM first. + if (b[0] === 0xFF && b[1] === 0xFE) return 'utf-16le'; + if (b[0] === 0xFE && b[1] === 0xFF) return 'utf-16be'; + } - for (var i = 0; i < _len; i += 2) { - if (buf[i] === 0 && buf[i+1] !== 0) asciiCharsBE++; - if (buf[i] !== 0 && buf[i+1] === 0) asciiCharsLE++; + if (b[0] === 0 && b[1] !== 0) asciiCharsBE++; + if (b[0] !== 0 && b[1] === 0) asciiCharsLE++; + + b.length = 0; + charsProcessed++; + + if (charsProcessed >= 100) { + break outer_loop; + } } - - if (asciiCharsBE > asciiCharsLE) - enc = 'utf-16be'; - else if (asciiCharsBE < asciiCharsLE) - enc = 'utf-16le'; } } - return enc; + // Make decisions. + // Most of the time, the content has ASCII chars (U+00**), but the opposite (U+**00) is uncommon. + // So, we count ASCII as if it was LE or BE, and decide from that. + if (asciiCharsBE > asciiCharsLE) return 'utf-16be'; + if (asciiCharsBE < asciiCharsLE) return 'utf-16le'; + + // Couldn't decide (likely all zeros or not enough data). + return defaultEncoding || 'utf-16le'; } diff --git a/node_modules/encoding-sniffer/node_modules/iconv-lite/encodings/utf32.js b/node_modules/iconv-lite/encodings/utf32.js similarity index 100% rename from node_modules/encoding-sniffer/node_modules/iconv-lite/encodings/utf32.js rename to node_modules/iconv-lite/encodings/utf32.js diff --git a/node_modules/iconv-lite/encodings/utf7.js b/node_modules/iconv-lite/encodings/utf7.js index b7631c2..eacae34 100644 --- a/node_modules/iconv-lite/encodings/utf7.js +++ b/node_modules/iconv-lite/encodings/utf7.js @@ -74,7 +74,7 @@ Utf7Decoder.prototype.write = function(buf) { if (i == lastI && buf[i] == minusChar) {// "+-" -> "+" res += "+"; } else { - var b64str = base64Accum + buf.slice(lastI, i).toString(); + var b64str = base64Accum + this.iconv.decode(buf.slice(lastI, i), "ascii"); res += this.iconv.decode(Buffer.from(b64str, 'base64'), "utf16-be"); } @@ -91,7 +91,7 @@ Utf7Decoder.prototype.write = function(buf) { if (!inBase64) { res += this.iconv.decode(buf.slice(lastI), "ascii"); // Write direct chars. } else { - var b64str = base64Accum + buf.slice(lastI).toString(); + var b64str = base64Accum + this.iconv.decode(buf.slice(lastI), "ascii"); var canBeDecoded = b64str.length - (b64str.length % 8); // Minimal chunk: 2 quads -> 2x3 bytes -> 3 chars. base64Accum = b64str.slice(canBeDecoded); // The rest will be decoded in future. @@ -245,7 +245,7 @@ Utf7IMAPDecoder.prototype.write = function(buf) { if (i == lastI && buf[i] == minusChar) { // "&-" -> "&" res += "&"; } else { - var b64str = base64Accum + buf.slice(lastI, i).toString().replace(/,/g, '/'); + var b64str = base64Accum + this.iconv.decode(buf.slice(lastI, i), "ascii").replace(/,/g, '/'); res += this.iconv.decode(Buffer.from(b64str, 'base64'), "utf16-be"); } @@ -262,7 +262,7 @@ Utf7IMAPDecoder.prototype.write = function(buf) { if (!inBase64) { res += this.iconv.decode(buf.slice(lastI), "ascii"); // Write direct chars. } else { - var b64str = base64Accum + buf.slice(lastI).toString().replace(/,/g, '/'); + var b64str = base64Accum + this.iconv.decode(buf.slice(lastI), "ascii").replace(/,/g, '/'); var canBeDecoded = b64str.length - (b64str.length % 8); // Minimal chunk: 2 quads -> 2x3 bytes -> 3 chars. base64Accum = b64str.slice(canBeDecoded); // The rest will be decoded in future. diff --git a/node_modules/iconv-lite/lib/index.d.ts b/node_modules/iconv-lite/lib/index.d.ts index 0547eb3..99f200f 100644 --- a/node_modules/iconv-lite/lib/index.d.ts +++ b/node_modules/iconv-lite/lib/index.d.ts @@ -6,15 +6,22 @@ *--------------------------------------------------------------------------------------------*/ declare module 'iconv-lite' { + // Basic API export function decode(buffer: Buffer, encoding: string, options?: Options): string; export function encode(content: string, encoding: string, options?: Options): Buffer; export function encodingExists(encoding: string): boolean; + // Stream API export function decodeStream(encoding: string, options?: Options): NodeJS.ReadWriteStream; export function encodeStream(encoding: string, options?: Options): NodeJS.ReadWriteStream; + + // Low-level stream APIs + export function getEncoder(encoding: string, options?: Options): EncoderStream; + + export function getDecoder(encoding: string, options?: Options): DecoderStream; } export interface Options { @@ -22,3 +29,13 @@ export interface Options { addBOM?: boolean; defaultEncoding?: string; } + +export interface EncoderStream { + write(str: string): Buffer; + end(): Buffer | undefined; +} + +export interface DecoderStream { + write(buf: Buffer): string; + end(): string | undefined; +} diff --git a/node_modules/iconv-lite/lib/index.js b/node_modules/iconv-lite/lib/index.js index 5391919..657701c 100644 --- a/node_modules/iconv-lite/lib/index.js +++ b/node_modules/iconv-lite/lib/index.js @@ -1,7 +1,5 @@ "use strict"; -// Some environments don't have global Buffer (e.g. React Native). -// Solution would be installing npm modules "buffer" and "stream" explicitly. var Buffer = require("safer-buffer").Buffer; var bomHandling = require("./bom-handling"), @@ -133,21 +131,50 @@ iconv.getDecoder = function getDecoder(encoding, options) { return decoder; } +// Streaming API +// NOTE: Streaming API naturally depends on 'stream' module from Node.js. Unfortunately in browser environments this module can add +// up to 100Kb to the output bundle. To avoid unnecessary code bloat, we don't enable Streaming API in browser by default. +// If you would like to enable it explicitly, please add the following code to your app: +// > iconv.enableStreamingAPI(require('stream')); +iconv.enableStreamingAPI = function enableStreamingAPI(stream_module) { + if (iconv.supportsStreams) + return; -// Load extensions in Node. All of them are omitted in Browserify build via 'browser' field in package.json. -var nodeVer = typeof process !== 'undefined' && process.versions && process.versions.node; -if (nodeVer) { + // Dependency-inject stream module to create IconvLite stream classes. + var streams = require("./streams")(stream_module); - // Load streaming support in Node v0.10+ - var nodeVerArr = nodeVer.split(".").map(Number); - if (nodeVerArr[0] > 0 || nodeVerArr[1] >= 10) { - require("./streams")(iconv); + // Not public API yet, but expose the stream classes. + iconv.IconvLiteEncoderStream = streams.IconvLiteEncoderStream; + iconv.IconvLiteDecoderStream = streams.IconvLiteDecoderStream; + + // Streaming API. + iconv.encodeStream = function encodeStream(encoding, options) { + return new iconv.IconvLiteEncoderStream(iconv.getEncoder(encoding, options), options); } - // Load Node primitive extensions. - require("./extend-node")(iconv); + iconv.decodeStream = function decodeStream(encoding, options) { + return new iconv.IconvLiteDecoderStream(iconv.getDecoder(encoding, options), options); + } + + iconv.supportsStreams = true; +} + +// Enable Streaming API automatically if 'stream' module is available and non-empty (the majority of environments). +var stream_module; +try { + stream_module = require("stream"); +} catch (e) {} + +if (stream_module && stream_module.Transform) { + iconv.enableStreamingAPI(stream_module); + +} else { + // In rare cases where 'stream' module is not available by default, throw a helpful exception. + iconv.encodeStream = iconv.decodeStream = function() { + throw new Error("iconv-lite Streaming API is not enabled. Use iconv.enableStreamingAPI(require('stream')); to enable it."); + }; } if ("Ā" != "\u0100") { - console.error("iconv-lite warning: javascript files use encoding different from utf-8. See https://github.com/ashtuchkin/iconv-lite/wiki/Javascript-source-file-encodings for more info."); + console.error("iconv-lite warning: js files use non-utf8 encoding. See https://github.com/ashtuchkin/iconv-lite/wiki/Javascript-source-file-encodings for more info."); } diff --git a/node_modules/iconv-lite/lib/streams.js b/node_modules/iconv-lite/lib/streams.js index 4409552..a150648 100644 --- a/node_modules/iconv-lite/lib/streams.js +++ b/node_modules/iconv-lite/lib/streams.js @@ -1,121 +1,109 @@ "use strict"; -var Buffer = require("buffer").Buffer, - Transform = require("stream").Transform; +var Buffer = require("safer-buffer").Buffer; +// NOTE: Due to 'stream' module being pretty large (~100Kb, significant in browser environments), +// we opt to dependency-inject it instead of creating a hard dependency. +module.exports = function(stream_module) { + var Transform = stream_module.Transform; -// == Exports ================================================================== -module.exports = function(iconv) { - - // Additional Public API. - iconv.encodeStream = function encodeStream(encoding, options) { - return new IconvLiteEncoderStream(iconv.getEncoder(encoding, options), options); + // == Encoder stream ======================================================= + + function IconvLiteEncoderStream(conv, options) { + this.conv = conv; + options = options || {}; + options.decodeStrings = false; // We accept only strings, so we don't need to decode them. + Transform.call(this, options); } - iconv.decodeStream = function decodeStream(encoding, options) { - return new IconvLiteDecoderStream(iconv.getDecoder(encoding, options), options); + IconvLiteEncoderStream.prototype = Object.create(Transform.prototype, { + constructor: { value: IconvLiteEncoderStream } + }); + + IconvLiteEncoderStream.prototype._transform = function(chunk, encoding, done) { + if (typeof chunk != 'string') + return done(new Error("Iconv encoding stream needs strings as its input.")); + try { + var res = this.conv.write(chunk); + if (res && res.length) this.push(res); + done(); + } + catch (e) { + done(e); + } } - iconv.supportsStreams = true; + IconvLiteEncoderStream.prototype._flush = function(done) { + try { + var res = this.conv.end(); + if (res && res.length) this.push(res); + done(); + } + catch (e) { + done(e); + } + } + + IconvLiteEncoderStream.prototype.collect = function(cb) { + var chunks = []; + this.on('error', cb); + this.on('data', function(chunk) { chunks.push(chunk); }); + this.on('end', function() { + cb(null, Buffer.concat(chunks)); + }); + return this; + } - // Not published yet. - iconv.IconvLiteEncoderStream = IconvLiteEncoderStream; - iconv.IconvLiteDecoderStream = IconvLiteDecoderStream; - iconv._collect = IconvLiteDecoderStream.prototype.collect; + // == Decoder stream ======================================================= + + function IconvLiteDecoderStream(conv, options) { + this.conv = conv; + options = options || {}; + options.encoding = this.encoding = 'utf8'; // We output strings. + Transform.call(this, options); + } + + IconvLiteDecoderStream.prototype = Object.create(Transform.prototype, { + constructor: { value: IconvLiteDecoderStream } + }); + + IconvLiteDecoderStream.prototype._transform = function(chunk, encoding, done) { + if (!Buffer.isBuffer(chunk) && !(chunk instanceof Uint8Array)) + return done(new Error("Iconv decoding stream needs buffers as its input.")); + try { + var res = this.conv.write(chunk); + if (res && res.length) this.push(res, this.encoding); + done(); + } + catch (e) { + done(e); + } + } + + IconvLiteDecoderStream.prototype._flush = function(done) { + try { + var res = this.conv.end(); + if (res && res.length) this.push(res, this.encoding); + done(); + } + catch (e) { + done(e); + } + } + + IconvLiteDecoderStream.prototype.collect = function(cb) { + var res = ''; + this.on('error', cb); + this.on('data', function(chunk) { res += chunk; }); + this.on('end', function() { + cb(null, res); + }); + return this; + } + + return { + IconvLiteEncoderStream: IconvLiteEncoderStream, + IconvLiteDecoderStream: IconvLiteDecoderStream, + }; }; - - -// == Encoder stream ======================================================= -function IconvLiteEncoderStream(conv, options) { - this.conv = conv; - options = options || {}; - options.decodeStrings = false; // We accept only strings, so we don't need to decode them. - Transform.call(this, options); -} - -IconvLiteEncoderStream.prototype = Object.create(Transform.prototype, { - constructor: { value: IconvLiteEncoderStream } -}); - -IconvLiteEncoderStream.prototype._transform = function(chunk, encoding, done) { - if (typeof chunk != 'string') - return done(new Error("Iconv encoding stream needs strings as its input.")); - try { - var res = this.conv.write(chunk); - if (res && res.length) this.push(res); - done(); - } - catch (e) { - done(e); - } -} - -IconvLiteEncoderStream.prototype._flush = function(done) { - try { - var res = this.conv.end(); - if (res && res.length) this.push(res); - done(); - } - catch (e) { - done(e); - } -} - -IconvLiteEncoderStream.prototype.collect = function(cb) { - var chunks = []; - this.on('error', cb); - this.on('data', function(chunk) { chunks.push(chunk); }); - this.on('end', function() { - cb(null, Buffer.concat(chunks)); - }); - return this; -} - - -// == Decoder stream ======================================================= -function IconvLiteDecoderStream(conv, options) { - this.conv = conv; - options = options || {}; - options.encoding = this.encoding = 'utf8'; // We output strings. - Transform.call(this, options); -} - -IconvLiteDecoderStream.prototype = Object.create(Transform.prototype, { - constructor: { value: IconvLiteDecoderStream } -}); - -IconvLiteDecoderStream.prototype._transform = function(chunk, encoding, done) { - if (!Buffer.isBuffer(chunk)) - return done(new Error("Iconv decoding stream needs buffers as its input.")); - try { - var res = this.conv.write(chunk); - if (res && res.length) this.push(res, this.encoding); - done(); - } - catch (e) { - done(e); - } -} - -IconvLiteDecoderStream.prototype._flush = function(done) { - try { - var res = this.conv.end(); - if (res && res.length) this.push(res, this.encoding); - done(); - } - catch (e) { - done(e); - } -} - -IconvLiteDecoderStream.prototype.collect = function(cb) { - var res = ''; - this.on('error', cb); - this.on('data', function(chunk) { res += chunk; }); - this.on('end', function() { - cb(null, res); - }); - return this; -} - diff --git a/node_modules/iconv-lite/package.json b/node_modules/iconv-lite/package.json index a7c74fc..d351115 100644 --- a/node_modules/iconv-lite/package.json +++ b/node_modules/iconv-lite/package.json @@ -1,7 +1,7 @@ { "name": "iconv-lite", "description": "Convert character encodings in pure javascript.", - "version": "0.4.24", + "version": "0.6.3", "license": "MIT", "keywords": [ "iconv", @@ -22,25 +22,23 @@ "node": ">=0.10.0" }, "scripts": { - "coverage": "istanbul cover _mocha -- --grep .", - "coverage-open": "open coverage/lcov-report/index.html", + "coverage": "c8 _mocha --grep .", "test": "mocha --reporter spec --grep ." }, "browser": { - "./lib/extend-node": false, - "./lib/streams": false + "stream": false }, "devDependencies": { - "mocha": "^3.1.0", - "request": "~2.87.0", - "unorm": "*", - "errto": "*", - "async": "*", - "istanbul": "*", - "semver": "*", - "iconv": "*" + "async": "^3.2.0", + "c8": "^7.2.0", + "errto": "^0.2.1", + "iconv": "^2.3.5", + "mocha": "^3.5.3", + "request": "^2.88.2", + "semver": "^6.3.0", + "unorm": "^1.6.0" }, "dependencies": { - "safer-buffer": ">= 2.1.2 < 3" + "safer-buffer": ">= 2.1.2 < 3.0.0" } } diff --git a/node_modules/ignore-by-default/index.js b/node_modules/ignore-by-default/index.js deleted file mode 100644 index c65857d..0000000 --- a/node_modules/ignore-by-default/index.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict' - -exports.directories = function () { - return [ - '.git', // Git repository files, see <https://git-scm.com/> - '.nyc_output', // Temporary directory where nyc stores coverage data, see <https://github.com/bcoe/nyc> - '.sass-cache', // Cache folder for node-sass, see <https://github.com/sass/node-sass> - 'bower_components', // Where Bower packages are installed, see <http://bower.io/> - 'coverage', // Standard output directory for code coverage reports, see <https://github.com/gotwarlost/istanbul> - 'node_modules' // Where Node modules are installed, see <https://nodejs.org/> - ] -} diff --git a/node_modules/ignore-by-default/package.json b/node_modules/ignore-by-default/package.json deleted file mode 100644 index 38e0d2b..0000000 --- a/node_modules/ignore-by-default/package.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "name": "ignore-by-default", - "version": "1.0.1", - "description": "A list of directories you should ignore by default", - "main": "index.js", - "files": [ - "index.js" - ], - "scripts": { - "test": "standard && node test.js" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/novemberborn/ignore-by-default.git" - }, - "keywords": [ - "ignore", - "chokidar", - "watcher", - "exclude", - "glob", - "pattern" - ], - "author": "Mark Wubben (https://novemberborn.net/)", - "license": "ISC", - "bugs": { - "url": "https://github.com/novemberborn/ignore-by-default/issues" - }, - "homepage": "https://github.com/novemberborn/ignore-by-default#readme", - "devDependencies": { - "figures": "^1.4.0", - "standard": "^6.0.4" - } -} diff --git a/node_modules/inflight/inflight.js b/node_modules/inflight/inflight.js deleted file mode 100644 index 48202b3..0000000 --- a/node_modules/inflight/inflight.js +++ /dev/null @@ -1,54 +0,0 @@ -var wrappy = require('wrappy') -var reqs = Object.create(null) -var once = require('once') - -module.exports = wrappy(inflight) - -function inflight (key, cb) { - if (reqs[key]) { - reqs[key].push(cb) - return null - } else { - reqs[key] = [cb] - return makeres(key) - } -} - -function makeres (key) { - return once(function RES () { - var cbs = reqs[key] - var len = cbs.length - var args = slice(arguments) - - // XXX It's somewhat ambiguous whether a new callback added in this - // pass should be queued for later execution if something in the - // list of callbacks throws, or if it should just be discarded. - // However, it's such an edge case that it hardly matters, and either - // choice is likely as surprising as the other. - // As it happens, we do go ahead and schedule it for later execution. - try { - for (var i = 0; i < len; i++) { - cbs[i].apply(null, args) - } - } finally { - if (cbs.length > len) { - // added more in the interim. - // de-zalgo, just in case, but don't call again. - cbs.splice(0, len) - process.nextTick(function () { - RES.apply(null, args) - }) - } else { - delete reqs[key] - } - } - }) -} - -function slice (args) { - var length = args.length - var array = [] - - for (var i = 0; i < length; i++) array[i] = args[i] - return array -} diff --git a/node_modules/inflight/package.json b/node_modules/inflight/package.json deleted file mode 100644 index 6084d35..0000000 --- a/node_modules/inflight/package.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "name": "inflight", - "version": "1.0.6", - "description": "Add callbacks to requests in flight to avoid async duplication", - "main": "inflight.js", - "files": [ - "inflight.js" - ], - "dependencies": { - "once": "^1.3.0", - "wrappy": "1" - }, - "devDependencies": { - "tap": "^7.1.2" - }, - "scripts": { - "test": "tap test.js --100" - }, - "repository": { - "type": "git", - "url": "https://github.com/npm/inflight.git" - }, - "author": "Isaac Z. Schlueter <i@izs.me> (http://blog.izs.me/)", - "bugs": { - "url": "https://github.com/isaacs/inflight/issues" - }, - "homepage": "https://github.com/isaacs/inflight", - "license": "ISC" -} diff --git a/node_modules/is-binary-path/index.d.ts b/node_modules/is-binary-path/index.d.ts deleted file mode 100644 index 19dcd43..0000000 --- a/node_modules/is-binary-path/index.d.ts +++ /dev/null @@ -1,17 +0,0 @@ -/** -Check if a file path is a binary file. - -@example -``` -import isBinaryPath = require('is-binary-path'); - -isBinaryPath('source/unicorn.png'); -//=> true - -isBinaryPath('source/unicorn.txt'); -//=> false -``` -*/ -declare function isBinaryPath(filePath: string): boolean; - -export = isBinaryPath; diff --git a/node_modules/is-binary-path/index.js b/node_modules/is-binary-path/index.js deleted file mode 100644 index ef7548c..0000000 --- a/node_modules/is-binary-path/index.js +++ /dev/null @@ -1,7 +0,0 @@ -'use strict'; -const path = require('path'); -const binaryExtensions = require('binary-extensions'); - -const extensions = new Set(binaryExtensions); - -module.exports = filePath => extensions.has(path.extname(filePath).slice(1).toLowerCase()); diff --git a/node_modules/is-binary-path/package.json b/node_modules/is-binary-path/package.json deleted file mode 100644 index a8d005a..0000000 --- a/node_modules/is-binary-path/package.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "name": "is-binary-path", - "version": "2.1.0", - "description": "Check if a file path is a binary file", - "license": "MIT", - "repository": "sindresorhus/is-binary-path", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "engines": { - "node": ">=8" - }, - "scripts": { - "test": "xo && ava && tsd" - }, - "files": [ - "index.js", - "index.d.ts" - ], - "keywords": [ - "binary", - "extensions", - "extension", - "file", - "path", - "check", - "detect", - "is" - ], - "dependencies": { - "binary-extensions": "^2.0.0" - }, - "devDependencies": { - "ava": "^1.4.1", - "tsd": "^0.7.2", - "xo": "^0.24.0" - } -} diff --git a/node_modules/is-extglob/index.js b/node_modules/is-extglob/index.js deleted file mode 100644 index c1d986f..0000000 --- a/node_modules/is-extglob/index.js +++ /dev/null @@ -1,20 +0,0 @@ -/*! - * is-extglob <https://github.com/jonschlinkert/is-extglob> - * - * Copyright (c) 2014-2016, Jon Schlinkert. - * Licensed under the MIT License. - */ - -module.exports = function isExtglob(str) { - if (typeof str !== 'string' || str === '') { - return false; - } - - var match; - while ((match = /(\\).|([@?!+*]\(.*\))/g.exec(str))) { - if (match[2]) return true; - str = str.slice(match.index + match[0].length); - } - - return false; -}; diff --git a/node_modules/is-extglob/package.json b/node_modules/is-extglob/package.json deleted file mode 100644 index 7a90836..0000000 --- a/node_modules/is-extglob/package.json +++ /dev/null @@ -1,69 +0,0 @@ -{ - "name": "is-extglob", - "description": "Returns true if a string has an extglob.", - "version": "2.1.1", - "homepage": "https://github.com/jonschlinkert/is-extglob", - "author": "Jon Schlinkert (https://github.com/jonschlinkert)", - "repository": "jonschlinkert/is-extglob", - "bugs": { - "url": "https://github.com/jonschlinkert/is-extglob/issues" - }, - "license": "MIT", - "files": [ - "index.js" - ], - "main": "index.js", - "engines": { - "node": ">=0.10.0" - }, - "scripts": { - "test": "mocha" - }, - "devDependencies": { - "gulp-format-md": "^0.1.10", - "mocha": "^3.0.2" - }, - "keywords": [ - "bash", - "braces", - "check", - "exec", - "expression", - "extglob", - "glob", - "globbing", - "globstar", - "is", - "match", - "matches", - "pattern", - "regex", - "regular", - "string", - "test" - ], - "verb": { - "toc": false, - "layout": "default", - "tasks": [ - "readme" - ], - "plugins": [ - "gulp-format-md" - ], - "related": { - "list": [ - "has-glob", - "is-glob", - "micromatch" - ] - }, - "reflinks": [ - "verb", - "verb-generate-readme" - ], - "lint": { - "reflinks": true - } - } -} diff --git a/node_modules/is-glob/index.js b/node_modules/is-glob/index.js deleted file mode 100644 index 620f563..0000000 --- a/node_modules/is-glob/index.js +++ /dev/null @@ -1,150 +0,0 @@ -/*! - * is-glob <https://github.com/jonschlinkert/is-glob> - * - * Copyright (c) 2014-2017, Jon Schlinkert. - * Released under the MIT License. - */ - -var isExtglob = require('is-extglob'); -var chars = { '{': '}', '(': ')', '[': ']'}; -var strictCheck = function(str) { - if (str[0] === '!') { - return true; - } - var index = 0; - var pipeIndex = -2; - var closeSquareIndex = -2; - var closeCurlyIndex = -2; - var closeParenIndex = -2; - var backSlashIndex = -2; - while (index < str.length) { - if (str[index] === '*') { - return true; - } - - if (str[index + 1] === '?' && /[\].+)]/.test(str[index])) { - return true; - } - - if (closeSquareIndex !== -1 && str[index] === '[' && str[index + 1] !== ']') { - if (closeSquareIndex < index) { - closeSquareIndex = str.indexOf(']', index); - } - if (closeSquareIndex > index) { - if (backSlashIndex === -1 || backSlashIndex > closeSquareIndex) { - return true; - } - backSlashIndex = str.indexOf('\\', index); - if (backSlashIndex === -1 || backSlashIndex > closeSquareIndex) { - return true; - } - } - } - - if (closeCurlyIndex !== -1 && str[index] === '{' && str[index + 1] !== '}') { - closeCurlyIndex = str.indexOf('}', index); - if (closeCurlyIndex > index) { - backSlashIndex = str.indexOf('\\', index); - if (backSlashIndex === -1 || backSlashIndex > closeCurlyIndex) { - return true; - } - } - } - - if (closeParenIndex !== -1 && str[index] === '(' && str[index + 1] === '?' && /[:!=]/.test(str[index + 2]) && str[index + 3] !== ')') { - closeParenIndex = str.indexOf(')', index); - if (closeParenIndex > index) { - backSlashIndex = str.indexOf('\\', index); - if (backSlashIndex === -1 || backSlashIndex > closeParenIndex) { - return true; - } - } - } - - if (pipeIndex !== -1 && str[index] === '(' && str[index + 1] !== '|') { - if (pipeIndex < index) { - pipeIndex = str.indexOf('|', index); - } - if (pipeIndex !== -1 && str[pipeIndex + 1] !== ')') { - closeParenIndex = str.indexOf(')', pipeIndex); - if (closeParenIndex > pipeIndex) { - backSlashIndex = str.indexOf('\\', pipeIndex); - if (backSlashIndex === -1 || backSlashIndex > closeParenIndex) { - return true; - } - } - } - } - - if (str[index] === '\\') { - var open = str[index + 1]; - index += 2; - var close = chars[open]; - - if (close) { - var n = str.indexOf(close, index); - if (n !== -1) { - index = n + 1; - } - } - - if (str[index] === '!') { - return true; - } - } else { - index++; - } - } - return false; -}; - -var relaxedCheck = function(str) { - if (str[0] === '!') { - return true; - } - var index = 0; - while (index < str.length) { - if (/[*?{}()[\]]/.test(str[index])) { - return true; - } - - if (str[index] === '\\') { - var open = str[index + 1]; - index += 2; - var close = chars[open]; - - if (close) { - var n = str.indexOf(close, index); - if (n !== -1) { - index = n + 1; - } - } - - if (str[index] === '!') { - return true; - } - } else { - index++; - } - } - return false; -}; - -module.exports = function isGlob(str, options) { - if (typeof str !== 'string' || str === '') { - return false; - } - - if (isExtglob(str)) { - return true; - } - - var check = strictCheck; - - // optionally relax check - if (options && options.strict === false) { - check = relaxedCheck; - } - - return check(str); -}; diff --git a/node_modules/is-glob/package.json b/node_modules/is-glob/package.json deleted file mode 100644 index 858af03..0000000 --- a/node_modules/is-glob/package.json +++ /dev/null @@ -1,81 +0,0 @@ -{ - "name": "is-glob", - "description": "Returns `true` if the given string looks like a glob pattern or an extglob pattern. This makes it easy to create code that only uses external modules like node-glob when necessary, resulting in much faster code execution and initialization time, and a better user experience.", - "version": "4.0.3", - "homepage": "https://github.com/micromatch/is-glob", - "author": "Jon Schlinkert (https://github.com/jonschlinkert)", - "contributors": [ - "Brian Woodward (https://twitter.com/doowb)", - "Daniel Perez (https://tuvistavie.com)", - "Jon Schlinkert (http://twitter.com/jonschlinkert)" - ], - "repository": "micromatch/is-glob", - "bugs": { - "url": "https://github.com/micromatch/is-glob/issues" - }, - "license": "MIT", - "files": [ - "index.js" - ], - "main": "index.js", - "engines": { - "node": ">=0.10.0" - }, - "scripts": { - "test": "mocha && node benchmark.js" - }, - "dependencies": { - "is-extglob": "^2.1.1" - }, - "devDependencies": { - "gulp-format-md": "^0.1.10", - "mocha": "^3.0.2" - }, - "keywords": [ - "bash", - "braces", - "check", - "exec", - "expression", - "extglob", - "glob", - "globbing", - "globstar", - "is", - "match", - "matches", - "pattern", - "regex", - "regular", - "string", - "test" - ], - "verb": { - "layout": "default", - "plugins": [ - "gulp-format-md" - ], - "related": { - "list": [ - "assemble", - "base", - "update", - "verb" - ] - }, - "reflinks": [ - "assemble", - "bach", - "base", - "composer", - "gulp", - "has-glob", - "is-valid-glob", - "micromatch", - "npm", - "scaffold", - "verb", - "vinyl" - ] - } -} diff --git a/node_modules/is-number/index.js b/node_modules/is-number/index.js deleted file mode 100644 index 27f19b7..0000000 --- a/node_modules/is-number/index.js +++ /dev/null @@ -1,18 +0,0 @@ -/*! - * is-number <https://github.com/jonschlinkert/is-number> - * - * Copyright (c) 2014-present, Jon Schlinkert. - * Released under the MIT License. - */ - -'use strict'; - -module.exports = function(num) { - if (typeof num === 'number') { - return num - num === 0; - } - if (typeof num === 'string' && num.trim() !== '') { - return Number.isFinite ? Number.isFinite(+num) : isFinite(+num); - } - return false; -}; diff --git a/node_modules/is-number/package.json b/node_modules/is-number/package.json deleted file mode 100644 index 3715072..0000000 --- a/node_modules/is-number/package.json +++ /dev/null @@ -1,82 +0,0 @@ -{ - "name": "is-number", - "description": "Returns true if a number or string value is a finite number. Useful for regex matches, parsing, user input, etc.", - "version": "7.0.0", - "homepage": "https://github.com/jonschlinkert/is-number", - "author": "Jon Schlinkert (https://github.com/jonschlinkert)", - "contributors": [ - "Jon Schlinkert (http://twitter.com/jonschlinkert)", - "Olsten Larck (https://i.am.charlike.online)", - "Rouven Weßling (www.rouvenwessling.de)" - ], - "repository": "jonschlinkert/is-number", - "bugs": { - "url": "https://github.com/jonschlinkert/is-number/issues" - }, - "license": "MIT", - "files": [ - "index.js" - ], - "main": "index.js", - "engines": { - "node": ">=0.12.0" - }, - "scripts": { - "test": "mocha" - }, - "devDependencies": { - "ansi": "^0.3.1", - "benchmark": "^2.1.4", - "gulp-format-md": "^1.0.0", - "mocha": "^3.5.3" - }, - "keywords": [ - "cast", - "check", - "coerce", - "coercion", - "finite", - "integer", - "is", - "isnan", - "is-nan", - "is-num", - "is-number", - "isnumber", - "isfinite", - "istype", - "kind", - "math", - "nan", - "num", - "number", - "numeric", - "parseFloat", - "parseInt", - "test", - "type", - "typeof", - "value" - ], - "verb": { - "toc": false, - "layout": "default", - "tasks": [ - "readme" - ], - "related": { - "list": [ - "is-plain-object", - "is-primitive", - "isobject", - "kind-of" - ] - }, - "plugins": [ - "gulp-format-md" - ], - "lint": { - "reflinks": true - } - } -} diff --git a/node_modules/minimatch/minimatch.js b/node_modules/minimatch/minimatch.js deleted file mode 100644 index fda45ad..0000000 --- a/node_modules/minimatch/minimatch.js +++ /dev/null @@ -1,947 +0,0 @@ -module.exports = minimatch -minimatch.Minimatch = Minimatch - -var path = (function () { try { return require('path') } catch (e) {}}()) || { - sep: '/' -} -minimatch.sep = path.sep - -var GLOBSTAR = minimatch.GLOBSTAR = Minimatch.GLOBSTAR = {} -var expand = require('brace-expansion') - -var plTypes = { - '!': { open: '(?:(?!(?:', close: '))[^/]*?)'}, - '?': { open: '(?:', close: ')?' }, - '+': { open: '(?:', close: ')+' }, - '*': { open: '(?:', close: ')*' }, - '@': { open: '(?:', close: ')' } -} - -// any single thing other than / -// don't need to escape / when using new RegExp() -var qmark = '[^/]' - -// * => any number of characters -var star = qmark + '*?' - -// ** when dots are allowed. Anything goes, except .. and . -// not (^ or / followed by one or two dots followed by $ or /), -// followed by anything, any number of times. -var twoStarDot = '(?:(?!(?:\\\/|^)(?:\\.{1,2})($|\\\/)).)*?' - -// not a ^ or / followed by a dot, -// followed by anything, any number of times. -var twoStarNoDot = '(?:(?!(?:\\\/|^)\\.).)*?' - -// characters that need to be escaped in RegExp. -var reSpecials = charSet('().*{}+?[]^$\\!') - -// "abc" -> { a:true, b:true, c:true } -function charSet (s) { - return s.split('').reduce(function (set, c) { - set[c] = true - return set - }, {}) -} - -// normalizes slashes. -var slashSplit = /\/+/ - -minimatch.filter = filter -function filter (pattern, options) { - options = options || {} - return function (p, i, list) { - return minimatch(p, pattern, options) - } -} - -function ext (a, b) { - b = b || {} - var t = {} - Object.keys(a).forEach(function (k) { - t[k] = a[k] - }) - Object.keys(b).forEach(function (k) { - t[k] = b[k] - }) - return t -} - -minimatch.defaults = function (def) { - if (!def || typeof def !== 'object' || !Object.keys(def).length) { - return minimatch - } - - var orig = minimatch - - var m = function minimatch (p, pattern, options) { - return orig(p, pattern, ext(def, options)) - } - - m.Minimatch = function Minimatch (pattern, options) { - return new orig.Minimatch(pattern, ext(def, options)) - } - m.Minimatch.defaults = function defaults (options) { - return orig.defaults(ext(def, options)).Minimatch - } - - m.filter = function filter (pattern, options) { - return orig.filter(pattern, ext(def, options)) - } - - m.defaults = function defaults (options) { - return orig.defaults(ext(def, options)) - } - - m.makeRe = function makeRe (pattern, options) { - return orig.makeRe(pattern, ext(def, options)) - } - - m.braceExpand = function braceExpand (pattern, options) { - return orig.braceExpand(pattern, ext(def, options)) - } - - m.match = function (list, pattern, options) { - return orig.match(list, pattern, ext(def, options)) - } - - return m -} - -Minimatch.defaults = function (def) { - return minimatch.defaults(def).Minimatch -} - -function minimatch (p, pattern, options) { - assertValidPattern(pattern) - - if (!options) options = {} - - // shortcut: comments match nothing. - if (!options.nocomment && pattern.charAt(0) === '#') { - return false - } - - return new Minimatch(pattern, options).match(p) -} - -function Minimatch (pattern, options) { - if (!(this instanceof Minimatch)) { - return new Minimatch(pattern, options) - } - - assertValidPattern(pattern) - - if (!options) options = {} - - pattern = pattern.trim() - - // windows support: need to use /, not \ - if (!options.allowWindowsEscape && path.sep !== '/') { - pattern = pattern.split(path.sep).join('/') - } - - this.options = options - this.set = [] - this.pattern = pattern - this.regexp = null - this.negate = false - this.comment = false - this.empty = false - this.partial = !!options.partial - - // make the set of regexps etc. - this.make() -} - -Minimatch.prototype.debug = function () {} - -Minimatch.prototype.make = make -function make () { - var pattern = this.pattern - var options = this.options - - // empty patterns and comments match nothing. - if (!options.nocomment && pattern.charAt(0) === '#') { - this.comment = true - return - } - if (!pattern) { - this.empty = true - return - } - - // step 1: figure out negation, etc. - this.parseNegate() - - // step 2: expand braces - var set = this.globSet = this.braceExpand() - - if (options.debug) this.debug = function debug() { console.error.apply(console, arguments) } - - this.debug(this.pattern, set) - - // step 3: now we have a set, so turn each one into a series of path-portion - // matching patterns. - // These will be regexps, except in the case of "**", which is - // set to the GLOBSTAR object for globstar behavior, - // and will not contain any / characters - set = this.globParts = set.map(function (s) { - return s.split(slashSplit) - }) - - this.debug(this.pattern, set) - - // glob --> regexps - set = set.map(function (s, si, set) { - return s.map(this.parse, this) - }, this) - - this.debug(this.pattern, set) - - // filter out everything that didn't compile properly. - set = set.filter(function (s) { - return s.indexOf(false) === -1 - }) - - this.debug(this.pattern, set) - - this.set = set -} - -Minimatch.prototype.parseNegate = parseNegate -function parseNegate () { - var pattern = this.pattern - var negate = false - var options = this.options - var negateOffset = 0 - - if (options.nonegate) return - - for (var i = 0, l = pattern.length - ; i < l && pattern.charAt(i) === '!' - ; i++) { - negate = !negate - negateOffset++ - } - - if (negateOffset) this.pattern = pattern.substr(negateOffset) - this.negate = negate -} - -// Brace expansion: -// a{b,c}d -> abd acd -// a{b,}c -> abc ac -// a{0..3}d -> a0d a1d a2d a3d -// a{b,c{d,e}f}g -> abg acdfg acefg -// a{b,c}d{e,f}g -> abdeg acdeg abdeg abdfg -// -// Invalid sets are not expanded. -// a{2..}b -> a{2..}b -// a{b}c -> a{b}c -minimatch.braceExpand = function (pattern, options) { - return braceExpand(pattern, options) -} - -Minimatch.prototype.braceExpand = braceExpand - -function braceExpand (pattern, options) { - if (!options) { - if (this instanceof Minimatch) { - options = this.options - } else { - options = {} - } - } - - pattern = typeof pattern === 'undefined' - ? this.pattern : pattern - - assertValidPattern(pattern) - - // Thanks to Yeting Li <https://github.com/yetingli> for - // improving this regexp to avoid a ReDOS vulnerability. - if (options.nobrace || !/\{(?:(?!\{).)*\}/.test(pattern)) { - // shortcut. no need to expand. - return [pattern] - } - - return expand(pattern) -} - -var MAX_PATTERN_LENGTH = 1024 * 64 -var assertValidPattern = function (pattern) { - if (typeof pattern !== 'string') { - throw new TypeError('invalid pattern') - } - - if (pattern.length > MAX_PATTERN_LENGTH) { - throw new TypeError('pattern is too long') - } -} - -// parse a component of the expanded set. -// At this point, no pattern may contain "/" in it -// so we're going to return a 2d array, where each entry is the full -// pattern, split on '/', and then turned into a regular expression. -// A regexp is made at the end which joins each array with an -// escaped /, and another full one which joins each regexp with |. -// -// Following the lead of Bash 4.1, note that "**" only has special meaning -// when it is the *only* thing in a path portion. Otherwise, any series -// of * is equivalent to a single *. Globstar behavior is enabled by -// default, and can be disabled by setting options.noglobstar. -Minimatch.prototype.parse = parse -var SUBPARSE = {} -function parse (pattern, isSub) { - assertValidPattern(pattern) - - var options = this.options - - // shortcuts - if (pattern === '**') { - if (!options.noglobstar) - return GLOBSTAR - else - pattern = '*' - } - if (pattern === '') return '' - - var re = '' - var hasMagic = !!options.nocase - var escaping = false - // ? => one single character - var patternListStack = [] - var negativeLists = [] - var stateChar - var inClass = false - var reClassStart = -1 - var classStart = -1 - // . and .. never match anything that doesn't start with ., - // even when options.dot is set. - var patternStart = pattern.charAt(0) === '.' ? '' // anything - // not (start or / followed by . or .. followed by / or end) - : options.dot ? '(?!(?:^|\\\/)\\.{1,2}(?:$|\\\/))' - : '(?!\\.)' - var self = this - - function clearStateChar () { - if (stateChar) { - // we had some state-tracking character - // that wasn't consumed by this pass. - switch (stateChar) { - case '*': - re += star - hasMagic = true - break - case '?': - re += qmark - hasMagic = true - break - default: - re += '\\' + stateChar - break - } - self.debug('clearStateChar %j %j', stateChar, re) - stateChar = false - } - } - - for (var i = 0, len = pattern.length, c - ; (i < len) && (c = pattern.charAt(i)) - ; i++) { - this.debug('%s\t%s %s %j', pattern, i, re, c) - - // skip over any that are escaped. - if (escaping && reSpecials[c]) { - re += '\\' + c - escaping = false - continue - } - - switch (c) { - /* istanbul ignore next */ - case '/': { - // completely not allowed, even escaped. - // Should already be path-split by now. - return false - } - - case '\\': - clearStateChar() - escaping = true - continue - - // the various stateChar values - // for the "extglob" stuff. - case '?': - case '*': - case '+': - case '@': - case '!': - this.debug('%s\t%s %s %j <-- stateChar', pattern, i, re, c) - - // all of those are literals inside a class, except that - // the glob [!a] means [^a] in regexp - if (inClass) { - this.debug(' in class') - if (c === '!' && i === classStart + 1) c = '^' - re += c - continue - } - - // if we already have a stateChar, then it means - // that there was something like ** or +? in there. - // Handle the stateChar, then proceed with this one. - self.debug('call clearStateChar %j', stateChar) - clearStateChar() - stateChar = c - // if extglob is disabled, then +(asdf|foo) isn't a thing. - // just clear the statechar *now*, rather than even diving into - // the patternList stuff. - if (options.noext) clearStateChar() - continue - - case '(': - if (inClass) { - re += '(' - continue - } - - if (!stateChar) { - re += '\\(' - continue - } - - patternListStack.push({ - type: stateChar, - start: i - 1, - reStart: re.length, - open: plTypes[stateChar].open, - close: plTypes[stateChar].close - }) - // negation is (?:(?!js)[^/]*) - re += stateChar === '!' ? '(?:(?!(?:' : '(?:' - this.debug('plType %j %j', stateChar, re) - stateChar = false - continue - - case ')': - if (inClass || !patternListStack.length) { - re += '\\)' - continue - } - - clearStateChar() - hasMagic = true - var pl = patternListStack.pop() - // negation is (?:(?!js)[^/]*) - // The others are (?:<pattern>)<type> - re += pl.close - if (pl.type === '!') { - negativeLists.push(pl) - } - pl.reEnd = re.length - continue - - case '|': - if (inClass || !patternListStack.length || escaping) { - re += '\\|' - escaping = false - continue - } - - clearStateChar() - re += '|' - continue - - // these are mostly the same in regexp and glob - case '[': - // swallow any state-tracking char before the [ - clearStateChar() - - if (inClass) { - re += '\\' + c - continue - } - - inClass = true - classStart = i - reClassStart = re.length - re += c - continue - - case ']': - // a right bracket shall lose its special - // meaning and represent itself in - // a bracket expression if it occurs - // first in the list. -- POSIX.2 2.8.3.2 - if (i === classStart + 1 || !inClass) { - re += '\\' + c - escaping = false - continue - } - - // handle the case where we left a class open. - // "[z-a]" is valid, equivalent to "\[z-a\]" - // split where the last [ was, make sure we don't have - // an invalid re. if so, re-walk the contents of the - // would-be class to re-translate any characters that - // were passed through as-is - // TODO: It would probably be faster to determine this - // without a try/catch and a new RegExp, but it's tricky - // to do safely. For now, this is safe and works. - var cs = pattern.substring(classStart + 1, i) - try { - RegExp('[' + cs + ']') - } catch (er) { - // not a valid class! - var sp = this.parse(cs, SUBPARSE) - re = re.substr(0, reClassStart) + '\\[' + sp[0] + '\\]' - hasMagic = hasMagic || sp[1] - inClass = false - continue - } - - // finish up the class. - hasMagic = true - inClass = false - re += c - continue - - default: - // swallow any state char that wasn't consumed - clearStateChar() - - if (escaping) { - // no need - escaping = false - } else if (reSpecials[c] - && !(c === '^' && inClass)) { - re += '\\' - } - - re += c - - } // switch - } // for - - // handle the case where we left a class open. - // "[abc" is valid, equivalent to "\[abc" - if (inClass) { - // split where the last [ was, and escape it - // this is a huge pita. We now have to re-walk - // the contents of the would-be class to re-translate - // any characters that were passed through as-is - cs = pattern.substr(classStart + 1) - sp = this.parse(cs, SUBPARSE) - re = re.substr(0, reClassStart) + '\\[' + sp[0] - hasMagic = hasMagic || sp[1] - } - - // handle the case where we had a +( thing at the *end* - // of the pattern. - // each pattern list stack adds 3 chars, and we need to go through - // and escape any | chars that were passed through as-is for the regexp. - // Go through and escape them, taking care not to double-escape any - // | chars that were already escaped. - for (pl = patternListStack.pop(); pl; pl = patternListStack.pop()) { - var tail = re.slice(pl.reStart + pl.open.length) - this.debug('setting tail', re, pl) - // maybe some even number of \, then maybe 1 \, followed by a | - tail = tail.replace(/((?:\\{2}){0,64})(\\?)\|/g, function (_, $1, $2) { - if (!$2) { - // the | isn't already escaped, so escape it. - $2 = '\\' - } - - // need to escape all those slashes *again*, without escaping the - // one that we need for escaping the | character. As it works out, - // escaping an even number of slashes can be done by simply repeating - // it exactly after itself. That's why this trick works. - // - // I am sorry that you have to see this. - return $1 + $1 + $2 + '|' - }) - - this.debug('tail=%j\n %s', tail, tail, pl, re) - var t = pl.type === '*' ? star - : pl.type === '?' ? qmark - : '\\' + pl.type - - hasMagic = true - re = re.slice(0, pl.reStart) + t + '\\(' + tail - } - - // handle trailing things that only matter at the very end. - clearStateChar() - if (escaping) { - // trailing \\ - re += '\\\\' - } - - // only need to apply the nodot start if the re starts with - // something that could conceivably capture a dot - var addPatternStart = false - switch (re.charAt(0)) { - case '[': case '.': case '(': addPatternStart = true - } - - // Hack to work around lack of negative lookbehind in JS - // A pattern like: *.!(x).!(y|z) needs to ensure that a name - // like 'a.xyz.yz' doesn't match. So, the first negative - // lookahead, has to look ALL the way ahead, to the end of - // the pattern. - for (var n = negativeLists.length - 1; n > -1; n--) { - var nl = negativeLists[n] - - var nlBefore = re.slice(0, nl.reStart) - var nlFirst = re.slice(nl.reStart, nl.reEnd - 8) - var nlLast = re.slice(nl.reEnd - 8, nl.reEnd) - var nlAfter = re.slice(nl.reEnd) - - nlLast += nlAfter - - // Handle nested stuff like *(*.js|!(*.json)), where open parens - // mean that we should *not* include the ) in the bit that is considered - // "after" the negated section. - var openParensBefore = nlBefore.split('(').length - 1 - var cleanAfter = nlAfter - for (i = 0; i < openParensBefore; i++) { - cleanAfter = cleanAfter.replace(/\)[+*?]?/, '') - } - nlAfter = cleanAfter - - var dollar = '' - if (nlAfter === '' && isSub !== SUBPARSE) { - dollar = '$' - } - var newRe = nlBefore + nlFirst + nlAfter + dollar + nlLast - re = newRe - } - - // if the re is not "" at this point, then we need to make sure - // it doesn't match against an empty path part. - // Otherwise a/* will match a/, which it should not. - if (re !== '' && hasMagic) { - re = '(?=.)' + re - } - - if (addPatternStart) { - re = patternStart + re - } - - // parsing just a piece of a larger pattern. - if (isSub === SUBPARSE) { - return [re, hasMagic] - } - - // skip the regexp for non-magical patterns - // unescape anything in it, though, so that it'll be - // an exact match against a file etc. - if (!hasMagic) { - return globUnescape(pattern) - } - - var flags = options.nocase ? 'i' : '' - try { - var regExp = new RegExp('^' + re + '$', flags) - } catch (er) /* istanbul ignore next - should be impossible */ { - // If it was an invalid regular expression, then it can't match - // anything. This trick looks for a character after the end of - // the string, which is of course impossible, except in multi-line - // mode, but it's not a /m regex. - return new RegExp('$.') - } - - regExp._glob = pattern - regExp._src = re - - return regExp -} - -minimatch.makeRe = function (pattern, options) { - return new Minimatch(pattern, options || {}).makeRe() -} - -Minimatch.prototype.makeRe = makeRe -function makeRe () { - if (this.regexp || this.regexp === false) return this.regexp - - // at this point, this.set is a 2d array of partial - // pattern strings, or "**". - // - // It's better to use .match(). This function shouldn't - // be used, really, but it's pretty convenient sometimes, - // when you just want to work with a regex. - var set = this.set - - if (!set.length) { - this.regexp = false - return this.regexp - } - var options = this.options - - var twoStar = options.noglobstar ? star - : options.dot ? twoStarDot - : twoStarNoDot - var flags = options.nocase ? 'i' : '' - - var re = set.map(function (pattern) { - return pattern.map(function (p) { - return (p === GLOBSTAR) ? twoStar - : (typeof p === 'string') ? regExpEscape(p) - : p._src - }).join('\\\/') - }).join('|') - - // must match entire pattern - // ending in a * or ** will make it less strict. - re = '^(?:' + re + ')$' - - // can match anything, as long as it's not this. - if (this.negate) re = '^(?!' + re + ').*$' - - try { - this.regexp = new RegExp(re, flags) - } catch (ex) /* istanbul ignore next - should be impossible */ { - this.regexp = false - } - return this.regexp -} - -minimatch.match = function (list, pattern, options) { - options = options || {} - var mm = new Minimatch(pattern, options) - list = list.filter(function (f) { - return mm.match(f) - }) - if (mm.options.nonull && !list.length) { - list.push(pattern) - } - return list -} - -Minimatch.prototype.match = function match (f, partial) { - if (typeof partial === 'undefined') partial = this.partial - this.debug('match', f, this.pattern) - // short-circuit in the case of busted things. - // comments, etc. - if (this.comment) return false - if (this.empty) return f === '' - - if (f === '/' && partial) return true - - var options = this.options - - // windows: need to use /, not \ - if (path.sep !== '/') { - f = f.split(path.sep).join('/') - } - - // treat the test path as a set of pathparts. - f = f.split(slashSplit) - this.debug(this.pattern, 'split', f) - - // just ONE of the pattern sets in this.set needs to match - // in order for it to be valid. If negating, then just one - // match means that we have failed. - // Either way, return on the first hit. - - var set = this.set - this.debug(this.pattern, 'set', set) - - // Find the basename of the path by looking for the last non-empty segment - var filename - var i - for (i = f.length - 1; i >= 0; i--) { - filename = f[i] - if (filename) break - } - - for (i = 0; i < set.length; i++) { - var pattern = set[i] - var file = f - if (options.matchBase && pattern.length === 1) { - file = [filename] - } - var hit = this.matchOne(file, pattern, partial) - if (hit) { - if (options.flipNegate) return true - return !this.negate - } - } - - // didn't get any hits. this is success if it's a negative - // pattern, failure otherwise. - if (options.flipNegate) return false - return this.negate -} - -// set partial to true to test if, for example, -// "/a/b" matches the start of "/*/b/*/d" -// Partial means, if you run out of file before you run -// out of pattern, then that's fine, as long as all -// the parts match. -Minimatch.prototype.matchOne = function (file, pattern, partial) { - var options = this.options - - this.debug('matchOne', - { 'this': this, file: file, pattern: pattern }) - - this.debug('matchOne', file.length, pattern.length) - - for (var fi = 0, - pi = 0, - fl = file.length, - pl = pattern.length - ; (fi < fl) && (pi < pl) - ; fi++, pi++) { - this.debug('matchOne loop') - var p = pattern[pi] - var f = file[fi] - - this.debug(pattern, p, f) - - // should be impossible. - // some invalid regexp stuff in the set. - /* istanbul ignore if */ - if (p === false) return false - - if (p === GLOBSTAR) { - this.debug('GLOBSTAR', [pattern, p, f]) - - // "**" - // a/**/b/**/c would match the following: - // a/b/x/y/z/c - // a/x/y/z/b/c - // a/b/x/b/x/c - // a/b/c - // To do this, take the rest of the pattern after - // the **, and see if it would match the file remainder. - // If so, return success. - // If not, the ** "swallows" a segment, and try again. - // This is recursively awful. - // - // a/**/b/**/c matching a/b/x/y/z/c - // - a matches a - // - doublestar - // - matchOne(b/x/y/z/c, b/**/c) - // - b matches b - // - doublestar - // - matchOne(x/y/z/c, c) -> no - // - matchOne(y/z/c, c) -> no - // - matchOne(z/c, c) -> no - // - matchOne(c, c) yes, hit - var fr = fi - var pr = pi + 1 - if (pr === pl) { - this.debug('** at the end') - // a ** at the end will just swallow the rest. - // We have found a match. - // however, it will not swallow /.x, unless - // options.dot is set. - // . and .. are *never* matched by **, for explosively - // exponential reasons. - for (; fi < fl; fi++) { - if (file[fi] === '.' || file[fi] === '..' || - (!options.dot && file[fi].charAt(0) === '.')) return false - } - return true - } - - // ok, let's see if we can swallow whatever we can. - while (fr < fl) { - var swallowee = file[fr] - - this.debug('\nglobstar while', file, fr, pattern, pr, swallowee) - - // XXX remove this slice. Just pass the start index. - if (this.matchOne(file.slice(fr), pattern.slice(pr), partial)) { - this.debug('globstar found match!', fr, fl, swallowee) - // found a match. - return true - } else { - // can't swallow "." or ".." ever. - // can only swallow ".foo" when explicitly asked. - if (swallowee === '.' || swallowee === '..' || - (!options.dot && swallowee.charAt(0) === '.')) { - this.debug('dot detected!', file, fr, pattern, pr) - break - } - - // ** swallows a segment, and continue. - this.debug('globstar swallow a segment, and continue') - fr++ - } - } - - // no match was found. - // However, in partial mode, we can't say this is necessarily over. - // If there's more *pattern* left, then - /* istanbul ignore if */ - if (partial) { - // ran out of file - this.debug('\n>>> no match, partial?', file, fr, pattern, pr) - if (fr === fl) return true - } - return false - } - - // something other than ** - // non-magic patterns just have to match exactly - // patterns with magic have been turned into regexps. - var hit - if (typeof p === 'string') { - hit = f === p - this.debug('string match', p, f, hit) - } else { - hit = f.match(p) - this.debug('pattern match', p, f, hit) - } - - if (!hit) return false - } - - // Note: ending in / means that we'll get a final "" - // at the end of the pattern. This can only match a - // corresponding "" at the end of the file. - // If the file ends in /, then it can only match a - // a pattern that ends in /, unless the pattern just - // doesn't have any more for it. But, a/b/ should *not* - // match "a/b/*", even though "" matches against the - // [^/]*? pattern, except in partial mode, where it might - // simply not be reached yet. - // However, a/b/ should still satisfy a/* - - // now either we fell off the end of the pattern, or we're done. - if (fi === fl && pi === pl) { - // ran out of pattern and filename at the same time. - // an exact hit! - return true - } else if (fi === fl) { - // ran out of file, but still had pattern left. - // this is ok if we're doing the match as part of - // a glob fs traversal. - return partial - } else /* istanbul ignore else */ if (pi === pl) { - // ran out of pattern, still have file left. - // this is only acceptable if we're on the very last - // empty segment of a file with a trailing slash. - // a/* should match a/b/ - return (fi === fl - 1) && (file[fi] === '') - } - - // should be unreachable. - /* istanbul ignore next */ - throw new Error('wtf?') -} - -// replace stuff like \* with * -function globUnescape (s) { - return s.replace(/\\(.)/g, '$1') -} - -function regExpEscape (s) { - return s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, '\\$&') -} diff --git a/node_modules/minimatch/package.json b/node_modules/minimatch/package.json deleted file mode 100644 index 566efdf..0000000 --- a/node_modules/minimatch/package.json +++ /dev/null @@ -1,33 +0,0 @@ -{ - "author": "Isaac Z. Schlueter <i@izs.me> (http://blog.izs.me)", - "name": "minimatch", - "description": "a glob matcher in javascript", - "version": "3.1.2", - "publishConfig": { - "tag": "v3-legacy" - }, - "repository": { - "type": "git", - "url": "git://github.com/isaacs/minimatch.git" - }, - "main": "minimatch.js", - "scripts": { - "test": "tap", - "preversion": "npm test", - "postversion": "npm publish", - "postpublish": "git push origin --all; git push origin --tags" - }, - "engines": { - "node": "*" - }, - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "devDependencies": { - "tap": "^15.1.6" - }, - "license": "ISC", - "files": [ - "minimatch.js" - ] -} diff --git a/node_modules/nodemon/bin/nodemon.js b/node_modules/nodemon/bin/nodemon.js deleted file mode 100644 index 3d490f1..0000000 --- a/node_modules/nodemon/bin/nodemon.js +++ /dev/null @@ -1,16 +0,0 @@ -#!/usr/bin/env node - -const cli = require('../lib/cli'); -const nodemon = require('../lib/'); -const options = cli.parse(process.argv); - -nodemon(options); - -const fs = require('fs'); - -// checks for available update and returns an instance -const pkg = JSON.parse(fs.readFileSync(__dirname + '/../package.json')); - -if (pkg.version.indexOf('0.0.0') !== 0 && options.noUpdateNotifier !== true) { - require('simple-update-notifier')({ pkg }); -} diff --git a/node_modules/nodemon/index.d.ts b/node_modules/nodemon/index.d.ts deleted file mode 100644 index c8e4ec2..0000000 --- a/node_modules/nodemon/index.d.ts +++ /dev/null @@ -1,125 +0,0 @@ -import type { WatchOptions } from 'chokidar' - -export type NodemonEventHandler = - | 'start' - | 'crash' - | 'exit' - | 'quit' - | 'restart' - | 'config:update' - | 'log' - | 'readable' - | 'stdout' - | 'stderr'; - -export type NodemonEventListener = { - on(event: 'start' | 'crash' | 'readable', listener: () => void): Nodemon; - on(event: 'log', listener: (e: NodemonEventLog) => void): Nodemon; - on(event: 'stdout' | 'stderr', listener: (e: string) => void): Nodemon; - on(event: 'restart', listener: (e?: NodemonEventRestart) => void): Nodemon; - on(event: 'quit', listener: (e?: NodemonEventQuit) => void): Nodemon; - on(event: 'exit', listener: (e?: number) => void): Nodemon; - on(event: 'config:update', listener: (e?: NodemonEventConfig) => void): Nodemon; -}; - -export type Nodemon = { - removeAllListeners(event: NodemonEventHandler): Nodemon; - emit(type: NodemonEventHandler, event?: any): Nodemon; - reset(callback: Function): Nodemon; - restart(): Nodemon; - config: NodemonSettings; -} & NodemonEventListener & { - [K in keyof NodemonEventListener as "addListener"]: NodemonEventListener[K]; -} & { - [K in keyof NodemonEventListener as "once"]: NodemonEventListener[K]; -}; - -export type NodemonEventLog = { - /** - - detail: what you get with nodemon --verbose. - - status: subprocess starting, restarting. - - fail: is the subprocess crashing. - - error: is a nodemon system error. - */ - type: 'detail' | 'log' | 'status' | 'error' | 'fail'; - /** the plain text message */ - message: string; - /** contains the terminal escape codes to add colour, plus the "[nodemon]" prefix */ - colour: string; -}; - -export interface NodemonEventRestart { - matched?: { - result: string[]; - total: number; - }; -} - -export type NodemonEventQuit = 143 | 130; - -export type NodemonEventConfig = { - run: boolean; - system: { - cwd: string; - }; - required: boolean; - dirs: string[]; - timeout: number; - options: NodemonConfig; - lastStarted: number - loaded: string[] - load: (settings: NodemonSettings, ready: (config: NodemonEventConfig) => void) => void - reset: () => void -}; - -export interface NodemonExecOptions { - script: string; - scriptPosition?: number; - args?: string[] - ext?: string; // "js,mjs" etc (should really support an array of strings, but I don't think it does right now) - exec?: string; // node, python, etc - execArgs?: string[]; // args passed to node, etc, - nodeArgs?: string[]; // args passed to node, etc, -} - -export interface NodemonConfig { - /** restartable defaults to "rs" as a string the user enters */ - restartable?: false | string; - colours?: boolean; - execMap?: { [key: string]: string }; - ignoreRoot?: string[]; - watch?: string[]; - ignore?: string[]; - stdin?: boolean; - runOnChangeOnly?: boolean; - verbose?: boolean; - signal?: string; - stdout?: boolean; - watchOptions?: WatchOptions; - help?: string - version?: boolean - cwd?: string - dump?: boolean - ignore?: string[] - watch?: string[] - monitor?: string[] - spawn?: boolean - noUpdateNotifier?: boolean - legacyWatch?: boolean - pollingInterval?: number - /** @deprecated as this is "on" by default */ - js?: boolean - quiet?: boolean - configFile?: string - exitCrash?: boolean - execOptions?: NodemonExecOptions -} - -export interface NodemonSettings extends NodemonConfig, NodemonExecOptions { - events?: { [key: string]: string }; - env?: { [key: string]: string }; -} - -const nodemon: Nodemon = (settings: NodemonSettings): Nodemon => {}; - -export = nodemon; diff --git a/node_modules/nodemon/jsconfig.json b/node_modules/nodemon/jsconfig.json deleted file mode 100644 index d77141c..0000000 --- a/node_modules/nodemon/jsconfig.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "compilerOptions": { - "typeRoots": ["./index.d.ts", "./node_modules/@types"], - "checkJs": true - }, - "exclude": ["node_modules"] -} diff --git a/node_modules/nodemon/lib/cli/index.js b/node_modules/nodemon/lib/cli/index.js deleted file mode 100644 index bf9e809..0000000 --- a/node_modules/nodemon/lib/cli/index.js +++ /dev/null @@ -1,49 +0,0 @@ -var parse = require('./parse'); - -/** - * Converts a string to command line args, in particular - * groups together quoted values. - * This is a utility function to allow calling nodemon as a required - * library, but with the CLI args passed in (instead of an object). - * - * @param {String} string - * @return {Array} - */ -function stringToArgs(string) { - var args = []; - - var parts = string.split(' '); - var length = parts.length; - var i = 0; - var open = false; - var grouped = ''; - var lead = ''; - - for (; i < length; i++) { - lead = parts[i].substring(0, 1); - if (lead === '"' || lead === '\'') { - open = lead; - grouped = parts[i].substring(1); - } else if (open && parts[i].slice(-1) === open) { - open = false; - grouped += ' ' + parts[i].slice(0, -1); - args.push(grouped); - } else if (open) { - grouped += ' ' + parts[i]; - } else { - args.push(parts[i]); - } - } - - return args; -} - -module.exports = { - parse: function (argv) { - if (typeof argv === 'string') { - argv = stringToArgs(argv); - } - - return parse(argv); - }, -}; \ No newline at end of file diff --git a/node_modules/nodemon/lib/cli/parse.js b/node_modules/nodemon/lib/cli/parse.js deleted file mode 100644 index 560cc71..0000000 --- a/node_modules/nodemon/lib/cli/parse.js +++ /dev/null @@ -1,230 +0,0 @@ -/* - -nodemon is a utility for node, and replaces the use of the executable -node. So the user calls `nodemon foo.js` instead. - -nodemon can be run in a number of ways: - -`nodemon` - tries to use package.json#main property to run -`nodemon` - if no package, looks for index.js -`nodemon app.js` - runs app.js -`nodemon --arg app.js --apparg` - eats arg1, and runs app.js with apparg -`nodemon --apparg` - as above, but passes apparg to package.json#main (or - index.js) -`nodemon --debug app.js - -*/ - -var fs = require('fs'); -var path = require('path'); -var existsSync = fs.existsSync || path.existsSync; - -module.exports = parse; - -/** - * Parses the command line arguments `process.argv` and returns the - * nodemon options, the user script and the executable script. - * - * @param {Array<string> | string} argv full process arguments, including `node` leading arg - * @return {Object} { options, script, args } - */ -function parse(argv) { - if (typeof argv === 'string') { - argv = argv.split(' '); - } - - var eat = function (i, args) { - if (i <= args.length) { - return args.splice(i + 1, 1).pop(); - } - }; - - var args = argv.slice(2); - var script = null; - var nodemonOptions = { scriptPosition: null }; - - var nodemonOpt = nodemonOption.bind(null, nodemonOptions); - var lookForArgs = true; - - // move forward through the arguments - for (var i = 0; i < args.length; i++) { - // if the argument looks like a file, then stop eating - if (!script) { - if (args[i] === '.' || existsSync(args[i])) { - script = args.splice(i, 1).pop(); - - // we capture the position of the script because we'll reinsert it in - // the right place in run.js:command (though I'm not sure we should even - // take it out of the array in the first place, but this solves passing - // arguments to the exec process for now). - nodemonOptions.scriptPosition = i; - i--; - continue; - } - } - - if (lookForArgs) { - // respect the standard way of saying: hereafter belongs to my script - if (args[i] === '--') { - args.splice(i, 1); - nodemonOptions.scriptPosition = i; - // cycle back one argument, as we just ate this one up - i--; - - // ignore all further nodemon arguments - lookForArgs = false; - - // move to the next iteration - continue; - } - - if (nodemonOpt(args[i], eat.bind(null, i, args)) !== false) { - args.splice(i, 1); - // cycle back one argument, as we just ate this one up - i--; - } - } - } - - nodemonOptions.script = script; - nodemonOptions.args = args; - - return nodemonOptions; -} - - -/** - * Given an argument (ie. from process.argv), sets nodemon - * options and can eat up the argument value - * - * @param {import('../..').NodemonSettings} options object that will be updated - * @param {String} arg current argument from argv - * @param {Function} eatNext the callback to eat up the next argument in argv - * @return {Boolean} false if argument was not a nodemon arg - */ -function nodemonOption(options, arg, eatNext) { - // line separation on purpose to help legibility - if (arg === '--help' || arg === '-h' || arg === '-?') { - var help = eatNext(); - options.help = help ? help : true; - } else - - if (arg === '--version' || arg === '-v') { - options.version = true; - } else - - if (arg === '--no-update-notifier') { - options.noUpdateNotifier = true; - } else - - if (arg === '--spawn') { - options.spawn = true; - } else - - if (arg === '--dump') { - options.dump = true; - } else - - if (arg === '--verbose' || arg === '-V') { - options.verbose = true; - } else - - if (arg === '--legacy-watch' || arg === '-L') { - options.legacyWatch = true; - } else - - if (arg === '--polling-interval' || arg === '-P') { - options.pollingInterval = parseInt(eatNext(), 10); - } else - - // Depricated as this is "on" by default - if (arg === '--js') { - options.js = true; - } else - - if (arg === '--quiet' || arg === '-q') { - options.quiet = true; - } else - - if (arg === '--config') { - options.configFile = eatNext(); - } else - - if (arg === '--watch' || arg === '-w') { - if (!options.watch) { options.watch = []; } - options.watch.push(eatNext()); - } else - - if (arg === '--ignore' || arg === '-i') { - if (!options.ignore) { options.ignore = []; } - options.ignore.push(eatNext()); - } else - - if (arg === '--exitcrash') { - options.exitCrash = true; - } else - - if (arg === '--delay' || arg === '-d') { - options.delay = parseDelay(eatNext()); - } else - - if (arg === '--exec' || arg === '-x') { - options.exec = eatNext(); - } else - - if (arg === '--no-stdin' || arg === '-I') { - options.stdin = false; - } else - - if (arg === '--on-change-only' || arg === '-C') { - options.runOnChangeOnly = true; - } else - - if (arg === '--ext' || arg === '-e') { - options.ext = eatNext(); - } else - - if (arg === '--no-colours' || arg === '--no-colors') { - options.colours = false; - } else - - if (arg === '--signal' || arg === '-s') { - options.signal = eatNext(); - } else - - if (arg === '--cwd') { - options.cwd = eatNext(); - - // go ahead and change directory. This is primarily for nodemon tools like - // grunt-nodemon - we're doing this early because it will affect where the - // user script is searched for. - process.chdir(path.resolve(options.cwd)); - } else { - - // this means we didn't match - return false; - } -} - -/** - * Given an argument (ie. from nodemonOption()), will parse and return the - * equivalent millisecond value or 0 if the argument cannot be parsed - * - * @param {String} value argument value given to the --delay option - * @return {Number} millisecond equivalent of the argument - */ -function parseDelay(value) { - var millisPerSecond = 1000; - var millis = 0; - - if (value.match(/^\d*ms$/)) { - // Explicitly parse for milliseconds when using ms time specifier - millis = parseInt(value, 10); - } else { - // Otherwise, parse for seconds, with or without time specifier then convert - millis = parseFloat(value) * millisPerSecond; - } - - return isNaN(millis) ? 0 : millis; -} - diff --git a/node_modules/nodemon/lib/config/command.js b/node_modules/nodemon/lib/config/command.js deleted file mode 100644 index 9839b5c..0000000 --- a/node_modules/nodemon/lib/config/command.js +++ /dev/null @@ -1,43 +0,0 @@ -module.exports = command; - -/** - * command constructs the executable command to run in a shell including the - * user script, the command arguments. - * - * @param {Object} settings Object as: - * { execOptions: { - * exec: String, - * [script: String], - * [scriptPosition: Number], - * [execArgs: Array<string>] - * } - * } - * @return {Object} an object with the node executable and the - * arguments to the command - */ -function command(settings) { - var options = settings.execOptions; - var executable = options.exec; - var args = []; - - // after "executable" go the exec args (like --debug, etc) - if (options.execArgs) { - [].push.apply(args, options.execArgs); - } - - // then goes the user's script arguments - if (options.args) { - [].push.apply(args, options.args); - } - - // after the "executable" goes the user's script - if (options.script) { - args.splice((options.scriptPosition || 0) + - options.execArgs.length, 0, options.script); - } - - return { - executable: executable, - args: args, - }; -} diff --git a/node_modules/nodemon/lib/config/defaults.js b/node_modules/nodemon/lib/config/defaults.js deleted file mode 100644 index dc95d34..0000000 --- a/node_modules/nodemon/lib/config/defaults.js +++ /dev/null @@ -1,34 +0,0 @@ -var ignoreRoot = require('ignore-by-default').directories(); - -// default options for config.options -const defaults = { - restartable: 'rs', - colours: true, - execMap: { - py: 'python', - rb: 'ruby', - ts: 'ts-node', - // more can be added here such as ls: lsc - but please ensure it's cross - // compatible with linux, mac and windows, or make the default.js - // dynamically append the `.cmd` for node based utilities - }, - ignoreRoot: ignoreRoot.map((_) => `**/${_}/**`), - watch: ['*.*'], - stdin: true, - runOnChangeOnly: false, - verbose: false, - signal: 'SIGUSR2', - // 'stdout' refers to the default behaviour of a required nodemon's child, - // but also includes stderr. If this is false, data is still dispatched via - // nodemon.on('stdout/stderr') - stdout: true, - watchOptions: {}, -}; - -const nodeOptions = process.env.NODE_OPTIONS || ''; // ? - -if (/--(loader|import)\b/.test(nodeOptions)) { - delete defaults.execMap.ts; -} - -module.exports = defaults; diff --git a/node_modules/nodemon/lib/config/exec.js b/node_modules/nodemon/lib/config/exec.js deleted file mode 100644 index 6d17eab..0000000 --- a/node_modules/nodemon/lib/config/exec.js +++ /dev/null @@ -1,234 +0,0 @@ -const path = require('path'); -const fs = require('fs'); -const existsSync = fs.existsSync; -const utils = require('../utils'); - -module.exports = exec; -module.exports.expandScript = expandScript; - -/** - * Reads the cwd/package.json file and looks to see if it can load a script - * and possibly an exec first from package.main, then package.start. - * - * @return {Object} exec & script if found - */ -function execFromPackage() { - // doing a try/catch because we can't use the path.exist callback pattern - // or we could, but the code would get messy, so this will do exactly - // what we're after - if the file doesn't exist, it'll throw. - try { - // note: this isn't nodemon's package, it's the user's cwd package - var pkg = require(path.join(process.cwd(), 'package.json')); - if (pkg.main !== undefined) { - // no app found to run - so give them a tip and get the feck out - return { exec: null, script: pkg.main }; - } - - if (pkg.scripts && pkg.scripts.start) { - return { exec: pkg.scripts.start }; - } - } catch (e) {} - - return null; -} - -function replace(map, str) { - var re = new RegExp('{{(' + Object.keys(map).join('|') + ')}}', 'g'); - return str.replace(re, function (all, m) { - return map[m] || all || ''; - }); -} - -function expandScript(script, ext) { - if (!ext) { - ext = '.js'; - } - if (script.indexOf(ext) !== -1) { - return script; - } - - if (existsSync(path.resolve(script))) { - return script; - } - - if (existsSync(path.resolve(script + ext))) { - return script + ext; - } - - return script; -} - -/** - * Discovers all the options required to run the script - * and if a custom exec has been passed in, then it will - * also try to work out what extensions to monitor and - * whether there's a special way of running that script. - * - * @param {Object} nodemonOptions - * @param {Object} execMap - * @return {Object} new and updated version of nodemonOptions - */ -function exec(nodemonOptions, execMap) { - if (!execMap) { - execMap = {}; - } - - var options = utils.clone(nodemonOptions || {}); - var script; - - // if there's no script passed, try to get it from the first argument - if (!options.script && (options.args || []).length) { - script = expandScript( - options.args[0], - options.ext && '.' + (options.ext || 'js').split(',')[0] - ); - - // if the script was found, shift it off our args - if (script !== options.args[0]) { - options.script = script; - options.args.shift(); - } - } - - // if there's no exec found yet, then try to read it from the local - // package.json this logic used to sit in the cli/parse, but actually the cli - // should be parsed first, then the user options (via nodemon.json) then - // finally default down to pot shots at the directory via package.json - if (!options.exec && !options.script) { - var found = execFromPackage(); - if (found !== null) { - if (found.exec) { - options.exec = found.exec; - } - if (!options.script) { - options.script = found.script; - } - if (Array.isArray(options.args) && options.scriptPosition === null) { - options.scriptPosition = options.args.length; - } - } - } - - // var options = utils.clone(nodemonOptions || {}); - script = path.basename(options.script || ''); - - var scriptExt = path.extname(script).slice(1); - - var extension = options.ext; - if (extension === undefined) { - var isJS = scriptExt === 'js' || scriptExt === 'mjs' || scriptExt === 'cjs'; - extension = isJS || !scriptExt ? 'js,mjs,cjs' : scriptExt; - extension += ',json'; // Always watch JSON files - } - - var execDefined = !!options.exec; - - // allows the user to simplify cli usage: - // https://github.com/remy/nodemon/issues/195 - // but always give preference to the user defined argument - if (!options.exec && execMap[scriptExt] !== undefined) { - options.exec = execMap[scriptExt]; - execDefined = true; - } - - options.execArgs = nodemonOptions.execArgs || []; - - if (Array.isArray(options.exec)) { - options.execArgs = options.exec; - options.exec = options.execArgs.shift(); - } - - if (options.exec === undefined) { - options.exec = 'node'; - } else { - // allow variable substitution for {{filename}} and {{pwd}} - var substitution = replace.bind(null, { - filename: options.script, - pwd: process.cwd(), - }); - - var newExec = substitution(options.exec); - if ( - newExec !== options.exec && - options.exec.indexOf('{{filename}}') !== -1 - ) { - options.script = null; - } - options.exec = newExec; - - var newExecArgs = options.execArgs.map(substitution); - if (newExecArgs.join('') !== options.execArgs.join('')) { - options.execArgs = newExecArgs; - delete options.script; - } - } - - if (options.exec === 'node' && options.nodeArgs && options.nodeArgs.length) { - options.execArgs = options.execArgs.concat(options.nodeArgs); - } - - // note: indexOf('coffee') handles both .coffee and .litcoffee - if ( - !execDefined && - options.exec === 'node' && - scriptExt.indexOf('coffee') !== -1 - ) { - options.exec = 'coffee'; - - // we need to get execArgs set before the script - // for example, in `nodemon --debug my-script.coffee --my-flag`, debug is an - // execArg, while my-flag is a script arg - var leadingArgs = (options.args || []).splice(0, options.scriptPosition); - options.execArgs = options.execArgs.concat(leadingArgs); - options.scriptPosition = 0; - - if (options.execArgs.length > 0) { - // because this is the coffee executable, we need to combine the exec args - // into a single argument after the nodejs flag - options.execArgs = ['--nodejs', options.execArgs.join(' ')]; - } - } - - if (options.exec === 'coffee') { - // don't override user specified extension tracking - if (options.ext === undefined) { - if (extension) { - extension += ','; - } - extension += 'coffee,litcoffee'; - } - - // because windows can't find 'coffee', it needs the real file 'coffee.cmd' - if (utils.isWindows) { - options.exec += '.cmd'; - } - } - - // allow users to make a mistake on the extension to monitor - // converts .js, pug => js,pug - // BIG NOTE: user can't do this: nodemon -e *.js - // because the terminal will automatically expand the glob against - // the file system :( - extension = (extension.match(/[^,*\s]+/g) || []) - .map((ext) => ext.replace(/^\./, '')) - .join(','); - - options.ext = extension; - - if (options.script) { - options.script = expandScript( - options.script, - extension && '.' + extension.split(',')[0] - ); - } - - options.env = {}; - // make sure it's an object (and since we don't have ) - if ({}.toString.apply(nodemonOptions.env) === '[object Object]') { - options.env = utils.clone(nodemonOptions.env); - } else if (nodemonOptions.env !== undefined) { - throw new Error('nodemon env values must be an object: { PORT: 8000 }'); - } - - return options; -} diff --git a/node_modules/nodemon/lib/config/index.js b/node_modules/nodemon/lib/config/index.js deleted file mode 100644 index c78c435..0000000 --- a/node_modules/nodemon/lib/config/index.js +++ /dev/null @@ -1,93 +0,0 @@ -/** - * Manages the internal config of nodemon, checking for the state of support - * with fs.watch, how nodemon can watch files (using find or fs methods). - * - * This is *not* the user's config. - */ -var debug = require('debug')('nodemon'); -var load = require('./load'); -var rules = require('../rules'); -var utils = require('../utils'); -var pinVersion = require('../version').pin; -var command = require('./command'); -var rulesToMonitor = require('../monitor/match').rulesToMonitor; -var bus = utils.bus; - -function reset() { - rules.reset(); - - config.dirs = []; - config.options = { ignore: [], watch: [], monitor: [] }; - config.lastStarted = 0; - config.loaded = []; -} - -var config = { - run: false, - system: { - cwd: process.cwd(), - }, - required: false, - dirs: [], - timeout: 1000, - options: {}, -}; - -/** - * Take user defined settings, then detect the local machine capability, then - * look for local and global nodemon.json files and merge together the final - * settings with the config for nodemon. - * - * @param {Object} settings user defined settings for nodemon (typically on - * the cli) - * @param {Function} ready callback fired once the config is loaded - */ -config.load = function (settings, ready) { - reset(); - var config = this; - load(settings, config.options, config, function (options) { - config.options = options; - - if (options.watch.length === 0) { - // this is to catch when the watch is left blank - options.watch.push('*.*'); - } - - if (options['watch_interval']) { // jshint ignore:line - options.watchInterval = options['watch_interval']; // jshint ignore:line - } - - config.watchInterval = options.watchInterval || null; - if (options.signal) { - config.signal = options.signal; - } - - var cmd = command(config.options); - config.command = { - raw: cmd, - string: utils.stringify(cmd.executable, cmd.args), - }; - - // now run automatic checks on system adding to the config object - options.monitor = rulesToMonitor(options.watch, options.ignore, config); - - var cwd = process.cwd(); - debug('config: dirs', config.dirs); - if (config.dirs.length === 0) { - config.dirs.unshift(cwd); - } - - bus.emit('config:update', config); - pinVersion().then(function () { - ready(config); - }).catch(e => { - // this doesn't help testing, but does give exposure on syntax errors - console.error(e.stack); - setTimeout(() => { throw e; }, 0); - }); - }); -}; - -config.reset = reset; - -module.exports = config; diff --git a/node_modules/nodemon/lib/config/load.js b/node_modules/nodemon/lib/config/load.js deleted file mode 100644 index 7c57d32..0000000 --- a/node_modules/nodemon/lib/config/load.js +++ /dev/null @@ -1,225 +0,0 @@ -var debug = require('debug')('nodemon'); -var fs = require('fs'); -var path = require('path'); -var exists = fs.exists || path.exists; -var utils = require('../utils'); -var rules = require('../rules'); -var parse = require('../rules/parse'); -var exec = require('./exec'); -var defaults = require('./defaults'); - -module.exports = load; -module.exports.mutateExecOptions = mutateExecOptions; - -var existsSync = fs.existsSync || path.existsSync; - -function findAppScript() { - // nodemon has been run alone, so try to read the package file - // or try to read the index.js file - - var pkg = - existsSync(path.join(process.cwd(), 'package.json')) && - require(path.join(process.cwd(), 'package.json')); - if ((!pkg || pkg.main == undefined) && existsSync('./index.js')) { - return 'index.js'; - } -} - -/** - * Load the nodemon config, first reading the global root/nodemon.json, then - * the local nodemon.json to the exec and then overwriting using any user - * specified settings (i.e. from the cli) - * - * @param {Object} settings user defined settings - * @param {Object} options global options - * @param {Object} config the config object to be updated - * @param {Function} callback that receives complete config - */ -function load(settings, options, config, callback) { - config.loaded = []; - // first load the root nodemon.json - loadFile(options, config, utils.home, function (options) { - // then load the user's local configuration file - if (settings.configFile) { - options.configFile = path.resolve(settings.configFile); - } - loadFile(options, config, process.cwd(), function (options) { - // Then merge over with the user settings (parsed from the cli). - // Note that merge protects and favours existing values over new values, - // and thus command line arguments get priority - options = utils.merge(settings, options); - - // legacy support - if (!Array.isArray(options.ignore)) { - options.ignore = [options.ignore]; - } - - if (!options.ignoreRoot) { - options.ignoreRoot = defaults.ignoreRoot; - } - - // blend the user ignore and the default ignore together - if (options.ignoreRoot && options.ignore) { - if (!Array.isArray(options.ignoreRoot)) { - options.ignoreRoot = [options.ignoreRoot]; - } - options.ignore = options.ignoreRoot.concat(options.ignore); - } else { - options.ignore = defaults.ignore.concat(options.ignore); - } - - // add in any missing defaults - options = utils.merge(options, defaults); - - if (!options.script && !options.exec) { - var found = findAppScript(); - if (found) { - if (!options.args) { - options.args = []; - } - // if the script is found as a result of not being on the command - // line, then we move any of the pre double-dash args in execArgs - const n = - options.scriptPosition === null - ? options.args.length - : options.scriptPosition; - - options.execArgs = (options.execArgs || []).concat( - options.args.splice(0, n) - ); - options.scriptPosition = null; - - options.script = found; - } - } - - mutateExecOptions(options); - - if (options.quiet) { - utils.quiet(); - } - - if (options.verbose) { - utils.debug = true; - } - - // simplify the ready callback to be called after the rules are normalised - // from strings to regexp through the rules lib. Note that this gets - // created *after* options is overwritten twice in the lines above. - var ready = function (options) { - normaliseRules(options, callback); - }; - - ready(options); - }); - }); -} - -function normaliseRules(options, ready) { - // convert ignore and watch options to rules/regexp - rules.watch.add(options.watch); - rules.ignore.add(options.ignore); - - // normalise the watch and ignore arrays - options.watch = options.watch === false ? false : rules.rules.watch; - options.ignore = rules.rules.ignore; - - ready(options); -} - -/** - * Looks for a config in the current working directory, and a config in the - * user's home directory, merging the two together, giving priority to local - * config. This can then be overwritten later by command line arguments - * - * @param {Function} ready callback to pass loaded settings to - */ -function loadFile(options, config, dir, ready) { - if (!ready) { - ready = function () {}; - } - - var callback = function (settings) { - // prefer the local nodemon.json and fill in missing items using - // the global options - ready(utils.merge(settings, options)); - }; - - if (!dir) { - return callback({}); - } - - var filename = options.configFile || path.join(dir, 'nodemon.json'); - - if (config.loaded.indexOf(filename) !== -1) { - // don't bother re-parsing the same config file - return callback({}); - } - - fs.readFile(filename, 'utf8', function (err, data) { - if (err) { - if (err.code === 'ENOENT') { - if (!options.configFile && dir !== utils.home) { - // if no specified local config file and local nodemon.json - // doesn't exist, try the package.json - return loadPackageJSON(config, callback); - } - } - return callback({}); - } - - var settings = {}; - - try { - settings = JSON.parse(data.toString('utf8').replace(/^\uFEFF/, '')); - if (!filename.endsWith('package.json') || settings.nodemonConfig) { - config.loaded.push(filename); - } - } catch (e) { - utils.log.fail('Failed to parse config ' + filename); - console.error(e); - process.exit(1); - } - - // options values will overwrite settings - callback(settings); - }); -} - -function loadPackageJSON(config, ready) { - if (!ready) { - ready = () => {}; - } - - const dir = process.cwd(); - const filename = path.join(dir, 'package.json'); - const packageLoadOptions = { configFile: filename }; - return loadFile(packageLoadOptions, config, dir, (settings) => { - ready(settings.nodemonConfig || {}); - }); -} - -function mutateExecOptions(options) { - // work out the execOptions based on the final config we have - options.execOptions = exec( - { - script: options.script, - exec: options.exec, - args: options.args, - scriptPosition: options.scriptPosition, - nodeArgs: options.nodeArgs, - execArgs: options.execArgs, - ext: options.ext, - env: options.env, - }, - options.execMap - ); - - // clean up values that we don't need at the top level - delete options.scriptPosition; - delete options.script; - delete options.args; - delete options.ext; - - return options; -} diff --git a/node_modules/nodemon/lib/help/index.js b/node_modules/nodemon/lib/help/index.js deleted file mode 100644 index 1054b60..0000000 --- a/node_modules/nodemon/lib/help/index.js +++ /dev/null @@ -1,27 +0,0 @@ -var fs = require('fs'); -var path = require('path'); -const supportsColor = require('supports-color'); - -module.exports = help; - -const highlight = supportsColor.stdout ? '\x1B\[$1m' : ''; - -function help(item) { - if (!item) { - item = 'help'; - } else if (item === true) { // if used with -h or --help and no args - item = 'help'; - } - - // cleanse the filename to only contain letters - // aka: /\W/g but figured this was eaiser to read - item = item.replace(/[^a-z]/gi, ''); - - try { - var dir = path.join(__dirname, '..', '..', 'doc', 'cli', item + '.txt'); - var body = fs.readFileSync(dir, 'utf8'); - return body.replace(/\\x1B\[(.)m/g, highlight); - } catch (e) { - return '"' + item + '" help can\'t be found'; - } -} diff --git a/node_modules/nodemon/lib/index.js b/node_modules/nodemon/lib/index.js deleted file mode 100644 index 0eca5c4..0000000 --- a/node_modules/nodemon/lib/index.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./nodemon'); \ No newline at end of file diff --git a/node_modules/nodemon/lib/monitor/index.js b/node_modules/nodemon/lib/monitor/index.js deleted file mode 100644 index 89db029..0000000 --- a/node_modules/nodemon/lib/monitor/index.js +++ /dev/null @@ -1,4 +0,0 @@ -module.exports = { - run: require('./run'), - watch: require('./watch').watch, -}; diff --git a/node_modules/nodemon/lib/monitor/match.js b/node_modules/nodemon/lib/monitor/match.js deleted file mode 100644 index 11691d7..0000000 --- a/node_modules/nodemon/lib/monitor/match.js +++ /dev/null @@ -1,287 +0,0 @@ -const minimatch = require('minimatch'); -const path = require('path'); -const fs = require('fs'); -const debug = require('debug')('nodemon:match'); -const utils = require('../utils'); - -module.exports = match; -module.exports.rulesToMonitor = rulesToMonitor; - -function rulesToMonitor(watch, ignore, config) { - var monitor = []; - - if (!Array.isArray(ignore)) { - if (ignore) { - ignore = [ignore]; - } else { - ignore = []; - } - } - - if (!Array.isArray(watch)) { - if (watch) { - watch = [watch]; - } else { - watch = []; - } - } - - if (watch && watch.length) { - monitor = utils.clone(watch); - } - - if (ignore) { - [].push.apply( - monitor, - (ignore || []).map(function (rule) { - return '!' + rule; - }) - ); - } - - var cwd = process.cwd(); - - // next check if the monitored paths are actual directories - // or just patterns - and expand the rule to include *.* - monitor = monitor.map(function (rule) { - var not = rule.slice(0, 1) === '!'; - - if (not) { - rule = rule.slice(1); - } - - if (rule === '.' || rule === '.*') { - rule = '*.*'; - } - - var dir = path.resolve(cwd, rule); - - try { - var stat = fs.statSync(dir); - if (stat.isDirectory()) { - rule = dir; - if (rule.slice(-1) !== '/') { - rule += '/'; - } - rule += '**/*'; - - // `!not` ... sorry. - if (!not) { - config.dirs.push(dir); - } - } else { - // ensures we end up in the check that tries to get a base directory - // and then adds it to the watch list - throw new Error(); - } - } catch (e) { - var base = tryBaseDir(dir); - if (!not && base) { - if (config.dirs.indexOf(base) === -1) { - config.dirs.push(base); - } - } - } - - if (rule.slice(-1) === '/') { - // just slap on a * anyway - rule += '*'; - } - - // if the url ends with * but not **/* and not *.* - // then convert to **/* - somehow it was missed :-\ - if ( - rule.slice(-4) !== '**/*' && - rule.slice(-1) === '*' && - rule.indexOf('*.') === -1 - ) { - if (rule.slice(-2) !== '**') { - rule += '*/*'; - } - } - - return (not ? '!' : '') + rule; - }); - - return monitor; -} - -function tryBaseDir(dir) { - var stat; - if (/[?*\{\[]+/.test(dir)) { - // if this is pattern, then try to find the base - try { - var base = path.dirname(dir.replace(/([?*\{\[]+.*$)/, 'foo')); - stat = fs.statSync(base); - if (stat.isDirectory()) { - return base; - } - } catch (error) { - // console.log(error); - } - } else { - try { - stat = fs.statSync(dir); - // if this path is actually a single file that exists, then just monitor - // that, *specifically*. - if (stat.isFile() || stat.isDirectory()) { - return dir; - } - } catch (e) {} - } - - return false; -} - -function match(files, monitor, ext) { - // sort the rules by highest specificity (based on number of slashes) - // ignore rules (!) get sorted highest as they take precedent - const cwd = process.cwd(); - var rules = monitor - .sort(function (a, b) { - var r = b.split(path.sep).length - a.split(path.sep).length; - var aIsIgnore = a.slice(0, 1) === '!'; - var bIsIgnore = b.slice(0, 1) === '!'; - - if (aIsIgnore || bIsIgnore) { - if (aIsIgnore) { - return -1; - } - - return 1; - } - - if (r === 0) { - return b.length - a.length; - } - return r; - }) - .map(function (s) { - var prefix = s.slice(0, 1); - - if (prefix === '!') { - if (s.indexOf('!' + cwd) === 0) { - return s; - } - - // if it starts with a period, then let's get the relative path - if (s.indexOf('!.') === 0) { - return '!' + path.resolve(cwd, s.substring(1)); - } - - return '!**' + (prefix !== path.sep ? path.sep : '') + s.slice(1); - } - - // if it starts with a period, then let's get the relative path - if (s.indexOf('.') === 0) { - return path.resolve(cwd, s); - } - - if (s.indexOf(cwd) === 0) { - return s; - } - - return '**' + (prefix !== path.sep ? path.sep : '') + s; - }); - - debug('rules', rules); - - var good = []; - var whitelist = []; // files that we won't check against the extension - var ignored = 0; - var watched = 0; - var usedRules = []; - var minimatchOpts = { - dot: true, - }; - - // enable case-insensitivity on Windows - if (utils.isWindows) { - minimatchOpts.nocase = true; - } - - files.forEach(function (file) { - file = path.resolve(cwd, file); - - var matched = false; - for (var i = 0; i < rules.length; i++) { - if (rules[i].slice(0, 1) === '!') { - if (!minimatch(file, rules[i], minimatchOpts)) { - debug('ignored', file, 'rule:', rules[i]); - ignored++; - matched = true; - break; - } - } else { - debug('matched', file, 'rule:', rules[i]); - if (minimatch(file, rules[i], minimatchOpts)) { - watched++; - - // don't repeat the output if a rule is matched - if (usedRules.indexOf(rules[i]) === -1) { - usedRules.push(rules[i]); - utils.log.detail('matched rule: ' + rules[i]); - } - - // if the rule doesn't match the WATCH EVERYTHING - // but *does* match a rule that ends with *.*, then - // white list it - in that we don't run it through - // the extension check too. - if ( - rules[i] !== '**' + path.sep + '*.*' && - rules[i].slice(-3) === '*.*' - ) { - whitelist.push(file); - } else if (path.basename(file) === path.basename(rules[i])) { - // if the file matches the actual rule, then it's put on whitelist - whitelist.push(file); - } else { - good.push(file); - } - matched = true; - } else { - // utils.log.detail('no match: ' + rules[i], file); - } - } - } - if (!matched) { - ignored++; - } - }); - - // finally check the good files against the extensions that we're monitoring - if (ext) { - if (ext.indexOf(',') === -1) { - ext = '**/*.' + ext; - } else { - ext = '**/*.{' + ext + '}'; - } - - good = good.filter(function (file) { - // only compare the filename to the extension test - return minimatch(path.basename(file), ext, minimatchOpts); - }); - debug('good (filtered by ext)', good); - } else { - // else assume *.* - debug('good', good); - } - - if (whitelist.length) debug('whitelist', whitelist); - - var result = good.concat(whitelist); - - if (utils.isWindows) { - // fix for windows testing - I *think* this is okay to do - result = result.map(function (file) { - return file.slice(0, 1).toLowerCase() + file.slice(1); - }); - } - - return { - result: result, - ignored: ignored, - watched: watched, - total: files.length, - }; -} diff --git a/node_modules/nodemon/lib/monitor/run.js b/node_modules/nodemon/lib/monitor/run.js deleted file mode 100644 index 5fa7f45..0000000 --- a/node_modules/nodemon/lib/monitor/run.js +++ /dev/null @@ -1,562 +0,0 @@ -var debug = require('debug')('nodemon:run'); -const statSync = require('fs').statSync; -var utils = require('../utils'); -var bus = utils.bus; -var childProcess = require('child_process'); -var spawn = childProcess.spawn; -var exec = childProcess.exec; -var execSync = childProcess.execSync; -var fork = childProcess.fork; -var watch = require('./watch').watch; -var config = require('../config'); -var child = null; // the actual child process we spawn -var killedAfterChange = false; -var noop = () => {}; -var restart = null; -var psTree = require('pstree.remy'); -var path = require('path'); -var signals = require('./signals'); -const undefsafe = require('undefsafe'); -const osRelease = parseInt(require('os').release().split('.')[0], 10); - -function run(options) { - var cmd = config.command.raw; - // moved up - // we need restart function below in the global scope for run.kill - /*jshint validthis:true*/ - restart = run.bind(this, options); - run.restart = restart; - - // binding options with instance of run - // so that we can use it in run.kill - run.options = options; - - var runCmd = !options.runOnChangeOnly || config.lastStarted !== 0; - if (runCmd) { - utils.log.status('starting `' + config.command.string + '`'); - } else { - // should just watch file if command is not to be run - // had another alternate approach - // to stop process being forked/spawned in the below code - // but this approach does early exit and makes code cleaner - debug('start watch on: %s', config.options.watch); - if (config.options.watch !== false) { - watch(); - return; - } - } - - config.lastStarted = Date.now(); - - var stdio = ['pipe', 'pipe', 'pipe']; - - if (config.options.stdout) { - stdio = ['pipe', process.stdout, process.stderr]; - } - - if (config.options.stdin === false) { - stdio = [process.stdin, process.stdout, process.stderr]; - } - - var sh = 'sh'; - var shFlag = '-c'; - - const binPath = process.cwd() + '/node_modules/.bin'; - - const spawnOptions = { - env: Object.assign({}, options.execOptions.env, process.env, { - PATH: - binPath + - path.delimiter + - (undefsafe(options, '.execOptions.env.PATH') || process.env.PATH), - }), - stdio: stdio, - }; - - var executable = cmd.executable; - - if (utils.isWindows) { - // if the exec includes a forward slash, reverse it for windows compat - // but *only* apply to the first command, and none of the arguments. - // ref #1251 and #1236 - if (executable.indexOf('/') !== -1) { - executable = executable - .split(' ') - .map((e, i) => { - if (i === 0) { - return path.normalize(e); - } - return e; - }) - .join(' '); - } - // taken from npm's cli: https://git.io/vNFD4 - sh = process.env.comspec || 'cmd'; - shFlag = '/d /s /c'; - spawnOptions.windowsVerbatimArguments = true; - spawnOptions.windowsHide = true; - } - - var args = runCmd ? utils.stringify(executable, cmd.args) : ':'; - var spawnArgs = [sh, [shFlag, args], spawnOptions]; - - const firstArg = cmd.args[0] || ''; - - var inBinPath = false; - try { - inBinPath = statSync(`${binPath}/${executable}`).isFile(); - } catch (e) {} - - // hasStdio allows us to correctly handle stdin piping - // see: https://git.io/vNtX3 - const hasStdio = utils.satisfies('>= 6.4.0 || < 5'); - - // forking helps with sub-process handling and tends to clean up better - // than spawning, but it should only be used under specific conditions - const shouldFork = - !config.options.spawn && - !inBinPath && - !(firstArg.indexOf('-') === 0) && // don't fork if there's a node exec arg - firstArg !== 'inspect' && // don't fork it's `inspect` debugger - executable === 'node' && // only fork if node - utils.version.major > 4; // only fork if node version > 4 - - if (shouldFork) { - // this assumes the first argument is the script and slices it out, since - // we're forking - var forkArgs = cmd.args.slice(1); - var env = utils.merge(options.execOptions.env, process.env); - stdio.push('ipc'); - const forkOptions = { - env: env, - stdio: stdio, - silent: !hasStdio, - }; - if (utils.isWindows) { - forkOptions.windowsHide = true; - } - child = fork(options.execOptions.script, forkArgs, forkOptions); - utils.log.detail('forking'); - debug('fork', sh, shFlag, args); - } else { - utils.log.detail('spawning'); - child = spawn.apply(null, spawnArgs); - debug('spawn', sh, shFlag, args); - } - - if (config.required) { - var emit = { - stdout: function (data) { - bus.emit('stdout', data); - }, - stderr: function (data) { - bus.emit('stderr', data); - }, - }; - - // now work out what to bind to... - if (config.options.stdout) { - child.on('stdout', emit.stdout).on('stderr', emit.stderr); - } else { - child.stdout.on('data', emit.stdout); - child.stderr.on('data', emit.stderr); - - bus.stdout = child.stdout; - bus.stderr = child.stderr; - } - - if (shouldFork) { - child.on('message', function (message, sendHandle) { - bus.emit('message', message, sendHandle); - }); - } - } - - bus.emit('start'); - - utils.log.detail('child pid: ' + child.pid); - - child.on('error', function (error) { - bus.emit('error', error); - if (error.code === 'ENOENT') { - utils.log.error('unable to run executable: "' + cmd.executable + '"'); - process.exit(1); - } else { - utils.log.error('failed to start child process: ' + error.code); - throw error; - } - }); - - child.on('exit', function (code, signal) { - if (child && child.stdin) { - process.stdin.unpipe(child.stdin); - } - - if (code === 127) { - utils.log.error( - 'failed to start process, "' + cmd.executable + '" exec not found' - ); - bus.emit('error', code); - process.exit(); - } - - // If the command failed with code 2, it may or may not be a syntax error - // See: http://git.io/fNOAR - // We will only assume a parse error, if the child failed quickly - if (code === 2 && Date.now() < config.lastStarted + 500) { - utils.log.error('process failed, unhandled exit code (2)'); - utils.log.error(''); - utils.log.error('Either the command has a syntax error,'); - utils.log.error('or it is exiting with reserved code 2.'); - utils.log.error(''); - utils.log.error('To keep nodemon running even after a code 2,'); - utils.log.error('add this to the end of your command: || exit 1'); - utils.log.error(''); - utils.log.error('Read more here: https://git.io/fNOAG'); - utils.log.error(''); - utils.log.error('nodemon will stop now so that you can fix the command.'); - utils.log.error(''); - bus.emit('error', code); - process.exit(); - } - - // In case we killed the app ourselves, set the signal thusly - if (killedAfterChange) { - killedAfterChange = false; - signal = config.signal; - } - // this is nasty, but it gives it windows support - if (utils.isWindows && signal === 'SIGTERM') { - signal = config.signal; - } - - if (signal === config.signal || code === 0) { - // this was a clean exit, so emit exit, rather than crash - debug('bus.emit(exit) via ' + config.signal); - bus.emit('exit', signal); - - // exit the monitor, but do it gracefully - if (signal === config.signal) { - return restart(); - } - - if (code === 0) { - // clean exit - wait until file change to restart - if (runCmd) { - utils.log.status('clean exit - waiting for changes before restart'); - } - child = null; - } - } else { - bus.emit('crash'); - - // support the old syntax of `exitcrash` - 2024-12-13 - if (options.exitcrash) { - options.exitCrash = true; - delete options.exitcrash; - } - - if (options.exitCrash) { - utils.log.fail('app crashed'); - if (!config.required) { - process.exit(1); - } - } else { - utils.log.fail( - 'app crashed - waiting for file changes before' + ' starting...' - ); - child = null; - } - } - - if (config.options.restartable) { - // stdin needs to kick in again to be able to listen to the - // restart command - process.stdin.resume(); - } - }); - - // moved the run.kill outside to handle both the cases - // intial start - // no start - - // connect stdin to the child process (options.stdin is on by default) - if (options.stdin) { - process.stdin.resume(); - // FIXME decide whether or not we need to decide the encoding - // process.stdin.setEncoding('utf8'); - - // swallow the stdin error if it happens - // ref: https://github.com/remy/nodemon/issues/1195 - if (hasStdio) { - child.stdin.on('error', () => {}); - process.stdin.pipe(child.stdin); - } else { - if (child.stdout) { - child.stdout.pipe(process.stdout); - } else { - utils.log.error( - 'running an unsupported version of node ' + process.version - ); - utils.log.error( - 'nodemon may not work as expected - ' + - 'please consider upgrading to LTS' - ); - } - } - - bus.once('exit', function () { - if (child && process.stdin.unpipe) { - // node > 0.8 - process.stdin.unpipe(child.stdin); - } - }); - } - - debug('start watch on: %s', config.options.watch); - if (config.options.watch !== false) { - watch(); - } -} - -function waitForSubProcesses(pid, callback) { - debug('checking ps tree for pids of ' + pid); - psTree(pid, (err, pids) => { - if (!pids.length) { - return callback(); - } - - utils.log.status( - `still waiting for ${pids.length} sub-process${ - pids.length > 2 ? 'es' : '' - } to finish...` - ); - setTimeout(() => waitForSubProcesses(pid, callback), 1000); - }); -} - -function kill(child, signal, callback) { - if (!callback) { - callback = noop; - } - - if (utils.isWindows) { - const taskKill = () => { - try { - exec('taskkill /pid ' + child.pid + ' /T /F'); - } catch (e) { - utils.log.error('Could not shutdown sub process cleanly'); - } - }; - - // We are handling a 'SIGKILL' , 'SIGUSR2' and 'SIGUSR1' POSIX signal under Windows the - // same way it is handled on a UNIX system: We are performing - // a hard shutdown without waiting for the process to clean-up. - if ( - signal === 'SIGKILL' || - osRelease < 10 || - signal === 'SIGUSR2' || - signal === 'SIGUSR1' - ) { - debug('terminating process group by force: %s', child.pid); - - // We are using the taskkill utility to terminate the whole - // process group ('/t') of the child ('/pid') by force ('/f'). - // We need to end all sub processes, because the 'child' - // process in this context is actually a cmd.exe wrapper. - taskKill(); - callback(); - return; - } - - try { - // We are using the Windows Management Instrumentation Command-line - // (wmic.exe) to resolve the sub-child process identifier, because the - // 'child' process in this context is actually a cmd.exe wrapper. - // We want to send the termination signal directly to the node process. - // The '2> nul' silences the no process found error message. - const resultBuffer = execSync( - `wmic process where (ParentProcessId=${child.pid}) get ProcessId 2> nul` - ); - const result = resultBuffer.toString().match(/^[0-9]+/m); - - // If there is no sub-child process we fall back to the child process. - const processId = Array.isArray(result) ? result[0] : child.pid; - - debug('sending kill signal SIGINT to process: %s', processId); - - // We are using the standalone 'windows-kill' executable to send the - // standard POSIX signal 'SIGINT' to the node process. This fixes #1720. - const windowsKill = path.normalize( - `${__dirname}/../../bin/windows-kill.exe` - ); - - // We have to detach the 'windows-kill' execution completely from this - // process group to avoid terminating the nodemon process itself. - // See: https://github.com/alirdn/windows-kill#how-it-works--limitations - // - // Therefore we are using 'start' to create a new cmd.exe context. - // The '/min' option hides the new terminal window and the '/wait' - // option lets the process wait for the command to finish. - - execSync( - `start "windows-kill" /min /wait "${windowsKill}" -SIGINT ${processId}` - ); - } catch (e) { - taskKill(); - } - callback(); - } else { - // we use psTree to kill the full subtree of nodemon, because when - // spawning processes like `coffee` under the `--debug` flag, it'll spawn - // it's own child, and that can't be killed by nodemon, so psTree gives us - // an array of PIDs that have spawned under nodemon, and we send each the - // configured signal (default: SIGUSR2) signal, which fixes #335 - // note that psTree also works if `ps` is missing by looking in /proc - let sig = signal.replace('SIG', ''); - - psTree(child.pid, function (err, pids) { - // if ps isn't native to the OS, then we need to send the numeric value - // for the signal during the kill, `signals` is a lookup table for that. - if (!psTree.hasPS) { - sig = signals[signal]; - } - - // the sub processes need to be killed from smallest to largest - debug('sending kill signal to ' + pids.join(', ')); - - child.kill(signal); - - pids.sort().forEach((pid) => exec(`kill -${sig} ${pid}`, noop)); - - waitForSubProcesses(child.pid, () => { - // finally kill the main user process - exec(`kill -${sig} ${child.pid}`, callback); - }); - }); - } -} - -run.kill = function (noRestart, callback) { - // I hate code like this :( - Remy (author of said code) - if (typeof noRestart === 'function') { - callback = noRestart; - noRestart = false; - } - - if (!callback) { - callback = noop; - } - - if (child !== null) { - // if the stdin piping is on, we need to unpipe, but also close stdin on - // the child, otherwise linux can throw EPIPE or ECONNRESET errors. - if (run.options.stdin) { - process.stdin.unpipe(child.stdin); - } - - // For the on('exit', ...) handler above the following looks like a - // crash, so we set the killedAfterChange flag if a restart is planned - if (!noRestart) { - killedAfterChange = true; - } - - /* Now kill the entire subtree of processes belonging to nodemon */ - var oldPid = child.pid; - if (child) { - kill(child, config.signal, function () { - // this seems to fix the 0.11.x issue with the "rs" restart command, - // though I'm unsure why. it seems like more data is streamed in to - // stdin after we close. - if (child && run.options.stdin && child.stdin && oldPid === child.pid) { - child.stdin.end(); - } - callback(); - }); - } - } else if (!noRestart) { - // if there's no child, then we need to manually start the process - // this is because as there was no child, the child.on('exit') event - // handler doesn't exist which would normally trigger the restart. - bus.once('start', callback); - run.restart(); - } else { - callback(); - } -}; - -run.restart = noop; - -bus.on('quit', function onQuit(code) { - if (code === undefined) { - code = 0; - } - - // remove event listener - var exitTimer = null; - var exit = function () { - clearTimeout(exitTimer); - exit = noop; // null out in case of race condition - child = null; - if (!config.required) { - // Execute all other quit listeners. - bus.listeners('quit').forEach(function (listener) { - if (listener !== onQuit) { - listener(); - } - }); - process.exit(code); - } else { - bus.emit('exit'); - } - }; - - // if we're not running already, don't bother with trying to kill - if (config.run === false) { - return exit(); - } - - // immediately try to stop any polling - config.run = false; - - if (child) { - // give up waiting for the kids after 10 seconds - exitTimer = setTimeout(exit, 10 * 1000); - child.removeAllListeners('exit'); - child.once('exit', exit); - - kill(child, 'SIGINT'); - } else { - exit(); - } -}); - -bus.on('restart', function () { - // run.kill will send a SIGINT to the child process, which will cause it - // to terminate, which in turn uses the 'exit' event handler to restart - run.kill(); -}); - -// remove the child file on exit -process.on('exit', function () { - utils.log.detail('exiting'); - if (child) { - child.kill(); - } -}); - -// because windows borks when listening for the SIG* events -if (!utils.isWindows) { - bus.once('boot', () => { - // usual suspect: ctrl+c exit - process.once('SIGINT', () => bus.emit('quit', 130)); - process.once('SIGTERM', () => { - bus.emit('quit', 143); - if (child) { - child.kill('SIGTERM'); - } - }); - }); -} - -module.exports = run; diff --git a/node_modules/nodemon/lib/monitor/signals.js b/node_modules/nodemon/lib/monitor/signals.js deleted file mode 100644 index daff6e0..0000000 --- a/node_modules/nodemon/lib/monitor/signals.js +++ /dev/null @@ -1,34 +0,0 @@ -module.exports = { - SIGHUP: 1, - SIGINT: 2, - SIGQUIT: 3, - SIGILL: 4, - SIGTRAP: 5, - SIGABRT: 6, - SIGBUS: 7, - SIGFPE: 8, - SIGKILL: 9, - SIGUSR1: 10, - SIGSEGV: 11, - SIGUSR2: 12, - SIGPIPE: 13, - SIGALRM: 14, - SIGTERM: 15, - SIGSTKFLT: 16, - SIGCHLD: 17, - SIGCONT: 18, - SIGSTOP: 19, - SIGTSTP: 20, - SIGTTIN: 21, - SIGTTOU: 22, - SIGURG: 23, - SIGXCPU: 24, - SIGXFSZ: 25, - SIGVTALRM: 26, - SIGPROF: 27, - SIGWINCH: 28, - SIGIO: 29, - SIGPWR: 30, - SIGSYS: 31, - SIGRTMIN: 35, -} diff --git a/node_modules/nodemon/lib/monitor/watch.js b/node_modules/nodemon/lib/monitor/watch.js deleted file mode 100644 index d0ac7fe..0000000 --- a/node_modules/nodemon/lib/monitor/watch.js +++ /dev/null @@ -1,244 +0,0 @@ -module.exports.watch = watch; -module.exports.resetWatchers = resetWatchers; - -var debug = require('debug')('nodemon:watch'); -var debugRoot = require('debug')('nodemon'); -var chokidar = require('chokidar'); -var undefsafe = require('undefsafe'); -var config = require('../config'); -var path = require('path'); -var utils = require('../utils'); -var bus = utils.bus; -var match = require('./match'); -var watchers = []; -var debouncedBus; - -bus.on('reset', resetWatchers); - -function resetWatchers() { - debugRoot('resetting watchers'); - watchers.forEach(function (watcher) { - watcher.close(); - }); - watchers = []; -} - -function watch() { - if (watchers.length) { - debug('early exit on watch, still watching (%s)', watchers.length); - return; - } - - var dirs = [].slice.call(config.dirs); - - debugRoot('start watch on: %s', dirs.join(', ')); - const rootIgnored = config.options.ignore; - debugRoot('ignored', rootIgnored); - - var watchedFiles = []; - - const promise = new Promise(function (resolve) { - const dotFilePattern = /[/\\]\./; - var ignored = match.rulesToMonitor( - [], // not needed - Array.from(rootIgnored), - config - ).map(pattern => pattern.slice(1)); - - const addDotFile = dirs.filter(dir => dir.match(dotFilePattern)); - - // don't ignore dotfiles if explicitly watched. - if (addDotFile.length === 0) { - ignored.push(dotFilePattern); - } - - var watchOptions = { - ignorePermissionErrors: true, - ignored: ignored, - persistent: true, - usePolling: config.options.legacyWatch || false, - interval: config.options.pollingInterval, - // note to future developer: I've gone back and forth on adding `cwd` - // to the props and in some cases it fixes bugs but typically it causes - // bugs elsewhere (since nodemon is used is so many ways). the final - // decision is to *not* use it at all and work around it - // cwd: ... - }; - - if (utils.isWindows) { - watchOptions.disableGlobbing = true; - } - - if (utils.isIBMi) { - watchOptions.usePolling = true; - } - - if (process.env.TEST) { - watchOptions.useFsEvents = false; - } - - var watcher = chokidar.watch( - dirs, - Object.assign({}, watchOptions, config.options.watchOptions || {}) - ); - - watcher.ready = false; - - var total = 0; - - watcher.on('change', filterAndRestart); - watcher.on('unlink', filterAndRestart); - watcher.on('add', function (file) { - if (watcher.ready) { - return filterAndRestart(file); - } - - watchedFiles.push(file); - bus.emit('watching', file); - debug('chokidar watching: %s', file); - }); - watcher.on('ready', function () { - watchedFiles = Array.from(new Set(watchedFiles)); // ensure no dupes - total = watchedFiles.length; - watcher.ready = true; - resolve(total); - debugRoot('watch is complete'); - }); - - watcher.on('error', function (error) { - if (error.code === 'EINVAL') { - utils.log.error( - 'Internal watch failed. Likely cause: too many ' + - 'files being watched (perhaps from the root of a drive?\n' + - 'See https://github.com/paulmillr/chokidar/issues/229 for details' - ); - } else { - utils.log.error('Internal watch failed: ' + error.message); - process.exit(1); - } - }); - - watchers.push(watcher); - }); - - return promise.catch(e => { - // this is a core error and it should break nodemon - so I have to break - // out of a promise using the setTimeout - setTimeout(() => { - throw e; - }); - }).then(function () { - utils.log.detail(`watching ${watchedFiles.length} file${ - watchedFiles.length === 1 ? '' : 's'}`); - return watchedFiles; - }); -} - -function filterAndRestart(files) { - if (!Array.isArray(files)) { - files = [files]; - } - - if (files.length) { - var cwd = process.cwd(); - if (this.options && this.options.cwd) { - cwd = this.options.cwd; - } - - utils.log.detail( - 'files triggering change check: ' + - files - .map(file => { - const res = path.relative(cwd, file); - return res; - }) - .join(', ') - ); - - // make sure the path is right and drop an empty - // filenames (sometimes on windows) - files = files.filter(Boolean).map(file => { - return path.relative(process.cwd(), path.relative(cwd, file)); - }); - - if (utils.isWindows) { - // ensure the drive letter is in uppercase (c:\foo -> C:\foo) - files = files.map(f => { - if (f.indexOf(':') === -1) { return f; } - return f[0].toUpperCase() + f.slice(1); - }); - } - - - debug('filterAndRestart on', files); - - var matched = match( - files, - config.options.monitor, - undefsafe(config, 'options.execOptions.ext') - ); - - debug('matched?', JSON.stringify(matched)); - - // if there's no matches, then test to see if the changed file is the - // running script, if so, let's allow a restart - if (config.options.execOptions && config.options.execOptions.script) { - const script = path.resolve(config.options.execOptions.script); - if (matched.result.length === 0 && script) { - const length = script.length; - files.find(file => { - if (file.substr(-length, length) === script) { - matched = { - result: [file], - total: 1, - }; - return true; - } - }); - } - } - - utils.log.detail( - 'changes after filters (before/after): ' + - [files.length, matched.result.length].join('/') - ); - - // reset the last check so we're only looking at recently modified files - config.lastStarted = Date.now(); - - if (matched.result.length) { - if (config.options.delay > 0) { - utils.log.detail('delaying restart for ' + config.options.delay + 'ms'); - if (debouncedBus === undefined) { - debouncedBus = debounce(restartBus, config.options.delay); - } - debouncedBus(matched); - } else { - return restartBus(matched); - } - } - } -} - -function restartBus(matched) { - utils.log.status('restarting due to changes...'); - matched.result.map(file => { - utils.log.detail(path.relative(process.cwd(), file)); - }); - - if (config.options.verbose) { - utils.log._log(''); - } - - bus.emit('restart', matched.result); -} - -function debounce(fn, delay) { - var timer = null; - return function () { - const context = this; - const args = arguments; - clearTimeout(timer); - timer = setTimeout(() =>fn.apply(context, args), delay); - }; -} diff --git a/node_modules/nodemon/lib/nodemon.js b/node_modules/nodemon/lib/nodemon.js deleted file mode 100644 index 75619ba..0000000 --- a/node_modules/nodemon/lib/nodemon.js +++ /dev/null @@ -1,317 +0,0 @@ -var debug = require('debug')('nodemon'); -var path = require('path'); -var monitor = require('./monitor'); -var cli = require('./cli'); -var version = require('./version'); -var util = require('util'); -var utils = require('./utils'); -var bus = utils.bus; -var help = require('./help'); -/** @type {import('..').NodemonEventConfig} */ -var config = require('./config'); -var spawn = require('./spawn'); -const defaults = require('./config/defaults') -var eventHandlers = {}; - -// this is fairly dirty, but theoretically sound since it's part of the -// stable module API -config.required = utils.isRequired; - -/** - * @param {import('..').NodemonSettings | string} settings - * @returns {import('..').Nodemon} - */ -function nodemon(settings) { - bus.emit('boot'); - nodemon.reset(); - - /** @type {import('..').NodemonSettings} */ - let options - - // allow the cli string as the argument to nodemon, and allow for - // `node nodemon -V app.js` or just `-V app.js` - if (typeof settings === 'string') { - settings = settings.trim(); - if (settings.indexOf('node') !== 0) { - if (settings.indexOf('nodemon') !== 0) { - settings = 'nodemon ' + settings; - } - settings = 'node ' + settings; - } - options = cli.parse(settings); - } else options = settings; - - // set the debug flag as early as possible to get all the detailed logging - if (options.verbose) { - utils.debug = true; - } - - if (options.help) { - if (process.stdout.isTTY) { - process.stdout._handle.setBlocking(true); // nodejs/node#6456 - } - console.log(help(options.help)); - if (!config.required) { - process.exit(0); - } - } - - if (options.version) { - version().then(function (v) { - console.log(v); - if (!config.required) { - process.exit(0); - } - }); - return; - } - - // nodemon tools like grunt-nodemon. This affects where - // the script is being run from, and will affect where - // nodemon looks for the nodemon.json files - if (options.cwd) { - // this is protection to make sure we haven't dont the chdir already... - // say like in cli/parse.js (which is where we do this once already!) - if (process.cwd() !== path.resolve(config.system.cwd, options.cwd)) { - process.chdir(options.cwd); - } - } - - config.load(options, function (config) { - if (!config.options.dump && !config.options.execOptions.script && - config.options.execOptions.exec === 'node') { - if (!config.required) { - console.log(help('usage')); - process.exit(); - } - return; - } - - // before we print anything, update the colour setting on logging - utils.colours = config.options.colours; - - // always echo out the current version - utils.log.info(version.pinned); - - const cwd = process.cwd(); - - if (config.options.cwd) { - utils.log.detail('process root: ' + cwd); - } - - config.loaded.map(file => file.replace(cwd, '.')).forEach(file => { - utils.log.detail('reading config ' + file); - }); - - if (config.options.stdin && config.options.restartable) { - // allow nodemon to restart when the use types 'rs\n' - process.stdin.resume(); - process.stdin.setEncoding('utf8'); - process.stdin.on('data', data => { - const str = data.toString().trim().toLowerCase(); - - // if the keys entered match the restartable value, then restart! - if (str === config.options.restartable) { - bus.emit('restart'); - } else if (data.charCodeAt(0) === 12) { // ctrl+l - console.clear(); - } - }); - } else if (config.options.stdin) { - // so let's make sure we don't eat the key presses - // but also, since we're wrapping, watch out for - // special keys, like ctrl+c x 2 or '.exit' or ctrl+d or ctrl+l - var ctrlC = false; - var buffer = ''; - - process.stdin.on('data', function (data) { - data = data.toString(); - buffer += data; - const chr = data.charCodeAt(0); - - // if restartable, echo back - if (chr === 3) { - if (ctrlC) { - process.exit(0); - } - - ctrlC = true; - return; - } else if (buffer === '.exit' || chr === 4) { // ctrl+d - process.exit(); - } else if (chr === 13 || chr === 10) { // enter / carriage return - buffer = ''; - } else if (chr === 12) { // ctrl+l - console.clear(); - buffer = ''; - } - ctrlC = false; - }); - if (process.stdin.setRawMode) { - process.stdin.setRawMode(true); - } - } - - if (config.options.restartable) { - utils.log.info('to restart at any time, enter `' + - config.options.restartable + '`'); - } - - if (!config.required) { - const restartSignal = config.options.signal === 'SIGUSR2' ? 'SIGHUP' : 'SIGUSR2'; - process.on(restartSignal, nodemon.restart); - utils.bus.on('error', () => { - utils.log.fail((new Error().stack)); - }); - utils.log.detail((config.options.restartable ? 'or ' : '') + 'send ' + - restartSignal + ' to ' + process.pid + ' to restart'); - } - - const ignoring = config.options.monitor.map(function (rule) { - if (rule.slice(0, 1) !== '!') { - return false; - } - - rule = rule.slice(1); - - // don't notify of default ignores - if (defaults.ignoreRoot.indexOf(rule) !== -1) { - return false; - // return rule.slice(3).slice(0, -3); - } - - if (rule.startsWith(cwd)) { - return rule.replace(cwd, '.'); - } - - return rule; - }).filter(Boolean).join(' '); - if (ignoring) utils.log.detail('ignoring: ' + ignoring); - - utils.log.info('watching path(s): ' + config.options.monitor.map(function (rule) { - if (rule.slice(0, 1) !== '!') { - try { - rule = path.relative(process.cwd(), rule); - } catch (e) {} - - return rule; - } - - return false; - }).filter(Boolean).join(' ')); - - utils.log.info('watching extensions: ' + (config.options.execOptions.ext || '(all)')); - - if (config.options.dump) { - utils.log._log('log', '--------------'); - utils.log._log('log', 'node: ' + process.version); - utils.log._log('log', 'nodemon: ' + version.pinned); - utils.log._log('log', 'command: ' + process.argv.join(' ')); - utils.log._log('log', 'cwd: ' + cwd); - utils.log._log('log', ['OS:', process.platform, process.arch].join(' ')); - utils.log._log('log', '--------------'); - utils.log._log('log', util.inspect(config, { depth: null })); - utils.log._log('log', '--------------'); - if (!config.required) { - process.exit(); - } - - return; - } - - config.run = true; - - if (config.options.stdout === false) { - nodemon.on('start', function () { - nodemon.stdout = bus.stdout; - nodemon.stderr = bus.stderr; - - bus.emit('readable'); - }); - } - - if (config.options.events && Object.keys(config.options.events).length) { - Object.keys(config.options.events).forEach(function (key) { - utils.log.detail('bind ' + key + ' -> `' + - config.options.events[key] + '`'); - nodemon.on(key, function () { - if (config.options && config.options.events) { - spawn(config.options.events[key], config, - [].slice.apply(arguments)); - } - }); - }); - } - - monitor.run(config.options); - - }); - - return nodemon; -} - -nodemon.restart = function () { - utils.log.status('restarting child process'); - bus.emit('restart'); - return nodemon; -}; - -nodemon.addListener = nodemon.on = function (event, handler) { - if (!eventHandlers[event]) { eventHandlers[event] = []; } - eventHandlers[event].push(handler); - bus.on(event, handler); - return nodemon; -}; - -nodemon.once = function (event, handler) { - if (!eventHandlers[event]) { eventHandlers[event] = []; } - eventHandlers[event].push(handler); - bus.once(event, function () { - debug('bus.once(%s)', event); - eventHandlers[event].splice(eventHandlers[event].indexOf(handler), 1); - handler.apply(this, arguments); - }); - return nodemon; -}; - -nodemon.emit = function () { - bus.emit.apply(bus, [].slice.call(arguments)); - return nodemon; -}; - -nodemon.removeAllListeners = function (event) { - // unbind only the `nodemon.on` event handlers - Object.keys(eventHandlers).filter(function (e) { - return event ? e === event : true; - }).forEach(function (event) { - eventHandlers[event].forEach(function (handler) { - bus.removeListener(event, handler); - eventHandlers[event].splice(eventHandlers[event].indexOf(handler), 1); - }); - }); - - return nodemon; -}; - -nodemon.reset = function (done) { - bus.emit('reset', done); -}; - -bus.on('reset', function (done) { - debug('reset'); - nodemon.removeAllListeners(); - monitor.run.kill(true, function () { - utils.reset(); - config.reset(); - config.run = false; - if (done) { - done(); - } - }); -}); - -// expose the full config -nodemon.config = config; - -module.exports = nodemon; - diff --git a/node_modules/nodemon/lib/rules/add.js b/node_modules/nodemon/lib/rules/add.js deleted file mode 100644 index 11f1fd7..0000000 --- a/node_modules/nodemon/lib/rules/add.js +++ /dev/null @@ -1,89 +0,0 @@ -'use strict'; - -var utils = require('../utils'); - -// internal -var reEscComments = /\\#/g; -// note that '^^' is used in place of escaped comments -var reUnescapeComments = /\^\^/g; -var reComments = /#.*$/; -var reEscapeChars = /[.|\-[\]()\\]/g; -var reAsterisk = /\*/g; - -module.exports = add; - -/** - * Converts file patterns or regular expressions to nodemon - * compatible RegExp matching rules. Note: the `rules` argument - * object is modified to include the new rule and new RegExp - * - * ### Example: - * - * var rules = { watch: [], ignore: [] }; - * add(rules, 'watch', '*.js'); - * add(rules, 'ignore', '/public/'); - * add(rules, 'watch', ':(\d)*\.js'); // note: string based regexp - * add(rules, 'watch', /\d*\.js/); - * - * @param {Object} rules containing `watch` and `ignore`. Also updated during - * execution - * @param {String} which must be either "watch" or "ignore" - * @param {String|RegExp} rule the actual rule. - */ -function add(rules, which, rule) { - if (!{ ignore: 1, watch: 1}[which]) { - throw new Error('rules/index.js#add requires "ignore" or "watch" as the ' + - 'first argument'); - } - - if (Array.isArray(rule)) { - rule.forEach(function (rule) { - add(rules, which, rule); - }); - return; - } - - // support the rule being a RegExp, but reformat it to - // the custom :<regexp> format that we're working with. - if (rule instanceof RegExp) { - // rule = ':' + rule.toString().replace(/^\/(.*?)\/$/g, '$1'); - utils.log.error('RegExp format no longer supported, but globs are.'); - return; - } - - // remove comments and trim lines - // this mess of replace methods is escaping "\#" to allow for emacs temp files - - // first up strip comments and remove blank head or tails - rule = (rule || '').replace(reEscComments, '^^') - .replace(reComments, '') - .replace(reUnescapeComments, '#').trim(); - - var regexp = false; - - if (typeof rule === 'string' && rule.substring(0, 1) === ':') { - rule = rule.substring(1); - utils.log.error('RegExp no longer supported: ' + rule); - regexp = true; - } else if (rule.length === 0) { - // blank line (or it was a comment) - return; - } - - if (regexp) { - // rules[which].push(rule); - } else { - // rule = rule.replace(reEscapeChars, '\\$&') - // .replace(reAsterisk, '.*'); - - rules[which].push(rule); - // compile a regexp of all the rules for this ignore or watch - var re = rules[which].map(function (rule) { - return rule.replace(reEscapeChars, '\\$&') - .replace(reAsterisk, '.*'); - }).join('|'); - - // used for the directory matching - rules[which].re = new RegExp(re); - } -} diff --git a/node_modules/nodemon/lib/rules/index.js b/node_modules/nodemon/lib/rules/index.js deleted file mode 100644 index 04aa92f..0000000 --- a/node_modules/nodemon/lib/rules/index.js +++ /dev/null @@ -1,53 +0,0 @@ -'use strict'; -var utils = require('../utils'); -var add = require('./add'); -var parse = require('./parse'); - -// exported -var rules = { ignore: [], watch: [] }; - -/** - * Loads a nodemon config file and populates the ignore - * and watch rules with it's contents, and calls callback - * with the new rules - * - * @param {String} filename - * @param {Function} callback - */ -function load(filename, callback) { - parse(filename, function (err, result) { - if (err) { - // we should have bombed already, but - utils.log.error(err); - callback(err); - } - - if (result.raw) { - result.raw.forEach(add.bind(null, rules, 'ignore')); - } else { - result.ignore.forEach(add.bind(null, rules, 'ignore')); - result.watch.forEach(add.bind(null, rules, 'watch')); - } - - callback(null, rules); - }); -} - -module.exports = { - reset: function () { // just used for testing - rules.ignore.length = rules.watch.length = 0; - delete rules.ignore.re; - delete rules.watch.re; - }, - load: load, - ignore: { - test: add.bind(null, rules, 'ignore'), - add: add.bind(null, rules, 'ignore'), - }, - watch: { - test: add.bind(null, rules, 'watch'), - add: add.bind(null, rules, 'watch'), - }, - add: add.bind(null, rules), - rules: rules, -}; \ No newline at end of file diff --git a/node_modules/nodemon/lib/rules/parse.js b/node_modules/nodemon/lib/rules/parse.js deleted file mode 100644 index 6e1cace..0000000 --- a/node_modules/nodemon/lib/rules/parse.js +++ /dev/null @@ -1,43 +0,0 @@ -'use strict'; -var fs = require('fs'); - -/** - * Parse the nodemon config file, supporting both old style - * plain text config file, and JSON version of the config - * - * @param {String} filename - * @param {Function} callback - */ -function parse(filename, callback) { - var rules = { - ignore: [], - watch: [], - }; - - fs.readFile(filename, 'utf8', function (err, content) { - - if (err) { - return callback(err); - } - - var json = null; - try { - json = JSON.parse(content); - } catch (e) {} - - if (json !== null) { - rules = { - ignore: json.ignore || [], - watch: json.watch || [], - }; - - return callback(null, rules); - } - - // otherwise return the raw file - return callback(null, { raw: content.split(/\n/) }); - }); -} - -module.exports = parse; - diff --git a/node_modules/nodemon/lib/spawn.js b/node_modules/nodemon/lib/spawn.js deleted file mode 100644 index 256734a..0000000 --- a/node_modules/nodemon/lib/spawn.js +++ /dev/null @@ -1,74 +0,0 @@ -const path = require('path'); -const utils = require('./utils'); -const merge = utils.merge; -const bus = utils.bus; -const spawn = require('child_process').spawn; - -module.exports = function spawnCommand(command, config, eventArgs) { - var stdio = ['pipe', 'pipe', 'pipe']; - - if (config.options.stdout) { - stdio = ['pipe', process.stdout, process.stderr]; - } - - const env = merge(process.env, { FILENAME: eventArgs[0] }); - - var sh = 'sh'; - var shFlag = '-c'; - var spawnOptions = { - env: merge(config.options.execOptions.env, env), - stdio: stdio, - }; - - if (!Array.isArray(command)) { - command = [command]; - } - - if (utils.isWindows) { - // if the exec includes a forward slash, reverse it for windows compat - // but *only* apply to the first command, and none of the arguments. - // ref #1251 and #1236 - command = command.map(executable => { - if (executable.indexOf('/') === -1) { - return executable; - } - - return executable.split(' ').map((e, i) => { - if (i === 0) { - return path.normalize(e); - } - return e; - }).join(' '); - }); - // taken from npm's cli: https://git.io/vNFD4 - sh = process.env.comspec || 'cmd'; - shFlag = '/d /s /c'; - spawnOptions.windowsVerbatimArguments = true; - spawnOptions.windowsHide = true; - } - - const args = command.join(' '); - const child = spawn(sh, [shFlag, args], spawnOptions); - - if (config.required) { - var emit = { - stdout: function (data) { - bus.emit('stdout', data); - }, - stderr: function (data) { - bus.emit('stderr', data); - }, - }; - - // now work out what to bind to... - if (config.options.stdout) { - child.on('stdout', emit.stdout).on('stderr', emit.stderr); - } else { - child.stdout.on('data', emit.stdout); - child.stderr.on('data', emit.stderr); - - bus.stdout = child.stdout; - bus.stderr = child.stderr; - } - } -}; diff --git a/node_modules/nodemon/lib/utils/bus.js b/node_modules/nodemon/lib/utils/bus.js deleted file mode 100644 index 4e120c5..0000000 --- a/node_modules/nodemon/lib/utils/bus.js +++ /dev/null @@ -1,44 +0,0 @@ -var events = require('events'); -var debug = require('debug')('nodemon'); -var util = require('util'); - -var Bus = function () { - events.EventEmitter.call(this); -}; - -util.inherits(Bus, events.EventEmitter); - -var bus = new Bus(); - -// /* -var collected = {}; -bus.on('newListener', function (event) { - debug('bus new listener: %s (%s)', event, bus.listeners(event).length); - if (!collected[event]) { - collected[event] = true; - bus.on(event, function () { - debug('bus emit: %s', event); - }); - } -}); - -// */ - -// proxy process messages (if forked) to the bus -process.on('message', function (event) { - debug('process.message(%s)', event); - bus.emit(event); -}); - -var emit = bus.emit; - -// if nodemon was spawned via a fork, allow upstream communication -// via process.send -if (process.send) { - bus.emit = function (event, data) { - process.send({ type: event, data: data }); - emit.apply(bus, arguments); - }; -} - -module.exports = bus; diff --git a/node_modules/nodemon/lib/utils/clone.js b/node_modules/nodemon/lib/utils/clone.js deleted file mode 100644 index 6ba6330..0000000 --- a/node_modules/nodemon/lib/utils/clone.js +++ /dev/null @@ -1,40 +0,0 @@ -module.exports = clone; - -// via http://stackoverflow.com/a/728694/22617 -function clone(obj) { - // Handle the 3 simple types, and null or undefined - if (null === obj || 'object' !== typeof obj) { - return obj; - } - - var copy; - - // Handle Date - if (obj instanceof Date) { - copy = new Date(); - copy.setTime(obj.getTime()); - return copy; - } - - // Handle Array - if (obj instanceof Array) { - copy = []; - for (var i = 0, len = obj.length; i < len; i++) { - copy[i] = clone(obj[i]); - } - return copy; - } - - // Handle Object - if (obj instanceof Object) { - copy = {}; - for (var attr in obj) { - if (obj.hasOwnProperty && obj.hasOwnProperty(attr)) { - copy[attr] = clone(obj[attr]); - } - } - return copy; - } - - throw new Error('Unable to copy obj! Its type isn\'t supported.'); -} \ No newline at end of file diff --git a/node_modules/nodemon/lib/utils/colour.js b/node_modules/nodemon/lib/utils/colour.js deleted file mode 100644 index 8c1b590..0000000 --- a/node_modules/nodemon/lib/utils/colour.js +++ /dev/null @@ -1,26 +0,0 @@ -/** - * Encodes a string in a colour: red, yellow or green - * @param {String} c colour to highlight in - * @param {String} str the string to encode - * @return {String} coloured string for terminal printing - */ -function colour(c, str) { - return (colour[c] || colour.black) + str + colour.black; -} - -function strip(str) { - re.lastIndex = 0; // reset position - return str.replace(re, ''); -} - -colour.red = '\x1B[31m'; -colour.yellow = '\x1B[33m'; -colour.green = '\x1B[32m'; -colour.black = '\x1B[39m'; - -var reStr = Object.keys(colour).map(key => colour[key]).join('|'); -var re = new RegExp(('(' + reStr + ')').replace(/\[/g, '\\['), 'g'); - -colour.strip = strip; - -module.exports = colour; diff --git a/node_modules/nodemon/lib/utils/index.js b/node_modules/nodemon/lib/utils/index.js deleted file mode 100644 index 9265121..0000000 --- a/node_modules/nodemon/lib/utils/index.js +++ /dev/null @@ -1,103 +0,0 @@ -var noop = function () { }; -var path = require('path'); -const semver = require('semver'); -var version = process.versions.node.split('.') || [null, null, null]; - -var utils = (module.exports = { - semver: semver, - satisfies: test => semver.satisfies(process.versions.node, test), - version: { - major: parseInt(version[0] || 0, 10), - minor: parseInt(version[1] || 0, 10), - patch: parseInt(version[2] || 0, 10), - }, - clone: require('./clone'), - merge: require('./merge'), - bus: require('./bus'), - isWindows: process.platform === 'win32', - isMac: process.platform === 'darwin', - isLinux: process.platform === 'linux', - isIBMi: require('os').type() === 'OS400', - isRequired: (function () { - var p = module.parent; - while (p) { - // in electron.js engine it happens - if (!p.filename) { - return true; - } - if (p.filename.indexOf('bin' + path.sep + 'nodemon.js') !== -1) { - return false; - } - p = p.parent; - } - - return true; - })(), - home: process.env.HOME || process.env.HOMEPATH, - quiet: function () { - // nukes the logging - if (!this.debug) { - for (var method in utils.log) { - if (typeof utils.log[method] === 'function') { - utils.log[method] = noop; - } - } - } - }, - reset: function () { - if (!this.debug) { - for (var method in utils.log) { - if (typeof utils.log[method] === 'function') { - delete utils.log[method]; - } - } - } - this.debug = false; - }, - regexpToText: function (t) { - return t - .replace(/\.\*\\./g, '*.') - .replace(/\\{2}/g, '^^') - .replace(/\\/g, '') - .replace(/\^\^/g, '\\'); - }, - stringify: function (exec, args) { - // serializes an executable string and array of arguments into a string - args = args || []; - - return [exec] - .concat( - args.map(function (arg) { - // if an argument contains a space, we want to show it with quotes - // around it to indicate that it is a single argument - if (arg.length > 0 && arg.indexOf(' ') === -1) { - return arg; - } - // this should correctly escape nested quotes - return JSON.stringify(arg); - }) - ) - .join(' ') - .trim(); - }, -}); - -utils.log = require('./log')(utils.isRequired); - -Object.defineProperty(utils, 'debug', { - set: function (value) { - this.log.debug = value; - }, - get: function () { - return this.log.debug; - }, -}); - -Object.defineProperty(utils, 'colours', { - set: function (value) { - this.log.useColours = value; - }, - get: function () { - return this.log.useColours; - }, -}); diff --git a/node_modules/nodemon/lib/utils/log.js b/node_modules/nodemon/lib/utils/log.js deleted file mode 100644 index 6580087..0000000 --- a/node_modules/nodemon/lib/utils/log.js +++ /dev/null @@ -1,82 +0,0 @@ -var colour = require('./colour'); -var bus = require('./bus'); -var required = false; -var useColours = true; - -var coding = { - log: 'black', - info: 'yellow', - status: 'green', - detail: 'yellow', - fail: 'red', - error: 'red', -}; - -function log(type, text) { - var msg = '[nodemon] ' + (text || ''); - - if (useColours) { - msg = colour(coding[type], msg); - } - - // always push the message through our bus, using nextTick - // to help testing and get _out of_ promises. - process.nextTick(() => { - bus.emit('log', { type: type, message: text, colour: msg }); - }); - - // but if we're running on the command line, also echo out - // question: should we actually just consume our own events? - if (!required) { - if (type === 'error') { - console.error(msg); - } else { - console.log(msg || ''); - } - } -} - -var Logger = function (r) { - if (!(this instanceof Logger)) { - return new Logger(r); - } - this.required(r); - return this; -}; - -Object.keys(coding).forEach(function (type) { - Logger.prototype[type] = log.bind(null, type); -}); - -// detail is for messages that are turned on during debug -Logger.prototype.detail = function (msg) { - if (this.debug) { - log('detail', msg); - } -}; - -Logger.prototype.required = function (val) { - required = val; -}; - -Logger.prototype.debug = false; -Logger.prototype._log = function (type, msg) { - if (required) { - bus.emit('log', { type: type, message: msg || '', colour: msg || '' }); - } else if (type === 'error') { - console.error(msg); - } else { - console.log(msg || ''); - } -}; - -Object.defineProperty(Logger.prototype, 'useColours', { - set: function (val) { - useColours = val; - }, - get: function () { - return useColours; - }, -}); - -module.exports = Logger; diff --git a/node_modules/nodemon/lib/utils/merge.js b/node_modules/nodemon/lib/utils/merge.js deleted file mode 100644 index 1f3440b..0000000 --- a/node_modules/nodemon/lib/utils/merge.js +++ /dev/null @@ -1,47 +0,0 @@ -var clone = require('./clone'); - -module.exports = merge; - -function typesMatch(a, b) { - return (typeof a === typeof b) && (Array.isArray(a) === Array.isArray(b)); -} - -/** - * A deep merge of the source based on the target. - * @param {Object} source [description] - * @param {Object} target [description] - * @return {Object} [description] - */ -function merge(source, target, result) { - if (result === undefined) { - result = clone(source); - } - - // merge missing values from the target to the source - Object.getOwnPropertyNames(target).forEach(function (key) { - if (source[key] === undefined) { - result[key] = target[key]; - } - }); - - Object.getOwnPropertyNames(source).forEach(function (key) { - var value = source[key]; - - if (target[key] && typesMatch(value, target[key])) { - // merge empty values - if (value === '') { - result[key] = target[key]; - } - - if (Array.isArray(value)) { - if (value.length === 0 && target[key].length) { - result[key] = target[key].slice(0); - } - } else if (typeof value === 'object') { - result[key] = merge(value, target[key]); - } - } - }); - - return result; -} \ No newline at end of file diff --git a/node_modules/nodemon/lib/version.js b/node_modules/nodemon/lib/version.js deleted file mode 100644 index d0f5104..0000000 --- a/node_modules/nodemon/lib/version.js +++ /dev/null @@ -1,100 +0,0 @@ -module.exports = version; -module.exports.pin = pin; - -var fs = require('fs'); -var path = require('path'); -var exec = require('child_process').exec; -var root = null; - -function pin() { - return version().then(function (v) { - version.pinned = v; - }); -} - -function version(callback) { - // first find the package.json as this will be our root - var promise = findPackage(path.dirname(module.parent.filename)) - .then(function (dir) { - // now try to load the package - var v = require(path.resolve(dir, 'package.json')).version; - - if (v && v !== '0.0.0-development') { - return v; - } - - root = dir; - - // else we're in development, give the commit out - // get the last commit and whether the working dir is dirty - var promises = [ - branch().catch(function () { return 'master'; }), - commit().catch(function () { return '<none>'; }), - dirty().catch(function () { return 0; }), - ]; - - // use the cached result as the export - return Promise.all(promises).then(function (res) { - var branch = res[0]; - var commit = res[1]; - var dirtyCount = parseInt(res[2], 10); - var curr = branch + ': ' + commit; - if (dirtyCount !== 0) { - curr += ' (' + dirtyCount + ' dirty files)'; - } - - return curr; - }); - }).catch(function (error) { - console.log(error.stack); - throw error; - }); - - if (callback) { - promise.then(function (res) { - callback(null, res); - }, callback); - } - - return promise; -} - -function findPackage(dir) { - if (dir === '/') { - return Promise.reject(new Error('package not found')); - } - return new Promise(function (resolve) { - fs.stat(path.resolve(dir, 'package.json'), function (error, exists) { - if (error || !exists) { - return resolve(findPackage(path.resolve(dir, '..'))); - } - - resolve(dir); - }); - }); -} - -function command(cmd) { - return new Promise(function (resolve, reject) { - exec(cmd, { cwd: root }, function (err, stdout, stderr) { - var error = stderr.trim(); - if (error) { - return reject(new Error(error)); - } - resolve(stdout.split('\n').join('')); - }); - }); -} - -function commit() { - return command('git rev-parse HEAD'); -} - -function branch() { - return command('git rev-parse --abbrev-ref HEAD'); -} - -function dirty() { - return command('expr $(git status --porcelain 2>/dev/null| ' + - 'egrep "^(M| M)" | wc -l)'); -} diff --git a/node_modules/nodemon/package.json b/node_modules/nodemon/package.json deleted file mode 100644 index bcf34c0..0000000 --- a/node_modules/nodemon/package.json +++ /dev/null @@ -1,75 +0,0 @@ -{ - "name": "nodemon", - "homepage": "https://nodemon.io", - "author": { - "name": "Remy Sharp", - "url": "https://github.com/remy" - }, - "bin": { - "nodemon": "./bin/nodemon.js" - }, - "engines": { - "node": ">=10" - }, - "repository": { - "type": "git", - "url": "https://github.com/remy/nodemon.git" - }, - "description": "Simple monitor script for use during development of a Node.js app.", - "keywords": [ - "cli", - "monitor", - "monitor", - "development", - "restart", - "autoload", - "reload", - "terminal" - ], - "license": "MIT", - "types": "./index.d.ts", - "main": "./lib/nodemon", - "scripts": { - "commitmsg": "commitlint -e", - "coverage": "istanbul cover _mocha -- --timeout 30000 --ui bdd --reporter list test/**/*.test.js", - "lint": "eslint lib/**/*.js", - "test": "npm run lint && npm run spec", - "spec": "for FILE in test/**/*.test.js; do echo $FILE; TEST=1 mocha --exit --timeout 30000 $FILE; if [ $? -ne 0 ]; then exit 1; fi; sleep 1; done", - "postspec": "npm run clean", - "clean": "rm -rf test/fixtures/test*.js test/fixtures/test*.md", - "web": "node web", - "semantic-release": "semantic-release", - "prepush": "npm run lint", - "killall": "ps auxww | grep node | grep -v grep | awk '{ print $2 }' | xargs kill -9" - }, - "devDependencies": { - "@commitlint/cli": "^11.0.0", - "@commitlint/config-conventional": "^11.0.0", - "async": "1.4.2", - "coffee-script": "~1.7.1", - "eslint": "^7.32.0", - "husky": "^7.0.4", - "mocha": "^2.5.3", - "nyc": "^15.1.0", - "proxyquire": "^1.8.0", - "semantic-release": "^18.0.0", - "should": "~4.0.0" - }, - "dependencies": { - "chokidar": "^3.5.2", - "debug": "^4", - "ignore-by-default": "^1.0.1", - "minimatch": "^3.1.2", - "pstree.remy": "^1.1.8", - "semver": "^7.5.3", - "simple-update-notifier": "^2.0.0", - "supports-color": "^5.5.0", - "touch": "^3.1.0", - "undefsafe": "^2.0.5" - }, - "version": "3.1.9", - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/nodemon" - } -} diff --git a/node_modules/normalize-path/index.js b/node_modules/normalize-path/index.js deleted file mode 100644 index 6fac553..0000000 --- a/node_modules/normalize-path/index.js +++ /dev/null @@ -1,35 +0,0 @@ -/*! - * normalize-path <https://github.com/jonschlinkert/normalize-path> - * - * Copyright (c) 2014-2018, Jon Schlinkert. - * Released under the MIT License. - */ - -module.exports = function(path, stripTrailing) { - if (typeof path !== 'string') { - throw new TypeError('expected path to be a string'); - } - - if (path === '\\' || path === '/') return '/'; - - var len = path.length; - if (len <= 1) return path; - - // ensure that win32 namespaces has two leading slashes, so that the path is - // handled properly by the win32 version of path.parse() after being normalized - // https://msdn.microsoft.com/library/windows/desktop/aa365247(v=vs.85).aspx#namespaces - var prefix = ''; - if (len > 4 && path[3] === '\\') { - var ch = path[2]; - if ((ch === '?' || ch === '.') && path.slice(0, 2) === '\\\\') { - path = path.slice(2); - prefix = '//'; - } - } - - var segs = path.split(/[/\\]+/); - if (stripTrailing !== false && segs[segs.length - 1] === '') { - segs.pop(); - } - return prefix + segs.join('/'); -}; diff --git a/node_modules/normalize-path/package.json b/node_modules/normalize-path/package.json deleted file mode 100644 index ad61098..0000000 --- a/node_modules/normalize-path/package.json +++ /dev/null @@ -1,77 +0,0 @@ -{ - "name": "normalize-path", - "description": "Normalize slashes in a file path to be posix/unix-like forward slashes. Also condenses repeat slashes to a single slash and removes and trailing slashes, unless disabled.", - "version": "3.0.0", - "homepage": "https://github.com/jonschlinkert/normalize-path", - "author": "Jon Schlinkert (https://github.com/jonschlinkert)", - "contributors": [ - "Blaine Bublitz (https://twitter.com/BlaineBublitz)", - "Jon Schlinkert (http://twitter.com/jonschlinkert)" - ], - "repository": "jonschlinkert/normalize-path", - "bugs": { - "url": "https://github.com/jonschlinkert/normalize-path/issues" - }, - "license": "MIT", - "files": [ - "index.js" - ], - "main": "index.js", - "engines": { - "node": ">=0.10.0" - }, - "scripts": { - "test": "mocha" - }, - "devDependencies": { - "gulp-format-md": "^1.0.0", - "minimist": "^1.2.0", - "mocha": "^3.5.3" - }, - "keywords": [ - "absolute", - "backslash", - "delimiter", - "file", - "file-path", - "filepath", - "fix", - "forward", - "fp", - "fs", - "normalize", - "path", - "relative", - "separator", - "slash", - "slashes", - "trailing", - "unix", - "urix" - ], - "verb": { - "toc": false, - "layout": "default", - "tasks": [ - "readme" - ], - "plugins": [ - "gulp-format-md" - ], - "related": { - "description": "Other useful path-related libraries:", - "list": [ - "contains-path", - "is-absolute", - "is-relative", - "parse-filepath", - "path-ends-with", - "path-ends-with", - "unixify" - ] - }, - "lint": { - "reflinks": true - } - } -} diff --git a/node_modules/nth-check/lib/compile.d.ts b/node_modules/nth-check/lib/compile.d.ts deleted file mode 100644 index 63e9be5..0000000 --- a/node_modules/nth-check/lib/compile.d.ts +++ /dev/null @@ -1,55 +0,0 @@ -/** - * Returns a function that checks if an elements index matches the given rule - * highly optimized to return the fastest solution. - * - * @param parsed A tuple [a, b], as returned by `parse`. - * @returns A highly optimized function that returns whether an index matches the nth-check. - * @example - * - * ```js - * const check = nthCheck.compile([2, 3]); - * - * check(0); // `false` - * check(1); // `false` - * check(2); // `true` - * check(3); // `false` - * check(4); // `true` - * check(5); // `false` - * check(6); // `true` - * ``` - */ -export declare function compile(parsed: [a: number, b: number]): (index: number) => boolean; -/** - * Returns a function that produces a monotonously increasing sequence of indices. - * - * If the sequence has an end, the returned function will return `null` after - * the last index in the sequence. - * - * @param parsed A tuple [a, b], as returned by `parse`. - * @returns A function that produces a sequence of indices. - * @example <caption>Always increasing (2n+3)</caption> - * - * ```js - * const gen = nthCheck.generate([2, 3]) - * - * gen() // `1` - * gen() // `3` - * gen() // `5` - * gen() // `8` - * gen() // `11` - * ``` - * - * @example <caption>With end value (-2n+10)</caption> - * - * ```js - * - * const gen = nthCheck.generate([-2, 5]); - * - * gen() // 0 - * gen() // 2 - * gen() // 4 - * gen() // null - * ``` - */ -export declare function generate(parsed: [a: number, b: number]): () => number | null; -//# sourceMappingURL=compile.d.ts.map \ No newline at end of file diff --git a/node_modules/nth-check/lib/compile.d.ts.map b/node_modules/nth-check/lib/compile.d.ts.map deleted file mode 100644 index bb64f76..0000000 --- a/node_modules/nth-check/lib/compile.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"compile.d.ts","sourceRoot":"https://raw.githubusercontent.com/fb55/nth-check/639fd2a4000b69f82350aad8c34cb43f77e483ba/src/","sources":["compile.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,OAAO,CACnB,MAAM,EAAE,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,CAAC,GAC/B,CAAC,KAAK,EAAE,MAAM,KAAK,OAAO,CAgC5B;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,wBAAgB,QAAQ,CAAC,MAAM,EAAE,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,CAAC,GAAG,MAAM,MAAM,GAAG,IAAI,CA+B5E"} \ No newline at end of file diff --git a/node_modules/nth-check/lib/compile.js b/node_modules/nth-check/lib/compile.js deleted file mode 100644 index cef1af4..0000000 --- a/node_modules/nth-check/lib/compile.js +++ /dev/null @@ -1,121 +0,0 @@ -"use strict"; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.generate = exports.compile = void 0; -var boolbase_1 = __importDefault(require("boolbase")); -/** - * Returns a function that checks if an elements index matches the given rule - * highly optimized to return the fastest solution. - * - * @param parsed A tuple [a, b], as returned by `parse`. - * @returns A highly optimized function that returns whether an index matches the nth-check. - * @example - * - * ```js - * const check = nthCheck.compile([2, 3]); - * - * check(0); // `false` - * check(1); // `false` - * check(2); // `true` - * check(3); // `false` - * check(4); // `true` - * check(5); // `false` - * check(6); // `true` - * ``` - */ -function compile(parsed) { - var a = parsed[0]; - // Subtract 1 from `b`, to convert from one- to zero-indexed. - var b = parsed[1] - 1; - /* - * When `b <= 0`, `a * n` won't be lead to any matches for `a < 0`. - * Besides, the specification states that no elements are - * matched when `a` and `b` are 0. - * - * `b < 0` here as we subtracted 1 from `b` above. - */ - if (b < 0 && a <= 0) - return boolbase_1.default.falseFunc; - // When `a` is in the range -1..1, it matches any element (so only `b` is checked). - if (a === -1) - return function (index) { return index <= b; }; - if (a === 0) - return function (index) { return index === b; }; - // When `b <= 0` and `a === 1`, they match any element. - if (a === 1) - return b < 0 ? boolbase_1.default.trueFunc : function (index) { return index >= b; }; - /* - * Otherwise, modulo can be used to check if there is a match. - * - * Modulo doesn't care about the sign, so let's use `a`s absolute value. - */ - var absA = Math.abs(a); - // Get `b mod a`, + a if this is negative. - var bMod = ((b % absA) + absA) % absA; - return a > 1 - ? function (index) { return index >= b && index % absA === bMod; } - : function (index) { return index <= b && index % absA === bMod; }; -} -exports.compile = compile; -/** - * Returns a function that produces a monotonously increasing sequence of indices. - * - * If the sequence has an end, the returned function will return `null` after - * the last index in the sequence. - * - * @param parsed A tuple [a, b], as returned by `parse`. - * @returns A function that produces a sequence of indices. - * @example <caption>Always increasing (2n+3)</caption> - * - * ```js - * const gen = nthCheck.generate([2, 3]) - * - * gen() // `1` - * gen() // `3` - * gen() // `5` - * gen() // `8` - * gen() // `11` - * ``` - * - * @example <caption>With end value (-2n+10)</caption> - * - * ```js - * - * const gen = nthCheck.generate([-2, 5]); - * - * gen() // 0 - * gen() // 2 - * gen() // 4 - * gen() // null - * ``` - */ -function generate(parsed) { - var a = parsed[0]; - // Subtract 1 from `b`, to convert from one- to zero-indexed. - var b = parsed[1] - 1; - var n = 0; - // Make sure to always return an increasing sequence - if (a < 0) { - var aPos_1 = -a; - // Get `b mod a` - var minValue_1 = ((b % aPos_1) + aPos_1) % aPos_1; - return function () { - var val = minValue_1 + aPos_1 * n++; - return val > b ? null : val; - }; - } - if (a === 0) - return b < 0 - ? // There are no result — always return `null` - function () { return null; } - : // Return `b` exactly once - function () { return (n++ === 0 ? b : null); }; - if (b < 0) { - b += a * Math.ceil(-b / a); - } - return function () { return a * n++ + b; }; -} -exports.generate = generate; -//# sourceMappingURL=compile.js.map \ No newline at end of file diff --git a/node_modules/nth-check/lib/compile.js.map b/node_modules/nth-check/lib/compile.js.map deleted file mode 100644 index 06ec5b9..0000000 --- a/node_modules/nth-check/lib/compile.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"compile.js","sourceRoot":"https://raw.githubusercontent.com/fb55/nth-check/639fd2a4000b69f82350aad8c34cb43f77e483ba/src/","sources":["compile.ts"],"names":[],"mappings":";;;;;;AAAA,sDAAgC;AAEhC;;;;;;;;;;;;;;;;;;;GAmBG;AACH,SAAgB,OAAO,CACnB,MAA8B;IAE9B,IAAM,CAAC,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC;IACpB,6DAA6D;IAC7D,IAAM,CAAC,GAAG,MAAM,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;IAExB;;;;;;OAMG;IACH,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC;QAAE,OAAO,kBAAQ,CAAC,SAAS,CAAC;IAE/C,mFAAmF;IACnF,IAAI,CAAC,KAAK,CAAC,CAAC;QAAE,OAAO,UAAC,KAAK,IAAK,OAAA,KAAK,IAAI,CAAC,EAAV,CAAU,CAAC;IAC3C,IAAI,CAAC,KAAK,CAAC;QAAE,OAAO,UAAC,KAAK,IAAK,OAAA,KAAK,KAAK,CAAC,EAAX,CAAW,CAAC;IAC3C,uDAAuD;IACvD,IAAI,CAAC,KAAK,CAAC;QAAE,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,kBAAQ,CAAC,QAAQ,CAAC,CAAC,CAAC,UAAC,KAAK,IAAK,OAAA,KAAK,IAAI,CAAC,EAAV,CAAU,CAAC;IAEtE;;;;OAIG;IACH,IAAM,IAAI,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;IACzB,0CAA0C;IAC1C,IAAM,IAAI,GAAG,CAAC,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AC,IAAI,CAAC,EAAtB,CAAsB,CAAC;IAEvC,IAAI,CAAC,GAAG,CAAC,EAAE;QACP,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;KAC9B;IAED,OAAO,cAAM,OAAA,CAAC,GAAG,CAAC,EAAE,GAAG,CAAC,EAAX,CAAW,CAAC;AAC7B,CAAC;AA/BD,4BA+BC"} \ No newline at end of file diff --git a/node_modules/nth-check/lib/esm/compile.d.ts b/node_modules/nth-check/lib/esm/compile.d.ts deleted file mode 100644 index 63e9be5..0000000 --- a/node_modules/nth-check/lib/esm/compile.d.ts +++ /dev/null @@ -1,55 +0,0 @@ -/** - * Returns a function that checks if an elements index matches the given rule - * highly optimized to return the fastest solution. - * - * @param parsed A tuple [a, b], as returned by `parse`. - * @returns A highly optimized function that returns whether an index matches the nth-check. - * @example - * - * ```js - * const check = nthCheck.compile([2, 3]); - * - * check(0); // `false` - * check(1); // `false` - * check(2); // `true` - * check(3); // `false` - * check(4); // `true` - * check(5); // `false` - * check(6); // `true` - * ``` - */ -export declare function compile(parsed: [a: number, b: number]): (index: number) => boolean; -/** - * Returns a function that produces a monotonously increasing sequence of indices. - * - * If the sequence has an end, the returned function will return `null` after - * the last index in the sequence. - * - * @param parsed A tuple [a, b], as returned by `parse`. - * @returns A function that produces a sequence of indices. - * @example <caption>Always increasing (2n+3)</caption> - * - * ```js - * const gen = nthCheck.generate([2, 3]) - * - * gen() // `1` - * gen() // `3` - * gen() // `5` - * gen() // `8` - * gen() // `11` - * ``` - * - * @example <caption>With end value (-2n+10)</caption> - * - * ```js - * - * const gen = nthCheck.generate([-2, 5]); - * - * gen() // 0 - * gen() // 2 - * gen() // 4 - * gen() // null - * ``` - */ -export declare function generate(parsed: [a: number, b: number]): () => number | null; -//# sourceMappingURL=compile.d.ts.map \ No newline at end of file diff --git a/node_modules/nth-check/lib/esm/compile.d.ts.map b/node_modules/nth-check/lib/esm/compile.d.ts.map deleted file mode 100644 index bb64f76..0000000 --- a/node_modules/nth-check/lib/esm/compile.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"compile.d.ts","sourceRoot":"https://raw.githubusercontent.com/fb55/nth-check/639fd2a4000b69f82350aad8c34cb43f77e483ba/src/","sources":["compile.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,OAAO,CACnB,MAAM,EAAE,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,CAAC,GAC/B,CAAC,KAAK,EAAE,MAAM,KAAK,OAAO,CAgC5B;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,wBAAgB,QAAQ,CAAC,MAAM,EAAE,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,CAAC,GAAG,MAAM,MAAM,GAAG,IAAI,CA+B5E"} \ No newline at end of file diff --git a/node_modules/nth-check/lib/esm/compile.js b/node_modules/nth-check/lib/esm/compile.js deleted file mode 100644 index 317d378..0000000 --- a/node_modules/nth-check/lib/esm/compile.js +++ /dev/null @@ -1,113 +0,0 @@ -import boolbase from "boolbase"; -/** - * Returns a function that checks if an elements index matches the given rule - * highly optimized to return the fastest solution. - * - * @param parsed A tuple [a, b], as returned by `parse`. - * @returns A highly optimized function that returns whether an index matches the nth-check. - * @example - * - * ```js - * const check = nthCheck.compile([2, 3]); - * - * check(0); // `false` - * check(1); // `false` - * check(2); // `true` - * check(3); // `false` - * check(4); // `true` - * check(5); // `false` - * check(6); // `true` - * ``` - */ -export function compile(parsed) { - const a = parsed[0]; - // Subtract 1 from `b`, to convert from one- to zero-indexed. - const b = parsed[1] - 1; - /* - * When `b <= 0`, `a * n` won't be lead to any matches for `a < 0`. - * Besides, the specification states that no elements are - * matched when `a` and `b` are 0. - * - * `b < 0` here as we subtracted 1 from `b` above. - */ - if (b < 0 && a <= 0) - return boolbase.falseFunc; - // When `a` is in the range -1..1, it matches any element (so only `b` is checked). - if (a === -1) - return (index) => index <= b; - if (a === 0) - return (index) => index === b; - // When `b <= 0` and `a === 1`, they match any element. - if (a === 1) - return b < 0 ? boolbase.trueFunc : (index) => index >= b; - /* - * Otherwise, modulo can be used to check if there is a match. - * - * Modulo doesn't care about the sign, so let's use `a`s absolute value. - */ - const absA = Math.abs(a); - // Get `b mod a`, + a if this is negative. - const bMod = ((b % absA) + absA) % absA; - return a > 1 - ? (index) => index >= b && index % absA === bMod - : (index) => index <= b && index % absA === bMod; -} -/** - * Returns a function that produces a monotonously increasing sequence of indices. - * - * If the sequence has an end, the returned function will return `null` after - * the last index in the sequence. - * - * @param parsed A tuple [a, b], as returned by `parse`. - * @returns A function that produces a sequence of indices. - * @example <caption>Always increasing (2n+3)</caption> - * - * ```js - * const gen = nthCheck.generate([2, 3]) - * - * gen() // `1` - * gen() // `3` - * gen() // `5` - * gen() // `8` - * gen() // `11` - * ``` - * - * @example <caption>With end value (-2n+10)</caption> - * - * ```js - * - * const gen = nthCheck.generate([-2, 5]); - * - * gen() // 0 - * gen() // 2 - * gen() // 4 - * gen() // null - * ``` - */ -export function generate(parsed) { - const a = parsed[0]; - // Subtract 1 from `b`, to convert from one- to zero-indexed. - let b = parsed[1] - 1; - let n = 0; - // Make sure to always return an increasing sequence - if (a < 0) { - const aPos = -a; - // Get `b mod a` - const minValue = ((b % aPos) + aPos) % aPos; - return () => { - const val = minValue + aPos * n++; - return val > b ? null : val; - }; - } - if (a === 0) - return b < 0 - ? // There are no result — always return `null` - () => null - : // Return `b` exactly once - () => (n++ === 0 ? b : null); - if (b < 0) { - b += a * Math.ceil(-b / a); - } - return () => a * n++ + b; -} -//# sourceMappingURL=compile.js.map \ No newline at end of file diff --git a/node_modules/nth-check/lib/esm/compile.js.map b/node_modules/nth-check/lib/esm/compile.js.map deleted file mode 100644 index 8eccbba..0000000 --- a/node_modules/nth-check/lib/esm/compile.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"compile.js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/nth-check/lib/esm/index.d.ts b/node_modules/nth-check/lib/esm/index.d.ts deleted file mode 100644 index 2cddd39..0000000 --- a/node_modules/nth-check/lib/esm/index.d.ts +++ /dev/null @@ -1,59 +0,0 @@ -import { parse } from "./parse.js"; -import { compile, generate } from "./compile.js"; -export { parse, compile, generate }; -/** - * Parses and compiles a formula to a highly optimized function. - * Combination of {@link parse} and {@link compile}. - * - * If the formula doesn't match any elements, - * it returns [`boolbase`](https://github.com/fb55/boolbase)'s `falseFunc`. - * Otherwise, a function accepting an _index_ is returned, which returns - * whether or not the passed _index_ matches the formula. - * - * Note: The nth-rule starts counting at `1`, the returned function at `0`. - * - * @param formula The formula to compile. - * @example - * const check = nthCheck("2n+3"); - * - * check(0); // `false` - * check(1); // `false` - * check(2); // `true` - * check(3); // `false` - * check(4); // `true` - * check(5); // `false` - * check(6); // `true` - */ -export default function nthCheck(formula: string): (index: number) => boolean; -/** - * Parses and compiles a formula to a generator that produces a sequence of indices. - * Combination of {@link parse} and {@link generate}. - * - * @param formula The formula to compile. - * @returns A function that produces a sequence of indices. - * @example <caption>Always increasing</caption> - * - * ```js - * const gen = nthCheck.sequence('2n+3') - * - * gen() // `1` - * gen() // `3` - * gen() // `5` - * gen() // `8` - * gen() // `11` - * ``` - * - * @example <caption>With end value</caption> - * - * ```js - * - * const gen = nthCheck.sequence('-2n+5'); - * - * gen() // 0 - * gen() // 2 - * gen() // 4 - * gen() // null - * ``` - */ -export declare function sequence(formula: string): () => number | null; -//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/nth-check/lib/esm/index.d.ts.map b/node_modules/nth-check/lib/esm/index.d.ts.map deleted file mode 100644 index 17f9cdb..0000000 --- a/node_modules/nth-check/lib/esm/index.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"https://raw.githubusercontent.com/fb55/nth-check/639fd2a4000b69f82350aad8c34cb43f77e483ba/src/","sources":["index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AACnC,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAEjD,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,CAAC;AAEpC;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,MAAM,CAAC,OAAO,UAAU,QAAQ,CAAC,OAAO,EAAE,MAAM,GAAG,CAAC,KAAK,EAAE,MAAM,KAAK,OAAO,CAE5E;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,wBAAgB,QAAQ,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,MAAM,GAAG,IAAI,CAE7D"} \ No newline at end of file diff --git a/node_modules/nth-check/lib/esm/index.js b/node_modules/nth-check/lib/esm/index.js deleted file mode 100644 index ae0a6f8..0000000 --- a/node_modules/nth-check/lib/esm/index.js +++ /dev/null @@ -1,63 +0,0 @@ -import { parse } from "./parse.js"; -import { compile, generate } from "./compile.js"; -export { parse, compile, generate }; -/** - * Parses and compiles a formula to a highly optimized function. - * Combination of {@link parse} and {@link compile}. - * - * If the formula doesn't match any elements, - * it returns [`boolbase`](https://github.com/fb55/boolbase)'s `falseFunc`. - * Otherwise, a function accepting an _index_ is returned, which returns - * whether or not the passed _index_ matches the formula. - * - * Note: The nth-rule starts counting at `1`, the returned function at `0`. - * - * @param formula The formula to compile. - * @example - * const check = nthCheck("2n+3"); - * - * check(0); // `false` - * check(1); // `false` - * check(2); // `true` - * check(3); // `false` - * check(4); // `true` - * check(5); // `false` - * check(6); // `true` - */ -export default function nthCheck(formula) { - return compile(parse(formula)); -} -/** - * Parses and compiles a formula to a generator that produces a sequence of indices. - * Combination of {@link parse} and {@link generate}. - * - * @param formula The formula to compile. - * @returns A function that produces a sequence of indices. - * @example <caption>Always increasing</caption> - * - * ```js - * const gen = nthCheck.sequence('2n+3') - * - * gen() // `1` - * gen() // `3` - * gen() // `5` - * gen() // `8` - * gen() // `11` - * ``` - * - * @example <caption>With end value</caption> - * - * ```js - * - * const gen = nthCheck.sequence('-2n+5'); - * - * gen() // 0 - * gen() // 2 - * gen() // 4 - * gen() // null - * ``` - */ -export function sequence(formula) { - return generate(parse(formula)); -} -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/nth-check/lib/esm/index.js.map b/node_modules/nth-check/lib/esm/index.js.map deleted file mode 100644 index f0b6906..0000000 --- a/node_modules/nth-check/lib/esm/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sourceRoot":"https://raw.githubusercontent.com/fb55/nth-check/639fd2a4000b69f82350aad8c34cb43f77e483ba/src/","sources":["index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AACnC,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAEjD,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,CAAC;AAEpC;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,MAAM,CAAC,OAAO,UAAU,QAAQ,CAAC,OAAe;IAC5C,OAAO,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;AACnC,CAAC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,MAAM,UAAU,QAAQ,CAAC,OAAe;IACpC,OAAO,QAAQ,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;AACpC,CAAC"} \ No newline at end of file diff --git a/node_modules/nth-check/lib/esm/package.json b/node_modules/nth-check/lib/esm/package.json deleted file mode 100644 index 089153b..0000000 --- a/node_modules/nth-check/lib/esm/package.json +++ /dev/null @@ -1 +0,0 @@ -{"type":"module"} diff --git a/node_modules/nth-check/lib/esm/parse.d.ts b/node_modules/nth-check/lib/esm/parse.d.ts deleted file mode 100644 index b4f817b..0000000 --- a/node_modules/nth-check/lib/esm/parse.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -/** - * Parses an expression. - * - * @throws An `Error` if parsing fails. - * @returns An array containing the integer step size and the integer offset of the nth rule. - * @example nthCheck.parse("2n+3"); // returns [2, 3] - */ -export declare function parse(formula: string): [a: number, b: number]; -//# sourceMappingURL=parse.d.ts.map \ No newline at end of file diff --git a/node_modules/nth-check/lib/esm/parse.d.ts.map b/node_modules/nth-check/lib/esm/parse.d.ts.map deleted file mode 100644 index 8cd4788..0000000 --- a/node_modules/nth-check/lib/esm/parse.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"parse.d.ts","sourceRoot":"https://raw.githubusercontent.com/fb55/nth-check/639fd2a4000b69f82350aad8c34cb43f77e483ba/src/","sources":["parse.ts"],"names":[],"mappings":"AAOA;;;;;;GAMG;AACH,wBAAgB,KAAK,CAAC,OAAO,EAAE,MAAM,GAAG,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,CAAC,CA6E7D"} \ No newline at end of file diff --git a/node_modules/nth-check/lib/esm/parse.js b/node_modules/nth-check/lib/esm/parse.js deleted file mode 100644 index 96d1d48..0000000 --- a/node_modules/nth-check/lib/esm/parse.js +++ /dev/null @@ -1,73 +0,0 @@ -// Following http://www.w3.org/TR/css3-selectors/#nth-child-pseudo -// Whitespace as per https://www.w3.org/TR/selectors-3/#lex is " \t\r\n\f" -const whitespace = new Set([9, 10, 12, 13, 32]); -const ZERO = "0".charCodeAt(0); -const NINE = "9".charCodeAt(0); -/** - * Parses an expression. - * - * @throws An `Error` if parsing fails. - * @returns An array containing the integer step size and the integer offset of the nth rule. - * @example nthCheck.parse("2n+3"); // returns [2, 3] - */ -export function parse(formula) { - formula = formula.trim().toLowerCase(); - if (formula === "even") { - return [2, 0]; - } - else if (formula === "odd") { - return [2, 1]; - } - // Parse [ ['-'|'+']? INTEGER? {N} [ S* ['-'|'+'] S* INTEGER ]? - let idx = 0; - let a = 0; - let sign = readSign(); - let number = readNumber(); - if (idx < formula.length && formula.charAt(idx) === "n") { - idx++; - a = sign * (number !== null && number !== void 0 ? number : 1); - skipWhitespace(); - if (idx < formula.length) { - sign = readSign(); - skipWhitespace(); - number = readNumber(); - } - else { - sign = number = 0; - } - } - // Throw if there is anything else - if (number === null || idx < formula.length) { - throw new Error(`n-th rule couldn't be parsed ('${formula}')`); - } - return [a, sign * number]; - function readSign() { - if (formula.charAt(idx) === "-") { - idx++; - return -1; - } - if (formula.charAt(idx) === "+") { - idx++; - } - return 1; - } - function readNumber() { - const start = idx; - let value = 0; - while (idx < formula.length && - formula.charCodeAt(idx) >= ZERO && - formula.charCodeAt(idx) <= NINE) { - value = value * 10 + (formula.charCodeAt(idx) - ZERO); - idx++; - } - // Return `null` if we didn't read anything. - return idx === start ? null : value; - } - function skipWhitespace() { - while (idx < formula.length && - whitespace.has(formula.charCodeAt(idx))) { - idx++; - } - } -} -//# sourceMappingURL=parse.js.map \ No newline at end of file diff --git a/node_modules/nth-check/lib/esm/parse.js.map b/node_modules/nth-check/lib/esm/parse.js.map deleted file mode 100644 index 33b6e33..0000000 --- a/node_modules/nth-check/lib/esm/parse.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"parse.js","sourceRoot":"https://raw.githubusercontent.com/fb55/nth-check/639fd2a4000b69f82350aad8c34cb43f77e483ba/src/","sources":["parse.ts"],"names":[],"mappings":"AAAA,kEAAkE;AAElE,0EAA0E;AAC1E,MAAM,UAAU,GAAG,IAAI,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,CAAC,CAAC;AAChD,MAAM,IAAI,GAAG,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;AAC/B,MAAM,IAAI,GAAG,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;AAE/B;;;;;;GAMG;AACH,MAAM,UAAU,KAAK,CAAC,OAAe;IACjC,OAAO,GAAG,OAAO,CAAC,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC;IAE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B,GAAG,EAAE,CAAC;SACT;QAED,OAAO,CAAC,CAAC;IACb,CAAC;IAED,SAAS,UAAU;QACf,MAAM,KAAK,GAAG,GAAG,CAAC;QAClB,IAAI,KAAK,GAAG,CAAC,CAAC;QAEd,OACI,GAAG,GAAG,OAAO,CAAC,MAAM;YACpB,OAAO,CAAC,UAAU,CAAC,GAAG,CAAC,IAAI,IAAI;YAC/B,OAAO,CAAC,UAAU,CAAC,GAAG,CAAC,IAAI,IAAI,EACjC;YACE,KAAK,GAAG,KAAK,GAAG,EAAE,GAAG,CAAC,OAAO,CAAC,UAAU,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC,CAAC;YACtD,GAAG,EAAE,CAAC;SACT;QAED,4CAA4C;QAC5C,OAAO,GAAG,KAAK,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC;IACxC,CAAC;IAED,SAAS,cAAc;QACnB,OACI,GAAG,GAAG,OAAO,CAAC,MAAM;YACpB,UAAU,CAAC,GAAG,CAAC,OAAO,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,EACzC;YACE,GAAG,EAAE,CAAC;SACT;IACL,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/nth-check/lib/index.d.ts b/node_modules/nth-check/lib/index.d.ts deleted file mode 100644 index 2cddd39..0000000 --- a/node_modules/nth-check/lib/index.d.ts +++ /dev/null @@ -1,59 +0,0 @@ -import { parse } from "./parse.js"; -import { compile, generate } from "./compile.js"; -export { parse, compile, generate }; -/** - * Parses and compiles a formula to a highly optimized function. - * Combination of {@link parse} and {@link compile}. - * - * If the formula doesn't match any elements, - * it returns [`boolbase`](https://github.com/fb55/boolbase)'s `falseFunc`. - * Otherwise, a function accepting an _index_ is returned, which returns - * whether or not the passed _index_ matches the formula. - * - * Note: The nth-rule starts counting at `1`, the returned function at `0`. - * - * @param formula The formula to compile. - * @example - * const check = nthCheck("2n+3"); - * - * check(0); // `false` - * check(1); // `false` - * check(2); // `true` - * check(3); // `false` - * check(4); // `true` - * check(5); // `false` - * check(6); // `true` - */ -export default function nthCheck(formula: string): (index: number) => boolean; -/** - * Parses and compiles a formula to a generator that produces a sequence of indices. - * Combination of {@link parse} and {@link generate}. - * - * @param formula The formula to compile. - * @returns A function that produces a sequence of indices. - * @example <caption>Always increasing</caption> - * - * ```js - * const gen = nthCheck.sequence('2n+3') - * - * gen() // `1` - * gen() // `3` - * gen() // `5` - * gen() // `8` - * gen() // `11` - * ``` - * - * @example <caption>With end value</caption> - * - * ```js - * - * const gen = nthCheck.sequence('-2n+5'); - * - * gen() // 0 - * gen() // 2 - * gen() // 4 - * gen() // null - * ``` - */ -export declare function sequence(formula: string): () => number | null; -//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/nth-check/lib/index.d.ts.map b/node_modules/nth-check/lib/index.d.ts.map deleted file mode 100644 index 17f9cdb..0000000 --- a/node_modules/nth-check/lib/index.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"https://raw.githubusercontent.com/fb55/nth-check/639fd2a4000b69f82350aad8c34cb43f77e483ba/src/","sources":["index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AACnC,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAEjD,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,CAAC;AAEpC;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,MAAM,CAAC,OAAO,UAAU,QAAQ,CAAC,OAAO,EAAE,MAAM,GAAG,CAAC,KAAK,EAAE,MAAM,KAAK,OAAO,CAE5E;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,wBAAgB,QAAQ,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,MAAM,GAAG,IAAI,CAE7D"} \ No newline at end of file diff --git a/node_modules/nth-check/lib/index.js b/node_modules/nth-check/lib/index.js deleted file mode 100644 index 30a7e29..0000000 --- a/node_modules/nth-check/lib/index.js +++ /dev/null @@ -1,70 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.sequence = exports.generate = exports.compile = exports.parse = void 0; -var parse_js_1 = require("./parse.js"); -Object.defineProperty(exports, "parse", { enumerable: true, get: function () { return parse_js_1.parse; } }); -var compile_js_1 = require("./compile.js"); -Object.defineProperty(exports, "compile", { enumerable: true, get: function () { return compile_js_1.compile; } }); -Object.defineProperty(exports, "generate", { enumerable: true, get: function () { return compile_js_1.generate; } }); -/** - * Parses and compiles a formula to a highly optimized function. - * Combination of {@link parse} and {@link compile}. - * - * If the formula doesn't match any elements, - * it returns [`boolbase`](https://github.com/fb55/boolbase)'s `falseFunc`. - * Otherwise, a function accepting an _index_ is returned, which returns - * whether or not the passed _index_ matches the formula. - * - * Note: The nth-rule starts counting at `1`, the returned function at `0`. - * - * @param formula The formula to compile. - * @example - * const check = nthCheck("2n+3"); - * - * check(0); // `false` - * check(1); // `false` - * check(2); // `true` - * check(3); // `false` - * check(4); // `true` - * check(5); // `false` - * check(6); // `true` - */ -function nthCheck(formula) { - return (0, compile_js_1.compile)((0, parse_js_1.parse)(formula)); -} -exports.default = nthCheck; -/** - * Parses and compiles a formula to a generator that produces a sequence of indices. - * Combination of {@link parse} and {@link generate}. - * - * @param formula The formula to compile. - * @returns A function that produces a sequence of indices. - * @example <caption>Always increasing</caption> - * - * ```js - * const gen = nthCheck.sequence('2n+3') - * - * gen() // `1` - * gen() // `3` - * gen() // `5` - * gen() // `8` - * gen() // `11` - * ``` - * - * @example <caption>With end value</caption> - * - * ```js - * - * const gen = nthCheck.sequence('-2n+5'); - * - * gen() // 0 - * gen() // 2 - * gen() // 4 - * gen() // null - * ``` - */ -function sequence(formula) { - return (0, compile_js_1.generate)((0, parse_js_1.parse)(formula)); -} -exports.sequence = sequence; -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/nth-check/lib/index.js.map b/node_modules/nth-check/lib/index.js.map deleted file mode 100644 index 78a1bc5..0000000 --- a/node_modules/nth-check/lib/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sourceRoot":"https://raw.githubusercontent.com/fb55/nth-check/639fd2a4000b69f82350aad8c34cb43f77e483ba/src/","sources":["index.ts"],"names":[],"mappings":";;;AAAA,uCAAmC;AAG1B,sFAHA,gBAAK,OAGA;AAFd,2CAAiD;AAEjC,wFAFP,oBAAO,OAEO;AAAE,yFAFP,qBAAQ,OAEO;AAEjC;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,SAAwB,QAAQ,CAAC,OAAe;IAC5C,OAAO,IAAA,oBAAO,EAAC,IAAA,gBAAK,EAAC,OAAO,CAAC,CAAC,CAAC;AACnC,CAAC;AAFD,2BAEC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,SAAgB,QAAQ,CAAC,OAAe;IACpC,OAAO,IAAA,qBAAQ,EAAC,IAAA,gBAAK,EAAC,OAAO,CAAC,CAAC,CAAC;AACpC,CAAC;AAFD,4BAEC"} \ No newline at end of file diff --git a/node_modules/nth-check/lib/parse.d.ts b/node_modules/nth-check/lib/parse.d.ts deleted file mode 100644 index b4f817b..0000000 --- a/node_modules/nth-check/lib/parse.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -/** - * Parses an expression. - * - * @throws An `Error` if parsing fails. - * @returns An array containing the integer step size and the integer offset of the nth rule. - * @example nthCheck.parse("2n+3"); // returns [2, 3] - */ -export declare function parse(formula: string): [a: number, b: number]; -//# sourceMappingURL=parse.d.ts.map \ No newline at end of file diff --git a/node_modules/nth-check/lib/parse.d.ts.map b/node_modules/nth-check/lib/parse.d.ts.map deleted file mode 100644 index 8cd4788..0000000 --- a/node_modules/nth-check/lib/parse.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"parse.d.ts","sourceRoot":"https://raw.githubusercontent.com/fb55/nth-check/639fd2a4000b69f82350aad8c34cb43f77e483ba/src/","sources":["parse.ts"],"names":[],"mappings":"AAOA;;;;;;GAMG;AACH,wBAAgB,KAAK,CAAC,OAAO,EAAE,MAAM,GAAG,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,CAAC,CA6E7D"} \ No newline at end of file diff --git a/node_modules/nth-check/lib/parse.js b/node_modules/nth-check/lib/parse.js deleted file mode 100644 index 904244c..0000000 --- a/node_modules/nth-check/lib/parse.js +++ /dev/null @@ -1,77 +0,0 @@ -"use strict"; -// Following http://www.w3.org/TR/css3-selectors/#nth-child-pseudo -Object.defineProperty(exports, "__esModule", { value: true }); -exports.parse = void 0; -// Whitespace as per https://www.w3.org/TR/selectors-3/#lex is " \t\r\n\f" -var whitespace = new Set([9, 10, 12, 13, 32]); -var ZERO = "0".charCodeAt(0); -var NINE = "9".charCodeAt(0); -/** - * Parses an expression. - * - * @throws An `Error` if parsing fails. - * @returns An array containing the integer step size and the integer offset of the nth rule. - * @example nthCheck.parse("2n+3"); // returns [2, 3] - */ -function parse(formula) { - formula = formula.trim().toLowerCase(); - if (formula === "even") { - return [2, 0]; - } - else if (formula === "odd") { - return [2, 1]; - } - // Parse [ ['-'|'+']? INTEGER? {N} [ S* ['-'|'+'] S* INTEGER ]? - var idx = 0; - var a = 0; - var sign = readSign(); - var number = readNumber(); - if (idx < formula.length && formula.charAt(idx) === "n") { - idx++; - a = sign * (number !== null && number !== void 0 ? number : 1); - skipWhitespace(); - if (idx < formula.length) { - sign = readSign(); - skipWhitespace(); - number = readNumber(); - } - else { - sign = number = 0; - } - } - // Throw if there is anything else - if (number === null || idx < formula.length) { - throw new Error("n-th rule couldn't be parsed ('".concat(formula, "')")); - } - return [a, sign * number]; - function readSign() { - if (formula.charAt(idx) === "-") { - idx++; - return -1; - } - if (formula.charAt(idx) === "+") { - idx++; - } - return 1; - } - function readNumber() { - var start = idx; - var value = 0; - while (idx < formula.length && - formula.charCodeAt(idx) >= ZERO && - formula.charCodeAt(idx) <= NINE) { - value = value * 10 + (formula.charCodeAt(idx) - ZERO); - idx++; - } - // Return `null` if we didn't read anything. - return idx === start ? null : value; - } - function skipWhitespace() { - while (idx < formula.length && - whitespace.has(formula.charCodeAt(idx))) { - idx++; - } - } -} -exports.parse = parse; -//# sourceMappingURL=parse.js.map \ No newline at end of file diff --git a/node_modules/nth-check/lib/parse.js.map b/node_modules/nth-check/lib/parse.js.map deleted file mode 100644 index c326b3d..0000000 --- a/node_modules/nth-check/lib/parse.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"parse.js","sourceRoot":"https://raw.githubusercontent.com/fb55/nth-check/639fd2a4000b69f82350aad8c34cb43f77e483ba/src/","sources":["parse.ts"],"names":[],"mappings":";AAAA,kEAAkE;;;AAElE,0EAA0E;AAC1E,IAAM,UAAU,GAAG,IAAI,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,CAAC,CAAC;AAChD,IAAM,IAAI,GAAG,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;AAC/B,IAAM,IAAI,GAAG,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;AAE/B;;;;;;GAMG;AACH,SAAgB,KAAK,CAAC,OAAe;IACjC,OAAO,GAAG,OAAO,CAAC,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC;IAEvC,IAAI,OAAO,KAAK,MAAM,EAAE;QACpB,OAAO,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;KACjB;SAAM,IAAI,OAAO,KAAK,KAAK,EAAE;QAC1B,OAAO,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;KACjB;IAED,+DAA+D;IAE/D,IAAI,GAAG,GAAG,CAAC,CAAC;IAEZ,IAAI,CAAC,GAAG,CAAC,CAAC;IACV,IAAI,IAAI,GAAG,QAAQ,EAAE,CAAC;IACtB,IAAI,MAAM,GAAG,UAAU,EAAE,CAAC;IAE1B,IAAI,GA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,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC,CAAC;YACtD,GAAG,EAAE,CAAC;SACT;QAED,4CAA4C;QAC5C,OAAO,GAAG,KAAK,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC;IACxC,CAAC;IAED,SAAS,cAAc;QACnB,OACI,GAAG,GAAG,OAAO,CAAC,MAAM;YACpB,UAAU,CAAC,GAAG,CAAC,OAAO,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,EACzC;YACE,GAAG,EAAE,CAAC;SACT;IACL,CAAC;AACL,CAAC;AA7ED,sBA6EC"} \ No newline at end of file diff --git a/node_modules/nth-check/package.json b/node_modules/nth-check/package.json deleted file mode 100644 index 45ebe83..0000000 --- a/node_modules/nth-check/package.json +++ /dev/null @@ -1,78 +0,0 @@ -{ - "name": "nth-check", - "version": "2.1.1", - "description": "Parses and compiles CSS nth-checks to highly optimized functions.", - "author": "Felix Boehm <me@feedic.com>", - "license": "BSD-2-Clause", - "sideEffects": false, - "funding": { - "url": "https://github.com/fb55/nth-check?sponsor=1" - }, - "directories": { - "lib": "lib/" - }, - "main": "lib/index.js", - "types": "lib/index.d.ts", - "module": "lib/esm/index.js", - "exports": { - "require": "./lib/index.js", - "import": "./lib/esm/index.js" - }, - "files": [ - "lib/**/*" - ], - "scripts": { - "test": "npm run test:jest && npm run lint", - "test:jest": "jest", - "lint": "npm run lint:es && npm run lint:prettier", - "lint:es": "eslint .", - "lint:prettier": "npm run prettier -- --check", - "format": "npm run format:es && npm run format:prettier", - "format:es": "npm run lint:es -- --fix", - "format:prettier": "npm run prettier -- --write", - "prettier": "prettier '**/*.{ts,md,json,yml}'", - "build": "npm run build:cjs && npm run build:esm", - "build:cjs": "tsc --sourceRoot https://raw.githubusercontent.com/fb55/nth-check/$(git rev-parse HEAD)/src/", - "build:esm": "npm run build:cjs -- --module esnext --target es2019 --outDir lib/esm && echo '{\"type\":\"module\"}' > lib/esm/package.json", - "prepare": "npm run build" - }, - "repository": { - "type": "git", - "url": "https://github.com/fb55/nth-check" - }, - "keywords": [ - "nth-child", - "nth", - "css" - ], - "bugs": { - "url": "https://github.com/fb55/nth-check/issues" - }, - "homepage": "https://github.com/fb55/nth-check", - "dependencies": { - "boolbase": "^1.0.0" - }, - "devDependencies": { - "@types/boolbase": "^1.0.1", - "@types/jest": "^27.5.0", - "@types/node": "^17.0.35", - "@typescript-eslint/eslint-plugin": "^5.25.0", - "@typescript-eslint/parser": "^5.25.0", - "eslint": "^8.15.0", - "eslint-config-prettier": "^8.5.0", - "jest": "^27.5.1", - "prettier": "^2.6.2", - "ts-jest": "^27.1.4", - "typescript": "^4.6.4" - }, - "jest": { - "preset": "ts-jest", - "testEnvironment": "node", - "moduleNameMapper": { - "^(.*)\\.js$": "$1" - } - }, - "prettier": { - "tabWidth": 4 - } -} diff --git a/node_modules/once/once.js b/node_modules/once/once.js deleted file mode 100644 index 2354067..0000000 --- a/node_modules/once/once.js +++ /dev/null @@ -1,42 +0,0 @@ -var wrappy = require('wrappy') -module.exports = wrappy(once) -module.exports.strict = wrappy(onceStrict) - -once.proto = once(function () { - Object.defineProperty(Function.prototype, 'once', { - value: function () { - return once(this) - }, - configurable: true - }) - - Object.defineProperty(Function.prototype, 'onceStrict', { - value: function () { - return onceStrict(this) - }, - configurable: true - }) -}) - -function once (fn) { - var f = function () { - if (f.called) return f.value - f.called = true - return f.value = fn.apply(this, arguments) - } - f.called = false - return f -} - -function onceStrict (fn) { - var f = function () { - if (f.called) - throw new Error(f.onceError) - f.called = true - return f.value = fn.apply(this, arguments) - } - var name = fn.name || 'Function wrapped with `once`' - f.onceError = name + " shouldn't be called more than once" - f.called = false - return f -} diff --git a/node_modules/once/package.json b/node_modules/once/package.json deleted file mode 100644 index 16815b2..0000000 --- a/node_modules/once/package.json +++ /dev/null @@ -1,33 +0,0 @@ -{ - "name": "once", - "version": "1.4.0", - "description": "Run a function exactly one time", - "main": "once.js", - "directories": { - "test": "test" - }, - "dependencies": { - "wrappy": "1" - }, - "devDependencies": { - "tap": "^7.0.1" - }, - "scripts": { - "test": "tap test/*.js" - }, - "files": [ - "once.js" - ], - "repository": { - "type": "git", - "url": "git://github.com/isaacs/once" - }, - "keywords": [ - "once", - "function", - "one", - "single" - ], - "author": "Isaac Z. Schlueter <i@izs.me> (http://blog.izs.me/)", - "license": "ISC" -} diff --git a/node_modules/parse5-htmlparser2-tree-adapter/dist/cjs/index.d.ts b/node_modules/parse5-htmlparser2-tree-adapter/dist/cjs/index.d.ts deleted file mode 100644 index 47e1f66..0000000 --- a/node_modules/parse5-htmlparser2-tree-adapter/dist/cjs/index.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { type TreeAdapterTypeMap, type TreeAdapter } from 'parse5'; -import { type AnyNode, type ParentNode, type ChildNode, Element, Document, ProcessingInstruction, Comment, Text } from 'domhandler'; -export type Htmlparser2TreeAdapterMap = TreeAdapterTypeMap<AnyNode, ParentNode, ChildNode, Document, Document, Element, Comment, Text, Element, ProcessingInstruction>; -/** @internal */ -export declare function serializeDoctypeContent(name: string, publicId: string, systemId: string): string; -export declare const adapter: TreeAdapter<Htmlparser2TreeAdapterMap>; diff --git a/node_modules/parse5-htmlparser2-tree-adapter/dist/cjs/index.js b/node_modules/parse5-htmlparser2-tree-adapter/dist/cjs/index.js deleted file mode 100644 index 386066b..0000000 --- a/node_modules/parse5-htmlparser2-tree-adapter/dist/cjs/index.js +++ /dev/null @@ -1,214 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.adapter = void 0; -exports.serializeDoctypeContent = serializeDoctypeContent; -const parse5_1 = require("parse5"); -const domhandler_1 = require("domhandler"); -function enquoteDoctypeId(id) { - const quote = id.includes('"') ? "'" : '"'; - return quote + id + quote; -} -/** @internal */ -function serializeDoctypeContent(name, publicId, systemId) { - let str = '!DOCTYPE '; - if (name) { - str += name; - } - if (publicId) { - str += ` PUBLIC ${enquoteDoctypeId(publicId)}`; - } - else if (systemId) { - str += ' SYSTEM'; - } - if (systemId) { - str += ` ${enquoteDoctypeId(systemId)}`; - } - return str; -} -exports.adapter = { - // Re-exports from domhandler - isCommentNode: domhandler_1.isComment, - isElementNode: domhandler_1.isTag, - isTextNode: domhandler_1.isText, - //Node construction - createDocument() { - const node = new domhandler_1.Document([]); - node['x-mode'] = parse5_1.html.DOCUMENT_MODE.NO_QUIRKS; - return node; - }, - createDocumentFragment() { - return new domhandler_1.Document([]); - }, - createElement(tagName, namespaceURI, attrs) { - const attribs = Object.create(null); - const attribsNamespace = Object.create(null); - const attribsPrefix = Object.create(null); - for (let i = 0; i < attrs.length; i++) { - const attrName = attrs[i].name; - attribs[attrName] = attrs[i].value; - attribsNamespace[attrName] = attrs[i].namespace; - attribsPrefix[attrName] = attrs[i].prefix; - } - const node = new domhandler_1.Element(tagName, attribs, []); - node.namespace = namespaceURI; - node['x-attribsNamespace'] = attribsNamespace; - node['x-attribsPrefix'] = attribsPrefix; - return node; - }, - createCommentNode(data) { - return new domhandler_1.Comment(data); - }, - createTextNode(value) { - return new domhandler_1.Text(value); - }, - //Tree mutation - appendChild(parentNode, newNode) { - const prev = parentNode.children[parentNode.children.length - 1]; - if (prev) { - prev.next = newNode; - newNode.prev = prev; - } - parentNode.children.push(newNode); - newNode.parent = parentNode; - }, - insertBefore(parentNode, newNode, referenceNode) { - const insertionIdx = parentNode.children.indexOf(referenceNode); - const { prev } = referenceNode; - if (prev) { - prev.next = newNode; - newNode.prev = prev; - } - referenceNode.prev = newNode; - newNode.next = referenceNode; - parentNode.children.splice(insertionIdx, 0, newNode); - newNode.parent = parentNode; - }, - setTemplateContent(templateElement, contentElement) { - exports.adapter.appendChild(templateElement, contentElement); - }, - getTemplateContent(templateElement) { - return templateElement.children[0]; - }, - setDocumentType(document, name, publicId, systemId) { - const data = serializeDoctypeContent(name, publicId, systemId); - let doctypeNode = document.children.find((node) => (0, domhandler_1.isDirective)(node) && node.name === '!doctype'); - if (doctypeNode) { - doctypeNode.data = data !== null && data !== void 0 ? data : null; - } - else { - doctypeNode = new domhandler_1.ProcessingInstruction('!doctype', data); - exports.adapter.appendChild(document, doctypeNode); - } - doctypeNode['x-name'] = name; - doctypeNode['x-publicId'] = publicId; - doctypeNode['x-systemId'] = systemId; - }, - setDocumentMode(document, mode) { - document['x-mode'] = mode; - }, - getDocumentMode(document) { - return document['x-mode']; - }, - detachNode(node) { - if (node.parent) { - const idx = node.parent.children.indexOf(node); - const { prev, next } = node; - node.prev = null; - node.next = null; - if (prev) { - prev.next = next; - } - if (next) { - next.prev = prev; - } - node.parent.children.splice(idx, 1); - node.parent = null; - } - }, - insertText(parentNode, text) { - const lastChild = parentNode.children[parentNode.children.length - 1]; - if (lastChild && (0, domhandler_1.isText)(lastChild)) { - lastChild.data += text; - } - else { - exports.adapter.appendChild(parentNode, exports.adapter.createTextNode(text)); - } - }, - insertTextBefore(parentNode, text, referenceNode) { - const prevNode = parentNode.children[parentNode.children.indexOf(referenceNode) - 1]; - if (prevNode && (0, domhandler_1.isText)(prevNode)) { - prevNode.data += text; - } - else { - exports.adapter.insertBefore(parentNode, exports.adapter.createTextNode(text), referenceNode); - } - }, - adoptAttributes(recipient, attrs) { - for (let i = 0; i < attrs.length; i++) { - const attrName = attrs[i].name; - if (recipient.attribs[attrName] === undefined) { - recipient.attribs[attrName] = attrs[i].value; - recipient['x-attribsNamespace'][attrName] = attrs[i].namespace; - recipient['x-attribsPrefix'][attrName] = attrs[i].prefix; - } - } - }, - //Tree traversing - getFirstChild(node) { - return node.children[0]; - }, - getChildNodes(node) { - return node.children; - }, - getParentNode(node) { - return node.parent; - }, - getAttrList(element) { - return element.attributes; - }, - //Node data - getTagName(element) { - return element.name; - }, - getNamespaceURI(element) { - return element.namespace; - }, - getTextNodeContent(textNode) { - return textNode.data; - }, - getCommentNodeContent(commentNode) { - return commentNode.data; - }, - getDocumentTypeNodeName(doctypeNode) { - var _a; - return (_a = doctypeNode['x-name']) !== null && _a !== void 0 ? _a : ''; - }, - getDocumentTypeNodePublicId(doctypeNode) { - var _a; - return (_a = doctypeNode['x-publicId']) !== null && _a !== void 0 ? _a : ''; - }, - getDocumentTypeNodeSystemId(doctypeNode) { - var _a; - return (_a = doctypeNode['x-systemId']) !== null && _a !== void 0 ? _a : ''; - }, - //Node types - isDocumentTypeNode(node) { - return (0, domhandler_1.isDirective)(node) && node.name === '!doctype'; - }, - // Source code location - setNodeSourceCodeLocation(node, location) { - if (location) { - node.startIndex = location.startOffset; - node.endIndex = location.endOffset; - } - node.sourceCodeLocation = location; - }, - getNodeSourceCodeLocation(node) { - return node.sourceCodeLocation; - }, - updateNodeSourceCodeLocation(node, endLocation) { - if (endLocation.endOffset != null) - node.endIndex = endLocation.endOffset; - node.sourceCodeLocation = Object.assign(Object.assign({}, node.sourceCodeLocation), endLocation); - }, -}; diff --git a/node_modules/parse5-htmlparser2-tree-adapter/dist/cjs/package.json b/node_modules/parse5-htmlparser2-tree-adapter/dist/cjs/package.json deleted file mode 100644 index 729ac4d..0000000 --- a/node_modules/parse5-htmlparser2-tree-adapter/dist/cjs/package.json +++ /dev/null @@ -1 +0,0 @@ -{"type":"commonjs"} diff --git a/node_modules/parse5-htmlparser2-tree-adapter/dist/index.d.ts b/node_modules/parse5-htmlparser2-tree-adapter/dist/index.d.ts deleted file mode 100644 index 47e1f66..0000000 --- a/node_modules/parse5-htmlparser2-tree-adapter/dist/index.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { type TreeAdapterTypeMap, type TreeAdapter } from 'parse5'; -import { type AnyNode, type ParentNode, type ChildNode, Element, Document, ProcessingInstruction, Comment, Text } from 'domhandler'; -export type Htmlparser2TreeAdapterMap = TreeAdapterTypeMap<AnyNode, ParentNode, ChildNode, Document, Document, Element, Comment, Text, Element, ProcessingInstruction>; -/** @internal */ -export declare function serializeDoctypeContent(name: string, publicId: string, systemId: string): string; -export declare const adapter: TreeAdapter<Htmlparser2TreeAdapterMap>; diff --git a/node_modules/parse5-htmlparser2-tree-adapter/dist/index.js b/node_modules/parse5-htmlparser2-tree-adapter/dist/index.js deleted file mode 100644 index 3927df0..0000000 --- a/node_modules/parse5-htmlparser2-tree-adapter/dist/index.js +++ /dev/null @@ -1,213 +0,0 @@ -import { html } from 'parse5'; -import { Element, Document, ProcessingInstruction, Comment, Text, isDirective, isText, isComment, isTag, } from 'domhandler'; -function enquoteDoctypeId(id) { - const quote = id.includes('"') ? "'" : '"'; - return quote + id + quote; -} -/** @internal */ -export function serializeDoctypeContent(name, publicId, systemId) { - let str = '!DOCTYPE '; - if (name) { - str += name; - } - if (publicId) { - str += ` PUBLIC ${enquoteDoctypeId(publicId)}`; - } - else if (systemId) { - str += ' SYSTEM'; - } - if (systemId) { - str += ` ${enquoteDoctypeId(systemId)}`; - } - return str; -} -export const adapter = { - // Re-exports from domhandler - isCommentNode: isComment, - isElementNode: isTag, - isTextNode: isText, - //Node construction - createDocument() { - const node = new Document([]); - node['x-mode'] = html.DOCUMENT_MODE.NO_QUIRKS; - return node; - }, - createDocumentFragment() { - return new Document([]); - }, - createElement(tagName, namespaceURI, attrs) { - const attribs = Object.create(null); - const attribsNamespace = Object.create(null); - const attribsPrefix = Object.create(null); - for (let i = 0; i < attrs.length; i++) { - const attrName = attrs[i].name; - attribs[attrName] = attrs[i].value; - attribsNamespace[attrName] = attrs[i].namespace; - attribsPrefix[attrName] = attrs[i].prefix; - } - const node = new Element(tagName, attribs, []); - node.namespace = namespaceURI; - node['x-attribsNamespace'] = attribsNamespace; - node['x-attribsPrefix'] = attribsPrefix; - return node; - }, - createCommentNode(data) { - return new Comment(data); - }, - createTextNode(value) { - return new Text(value); - }, - //Tree mutation - appendChild(parentNode, newNode) { - const prev = parentNode.children[parentNode.children.length - 1]; - if (prev) { - prev.next = newNode; - newNode.prev = prev; - } - parentNode.children.push(newNode); - newNode.parent = parentNode; - }, - insertBefore(parentNode, newNode, referenceNode) { - const insertionIdx = parentNode.children.indexOf(referenceNode); - const { prev } = referenceNode; - if (prev) { - prev.next = newNode; - newNode.prev = prev; - } - referenceNode.prev = newNode; - newNode.next = referenceNode; - parentNode.children.splice(insertionIdx, 0, newNode); - newNode.parent = parentNode; - }, - setTemplateContent(templateElement, contentElement) { - adapter.appendChild(templateElement, contentElement); - }, - getTemplateContent(templateElement) { - return templateElement.children[0]; - }, - setDocumentType(document, name, publicId, systemId) { - const data = serializeDoctypeContent(name, publicId, systemId); - let doctypeNode = document.children.find((node) => isDirective(node) && node.name === '!doctype'); - if (doctypeNode) { - doctypeNode.data = data !== null && data !== void 0 ? data : null; - } - else { - doctypeNode = new ProcessingInstruction('!doctype', data); - adapter.appendChild(document, doctypeNode); - } - doctypeNode['x-name'] = name; - doctypeNode['x-publicId'] = publicId; - doctypeNode['x-systemId'] = systemId; - }, - setDocumentMode(document, mode) { - document['x-mode'] = mode; - }, - getDocumentMode(document) { - return document['x-mode']; - }, - detachNode(node) { - if (node.parent) { - const idx = node.parent.children.indexOf(node); - const { prev, next } = node; - node.prev = null; - node.next = null; - if (prev) { - prev.next = next; - } - if (next) { - next.prev = prev; - } - node.parent.children.splice(idx, 1); - node.parent = null; - } - }, - insertText(parentNode, text) { - const lastChild = parentNode.children[parentNode.children.length - 1]; - if (lastChild && isText(lastChild)) { - lastChild.data += text; - } - else { - adapter.appendChild(parentNode, adapter.createTextNode(text)); - } - }, - insertTextBefore(parentNode, text, referenceNode) { - const prevNode = parentNode.children[parentNode.children.indexOf(referenceNode) - 1]; - if (prevNode && isText(prevNode)) { - prevNode.data += text; - } - else { - adapter.insertBefore(parentNode, adapter.createTextNode(text), referenceNode); - } - }, - adoptAttributes(recipient, attrs) { - for (let i = 0; i < attrs.length; i++) { - const attrName = attrs[i].name; - if (recipient.attribs[attrName] === undefined) { - recipient.attribs[attrName] = attrs[i].value; - recipient['x-attribsNamespace'][attrName] = attrs[i].namespace; - recipient['x-attribsPrefix'][attrName] = attrs[i].prefix; - } - } - }, - //Tree traversing - getFirstChild(node) { - return node.children[0]; - }, - getChildNodes(node) { - return node.children; - }, - getParentNode(node) { - return node.parent; - }, - getAttrList(element) { - return element.attributes; - }, - //Node data - getTagName(element) { - return element.name; - }, - getNamespaceURI(element) { - return element.namespace; - }, - getTextNodeContent(textNode) { - return textNode.data; - }, - getCommentNodeContent(commentNode) { - return commentNode.data; - }, - getDocumentTypeNodeName(doctypeNode) { - var _a; - return (_a = doctypeNode['x-name']) !== null && _a !== void 0 ? _a : ''; - }, - getDocumentTypeNodePublicId(doctypeNode) { - var _a; - return (_a = doctypeNode['x-publicId']) !== null && _a !== void 0 ? _a : ''; - }, - getDocumentTypeNodeSystemId(doctypeNode) { - var _a; - return (_a = doctypeNode['x-systemId']) !== null && _a !== void 0 ? _a : ''; - }, - //Node types - isDocumentTypeNode(node) { - return isDirective(node) && node.name === '!doctype'; - }, - // Source code location - setNodeSourceCodeLocation(node, location) { - if (location) { - node.startIndex = location.startOffset; - node.endIndex = location.endOffset; - } - node.sourceCodeLocation = location; - }, - getNodeSourceCodeLocation(node) { - return node.sourceCodeLocation; - }, - updateNodeSourceCodeLocation(node, endLocation) { - if (endLocation.endOffset != null) - node.endIndex = endLocation.endOffset; - node.sourceCodeLocation = { - ...node.sourceCodeLocation, - ...endLocation, - }; - }, -}; diff --git a/node_modules/parse5-htmlparser2-tree-adapter/package.json b/node_modules/parse5-htmlparser2-tree-adapter/package.json deleted file mode 100644 index 1562d94..0000000 --- a/node_modules/parse5-htmlparser2-tree-adapter/package.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "name": "parse5-htmlparser2-tree-adapter", - "type": "module", - "description": "htmlparser2 tree adapter for parse5.", - "version": "7.1.0", - "author": "Ivan Nikulin <ifaaan@gmail.com> (https://github.com/inikulin)", - "contributors": "https://github.com/inikulin/parse5/graphs/contributors", - "homepage": "https://parse5.js.org", - "funding": "https://github.com/inikulin/parse5?sponsor=1", - "keywords": [ - "parse5", - "parser", - "tree adapter", - "htmlparser2" - ], - "license": "MIT", - "main": "dist/cjs/index.js", - "module": "dist/index.js", - "types": "dist/index.d.ts", - "exports": { - "import": "./dist/index.js", - "require": "./dist/cjs/index.js" - }, - "dependencies": { - "domhandler": "^5.0.3", - "parse5": "^7.0.0" - }, - "scripts": { - "build:cjs": "tsc --moduleResolution node10 --module CommonJS --target ES6 --outDir dist/cjs && echo '{\"type\":\"commonjs\"}' > dist/cjs/package.json" - }, - "repository": { - "type": "git", - "url": "git://github.com/inikulin/parse5.git" - }, - "files": [ - "dist/cjs/package.json", - "dist/**/*.js", - "dist/**/*.d.ts" - ] -} diff --git a/node_modules/parse5-parser-stream/dist/cjs/index.d.ts b/node_modules/parse5-parser-stream/dist/cjs/index.d.ts deleted file mode 100644 index b4cc829..0000000 --- a/node_modules/parse5-parser-stream/dist/cjs/index.d.ts +++ /dev/null @@ -1,85 +0,0 @@ -/// <reference types="node" resolution-mode="require"/> -import { Writable } from 'node:stream'; -import { Parser, type ParserOptions, type TreeAdapterTypeMap, type DefaultTreeAdapterMap } from 'parse5'; -/** - * Streaming HTML parser with scripting support. - * A [writable stream](https://nodejs.org/api/stream.html#stream_class_stream_writable). - * - * @example - * - * ```js - * const ParserStream = require('parse5-parser-stream'); - * const http = require('http'); - * const { finished } = require('node:stream'); - * - * // Fetch the page content and obtain it's <head> node - * http.get('http://inikulin.github.io/parse5/', res => { - * const parser = new ParserStream(); - * - * finished(parser, () => { - * console.log(parser.document.childNodes[1].childNodes[0].tagName); //> 'head' - * }); - * - * res.pipe(parser); - * }); - * ``` - * - */ -export declare class ParserStream<T extends TreeAdapterTypeMap = DefaultTreeAdapterMap> extends Writable { - parser: Parser<T>; - static getFragmentStream<T extends TreeAdapterTypeMap>(fragmentContext?: T['parentNode'] | null, options?: ParserOptions<T>): ParserStream<T>; - private lastChunkWritten; - private writeCallback; - private pendingHtmlInsertions; - /** The resulting document node. */ - get document(): T['document']; - getFragment(): T['documentFragment']; - /** - * @param options Parsing options. - */ - constructor(options?: ParserOptions<T>, parser?: Parser<T>); - _write(chunk: string, _encoding: string, callback: () => void): void; - end(chunk?: any, encoding?: any, callback?: any): any; -} -export interface ParserStream<T extends TreeAdapterTypeMap = DefaultTreeAdapterMap> { - /** - * Raised when parser encounters a `<script>` element. If this event has listeners, parsing will be suspended once - * it is emitted. So, if `<script>` has the `src` attribute, you can fetch it, execute and then resume parsing just - * like browsers do. - * - * @example - * - * ```js - * const ParserStream = require('parse5-parser-stream'); - * const http = require('http'); - * - * const parser = new ParserStream(); - * - * parser.on('script', (scriptElement, documentWrite, resume) => { - * const src = scriptElement.attrs.find(({ name }) => name === 'src').value; - * - * http.get(src, res => { - * // Fetch the script content, execute it with DOM built around `parser.document` and - * // `document.write` implemented using `documentWrite`. - * ... - * // Then resume parsing. - * resume(); - * }); - * }); - * - * parser.end('<script src="example.com/script.js"></script>'); - * ``` - * - * @param event Name of the event - * @param handler - */ - on(event: 'script', handler: (scriptElement: T['element'], documentWrite: (html: string) => void, resume: () => void) => void): void; - /** - * Base event handler. - * - * @param event Name of the event - * @param handler Event handler - */ - on(event: string, handler: (...args: any[]) => void): this; -} -//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/parse5-parser-stream/dist/cjs/index.js b/node_modules/parse5-parser-stream/dist/cjs/index.js deleted file mode 100644 index a5002be..0000000 --- a/node_modules/parse5-parser-stream/dist/cjs/index.js +++ /dev/null @@ -1,90 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.ParserStream = void 0; -const node_stream_1 = require("node:stream"); -const parse5_1 = require("parse5"); -/* eslint-disable unicorn/consistent-function-scoping -- The rule seems to be broken here. */ -/** - * Streaming HTML parser with scripting support. - * A [writable stream](https://nodejs.org/api/stream.html#stream_class_stream_writable). - * - * @example - * - * ```js - * const ParserStream = require('parse5-parser-stream'); - * const http = require('http'); - * const { finished } = require('node:stream'); - * - * // Fetch the page content and obtain it's <head> node - * http.get('http://inikulin.github.io/parse5/', res => { - * const parser = new ParserStream(); - * - * finished(parser, () => { - * console.log(parser.document.childNodes[1].childNodes[0].tagName); //> 'head' - * }); - * - * res.pipe(parser); - * }); - * ``` - * - */ -class ParserStream extends node_stream_1.Writable { - static getFragmentStream(fragmentContext, options) { - const parser = parse5_1.Parser.getFragmentParser(fragmentContext, options); - const stream = new ParserStream(options, parser); - return stream; - } - /** The resulting document node. */ - get document() { - return this.parser.document; - } - getFragment() { - return this.parser.getFragment(); - } - /** - * @param options Parsing options. - */ - constructor(options, parser = new parse5_1.Parser(options)) { - super({ decodeStrings: false }); - this.parser = parser; - this.lastChunkWritten = false; - this.writeCallback = undefined; - this.pendingHtmlInsertions = []; - const resume = () => { - for (let i = this.pendingHtmlInsertions.length - 1; i >= 0; i--) { - this.parser.tokenizer.insertHtmlAtCurrentPos(this.pendingHtmlInsertions[i]); - } - this.pendingHtmlInsertions.length = 0; - //NOTE: keep parsing if we don't wait for the next input chunk - this.parser.tokenizer.resume(this.writeCallback); - }; - const documentWrite = (html) => { - if (!this.parser.stopped) { - this.pendingHtmlInsertions.push(html); - } - }; - const scriptHandler = (scriptElement) => { - if (this.listenerCount('script') > 0) { - this.parser.tokenizer.pause(); - this.emit('script', scriptElement, documentWrite, resume); - } - }; - this.parser.scriptHandler = scriptHandler; - } - //WritableStream implementation - _write(chunk, _encoding, callback) { - if (typeof chunk !== 'string') { - throw new TypeError('Parser can work only with string streams.'); - } - this.writeCallback = callback; - this.parser.tokenizer.write(chunk, this.lastChunkWritten, this.writeCallback); - } - // TODO [engine:node@>=16]: Due to issues with Node < 16, we are overriding `end` instead of `_final`. - // eslint-disable-next-line @typescript-eslint/no-explicit-any - end(chunk, encoding, callback) { - this.lastChunkWritten = true; - super.end(chunk || '', encoding, callback); - } -} -exports.ParserStream = ParserStream; -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/parse5-parser-stream/dist/cjs/package.json b/node_modules/parse5-parser-stream/dist/cjs/package.json deleted file mode 100644 index 729ac4d..0000000 --- a/node_modules/parse5-parser-stream/dist/cjs/package.json +++ /dev/null @@ -1 +0,0 @@ -{"type":"commonjs"} diff --git a/node_modules/parse5-parser-stream/dist/index.d.ts b/node_modules/parse5-parser-stream/dist/index.d.ts deleted file mode 100644 index b4cc829..0000000 --- a/node_modules/parse5-parser-stream/dist/index.d.ts +++ /dev/null @@ -1,85 +0,0 @@ -/// <reference types="node" resolution-mode="require"/> -import { Writable } from 'node:stream'; -import { Parser, type ParserOptions, type TreeAdapterTypeMap, type DefaultTreeAdapterMap } from 'parse5'; -/** - * Streaming HTML parser with scripting support. - * A [writable stream](https://nodejs.org/api/stream.html#stream_class_stream_writable). - * - * @example - * - * ```js - * const ParserStream = require('parse5-parser-stream'); - * const http = require('http'); - * const { finished } = require('node:stream'); - * - * // Fetch the page content and obtain it's <head> node - * http.get('http://inikulin.github.io/parse5/', res => { - * const parser = new ParserStream(); - * - * finished(parser, () => { - * console.log(parser.document.childNodes[1].childNodes[0].tagName); //> 'head' - * }); - * - * res.pipe(parser); - * }); - * ``` - * - */ -export declare class ParserStream<T extends TreeAdapterTypeMap = DefaultTreeAdapterMap> extends Writable { - parser: Parser<T>; - static getFragmentStream<T extends TreeAdapterTypeMap>(fragmentContext?: T['parentNode'] | null, options?: ParserOptions<T>): ParserStream<T>; - private lastChunkWritten; - private writeCallback; - private pendingHtmlInsertions; - /** The resulting document node. */ - get document(): T['document']; - getFragment(): T['documentFragment']; - /** - * @param options Parsing options. - */ - constructor(options?: ParserOptions<T>, parser?: Parser<T>); - _write(chunk: string, _encoding: string, callback: () => void): void; - end(chunk?: any, encoding?: any, callback?: any): any; -} -export interface ParserStream<T extends TreeAdapterTypeMap = DefaultTreeAdapterMap> { - /** - * Raised when parser encounters a `<script>` element. If this event has listeners, parsing will be suspended once - * it is emitted. So, if `<script>` has the `src` attribute, you can fetch it, execute and then resume parsing just - * like browsers do. - * - * @example - * - * ```js - * const ParserStream = require('parse5-parser-stream'); - * const http = require('http'); - * - * const parser = new ParserStream(); - * - * parser.on('script', (scriptElement, documentWrite, resume) => { - * const src = scriptElement.attrs.find(({ name }) => name === 'src').value; - * - * http.get(src, res => { - * // Fetch the script content, execute it with DOM built around `parser.document` and - * // `document.write` implemented using `documentWrite`. - * ... - * // Then resume parsing. - * resume(); - * }); - * }); - * - * parser.end('<script src="example.com/script.js"></script>'); - * ``` - * - * @param event Name of the event - * @param handler - */ - on(event: 'script', handler: (scriptElement: T['element'], documentWrite: (html: string) => void, resume: () => void) => void): void; - /** - * Base event handler. - * - * @param event Name of the event - * @param handler Event handler - */ - on(event: string, handler: (...args: any[]) => void): this; -} -//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/parse5-parser-stream/dist/index.js b/node_modules/parse5-parser-stream/dist/index.js deleted file mode 100644 index 56d33dd..0000000 --- a/node_modules/parse5-parser-stream/dist/index.js +++ /dev/null @@ -1,86 +0,0 @@ -import { Writable } from 'node:stream'; -import { Parser } from 'parse5'; -/* eslint-disable unicorn/consistent-function-scoping -- The rule seems to be broken here. */ -/** - * Streaming HTML parser with scripting support. - * A [writable stream](https://nodejs.org/api/stream.html#stream_class_stream_writable). - * - * @example - * - * ```js - * const ParserStream = require('parse5-parser-stream'); - * const http = require('http'); - * const { finished } = require('node:stream'); - * - * // Fetch the page content and obtain it's <head> node - * http.get('http://inikulin.github.io/parse5/', res => { - * const parser = new ParserStream(); - * - * finished(parser, () => { - * console.log(parser.document.childNodes[1].childNodes[0].tagName); //> 'head' - * }); - * - * res.pipe(parser); - * }); - * ``` - * - */ -export class ParserStream extends Writable { - static getFragmentStream(fragmentContext, options) { - const parser = Parser.getFragmentParser(fragmentContext, options); - const stream = new ParserStream(options, parser); - return stream; - } - /** The resulting document node. */ - get document() { - return this.parser.document; - } - getFragment() { - return this.parser.getFragment(); - } - /** - * @param options Parsing options. - */ - constructor(options, parser = new Parser(options)) { - super({ decodeStrings: false }); - this.parser = parser; - this.lastChunkWritten = false; - this.writeCallback = undefined; - this.pendingHtmlInsertions = []; - const resume = () => { - for (let i = this.pendingHtmlInsertions.length - 1; i >= 0; i--) { - this.parser.tokenizer.insertHtmlAtCurrentPos(this.pendingHtmlInsertions[i]); - } - this.pendingHtmlInsertions.length = 0; - //NOTE: keep parsing if we don't wait for the next input chunk - this.parser.tokenizer.resume(this.writeCallback); - }; - const documentWrite = (html) => { - if (!this.parser.stopped) { - this.pendingHtmlInsertions.push(html); - } - }; - const scriptHandler = (scriptElement) => { - if (this.listenerCount('script') > 0) { - this.parser.tokenizer.pause(); - this.emit('script', scriptElement, documentWrite, resume); - } - }; - this.parser.scriptHandler = scriptHandler; - } - //WritableStream implementation - _write(chunk, _encoding, callback) { - if (typeof chunk !== 'string') { - throw new TypeError('Parser can work only with string streams.'); - } - this.writeCallback = callback; - this.parser.tokenizer.write(chunk, this.lastChunkWritten, this.writeCallback); - } - // TODO [engine:node@>=16]: Due to issues with Node < 16, we are overriding `end` instead of `_final`. - // eslint-disable-next-line @typescript-eslint/no-explicit-any - end(chunk, encoding, callback) { - this.lastChunkWritten = true; - super.end(chunk || '', encoding, callback); - } -} -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/parse5-parser-stream/package.json b/node_modules/parse5-parser-stream/package.json deleted file mode 100644 index 465e217..0000000 --- a/node_modules/parse5-parser-stream/package.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "name": "parse5-parser-stream", - "type": "module", - "description": "Streaming HTML parser with scripting support.", - "version": "7.1.2", - "author": "Ivan Nikulin <ifaaan@gmail.com> (https://github.com/inikulin)", - "contributors": "https://github.com/inikulin/parse5/graphs/contributors", - "homepage": "https://github.com/inikulin/parse5", - "funding": "https://github.com/inikulin/parse5?sponsor=1", - "keywords": [ - "parse5", - "parser", - "stream", - "streaming" - ], - "license": "MIT", - "main": "dist/cjs/index.js", - "module": "dist/index.js", - "types": "dist/index.d.ts", - "exports": { - "import": "./dist/index.js", - "require": "./dist/cjs/index.js" - }, - "dependencies": { - "parse5": "^7.0.0" - }, - "scripts": { - "build:cjs": "tsc --module CommonJS --target ES6 --outDir dist/cjs && echo '{\"type\":\"commonjs\"}' > dist/cjs/package.json" - }, - "repository": { - "type": "git", - "url": "git://github.com/inikulin/parse5.git" - }, - "files": [ - "dist/cjs/package.json", - "dist/**/*.js", - "dist/**/*.d.ts" - ] -} diff --git a/node_modules/parse5/dist/cjs/common/doctype.d.ts b/node_modules/parse5/dist/cjs/common/doctype.d.ts deleted file mode 100644 index 993afaa..0000000 --- a/node_modules/parse5/dist/cjs/common/doctype.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -import { DOCUMENT_MODE } from './html.js'; -import type { DoctypeToken } from './token.js'; -export declare function isConforming(token: DoctypeToken): boolean; -export declare function getDocumentMode(token: DoctypeToken): DOCUMENT_MODE; diff --git a/node_modules/parse5/dist/cjs/common/doctype.js b/node_modules/parse5/dist/cjs/common/doctype.js deleted file mode 100644 index 82aed98..0000000 --- a/node_modules/parse5/dist/cjs/common/doctype.js +++ /dev/null @@ -1,118 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.isConforming = isConforming; -exports.getDocumentMode = getDocumentMode; -const html_js_1 = require("./html.js"); -//Const -const VALID_DOCTYPE_NAME = 'html'; -const VALID_SYSTEM_ID = 'about:legacy-compat'; -const QUIRKS_MODE_SYSTEM_ID = 'http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd'; -const QUIRKS_MODE_PUBLIC_ID_PREFIXES = [ - '+//silmaril//dtd html pro v0r11 19970101//', - '-//as//dtd html 3.0 aswedit + extensions//', - '-//advasoft ltd//dtd html 3.0 aswedit + extensions//', - '-//ietf//dtd html 2.0 level 1//', - '-//ietf//dtd html 2.0 level 2//', - '-//ietf//dtd html 2.0 strict level 1//', - '-//ietf//dtd html 2.0 strict level 2//', - '-//ietf//dtd html 2.0 strict//', - '-//ietf//dtd html 2.0//', - '-//ietf//dtd html 2.1e//', - '-//ietf//dtd html 3.0//', - '-//ietf//dtd html 3.2 final//', - '-//ietf//dtd html 3.2//', - '-//ietf//dtd html 3//', - '-//ietf//dtd html level 0//', - '-//ietf//dtd html level 1//', - '-//ietf//dtd html level 2//', - '-//ietf//dtd html level 3//', - '-//ietf//dtd html strict level 0//', - '-//ietf//dtd html strict level 1//', - '-//ietf//dtd html strict level 2//', - '-//ietf//dtd html strict level 3//', - '-//ietf//dtd html strict//', - '-//ietf//dtd html//', - '-//metrius//dtd metrius presentational//', - '-//microsoft//dtd internet explorer 2.0 html strict//', - '-//microsoft//dtd internet explorer 2.0 html//', - '-//microsoft//dtd internet explorer 2.0 tables//', - '-//microsoft//dtd internet explorer 3.0 html strict//', - '-//microsoft//dtd internet explorer 3.0 html//', - '-//microsoft//dtd internet explorer 3.0 tables//', - '-//netscape comm. corp.//dtd html//', - '-//netscape comm. corp.//dtd strict html//', - "-//o'reilly and associates//dtd html 2.0//", - "-//o'reilly and associates//dtd html extended 1.0//", - "-//o'reilly and associates//dtd html extended relaxed 1.0//", - '-//sq//dtd html 2.0 hotmetal + extensions//', - '-//softquad software//dtd hotmetal pro 6.0::19990601::extensions to html 4.0//', - '-//softquad//dtd hotmetal pro 4.0::19971010::extensions to html 4.0//', - '-//spyglass//dtd html 2.0 extended//', - '-//sun microsystems corp.//dtd hotjava html//', - '-//sun microsystems corp.//dtd hotjava strict html//', - '-//w3c//dtd html 3 1995-03-24//', - '-//w3c//dtd html 3.2 draft//', - '-//w3c//dtd html 3.2 final//', - '-//w3c//dtd html 3.2//', - '-//w3c//dtd html 3.2s draft//', - '-//w3c//dtd html 4.0 frameset//', - '-//w3c//dtd html 4.0 transitional//', - '-//w3c//dtd html experimental 19960712//', - '-//w3c//dtd html experimental 970421//', - '-//w3c//dtd w3 html//', - '-//w3o//dtd w3 html 3.0//', - '-//webtechs//dtd mozilla html 2.0//', - '-//webtechs//dtd mozilla html//', -]; -const QUIRKS_MODE_NO_SYSTEM_ID_PUBLIC_ID_PREFIXES = [ - ...QUIRKS_MODE_PUBLIC_ID_PREFIXES, - '-//w3c//dtd html 4.01 frameset//', - '-//w3c//dtd html 4.01 transitional//', -]; -const QUIRKS_MODE_PUBLIC_IDS = new Set([ - '-//w3o//dtd w3 html strict 3.0//en//', - '-/w3c/dtd html 4.0 transitional/en', - 'html', -]); -const LIMITED_QUIRKS_PUBLIC_ID_PREFIXES = ['-//w3c//dtd xhtml 1.0 frameset//', '-//w3c//dtd xhtml 1.0 transitional//']; -const LIMITED_QUIRKS_WITH_SYSTEM_ID_PUBLIC_ID_PREFIXES = [ - ...LIMITED_QUIRKS_PUBLIC_ID_PREFIXES, - '-//w3c//dtd html 4.01 frameset//', - '-//w3c//dtd html 4.01 transitional//', -]; -//Utils -function hasPrefix(publicId, prefixes) { - return prefixes.some((prefix) => publicId.startsWith(prefix)); -} -//API -function isConforming(token) { - return (token.name === VALID_DOCTYPE_NAME && - token.publicId === null && - (token.systemId === null || token.systemId === VALID_SYSTEM_ID)); -} -function getDocumentMode(token) { - if (token.name !== VALID_DOCTYPE_NAME) { - return html_js_1.DOCUMENT_MODE.QUIRKS; - } - const { systemId } = token; - if (systemId && systemId.toLowerCase() === QUIRKS_MODE_SYSTEM_ID) { - return html_js_1.DOCUMENT_MODE.QUIRKS; - } - let { publicId } = token; - if (publicId !== null) { - publicId = publicId.toLowerCase(); - if (QUIRKS_MODE_PUBLIC_IDS.has(publicId)) { - return html_js_1.DOCUMENT_MODE.QUIRKS; - } - let prefixes = systemId === null ? QUIRKS_MODE_NO_SYSTEM_ID_PUBLIC_ID_PREFIXES : QUIRKS_MODE_PUBLIC_ID_PREFIXES; - if (hasPrefix(publicId, prefixes)) { - return html_js_1.DOCUMENT_MODE.QUIRKS; - } - prefixes = - systemId === null ? LIMITED_QUIRKS_PUBLIC_ID_PREFIXES : LIMITED_QUIRKS_WITH_SYSTEM_ID_PUBLIC_ID_PREFIXES; - if (hasPrefix(publicId, prefixes)) { - return html_js_1.DOCUMENT_MODE.LIMITED_QUIRKS; - } - } - return html_js_1.DOCUMENT_MODE.NO_QUIRKS; -} diff --git a/node_modules/parse5/dist/cjs/common/error-codes.d.ts b/node_modules/parse5/dist/cjs/common/error-codes.d.ts deleted file mode 100644 index ac15bb3..0000000 --- a/node_modules/parse5/dist/cjs/common/error-codes.d.ts +++ /dev/null @@ -1,67 +0,0 @@ -import type { Location } from './token.js'; -export interface ParserError extends Location { - code: ERR; -} -export type ParserErrorHandler = (error: ParserError) => void; -export declare enum ERR { - controlCharacterInInputStream = "control-character-in-input-stream", - noncharacterInInputStream = "noncharacter-in-input-stream", - surrogateInInputStream = "surrogate-in-input-stream", - nonVoidHtmlElementStartTagWithTrailingSolidus = "non-void-html-element-start-tag-with-trailing-solidus", - endTagWithAttributes = "end-tag-with-attributes", - endTagWithTrailingSolidus = "end-tag-with-trailing-solidus", - unexpectedSolidusInTag = "unexpected-solidus-in-tag", - unexpectedNullCharacter = "unexpected-null-character", - unexpectedQuestionMarkInsteadOfTagName = "unexpected-question-mark-instead-of-tag-name", - invalidFirstCharacterOfTagName = "invalid-first-character-of-tag-name", - unexpectedEqualsSignBeforeAttributeName = "unexpected-equals-sign-before-attribute-name", - missingEndTagName = "missing-end-tag-name", - unexpectedCharacterInAttributeName = "unexpected-character-in-attribute-name", - unknownNamedCharacterReference = "unknown-named-character-reference", - missingSemicolonAfterCharacterReference = "missing-semicolon-after-character-reference", - unexpectedCharacterAfterDoctypeSystemIdentifier = "unexpected-character-after-doctype-system-identifier", - unexpectedCharacterInUnquotedAttributeValue = "unexpected-character-in-unquoted-attribute-value", - eofBeforeTagName = "eof-before-tag-name", - eofInTag = "eof-in-tag", - missingAttributeValue = "missing-attribute-value", - missingWhitespaceBetweenAttributes = "missing-whitespace-between-attributes", - missingWhitespaceAfterDoctypePublicKeyword = "missing-whitespace-after-doctype-public-keyword", - missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers = "missing-whitespace-between-doctype-public-and-system-identifiers", - missingWhitespaceAfterDoctypeSystemKeyword = "missing-whitespace-after-doctype-system-keyword", - missingQuoteBeforeDoctypePublicIdentifier = "missing-quote-before-doctype-public-identifier", - missingQuoteBeforeDoctypeSystemIdentifier = "missing-quote-before-doctype-system-identifier", - missingDoctypePublicIdentifier = "missing-doctype-public-identifier", - missingDoctypeSystemIdentifier = "missing-doctype-system-identifier", - abruptDoctypePublicIdentifier = "abrupt-doctype-public-identifier", - abruptDoctypeSystemIdentifier = "abrupt-doctype-system-identifier", - cdataInHtmlContent = "cdata-in-html-content", - incorrectlyOpenedComment = "incorrectly-opened-comment", - eofInScriptHtmlCommentLikeText = "eof-in-script-html-comment-like-text", - eofInDoctype = "eof-in-doctype", - nestedComment = "nested-comment", - abruptClosingOfEmptyComment = "abrupt-closing-of-empty-comment", - eofInComment = "eof-in-comment", - incorrectlyClosedComment = "incorrectly-closed-comment", - eofInCdata = "eof-in-cdata", - absenceOfDigitsInNumericCharacterReference = "absence-of-digits-in-numeric-character-reference", - nullCharacterReference = "null-character-reference", - surrogateCharacterReference = "surrogate-character-reference", - characterReferenceOutsideUnicodeRange = "character-reference-outside-unicode-range", - controlCharacterReference = "control-character-reference", - noncharacterCharacterReference = "noncharacter-character-reference", - missingWhitespaceBeforeDoctypeName = "missing-whitespace-before-doctype-name", - missingDoctypeName = "missing-doctype-name", - invalidCharacterSequenceAfterDoctypeName = "invalid-character-sequence-after-doctype-name", - duplicateAttribute = "duplicate-attribute", - nonConformingDoctype = "non-conforming-doctype", - missingDoctype = "missing-doctype", - misplacedDoctype = "misplaced-doctype", - endTagWithoutMatchingOpenElement = "end-tag-without-matching-open-element", - closingOfElementWithOpenChildElements = "closing-of-element-with-open-child-elements", - disallowedContentInNoscriptInHead = "disallowed-content-in-noscript-in-head", - openElementsLeftAfterEof = "open-elements-left-after-eof", - abandonedHeadElementChild = "abandoned-head-element-child", - misplacedStartTagForHeadElement = "misplaced-start-tag-for-head-element", - nestedNoscriptInHead = "nested-noscript-in-head", - eofInElementThatCanContainOnlyText = "eof-in-element-that-can-contain-only-text" -} diff --git a/node_modules/parse5/dist/cjs/common/error-codes.js b/node_modules/parse5/dist/cjs/common/error-codes.js deleted file mode 100644 index 573e68e..0000000 --- a/node_modules/parse5/dist/cjs/common/error-codes.js +++ /dev/null @@ -1,66 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.ERR = void 0; -var ERR; -(function (ERR) { - ERR["controlCharacterInInputStream"] = "control-character-in-input-stream"; - ERR["noncharacterInInputStream"] = "noncharacter-in-input-stream"; - ERR["surrogateInInputStream"] = "surrogate-in-input-stream"; - ERR["nonVoidHtmlElementStartTagWithTrailingSolidus"] = "non-void-html-element-start-tag-with-trailing-solidus"; - ERR["endTagWithAttributes"] = "end-tag-with-attributes"; - ERR["endTagWithTrailingSolidus"] = "end-tag-with-trailing-solidus"; - ERR["unexpectedSolidusInTag"] = "unexpected-solidus-in-tag"; - ERR["unexpectedNullCharacter"] = "unexpected-null-character"; - ERR["unexpectedQuestionMarkInsteadOfTagName"] = "unexpected-question-mark-instead-of-tag-name"; - ERR["invalidFirstCharacterOfTagName"] = "invalid-first-character-of-tag-name"; - ERR["unexpectedEqualsSignBeforeAttributeName"] = "unexpected-equals-sign-before-attribute-name"; - ERR["missingEndTagName"] = "missing-end-tag-name"; - ERR["unexpectedCharacterInAttributeName"] = "unexpected-character-in-attribute-name"; - ERR["unknownNamedCharacterReference"] = "unknown-named-character-reference"; - ERR["missingSemicolonAfterCharacterReference"] = "missing-semicolon-after-character-reference"; - ERR["unexpectedCharacterAfterDoctypeSystemIdentifier"] = "unexpected-character-after-doctype-system-identifier"; - ERR["unexpectedCharacterInUnquotedAttributeValue"] = "unexpected-character-in-unquoted-attribute-value"; - ERR["eofBeforeTagName"] = "eof-before-tag-name"; - ERR["eofInTag"] = "eof-in-tag"; - ERR["missingAttributeValue"] = "missing-attribute-value"; - ERR["missingWhitespaceBetweenAttributes"] = "missing-whitespace-between-attributes"; - ERR["missingWhitespaceAfterDoctypePublicKeyword"] = "missing-whitespace-after-doctype-public-keyword"; - ERR["missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers"] = "missing-whitespace-between-doctype-public-and-system-identifiers"; - ERR["missingWhitespaceAfterDoctypeSystemKeyword"] = "missing-whitespace-after-doctype-system-keyword"; - ERR["missingQuoteBeforeDoctypePublicIdentifier"] = "missing-quote-before-doctype-public-identifier"; - ERR["missingQuoteBeforeDoctypeSystemIdentifier"] = "missing-quote-before-doctype-system-identifier"; - ERR["missingDoctypePublicIdentifier"] = "missing-doctype-public-identifier"; - ERR["missingDoctypeSystemIdentifier"] = "missing-doctype-system-identifier"; - ERR["abruptDoctypePublicIdentifier"] = "abrupt-doctype-public-identifier"; - ERR["abruptDoctypeSystemIdentifier"] = "abrupt-doctype-system-identifier"; - ERR["cdataInHtmlContent"] = "cdata-in-html-content"; - ERR["incorrectlyOpenedComment"] = "incorrectly-opened-comment"; - ERR["eofInScriptHtmlCommentLikeText"] = "eof-in-script-html-comment-like-text"; - ERR["eofInDoctype"] = "eof-in-doctype"; - ERR["nestedComment"] = "nested-comment"; - ERR["abruptClosingOfEmptyComment"] = "abrupt-closing-of-empty-comment"; - ERR["eofInComment"] = "eof-in-comment"; - ERR["incorrectlyClosedComment"] = "incorrectly-closed-comment"; - ERR["eofInCdata"] = "eof-in-cdata"; - ERR["absenceOfDigitsInNumericCharacterReference"] = "absence-of-digits-in-numeric-character-reference"; - ERR["nullCharacterReference"] = "null-character-reference"; - ERR["surrogateCharacterReference"] = "surrogate-character-reference"; - ERR["characterReferenceOutsideUnicodeRange"] = "character-reference-outside-unicode-range"; - ERR["controlCharacterReference"] = "control-character-reference"; - ERR["noncharacterCharacterReference"] = "noncharacter-character-reference"; - ERR["missingWhitespaceBeforeDoctypeName"] = "missing-whitespace-before-doctype-name"; - ERR["missingDoctypeName"] = "missing-doctype-name"; - ERR["invalidCharacterSequenceAfterDoctypeName"] = "invalid-character-sequence-after-doctype-name"; - ERR["duplicateAttribute"] = "duplicate-attribute"; - ERR["nonConformingDoctype"] = "non-conforming-doctype"; - ERR["missingDoctype"] = "missing-doctype"; - ERR["misplacedDoctype"] = "misplaced-doctype"; - ERR["endTagWithoutMatchingOpenElement"] = "end-tag-without-matching-open-element"; - ERR["closingOfElementWithOpenChildElements"] = "closing-of-element-with-open-child-elements"; - ERR["disallowedContentInNoscriptInHead"] = "disallowed-content-in-noscript-in-head"; - ERR["openElementsLeftAfterEof"] = "open-elements-left-after-eof"; - ERR["abandonedHeadElementChild"] = "abandoned-head-element-child"; - ERR["misplacedStartTagForHeadElement"] = "misplaced-start-tag-for-head-element"; - ERR["nestedNoscriptInHead"] = "nested-noscript-in-head"; - ERR["eofInElementThatCanContainOnlyText"] = "eof-in-element-that-can-contain-only-text"; -})(ERR || (exports.ERR = ERR = {})); diff --git a/node_modules/parse5/dist/cjs/common/foreign-content.d.ts b/node_modules/parse5/dist/cjs/common/foreign-content.d.ts deleted file mode 100644 index d08d02b..0000000 --- a/node_modules/parse5/dist/cjs/common/foreign-content.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { TAG_ID as $, NS } from './html.js'; -import type { TagToken, Attribute } from './token.js'; -export declare const SVG_TAG_NAMES_ADJUSTMENT_MAP: Map<string, string>; -export declare function causesExit(startTagToken: TagToken): boolean; -export declare function adjustTokenMathMLAttrs(token: TagToken): void; -export declare function adjustTokenSVGAttrs(token: TagToken): void; -export declare function adjustTokenXMLAttrs(token: TagToken): void; -export declare function adjustTokenSVGTagName(token: TagToken): void; -export declare function isIntegrationPoint(tn: $, ns: NS, attrs: Attribute[], foreignNS?: NS): boolean; diff --git a/node_modules/parse5/dist/cjs/common/foreign-content.js b/node_modules/parse5/dist/cjs/common/foreign-content.js deleted file mode 100644 index 2015b0c..0000000 --- a/node_modules/parse5/dist/cjs/common/foreign-content.js +++ /dev/null @@ -1,237 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.SVG_TAG_NAMES_ADJUSTMENT_MAP = void 0; -exports.causesExit = causesExit; -exports.adjustTokenMathMLAttrs = adjustTokenMathMLAttrs; -exports.adjustTokenSVGAttrs = adjustTokenSVGAttrs; -exports.adjustTokenXMLAttrs = adjustTokenXMLAttrs; -exports.adjustTokenSVGTagName = adjustTokenSVGTagName; -exports.isIntegrationPoint = isIntegrationPoint; -const html_js_1 = require("./html.js"); -//MIME types -const MIME_TYPES = { - TEXT_HTML: 'text/html', - APPLICATION_XML: 'application/xhtml+xml', -}; -//Attributes -const DEFINITION_URL_ATTR = 'definitionurl'; -const ADJUSTED_DEFINITION_URL_ATTR = 'definitionURL'; -const SVG_ATTRS_ADJUSTMENT_MAP = new Map([ - 'attributeName', - 'attributeType', - 'baseFrequency', - 'baseProfile', - 'calcMode', - 'clipPathUnits', - 'diffuseConstant', - 'edgeMode', - 'filterUnits', - 'glyphRef', - 'gradientTransform', - 'gradientUnits', - 'kernelMatrix', - 'kernelUnitLength', - 'keyPoints', - 'keySplines', - 'keyTimes', - 'lengthAdjust', - 'limitingConeAngle', - 'markerHeight', - 'markerUnits', - 'markerWidth', - 'maskContentUnits', - 'maskUnits', - 'numOctaves', - 'pathLength', - 'patternContentUnits', - 'patternTransform', - 'patternUnits', - 'pointsAtX', - 'pointsAtY', - 'pointsAtZ', - 'preserveAlpha', - 'preserveAspectRatio', - 'primitiveUnits', - 'refX', - 'refY', - 'repeatCount', - 'repeatDur', - 'requiredExtensions', - 'requiredFeatures', - 'specularConstant', - 'specularExponent', - 'spreadMethod', - 'startOffset', - 'stdDeviation', - 'stitchTiles', - 'surfaceScale', - 'systemLanguage', - 'tableValues', - 'targetX', - 'targetY', - 'textLength', - 'viewBox', - 'viewTarget', - 'xChannelSelector', - 'yChannelSelector', - 'zoomAndPan', -].map((attr) => [attr.toLowerCase(), attr])); -const XML_ATTRS_ADJUSTMENT_MAP = new Map([ - ['xlink:actuate', { prefix: 'xlink', name: 'actuate', namespace: html_js_1.NS.XLINK }], - ['xlink:arcrole', { prefix: 'xlink', name: 'arcrole', namespace: html_js_1.NS.XLINK }], - ['xlink:href', { prefix: 'xlink', name: 'href', namespace: html_js_1.NS.XLINK }], - ['xlink:role', { prefix: 'xlink', name: 'role', namespace: html_js_1.NS.XLINK }], - ['xlink:show', { prefix: 'xlink', name: 'show', namespace: html_js_1.NS.XLINK }], - ['xlink:title', { prefix: 'xlink', name: 'title', namespace: html_js_1.NS.XLINK }], - ['xlink:type', { prefix: 'xlink', name: 'type', namespace: html_js_1.NS.XLINK }], - ['xml:lang', { prefix: 'xml', name: 'lang', namespace: html_js_1.NS.XML }], - ['xml:space', { prefix: 'xml', name: 'space', namespace: html_js_1.NS.XML }], - ['xmlns', { prefix: '', name: 'xmlns', namespace: html_js_1.NS.XMLNS }], - ['xmlns:xlink', { prefix: 'xmlns', name: 'xlink', namespace: html_js_1.NS.XMLNS }], -]); -//SVG tag names adjustment map -exports.SVG_TAG_NAMES_ADJUSTMENT_MAP = new Map([ - 'altGlyph', - 'altGlyphDef', - 'altGlyphItem', - 'animateColor', - 'animateMotion', - 'animateTransform', - 'clipPath', - 'feBlend', - 'feColorMatrix', - 'feComponentTransfer', - 'feComposite', - 'feConvolveMatrix', - 'feDiffuseLighting', - 'feDisplacementMap', - 'feDistantLight', - 'feFlood', - 'feFuncA', - 'feFuncB', - 'feFuncG', - 'feFuncR', - 'feGaussianBlur', - 'feImage', - 'feMerge', - 'feMergeNode', - 'feMorphology', - 'feOffset', - 'fePointLight', - 'feSpecularLighting', - 'feSpotLight', - 'feTile', - 'feTurbulence', - 'foreignObject', - 'glyphRef', - 'linearGradient', - 'radialGradient', - 'textPath', -].map((tn) => [tn.toLowerCase(), tn])); -//Tags that causes exit from foreign content -const EXITS_FOREIGN_CONTENT = new Set([ - html_js_1.TAG_ID.B, - html_js_1.TAG_ID.BIG, - html_js_1.TAG_ID.BLOCKQUOTE, - html_js_1.TAG_ID.BODY, - html_js_1.TAG_ID.BR, - html_js_1.TAG_ID.CENTER, - html_js_1.TAG_ID.CODE, - html_js_1.TAG_ID.DD, - html_js_1.TAG_ID.DIV, - html_js_1.TAG_ID.DL, - html_js_1.TAG_ID.DT, - html_js_1.TAG_ID.EM, - html_js_1.TAG_ID.EMBED, - html_js_1.TAG_ID.H1, - html_js_1.TAG_ID.H2, - html_js_1.TAG_ID.H3, - html_js_1.TAG_ID.H4, - html_js_1.TAG_ID.H5, - html_js_1.TAG_ID.H6, - html_js_1.TAG_ID.HEAD, - html_js_1.TAG_ID.HR, - html_js_1.TAG_ID.I, - html_js_1.TAG_ID.IMG, - html_js_1.TAG_ID.LI, - html_js_1.TAG_ID.LISTING, - html_js_1.TAG_ID.MENU, - html_js_1.TAG_ID.META, - html_js_1.TAG_ID.NOBR, - html_js_1.TAG_ID.OL, - html_js_1.TAG_ID.P, - html_js_1.TAG_ID.PRE, - html_js_1.TAG_ID.RUBY, - html_js_1.TAG_ID.S, - html_js_1.TAG_ID.SMALL, - html_js_1.TAG_ID.SPAN, - html_js_1.TAG_ID.STRONG, - html_js_1.TAG_ID.STRIKE, - html_js_1.TAG_ID.SUB, - html_js_1.TAG_ID.SUP, - html_js_1.TAG_ID.TABLE, - html_js_1.TAG_ID.TT, - html_js_1.TAG_ID.U, - html_js_1.TAG_ID.UL, - html_js_1.TAG_ID.VAR, -]); -//Check exit from foreign content -function causesExit(startTagToken) { - const tn = startTagToken.tagID; - const isFontWithAttrs = tn === html_js_1.TAG_ID.FONT && - startTagToken.attrs.some(({ name }) => name === html_js_1.ATTRS.COLOR || name === html_js_1.ATTRS.SIZE || name === html_js_1.ATTRS.FACE); - return isFontWithAttrs || EXITS_FOREIGN_CONTENT.has(tn); -} -//Token adjustments -function adjustTokenMathMLAttrs(token) { - for (let i = 0; i < token.attrs.length; i++) { - if (token.attrs[i].name === DEFINITION_URL_ATTR) { - token.attrs[i].name = ADJUSTED_DEFINITION_URL_ATTR; - break; - } - } -} -function adjustTokenSVGAttrs(token) { - for (let i = 0; i < token.attrs.length; i++) { - const adjustedAttrName = SVG_ATTRS_ADJUSTMENT_MAP.get(token.attrs[i].name); - if (adjustedAttrName != null) { - token.attrs[i].name = adjustedAttrName; - } - } -} -function adjustTokenXMLAttrs(token) { - for (let i = 0; i < token.attrs.length; i++) { - const adjustedAttrEntry = XML_ATTRS_ADJUSTMENT_MAP.get(token.attrs[i].name); - if (adjustedAttrEntry) { - token.attrs[i].prefix = adjustedAttrEntry.prefix; - token.attrs[i].name = adjustedAttrEntry.name; - token.attrs[i].namespace = adjustedAttrEntry.namespace; - } - } -} -function adjustTokenSVGTagName(token) { - const adjustedTagName = exports.SVG_TAG_NAMES_ADJUSTMENT_MAP.get(token.tagName); - if (adjustedTagName != null) { - token.tagName = adjustedTagName; - token.tagID = (0, html_js_1.getTagID)(token.tagName); - } -} -//Integration points -function isMathMLTextIntegrationPoint(tn, ns) { - return ns === html_js_1.NS.MATHML && (tn === html_js_1.TAG_ID.MI || tn === html_js_1.TAG_ID.MO || tn === html_js_1.TAG_ID.MN || tn === html_js_1.TAG_ID.MS || tn === html_js_1.TAG_ID.MTEXT); -} -function isHtmlIntegrationPoint(tn, ns, attrs) { - if (ns === html_js_1.NS.MATHML && tn === html_js_1.TAG_ID.ANNOTATION_XML) { - for (let i = 0; i < attrs.length; i++) { - if (attrs[i].name === html_js_1.ATTRS.ENCODING) { - const value = attrs[i].value.toLowerCase(); - return value === MIME_TYPES.TEXT_HTML || value === MIME_TYPES.APPLICATION_XML; - } - } - } - return ns === html_js_1.NS.SVG && (tn === html_js_1.TAG_ID.FOREIGN_OBJECT || tn === html_js_1.TAG_ID.DESC || tn === html_js_1.TAG_ID.TITLE); -} -function isIntegrationPoint(tn, ns, attrs, foreignNS) { - return (((!foreignNS || foreignNS === html_js_1.NS.HTML) && isHtmlIntegrationPoint(tn, ns, attrs)) || - ((!foreignNS || foreignNS === html_js_1.NS.MATHML) && isMathMLTextIntegrationPoint(tn, ns))); -} diff --git a/node_modules/parse5/dist/cjs/common/html.d.ts b/node_modules/parse5/dist/cjs/common/html.d.ts deleted file mode 100644 index 2fbc821..0000000 --- a/node_modules/parse5/dist/cjs/common/html.d.ts +++ /dev/null @@ -1,289 +0,0 @@ -/** All valid namespaces in HTML. */ -export declare enum NS { - HTML = "http://www.w3.org/1999/xhtml", - MATHML = "http://www.w3.org/1998/Math/MathML", - SVG = "http://www.w3.org/2000/svg", - XLINK = "http://www.w3.org/1999/xlink", - XML = "http://www.w3.org/XML/1998/namespace", - XMLNS = "http://www.w3.org/2000/xmlns/" -} -export declare enum ATTRS { - TYPE = "type", - ACTION = "action", - ENCODING = "encoding", - PROMPT = "prompt", - NAME = "name", - COLOR = "color", - FACE = "face", - SIZE = "size" -} -/** - * The mode of the document. - * - * @see {@link https://dom.spec.whatwg.org/#concept-document-limited-quirks} - */ -export declare enum DOCUMENT_MODE { - NO_QUIRKS = "no-quirks", - QUIRKS = "quirks", - LIMITED_QUIRKS = "limited-quirks" -} -export declare enum TAG_NAMES { - A = "a", - ADDRESS = "address", - ANNOTATION_XML = "annotation-xml", - APPLET = "applet", - AREA = "area", - ARTICLE = "article", - ASIDE = "aside", - B = "b", - BASE = "base", - BASEFONT = "basefont", - BGSOUND = "bgsound", - BIG = "big", - BLOCKQUOTE = "blockquote", - BODY = "body", - BR = "br", - BUTTON = "button", - CAPTION = "caption", - CENTER = "center", - CODE = "code", - COL = "col", - COLGROUP = "colgroup", - DD = "dd", - DESC = "desc", - DETAILS = "details", - DIALOG = "dialog", - DIR = "dir", - DIV = "div", - DL = "dl", - DT = "dt", - EM = "em", - EMBED = "embed", - FIELDSET = "fieldset", - FIGCAPTION = "figcaption", - FIGURE = "figure", - FONT = "font", - FOOTER = "footer", - FOREIGN_OBJECT = "foreignObject", - FORM = "form", - FRAME = "frame", - FRAMESET = "frameset", - H1 = "h1", - H2 = "h2", - H3 = "h3", - H4 = "h4", - H5 = "h5", - H6 = "h6", - HEAD = "head", - HEADER = "header", - HGROUP = "hgroup", - HR = "hr", - HTML = "html", - I = "i", - IMG = "img", - IMAGE = "image", - INPUT = "input", - IFRAME = "iframe", - KEYGEN = "keygen", - LABEL = "label", - LI = "li", - LINK = "link", - LISTING = "listing", - MAIN = "main", - MALIGNMARK = "malignmark", - MARQUEE = "marquee", - MATH = "math", - MENU = "menu", - META = "meta", - MGLYPH = "mglyph", - MI = "mi", - MO = "mo", - MN = "mn", - MS = "ms", - MTEXT = "mtext", - NAV = "nav", - NOBR = "nobr", - NOFRAMES = "noframes", - NOEMBED = "noembed", - NOSCRIPT = "noscript", - OBJECT = "object", - OL = "ol", - OPTGROUP = "optgroup", - OPTION = "option", - P = "p", - PARAM = "param", - PLAINTEXT = "plaintext", - PRE = "pre", - RB = "rb", - RP = "rp", - RT = "rt", - RTC = "rtc", - RUBY = "ruby", - S = "s", - SCRIPT = "script", - SEARCH = "search", - SECTION = "section", - SELECT = "select", - SOURCE = "source", - SMALL = "small", - SPAN = "span", - STRIKE = "strike", - STRONG = "strong", - STYLE = "style", - SUB = "sub", - SUMMARY = "summary", - SUP = "sup", - TABLE = "table", - TBODY = "tbody", - TEMPLATE = "template", - TEXTAREA = "textarea", - TFOOT = "tfoot", - TD = "td", - TH = "th", - THEAD = "thead", - TITLE = "title", - TR = "tr", - TRACK = "track", - TT = "tt", - U = "u", - UL = "ul", - SVG = "svg", - VAR = "var", - WBR = "wbr", - XMP = "xmp" -} -/** - * Tag IDs are numeric IDs for known tag names. - * - * We use tag IDs to improve the performance of tag name comparisons. - */ -export declare enum TAG_ID { - UNKNOWN = 0, - A = 1, - ADDRESS = 2, - ANNOTATION_XML = 3, - APPLET = 4, - AREA = 5, - ARTICLE = 6, - ASIDE = 7, - B = 8, - BASE = 9, - BASEFONT = 10, - BGSOUND = 11, - BIG = 12, - BLOCKQUOTE = 13, - BODY = 14, - BR = 15, - BUTTON = 16, - CAPTION = 17, - CENTER = 18, - CODE = 19, - COL = 20, - COLGROUP = 21, - DD = 22, - DESC = 23, - DETAILS = 24, - DIALOG = 25, - DIR = 26, - DIV = 27, - DL = 28, - DT = 29, - EM = 30, - EMBED = 31, - FIELDSET = 32, - FIGCAPTION = 33, - FIGURE = 34, - FONT = 35, - FOOTER = 36, - FOREIGN_OBJECT = 37, - FORM = 38, - FRAME = 39, - FRAMESET = 40, - H1 = 41, - H2 = 42, - H3 = 43, - H4 = 44, - H5 = 45, - H6 = 46, - HEAD = 47, - HEADER = 48, - HGROUP = 49, - HR = 50, - HTML = 51, - I = 52, - IMG = 53, - IMAGE = 54, - INPUT = 55, - IFRAME = 56, - KEYGEN = 57, - LABEL = 58, - LI = 59, - LINK = 60, - LISTING = 61, - MAIN = 62, - MALIGNMARK = 63, - MARQUEE = 64, - MATH = 65, - MENU = 66, - META = 67, - MGLYPH = 68, - MI = 69, - MO = 70, - MN = 71, - MS = 72, - MTEXT = 73, - NAV = 74, - NOBR = 75, - NOFRAMES = 76, - NOEMBED = 77, - NOSCRIPT = 78, - OBJECT = 79, - OL = 80, - OPTGROUP = 81, - OPTION = 82, - P = 83, - PARAM = 84, - PLAINTEXT = 85, - PRE = 86, - RB = 87, - RP = 88, - RT = 89, - RTC = 90, - RUBY = 91, - S = 92, - SCRIPT = 93, - SEARCH = 94, - SECTION = 95, - SELECT = 96, - SOURCE = 97, - SMALL = 98, - SPAN = 99, - STRIKE = 100, - STRONG = 101, - STYLE = 102, - SUB = 103, - SUMMARY = 104, - SUP = 105, - TABLE = 106, - TBODY = 107, - TEMPLATE = 108, - TEXTAREA = 109, - TFOOT = 110, - TD = 111, - TH = 112, - THEAD = 113, - TITLE = 114, - TR = 115, - TRACK = 116, - TT = 117, - U = 118, - UL = 119, - SVG = 120, - VAR = 121, - WBR = 122, - XMP = 123 -} -export declare function getTagID(tagName: string): TAG_ID; -export declare const SPECIAL_ELEMENTS: Record<NS, Set<TAG_ID>>; -export declare const NUMBERED_HEADERS: Set<TAG_ID>; -export declare function hasUnescapedText(tn: string, scriptingEnabled: boolean): boolean; diff --git a/node_modules/parse5/dist/cjs/common/html.js b/node_modules/parse5/dist/cjs/common/html.js deleted file mode 100644 index d18fc44..0000000 --- a/node_modules/parse5/dist/cjs/common/html.js +++ /dev/null @@ -1,528 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.NUMBERED_HEADERS = exports.SPECIAL_ELEMENTS = exports.TAG_ID = exports.TAG_NAMES = exports.DOCUMENT_MODE = exports.ATTRS = exports.NS = void 0; -exports.getTagID = getTagID; -exports.hasUnescapedText = hasUnescapedText; -/** All valid namespaces in HTML. */ -var NS; -(function (NS) { - NS["HTML"] = "http://www.w3.org/1999/xhtml"; - NS["MATHML"] = "http://www.w3.org/1998/Math/MathML"; - NS["SVG"] = "http://www.w3.org/2000/svg"; - NS["XLINK"] = "http://www.w3.org/1999/xlink"; - NS["XML"] = "http://www.w3.org/XML/1998/namespace"; - NS["XMLNS"] = "http://www.w3.org/2000/xmlns/"; -})(NS || (exports.NS = NS = {})); -var ATTRS; -(function (ATTRS) { - ATTRS["TYPE"] = "type"; - ATTRS["ACTION"] = "action"; - ATTRS["ENCODING"] = "encoding"; - ATTRS["PROMPT"] = "prompt"; - ATTRS["NAME"] = "name"; - ATTRS["COLOR"] = "color"; - ATTRS["FACE"] = "face"; - ATTRS["SIZE"] = "size"; -})(ATTRS || (exports.ATTRS = ATTRS = {})); -/** - * The mode of the document. - * - * @see {@link https://dom.spec.whatwg.org/#concept-document-limited-quirks} - */ -var DOCUMENT_MODE; -(function (DOCUMENT_MODE) { - DOCUMENT_MODE["NO_QUIRKS"] = "no-quirks"; - DOCUMENT_MODE["QUIRKS"] = "quirks"; - DOCUMENT_MODE["LIMITED_QUIRKS"] = "limited-quirks"; -})(DOCUMENT_MODE || (exports.DOCUMENT_MODE = DOCUMENT_MODE = {})); -var TAG_NAMES; -(function (TAG_NAMES) { - TAG_NAMES["A"] = "a"; - TAG_NAMES["ADDRESS"] = "address"; - TAG_NAMES["ANNOTATION_XML"] = "annotation-xml"; - TAG_NAMES["APPLET"] = "applet"; - TAG_NAMES["AREA"] = "area"; - TAG_NAMES["ARTICLE"] = "article"; - TAG_NAMES["ASIDE"] = "aside"; - TAG_NAMES["B"] = "b"; - TAG_NAMES["BASE"] = "base"; - TAG_NAMES["BASEFONT"] = "basefont"; - TAG_NAMES["BGSOUND"] = "bgsound"; - TAG_NAMES["BIG"] = "big"; - TAG_NAMES["BLOCKQUOTE"] = "blockquote"; - TAG_NAMES["BODY"] = "body"; - TAG_NAMES["BR"] = "br"; - TAG_NAMES["BUTTON"] = "button"; - TAG_NAMES["CAPTION"] = "caption"; - TAG_NAMES["CENTER"] = "center"; - TAG_NAMES["CODE"] = "code"; - TAG_NAMES["COL"] = "col"; - TAG_NAMES["COLGROUP"] = "colgroup"; - TAG_NAMES["DD"] = "dd"; - TAG_NAMES["DESC"] = "desc"; - TAG_NAMES["DETAILS"] = "details"; - TAG_NAMES["DIALOG"] = "dialog"; - TAG_NAMES["DIR"] = "dir"; - TAG_NAMES["DIV"] = "div"; - TAG_NAMES["DL"] = "dl"; - TAG_NAMES["DT"] = "dt"; - TAG_NAMES["EM"] = "em"; - TAG_NAMES["EMBED"] = "embed"; - TAG_NAMES["FIELDSET"] = "fieldset"; - TAG_NAMES["FIGCAPTION"] = "figcaption"; - TAG_NAMES["FIGURE"] = "figure"; - TAG_NAMES["FONT"] = "font"; - TAG_NAMES["FOOTER"] = "footer"; - TAG_NAMES["FOREIGN_OBJECT"] = "foreignObject"; - TAG_NAMES["FORM"] = "form"; - TAG_NAMES["FRAME"] = "frame"; - TAG_NAMES["FRAMESET"] = "frameset"; - TAG_NAMES["H1"] = "h1"; - TAG_NAMES["H2"] = "h2"; - TAG_NAMES["H3"] = "h3"; - TAG_NAMES["H4"] = "h4"; - TAG_NAMES["H5"] = "h5"; - TAG_NAMES["H6"] = "h6"; - TAG_NAMES["HEAD"] = "head"; - TAG_NAMES["HEADER"] = "header"; - TAG_NAMES["HGROUP"] = "hgroup"; - TAG_NAMES["HR"] = "hr"; - TAG_NAMES["HTML"] = "html"; - TAG_NAMES["I"] = "i"; - TAG_NAMES["IMG"] = "img"; - TAG_NAMES["IMAGE"] = "image"; - TAG_NAMES["INPUT"] = "input"; - TAG_NAMES["IFRAME"] = "iframe"; - TAG_NAMES["KEYGEN"] = "keygen"; - TAG_NAMES["LABEL"] = "label"; - TAG_NAMES["LI"] = "li"; - TAG_NAMES["LINK"] = "link"; - TAG_NAMES["LISTING"] = "listing"; - TAG_NAMES["MAIN"] = "main"; - TAG_NAMES["MALIGNMARK"] = "malignmark"; - TAG_NAMES["MARQUEE"] = "marquee"; - TAG_NAMES["MATH"] = "math"; - TAG_NAMES["MENU"] = "menu"; - TAG_NAMES["META"] = "meta"; - TAG_NAMES["MGLYPH"] = "mglyph"; - TAG_NAMES["MI"] = "mi"; - TAG_NAMES["MO"] = "mo"; - TAG_NAMES["MN"] = "mn"; - TAG_NAMES["MS"] = "ms"; - TAG_NAMES["MTEXT"] = "mtext"; - TAG_NAMES["NAV"] = "nav"; - TAG_NAMES["NOBR"] = "nobr"; - TAG_NAMES["NOFRAMES"] = "noframes"; - TAG_NAMES["NOEMBED"] = "noembed"; - TAG_NAMES["NOSCRIPT"] = "noscript"; - TAG_NAMES["OBJECT"] = "object"; - TAG_NAMES["OL"] = "ol"; - TAG_NAMES["OPTGROUP"] = "optgroup"; - TAG_NAMES["OPTION"] = "option"; - TAG_NAMES["P"] = "p"; - TAG_NAMES["PARAM"] = "param"; - TAG_NAMES["PLAINTEXT"] = "plaintext"; - TAG_NAMES["PRE"] = "pre"; - TAG_NAMES["RB"] = "rb"; - TAG_NAMES["RP"] = "rp"; - TAG_NAMES["RT"] = "rt"; - TAG_NAMES["RTC"] = "rtc"; - TAG_NAMES["RUBY"] = "ruby"; - TAG_NAMES["S"] = "s"; - TAG_NAMES["SCRIPT"] = "script"; - TAG_NAMES["SEARCH"] = "search"; - TAG_NAMES["SECTION"] = "section"; - TAG_NAMES["SELECT"] = "select"; - TAG_NAMES["SOURCE"] = "source"; - TAG_NAMES["SMALL"] = "small"; - TAG_NAMES["SPAN"] = "span"; - TAG_NAMES["STRIKE"] = "strike"; - TAG_NAMES["STRONG"] = "strong"; - TAG_NAMES["STYLE"] = "style"; - TAG_NAMES["SUB"] = "sub"; - TAG_NAMES["SUMMARY"] = "summary"; - TAG_NAMES["SUP"] = "sup"; - TAG_NAMES["TABLE"] = "table"; - TAG_NAMES["TBODY"] = "tbody"; - TAG_NAMES["TEMPLATE"] = "template"; - TAG_NAMES["TEXTAREA"] = "textarea"; - TAG_NAMES["TFOOT"] = "tfoot"; - TAG_NAMES["TD"] = "td"; - TAG_NAMES["TH"] = "th"; - TAG_NAMES["THEAD"] = "thead"; - TAG_NAMES["TITLE"] = "title"; - TAG_NAMES["TR"] = "tr"; - TAG_NAMES["TRACK"] = "track"; - TAG_NAMES["TT"] = "tt"; - TAG_NAMES["U"] = "u"; - TAG_NAMES["UL"] = "ul"; - TAG_NAMES["SVG"] = "svg"; - TAG_NAMES["VAR"] = "var"; - TAG_NAMES["WBR"] = "wbr"; - TAG_NAMES["XMP"] = "xmp"; -})(TAG_NAMES || (exports.TAG_NAMES = TAG_NAMES = {})); -/** - * Tag IDs are numeric IDs for known tag names. - * - * We use tag IDs to improve the performance of tag name comparisons. - */ -var TAG_ID; -(function (TAG_ID) { - TAG_ID[TAG_ID["UNKNOWN"] = 0] = "UNKNOWN"; - TAG_ID[TAG_ID["A"] = 1] = "A"; - TAG_ID[TAG_ID["ADDRESS"] = 2] = "ADDRESS"; - TAG_ID[TAG_ID["ANNOTATION_XML"] = 3] = "ANNOTATION_XML"; - TAG_ID[TAG_ID["APPLET"] = 4] = "APPLET"; - TAG_ID[TAG_ID["AREA"] = 5] = "AREA"; - TAG_ID[TAG_ID["ARTICLE"] = 6] = "ARTICLE"; - TAG_ID[TAG_ID["ASIDE"] = 7] = "ASIDE"; - TAG_ID[TAG_ID["B"] = 8] = "B"; - TAG_ID[TAG_ID["BASE"] = 9] = "BASE"; - TAG_ID[TAG_ID["BASEFONT"] = 10] = "BASEFONT"; - TAG_ID[TAG_ID["BGSOUND"] = 11] = "BGSOUND"; - TAG_ID[TAG_ID["BIG"] = 12] = "BIG"; - TAG_ID[TAG_ID["BLOCKQUOTE"] = 13] = "BLOCKQUOTE"; - TAG_ID[TAG_ID["BODY"] = 14] = "BODY"; - TAG_ID[TAG_ID["BR"] = 15] = "BR"; - TAG_ID[TAG_ID["BUTTON"] = 16] = "BUTTON"; - TAG_ID[TAG_ID["CAPTION"] = 17] = "CAPTION"; - TAG_ID[TAG_ID["CENTER"] = 18] = "CENTER"; - TAG_ID[TAG_ID["CODE"] = 19] = "CODE"; - TAG_ID[TAG_ID["COL"] = 20] = "COL"; - TAG_ID[TAG_ID["COLGROUP"] = 21] = "COLGROUP"; - TAG_ID[TAG_ID["DD"] = 22] = "DD"; - TAG_ID[TAG_ID["DESC"] = 23] = "DESC"; - TAG_ID[TAG_ID["DETAILS"] = 24] = "DETAILS"; - TAG_ID[TAG_ID["DIALOG"] = 25] = "DIALOG"; - TAG_ID[TAG_ID["DIR"] = 26] = "DIR"; - TAG_ID[TAG_ID["DIV"] = 27] = "DIV"; - TAG_ID[TAG_ID["DL"] = 28] = "DL"; - TAG_ID[TAG_ID["DT"] = 29] = "DT"; - TAG_ID[TAG_ID["EM"] = 30] = "EM"; - TAG_ID[TAG_ID["EMBED"] = 31] = "EMBED"; - TAG_ID[TAG_ID["FIELDSET"] = 32] = "FIELDSET"; - TAG_ID[TAG_ID["FIGCAPTION"] = 33] = "FIGCAPTION"; - TAG_ID[TAG_ID["FIGURE"] = 34] = "FIGURE"; - TAG_ID[TAG_ID["FONT"] = 35] = "FONT"; - TAG_ID[TAG_ID["FOOTER"] = 36] = "FOOTER"; - TAG_ID[TAG_ID["FOREIGN_OBJECT"] = 37] = "FOREIGN_OBJECT"; - TAG_ID[TAG_ID["FORM"] = 38] = "FORM"; - TAG_ID[TAG_ID["FRAME"] = 39] = "FRAME"; - TAG_ID[TAG_ID["FRAMESET"] = 40] = "FRAMESET"; - TAG_ID[TAG_ID["H1"] = 41] = "H1"; - TAG_ID[TAG_ID["H2"] = 42] = "H2"; - TAG_ID[TAG_ID["H3"] = 43] = "H3"; - TAG_ID[TAG_ID["H4"] = 44] = "H4"; - TAG_ID[TAG_ID["H5"] = 45] = "H5"; - TAG_ID[TAG_ID["H6"] = 46] = "H6"; - TAG_ID[TAG_ID["HEAD"] = 47] = "HEAD"; - TAG_ID[TAG_ID["HEADER"] = 48] = "HEADER"; - TAG_ID[TAG_ID["HGROUP"] = 49] = "HGROUP"; - TAG_ID[TAG_ID["HR"] = 50] = "HR"; - TAG_ID[TAG_ID["HTML"] = 51] = "HTML"; - TAG_ID[TAG_ID["I"] = 52] = "I"; - TAG_ID[TAG_ID["IMG"] = 53] = "IMG"; - TAG_ID[TAG_ID["IMAGE"] = 54] = "IMAGE"; - TAG_ID[TAG_ID["INPUT"] = 55] = "INPUT"; - TAG_ID[TAG_ID["IFRAME"] = 56] = "IFRAME"; - TAG_ID[TAG_ID["KEYGEN"] = 57] = "KEYGEN"; - TAG_ID[TAG_ID["LABEL"] = 58] = "LABEL"; - TAG_ID[TAG_ID["LI"] = 59] = "LI"; - TAG_ID[TAG_ID["LINK"] = 60] = "LINK"; - TAG_ID[TAG_ID["LISTING"] = 61] = "LISTING"; - TAG_ID[TAG_ID["MAIN"] = 62] = "MAIN"; - TAG_ID[TAG_ID["MALIGNMARK"] = 63] = "MALIGNMARK"; - TAG_ID[TAG_ID["MARQUEE"] = 64] = "MARQUEE"; - TAG_ID[TAG_ID["MATH"] = 65] = "MATH"; - TAG_ID[TAG_ID["MENU"] = 66] = "MENU"; - TAG_ID[TAG_ID["META"] = 67] = "META"; - TAG_ID[TAG_ID["MGLYPH"] = 68] = "MGLYPH"; - TAG_ID[TAG_ID["MI"] = 69] = "MI"; - TAG_ID[TAG_ID["MO"] = 70] = "MO"; - TAG_ID[TAG_ID["MN"] = 71] = "MN"; - TAG_ID[TAG_ID["MS"] = 72] = "MS"; - TAG_ID[TAG_ID["MTEXT"] = 73] = "MTEXT"; - TAG_ID[TAG_ID["NAV"] = 74] = "NAV"; - TAG_ID[TAG_ID["NOBR"] = 75] = "NOBR"; - TAG_ID[TAG_ID["NOFRAMES"] = 76] = "NOFRAMES"; - TAG_ID[TAG_ID["NOEMBED"] = 77] = "NOEMBED"; - TAG_ID[TAG_ID["NOSCRIPT"] = 78] = "NOSCRIPT"; - TAG_ID[TAG_ID["OBJECT"] = 79] = "OBJECT"; - TAG_ID[TAG_ID["OL"] = 80] = "OL"; - TAG_ID[TAG_ID["OPTGROUP"] = 81] = "OPTGROUP"; - TAG_ID[TAG_ID["OPTION"] = 82] = "OPTION"; - TAG_ID[TAG_ID["P"] = 83] = "P"; - TAG_ID[TAG_ID["PARAM"] = 84] = "PARAM"; - TAG_ID[TAG_ID["PLAINTEXT"] = 85] = "PLAINTEXT"; - TAG_ID[TAG_ID["PRE"] = 86] = "PRE"; - TAG_ID[TAG_ID["RB"] = 87] = "RB"; - TAG_ID[TAG_ID["RP"] = 88] = "RP"; - TAG_ID[TAG_ID["RT"] = 89] = "RT"; - TAG_ID[TAG_ID["RTC"] = 90] = "RTC"; - TAG_ID[TAG_ID["RUBY"] = 91] = "RUBY"; - TAG_ID[TAG_ID["S"] = 92] = "S"; - TAG_ID[TAG_ID["SCRIPT"] = 93] = "SCRIPT"; - TAG_ID[TAG_ID["SEARCH"] = 94] = "SEARCH"; - TAG_ID[TAG_ID["SECTION"] = 95] = "SECTION"; - TAG_ID[TAG_ID["SELECT"] = 96] = "SELECT"; - TAG_ID[TAG_ID["SOURCE"] = 97] = "SOURCE"; - TAG_ID[TAG_ID["SMALL"] = 98] = "SMALL"; - TAG_ID[TAG_ID["SPAN"] = 99] = "SPAN"; - TAG_ID[TAG_ID["STRIKE"] = 100] = "STRIKE"; - TAG_ID[TAG_ID["STRONG"] = 101] = "STRONG"; - TAG_ID[TAG_ID["STYLE"] = 102] = "STYLE"; - TAG_ID[TAG_ID["SUB"] = 103] = "SUB"; - TAG_ID[TAG_ID["SUMMARY"] = 104] = "SUMMARY"; - TAG_ID[TAG_ID["SUP"] = 105] = "SUP"; - TAG_ID[TAG_ID["TABLE"] = 106] = "TABLE"; - TAG_ID[TAG_ID["TBODY"] = 107] = "TBODY"; - TAG_ID[TAG_ID["TEMPLATE"] = 108] = "TEMPLATE"; - TAG_ID[TAG_ID["TEXTAREA"] = 109] = "TEXTAREA"; - TAG_ID[TAG_ID["TFOOT"] = 110] = "TFOOT"; - TAG_ID[TAG_ID["TD"] = 111] = "TD"; - TAG_ID[TAG_ID["TH"] = 112] = "TH"; - TAG_ID[TAG_ID["THEAD"] = 113] = "THEAD"; - TAG_ID[TAG_ID["TITLE"] = 114] = "TITLE"; - TAG_ID[TAG_ID["TR"] = 115] = "TR"; - TAG_ID[TAG_ID["TRACK"] = 116] = "TRACK"; - TAG_ID[TAG_ID["TT"] = 117] = "TT"; - TAG_ID[TAG_ID["U"] = 118] = "U"; - TAG_ID[TAG_ID["UL"] = 119] = "UL"; - TAG_ID[TAG_ID["SVG"] = 120] = "SVG"; - TAG_ID[TAG_ID["VAR"] = 121] = "VAR"; - TAG_ID[TAG_ID["WBR"] = 122] = "WBR"; - TAG_ID[TAG_ID["XMP"] = 123] = "XMP"; -})(TAG_ID || (exports.TAG_ID = TAG_ID = {})); -const TAG_NAME_TO_ID = new Map([ - [TAG_NAMES.A, TAG_ID.A], - [TAG_NAMES.ADDRESS, TAG_ID.ADDRESS], - [TAG_NAMES.ANNOTATION_XML, TAG_ID.ANNOTATION_XML], - [TAG_NAMES.APPLET, TAG_ID.APPLET], - [TAG_NAMES.AREA, TAG_ID.AREA], - [TAG_NAMES.ARTICLE, TAG_ID.ARTICLE], - [TAG_NAMES.ASIDE, TAG_ID.ASIDE], - [TAG_NAMES.B, TAG_ID.B], - [TAG_NAMES.BASE, TAG_ID.BASE], - [TAG_NAMES.BASEFONT, TAG_ID.BASEFONT], - [TAG_NAMES.BGSOUND, TAG_ID.BGSOUND], - [TAG_NAMES.BIG, TAG_ID.BIG], - [TAG_NAMES.BLOCKQUOTE, TAG_ID.BLOCKQUOTE], - [TAG_NAMES.BODY, TAG_ID.BODY], - [TAG_NAMES.BR, TAG_ID.BR], - [TAG_NAMES.BUTTON, TAG_ID.BUTTON], - [TAG_NAMES.CAPTION, TAG_ID.CAPTION], - [TAG_NAMES.CENTER, TAG_ID.CENTER], - [TAG_NAMES.CODE, TAG_ID.CODE], - [TAG_NAMES.COL, TAG_ID.COL], - [TAG_NAMES.COLGROUP, TAG_ID.COLGROUP], - [TAG_NAMES.DD, TAG_ID.DD], - [TAG_NAMES.DESC, TAG_ID.DESC], - [TAG_NAMES.DETAILS, TAG_ID.DETAILS], - [TAG_NAMES.DIALOG, TAG_ID.DIALOG], - [TAG_NAMES.DIR, TAG_ID.DIR], - [TAG_NAMES.DIV, TAG_ID.DIV], - [TAG_NAMES.DL, TAG_ID.DL], - [TAG_NAMES.DT, TAG_ID.DT], - [TAG_NAMES.EM, TAG_ID.EM], - [TAG_NAMES.EMBED, TAG_ID.EMBED], - [TAG_NAMES.FIELDSET, TAG_ID.FIELDSET], - [TAG_NAMES.FIGCAPTION, TAG_ID.FIGCAPTION], - [TAG_NAMES.FIGURE, TAG_ID.FIGURE], - [TAG_NAMES.FONT, TAG_ID.FONT], - [TAG_NAMES.FOOTER, TAG_ID.FOOTER], - [TAG_NAMES.FOREIGN_OBJECT, TAG_ID.FOREIGN_OBJECT], - [TAG_NAMES.FORM, TAG_ID.FORM], - [TAG_NAMES.FRAME, TAG_ID.FRAME], - [TAG_NAMES.FRAMESET, TAG_ID.FRAMESET], - [TAG_NAMES.H1, TAG_ID.H1], - [TAG_NAMES.H2, TAG_ID.H2], - [TAG_NAMES.H3, TAG_ID.H3], - [TAG_NAMES.H4, TAG_ID.H4], - [TAG_NAMES.H5, TAG_ID.H5], - [TAG_NAMES.H6, TAG_ID.H6], - [TAG_NAMES.HEAD, TAG_ID.HEAD], - [TAG_NAMES.HEADER, TAG_ID.HEADER], - [TAG_NAMES.HGROUP, TAG_ID.HGROUP], - [TAG_NAMES.HR, TAG_ID.HR], - [TAG_NAMES.HTML, TAG_ID.HTML], - [TAG_NAMES.I, TAG_ID.I], - [TAG_NAMES.IMG, TAG_ID.IMG], - [TAG_NAMES.IMAGE, TAG_ID.IMAGE], - [TAG_NAMES.INPUT, TAG_ID.INPUT], - [TAG_NAMES.IFRAME, TAG_ID.IFRAME], - [TAG_NAMES.KEYGEN, TAG_ID.KEYGEN], - [TAG_NAMES.LABEL, TAG_ID.LABEL], - [TAG_NAMES.LI, TAG_ID.LI], - [TAG_NAMES.LINK, TAG_ID.LINK], - [TAG_NAMES.LISTING, TAG_ID.LISTING], - [TAG_NAMES.MAIN, TAG_ID.MAIN], - [TAG_NAMES.MALIGNMARK, TAG_ID.MALIGNMARK], - [TAG_NAMES.MARQUEE, TAG_ID.MARQUEE], - [TAG_NAMES.MATH, TAG_ID.MATH], - [TAG_NAMES.MENU, TAG_ID.MENU], - [TAG_NAMES.META, TAG_ID.META], - [TAG_NAMES.MGLYPH, TAG_ID.MGLYPH], - [TAG_NAMES.MI, TAG_ID.MI], - [TAG_NAMES.MO, TAG_ID.MO], - [TAG_NAMES.MN, TAG_ID.MN], - [TAG_NAMES.MS, TAG_ID.MS], - [TAG_NAMES.MTEXT, TAG_ID.MTEXT], - [TAG_NAMES.NAV, TAG_ID.NAV], - [TAG_NAMES.NOBR, TAG_ID.NOBR], - [TAG_NAMES.NOFRAMES, TAG_ID.NOFRAMES], - [TAG_NAMES.NOEMBED, TAG_ID.NOEMBED], - [TAG_NAMES.NOSCRIPT, TAG_ID.NOSCRIPT], - [TAG_NAMES.OBJECT, TAG_ID.OBJECT], - [TAG_NAMES.OL, TAG_ID.OL], - [TAG_NAMES.OPTGROUP, TAG_ID.OPTGROUP], - [TAG_NAMES.OPTION, TAG_ID.OPTION], - [TAG_NAMES.P, TAG_ID.P], - [TAG_NAMES.PARAM, TAG_ID.PARAM], - [TAG_NAMES.PLAINTEXT, TAG_ID.PLAINTEXT], - [TAG_NAMES.PRE, TAG_ID.PRE], - [TAG_NAMES.RB, TAG_ID.RB], - [TAG_NAMES.RP, TAG_ID.RP], - [TAG_NAMES.RT, TAG_ID.RT], - [TAG_NAMES.RTC, TAG_ID.RTC], - [TAG_NAMES.RUBY, TAG_ID.RUBY], - [TAG_NAMES.S, TAG_ID.S], - [TAG_NAMES.SCRIPT, TAG_ID.SCRIPT], - [TAG_NAMES.SEARCH, TAG_ID.SEARCH], - [TAG_NAMES.SECTION, TAG_ID.SECTION], - [TAG_NAMES.SELECT, TAG_ID.SELECT], - [TAG_NAMES.SOURCE, TAG_ID.SOURCE], - [TAG_NAMES.SMALL, TAG_ID.SMALL], - [TAG_NAMES.SPAN, TAG_ID.SPAN], - [TAG_NAMES.STRIKE, TAG_ID.STRIKE], - [TAG_NAMES.STRONG, TAG_ID.STRONG], - [TAG_NAMES.STYLE, TAG_ID.STYLE], - [TAG_NAMES.SUB, TAG_ID.SUB], - [TAG_NAMES.SUMMARY, TAG_ID.SUMMARY], - [TAG_NAMES.SUP, TAG_ID.SUP], - [TAG_NAMES.TABLE, TAG_ID.TABLE], - [TAG_NAMES.TBODY, TAG_ID.TBODY], - [TAG_NAMES.TEMPLATE, TAG_ID.TEMPLATE], - [TAG_NAMES.TEXTAREA, TAG_ID.TEXTAREA], - [TAG_NAMES.TFOOT, TAG_ID.TFOOT], - [TAG_NAMES.TD, TAG_ID.TD], - [TAG_NAMES.TH, TAG_ID.TH], - [TAG_NAMES.THEAD, TAG_ID.THEAD], - [TAG_NAMES.TITLE, TAG_ID.TITLE], - [TAG_NAMES.TR, TAG_ID.TR], - [TAG_NAMES.TRACK, TAG_ID.TRACK], - [TAG_NAMES.TT, TAG_ID.TT], - [TAG_NAMES.U, TAG_ID.U], - [TAG_NAMES.UL, TAG_ID.UL], - [TAG_NAMES.SVG, TAG_ID.SVG], - [TAG_NAMES.VAR, TAG_ID.VAR], - [TAG_NAMES.WBR, TAG_ID.WBR], - [TAG_NAMES.XMP, TAG_ID.XMP], -]); -function getTagID(tagName) { - var _a; - return (_a = TAG_NAME_TO_ID.get(tagName)) !== null && _a !== void 0 ? _a : TAG_ID.UNKNOWN; -} -const $ = TAG_ID; -exports.SPECIAL_ELEMENTS = { - [NS.HTML]: new Set([ - $.ADDRESS, - $.APPLET, - $.AREA, - $.ARTICLE, - $.ASIDE, - $.BASE, - $.BASEFONT, - $.BGSOUND, - $.BLOCKQUOTE, - $.BODY, - $.BR, - $.BUTTON, - $.CAPTION, - $.CENTER, - $.COL, - $.COLGROUP, - $.DD, - $.DETAILS, - $.DIR, - $.DIV, - $.DL, - $.DT, - $.EMBED, - $.FIELDSET, - $.FIGCAPTION, - $.FIGURE, - $.FOOTER, - $.FORM, - $.FRAME, - $.FRAMESET, - $.H1, - $.H2, - $.H3, - $.H4, - $.H5, - $.H6, - $.HEAD, - $.HEADER, - $.HGROUP, - $.HR, - $.HTML, - $.IFRAME, - $.IMG, - $.INPUT, - $.LI, - $.LINK, - $.LISTING, - $.MAIN, - $.MARQUEE, - $.MENU, - $.META, - $.NAV, - $.NOEMBED, - $.NOFRAMES, - $.NOSCRIPT, - $.OBJECT, - $.OL, - $.P, - $.PARAM, - $.PLAINTEXT, - $.PRE, - $.SCRIPT, - $.SECTION, - $.SELECT, - $.SOURCE, - $.STYLE, - $.SUMMARY, - $.TABLE, - $.TBODY, - $.TD, - $.TEMPLATE, - $.TEXTAREA, - $.TFOOT, - $.TH, - $.THEAD, - $.TITLE, - $.TR, - $.TRACK, - $.UL, - $.WBR, - $.XMP, - ]), - [NS.MATHML]: new Set([$.MI, $.MO, $.MN, $.MS, $.MTEXT, $.ANNOTATION_XML]), - [NS.SVG]: new Set([$.TITLE, $.FOREIGN_OBJECT, $.DESC]), - [NS.XLINK]: new Set(), - [NS.XML]: new Set(), - [NS.XMLNS]: new Set(), -}; -exports.NUMBERED_HEADERS = new Set([$.H1, $.H2, $.H3, $.H4, $.H5, $.H6]); -const UNESCAPED_TEXT = new Set([ - TAG_NAMES.STYLE, - TAG_NAMES.SCRIPT, - TAG_NAMES.XMP, - TAG_NAMES.IFRAME, - TAG_NAMES.NOEMBED, - TAG_NAMES.NOFRAMES, - TAG_NAMES.PLAINTEXT, -]); -function hasUnescapedText(tn, scriptingEnabled) { - return UNESCAPED_TEXT.has(tn) || (scriptingEnabled && tn === TAG_NAMES.NOSCRIPT); -} diff --git a/node_modules/parse5/dist/cjs/common/token.d.ts b/node_modules/parse5/dist/cjs/common/token.d.ts deleted file mode 100644 index 9bcc7dc..0000000 --- a/node_modules/parse5/dist/cjs/common/token.d.ts +++ /dev/null @@ -1,84 +0,0 @@ -import type { TAG_ID } from './html.js'; -export declare enum TokenType { - CHARACTER = 0, - NULL_CHARACTER = 1, - WHITESPACE_CHARACTER = 2, - START_TAG = 3, - END_TAG = 4, - COMMENT = 5, - DOCTYPE = 6, - EOF = 7, - HIBERNATION = 8 -} -export interface Location { - /** One-based line index of the first character. */ - startLine: number; - /** One-based column index of the first character. */ - startCol: number; - /** Zero-based first character index. */ - startOffset: number; - /** One-based line index of the last character. */ - endLine: number; - /** One-based column index of the last character. Points directly *after* the last character. */ - endCol: number; - /** Zero-based last character index. Points directly *after* the last character. */ - endOffset: number; -} -export interface LocationWithAttributes extends Location { - /** Start tag attributes' location info. */ - attrs?: Record<string, Location>; -} -export interface ElementLocation extends LocationWithAttributes { - /** Element's start tag location info. */ - startTag?: Location; - /** - * Element's end tag location info. - * This property is undefined, if the element has no closing tag. - */ - endTag?: Location; -} -interface TokenBase { - readonly type: TokenType; - location: Location | null; -} -export interface DoctypeToken extends TokenBase { - readonly type: TokenType.DOCTYPE; - name: string | null; - forceQuirks: boolean; - publicId: string | null; - systemId: string | null; -} -export interface Attribute { - /** The name of the attribute. */ - name: string; - /** The namespace of the attribute. */ - namespace?: string; - /** The namespace-related prefix of the attribute. */ - prefix?: string; - /** The value of the attribute. */ - value: string; -} -export interface TagToken extends TokenBase { - readonly type: TokenType.START_TAG | TokenType.END_TAG; - tagName: string; - /** Used to cache the ID of the tag name. */ - tagID: TAG_ID; - selfClosing: boolean; - ackSelfClosing: boolean; - attrs: Attribute[]; - location: LocationWithAttributes | null; -} -export declare function getTokenAttr(token: TagToken, attrName: string): string | null; -export interface CommentToken extends TokenBase { - readonly type: TokenType.COMMENT; - data: string; -} -export interface EOFToken extends TokenBase { - readonly type: TokenType.EOF; -} -export interface CharacterToken extends TokenBase { - type: TokenType.CHARACTER | TokenType.NULL_CHARACTER | TokenType.WHITESPACE_CHARACTER; - chars: string; -} -export type Token = DoctypeToken | TagToken | CommentToken | EOFToken | CharacterToken; -export {}; diff --git a/node_modules/parse5/dist/cjs/common/token.js b/node_modules/parse5/dist/cjs/common/token.js deleted file mode 100644 index a46f0f2..0000000 --- a/node_modules/parse5/dist/cjs/common/token.js +++ /dev/null @@ -1,24 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.TokenType = void 0; -exports.getTokenAttr = getTokenAttr; -var TokenType; -(function (TokenType) { - TokenType[TokenType["CHARACTER"] = 0] = "CHARACTER"; - TokenType[TokenType["NULL_CHARACTER"] = 1] = "NULL_CHARACTER"; - TokenType[TokenType["WHITESPACE_CHARACTER"] = 2] = "WHITESPACE_CHARACTER"; - TokenType[TokenType["START_TAG"] = 3] = "START_TAG"; - TokenType[TokenType["END_TAG"] = 4] = "END_TAG"; - TokenType[TokenType["COMMENT"] = 5] = "COMMENT"; - TokenType[TokenType["DOCTYPE"] = 6] = "DOCTYPE"; - TokenType[TokenType["EOF"] = 7] = "EOF"; - TokenType[TokenType["HIBERNATION"] = 8] = "HIBERNATION"; -})(TokenType || (exports.TokenType = TokenType = {})); -function getTokenAttr(token, attrName) { - for (let i = token.attrs.length - 1; i >= 0; i--) { - if (token.attrs[i].name === attrName) { - return token.attrs[i].value; - } - } - return null; -} diff --git a/node_modules/parse5/dist/cjs/common/unicode.d.ts b/node_modules/parse5/dist/cjs/common/unicode.d.ts deleted file mode 100644 index 63eda8b..0000000 --- a/node_modules/parse5/dist/cjs/common/unicode.d.ts +++ /dev/null @@ -1,42 +0,0 @@ -export declare const REPLACEMENT_CHARACTER = "\uFFFD"; -export declare enum CODE_POINTS { - EOF = -1, - NULL = 0, - TABULATION = 9, - CARRIAGE_RETURN = 13, - LINE_FEED = 10, - FORM_FEED = 12, - SPACE = 32, - EXCLAMATION_MARK = 33, - QUOTATION_MARK = 34, - AMPERSAND = 38, - APOSTROPHE = 39, - HYPHEN_MINUS = 45, - SOLIDUS = 47, - DIGIT_0 = 48, - DIGIT_9 = 57, - SEMICOLON = 59, - LESS_THAN_SIGN = 60, - EQUALS_SIGN = 61, - GREATER_THAN_SIGN = 62, - QUESTION_MARK = 63, - LATIN_CAPITAL_A = 65, - LATIN_CAPITAL_Z = 90, - RIGHT_SQUARE_BRACKET = 93, - GRAVE_ACCENT = 96, - LATIN_SMALL_A = 97, - LATIN_SMALL_Z = 122 -} -export declare const SEQUENCES: { - DASH_DASH: string; - CDATA_START: string; - DOCTYPE: string; - SCRIPT: string; - PUBLIC: string; - SYSTEM: string; -}; -export declare function isSurrogate(cp: number): boolean; -export declare function isSurrogatePair(cp: number): boolean; -export declare function getSurrogatePairCodePoint(cp1: number, cp2: number): number; -export declare function isControlCodePoint(cp: number): boolean; -export declare function isUndefinedCodePoint(cp: number): boolean; diff --git a/node_modules/parse5/dist/cjs/common/unicode.js b/node_modules/parse5/dist/cjs/common/unicode.js deleted file mode 100644 index a2b317f..0000000 --- a/node_modules/parse5/dist/cjs/common/unicode.js +++ /dev/null @@ -1,70 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.SEQUENCES = exports.CODE_POINTS = exports.REPLACEMENT_CHARACTER = void 0; -exports.isSurrogate = isSurrogate; -exports.isSurrogatePair = isSurrogatePair; -exports.getSurrogatePairCodePoint = getSurrogatePairCodePoint; -exports.isControlCodePoint = isControlCodePoint; -exports.isUndefinedCodePoint = isUndefinedCodePoint; -const UNDEFINED_CODE_POINTS = new Set([ - 65534, 65535, 131070, 131071, 196606, 196607, 262142, 262143, 327678, 327679, 393214, - 393215, 458750, 458751, 524286, 524287, 589822, 589823, 655358, 655359, 720894, - 720895, 786430, 786431, 851966, 851967, 917502, 917503, 983038, 983039, 1048574, - 1048575, 1114110, 1114111, -]); -exports.REPLACEMENT_CHARACTER = '\uFFFD'; -var CODE_POINTS; -(function (CODE_POINTS) { - CODE_POINTS[CODE_POINTS["EOF"] = -1] = "EOF"; - CODE_POINTS[CODE_POINTS["NULL"] = 0] = "NULL"; - CODE_POINTS[CODE_POINTS["TABULATION"] = 9] = "TABULATION"; - CODE_POINTS[CODE_POINTS["CARRIAGE_RETURN"] = 13] = "CARRIAGE_RETURN"; - CODE_POINTS[CODE_POINTS["LINE_FEED"] = 10] = "LINE_FEED"; - CODE_POINTS[CODE_POINTS["FORM_FEED"] = 12] = "FORM_FEED"; - CODE_POINTS[CODE_POINTS["SPACE"] = 32] = "SPACE"; - CODE_POINTS[CODE_POINTS["EXCLAMATION_MARK"] = 33] = "EXCLAMATION_MARK"; - CODE_POINTS[CODE_POINTS["QUOTATION_MARK"] = 34] = "QUOTATION_MARK"; - CODE_POINTS[CODE_POINTS["AMPERSAND"] = 38] = "AMPERSAND"; - CODE_POINTS[CODE_POINTS["APOSTROPHE"] = 39] = "APOSTROPHE"; - CODE_POINTS[CODE_POINTS["HYPHEN_MINUS"] = 45] = "HYPHEN_MINUS"; - CODE_POINTS[CODE_POINTS["SOLIDUS"] = 47] = "SOLIDUS"; - CODE_POINTS[CODE_POINTS["DIGIT_0"] = 48] = "DIGIT_0"; - CODE_POINTS[CODE_POINTS["DIGIT_9"] = 57] = "DIGIT_9"; - CODE_POINTS[CODE_POINTS["SEMICOLON"] = 59] = "SEMICOLON"; - CODE_POINTS[CODE_POINTS["LESS_THAN_SIGN"] = 60] = "LESS_THAN_SIGN"; - CODE_POINTS[CODE_POINTS["EQUALS_SIGN"] = 61] = "EQUALS_SIGN"; - CODE_POINTS[CODE_POINTS["GREATER_THAN_SIGN"] = 62] = "GREATER_THAN_SIGN"; - CODE_POINTS[CODE_POINTS["QUESTION_MARK"] = 63] = "QUESTION_MARK"; - CODE_POINTS[CODE_POINTS["LATIN_CAPITAL_A"] = 65] = "LATIN_CAPITAL_A"; - CODE_POINTS[CODE_POINTS["LATIN_CAPITAL_Z"] = 90] = "LATIN_CAPITAL_Z"; - CODE_POINTS[CODE_POINTS["RIGHT_SQUARE_BRACKET"] = 93] = "RIGHT_SQUARE_BRACKET"; - CODE_POINTS[CODE_POINTS["GRAVE_ACCENT"] = 96] = "GRAVE_ACCENT"; - CODE_POINTS[CODE_POINTS["LATIN_SMALL_A"] = 97] = "LATIN_SMALL_A"; - CODE_POINTS[CODE_POINTS["LATIN_SMALL_Z"] = 122] = "LATIN_SMALL_Z"; -})(CODE_POINTS || (exports.CODE_POINTS = CODE_POINTS = {})); -exports.SEQUENCES = { - DASH_DASH: '--', - CDATA_START: '[CDATA[', - DOCTYPE: 'doctype', - SCRIPT: 'script', - PUBLIC: 'public', - SYSTEM: 'system', -}; -//Surrogates -function isSurrogate(cp) { - return cp >= 55296 && cp <= 57343; -} -function isSurrogatePair(cp) { - return cp >= 56320 && cp <= 57343; -} -function getSurrogatePairCodePoint(cp1, cp2) { - return (cp1 - 55296) * 1024 + 9216 + cp2; -} -//NOTE: excluding NULL and ASCII whitespace -function isControlCodePoint(cp) { - return ((cp !== 0x20 && cp !== 0x0a && cp !== 0x0d && cp !== 0x09 && cp !== 0x0c && cp >= 0x01 && cp <= 0x1f) || - (cp >= 0x7f && cp <= 0x9f)); -} -function isUndefinedCodePoint(cp) { - return (cp >= 64976 && cp <= 65007) || UNDEFINED_CODE_POINTS.has(cp); -} diff --git a/node_modules/parse5/dist/cjs/index.d.ts b/node_modules/parse5/dist/cjs/index.d.ts deleted file mode 100644 index 25540bd..0000000 --- a/node_modules/parse5/dist/cjs/index.d.ts +++ /dev/null @@ -1,71 +0,0 @@ -import { type ParserOptions } from './parser/index.js'; -import type { DefaultTreeAdapterMap } from './tree-adapters/default.js'; -import type { TreeAdapterTypeMap } from './tree-adapters/interface.js'; -export { type DefaultTreeAdapterMap, defaultTreeAdapter } from './tree-adapters/default.js'; -import type * as DefaultTreeAdapter from './tree-adapters/default.js'; -export declare namespace DefaultTreeAdapterTypes { - type Document = DefaultTreeAdapter.Document; - type DocumentFragment = DefaultTreeAdapter.DocumentFragment; - type Element = DefaultTreeAdapter.Element; - type CommentNode = DefaultTreeAdapter.CommentNode; - type TextNode = DefaultTreeAdapter.TextNode; - type Template = DefaultTreeAdapter.Template; - type DocumentType = DefaultTreeAdapter.DocumentType; - type ParentNode = DefaultTreeAdapter.ParentNode; - type ChildNode = DefaultTreeAdapter.ChildNode; - type Node = DefaultTreeAdapter.Node; - type DefaultTreeAdapterMap = DefaultTreeAdapter.DefaultTreeAdapterMap; -} -export type { TreeAdapter, TreeAdapterTypeMap } from './tree-adapters/interface.js'; -export { type ParserOptions, /** @internal */ Parser } from './parser/index.js'; -export { serialize, serializeOuter, type SerializerOptions } from './serializer/index.js'; -export { ERR as ErrorCodes, type ParserError, type ParserErrorHandler } from './common/error-codes.js'; -/** @internal */ -export * as foreignContent from './common/foreign-content.js'; -export * as html from './common/html.js'; -export * as Token from './common/token.js'; -/** @internal */ -export { Tokenizer, type TokenizerOptions, TokenizerMode, type TokenHandler } from './tokenizer/index.js'; -/** - * Parses an HTML string. - * - * @param html Input HTML string. - * @param options Parsing options. - * @returns Document - * - * @example - * - * ```js - * const parse5 = require('parse5'); - * - * const document = parse5.parse('<!DOCTYPE html><html><head></head><body>Hi there!</body></html>'); - * - * console.log(document.childNodes[1].tagName); //> 'html' - *``` - */ -export declare function parse<T extends TreeAdapterTypeMap = DefaultTreeAdapterMap>(html: string, options?: ParserOptions<T>): T['document']; -/** - * Parses an HTML fragment. - * - * @example - * - * ```js - * const parse5 = require('parse5'); - * - * const documentFragment = parse5.parseFragment('<table></table>'); - * - * console.log(documentFragment.childNodes[0].tagName); //> 'table' - * - * // Parses the html fragment in the context of the parsed <table> element. - * const trFragment = parse5.parseFragment(documentFragment.childNodes[0], '<tr><td>Shake it, baby</td></tr>'); - * - * console.log(trFragment.childNodes[0].childNodes[0].tagName); //> 'td' - * ``` - * - * @param fragmentContext Parsing context element. If specified, given fragment will be parsed as if it was set to the context element's `innerHTML` property. - * @param html Input HTML fragment string. - * @param options Parsing options. - * @returns DocumentFragment - */ -export declare function parseFragment<T extends TreeAdapterTypeMap = DefaultTreeAdapterMap>(fragmentContext: T['parentNode'] | null, html: string, options: ParserOptions<T>): T['documentFragment']; -export declare function parseFragment<T extends TreeAdapterTypeMap = DefaultTreeAdapterMap>(html: string, options?: ParserOptions<T>): T['documentFragment']; diff --git a/node_modules/parse5/dist/cjs/index.js b/node_modules/parse5/dist/cjs/index.js deleted file mode 100644 index 0032389..0000000 --- a/node_modules/parse5/dist/cjs/index.js +++ /dev/null @@ -1,54 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.TokenizerMode = exports.Tokenizer = exports.Token = exports.html = exports.foreignContent = exports.ErrorCodes = exports.serializeOuter = exports.serialize = exports.Parser = exports.defaultTreeAdapter = void 0; -exports.parse = parse; -exports.parseFragment = parseFragment; -const index_js_1 = require("./parser/index.js"); -var default_js_1 = require("./tree-adapters/default.js"); -Object.defineProperty(exports, "defaultTreeAdapter", { enumerable: true, get: function () { return default_js_1.defaultTreeAdapter; } }); -var index_js_2 = require("./parser/index.js"); -Object.defineProperty(exports, "Parser", { enumerable: true, get: function () { return index_js_2.Parser; } }); -var index_js_3 = require("./serializer/index.js"); -Object.defineProperty(exports, "serialize", { enumerable: true, get: function () { return index_js_3.serialize; } }); -Object.defineProperty(exports, "serializeOuter", { enumerable: true, get: function () { return index_js_3.serializeOuter; } }); -var error_codes_js_1 = require("./common/error-codes.js"); -Object.defineProperty(exports, "ErrorCodes", { enumerable: true, get: function () { return error_codes_js_1.ERR; } }); -/** @internal */ -exports.foreignContent = require("./common/foreign-content.js"); -exports.html = require("./common/html.js"); -exports.Token = require("./common/token.js"); -/** @internal */ -var index_js_4 = require("./tokenizer/index.js"); -Object.defineProperty(exports, "Tokenizer", { enumerable: true, get: function () { return index_js_4.Tokenizer; } }); -Object.defineProperty(exports, "TokenizerMode", { enumerable: true, get: function () { return index_js_4.TokenizerMode; } }); -// Shorthands -/** - * Parses an HTML string. - * - * @param html Input HTML string. - * @param options Parsing options. - * @returns Document - * - * @example - * - * ```js - * const parse5 = require('parse5'); - * - * const document = parse5.parse('<!DOCTYPE html><html><head></head><body>Hi there!</body></html>'); - * - * console.log(document.childNodes[1].tagName); //> 'html' - *``` - */ -function parse(html, options) { - return index_js_1.Parser.parse(html, options); -} -function parseFragment(fragmentContext, html, options) { - if (typeof fragmentContext === 'string') { - options = html; - html = fragmentContext; - fragmentContext = null; - } - const parser = index_js_1.Parser.getFragmentParser(fragmentContext, options); - parser.tokenizer.write(html, true); - return parser.getFragment(); -} diff --git a/node_modules/parse5/dist/cjs/package.json b/node_modules/parse5/dist/cjs/package.json deleted file mode 100644 index 729ac4d..0000000 --- a/node_modules/parse5/dist/cjs/package.json +++ /dev/null @@ -1 +0,0 @@ -{"type":"commonjs"} diff --git a/node_modules/parse5/dist/cjs/parser/formatting-element-list.d.ts b/node_modules/parse5/dist/cjs/parser/formatting-element-list.d.ts deleted file mode 100644 index 1d421b6..0000000 --- a/node_modules/parse5/dist/cjs/parser/formatting-element-list.d.ts +++ /dev/null @@ -1,36 +0,0 @@ -import type { TagToken } from '../common/token.js'; -import type { TreeAdapter, TreeAdapterTypeMap } from '../tree-adapters/interface.js'; -export declare enum EntryType { - Marker = 0, - Element = 1 -} -interface MarkerEntry { - type: EntryType.Marker; -} -export interface ElementEntry<T extends TreeAdapterTypeMap> { - type: EntryType.Element; - element: T['element']; - token: TagToken; -} -export type Entry<T extends TreeAdapterTypeMap> = MarkerEntry | ElementEntry<T>; -export declare class FormattingElementList<T extends TreeAdapterTypeMap> { - private treeAdapter; - entries: Entry<T>[]; - bookmark: Entry<T> | null; - constructor(treeAdapter: TreeAdapter<T>); - private _getNoahArkConditionCandidates; - private _ensureNoahArkCondition; - insertMarker(): void; - pushElement(element: T['element'], token: TagToken): void; - insertElementAfterBookmark(element: T['element'], token: TagToken): void; - removeEntry(entry: Entry<T>): void; - /** - * Clears the list of formatting elements up to the last marker. - * - * @see https://html.spec.whatwg.org/multipage/parsing.html#clear-the-list-of-active-formatting-elements-up-to-the-last-marker - */ - clearToLastMarker(): void; - getElementEntryInScopeWithTagName(tagName: string): ElementEntry<T> | null; - getElementEntry(element: T['element']): ElementEntry<T> | undefined; -} -export {}; diff --git a/node_modules/parse5/dist/cjs/parser/formatting-element-list.js b/node_modules/parse5/dist/cjs/parser/formatting-element-list.js deleted file mode 100644 index ff087a5..0000000 --- a/node_modules/parse5/dist/cjs/parser/formatting-element-list.js +++ /dev/null @@ -1,114 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.FormattingElementList = exports.EntryType = void 0; -//Const -const NOAH_ARK_CAPACITY = 3; -var EntryType; -(function (EntryType) { - EntryType[EntryType["Marker"] = 0] = "Marker"; - EntryType[EntryType["Element"] = 1] = "Element"; -})(EntryType || (exports.EntryType = EntryType = {})); -const MARKER = { type: EntryType.Marker }; -//List of formatting elements -class FormattingElementList { - constructor(treeAdapter) { - this.treeAdapter = treeAdapter; - this.entries = []; - this.bookmark = null; - } - //Noah Ark's condition - //OPTIMIZATION: at first we try to find possible candidates for exclusion using - //lightweight heuristics without thorough attributes check. - _getNoahArkConditionCandidates(newElement, neAttrs) { - const candidates = []; - const neAttrsLength = neAttrs.length; - const neTagName = this.treeAdapter.getTagName(newElement); - const neNamespaceURI = this.treeAdapter.getNamespaceURI(newElement); - for (let i = 0; i < this.entries.length; i++) { - const entry = this.entries[i]; - if (entry.type === EntryType.Marker) { - break; - } - const { element } = entry; - if (this.treeAdapter.getTagName(element) === neTagName && - this.treeAdapter.getNamespaceURI(element) === neNamespaceURI) { - const elementAttrs = this.treeAdapter.getAttrList(element); - if (elementAttrs.length === neAttrsLength) { - candidates.push({ idx: i, attrs: elementAttrs }); - } - } - } - return candidates; - } - _ensureNoahArkCondition(newElement) { - if (this.entries.length < NOAH_ARK_CAPACITY) - return; - const neAttrs = this.treeAdapter.getAttrList(newElement); - const candidates = this._getNoahArkConditionCandidates(newElement, neAttrs); - if (candidates.length < NOAH_ARK_CAPACITY) - return; - //NOTE: build attrs map for the new element, so we can perform fast lookups - const neAttrsMap = new Map(neAttrs.map((neAttr) => [neAttr.name, neAttr.value])); - let validCandidates = 0; - //NOTE: remove bottommost candidates, until Noah's Ark condition will not be met - for (let i = 0; i < candidates.length; i++) { - const candidate = candidates[i]; - // We know that `candidate.attrs.length === neAttrs.length` - if (candidate.attrs.every((cAttr) => neAttrsMap.get(cAttr.name) === cAttr.value)) { - validCandidates += 1; - if (validCandidates >= NOAH_ARK_CAPACITY) { - this.entries.splice(candidate.idx, 1); - } - } - } - } - //Mutations - insertMarker() { - this.entries.unshift(MARKER); - } - pushElement(element, token) { - this._ensureNoahArkCondition(element); - this.entries.unshift({ - type: EntryType.Element, - element, - token, - }); - } - insertElementAfterBookmark(element, token) { - const bookmarkIdx = this.entries.indexOf(this.bookmark); - this.entries.splice(bookmarkIdx, 0, { - type: EntryType.Element, - element, - token, - }); - } - removeEntry(entry) { - const entryIndex = this.entries.indexOf(entry); - if (entryIndex >= 0) { - this.entries.splice(entryIndex, 1); - } - } - /** - * Clears the list of formatting elements up to the last marker. - * - * @see https://html.spec.whatwg.org/multipage/parsing.html#clear-the-list-of-active-formatting-elements-up-to-the-last-marker - */ - clearToLastMarker() { - const markerIdx = this.entries.indexOf(MARKER); - if (markerIdx >= 0) { - this.entries.splice(0, markerIdx + 1); - } - else { - this.entries.length = 0; - } - } - //Search - getElementEntryInScopeWithTagName(tagName) { - const entry = this.entries.find((entry) => entry.type === EntryType.Marker || this.treeAdapter.getTagName(entry.element) === tagName); - return entry && entry.type === EntryType.Element ? entry : null; - } - getElementEntry(element) { - return this.entries.find((entry) => entry.type === EntryType.Element && entry.element === element); - } -} -exports.FormattingElementList = FormattingElementList; diff --git a/node_modules/parse5/dist/cjs/parser/index.d.ts b/node_modules/parse5/dist/cjs/parser/index.d.ts deleted file mode 100644 index 07880e1..0000000 --- a/node_modules/parse5/dist/cjs/parser/index.d.ts +++ /dev/null @@ -1,221 +0,0 @@ -import { Tokenizer, TokenizerMode, type TokenHandler } from '../tokenizer/index.js'; -import { OpenElementStack, type StackHandler } from './open-element-stack.js'; -import { FormattingElementList } from './formatting-element-list.js'; -import { ERR, type ParserErrorHandler } from '../common/error-codes.js'; -import { TAG_ID as $, NS } from '../common/html.js'; -import type { TreeAdapter, TreeAdapterTypeMap } from '../tree-adapters/interface.js'; -import { type Token, type CommentToken, type CharacterToken, type TagToken, type DoctypeToken, type EOFToken, type LocationWithAttributes } from '../common/token.js'; -declare enum InsertionMode { - INITIAL = 0, - BEFORE_HTML = 1, - BEFORE_HEAD = 2, - IN_HEAD = 3, - IN_HEAD_NO_SCRIPT = 4, - AFTER_HEAD = 5, - IN_BODY = 6, - TEXT = 7, - IN_TABLE = 8, - IN_TABLE_TEXT = 9, - IN_CAPTION = 10, - IN_COLUMN_GROUP = 11, - IN_TABLE_BODY = 12, - IN_ROW = 13, - IN_CELL = 14, - IN_SELECT = 15, - IN_SELECT_IN_TABLE = 16, - IN_TEMPLATE = 17, - AFTER_BODY = 18, - IN_FRAMESET = 19, - AFTER_FRAMESET = 20, - AFTER_AFTER_BODY = 21, - AFTER_AFTER_FRAMESET = 22 -} -export interface ParserOptions<T extends TreeAdapterTypeMap> { - /** - * The [scripting flag](https://html.spec.whatwg.org/multipage/parsing.html#scripting-flag). If set - * to `true`, `noscript` element content will be parsed as text. - * - * @default `true` - */ - scriptingEnabled?: boolean; - /** - * Enables source code location information. When enabled, each node (except the root node) - * will have a `sourceCodeLocation` property. If the node is not an empty element, `sourceCodeLocation` will - * be a {@link ElementLocation} object, otherwise it will be {@link Location}. - * If the element was implicitly created by the parser (as part of - * [tree correction](https://html.spec.whatwg.org/multipage/syntax.html#an-introduction-to-error-handling-and-strange-cases-in-the-parser)), - * its `sourceCodeLocation` property will be `undefined`. - * - * @default `false` - */ - sourceCodeLocationInfo?: boolean; - /** - * Specifies the resulting tree format. - * - * @default `treeAdapters.default` - */ - treeAdapter?: TreeAdapter<T>; - /** - * Callback for parse errors. - * - * @default `null` - */ - onParseError?: ParserErrorHandler | null; -} -export declare class Parser<T extends TreeAdapterTypeMap> implements TokenHandler, StackHandler<T> { - /** @internal */ - fragmentContext: T['element'] | null; - /** @internal */ - scriptHandler: null | ((pendingScript: T['element']) => void); - treeAdapter: TreeAdapter<T>; - /** @internal */ - onParseError: ParserErrorHandler | null; - protected currentToken: Token | null; - options: Required<ParserOptions<T>>; - document: T['document']; - constructor(options?: ParserOptions<T>, document?: T['document'], - /** @internal */ - fragmentContext?: T['element'] | null, - /** @internal */ - scriptHandler?: null | ((pendingScript: T['element']) => void)); - static parse<T extends TreeAdapterTypeMap>(html: string, options?: ParserOptions<T>): T['document']; - static getFragmentParser<T extends TreeAdapterTypeMap>(fragmentContext?: T['parentNode'] | null, options?: ParserOptions<T>): Parser<T>; - getFragment(): T['documentFragment']; - tokenizer: Tokenizer; - stopped: boolean; - /** @internal */ - insertionMode: InsertionMode; - /** @internal */ - originalInsertionMode: InsertionMode; - /** @internal */ - fragmentContextID: $; - /** @internal */ - headElement: null | T['element']; - /** @internal */ - formElement: null | T['element']; - /** @internal */ - openElements: OpenElementStack<T>; - /** @internal */ - activeFormattingElements: FormattingElementList<T>; - /** Indicates that the current node is not an element in the HTML namespace */ - protected currentNotInHTML: boolean; - /** - * The template insertion mode stack is maintained from the left. - * Ie. the topmost element will always have index 0. - * - * @internal - */ - tmplInsertionModeStack: InsertionMode[]; - /** @internal */ - pendingCharacterTokens: CharacterToken[]; - /** @internal */ - hasNonWhitespacePendingCharacterToken: boolean; - /** @internal */ - framesetOk: boolean; - /** @internal */ - skipNextNewLine: boolean; - /** @internal */ - fosterParentingEnabled: boolean; - /** @internal */ - _err(token: Token, code: ERR, beforeToken?: boolean): void; - /** @internal */ - onItemPush(node: T['parentNode'], tid: number, isTop: boolean): void; - /** @internal */ - onItemPop(node: T['parentNode'], isTop: boolean): void; - protected _setContextModes(current: T['parentNode'], tid: number): void; - /** @protected */ - _switchToTextParsing(currentToken: TagToken, nextTokenizerState: (typeof TokenizerMode)[keyof typeof TokenizerMode]): void; - switchToPlaintextParsing(): void; - /** @protected */ - _getAdjustedCurrentElement(): T['element']; - /** @protected */ - _findFormInFragmentContext(): void; - protected _initTokenizerForFragmentParsing(): void; - /** @protected */ - _setDocumentType(token: DoctypeToken): void; - /** @protected */ - _attachElementToTree(element: T['element'], location: LocationWithAttributes | null): void; - /** - * For self-closing tags. Add an element to the tree, but skip adding it - * to the stack. - */ - /** @protected */ - _appendElement(token: TagToken, namespaceURI: NS): void; - /** @protected */ - _insertElement(token: TagToken, namespaceURI: NS): void; - /** @protected */ - _insertFakeElement(tagName: string, tagID: $): void; - /** @protected */ - _insertTemplate(token: TagToken): void; - /** @protected */ - _insertFakeRootElement(): void; - /** @protected */ - _appendCommentNode(token: CommentToken, parent: T['parentNode']): void; - /** @protected */ - _insertCharacters(token: CharacterToken): void; - /** @protected */ - _adoptNodes(donor: T['parentNode'], recipient: T['parentNode']): void; - /** @protected */ - _setEndLocation(element: T['element'], closingToken: Token): void; - protected shouldProcessStartTagTokenInForeignContent(token: TagToken): boolean; - /** @protected */ - _processToken(token: Token): void; - /** @protected */ - _isIntegrationPoint(tid: $, element: T['element'], foreignNS?: NS): boolean; - /** @protected */ - _reconstructActiveFormattingElements(): void; - /** @protected */ - _closeTableCell(): void; - /** @protected */ - _closePElement(): void; - /** @protected */ - _resetInsertionMode(): void; - /** @protected */ - _resetInsertionModeForSelect(selectIdx: number): void; - /** @protected */ - _isElementCausesFosterParenting(tn: $): boolean; - /** @protected */ - _shouldFosterParentOnInsertion(): boolean; - /** @protected */ - _findFosterParentingLocation(): { - parent: T['parentNode']; - beforeElement: T['element'] | null; - }; - /** @protected */ - _fosterParentElement(element: T['element']): void; - /** @protected */ - _isSpecialElement(element: T['element'], id: $): boolean; - /** @internal */ - onCharacter(token: CharacterToken): void; - /** @internal */ - onNullCharacter(token: CharacterToken): void; - /** @internal */ - onComment(token: CommentToken): void; - /** @internal */ - onDoctype(token: DoctypeToken): void; - /** @internal */ - onStartTag(token: TagToken): void; - /** - * Processes a given start tag. - * - * `onStartTag` checks if a self-closing tag was recognized. When a token - * is moved inbetween multiple insertion modes, this check for self-closing - * could lead to false positives. To avoid this, `_processStartTag` is used - * for nested calls. - * - * @param token The token to process. - * @protected - */ - _processStartTag(token: TagToken): void; - /** @protected */ - _startTagOutsideForeignContent(token: TagToken): void; - /** @internal */ - onEndTag(token: TagToken): void; - /** @protected */ - _endTagOutsideForeignContent(token: TagToken): void; - /** @internal */ - onEof(token: EOFToken): void; - /** @internal */ - onWhitespaceCharacter(token: CharacterToken): void; -} -export {}; diff --git a/node_modules/parse5/dist/cjs/parser/index.js b/node_modules/parse5/dist/cjs/parser/index.js deleted file mode 100644 index 35efe74..0000000 --- a/node_modules/parse5/dist/cjs/parser/index.js +++ /dev/null @@ -1,3235 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.Parser = void 0; -const index_js_1 = require("../tokenizer/index.js"); -const open_element_stack_js_1 = require("./open-element-stack.js"); -const formatting_element_list_js_1 = require("./formatting-element-list.js"); -const default_js_1 = require("../tree-adapters/default.js"); -const doctype = require("../common/doctype.js"); -const foreignContent = require("../common/foreign-content.js"); -const error_codes_js_1 = require("../common/error-codes.js"); -const unicode = require("../common/unicode.js"); -const html_js_1 = require("../common/html.js"); -const token_js_1 = require("../common/token.js"); -//Misc constants -const HIDDEN_INPUT_TYPE = 'hidden'; -//Adoption agency loops iteration count -const AA_OUTER_LOOP_ITER = 8; -const AA_INNER_LOOP_ITER = 3; -//Insertion modes -var InsertionMode; -(function (InsertionMode) { - InsertionMode[InsertionMode["INITIAL"] = 0] = "INITIAL"; - InsertionMode[InsertionMode["BEFORE_HTML"] = 1] = "BEFORE_HTML"; - InsertionMode[InsertionMode["BEFORE_HEAD"] = 2] = "BEFORE_HEAD"; - InsertionMode[InsertionMode["IN_HEAD"] = 3] = "IN_HEAD"; - InsertionMode[InsertionMode["IN_HEAD_NO_SCRIPT"] = 4] = "IN_HEAD_NO_SCRIPT"; - InsertionMode[InsertionMode["AFTER_HEAD"] = 5] = "AFTER_HEAD"; - InsertionMode[InsertionMode["IN_BODY"] = 6] = "IN_BODY"; - InsertionMode[InsertionMode["TEXT"] = 7] = "TEXT"; - InsertionMode[InsertionMode["IN_TABLE"] = 8] = "IN_TABLE"; - InsertionMode[InsertionMode["IN_TABLE_TEXT"] = 9] = "IN_TABLE_TEXT"; - InsertionMode[InsertionMode["IN_CAPTION"] = 10] = "IN_CAPTION"; - InsertionMode[InsertionMode["IN_COLUMN_GROUP"] = 11] = "IN_COLUMN_GROUP"; - InsertionMode[InsertionMode["IN_TABLE_BODY"] = 12] = "IN_TABLE_BODY"; - InsertionMode[InsertionMode["IN_ROW"] = 13] = "IN_ROW"; - InsertionMode[InsertionMode["IN_CELL"] = 14] = "IN_CELL"; - InsertionMode[InsertionMode["IN_SELECT"] = 15] = "IN_SELECT"; - InsertionMode[InsertionMode["IN_SELECT_IN_TABLE"] = 16] = "IN_SELECT_IN_TABLE"; - InsertionMode[InsertionMode["IN_TEMPLATE"] = 17] = "IN_TEMPLATE"; - InsertionMode[InsertionMode["AFTER_BODY"] = 18] = "AFTER_BODY"; - InsertionMode[InsertionMode["IN_FRAMESET"] = 19] = "IN_FRAMESET"; - InsertionMode[InsertionMode["AFTER_FRAMESET"] = 20] = "AFTER_FRAMESET"; - InsertionMode[InsertionMode["AFTER_AFTER_BODY"] = 21] = "AFTER_AFTER_BODY"; - InsertionMode[InsertionMode["AFTER_AFTER_FRAMESET"] = 22] = "AFTER_AFTER_FRAMESET"; -})(InsertionMode || (InsertionMode = {})); -const BASE_LOC = { - startLine: -1, - startCol: -1, - startOffset: -1, - endLine: -1, - endCol: -1, - endOffset: -1, -}; -const TABLE_STRUCTURE_TAGS = new Set([html_js_1.TAG_ID.TABLE, html_js_1.TAG_ID.TBODY, html_js_1.TAG_ID.TFOOT, html_js_1.TAG_ID.THEAD, html_js_1.TAG_ID.TR]); -const defaultParserOptions = { - scriptingEnabled: true, - sourceCodeLocationInfo: false, - treeAdapter: default_js_1.defaultTreeAdapter, - onParseError: null, -}; -//Parser -class Parser { - constructor(options, document, - /** @internal */ - fragmentContext = null, - /** @internal */ - scriptHandler = null) { - this.fragmentContext = fragmentContext; - this.scriptHandler = scriptHandler; - this.currentToken = null; - this.stopped = false; - /** @internal */ - this.insertionMode = InsertionMode.INITIAL; - /** @internal */ - this.originalInsertionMode = InsertionMode.INITIAL; - /** @internal */ - this.headElement = null; - /** @internal */ - this.formElement = null; - /** Indicates that the current node is not an element in the HTML namespace */ - this.currentNotInHTML = false; - /** - * The template insertion mode stack is maintained from the left. - * Ie. the topmost element will always have index 0. - * - * @internal - */ - this.tmplInsertionModeStack = []; - /** @internal */ - this.pendingCharacterTokens = []; - /** @internal */ - this.hasNonWhitespacePendingCharacterToken = false; - /** @internal */ - this.framesetOk = true; - /** @internal */ - this.skipNextNewLine = false; - /** @internal */ - this.fosterParentingEnabled = false; - this.options = Object.assign(Object.assign({}, defaultParserOptions), options); - this.treeAdapter = this.options.treeAdapter; - this.onParseError = this.options.onParseError; - // Always enable location info if we report parse errors. - if (this.onParseError) { - this.options.sourceCodeLocationInfo = true; - } - this.document = document !== null && document !== void 0 ? document : this.treeAdapter.createDocument(); - this.tokenizer = new index_js_1.Tokenizer(this.options, this); - this.activeFormattingElements = new formatting_element_list_js_1.FormattingElementList(this.treeAdapter); - this.fragmentContextID = fragmentContext ? (0, html_js_1.getTagID)(this.treeAdapter.getTagName(fragmentContext)) : html_js_1.TAG_ID.UNKNOWN; - this._setContextModes(fragmentContext !== null && fragmentContext !== void 0 ? fragmentContext : this.document, this.fragmentContextID); - this.openElements = new open_element_stack_js_1.OpenElementStack(this.document, this.treeAdapter, this); - } - // API - static parse(html, options) { - const parser = new this(options); - parser.tokenizer.write(html, true); - return parser.document; - } - static getFragmentParser(fragmentContext, options) { - const opts = Object.assign(Object.assign({}, defaultParserOptions), options); - //NOTE: use a <template> element as the fragment context if no context element was provided, - //so we will parse in a "forgiving" manner - fragmentContext !== null && fragmentContext !== void 0 ? fragmentContext : (fragmentContext = opts.treeAdapter.createElement(html_js_1.TAG_NAMES.TEMPLATE, html_js_1.NS.HTML, [])); - //NOTE: create a fake element which will be used as the `document` for fragment parsing. - //This is important for jsdom, where a new `document` cannot be created. This led to - //fragment parsing messing with the main `document`. - const documentMock = opts.treeAdapter.createElement('documentmock', html_js_1.NS.HTML, []); - const parser = new this(opts, documentMock, fragmentContext); - if (parser.fragmentContextID === html_js_1.TAG_ID.TEMPLATE) { - parser.tmplInsertionModeStack.unshift(InsertionMode.IN_TEMPLATE); - } - parser._initTokenizerForFragmentParsing(); - parser._insertFakeRootElement(); - parser._resetInsertionMode(); - parser._findFormInFragmentContext(); - return parser; - } - getFragment() { - const rootElement = this.treeAdapter.getFirstChild(this.document); - const fragment = this.treeAdapter.createDocumentFragment(); - this._adoptNodes(rootElement, fragment); - return fragment; - } - //Errors - /** @internal */ - _err(token, code, beforeToken) { - var _a; - if (!this.onParseError) - return; - const loc = (_a = token.location) !== null && _a !== void 0 ? _a : BASE_LOC; - const err = { - code, - startLine: loc.startLine, - startCol: loc.startCol, - startOffset: loc.startOffset, - endLine: beforeToken ? loc.startLine : loc.endLine, - endCol: beforeToken ? loc.startCol : loc.endCol, - endOffset: beforeToken ? loc.startOffset : loc.endOffset, - }; - this.onParseError(err); - } - //Stack events - /** @internal */ - onItemPush(node, tid, isTop) { - var _a, _b; - (_b = (_a = this.treeAdapter).onItemPush) === null || _b === void 0 ? void 0 : _b.call(_a, node); - if (isTop && this.openElements.stackTop > 0) - this._setContextModes(node, tid); - } - /** @internal */ - onItemPop(node, isTop) { - var _a, _b; - if (this.options.sourceCodeLocationInfo) { - this._setEndLocation(node, this.currentToken); - } - (_b = (_a = this.treeAdapter).onItemPop) === null || _b === void 0 ? void 0 : _b.call(_a, node, this.openElements.current); - if (isTop) { - let current; - let currentTagId; - if (this.openElements.stackTop === 0 && this.fragmentContext) { - current = this.fragmentContext; - currentTagId = this.fragmentContextID; - } - else { - ({ current, currentTagId } = this.openElements); - } - this._setContextModes(current, currentTagId); - } - } - _setContextModes(current, tid) { - const isHTML = current === this.document || this.treeAdapter.getNamespaceURI(current) === html_js_1.NS.HTML; - this.currentNotInHTML = !isHTML; - this.tokenizer.inForeignNode = !isHTML && !this._isIntegrationPoint(tid, current); - } - /** @protected */ - _switchToTextParsing(currentToken, nextTokenizerState) { - this._insertElement(currentToken, html_js_1.NS.HTML); - this.tokenizer.state = nextTokenizerState; - this.originalInsertionMode = this.insertionMode; - this.insertionMode = InsertionMode.TEXT; - } - switchToPlaintextParsing() { - this.insertionMode = InsertionMode.TEXT; - this.originalInsertionMode = InsertionMode.IN_BODY; - this.tokenizer.state = index_js_1.TokenizerMode.PLAINTEXT; - } - //Fragment parsing - /** @protected */ - _getAdjustedCurrentElement() { - return this.openElements.stackTop === 0 && this.fragmentContext - ? this.fragmentContext - : this.openElements.current; - } - /** @protected */ - _findFormInFragmentContext() { - let node = this.fragmentContext; - while (node) { - if (this.treeAdapter.getTagName(node) === html_js_1.TAG_NAMES.FORM) { - this.formElement = node; - break; - } - node = this.treeAdapter.getParentNode(node); - } - } - _initTokenizerForFragmentParsing() { - if (!this.fragmentContext || this.treeAdapter.getNamespaceURI(this.fragmentContext) !== html_js_1.NS.HTML) { - return; - } - switch (this.fragmentContextID) { - case html_js_1.TAG_ID.TITLE: - case html_js_1.TAG_ID.TEXTAREA: { - this.tokenizer.state = index_js_1.TokenizerMode.RCDATA; - break; - } - case html_js_1.TAG_ID.STYLE: - case html_js_1.TAG_ID.XMP: - case html_js_1.TAG_ID.IFRAME: - case html_js_1.TAG_ID.NOEMBED: - case html_js_1.TAG_ID.NOFRAMES: - case html_js_1.TAG_ID.NOSCRIPT: { - this.tokenizer.state = index_js_1.TokenizerMode.RAWTEXT; - break; - } - case html_js_1.TAG_ID.SCRIPT: { - this.tokenizer.state = index_js_1.TokenizerMode.SCRIPT_DATA; - break; - } - case html_js_1.TAG_ID.PLAINTEXT: { - this.tokenizer.state = index_js_1.TokenizerMode.PLAINTEXT; - break; - } - default: - // Do nothing - } - } - //Tree mutation - /** @protected */ - _setDocumentType(token) { - const name = token.name || ''; - const publicId = token.publicId || ''; - const systemId = token.systemId || ''; - this.treeAdapter.setDocumentType(this.document, name, publicId, systemId); - if (token.location) { - const documentChildren = this.treeAdapter.getChildNodes(this.document); - const docTypeNode = documentChildren.find((node) => this.treeAdapter.isDocumentTypeNode(node)); - if (docTypeNode) { - this.treeAdapter.setNodeSourceCodeLocation(docTypeNode, token.location); - } - } - } - /** @protected */ - _attachElementToTree(element, location) { - if (this.options.sourceCodeLocationInfo) { - const loc = location && Object.assign(Object.assign({}, location), { startTag: location }); - this.treeAdapter.setNodeSourceCodeLocation(element, loc); - } - if (this._shouldFosterParentOnInsertion()) { - this._fosterParentElement(element); - } - else { - const parent = this.openElements.currentTmplContentOrNode; - this.treeAdapter.appendChild(parent, element); - } - } - /** - * For self-closing tags. Add an element to the tree, but skip adding it - * to the stack. - */ - /** @protected */ - _appendElement(token, namespaceURI) { - const element = this.treeAdapter.createElement(token.tagName, namespaceURI, token.attrs); - this._attachElementToTree(element, token.location); - } - /** @protected */ - _insertElement(token, namespaceURI) { - const element = this.treeAdapter.createElement(token.tagName, namespaceURI, token.attrs); - this._attachElementToTree(element, token.location); - this.openElements.push(element, token.tagID); - } - /** @protected */ - _insertFakeElement(tagName, tagID) { - const element = this.treeAdapter.createElement(tagName, html_js_1.NS.HTML, []); - this._attachElementToTree(element, null); - this.openElements.push(element, tagID); - } - /** @protected */ - _insertTemplate(token) { - const tmpl = this.treeAdapter.createElement(token.tagName, html_js_1.NS.HTML, token.attrs); - const content = this.treeAdapter.createDocumentFragment(); - this.treeAdapter.setTemplateContent(tmpl, content); - this._attachElementToTree(tmpl, token.location); - this.openElements.push(tmpl, token.tagID); - if (this.options.sourceCodeLocationInfo) - this.treeAdapter.setNodeSourceCodeLocation(content, null); - } - /** @protected */ - _insertFakeRootElement() { - const element = this.treeAdapter.createElement(html_js_1.TAG_NAMES.HTML, html_js_1.NS.HTML, []); - if (this.options.sourceCodeLocationInfo) - this.treeAdapter.setNodeSourceCodeLocation(element, null); - this.treeAdapter.appendChild(this.openElements.current, element); - this.openElements.push(element, html_js_1.TAG_ID.HTML); - } - /** @protected */ - _appendCommentNode(token, parent) { - const commentNode = this.treeAdapter.createCommentNode(token.data); - this.treeAdapter.appendChild(parent, commentNode); - if (this.options.sourceCodeLocationInfo) { - this.treeAdapter.setNodeSourceCodeLocation(commentNode, token.location); - } - } - /** @protected */ - _insertCharacters(token) { - let parent; - let beforeElement; - if (this._shouldFosterParentOnInsertion()) { - ({ parent, beforeElement } = this._findFosterParentingLocation()); - if (beforeElement) { - this.treeAdapter.insertTextBefore(parent, token.chars, beforeElement); - } - else { - this.treeAdapter.insertText(parent, token.chars); - } - } - else { - parent = this.openElements.currentTmplContentOrNode; - this.treeAdapter.insertText(parent, token.chars); - } - if (!token.location) - return; - const siblings = this.treeAdapter.getChildNodes(parent); - const textNodeIdx = beforeElement ? siblings.lastIndexOf(beforeElement) : siblings.length; - const textNode = siblings[textNodeIdx - 1]; - //NOTE: if we have a location assigned by another token, then just update the end position - const tnLoc = this.treeAdapter.getNodeSourceCodeLocation(textNode); - if (tnLoc) { - const { endLine, endCol, endOffset } = token.location; - this.treeAdapter.updateNodeSourceCodeLocation(textNode, { endLine, endCol, endOffset }); - } - else if (this.options.sourceCodeLocationInfo) { - this.treeAdapter.setNodeSourceCodeLocation(textNode, token.location); - } - } - /** @protected */ - _adoptNodes(donor, recipient) { - for (let child = this.treeAdapter.getFirstChild(donor); child; child = this.treeAdapter.getFirstChild(donor)) { - this.treeAdapter.detachNode(child); - this.treeAdapter.appendChild(recipient, child); - } - } - /** @protected */ - _setEndLocation(element, closingToken) { - if (this.treeAdapter.getNodeSourceCodeLocation(element) && closingToken.location) { - const ctLoc = closingToken.location; - const tn = this.treeAdapter.getTagName(element); - const endLoc = - // NOTE: For cases like <p> <p> </p> - First 'p' closes without a closing - // tag and for cases like <td> <p> </td> - 'p' closes without a closing tag. - closingToken.type === token_js_1.TokenType.END_TAG && tn === closingToken.tagName - ? { - endTag: Object.assign({}, ctLoc), - endLine: ctLoc.endLine, - endCol: ctLoc.endCol, - endOffset: ctLoc.endOffset, - } - : { - endLine: ctLoc.startLine, - endCol: ctLoc.startCol, - endOffset: ctLoc.startOffset, - }; - this.treeAdapter.updateNodeSourceCodeLocation(element, endLoc); - } - } - //Token processing - shouldProcessStartTagTokenInForeignContent(token) { - // Check that neither current === document, or ns === NS.HTML - if (!this.currentNotInHTML) - return false; - let current; - let currentTagId; - if (this.openElements.stackTop === 0 && this.fragmentContext) { - current = this.fragmentContext; - currentTagId = this.fragmentContextID; - } - else { - ({ current, currentTagId } = this.openElements); - } - if (token.tagID === html_js_1.TAG_ID.SVG && - this.treeAdapter.getTagName(current) === html_js_1.TAG_NAMES.ANNOTATION_XML && - this.treeAdapter.getNamespaceURI(current) === html_js_1.NS.MATHML) { - return false; - } - return ( - // Check that `current` is not an integration point for HTML or MathML elements. - this.tokenizer.inForeignNode || - // If it _is_ an integration point, then we might have to check that it is not an HTML - // integration point. - ((token.tagID === html_js_1.TAG_ID.MGLYPH || token.tagID === html_js_1.TAG_ID.MALIGNMARK) && - !this._isIntegrationPoint(currentTagId, current, html_js_1.NS.HTML))); - } - /** @protected */ - _processToken(token) { - switch (token.type) { - case token_js_1.TokenType.CHARACTER: { - this.onCharacter(token); - break; - } - case token_js_1.TokenType.NULL_CHARACTER: { - this.onNullCharacter(token); - break; - } - case token_js_1.TokenType.COMMENT: { - this.onComment(token); - break; - } - case token_js_1.TokenType.DOCTYPE: { - this.onDoctype(token); - break; - } - case token_js_1.TokenType.START_TAG: { - this._processStartTag(token); - break; - } - case token_js_1.TokenType.END_TAG: { - this.onEndTag(token); - break; - } - case token_js_1.TokenType.EOF: { - this.onEof(token); - break; - } - case token_js_1.TokenType.WHITESPACE_CHARACTER: { - this.onWhitespaceCharacter(token); - break; - } - } - } - //Integration points - /** @protected */ - _isIntegrationPoint(tid, element, foreignNS) { - const ns = this.treeAdapter.getNamespaceURI(element); - const attrs = this.treeAdapter.getAttrList(element); - return foreignContent.isIntegrationPoint(tid, ns, attrs, foreignNS); - } - //Active formatting elements reconstruction - /** @protected */ - _reconstructActiveFormattingElements() { - const listLength = this.activeFormattingElements.entries.length; - if (listLength) { - const endIndex = this.activeFormattingElements.entries.findIndex((entry) => entry.type === formatting_element_list_js_1.EntryType.Marker || this.openElements.contains(entry.element)); - const unopenIdx = endIndex < 0 ? listLength - 1 : endIndex - 1; - for (let i = unopenIdx; i >= 0; i--) { - const entry = this.activeFormattingElements.entries[i]; - this._insertElement(entry.token, this.treeAdapter.getNamespaceURI(entry.element)); - entry.element = this.openElements.current; - } - } - } - //Close elements - /** @protected */ - _closeTableCell() { - this.openElements.generateImpliedEndTags(); - this.openElements.popUntilTableCellPopped(); - this.activeFormattingElements.clearToLastMarker(); - this.insertionMode = InsertionMode.IN_ROW; - } - /** @protected */ - _closePElement() { - this.openElements.generateImpliedEndTagsWithExclusion(html_js_1.TAG_ID.P); - this.openElements.popUntilTagNamePopped(html_js_1.TAG_ID.P); - } - //Insertion modes - /** @protected */ - _resetInsertionMode() { - for (let i = this.openElements.stackTop; i >= 0; i--) { - //Insertion mode reset map - switch (i === 0 && this.fragmentContext ? this.fragmentContextID : this.openElements.tagIDs[i]) { - case html_js_1.TAG_ID.TR: { - this.insertionMode = InsertionMode.IN_ROW; - return; - } - case html_js_1.TAG_ID.TBODY: - case html_js_1.TAG_ID.THEAD: - case html_js_1.TAG_ID.TFOOT: { - this.insertionMode = InsertionMode.IN_TABLE_BODY; - return; - } - case html_js_1.TAG_ID.CAPTION: { - this.insertionMode = InsertionMode.IN_CAPTION; - return; - } - case html_js_1.TAG_ID.COLGROUP: { - this.insertionMode = InsertionMode.IN_COLUMN_GROUP; - return; - } - case html_js_1.TAG_ID.TABLE: { - this.insertionMode = InsertionMode.IN_TABLE; - return; - } - case html_js_1.TAG_ID.BODY: { - this.insertionMode = InsertionMode.IN_BODY; - return; - } - case html_js_1.TAG_ID.FRAMESET: { - this.insertionMode = InsertionMode.IN_FRAMESET; - return; - } - case html_js_1.TAG_ID.SELECT: { - this._resetInsertionModeForSelect(i); - return; - } - case html_js_1.TAG_ID.TEMPLATE: { - this.insertionMode = this.tmplInsertionModeStack[0]; - return; - } - case html_js_1.TAG_ID.HTML: { - this.insertionMode = this.headElement ? InsertionMode.AFTER_HEAD : InsertionMode.BEFORE_HEAD; - return; - } - case html_js_1.TAG_ID.TD: - case html_js_1.TAG_ID.TH: { - if (i > 0) { - this.insertionMode = InsertionMode.IN_CELL; - return; - } - break; - } - case html_js_1.TAG_ID.HEAD: { - if (i > 0) { - this.insertionMode = InsertionMode.IN_HEAD; - return; - } - break; - } - } - } - this.insertionMode = InsertionMode.IN_BODY; - } - /** @protected */ - _resetInsertionModeForSelect(selectIdx) { - if (selectIdx > 0) { - for (let i = selectIdx - 1; i > 0; i--) { - const tn = this.openElements.tagIDs[i]; - if (tn === html_js_1.TAG_ID.TEMPLATE) { - break; - } - else if (tn === html_js_1.TAG_ID.TABLE) { - this.insertionMode = InsertionMode.IN_SELECT_IN_TABLE; - return; - } - } - } - this.insertionMode = InsertionMode.IN_SELECT; - } - //Foster parenting - /** @protected */ - _isElementCausesFosterParenting(tn) { - return TABLE_STRUCTURE_TAGS.has(tn); - } - /** @protected */ - _shouldFosterParentOnInsertion() { - return this.fosterParentingEnabled && this._isElementCausesFosterParenting(this.openElements.currentTagId); - } - /** @protected */ - _findFosterParentingLocation() { - for (let i = this.openElements.stackTop; i >= 0; i--) { - const openElement = this.openElements.items[i]; - switch (this.openElements.tagIDs[i]) { - case html_js_1.TAG_ID.TEMPLATE: { - if (this.treeAdapter.getNamespaceURI(openElement) === html_js_1.NS.HTML) { - return { parent: this.treeAdapter.getTemplateContent(openElement), beforeElement: null }; - } - break; - } - case html_js_1.TAG_ID.TABLE: { - const parent = this.treeAdapter.getParentNode(openElement); - if (parent) { - return { parent, beforeElement: openElement }; - } - return { parent: this.openElements.items[i - 1], beforeElement: null }; - } - default: - // Do nothing - } - } - return { parent: this.openElements.items[0], beforeElement: null }; - } - /** @protected */ - _fosterParentElement(element) { - const location = this._findFosterParentingLocation(); - if (location.beforeElement) { - this.treeAdapter.insertBefore(location.parent, element, location.beforeElement); - } - else { - this.treeAdapter.appendChild(location.parent, element); - } - } - //Special elements - /** @protected */ - _isSpecialElement(element, id) { - const ns = this.treeAdapter.getNamespaceURI(element); - return html_js_1.SPECIAL_ELEMENTS[ns].has(id); - } - /** @internal */ - onCharacter(token) { - this.skipNextNewLine = false; - if (this.tokenizer.inForeignNode) { - characterInForeignContent(this, token); - return; - } - switch (this.insertionMode) { - case InsertionMode.INITIAL: { - tokenInInitialMode(this, token); - break; - } - case InsertionMode.BEFORE_HTML: { - tokenBeforeHtml(this, token); - break; - } - case InsertionMode.BEFORE_HEAD: { - tokenBeforeHead(this, token); - break; - } - case InsertionMode.IN_HEAD: { - tokenInHead(this, token); - break; - } - case InsertionMode.IN_HEAD_NO_SCRIPT: { - tokenInHeadNoScript(this, token); - break; - } - case InsertionMode.AFTER_HEAD: { - tokenAfterHead(this, token); - break; - } - case InsertionMode.IN_BODY: - case InsertionMode.IN_CAPTION: - case InsertionMode.IN_CELL: - case InsertionMode.IN_TEMPLATE: { - characterInBody(this, token); - break; - } - case InsertionMode.TEXT: - case InsertionMode.IN_SELECT: - case InsertionMode.IN_SELECT_IN_TABLE: { - this._insertCharacters(token); - break; - } - case InsertionMode.IN_TABLE: - case InsertionMode.IN_TABLE_BODY: - case InsertionMode.IN_ROW: { - characterInTable(this, token); - break; - } - case InsertionMode.IN_TABLE_TEXT: { - characterInTableText(this, token); - break; - } - case InsertionMode.IN_COLUMN_GROUP: { - tokenInColumnGroup(this, token); - break; - } - case InsertionMode.AFTER_BODY: { - tokenAfterBody(this, token); - break; - } - case InsertionMode.AFTER_AFTER_BODY: { - tokenAfterAfterBody(this, token); - break; - } - default: - // Do nothing - } - } - /** @internal */ - onNullCharacter(token) { - this.skipNextNewLine = false; - if (this.tokenizer.inForeignNode) { - nullCharacterInForeignContent(this, token); - return; - } - switch (this.insertionMode) { - case InsertionMode.INITIAL: { - tokenInInitialMode(this, token); - break; - } - case InsertionMode.BEFORE_HTML: { - tokenBeforeHtml(this, token); - break; - } - case InsertionMode.BEFORE_HEAD: { - tokenBeforeHead(this, token); - break; - } - case InsertionMode.IN_HEAD: { - tokenInHead(this, token); - break; - } - case InsertionMode.IN_HEAD_NO_SCRIPT: { - tokenInHeadNoScript(this, token); - break; - } - case InsertionMode.AFTER_HEAD: { - tokenAfterHead(this, token); - break; - } - case InsertionMode.TEXT: { - this._insertCharacters(token); - break; - } - case InsertionMode.IN_TABLE: - case InsertionMode.IN_TABLE_BODY: - case InsertionMode.IN_ROW: { - characterInTable(this, token); - break; - } - case InsertionMode.IN_COLUMN_GROUP: { - tokenInColumnGroup(this, token); - break; - } - case InsertionMode.AFTER_BODY: { - tokenAfterBody(this, token); - break; - } - case InsertionMode.AFTER_AFTER_BODY: { - tokenAfterAfterBody(this, token); - break; - } - default: - // Do nothing - } - } - /** @internal */ - onComment(token) { - this.skipNextNewLine = false; - if (this.currentNotInHTML) { - appendComment(this, token); - return; - } - switch (this.insertionMode) { - case InsertionMode.INITIAL: - case InsertionMode.BEFORE_HTML: - case InsertionMode.BEFORE_HEAD: - case InsertionMode.IN_HEAD: - case InsertionMode.IN_HEAD_NO_SCRIPT: - case InsertionMode.AFTER_HEAD: - case InsertionMode.IN_BODY: - case InsertionMode.IN_TABLE: - case InsertionMode.IN_CAPTION: - case InsertionMode.IN_COLUMN_GROUP: - case InsertionMode.IN_TABLE_BODY: - case InsertionMode.IN_ROW: - case InsertionMode.IN_CELL: - case InsertionMode.IN_SELECT: - case InsertionMode.IN_SELECT_IN_TABLE: - case InsertionMode.IN_TEMPLATE: - case InsertionMode.IN_FRAMESET: - case InsertionMode.AFTER_FRAMESET: { - appendComment(this, token); - break; - } - case InsertionMode.IN_TABLE_TEXT: { - tokenInTableText(this, token); - break; - } - case InsertionMode.AFTER_BODY: { - appendCommentToRootHtmlElement(this, token); - break; - } - case InsertionMode.AFTER_AFTER_BODY: - case InsertionMode.AFTER_AFTER_FRAMESET: { - appendCommentToDocument(this, token); - break; - } - default: - // Do nothing - } - } - /** @internal */ - onDoctype(token) { - this.skipNextNewLine = false; - switch (this.insertionMode) { - case InsertionMode.INITIAL: { - doctypeInInitialMode(this, token); - break; - } - case InsertionMode.BEFORE_HEAD: - case InsertionMode.IN_HEAD: - case InsertionMode.IN_HEAD_NO_SCRIPT: - case InsertionMode.AFTER_HEAD: { - this._err(token, error_codes_js_1.ERR.misplacedDoctype); - break; - } - case InsertionMode.IN_TABLE_TEXT: { - tokenInTableText(this, token); - break; - } - default: - // Do nothing - } - } - /** @internal */ - onStartTag(token) { - this.skipNextNewLine = false; - this.currentToken = token; - this._processStartTag(token); - if (token.selfClosing && !token.ackSelfClosing) { - this._err(token, error_codes_js_1.ERR.nonVoidHtmlElementStartTagWithTrailingSolidus); - } - } - /** - * Processes a given start tag. - * - * `onStartTag` checks if a self-closing tag was recognized. When a token - * is moved inbetween multiple insertion modes, this check for self-closing - * could lead to false positives. To avoid this, `_processStartTag` is used - * for nested calls. - * - * @param token The token to process. - * @protected - */ - _processStartTag(token) { - if (this.shouldProcessStartTagTokenInForeignContent(token)) { - startTagInForeignContent(this, token); - } - else { - this._startTagOutsideForeignContent(token); - } - } - /** @protected */ - _startTagOutsideForeignContent(token) { - switch (this.insertionMode) { - case InsertionMode.INITIAL: { - tokenInInitialMode(this, token); - break; - } - case InsertionMode.BEFORE_HTML: { - startTagBeforeHtml(this, token); - break; - } - case InsertionMode.BEFORE_HEAD: { - startTagBeforeHead(this, token); - break; - } - case InsertionMode.IN_HEAD: { - startTagInHead(this, token); - break; - } - case InsertionMode.IN_HEAD_NO_SCRIPT: { - startTagInHeadNoScript(this, token); - break; - } - case InsertionMode.AFTER_HEAD: { - startTagAfterHead(this, token); - break; - } - case InsertionMode.IN_BODY: { - startTagInBody(this, token); - break; - } - case InsertionMode.IN_TABLE: { - startTagInTable(this, token); - break; - } - case InsertionMode.IN_TABLE_TEXT: { - tokenInTableText(this, token); - break; - } - case InsertionMode.IN_CAPTION: { - startTagInCaption(this, token); - break; - } - case InsertionMode.IN_COLUMN_GROUP: { - startTagInColumnGroup(this, token); - break; - } - case InsertionMode.IN_TABLE_BODY: { - startTagInTableBody(this, token); - break; - } - case InsertionMode.IN_ROW: { - startTagInRow(this, token); - break; - } - case InsertionMode.IN_CELL: { - startTagInCell(this, token); - break; - } - case InsertionMode.IN_SELECT: { - startTagInSelect(this, token); - break; - } - case InsertionMode.IN_SELECT_IN_TABLE: { - startTagInSelectInTable(this, token); - break; - } - case InsertionMode.IN_TEMPLATE: { - startTagInTemplate(this, token); - break; - } - case InsertionMode.AFTER_BODY: { - startTagAfterBody(this, token); - break; - } - case InsertionMode.IN_FRAMESET: { - startTagInFrameset(this, token); - break; - } - case InsertionMode.AFTER_FRAMESET: { - startTagAfterFrameset(this, token); - break; - } - case InsertionMode.AFTER_AFTER_BODY: { - startTagAfterAfterBody(this, token); - break; - } - case InsertionMode.AFTER_AFTER_FRAMESET: { - startTagAfterAfterFrameset(this, token); - break; - } - default: - // Do nothing - } - } - /** @internal */ - onEndTag(token) { - this.skipNextNewLine = false; - this.currentToken = token; - if (this.currentNotInHTML) { - endTagInForeignContent(this, token); - } - else { - this._endTagOutsideForeignContent(token); - } - } - /** @protected */ - _endTagOutsideForeignContent(token) { - switch (this.insertionMode) { - case InsertionMode.INITIAL: { - tokenInInitialMode(this, token); - break; - } - case InsertionMode.BEFORE_HTML: { - endTagBeforeHtml(this, token); - break; - } - case InsertionMode.BEFORE_HEAD: { - endTagBeforeHead(this, token); - break; - } - case InsertionMode.IN_HEAD: { - endTagInHead(this, token); - break; - } - case InsertionMode.IN_HEAD_NO_SCRIPT: { - endTagInHeadNoScript(this, token); - break; - } - case InsertionMode.AFTER_HEAD: { - endTagAfterHead(this, token); - break; - } - case InsertionMode.IN_BODY: { - endTagInBody(this, token); - break; - } - case InsertionMode.TEXT: { - endTagInText(this, token); - break; - } - case InsertionMode.IN_TABLE: { - endTagInTable(this, token); - break; - } - case InsertionMode.IN_TABLE_TEXT: { - tokenInTableText(this, token); - break; - } - case InsertionMode.IN_CAPTION: { - endTagInCaption(this, token); - break; - } - case InsertionMode.IN_COLUMN_GROUP: { - endTagInColumnGroup(this, token); - break; - } - case InsertionMode.IN_TABLE_BODY: { - endTagInTableBody(this, token); - break; - } - case InsertionMode.IN_ROW: { - endTagInRow(this, token); - break; - } - case InsertionMode.IN_CELL: { - endTagInCell(this, token); - break; - } - case InsertionMode.IN_SELECT: { - endTagInSelect(this, token); - break; - } - case InsertionMode.IN_SELECT_IN_TABLE: { - endTagInSelectInTable(this, token); - break; - } - case InsertionMode.IN_TEMPLATE: { - endTagInTemplate(this, token); - break; - } - case InsertionMode.AFTER_BODY: { - endTagAfterBody(this, token); - break; - } - case InsertionMode.IN_FRAMESET: { - endTagInFrameset(this, token); - break; - } - case InsertionMode.AFTER_FRAMESET: { - endTagAfterFrameset(this, token); - break; - } - case InsertionMode.AFTER_AFTER_BODY: { - tokenAfterAfterBody(this, token); - break; - } - default: - // Do nothing - } - } - /** @internal */ - onEof(token) { - switch (this.insertionMode) { - case InsertionMode.INITIAL: { - tokenInInitialMode(this, token); - break; - } - case InsertionMode.BEFORE_HTML: { - tokenBeforeHtml(this, token); - break; - } - case InsertionMode.BEFORE_HEAD: { - tokenBeforeHead(this, token); - break; - } - case InsertionMode.IN_HEAD: { - tokenInHead(this, token); - break; - } - case InsertionMode.IN_HEAD_NO_SCRIPT: { - tokenInHeadNoScript(this, token); - break; - } - case InsertionMode.AFTER_HEAD: { - tokenAfterHead(this, token); - break; - } - case InsertionMode.IN_BODY: - case InsertionMode.IN_TABLE: - case InsertionMode.IN_CAPTION: - case InsertionMode.IN_COLUMN_GROUP: - case InsertionMode.IN_TABLE_BODY: - case InsertionMode.IN_ROW: - case InsertionMode.IN_CELL: - case InsertionMode.IN_SELECT: - case InsertionMode.IN_SELECT_IN_TABLE: { - eofInBody(this, token); - break; - } - case InsertionMode.TEXT: { - eofInText(this, token); - break; - } - case InsertionMode.IN_TABLE_TEXT: { - tokenInTableText(this, token); - break; - } - case InsertionMode.IN_TEMPLATE: { - eofInTemplate(this, token); - break; - } - case InsertionMode.AFTER_BODY: - case InsertionMode.IN_FRAMESET: - case InsertionMode.AFTER_FRAMESET: - case InsertionMode.AFTER_AFTER_BODY: - case InsertionMode.AFTER_AFTER_FRAMESET: { - stopParsing(this, token); - break; - } - default: - // Do nothing - } - } - /** @internal */ - onWhitespaceCharacter(token) { - if (this.skipNextNewLine) { - this.skipNextNewLine = false; - if (token.chars.charCodeAt(0) === unicode.CODE_POINTS.LINE_FEED) { - if (token.chars.length === 1) { - return; - } - token.chars = token.chars.substr(1); - } - } - if (this.tokenizer.inForeignNode) { - this._insertCharacters(token); - return; - } - switch (this.insertionMode) { - case InsertionMode.IN_HEAD: - case InsertionMode.IN_HEAD_NO_SCRIPT: - case InsertionMode.AFTER_HEAD: - case InsertionMode.TEXT: - case InsertionMode.IN_COLUMN_GROUP: - case InsertionMode.IN_SELECT: - case InsertionMode.IN_SELECT_IN_TABLE: - case InsertionMode.IN_FRAMESET: - case InsertionMode.AFTER_FRAMESET: { - this._insertCharacters(token); - break; - } - case InsertionMode.IN_BODY: - case InsertionMode.IN_CAPTION: - case InsertionMode.IN_CELL: - case InsertionMode.IN_TEMPLATE: - case InsertionMode.AFTER_BODY: - case InsertionMode.AFTER_AFTER_BODY: - case InsertionMode.AFTER_AFTER_FRAMESET: { - whitespaceCharacterInBody(this, token); - break; - } - case InsertionMode.IN_TABLE: - case InsertionMode.IN_TABLE_BODY: - case InsertionMode.IN_ROW: { - characterInTable(this, token); - break; - } - case InsertionMode.IN_TABLE_TEXT: { - whitespaceCharacterInTableText(this, token); - break; - } - default: - // Do nothing - } - } -} -exports.Parser = Parser; -//Adoption agency algorithm -//(see: http://www.whatwg.org/specs/web-apps/current-work/multipage/tree-construction.html#adoptionAgency) -//------------------------------------------------------------------ -//Steps 5-8 of the algorithm -function aaObtainFormattingElementEntry(p, token) { - let formattingElementEntry = p.activeFormattingElements.getElementEntryInScopeWithTagName(token.tagName); - if (formattingElementEntry) { - if (!p.openElements.contains(formattingElementEntry.element)) { - p.activeFormattingElements.removeEntry(formattingElementEntry); - formattingElementEntry = null; - } - else if (!p.openElements.hasInScope(token.tagID)) { - formattingElementEntry = null; - } - } - else { - genericEndTagInBody(p, token); - } - return formattingElementEntry; -} -//Steps 9 and 10 of the algorithm -function aaObtainFurthestBlock(p, formattingElementEntry) { - let furthestBlock = null; - let idx = p.openElements.stackTop; - for (; idx >= 0; idx--) { - const element = p.openElements.items[idx]; - if (element === formattingElementEntry.element) { - break; - } - if (p._isSpecialElement(element, p.openElements.tagIDs[idx])) { - furthestBlock = element; - } - } - if (!furthestBlock) { - p.openElements.shortenToLength(idx < 0 ? 0 : idx); - p.activeFormattingElements.removeEntry(formattingElementEntry); - } - return furthestBlock; -} -//Step 13 of the algorithm -function aaInnerLoop(p, furthestBlock, formattingElement) { - let lastElement = furthestBlock; - let nextElement = p.openElements.getCommonAncestor(furthestBlock); - for (let i = 0, element = nextElement; element !== formattingElement; i++, element = nextElement) { - //NOTE: store the next element for the next loop iteration (it may be deleted from the stack by step 9.5) - nextElement = p.openElements.getCommonAncestor(element); - const elementEntry = p.activeFormattingElements.getElementEntry(element); - const counterOverflow = elementEntry && i >= AA_INNER_LOOP_ITER; - const shouldRemoveFromOpenElements = !elementEntry || counterOverflow; - if (shouldRemoveFromOpenElements) { - if (counterOverflow) { - p.activeFormattingElements.removeEntry(elementEntry); - } - p.openElements.remove(element); - } - else { - element = aaRecreateElementFromEntry(p, elementEntry); - if (lastElement === furthestBlock) { - p.activeFormattingElements.bookmark = elementEntry; - } - p.treeAdapter.detachNode(lastElement); - p.treeAdapter.appendChild(element, lastElement); - lastElement = element; - } - } - return lastElement; -} -//Step 13.7 of the algorithm -function aaRecreateElementFromEntry(p, elementEntry) { - const ns = p.treeAdapter.getNamespaceURI(elementEntry.element); - const newElement = p.treeAdapter.createElement(elementEntry.token.tagName, ns, elementEntry.token.attrs); - p.openElements.replace(elementEntry.element, newElement); - elementEntry.element = newElement; - return newElement; -} -//Step 14 of the algorithm -function aaInsertLastNodeInCommonAncestor(p, commonAncestor, lastElement) { - const tn = p.treeAdapter.getTagName(commonAncestor); - const tid = (0, html_js_1.getTagID)(tn); - if (p._isElementCausesFosterParenting(tid)) { - p._fosterParentElement(lastElement); - } - else { - const ns = p.treeAdapter.getNamespaceURI(commonAncestor); - if (tid === html_js_1.TAG_ID.TEMPLATE && ns === html_js_1.NS.HTML) { - commonAncestor = p.treeAdapter.getTemplateContent(commonAncestor); - } - p.treeAdapter.appendChild(commonAncestor, lastElement); - } -} -//Steps 15-19 of the algorithm -function aaReplaceFormattingElement(p, furthestBlock, formattingElementEntry) { - const ns = p.treeAdapter.getNamespaceURI(formattingElementEntry.element); - const { token } = formattingElementEntry; - const newElement = p.treeAdapter.createElement(token.tagName, ns, token.attrs); - p._adoptNodes(furthestBlock, newElement); - p.treeAdapter.appendChild(furthestBlock, newElement); - p.activeFormattingElements.insertElementAfterBookmark(newElement, token); - p.activeFormattingElements.removeEntry(formattingElementEntry); - p.openElements.remove(formattingElementEntry.element); - p.openElements.insertAfter(furthestBlock, newElement, token.tagID); -} -//Algorithm entry point -function callAdoptionAgency(p, token) { - for (let i = 0; i < AA_OUTER_LOOP_ITER; i++) { - const formattingElementEntry = aaObtainFormattingElementEntry(p, token); - if (!formattingElementEntry) { - break; - } - const furthestBlock = aaObtainFurthestBlock(p, formattingElementEntry); - if (!furthestBlock) { - break; - } - p.activeFormattingElements.bookmark = formattingElementEntry; - const lastElement = aaInnerLoop(p, furthestBlock, formattingElementEntry.element); - const commonAncestor = p.openElements.getCommonAncestor(formattingElementEntry.element); - p.treeAdapter.detachNode(lastElement); - if (commonAncestor) - aaInsertLastNodeInCommonAncestor(p, commonAncestor, lastElement); - aaReplaceFormattingElement(p, furthestBlock, formattingElementEntry); - } -} -//Generic token handlers -//------------------------------------------------------------------ -function appendComment(p, token) { - p._appendCommentNode(token, p.openElements.currentTmplContentOrNode); -} -function appendCommentToRootHtmlElement(p, token) { - p._appendCommentNode(token, p.openElements.items[0]); -} -function appendCommentToDocument(p, token) { - p._appendCommentNode(token, p.document); -} -function stopParsing(p, token) { - p.stopped = true; - // NOTE: Set end locations for elements that remain on the open element stack. - if (token.location) { - // NOTE: If we are not in a fragment, `html` and `body` will stay on the stack. - // This is a problem, as we might overwrite their end position here. - const target = p.fragmentContext ? 0 : 2; - for (let i = p.openElements.stackTop; i >= target; i--) { - p._setEndLocation(p.openElements.items[i], token); - } - // Handle `html` and `body` - if (!p.fragmentContext && p.openElements.stackTop >= 0) { - const htmlElement = p.openElements.items[0]; - const htmlLocation = p.treeAdapter.getNodeSourceCodeLocation(htmlElement); - if (htmlLocation && !htmlLocation.endTag) { - p._setEndLocation(htmlElement, token); - if (p.openElements.stackTop >= 1) { - const bodyElement = p.openElements.items[1]; - const bodyLocation = p.treeAdapter.getNodeSourceCodeLocation(bodyElement); - if (bodyLocation && !bodyLocation.endTag) { - p._setEndLocation(bodyElement, token); - } - } - } - } - } -} -// The "initial" insertion mode -//------------------------------------------------------------------ -function doctypeInInitialMode(p, token) { - p._setDocumentType(token); - const mode = token.forceQuirks ? html_js_1.DOCUMENT_MODE.QUIRKS : doctype.getDocumentMode(token); - if (!doctype.isConforming(token)) { - p._err(token, error_codes_js_1.ERR.nonConformingDoctype); - } - p.treeAdapter.setDocumentMode(p.document, mode); - p.insertionMode = InsertionMode.BEFORE_HTML; -} -function tokenInInitialMode(p, token) { - p._err(token, error_codes_js_1.ERR.missingDoctype, true); - p.treeAdapter.setDocumentMode(p.document, html_js_1.DOCUMENT_MODE.QUIRKS); - p.insertionMode = InsertionMode.BEFORE_HTML; - p._processToken(token); -} -// The "before html" insertion mode -//------------------------------------------------------------------ -function startTagBeforeHtml(p, token) { - if (token.tagID === html_js_1.TAG_ID.HTML) { - p._insertElement(token, html_js_1.NS.HTML); - p.insertionMode = InsertionMode.BEFORE_HEAD; - } - else { - tokenBeforeHtml(p, token); - } -} -function endTagBeforeHtml(p, token) { - const tn = token.tagID; - if (tn === html_js_1.TAG_ID.HTML || tn === html_js_1.TAG_ID.HEAD || tn === html_js_1.TAG_ID.BODY || tn === html_js_1.TAG_ID.BR) { - tokenBeforeHtml(p, token); - } -} -function tokenBeforeHtml(p, token) { - p._insertFakeRootElement(); - p.insertionMode = InsertionMode.BEFORE_HEAD; - p._processToken(token); -} -// The "before head" insertion mode -//------------------------------------------------------------------ -function startTagBeforeHead(p, token) { - switch (token.tagID) { - case html_js_1.TAG_ID.HTML: { - startTagInBody(p, token); - break; - } - case html_js_1.TAG_ID.HEAD: { - p._insertElement(token, html_js_1.NS.HTML); - p.headElement = p.openElements.current; - p.insertionMode = InsertionMode.IN_HEAD; - break; - } - default: { - tokenBeforeHead(p, token); - } - } -} -function endTagBeforeHead(p, token) { - const tn = token.tagID; - if (tn === html_js_1.TAG_ID.HEAD || tn === html_js_1.TAG_ID.BODY || tn === html_js_1.TAG_ID.HTML || tn === html_js_1.TAG_ID.BR) { - tokenBeforeHead(p, token); - } - else { - p._err(token, error_codes_js_1.ERR.endTagWithoutMatchingOpenElement); - } -} -function tokenBeforeHead(p, token) { - p._insertFakeElement(html_js_1.TAG_NAMES.HEAD, html_js_1.TAG_ID.HEAD); - p.headElement = p.openElements.current; - p.insertionMode = InsertionMode.IN_HEAD; - p._processToken(token); -} -// The "in head" insertion mode -//------------------------------------------------------------------ -function startTagInHead(p, token) { - switch (token.tagID) { - case html_js_1.TAG_ID.HTML: { - startTagInBody(p, token); - break; - } - case html_js_1.TAG_ID.BASE: - case html_js_1.TAG_ID.BASEFONT: - case html_js_1.TAG_ID.BGSOUND: - case html_js_1.TAG_ID.LINK: - case html_js_1.TAG_ID.META: { - p._appendElement(token, html_js_1.NS.HTML); - token.ackSelfClosing = true; - break; - } - case html_js_1.TAG_ID.TITLE: { - p._switchToTextParsing(token, index_js_1.TokenizerMode.RCDATA); - break; - } - case html_js_1.TAG_ID.NOSCRIPT: { - if (p.options.scriptingEnabled) { - p._switchToTextParsing(token, index_js_1.TokenizerMode.RAWTEXT); - } - else { - p._insertElement(token, html_js_1.NS.HTML); - p.insertionMode = InsertionMode.IN_HEAD_NO_SCRIPT; - } - break; - } - case html_js_1.TAG_ID.NOFRAMES: - case html_js_1.TAG_ID.STYLE: { - p._switchToTextParsing(token, index_js_1.TokenizerMode.RAWTEXT); - break; - } - case html_js_1.TAG_ID.SCRIPT: { - p._switchToTextParsing(token, index_js_1.TokenizerMode.SCRIPT_DATA); - break; - } - case html_js_1.TAG_ID.TEMPLATE: { - p._insertTemplate(token); - p.activeFormattingElements.insertMarker(); - p.framesetOk = false; - p.insertionMode = InsertionMode.IN_TEMPLATE; - p.tmplInsertionModeStack.unshift(InsertionMode.IN_TEMPLATE); - break; - } - case html_js_1.TAG_ID.HEAD: { - p._err(token, error_codes_js_1.ERR.misplacedStartTagForHeadElement); - break; - } - default: { - tokenInHead(p, token); - } - } -} -function endTagInHead(p, token) { - switch (token.tagID) { - case html_js_1.TAG_ID.HEAD: { - p.openElements.pop(); - p.insertionMode = InsertionMode.AFTER_HEAD; - break; - } - case html_js_1.TAG_ID.BODY: - case html_js_1.TAG_ID.BR: - case html_js_1.TAG_ID.HTML: { - tokenInHead(p, token); - break; - } - case html_js_1.TAG_ID.TEMPLATE: { - templateEndTagInHead(p, token); - break; - } - default: { - p._err(token, error_codes_js_1.ERR.endTagWithoutMatchingOpenElement); - } - } -} -function templateEndTagInHead(p, token) { - if (p.openElements.tmplCount > 0) { - p.openElements.generateImpliedEndTagsThoroughly(); - if (p.openElements.currentTagId !== html_js_1.TAG_ID.TEMPLATE) { - p._err(token, error_codes_js_1.ERR.closingOfElementWithOpenChildElements); - } - p.openElements.popUntilTagNamePopped(html_js_1.TAG_ID.TEMPLATE); - p.activeFormattingElements.clearToLastMarker(); - p.tmplInsertionModeStack.shift(); - p._resetInsertionMode(); - } - else { - p._err(token, error_codes_js_1.ERR.endTagWithoutMatchingOpenElement); - } -} -function tokenInHead(p, token) { - p.openElements.pop(); - p.insertionMode = InsertionMode.AFTER_HEAD; - p._processToken(token); -} -// The "in head no script" insertion mode -//------------------------------------------------------------------ -function startTagInHeadNoScript(p, token) { - switch (token.tagID) { - case html_js_1.TAG_ID.HTML: { - startTagInBody(p, token); - break; - } - case html_js_1.TAG_ID.BASEFONT: - case html_js_1.TAG_ID.BGSOUND: - case html_js_1.TAG_ID.HEAD: - case html_js_1.TAG_ID.LINK: - case html_js_1.TAG_ID.META: - case html_js_1.TAG_ID.NOFRAMES: - case html_js_1.TAG_ID.STYLE: { - startTagInHead(p, token); - break; - } - case html_js_1.TAG_ID.NOSCRIPT: { - p._err(token, error_codes_js_1.ERR.nestedNoscriptInHead); - break; - } - default: { - tokenInHeadNoScript(p, token); - } - } -} -function endTagInHeadNoScript(p, token) { - switch (token.tagID) { - case html_js_1.TAG_ID.NOSCRIPT: { - p.openElements.pop(); - p.insertionMode = InsertionMode.IN_HEAD; - break; - } - case html_js_1.TAG_ID.BR: { - tokenInHeadNoScript(p, token); - break; - } - default: { - p._err(token, error_codes_js_1.ERR.endTagWithoutMatchingOpenElement); - } - } -} -function tokenInHeadNoScript(p, token) { - const errCode = token.type === token_js_1.TokenType.EOF ? error_codes_js_1.ERR.openElementsLeftAfterEof : error_codes_js_1.ERR.disallowedContentInNoscriptInHead; - p._err(token, errCode); - p.openElements.pop(); - p.insertionMode = InsertionMode.IN_HEAD; - p._processToken(token); -} -// The "after head" insertion mode -//------------------------------------------------------------------ -function startTagAfterHead(p, token) { - switch (token.tagID) { - case html_js_1.TAG_ID.HTML: { - startTagInBody(p, token); - break; - } - case html_js_1.TAG_ID.BODY: { - p._insertElement(token, html_js_1.NS.HTML); - p.framesetOk = false; - p.insertionMode = InsertionMode.IN_BODY; - break; - } - case html_js_1.TAG_ID.FRAMESET: { - p._insertElement(token, html_js_1.NS.HTML); - p.insertionMode = InsertionMode.IN_FRAMESET; - break; - } - case html_js_1.TAG_ID.BASE: - case html_js_1.TAG_ID.BASEFONT: - case html_js_1.TAG_ID.BGSOUND: - case html_js_1.TAG_ID.LINK: - case html_js_1.TAG_ID.META: - case html_js_1.TAG_ID.NOFRAMES: - case html_js_1.TAG_ID.SCRIPT: - case html_js_1.TAG_ID.STYLE: - case html_js_1.TAG_ID.TEMPLATE: - case html_js_1.TAG_ID.TITLE: { - p._err(token, error_codes_js_1.ERR.abandonedHeadElementChild); - p.openElements.push(p.headElement, html_js_1.TAG_ID.HEAD); - startTagInHead(p, token); - p.openElements.remove(p.headElement); - break; - } - case html_js_1.TAG_ID.HEAD: { - p._err(token, error_codes_js_1.ERR.misplacedStartTagForHeadElement); - break; - } - default: { - tokenAfterHead(p, token); - } - } -} -function endTagAfterHead(p, token) { - switch (token.tagID) { - case html_js_1.TAG_ID.BODY: - case html_js_1.TAG_ID.HTML: - case html_js_1.TAG_ID.BR: { - tokenAfterHead(p, token); - break; - } - case html_js_1.TAG_ID.TEMPLATE: { - templateEndTagInHead(p, token); - break; - } - default: { - p._err(token, error_codes_js_1.ERR.endTagWithoutMatchingOpenElement); - } - } -} -function tokenAfterHead(p, token) { - p._insertFakeElement(html_js_1.TAG_NAMES.BODY, html_js_1.TAG_ID.BODY); - p.insertionMode = InsertionMode.IN_BODY; - modeInBody(p, token); -} -// The "in body" insertion mode -//------------------------------------------------------------------ -function modeInBody(p, token) { - switch (token.type) { - case token_js_1.TokenType.CHARACTER: { - characterInBody(p, token); - break; - } - case token_js_1.TokenType.WHITESPACE_CHARACTER: { - whitespaceCharacterInBody(p, token); - break; - } - case token_js_1.TokenType.COMMENT: { - appendComment(p, token); - break; - } - case token_js_1.TokenType.START_TAG: { - startTagInBody(p, token); - break; - } - case token_js_1.TokenType.END_TAG: { - endTagInBody(p, token); - break; - } - case token_js_1.TokenType.EOF: { - eofInBody(p, token); - break; - } - default: - // Do nothing - } -} -function whitespaceCharacterInBody(p, token) { - p._reconstructActiveFormattingElements(); - p._insertCharacters(token); -} -function characterInBody(p, token) { - p._reconstructActiveFormattingElements(); - p._insertCharacters(token); - p.framesetOk = false; -} -function htmlStartTagInBody(p, token) { - if (p.openElements.tmplCount === 0) { - p.treeAdapter.adoptAttributes(p.openElements.items[0], token.attrs); - } -} -function bodyStartTagInBody(p, token) { - const bodyElement = p.openElements.tryPeekProperlyNestedBodyElement(); - if (bodyElement && p.openElements.tmplCount === 0) { - p.framesetOk = false; - p.treeAdapter.adoptAttributes(bodyElement, token.attrs); - } -} -function framesetStartTagInBody(p, token) { - const bodyElement = p.openElements.tryPeekProperlyNestedBodyElement(); - if (p.framesetOk && bodyElement) { - p.treeAdapter.detachNode(bodyElement); - p.openElements.popAllUpToHtmlElement(); - p._insertElement(token, html_js_1.NS.HTML); - p.insertionMode = InsertionMode.IN_FRAMESET; - } -} -function addressStartTagInBody(p, token) { - if (p.openElements.hasInButtonScope(html_js_1.TAG_ID.P)) { - p._closePElement(); - } - p._insertElement(token, html_js_1.NS.HTML); -} -function numberedHeaderStartTagInBody(p, token) { - if (p.openElements.hasInButtonScope(html_js_1.TAG_ID.P)) { - p._closePElement(); - } - if (html_js_1.NUMBERED_HEADERS.has(p.openElements.currentTagId)) { - p.openElements.pop(); - } - p._insertElement(token, html_js_1.NS.HTML); -} -function preStartTagInBody(p, token) { - if (p.openElements.hasInButtonScope(html_js_1.TAG_ID.P)) { - p._closePElement(); - } - p._insertElement(token, html_js_1.NS.HTML); - //NOTE: If the next token is a U+000A LINE FEED (LF) character token, then ignore that token and move - //on to the next one. (Newlines at the start of pre blocks are ignored as an authoring convenience.) - p.skipNextNewLine = true; - p.framesetOk = false; -} -function formStartTagInBody(p, token) { - const inTemplate = p.openElements.tmplCount > 0; - if (!p.formElement || inTemplate) { - if (p.openElements.hasInButtonScope(html_js_1.TAG_ID.P)) { - p._closePElement(); - } - p._insertElement(token, html_js_1.NS.HTML); - if (!inTemplate) { - p.formElement = p.openElements.current; - } - } -} -function listItemStartTagInBody(p, token) { - p.framesetOk = false; - const tn = token.tagID; - for (let i = p.openElements.stackTop; i >= 0; i--) { - const elementId = p.openElements.tagIDs[i]; - if ((tn === html_js_1.TAG_ID.LI && elementId === html_js_1.TAG_ID.LI) || - ((tn === html_js_1.TAG_ID.DD || tn === html_js_1.TAG_ID.DT) && (elementId === html_js_1.TAG_ID.DD || elementId === html_js_1.TAG_ID.DT))) { - p.openElements.generateImpliedEndTagsWithExclusion(elementId); - p.openElements.popUntilTagNamePopped(elementId); - break; - } - if (elementId !== html_js_1.TAG_ID.ADDRESS && - elementId !== html_js_1.TAG_ID.DIV && - elementId !== html_js_1.TAG_ID.P && - p._isSpecialElement(p.openElements.items[i], elementId)) { - break; - } - } - if (p.openElements.hasInButtonScope(html_js_1.TAG_ID.P)) { - p._closePElement(); - } - p._insertElement(token, html_js_1.NS.HTML); -} -function plaintextStartTagInBody(p, token) { - if (p.openElements.hasInButtonScope(html_js_1.TAG_ID.P)) { - p._closePElement(); - } - p._insertElement(token, html_js_1.NS.HTML); - p.tokenizer.state = index_js_1.TokenizerMode.PLAINTEXT; -} -function buttonStartTagInBody(p, token) { - if (p.openElements.hasInScope(html_js_1.TAG_ID.BUTTON)) { - p.openElements.generateImpliedEndTags(); - p.openElements.popUntilTagNamePopped(html_js_1.TAG_ID.BUTTON); - } - p._reconstructActiveFormattingElements(); - p._insertElement(token, html_js_1.NS.HTML); - p.framesetOk = false; -} -function aStartTagInBody(p, token) { - const activeElementEntry = p.activeFormattingElements.getElementEntryInScopeWithTagName(html_js_1.TAG_NAMES.A); - if (activeElementEntry) { - callAdoptionAgency(p, token); - p.openElements.remove(activeElementEntry.element); - p.activeFormattingElements.removeEntry(activeElementEntry); - } - p._reconstructActiveFormattingElements(); - p._insertElement(token, html_js_1.NS.HTML); - p.activeFormattingElements.pushElement(p.openElements.current, token); -} -function bStartTagInBody(p, token) { - p._reconstructActiveFormattingElements(); - p._insertElement(token, html_js_1.NS.HTML); - p.activeFormattingElements.pushElement(p.openElements.current, token); -} -function nobrStartTagInBody(p, token) { - p._reconstructActiveFormattingElements(); - if (p.openElements.hasInScope(html_js_1.TAG_ID.NOBR)) { - callAdoptionAgency(p, token); - p._reconstructActiveFormattingElements(); - } - p._insertElement(token, html_js_1.NS.HTML); - p.activeFormattingElements.pushElement(p.openElements.current, token); -} -function appletStartTagInBody(p, token) { - p._reconstructActiveFormattingElements(); - p._insertElement(token, html_js_1.NS.HTML); - p.activeFormattingElements.insertMarker(); - p.framesetOk = false; -} -function tableStartTagInBody(p, token) { - if (p.treeAdapter.getDocumentMode(p.document) !== html_js_1.DOCUMENT_MODE.QUIRKS && p.openElements.hasInButtonScope(html_js_1.TAG_ID.P)) { - p._closePElement(); - } - p._insertElement(token, html_js_1.NS.HTML); - p.framesetOk = false; - p.insertionMode = InsertionMode.IN_TABLE; -} -function areaStartTagInBody(p, token) { - p._reconstructActiveFormattingElements(); - p._appendElement(token, html_js_1.NS.HTML); - p.framesetOk = false; - token.ackSelfClosing = true; -} -function isHiddenInput(token) { - const inputType = (0, token_js_1.getTokenAttr)(token, html_js_1.ATTRS.TYPE); - return inputType != null && inputType.toLowerCase() === HIDDEN_INPUT_TYPE; -} -function inputStartTagInBody(p, token) { - p._reconstructActiveFormattingElements(); - p._appendElement(token, html_js_1.NS.HTML); - if (!isHiddenInput(token)) { - p.framesetOk = false; - } - token.ackSelfClosing = true; -} -function paramStartTagInBody(p, token) { - p._appendElement(token, html_js_1.NS.HTML); - token.ackSelfClosing = true; -} -function hrStartTagInBody(p, token) { - if (p.openElements.hasInButtonScope(html_js_1.TAG_ID.P)) { - p._closePElement(); - } - p._appendElement(token, html_js_1.NS.HTML); - p.framesetOk = false; - token.ackSelfClosing = true; -} -function imageStartTagInBody(p, token) { - token.tagName = html_js_1.TAG_NAMES.IMG; - token.tagID = html_js_1.TAG_ID.IMG; - areaStartTagInBody(p, token); -} -function textareaStartTagInBody(p, token) { - p._insertElement(token, html_js_1.NS.HTML); - //NOTE: If the next token is a U+000A LINE FEED (LF) character token, then ignore that token and move - //on to the next one. (Newlines at the start of textarea elements are ignored as an authoring convenience.) - p.skipNextNewLine = true; - p.tokenizer.state = index_js_1.TokenizerMode.RCDATA; - p.originalInsertionMode = p.insertionMode; - p.framesetOk = false; - p.insertionMode = InsertionMode.TEXT; -} -function xmpStartTagInBody(p, token) { - if (p.openElements.hasInButtonScope(html_js_1.TAG_ID.P)) { - p._closePElement(); - } - p._reconstructActiveFormattingElements(); - p.framesetOk = false; - p._switchToTextParsing(token, index_js_1.TokenizerMode.RAWTEXT); -} -function iframeStartTagInBody(p, token) { - p.framesetOk = false; - p._switchToTextParsing(token, index_js_1.TokenizerMode.RAWTEXT); -} -//NOTE: here we assume that we always act as a user agent with enabled plugins/frames, so we parse -//<noembed>/<noframes> as rawtext. -function rawTextStartTagInBody(p, token) { - p._switchToTextParsing(token, index_js_1.TokenizerMode.RAWTEXT); -} -function selectStartTagInBody(p, token) { - p._reconstructActiveFormattingElements(); - p._insertElement(token, html_js_1.NS.HTML); - p.framesetOk = false; - p.insertionMode = - p.insertionMode === InsertionMode.IN_TABLE || - p.insertionMode === InsertionMode.IN_CAPTION || - p.insertionMode === InsertionMode.IN_TABLE_BODY || - p.insertionMode === InsertionMode.IN_ROW || - p.insertionMode === InsertionMode.IN_CELL - ? InsertionMode.IN_SELECT_IN_TABLE - : InsertionMode.IN_SELECT; -} -function optgroupStartTagInBody(p, token) { - if (p.openElements.currentTagId === html_js_1.TAG_ID.OPTION) { - p.openElements.pop(); - } - p._reconstructActiveFormattingElements(); - p._insertElement(token, html_js_1.NS.HTML); -} -function rbStartTagInBody(p, token) { - if (p.openElements.hasInScope(html_js_1.TAG_ID.RUBY)) { - p.openElements.generateImpliedEndTags(); - } - p._insertElement(token, html_js_1.NS.HTML); -} -function rtStartTagInBody(p, token) { - if (p.openElements.hasInScope(html_js_1.TAG_ID.RUBY)) { - p.openElements.generateImpliedEndTagsWithExclusion(html_js_1.TAG_ID.RTC); - } - p._insertElement(token, html_js_1.NS.HTML); -} -function mathStartTagInBody(p, token) { - p._reconstructActiveFormattingElements(); - foreignContent.adjustTokenMathMLAttrs(token); - foreignContent.adjustTokenXMLAttrs(token); - if (token.selfClosing) { - p._appendElement(token, html_js_1.NS.MATHML); - } - else { - p._insertElement(token, html_js_1.NS.MATHML); - } - token.ackSelfClosing = true; -} -function svgStartTagInBody(p, token) { - p._reconstructActiveFormattingElements(); - foreignContent.adjustTokenSVGAttrs(token); - foreignContent.adjustTokenXMLAttrs(token); - if (token.selfClosing) { - p._appendElement(token, html_js_1.NS.SVG); - } - else { - p._insertElement(token, html_js_1.NS.SVG); - } - token.ackSelfClosing = true; -} -function genericStartTagInBody(p, token) { - p._reconstructActiveFormattingElements(); - p._insertElement(token, html_js_1.NS.HTML); -} -function startTagInBody(p, token) { - switch (token.tagID) { - case html_js_1.TAG_ID.I: - case html_js_1.TAG_ID.S: - case html_js_1.TAG_ID.B: - case html_js_1.TAG_ID.U: - case html_js_1.TAG_ID.EM: - case html_js_1.TAG_ID.TT: - case html_js_1.TAG_ID.BIG: - case html_js_1.TAG_ID.CODE: - case html_js_1.TAG_ID.FONT: - case html_js_1.TAG_ID.SMALL: - case html_js_1.TAG_ID.STRIKE: - case html_js_1.TAG_ID.STRONG: { - bStartTagInBody(p, token); - break; - } - case html_js_1.TAG_ID.A: { - aStartTagInBody(p, token); - break; - } - case html_js_1.TAG_ID.H1: - case html_js_1.TAG_ID.H2: - case html_js_1.TAG_ID.H3: - case html_js_1.TAG_ID.H4: - case html_js_1.TAG_ID.H5: - case html_js_1.TAG_ID.H6: { - numberedHeaderStartTagInBody(p, token); - break; - } - case html_js_1.TAG_ID.P: - case html_js_1.TAG_ID.DL: - case html_js_1.TAG_ID.OL: - case html_js_1.TAG_ID.UL: - case html_js_1.TAG_ID.DIV: - case html_js_1.TAG_ID.DIR: - case html_js_1.TAG_ID.NAV: - case html_js_1.TAG_ID.MAIN: - case html_js_1.TAG_ID.MENU: - case html_js_1.TAG_ID.ASIDE: - case html_js_1.TAG_ID.CENTER: - case html_js_1.TAG_ID.FIGURE: - case html_js_1.TAG_ID.FOOTER: - case html_js_1.TAG_ID.HEADER: - case html_js_1.TAG_ID.HGROUP: - case html_js_1.TAG_ID.DIALOG: - case html_js_1.TAG_ID.DETAILS: - case html_js_1.TAG_ID.ADDRESS: - case html_js_1.TAG_ID.ARTICLE: - case html_js_1.TAG_ID.SEARCH: - case html_js_1.TAG_ID.SECTION: - case html_js_1.TAG_ID.SUMMARY: - case html_js_1.TAG_ID.FIELDSET: - case html_js_1.TAG_ID.BLOCKQUOTE: - case html_js_1.TAG_ID.FIGCAPTION: { - addressStartTagInBody(p, token); - break; - } - case html_js_1.TAG_ID.LI: - case html_js_1.TAG_ID.DD: - case html_js_1.TAG_ID.DT: { - listItemStartTagInBody(p, token); - break; - } - case html_js_1.TAG_ID.BR: - case html_js_1.TAG_ID.IMG: - case html_js_1.TAG_ID.WBR: - case html_js_1.TAG_ID.AREA: - case html_js_1.TAG_ID.EMBED: - case html_js_1.TAG_ID.KEYGEN: { - areaStartTagInBody(p, token); - break; - } - case html_js_1.TAG_ID.HR: { - hrStartTagInBody(p, token); - break; - } - case html_js_1.TAG_ID.RB: - case html_js_1.TAG_ID.RTC: { - rbStartTagInBody(p, token); - break; - } - case html_js_1.TAG_ID.RT: - case html_js_1.TAG_ID.RP: { - rtStartTagInBody(p, token); - break; - } - case html_js_1.TAG_ID.PRE: - case html_js_1.TAG_ID.LISTING: { - preStartTagInBody(p, token); - break; - } - case html_js_1.TAG_ID.XMP: { - xmpStartTagInBody(p, token); - break; - } - case html_js_1.TAG_ID.SVG: { - svgStartTagInBody(p, token); - break; - } - case html_js_1.TAG_ID.HTML: { - htmlStartTagInBody(p, token); - break; - } - case html_js_1.TAG_ID.BASE: - case html_js_1.TAG_ID.LINK: - case html_js_1.TAG_ID.META: - case html_js_1.TAG_ID.STYLE: - case html_js_1.TAG_ID.TITLE: - case html_js_1.TAG_ID.SCRIPT: - case html_js_1.TAG_ID.BGSOUND: - case html_js_1.TAG_ID.BASEFONT: - case html_js_1.TAG_ID.TEMPLATE: { - startTagInHead(p, token); - break; - } - case html_js_1.TAG_ID.BODY: { - bodyStartTagInBody(p, token); - break; - } - case html_js_1.TAG_ID.FORM: { - formStartTagInBody(p, token); - break; - } - case html_js_1.TAG_ID.NOBR: { - nobrStartTagInBody(p, token); - break; - } - case html_js_1.TAG_ID.MATH: { - mathStartTagInBody(p, token); - break; - } - case html_js_1.TAG_ID.TABLE: { - tableStartTagInBody(p, token); - break; - } - case html_js_1.TAG_ID.INPUT: { - inputStartTagInBody(p, token); - break; - } - case html_js_1.TAG_ID.PARAM: - case html_js_1.TAG_ID.TRACK: - case html_js_1.TAG_ID.SOURCE: { - paramStartTagInBody(p, token); - break; - } - case html_js_1.TAG_ID.IMAGE: { - imageStartTagInBody(p, token); - break; - } - case html_js_1.TAG_ID.BUTTON: { - buttonStartTagInBody(p, token); - break; - } - case html_js_1.TAG_ID.APPLET: - case html_js_1.TAG_ID.OBJECT: - case html_js_1.TAG_ID.MARQUEE: { - appletStartTagInBody(p, token); - break; - } - case html_js_1.TAG_ID.IFRAME: { - iframeStartTagInBody(p, token); - break; - } - case html_js_1.TAG_ID.SELECT: { - selectStartTagInBody(p, token); - break; - } - case html_js_1.TAG_ID.OPTION: - case html_js_1.TAG_ID.OPTGROUP: { - optgroupStartTagInBody(p, token); - break; - } - case html_js_1.TAG_ID.NOEMBED: - case html_js_1.TAG_ID.NOFRAMES: { - rawTextStartTagInBody(p, token); - break; - } - case html_js_1.TAG_ID.FRAMESET: { - framesetStartTagInBody(p, token); - break; - } - case html_js_1.TAG_ID.TEXTAREA: { - textareaStartTagInBody(p, token); - break; - } - case html_js_1.TAG_ID.NOSCRIPT: { - if (p.options.scriptingEnabled) { - rawTextStartTagInBody(p, token); - } - else { - genericStartTagInBody(p, token); - } - break; - } - case html_js_1.TAG_ID.PLAINTEXT: { - plaintextStartTagInBody(p, token); - break; - } - case html_js_1.TAG_ID.COL: - case html_js_1.TAG_ID.TH: - case html_js_1.TAG_ID.TD: - case html_js_1.TAG_ID.TR: - case html_js_1.TAG_ID.HEAD: - case html_js_1.TAG_ID.FRAME: - case html_js_1.TAG_ID.TBODY: - case html_js_1.TAG_ID.TFOOT: - case html_js_1.TAG_ID.THEAD: - case html_js_1.TAG_ID.CAPTION: - case html_js_1.TAG_ID.COLGROUP: { - // Ignore token - break; - } - default: { - genericStartTagInBody(p, token); - } - } -} -function bodyEndTagInBody(p, token) { - if (p.openElements.hasInScope(html_js_1.TAG_ID.BODY)) { - p.insertionMode = InsertionMode.AFTER_BODY; - //NOTE: <body> is never popped from the stack, so we need to updated - //the end location explicitly. - if (p.options.sourceCodeLocationInfo) { - const bodyElement = p.openElements.tryPeekProperlyNestedBodyElement(); - if (bodyElement) { - p._setEndLocation(bodyElement, token); - } - } - } -} -function htmlEndTagInBody(p, token) { - if (p.openElements.hasInScope(html_js_1.TAG_ID.BODY)) { - p.insertionMode = InsertionMode.AFTER_BODY; - endTagAfterBody(p, token); - } -} -function addressEndTagInBody(p, token) { - const tn = token.tagID; - if (p.openElements.hasInScope(tn)) { - p.openElements.generateImpliedEndTags(); - p.openElements.popUntilTagNamePopped(tn); - } -} -function formEndTagInBody(p) { - const inTemplate = p.openElements.tmplCount > 0; - const { formElement } = p; - if (!inTemplate) { - p.formElement = null; - } - if ((formElement || inTemplate) && p.openElements.hasInScope(html_js_1.TAG_ID.FORM)) { - p.openElements.generateImpliedEndTags(); - if (inTemplate) { - p.openElements.popUntilTagNamePopped(html_js_1.TAG_ID.FORM); - } - else if (formElement) { - p.openElements.remove(formElement); - } - } -} -function pEndTagInBody(p) { - if (!p.openElements.hasInButtonScope(html_js_1.TAG_ID.P)) { - p._insertFakeElement(html_js_1.TAG_NAMES.P, html_js_1.TAG_ID.P); - } - p._closePElement(); -} -function liEndTagInBody(p) { - if (p.openElements.hasInListItemScope(html_js_1.TAG_ID.LI)) { - p.openElements.generateImpliedEndTagsWithExclusion(html_js_1.TAG_ID.LI); - p.openElements.popUntilTagNamePopped(html_js_1.TAG_ID.LI); - } -} -function ddEndTagInBody(p, token) { - const tn = token.tagID; - if (p.openElements.hasInScope(tn)) { - p.openElements.generateImpliedEndTagsWithExclusion(tn); - p.openElements.popUntilTagNamePopped(tn); - } -} -function numberedHeaderEndTagInBody(p) { - if (p.openElements.hasNumberedHeaderInScope()) { - p.openElements.generateImpliedEndTags(); - p.openElements.popUntilNumberedHeaderPopped(); - } -} -function appletEndTagInBody(p, token) { - const tn = token.tagID; - if (p.openElements.hasInScope(tn)) { - p.openElements.generateImpliedEndTags(); - p.openElements.popUntilTagNamePopped(tn); - p.activeFormattingElements.clearToLastMarker(); - } -} -function brEndTagInBody(p) { - p._reconstructActiveFormattingElements(); - p._insertFakeElement(html_js_1.TAG_NAMES.BR, html_js_1.TAG_ID.BR); - p.openElements.pop(); - p.framesetOk = false; -} -function genericEndTagInBody(p, token) { - const tn = token.tagName; - const tid = token.tagID; - for (let i = p.openElements.stackTop; i > 0; i--) { - const element = p.openElements.items[i]; - const elementId = p.openElements.tagIDs[i]; - // Compare the tag name here, as the tag might not be a known tag with an ID. - if (tid === elementId && (tid !== html_js_1.TAG_ID.UNKNOWN || p.treeAdapter.getTagName(element) === tn)) { - p.openElements.generateImpliedEndTagsWithExclusion(tid); - if (p.openElements.stackTop >= i) - p.openElements.shortenToLength(i); - break; - } - if (p._isSpecialElement(element, elementId)) { - break; - } - } -} -function endTagInBody(p, token) { - switch (token.tagID) { - case html_js_1.TAG_ID.A: - case html_js_1.TAG_ID.B: - case html_js_1.TAG_ID.I: - case html_js_1.TAG_ID.S: - case html_js_1.TAG_ID.U: - case html_js_1.TAG_ID.EM: - case html_js_1.TAG_ID.TT: - case html_js_1.TAG_ID.BIG: - case html_js_1.TAG_ID.CODE: - case html_js_1.TAG_ID.FONT: - case html_js_1.TAG_ID.NOBR: - case html_js_1.TAG_ID.SMALL: - case html_js_1.TAG_ID.STRIKE: - case html_js_1.TAG_ID.STRONG: { - callAdoptionAgency(p, token); - break; - } - case html_js_1.TAG_ID.P: { - pEndTagInBody(p); - break; - } - case html_js_1.TAG_ID.DL: - case html_js_1.TAG_ID.UL: - case html_js_1.TAG_ID.OL: - case html_js_1.TAG_ID.DIR: - case html_js_1.TAG_ID.DIV: - case html_js_1.TAG_ID.NAV: - case html_js_1.TAG_ID.PRE: - case html_js_1.TAG_ID.MAIN: - case html_js_1.TAG_ID.MENU: - case html_js_1.TAG_ID.ASIDE: - case html_js_1.TAG_ID.BUTTON: - case html_js_1.TAG_ID.CENTER: - case html_js_1.TAG_ID.FIGURE: - case html_js_1.TAG_ID.FOOTER: - case html_js_1.TAG_ID.HEADER: - case html_js_1.TAG_ID.HGROUP: - case html_js_1.TAG_ID.DIALOG: - case html_js_1.TAG_ID.ADDRESS: - case html_js_1.TAG_ID.ARTICLE: - case html_js_1.TAG_ID.DETAILS: - case html_js_1.TAG_ID.SEARCH: - case html_js_1.TAG_ID.SECTION: - case html_js_1.TAG_ID.SUMMARY: - case html_js_1.TAG_ID.LISTING: - case html_js_1.TAG_ID.FIELDSET: - case html_js_1.TAG_ID.BLOCKQUOTE: - case html_js_1.TAG_ID.FIGCAPTION: { - addressEndTagInBody(p, token); - break; - } - case html_js_1.TAG_ID.LI: { - liEndTagInBody(p); - break; - } - case html_js_1.TAG_ID.DD: - case html_js_1.TAG_ID.DT: { - ddEndTagInBody(p, token); - break; - } - case html_js_1.TAG_ID.H1: - case html_js_1.TAG_ID.H2: - case html_js_1.TAG_ID.H3: - case html_js_1.TAG_ID.H4: - case html_js_1.TAG_ID.H5: - case html_js_1.TAG_ID.H6: { - numberedHeaderEndTagInBody(p); - break; - } - case html_js_1.TAG_ID.BR: { - brEndTagInBody(p); - break; - } - case html_js_1.TAG_ID.BODY: { - bodyEndTagInBody(p, token); - break; - } - case html_js_1.TAG_ID.HTML: { - htmlEndTagInBody(p, token); - break; - } - case html_js_1.TAG_ID.FORM: { - formEndTagInBody(p); - break; - } - case html_js_1.TAG_ID.APPLET: - case html_js_1.TAG_ID.OBJECT: - case html_js_1.TAG_ID.MARQUEE: { - appletEndTagInBody(p, token); - break; - } - case html_js_1.TAG_ID.TEMPLATE: { - templateEndTagInHead(p, token); - break; - } - default: { - genericEndTagInBody(p, token); - } - } -} -function eofInBody(p, token) { - if (p.tmplInsertionModeStack.length > 0) { - eofInTemplate(p, token); - } - else { - stopParsing(p, token); - } -} -// The "text" insertion mode -//------------------------------------------------------------------ -function endTagInText(p, token) { - var _a; - if (token.tagID === html_js_1.TAG_ID.SCRIPT) { - (_a = p.scriptHandler) === null || _a === void 0 ? void 0 : _a.call(p, p.openElements.current); - } - p.openElements.pop(); - p.insertionMode = p.originalInsertionMode; -} -function eofInText(p, token) { - p._err(token, error_codes_js_1.ERR.eofInElementThatCanContainOnlyText); - p.openElements.pop(); - p.insertionMode = p.originalInsertionMode; - p.onEof(token); -} -// The "in table" insertion mode -//------------------------------------------------------------------ -function characterInTable(p, token) { - if (TABLE_STRUCTURE_TAGS.has(p.openElements.currentTagId)) { - p.pendingCharacterTokens.length = 0; - p.hasNonWhitespacePendingCharacterToken = false; - p.originalInsertionMode = p.insertionMode; - p.insertionMode = InsertionMode.IN_TABLE_TEXT; - switch (token.type) { - case token_js_1.TokenType.CHARACTER: { - characterInTableText(p, token); - break; - } - case token_js_1.TokenType.WHITESPACE_CHARACTER: { - whitespaceCharacterInTableText(p, token); - break; - } - // Ignore null - } - } - else { - tokenInTable(p, token); - } -} -function captionStartTagInTable(p, token) { - p.openElements.clearBackToTableContext(); - p.activeFormattingElements.insertMarker(); - p._insertElement(token, html_js_1.NS.HTML); - p.insertionMode = InsertionMode.IN_CAPTION; -} -function colgroupStartTagInTable(p, token) { - p.openElements.clearBackToTableContext(); - p._insertElement(token, html_js_1.NS.HTML); - p.insertionMode = InsertionMode.IN_COLUMN_GROUP; -} -function colStartTagInTable(p, token) { - p.openElements.clearBackToTableContext(); - p._insertFakeElement(html_js_1.TAG_NAMES.COLGROUP, html_js_1.TAG_ID.COLGROUP); - p.insertionMode = InsertionMode.IN_COLUMN_GROUP; - startTagInColumnGroup(p, token); -} -function tbodyStartTagInTable(p, token) { - p.openElements.clearBackToTableContext(); - p._insertElement(token, html_js_1.NS.HTML); - p.insertionMode = InsertionMode.IN_TABLE_BODY; -} -function tdStartTagInTable(p, token) { - p.openElements.clearBackToTableContext(); - p._insertFakeElement(html_js_1.TAG_NAMES.TBODY, html_js_1.TAG_ID.TBODY); - p.insertionMode = InsertionMode.IN_TABLE_BODY; - startTagInTableBody(p, token); -} -function tableStartTagInTable(p, token) { - if (p.openElements.hasInTableScope(html_js_1.TAG_ID.TABLE)) { - p.openElements.popUntilTagNamePopped(html_js_1.TAG_ID.TABLE); - p._resetInsertionMode(); - p._processStartTag(token); - } -} -function inputStartTagInTable(p, token) { - if (isHiddenInput(token)) { - p._appendElement(token, html_js_1.NS.HTML); - } - else { - tokenInTable(p, token); - } - token.ackSelfClosing = true; -} -function formStartTagInTable(p, token) { - if (!p.formElement && p.openElements.tmplCount === 0) { - p._insertElement(token, html_js_1.NS.HTML); - p.formElement = p.openElements.current; - p.openElements.pop(); - } -} -function startTagInTable(p, token) { - switch (token.tagID) { - case html_js_1.TAG_ID.TD: - case html_js_1.TAG_ID.TH: - case html_js_1.TAG_ID.TR: { - tdStartTagInTable(p, token); - break; - } - case html_js_1.TAG_ID.STYLE: - case html_js_1.TAG_ID.SCRIPT: - case html_js_1.TAG_ID.TEMPLATE: { - startTagInHead(p, token); - break; - } - case html_js_1.TAG_ID.COL: { - colStartTagInTable(p, token); - break; - } - case html_js_1.TAG_ID.FORM: { - formStartTagInTable(p, token); - break; - } - case html_js_1.TAG_ID.TABLE: { - tableStartTagInTable(p, token); - break; - } - case html_js_1.TAG_ID.TBODY: - case html_js_1.TAG_ID.TFOOT: - case html_js_1.TAG_ID.THEAD: { - tbodyStartTagInTable(p, token); - break; - } - case html_js_1.TAG_ID.INPUT: { - inputStartTagInTable(p, token); - break; - } - case html_js_1.TAG_ID.CAPTION: { - captionStartTagInTable(p, token); - break; - } - case html_js_1.TAG_ID.COLGROUP: { - colgroupStartTagInTable(p, token); - break; - } - default: { - tokenInTable(p, token); - } - } -} -function endTagInTable(p, token) { - switch (token.tagID) { - case html_js_1.TAG_ID.TABLE: { - if (p.openElements.hasInTableScope(html_js_1.TAG_ID.TABLE)) { - p.openElements.popUntilTagNamePopped(html_js_1.TAG_ID.TABLE); - p._resetInsertionMode(); - } - break; - } - case html_js_1.TAG_ID.TEMPLATE: { - templateEndTagInHead(p, token); - break; - } - case html_js_1.TAG_ID.BODY: - case html_js_1.TAG_ID.CAPTION: - case html_js_1.TAG_ID.COL: - case html_js_1.TAG_ID.COLGROUP: - case html_js_1.TAG_ID.HTML: - case html_js_1.TAG_ID.TBODY: - case html_js_1.TAG_ID.TD: - case html_js_1.TAG_ID.TFOOT: - case html_js_1.TAG_ID.TH: - case html_js_1.TAG_ID.THEAD: - case html_js_1.TAG_ID.TR: { - // Ignore token - break; - } - default: { - tokenInTable(p, token); - } - } -} -function tokenInTable(p, token) { - const savedFosterParentingState = p.fosterParentingEnabled; - p.fosterParentingEnabled = true; - // Process token in `In Body` mode - modeInBody(p, token); - p.fosterParentingEnabled = savedFosterParentingState; -} -// The "in table text" insertion mode -//------------------------------------------------------------------ -function whitespaceCharacterInTableText(p, token) { - p.pendingCharacterTokens.push(token); -} -function characterInTableText(p, token) { - p.pendingCharacterTokens.push(token); - p.hasNonWhitespacePendingCharacterToken = true; -} -function tokenInTableText(p, token) { - let i = 0; - if (p.hasNonWhitespacePendingCharacterToken) { - for (; i < p.pendingCharacterTokens.length; i++) { - tokenInTable(p, p.pendingCharacterTokens[i]); - } - } - else { - for (; i < p.pendingCharacterTokens.length; i++) { - p._insertCharacters(p.pendingCharacterTokens[i]); - } - } - p.insertionMode = p.originalInsertionMode; - p._processToken(token); -} -// The "in caption" insertion mode -//------------------------------------------------------------------ -const TABLE_VOID_ELEMENTS = new Set([html_js_1.TAG_ID.CAPTION, html_js_1.TAG_ID.COL, html_js_1.TAG_ID.COLGROUP, html_js_1.TAG_ID.TBODY, html_js_1.TAG_ID.TD, html_js_1.TAG_ID.TFOOT, html_js_1.TAG_ID.TH, html_js_1.TAG_ID.THEAD, html_js_1.TAG_ID.TR]); -function startTagInCaption(p, token) { - const tn = token.tagID; - if (TABLE_VOID_ELEMENTS.has(tn)) { - if (p.openElements.hasInTableScope(html_js_1.TAG_ID.CAPTION)) { - p.openElements.generateImpliedEndTags(); - p.openElements.popUntilTagNamePopped(html_js_1.TAG_ID.CAPTION); - p.activeFormattingElements.clearToLastMarker(); - p.insertionMode = InsertionMode.IN_TABLE; - startTagInTable(p, token); - } - } - else { - startTagInBody(p, token); - } -} -function endTagInCaption(p, token) { - const tn = token.tagID; - switch (tn) { - case html_js_1.TAG_ID.CAPTION: - case html_js_1.TAG_ID.TABLE: { - if (p.openElements.hasInTableScope(html_js_1.TAG_ID.CAPTION)) { - p.openElements.generateImpliedEndTags(); - p.openElements.popUntilTagNamePopped(html_js_1.TAG_ID.CAPTION); - p.activeFormattingElements.clearToLastMarker(); - p.insertionMode = InsertionMode.IN_TABLE; - if (tn === html_js_1.TAG_ID.TABLE) { - endTagInTable(p, token); - } - } - break; - } - case html_js_1.TAG_ID.BODY: - case html_js_1.TAG_ID.COL: - case html_js_1.TAG_ID.COLGROUP: - case html_js_1.TAG_ID.HTML: - case html_js_1.TAG_ID.TBODY: - case html_js_1.TAG_ID.TD: - case html_js_1.TAG_ID.TFOOT: - case html_js_1.TAG_ID.TH: - case html_js_1.TAG_ID.THEAD: - case html_js_1.TAG_ID.TR: { - // Ignore token - break; - } - default: { - endTagInBody(p, token); - } - } -} -// The "in column group" insertion mode -//------------------------------------------------------------------ -function startTagInColumnGroup(p, token) { - switch (token.tagID) { - case html_js_1.TAG_ID.HTML: { - startTagInBody(p, token); - break; - } - case html_js_1.TAG_ID.COL: { - p._appendElement(token, html_js_1.NS.HTML); - token.ackSelfClosing = true; - break; - } - case html_js_1.TAG_ID.TEMPLATE: { - startTagInHead(p, token); - break; - } - default: { - tokenInColumnGroup(p, token); - } - } -} -function endTagInColumnGroup(p, token) { - switch (token.tagID) { - case html_js_1.TAG_ID.COLGROUP: { - if (p.openElements.currentTagId === html_js_1.TAG_ID.COLGROUP) { - p.openElements.pop(); - p.insertionMode = InsertionMode.IN_TABLE; - } - break; - } - case html_js_1.TAG_ID.TEMPLATE: { - templateEndTagInHead(p, token); - break; - } - case html_js_1.TAG_ID.COL: { - // Ignore token - break; - } - default: { - tokenInColumnGroup(p, token); - } - } -} -function tokenInColumnGroup(p, token) { - if (p.openElements.currentTagId === html_js_1.TAG_ID.COLGROUP) { - p.openElements.pop(); - p.insertionMode = InsertionMode.IN_TABLE; - p._processToken(token); - } -} -// The "in table body" insertion mode -//------------------------------------------------------------------ -function startTagInTableBody(p, token) { - switch (token.tagID) { - case html_js_1.TAG_ID.TR: { - p.openElements.clearBackToTableBodyContext(); - p._insertElement(token, html_js_1.NS.HTML); - p.insertionMode = InsertionMode.IN_ROW; - break; - } - case html_js_1.TAG_ID.TH: - case html_js_1.TAG_ID.TD: { - p.openElements.clearBackToTableBodyContext(); - p._insertFakeElement(html_js_1.TAG_NAMES.TR, html_js_1.TAG_ID.TR); - p.insertionMode = InsertionMode.IN_ROW; - startTagInRow(p, token); - break; - } - case html_js_1.TAG_ID.CAPTION: - case html_js_1.TAG_ID.COL: - case html_js_1.TAG_ID.COLGROUP: - case html_js_1.TAG_ID.TBODY: - case html_js_1.TAG_ID.TFOOT: - case html_js_1.TAG_ID.THEAD: { - if (p.openElements.hasTableBodyContextInTableScope()) { - p.openElements.clearBackToTableBodyContext(); - p.openElements.pop(); - p.insertionMode = InsertionMode.IN_TABLE; - startTagInTable(p, token); - } - break; - } - default: { - startTagInTable(p, token); - } - } -} -function endTagInTableBody(p, token) { - const tn = token.tagID; - switch (token.tagID) { - case html_js_1.TAG_ID.TBODY: - case html_js_1.TAG_ID.TFOOT: - case html_js_1.TAG_ID.THEAD: { - if (p.openElements.hasInTableScope(tn)) { - p.openElements.clearBackToTableBodyContext(); - p.openElements.pop(); - p.insertionMode = InsertionMode.IN_TABLE; - } - break; - } - case html_js_1.TAG_ID.TABLE: { - if (p.openElements.hasTableBodyContextInTableScope()) { - p.openElements.clearBackToTableBodyContext(); - p.openElements.pop(); - p.insertionMode = InsertionMode.IN_TABLE; - endTagInTable(p, token); - } - break; - } - case html_js_1.TAG_ID.BODY: - case html_js_1.TAG_ID.CAPTION: - case html_js_1.TAG_ID.COL: - case html_js_1.TAG_ID.COLGROUP: - case html_js_1.TAG_ID.HTML: - case html_js_1.TAG_ID.TD: - case html_js_1.TAG_ID.TH: - case html_js_1.TAG_ID.TR: { - // Ignore token - break; - } - default: { - endTagInTable(p, token); - } - } -} -// The "in row" insertion mode -//------------------------------------------------------------------ -function startTagInRow(p, token) { - switch (token.tagID) { - case html_js_1.TAG_ID.TH: - case html_js_1.TAG_ID.TD: { - p.openElements.clearBackToTableRowContext(); - p._insertElement(token, html_js_1.NS.HTML); - p.insertionMode = InsertionMode.IN_CELL; - p.activeFormattingElements.insertMarker(); - break; - } - case html_js_1.TAG_ID.CAPTION: - case html_js_1.TAG_ID.COL: - case html_js_1.TAG_ID.COLGROUP: - case html_js_1.TAG_ID.TBODY: - case html_js_1.TAG_ID.TFOOT: - case html_js_1.TAG_ID.THEAD: - case html_js_1.TAG_ID.TR: { - if (p.openElements.hasInTableScope(html_js_1.TAG_ID.TR)) { - p.openElements.clearBackToTableRowContext(); - p.openElements.pop(); - p.insertionMode = InsertionMode.IN_TABLE_BODY; - startTagInTableBody(p, token); - } - break; - } - default: { - startTagInTable(p, token); - } - } -} -function endTagInRow(p, token) { - switch (token.tagID) { - case html_js_1.TAG_ID.TR: { - if (p.openElements.hasInTableScope(html_js_1.TAG_ID.TR)) { - p.openElements.clearBackToTableRowContext(); - p.openElements.pop(); - p.insertionMode = InsertionMode.IN_TABLE_BODY; - } - break; - } - case html_js_1.TAG_ID.TABLE: { - if (p.openElements.hasInTableScope(html_js_1.TAG_ID.TR)) { - p.openElements.clearBackToTableRowContext(); - p.openElements.pop(); - p.insertionMode = InsertionMode.IN_TABLE_BODY; - endTagInTableBody(p, token); - } - break; - } - case html_js_1.TAG_ID.TBODY: - case html_js_1.TAG_ID.TFOOT: - case html_js_1.TAG_ID.THEAD: { - if (p.openElements.hasInTableScope(token.tagID) || p.openElements.hasInTableScope(html_js_1.TAG_ID.TR)) { - p.openElements.clearBackToTableRowContext(); - p.openElements.pop(); - p.insertionMode = InsertionMode.IN_TABLE_BODY; - endTagInTableBody(p, token); - } - break; - } - case html_js_1.TAG_ID.BODY: - case html_js_1.TAG_ID.CAPTION: - case html_js_1.TAG_ID.COL: - case html_js_1.TAG_ID.COLGROUP: - case html_js_1.TAG_ID.HTML: - case html_js_1.TAG_ID.TD: - case html_js_1.TAG_ID.TH: { - // Ignore end tag - break; - } - default: { - endTagInTable(p, token); - } - } -} -// The "in cell" insertion mode -//------------------------------------------------------------------ -function startTagInCell(p, token) { - const tn = token.tagID; - if (TABLE_VOID_ELEMENTS.has(tn)) { - if (p.openElements.hasInTableScope(html_js_1.TAG_ID.TD) || p.openElements.hasInTableScope(html_js_1.TAG_ID.TH)) { - p._closeTableCell(); - startTagInRow(p, token); - } - } - else { - startTagInBody(p, token); - } -} -function endTagInCell(p, token) { - const tn = token.tagID; - switch (tn) { - case html_js_1.TAG_ID.TD: - case html_js_1.TAG_ID.TH: { - if (p.openElements.hasInTableScope(tn)) { - p.openElements.generateImpliedEndTags(); - p.openElements.popUntilTagNamePopped(tn); - p.activeFormattingElements.clearToLastMarker(); - p.insertionMode = InsertionMode.IN_ROW; - } - break; - } - case html_js_1.TAG_ID.TABLE: - case html_js_1.TAG_ID.TBODY: - case html_js_1.TAG_ID.TFOOT: - case html_js_1.TAG_ID.THEAD: - case html_js_1.TAG_ID.TR: { - if (p.openElements.hasInTableScope(tn)) { - p._closeTableCell(); - endTagInRow(p, token); - } - break; - } - case html_js_1.TAG_ID.BODY: - case html_js_1.TAG_ID.CAPTION: - case html_js_1.TAG_ID.COL: - case html_js_1.TAG_ID.COLGROUP: - case html_js_1.TAG_ID.HTML: { - // Ignore token - break; - } - default: { - endTagInBody(p, token); - } - } -} -// The "in select" insertion mode -//------------------------------------------------------------------ -function startTagInSelect(p, token) { - switch (token.tagID) { - case html_js_1.TAG_ID.HTML: { - startTagInBody(p, token); - break; - } - case html_js_1.TAG_ID.OPTION: { - if (p.openElements.currentTagId === html_js_1.TAG_ID.OPTION) { - p.openElements.pop(); - } - p._insertElement(token, html_js_1.NS.HTML); - break; - } - case html_js_1.TAG_ID.OPTGROUP: { - if (p.openElements.currentTagId === html_js_1.TAG_ID.OPTION) { - p.openElements.pop(); - } - if (p.openElements.currentTagId === html_js_1.TAG_ID.OPTGROUP) { - p.openElements.pop(); - } - p._insertElement(token, html_js_1.NS.HTML); - break; - } - case html_js_1.TAG_ID.HR: { - if (p.openElements.currentTagId === html_js_1.TAG_ID.OPTION) { - p.openElements.pop(); - } - if (p.openElements.currentTagId === html_js_1.TAG_ID.OPTGROUP) { - p.openElements.pop(); - } - p._appendElement(token, html_js_1.NS.HTML); - token.ackSelfClosing = true; - break; - } - case html_js_1.TAG_ID.INPUT: - case html_js_1.TAG_ID.KEYGEN: - case html_js_1.TAG_ID.TEXTAREA: - case html_js_1.TAG_ID.SELECT: { - if (p.openElements.hasInSelectScope(html_js_1.TAG_ID.SELECT)) { - p.openElements.popUntilTagNamePopped(html_js_1.TAG_ID.SELECT); - p._resetInsertionMode(); - if (token.tagID !== html_js_1.TAG_ID.SELECT) { - p._processStartTag(token); - } - } - break; - } - case html_js_1.TAG_ID.SCRIPT: - case html_js_1.TAG_ID.TEMPLATE: { - startTagInHead(p, token); - break; - } - default: - // Do nothing - } -} -function endTagInSelect(p, token) { - switch (token.tagID) { - case html_js_1.TAG_ID.OPTGROUP: { - if (p.openElements.stackTop > 0 && - p.openElements.currentTagId === html_js_1.TAG_ID.OPTION && - p.openElements.tagIDs[p.openElements.stackTop - 1] === html_js_1.TAG_ID.OPTGROUP) { - p.openElements.pop(); - } - if (p.openElements.currentTagId === html_js_1.TAG_ID.OPTGROUP) { - p.openElements.pop(); - } - break; - } - case html_js_1.TAG_ID.OPTION: { - if (p.openElements.currentTagId === html_js_1.TAG_ID.OPTION) { - p.openElements.pop(); - } - break; - } - case html_js_1.TAG_ID.SELECT: { - if (p.openElements.hasInSelectScope(html_js_1.TAG_ID.SELECT)) { - p.openElements.popUntilTagNamePopped(html_js_1.TAG_ID.SELECT); - p._resetInsertionMode(); - } - break; - } - case html_js_1.TAG_ID.TEMPLATE: { - templateEndTagInHead(p, token); - break; - } - default: - // Do nothing - } -} -// The "in select in table" insertion mode -//------------------------------------------------------------------ -function startTagInSelectInTable(p, token) { - const tn = token.tagID; - if (tn === html_js_1.TAG_ID.CAPTION || - tn === html_js_1.TAG_ID.TABLE || - tn === html_js_1.TAG_ID.TBODY || - tn === html_js_1.TAG_ID.TFOOT || - tn === html_js_1.TAG_ID.THEAD || - tn === html_js_1.TAG_ID.TR || - tn === html_js_1.TAG_ID.TD || - tn === html_js_1.TAG_ID.TH) { - p.openElements.popUntilTagNamePopped(html_js_1.TAG_ID.SELECT); - p._resetInsertionMode(); - p._processStartTag(token); - } - else { - startTagInSelect(p, token); - } -} -function endTagInSelectInTable(p, token) { - const tn = token.tagID; - if (tn === html_js_1.TAG_ID.CAPTION || - tn === html_js_1.TAG_ID.TABLE || - tn === html_js_1.TAG_ID.TBODY || - tn === html_js_1.TAG_ID.TFOOT || - tn === html_js_1.TAG_ID.THEAD || - tn === html_js_1.TAG_ID.TR || - tn === html_js_1.TAG_ID.TD || - tn === html_js_1.TAG_ID.TH) { - if (p.openElements.hasInTableScope(tn)) { - p.openElements.popUntilTagNamePopped(html_js_1.TAG_ID.SELECT); - p._resetInsertionMode(); - p.onEndTag(token); - } - } - else { - endTagInSelect(p, token); - } -} -// The "in template" insertion mode -//------------------------------------------------------------------ -function startTagInTemplate(p, token) { - switch (token.tagID) { - // First, handle tags that can start without a mode change - case html_js_1.TAG_ID.BASE: - case html_js_1.TAG_ID.BASEFONT: - case html_js_1.TAG_ID.BGSOUND: - case html_js_1.TAG_ID.LINK: - case html_js_1.TAG_ID.META: - case html_js_1.TAG_ID.NOFRAMES: - case html_js_1.TAG_ID.SCRIPT: - case html_js_1.TAG_ID.STYLE: - case html_js_1.TAG_ID.TEMPLATE: - case html_js_1.TAG_ID.TITLE: { - startTagInHead(p, token); - break; - } - // Re-process the token in the appropriate mode - case html_js_1.TAG_ID.CAPTION: - case html_js_1.TAG_ID.COLGROUP: - case html_js_1.TAG_ID.TBODY: - case html_js_1.TAG_ID.TFOOT: - case html_js_1.TAG_ID.THEAD: { - p.tmplInsertionModeStack[0] = InsertionMode.IN_TABLE; - p.insertionMode = InsertionMode.IN_TABLE; - startTagInTable(p, token); - break; - } - case html_js_1.TAG_ID.COL: { - p.tmplInsertionModeStack[0] = InsertionMode.IN_COLUMN_GROUP; - p.insertionMode = InsertionMode.IN_COLUMN_GROUP; - startTagInColumnGroup(p, token); - break; - } - case html_js_1.TAG_ID.TR: { - p.tmplInsertionModeStack[0] = InsertionMode.IN_TABLE_BODY; - p.insertionMode = InsertionMode.IN_TABLE_BODY; - startTagInTableBody(p, token); - break; - } - case html_js_1.TAG_ID.TD: - case html_js_1.TAG_ID.TH: { - p.tmplInsertionModeStack[0] = InsertionMode.IN_ROW; - p.insertionMode = InsertionMode.IN_ROW; - startTagInRow(p, token); - break; - } - default: { - p.tmplInsertionModeStack[0] = InsertionMode.IN_BODY; - p.insertionMode = InsertionMode.IN_BODY; - startTagInBody(p, token); - } - } -} -function endTagInTemplate(p, token) { - if (token.tagID === html_js_1.TAG_ID.TEMPLATE) { - templateEndTagInHead(p, token); - } -} -function eofInTemplate(p, token) { - if (p.openElements.tmplCount > 0) { - p.openElements.popUntilTagNamePopped(html_js_1.TAG_ID.TEMPLATE); - p.activeFormattingElements.clearToLastMarker(); - p.tmplInsertionModeStack.shift(); - p._resetInsertionMode(); - p.onEof(token); - } - else { - stopParsing(p, token); - } -} -// The "after body" insertion mode -//------------------------------------------------------------------ -function startTagAfterBody(p, token) { - if (token.tagID === html_js_1.TAG_ID.HTML) { - startTagInBody(p, token); - } - else { - tokenAfterBody(p, token); - } -} -function endTagAfterBody(p, token) { - var _a; - if (token.tagID === html_js_1.TAG_ID.HTML) { - if (!p.fragmentContext) { - p.insertionMode = InsertionMode.AFTER_AFTER_BODY; - } - //NOTE: <html> is never popped from the stack, so we need to updated - //the end location explicitly. - if (p.options.sourceCodeLocationInfo && p.openElements.tagIDs[0] === html_js_1.TAG_ID.HTML) { - p._setEndLocation(p.openElements.items[0], token); - // Update the body element, if it doesn't have an end tag - const bodyElement = p.openElements.items[1]; - if (bodyElement && !((_a = p.treeAdapter.getNodeSourceCodeLocation(bodyElement)) === null || _a === void 0 ? void 0 : _a.endTag)) { - p._setEndLocation(bodyElement, token); - } - } - } - else { - tokenAfterBody(p, token); - } -} -function tokenAfterBody(p, token) { - p.insertionMode = InsertionMode.IN_BODY; - modeInBody(p, token); -} -// The "in frameset" insertion mode -//------------------------------------------------------------------ -function startTagInFrameset(p, token) { - switch (token.tagID) { - case html_js_1.TAG_ID.HTML: { - startTagInBody(p, token); - break; - } - case html_js_1.TAG_ID.FRAMESET: { - p._insertElement(token, html_js_1.NS.HTML); - break; - } - case html_js_1.TAG_ID.FRAME: { - p._appendElement(token, html_js_1.NS.HTML); - token.ackSelfClosing = true; - break; - } - case html_js_1.TAG_ID.NOFRAMES: { - startTagInHead(p, token); - break; - } - default: - // Do nothing - } -} -function endTagInFrameset(p, token) { - if (token.tagID === html_js_1.TAG_ID.FRAMESET && !p.openElements.isRootHtmlElementCurrent()) { - p.openElements.pop(); - if (!p.fragmentContext && p.openElements.currentTagId !== html_js_1.TAG_ID.FRAMESET) { - p.insertionMode = InsertionMode.AFTER_FRAMESET; - } - } -} -// The "after frameset" insertion mode -//------------------------------------------------------------------ -function startTagAfterFrameset(p, token) { - switch (token.tagID) { - case html_js_1.TAG_ID.HTML: { - startTagInBody(p, token); - break; - } - case html_js_1.TAG_ID.NOFRAMES: { - startTagInHead(p, token); - break; - } - default: - // Do nothing - } -} -function endTagAfterFrameset(p, token) { - if (token.tagID === html_js_1.TAG_ID.HTML) { - p.insertionMode = InsertionMode.AFTER_AFTER_FRAMESET; - } -} -// The "after after body" insertion mode -//------------------------------------------------------------------ -function startTagAfterAfterBody(p, token) { - if (token.tagID === html_js_1.TAG_ID.HTML) { - startTagInBody(p, token); - } - else { - tokenAfterAfterBody(p, token); - } -} -function tokenAfterAfterBody(p, token) { - p.insertionMode = InsertionMode.IN_BODY; - modeInBody(p, token); -} -// The "after after frameset" insertion mode -//------------------------------------------------------------------ -function startTagAfterAfterFrameset(p, token) { - switch (token.tagID) { - case html_js_1.TAG_ID.HTML: { - startTagInBody(p, token); - break; - } - case html_js_1.TAG_ID.NOFRAMES: { - startTagInHead(p, token); - break; - } - default: - // Do nothing - } -} -// The rules for parsing tokens in foreign content -//------------------------------------------------------------------ -function nullCharacterInForeignContent(p, token) { - token.chars = unicode.REPLACEMENT_CHARACTER; - p._insertCharacters(token); -} -function characterInForeignContent(p, token) { - p._insertCharacters(token); - p.framesetOk = false; -} -function popUntilHtmlOrIntegrationPoint(p) { - while (p.treeAdapter.getNamespaceURI(p.openElements.current) !== html_js_1.NS.HTML && - !p._isIntegrationPoint(p.openElements.currentTagId, p.openElements.current)) { - p.openElements.pop(); - } -} -function startTagInForeignContent(p, token) { - if (foreignContent.causesExit(token)) { - popUntilHtmlOrIntegrationPoint(p); - p._startTagOutsideForeignContent(token); - } - else { - const current = p._getAdjustedCurrentElement(); - const currentNs = p.treeAdapter.getNamespaceURI(current); - if (currentNs === html_js_1.NS.MATHML) { - foreignContent.adjustTokenMathMLAttrs(token); - } - else if (currentNs === html_js_1.NS.SVG) { - foreignContent.adjustTokenSVGTagName(token); - foreignContent.adjustTokenSVGAttrs(token); - } - foreignContent.adjustTokenXMLAttrs(token); - if (token.selfClosing) { - p._appendElement(token, currentNs); - } - else { - p._insertElement(token, currentNs); - } - token.ackSelfClosing = true; - } -} -function endTagInForeignContent(p, token) { - if (token.tagID === html_js_1.TAG_ID.P || token.tagID === html_js_1.TAG_ID.BR) { - popUntilHtmlOrIntegrationPoint(p); - p._endTagOutsideForeignContent(token); - return; - } - for (let i = p.openElements.stackTop; i > 0; i--) { - const element = p.openElements.items[i]; - if (p.treeAdapter.getNamespaceURI(element) === html_js_1.NS.HTML) { - p._endTagOutsideForeignContent(token); - break; - } - const tagName = p.treeAdapter.getTagName(element); - if (tagName.toLowerCase() === token.tagName) { - //NOTE: update the token tag name for `_setEndLocation`. - token.tagName = tagName; - p.openElements.shortenToLength(i); - break; - } - } -} diff --git a/node_modules/parse5/dist/cjs/parser/open-element-stack.d.ts b/node_modules/parse5/dist/cjs/parser/open-element-stack.d.ts deleted file mode 100644 index 54cc738..0000000 --- a/node_modules/parse5/dist/cjs/parser/open-element-stack.d.ts +++ /dev/null @@ -1,53 +0,0 @@ -import { TAG_ID as $ } from '../common/html.js'; -import type { TreeAdapter, TreeAdapterTypeMap } from '../tree-adapters/interface.js'; -export interface StackHandler<T extends TreeAdapterTypeMap> { - onItemPush: (node: T['parentNode'], tid: number, isTop: boolean) => void; - onItemPop: (node: T['parentNode'], isTop: boolean) => void; -} -export declare class OpenElementStack<T extends TreeAdapterTypeMap> { - private treeAdapter; - private handler; - items: T['parentNode'][]; - tagIDs: $[]; - current: T['parentNode']; - stackTop: number; - tmplCount: number; - currentTagId: $; - get currentTmplContentOrNode(): T['parentNode']; - constructor(document: T['document'], treeAdapter: TreeAdapter<T>, handler: StackHandler<T>); - private _indexOf; - private _isInTemplate; - private _updateCurrentElement; - push(element: T['element'], tagID: $): void; - pop(): void; - replace(oldElement: T['element'], newElement: T['element']): void; - insertAfter(referenceElement: T['element'], newElement: T['element'], newElementID: $): void; - popUntilTagNamePopped(tagName: $): void; - shortenToLength(idx: number): void; - popUntilElementPopped(element: T['element']): void; - private popUntilPopped; - popUntilNumberedHeaderPopped(): void; - popUntilTableCellPopped(): void; - popAllUpToHtmlElement(): void; - private _indexOfTagNames; - private clearBackTo; - clearBackToTableContext(): void; - clearBackToTableBodyContext(): void; - clearBackToTableRowContext(): void; - remove(element: T['element']): void; - tryPeekProperlyNestedBodyElement(): T['element'] | null; - contains(element: T['element']): boolean; - getCommonAncestor(element: T['element']): T['element'] | null; - isRootHtmlElementCurrent(): boolean; - private hasInDynamicScope; - hasInScope(tagName: $): boolean; - hasInListItemScope(tagName: $): boolean; - hasInButtonScope(tagName: $): boolean; - hasNumberedHeaderInScope(): boolean; - hasInTableScope(tagName: $): boolean; - hasTableBodyContextInTableScope(): boolean; - hasInSelectScope(tagName: $): boolean; - generateImpliedEndTags(): void; - generateImpliedEndTagsThoroughly(): void; - generateImpliedEndTagsWithExclusion(exclusionId: $): void; -} diff --git a/node_modules/parse5/dist/cjs/parser/open-element-stack.js b/node_modules/parse5/dist/cjs/parser/open-element-stack.js deleted file mode 100644 index 8028f63..0000000 --- a/node_modules/parse5/dist/cjs/parser/open-element-stack.js +++ /dev/null @@ -1,324 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.OpenElementStack = void 0; -const html_js_1 = require("../common/html.js"); -//Element utils -const IMPLICIT_END_TAG_REQUIRED = new Set([html_js_1.TAG_ID.DD, html_js_1.TAG_ID.DT, html_js_1.TAG_ID.LI, html_js_1.TAG_ID.OPTGROUP, html_js_1.TAG_ID.OPTION, html_js_1.TAG_ID.P, html_js_1.TAG_ID.RB, html_js_1.TAG_ID.RP, html_js_1.TAG_ID.RT, html_js_1.TAG_ID.RTC]); -const IMPLICIT_END_TAG_REQUIRED_THOROUGHLY = new Set([ - ...IMPLICIT_END_TAG_REQUIRED, - html_js_1.TAG_ID.CAPTION, - html_js_1.TAG_ID.COLGROUP, - html_js_1.TAG_ID.TBODY, - html_js_1.TAG_ID.TD, - html_js_1.TAG_ID.TFOOT, - html_js_1.TAG_ID.TH, - html_js_1.TAG_ID.THEAD, - html_js_1.TAG_ID.TR, -]); -const SCOPING_ELEMENTS_HTML = new Set([ - html_js_1.TAG_ID.APPLET, - html_js_1.TAG_ID.CAPTION, - html_js_1.TAG_ID.HTML, - html_js_1.TAG_ID.MARQUEE, - html_js_1.TAG_ID.OBJECT, - html_js_1.TAG_ID.TABLE, - html_js_1.TAG_ID.TD, - html_js_1.TAG_ID.TEMPLATE, - html_js_1.TAG_ID.TH, -]); -const SCOPING_ELEMENTS_HTML_LIST = new Set([...SCOPING_ELEMENTS_HTML, html_js_1.TAG_ID.OL, html_js_1.TAG_ID.UL]); -const SCOPING_ELEMENTS_HTML_BUTTON = new Set([...SCOPING_ELEMENTS_HTML, html_js_1.TAG_ID.BUTTON]); -const SCOPING_ELEMENTS_MATHML = new Set([html_js_1.TAG_ID.ANNOTATION_XML, html_js_1.TAG_ID.MI, html_js_1.TAG_ID.MN, html_js_1.TAG_ID.MO, html_js_1.TAG_ID.MS, html_js_1.TAG_ID.MTEXT]); -const SCOPING_ELEMENTS_SVG = new Set([html_js_1.TAG_ID.DESC, html_js_1.TAG_ID.FOREIGN_OBJECT, html_js_1.TAG_ID.TITLE]); -const TABLE_ROW_CONTEXT = new Set([html_js_1.TAG_ID.TR, html_js_1.TAG_ID.TEMPLATE, html_js_1.TAG_ID.HTML]); -const TABLE_BODY_CONTEXT = new Set([html_js_1.TAG_ID.TBODY, html_js_1.TAG_ID.TFOOT, html_js_1.TAG_ID.THEAD, html_js_1.TAG_ID.TEMPLATE, html_js_1.TAG_ID.HTML]); -const TABLE_CONTEXT = new Set([html_js_1.TAG_ID.TABLE, html_js_1.TAG_ID.TEMPLATE, html_js_1.TAG_ID.HTML]); -const TABLE_CELLS = new Set([html_js_1.TAG_ID.TD, html_js_1.TAG_ID.TH]); -//Stack of open elements -class OpenElementStack { - get currentTmplContentOrNode() { - return this._isInTemplate() ? this.treeAdapter.getTemplateContent(this.current) : this.current; - } - constructor(document, treeAdapter, handler) { - this.treeAdapter = treeAdapter; - this.handler = handler; - this.items = []; - this.tagIDs = []; - this.stackTop = -1; - this.tmplCount = 0; - this.currentTagId = html_js_1.TAG_ID.UNKNOWN; - this.current = document; - } - //Index of element - _indexOf(element) { - return this.items.lastIndexOf(element, this.stackTop); - } - //Update current element - _isInTemplate() { - return this.currentTagId === html_js_1.TAG_ID.TEMPLATE && this.treeAdapter.getNamespaceURI(this.current) === html_js_1.NS.HTML; - } - _updateCurrentElement() { - this.current = this.items[this.stackTop]; - this.currentTagId = this.tagIDs[this.stackTop]; - } - //Mutations - push(element, tagID) { - this.stackTop++; - this.items[this.stackTop] = element; - this.current = element; - this.tagIDs[this.stackTop] = tagID; - this.currentTagId = tagID; - if (this._isInTemplate()) { - this.tmplCount++; - } - this.handler.onItemPush(element, tagID, true); - } - pop() { - const popped = this.current; - if (this.tmplCount > 0 && this._isInTemplate()) { - this.tmplCount--; - } - this.stackTop--; - this._updateCurrentElement(); - this.handler.onItemPop(popped, true); - } - replace(oldElement, newElement) { - const idx = this._indexOf(oldElement); - this.items[idx] = newElement; - if (idx === this.stackTop) { - this.current = newElement; - } - } - insertAfter(referenceElement, newElement, newElementID) { - const insertionIdx = this._indexOf(referenceElement) + 1; - this.items.splice(insertionIdx, 0, newElement); - this.tagIDs.splice(insertionIdx, 0, newElementID); - this.stackTop++; - if (insertionIdx === this.stackTop) { - this._updateCurrentElement(); - } - this.handler.onItemPush(this.current, this.currentTagId, insertionIdx === this.stackTop); - } - popUntilTagNamePopped(tagName) { - let targetIdx = this.stackTop + 1; - do { - targetIdx = this.tagIDs.lastIndexOf(tagName, targetIdx - 1); - } while (targetIdx > 0 && this.treeAdapter.getNamespaceURI(this.items[targetIdx]) !== html_js_1.NS.HTML); - this.shortenToLength(targetIdx < 0 ? 0 : targetIdx); - } - shortenToLength(idx) { - while (this.stackTop >= idx) { - const popped = this.current; - if (this.tmplCount > 0 && this._isInTemplate()) { - this.tmplCount -= 1; - } - this.stackTop--; - this._updateCurrentElement(); - this.handler.onItemPop(popped, this.stackTop < idx); - } - } - popUntilElementPopped(element) { - const idx = this._indexOf(element); - this.shortenToLength(idx < 0 ? 0 : idx); - } - popUntilPopped(tagNames, targetNS) { - const idx = this._indexOfTagNames(tagNames, targetNS); - this.shortenToLength(idx < 0 ? 0 : idx); - } - popUntilNumberedHeaderPopped() { - this.popUntilPopped(html_js_1.NUMBERED_HEADERS, html_js_1.NS.HTML); - } - popUntilTableCellPopped() { - this.popUntilPopped(TABLE_CELLS, html_js_1.NS.HTML); - } - popAllUpToHtmlElement() { - //NOTE: here we assume that the root <html> element is always first in the open element stack, so - //we perform this fast stack clean up. - this.tmplCount = 0; - this.shortenToLength(1); - } - _indexOfTagNames(tagNames, namespace) { - for (let i = this.stackTop; i >= 0; i--) { - if (tagNames.has(this.tagIDs[i]) && this.treeAdapter.getNamespaceURI(this.items[i]) === namespace) { - return i; - } - } - return -1; - } - clearBackTo(tagNames, targetNS) { - const idx = this._indexOfTagNames(tagNames, targetNS); - this.shortenToLength(idx + 1); - } - clearBackToTableContext() { - this.clearBackTo(TABLE_CONTEXT, html_js_1.NS.HTML); - } - clearBackToTableBodyContext() { - this.clearBackTo(TABLE_BODY_CONTEXT, html_js_1.NS.HTML); - } - clearBackToTableRowContext() { - this.clearBackTo(TABLE_ROW_CONTEXT, html_js_1.NS.HTML); - } - remove(element) { - const idx = this._indexOf(element); - if (idx >= 0) { - if (idx === this.stackTop) { - this.pop(); - } - else { - this.items.splice(idx, 1); - this.tagIDs.splice(idx, 1); - this.stackTop--; - this._updateCurrentElement(); - this.handler.onItemPop(element, false); - } - } - } - //Search - tryPeekProperlyNestedBodyElement() { - //Properly nested <body> element (should be second element in stack). - return this.stackTop >= 1 && this.tagIDs[1] === html_js_1.TAG_ID.BODY ? this.items[1] : null; - } - contains(element) { - return this._indexOf(element) > -1; - } - getCommonAncestor(element) { - const elementIdx = this._indexOf(element) - 1; - return elementIdx >= 0 ? this.items[elementIdx] : null; - } - isRootHtmlElementCurrent() { - return this.stackTop === 0 && this.tagIDs[0] === html_js_1.TAG_ID.HTML; - } - //Element in scope - hasInDynamicScope(tagName, htmlScope) { - for (let i = this.stackTop; i >= 0; i--) { - const tn = this.tagIDs[i]; - switch (this.treeAdapter.getNamespaceURI(this.items[i])) { - case html_js_1.NS.HTML: { - if (tn === tagName) - return true; - if (htmlScope.has(tn)) - return false; - break; - } - case html_js_1.NS.SVG: { - if (SCOPING_ELEMENTS_SVG.has(tn)) - return false; - break; - } - case html_js_1.NS.MATHML: { - if (SCOPING_ELEMENTS_MATHML.has(tn)) - return false; - break; - } - } - } - return true; - } - hasInScope(tagName) { - return this.hasInDynamicScope(tagName, SCOPING_ELEMENTS_HTML); - } - hasInListItemScope(tagName) { - return this.hasInDynamicScope(tagName, SCOPING_ELEMENTS_HTML_LIST); - } - hasInButtonScope(tagName) { - return this.hasInDynamicScope(tagName, SCOPING_ELEMENTS_HTML_BUTTON); - } - hasNumberedHeaderInScope() { - for (let i = this.stackTop; i >= 0; i--) { - const tn = this.tagIDs[i]; - switch (this.treeAdapter.getNamespaceURI(this.items[i])) { - case html_js_1.NS.HTML: { - if (html_js_1.NUMBERED_HEADERS.has(tn)) - return true; - if (SCOPING_ELEMENTS_HTML.has(tn)) - return false; - break; - } - case html_js_1.NS.SVG: { - if (SCOPING_ELEMENTS_SVG.has(tn)) - return false; - break; - } - case html_js_1.NS.MATHML: { - if (SCOPING_ELEMENTS_MATHML.has(tn)) - return false; - break; - } - } - } - return true; - } - hasInTableScope(tagName) { - for (let i = this.stackTop; i >= 0; i--) { - if (this.treeAdapter.getNamespaceURI(this.items[i]) !== html_js_1.NS.HTML) { - continue; - } - switch (this.tagIDs[i]) { - case tagName: { - return true; - } - case html_js_1.TAG_ID.TABLE: - case html_js_1.TAG_ID.HTML: { - return false; - } - } - } - return true; - } - hasTableBodyContextInTableScope() { - for (let i = this.stackTop; i >= 0; i--) { - if (this.treeAdapter.getNamespaceURI(this.items[i]) !== html_js_1.NS.HTML) { - continue; - } - switch (this.tagIDs[i]) { - case html_js_1.TAG_ID.TBODY: - case html_js_1.TAG_ID.THEAD: - case html_js_1.TAG_ID.TFOOT: { - return true; - } - case html_js_1.TAG_ID.TABLE: - case html_js_1.TAG_ID.HTML: { - return false; - } - } - } - return true; - } - hasInSelectScope(tagName) { - for (let i = this.stackTop; i >= 0; i--) { - if (this.treeAdapter.getNamespaceURI(this.items[i]) !== html_js_1.NS.HTML) { - continue; - } - switch (this.tagIDs[i]) { - case tagName: { - return true; - } - case html_js_1.TAG_ID.OPTION: - case html_js_1.TAG_ID.OPTGROUP: { - break; - } - default: { - return false; - } - } - } - return true; - } - //Implied end tags - generateImpliedEndTags() { - while (IMPLICIT_END_TAG_REQUIRED.has(this.currentTagId)) { - this.pop(); - } - } - generateImpliedEndTagsThoroughly() { - while (IMPLICIT_END_TAG_REQUIRED_THOROUGHLY.has(this.currentTagId)) { - this.pop(); - } - } - generateImpliedEndTagsWithExclusion(exclusionId) { - while (this.currentTagId !== exclusionId && IMPLICIT_END_TAG_REQUIRED_THOROUGHLY.has(this.currentTagId)) { - this.pop(); - } - } -} -exports.OpenElementStack = OpenElementStack; diff --git a/node_modules/parse5/dist/cjs/serializer/index.d.ts b/node_modules/parse5/dist/cjs/serializer/index.d.ts deleted file mode 100644 index 995b3d7..0000000 --- a/node_modules/parse5/dist/cjs/serializer/index.d.ts +++ /dev/null @@ -1,60 +0,0 @@ -import type { TreeAdapter, TreeAdapterTypeMap } from '../tree-adapters/interface.js'; -import { type DefaultTreeAdapterMap } from '../tree-adapters/default.js'; -export interface SerializerOptions<T extends TreeAdapterTypeMap> { - /** - * Specifies input tree format. - * - * @default `treeAdapters.default` - */ - treeAdapter?: TreeAdapter<T>; - /** - * The [scripting flag](https://html.spec.whatwg.org/multipage/parsing.html#scripting-flag). If set - * to `true`, `noscript` element content will not be escaped. - * - * @default `true` - */ - scriptingEnabled?: boolean; -} -/** - * Serializes an AST node to an HTML string. - * - * @example - * - * ```js - * const parse5 = require('parse5'); - * - * const document = parse5.parse('<!DOCTYPE html><html><head></head><body>Hi there!</body></html>'); - * - * // Serializes a document. - * const html = parse5.serialize(document); - * - * // Serializes the <html> element content. - * const str = parse5.serialize(document.childNodes[1]); - * - * console.log(str); //> '<head></head><body>Hi there!</body>' - * ``` - * - * @param node Node to serialize. - * @param options Serialization options. - */ -export declare function serialize<T extends TreeAdapterTypeMap = DefaultTreeAdapterMap>(node: T['parentNode'], options?: SerializerOptions<T>): string; -/** - * Serializes an AST element node to an HTML string, including the element node. - * - * @example - * - * ```js - * const parse5 = require('parse5'); - * - * const document = parse5.parseFragment('<div>Hello, <b>world</b>!</div>'); - * - * // Serializes the <div> element. - * const str = parse5.serializeOuter(document.childNodes[0]); - * - * console.log(str); //> '<div>Hello, <b>world</b>!</div>' - * ``` - * - * @param node Node to serialize. - * @param options Serialization options. - */ -export declare function serializeOuter<T extends TreeAdapterTypeMap = DefaultTreeAdapterMap>(node: T['node'], options?: SerializerOptions<T>): string; diff --git a/node_modules/parse5/dist/cjs/serializer/index.js b/node_modules/parse5/dist/cjs/serializer/index.js deleted file mode 100644 index ec7e794..0000000 --- a/node_modules/parse5/dist/cjs/serializer/index.js +++ /dev/null @@ -1,172 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.serialize = serialize; -exports.serializeOuter = serializeOuter; -const html_js_1 = require("../common/html.js"); -const escape_js_1 = require("entities/lib/escape.js"); -const default_js_1 = require("../tree-adapters/default.js"); -// Sets -const VOID_ELEMENTS = new Set([ - html_js_1.TAG_NAMES.AREA, - html_js_1.TAG_NAMES.BASE, - html_js_1.TAG_NAMES.BASEFONT, - html_js_1.TAG_NAMES.BGSOUND, - html_js_1.TAG_NAMES.BR, - html_js_1.TAG_NAMES.COL, - html_js_1.TAG_NAMES.EMBED, - html_js_1.TAG_NAMES.FRAME, - html_js_1.TAG_NAMES.HR, - html_js_1.TAG_NAMES.IMG, - html_js_1.TAG_NAMES.INPUT, - html_js_1.TAG_NAMES.KEYGEN, - html_js_1.TAG_NAMES.LINK, - html_js_1.TAG_NAMES.META, - html_js_1.TAG_NAMES.PARAM, - html_js_1.TAG_NAMES.SOURCE, - html_js_1.TAG_NAMES.TRACK, - html_js_1.TAG_NAMES.WBR, -]); -function isVoidElement(node, options) { - return (options.treeAdapter.isElementNode(node) && - options.treeAdapter.getNamespaceURI(node) === html_js_1.NS.HTML && - VOID_ELEMENTS.has(options.treeAdapter.getTagName(node))); -} -const defaultOpts = { treeAdapter: default_js_1.defaultTreeAdapter, scriptingEnabled: true }; -/** - * Serializes an AST node to an HTML string. - * - * @example - * - * ```js - * const parse5 = require('parse5'); - * - * const document = parse5.parse('<!DOCTYPE html><html><head></head><body>Hi there!</body></html>'); - * - * // Serializes a document. - * const html = parse5.serialize(document); - * - * // Serializes the <html> element content. - * const str = parse5.serialize(document.childNodes[1]); - * - * console.log(str); //> '<head></head><body>Hi there!</body>' - * ``` - * - * @param node Node to serialize. - * @param options Serialization options. - */ -function serialize(node, options) { - const opts = Object.assign(Object.assign({}, defaultOpts), options); - if (isVoidElement(node, opts)) { - return ''; - } - return serializeChildNodes(node, opts); -} -/** - * Serializes an AST element node to an HTML string, including the element node. - * - * @example - * - * ```js - * const parse5 = require('parse5'); - * - * const document = parse5.parseFragment('<div>Hello, <b>world</b>!</div>'); - * - * // Serializes the <div> element. - * const str = parse5.serializeOuter(document.childNodes[0]); - * - * console.log(str); //> '<div>Hello, <b>world</b>!</div>' - * ``` - * - * @param node Node to serialize. - * @param options Serialization options. - */ -function serializeOuter(node, options) { - const opts = Object.assign(Object.assign({}, defaultOpts), options); - return serializeNode(node, opts); -} -function serializeChildNodes(parentNode, options) { - let html = ''; - // Get container of the child nodes - const container = options.treeAdapter.isElementNode(parentNode) && - options.treeAdapter.getTagName(parentNode) === html_js_1.TAG_NAMES.TEMPLATE && - options.treeAdapter.getNamespaceURI(parentNode) === html_js_1.NS.HTML - ? options.treeAdapter.getTemplateContent(parentNode) - : parentNode; - const childNodes = options.treeAdapter.getChildNodes(container); - if (childNodes) { - for (const currentNode of childNodes) { - html += serializeNode(currentNode, options); - } - } - return html; -} -function serializeNode(node, options) { - if (options.treeAdapter.isElementNode(node)) { - return serializeElement(node, options); - } - if (options.treeAdapter.isTextNode(node)) { - return serializeTextNode(node, options); - } - if (options.treeAdapter.isCommentNode(node)) { - return serializeCommentNode(node, options); - } - if (options.treeAdapter.isDocumentTypeNode(node)) { - return serializeDocumentTypeNode(node, options); - } - // Return an empty string for unknown nodes - return ''; -} -function serializeElement(node, options) { - const tn = options.treeAdapter.getTagName(node); - return `<${tn}${serializeAttributes(node, options)}>${isVoidElement(node, options) ? '' : `${serializeChildNodes(node, options)}</${tn}>`}`; -} -function serializeAttributes(node, { treeAdapter }) { - let html = ''; - for (const attr of treeAdapter.getAttrList(node)) { - html += ' '; - if (attr.namespace) { - switch (attr.namespace) { - case html_js_1.NS.XML: { - html += `xml:${attr.name}`; - break; - } - case html_js_1.NS.XMLNS: { - if (attr.name !== 'xmlns') { - html += 'xmlns:'; - } - html += attr.name; - break; - } - case html_js_1.NS.XLINK: { - html += `xlink:${attr.name}`; - break; - } - default: { - html += `${attr.prefix}:${attr.name}`; - } - } - } - else { - html += attr.name; - } - html += `="${(0, escape_js_1.escapeAttribute)(attr.value)}"`; - } - return html; -} -function serializeTextNode(node, options) { - const { treeAdapter } = options; - const content = treeAdapter.getTextNodeContent(node); - const parent = treeAdapter.getParentNode(node); - const parentTn = parent && treeAdapter.isElementNode(parent) && treeAdapter.getTagName(parent); - return parentTn && - treeAdapter.getNamespaceURI(parent) === html_js_1.NS.HTML && - (0, html_js_1.hasUnescapedText)(parentTn, options.scriptingEnabled) - ? content - : (0, escape_js_1.escapeText)(content); -} -function serializeCommentNode(node, { treeAdapter }) { - return `<!--${treeAdapter.getCommentNodeContent(node)}-->`; -} -function serializeDocumentTypeNode(node, { treeAdapter }) { - return `<!DOCTYPE ${treeAdapter.getDocumentTypeNodeName(node)}>`; -} diff --git a/node_modules/parse5/dist/cjs/tokenizer/index.d.ts b/node_modules/parse5/dist/cjs/tokenizer/index.d.ts deleted file mode 100644 index 6819efc..0000000 --- a/node_modules/parse5/dist/cjs/tokenizer/index.d.ts +++ /dev/null @@ -1,247 +0,0 @@ -import { Preprocessor } from './preprocessor.js'; -import { type Token, type CharacterToken, type DoctypeToken, type TagToken, type EOFToken, type CommentToken, type Attribute, type Location } from '../common/token.js'; -import { EntityDecoder } from 'entities/lib/decode.js'; -import { ERR, type ParserErrorHandler } from '../common/error-codes.js'; -declare const enum State { - DATA = 0, - RCDATA = 1, - RAWTEXT = 2, - SCRIPT_DATA = 3, - PLAINTEXT = 4, - TAG_OPEN = 5, - END_TAG_OPEN = 6, - TAG_NAME = 7, - RCDATA_LESS_THAN_SIGN = 8, - RCDATA_END_TAG_OPEN = 9, - RCDATA_END_TAG_NAME = 10, - RAWTEXT_LESS_THAN_SIGN = 11, - RAWTEXT_END_TAG_OPEN = 12, - RAWTEXT_END_TAG_NAME = 13, - SCRIPT_DATA_LESS_THAN_SIGN = 14, - SCRIPT_DATA_END_TAG_OPEN = 15, - SCRIPT_DATA_END_TAG_NAME = 16, - SCRIPT_DATA_ESCAPE_START = 17, - SCRIPT_DATA_ESCAPE_START_DASH = 18, - SCRIPT_DATA_ESCAPED = 19, - SCRIPT_DATA_ESCAPED_DASH = 20, - SCRIPT_DATA_ESCAPED_DASH_DASH = 21, - SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN = 22, - SCRIPT_DATA_ESCAPED_END_TAG_OPEN = 23, - SCRIPT_DATA_ESCAPED_END_TAG_NAME = 24, - SCRIPT_DATA_DOUBLE_ESCAPE_START = 25, - SCRIPT_DATA_DOUBLE_ESCAPED = 26, - SCRIPT_DATA_DOUBLE_ESCAPED_DASH = 27, - SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH = 28, - SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN = 29, - SCRIPT_DATA_DOUBLE_ESCAPE_END = 30, - BEFORE_ATTRIBUTE_NAME = 31, - ATTRIBUTE_NAME = 32, - AFTER_ATTRIBUTE_NAME = 33, - BEFORE_ATTRIBUTE_VALUE = 34, - ATTRIBUTE_VALUE_DOUBLE_QUOTED = 35, - ATTRIBUTE_VALUE_SINGLE_QUOTED = 36, - ATTRIBUTE_VALUE_UNQUOTED = 37, - AFTER_ATTRIBUTE_VALUE_QUOTED = 38, - SELF_CLOSING_START_TAG = 39, - BOGUS_COMMENT = 40, - MARKUP_DECLARATION_OPEN = 41, - COMMENT_START = 42, - COMMENT_START_DASH = 43, - COMMENT = 44, - COMMENT_LESS_THAN_SIGN = 45, - COMMENT_LESS_THAN_SIGN_BANG = 46, - COMMENT_LESS_THAN_SIGN_BANG_DASH = 47, - COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH = 48, - COMMENT_END_DASH = 49, - COMMENT_END = 50, - COMMENT_END_BANG = 51, - DOCTYPE = 52, - BEFORE_DOCTYPE_NAME = 53, - DOCTYPE_NAME = 54, - AFTER_DOCTYPE_NAME = 55, - AFTER_DOCTYPE_PUBLIC_KEYWORD = 56, - BEFORE_DOCTYPE_PUBLIC_IDENTIFIER = 57, - DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED = 58, - DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED = 59, - AFTER_DOCTYPE_PUBLIC_IDENTIFIER = 60, - BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS = 61, - AFTER_DOCTYPE_SYSTEM_KEYWORD = 62, - BEFORE_DOCTYPE_SYSTEM_IDENTIFIER = 63, - DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED = 64, - DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED = 65, - AFTER_DOCTYPE_SYSTEM_IDENTIFIER = 66, - BOGUS_DOCTYPE = 67, - CDATA_SECTION = 68, - CDATA_SECTION_BRACKET = 69, - CDATA_SECTION_END = 70, - CHARACTER_REFERENCE = 71, - AMBIGUOUS_AMPERSAND = 72 -} -export declare const TokenizerMode: { - readonly DATA: State.DATA; - readonly RCDATA: State.RCDATA; - readonly RAWTEXT: State.RAWTEXT; - readonly SCRIPT_DATA: State.SCRIPT_DATA; - readonly PLAINTEXT: State.PLAINTEXT; - readonly CDATA_SECTION: State.CDATA_SECTION; -}; -export interface TokenizerOptions { - sourceCodeLocationInfo?: boolean; -} -export interface TokenHandler { - onComment(token: CommentToken): void; - onDoctype(token: DoctypeToken): void; - onStartTag(token: TagToken): void; - onEndTag(token: TagToken): void; - onEof(token: EOFToken): void; - onCharacter(token: CharacterToken): void; - onNullCharacter(token: CharacterToken): void; - onWhitespaceCharacter(token: CharacterToken): void; - onParseError?: ParserErrorHandler | null; -} -export declare class Tokenizer { - protected options: TokenizerOptions; - protected handler: TokenHandler; - preprocessor: Preprocessor; - protected paused: boolean; - /** Ensures that the parsing loop isn't run multiple times at once. */ - protected inLoop: boolean; - /** - * Indicates that the current adjusted node exists, is not an element in the HTML namespace, - * and that it is not an integration point for either MathML or HTML. - * - * @see {@link https://html.spec.whatwg.org/multipage/parsing.html#tree-construction} - */ - inForeignNode: boolean; - lastStartTagName: string; - active: boolean; - state: State; - protected returnState: State; - /** - * We use `entities`' `EntityDecoder` to parse character references. - * - * All of the following states are handled by the `EntityDecoder`: - * - * - Named character reference state - * - Numeric character reference state - * - Hexademical character reference start state - * - Hexademical character reference state - * - Decimal character reference state - * - Numeric character reference end state - */ - protected entityDecoder: EntityDecoder; - protected entityStartPos: number; - protected consumedAfterSnapshot: number; - protected currentLocation: Location | null; - protected currentCharacterToken: CharacterToken | null; - protected currentToken: Token | null; - protected currentAttr: Attribute; - constructor(options: TokenizerOptions, handler: TokenHandler); - protected _err(code: ERR, cpOffset?: number): void; - protected getCurrentLocation(offset: number): Location | null; - protected _runParsingLoop(): void; - pause(): void; - resume(writeCallback?: () => void): void; - write(chunk: string, isLastChunk: boolean, writeCallback?: () => void): void; - insertHtmlAtCurrentPos(chunk: string): void; - protected _ensureHibernation(): boolean; - protected _consume(): number; - protected _advanceBy(count: number): void; - protected _consumeSequenceIfMatch(pattern: string, caseSensitive: boolean): boolean; - protected _createStartTagToken(): void; - protected _createEndTagToken(): void; - protected _createCommentToken(offset: number): void; - protected _createDoctypeToken(initialName: string | null): void; - protected _createCharacterToken(type: CharacterToken['type'], chars: string): void; - protected _createAttr(attrNameFirstCh: string): void; - protected _leaveAttrName(): void; - protected _leaveAttrValue(): void; - protected prepareToken(ct: Token): void; - protected emitCurrentTagToken(): void; - protected emitCurrentComment(ct: CommentToken): void; - protected emitCurrentDoctype(ct: DoctypeToken): void; - protected _emitCurrentCharacterToken(nextLocation: Location | null): void; - protected _emitEOFToken(): void; - protected _appendCharToCurrentCharacterToken(type: CharacterToken['type'], ch: string): void; - protected _emitCodePoint(cp: number): void; - protected _emitChars(ch: string): void; - protected _startCharacterReference(): void; - protected _isCharacterReferenceInAttribute(): boolean; - protected _flushCodePointConsumedAsCharacterReference(cp: number): void; - protected _callState(cp: number): void; - protected _stateData(cp: number): void; - protected _stateRcdata(cp: number): void; - protected _stateRawtext(cp: number): void; - protected _stateScriptData(cp: number): void; - protected _statePlaintext(cp: number): void; - protected _stateTagOpen(cp: number): void; - protected _stateEndTagOpen(cp: number): void; - protected _stateTagName(cp: number): void; - protected _stateRcdataLessThanSign(cp: number): void; - protected _stateRcdataEndTagOpen(cp: number): void; - protected handleSpecialEndTag(_cp: number): boolean; - protected _stateRcdataEndTagName(cp: number): void; - protected _stateRawtextLessThanSign(cp: number): void; - protected _stateRawtextEndTagOpen(cp: number): void; - protected _stateRawtextEndTagName(cp: number): void; - protected _stateScriptDataLessThanSign(cp: number): void; - protected _stateScriptDataEndTagOpen(cp: number): void; - protected _stateScriptDataEndTagName(cp: number): void; - protected _stateScriptDataEscapeStart(cp: number): void; - protected _stateScriptDataEscapeStartDash(cp: number): void; - protected _stateScriptDataEscaped(cp: number): void; - protected _stateScriptDataEscapedDash(cp: number): void; - protected _stateScriptDataEscapedDashDash(cp: number): void; - protected _stateScriptDataEscapedLessThanSign(cp: number): void; - protected _stateScriptDataEscapedEndTagOpen(cp: number): void; - protected _stateScriptDataEscapedEndTagName(cp: number): void; - protected _stateScriptDataDoubleEscapeStart(cp: number): void; - protected _stateScriptDataDoubleEscaped(cp: number): void; - protected _stateScriptDataDoubleEscapedDash(cp: number): void; - protected _stateScriptDataDoubleEscapedDashDash(cp: number): void; - protected _stateScriptDataDoubleEscapedLessThanSign(cp: number): void; - protected _stateScriptDataDoubleEscapeEnd(cp: number): void; - protected _stateBeforeAttributeName(cp: number): void; - protected _stateAttributeName(cp: number): void; - protected _stateAfterAttributeName(cp: number): void; - protected _stateBeforeAttributeValue(cp: number): void; - protected _stateAttributeValueDoubleQuoted(cp: number): void; - protected _stateAttributeValueSingleQuoted(cp: number): void; - protected _stateAttributeValueUnquoted(cp: number): void; - protected _stateAfterAttributeValueQuoted(cp: number): void; - protected _stateSelfClosingStartTag(cp: number): void; - protected _stateBogusComment(cp: number): void; - protected _stateMarkupDeclarationOpen(cp: number): void; - protected _stateCommentStart(cp: number): void; - protected _stateCommentStartDash(cp: number): void; - protected _stateComment(cp: number): void; - protected _stateCommentLessThanSign(cp: number): void; - protected _stateCommentLessThanSignBang(cp: number): void; - protected _stateCommentLessThanSignBangDash(cp: number): void; - protected _stateCommentLessThanSignBangDashDash(cp: number): void; - protected _stateCommentEndDash(cp: number): void; - protected _stateCommentEnd(cp: number): void; - protected _stateCommentEndBang(cp: number): void; - protected _stateDoctype(cp: number): void; - protected _stateBeforeDoctypeName(cp: number): void; - protected _stateDoctypeName(cp: number): void; - protected _stateAfterDoctypeName(cp: number): void; - protected _stateAfterDoctypePublicKeyword(cp: number): void; - protected _stateBeforeDoctypePublicIdentifier(cp: number): void; - protected _stateDoctypePublicIdentifierDoubleQuoted(cp: number): void; - protected _stateDoctypePublicIdentifierSingleQuoted(cp: number): void; - protected _stateAfterDoctypePublicIdentifier(cp: number): void; - protected _stateBetweenDoctypePublicAndSystemIdentifiers(cp: number): void; - protected _stateAfterDoctypeSystemKeyword(cp: number): void; - protected _stateBeforeDoctypeSystemIdentifier(cp: number): void; - protected _stateDoctypeSystemIdentifierDoubleQuoted(cp: number): void; - protected _stateDoctypeSystemIdentifierSingleQuoted(cp: number): void; - protected _stateAfterDoctypeSystemIdentifier(cp: number): void; - protected _stateBogusDoctype(cp: number): void; - protected _stateCdataSection(cp: number): void; - protected _stateCdataSectionBracket(cp: number): void; - protected _stateCdataSectionEnd(cp: number): void; - protected _stateCharacterReference(): void; - protected _stateAmbiguousAmpersand(cp: number): void; -} -export {}; diff --git a/node_modules/parse5/dist/cjs/tokenizer/index.js b/node_modules/parse5/dist/cjs/tokenizer/index.js deleted file mode 100644 index 5278ba9..0000000 --- a/node_modules/parse5/dist/cjs/tokenizer/index.js +++ /dev/null @@ -1,2714 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.Tokenizer = exports.TokenizerMode = void 0; -const preprocessor_js_1 = require("./preprocessor.js"); -const unicode_js_1 = require("../common/unicode.js"); -const token_js_1 = require("../common/token.js"); -const decode_js_1 = require("entities/lib/decode.js"); -const error_codes_js_1 = require("../common/error-codes.js"); -const html_js_1 = require("../common/html.js"); -//States -var State; -(function (State) { - State[State["DATA"] = 0] = "DATA"; - State[State["RCDATA"] = 1] = "RCDATA"; - State[State["RAWTEXT"] = 2] = "RAWTEXT"; - State[State["SCRIPT_DATA"] = 3] = "SCRIPT_DATA"; - State[State["PLAINTEXT"] = 4] = "PLAINTEXT"; - State[State["TAG_OPEN"] = 5] = "TAG_OPEN"; - State[State["END_TAG_OPEN"] = 6] = "END_TAG_OPEN"; - State[State["TAG_NAME"] = 7] = "TAG_NAME"; - State[State["RCDATA_LESS_THAN_SIGN"] = 8] = "RCDATA_LESS_THAN_SIGN"; - State[State["RCDATA_END_TAG_OPEN"] = 9] = "RCDATA_END_TAG_OPEN"; - State[State["RCDATA_END_TAG_NAME"] = 10] = "RCDATA_END_TAG_NAME"; - State[State["RAWTEXT_LESS_THAN_SIGN"] = 11] = "RAWTEXT_LESS_THAN_SIGN"; - State[State["RAWTEXT_END_TAG_OPEN"] = 12] = "RAWTEXT_END_TAG_OPEN"; - State[State["RAWTEXT_END_TAG_NAME"] = 13] = "RAWTEXT_END_TAG_NAME"; - State[State["SCRIPT_DATA_LESS_THAN_SIGN"] = 14] = "SCRIPT_DATA_LESS_THAN_SIGN"; - State[State["SCRIPT_DATA_END_TAG_OPEN"] = 15] = "SCRIPT_DATA_END_TAG_OPEN"; - State[State["SCRIPT_DATA_END_TAG_NAME"] = 16] = "SCRIPT_DATA_END_TAG_NAME"; - State[State["SCRIPT_DATA_ESCAPE_START"] = 17] = "SCRIPT_DATA_ESCAPE_START"; - State[State["SCRIPT_DATA_ESCAPE_START_DASH"] = 18] = "SCRIPT_DATA_ESCAPE_START_DASH"; - State[State["SCRIPT_DATA_ESCAPED"] = 19] = "SCRIPT_DATA_ESCAPED"; - State[State["SCRIPT_DATA_ESCAPED_DASH"] = 20] = "SCRIPT_DATA_ESCAPED_DASH"; - State[State["SCRIPT_DATA_ESCAPED_DASH_DASH"] = 21] = "SCRIPT_DATA_ESCAPED_DASH_DASH"; - State[State["SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN"] = 22] = "SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN"; - State[State["SCRIPT_DATA_ESCAPED_END_TAG_OPEN"] = 23] = "SCRIPT_DATA_ESCAPED_END_TAG_OPEN"; - State[State["SCRIPT_DATA_ESCAPED_END_TAG_NAME"] = 24] = "SCRIPT_DATA_ESCAPED_END_TAG_NAME"; - State[State["SCRIPT_DATA_DOUBLE_ESCAPE_START"] = 25] = "SCRIPT_DATA_DOUBLE_ESCAPE_START"; - State[State["SCRIPT_DATA_DOUBLE_ESCAPED"] = 26] = "SCRIPT_DATA_DOUBLE_ESCAPED"; - State[State["SCRIPT_DATA_DOUBLE_ESCAPED_DASH"] = 27] = "SCRIPT_DATA_DOUBLE_ESCAPED_DASH"; - State[State["SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH"] = 28] = "SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH"; - State[State["SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN"] = 29] = "SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN"; - State[State["SCRIPT_DATA_DOUBLE_ESCAPE_END"] = 30] = "SCRIPT_DATA_DOUBLE_ESCAPE_END"; - State[State["BEFORE_ATTRIBUTE_NAME"] = 31] = "BEFORE_ATTRIBUTE_NAME"; - State[State["ATTRIBUTE_NAME"] = 32] = "ATTRIBUTE_NAME"; - State[State["AFTER_ATTRIBUTE_NAME"] = 33] = "AFTER_ATTRIBUTE_NAME"; - State[State["BEFORE_ATTRIBUTE_VALUE"] = 34] = "BEFORE_ATTRIBUTE_VALUE"; - State[State["ATTRIBUTE_VALUE_DOUBLE_QUOTED"] = 35] = "ATTRIBUTE_VALUE_DOUBLE_QUOTED"; - State[State["ATTRIBUTE_VALUE_SINGLE_QUOTED"] = 36] = "ATTRIBUTE_VALUE_SINGLE_QUOTED"; - State[State["ATTRIBUTE_VALUE_UNQUOTED"] = 37] = "ATTRIBUTE_VALUE_UNQUOTED"; - State[State["AFTER_ATTRIBUTE_VALUE_QUOTED"] = 38] = "AFTER_ATTRIBUTE_VALUE_QUOTED"; - State[State["SELF_CLOSING_START_TAG"] = 39] = "SELF_CLOSING_START_TAG"; - State[State["BOGUS_COMMENT"] = 40] = "BOGUS_COMMENT"; - State[State["MARKUP_DECLARATION_OPEN"] = 41] = "MARKUP_DECLARATION_OPEN"; - State[State["COMMENT_START"] = 42] = "COMMENT_START"; - State[State["COMMENT_START_DASH"] = 43] = "COMMENT_START_DASH"; - State[State["COMMENT"] = 44] = "COMMENT"; - State[State["COMMENT_LESS_THAN_SIGN"] = 45] = "COMMENT_LESS_THAN_SIGN"; - State[State["COMMENT_LESS_THAN_SIGN_BANG"] = 46] = "COMMENT_LESS_THAN_SIGN_BANG"; - State[State["COMMENT_LESS_THAN_SIGN_BANG_DASH"] = 47] = "COMMENT_LESS_THAN_SIGN_BANG_DASH"; - State[State["COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH"] = 48] = "COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH"; - State[State["COMMENT_END_DASH"] = 49] = "COMMENT_END_DASH"; - State[State["COMMENT_END"] = 50] = "COMMENT_END"; - State[State["COMMENT_END_BANG"] = 51] = "COMMENT_END_BANG"; - State[State["DOCTYPE"] = 52] = "DOCTYPE"; - State[State["BEFORE_DOCTYPE_NAME"] = 53] = "BEFORE_DOCTYPE_NAME"; - State[State["DOCTYPE_NAME"] = 54] = "DOCTYPE_NAME"; - State[State["AFTER_DOCTYPE_NAME"] = 55] = "AFTER_DOCTYPE_NAME"; - State[State["AFTER_DOCTYPE_PUBLIC_KEYWORD"] = 56] = "AFTER_DOCTYPE_PUBLIC_KEYWORD"; - State[State["BEFORE_DOCTYPE_PUBLIC_IDENTIFIER"] = 57] = "BEFORE_DOCTYPE_PUBLIC_IDENTIFIER"; - State[State["DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED"] = 58] = "DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED"; - State[State["DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED"] = 59] = "DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED"; - State[State["AFTER_DOCTYPE_PUBLIC_IDENTIFIER"] = 60] = "AFTER_DOCTYPE_PUBLIC_IDENTIFIER"; - State[State["BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS"] = 61] = "BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS"; - State[State["AFTER_DOCTYPE_SYSTEM_KEYWORD"] = 62] = "AFTER_DOCTYPE_SYSTEM_KEYWORD"; - State[State["BEFORE_DOCTYPE_SYSTEM_IDENTIFIER"] = 63] = "BEFORE_DOCTYPE_SYSTEM_IDENTIFIER"; - State[State["DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED"] = 64] = "DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED"; - State[State["DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED"] = 65] = "DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED"; - State[State["AFTER_DOCTYPE_SYSTEM_IDENTIFIER"] = 66] = "AFTER_DOCTYPE_SYSTEM_IDENTIFIER"; - State[State["BOGUS_DOCTYPE"] = 67] = "BOGUS_DOCTYPE"; - State[State["CDATA_SECTION"] = 68] = "CDATA_SECTION"; - State[State["CDATA_SECTION_BRACKET"] = 69] = "CDATA_SECTION_BRACKET"; - State[State["CDATA_SECTION_END"] = 70] = "CDATA_SECTION_END"; - State[State["CHARACTER_REFERENCE"] = 71] = "CHARACTER_REFERENCE"; - State[State["AMBIGUOUS_AMPERSAND"] = 72] = "AMBIGUOUS_AMPERSAND"; -})(State || (State = {})); -//Tokenizer initial states for different modes -exports.TokenizerMode = { - DATA: State.DATA, - RCDATA: State.RCDATA, - RAWTEXT: State.RAWTEXT, - SCRIPT_DATA: State.SCRIPT_DATA, - PLAINTEXT: State.PLAINTEXT, - CDATA_SECTION: State.CDATA_SECTION, -}; -//Utils -//OPTIMIZATION: these utility functions should not be moved out of this module. V8 Crankshaft will not inline -//this functions if they will be situated in another module due to context switch. -//Always perform inlining check before modifying this functions ('node --trace-inlining'). -function isAsciiDigit(cp) { - return cp >= unicode_js_1.CODE_POINTS.DIGIT_0 && cp <= unicode_js_1.CODE_POINTS.DIGIT_9; -} -function isAsciiUpper(cp) { - return cp >= unicode_js_1.CODE_POINTS.LATIN_CAPITAL_A && cp <= unicode_js_1.CODE_POINTS.LATIN_CAPITAL_Z; -} -function isAsciiLower(cp) { - return cp >= unicode_js_1.CODE_POINTS.LATIN_SMALL_A && cp <= unicode_js_1.CODE_POINTS.LATIN_SMALL_Z; -} -function isAsciiLetter(cp) { - return isAsciiLower(cp) || isAsciiUpper(cp); -} -function isAsciiAlphaNumeric(cp) { - return isAsciiLetter(cp) || isAsciiDigit(cp); -} -function toAsciiLower(cp) { - return cp + 32; -} -function isWhitespace(cp) { - return cp === unicode_js_1.CODE_POINTS.SPACE || cp === unicode_js_1.CODE_POINTS.LINE_FEED || cp === unicode_js_1.CODE_POINTS.TABULATION || cp === unicode_js_1.CODE_POINTS.FORM_FEED; -} -function isScriptDataDoubleEscapeSequenceEnd(cp) { - return isWhitespace(cp) || cp === unicode_js_1.CODE_POINTS.SOLIDUS || cp === unicode_js_1.CODE_POINTS.GREATER_THAN_SIGN; -} -function getErrorForNumericCharacterReference(code) { - if (code === unicode_js_1.CODE_POINTS.NULL) { - return error_codes_js_1.ERR.nullCharacterReference; - } - else if (code > 1114111) { - return error_codes_js_1.ERR.characterReferenceOutsideUnicodeRange; - } - else if ((0, unicode_js_1.isSurrogate)(code)) { - return error_codes_js_1.ERR.surrogateCharacterReference; - } - else if ((0, unicode_js_1.isUndefinedCodePoint)(code)) { - return error_codes_js_1.ERR.noncharacterCharacterReference; - } - else if ((0, unicode_js_1.isControlCodePoint)(code) || code === unicode_js_1.CODE_POINTS.CARRIAGE_RETURN) { - return error_codes_js_1.ERR.controlCharacterReference; - } - return null; -} -//Tokenizer -class Tokenizer { - constructor(options, handler) { - this.options = options; - this.handler = handler; - this.paused = false; - /** Ensures that the parsing loop isn't run multiple times at once. */ - this.inLoop = false; - /** - * Indicates that the current adjusted node exists, is not an element in the HTML namespace, - * and that it is not an integration point for either MathML or HTML. - * - * @see {@link https://html.spec.whatwg.org/multipage/parsing.html#tree-construction} - */ - this.inForeignNode = false; - this.lastStartTagName = ''; - this.active = false; - this.state = State.DATA; - this.returnState = State.DATA; - this.entityStartPos = 0; - this.consumedAfterSnapshot = -1; - this.currentCharacterToken = null; - this.currentToken = null; - this.currentAttr = { name: '', value: '' }; - this.preprocessor = new preprocessor_js_1.Preprocessor(handler); - this.currentLocation = this.getCurrentLocation(-1); - this.entityDecoder = new decode_js_1.EntityDecoder(decode_js_1.htmlDecodeTree, (cp, consumed) => { - // Note: Set `pos` _before_ flushing, as flushing might drop - // the current chunk and invalidate `entityStartPos`. - this.preprocessor.pos = this.entityStartPos + consumed - 1; - this._flushCodePointConsumedAsCharacterReference(cp); - }, handler.onParseError - ? { - missingSemicolonAfterCharacterReference: () => { - this._err(error_codes_js_1.ERR.missingSemicolonAfterCharacterReference, 1); - }, - absenceOfDigitsInNumericCharacterReference: (consumed) => { - this._err(error_codes_js_1.ERR.absenceOfDigitsInNumericCharacterReference, this.entityStartPos - this.preprocessor.pos + consumed); - }, - validateNumericCharacterReference: (code) => { - const error = getErrorForNumericCharacterReference(code); - if (error) - this._err(error, 1); - }, - } - : undefined); - } - //Errors - _err(code, cpOffset = 0) { - var _a, _b; - (_b = (_a = this.handler).onParseError) === null || _b === void 0 ? void 0 : _b.call(_a, this.preprocessor.getError(code, cpOffset)); - } - // NOTE: `offset` may never run across line boundaries. - getCurrentLocation(offset) { - if (!this.options.sourceCodeLocationInfo) { - return null; - } - return { - startLine: this.preprocessor.line, - startCol: this.preprocessor.col - offset, - startOffset: this.preprocessor.offset - offset, - endLine: -1, - endCol: -1, - endOffset: -1, - }; - } - _runParsingLoop() { - if (this.inLoop) - return; - this.inLoop = true; - while (this.active && !this.paused) { - this.consumedAfterSnapshot = 0; - const cp = this._consume(); - if (!this._ensureHibernation()) { - this._callState(cp); - } - } - this.inLoop = false; - } - //API - pause() { - this.paused = true; - } - resume(writeCallback) { - if (!this.paused) { - throw new Error('Parser was already resumed'); - } - this.paused = false; - // Necessary for synchronous resume. - if (this.inLoop) - return; - this._runParsingLoop(); - if (!this.paused) { - writeCallback === null || writeCallback === void 0 ? void 0 : writeCallback(); - } - } - write(chunk, isLastChunk, writeCallback) { - this.active = true; - this.preprocessor.write(chunk, isLastChunk); - this._runParsingLoop(); - if (!this.paused) { - writeCallback === null || writeCallback === void 0 ? void 0 : writeCallback(); - } - } - insertHtmlAtCurrentPos(chunk) { - this.active = true; - this.preprocessor.insertHtmlAtCurrentPos(chunk); - this._runParsingLoop(); - } - //Hibernation - _ensureHibernation() { - if (this.preprocessor.endOfChunkHit) { - this.preprocessor.retreat(this.consumedAfterSnapshot); - this.consumedAfterSnapshot = 0; - this.active = false; - return true; - } - return false; - } - //Consumption - _consume() { - this.consumedAfterSnapshot++; - return this.preprocessor.advance(); - } - _advanceBy(count) { - this.consumedAfterSnapshot += count; - for (let i = 0; i < count; i++) { - this.preprocessor.advance(); - } - } - _consumeSequenceIfMatch(pattern, caseSensitive) { - if (this.preprocessor.startsWith(pattern, caseSensitive)) { - // We will already have consumed one character before calling this method. - this._advanceBy(pattern.length - 1); - return true; - } - return false; - } - //Token creation - _createStartTagToken() { - this.currentToken = { - type: token_js_1.TokenType.START_TAG, - tagName: '', - tagID: html_js_1.TAG_ID.UNKNOWN, - selfClosing: false, - ackSelfClosing: false, - attrs: [], - location: this.getCurrentLocation(1), - }; - } - _createEndTagToken() { - this.currentToken = { - type: token_js_1.TokenType.END_TAG, - tagName: '', - tagID: html_js_1.TAG_ID.UNKNOWN, - selfClosing: false, - ackSelfClosing: false, - attrs: [], - location: this.getCurrentLocation(2), - }; - } - _createCommentToken(offset) { - this.currentToken = { - type: token_js_1.TokenType.COMMENT, - data: '', - location: this.getCurrentLocation(offset), - }; - } - _createDoctypeToken(initialName) { - this.currentToken = { - type: token_js_1.TokenType.DOCTYPE, - name: initialName, - forceQuirks: false, - publicId: null, - systemId: null, - location: this.currentLocation, - }; - } - _createCharacterToken(type, chars) { - this.currentCharacterToken = { - type, - chars, - location: this.currentLocation, - }; - } - //Tag attributes - _createAttr(attrNameFirstCh) { - this.currentAttr = { - name: attrNameFirstCh, - value: '', - }; - this.currentLocation = this.getCurrentLocation(0); - } - _leaveAttrName() { - var _a; - var _b; - const token = this.currentToken; - if ((0, token_js_1.getTokenAttr)(token, this.currentAttr.name) === null) { - token.attrs.push(this.currentAttr); - if (token.location && this.currentLocation) { - const attrLocations = ((_a = (_b = token.location).attrs) !== null && _a !== void 0 ? _a : (_b.attrs = Object.create(null))); - attrLocations[this.currentAttr.name] = this.currentLocation; - // Set end location - this._leaveAttrValue(); - } - } - else { - this._err(error_codes_js_1.ERR.duplicateAttribute); - } - } - _leaveAttrValue() { - if (this.currentLocation) { - this.currentLocation.endLine = this.preprocessor.line; - this.currentLocation.endCol = this.preprocessor.col; - this.currentLocation.endOffset = this.preprocessor.offset; - } - } - //Token emission - prepareToken(ct) { - this._emitCurrentCharacterToken(ct.location); - this.currentToken = null; - if (ct.location) { - ct.location.endLine = this.preprocessor.line; - ct.location.endCol = this.preprocessor.col + 1; - ct.location.endOffset = this.preprocessor.offset + 1; - } - this.currentLocation = this.getCurrentLocation(-1); - } - emitCurrentTagToken() { - const ct = this.currentToken; - this.prepareToken(ct); - ct.tagID = (0, html_js_1.getTagID)(ct.tagName); - if (ct.type === token_js_1.TokenType.START_TAG) { - this.lastStartTagName = ct.tagName; - this.handler.onStartTag(ct); - } - else { - if (ct.attrs.length > 0) { - this._err(error_codes_js_1.ERR.endTagWithAttributes); - } - if (ct.selfClosing) { - this._err(error_codes_js_1.ERR.endTagWithTrailingSolidus); - } - this.handler.onEndTag(ct); - } - this.preprocessor.dropParsedChunk(); - } - emitCurrentComment(ct) { - this.prepareToken(ct); - this.handler.onComment(ct); - this.preprocessor.dropParsedChunk(); - } - emitCurrentDoctype(ct) { - this.prepareToken(ct); - this.handler.onDoctype(ct); - this.preprocessor.dropParsedChunk(); - } - _emitCurrentCharacterToken(nextLocation) { - if (this.currentCharacterToken) { - //NOTE: if we have a pending character token, make it's end location equal to the - //current token's start location. - if (nextLocation && this.currentCharacterToken.location) { - this.currentCharacterToken.location.endLine = nextLocation.startLine; - this.currentCharacterToken.location.endCol = nextLocation.startCol; - this.currentCharacterToken.location.endOffset = nextLocation.startOffset; - } - switch (this.currentCharacterToken.type) { - case token_js_1.TokenType.CHARACTER: { - this.handler.onCharacter(this.currentCharacterToken); - break; - } - case token_js_1.TokenType.NULL_CHARACTER: { - this.handler.onNullCharacter(this.currentCharacterToken); - break; - } - case token_js_1.TokenType.WHITESPACE_CHARACTER: { - this.handler.onWhitespaceCharacter(this.currentCharacterToken); - break; - } - } - this.currentCharacterToken = null; - } - } - _emitEOFToken() { - const location = this.getCurrentLocation(0); - if (location) { - location.endLine = location.startLine; - location.endCol = location.startCol; - location.endOffset = location.startOffset; - } - this._emitCurrentCharacterToken(location); - this.handler.onEof({ type: token_js_1.TokenType.EOF, location }); - this.active = false; - } - //Characters emission - //OPTIMIZATION: The specification uses only one type of character token (one token per character). - //This causes a huge memory overhead and a lot of unnecessary parser loops. parse5 uses 3 groups of characters. - //If we have a sequence of characters that belong to the same group, the parser can process it - //as a single solid character token. - //So, there are 3 types of character tokens in parse5: - //1)TokenType.NULL_CHARACTER - \u0000-character sequences (e.g. '\u0000\u0000\u0000') - //2)TokenType.WHITESPACE_CHARACTER - any whitespace/new-line character sequences (e.g. '\n \r\t \f') - //3)TokenType.CHARACTER - any character sequence which don't belong to groups 1 and 2 (e.g. 'abcdef1234@@#$%^') - _appendCharToCurrentCharacterToken(type, ch) { - if (this.currentCharacterToken) { - if (this.currentCharacterToken.type === type) { - this.currentCharacterToken.chars += ch; - return; - } - else { - this.currentLocation = this.getCurrentLocation(0); - this._emitCurrentCharacterToken(this.currentLocation); - this.preprocessor.dropParsedChunk(); - } - } - this._createCharacterToken(type, ch); - } - _emitCodePoint(cp) { - const type = isWhitespace(cp) - ? token_js_1.TokenType.WHITESPACE_CHARACTER - : cp === unicode_js_1.CODE_POINTS.NULL - ? token_js_1.TokenType.NULL_CHARACTER - : token_js_1.TokenType.CHARACTER; - this._appendCharToCurrentCharacterToken(type, String.fromCodePoint(cp)); - } - //NOTE: used when we emit characters explicitly. - //This is always for non-whitespace and non-null characters, which allows us to avoid additional checks. - _emitChars(ch) { - this._appendCharToCurrentCharacterToken(token_js_1.TokenType.CHARACTER, ch); - } - // Character reference helpers - _startCharacterReference() { - this.returnState = this.state; - this.state = State.CHARACTER_REFERENCE; - this.entityStartPos = this.preprocessor.pos; - this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute() ? decode_js_1.DecodingMode.Attribute : decode_js_1.DecodingMode.Legacy); - } - _isCharacterReferenceInAttribute() { - return (this.returnState === State.ATTRIBUTE_VALUE_DOUBLE_QUOTED || - this.returnState === State.ATTRIBUTE_VALUE_SINGLE_QUOTED || - this.returnState === State.ATTRIBUTE_VALUE_UNQUOTED); - } - _flushCodePointConsumedAsCharacterReference(cp) { - if (this._isCharacterReferenceInAttribute()) { - this.currentAttr.value += String.fromCodePoint(cp); - } - else { - this._emitCodePoint(cp); - } - } - // Calling states this way turns out to be much faster than any other approach. - _callState(cp) { - switch (this.state) { - case State.DATA: { - this._stateData(cp); - break; - } - case State.RCDATA: { - this._stateRcdata(cp); - break; - } - case State.RAWTEXT: { - this._stateRawtext(cp); - break; - } - case State.SCRIPT_DATA: { - this._stateScriptData(cp); - break; - } - case State.PLAINTEXT: { - this._statePlaintext(cp); - break; - } - case State.TAG_OPEN: { - this._stateTagOpen(cp); - break; - } - case State.END_TAG_OPEN: { - this._stateEndTagOpen(cp); - break; - } - case State.TAG_NAME: { - this._stateTagName(cp); - break; - } - case State.RCDATA_LESS_THAN_SIGN: { - this._stateRcdataLessThanSign(cp); - break; - } - case State.RCDATA_END_TAG_OPEN: { - this._stateRcdataEndTagOpen(cp); - break; - } - case State.RCDATA_END_TAG_NAME: { - this._stateRcdataEndTagName(cp); - break; - } - case State.RAWTEXT_LESS_THAN_SIGN: { - this._stateRawtextLessThanSign(cp); - break; - } - case State.RAWTEXT_END_TAG_OPEN: { - this._stateRawtextEndTagOpen(cp); - break; - } - case State.RAWTEXT_END_TAG_NAME: { - this._stateRawtextEndTagName(cp); - break; - } - case State.SCRIPT_DATA_LESS_THAN_SIGN: { - this._stateScriptDataLessThanSign(cp); - break; - } - case State.SCRIPT_DATA_END_TAG_OPEN: { - this._stateScriptDataEndTagOpen(cp); - break; - } - case State.SCRIPT_DATA_END_TAG_NAME: { - this._stateScriptDataEndTagName(cp); - break; - } - case State.SCRIPT_DATA_ESCAPE_START: { - this._stateScriptDataEscapeStart(cp); - break; - } - case State.SCRIPT_DATA_ESCAPE_START_DASH: { - this._stateScriptDataEscapeStartDash(cp); - break; - } - case State.SCRIPT_DATA_ESCAPED: { - this._stateScriptDataEscaped(cp); - break; - } - case State.SCRIPT_DATA_ESCAPED_DASH: { - this._stateScriptDataEscapedDash(cp); - break; - } - case State.SCRIPT_DATA_ESCAPED_DASH_DASH: { - this._stateScriptDataEscapedDashDash(cp); - break; - } - case State.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN: { - this._stateScriptDataEscapedLessThanSign(cp); - break; - } - case State.SCRIPT_DATA_ESCAPED_END_TAG_OPEN: { - this._stateScriptDataEscapedEndTagOpen(cp); - break; - } - case State.SCRIPT_DATA_ESCAPED_END_TAG_NAME: { - this._stateScriptDataEscapedEndTagName(cp); - break; - } - case State.SCRIPT_DATA_DOUBLE_ESCAPE_START: { - this._stateScriptDataDoubleEscapeStart(cp); - break; - } - case State.SCRIPT_DATA_DOUBLE_ESCAPED: { - this._stateScriptDataDoubleEscaped(cp); - break; - } - case State.SCRIPT_DATA_DOUBLE_ESCAPED_DASH: { - this._stateScriptDataDoubleEscapedDash(cp); - break; - } - case State.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH: { - this._stateScriptDataDoubleEscapedDashDash(cp); - break; - } - case State.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN: { - this._stateScriptDataDoubleEscapedLessThanSign(cp); - break; - } - case State.SCRIPT_DATA_DOUBLE_ESCAPE_END: { - this._stateScriptDataDoubleEscapeEnd(cp); - break; - } - case State.BEFORE_ATTRIBUTE_NAME: { - this._stateBeforeAttributeName(cp); - break; - } - case State.ATTRIBUTE_NAME: { - this._stateAttributeName(cp); - break; - } - case State.AFTER_ATTRIBUTE_NAME: { - this._stateAfterAttributeName(cp); - break; - } - case State.BEFORE_ATTRIBUTE_VALUE: { - this._stateBeforeAttributeValue(cp); - break; - } - case State.ATTRIBUTE_VALUE_DOUBLE_QUOTED: { - this._stateAttributeValueDoubleQuoted(cp); - break; - } - case State.ATTRIBUTE_VALUE_SINGLE_QUOTED: { - this._stateAttributeValueSingleQuoted(cp); - break; - } - case State.ATTRIBUTE_VALUE_UNQUOTED: { - this._stateAttributeValueUnquoted(cp); - break; - } - case State.AFTER_ATTRIBUTE_VALUE_QUOTED: { - this._stateAfterAttributeValueQuoted(cp); - break; - } - case State.SELF_CLOSING_START_TAG: { - this._stateSelfClosingStartTag(cp); - break; - } - case State.BOGUS_COMMENT: { - this._stateBogusComment(cp); - break; - } - case State.MARKUP_DECLARATION_OPEN: { - this._stateMarkupDeclarationOpen(cp); - break; - } - case State.COMMENT_START: { - this._stateCommentStart(cp); - break; - } - case State.COMMENT_START_DASH: { - this._stateCommentStartDash(cp); - break; - } - case State.COMMENT: { - this._stateComment(cp); - break; - } - case State.COMMENT_LESS_THAN_SIGN: { - this._stateCommentLessThanSign(cp); - break; - } - case State.COMMENT_LESS_THAN_SIGN_BANG: { - this._stateCommentLessThanSignBang(cp); - break; - } - case State.COMMENT_LESS_THAN_SIGN_BANG_DASH: { - this._stateCommentLessThanSignBangDash(cp); - break; - } - case State.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH: { - this._stateCommentLessThanSignBangDashDash(cp); - break; - } - case State.COMMENT_END_DASH: { - this._stateCommentEndDash(cp); - break; - } - case State.COMMENT_END: { - this._stateCommentEnd(cp); - break; - } - case State.COMMENT_END_BANG: { - this._stateCommentEndBang(cp); - break; - } - case State.DOCTYPE: { - this._stateDoctype(cp); - break; - } - case State.BEFORE_DOCTYPE_NAME: { - this._stateBeforeDoctypeName(cp); - break; - } - case State.DOCTYPE_NAME: { - this._stateDoctypeName(cp); - break; - } - case State.AFTER_DOCTYPE_NAME: { - this._stateAfterDoctypeName(cp); - break; - } - case State.AFTER_DOCTYPE_PUBLIC_KEYWORD: { - this._stateAfterDoctypePublicKeyword(cp); - break; - } - case State.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER: { - this._stateBeforeDoctypePublicIdentifier(cp); - break; - } - case State.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED: { - this._stateDoctypePublicIdentifierDoubleQuoted(cp); - break; - } - case State.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED: { - this._stateDoctypePublicIdentifierSingleQuoted(cp); - break; - } - case State.AFTER_DOCTYPE_PUBLIC_IDENTIFIER: { - this._stateAfterDoctypePublicIdentifier(cp); - break; - } - case State.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS: { - this._stateBetweenDoctypePublicAndSystemIdentifiers(cp); - break; - } - case State.AFTER_DOCTYPE_SYSTEM_KEYWORD: { - this._stateAfterDoctypeSystemKeyword(cp); - break; - } - case State.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER: { - this._stateBeforeDoctypeSystemIdentifier(cp); - break; - } - case State.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED: { - this._stateDoctypeSystemIdentifierDoubleQuoted(cp); - break; - } - case State.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED: { - this._stateDoctypeSystemIdentifierSingleQuoted(cp); - break; - } - case State.AFTER_DOCTYPE_SYSTEM_IDENTIFIER: { - this._stateAfterDoctypeSystemIdentifier(cp); - break; - } - case State.BOGUS_DOCTYPE: { - this._stateBogusDoctype(cp); - break; - } - case State.CDATA_SECTION: { - this._stateCdataSection(cp); - break; - } - case State.CDATA_SECTION_BRACKET: { - this._stateCdataSectionBracket(cp); - break; - } - case State.CDATA_SECTION_END: { - this._stateCdataSectionEnd(cp); - break; - } - case State.CHARACTER_REFERENCE: { - this._stateCharacterReference(); - break; - } - case State.AMBIGUOUS_AMPERSAND: { - this._stateAmbiguousAmpersand(cp); - break; - } - default: { - throw new Error('Unknown state'); - } - } - } - // State machine - // Data state - //------------------------------------------------------------------ - _stateData(cp) { - switch (cp) { - case unicode_js_1.CODE_POINTS.LESS_THAN_SIGN: { - this.state = State.TAG_OPEN; - break; - } - case unicode_js_1.CODE_POINTS.AMPERSAND: { - this._startCharacterReference(); - break; - } - case unicode_js_1.CODE_POINTS.NULL: { - this._err(error_codes_js_1.ERR.unexpectedNullCharacter); - this._emitCodePoint(cp); - break; - } - case unicode_js_1.CODE_POINTS.EOF: { - this._emitEOFToken(); - break; - } - default: { - this._emitCodePoint(cp); - } - } - } - // RCDATA state - //------------------------------------------------------------------ - _stateRcdata(cp) { - switch (cp) { - case unicode_js_1.CODE_POINTS.AMPERSAND: { - this._startCharacterReference(); - break; - } - case unicode_js_1.CODE_POINTS.LESS_THAN_SIGN: { - this.state = State.RCDATA_LESS_THAN_SIGN; - break; - } - case unicode_js_1.CODE_POINTS.NULL: { - this._err(error_codes_js_1.ERR.unexpectedNullCharacter); - this._emitChars(unicode_js_1.REPLACEMENT_CHARACTER); - break; - } - case unicode_js_1.CODE_POINTS.EOF: { - this._emitEOFToken(); - break; - } - default: { - this._emitCodePoint(cp); - } - } - } - // RAWTEXT state - //------------------------------------------------------------------ - _stateRawtext(cp) { - switch (cp) { - case unicode_js_1.CODE_POINTS.LESS_THAN_SIGN: { - this.state = State.RAWTEXT_LESS_THAN_SIGN; - break; - } - case unicode_js_1.CODE_POINTS.NULL: { - this._err(error_codes_js_1.ERR.unexpectedNullCharacter); - this._emitChars(unicode_js_1.REPLACEMENT_CHARACTER); - break; - } - case unicode_js_1.CODE_POINTS.EOF: { - this._emitEOFToken(); - break; - } - default: { - this._emitCodePoint(cp); - } - } - } - // Script data state - //------------------------------------------------------------------ - _stateScriptData(cp) { - switch (cp) { - case unicode_js_1.CODE_POINTS.LESS_THAN_SIGN: { - this.state = State.SCRIPT_DATA_LESS_THAN_SIGN; - break; - } - case unicode_js_1.CODE_POINTS.NULL: { - this._err(error_codes_js_1.ERR.unexpectedNullCharacter); - this._emitChars(unicode_js_1.REPLACEMENT_CHARACTER); - break; - } - case unicode_js_1.CODE_POINTS.EOF: { - this._emitEOFToken(); - break; - } - default: { - this._emitCodePoint(cp); - } - } - } - // PLAINTEXT state - //------------------------------------------------------------------ - _statePlaintext(cp) { - switch (cp) { - case unicode_js_1.CODE_POINTS.NULL: { - this._err(error_codes_js_1.ERR.unexpectedNullCharacter); - this._emitChars(unicode_js_1.REPLACEMENT_CHARACTER); - break; - } - case unicode_js_1.CODE_POINTS.EOF: { - this._emitEOFToken(); - break; - } - default: { - this._emitCodePoint(cp); - } - } - } - // Tag open state - //------------------------------------------------------------------ - _stateTagOpen(cp) { - if (isAsciiLetter(cp)) { - this._createStartTagToken(); - this.state = State.TAG_NAME; - this._stateTagName(cp); - } - else - switch (cp) { - case unicode_js_1.CODE_POINTS.EXCLAMATION_MARK: { - this.state = State.MARKUP_DECLARATION_OPEN; - break; - } - case unicode_js_1.CODE_POINTS.SOLIDUS: { - this.state = State.END_TAG_OPEN; - break; - } - case unicode_js_1.CODE_POINTS.QUESTION_MARK: { - this._err(error_codes_js_1.ERR.unexpectedQuestionMarkInsteadOfTagName); - this._createCommentToken(1); - this.state = State.BOGUS_COMMENT; - this._stateBogusComment(cp); - break; - } - case unicode_js_1.CODE_POINTS.EOF: { - this._err(error_codes_js_1.ERR.eofBeforeTagName); - this._emitChars('<'); - this._emitEOFToken(); - break; - } - default: { - this._err(error_codes_js_1.ERR.invalidFirstCharacterOfTagName); - this._emitChars('<'); - this.state = State.DATA; - this._stateData(cp); - } - } - } - // End tag open state - //------------------------------------------------------------------ - _stateEndTagOpen(cp) { - if (isAsciiLetter(cp)) { - this._createEndTagToken(); - this.state = State.TAG_NAME; - this._stateTagName(cp); - } - else - switch (cp) { - case unicode_js_1.CODE_POINTS.GREATER_THAN_SIGN: { - this._err(error_codes_js_1.ERR.missingEndTagName); - this.state = State.DATA; - break; - } - case unicode_js_1.CODE_POINTS.EOF: { - this._err(error_codes_js_1.ERR.eofBeforeTagName); - this._emitChars('</'); - this._emitEOFToken(); - break; - } - default: { - this._err(error_codes_js_1.ERR.invalidFirstCharacterOfTagName); - this._createCommentToken(2); - this.state = State.BOGUS_COMMENT; - this._stateBogusComment(cp); - } - } - } - // Tag name state - //------------------------------------------------------------------ - _stateTagName(cp) { - const token = this.currentToken; - switch (cp) { - case unicode_js_1.CODE_POINTS.SPACE: - case unicode_js_1.CODE_POINTS.LINE_FEED: - case unicode_js_1.CODE_POINTS.TABULATION: - case unicode_js_1.CODE_POINTS.FORM_FEED: { - this.state = State.BEFORE_ATTRIBUTE_NAME; - break; - } - case unicode_js_1.CODE_POINTS.SOLIDUS: { - this.state = State.SELF_CLOSING_START_TAG; - break; - } - case unicode_js_1.CODE_POINTS.GREATER_THAN_SIGN: { - this.state = State.DATA; - this.emitCurrentTagToken(); - break; - } - case unicode_js_1.CODE_POINTS.NULL: { - this._err(error_codes_js_1.ERR.unexpectedNullCharacter); - token.tagName += unicode_js_1.REPLACEMENT_CHARACTER; - break; - } - case unicode_js_1.CODE_POINTS.EOF: { - this._err(error_codes_js_1.ERR.eofInTag); - this._emitEOFToken(); - break; - } - default: { - token.tagName += String.fromCodePoint(isAsciiUpper(cp) ? toAsciiLower(cp) : cp); - } - } - } - // RCDATA less-than sign state - //------------------------------------------------------------------ - _stateRcdataLessThanSign(cp) { - if (cp === unicode_js_1.CODE_POINTS.SOLIDUS) { - this.state = State.RCDATA_END_TAG_OPEN; - } - else { - this._emitChars('<'); - this.state = State.RCDATA; - this._stateRcdata(cp); - } - } - // RCDATA end tag open state - //------------------------------------------------------------------ - _stateRcdataEndTagOpen(cp) { - if (isAsciiLetter(cp)) { - this.state = State.RCDATA_END_TAG_NAME; - this._stateRcdataEndTagName(cp); - } - else { - this._emitChars('</'); - this.state = State.RCDATA; - this._stateRcdata(cp); - } - } - handleSpecialEndTag(_cp) { - if (!this.preprocessor.startsWith(this.lastStartTagName, false)) { - return !this._ensureHibernation(); - } - this._createEndTagToken(); - const token = this.currentToken; - token.tagName = this.lastStartTagName; - const cp = this.preprocessor.peek(this.lastStartTagName.length); - switch (cp) { - case unicode_js_1.CODE_POINTS.SPACE: - case unicode_js_1.CODE_POINTS.LINE_FEED: - case unicode_js_1.CODE_POINTS.TABULATION: - case unicode_js_1.CODE_POINTS.FORM_FEED: { - this._advanceBy(this.lastStartTagName.length); - this.state = State.BEFORE_ATTRIBUTE_NAME; - return false; - } - case unicode_js_1.CODE_POINTS.SOLIDUS: { - this._advanceBy(this.lastStartTagName.length); - this.state = State.SELF_CLOSING_START_TAG; - return false; - } - case unicode_js_1.CODE_POINTS.GREATER_THAN_SIGN: { - this._advanceBy(this.lastStartTagName.length); - this.emitCurrentTagToken(); - this.state = State.DATA; - return false; - } - default: { - return !this._ensureHibernation(); - } - } - } - // RCDATA end tag name state - //------------------------------------------------------------------ - _stateRcdataEndTagName(cp) { - if (this.handleSpecialEndTag(cp)) { - this._emitChars('</'); - this.state = State.RCDATA; - this._stateRcdata(cp); - } - } - // RAWTEXT less-than sign state - //------------------------------------------------------------------ - _stateRawtextLessThanSign(cp) { - if (cp === unicode_js_1.CODE_POINTS.SOLIDUS) { - this.state = State.RAWTEXT_END_TAG_OPEN; - } - else { - this._emitChars('<'); - this.state = State.RAWTEXT; - this._stateRawtext(cp); - } - } - // RAWTEXT end tag open state - //------------------------------------------------------------------ - _stateRawtextEndTagOpen(cp) { - if (isAsciiLetter(cp)) { - this.state = State.RAWTEXT_END_TAG_NAME; - this._stateRawtextEndTagName(cp); - } - else { - this._emitChars('</'); - this.state = State.RAWTEXT; - this._stateRawtext(cp); - } - } - // RAWTEXT end tag name state - //------------------------------------------------------------------ - _stateRawtextEndTagName(cp) { - if (this.handleSpecialEndTag(cp)) { - this._emitChars('</'); - this.state = State.RAWTEXT; - this._stateRawtext(cp); - } - } - // Script data less-than sign state - //------------------------------------------------------------------ - _stateScriptDataLessThanSign(cp) { - switch (cp) { - case unicode_js_1.CODE_POINTS.SOLIDUS: { - this.state = State.SCRIPT_DATA_END_TAG_OPEN; - break; - } - case unicode_js_1.CODE_POINTS.EXCLAMATION_MARK: { - this.state = State.SCRIPT_DATA_ESCAPE_START; - this._emitChars('<!'); - break; - } - default: { - this._emitChars('<'); - this.state = State.SCRIPT_DATA; - this._stateScriptData(cp); - } - } - } - // Script data end tag open state - //------------------------------------------------------------------ - _stateScriptDataEndTagOpen(cp) { - if (isAsciiLetter(cp)) { - this.state = State.SCRIPT_DATA_END_TAG_NAME; - this._stateScriptDataEndTagName(cp); - } - else { - this._emitChars('</'); - this.state = State.SCRIPT_DATA; - this._stateScriptData(cp); - } - } - // Script data end tag name state - //------------------------------------------------------------------ - _stateScriptDataEndTagName(cp) { - if (this.handleSpecialEndTag(cp)) { - this._emitChars('</'); - this.state = State.SCRIPT_DATA; - this._stateScriptData(cp); - } - } - // Script data escape start state - //------------------------------------------------------------------ - _stateScriptDataEscapeStart(cp) { - if (cp === unicode_js_1.CODE_POINTS.HYPHEN_MINUS) { - this.state = State.SCRIPT_DATA_ESCAPE_START_DASH; - this._emitChars('-'); - } - else { - this.state = State.SCRIPT_DATA; - this._stateScriptData(cp); - } - } - // Script data escape start dash state - //------------------------------------------------------------------ - _stateScriptDataEscapeStartDash(cp) { - if (cp === unicode_js_1.CODE_POINTS.HYPHEN_MINUS) { - this.state = State.SCRIPT_DATA_ESCAPED_DASH_DASH; - this._emitChars('-'); - } - else { - this.state = State.SCRIPT_DATA; - this._stateScriptData(cp); - } - } - // Script data escaped state - //------------------------------------------------------------------ - _stateScriptDataEscaped(cp) { - switch (cp) { - case unicode_js_1.CODE_POINTS.HYPHEN_MINUS: { - this.state = State.SCRIPT_DATA_ESCAPED_DASH; - this._emitChars('-'); - break; - } - case unicode_js_1.CODE_POINTS.LESS_THAN_SIGN: { - this.state = State.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN; - break; - } - case unicode_js_1.CODE_POINTS.NULL: { - this._err(error_codes_js_1.ERR.unexpectedNullCharacter); - this._emitChars(unicode_js_1.REPLACEMENT_CHARACTER); - break; - } - case unicode_js_1.CODE_POINTS.EOF: { - this._err(error_codes_js_1.ERR.eofInScriptHtmlCommentLikeText); - this._emitEOFToken(); - break; - } - default: { - this._emitCodePoint(cp); - } - } - } - // Script data escaped dash state - //------------------------------------------------------------------ - _stateScriptDataEscapedDash(cp) { - switch (cp) { - case unicode_js_1.CODE_POINTS.HYPHEN_MINUS: { - this.state = State.SCRIPT_DATA_ESCAPED_DASH_DASH; - this._emitChars('-'); - break; - } - case unicode_js_1.CODE_POINTS.LESS_THAN_SIGN: { - this.state = State.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN; - break; - } - case unicode_js_1.CODE_POINTS.NULL: { - this._err(error_codes_js_1.ERR.unexpectedNullCharacter); - this.state = State.SCRIPT_DATA_ESCAPED; - this._emitChars(unicode_js_1.REPLACEMENT_CHARACTER); - break; - } - case unicode_js_1.CODE_POINTS.EOF: { - this._err(error_codes_js_1.ERR.eofInScriptHtmlCommentLikeText); - this._emitEOFToken(); - break; - } - default: { - this.state = State.SCRIPT_DATA_ESCAPED; - this._emitCodePoint(cp); - } - } - } - // Script data escaped dash dash state - //------------------------------------------------------------------ - _stateScriptDataEscapedDashDash(cp) { - switch (cp) { - case unicode_js_1.CODE_POINTS.HYPHEN_MINUS: { - this._emitChars('-'); - break; - } - case unicode_js_1.CODE_POINTS.LESS_THAN_SIGN: { - this.state = State.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN; - break; - } - case unicode_js_1.CODE_POINTS.GREATER_THAN_SIGN: { - this.state = State.SCRIPT_DATA; - this._emitChars('>'); - break; - } - case unicode_js_1.CODE_POINTS.NULL: { - this._err(error_codes_js_1.ERR.unexpectedNullCharacter); - this.state = State.SCRIPT_DATA_ESCAPED; - this._emitChars(unicode_js_1.REPLACEMENT_CHARACTER); - break; - } - case unicode_js_1.CODE_POINTS.EOF: { - this._err(error_codes_js_1.ERR.eofInScriptHtmlCommentLikeText); - this._emitEOFToken(); - break; - } - default: { - this.state = State.SCRIPT_DATA_ESCAPED; - this._emitCodePoint(cp); - } - } - } - // Script data escaped less-than sign state - //------------------------------------------------------------------ - _stateScriptDataEscapedLessThanSign(cp) { - if (cp === unicode_js_1.CODE_POINTS.SOLIDUS) { - this.state = State.SCRIPT_DATA_ESCAPED_END_TAG_OPEN; - } - else if (isAsciiLetter(cp)) { - this._emitChars('<'); - this.state = State.SCRIPT_DATA_DOUBLE_ESCAPE_START; - this._stateScriptDataDoubleEscapeStart(cp); - } - else { - this._emitChars('<'); - this.state = State.SCRIPT_DATA_ESCAPED; - this._stateScriptDataEscaped(cp); - } - } - // Script data escaped end tag open state - //------------------------------------------------------------------ - _stateScriptDataEscapedEndTagOpen(cp) { - if (isAsciiLetter(cp)) { - this.state = State.SCRIPT_DATA_ESCAPED_END_TAG_NAME; - this._stateScriptDataEscapedEndTagName(cp); - } - else { - this._emitChars('</'); - this.state = State.SCRIPT_DATA_ESCAPED; - this._stateScriptDataEscaped(cp); - } - } - // Script data escaped end tag name state - //------------------------------------------------------------------ - _stateScriptDataEscapedEndTagName(cp) { - if (this.handleSpecialEndTag(cp)) { - this._emitChars('</'); - this.state = State.SCRIPT_DATA_ESCAPED; - this._stateScriptDataEscaped(cp); - } - } - // Script data double escape start state - //------------------------------------------------------------------ - _stateScriptDataDoubleEscapeStart(cp) { - if (this.preprocessor.startsWith(unicode_js_1.SEQUENCES.SCRIPT, false) && - isScriptDataDoubleEscapeSequenceEnd(this.preprocessor.peek(unicode_js_1.SEQUENCES.SCRIPT.length))) { - this._emitCodePoint(cp); - for (let i = 0; i < unicode_js_1.SEQUENCES.SCRIPT.length; i++) { - this._emitCodePoint(this._consume()); - } - this.state = State.SCRIPT_DATA_DOUBLE_ESCAPED; - } - else if (!this._ensureHibernation()) { - this.state = State.SCRIPT_DATA_ESCAPED; - this._stateScriptDataEscaped(cp); - } - } - // Script data double escaped state - //------------------------------------------------------------------ - _stateScriptDataDoubleEscaped(cp) { - switch (cp) { - case unicode_js_1.CODE_POINTS.HYPHEN_MINUS: { - this.state = State.SCRIPT_DATA_DOUBLE_ESCAPED_DASH; - this._emitChars('-'); - break; - } - case unicode_js_1.CODE_POINTS.LESS_THAN_SIGN: { - this.state = State.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN; - this._emitChars('<'); - break; - } - case unicode_js_1.CODE_POINTS.NULL: { - this._err(error_codes_js_1.ERR.unexpectedNullCharacter); - this._emitChars(unicode_js_1.REPLACEMENT_CHARACTER); - break; - } - case unicode_js_1.CODE_POINTS.EOF: { - this._err(error_codes_js_1.ERR.eofInScriptHtmlCommentLikeText); - this._emitEOFToken(); - break; - } - default: { - this._emitCodePoint(cp); - } - } - } - // Script data double escaped dash state - //------------------------------------------------------------------ - _stateScriptDataDoubleEscapedDash(cp) { - switch (cp) { - case unicode_js_1.CODE_POINTS.HYPHEN_MINUS: { - this.state = State.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH; - this._emitChars('-'); - break; - } - case unicode_js_1.CODE_POINTS.LESS_THAN_SIGN: { - this.state = State.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN; - this._emitChars('<'); - break; - } - case unicode_js_1.CODE_POINTS.NULL: { - this._err(error_codes_js_1.ERR.unexpectedNullCharacter); - this.state = State.SCRIPT_DATA_DOUBLE_ESCAPED; - this._emitChars(unicode_js_1.REPLACEMENT_CHARACTER); - break; - } - case unicode_js_1.CODE_POINTS.EOF: { - this._err(error_codes_js_1.ERR.eofInScriptHtmlCommentLikeText); - this._emitEOFToken(); - break; - } - default: { - this.state = State.SCRIPT_DATA_DOUBLE_ESCAPED; - this._emitCodePoint(cp); - } - } - } - // Script data double escaped dash dash state - //------------------------------------------------------------------ - _stateScriptDataDoubleEscapedDashDash(cp) { - switch (cp) { - case unicode_js_1.CODE_POINTS.HYPHEN_MINUS: { - this._emitChars('-'); - break; - } - case unicode_js_1.CODE_POINTS.LESS_THAN_SIGN: { - this.state = State.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN; - this._emitChars('<'); - break; - } - case unicode_js_1.CODE_POINTS.GREATER_THAN_SIGN: { - this.state = State.SCRIPT_DATA; - this._emitChars('>'); - break; - } - case unicode_js_1.CODE_POINTS.NULL: { - this._err(error_codes_js_1.ERR.unexpectedNullCharacter); - this.state = State.SCRIPT_DATA_DOUBLE_ESCAPED; - this._emitChars(unicode_js_1.REPLACEMENT_CHARACTER); - break; - } - case unicode_js_1.CODE_POINTS.EOF: { - this._err(error_codes_js_1.ERR.eofInScriptHtmlCommentLikeText); - this._emitEOFToken(); - break; - } - default: { - this.state = State.SCRIPT_DATA_DOUBLE_ESCAPED; - this._emitCodePoint(cp); - } - } - } - // Script data double escaped less-than sign state - //------------------------------------------------------------------ - _stateScriptDataDoubleEscapedLessThanSign(cp) { - if (cp === unicode_js_1.CODE_POINTS.SOLIDUS) { - this.state = State.SCRIPT_DATA_DOUBLE_ESCAPE_END; - this._emitChars('/'); - } - else { - this.state = State.SCRIPT_DATA_DOUBLE_ESCAPED; - this._stateScriptDataDoubleEscaped(cp); - } - } - // Script data double escape end state - //------------------------------------------------------------------ - _stateScriptDataDoubleEscapeEnd(cp) { - if (this.preprocessor.startsWith(unicode_js_1.SEQUENCES.SCRIPT, false) && - isScriptDataDoubleEscapeSequenceEnd(this.preprocessor.peek(unicode_js_1.SEQUENCES.SCRIPT.length))) { - this._emitCodePoint(cp); - for (let i = 0; i < unicode_js_1.SEQUENCES.SCRIPT.length; i++) { - this._emitCodePoint(this._consume()); - } - this.state = State.SCRIPT_DATA_ESCAPED; - } - else if (!this._ensureHibernation()) { - this.state = State.SCRIPT_DATA_DOUBLE_ESCAPED; - this._stateScriptDataDoubleEscaped(cp); - } - } - // Before attribute name state - //------------------------------------------------------------------ - _stateBeforeAttributeName(cp) { - switch (cp) { - case unicode_js_1.CODE_POINTS.SPACE: - case unicode_js_1.CODE_POINTS.LINE_FEED: - case unicode_js_1.CODE_POINTS.TABULATION: - case unicode_js_1.CODE_POINTS.FORM_FEED: { - // Ignore whitespace - break; - } - case unicode_js_1.CODE_POINTS.SOLIDUS: - case unicode_js_1.CODE_POINTS.GREATER_THAN_SIGN: - case unicode_js_1.CODE_POINTS.EOF: { - this.state = State.AFTER_ATTRIBUTE_NAME; - this._stateAfterAttributeName(cp); - break; - } - case unicode_js_1.CODE_POINTS.EQUALS_SIGN: { - this._err(error_codes_js_1.ERR.unexpectedEqualsSignBeforeAttributeName); - this._createAttr('='); - this.state = State.ATTRIBUTE_NAME; - break; - } - default: { - this._createAttr(''); - this.state = State.ATTRIBUTE_NAME; - this._stateAttributeName(cp); - } - } - } - // Attribute name state - //------------------------------------------------------------------ - _stateAttributeName(cp) { - switch (cp) { - case unicode_js_1.CODE_POINTS.SPACE: - case unicode_js_1.CODE_POINTS.LINE_FEED: - case unicode_js_1.CODE_POINTS.TABULATION: - case unicode_js_1.CODE_POINTS.FORM_FEED: - case unicode_js_1.CODE_POINTS.SOLIDUS: - case unicode_js_1.CODE_POINTS.GREATER_THAN_SIGN: - case unicode_js_1.CODE_POINTS.EOF: { - this._leaveAttrName(); - this.state = State.AFTER_ATTRIBUTE_NAME; - this._stateAfterAttributeName(cp); - break; - } - case unicode_js_1.CODE_POINTS.EQUALS_SIGN: { - this._leaveAttrName(); - this.state = State.BEFORE_ATTRIBUTE_VALUE; - break; - } - case unicode_js_1.CODE_POINTS.QUOTATION_MARK: - case unicode_js_1.CODE_POINTS.APOSTROPHE: - case unicode_js_1.CODE_POINTS.LESS_THAN_SIGN: { - this._err(error_codes_js_1.ERR.unexpectedCharacterInAttributeName); - this.currentAttr.name += String.fromCodePoint(cp); - break; - } - case unicode_js_1.CODE_POINTS.NULL: { - this._err(error_codes_js_1.ERR.unexpectedNullCharacter); - this.currentAttr.name += unicode_js_1.REPLACEMENT_CHARACTER; - break; - } - default: { - this.currentAttr.name += String.fromCodePoint(isAsciiUpper(cp) ? toAsciiLower(cp) : cp); - } - } - } - // After attribute name state - //------------------------------------------------------------------ - _stateAfterAttributeName(cp) { - switch (cp) { - case unicode_js_1.CODE_POINTS.SPACE: - case unicode_js_1.CODE_POINTS.LINE_FEED: - case unicode_js_1.CODE_POINTS.TABULATION: - case unicode_js_1.CODE_POINTS.FORM_FEED: { - // Ignore whitespace - break; - } - case unicode_js_1.CODE_POINTS.SOLIDUS: { - this.state = State.SELF_CLOSING_START_TAG; - break; - } - case unicode_js_1.CODE_POINTS.EQUALS_SIGN: { - this.state = State.BEFORE_ATTRIBUTE_VALUE; - break; - } - case unicode_js_1.CODE_POINTS.GREATER_THAN_SIGN: { - this.state = State.DATA; - this.emitCurrentTagToken(); - break; - } - case unicode_js_1.CODE_POINTS.EOF: { - this._err(error_codes_js_1.ERR.eofInTag); - this._emitEOFToken(); - break; - } - default: { - this._createAttr(''); - this.state = State.ATTRIBUTE_NAME; - this._stateAttributeName(cp); - } - } - } - // Before attribute value state - //------------------------------------------------------------------ - _stateBeforeAttributeValue(cp) { - switch (cp) { - case unicode_js_1.CODE_POINTS.SPACE: - case unicode_js_1.CODE_POINTS.LINE_FEED: - case unicode_js_1.CODE_POINTS.TABULATION: - case unicode_js_1.CODE_POINTS.FORM_FEED: { - // Ignore whitespace - break; - } - case unicode_js_1.CODE_POINTS.QUOTATION_MARK: { - this.state = State.ATTRIBUTE_VALUE_DOUBLE_QUOTED; - break; - } - case unicode_js_1.CODE_POINTS.APOSTROPHE: { - this.state = State.ATTRIBUTE_VALUE_SINGLE_QUOTED; - break; - } - case unicode_js_1.CODE_POINTS.GREATER_THAN_SIGN: { - this._err(error_codes_js_1.ERR.missingAttributeValue); - this.state = State.DATA; - this.emitCurrentTagToken(); - break; - } - default: { - this.state = State.ATTRIBUTE_VALUE_UNQUOTED; - this._stateAttributeValueUnquoted(cp); - } - } - } - // Attribute value (double-quoted) state - //------------------------------------------------------------------ - _stateAttributeValueDoubleQuoted(cp) { - switch (cp) { - case unicode_js_1.CODE_POINTS.QUOTATION_MARK: { - this.state = State.AFTER_ATTRIBUTE_VALUE_QUOTED; - break; - } - case unicode_js_1.CODE_POINTS.AMPERSAND: { - this._startCharacterReference(); - break; - } - case unicode_js_1.CODE_POINTS.NULL: { - this._err(error_codes_js_1.ERR.unexpectedNullCharacter); - this.currentAttr.value += unicode_js_1.REPLACEMENT_CHARACTER; - break; - } - case unicode_js_1.CODE_POINTS.EOF: { - this._err(error_codes_js_1.ERR.eofInTag); - this._emitEOFToken(); - break; - } - default: { - this.currentAttr.value += String.fromCodePoint(cp); - } - } - } - // Attribute value (single-quoted) state - //------------------------------------------------------------------ - _stateAttributeValueSingleQuoted(cp) { - switch (cp) { - case unicode_js_1.CODE_POINTS.APOSTROPHE: { - this.state = State.AFTER_ATTRIBUTE_VALUE_QUOTED; - break; - } - case unicode_js_1.CODE_POINTS.AMPERSAND: { - this._startCharacterReference(); - break; - } - case unicode_js_1.CODE_POINTS.NULL: { - this._err(error_codes_js_1.ERR.unexpectedNullCharacter); - this.currentAttr.value += unicode_js_1.REPLACEMENT_CHARACTER; - break; - } - case unicode_js_1.CODE_POINTS.EOF: { - this._err(error_codes_js_1.ERR.eofInTag); - this._emitEOFToken(); - break; - } - default: { - this.currentAttr.value += String.fromCodePoint(cp); - } - } - } - // Attribute value (unquoted) state - //------------------------------------------------------------------ - _stateAttributeValueUnquoted(cp) { - switch (cp) { - case unicode_js_1.CODE_POINTS.SPACE: - case unicode_js_1.CODE_POINTS.LINE_FEED: - case unicode_js_1.CODE_POINTS.TABULATION: - case unicode_js_1.CODE_POINTS.FORM_FEED: { - this._leaveAttrValue(); - this.state = State.BEFORE_ATTRIBUTE_NAME; - break; - } - case unicode_js_1.CODE_POINTS.AMPERSAND: { - this._startCharacterReference(); - break; - } - case unicode_js_1.CODE_POINTS.GREATER_THAN_SIGN: { - this._leaveAttrValue(); - this.state = State.DATA; - this.emitCurrentTagToken(); - break; - } - case unicode_js_1.CODE_POINTS.NULL: { - this._err(error_codes_js_1.ERR.unexpectedNullCharacter); - this.currentAttr.value += unicode_js_1.REPLACEMENT_CHARACTER; - break; - } - case unicode_js_1.CODE_POINTS.QUOTATION_MARK: - case unicode_js_1.CODE_POINTS.APOSTROPHE: - case unicode_js_1.CODE_POINTS.LESS_THAN_SIGN: - case unicode_js_1.CODE_POINTS.EQUALS_SIGN: - case unicode_js_1.CODE_POINTS.GRAVE_ACCENT: { - this._err(error_codes_js_1.ERR.unexpectedCharacterInUnquotedAttributeValue); - this.currentAttr.value += String.fromCodePoint(cp); - break; - } - case unicode_js_1.CODE_POINTS.EOF: { - this._err(error_codes_js_1.ERR.eofInTag); - this._emitEOFToken(); - break; - } - default: { - this.currentAttr.value += String.fromCodePoint(cp); - } - } - } - // After attribute value (quoted) state - //------------------------------------------------------------------ - _stateAfterAttributeValueQuoted(cp) { - switch (cp) { - case unicode_js_1.CODE_POINTS.SPACE: - case unicode_js_1.CODE_POINTS.LINE_FEED: - case unicode_js_1.CODE_POINTS.TABULATION: - case unicode_js_1.CODE_POINTS.FORM_FEED: { - this._leaveAttrValue(); - this.state = State.BEFORE_ATTRIBUTE_NAME; - break; - } - case unicode_js_1.CODE_POINTS.SOLIDUS: { - this._leaveAttrValue(); - this.state = State.SELF_CLOSING_START_TAG; - break; - } - case unicode_js_1.CODE_POINTS.GREATER_THAN_SIGN: { - this._leaveAttrValue(); - this.state = State.DATA; - this.emitCurrentTagToken(); - break; - } - case unicode_js_1.CODE_POINTS.EOF: { - this._err(error_codes_js_1.ERR.eofInTag); - this._emitEOFToken(); - break; - } - default: { - this._err(error_codes_js_1.ERR.missingWhitespaceBetweenAttributes); - this.state = State.BEFORE_ATTRIBUTE_NAME; - this._stateBeforeAttributeName(cp); - } - } - } - // Self-closing start tag state - //------------------------------------------------------------------ - _stateSelfClosingStartTag(cp) { - switch (cp) { - case unicode_js_1.CODE_POINTS.GREATER_THAN_SIGN: { - const token = this.currentToken; - token.selfClosing = true; - this.state = State.DATA; - this.emitCurrentTagToken(); - break; - } - case unicode_js_1.CODE_POINTS.EOF: { - this._err(error_codes_js_1.ERR.eofInTag); - this._emitEOFToken(); - break; - } - default: { - this._err(error_codes_js_1.ERR.unexpectedSolidusInTag); - this.state = State.BEFORE_ATTRIBUTE_NAME; - this._stateBeforeAttributeName(cp); - } - } - } - // Bogus comment state - //------------------------------------------------------------------ - _stateBogusComment(cp) { - const token = this.currentToken; - switch (cp) { - case unicode_js_1.CODE_POINTS.GREATER_THAN_SIGN: { - this.state = State.DATA; - this.emitCurrentComment(token); - break; - } - case unicode_js_1.CODE_POINTS.EOF: { - this.emitCurrentComment(token); - this._emitEOFToken(); - break; - } - case unicode_js_1.CODE_POINTS.NULL: { - this._err(error_codes_js_1.ERR.unexpectedNullCharacter); - token.data += unicode_js_1.REPLACEMENT_CHARACTER; - break; - } - default: { - token.data += String.fromCodePoint(cp); - } - } - } - // Markup declaration open state - //------------------------------------------------------------------ - _stateMarkupDeclarationOpen(cp) { - if (this._consumeSequenceIfMatch(unicode_js_1.SEQUENCES.DASH_DASH, true)) { - this._createCommentToken(unicode_js_1.SEQUENCES.DASH_DASH.length + 1); - this.state = State.COMMENT_START; - } - else if (this._consumeSequenceIfMatch(unicode_js_1.SEQUENCES.DOCTYPE, false)) { - // NOTE: Doctypes tokens are created without fixed offsets. We keep track of the moment a doctype *might* start here. - this.currentLocation = this.getCurrentLocation(unicode_js_1.SEQUENCES.DOCTYPE.length + 1); - this.state = State.DOCTYPE; - } - else if (this._consumeSequenceIfMatch(unicode_js_1.SEQUENCES.CDATA_START, true)) { - if (this.inForeignNode) { - this.state = State.CDATA_SECTION; - } - else { - this._err(error_codes_js_1.ERR.cdataInHtmlContent); - this._createCommentToken(unicode_js_1.SEQUENCES.CDATA_START.length + 1); - this.currentToken.data = '[CDATA['; - this.state = State.BOGUS_COMMENT; - } - } - //NOTE: Sequence lookups can be abrupted by hibernation. In that case, lookup - //results are no longer valid and we will need to start over. - else if (!this._ensureHibernation()) { - this._err(error_codes_js_1.ERR.incorrectlyOpenedComment); - this._createCommentToken(2); - this.state = State.BOGUS_COMMENT; - this._stateBogusComment(cp); - } - } - // Comment start state - //------------------------------------------------------------------ - _stateCommentStart(cp) { - switch (cp) { - case unicode_js_1.CODE_POINTS.HYPHEN_MINUS: { - this.state = State.COMMENT_START_DASH; - break; - } - case unicode_js_1.CODE_POINTS.GREATER_THAN_SIGN: { - this._err(error_codes_js_1.ERR.abruptClosingOfEmptyComment); - this.state = State.DATA; - const token = this.currentToken; - this.emitCurrentComment(token); - break; - } - default: { - this.state = State.COMMENT; - this._stateComment(cp); - } - } - } - // Comment start dash state - //------------------------------------------------------------------ - _stateCommentStartDash(cp) { - const token = this.currentToken; - switch (cp) { - case unicode_js_1.CODE_POINTS.HYPHEN_MINUS: { - this.state = State.COMMENT_END; - break; - } - case unicode_js_1.CODE_POINTS.GREATER_THAN_SIGN: { - this._err(error_codes_js_1.ERR.abruptClosingOfEmptyComment); - this.state = State.DATA; - this.emitCurrentComment(token); - break; - } - case unicode_js_1.CODE_POINTS.EOF: { - this._err(error_codes_js_1.ERR.eofInComment); - this.emitCurrentComment(token); - this._emitEOFToken(); - break; - } - default: { - token.data += '-'; - this.state = State.COMMENT; - this._stateComment(cp); - } - } - } - // Comment state - //------------------------------------------------------------------ - _stateComment(cp) { - const token = this.currentToken; - switch (cp) { - case unicode_js_1.CODE_POINTS.HYPHEN_MINUS: { - this.state = State.COMMENT_END_DASH; - break; - } - case unicode_js_1.CODE_POINTS.LESS_THAN_SIGN: { - token.data += '<'; - this.state = State.COMMENT_LESS_THAN_SIGN; - break; - } - case unicode_js_1.CODE_POINTS.NULL: { - this._err(error_codes_js_1.ERR.unexpectedNullCharacter); - token.data += unicode_js_1.REPLACEMENT_CHARACTER; - break; - } - case unicode_js_1.CODE_POINTS.EOF: { - this._err(error_codes_js_1.ERR.eofInComment); - this.emitCurrentComment(token); - this._emitEOFToken(); - break; - } - default: { - token.data += String.fromCodePoint(cp); - } - } - } - // Comment less-than sign state - //------------------------------------------------------------------ - _stateCommentLessThanSign(cp) { - const token = this.currentToken; - switch (cp) { - case unicode_js_1.CODE_POINTS.EXCLAMATION_MARK: { - token.data += '!'; - this.state = State.COMMENT_LESS_THAN_SIGN_BANG; - break; - } - case unicode_js_1.CODE_POINTS.LESS_THAN_SIGN: { - token.data += '<'; - break; - } - default: { - this.state = State.COMMENT; - this._stateComment(cp); - } - } - } - // Comment less-than sign bang state - //------------------------------------------------------------------ - _stateCommentLessThanSignBang(cp) { - if (cp === unicode_js_1.CODE_POINTS.HYPHEN_MINUS) { - this.state = State.COMMENT_LESS_THAN_SIGN_BANG_DASH; - } - else { - this.state = State.COMMENT; - this._stateComment(cp); - } - } - // Comment less-than sign bang dash state - //------------------------------------------------------------------ - _stateCommentLessThanSignBangDash(cp) { - if (cp === unicode_js_1.CODE_POINTS.HYPHEN_MINUS) { - this.state = State.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH; - } - else { - this.state = State.COMMENT_END_DASH; - this._stateCommentEndDash(cp); - } - } - // Comment less-than sign bang dash dash state - //------------------------------------------------------------------ - _stateCommentLessThanSignBangDashDash(cp) { - if (cp !== unicode_js_1.CODE_POINTS.GREATER_THAN_SIGN && cp !== unicode_js_1.CODE_POINTS.EOF) { - this._err(error_codes_js_1.ERR.nestedComment); - } - this.state = State.COMMENT_END; - this._stateCommentEnd(cp); - } - // Comment end dash state - //------------------------------------------------------------------ - _stateCommentEndDash(cp) { - const token = this.currentToken; - switch (cp) { - case unicode_js_1.CODE_POINTS.HYPHEN_MINUS: { - this.state = State.COMMENT_END; - break; - } - case unicode_js_1.CODE_POINTS.EOF: { - this._err(error_codes_js_1.ERR.eofInComment); - this.emitCurrentComment(token); - this._emitEOFToken(); - break; - } - default: { - token.data += '-'; - this.state = State.COMMENT; - this._stateComment(cp); - } - } - } - // Comment end state - //------------------------------------------------------------------ - _stateCommentEnd(cp) { - const token = this.currentToken; - switch (cp) { - case unicode_js_1.CODE_POINTS.GREATER_THAN_SIGN: { - this.state = State.DATA; - this.emitCurrentComment(token); - break; - } - case unicode_js_1.CODE_POINTS.EXCLAMATION_MARK: { - this.state = State.COMMENT_END_BANG; - break; - } - case unicode_js_1.CODE_POINTS.HYPHEN_MINUS: { - token.data += '-'; - break; - } - case unicode_js_1.CODE_POINTS.EOF: { - this._err(error_codes_js_1.ERR.eofInComment); - this.emitCurrentComment(token); - this._emitEOFToken(); - break; - } - default: { - token.data += '--'; - this.state = State.COMMENT; - this._stateComment(cp); - } - } - } - // Comment end bang state - //------------------------------------------------------------------ - _stateCommentEndBang(cp) { - const token = this.currentToken; - switch (cp) { - case unicode_js_1.CODE_POINTS.HYPHEN_MINUS: { - token.data += '--!'; - this.state = State.COMMENT_END_DASH; - break; - } - case unicode_js_1.CODE_POINTS.GREATER_THAN_SIGN: { - this._err(error_codes_js_1.ERR.incorrectlyClosedComment); - this.state = State.DATA; - this.emitCurrentComment(token); - break; - } - case unicode_js_1.CODE_POINTS.EOF: { - this._err(error_codes_js_1.ERR.eofInComment); - this.emitCurrentComment(token); - this._emitEOFToken(); - break; - } - default: { - token.data += '--!'; - this.state = State.COMMENT; - this._stateComment(cp); - } - } - } - // DOCTYPE state - //------------------------------------------------------------------ - _stateDoctype(cp) { - switch (cp) { - case unicode_js_1.CODE_POINTS.SPACE: - case unicode_js_1.CODE_POINTS.LINE_FEED: - case unicode_js_1.CODE_POINTS.TABULATION: - case unicode_js_1.CODE_POINTS.FORM_FEED: { - this.state = State.BEFORE_DOCTYPE_NAME; - break; - } - case unicode_js_1.CODE_POINTS.GREATER_THAN_SIGN: { - this.state = State.BEFORE_DOCTYPE_NAME; - this._stateBeforeDoctypeName(cp); - break; - } - case unicode_js_1.CODE_POINTS.EOF: { - this._err(error_codes_js_1.ERR.eofInDoctype); - this._createDoctypeToken(null); - const token = this.currentToken; - token.forceQuirks = true; - this.emitCurrentDoctype(token); - this._emitEOFToken(); - break; - } - default: { - this._err(error_codes_js_1.ERR.missingWhitespaceBeforeDoctypeName); - this.state = State.BEFORE_DOCTYPE_NAME; - this._stateBeforeDoctypeName(cp); - } - } - } - // Before DOCTYPE name state - //------------------------------------------------------------------ - _stateBeforeDoctypeName(cp) { - if (isAsciiUpper(cp)) { - this._createDoctypeToken(String.fromCharCode(toAsciiLower(cp))); - this.state = State.DOCTYPE_NAME; - } - else - switch (cp) { - case unicode_js_1.CODE_POINTS.SPACE: - case unicode_js_1.CODE_POINTS.LINE_FEED: - case unicode_js_1.CODE_POINTS.TABULATION: - case unicode_js_1.CODE_POINTS.FORM_FEED: { - // Ignore whitespace - break; - } - case unicode_js_1.CODE_POINTS.NULL: { - this._err(error_codes_js_1.ERR.unexpectedNullCharacter); - this._createDoctypeToken(unicode_js_1.REPLACEMENT_CHARACTER); - this.state = State.DOCTYPE_NAME; - break; - } - case unicode_js_1.CODE_POINTS.GREATER_THAN_SIGN: { - this._err(error_codes_js_1.ERR.missingDoctypeName); - this._createDoctypeToken(null); - const token = this.currentToken; - token.forceQuirks = true; - this.emitCurrentDoctype(token); - this.state = State.DATA; - break; - } - case unicode_js_1.CODE_POINTS.EOF: { - this._err(error_codes_js_1.ERR.eofInDoctype); - this._createDoctypeToken(null); - const token = this.currentToken; - token.forceQuirks = true; - this.emitCurrentDoctype(token); - this._emitEOFToken(); - break; - } - default: { - this._createDoctypeToken(String.fromCodePoint(cp)); - this.state = State.DOCTYPE_NAME; - } - } - } - // DOCTYPE name state - //------------------------------------------------------------------ - _stateDoctypeName(cp) { - const token = this.currentToken; - switch (cp) { - case unicode_js_1.CODE_POINTS.SPACE: - case unicode_js_1.CODE_POINTS.LINE_FEED: - case unicode_js_1.CODE_POINTS.TABULATION: - case unicode_js_1.CODE_POINTS.FORM_FEED: { - this.state = State.AFTER_DOCTYPE_NAME; - break; - } - case unicode_js_1.CODE_POINTS.GREATER_THAN_SIGN: { - this.state = State.DATA; - this.emitCurrentDoctype(token); - break; - } - case unicode_js_1.CODE_POINTS.NULL: { - this._err(error_codes_js_1.ERR.unexpectedNullCharacter); - token.name += unicode_js_1.REPLACEMENT_CHARACTER; - break; - } - case unicode_js_1.CODE_POINTS.EOF: { - this._err(error_codes_js_1.ERR.eofInDoctype); - token.forceQuirks = true; - this.emitCurrentDoctype(token); - this._emitEOFToken(); - break; - } - default: { - token.name += String.fromCodePoint(isAsciiUpper(cp) ? toAsciiLower(cp) : cp); - } - } - } - // After DOCTYPE name state - //------------------------------------------------------------------ - _stateAfterDoctypeName(cp) { - const token = this.currentToken; - switch (cp) { - case unicode_js_1.CODE_POINTS.SPACE: - case unicode_js_1.CODE_POINTS.LINE_FEED: - case unicode_js_1.CODE_POINTS.TABULATION: - case unicode_js_1.CODE_POINTS.FORM_FEED: { - // Ignore whitespace - break; - } - case unicode_js_1.CODE_POINTS.GREATER_THAN_SIGN: { - this.state = State.DATA; - this.emitCurrentDoctype(token); - break; - } - case unicode_js_1.CODE_POINTS.EOF: { - this._err(error_codes_js_1.ERR.eofInDoctype); - token.forceQuirks = true; - this.emitCurrentDoctype(token); - this._emitEOFToken(); - break; - } - default: { - if (this._consumeSequenceIfMatch(unicode_js_1.SEQUENCES.PUBLIC, false)) { - this.state = State.AFTER_DOCTYPE_PUBLIC_KEYWORD; - } - else if (this._consumeSequenceIfMatch(unicode_js_1.SEQUENCES.SYSTEM, false)) { - this.state = State.AFTER_DOCTYPE_SYSTEM_KEYWORD; - } - //NOTE: sequence lookup can be abrupted by hibernation. In that case lookup - //results are no longer valid and we will need to start over. - else if (!this._ensureHibernation()) { - this._err(error_codes_js_1.ERR.invalidCharacterSequenceAfterDoctypeName); - token.forceQuirks = true; - this.state = State.BOGUS_DOCTYPE; - this._stateBogusDoctype(cp); - } - } - } - } - // After DOCTYPE public keyword state - //------------------------------------------------------------------ - _stateAfterDoctypePublicKeyword(cp) { - const token = this.currentToken; - switch (cp) { - case unicode_js_1.CODE_POINTS.SPACE: - case unicode_js_1.CODE_POINTS.LINE_FEED: - case unicode_js_1.CODE_POINTS.TABULATION: - case unicode_js_1.CODE_POINTS.FORM_FEED: { - this.state = State.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER; - break; - } - case unicode_js_1.CODE_POINTS.QUOTATION_MARK: { - this._err(error_codes_js_1.ERR.missingWhitespaceAfterDoctypePublicKeyword); - token.publicId = ''; - this.state = State.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED; - break; - } - case unicode_js_1.CODE_POINTS.APOSTROPHE: { - this._err(error_codes_js_1.ERR.missingWhitespaceAfterDoctypePublicKeyword); - token.publicId = ''; - this.state = State.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED; - break; - } - case unicode_js_1.CODE_POINTS.GREATER_THAN_SIGN: { - this._err(error_codes_js_1.ERR.missingDoctypePublicIdentifier); - token.forceQuirks = true; - this.state = State.DATA; - this.emitCurrentDoctype(token); - break; - } - case unicode_js_1.CODE_POINTS.EOF: { - this._err(error_codes_js_1.ERR.eofInDoctype); - token.forceQuirks = true; - this.emitCurrentDoctype(token); - this._emitEOFToken(); - break; - } - default: { - this._err(error_codes_js_1.ERR.missingQuoteBeforeDoctypePublicIdentifier); - token.forceQuirks = true; - this.state = State.BOGUS_DOCTYPE; - this._stateBogusDoctype(cp); - } - } - } - // Before DOCTYPE public identifier state - //------------------------------------------------------------------ - _stateBeforeDoctypePublicIdentifier(cp) { - const token = this.currentToken; - switch (cp) { - case unicode_js_1.CODE_POINTS.SPACE: - case unicode_js_1.CODE_POINTS.LINE_FEED: - case unicode_js_1.CODE_POINTS.TABULATION: - case unicode_js_1.CODE_POINTS.FORM_FEED: { - // Ignore whitespace - break; - } - case unicode_js_1.CODE_POINTS.QUOTATION_MARK: { - token.publicId = ''; - this.state = State.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED; - break; - } - case unicode_js_1.CODE_POINTS.APOSTROPHE: { - token.publicId = ''; - this.state = State.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED; - break; - } - case unicode_js_1.CODE_POINTS.GREATER_THAN_SIGN: { - this._err(error_codes_js_1.ERR.missingDoctypePublicIdentifier); - token.forceQuirks = true; - this.state = State.DATA; - this.emitCurrentDoctype(token); - break; - } - case unicode_js_1.CODE_POINTS.EOF: { - this._err(error_codes_js_1.ERR.eofInDoctype); - token.forceQuirks = true; - this.emitCurrentDoctype(token); - this._emitEOFToken(); - break; - } - default: { - this._err(error_codes_js_1.ERR.missingQuoteBeforeDoctypePublicIdentifier); - token.forceQuirks = true; - this.state = State.BOGUS_DOCTYPE; - this._stateBogusDoctype(cp); - } - } - } - // DOCTYPE public identifier (double-quoted) state - //------------------------------------------------------------------ - _stateDoctypePublicIdentifierDoubleQuoted(cp) { - const token = this.currentToken; - switch (cp) { - case unicode_js_1.CODE_POINTS.QUOTATION_MARK: { - this.state = State.AFTER_DOCTYPE_PUBLIC_IDENTIFIER; - break; - } - case unicode_js_1.CODE_POINTS.NULL: { - this._err(error_codes_js_1.ERR.unexpectedNullCharacter); - token.publicId += unicode_js_1.REPLACEMENT_CHARACTER; - break; - } - case unicode_js_1.CODE_POINTS.GREATER_THAN_SIGN: { - this._err(error_codes_js_1.ERR.abruptDoctypePublicIdentifier); - token.forceQuirks = true; - this.emitCurrentDoctype(token); - this.state = State.DATA; - break; - } - case unicode_js_1.CODE_POINTS.EOF: { - this._err(error_codes_js_1.ERR.eofInDoctype); - token.forceQuirks = true; - this.emitCurrentDoctype(token); - this._emitEOFToken(); - break; - } - default: { - token.publicId += String.fromCodePoint(cp); - } - } - } - // DOCTYPE public identifier (single-quoted) state - //------------------------------------------------------------------ - _stateDoctypePublicIdentifierSingleQuoted(cp) { - const token = this.currentToken; - switch (cp) { - case unicode_js_1.CODE_POINTS.APOSTROPHE: { - this.state = State.AFTER_DOCTYPE_PUBLIC_IDENTIFIER; - break; - } - case unicode_js_1.CODE_POINTS.NULL: { - this._err(error_codes_js_1.ERR.unexpectedNullCharacter); - token.publicId += unicode_js_1.REPLACEMENT_CHARACTER; - break; - } - case unicode_js_1.CODE_POINTS.GREATER_THAN_SIGN: { - this._err(error_codes_js_1.ERR.abruptDoctypePublicIdentifier); - token.forceQuirks = true; - this.emitCurrentDoctype(token); - this.state = State.DATA; - break; - } - case unicode_js_1.CODE_POINTS.EOF: { - this._err(error_codes_js_1.ERR.eofInDoctype); - token.forceQuirks = true; - this.emitCurrentDoctype(token); - this._emitEOFToken(); - break; - } - default: { - token.publicId += String.fromCodePoint(cp); - } - } - } - // After DOCTYPE public identifier state - //------------------------------------------------------------------ - _stateAfterDoctypePublicIdentifier(cp) { - const token = this.currentToken; - switch (cp) { - case unicode_js_1.CODE_POINTS.SPACE: - case unicode_js_1.CODE_POINTS.LINE_FEED: - case unicode_js_1.CODE_POINTS.TABULATION: - case unicode_js_1.CODE_POINTS.FORM_FEED: { - this.state = State.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS; - break; - } - case unicode_js_1.CODE_POINTS.GREATER_THAN_SIGN: { - this.state = State.DATA; - this.emitCurrentDoctype(token); - break; - } - case unicode_js_1.CODE_POINTS.QUOTATION_MARK: { - this._err(error_codes_js_1.ERR.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers); - token.systemId = ''; - this.state = State.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED; - break; - } - case unicode_js_1.CODE_POINTS.APOSTROPHE: { - this._err(error_codes_js_1.ERR.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers); - token.systemId = ''; - this.state = State.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED; - break; - } - case unicode_js_1.CODE_POINTS.EOF: { - this._err(error_codes_js_1.ERR.eofInDoctype); - token.forceQuirks = true; - this.emitCurrentDoctype(token); - this._emitEOFToken(); - break; - } - default: { - this._err(error_codes_js_1.ERR.missingQuoteBeforeDoctypeSystemIdentifier); - token.forceQuirks = true; - this.state = State.BOGUS_DOCTYPE; - this._stateBogusDoctype(cp); - } - } - } - // Between DOCTYPE public and system identifiers state - //------------------------------------------------------------------ - _stateBetweenDoctypePublicAndSystemIdentifiers(cp) { - const token = this.currentToken; - switch (cp) { - case unicode_js_1.CODE_POINTS.SPACE: - case unicode_js_1.CODE_POINTS.LINE_FEED: - case unicode_js_1.CODE_POINTS.TABULATION: - case unicode_js_1.CODE_POINTS.FORM_FEED: { - // Ignore whitespace - break; - } - case unicode_js_1.CODE_POINTS.GREATER_THAN_SIGN: { - this.emitCurrentDoctype(token); - this.state = State.DATA; - break; - } - case unicode_js_1.CODE_POINTS.QUOTATION_MARK: { - token.systemId = ''; - this.state = State.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED; - break; - } - case unicode_js_1.CODE_POINTS.APOSTROPHE: { - token.systemId = ''; - this.state = State.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED; - break; - } - case unicode_js_1.CODE_POINTS.EOF: { - this._err(error_codes_js_1.ERR.eofInDoctype); - token.forceQuirks = true; - this.emitCurrentDoctype(token); - this._emitEOFToken(); - break; - } - default: { - this._err(error_codes_js_1.ERR.missingQuoteBeforeDoctypeSystemIdentifier); - token.forceQuirks = true; - this.state = State.BOGUS_DOCTYPE; - this._stateBogusDoctype(cp); - } - } - } - // After DOCTYPE system keyword state - //------------------------------------------------------------------ - _stateAfterDoctypeSystemKeyword(cp) { - const token = this.currentToken; - switch (cp) { - case unicode_js_1.CODE_POINTS.SPACE: - case unicode_js_1.CODE_POINTS.LINE_FEED: - case unicode_js_1.CODE_POINTS.TABULATION: - case unicode_js_1.CODE_POINTS.FORM_FEED: { - this.state = State.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER; - break; - } - case unicode_js_1.CODE_POINTS.QUOTATION_MARK: { - this._err(error_codes_js_1.ERR.missingWhitespaceAfterDoctypeSystemKeyword); - token.systemId = ''; - this.state = State.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED; - break; - } - case unicode_js_1.CODE_POINTS.APOSTROPHE: { - this._err(error_codes_js_1.ERR.missingWhitespaceAfterDoctypeSystemKeyword); - token.systemId = ''; - this.state = State.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED; - break; - } - case unicode_js_1.CODE_POINTS.GREATER_THAN_SIGN: { - this._err(error_codes_js_1.ERR.missingDoctypeSystemIdentifier); - token.forceQuirks = true; - this.state = State.DATA; - this.emitCurrentDoctype(token); - break; - } - case unicode_js_1.CODE_POINTS.EOF: { - this._err(error_codes_js_1.ERR.eofInDoctype); - token.forceQuirks = true; - this.emitCurrentDoctype(token); - this._emitEOFToken(); - break; - } - default: { - this._err(error_codes_js_1.ERR.missingQuoteBeforeDoctypeSystemIdentifier); - token.forceQuirks = true; - this.state = State.BOGUS_DOCTYPE; - this._stateBogusDoctype(cp); - } - } - } - // Before DOCTYPE system identifier state - //------------------------------------------------------------------ - _stateBeforeDoctypeSystemIdentifier(cp) { - const token = this.currentToken; - switch (cp) { - case unicode_js_1.CODE_POINTS.SPACE: - case unicode_js_1.CODE_POINTS.LINE_FEED: - case unicode_js_1.CODE_POINTS.TABULATION: - case unicode_js_1.CODE_POINTS.FORM_FEED: { - // Ignore whitespace - break; - } - case unicode_js_1.CODE_POINTS.QUOTATION_MARK: { - token.systemId = ''; - this.state = State.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED; - break; - } - case unicode_js_1.CODE_POINTS.APOSTROPHE: { - token.systemId = ''; - this.state = State.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED; - break; - } - case unicode_js_1.CODE_POINTS.GREATER_THAN_SIGN: { - this._err(error_codes_js_1.ERR.missingDoctypeSystemIdentifier); - token.forceQuirks = true; - this.state = State.DATA; - this.emitCurrentDoctype(token); - break; - } - case unicode_js_1.CODE_POINTS.EOF: { - this._err(error_codes_js_1.ERR.eofInDoctype); - token.forceQuirks = true; - this.emitCurrentDoctype(token); - this._emitEOFToken(); - break; - } - default: { - this._err(error_codes_js_1.ERR.missingQuoteBeforeDoctypeSystemIdentifier); - token.forceQuirks = true; - this.state = State.BOGUS_DOCTYPE; - this._stateBogusDoctype(cp); - } - } - } - // DOCTYPE system identifier (double-quoted) state - //------------------------------------------------------------------ - _stateDoctypeSystemIdentifierDoubleQuoted(cp) { - const token = this.currentToken; - switch (cp) { - case unicode_js_1.CODE_POINTS.QUOTATION_MARK: { - this.state = State.AFTER_DOCTYPE_SYSTEM_IDENTIFIER; - break; - } - case unicode_js_1.CODE_POINTS.NULL: { - this._err(error_codes_js_1.ERR.unexpectedNullCharacter); - token.systemId += unicode_js_1.REPLACEMENT_CHARACTER; - break; - } - case unicode_js_1.CODE_POINTS.GREATER_THAN_SIGN: { - this._err(error_codes_js_1.ERR.abruptDoctypeSystemIdentifier); - token.forceQuirks = true; - this.emitCurrentDoctype(token); - this.state = State.DATA; - break; - } - case unicode_js_1.CODE_POINTS.EOF: { - this._err(error_codes_js_1.ERR.eofInDoctype); - token.forceQuirks = true; - this.emitCurrentDoctype(token); - this._emitEOFToken(); - break; - } - default: { - token.systemId += String.fromCodePoint(cp); - } - } - } - // DOCTYPE system identifier (single-quoted) state - //------------------------------------------------------------------ - _stateDoctypeSystemIdentifierSingleQuoted(cp) { - const token = this.currentToken; - switch (cp) { - case unicode_js_1.CODE_POINTS.APOSTROPHE: { - this.state = State.AFTER_DOCTYPE_SYSTEM_IDENTIFIER; - break; - } - case unicode_js_1.CODE_POINTS.NULL: { - this._err(error_codes_js_1.ERR.unexpectedNullCharacter); - token.systemId += unicode_js_1.REPLACEMENT_CHARACTER; - break; - } - case unicode_js_1.CODE_POINTS.GREATER_THAN_SIGN: { - this._err(error_codes_js_1.ERR.abruptDoctypeSystemIdentifier); - token.forceQuirks = true; - this.emitCurrentDoctype(token); - this.state = State.DATA; - break; - } - case unicode_js_1.CODE_POINTS.EOF: { - this._err(error_codes_js_1.ERR.eofInDoctype); - token.forceQuirks = true; - this.emitCurrentDoctype(token); - this._emitEOFToken(); - break; - } - default: { - token.systemId += String.fromCodePoint(cp); - } - } - } - // After DOCTYPE system identifier state - //------------------------------------------------------------------ - _stateAfterDoctypeSystemIdentifier(cp) { - const token = this.currentToken; - switch (cp) { - case unicode_js_1.CODE_POINTS.SPACE: - case unicode_js_1.CODE_POINTS.LINE_FEED: - case unicode_js_1.CODE_POINTS.TABULATION: - case unicode_js_1.CODE_POINTS.FORM_FEED: { - // Ignore whitespace - break; - } - case unicode_js_1.CODE_POINTS.GREATER_THAN_SIGN: { - this.emitCurrentDoctype(token); - this.state = State.DATA; - break; - } - case unicode_js_1.CODE_POINTS.EOF: { - this._err(error_codes_js_1.ERR.eofInDoctype); - token.forceQuirks = true; - this.emitCurrentDoctype(token); - this._emitEOFToken(); - break; - } - default: { - this._err(error_codes_js_1.ERR.unexpectedCharacterAfterDoctypeSystemIdentifier); - this.state = State.BOGUS_DOCTYPE; - this._stateBogusDoctype(cp); - } - } - } - // Bogus DOCTYPE state - //------------------------------------------------------------------ - _stateBogusDoctype(cp) { - const token = this.currentToken; - switch (cp) { - case unicode_js_1.CODE_POINTS.GREATER_THAN_SIGN: { - this.emitCurrentDoctype(token); - this.state = State.DATA; - break; - } - case unicode_js_1.CODE_POINTS.NULL: { - this._err(error_codes_js_1.ERR.unexpectedNullCharacter); - break; - } - case unicode_js_1.CODE_POINTS.EOF: { - this.emitCurrentDoctype(token); - this._emitEOFToken(); - break; - } - default: - // Do nothing - } - } - // CDATA section state - //------------------------------------------------------------------ - _stateCdataSection(cp) { - switch (cp) { - case unicode_js_1.CODE_POINTS.RIGHT_SQUARE_BRACKET: { - this.state = State.CDATA_SECTION_BRACKET; - break; - } - case unicode_js_1.CODE_POINTS.EOF: { - this._err(error_codes_js_1.ERR.eofInCdata); - this._emitEOFToken(); - break; - } - default: { - this._emitCodePoint(cp); - } - } - } - // CDATA section bracket state - //------------------------------------------------------------------ - _stateCdataSectionBracket(cp) { - if (cp === unicode_js_1.CODE_POINTS.RIGHT_SQUARE_BRACKET) { - this.state = State.CDATA_SECTION_END; - } - else { - this._emitChars(']'); - this.state = State.CDATA_SECTION; - this._stateCdataSection(cp); - } - } - // CDATA section end state - //------------------------------------------------------------------ - _stateCdataSectionEnd(cp) { - switch (cp) { - case unicode_js_1.CODE_POINTS.GREATER_THAN_SIGN: { - this.state = State.DATA; - break; - } - case unicode_js_1.CODE_POINTS.RIGHT_SQUARE_BRACKET: { - this._emitChars(']'); - break; - } - default: { - this._emitChars(']]'); - this.state = State.CDATA_SECTION; - this._stateCdataSection(cp); - } - } - } - // Character reference state - //------------------------------------------------------------------ - _stateCharacterReference() { - let length = this.entityDecoder.write(this.preprocessor.html, this.preprocessor.pos); - if (length < 0) { - if (this.preprocessor.lastChunkWritten) { - length = this.entityDecoder.end(); - } - else { - // Wait for the rest of the entity. - this.active = false; - // Mark the entire buffer as read. - this.preprocessor.pos = this.preprocessor.html.length - 1; - this.consumedAfterSnapshot = 0; - this.preprocessor.endOfChunkHit = true; - return; - } - } - if (length === 0) { - // This was not a valid entity. Go back to the beginning, and - // figure out what to do. - this.preprocessor.pos = this.entityStartPos; - this._flushCodePointConsumedAsCharacterReference(unicode_js_1.CODE_POINTS.AMPERSAND); - this.state = - !this._isCharacterReferenceInAttribute() && isAsciiAlphaNumeric(this.preprocessor.peek(1)) - ? State.AMBIGUOUS_AMPERSAND - : this.returnState; - } - else { - // We successfully parsed an entity. Switch to the return state. - this.state = this.returnState; - } - } - // Ambiguos ampersand state - //------------------------------------------------------------------ - _stateAmbiguousAmpersand(cp) { - if (isAsciiAlphaNumeric(cp)) { - this._flushCodePointConsumedAsCharacterReference(cp); - } - else { - if (cp === unicode_js_1.CODE_POINTS.SEMICOLON) { - this._err(error_codes_js_1.ERR.unknownNamedCharacterReference); - } - this.state = this.returnState; - this._callState(cp); - } - } -} -exports.Tokenizer = Tokenizer; diff --git a/node_modules/parse5/dist/cjs/tokenizer/preprocessor.d.ts b/node_modules/parse5/dist/cjs/tokenizer/preprocessor.d.ts deleted file mode 100644 index 1dfede3..0000000 --- a/node_modules/parse5/dist/cjs/tokenizer/preprocessor.d.ts +++ /dev/null @@ -1,36 +0,0 @@ -import { ERR, type ParserError, type ParserErrorHandler } from '../common/error-codes.js'; -export declare class Preprocessor { - private handler; - html: string; - pos: number; - private lastGapPos; - private gapStack; - private skipNextNewLine; - lastChunkWritten: boolean; - endOfChunkHit: boolean; - bufferWaterline: number; - private isEol; - private lineStartPos; - droppedBufferSize: number; - line: number; - constructor(handler: { - onParseError?: ParserErrorHandler | null; - }); - /** The column on the current line. If we just saw a gap (eg. a surrogate pair), return the index before. */ - get col(): number; - get offset(): number; - getError(code: ERR, cpOffset: number): ParserError; - private lastErrOffset; - private _err; - private _addGap; - private _processSurrogate; - willDropParsedChunk(): boolean; - dropParsedChunk(): void; - write(chunk: string, isLastChunk: boolean): void; - insertHtmlAtCurrentPos(chunk: string): void; - startsWith(pattern: string, caseSensitive: boolean): boolean; - peek(offset: number): number; - advance(): number; - private _checkForProblematicCharacters; - retreat(count: number): void; -} diff --git a/node_modules/parse5/dist/cjs/tokenizer/preprocessor.js b/node_modules/parse5/dist/cjs/tokenizer/preprocessor.js deleted file mode 100644 index 68ca0e3..0000000 --- a/node_modules/parse5/dist/cjs/tokenizer/preprocessor.js +++ /dev/null @@ -1,200 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.Preprocessor = void 0; -const unicode_js_1 = require("../common/unicode.js"); -const error_codes_js_1 = require("../common/error-codes.js"); -//Const -const DEFAULT_BUFFER_WATERLINE = 1 << 16; -//Preprocessor -//NOTE: HTML input preprocessing -//(see: http://www.whatwg.org/specs/web-apps/current-work/multipage/parsing.html#preprocessing-the-input-stream) -class Preprocessor { - constructor(handler) { - this.handler = handler; - this.html = ''; - this.pos = -1; - // NOTE: Initial `lastGapPos` is -2, to ensure `col` on initialisation is 0 - this.lastGapPos = -2; - this.gapStack = []; - this.skipNextNewLine = false; - this.lastChunkWritten = false; - this.endOfChunkHit = false; - this.bufferWaterline = DEFAULT_BUFFER_WATERLINE; - this.isEol = false; - this.lineStartPos = 0; - this.droppedBufferSize = 0; - this.line = 1; - //NOTE: avoid reporting errors twice on advance/retreat - this.lastErrOffset = -1; - } - /** The column on the current line. If we just saw a gap (eg. a surrogate pair), return the index before. */ - get col() { - return this.pos - this.lineStartPos + Number(this.lastGapPos !== this.pos); - } - get offset() { - return this.droppedBufferSize + this.pos; - } - getError(code, cpOffset) { - const { line, col, offset } = this; - const startCol = col + cpOffset; - const startOffset = offset + cpOffset; - return { - code, - startLine: line, - endLine: line, - startCol, - endCol: startCol, - startOffset, - endOffset: startOffset, - }; - } - _err(code) { - if (this.handler.onParseError && this.lastErrOffset !== this.offset) { - this.lastErrOffset = this.offset; - this.handler.onParseError(this.getError(code, 0)); - } - } - _addGap() { - this.gapStack.push(this.lastGapPos); - this.lastGapPos = this.pos; - } - _processSurrogate(cp) { - //NOTE: try to peek a surrogate pair - if (this.pos !== this.html.length - 1) { - const nextCp = this.html.charCodeAt(this.pos + 1); - if ((0, unicode_js_1.isSurrogatePair)(nextCp)) { - //NOTE: we have a surrogate pair. Peek pair character and recalculate code point. - this.pos++; - //NOTE: add a gap that should be avoided during retreat - this._addGap(); - return (0, unicode_js_1.getSurrogatePairCodePoint)(cp, nextCp); - } - } - //NOTE: we are at the end of a chunk, therefore we can't infer the surrogate pair yet. - else if (!this.lastChunkWritten) { - this.endOfChunkHit = true; - return unicode_js_1.CODE_POINTS.EOF; - } - //NOTE: isolated surrogate - this._err(error_codes_js_1.ERR.surrogateInInputStream); - return cp; - } - willDropParsedChunk() { - return this.pos > this.bufferWaterline; - } - dropParsedChunk() { - if (this.willDropParsedChunk()) { - this.html = this.html.substring(this.pos); - this.lineStartPos -= this.pos; - this.droppedBufferSize += this.pos; - this.pos = 0; - this.lastGapPos = -2; - this.gapStack.length = 0; - } - } - write(chunk, isLastChunk) { - if (this.html.length > 0) { - this.html += chunk; - } - else { - this.html = chunk; - } - this.endOfChunkHit = false; - this.lastChunkWritten = isLastChunk; - } - insertHtmlAtCurrentPos(chunk) { - this.html = this.html.substring(0, this.pos + 1) + chunk + this.html.substring(this.pos + 1); - this.endOfChunkHit = false; - } - startsWith(pattern, caseSensitive) { - // Check if our buffer has enough characters - if (this.pos + pattern.length > this.html.length) { - this.endOfChunkHit = !this.lastChunkWritten; - return false; - } - if (caseSensitive) { - return this.html.startsWith(pattern, this.pos); - } - for (let i = 0; i < pattern.length; i++) { - const cp = this.html.charCodeAt(this.pos + i) | 0x20; - if (cp !== pattern.charCodeAt(i)) { - return false; - } - } - return true; - } - peek(offset) { - const pos = this.pos + offset; - if (pos >= this.html.length) { - this.endOfChunkHit = !this.lastChunkWritten; - return unicode_js_1.CODE_POINTS.EOF; - } - const code = this.html.charCodeAt(pos); - return code === unicode_js_1.CODE_POINTS.CARRIAGE_RETURN ? unicode_js_1.CODE_POINTS.LINE_FEED : code; - } - advance() { - this.pos++; - //NOTE: LF should be in the last column of the line - if (this.isEol) { - this.isEol = false; - this.line++; - this.lineStartPos = this.pos; - } - if (this.pos >= this.html.length) { - this.endOfChunkHit = !this.lastChunkWritten; - return unicode_js_1.CODE_POINTS.EOF; - } - let cp = this.html.charCodeAt(this.pos); - //NOTE: all U+000D CARRIAGE RETURN (CR) characters must be converted to U+000A LINE FEED (LF) characters - if (cp === unicode_js_1.CODE_POINTS.CARRIAGE_RETURN) { - this.isEol = true; - this.skipNextNewLine = true; - return unicode_js_1.CODE_POINTS.LINE_FEED; - } - //NOTE: any U+000A LINE FEED (LF) characters that immediately follow a U+000D CARRIAGE RETURN (CR) character - //must be ignored. - if (cp === unicode_js_1.CODE_POINTS.LINE_FEED) { - this.isEol = true; - if (this.skipNextNewLine) { - // `line` will be bumped again in the recursive call. - this.line--; - this.skipNextNewLine = false; - this._addGap(); - return this.advance(); - } - } - this.skipNextNewLine = false; - if ((0, unicode_js_1.isSurrogate)(cp)) { - cp = this._processSurrogate(cp); - } - //OPTIMIZATION: first check if code point is in the common allowed - //range (ASCII alphanumeric, whitespaces, big chunk of BMP) - //before going into detailed performance cost validation. - const isCommonValidRange = this.handler.onParseError === null || - (cp > 0x1f && cp < 0x7f) || - cp === unicode_js_1.CODE_POINTS.LINE_FEED || - cp === unicode_js_1.CODE_POINTS.CARRIAGE_RETURN || - (cp > 0x9f && cp < 64976); - if (!isCommonValidRange) { - this._checkForProblematicCharacters(cp); - } - return cp; - } - _checkForProblematicCharacters(cp) { - if ((0, unicode_js_1.isControlCodePoint)(cp)) { - this._err(error_codes_js_1.ERR.controlCharacterInInputStream); - } - else if ((0, unicode_js_1.isUndefinedCodePoint)(cp)) { - this._err(error_codes_js_1.ERR.noncharacterInInputStream); - } - } - retreat(count) { - this.pos -= count; - while (this.pos < this.lastGapPos) { - this.lastGapPos = this.gapStack.pop(); - this.pos--; - } - this.isEol = false; - } -} -exports.Preprocessor = Preprocessor; diff --git a/node_modules/parse5/dist/cjs/tree-adapters/default.d.ts b/node_modules/parse5/dist/cjs/tree-adapters/default.d.ts deleted file mode 100644 index 98fb8f6..0000000 --- a/node_modules/parse5/dist/cjs/tree-adapters/default.d.ts +++ /dev/null @@ -1,84 +0,0 @@ -import { DOCUMENT_MODE, type NS } from '../common/html.js'; -import type { Attribute, Location, ElementLocation } from '../common/token.js'; -import type { TreeAdapter, TreeAdapterTypeMap } from './interface.js'; -export interface Document { - /** The name of the node. */ - nodeName: '#document'; - /** - * Document mode. - * - * @see {@link DOCUMENT_MODE} */ - mode: DOCUMENT_MODE; - /** The node's children. */ - childNodes: ChildNode[]; - /** Comment source code location info. Available if location info is enabled. */ - sourceCodeLocation?: Location | null; -} -export interface DocumentFragment { - /** The name of the node. */ - nodeName: '#document-fragment'; - /** The node's children. */ - childNodes: ChildNode[]; - /** Comment source code location info. Available if location info is enabled. */ - sourceCodeLocation?: Location | null; -} -export interface Element { - /** Element tag name. Same as {@link tagName}. */ - nodeName: string; - /** Element tag name. Same as {@link nodeName}. */ - tagName: string; - /** List of element attributes. */ - attrs: Attribute[]; - /** Element namespace. */ - namespaceURI: NS; - /** Element source code location info, with attributes. Available if location info is enabled. */ - sourceCodeLocation?: ElementLocation | null; - /** Parent node. */ - parentNode: ParentNode | null; - /** The node's children. */ - childNodes: ChildNode[]; -} -export interface CommentNode { - /** The name of the node. */ - nodeName: '#comment'; - /** Parent node. */ - parentNode: ParentNode | null; - /** Comment text. */ - data: string; - /** Comment source code location info. Available if location info is enabled. */ - sourceCodeLocation?: Location | null; -} -export interface TextNode { - nodeName: '#text'; - /** Parent node. */ - parentNode: ParentNode | null; - /** Text content. */ - value: string; - /** Comment source code location info. Available if location info is enabled. */ - sourceCodeLocation?: Location | null; -} -export interface Template extends Element { - nodeName: 'template'; - tagName: 'template'; - /** The content of a `template` tag. */ - content: DocumentFragment; -} -export interface DocumentType { - /** The name of the node. */ - nodeName: '#documentType'; - /** Parent node. */ - parentNode: ParentNode | null; - /** Document type name. */ - name: string; - /** Document type public identifier. */ - publicId: string; - /** Document type system identifier. */ - systemId: string; - /** Comment source code location info. Available if location info is enabled. */ - sourceCodeLocation?: Location | null; -} -export type ParentNode = Document | DocumentFragment | Element | Template; -export type ChildNode = Element | Template | CommentNode | TextNode | DocumentType; -export type Node = ParentNode | ChildNode; -export type DefaultTreeAdapterMap = TreeAdapterTypeMap<Node, ParentNode, ChildNode, Document, DocumentFragment, Element, CommentNode, TextNode, Template, DocumentType>; -export declare const defaultTreeAdapter: TreeAdapter<DefaultTreeAdapterMap>; diff --git a/node_modules/parse5/dist/cjs/tree-adapters/default.js b/node_modules/parse5/dist/cjs/tree-adapters/default.js deleted file mode 100644 index dc84814..0000000 --- a/node_modules/parse5/dist/cjs/tree-adapters/default.js +++ /dev/null @@ -1,176 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.defaultTreeAdapter = void 0; -const html_js_1 = require("../common/html.js"); -exports.defaultTreeAdapter = { - //Node construction - createDocument() { - return { - nodeName: '#document', - mode: html_js_1.DOCUMENT_MODE.NO_QUIRKS, - childNodes: [], - }; - }, - createDocumentFragment() { - return { - nodeName: '#document-fragment', - childNodes: [], - }; - }, - createElement(tagName, namespaceURI, attrs) { - return { - nodeName: tagName, - tagName, - attrs, - namespaceURI, - childNodes: [], - parentNode: null, - }; - }, - createCommentNode(data) { - return { - nodeName: '#comment', - data, - parentNode: null, - }; - }, - createTextNode(value) { - return { - nodeName: '#text', - value, - parentNode: null, - }; - }, - //Tree mutation - appendChild(parentNode, newNode) { - parentNode.childNodes.push(newNode); - newNode.parentNode = parentNode; - }, - insertBefore(parentNode, newNode, referenceNode) { - const insertionIdx = parentNode.childNodes.indexOf(referenceNode); - parentNode.childNodes.splice(insertionIdx, 0, newNode); - newNode.parentNode = parentNode; - }, - setTemplateContent(templateElement, contentElement) { - templateElement.content = contentElement; - }, - getTemplateContent(templateElement) { - return templateElement.content; - }, - setDocumentType(document, name, publicId, systemId) { - const doctypeNode = document.childNodes.find((node) => node.nodeName === '#documentType'); - if (doctypeNode) { - doctypeNode.name = name; - doctypeNode.publicId = publicId; - doctypeNode.systemId = systemId; - } - else { - const node = { - nodeName: '#documentType', - name, - publicId, - systemId, - parentNode: null, - }; - exports.defaultTreeAdapter.appendChild(document, node); - } - }, - setDocumentMode(document, mode) { - document.mode = mode; - }, - getDocumentMode(document) { - return document.mode; - }, - detachNode(node) { - if (node.parentNode) { - const idx = node.parentNode.childNodes.indexOf(node); - node.parentNode.childNodes.splice(idx, 1); - node.parentNode = null; - } - }, - insertText(parentNode, text) { - if (parentNode.childNodes.length > 0) { - const prevNode = parentNode.childNodes[parentNode.childNodes.length - 1]; - if (exports.defaultTreeAdapter.isTextNode(prevNode)) { - prevNode.value += text; - return; - } - } - exports.defaultTreeAdapter.appendChild(parentNode, exports.defaultTreeAdapter.createTextNode(text)); - }, - insertTextBefore(parentNode, text, referenceNode) { - const prevNode = parentNode.childNodes[parentNode.childNodes.indexOf(referenceNode) - 1]; - if (prevNode && exports.defaultTreeAdapter.isTextNode(prevNode)) { - prevNode.value += text; - } - else { - exports.defaultTreeAdapter.insertBefore(parentNode, exports.defaultTreeAdapter.createTextNode(text), referenceNode); - } - }, - adoptAttributes(recipient, attrs) { - const recipientAttrsMap = new Set(recipient.attrs.map((attr) => attr.name)); - for (let j = 0; j < attrs.length; j++) { - if (!recipientAttrsMap.has(attrs[j].name)) { - recipient.attrs.push(attrs[j]); - } - } - }, - //Tree traversing - getFirstChild(node) { - return node.childNodes[0]; - }, - getChildNodes(node) { - return node.childNodes; - }, - getParentNode(node) { - return node.parentNode; - }, - getAttrList(element) { - return element.attrs; - }, - //Node data - getTagName(element) { - return element.tagName; - }, - getNamespaceURI(element) { - return element.namespaceURI; - }, - getTextNodeContent(textNode) { - return textNode.value; - }, - getCommentNodeContent(commentNode) { - return commentNode.data; - }, - getDocumentTypeNodeName(doctypeNode) { - return doctypeNode.name; - }, - getDocumentTypeNodePublicId(doctypeNode) { - return doctypeNode.publicId; - }, - getDocumentTypeNodeSystemId(doctypeNode) { - return doctypeNode.systemId; - }, - //Node types - isTextNode(node) { - return node.nodeName === '#text'; - }, - isCommentNode(node) { - return node.nodeName === '#comment'; - }, - isDocumentTypeNode(node) { - return node.nodeName === '#documentType'; - }, - isElementNode(node) { - return Object.prototype.hasOwnProperty.call(node, 'tagName'); - }, - // Source code location - setNodeSourceCodeLocation(node, location) { - node.sourceCodeLocation = location; - }, - getNodeSourceCodeLocation(node) { - return node.sourceCodeLocation; - }, - updateNodeSourceCodeLocation(node, endLocation) { - node.sourceCodeLocation = Object.assign(Object.assign({}, node.sourceCodeLocation), endLocation); - }, -}; diff --git a/node_modules/parse5/dist/cjs/tree-adapters/interface.d.ts b/node_modules/parse5/dist/cjs/tree-adapters/interface.d.ts deleted file mode 100644 index d14091f..0000000 --- a/node_modules/parse5/dist/cjs/tree-adapters/interface.d.ts +++ /dev/null @@ -1,255 +0,0 @@ -import type { DOCUMENT_MODE, NS } from '../common/html.js'; -import type { Attribute, ElementLocation } from '../common/token.js'; -export interface TreeAdapterTypeMap<Node = unknown, ParentNode = unknown, ChildNode = unknown, Document = unknown, DocumentFragment = unknown, Element = unknown, CommentNode = unknown, TextNode = unknown, Template = unknown, DocumentType = unknown> { - node: Node; - parentNode: ParentNode; - childNode: ChildNode; - document: Document; - documentFragment: DocumentFragment; - element: Element; - commentNode: CommentNode; - textNode: TextNode; - template: Template; - documentType: DocumentType; -} -/** - * Tree adapter is a set of utility functions that provides minimal required abstraction layer beetween parser and a specific AST format. - * Note that `TreeAdapter` is not designed to be a general purpose AST manipulation library. You can build such library - * on top of existing `TreeAdapter` or use one of the existing libraries from npm. - * - * @see Have a look at the default tree adapter for reference. - */ -export interface TreeAdapter<T extends TreeAdapterTypeMap = TreeAdapterTypeMap> { - /** - * Copies attributes to the given element. Only attributes that are not yet present in the element are copied. - * - * @param recipient - Element to copy attributes into. - * @param attrs - Attributes to copy. - */ - adoptAttributes(recipient: T['element'], attrs: Attribute[]): void; - /** - * Appends a child node to the given parent node. - * - * @param parentNode - Parent node. - * @param newNode - Child node. - */ - appendChild(parentNode: T['parentNode'], newNode: T['childNode']): void; - /** - * Creates a comment node. - * - * @param data - Comment text. - */ - createCommentNode(data: string): T['commentNode']; - /** - * Creates a text node. - * - * @param value - Text. - */ - createTextNode(value: string): T['textNode']; - /** - * Creates a document node. - */ - createDocument(): T['document']; - /** - * Creates a document fragment node. - */ - createDocumentFragment(): T['documentFragment']; - /** - * Creates an element node. - * - * @param tagName - Tag name of the element. - * @param namespaceURI - Namespace of the element. - * @param attrs - Attribute name-value pair array. Foreign attributes may contain `namespace` and `prefix` fields as well. - */ - createElement(tagName: string, namespaceURI: NS, attrs: Attribute[]): T['element']; - /** - * Removes a node from its parent. - * - * @param node - Node to remove. - */ - detachNode(node: T['childNode']): void; - /** - * Returns the given element's attributes in an array, in the form of name-value pairs. - * Foreign attributes may contain `namespace` and `prefix` fields as well. - * - * @param element - Element. - */ - getAttrList(element: T['element']): Attribute[]; - /** - * Returns the given node's children in an array. - * - * @param node - Node. - */ - getChildNodes(node: T['parentNode']): T['childNode'][]; - /** - * Returns the given comment node's content. - * - * @param commentNode - Comment node. - */ - getCommentNodeContent(commentNode: T['commentNode']): string; - /** - * Returns [document mode](https://dom.spec.whatwg.org/#concept-document-limited-quirks). - * - * @param document - Document node. - */ - getDocumentMode(document: T['document']): DOCUMENT_MODE; - /** - * Returns the given document type node's name. - * - * @param doctypeNode - Document type node. - */ - getDocumentTypeNodeName(doctypeNode: T['documentType']): string; - /** - * Returns the given document type node's public identifier. - * - * @param doctypeNode - Document type node. - */ - getDocumentTypeNodePublicId(doctypeNode: T['documentType']): string; - /** - * Returns the given document type node's system identifier. - * - * @param doctypeNode - Document type node. - */ - getDocumentTypeNodeSystemId(doctypeNode: T['documentType']): string; - /** - * Returns the first child of the given node. - * - * @param node - Node. - */ - getFirstChild(node: T['parentNode']): T['childNode'] | null; - /** - * Returns the given element's namespace. - * - * @param element - Element. - */ - getNamespaceURI(element: T['element']): NS; - /** - * Returns the given node's source code location information. - * - * @param node - Node. - */ - getNodeSourceCodeLocation(node: T['node']): ElementLocation | undefined | null; - /** - * Returns the given node's parent. - * - * @param node - Node. - */ - getParentNode(node: T['node']): T['parentNode'] | null; - /** - * Returns the given element's tag name. - * - * @param element - Element. - */ - getTagName(element: T['element']): string; - /** - * Returns the given text node's content. - * - * @param textNode - Text node. - */ - getTextNodeContent(textNode: T['textNode']): string; - /** - * Returns the `<template>` element content element. - * - * @param templateElement - `<template>` element. - */ - getTemplateContent(templateElement: T['template']): T['documentFragment']; - /** - * Inserts a child node to the given parent node before the given reference node. - * - * @param parentNode - Parent node. - * @param newNode - Child node. - * @param referenceNode - Reference node. - */ - insertBefore(parentNode: T['parentNode'], newNode: T['childNode'], referenceNode: T['childNode']): void; - /** - * Inserts text into a node. If the last child of the node is a text node, the provided text will be appended to the - * text node content. Otherwise, inserts a new text node with the given text. - * - * @param parentNode - Node to insert text into. - * @param text - Text to insert. - */ - insertText(parentNode: T['parentNode'], text: string): void; - /** - * Inserts text into a sibling node that goes before the reference node. If this sibling node is the text node, - * the provided text will be appended to the text node content. Otherwise, inserts a new sibling text node with - * the given text before the reference node. - * - * @param parentNode - Node to insert text into. - * @param text - Text to insert. - * @param referenceNode - Node to insert text before. - */ - insertTextBefore(parentNode: T['parentNode'], text: string, referenceNode: T['childNode']): void; - /** - * Determines if the given node is a comment node. - * - * @param node - Node. - */ - isCommentNode(node: T['node']): node is T['commentNode']; - /** - * Determines if the given node is a document type node. - * - * @param node - Node. - */ - isDocumentTypeNode(node: T['node']): node is T['documentType']; - /** - * Determines if the given node is an element. - * - * @param node - Node. - */ - isElementNode(node: T['node']): node is T['element']; - /** - * Determines if the given node is a text node. - * - * @param node - Node. - */ - isTextNode(node: T['node']): node is T['textNode']; - /** - * Sets the [document mode](https://dom.spec.whatwg.org/#concept-document-limited-quirks). - * - * @param document - Document node. - * @param mode - Document mode. - */ - setDocumentMode(document: T['document'], mode: DOCUMENT_MODE): void; - /** - * Sets the document type. If the `document` already contains a document type node, the `name`, `publicId` and `systemId` - * properties of this node will be updated with the provided values. Otherwise, creates a new document type node - * with the given properties and inserts it into the `document`. - * - * @param document - Document node. - * @param name - Document type name. - * @param publicId - Document type public identifier. - * @param systemId - Document type system identifier. - */ - setDocumentType(document: T['document'], name: string, publicId: string, systemId: string): void; - /** - * Attaches source code location information to the node. - * - * @param node - Node. - */ - setNodeSourceCodeLocation(node: T['node'], location: ElementLocation | null): void; - /** - * Updates the source code location information of the node. - * - * @param node - Node. - */ - updateNodeSourceCodeLocation(node: T['node'], location: Partial<ElementLocation>): void; - /** - * Sets the `<template>` element content element. - * - * @param templateElement - `<template>` element. - * @param contentElement - Content element. - */ - setTemplateContent(templateElement: T['template'], contentElement: T['documentFragment']): void; - /** - * Optional callback for elements being pushed to the stack of open elements. - * - * @param element The element being pushed to the stack of open elements. - */ - onItemPush?: (item: T['element']) => void; - /** - * Optional callback for elements being popped from the stack of open elements. - * - * @param item The element being popped. - */ - onItemPop?: (item: T['element'], newTop: T['parentNode']) => void; -} diff --git a/node_modules/parse5/dist/cjs/tree-adapters/interface.js b/node_modules/parse5/dist/cjs/tree-adapters/interface.js deleted file mode 100644 index c8ad2e5..0000000 --- a/node_modules/parse5/dist/cjs/tree-adapters/interface.js +++ /dev/null @@ -1,2 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/node_modules/parse5/dist/common/doctype.d.ts b/node_modules/parse5/dist/common/doctype.d.ts deleted file mode 100644 index 993afaa..0000000 --- a/node_modules/parse5/dist/common/doctype.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -import { DOCUMENT_MODE } from './html.js'; -import type { DoctypeToken } from './token.js'; -export declare function isConforming(token: DoctypeToken): boolean; -export declare function getDocumentMode(token: DoctypeToken): DOCUMENT_MODE; diff --git a/node_modules/parse5/dist/common/doctype.js b/node_modules/parse5/dist/common/doctype.js deleted file mode 100644 index bfd0e7a..0000000 --- a/node_modules/parse5/dist/common/doctype.js +++ /dev/null @@ -1,114 +0,0 @@ -import { DOCUMENT_MODE } from './html.js'; -//Const -const VALID_DOCTYPE_NAME = 'html'; -const VALID_SYSTEM_ID = 'about:legacy-compat'; -const QUIRKS_MODE_SYSTEM_ID = 'http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd'; -const QUIRKS_MODE_PUBLIC_ID_PREFIXES = [ - '+//silmaril//dtd html pro v0r11 19970101//', - '-//as//dtd html 3.0 aswedit + extensions//', - '-//advasoft ltd//dtd html 3.0 aswedit + extensions//', - '-//ietf//dtd html 2.0 level 1//', - '-//ietf//dtd html 2.0 level 2//', - '-//ietf//dtd html 2.0 strict level 1//', - '-//ietf//dtd html 2.0 strict level 2//', - '-//ietf//dtd html 2.0 strict//', - '-//ietf//dtd html 2.0//', - '-//ietf//dtd html 2.1e//', - '-//ietf//dtd html 3.0//', - '-//ietf//dtd html 3.2 final//', - '-//ietf//dtd html 3.2//', - '-//ietf//dtd html 3//', - '-//ietf//dtd html level 0//', - '-//ietf//dtd html level 1//', - '-//ietf//dtd html level 2//', - '-//ietf//dtd html level 3//', - '-//ietf//dtd html strict level 0//', - '-//ietf//dtd html strict level 1//', - '-//ietf//dtd html strict level 2//', - '-//ietf//dtd html strict level 3//', - '-//ietf//dtd html strict//', - '-//ietf//dtd html//', - '-//metrius//dtd metrius presentational//', - '-//microsoft//dtd internet explorer 2.0 html strict//', - '-//microsoft//dtd internet explorer 2.0 html//', - '-//microsoft//dtd internet explorer 2.0 tables//', - '-//microsoft//dtd internet explorer 3.0 html strict//', - '-//microsoft//dtd internet explorer 3.0 html//', - '-//microsoft//dtd internet explorer 3.0 tables//', - '-//netscape comm. corp.//dtd html//', - '-//netscape comm. corp.//dtd strict html//', - "-//o'reilly and associates//dtd html 2.0//", - "-//o'reilly and associates//dtd html extended 1.0//", - "-//o'reilly and associates//dtd html extended relaxed 1.0//", - '-//sq//dtd html 2.0 hotmetal + extensions//', - '-//softquad software//dtd hotmetal pro 6.0::19990601::extensions to html 4.0//', - '-//softquad//dtd hotmetal pro 4.0::19971010::extensions to html 4.0//', - '-//spyglass//dtd html 2.0 extended//', - '-//sun microsystems corp.//dtd hotjava html//', - '-//sun microsystems corp.//dtd hotjava strict html//', - '-//w3c//dtd html 3 1995-03-24//', - '-//w3c//dtd html 3.2 draft//', - '-//w3c//dtd html 3.2 final//', - '-//w3c//dtd html 3.2//', - '-//w3c//dtd html 3.2s draft//', - '-//w3c//dtd html 4.0 frameset//', - '-//w3c//dtd html 4.0 transitional//', - '-//w3c//dtd html experimental 19960712//', - '-//w3c//dtd html experimental 970421//', - '-//w3c//dtd w3 html//', - '-//w3o//dtd w3 html 3.0//', - '-//webtechs//dtd mozilla html 2.0//', - '-//webtechs//dtd mozilla html//', -]; -const QUIRKS_MODE_NO_SYSTEM_ID_PUBLIC_ID_PREFIXES = [ - ...QUIRKS_MODE_PUBLIC_ID_PREFIXES, - '-//w3c//dtd html 4.01 frameset//', - '-//w3c//dtd html 4.01 transitional//', -]; -const QUIRKS_MODE_PUBLIC_IDS = new Set([ - '-//w3o//dtd w3 html strict 3.0//en//', - '-/w3c/dtd html 4.0 transitional/en', - 'html', -]); -const LIMITED_QUIRKS_PUBLIC_ID_PREFIXES = ['-//w3c//dtd xhtml 1.0 frameset//', '-//w3c//dtd xhtml 1.0 transitional//']; -const LIMITED_QUIRKS_WITH_SYSTEM_ID_PUBLIC_ID_PREFIXES = [ - ...LIMITED_QUIRKS_PUBLIC_ID_PREFIXES, - '-//w3c//dtd html 4.01 frameset//', - '-//w3c//dtd html 4.01 transitional//', -]; -//Utils -function hasPrefix(publicId, prefixes) { - return prefixes.some((prefix) => publicId.startsWith(prefix)); -} -//API -export function isConforming(token) { - return (token.name === VALID_DOCTYPE_NAME && - token.publicId === null && - (token.systemId === null || token.systemId === VALID_SYSTEM_ID)); -} -export function getDocumentMode(token) { - if (token.name !== VALID_DOCTYPE_NAME) { - return DOCUMENT_MODE.QUIRKS; - } - const { systemId } = token; - if (systemId && systemId.toLowerCase() === QUIRKS_MODE_SYSTEM_ID) { - return DOCUMENT_MODE.QUIRKS; - } - let { publicId } = token; - if (publicId !== null) { - publicId = publicId.toLowerCase(); - if (QUIRKS_MODE_PUBLIC_IDS.has(publicId)) { - return DOCUMENT_MODE.QUIRKS; - } - let prefixes = systemId === null ? QUIRKS_MODE_NO_SYSTEM_ID_PUBLIC_ID_PREFIXES : QUIRKS_MODE_PUBLIC_ID_PREFIXES; - if (hasPrefix(publicId, prefixes)) { - return DOCUMENT_MODE.QUIRKS; - } - prefixes = - systemId === null ? LIMITED_QUIRKS_PUBLIC_ID_PREFIXES : LIMITED_QUIRKS_WITH_SYSTEM_ID_PUBLIC_ID_PREFIXES; - if (hasPrefix(publicId, prefixes)) { - return DOCUMENT_MODE.LIMITED_QUIRKS; - } - } - return DOCUMENT_MODE.NO_QUIRKS; -} diff --git a/node_modules/parse5/dist/common/error-codes.d.ts b/node_modules/parse5/dist/common/error-codes.d.ts deleted file mode 100644 index ac15bb3..0000000 --- a/node_modules/parse5/dist/common/error-codes.d.ts +++ /dev/null @@ -1,67 +0,0 @@ -import type { Location } from './token.js'; -export interface ParserError extends Location { - code: ERR; -} -export type ParserErrorHandler = (error: ParserError) => void; -export declare enum ERR { - controlCharacterInInputStream = "control-character-in-input-stream", - noncharacterInInputStream = "noncharacter-in-input-stream", - surrogateInInputStream = "surrogate-in-input-stream", - nonVoidHtmlElementStartTagWithTrailingSolidus = "non-void-html-element-start-tag-with-trailing-solidus", - endTagWithAttributes = "end-tag-with-attributes", - endTagWithTrailingSolidus = "end-tag-with-trailing-solidus", - unexpectedSolidusInTag = "unexpected-solidus-in-tag", - unexpectedNullCharacter = "unexpected-null-character", - unexpectedQuestionMarkInsteadOfTagName = "unexpected-question-mark-instead-of-tag-name", - invalidFirstCharacterOfTagName = "invalid-first-character-of-tag-name", - unexpectedEqualsSignBeforeAttributeName = "unexpected-equals-sign-before-attribute-name", - missingEndTagName = "missing-end-tag-name", - unexpectedCharacterInAttributeName = "unexpected-character-in-attribute-name", - unknownNamedCharacterReference = "unknown-named-character-reference", - missingSemicolonAfterCharacterReference = "missing-semicolon-after-character-reference", - unexpectedCharacterAfterDoctypeSystemIdentifier = "unexpected-character-after-doctype-system-identifier", - unexpectedCharacterInUnquotedAttributeValue = "unexpected-character-in-unquoted-attribute-value", - eofBeforeTagName = "eof-before-tag-name", - eofInTag = "eof-in-tag", - missingAttributeValue = "missing-attribute-value", - missingWhitespaceBetweenAttributes = "missing-whitespace-between-attributes", - missingWhitespaceAfterDoctypePublicKeyword = "missing-whitespace-after-doctype-public-keyword", - missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers = "missing-whitespace-between-doctype-public-and-system-identifiers", - missingWhitespaceAfterDoctypeSystemKeyword = "missing-whitespace-after-doctype-system-keyword", - missingQuoteBeforeDoctypePublicIdentifier = "missing-quote-before-doctype-public-identifier", - missingQuoteBeforeDoctypeSystemIdentifier = "missing-quote-before-doctype-system-identifier", - missingDoctypePublicIdentifier = "missing-doctype-public-identifier", - missingDoctypeSystemIdentifier = "missing-doctype-system-identifier", - abruptDoctypePublicIdentifier = "abrupt-doctype-public-identifier", - abruptDoctypeSystemIdentifier = "abrupt-doctype-system-identifier", - cdataInHtmlContent = "cdata-in-html-content", - incorrectlyOpenedComment = "incorrectly-opened-comment", - eofInScriptHtmlCommentLikeText = "eof-in-script-html-comment-like-text", - eofInDoctype = "eof-in-doctype", - nestedComment = "nested-comment", - abruptClosingOfEmptyComment = "abrupt-closing-of-empty-comment", - eofInComment = "eof-in-comment", - incorrectlyClosedComment = "incorrectly-closed-comment", - eofInCdata = "eof-in-cdata", - absenceOfDigitsInNumericCharacterReference = "absence-of-digits-in-numeric-character-reference", - nullCharacterReference = "null-character-reference", - surrogateCharacterReference = "surrogate-character-reference", - characterReferenceOutsideUnicodeRange = "character-reference-outside-unicode-range", - controlCharacterReference = "control-character-reference", - noncharacterCharacterReference = "noncharacter-character-reference", - missingWhitespaceBeforeDoctypeName = "missing-whitespace-before-doctype-name", - missingDoctypeName = "missing-doctype-name", - invalidCharacterSequenceAfterDoctypeName = "invalid-character-sequence-after-doctype-name", - duplicateAttribute = "duplicate-attribute", - nonConformingDoctype = "non-conforming-doctype", - missingDoctype = "missing-doctype", - misplacedDoctype = "misplaced-doctype", - endTagWithoutMatchingOpenElement = "end-tag-without-matching-open-element", - closingOfElementWithOpenChildElements = "closing-of-element-with-open-child-elements", - disallowedContentInNoscriptInHead = "disallowed-content-in-noscript-in-head", - openElementsLeftAfterEof = "open-elements-left-after-eof", - abandonedHeadElementChild = "abandoned-head-element-child", - misplacedStartTagForHeadElement = "misplaced-start-tag-for-head-element", - nestedNoscriptInHead = "nested-noscript-in-head", - eofInElementThatCanContainOnlyText = "eof-in-element-that-can-contain-only-text" -} diff --git a/node_modules/parse5/dist/common/error-codes.js b/node_modules/parse5/dist/common/error-codes.js deleted file mode 100644 index bd64c4d..0000000 --- a/node_modules/parse5/dist/common/error-codes.js +++ /dev/null @@ -1,63 +0,0 @@ -export var ERR; -(function (ERR) { - ERR["controlCharacterInInputStream"] = "control-character-in-input-stream"; - ERR["noncharacterInInputStream"] = "noncharacter-in-input-stream"; - ERR["surrogateInInputStream"] = "surrogate-in-input-stream"; - ERR["nonVoidHtmlElementStartTagWithTrailingSolidus"] = "non-void-html-element-start-tag-with-trailing-solidus"; - ERR["endTagWithAttributes"] = "end-tag-with-attributes"; - ERR["endTagWithTrailingSolidus"] = "end-tag-with-trailing-solidus"; - ERR["unexpectedSolidusInTag"] = "unexpected-solidus-in-tag"; - ERR["unexpectedNullCharacter"] = "unexpected-null-character"; - ERR["unexpectedQuestionMarkInsteadOfTagName"] = "unexpected-question-mark-instead-of-tag-name"; - ERR["invalidFirstCharacterOfTagName"] = "invalid-first-character-of-tag-name"; - ERR["unexpectedEqualsSignBeforeAttributeName"] = "unexpected-equals-sign-before-attribute-name"; - ERR["missingEndTagName"] = "missing-end-tag-name"; - ERR["unexpectedCharacterInAttributeName"] = "unexpected-character-in-attribute-name"; - ERR["unknownNamedCharacterReference"] = "unknown-named-character-reference"; - ERR["missingSemicolonAfterCharacterReference"] = "missing-semicolon-after-character-reference"; - ERR["unexpectedCharacterAfterDoctypeSystemIdentifier"] = "unexpected-character-after-doctype-system-identifier"; - ERR["unexpectedCharacterInUnquotedAttributeValue"] = "unexpected-character-in-unquoted-attribute-value"; - ERR["eofBeforeTagName"] = "eof-before-tag-name"; - ERR["eofInTag"] = "eof-in-tag"; - ERR["missingAttributeValue"] = "missing-attribute-value"; - ERR["missingWhitespaceBetweenAttributes"] = "missing-whitespace-between-attributes"; - ERR["missingWhitespaceAfterDoctypePublicKeyword"] = "missing-whitespace-after-doctype-public-keyword"; - ERR["missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers"] = "missing-whitespace-between-doctype-public-and-system-identifiers"; - ERR["missingWhitespaceAfterDoctypeSystemKeyword"] = "missing-whitespace-after-doctype-system-keyword"; - ERR["missingQuoteBeforeDoctypePublicIdentifier"] = "missing-quote-before-doctype-public-identifier"; - ERR["missingQuoteBeforeDoctypeSystemIdentifier"] = "missing-quote-before-doctype-system-identifier"; - ERR["missingDoctypePublicIdentifier"] = "missing-doctype-public-identifier"; - ERR["missingDoctypeSystemIdentifier"] = "missing-doctype-system-identifier"; - ERR["abruptDoctypePublicIdentifier"] = "abrupt-doctype-public-identifier"; - ERR["abruptDoctypeSystemIdentifier"] = "abrupt-doctype-system-identifier"; - ERR["cdataInHtmlContent"] = "cdata-in-html-content"; - ERR["incorrectlyOpenedComment"] = "incorrectly-opened-comment"; - ERR["eofInScriptHtmlCommentLikeText"] = "eof-in-script-html-comment-like-text"; - ERR["eofInDoctype"] = "eof-in-doctype"; - ERR["nestedComment"] = "nested-comment"; - ERR["abruptClosingOfEmptyComment"] = "abrupt-closing-of-empty-comment"; - ERR["eofInComment"] = "eof-in-comment"; - ERR["incorrectlyClosedComment"] = "incorrectly-closed-comment"; - ERR["eofInCdata"] = "eof-in-cdata"; - ERR["absenceOfDigitsInNumericCharacterReference"] = "absence-of-digits-in-numeric-character-reference"; - ERR["nullCharacterReference"] = "null-character-reference"; - ERR["surrogateCharacterReference"] = "surrogate-character-reference"; - ERR["characterReferenceOutsideUnicodeRange"] = "character-reference-outside-unicode-range"; - ERR["controlCharacterReference"] = "control-character-reference"; - ERR["noncharacterCharacterReference"] = "noncharacter-character-reference"; - ERR["missingWhitespaceBeforeDoctypeName"] = "missing-whitespace-before-doctype-name"; - ERR["missingDoctypeName"] = "missing-doctype-name"; - ERR["invalidCharacterSequenceAfterDoctypeName"] = "invalid-character-sequence-after-doctype-name"; - ERR["duplicateAttribute"] = "duplicate-attribute"; - ERR["nonConformingDoctype"] = "non-conforming-doctype"; - ERR["missingDoctype"] = "missing-doctype"; - ERR["misplacedDoctype"] = "misplaced-doctype"; - ERR["endTagWithoutMatchingOpenElement"] = "end-tag-without-matching-open-element"; - ERR["closingOfElementWithOpenChildElements"] = "closing-of-element-with-open-child-elements"; - ERR["disallowedContentInNoscriptInHead"] = "disallowed-content-in-noscript-in-head"; - ERR["openElementsLeftAfterEof"] = "open-elements-left-after-eof"; - ERR["abandonedHeadElementChild"] = "abandoned-head-element-child"; - ERR["misplacedStartTagForHeadElement"] = "misplaced-start-tag-for-head-element"; - ERR["nestedNoscriptInHead"] = "nested-noscript-in-head"; - ERR["eofInElementThatCanContainOnlyText"] = "eof-in-element-that-can-contain-only-text"; -})(ERR || (ERR = {})); diff --git a/node_modules/parse5/dist/common/foreign-content.d.ts b/node_modules/parse5/dist/common/foreign-content.d.ts deleted file mode 100644 index d08d02b..0000000 --- a/node_modules/parse5/dist/common/foreign-content.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { TAG_ID as $, NS } from './html.js'; -import type { TagToken, Attribute } from './token.js'; -export declare const SVG_TAG_NAMES_ADJUSTMENT_MAP: Map<string, string>; -export declare function causesExit(startTagToken: TagToken): boolean; -export declare function adjustTokenMathMLAttrs(token: TagToken): void; -export declare function adjustTokenSVGAttrs(token: TagToken): void; -export declare function adjustTokenXMLAttrs(token: TagToken): void; -export declare function adjustTokenSVGTagName(token: TagToken): void; -export declare function isIntegrationPoint(tn: $, ns: NS, attrs: Attribute[], foreignNS?: NS): boolean; diff --git a/node_modules/parse5/dist/common/foreign-content.js b/node_modules/parse5/dist/common/foreign-content.js deleted file mode 100644 index 6881aca..0000000 --- a/node_modules/parse5/dist/common/foreign-content.js +++ /dev/null @@ -1,228 +0,0 @@ -import { TAG_ID as $, NS, ATTRS, getTagID } from './html.js'; -//MIME types -const MIME_TYPES = { - TEXT_HTML: 'text/html', - APPLICATION_XML: 'application/xhtml+xml', -}; -//Attributes -const DEFINITION_URL_ATTR = 'definitionurl'; -const ADJUSTED_DEFINITION_URL_ATTR = 'definitionURL'; -const SVG_ATTRS_ADJUSTMENT_MAP = new Map([ - 'attributeName', - 'attributeType', - 'baseFrequency', - 'baseProfile', - 'calcMode', - 'clipPathUnits', - 'diffuseConstant', - 'edgeMode', - 'filterUnits', - 'glyphRef', - 'gradientTransform', - 'gradientUnits', - 'kernelMatrix', - 'kernelUnitLength', - 'keyPoints', - 'keySplines', - 'keyTimes', - 'lengthAdjust', - 'limitingConeAngle', - 'markerHeight', - 'markerUnits', - 'markerWidth', - 'maskContentUnits', - 'maskUnits', - 'numOctaves', - 'pathLength', - 'patternContentUnits', - 'patternTransform', - 'patternUnits', - 'pointsAtX', - 'pointsAtY', - 'pointsAtZ', - 'preserveAlpha', - 'preserveAspectRatio', - 'primitiveUnits', - 'refX', - 'refY', - 'repeatCount', - 'repeatDur', - 'requiredExtensions', - 'requiredFeatures', - 'specularConstant', - 'specularExponent', - 'spreadMethod', - 'startOffset', - 'stdDeviation', - 'stitchTiles', - 'surfaceScale', - 'systemLanguage', - 'tableValues', - 'targetX', - 'targetY', - 'textLength', - 'viewBox', - 'viewTarget', - 'xChannelSelector', - 'yChannelSelector', - 'zoomAndPan', -].map((attr) => [attr.toLowerCase(), attr])); -const XML_ATTRS_ADJUSTMENT_MAP = new Map([ - ['xlink:actuate', { prefix: 'xlink', name: 'actuate', namespace: NS.XLINK }], - ['xlink:arcrole', { prefix: 'xlink', name: 'arcrole', namespace: NS.XLINK }], - ['xlink:href', { prefix: 'xlink', name: 'href', namespace: NS.XLINK }], - ['xlink:role', { prefix: 'xlink', name: 'role', namespace: NS.XLINK }], - ['xlink:show', { prefix: 'xlink', name: 'show', namespace: NS.XLINK }], - ['xlink:title', { prefix: 'xlink', name: 'title', namespace: NS.XLINK }], - ['xlink:type', { prefix: 'xlink', name: 'type', namespace: NS.XLINK }], - ['xml:lang', { prefix: 'xml', name: 'lang', namespace: NS.XML }], - ['xml:space', { prefix: 'xml', name: 'space', namespace: NS.XML }], - ['xmlns', { prefix: '', name: 'xmlns', namespace: NS.XMLNS }], - ['xmlns:xlink', { prefix: 'xmlns', name: 'xlink', namespace: NS.XMLNS }], -]); -//SVG tag names adjustment map -export const SVG_TAG_NAMES_ADJUSTMENT_MAP = new Map([ - 'altGlyph', - 'altGlyphDef', - 'altGlyphItem', - 'animateColor', - 'animateMotion', - 'animateTransform', - 'clipPath', - 'feBlend', - 'feColorMatrix', - 'feComponentTransfer', - 'feComposite', - 'feConvolveMatrix', - 'feDiffuseLighting', - 'feDisplacementMap', - 'feDistantLight', - 'feFlood', - 'feFuncA', - 'feFuncB', - 'feFuncG', - 'feFuncR', - 'feGaussianBlur', - 'feImage', - 'feMerge', - 'feMergeNode', - 'feMorphology', - 'feOffset', - 'fePointLight', - 'feSpecularLighting', - 'feSpotLight', - 'feTile', - 'feTurbulence', - 'foreignObject', - 'glyphRef', - 'linearGradient', - 'radialGradient', - 'textPath', -].map((tn) => [tn.toLowerCase(), tn])); -//Tags that causes exit from foreign content -const EXITS_FOREIGN_CONTENT = new Set([ - $.B, - $.BIG, - $.BLOCKQUOTE, - $.BODY, - $.BR, - $.CENTER, - $.CODE, - $.DD, - $.DIV, - $.DL, - $.DT, - $.EM, - $.EMBED, - $.H1, - $.H2, - $.H3, - $.H4, - $.H5, - $.H6, - $.HEAD, - $.HR, - $.I, - $.IMG, - $.LI, - $.LISTING, - $.MENU, - $.META, - $.NOBR, - $.OL, - $.P, - $.PRE, - $.RUBY, - $.S, - $.SMALL, - $.SPAN, - $.STRONG, - $.STRIKE, - $.SUB, - $.SUP, - $.TABLE, - $.TT, - $.U, - $.UL, - $.VAR, -]); -//Check exit from foreign content -export function causesExit(startTagToken) { - const tn = startTagToken.tagID; - const isFontWithAttrs = tn === $.FONT && - startTagToken.attrs.some(({ name }) => name === ATTRS.COLOR || name === ATTRS.SIZE || name === ATTRS.FACE); - return isFontWithAttrs || EXITS_FOREIGN_CONTENT.has(tn); -} -//Token adjustments -export function adjustTokenMathMLAttrs(token) { - for (let i = 0; i < token.attrs.length; i++) { - if (token.attrs[i].name === DEFINITION_URL_ATTR) { - token.attrs[i].name = ADJUSTED_DEFINITION_URL_ATTR; - break; - } - } -} -export function adjustTokenSVGAttrs(token) { - for (let i = 0; i < token.attrs.length; i++) { - const adjustedAttrName = SVG_ATTRS_ADJUSTMENT_MAP.get(token.attrs[i].name); - if (adjustedAttrName != null) { - token.attrs[i].name = adjustedAttrName; - } - } -} -export function adjustTokenXMLAttrs(token) { - for (let i = 0; i < token.attrs.length; i++) { - const adjustedAttrEntry = XML_ATTRS_ADJUSTMENT_MAP.get(token.attrs[i].name); - if (adjustedAttrEntry) { - token.attrs[i].prefix = adjustedAttrEntry.prefix; - token.attrs[i].name = adjustedAttrEntry.name; - token.attrs[i].namespace = adjustedAttrEntry.namespace; - } - } -} -export function adjustTokenSVGTagName(token) { - const adjustedTagName = SVG_TAG_NAMES_ADJUSTMENT_MAP.get(token.tagName); - if (adjustedTagName != null) { - token.tagName = adjustedTagName; - token.tagID = getTagID(token.tagName); - } -} -//Integration points -function isMathMLTextIntegrationPoint(tn, ns) { - return ns === NS.MATHML && (tn === $.MI || tn === $.MO || tn === $.MN || tn === $.MS || tn === $.MTEXT); -} -function isHtmlIntegrationPoint(tn, ns, attrs) { - if (ns === NS.MATHML && tn === $.ANNOTATION_XML) { - for (let i = 0; i < attrs.length; i++) { - if (attrs[i].name === ATTRS.ENCODING) { - const value = attrs[i].value.toLowerCase(); - return value === MIME_TYPES.TEXT_HTML || value === MIME_TYPES.APPLICATION_XML; - } - } - } - return ns === NS.SVG && (tn === $.FOREIGN_OBJECT || tn === $.DESC || tn === $.TITLE); -} -export function isIntegrationPoint(tn, ns, attrs, foreignNS) { - return (((!foreignNS || foreignNS === NS.HTML) && isHtmlIntegrationPoint(tn, ns, attrs)) || - ((!foreignNS || foreignNS === NS.MATHML) && isMathMLTextIntegrationPoint(tn, ns))); -} diff --git a/node_modules/parse5/dist/common/html.d.ts b/node_modules/parse5/dist/common/html.d.ts deleted file mode 100644 index 2fbc821..0000000 --- a/node_modules/parse5/dist/common/html.d.ts +++ /dev/null @@ -1,289 +0,0 @@ -/** All valid namespaces in HTML. */ -export declare enum NS { - HTML = "http://www.w3.org/1999/xhtml", - MATHML = "http://www.w3.org/1998/Math/MathML", - SVG = "http://www.w3.org/2000/svg", - XLINK = "http://www.w3.org/1999/xlink", - XML = "http://www.w3.org/XML/1998/namespace", - XMLNS = "http://www.w3.org/2000/xmlns/" -} -export declare enum ATTRS { - TYPE = "type", - ACTION = "action", - ENCODING = "encoding", - PROMPT = "prompt", - NAME = "name", - COLOR = "color", - FACE = "face", - SIZE = "size" -} -/** - * The mode of the document. - * - * @see {@link https://dom.spec.whatwg.org/#concept-document-limited-quirks} - */ -export declare enum DOCUMENT_MODE { - NO_QUIRKS = "no-quirks", - QUIRKS = "quirks", - LIMITED_QUIRKS = "limited-quirks" -} -export declare enum TAG_NAMES { - A = "a", - ADDRESS = "address", - ANNOTATION_XML = "annotation-xml", - APPLET = "applet", - AREA = "area", - ARTICLE = "article", - ASIDE = "aside", - B = "b", - BASE = "base", - BASEFONT = "basefont", - BGSOUND = "bgsound", - BIG = "big", - BLOCKQUOTE = "blockquote", - BODY = "body", - BR = "br", - BUTTON = "button", - CAPTION = "caption", - CENTER = "center", - CODE = "code", - COL = "col", - COLGROUP = "colgroup", - DD = "dd", - DESC = "desc", - DETAILS = "details", - DIALOG = "dialog", - DIR = "dir", - DIV = "div", - DL = "dl", - DT = "dt", - EM = "em", - EMBED = "embed", - FIELDSET = "fieldset", - FIGCAPTION = "figcaption", - FIGURE = "figure", - FONT = "font", - FOOTER = "footer", - FOREIGN_OBJECT = "foreignObject", - FORM = "form", - FRAME = "frame", - FRAMESET = "frameset", - H1 = "h1", - H2 = "h2", - H3 = "h3", - H4 = "h4", - H5 = "h5", - H6 = "h6", - HEAD = "head", - HEADER = "header", - HGROUP = "hgroup", - HR = "hr", - HTML = "html", - I = "i", - IMG = "img", - IMAGE = "image", - INPUT = "input", - IFRAME = "iframe", - KEYGEN = "keygen", - LABEL = "label", - LI = "li", - LINK = "link", - LISTING = "listing", - MAIN = "main", - MALIGNMARK = "malignmark", - MARQUEE = "marquee", - MATH = "math", - MENU = "menu", - META = "meta", - MGLYPH = "mglyph", - MI = "mi", - MO = "mo", - MN = "mn", - MS = "ms", - MTEXT = "mtext", - NAV = "nav", - NOBR = "nobr", - NOFRAMES = "noframes", - NOEMBED = "noembed", - NOSCRIPT = "noscript", - OBJECT = "object", - OL = "ol", - OPTGROUP = "optgroup", - OPTION = "option", - P = "p", - PARAM = "param", - PLAINTEXT = "plaintext", - PRE = "pre", - RB = "rb", - RP = "rp", - RT = "rt", - RTC = "rtc", - RUBY = "ruby", - S = "s", - SCRIPT = "script", - SEARCH = "search", - SECTION = "section", - SELECT = "select", - SOURCE = "source", - SMALL = "small", - SPAN = "span", - STRIKE = "strike", - STRONG = "strong", - STYLE = "style", - SUB = "sub", - SUMMARY = "summary", - SUP = "sup", - TABLE = "table", - TBODY = "tbody", - TEMPLATE = "template", - TEXTAREA = "textarea", - TFOOT = "tfoot", - TD = "td", - TH = "th", - THEAD = "thead", - TITLE = "title", - TR = "tr", - TRACK = "track", - TT = "tt", - U = "u", - UL = "ul", - SVG = "svg", - VAR = "var", - WBR = "wbr", - XMP = "xmp" -} -/** - * Tag IDs are numeric IDs for known tag names. - * - * We use tag IDs to improve the performance of tag name comparisons. - */ -export declare enum TAG_ID { - UNKNOWN = 0, - A = 1, - ADDRESS = 2, - ANNOTATION_XML = 3, - APPLET = 4, - AREA = 5, - ARTICLE = 6, - ASIDE = 7, - B = 8, - BASE = 9, - BASEFONT = 10, - BGSOUND = 11, - BIG = 12, - BLOCKQUOTE = 13, - BODY = 14, - BR = 15, - BUTTON = 16, - CAPTION = 17, - CENTER = 18, - CODE = 19, - COL = 20, - COLGROUP = 21, - DD = 22, - DESC = 23, - DETAILS = 24, - DIALOG = 25, - DIR = 26, - DIV = 27, - DL = 28, - DT = 29, - EM = 30, - EMBED = 31, - FIELDSET = 32, - FIGCAPTION = 33, - FIGURE = 34, - FONT = 35, - FOOTER = 36, - FOREIGN_OBJECT = 37, - FORM = 38, - FRAME = 39, - FRAMESET = 40, - H1 = 41, - H2 = 42, - H3 = 43, - H4 = 44, - H5 = 45, - H6 = 46, - HEAD = 47, - HEADER = 48, - HGROUP = 49, - HR = 50, - HTML = 51, - I = 52, - IMG = 53, - IMAGE = 54, - INPUT = 55, - IFRAME = 56, - KEYGEN = 57, - LABEL = 58, - LI = 59, - LINK = 60, - LISTING = 61, - MAIN = 62, - MALIGNMARK = 63, - MARQUEE = 64, - MATH = 65, - MENU = 66, - META = 67, - MGLYPH = 68, - MI = 69, - MO = 70, - MN = 71, - MS = 72, - MTEXT = 73, - NAV = 74, - NOBR = 75, - NOFRAMES = 76, - NOEMBED = 77, - NOSCRIPT = 78, - OBJECT = 79, - OL = 80, - OPTGROUP = 81, - OPTION = 82, - P = 83, - PARAM = 84, - PLAINTEXT = 85, - PRE = 86, - RB = 87, - RP = 88, - RT = 89, - RTC = 90, - RUBY = 91, - S = 92, - SCRIPT = 93, - SEARCH = 94, - SECTION = 95, - SELECT = 96, - SOURCE = 97, - SMALL = 98, - SPAN = 99, - STRIKE = 100, - STRONG = 101, - STYLE = 102, - SUB = 103, - SUMMARY = 104, - SUP = 105, - TABLE = 106, - TBODY = 107, - TEMPLATE = 108, - TEXTAREA = 109, - TFOOT = 110, - TD = 111, - TH = 112, - THEAD = 113, - TITLE = 114, - TR = 115, - TRACK = 116, - TT = 117, - U = 118, - UL = 119, - SVG = 120, - VAR = 121, - WBR = 122, - XMP = 123 -} -export declare function getTagID(tagName: string): TAG_ID; -export declare const SPECIAL_ELEMENTS: Record<NS, Set<TAG_ID>>; -export declare const NUMBERED_HEADERS: Set<TAG_ID>; -export declare function hasUnescapedText(tn: string, scriptingEnabled: boolean): boolean; diff --git a/node_modules/parse5/dist/common/html.js b/node_modules/parse5/dist/common/html.js deleted file mode 100644 index beca208..0000000 --- a/node_modules/parse5/dist/common/html.js +++ /dev/null @@ -1,523 +0,0 @@ -/** All valid namespaces in HTML. */ -export var NS; -(function (NS) { - NS["HTML"] = "http://www.w3.org/1999/xhtml"; - NS["MATHML"] = "http://www.w3.org/1998/Math/MathML"; - NS["SVG"] = "http://www.w3.org/2000/svg"; - NS["XLINK"] = "http://www.w3.org/1999/xlink"; - NS["XML"] = "http://www.w3.org/XML/1998/namespace"; - NS["XMLNS"] = "http://www.w3.org/2000/xmlns/"; -})(NS || (NS = {})); -export var ATTRS; -(function (ATTRS) { - ATTRS["TYPE"] = "type"; - ATTRS["ACTION"] = "action"; - ATTRS["ENCODING"] = "encoding"; - ATTRS["PROMPT"] = "prompt"; - ATTRS["NAME"] = "name"; - ATTRS["COLOR"] = "color"; - ATTRS["FACE"] = "face"; - ATTRS["SIZE"] = "size"; -})(ATTRS || (ATTRS = {})); -/** - * The mode of the document. - * - * @see {@link https://dom.spec.whatwg.org/#concept-document-limited-quirks} - */ -export var DOCUMENT_MODE; -(function (DOCUMENT_MODE) { - DOCUMENT_MODE["NO_QUIRKS"] = "no-quirks"; - DOCUMENT_MODE["QUIRKS"] = "quirks"; - DOCUMENT_MODE["LIMITED_QUIRKS"] = "limited-quirks"; -})(DOCUMENT_MODE || (DOCUMENT_MODE = {})); -export var TAG_NAMES; -(function (TAG_NAMES) { - TAG_NAMES["A"] = "a"; - TAG_NAMES["ADDRESS"] = "address"; - TAG_NAMES["ANNOTATION_XML"] = "annotation-xml"; - TAG_NAMES["APPLET"] = "applet"; - TAG_NAMES["AREA"] = "area"; - TAG_NAMES["ARTICLE"] = "article"; - TAG_NAMES["ASIDE"] = "aside"; - TAG_NAMES["B"] = "b"; - TAG_NAMES["BASE"] = "base"; - TAG_NAMES["BASEFONT"] = "basefont"; - TAG_NAMES["BGSOUND"] = "bgsound"; - TAG_NAMES["BIG"] = "big"; - TAG_NAMES["BLOCKQUOTE"] = "blockquote"; - TAG_NAMES["BODY"] = "body"; - TAG_NAMES["BR"] = "br"; - TAG_NAMES["BUTTON"] = "button"; - TAG_NAMES["CAPTION"] = "caption"; - TAG_NAMES["CENTER"] = "center"; - TAG_NAMES["CODE"] = "code"; - TAG_NAMES["COL"] = "col"; - TAG_NAMES["COLGROUP"] = "colgroup"; - TAG_NAMES["DD"] = "dd"; - TAG_NAMES["DESC"] = "desc"; - TAG_NAMES["DETAILS"] = "details"; - TAG_NAMES["DIALOG"] = "dialog"; - TAG_NAMES["DIR"] = "dir"; - TAG_NAMES["DIV"] = "div"; - TAG_NAMES["DL"] = "dl"; - TAG_NAMES["DT"] = "dt"; - TAG_NAMES["EM"] = "em"; - TAG_NAMES["EMBED"] = "embed"; - TAG_NAMES["FIELDSET"] = "fieldset"; - TAG_NAMES["FIGCAPTION"] = "figcaption"; - TAG_NAMES["FIGURE"] = "figure"; - TAG_NAMES["FONT"] = "font"; - TAG_NAMES["FOOTER"] = "footer"; - TAG_NAMES["FOREIGN_OBJECT"] = "foreignObject"; - TAG_NAMES["FORM"] = "form"; - TAG_NAMES["FRAME"] = "frame"; - TAG_NAMES["FRAMESET"] = "frameset"; - TAG_NAMES["H1"] = "h1"; - TAG_NAMES["H2"] = "h2"; - TAG_NAMES["H3"] = "h3"; - TAG_NAMES["H4"] = "h4"; - TAG_NAMES["H5"] = "h5"; - TAG_NAMES["H6"] = "h6"; - TAG_NAMES["HEAD"] = "head"; - TAG_NAMES["HEADER"] = "header"; - TAG_NAMES["HGROUP"] = "hgroup"; - TAG_NAMES["HR"] = "hr"; - TAG_NAMES["HTML"] = "html"; - TAG_NAMES["I"] = "i"; - TAG_NAMES["IMG"] = "img"; - TAG_NAMES["IMAGE"] = "image"; - TAG_NAMES["INPUT"] = "input"; - TAG_NAMES["IFRAME"] = "iframe"; - TAG_NAMES["KEYGEN"] = "keygen"; - TAG_NAMES["LABEL"] = "label"; - TAG_NAMES["LI"] = "li"; - TAG_NAMES["LINK"] = "link"; - TAG_NAMES["LISTING"] = "listing"; - TAG_NAMES["MAIN"] = "main"; - TAG_NAMES["MALIGNMARK"] = "malignmark"; - TAG_NAMES["MARQUEE"] = "marquee"; - TAG_NAMES["MATH"] = "math"; - TAG_NAMES["MENU"] = "menu"; - TAG_NAMES["META"] = "meta"; - TAG_NAMES["MGLYPH"] = "mglyph"; - TAG_NAMES["MI"] = "mi"; - TAG_NAMES["MO"] = "mo"; - TAG_NAMES["MN"] = "mn"; - TAG_NAMES["MS"] = "ms"; - TAG_NAMES["MTEXT"] = "mtext"; - TAG_NAMES["NAV"] = "nav"; - TAG_NAMES["NOBR"] = "nobr"; - TAG_NAMES["NOFRAMES"] = "noframes"; - TAG_NAMES["NOEMBED"] = "noembed"; - TAG_NAMES["NOSCRIPT"] = "noscript"; - TAG_NAMES["OBJECT"] = "object"; - TAG_NAMES["OL"] = "ol"; - TAG_NAMES["OPTGROUP"] = "optgroup"; - TAG_NAMES["OPTION"] = "option"; - TAG_NAMES["P"] = "p"; - TAG_NAMES["PARAM"] = "param"; - TAG_NAMES["PLAINTEXT"] = "plaintext"; - TAG_NAMES["PRE"] = "pre"; - TAG_NAMES["RB"] = "rb"; - TAG_NAMES["RP"] = "rp"; - TAG_NAMES["RT"] = "rt"; - TAG_NAMES["RTC"] = "rtc"; - TAG_NAMES["RUBY"] = "ruby"; - TAG_NAMES["S"] = "s"; - TAG_NAMES["SCRIPT"] = "script"; - TAG_NAMES["SEARCH"] = "search"; - TAG_NAMES["SECTION"] = "section"; - TAG_NAMES["SELECT"] = "select"; - TAG_NAMES["SOURCE"] = "source"; - TAG_NAMES["SMALL"] = "small"; - TAG_NAMES["SPAN"] = "span"; - TAG_NAMES["STRIKE"] = "strike"; - TAG_NAMES["STRONG"] = "strong"; - TAG_NAMES["STYLE"] = "style"; - TAG_NAMES["SUB"] = "sub"; - TAG_NAMES["SUMMARY"] = "summary"; - TAG_NAMES["SUP"] = "sup"; - TAG_NAMES["TABLE"] = "table"; - TAG_NAMES["TBODY"] = "tbody"; - TAG_NAMES["TEMPLATE"] = "template"; - TAG_NAMES["TEXTAREA"] = "textarea"; - TAG_NAMES["TFOOT"] = "tfoot"; - TAG_NAMES["TD"] = "td"; - TAG_NAMES["TH"] = "th"; - TAG_NAMES["THEAD"] = "thead"; - TAG_NAMES["TITLE"] = "title"; - TAG_NAMES["TR"] = "tr"; - TAG_NAMES["TRACK"] = "track"; - TAG_NAMES["TT"] = "tt"; - TAG_NAMES["U"] = "u"; - TAG_NAMES["UL"] = "ul"; - TAG_NAMES["SVG"] = "svg"; - TAG_NAMES["VAR"] = "var"; - TAG_NAMES["WBR"] = "wbr"; - TAG_NAMES["XMP"] = "xmp"; -})(TAG_NAMES || (TAG_NAMES = {})); -/** - * Tag IDs are numeric IDs for known tag names. - * - * We use tag IDs to improve the performance of tag name comparisons. - */ -export var TAG_ID; -(function (TAG_ID) { - TAG_ID[TAG_ID["UNKNOWN"] = 0] = "UNKNOWN"; - TAG_ID[TAG_ID["A"] = 1] = "A"; - TAG_ID[TAG_ID["ADDRESS"] = 2] = "ADDRESS"; - TAG_ID[TAG_ID["ANNOTATION_XML"] = 3] = "ANNOTATION_XML"; - TAG_ID[TAG_ID["APPLET"] = 4] = "APPLET"; - TAG_ID[TAG_ID["AREA"] = 5] = "AREA"; - TAG_ID[TAG_ID["ARTICLE"] = 6] = "ARTICLE"; - TAG_ID[TAG_ID["ASIDE"] = 7] = "ASIDE"; - TAG_ID[TAG_ID["B"] = 8] = "B"; - TAG_ID[TAG_ID["BASE"] = 9] = "BASE"; - TAG_ID[TAG_ID["BASEFONT"] = 10] = "BASEFONT"; - TAG_ID[TAG_ID["BGSOUND"] = 11] = "BGSOUND"; - TAG_ID[TAG_ID["BIG"] = 12] = "BIG"; - TAG_ID[TAG_ID["BLOCKQUOTE"] = 13] = "BLOCKQUOTE"; - TAG_ID[TAG_ID["BODY"] = 14] = "BODY"; - TAG_ID[TAG_ID["BR"] = 15] = "BR"; - TAG_ID[TAG_ID["BUTTON"] = 16] = "BUTTON"; - TAG_ID[TAG_ID["CAPTION"] = 17] = "CAPTION"; - TAG_ID[TAG_ID["CENTER"] = 18] = "CENTER"; - TAG_ID[TAG_ID["CODE"] = 19] = "CODE"; - TAG_ID[TAG_ID["COL"] = 20] = "COL"; - TAG_ID[TAG_ID["COLGROUP"] = 21] = "COLGROUP"; - TAG_ID[TAG_ID["DD"] = 22] = "DD"; - TAG_ID[TAG_ID["DESC"] = 23] = "DESC"; - TAG_ID[TAG_ID["DETAILS"] = 24] = "DETAILS"; - TAG_ID[TAG_ID["DIALOG"] = 25] = "DIALOG"; - TAG_ID[TAG_ID["DIR"] = 26] = "DIR"; - TAG_ID[TAG_ID["DIV"] = 27] = "DIV"; - TAG_ID[TAG_ID["DL"] = 28] = "DL"; - TAG_ID[TAG_ID["DT"] = 29] = "DT"; - TAG_ID[TAG_ID["EM"] = 30] = "EM"; - TAG_ID[TAG_ID["EMBED"] = 31] = "EMBED"; - TAG_ID[TAG_ID["FIELDSET"] = 32] = "FIELDSET"; - TAG_ID[TAG_ID["FIGCAPTION"] = 33] = "FIGCAPTION"; - TAG_ID[TAG_ID["FIGURE"] = 34] = "FIGURE"; - TAG_ID[TAG_ID["FONT"] = 35] = "FONT"; - TAG_ID[TAG_ID["FOOTER"] = 36] = "FOOTER"; - TAG_ID[TAG_ID["FOREIGN_OBJECT"] = 37] = "FOREIGN_OBJECT"; - TAG_ID[TAG_ID["FORM"] = 38] = "FORM"; - TAG_ID[TAG_ID["FRAME"] = 39] = "FRAME"; - TAG_ID[TAG_ID["FRAMESET"] = 40] = "FRAMESET"; - TAG_ID[TAG_ID["H1"] = 41] = "H1"; - TAG_ID[TAG_ID["H2"] = 42] = "H2"; - TAG_ID[TAG_ID["H3"] = 43] = "H3"; - TAG_ID[TAG_ID["H4"] = 44] = "H4"; - TAG_ID[TAG_ID["H5"] = 45] = "H5"; - TAG_ID[TAG_ID["H6"] = 46] = "H6"; - TAG_ID[TAG_ID["HEAD"] = 47] = "HEAD"; - TAG_ID[TAG_ID["HEADER"] = 48] = "HEADER"; - TAG_ID[TAG_ID["HGROUP"] = 49] = "HGROUP"; - TAG_ID[TAG_ID["HR"] = 50] = "HR"; - TAG_ID[TAG_ID["HTML"] = 51] = "HTML"; - TAG_ID[TAG_ID["I"] = 52] = "I"; - TAG_ID[TAG_ID["IMG"] = 53] = "IMG"; - TAG_ID[TAG_ID["IMAGE"] = 54] = "IMAGE"; - TAG_ID[TAG_ID["INPUT"] = 55] = "INPUT"; - TAG_ID[TAG_ID["IFRAME"] = 56] = "IFRAME"; - TAG_ID[TAG_ID["KEYGEN"] = 57] = "KEYGEN"; - TAG_ID[TAG_ID["LABEL"] = 58] = "LABEL"; - TAG_ID[TAG_ID["LI"] = 59] = "LI"; - TAG_ID[TAG_ID["LINK"] = 60] = "LINK"; - TAG_ID[TAG_ID["LISTING"] = 61] = "LISTING"; - TAG_ID[TAG_ID["MAIN"] = 62] = "MAIN"; - TAG_ID[TAG_ID["MALIGNMARK"] = 63] = "MALIGNMARK"; - TAG_ID[TAG_ID["MARQUEE"] = 64] = "MARQUEE"; - TAG_ID[TAG_ID["MATH"] = 65] = "MATH"; - TAG_ID[TAG_ID["MENU"] = 66] = "MENU"; - TAG_ID[TAG_ID["META"] = 67] = "META"; - TAG_ID[TAG_ID["MGLYPH"] = 68] = "MGLYPH"; - TAG_ID[TAG_ID["MI"] = 69] = "MI"; - TAG_ID[TAG_ID["MO"] = 70] = "MO"; - TAG_ID[TAG_ID["MN"] = 71] = "MN"; - TAG_ID[TAG_ID["MS"] = 72] = "MS"; - TAG_ID[TAG_ID["MTEXT"] = 73] = "MTEXT"; - TAG_ID[TAG_ID["NAV"] = 74] = "NAV"; - TAG_ID[TAG_ID["NOBR"] = 75] = "NOBR"; - TAG_ID[TAG_ID["NOFRAMES"] = 76] = "NOFRAMES"; - TAG_ID[TAG_ID["NOEMBED"] = 77] = "NOEMBED"; - TAG_ID[TAG_ID["NOSCRIPT"] = 78] = "NOSCRIPT"; - TAG_ID[TAG_ID["OBJECT"] = 79] = "OBJECT"; - TAG_ID[TAG_ID["OL"] = 80] = "OL"; - TAG_ID[TAG_ID["OPTGROUP"] = 81] = "OPTGROUP"; - TAG_ID[TAG_ID["OPTION"] = 82] = "OPTION"; - TAG_ID[TAG_ID["P"] = 83] = "P"; - TAG_ID[TAG_ID["PARAM"] = 84] = "PARAM"; - TAG_ID[TAG_ID["PLAINTEXT"] = 85] = "PLAINTEXT"; - TAG_ID[TAG_ID["PRE"] = 86] = "PRE"; - TAG_ID[TAG_ID["RB"] = 87] = "RB"; - TAG_ID[TAG_ID["RP"] = 88] = "RP"; - TAG_ID[TAG_ID["RT"] = 89] = "RT"; - TAG_ID[TAG_ID["RTC"] = 90] = "RTC"; - TAG_ID[TAG_ID["RUBY"] = 91] = "RUBY"; - TAG_ID[TAG_ID["S"] = 92] = "S"; - TAG_ID[TAG_ID["SCRIPT"] = 93] = "SCRIPT"; - TAG_ID[TAG_ID["SEARCH"] = 94] = "SEARCH"; - TAG_ID[TAG_ID["SECTION"] = 95] = "SECTION"; - TAG_ID[TAG_ID["SELECT"] = 96] = "SELECT"; - TAG_ID[TAG_ID["SOURCE"] = 97] = "SOURCE"; - TAG_ID[TAG_ID["SMALL"] = 98] = "SMALL"; - TAG_ID[TAG_ID["SPAN"] = 99] = "SPAN"; - TAG_ID[TAG_ID["STRIKE"] = 100] = "STRIKE"; - TAG_ID[TAG_ID["STRONG"] = 101] = "STRONG"; - TAG_ID[TAG_ID["STYLE"] = 102] = "STYLE"; - TAG_ID[TAG_ID["SUB"] = 103] = "SUB"; - TAG_ID[TAG_ID["SUMMARY"] = 104] = "SUMMARY"; - TAG_ID[TAG_ID["SUP"] = 105] = "SUP"; - TAG_ID[TAG_ID["TABLE"] = 106] = "TABLE"; - TAG_ID[TAG_ID["TBODY"] = 107] = "TBODY"; - TAG_ID[TAG_ID["TEMPLATE"] = 108] = "TEMPLATE"; - TAG_ID[TAG_ID["TEXTAREA"] = 109] = "TEXTAREA"; - TAG_ID[TAG_ID["TFOOT"] = 110] = "TFOOT"; - TAG_ID[TAG_ID["TD"] = 111] = "TD"; - TAG_ID[TAG_ID["TH"] = 112] = "TH"; - TAG_ID[TAG_ID["THEAD"] = 113] = "THEAD"; - TAG_ID[TAG_ID["TITLE"] = 114] = "TITLE"; - TAG_ID[TAG_ID["TR"] = 115] = "TR"; - TAG_ID[TAG_ID["TRACK"] = 116] = "TRACK"; - TAG_ID[TAG_ID["TT"] = 117] = "TT"; - TAG_ID[TAG_ID["U"] = 118] = "U"; - TAG_ID[TAG_ID["UL"] = 119] = "UL"; - TAG_ID[TAG_ID["SVG"] = 120] = "SVG"; - TAG_ID[TAG_ID["VAR"] = 121] = "VAR"; - TAG_ID[TAG_ID["WBR"] = 122] = "WBR"; - TAG_ID[TAG_ID["XMP"] = 123] = "XMP"; -})(TAG_ID || (TAG_ID = {})); -const TAG_NAME_TO_ID = new Map([ - [TAG_NAMES.A, TAG_ID.A], - [TAG_NAMES.ADDRESS, TAG_ID.ADDRESS], - [TAG_NAMES.ANNOTATION_XML, TAG_ID.ANNOTATION_XML], - [TAG_NAMES.APPLET, TAG_ID.APPLET], - [TAG_NAMES.AREA, TAG_ID.AREA], - [TAG_NAMES.ARTICLE, TAG_ID.ARTICLE], - [TAG_NAMES.ASIDE, TAG_ID.ASIDE], - [TAG_NAMES.B, TAG_ID.B], - [TAG_NAMES.BASE, TAG_ID.BASE], - [TAG_NAMES.BASEFONT, TAG_ID.BASEFONT], - [TAG_NAMES.BGSOUND, TAG_ID.BGSOUND], - [TAG_NAMES.BIG, TAG_ID.BIG], - [TAG_NAMES.BLOCKQUOTE, TAG_ID.BLOCKQUOTE], - [TAG_NAMES.BODY, TAG_ID.BODY], - [TAG_NAMES.BR, TAG_ID.BR], - [TAG_NAMES.BUTTON, TAG_ID.BUTTON], - [TAG_NAMES.CAPTION, TAG_ID.CAPTION], - [TAG_NAMES.CENTER, TAG_ID.CENTER], - [TAG_NAMES.CODE, TAG_ID.CODE], - [TAG_NAMES.COL, TAG_ID.COL], - [TAG_NAMES.COLGROUP, TAG_ID.COLGROUP], - [TAG_NAMES.DD, TAG_ID.DD], - [TAG_NAMES.DESC, TAG_ID.DESC], - [TAG_NAMES.DETAILS, TAG_ID.DETAILS], - [TAG_NAMES.DIALOG, TAG_ID.DIALOG], - [TAG_NAMES.DIR, TAG_ID.DIR], - [TAG_NAMES.DIV, TAG_ID.DIV], - [TAG_NAMES.DL, TAG_ID.DL], - [TAG_NAMES.DT, TAG_ID.DT], - [TAG_NAMES.EM, TAG_ID.EM], - [TAG_NAMES.EMBED, TAG_ID.EMBED], - [TAG_NAMES.FIELDSET, TAG_ID.FIELDSET], - [TAG_NAMES.FIGCAPTION, TAG_ID.FIGCAPTION], - [TAG_NAMES.FIGURE, TAG_ID.FIGURE], - [TAG_NAMES.FONT, TAG_ID.FONT], - [TAG_NAMES.FOOTER, TAG_ID.FOOTER], - [TAG_NAMES.FOREIGN_OBJECT, TAG_ID.FOREIGN_OBJECT], - [TAG_NAMES.FORM, TAG_ID.FORM], - [TAG_NAMES.FRAME, TAG_ID.FRAME], - [TAG_NAMES.FRAMESET, TAG_ID.FRAMESET], - [TAG_NAMES.H1, TAG_ID.H1], - [TAG_NAMES.H2, TAG_ID.H2], - [TAG_NAMES.H3, TAG_ID.H3], - [TAG_NAMES.H4, TAG_ID.H4], - [TAG_NAMES.H5, TAG_ID.H5], - [TAG_NAMES.H6, TAG_ID.H6], - [TAG_NAMES.HEAD, TAG_ID.HEAD], - [TAG_NAMES.HEADER, TAG_ID.HEADER], - [TAG_NAMES.HGROUP, TAG_ID.HGROUP], - [TAG_NAMES.HR, TAG_ID.HR], - [TAG_NAMES.HTML, TAG_ID.HTML], - [TAG_NAMES.I, TAG_ID.I], - [TAG_NAMES.IMG, TAG_ID.IMG], - [TAG_NAMES.IMAGE, TAG_ID.IMAGE], - [TAG_NAMES.INPUT, TAG_ID.INPUT], - [TAG_NAMES.IFRAME, TAG_ID.IFRAME], - [TAG_NAMES.KEYGEN, TAG_ID.KEYGEN], - [TAG_NAMES.LABEL, TAG_ID.LABEL], - [TAG_NAMES.LI, TAG_ID.LI], - [TAG_NAMES.LINK, TAG_ID.LINK], - [TAG_NAMES.LISTING, TAG_ID.LISTING], - [TAG_NAMES.MAIN, TAG_ID.MAIN], - [TAG_NAMES.MALIGNMARK, TAG_ID.MALIGNMARK], - [TAG_NAMES.MARQUEE, TAG_ID.MARQUEE], - [TAG_NAMES.MATH, TAG_ID.MATH], - [TAG_NAMES.MENU, TAG_ID.MENU], - [TAG_NAMES.META, TAG_ID.META], - [TAG_NAMES.MGLYPH, TAG_ID.MGLYPH], - [TAG_NAMES.MI, TAG_ID.MI], - [TAG_NAMES.MO, TAG_ID.MO], - [TAG_NAMES.MN, TAG_ID.MN], - [TAG_NAMES.MS, TAG_ID.MS], - [TAG_NAMES.MTEXT, TAG_ID.MTEXT], - [TAG_NAMES.NAV, TAG_ID.NAV], - [TAG_NAMES.NOBR, TAG_ID.NOBR], - [TAG_NAMES.NOFRAMES, TAG_ID.NOFRAMES], - [TAG_NAMES.NOEMBED, TAG_ID.NOEMBED], - [TAG_NAMES.NOSCRIPT, TAG_ID.NOSCRIPT], - [TAG_NAMES.OBJECT, TAG_ID.OBJECT], - [TAG_NAMES.OL, TAG_ID.OL], - [TAG_NAMES.OPTGROUP, TAG_ID.OPTGROUP], - [TAG_NAMES.OPTION, TAG_ID.OPTION], - [TAG_NAMES.P, TAG_ID.P], - [TAG_NAMES.PARAM, TAG_ID.PARAM], - [TAG_NAMES.PLAINTEXT, TAG_ID.PLAINTEXT], - [TAG_NAMES.PRE, TAG_ID.PRE], - [TAG_NAMES.RB, TAG_ID.RB], - [TAG_NAMES.RP, TAG_ID.RP], - [TAG_NAMES.RT, TAG_ID.RT], - [TAG_NAMES.RTC, TAG_ID.RTC], - [TAG_NAMES.RUBY, TAG_ID.RUBY], - [TAG_NAMES.S, TAG_ID.S], - [TAG_NAMES.SCRIPT, TAG_ID.SCRIPT], - [TAG_NAMES.SEARCH, TAG_ID.SEARCH], - [TAG_NAMES.SECTION, TAG_ID.SECTION], - [TAG_NAMES.SELECT, TAG_ID.SELECT], - [TAG_NAMES.SOURCE, TAG_ID.SOURCE], - [TAG_NAMES.SMALL, TAG_ID.SMALL], - [TAG_NAMES.SPAN, TAG_ID.SPAN], - [TAG_NAMES.STRIKE, TAG_ID.STRIKE], - [TAG_NAMES.STRONG, TAG_ID.STRONG], - [TAG_NAMES.STYLE, TAG_ID.STYLE], - [TAG_NAMES.SUB, TAG_ID.SUB], - [TAG_NAMES.SUMMARY, TAG_ID.SUMMARY], - [TAG_NAMES.SUP, TAG_ID.SUP], - [TAG_NAMES.TABLE, TAG_ID.TABLE], - [TAG_NAMES.TBODY, TAG_ID.TBODY], - [TAG_NAMES.TEMPLATE, TAG_ID.TEMPLATE], - [TAG_NAMES.TEXTAREA, TAG_ID.TEXTAREA], - [TAG_NAMES.TFOOT, TAG_ID.TFOOT], - [TAG_NAMES.TD, TAG_ID.TD], - [TAG_NAMES.TH, TAG_ID.TH], - [TAG_NAMES.THEAD, TAG_ID.THEAD], - [TAG_NAMES.TITLE, TAG_ID.TITLE], - [TAG_NAMES.TR, TAG_ID.TR], - [TAG_NAMES.TRACK, TAG_ID.TRACK], - [TAG_NAMES.TT, TAG_ID.TT], - [TAG_NAMES.U, TAG_ID.U], - [TAG_NAMES.UL, TAG_ID.UL], - [TAG_NAMES.SVG, TAG_ID.SVG], - [TAG_NAMES.VAR, TAG_ID.VAR], - [TAG_NAMES.WBR, TAG_ID.WBR], - [TAG_NAMES.XMP, TAG_ID.XMP], -]); -export function getTagID(tagName) { - var _a; - return (_a = TAG_NAME_TO_ID.get(tagName)) !== null && _a !== void 0 ? _a : TAG_ID.UNKNOWN; -} -const $ = TAG_ID; -export const SPECIAL_ELEMENTS = { - [NS.HTML]: new Set([ - $.ADDRESS, - $.APPLET, - $.AREA, - $.ARTICLE, - $.ASIDE, - $.BASE, - $.BASEFONT, - $.BGSOUND, - $.BLOCKQUOTE, - $.BODY, - $.BR, - $.BUTTON, - $.CAPTION, - $.CENTER, - $.COL, - $.COLGROUP, - $.DD, - $.DETAILS, - $.DIR, - $.DIV, - $.DL, - $.DT, - $.EMBED, - $.FIELDSET, - $.FIGCAPTION, - $.FIGURE, - $.FOOTER, - $.FORM, - $.FRAME, - $.FRAMESET, - $.H1, - $.H2, - $.H3, - $.H4, - $.H5, - $.H6, - $.HEAD, - $.HEADER, - $.HGROUP, - $.HR, - $.HTML, - $.IFRAME, - $.IMG, - $.INPUT, - $.LI, - $.LINK, - $.LISTING, - $.MAIN, - $.MARQUEE, - $.MENU, - $.META, - $.NAV, - $.NOEMBED, - $.NOFRAMES, - $.NOSCRIPT, - $.OBJECT, - $.OL, - $.P, - $.PARAM, - $.PLAINTEXT, - $.PRE, - $.SCRIPT, - $.SECTION, - $.SELECT, - $.SOURCE, - $.STYLE, - $.SUMMARY, - $.TABLE, - $.TBODY, - $.TD, - $.TEMPLATE, - $.TEXTAREA, - $.TFOOT, - $.TH, - $.THEAD, - $.TITLE, - $.TR, - $.TRACK, - $.UL, - $.WBR, - $.XMP, - ]), - [NS.MATHML]: new Set([$.MI, $.MO, $.MN, $.MS, $.MTEXT, $.ANNOTATION_XML]), - [NS.SVG]: new Set([$.TITLE, $.FOREIGN_OBJECT, $.DESC]), - [NS.XLINK]: new Set(), - [NS.XML]: new Set(), - [NS.XMLNS]: new Set(), -}; -export const NUMBERED_HEADERS = new Set([$.H1, $.H2, $.H3, $.H4, $.H5, $.H6]); -const UNESCAPED_TEXT = new Set([ - TAG_NAMES.STYLE, - TAG_NAMES.SCRIPT, - TAG_NAMES.XMP, - TAG_NAMES.IFRAME, - TAG_NAMES.NOEMBED, - TAG_NAMES.NOFRAMES, - TAG_NAMES.PLAINTEXT, -]); -export function hasUnescapedText(tn, scriptingEnabled) { - return UNESCAPED_TEXT.has(tn) || (scriptingEnabled && tn === TAG_NAMES.NOSCRIPT); -} diff --git a/node_modules/parse5/dist/common/token.d.ts b/node_modules/parse5/dist/common/token.d.ts deleted file mode 100644 index 9bcc7dc..0000000 --- a/node_modules/parse5/dist/common/token.d.ts +++ /dev/null @@ -1,84 +0,0 @@ -import type { TAG_ID } from './html.js'; -export declare enum TokenType { - CHARACTER = 0, - NULL_CHARACTER = 1, - WHITESPACE_CHARACTER = 2, - START_TAG = 3, - END_TAG = 4, - COMMENT = 5, - DOCTYPE = 6, - EOF = 7, - HIBERNATION = 8 -} -export interface Location { - /** One-based line index of the first character. */ - startLine: number; - /** One-based column index of the first character. */ - startCol: number; - /** Zero-based first character index. */ - startOffset: number; - /** One-based line index of the last character. */ - endLine: number; - /** One-based column index of the last character. Points directly *after* the last character. */ - endCol: number; - /** Zero-based last character index. Points directly *after* the last character. */ - endOffset: number; -} -export interface LocationWithAttributes extends Location { - /** Start tag attributes' location info. */ - attrs?: Record<string, Location>; -} -export interface ElementLocation extends LocationWithAttributes { - /** Element's start tag location info. */ - startTag?: Location; - /** - * Element's end tag location info. - * This property is undefined, if the element has no closing tag. - */ - endTag?: Location; -} -interface TokenBase { - readonly type: TokenType; - location: Location | null; -} -export interface DoctypeToken extends TokenBase { - readonly type: TokenType.DOCTYPE; - name: string | null; - forceQuirks: boolean; - publicId: string | null; - systemId: string | null; -} -export interface Attribute { - /** The name of the attribute. */ - name: string; - /** The namespace of the attribute. */ - namespace?: string; - /** The namespace-related prefix of the attribute. */ - prefix?: string; - /** The value of the attribute. */ - value: string; -} -export interface TagToken extends TokenBase { - readonly type: TokenType.START_TAG | TokenType.END_TAG; - tagName: string; - /** Used to cache the ID of the tag name. */ - tagID: TAG_ID; - selfClosing: boolean; - ackSelfClosing: boolean; - attrs: Attribute[]; - location: LocationWithAttributes | null; -} -export declare function getTokenAttr(token: TagToken, attrName: string): string | null; -export interface CommentToken extends TokenBase { - readonly type: TokenType.COMMENT; - data: string; -} -export interface EOFToken extends TokenBase { - readonly type: TokenType.EOF; -} -export interface CharacterToken extends TokenBase { - type: TokenType.CHARACTER | TokenType.NULL_CHARACTER | TokenType.WHITESPACE_CHARACTER; - chars: string; -} -export type Token = DoctypeToken | TagToken | CommentToken | EOFToken | CharacterToken; -export {}; diff --git a/node_modules/parse5/dist/common/token.js b/node_modules/parse5/dist/common/token.js deleted file mode 100644 index 80c880e..0000000 --- a/node_modules/parse5/dist/common/token.js +++ /dev/null @@ -1,20 +0,0 @@ -export var TokenType; -(function (TokenType) { - TokenType[TokenType["CHARACTER"] = 0] = "CHARACTER"; - TokenType[TokenType["NULL_CHARACTER"] = 1] = "NULL_CHARACTER"; - TokenType[TokenType["WHITESPACE_CHARACTER"] = 2] = "WHITESPACE_CHARACTER"; - TokenType[TokenType["START_TAG"] = 3] = "START_TAG"; - TokenType[TokenType["END_TAG"] = 4] = "END_TAG"; - TokenType[TokenType["COMMENT"] = 5] = "COMMENT"; - TokenType[TokenType["DOCTYPE"] = 6] = "DOCTYPE"; - TokenType[TokenType["EOF"] = 7] = "EOF"; - TokenType[TokenType["HIBERNATION"] = 8] = "HIBERNATION"; -})(TokenType || (TokenType = {})); -export function getTokenAttr(token, attrName) { - for (let i = token.attrs.length - 1; i >= 0; i--) { - if (token.attrs[i].name === attrName) { - return token.attrs[i].value; - } - } - return null; -} diff --git a/node_modules/parse5/dist/common/unicode.d.ts b/node_modules/parse5/dist/common/unicode.d.ts deleted file mode 100644 index 63eda8b..0000000 --- a/node_modules/parse5/dist/common/unicode.d.ts +++ /dev/null @@ -1,42 +0,0 @@ -export declare const REPLACEMENT_CHARACTER = "\uFFFD"; -export declare enum CODE_POINTS { - EOF = -1, - NULL = 0, - TABULATION = 9, - CARRIAGE_RETURN = 13, - LINE_FEED = 10, - FORM_FEED = 12, - SPACE = 32, - EXCLAMATION_MARK = 33, - QUOTATION_MARK = 34, - AMPERSAND = 38, - APOSTROPHE = 39, - HYPHEN_MINUS = 45, - SOLIDUS = 47, - DIGIT_0 = 48, - DIGIT_9 = 57, - SEMICOLON = 59, - LESS_THAN_SIGN = 60, - EQUALS_SIGN = 61, - GREATER_THAN_SIGN = 62, - QUESTION_MARK = 63, - LATIN_CAPITAL_A = 65, - LATIN_CAPITAL_Z = 90, - RIGHT_SQUARE_BRACKET = 93, - GRAVE_ACCENT = 96, - LATIN_SMALL_A = 97, - LATIN_SMALL_Z = 122 -} -export declare const SEQUENCES: { - DASH_DASH: string; - CDATA_START: string; - DOCTYPE: string; - SCRIPT: string; - PUBLIC: string; - SYSTEM: string; -}; -export declare function isSurrogate(cp: number): boolean; -export declare function isSurrogatePair(cp: number): boolean; -export declare function getSurrogatePairCodePoint(cp1: number, cp2: number): number; -export declare function isControlCodePoint(cp: number): boolean; -export declare function isUndefinedCodePoint(cp: number): boolean; diff --git a/node_modules/parse5/dist/common/unicode.js b/node_modules/parse5/dist/common/unicode.js deleted file mode 100644 index 7161837..0000000 --- a/node_modules/parse5/dist/common/unicode.js +++ /dev/null @@ -1,62 +0,0 @@ -const UNDEFINED_CODE_POINTS = new Set([ - 65534, 65535, 131070, 131071, 196606, 196607, 262142, 262143, 327678, 327679, 393214, - 393215, 458750, 458751, 524286, 524287, 589822, 589823, 655358, 655359, 720894, - 720895, 786430, 786431, 851966, 851967, 917502, 917503, 983038, 983039, 1048574, - 1048575, 1114110, 1114111, -]); -export const REPLACEMENT_CHARACTER = '\uFFFD'; -export var CODE_POINTS; -(function (CODE_POINTS) { - CODE_POINTS[CODE_POINTS["EOF"] = -1] = "EOF"; - CODE_POINTS[CODE_POINTS["NULL"] = 0] = "NULL"; - CODE_POINTS[CODE_POINTS["TABULATION"] = 9] = "TABULATION"; - CODE_POINTS[CODE_POINTS["CARRIAGE_RETURN"] = 13] = "CARRIAGE_RETURN"; - CODE_POINTS[CODE_POINTS["LINE_FEED"] = 10] = "LINE_FEED"; - CODE_POINTS[CODE_POINTS["FORM_FEED"] = 12] = "FORM_FEED"; - CODE_POINTS[CODE_POINTS["SPACE"] = 32] = "SPACE"; - CODE_POINTS[CODE_POINTS["EXCLAMATION_MARK"] = 33] = "EXCLAMATION_MARK"; - CODE_POINTS[CODE_POINTS["QUOTATION_MARK"] = 34] = "QUOTATION_MARK"; - CODE_POINTS[CODE_POINTS["AMPERSAND"] = 38] = "AMPERSAND"; - CODE_POINTS[CODE_POINTS["APOSTROPHE"] = 39] = "APOSTROPHE"; - CODE_POINTS[CODE_POINTS["HYPHEN_MINUS"] = 45] = "HYPHEN_MINUS"; - CODE_POINTS[CODE_POINTS["SOLIDUS"] = 47] = "SOLIDUS"; - CODE_POINTS[CODE_POINTS["DIGIT_0"] = 48] = "DIGIT_0"; - CODE_POINTS[CODE_POINTS["DIGIT_9"] = 57] = "DIGIT_9"; - CODE_POINTS[CODE_POINTS["SEMICOLON"] = 59] = "SEMICOLON"; - CODE_POINTS[CODE_POINTS["LESS_THAN_SIGN"] = 60] = "LESS_THAN_SIGN"; - CODE_POINTS[CODE_POINTS["EQUALS_SIGN"] = 61] = "EQUALS_SIGN"; - CODE_POINTS[CODE_POINTS["GREATER_THAN_SIGN"] = 62] = "GREATER_THAN_SIGN"; - CODE_POINTS[CODE_POINTS["QUESTION_MARK"] = 63] = "QUESTION_MARK"; - CODE_POINTS[CODE_POINTS["LATIN_CAPITAL_A"] = 65] = "LATIN_CAPITAL_A"; - CODE_POINTS[CODE_POINTS["LATIN_CAPITAL_Z"] = 90] = "LATIN_CAPITAL_Z"; - CODE_POINTS[CODE_POINTS["RIGHT_SQUARE_BRACKET"] = 93] = "RIGHT_SQUARE_BRACKET"; - CODE_POINTS[CODE_POINTS["GRAVE_ACCENT"] = 96] = "GRAVE_ACCENT"; - CODE_POINTS[CODE_POINTS["LATIN_SMALL_A"] = 97] = "LATIN_SMALL_A"; - CODE_POINTS[CODE_POINTS["LATIN_SMALL_Z"] = 122] = "LATIN_SMALL_Z"; -})(CODE_POINTS || (CODE_POINTS = {})); -export const SEQUENCES = { - DASH_DASH: '--', - CDATA_START: '[CDATA[', - DOCTYPE: 'doctype', - SCRIPT: 'script', - PUBLIC: 'public', - SYSTEM: 'system', -}; -//Surrogates -export function isSurrogate(cp) { - return cp >= 55296 && cp <= 57343; -} -export function isSurrogatePair(cp) { - return cp >= 56320 && cp <= 57343; -} -export function getSurrogatePairCodePoint(cp1, cp2) { - return (cp1 - 55296) * 1024 + 9216 + cp2; -} -//NOTE: excluding NULL and ASCII whitespace -export function isControlCodePoint(cp) { - return ((cp !== 0x20 && cp !== 0x0a && cp !== 0x0d && cp !== 0x09 && cp !== 0x0c && cp >= 0x01 && cp <= 0x1f) || - (cp >= 0x7f && cp <= 0x9f)); -} -export function isUndefinedCodePoint(cp) { - return (cp >= 64976 && cp <= 65007) || UNDEFINED_CODE_POINTS.has(cp); -} diff --git a/node_modules/parse5/dist/index.d.ts b/node_modules/parse5/dist/index.d.ts deleted file mode 100644 index 25540bd..0000000 --- a/node_modules/parse5/dist/index.d.ts +++ /dev/null @@ -1,71 +0,0 @@ -import { type ParserOptions } from './parser/index.js'; -import type { DefaultTreeAdapterMap } from './tree-adapters/default.js'; -import type { TreeAdapterTypeMap } from './tree-adapters/interface.js'; -export { type DefaultTreeAdapterMap, defaultTreeAdapter } from './tree-adapters/default.js'; -import type * as DefaultTreeAdapter from './tree-adapters/default.js'; -export declare namespace DefaultTreeAdapterTypes { - type Document = DefaultTreeAdapter.Document; - type DocumentFragment = DefaultTreeAdapter.DocumentFragment; - type Element = DefaultTreeAdapter.Element; - type CommentNode = DefaultTreeAdapter.CommentNode; - type TextNode = DefaultTreeAdapter.TextNode; - type Template = DefaultTreeAdapter.Template; - type DocumentType = DefaultTreeAdapter.DocumentType; - type ParentNode = DefaultTreeAdapter.ParentNode; - type ChildNode = DefaultTreeAdapter.ChildNode; - type Node = DefaultTreeAdapter.Node; - type DefaultTreeAdapterMap = DefaultTreeAdapter.DefaultTreeAdapterMap; -} -export type { TreeAdapter, TreeAdapterTypeMap } from './tree-adapters/interface.js'; -export { type ParserOptions, /** @internal */ Parser } from './parser/index.js'; -export { serialize, serializeOuter, type SerializerOptions } from './serializer/index.js'; -export { ERR as ErrorCodes, type ParserError, type ParserErrorHandler } from './common/error-codes.js'; -/** @internal */ -export * as foreignContent from './common/foreign-content.js'; -export * as html from './common/html.js'; -export * as Token from './common/token.js'; -/** @internal */ -export { Tokenizer, type TokenizerOptions, TokenizerMode, type TokenHandler } from './tokenizer/index.js'; -/** - * Parses an HTML string. - * - * @param html Input HTML string. - * @param options Parsing options. - * @returns Document - * - * @example - * - * ```js - * const parse5 = require('parse5'); - * - * const document = parse5.parse('<!DOCTYPE html><html><head></head><body>Hi there!</body></html>'); - * - * console.log(document.childNodes[1].tagName); //> 'html' - *``` - */ -export declare function parse<T extends TreeAdapterTypeMap = DefaultTreeAdapterMap>(html: string, options?: ParserOptions<T>): T['document']; -/** - * Parses an HTML fragment. - * - * @example - * - * ```js - * const parse5 = require('parse5'); - * - * const documentFragment = parse5.parseFragment('<table></table>'); - * - * console.log(documentFragment.childNodes[0].tagName); //> 'table' - * - * // Parses the html fragment in the context of the parsed <table> element. - * const trFragment = parse5.parseFragment(documentFragment.childNodes[0], '<tr><td>Shake it, baby</td></tr>'); - * - * console.log(trFragment.childNodes[0].childNodes[0].tagName); //> 'td' - * ``` - * - * @param fragmentContext Parsing context element. If specified, given fragment will be parsed as if it was set to the context element's `innerHTML` property. - * @param html Input HTML fragment string. - * @param options Parsing options. - * @returns DocumentFragment - */ -export declare function parseFragment<T extends TreeAdapterTypeMap = DefaultTreeAdapterMap>(fragmentContext: T['parentNode'] | null, html: string, options: ParserOptions<T>): T['documentFragment']; -export declare function parseFragment<T extends TreeAdapterTypeMap = DefaultTreeAdapterMap>(html: string, options?: ParserOptions<T>): T['documentFragment']; diff --git a/node_modules/parse5/dist/index.js b/node_modules/parse5/dist/index.js deleted file mode 100644 index ff5b55b..0000000 --- a/node_modules/parse5/dist/index.js +++ /dev/null @@ -1,42 +0,0 @@ -import { Parser } from './parser/index.js'; -export { defaultTreeAdapter } from './tree-adapters/default.js'; -export { /** @internal */ Parser } from './parser/index.js'; -export { serialize, serializeOuter } from './serializer/index.js'; -export { ERR as ErrorCodes } from './common/error-codes.js'; -/** @internal */ -export * as foreignContent from './common/foreign-content.js'; -export * as html from './common/html.js'; -export * as Token from './common/token.js'; -/** @internal */ -export { Tokenizer, TokenizerMode } from './tokenizer/index.js'; -// Shorthands -/** - * Parses an HTML string. - * - * @param html Input HTML string. - * @param options Parsing options. - * @returns Document - * - * @example - * - * ```js - * const parse5 = require('parse5'); - * - * const document = parse5.parse('<!DOCTYPE html><html><head></head><body>Hi there!</body></html>'); - * - * console.log(document.childNodes[1].tagName); //> 'html' - *``` - */ -export function parse(html, options) { - return Parser.parse(html, options); -} -export function parseFragment(fragmentContext, html, options) { - if (typeof fragmentContext === 'string') { - options = html; - html = fragmentContext; - fragmentContext = null; - } - const parser = Parser.getFragmentParser(fragmentContext, options); - parser.tokenizer.write(html, true); - return parser.getFragment(); -} diff --git a/node_modules/parse5/dist/parser/formatting-element-list.d.ts b/node_modules/parse5/dist/parser/formatting-element-list.d.ts deleted file mode 100644 index 1d421b6..0000000 --- a/node_modules/parse5/dist/parser/formatting-element-list.d.ts +++ /dev/null @@ -1,36 +0,0 @@ -import type { TagToken } from '../common/token.js'; -import type { TreeAdapter, TreeAdapterTypeMap } from '../tree-adapters/interface.js'; -export declare enum EntryType { - Marker = 0, - Element = 1 -} -interface MarkerEntry { - type: EntryType.Marker; -} -export interface ElementEntry<T extends TreeAdapterTypeMap> { - type: EntryType.Element; - element: T['element']; - token: TagToken; -} -export type Entry<T extends TreeAdapterTypeMap> = MarkerEntry | ElementEntry<T>; -export declare class FormattingElementList<T extends TreeAdapterTypeMap> { - private treeAdapter; - entries: Entry<T>[]; - bookmark: Entry<T> | null; - constructor(treeAdapter: TreeAdapter<T>); - private _getNoahArkConditionCandidates; - private _ensureNoahArkCondition; - insertMarker(): void; - pushElement(element: T['element'], token: TagToken): void; - insertElementAfterBookmark(element: T['element'], token: TagToken): void; - removeEntry(entry: Entry<T>): void; - /** - * Clears the list of formatting elements up to the last marker. - * - * @see https://html.spec.whatwg.org/multipage/parsing.html#clear-the-list-of-active-formatting-elements-up-to-the-last-marker - */ - clearToLastMarker(): void; - getElementEntryInScopeWithTagName(tagName: string): ElementEntry<T> | null; - getElementEntry(element: T['element']): ElementEntry<T> | undefined; -} -export {}; diff --git a/node_modules/parse5/dist/parser/formatting-element-list.js b/node_modules/parse5/dist/parser/formatting-element-list.js deleted file mode 100644 index 9d56b22..0000000 --- a/node_modules/parse5/dist/parser/formatting-element-list.js +++ /dev/null @@ -1,110 +0,0 @@ -//Const -const NOAH_ARK_CAPACITY = 3; -export var EntryType; -(function (EntryType) { - EntryType[EntryType["Marker"] = 0] = "Marker"; - EntryType[EntryType["Element"] = 1] = "Element"; -})(EntryType || (EntryType = {})); -const MARKER = { type: EntryType.Marker }; -//List of formatting elements -export class FormattingElementList { - constructor(treeAdapter) { - this.treeAdapter = treeAdapter; - this.entries = []; - this.bookmark = null; - } - //Noah Ark's condition - //OPTIMIZATION: at first we try to find possible candidates for exclusion using - //lightweight heuristics without thorough attributes check. - _getNoahArkConditionCandidates(newElement, neAttrs) { - const candidates = []; - const neAttrsLength = neAttrs.length; - const neTagName = this.treeAdapter.getTagName(newElement); - const neNamespaceURI = this.treeAdapter.getNamespaceURI(newElement); - for (let i = 0; i < this.entries.length; i++) { - const entry = this.entries[i]; - if (entry.type === EntryType.Marker) { - break; - } - const { element } = entry; - if (this.treeAdapter.getTagName(element) === neTagName && - this.treeAdapter.getNamespaceURI(element) === neNamespaceURI) { - const elementAttrs = this.treeAdapter.getAttrList(element); - if (elementAttrs.length === neAttrsLength) { - candidates.push({ idx: i, attrs: elementAttrs }); - } - } - } - return candidates; - } - _ensureNoahArkCondition(newElement) { - if (this.entries.length < NOAH_ARK_CAPACITY) - return; - const neAttrs = this.treeAdapter.getAttrList(newElement); - const candidates = this._getNoahArkConditionCandidates(newElement, neAttrs); - if (candidates.length < NOAH_ARK_CAPACITY) - return; - //NOTE: build attrs map for the new element, so we can perform fast lookups - const neAttrsMap = new Map(neAttrs.map((neAttr) => [neAttr.name, neAttr.value])); - let validCandidates = 0; - //NOTE: remove bottommost candidates, until Noah's Ark condition will not be met - for (let i = 0; i < candidates.length; i++) { - const candidate = candidates[i]; - // We know that `candidate.attrs.length === neAttrs.length` - if (candidate.attrs.every((cAttr) => neAttrsMap.get(cAttr.name) === cAttr.value)) { - validCandidates += 1; - if (validCandidates >= NOAH_ARK_CAPACITY) { - this.entries.splice(candidate.idx, 1); - } - } - } - } - //Mutations - insertMarker() { - this.entries.unshift(MARKER); - } - pushElement(element, token) { - this._ensureNoahArkCondition(element); - this.entries.unshift({ - type: EntryType.Element, - element, - token, - }); - } - insertElementAfterBookmark(element, token) { - const bookmarkIdx = this.entries.indexOf(this.bookmark); - this.entries.splice(bookmarkIdx, 0, { - type: EntryType.Element, - element, - token, - }); - } - removeEntry(entry) { - const entryIndex = this.entries.indexOf(entry); - if (entryIndex >= 0) { - this.entries.splice(entryIndex, 1); - } - } - /** - * Clears the list of formatting elements up to the last marker. - * - * @see https://html.spec.whatwg.org/multipage/parsing.html#clear-the-list-of-active-formatting-elements-up-to-the-last-marker - */ - clearToLastMarker() { - const markerIdx = this.entries.indexOf(MARKER); - if (markerIdx >= 0) { - this.entries.splice(0, markerIdx + 1); - } - else { - this.entries.length = 0; - } - } - //Search - getElementEntryInScopeWithTagName(tagName) { - const entry = this.entries.find((entry) => entry.type === EntryType.Marker || this.treeAdapter.getTagName(entry.element) === tagName); - return entry && entry.type === EntryType.Element ? entry : null; - } - getElementEntry(element) { - return this.entries.find((entry) => entry.type === EntryType.Element && entry.element === element); - } -} diff --git a/node_modules/parse5/dist/parser/index.d.ts b/node_modules/parse5/dist/parser/index.d.ts deleted file mode 100644 index 07880e1..0000000 --- a/node_modules/parse5/dist/parser/index.d.ts +++ /dev/null @@ -1,221 +0,0 @@ -import { Tokenizer, TokenizerMode, type TokenHandler } from '../tokenizer/index.js'; -import { OpenElementStack, type StackHandler } from './open-element-stack.js'; -import { FormattingElementList } from './formatting-element-list.js'; -import { ERR, type ParserErrorHandler } from '../common/error-codes.js'; -import { TAG_ID as $, NS } from '../common/html.js'; -import type { TreeAdapter, TreeAdapterTypeMap } from '../tree-adapters/interface.js'; -import { type Token, type CommentToken, type CharacterToken, type TagToken, type DoctypeToken, type EOFToken, type LocationWithAttributes } from '../common/token.js'; -declare enum InsertionMode { - INITIAL = 0, - BEFORE_HTML = 1, - BEFORE_HEAD = 2, - IN_HEAD = 3, - IN_HEAD_NO_SCRIPT = 4, - AFTER_HEAD = 5, - IN_BODY = 6, - TEXT = 7, - IN_TABLE = 8, - IN_TABLE_TEXT = 9, - IN_CAPTION = 10, - IN_COLUMN_GROUP = 11, - IN_TABLE_BODY = 12, - IN_ROW = 13, - IN_CELL = 14, - IN_SELECT = 15, - IN_SELECT_IN_TABLE = 16, - IN_TEMPLATE = 17, - AFTER_BODY = 18, - IN_FRAMESET = 19, - AFTER_FRAMESET = 20, - AFTER_AFTER_BODY = 21, - AFTER_AFTER_FRAMESET = 22 -} -export interface ParserOptions<T extends TreeAdapterTypeMap> { - /** - * The [scripting flag](https://html.spec.whatwg.org/multipage/parsing.html#scripting-flag). If set - * to `true`, `noscript` element content will be parsed as text. - * - * @default `true` - */ - scriptingEnabled?: boolean; - /** - * Enables source code location information. When enabled, each node (except the root node) - * will have a `sourceCodeLocation` property. If the node is not an empty element, `sourceCodeLocation` will - * be a {@link ElementLocation} object, otherwise it will be {@link Location}. - * If the element was implicitly created by the parser (as part of - * [tree correction](https://html.spec.whatwg.org/multipage/syntax.html#an-introduction-to-error-handling-and-strange-cases-in-the-parser)), - * its `sourceCodeLocation` property will be `undefined`. - * - * @default `false` - */ - sourceCodeLocationInfo?: boolean; - /** - * Specifies the resulting tree format. - * - * @default `treeAdapters.default` - */ - treeAdapter?: TreeAdapter<T>; - /** - * Callback for parse errors. - * - * @default `null` - */ - onParseError?: ParserErrorHandler | null; -} -export declare class Parser<T extends TreeAdapterTypeMap> implements TokenHandler, StackHandler<T> { - /** @internal */ - fragmentContext: T['element'] | null; - /** @internal */ - scriptHandler: null | ((pendingScript: T['element']) => void); - treeAdapter: TreeAdapter<T>; - /** @internal */ - onParseError: ParserErrorHandler | null; - protected currentToken: Token | null; - options: Required<ParserOptions<T>>; - document: T['document']; - constructor(options?: ParserOptions<T>, document?: T['document'], - /** @internal */ - fragmentContext?: T['element'] | null, - /** @internal */ - scriptHandler?: null | ((pendingScript: T['element']) => void)); - static parse<T extends TreeAdapterTypeMap>(html: string, options?: ParserOptions<T>): T['document']; - static getFragmentParser<T extends TreeAdapterTypeMap>(fragmentContext?: T['parentNode'] | null, options?: ParserOptions<T>): Parser<T>; - getFragment(): T['documentFragment']; - tokenizer: Tokenizer; - stopped: boolean; - /** @internal */ - insertionMode: InsertionMode; - /** @internal */ - originalInsertionMode: InsertionMode; - /** @internal */ - fragmentContextID: $; - /** @internal */ - headElement: null | T['element']; - /** @internal */ - formElement: null | T['element']; - /** @internal */ - openElements: OpenElementStack<T>; - /** @internal */ - activeFormattingElements: FormattingElementList<T>; - /** Indicates that the current node is not an element in the HTML namespace */ - protected currentNotInHTML: boolean; - /** - * The template insertion mode stack is maintained from the left. - * Ie. the topmost element will always have index 0. - * - * @internal - */ - tmplInsertionModeStack: InsertionMode[]; - /** @internal */ - pendingCharacterTokens: CharacterToken[]; - /** @internal */ - hasNonWhitespacePendingCharacterToken: boolean; - /** @internal */ - framesetOk: boolean; - /** @internal */ - skipNextNewLine: boolean; - /** @internal */ - fosterParentingEnabled: boolean; - /** @internal */ - _err(token: Token, code: ERR, beforeToken?: boolean): void; - /** @internal */ - onItemPush(node: T['parentNode'], tid: number, isTop: boolean): void; - /** @internal */ - onItemPop(node: T['parentNode'], isTop: boolean): void; - protected _setContextModes(current: T['parentNode'], tid: number): void; - /** @protected */ - _switchToTextParsing(currentToken: TagToken, nextTokenizerState: (typeof TokenizerMode)[keyof typeof TokenizerMode]): void; - switchToPlaintextParsing(): void; - /** @protected */ - _getAdjustedCurrentElement(): T['element']; - /** @protected */ - _findFormInFragmentContext(): void; - protected _initTokenizerForFragmentParsing(): void; - /** @protected */ - _setDocumentType(token: DoctypeToken): void; - /** @protected */ - _attachElementToTree(element: T['element'], location: LocationWithAttributes | null): void; - /** - * For self-closing tags. Add an element to the tree, but skip adding it - * to the stack. - */ - /** @protected */ - _appendElement(token: TagToken, namespaceURI: NS): void; - /** @protected */ - _insertElement(token: TagToken, namespaceURI: NS): void; - /** @protected */ - _insertFakeElement(tagName: string, tagID: $): void; - /** @protected */ - _insertTemplate(token: TagToken): void; - /** @protected */ - _insertFakeRootElement(): void; - /** @protected */ - _appendCommentNode(token: CommentToken, parent: T['parentNode']): void; - /** @protected */ - _insertCharacters(token: CharacterToken): void; - /** @protected */ - _adoptNodes(donor: T['parentNode'], recipient: T['parentNode']): void; - /** @protected */ - _setEndLocation(element: T['element'], closingToken: Token): void; - protected shouldProcessStartTagTokenInForeignContent(token: TagToken): boolean; - /** @protected */ - _processToken(token: Token): void; - /** @protected */ - _isIntegrationPoint(tid: $, element: T['element'], foreignNS?: NS): boolean; - /** @protected */ - _reconstructActiveFormattingElements(): void; - /** @protected */ - _closeTableCell(): void; - /** @protected */ - _closePElement(): void; - /** @protected */ - _resetInsertionMode(): void; - /** @protected */ - _resetInsertionModeForSelect(selectIdx: number): void; - /** @protected */ - _isElementCausesFosterParenting(tn: $): boolean; - /** @protected */ - _shouldFosterParentOnInsertion(): boolean; - /** @protected */ - _findFosterParentingLocation(): { - parent: T['parentNode']; - beforeElement: T['element'] | null; - }; - /** @protected */ - _fosterParentElement(element: T['element']): void; - /** @protected */ - _isSpecialElement(element: T['element'], id: $): boolean; - /** @internal */ - onCharacter(token: CharacterToken): void; - /** @internal */ - onNullCharacter(token: CharacterToken): void; - /** @internal */ - onComment(token: CommentToken): void; - /** @internal */ - onDoctype(token: DoctypeToken): void; - /** @internal */ - onStartTag(token: TagToken): void; - /** - * Processes a given start tag. - * - * `onStartTag` checks if a self-closing tag was recognized. When a token - * is moved inbetween multiple insertion modes, this check for self-closing - * could lead to false positives. To avoid this, `_processStartTag` is used - * for nested calls. - * - * @param token The token to process. - * @protected - */ - _processStartTag(token: TagToken): void; - /** @protected */ - _startTagOutsideForeignContent(token: TagToken): void; - /** @internal */ - onEndTag(token: TagToken): void; - /** @protected */ - _endTagOutsideForeignContent(token: TagToken): void; - /** @internal */ - onEof(token: EOFToken): void; - /** @internal */ - onWhitespaceCharacter(token: CharacterToken): void; -} -export {}; diff --git a/node_modules/parse5/dist/parser/index.js b/node_modules/parse5/dist/parser/index.js deleted file mode 100644 index 03c0475..0000000 --- a/node_modules/parse5/dist/parser/index.js +++ /dev/null @@ -1,3240 +0,0 @@ -import { Tokenizer, TokenizerMode } from '../tokenizer/index.js'; -import { OpenElementStack } from './open-element-stack.js'; -import { FormattingElementList, EntryType } from './formatting-element-list.js'; -import { defaultTreeAdapter } from '../tree-adapters/default.js'; -import * as doctype from '../common/doctype.js'; -import * as foreignContent from '../common/foreign-content.js'; -import { ERR } from '../common/error-codes.js'; -import * as unicode from '../common/unicode.js'; -import { TAG_ID as $, TAG_NAMES as TN, NS, ATTRS, SPECIAL_ELEMENTS, DOCUMENT_MODE, NUMBERED_HEADERS, getTagID, } from '../common/html.js'; -import { TokenType, getTokenAttr, } from '../common/token.js'; -//Misc constants -const HIDDEN_INPUT_TYPE = 'hidden'; -//Adoption agency loops iteration count -const AA_OUTER_LOOP_ITER = 8; -const AA_INNER_LOOP_ITER = 3; -//Insertion modes -var InsertionMode; -(function (InsertionMode) { - InsertionMode[InsertionMode["INITIAL"] = 0] = "INITIAL"; - InsertionMode[InsertionMode["BEFORE_HTML"] = 1] = "BEFORE_HTML"; - InsertionMode[InsertionMode["BEFORE_HEAD"] = 2] = "BEFORE_HEAD"; - InsertionMode[InsertionMode["IN_HEAD"] = 3] = "IN_HEAD"; - InsertionMode[InsertionMode["IN_HEAD_NO_SCRIPT"] = 4] = "IN_HEAD_NO_SCRIPT"; - InsertionMode[InsertionMode["AFTER_HEAD"] = 5] = "AFTER_HEAD"; - InsertionMode[InsertionMode["IN_BODY"] = 6] = "IN_BODY"; - InsertionMode[InsertionMode["TEXT"] = 7] = "TEXT"; - InsertionMode[InsertionMode["IN_TABLE"] = 8] = "IN_TABLE"; - InsertionMode[InsertionMode["IN_TABLE_TEXT"] = 9] = "IN_TABLE_TEXT"; - InsertionMode[InsertionMode["IN_CAPTION"] = 10] = "IN_CAPTION"; - InsertionMode[InsertionMode["IN_COLUMN_GROUP"] = 11] = "IN_COLUMN_GROUP"; - InsertionMode[InsertionMode["IN_TABLE_BODY"] = 12] = "IN_TABLE_BODY"; - InsertionMode[InsertionMode["IN_ROW"] = 13] = "IN_ROW"; - InsertionMode[InsertionMode["IN_CELL"] = 14] = "IN_CELL"; - InsertionMode[InsertionMode["IN_SELECT"] = 15] = "IN_SELECT"; - InsertionMode[InsertionMode["IN_SELECT_IN_TABLE"] = 16] = "IN_SELECT_IN_TABLE"; - InsertionMode[InsertionMode["IN_TEMPLATE"] = 17] = "IN_TEMPLATE"; - InsertionMode[InsertionMode["AFTER_BODY"] = 18] = "AFTER_BODY"; - InsertionMode[InsertionMode["IN_FRAMESET"] = 19] = "IN_FRAMESET"; - InsertionMode[InsertionMode["AFTER_FRAMESET"] = 20] = "AFTER_FRAMESET"; - InsertionMode[InsertionMode["AFTER_AFTER_BODY"] = 21] = "AFTER_AFTER_BODY"; - InsertionMode[InsertionMode["AFTER_AFTER_FRAMESET"] = 22] = "AFTER_AFTER_FRAMESET"; -})(InsertionMode || (InsertionMode = {})); -const BASE_LOC = { - startLine: -1, - startCol: -1, - startOffset: -1, - endLine: -1, - endCol: -1, - endOffset: -1, -}; -const TABLE_STRUCTURE_TAGS = new Set([$.TABLE, $.TBODY, $.TFOOT, $.THEAD, $.TR]); -const defaultParserOptions = { - scriptingEnabled: true, - sourceCodeLocationInfo: false, - treeAdapter: defaultTreeAdapter, - onParseError: null, -}; -//Parser -export class Parser { - constructor(options, document, - /** @internal */ - fragmentContext = null, - /** @internal */ - scriptHandler = null) { - this.fragmentContext = fragmentContext; - this.scriptHandler = scriptHandler; - this.currentToken = null; - this.stopped = false; - /** @internal */ - this.insertionMode = InsertionMode.INITIAL; - /** @internal */ - this.originalInsertionMode = InsertionMode.INITIAL; - /** @internal */ - this.headElement = null; - /** @internal */ - this.formElement = null; - /** Indicates that the current node is not an element in the HTML namespace */ - this.currentNotInHTML = false; - /** - * The template insertion mode stack is maintained from the left. - * Ie. the topmost element will always have index 0. - * - * @internal - */ - this.tmplInsertionModeStack = []; - /** @internal */ - this.pendingCharacterTokens = []; - /** @internal */ - this.hasNonWhitespacePendingCharacterToken = false; - /** @internal */ - this.framesetOk = true; - /** @internal */ - this.skipNextNewLine = false; - /** @internal */ - this.fosterParentingEnabled = false; - this.options = { - ...defaultParserOptions, - ...options, - }; - this.treeAdapter = this.options.treeAdapter; - this.onParseError = this.options.onParseError; - // Always enable location info if we report parse errors. - if (this.onParseError) { - this.options.sourceCodeLocationInfo = true; - } - this.document = document !== null && document !== void 0 ? document : this.treeAdapter.createDocument(); - this.tokenizer = new Tokenizer(this.options, this); - this.activeFormattingElements = new FormattingElementList(this.treeAdapter); - this.fragmentContextID = fragmentContext ? getTagID(this.treeAdapter.getTagName(fragmentContext)) : $.UNKNOWN; - this._setContextModes(fragmentContext !== null && fragmentContext !== void 0 ? fragmentContext : this.document, this.fragmentContextID); - this.openElements = new OpenElementStack(this.document, this.treeAdapter, this); - } - // API - static parse(html, options) { - const parser = new this(options); - parser.tokenizer.write(html, true); - return parser.document; - } - static getFragmentParser(fragmentContext, options) { - const opts = { - ...defaultParserOptions, - ...options, - }; - //NOTE: use a <template> element as the fragment context if no context element was provided, - //so we will parse in a "forgiving" manner - fragmentContext !== null && fragmentContext !== void 0 ? fragmentContext : (fragmentContext = opts.treeAdapter.createElement(TN.TEMPLATE, NS.HTML, [])); - //NOTE: create a fake element which will be used as the `document` for fragment parsing. - //This is important for jsdom, where a new `document` cannot be created. This led to - //fragment parsing messing with the main `document`. - const documentMock = opts.treeAdapter.createElement('documentmock', NS.HTML, []); - const parser = new this(opts, documentMock, fragmentContext); - if (parser.fragmentContextID === $.TEMPLATE) { - parser.tmplInsertionModeStack.unshift(InsertionMode.IN_TEMPLATE); - } - parser._initTokenizerForFragmentParsing(); - parser._insertFakeRootElement(); - parser._resetInsertionMode(); - parser._findFormInFragmentContext(); - return parser; - } - getFragment() { - const rootElement = this.treeAdapter.getFirstChild(this.document); - const fragment = this.treeAdapter.createDocumentFragment(); - this._adoptNodes(rootElement, fragment); - return fragment; - } - //Errors - /** @internal */ - _err(token, code, beforeToken) { - var _a; - if (!this.onParseError) - return; - const loc = (_a = token.location) !== null && _a !== void 0 ? _a : BASE_LOC; - const err = { - code, - startLine: loc.startLine, - startCol: loc.startCol, - startOffset: loc.startOffset, - endLine: beforeToken ? loc.startLine : loc.endLine, - endCol: beforeToken ? loc.startCol : loc.endCol, - endOffset: beforeToken ? loc.startOffset : loc.endOffset, - }; - this.onParseError(err); - } - //Stack events - /** @internal */ - onItemPush(node, tid, isTop) { - var _a, _b; - (_b = (_a = this.treeAdapter).onItemPush) === null || _b === void 0 ? void 0 : _b.call(_a, node); - if (isTop && this.openElements.stackTop > 0) - this._setContextModes(node, tid); - } - /** @internal */ - onItemPop(node, isTop) { - var _a, _b; - if (this.options.sourceCodeLocationInfo) { - this._setEndLocation(node, this.currentToken); - } - (_b = (_a = this.treeAdapter).onItemPop) === null || _b === void 0 ? void 0 : _b.call(_a, node, this.openElements.current); - if (isTop) { - let current; - let currentTagId; - if (this.openElements.stackTop === 0 && this.fragmentContext) { - current = this.fragmentContext; - currentTagId = this.fragmentContextID; - } - else { - ({ current, currentTagId } = this.openElements); - } - this._setContextModes(current, currentTagId); - } - } - _setContextModes(current, tid) { - const isHTML = current === this.document || this.treeAdapter.getNamespaceURI(current) === NS.HTML; - this.currentNotInHTML = !isHTML; - this.tokenizer.inForeignNode = !isHTML && !this._isIntegrationPoint(tid, current); - } - /** @protected */ - _switchToTextParsing(currentToken, nextTokenizerState) { - this._insertElement(currentToken, NS.HTML); - this.tokenizer.state = nextTokenizerState; - this.originalInsertionMode = this.insertionMode; - this.insertionMode = InsertionMode.TEXT; - } - switchToPlaintextParsing() { - this.insertionMode = InsertionMode.TEXT; - this.originalInsertionMode = InsertionMode.IN_BODY; - this.tokenizer.state = TokenizerMode.PLAINTEXT; - } - //Fragment parsing - /** @protected */ - _getAdjustedCurrentElement() { - return this.openElements.stackTop === 0 && this.fragmentContext - ? this.fragmentContext - : this.openElements.current; - } - /** @protected */ - _findFormInFragmentContext() { - let node = this.fragmentContext; - while (node) { - if (this.treeAdapter.getTagName(node) === TN.FORM) { - this.formElement = node; - break; - } - node = this.treeAdapter.getParentNode(node); - } - } - _initTokenizerForFragmentParsing() { - if (!this.fragmentContext || this.treeAdapter.getNamespaceURI(this.fragmentContext) !== NS.HTML) { - return; - } - switch (this.fragmentContextID) { - case $.TITLE: - case $.TEXTAREA: { - this.tokenizer.state = TokenizerMode.RCDATA; - break; - } - case $.STYLE: - case $.XMP: - case $.IFRAME: - case $.NOEMBED: - case $.NOFRAMES: - case $.NOSCRIPT: { - this.tokenizer.state = TokenizerMode.RAWTEXT; - break; - } - case $.SCRIPT: { - this.tokenizer.state = TokenizerMode.SCRIPT_DATA; - break; - } - case $.PLAINTEXT: { - this.tokenizer.state = TokenizerMode.PLAINTEXT; - break; - } - default: - // Do nothing - } - } - //Tree mutation - /** @protected */ - _setDocumentType(token) { - const name = token.name || ''; - const publicId = token.publicId || ''; - const systemId = token.systemId || ''; - this.treeAdapter.setDocumentType(this.document, name, publicId, systemId); - if (token.location) { - const documentChildren = this.treeAdapter.getChildNodes(this.document); - const docTypeNode = documentChildren.find((node) => this.treeAdapter.isDocumentTypeNode(node)); - if (docTypeNode) { - this.treeAdapter.setNodeSourceCodeLocation(docTypeNode, token.location); - } - } - } - /** @protected */ - _attachElementToTree(element, location) { - if (this.options.sourceCodeLocationInfo) { - const loc = location && { - ...location, - startTag: location, - }; - this.treeAdapter.setNodeSourceCodeLocation(element, loc); - } - if (this._shouldFosterParentOnInsertion()) { - this._fosterParentElement(element); - } - else { - const parent = this.openElements.currentTmplContentOrNode; - this.treeAdapter.appendChild(parent, element); - } - } - /** - * For self-closing tags. Add an element to the tree, but skip adding it - * to the stack. - */ - /** @protected */ - _appendElement(token, namespaceURI) { - const element = this.treeAdapter.createElement(token.tagName, namespaceURI, token.attrs); - this._attachElementToTree(element, token.location); - } - /** @protected */ - _insertElement(token, namespaceURI) { - const element = this.treeAdapter.createElement(token.tagName, namespaceURI, token.attrs); - this._attachElementToTree(element, token.location); - this.openElements.push(element, token.tagID); - } - /** @protected */ - _insertFakeElement(tagName, tagID) { - const element = this.treeAdapter.createElement(tagName, NS.HTML, []); - this._attachElementToTree(element, null); - this.openElements.push(element, tagID); - } - /** @protected */ - _insertTemplate(token) { - const tmpl = this.treeAdapter.createElement(token.tagName, NS.HTML, token.attrs); - const content = this.treeAdapter.createDocumentFragment(); - this.treeAdapter.setTemplateContent(tmpl, content); - this._attachElementToTree(tmpl, token.location); - this.openElements.push(tmpl, token.tagID); - if (this.options.sourceCodeLocationInfo) - this.treeAdapter.setNodeSourceCodeLocation(content, null); - } - /** @protected */ - _insertFakeRootElement() { - const element = this.treeAdapter.createElement(TN.HTML, NS.HTML, []); - if (this.options.sourceCodeLocationInfo) - this.treeAdapter.setNodeSourceCodeLocation(element, null); - this.treeAdapter.appendChild(this.openElements.current, element); - this.openElements.push(element, $.HTML); - } - /** @protected */ - _appendCommentNode(token, parent) { - const commentNode = this.treeAdapter.createCommentNode(token.data); - this.treeAdapter.appendChild(parent, commentNode); - if (this.options.sourceCodeLocationInfo) { - this.treeAdapter.setNodeSourceCodeLocation(commentNode, token.location); - } - } - /** @protected */ - _insertCharacters(token) { - let parent; - let beforeElement; - if (this._shouldFosterParentOnInsertion()) { - ({ parent, beforeElement } = this._findFosterParentingLocation()); - if (beforeElement) { - this.treeAdapter.insertTextBefore(parent, token.chars, beforeElement); - } - else { - this.treeAdapter.insertText(parent, token.chars); - } - } - else { - parent = this.openElements.currentTmplContentOrNode; - this.treeAdapter.insertText(parent, token.chars); - } - if (!token.location) - return; - const siblings = this.treeAdapter.getChildNodes(parent); - const textNodeIdx = beforeElement ? siblings.lastIndexOf(beforeElement) : siblings.length; - const textNode = siblings[textNodeIdx - 1]; - //NOTE: if we have a location assigned by another token, then just update the end position - const tnLoc = this.treeAdapter.getNodeSourceCodeLocation(textNode); - if (tnLoc) { - const { endLine, endCol, endOffset } = token.location; - this.treeAdapter.updateNodeSourceCodeLocation(textNode, { endLine, endCol, endOffset }); - } - else if (this.options.sourceCodeLocationInfo) { - this.treeAdapter.setNodeSourceCodeLocation(textNode, token.location); - } - } - /** @protected */ - _adoptNodes(donor, recipient) { - for (let child = this.treeAdapter.getFirstChild(donor); child; child = this.treeAdapter.getFirstChild(donor)) { - this.treeAdapter.detachNode(child); - this.treeAdapter.appendChild(recipient, child); - } - } - /** @protected */ - _setEndLocation(element, closingToken) { - if (this.treeAdapter.getNodeSourceCodeLocation(element) && closingToken.location) { - const ctLoc = closingToken.location; - const tn = this.treeAdapter.getTagName(element); - const endLoc = - // NOTE: For cases like <p> <p> </p> - First 'p' closes without a closing - // tag and for cases like <td> <p> </td> - 'p' closes without a closing tag. - closingToken.type === TokenType.END_TAG && tn === closingToken.tagName - ? { - endTag: { ...ctLoc }, - endLine: ctLoc.endLine, - endCol: ctLoc.endCol, - endOffset: ctLoc.endOffset, - } - : { - endLine: ctLoc.startLine, - endCol: ctLoc.startCol, - endOffset: ctLoc.startOffset, - }; - this.treeAdapter.updateNodeSourceCodeLocation(element, endLoc); - } - } - //Token processing - shouldProcessStartTagTokenInForeignContent(token) { - // Check that neither current === document, or ns === NS.HTML - if (!this.currentNotInHTML) - return false; - let current; - let currentTagId; - if (this.openElements.stackTop === 0 && this.fragmentContext) { - current = this.fragmentContext; - currentTagId = this.fragmentContextID; - } - else { - ({ current, currentTagId } = this.openElements); - } - if (token.tagID === $.SVG && - this.treeAdapter.getTagName(current) === TN.ANNOTATION_XML && - this.treeAdapter.getNamespaceURI(current) === NS.MATHML) { - return false; - } - return ( - // Check that `current` is not an integration point for HTML or MathML elements. - this.tokenizer.inForeignNode || - // If it _is_ an integration point, then we might have to check that it is not an HTML - // integration point. - ((token.tagID === $.MGLYPH || token.tagID === $.MALIGNMARK) && - !this._isIntegrationPoint(currentTagId, current, NS.HTML))); - } - /** @protected */ - _processToken(token) { - switch (token.type) { - case TokenType.CHARACTER: { - this.onCharacter(token); - break; - } - case TokenType.NULL_CHARACTER: { - this.onNullCharacter(token); - break; - } - case TokenType.COMMENT: { - this.onComment(token); - break; - } - case TokenType.DOCTYPE: { - this.onDoctype(token); - break; - } - case TokenType.START_TAG: { - this._processStartTag(token); - break; - } - case TokenType.END_TAG: { - this.onEndTag(token); - break; - } - case TokenType.EOF: { - this.onEof(token); - break; - } - case TokenType.WHITESPACE_CHARACTER: { - this.onWhitespaceCharacter(token); - break; - } - } - } - //Integration points - /** @protected */ - _isIntegrationPoint(tid, element, foreignNS) { - const ns = this.treeAdapter.getNamespaceURI(element); - const attrs = this.treeAdapter.getAttrList(element); - return foreignContent.isIntegrationPoint(tid, ns, attrs, foreignNS); - } - //Active formatting elements reconstruction - /** @protected */ - _reconstructActiveFormattingElements() { - const listLength = this.activeFormattingElements.entries.length; - if (listLength) { - const endIndex = this.activeFormattingElements.entries.findIndex((entry) => entry.type === EntryType.Marker || this.openElements.contains(entry.element)); - const unopenIdx = endIndex < 0 ? listLength - 1 : endIndex - 1; - for (let i = unopenIdx; i >= 0; i--) { - const entry = this.activeFormattingElements.entries[i]; - this._insertElement(entry.token, this.treeAdapter.getNamespaceURI(entry.element)); - entry.element = this.openElements.current; - } - } - } - //Close elements - /** @protected */ - _closeTableCell() { - this.openElements.generateImpliedEndTags(); - this.openElements.popUntilTableCellPopped(); - this.activeFormattingElements.clearToLastMarker(); - this.insertionMode = InsertionMode.IN_ROW; - } - /** @protected */ - _closePElement() { - this.openElements.generateImpliedEndTagsWithExclusion($.P); - this.openElements.popUntilTagNamePopped($.P); - } - //Insertion modes - /** @protected */ - _resetInsertionMode() { - for (let i = this.openElements.stackTop; i >= 0; i--) { - //Insertion mode reset map - switch (i === 0 && this.fragmentContext ? this.fragmentContextID : this.openElements.tagIDs[i]) { - case $.TR: { - this.insertionMode = InsertionMode.IN_ROW; - return; - } - case $.TBODY: - case $.THEAD: - case $.TFOOT: { - this.insertionMode = InsertionMode.IN_TABLE_BODY; - return; - } - case $.CAPTION: { - this.insertionMode = InsertionMode.IN_CAPTION; - return; - } - case $.COLGROUP: { - this.insertionMode = InsertionMode.IN_COLUMN_GROUP; - return; - } - case $.TABLE: { - this.insertionMode = InsertionMode.IN_TABLE; - return; - } - case $.BODY: { - this.insertionMode = InsertionMode.IN_BODY; - return; - } - case $.FRAMESET: { - this.insertionMode = InsertionMode.IN_FRAMESET; - return; - } - case $.SELECT: { - this._resetInsertionModeForSelect(i); - return; - } - case $.TEMPLATE: { - this.insertionMode = this.tmplInsertionModeStack[0]; - return; - } - case $.HTML: { - this.insertionMode = this.headElement ? InsertionMode.AFTER_HEAD : InsertionMode.BEFORE_HEAD; - return; - } - case $.TD: - case $.TH: { - if (i > 0) { - this.insertionMode = InsertionMode.IN_CELL; - return; - } - break; - } - case $.HEAD: { - if (i > 0) { - this.insertionMode = InsertionMode.IN_HEAD; - return; - } - break; - } - } - } - this.insertionMode = InsertionMode.IN_BODY; - } - /** @protected */ - _resetInsertionModeForSelect(selectIdx) { - if (selectIdx > 0) { - for (let i = selectIdx - 1; i > 0; i--) { - const tn = this.openElements.tagIDs[i]; - if (tn === $.TEMPLATE) { - break; - } - else if (tn === $.TABLE) { - this.insertionMode = InsertionMode.IN_SELECT_IN_TABLE; - return; - } - } - } - this.insertionMode = InsertionMode.IN_SELECT; - } - //Foster parenting - /** @protected */ - _isElementCausesFosterParenting(tn) { - return TABLE_STRUCTURE_TAGS.has(tn); - } - /** @protected */ - _shouldFosterParentOnInsertion() { - return this.fosterParentingEnabled && this._isElementCausesFosterParenting(this.openElements.currentTagId); - } - /** @protected */ - _findFosterParentingLocation() { - for (let i = this.openElements.stackTop; i >= 0; i--) { - const openElement = this.openElements.items[i]; - switch (this.openElements.tagIDs[i]) { - case $.TEMPLATE: { - if (this.treeAdapter.getNamespaceURI(openElement) === NS.HTML) { - return { parent: this.treeAdapter.getTemplateContent(openElement), beforeElement: null }; - } - break; - } - case $.TABLE: { - const parent = this.treeAdapter.getParentNode(openElement); - if (parent) { - return { parent, beforeElement: openElement }; - } - return { parent: this.openElements.items[i - 1], beforeElement: null }; - } - default: - // Do nothing - } - } - return { parent: this.openElements.items[0], beforeElement: null }; - } - /** @protected */ - _fosterParentElement(element) { - const location = this._findFosterParentingLocation(); - if (location.beforeElement) { - this.treeAdapter.insertBefore(location.parent, element, location.beforeElement); - } - else { - this.treeAdapter.appendChild(location.parent, element); - } - } - //Special elements - /** @protected */ - _isSpecialElement(element, id) { - const ns = this.treeAdapter.getNamespaceURI(element); - return SPECIAL_ELEMENTS[ns].has(id); - } - /** @internal */ - onCharacter(token) { - this.skipNextNewLine = false; - if (this.tokenizer.inForeignNode) { - characterInForeignContent(this, token); - return; - } - switch (this.insertionMode) { - case InsertionMode.INITIAL: { - tokenInInitialMode(this, token); - break; - } - case InsertionMode.BEFORE_HTML: { - tokenBeforeHtml(this, token); - break; - } - case InsertionMode.BEFORE_HEAD: { - tokenBeforeHead(this, token); - break; - } - case InsertionMode.IN_HEAD: { - tokenInHead(this, token); - break; - } - case InsertionMode.IN_HEAD_NO_SCRIPT: { - tokenInHeadNoScript(this, token); - break; - } - case InsertionMode.AFTER_HEAD: { - tokenAfterHead(this, token); - break; - } - case InsertionMode.IN_BODY: - case InsertionMode.IN_CAPTION: - case InsertionMode.IN_CELL: - case InsertionMode.IN_TEMPLATE: { - characterInBody(this, token); - break; - } - case InsertionMode.TEXT: - case InsertionMode.IN_SELECT: - case InsertionMode.IN_SELECT_IN_TABLE: { - this._insertCharacters(token); - break; - } - case InsertionMode.IN_TABLE: - case InsertionMode.IN_TABLE_BODY: - case InsertionMode.IN_ROW: { - characterInTable(this, token); - break; - } - case InsertionMode.IN_TABLE_TEXT: { - characterInTableText(this, token); - break; - } - case InsertionMode.IN_COLUMN_GROUP: { - tokenInColumnGroup(this, token); - break; - } - case InsertionMode.AFTER_BODY: { - tokenAfterBody(this, token); - break; - } - case InsertionMode.AFTER_AFTER_BODY: { - tokenAfterAfterBody(this, token); - break; - } - default: - // Do nothing - } - } - /** @internal */ - onNullCharacter(token) { - this.skipNextNewLine = false; - if (this.tokenizer.inForeignNode) { - nullCharacterInForeignContent(this, token); - return; - } - switch (this.insertionMode) { - case InsertionMode.INITIAL: { - tokenInInitialMode(this, token); - break; - } - case InsertionMode.BEFORE_HTML: { - tokenBeforeHtml(this, token); - break; - } - case InsertionMode.BEFORE_HEAD: { - tokenBeforeHead(this, token); - break; - } - case InsertionMode.IN_HEAD: { - tokenInHead(this, token); - break; - } - case InsertionMode.IN_HEAD_NO_SCRIPT: { - tokenInHeadNoScript(this, token); - break; - } - case InsertionMode.AFTER_HEAD: { - tokenAfterHead(this, token); - break; - } - case InsertionMode.TEXT: { - this._insertCharacters(token); - break; - } - case InsertionMode.IN_TABLE: - case InsertionMode.IN_TABLE_BODY: - case InsertionMode.IN_ROW: { - characterInTable(this, token); - break; - } - case InsertionMode.IN_COLUMN_GROUP: { - tokenInColumnGroup(this, token); - break; - } - case InsertionMode.AFTER_BODY: { - tokenAfterBody(this, token); - break; - } - case InsertionMode.AFTER_AFTER_BODY: { - tokenAfterAfterBody(this, token); - break; - } - default: - // Do nothing - } - } - /** @internal */ - onComment(token) { - this.skipNextNewLine = false; - if (this.currentNotInHTML) { - appendComment(this, token); - return; - } - switch (this.insertionMode) { - case InsertionMode.INITIAL: - case InsertionMode.BEFORE_HTML: - case InsertionMode.BEFORE_HEAD: - case InsertionMode.IN_HEAD: - case InsertionMode.IN_HEAD_NO_SCRIPT: - case InsertionMode.AFTER_HEAD: - case InsertionMode.IN_BODY: - case InsertionMode.IN_TABLE: - case InsertionMode.IN_CAPTION: - case InsertionMode.IN_COLUMN_GROUP: - case InsertionMode.IN_TABLE_BODY: - case InsertionMode.IN_ROW: - case InsertionMode.IN_CELL: - case InsertionMode.IN_SELECT: - case InsertionMode.IN_SELECT_IN_TABLE: - case InsertionMode.IN_TEMPLATE: - case InsertionMode.IN_FRAMESET: - case InsertionMode.AFTER_FRAMESET: { - appendComment(this, token); - break; - } - case InsertionMode.IN_TABLE_TEXT: { - tokenInTableText(this, token); - break; - } - case InsertionMode.AFTER_BODY: { - appendCommentToRootHtmlElement(this, token); - break; - } - case InsertionMode.AFTER_AFTER_BODY: - case InsertionMode.AFTER_AFTER_FRAMESET: { - appendCommentToDocument(this, token); - break; - } - default: - // Do nothing - } - } - /** @internal */ - onDoctype(token) { - this.skipNextNewLine = false; - switch (this.insertionMode) { - case InsertionMode.INITIAL: { - doctypeInInitialMode(this, token); - break; - } - case InsertionMode.BEFORE_HEAD: - case InsertionMode.IN_HEAD: - case InsertionMode.IN_HEAD_NO_SCRIPT: - case InsertionMode.AFTER_HEAD: { - this._err(token, ERR.misplacedDoctype); - break; - } - case InsertionMode.IN_TABLE_TEXT: { - tokenInTableText(this, token); - break; - } - default: - // Do nothing - } - } - /** @internal */ - onStartTag(token) { - this.skipNextNewLine = false; - this.currentToken = token; - this._processStartTag(token); - if (token.selfClosing && !token.ackSelfClosing) { - this._err(token, ERR.nonVoidHtmlElementStartTagWithTrailingSolidus); - } - } - /** - * Processes a given start tag. - * - * `onStartTag` checks if a self-closing tag was recognized. When a token - * is moved inbetween multiple insertion modes, this check for self-closing - * could lead to false positives. To avoid this, `_processStartTag` is used - * for nested calls. - * - * @param token The token to process. - * @protected - */ - _processStartTag(token) { - if (this.shouldProcessStartTagTokenInForeignContent(token)) { - startTagInForeignContent(this, token); - } - else { - this._startTagOutsideForeignContent(token); - } - } - /** @protected */ - _startTagOutsideForeignContent(token) { - switch (this.insertionMode) { - case InsertionMode.INITIAL: { - tokenInInitialMode(this, token); - break; - } - case InsertionMode.BEFORE_HTML: { - startTagBeforeHtml(this, token); - break; - } - case InsertionMode.BEFORE_HEAD: { - startTagBeforeHead(this, token); - break; - } - case InsertionMode.IN_HEAD: { - startTagInHead(this, token); - break; - } - case InsertionMode.IN_HEAD_NO_SCRIPT: { - startTagInHeadNoScript(this, token); - break; - } - case InsertionMode.AFTER_HEAD: { - startTagAfterHead(this, token); - break; - } - case InsertionMode.IN_BODY: { - startTagInBody(this, token); - break; - } - case InsertionMode.IN_TABLE: { - startTagInTable(this, token); - break; - } - case InsertionMode.IN_TABLE_TEXT: { - tokenInTableText(this, token); - break; - } - case InsertionMode.IN_CAPTION: { - startTagInCaption(this, token); - break; - } - case InsertionMode.IN_COLUMN_GROUP: { - startTagInColumnGroup(this, token); - break; - } - case InsertionMode.IN_TABLE_BODY: { - startTagInTableBody(this, token); - break; - } - case InsertionMode.IN_ROW: { - startTagInRow(this, token); - break; - } - case InsertionMode.IN_CELL: { - startTagInCell(this, token); - break; - } - case InsertionMode.IN_SELECT: { - startTagInSelect(this, token); - break; - } - case InsertionMode.IN_SELECT_IN_TABLE: { - startTagInSelectInTable(this, token); - break; - } - case InsertionMode.IN_TEMPLATE: { - startTagInTemplate(this, token); - break; - } - case InsertionMode.AFTER_BODY: { - startTagAfterBody(this, token); - break; - } - case InsertionMode.IN_FRAMESET: { - startTagInFrameset(this, token); - break; - } - case InsertionMode.AFTER_FRAMESET: { - startTagAfterFrameset(this, token); - break; - } - case InsertionMode.AFTER_AFTER_BODY: { - startTagAfterAfterBody(this, token); - break; - } - case InsertionMode.AFTER_AFTER_FRAMESET: { - startTagAfterAfterFrameset(this, token); - break; - } - default: - // Do nothing - } - } - /** @internal */ - onEndTag(token) { - this.skipNextNewLine = false; - this.currentToken = token; - if (this.currentNotInHTML) { - endTagInForeignContent(this, token); - } - else { - this._endTagOutsideForeignContent(token); - } - } - /** @protected */ - _endTagOutsideForeignContent(token) { - switch (this.insertionMode) { - case InsertionMode.INITIAL: { - tokenInInitialMode(this, token); - break; - } - case InsertionMode.BEFORE_HTML: { - endTagBeforeHtml(this, token); - break; - } - case InsertionMode.BEFORE_HEAD: { - endTagBeforeHead(this, token); - break; - } - case InsertionMode.IN_HEAD: { - endTagInHead(this, token); - break; - } - case InsertionMode.IN_HEAD_NO_SCRIPT: { - endTagInHeadNoScript(this, token); - break; - } - case InsertionMode.AFTER_HEAD: { - endTagAfterHead(this, token); - break; - } - case InsertionMode.IN_BODY: { - endTagInBody(this, token); - break; - } - case InsertionMode.TEXT: { - endTagInText(this, token); - break; - } - case InsertionMode.IN_TABLE: { - endTagInTable(this, token); - break; - } - case InsertionMode.IN_TABLE_TEXT: { - tokenInTableText(this, token); - break; - } - case InsertionMode.IN_CAPTION: { - endTagInCaption(this, token); - break; - } - case InsertionMode.IN_COLUMN_GROUP: { - endTagInColumnGroup(this, token); - break; - } - case InsertionMode.IN_TABLE_BODY: { - endTagInTableBody(this, token); - break; - } - case InsertionMode.IN_ROW: { - endTagInRow(this, token); - break; - } - case InsertionMode.IN_CELL: { - endTagInCell(this, token); - break; - } - case InsertionMode.IN_SELECT: { - endTagInSelect(this, token); - break; - } - case InsertionMode.IN_SELECT_IN_TABLE: { - endTagInSelectInTable(this, token); - break; - } - case InsertionMode.IN_TEMPLATE: { - endTagInTemplate(this, token); - break; - } - case InsertionMode.AFTER_BODY: { - endTagAfterBody(this, token); - break; - } - case InsertionMode.IN_FRAMESET: { - endTagInFrameset(this, token); - break; - } - case InsertionMode.AFTER_FRAMESET: { - endTagAfterFrameset(this, token); - break; - } - case InsertionMode.AFTER_AFTER_BODY: { - tokenAfterAfterBody(this, token); - break; - } - default: - // Do nothing - } - } - /** @internal */ - onEof(token) { - switch (this.insertionMode) { - case InsertionMode.INITIAL: { - tokenInInitialMode(this, token); - break; - } - case InsertionMode.BEFORE_HTML: { - tokenBeforeHtml(this, token); - break; - } - case InsertionMode.BEFORE_HEAD: { - tokenBeforeHead(this, token); - break; - } - case InsertionMode.IN_HEAD: { - tokenInHead(this, token); - break; - } - case InsertionMode.IN_HEAD_NO_SCRIPT: { - tokenInHeadNoScript(this, token); - break; - } - case InsertionMode.AFTER_HEAD: { - tokenAfterHead(this, token); - break; - } - case InsertionMode.IN_BODY: - case InsertionMode.IN_TABLE: - case InsertionMode.IN_CAPTION: - case InsertionMode.IN_COLUMN_GROUP: - case InsertionMode.IN_TABLE_BODY: - case InsertionMode.IN_ROW: - case InsertionMode.IN_CELL: - case InsertionMode.IN_SELECT: - case InsertionMode.IN_SELECT_IN_TABLE: { - eofInBody(this, token); - break; - } - case InsertionMode.TEXT: { - eofInText(this, token); - break; - } - case InsertionMode.IN_TABLE_TEXT: { - tokenInTableText(this, token); - break; - } - case InsertionMode.IN_TEMPLATE: { - eofInTemplate(this, token); - break; - } - case InsertionMode.AFTER_BODY: - case InsertionMode.IN_FRAMESET: - case InsertionMode.AFTER_FRAMESET: - case InsertionMode.AFTER_AFTER_BODY: - case InsertionMode.AFTER_AFTER_FRAMESET: { - stopParsing(this, token); - break; - } - default: - // Do nothing - } - } - /** @internal */ - onWhitespaceCharacter(token) { - if (this.skipNextNewLine) { - this.skipNextNewLine = false; - if (token.chars.charCodeAt(0) === unicode.CODE_POINTS.LINE_FEED) { - if (token.chars.length === 1) { - return; - } - token.chars = token.chars.substr(1); - } - } - if (this.tokenizer.inForeignNode) { - this._insertCharacters(token); - return; - } - switch (this.insertionMode) { - case InsertionMode.IN_HEAD: - case InsertionMode.IN_HEAD_NO_SCRIPT: - case InsertionMode.AFTER_HEAD: - case InsertionMode.TEXT: - case InsertionMode.IN_COLUMN_GROUP: - case InsertionMode.IN_SELECT: - case InsertionMode.IN_SELECT_IN_TABLE: - case InsertionMode.IN_FRAMESET: - case InsertionMode.AFTER_FRAMESET: { - this._insertCharacters(token); - break; - } - case InsertionMode.IN_BODY: - case InsertionMode.IN_CAPTION: - case InsertionMode.IN_CELL: - case InsertionMode.IN_TEMPLATE: - case InsertionMode.AFTER_BODY: - case InsertionMode.AFTER_AFTER_BODY: - case InsertionMode.AFTER_AFTER_FRAMESET: { - whitespaceCharacterInBody(this, token); - break; - } - case InsertionMode.IN_TABLE: - case InsertionMode.IN_TABLE_BODY: - case InsertionMode.IN_ROW: { - characterInTable(this, token); - break; - } - case InsertionMode.IN_TABLE_TEXT: { - whitespaceCharacterInTableText(this, token); - break; - } - default: - // Do nothing - } - } -} -//Adoption agency algorithm -//(see: http://www.whatwg.org/specs/web-apps/current-work/multipage/tree-construction.html#adoptionAgency) -//------------------------------------------------------------------ -//Steps 5-8 of the algorithm -function aaObtainFormattingElementEntry(p, token) { - let formattingElementEntry = p.activeFormattingElements.getElementEntryInScopeWithTagName(token.tagName); - if (formattingElementEntry) { - if (!p.openElements.contains(formattingElementEntry.element)) { - p.activeFormattingElements.removeEntry(formattingElementEntry); - formattingElementEntry = null; - } - else if (!p.openElements.hasInScope(token.tagID)) { - formattingElementEntry = null; - } - } - else { - genericEndTagInBody(p, token); - } - return formattingElementEntry; -} -//Steps 9 and 10 of the algorithm -function aaObtainFurthestBlock(p, formattingElementEntry) { - let furthestBlock = null; - let idx = p.openElements.stackTop; - for (; idx >= 0; idx--) { - const element = p.openElements.items[idx]; - if (element === formattingElementEntry.element) { - break; - } - if (p._isSpecialElement(element, p.openElements.tagIDs[idx])) { - furthestBlock = element; - } - } - if (!furthestBlock) { - p.openElements.shortenToLength(idx < 0 ? 0 : idx); - p.activeFormattingElements.removeEntry(formattingElementEntry); - } - return furthestBlock; -} -//Step 13 of the algorithm -function aaInnerLoop(p, furthestBlock, formattingElement) { - let lastElement = furthestBlock; - let nextElement = p.openElements.getCommonAncestor(furthestBlock); - for (let i = 0, element = nextElement; element !== formattingElement; i++, element = nextElement) { - //NOTE: store the next element for the next loop iteration (it may be deleted from the stack by step 9.5) - nextElement = p.openElements.getCommonAncestor(element); - const elementEntry = p.activeFormattingElements.getElementEntry(element); - const counterOverflow = elementEntry && i >= AA_INNER_LOOP_ITER; - const shouldRemoveFromOpenElements = !elementEntry || counterOverflow; - if (shouldRemoveFromOpenElements) { - if (counterOverflow) { - p.activeFormattingElements.removeEntry(elementEntry); - } - p.openElements.remove(element); - } - else { - element = aaRecreateElementFromEntry(p, elementEntry); - if (lastElement === furthestBlock) { - p.activeFormattingElements.bookmark = elementEntry; - } - p.treeAdapter.detachNode(lastElement); - p.treeAdapter.appendChild(element, lastElement); - lastElement = element; - } - } - return lastElement; -} -//Step 13.7 of the algorithm -function aaRecreateElementFromEntry(p, elementEntry) { - const ns = p.treeAdapter.getNamespaceURI(elementEntry.element); - const newElement = p.treeAdapter.createElement(elementEntry.token.tagName, ns, elementEntry.token.attrs); - p.openElements.replace(elementEntry.element, newElement); - elementEntry.element = newElement; - return newElement; -} -//Step 14 of the algorithm -function aaInsertLastNodeInCommonAncestor(p, commonAncestor, lastElement) { - const tn = p.treeAdapter.getTagName(commonAncestor); - const tid = getTagID(tn); - if (p._isElementCausesFosterParenting(tid)) { - p._fosterParentElement(lastElement); - } - else { - const ns = p.treeAdapter.getNamespaceURI(commonAncestor); - if (tid === $.TEMPLATE && ns === NS.HTML) { - commonAncestor = p.treeAdapter.getTemplateContent(commonAncestor); - } - p.treeAdapter.appendChild(commonAncestor, lastElement); - } -} -//Steps 15-19 of the algorithm -function aaReplaceFormattingElement(p, furthestBlock, formattingElementEntry) { - const ns = p.treeAdapter.getNamespaceURI(formattingElementEntry.element); - const { token } = formattingElementEntry; - const newElement = p.treeAdapter.createElement(token.tagName, ns, token.attrs); - p._adoptNodes(furthestBlock, newElement); - p.treeAdapter.appendChild(furthestBlock, newElement); - p.activeFormattingElements.insertElementAfterBookmark(newElement, token); - p.activeFormattingElements.removeEntry(formattingElementEntry); - p.openElements.remove(formattingElementEntry.element); - p.openElements.insertAfter(furthestBlock, newElement, token.tagID); -} -//Algorithm entry point -function callAdoptionAgency(p, token) { - for (let i = 0; i < AA_OUTER_LOOP_ITER; i++) { - const formattingElementEntry = aaObtainFormattingElementEntry(p, token); - if (!formattingElementEntry) { - break; - } - const furthestBlock = aaObtainFurthestBlock(p, formattingElementEntry); - if (!furthestBlock) { - break; - } - p.activeFormattingElements.bookmark = formattingElementEntry; - const lastElement = aaInnerLoop(p, furthestBlock, formattingElementEntry.element); - const commonAncestor = p.openElements.getCommonAncestor(formattingElementEntry.element); - p.treeAdapter.detachNode(lastElement); - if (commonAncestor) - aaInsertLastNodeInCommonAncestor(p, commonAncestor, lastElement); - aaReplaceFormattingElement(p, furthestBlock, formattingElementEntry); - } -} -//Generic token handlers -//------------------------------------------------------------------ -function appendComment(p, token) { - p._appendCommentNode(token, p.openElements.currentTmplContentOrNode); -} -function appendCommentToRootHtmlElement(p, token) { - p._appendCommentNode(token, p.openElements.items[0]); -} -function appendCommentToDocument(p, token) { - p._appendCommentNode(token, p.document); -} -function stopParsing(p, token) { - p.stopped = true; - // NOTE: Set end locations for elements that remain on the open element stack. - if (token.location) { - // NOTE: If we are not in a fragment, `html` and `body` will stay on the stack. - // This is a problem, as we might overwrite their end position here. - const target = p.fragmentContext ? 0 : 2; - for (let i = p.openElements.stackTop; i >= target; i--) { - p._setEndLocation(p.openElements.items[i], token); - } - // Handle `html` and `body` - if (!p.fragmentContext && p.openElements.stackTop >= 0) { - const htmlElement = p.openElements.items[0]; - const htmlLocation = p.treeAdapter.getNodeSourceCodeLocation(htmlElement); - if (htmlLocation && !htmlLocation.endTag) { - p._setEndLocation(htmlElement, token); - if (p.openElements.stackTop >= 1) { - const bodyElement = p.openElements.items[1]; - const bodyLocation = p.treeAdapter.getNodeSourceCodeLocation(bodyElement); - if (bodyLocation && !bodyLocation.endTag) { - p._setEndLocation(bodyElement, token); - } - } - } - } - } -} -// The "initial" insertion mode -//------------------------------------------------------------------ -function doctypeInInitialMode(p, token) { - p._setDocumentType(token); - const mode = token.forceQuirks ? DOCUMENT_MODE.QUIRKS : doctype.getDocumentMode(token); - if (!doctype.isConforming(token)) { - p._err(token, ERR.nonConformingDoctype); - } - p.treeAdapter.setDocumentMode(p.document, mode); - p.insertionMode = InsertionMode.BEFORE_HTML; -} -function tokenInInitialMode(p, token) { - p._err(token, ERR.missingDoctype, true); - p.treeAdapter.setDocumentMode(p.document, DOCUMENT_MODE.QUIRKS); - p.insertionMode = InsertionMode.BEFORE_HTML; - p._processToken(token); -} -// The "before html" insertion mode -//------------------------------------------------------------------ -function startTagBeforeHtml(p, token) { - if (token.tagID === $.HTML) { - p._insertElement(token, NS.HTML); - p.insertionMode = InsertionMode.BEFORE_HEAD; - } - else { - tokenBeforeHtml(p, token); - } -} -function endTagBeforeHtml(p, token) { - const tn = token.tagID; - if (tn === $.HTML || tn === $.HEAD || tn === $.BODY || tn === $.BR) { - tokenBeforeHtml(p, token); - } -} -function tokenBeforeHtml(p, token) { - p._insertFakeRootElement(); - p.insertionMode = InsertionMode.BEFORE_HEAD; - p._processToken(token); -} -// The "before head" insertion mode -//------------------------------------------------------------------ -function startTagBeforeHead(p, token) { - switch (token.tagID) { - case $.HTML: { - startTagInBody(p, token); - break; - } - case $.HEAD: { - p._insertElement(token, NS.HTML); - p.headElement = p.openElements.current; - p.insertionMode = InsertionMode.IN_HEAD; - break; - } - default: { - tokenBeforeHead(p, token); - } - } -} -function endTagBeforeHead(p, token) { - const tn = token.tagID; - if (tn === $.HEAD || tn === $.BODY || tn === $.HTML || tn === $.BR) { - tokenBeforeHead(p, token); - } - else { - p._err(token, ERR.endTagWithoutMatchingOpenElement); - } -} -function tokenBeforeHead(p, token) { - p._insertFakeElement(TN.HEAD, $.HEAD); - p.headElement = p.openElements.current; - p.insertionMode = InsertionMode.IN_HEAD; - p._processToken(token); -} -// The "in head" insertion mode -//------------------------------------------------------------------ -function startTagInHead(p, token) { - switch (token.tagID) { - case $.HTML: { - startTagInBody(p, token); - break; - } - case $.BASE: - case $.BASEFONT: - case $.BGSOUND: - case $.LINK: - case $.META: { - p._appendElement(token, NS.HTML); - token.ackSelfClosing = true; - break; - } - case $.TITLE: { - p._switchToTextParsing(token, TokenizerMode.RCDATA); - break; - } - case $.NOSCRIPT: { - if (p.options.scriptingEnabled) { - p._switchToTextParsing(token, TokenizerMode.RAWTEXT); - } - else { - p._insertElement(token, NS.HTML); - p.insertionMode = InsertionMode.IN_HEAD_NO_SCRIPT; - } - break; - } - case $.NOFRAMES: - case $.STYLE: { - p._switchToTextParsing(token, TokenizerMode.RAWTEXT); - break; - } - case $.SCRIPT: { - p._switchToTextParsing(token, TokenizerMode.SCRIPT_DATA); - break; - } - case $.TEMPLATE: { - p._insertTemplate(token); - p.activeFormattingElements.insertMarker(); - p.framesetOk = false; - p.insertionMode = InsertionMode.IN_TEMPLATE; - p.tmplInsertionModeStack.unshift(InsertionMode.IN_TEMPLATE); - break; - } - case $.HEAD: { - p._err(token, ERR.misplacedStartTagForHeadElement); - break; - } - default: { - tokenInHead(p, token); - } - } -} -function endTagInHead(p, token) { - switch (token.tagID) { - case $.HEAD: { - p.openElements.pop(); - p.insertionMode = InsertionMode.AFTER_HEAD; - break; - } - case $.BODY: - case $.BR: - case $.HTML: { - tokenInHead(p, token); - break; - } - case $.TEMPLATE: { - templateEndTagInHead(p, token); - break; - } - default: { - p._err(token, ERR.endTagWithoutMatchingOpenElement); - } - } -} -function templateEndTagInHead(p, token) { - if (p.openElements.tmplCount > 0) { - p.openElements.generateImpliedEndTagsThoroughly(); - if (p.openElements.currentTagId !== $.TEMPLATE) { - p._err(token, ERR.closingOfElementWithOpenChildElements); - } - p.openElements.popUntilTagNamePopped($.TEMPLATE); - p.activeFormattingElements.clearToLastMarker(); - p.tmplInsertionModeStack.shift(); - p._resetInsertionMode(); - } - else { - p._err(token, ERR.endTagWithoutMatchingOpenElement); - } -} -function tokenInHead(p, token) { - p.openElements.pop(); - p.insertionMode = InsertionMode.AFTER_HEAD; - p._processToken(token); -} -// The "in head no script" insertion mode -//------------------------------------------------------------------ -function startTagInHeadNoScript(p, token) { - switch (token.tagID) { - case $.HTML: { - startTagInBody(p, token); - break; - } - case $.BASEFONT: - case $.BGSOUND: - case $.HEAD: - case $.LINK: - case $.META: - case $.NOFRAMES: - case $.STYLE: { - startTagInHead(p, token); - break; - } - case $.NOSCRIPT: { - p._err(token, ERR.nestedNoscriptInHead); - break; - } - default: { - tokenInHeadNoScript(p, token); - } - } -} -function endTagInHeadNoScript(p, token) { - switch (token.tagID) { - case $.NOSCRIPT: { - p.openElements.pop(); - p.insertionMode = InsertionMode.IN_HEAD; - break; - } - case $.BR: { - tokenInHeadNoScript(p, token); - break; - } - default: { - p._err(token, ERR.endTagWithoutMatchingOpenElement); - } - } -} -function tokenInHeadNoScript(p, token) { - const errCode = token.type === TokenType.EOF ? ERR.openElementsLeftAfterEof : ERR.disallowedContentInNoscriptInHead; - p._err(token, errCode); - p.openElements.pop(); - p.insertionMode = InsertionMode.IN_HEAD; - p._processToken(token); -} -// The "after head" insertion mode -//------------------------------------------------------------------ -function startTagAfterHead(p, token) { - switch (token.tagID) { - case $.HTML: { - startTagInBody(p, token); - break; - } - case $.BODY: { - p._insertElement(token, NS.HTML); - p.framesetOk = false; - p.insertionMode = InsertionMode.IN_BODY; - break; - } - case $.FRAMESET: { - p._insertElement(token, NS.HTML); - p.insertionMode = InsertionMode.IN_FRAMESET; - break; - } - case $.BASE: - case $.BASEFONT: - case $.BGSOUND: - case $.LINK: - case $.META: - case $.NOFRAMES: - case $.SCRIPT: - case $.STYLE: - case $.TEMPLATE: - case $.TITLE: { - p._err(token, ERR.abandonedHeadElementChild); - p.openElements.push(p.headElement, $.HEAD); - startTagInHead(p, token); - p.openElements.remove(p.headElement); - break; - } - case $.HEAD: { - p._err(token, ERR.misplacedStartTagForHeadElement); - break; - } - default: { - tokenAfterHead(p, token); - } - } -} -function endTagAfterHead(p, token) { - switch (token.tagID) { - case $.BODY: - case $.HTML: - case $.BR: { - tokenAfterHead(p, token); - break; - } - case $.TEMPLATE: { - templateEndTagInHead(p, token); - break; - } - default: { - p._err(token, ERR.endTagWithoutMatchingOpenElement); - } - } -} -function tokenAfterHead(p, token) { - p._insertFakeElement(TN.BODY, $.BODY); - p.insertionMode = InsertionMode.IN_BODY; - modeInBody(p, token); -} -// The "in body" insertion mode -//------------------------------------------------------------------ -function modeInBody(p, token) { - switch (token.type) { - case TokenType.CHARACTER: { - characterInBody(p, token); - break; - } - case TokenType.WHITESPACE_CHARACTER: { - whitespaceCharacterInBody(p, token); - break; - } - case TokenType.COMMENT: { - appendComment(p, token); - break; - } - case TokenType.START_TAG: { - startTagInBody(p, token); - break; - } - case TokenType.END_TAG: { - endTagInBody(p, token); - break; - } - case TokenType.EOF: { - eofInBody(p, token); - break; - } - default: - // Do nothing - } -} -function whitespaceCharacterInBody(p, token) { - p._reconstructActiveFormattingElements(); - p._insertCharacters(token); -} -function characterInBody(p, token) { - p._reconstructActiveFormattingElements(); - p._insertCharacters(token); - p.framesetOk = false; -} -function htmlStartTagInBody(p, token) { - if (p.openElements.tmplCount === 0) { - p.treeAdapter.adoptAttributes(p.openElements.items[0], token.attrs); - } -} -function bodyStartTagInBody(p, token) { - const bodyElement = p.openElements.tryPeekProperlyNestedBodyElement(); - if (bodyElement && p.openElements.tmplCount === 0) { - p.framesetOk = false; - p.treeAdapter.adoptAttributes(bodyElement, token.attrs); - } -} -function framesetStartTagInBody(p, token) { - const bodyElement = p.openElements.tryPeekProperlyNestedBodyElement(); - if (p.framesetOk && bodyElement) { - p.treeAdapter.detachNode(bodyElement); - p.openElements.popAllUpToHtmlElement(); - p._insertElement(token, NS.HTML); - p.insertionMode = InsertionMode.IN_FRAMESET; - } -} -function addressStartTagInBody(p, token) { - if (p.openElements.hasInButtonScope($.P)) { - p._closePElement(); - } - p._insertElement(token, NS.HTML); -} -function numberedHeaderStartTagInBody(p, token) { - if (p.openElements.hasInButtonScope($.P)) { - p._closePElement(); - } - if (NUMBERED_HEADERS.has(p.openElements.currentTagId)) { - p.openElements.pop(); - } - p._insertElement(token, NS.HTML); -} -function preStartTagInBody(p, token) { - if (p.openElements.hasInButtonScope($.P)) { - p._closePElement(); - } - p._insertElement(token, NS.HTML); - //NOTE: If the next token is a U+000A LINE FEED (LF) character token, then ignore that token and move - //on to the next one. (Newlines at the start of pre blocks are ignored as an authoring convenience.) - p.skipNextNewLine = true; - p.framesetOk = false; -} -function formStartTagInBody(p, token) { - const inTemplate = p.openElements.tmplCount > 0; - if (!p.formElement || inTemplate) { - if (p.openElements.hasInButtonScope($.P)) { - p._closePElement(); - } - p._insertElement(token, NS.HTML); - if (!inTemplate) { - p.formElement = p.openElements.current; - } - } -} -function listItemStartTagInBody(p, token) { - p.framesetOk = false; - const tn = token.tagID; - for (let i = p.openElements.stackTop; i >= 0; i--) { - const elementId = p.openElements.tagIDs[i]; - if ((tn === $.LI && elementId === $.LI) || - ((tn === $.DD || tn === $.DT) && (elementId === $.DD || elementId === $.DT))) { - p.openElements.generateImpliedEndTagsWithExclusion(elementId); - p.openElements.popUntilTagNamePopped(elementId); - break; - } - if (elementId !== $.ADDRESS && - elementId !== $.DIV && - elementId !== $.P && - p._isSpecialElement(p.openElements.items[i], elementId)) { - break; - } - } - if (p.openElements.hasInButtonScope($.P)) { - p._closePElement(); - } - p._insertElement(token, NS.HTML); -} -function plaintextStartTagInBody(p, token) { - if (p.openElements.hasInButtonScope($.P)) { - p._closePElement(); - } - p._insertElement(token, NS.HTML); - p.tokenizer.state = TokenizerMode.PLAINTEXT; -} -function buttonStartTagInBody(p, token) { - if (p.openElements.hasInScope($.BUTTON)) { - p.openElements.generateImpliedEndTags(); - p.openElements.popUntilTagNamePopped($.BUTTON); - } - p._reconstructActiveFormattingElements(); - p._insertElement(token, NS.HTML); - p.framesetOk = false; -} -function aStartTagInBody(p, token) { - const activeElementEntry = p.activeFormattingElements.getElementEntryInScopeWithTagName(TN.A); - if (activeElementEntry) { - callAdoptionAgency(p, token); - p.openElements.remove(activeElementEntry.element); - p.activeFormattingElements.removeEntry(activeElementEntry); - } - p._reconstructActiveFormattingElements(); - p._insertElement(token, NS.HTML); - p.activeFormattingElements.pushElement(p.openElements.current, token); -} -function bStartTagInBody(p, token) { - p._reconstructActiveFormattingElements(); - p._insertElement(token, NS.HTML); - p.activeFormattingElements.pushElement(p.openElements.current, token); -} -function nobrStartTagInBody(p, token) { - p._reconstructActiveFormattingElements(); - if (p.openElements.hasInScope($.NOBR)) { - callAdoptionAgency(p, token); - p._reconstructActiveFormattingElements(); - } - p._insertElement(token, NS.HTML); - p.activeFormattingElements.pushElement(p.openElements.current, token); -} -function appletStartTagInBody(p, token) { - p._reconstructActiveFormattingElements(); - p._insertElement(token, NS.HTML); - p.activeFormattingElements.insertMarker(); - p.framesetOk = false; -} -function tableStartTagInBody(p, token) { - if (p.treeAdapter.getDocumentMode(p.document) !== DOCUMENT_MODE.QUIRKS && p.openElements.hasInButtonScope($.P)) { - p._closePElement(); - } - p._insertElement(token, NS.HTML); - p.framesetOk = false; - p.insertionMode = InsertionMode.IN_TABLE; -} -function areaStartTagInBody(p, token) { - p._reconstructActiveFormattingElements(); - p._appendElement(token, NS.HTML); - p.framesetOk = false; - token.ackSelfClosing = true; -} -function isHiddenInput(token) { - const inputType = getTokenAttr(token, ATTRS.TYPE); - return inputType != null && inputType.toLowerCase() === HIDDEN_INPUT_TYPE; -} -function inputStartTagInBody(p, token) { - p._reconstructActiveFormattingElements(); - p._appendElement(token, NS.HTML); - if (!isHiddenInput(token)) { - p.framesetOk = false; - } - token.ackSelfClosing = true; -} -function paramStartTagInBody(p, token) { - p._appendElement(token, NS.HTML); - token.ackSelfClosing = true; -} -function hrStartTagInBody(p, token) { - if (p.openElements.hasInButtonScope($.P)) { - p._closePElement(); - } - p._appendElement(token, NS.HTML); - p.framesetOk = false; - token.ackSelfClosing = true; -} -function imageStartTagInBody(p, token) { - token.tagName = TN.IMG; - token.tagID = $.IMG; - areaStartTagInBody(p, token); -} -function textareaStartTagInBody(p, token) { - p._insertElement(token, NS.HTML); - //NOTE: If the next token is a U+000A LINE FEED (LF) character token, then ignore that token and move - //on to the next one. (Newlines at the start of textarea elements are ignored as an authoring convenience.) - p.skipNextNewLine = true; - p.tokenizer.state = TokenizerMode.RCDATA; - p.originalInsertionMode = p.insertionMode; - p.framesetOk = false; - p.insertionMode = InsertionMode.TEXT; -} -function xmpStartTagInBody(p, token) { - if (p.openElements.hasInButtonScope($.P)) { - p._closePElement(); - } - p._reconstructActiveFormattingElements(); - p.framesetOk = false; - p._switchToTextParsing(token, TokenizerMode.RAWTEXT); -} -function iframeStartTagInBody(p, token) { - p.framesetOk = false; - p._switchToTextParsing(token, TokenizerMode.RAWTEXT); -} -//NOTE: here we assume that we always act as a user agent with enabled plugins/frames, so we parse -//<noembed>/<noframes> as rawtext. -function rawTextStartTagInBody(p, token) { - p._switchToTextParsing(token, TokenizerMode.RAWTEXT); -} -function selectStartTagInBody(p, token) { - p._reconstructActiveFormattingElements(); - p._insertElement(token, NS.HTML); - p.framesetOk = false; - p.insertionMode = - p.insertionMode === InsertionMode.IN_TABLE || - p.insertionMode === InsertionMode.IN_CAPTION || - p.insertionMode === InsertionMode.IN_TABLE_BODY || - p.insertionMode === InsertionMode.IN_ROW || - p.insertionMode === InsertionMode.IN_CELL - ? InsertionMode.IN_SELECT_IN_TABLE - : InsertionMode.IN_SELECT; -} -function optgroupStartTagInBody(p, token) { - if (p.openElements.currentTagId === $.OPTION) { - p.openElements.pop(); - } - p._reconstructActiveFormattingElements(); - p._insertElement(token, NS.HTML); -} -function rbStartTagInBody(p, token) { - if (p.openElements.hasInScope($.RUBY)) { - p.openElements.generateImpliedEndTags(); - } - p._insertElement(token, NS.HTML); -} -function rtStartTagInBody(p, token) { - if (p.openElements.hasInScope($.RUBY)) { - p.openElements.generateImpliedEndTagsWithExclusion($.RTC); - } - p._insertElement(token, NS.HTML); -} -function mathStartTagInBody(p, token) { - p._reconstructActiveFormattingElements(); - foreignContent.adjustTokenMathMLAttrs(token); - foreignContent.adjustTokenXMLAttrs(token); - if (token.selfClosing) { - p._appendElement(token, NS.MATHML); - } - else { - p._insertElement(token, NS.MATHML); - } - token.ackSelfClosing = true; -} -function svgStartTagInBody(p, token) { - p._reconstructActiveFormattingElements(); - foreignContent.adjustTokenSVGAttrs(token); - foreignContent.adjustTokenXMLAttrs(token); - if (token.selfClosing) { - p._appendElement(token, NS.SVG); - } - else { - p._insertElement(token, NS.SVG); - } - token.ackSelfClosing = true; -} -function genericStartTagInBody(p, token) { - p._reconstructActiveFormattingElements(); - p._insertElement(token, NS.HTML); -} -function startTagInBody(p, token) { - switch (token.tagID) { - case $.I: - case $.S: - case $.B: - case $.U: - case $.EM: - case $.TT: - case $.BIG: - case $.CODE: - case $.FONT: - case $.SMALL: - case $.STRIKE: - case $.STRONG: { - bStartTagInBody(p, token); - break; - } - case $.A: { - aStartTagInBody(p, token); - break; - } - case $.H1: - case $.H2: - case $.H3: - case $.H4: - case $.H5: - case $.H6: { - numberedHeaderStartTagInBody(p, token); - break; - } - case $.P: - case $.DL: - case $.OL: - case $.UL: - case $.DIV: - case $.DIR: - case $.NAV: - case $.MAIN: - case $.MENU: - case $.ASIDE: - case $.CENTER: - case $.FIGURE: - case $.FOOTER: - case $.HEADER: - case $.HGROUP: - case $.DIALOG: - case $.DETAILS: - case $.ADDRESS: - case $.ARTICLE: - case $.SEARCH: - case $.SECTION: - case $.SUMMARY: - case $.FIELDSET: - case $.BLOCKQUOTE: - case $.FIGCAPTION: { - addressStartTagInBody(p, token); - break; - } - case $.LI: - case $.DD: - case $.DT: { - listItemStartTagInBody(p, token); - break; - } - case $.BR: - case $.IMG: - case $.WBR: - case $.AREA: - case $.EMBED: - case $.KEYGEN: { - areaStartTagInBody(p, token); - break; - } - case $.HR: { - hrStartTagInBody(p, token); - break; - } - case $.RB: - case $.RTC: { - rbStartTagInBody(p, token); - break; - } - case $.RT: - case $.RP: { - rtStartTagInBody(p, token); - break; - } - case $.PRE: - case $.LISTING: { - preStartTagInBody(p, token); - break; - } - case $.XMP: { - xmpStartTagInBody(p, token); - break; - } - case $.SVG: { - svgStartTagInBody(p, token); - break; - } - case $.HTML: { - htmlStartTagInBody(p, token); - break; - } - case $.BASE: - case $.LINK: - case $.META: - case $.STYLE: - case $.TITLE: - case $.SCRIPT: - case $.BGSOUND: - case $.BASEFONT: - case $.TEMPLATE: { - startTagInHead(p, token); - break; - } - case $.BODY: { - bodyStartTagInBody(p, token); - break; - } - case $.FORM: { - formStartTagInBody(p, token); - break; - } - case $.NOBR: { - nobrStartTagInBody(p, token); - break; - } - case $.MATH: { - mathStartTagInBody(p, token); - break; - } - case $.TABLE: { - tableStartTagInBody(p, token); - break; - } - case $.INPUT: { - inputStartTagInBody(p, token); - break; - } - case $.PARAM: - case $.TRACK: - case $.SOURCE: { - paramStartTagInBody(p, token); - break; - } - case $.IMAGE: { - imageStartTagInBody(p, token); - break; - } - case $.BUTTON: { - buttonStartTagInBody(p, token); - break; - } - case $.APPLET: - case $.OBJECT: - case $.MARQUEE: { - appletStartTagInBody(p, token); - break; - } - case $.IFRAME: { - iframeStartTagInBody(p, token); - break; - } - case $.SELECT: { - selectStartTagInBody(p, token); - break; - } - case $.OPTION: - case $.OPTGROUP: { - optgroupStartTagInBody(p, token); - break; - } - case $.NOEMBED: - case $.NOFRAMES: { - rawTextStartTagInBody(p, token); - break; - } - case $.FRAMESET: { - framesetStartTagInBody(p, token); - break; - } - case $.TEXTAREA: { - textareaStartTagInBody(p, token); - break; - } - case $.NOSCRIPT: { - if (p.options.scriptingEnabled) { - rawTextStartTagInBody(p, token); - } - else { - genericStartTagInBody(p, token); - } - break; - } - case $.PLAINTEXT: { - plaintextStartTagInBody(p, token); - break; - } - case $.COL: - case $.TH: - case $.TD: - case $.TR: - case $.HEAD: - case $.FRAME: - case $.TBODY: - case $.TFOOT: - case $.THEAD: - case $.CAPTION: - case $.COLGROUP: { - // Ignore token - break; - } - default: { - genericStartTagInBody(p, token); - } - } -} -function bodyEndTagInBody(p, token) { - if (p.openElements.hasInScope($.BODY)) { - p.insertionMode = InsertionMode.AFTER_BODY; - //NOTE: <body> is never popped from the stack, so we need to updated - //the end location explicitly. - if (p.options.sourceCodeLocationInfo) { - const bodyElement = p.openElements.tryPeekProperlyNestedBodyElement(); - if (bodyElement) { - p._setEndLocation(bodyElement, token); - } - } - } -} -function htmlEndTagInBody(p, token) { - if (p.openElements.hasInScope($.BODY)) { - p.insertionMode = InsertionMode.AFTER_BODY; - endTagAfterBody(p, token); - } -} -function addressEndTagInBody(p, token) { - const tn = token.tagID; - if (p.openElements.hasInScope(tn)) { - p.openElements.generateImpliedEndTags(); - p.openElements.popUntilTagNamePopped(tn); - } -} -function formEndTagInBody(p) { - const inTemplate = p.openElements.tmplCount > 0; - const { formElement } = p; - if (!inTemplate) { - p.formElement = null; - } - if ((formElement || inTemplate) && p.openElements.hasInScope($.FORM)) { - p.openElements.generateImpliedEndTags(); - if (inTemplate) { - p.openElements.popUntilTagNamePopped($.FORM); - } - else if (formElement) { - p.openElements.remove(formElement); - } - } -} -function pEndTagInBody(p) { - if (!p.openElements.hasInButtonScope($.P)) { - p._insertFakeElement(TN.P, $.P); - } - p._closePElement(); -} -function liEndTagInBody(p) { - if (p.openElements.hasInListItemScope($.LI)) { - p.openElements.generateImpliedEndTagsWithExclusion($.LI); - p.openElements.popUntilTagNamePopped($.LI); - } -} -function ddEndTagInBody(p, token) { - const tn = token.tagID; - if (p.openElements.hasInScope(tn)) { - p.openElements.generateImpliedEndTagsWithExclusion(tn); - p.openElements.popUntilTagNamePopped(tn); - } -} -function numberedHeaderEndTagInBody(p) { - if (p.openElements.hasNumberedHeaderInScope()) { - p.openElements.generateImpliedEndTags(); - p.openElements.popUntilNumberedHeaderPopped(); - } -} -function appletEndTagInBody(p, token) { - const tn = token.tagID; - if (p.openElements.hasInScope(tn)) { - p.openElements.generateImpliedEndTags(); - p.openElements.popUntilTagNamePopped(tn); - p.activeFormattingElements.clearToLastMarker(); - } -} -function brEndTagInBody(p) { - p._reconstructActiveFormattingElements(); - p._insertFakeElement(TN.BR, $.BR); - p.openElements.pop(); - p.framesetOk = false; -} -function genericEndTagInBody(p, token) { - const tn = token.tagName; - const tid = token.tagID; - for (let i = p.openElements.stackTop; i > 0; i--) { - const element = p.openElements.items[i]; - const elementId = p.openElements.tagIDs[i]; - // Compare the tag name here, as the tag might not be a known tag with an ID. - if (tid === elementId && (tid !== $.UNKNOWN || p.treeAdapter.getTagName(element) === tn)) { - p.openElements.generateImpliedEndTagsWithExclusion(tid); - if (p.openElements.stackTop >= i) - p.openElements.shortenToLength(i); - break; - } - if (p._isSpecialElement(element, elementId)) { - break; - } - } -} -function endTagInBody(p, token) { - switch (token.tagID) { - case $.A: - case $.B: - case $.I: - case $.S: - case $.U: - case $.EM: - case $.TT: - case $.BIG: - case $.CODE: - case $.FONT: - case $.NOBR: - case $.SMALL: - case $.STRIKE: - case $.STRONG: { - callAdoptionAgency(p, token); - break; - } - case $.P: { - pEndTagInBody(p); - break; - } - case $.DL: - case $.UL: - case $.OL: - case $.DIR: - case $.DIV: - case $.NAV: - case $.PRE: - case $.MAIN: - case $.MENU: - case $.ASIDE: - case $.BUTTON: - case $.CENTER: - case $.FIGURE: - case $.FOOTER: - case $.HEADER: - case $.HGROUP: - case $.DIALOG: - case $.ADDRESS: - case $.ARTICLE: - case $.DETAILS: - case $.SEARCH: - case $.SECTION: - case $.SUMMARY: - case $.LISTING: - case $.FIELDSET: - case $.BLOCKQUOTE: - case $.FIGCAPTION: { - addressEndTagInBody(p, token); - break; - } - case $.LI: { - liEndTagInBody(p); - break; - } - case $.DD: - case $.DT: { - ddEndTagInBody(p, token); - break; - } - case $.H1: - case $.H2: - case $.H3: - case $.H4: - case $.H5: - case $.H6: { - numberedHeaderEndTagInBody(p); - break; - } - case $.BR: { - brEndTagInBody(p); - break; - } - case $.BODY: { - bodyEndTagInBody(p, token); - break; - } - case $.HTML: { - htmlEndTagInBody(p, token); - break; - } - case $.FORM: { - formEndTagInBody(p); - break; - } - case $.APPLET: - case $.OBJECT: - case $.MARQUEE: { - appletEndTagInBody(p, token); - break; - } - case $.TEMPLATE: { - templateEndTagInHead(p, token); - break; - } - default: { - genericEndTagInBody(p, token); - } - } -} -function eofInBody(p, token) { - if (p.tmplInsertionModeStack.length > 0) { - eofInTemplate(p, token); - } - else { - stopParsing(p, token); - } -} -// The "text" insertion mode -//------------------------------------------------------------------ -function endTagInText(p, token) { - var _a; - if (token.tagID === $.SCRIPT) { - (_a = p.scriptHandler) === null || _a === void 0 ? void 0 : _a.call(p, p.openElements.current); - } - p.openElements.pop(); - p.insertionMode = p.originalInsertionMode; -} -function eofInText(p, token) { - p._err(token, ERR.eofInElementThatCanContainOnlyText); - p.openElements.pop(); - p.insertionMode = p.originalInsertionMode; - p.onEof(token); -} -// The "in table" insertion mode -//------------------------------------------------------------------ -function characterInTable(p, token) { - if (TABLE_STRUCTURE_TAGS.has(p.openElements.currentTagId)) { - p.pendingCharacterTokens.length = 0; - p.hasNonWhitespacePendingCharacterToken = false; - p.originalInsertionMode = p.insertionMode; - p.insertionMode = InsertionMode.IN_TABLE_TEXT; - switch (token.type) { - case TokenType.CHARACTER: { - characterInTableText(p, token); - break; - } - case TokenType.WHITESPACE_CHARACTER: { - whitespaceCharacterInTableText(p, token); - break; - } - // Ignore null - } - } - else { - tokenInTable(p, token); - } -} -function captionStartTagInTable(p, token) { - p.openElements.clearBackToTableContext(); - p.activeFormattingElements.insertMarker(); - p._insertElement(token, NS.HTML); - p.insertionMode = InsertionMode.IN_CAPTION; -} -function colgroupStartTagInTable(p, token) { - p.openElements.clearBackToTableContext(); - p._insertElement(token, NS.HTML); - p.insertionMode = InsertionMode.IN_COLUMN_GROUP; -} -function colStartTagInTable(p, token) { - p.openElements.clearBackToTableContext(); - p._insertFakeElement(TN.COLGROUP, $.COLGROUP); - p.insertionMode = InsertionMode.IN_COLUMN_GROUP; - startTagInColumnGroup(p, token); -} -function tbodyStartTagInTable(p, token) { - p.openElements.clearBackToTableContext(); - p._insertElement(token, NS.HTML); - p.insertionMode = InsertionMode.IN_TABLE_BODY; -} -function tdStartTagInTable(p, token) { - p.openElements.clearBackToTableContext(); - p._insertFakeElement(TN.TBODY, $.TBODY); - p.insertionMode = InsertionMode.IN_TABLE_BODY; - startTagInTableBody(p, token); -} -function tableStartTagInTable(p, token) { - if (p.openElements.hasInTableScope($.TABLE)) { - p.openElements.popUntilTagNamePopped($.TABLE); - p._resetInsertionMode(); - p._processStartTag(token); - } -} -function inputStartTagInTable(p, token) { - if (isHiddenInput(token)) { - p._appendElement(token, NS.HTML); - } - else { - tokenInTable(p, token); - } - token.ackSelfClosing = true; -} -function formStartTagInTable(p, token) { - if (!p.formElement && p.openElements.tmplCount === 0) { - p._insertElement(token, NS.HTML); - p.formElement = p.openElements.current; - p.openElements.pop(); - } -} -function startTagInTable(p, token) { - switch (token.tagID) { - case $.TD: - case $.TH: - case $.TR: { - tdStartTagInTable(p, token); - break; - } - case $.STYLE: - case $.SCRIPT: - case $.TEMPLATE: { - startTagInHead(p, token); - break; - } - case $.COL: { - colStartTagInTable(p, token); - break; - } - case $.FORM: { - formStartTagInTable(p, token); - break; - } - case $.TABLE: { - tableStartTagInTable(p, token); - break; - } - case $.TBODY: - case $.TFOOT: - case $.THEAD: { - tbodyStartTagInTable(p, token); - break; - } - case $.INPUT: { - inputStartTagInTable(p, token); - break; - } - case $.CAPTION: { - captionStartTagInTable(p, token); - break; - } - case $.COLGROUP: { - colgroupStartTagInTable(p, token); - break; - } - default: { - tokenInTable(p, token); - } - } -} -function endTagInTable(p, token) { - switch (token.tagID) { - case $.TABLE: { - if (p.openElements.hasInTableScope($.TABLE)) { - p.openElements.popUntilTagNamePopped($.TABLE); - p._resetInsertionMode(); - } - break; - } - case $.TEMPLATE: { - templateEndTagInHead(p, token); - break; - } - case $.BODY: - case $.CAPTION: - case $.COL: - case $.COLGROUP: - case $.HTML: - case $.TBODY: - case $.TD: - case $.TFOOT: - case $.TH: - case $.THEAD: - case $.TR: { - // Ignore token - break; - } - default: { - tokenInTable(p, token); - } - } -} -function tokenInTable(p, token) { - const savedFosterParentingState = p.fosterParentingEnabled; - p.fosterParentingEnabled = true; - // Process token in `In Body` mode - modeInBody(p, token); - p.fosterParentingEnabled = savedFosterParentingState; -} -// The "in table text" insertion mode -//------------------------------------------------------------------ -function whitespaceCharacterInTableText(p, token) { - p.pendingCharacterTokens.push(token); -} -function characterInTableText(p, token) { - p.pendingCharacterTokens.push(token); - p.hasNonWhitespacePendingCharacterToken = true; -} -function tokenInTableText(p, token) { - let i = 0; - if (p.hasNonWhitespacePendingCharacterToken) { - for (; i < p.pendingCharacterTokens.length; i++) { - tokenInTable(p, p.pendingCharacterTokens[i]); - } - } - else { - for (; i < p.pendingCharacterTokens.length; i++) { - p._insertCharacters(p.pendingCharacterTokens[i]); - } - } - p.insertionMode = p.originalInsertionMode; - p._processToken(token); -} -// The "in caption" insertion mode -//------------------------------------------------------------------ -const TABLE_VOID_ELEMENTS = new Set([$.CAPTION, $.COL, $.COLGROUP, $.TBODY, $.TD, $.TFOOT, $.TH, $.THEAD, $.TR]); -function startTagInCaption(p, token) { - const tn = token.tagID; - if (TABLE_VOID_ELEMENTS.has(tn)) { - if (p.openElements.hasInTableScope($.CAPTION)) { - p.openElements.generateImpliedEndTags(); - p.openElements.popUntilTagNamePopped($.CAPTION); - p.activeFormattingElements.clearToLastMarker(); - p.insertionMode = InsertionMode.IN_TABLE; - startTagInTable(p, token); - } - } - else { - startTagInBody(p, token); - } -} -function endTagInCaption(p, token) { - const tn = token.tagID; - switch (tn) { - case $.CAPTION: - case $.TABLE: { - if (p.openElements.hasInTableScope($.CAPTION)) { - p.openElements.generateImpliedEndTags(); - p.openElements.popUntilTagNamePopped($.CAPTION); - p.activeFormattingElements.clearToLastMarker(); - p.insertionMode = InsertionMode.IN_TABLE; - if (tn === $.TABLE) { - endTagInTable(p, token); - } - } - break; - } - case $.BODY: - case $.COL: - case $.COLGROUP: - case $.HTML: - case $.TBODY: - case $.TD: - case $.TFOOT: - case $.TH: - case $.THEAD: - case $.TR: { - // Ignore token - break; - } - default: { - endTagInBody(p, token); - } - } -} -// The "in column group" insertion mode -//------------------------------------------------------------------ -function startTagInColumnGroup(p, token) { - switch (token.tagID) { - case $.HTML: { - startTagInBody(p, token); - break; - } - case $.COL: { - p._appendElement(token, NS.HTML); - token.ackSelfClosing = true; - break; - } - case $.TEMPLATE: { - startTagInHead(p, token); - break; - } - default: { - tokenInColumnGroup(p, token); - } - } -} -function endTagInColumnGroup(p, token) { - switch (token.tagID) { - case $.COLGROUP: { - if (p.openElements.currentTagId === $.COLGROUP) { - p.openElements.pop(); - p.insertionMode = InsertionMode.IN_TABLE; - } - break; - } - case $.TEMPLATE: { - templateEndTagInHead(p, token); - break; - } - case $.COL: { - // Ignore token - break; - } - default: { - tokenInColumnGroup(p, token); - } - } -} -function tokenInColumnGroup(p, token) { - if (p.openElements.currentTagId === $.COLGROUP) { - p.openElements.pop(); - p.insertionMode = InsertionMode.IN_TABLE; - p._processToken(token); - } -} -// The "in table body" insertion mode -//------------------------------------------------------------------ -function startTagInTableBody(p, token) { - switch (token.tagID) { - case $.TR: { - p.openElements.clearBackToTableBodyContext(); - p._insertElement(token, NS.HTML); - p.insertionMode = InsertionMode.IN_ROW; - break; - } - case $.TH: - case $.TD: { - p.openElements.clearBackToTableBodyContext(); - p._insertFakeElement(TN.TR, $.TR); - p.insertionMode = InsertionMode.IN_ROW; - startTagInRow(p, token); - break; - } - case $.CAPTION: - case $.COL: - case $.COLGROUP: - case $.TBODY: - case $.TFOOT: - case $.THEAD: { - if (p.openElements.hasTableBodyContextInTableScope()) { - p.openElements.clearBackToTableBodyContext(); - p.openElements.pop(); - p.insertionMode = InsertionMode.IN_TABLE; - startTagInTable(p, token); - } - break; - } - default: { - startTagInTable(p, token); - } - } -} -function endTagInTableBody(p, token) { - const tn = token.tagID; - switch (token.tagID) { - case $.TBODY: - case $.TFOOT: - case $.THEAD: { - if (p.openElements.hasInTableScope(tn)) { - p.openElements.clearBackToTableBodyContext(); - p.openElements.pop(); - p.insertionMode = InsertionMode.IN_TABLE; - } - break; - } - case $.TABLE: { - if (p.openElements.hasTableBodyContextInTableScope()) { - p.openElements.clearBackToTableBodyContext(); - p.openElements.pop(); - p.insertionMode = InsertionMode.IN_TABLE; - endTagInTable(p, token); - } - break; - } - case $.BODY: - case $.CAPTION: - case $.COL: - case $.COLGROUP: - case $.HTML: - case $.TD: - case $.TH: - case $.TR: { - // Ignore token - break; - } - default: { - endTagInTable(p, token); - } - } -} -// The "in row" insertion mode -//------------------------------------------------------------------ -function startTagInRow(p, token) { - switch (token.tagID) { - case $.TH: - case $.TD: { - p.openElements.clearBackToTableRowContext(); - p._insertElement(token, NS.HTML); - p.insertionMode = InsertionMode.IN_CELL; - p.activeFormattingElements.insertMarker(); - break; - } - case $.CAPTION: - case $.COL: - case $.COLGROUP: - case $.TBODY: - case $.TFOOT: - case $.THEAD: - case $.TR: { - if (p.openElements.hasInTableScope($.TR)) { - p.openElements.clearBackToTableRowContext(); - p.openElements.pop(); - p.insertionMode = InsertionMode.IN_TABLE_BODY; - startTagInTableBody(p, token); - } - break; - } - default: { - startTagInTable(p, token); - } - } -} -function endTagInRow(p, token) { - switch (token.tagID) { - case $.TR: { - if (p.openElements.hasInTableScope($.TR)) { - p.openElements.clearBackToTableRowContext(); - p.openElements.pop(); - p.insertionMode = InsertionMode.IN_TABLE_BODY; - } - break; - } - case $.TABLE: { - if (p.openElements.hasInTableScope($.TR)) { - p.openElements.clearBackToTableRowContext(); - p.openElements.pop(); - p.insertionMode = InsertionMode.IN_TABLE_BODY; - endTagInTableBody(p, token); - } - break; - } - case $.TBODY: - case $.TFOOT: - case $.THEAD: { - if (p.openElements.hasInTableScope(token.tagID) || p.openElements.hasInTableScope($.TR)) { - p.openElements.clearBackToTableRowContext(); - p.openElements.pop(); - p.insertionMode = InsertionMode.IN_TABLE_BODY; - endTagInTableBody(p, token); - } - break; - } - case $.BODY: - case $.CAPTION: - case $.COL: - case $.COLGROUP: - case $.HTML: - case $.TD: - case $.TH: { - // Ignore end tag - break; - } - default: { - endTagInTable(p, token); - } - } -} -// The "in cell" insertion mode -//------------------------------------------------------------------ -function startTagInCell(p, token) { - const tn = token.tagID; - if (TABLE_VOID_ELEMENTS.has(tn)) { - if (p.openElements.hasInTableScope($.TD) || p.openElements.hasInTableScope($.TH)) { - p._closeTableCell(); - startTagInRow(p, token); - } - } - else { - startTagInBody(p, token); - } -} -function endTagInCell(p, token) { - const tn = token.tagID; - switch (tn) { - case $.TD: - case $.TH: { - if (p.openElements.hasInTableScope(tn)) { - p.openElements.generateImpliedEndTags(); - p.openElements.popUntilTagNamePopped(tn); - p.activeFormattingElements.clearToLastMarker(); - p.insertionMode = InsertionMode.IN_ROW; - } - break; - } - case $.TABLE: - case $.TBODY: - case $.TFOOT: - case $.THEAD: - case $.TR: { - if (p.openElements.hasInTableScope(tn)) { - p._closeTableCell(); - endTagInRow(p, token); - } - break; - } - case $.BODY: - case $.CAPTION: - case $.COL: - case $.COLGROUP: - case $.HTML: { - // Ignore token - break; - } - default: { - endTagInBody(p, token); - } - } -} -// The "in select" insertion mode -//------------------------------------------------------------------ -function startTagInSelect(p, token) { - switch (token.tagID) { - case $.HTML: { - startTagInBody(p, token); - break; - } - case $.OPTION: { - if (p.openElements.currentTagId === $.OPTION) { - p.openElements.pop(); - } - p._insertElement(token, NS.HTML); - break; - } - case $.OPTGROUP: { - if (p.openElements.currentTagId === $.OPTION) { - p.openElements.pop(); - } - if (p.openElements.currentTagId === $.OPTGROUP) { - p.openElements.pop(); - } - p._insertElement(token, NS.HTML); - break; - } - case $.HR: { - if (p.openElements.currentTagId === $.OPTION) { - p.openElements.pop(); - } - if (p.openElements.currentTagId === $.OPTGROUP) { - p.openElements.pop(); - } - p._appendElement(token, NS.HTML); - token.ackSelfClosing = true; - break; - } - case $.INPUT: - case $.KEYGEN: - case $.TEXTAREA: - case $.SELECT: { - if (p.openElements.hasInSelectScope($.SELECT)) { - p.openElements.popUntilTagNamePopped($.SELECT); - p._resetInsertionMode(); - if (token.tagID !== $.SELECT) { - p._processStartTag(token); - } - } - break; - } - case $.SCRIPT: - case $.TEMPLATE: { - startTagInHead(p, token); - break; - } - default: - // Do nothing - } -} -function endTagInSelect(p, token) { - switch (token.tagID) { - case $.OPTGROUP: { - if (p.openElements.stackTop > 0 && - p.openElements.currentTagId === $.OPTION && - p.openElements.tagIDs[p.openElements.stackTop - 1] === $.OPTGROUP) { - p.openElements.pop(); - } - if (p.openElements.currentTagId === $.OPTGROUP) { - p.openElements.pop(); - } - break; - } - case $.OPTION: { - if (p.openElements.currentTagId === $.OPTION) { - p.openElements.pop(); - } - break; - } - case $.SELECT: { - if (p.openElements.hasInSelectScope($.SELECT)) { - p.openElements.popUntilTagNamePopped($.SELECT); - p._resetInsertionMode(); - } - break; - } - case $.TEMPLATE: { - templateEndTagInHead(p, token); - break; - } - default: - // Do nothing - } -} -// The "in select in table" insertion mode -//------------------------------------------------------------------ -function startTagInSelectInTable(p, token) { - const tn = token.tagID; - if (tn === $.CAPTION || - tn === $.TABLE || - tn === $.TBODY || - tn === $.TFOOT || - tn === $.THEAD || - tn === $.TR || - tn === $.TD || - tn === $.TH) { - p.openElements.popUntilTagNamePopped($.SELECT); - p._resetInsertionMode(); - p._processStartTag(token); - } - else { - startTagInSelect(p, token); - } -} -function endTagInSelectInTable(p, token) { - const tn = token.tagID; - if (tn === $.CAPTION || - tn === $.TABLE || - tn === $.TBODY || - tn === $.TFOOT || - tn === $.THEAD || - tn === $.TR || - tn === $.TD || - tn === $.TH) { - if (p.openElements.hasInTableScope(tn)) { - p.openElements.popUntilTagNamePopped($.SELECT); - p._resetInsertionMode(); - p.onEndTag(token); - } - } - else { - endTagInSelect(p, token); - } -} -// The "in template" insertion mode -//------------------------------------------------------------------ -function startTagInTemplate(p, token) { - switch (token.tagID) { - // First, handle tags that can start without a mode change - case $.BASE: - case $.BASEFONT: - case $.BGSOUND: - case $.LINK: - case $.META: - case $.NOFRAMES: - case $.SCRIPT: - case $.STYLE: - case $.TEMPLATE: - case $.TITLE: { - startTagInHead(p, token); - break; - } - // Re-process the token in the appropriate mode - case $.CAPTION: - case $.COLGROUP: - case $.TBODY: - case $.TFOOT: - case $.THEAD: { - p.tmplInsertionModeStack[0] = InsertionMode.IN_TABLE; - p.insertionMode = InsertionMode.IN_TABLE; - startTagInTable(p, token); - break; - } - case $.COL: { - p.tmplInsertionModeStack[0] = InsertionMode.IN_COLUMN_GROUP; - p.insertionMode = InsertionMode.IN_COLUMN_GROUP; - startTagInColumnGroup(p, token); - break; - } - case $.TR: { - p.tmplInsertionModeStack[0] = InsertionMode.IN_TABLE_BODY; - p.insertionMode = InsertionMode.IN_TABLE_BODY; - startTagInTableBody(p, token); - break; - } - case $.TD: - case $.TH: { - p.tmplInsertionModeStack[0] = InsertionMode.IN_ROW; - p.insertionMode = InsertionMode.IN_ROW; - startTagInRow(p, token); - break; - } - default: { - p.tmplInsertionModeStack[0] = InsertionMode.IN_BODY; - p.insertionMode = InsertionMode.IN_BODY; - startTagInBody(p, token); - } - } -} -function endTagInTemplate(p, token) { - if (token.tagID === $.TEMPLATE) { - templateEndTagInHead(p, token); - } -} -function eofInTemplate(p, token) { - if (p.openElements.tmplCount > 0) { - p.openElements.popUntilTagNamePopped($.TEMPLATE); - p.activeFormattingElements.clearToLastMarker(); - p.tmplInsertionModeStack.shift(); - p._resetInsertionMode(); - p.onEof(token); - } - else { - stopParsing(p, token); - } -} -// The "after body" insertion mode -//------------------------------------------------------------------ -function startTagAfterBody(p, token) { - if (token.tagID === $.HTML) { - startTagInBody(p, token); - } - else { - tokenAfterBody(p, token); - } -} -function endTagAfterBody(p, token) { - var _a; - if (token.tagID === $.HTML) { - if (!p.fragmentContext) { - p.insertionMode = InsertionMode.AFTER_AFTER_BODY; - } - //NOTE: <html> is never popped from the stack, so we need to updated - //the end location explicitly. - if (p.options.sourceCodeLocationInfo && p.openElements.tagIDs[0] === $.HTML) { - p._setEndLocation(p.openElements.items[0], token); - // Update the body element, if it doesn't have an end tag - const bodyElement = p.openElements.items[1]; - if (bodyElement && !((_a = p.treeAdapter.getNodeSourceCodeLocation(bodyElement)) === null || _a === void 0 ? void 0 : _a.endTag)) { - p._setEndLocation(bodyElement, token); - } - } - } - else { - tokenAfterBody(p, token); - } -} -function tokenAfterBody(p, token) { - p.insertionMode = InsertionMode.IN_BODY; - modeInBody(p, token); -} -// The "in frameset" insertion mode -//------------------------------------------------------------------ -function startTagInFrameset(p, token) { - switch (token.tagID) { - case $.HTML: { - startTagInBody(p, token); - break; - } - case $.FRAMESET: { - p._insertElement(token, NS.HTML); - break; - } - case $.FRAME: { - p._appendElement(token, NS.HTML); - token.ackSelfClosing = true; - break; - } - case $.NOFRAMES: { - startTagInHead(p, token); - break; - } - default: - // Do nothing - } -} -function endTagInFrameset(p, token) { - if (token.tagID === $.FRAMESET && !p.openElements.isRootHtmlElementCurrent()) { - p.openElements.pop(); - if (!p.fragmentContext && p.openElements.currentTagId !== $.FRAMESET) { - p.insertionMode = InsertionMode.AFTER_FRAMESET; - } - } -} -// The "after frameset" insertion mode -//------------------------------------------------------------------ -function startTagAfterFrameset(p, token) { - switch (token.tagID) { - case $.HTML: { - startTagInBody(p, token); - break; - } - case $.NOFRAMES: { - startTagInHead(p, token); - break; - } - default: - // Do nothing - } -} -function endTagAfterFrameset(p, token) { - if (token.tagID === $.HTML) { - p.insertionMode = InsertionMode.AFTER_AFTER_FRAMESET; - } -} -// The "after after body" insertion mode -//------------------------------------------------------------------ -function startTagAfterAfterBody(p, token) { - if (token.tagID === $.HTML) { - startTagInBody(p, token); - } - else { - tokenAfterAfterBody(p, token); - } -} -function tokenAfterAfterBody(p, token) { - p.insertionMode = InsertionMode.IN_BODY; - modeInBody(p, token); -} -// The "after after frameset" insertion mode -//------------------------------------------------------------------ -function startTagAfterAfterFrameset(p, token) { - switch (token.tagID) { - case $.HTML: { - startTagInBody(p, token); - break; - } - case $.NOFRAMES: { - startTagInHead(p, token); - break; - } - default: - // Do nothing - } -} -// The rules for parsing tokens in foreign content -//------------------------------------------------------------------ -function nullCharacterInForeignContent(p, token) { - token.chars = unicode.REPLACEMENT_CHARACTER; - p._insertCharacters(token); -} -function characterInForeignContent(p, token) { - p._insertCharacters(token); - p.framesetOk = false; -} -function popUntilHtmlOrIntegrationPoint(p) { - while (p.treeAdapter.getNamespaceURI(p.openElements.current) !== NS.HTML && - !p._isIntegrationPoint(p.openElements.currentTagId, p.openElements.current)) { - p.openElements.pop(); - } -} -function startTagInForeignContent(p, token) { - if (foreignContent.causesExit(token)) { - popUntilHtmlOrIntegrationPoint(p); - p._startTagOutsideForeignContent(token); - } - else { - const current = p._getAdjustedCurrentElement(); - const currentNs = p.treeAdapter.getNamespaceURI(current); - if (currentNs === NS.MATHML) { - foreignContent.adjustTokenMathMLAttrs(token); - } - else if (currentNs === NS.SVG) { - foreignContent.adjustTokenSVGTagName(token); - foreignContent.adjustTokenSVGAttrs(token); - } - foreignContent.adjustTokenXMLAttrs(token); - if (token.selfClosing) { - p._appendElement(token, currentNs); - } - else { - p._insertElement(token, currentNs); - } - token.ackSelfClosing = true; - } -} -function endTagInForeignContent(p, token) { - if (token.tagID === $.P || token.tagID === $.BR) { - popUntilHtmlOrIntegrationPoint(p); - p._endTagOutsideForeignContent(token); - return; - } - for (let i = p.openElements.stackTop; i > 0; i--) { - const element = p.openElements.items[i]; - if (p.treeAdapter.getNamespaceURI(element) === NS.HTML) { - p._endTagOutsideForeignContent(token); - break; - } - const tagName = p.treeAdapter.getTagName(element); - if (tagName.toLowerCase() === token.tagName) { - //NOTE: update the token tag name for `_setEndLocation`. - token.tagName = tagName; - p.openElements.shortenToLength(i); - break; - } - } -} diff --git a/node_modules/parse5/dist/parser/open-element-stack.d.ts b/node_modules/parse5/dist/parser/open-element-stack.d.ts deleted file mode 100644 index 54cc738..0000000 --- a/node_modules/parse5/dist/parser/open-element-stack.d.ts +++ /dev/null @@ -1,53 +0,0 @@ -import { TAG_ID as $ } from '../common/html.js'; -import type { TreeAdapter, TreeAdapterTypeMap } from '../tree-adapters/interface.js'; -export interface StackHandler<T extends TreeAdapterTypeMap> { - onItemPush: (node: T['parentNode'], tid: number, isTop: boolean) => void; - onItemPop: (node: T['parentNode'], isTop: boolean) => void; -} -export declare class OpenElementStack<T extends TreeAdapterTypeMap> { - private treeAdapter; - private handler; - items: T['parentNode'][]; - tagIDs: $[]; - current: T['parentNode']; - stackTop: number; - tmplCount: number; - currentTagId: $; - get currentTmplContentOrNode(): T['parentNode']; - constructor(document: T['document'], treeAdapter: TreeAdapter<T>, handler: StackHandler<T>); - private _indexOf; - private _isInTemplate; - private _updateCurrentElement; - push(element: T['element'], tagID: $): void; - pop(): void; - replace(oldElement: T['element'], newElement: T['element']): void; - insertAfter(referenceElement: T['element'], newElement: T['element'], newElementID: $): void; - popUntilTagNamePopped(tagName: $): void; - shortenToLength(idx: number): void; - popUntilElementPopped(element: T['element']): void; - private popUntilPopped; - popUntilNumberedHeaderPopped(): void; - popUntilTableCellPopped(): void; - popAllUpToHtmlElement(): void; - private _indexOfTagNames; - private clearBackTo; - clearBackToTableContext(): void; - clearBackToTableBodyContext(): void; - clearBackToTableRowContext(): void; - remove(element: T['element']): void; - tryPeekProperlyNestedBodyElement(): T['element'] | null; - contains(element: T['element']): boolean; - getCommonAncestor(element: T['element']): T['element'] | null; - isRootHtmlElementCurrent(): boolean; - private hasInDynamicScope; - hasInScope(tagName: $): boolean; - hasInListItemScope(tagName: $): boolean; - hasInButtonScope(tagName: $): boolean; - hasNumberedHeaderInScope(): boolean; - hasInTableScope(tagName: $): boolean; - hasTableBodyContextInTableScope(): boolean; - hasInSelectScope(tagName: $): boolean; - generateImpliedEndTags(): void; - generateImpliedEndTagsThoroughly(): void; - generateImpliedEndTagsWithExclusion(exclusionId: $): void; -} diff --git a/node_modules/parse5/dist/parser/open-element-stack.js b/node_modules/parse5/dist/parser/open-element-stack.js deleted file mode 100644 index 50b3ae1..0000000 --- a/node_modules/parse5/dist/parser/open-element-stack.js +++ /dev/null @@ -1,320 +0,0 @@ -import { TAG_ID as $, NS, NUMBERED_HEADERS } from '../common/html.js'; -//Element utils -const IMPLICIT_END_TAG_REQUIRED = new Set([$.DD, $.DT, $.LI, $.OPTGROUP, $.OPTION, $.P, $.RB, $.RP, $.RT, $.RTC]); -const IMPLICIT_END_TAG_REQUIRED_THOROUGHLY = new Set([ - ...IMPLICIT_END_TAG_REQUIRED, - $.CAPTION, - $.COLGROUP, - $.TBODY, - $.TD, - $.TFOOT, - $.TH, - $.THEAD, - $.TR, -]); -const SCOPING_ELEMENTS_HTML = new Set([ - $.APPLET, - $.CAPTION, - $.HTML, - $.MARQUEE, - $.OBJECT, - $.TABLE, - $.TD, - $.TEMPLATE, - $.TH, -]); -const SCOPING_ELEMENTS_HTML_LIST = new Set([...SCOPING_ELEMENTS_HTML, $.OL, $.UL]); -const SCOPING_ELEMENTS_HTML_BUTTON = new Set([...SCOPING_ELEMENTS_HTML, $.BUTTON]); -const SCOPING_ELEMENTS_MATHML = new Set([$.ANNOTATION_XML, $.MI, $.MN, $.MO, $.MS, $.MTEXT]); -const SCOPING_ELEMENTS_SVG = new Set([$.DESC, $.FOREIGN_OBJECT, $.TITLE]); -const TABLE_ROW_CONTEXT = new Set([$.TR, $.TEMPLATE, $.HTML]); -const TABLE_BODY_CONTEXT = new Set([$.TBODY, $.TFOOT, $.THEAD, $.TEMPLATE, $.HTML]); -const TABLE_CONTEXT = new Set([$.TABLE, $.TEMPLATE, $.HTML]); -const TABLE_CELLS = new Set([$.TD, $.TH]); -//Stack of open elements -export class OpenElementStack { - get currentTmplContentOrNode() { - return this._isInTemplate() ? this.treeAdapter.getTemplateContent(this.current) : this.current; - } - constructor(document, treeAdapter, handler) { - this.treeAdapter = treeAdapter; - this.handler = handler; - this.items = []; - this.tagIDs = []; - this.stackTop = -1; - this.tmplCount = 0; - this.currentTagId = $.UNKNOWN; - this.current = document; - } - //Index of element - _indexOf(element) { - return this.items.lastIndexOf(element, this.stackTop); - } - //Update current element - _isInTemplate() { - return this.currentTagId === $.TEMPLATE && this.treeAdapter.getNamespaceURI(this.current) === NS.HTML; - } - _updateCurrentElement() { - this.current = this.items[this.stackTop]; - this.currentTagId = this.tagIDs[this.stackTop]; - } - //Mutations - push(element, tagID) { - this.stackTop++; - this.items[this.stackTop] = element; - this.current = element; - this.tagIDs[this.stackTop] = tagID; - this.currentTagId = tagID; - if (this._isInTemplate()) { - this.tmplCount++; - } - this.handler.onItemPush(element, tagID, true); - } - pop() { - const popped = this.current; - if (this.tmplCount > 0 && this._isInTemplate()) { - this.tmplCount--; - } - this.stackTop--; - this._updateCurrentElement(); - this.handler.onItemPop(popped, true); - } - replace(oldElement, newElement) { - const idx = this._indexOf(oldElement); - this.items[idx] = newElement; - if (idx === this.stackTop) { - this.current = newElement; - } - } - insertAfter(referenceElement, newElement, newElementID) { - const insertionIdx = this._indexOf(referenceElement) + 1; - this.items.splice(insertionIdx, 0, newElement); - this.tagIDs.splice(insertionIdx, 0, newElementID); - this.stackTop++; - if (insertionIdx === this.stackTop) { - this._updateCurrentElement(); - } - this.handler.onItemPush(this.current, this.currentTagId, insertionIdx === this.stackTop); - } - popUntilTagNamePopped(tagName) { - let targetIdx = this.stackTop + 1; - do { - targetIdx = this.tagIDs.lastIndexOf(tagName, targetIdx - 1); - } while (targetIdx > 0 && this.treeAdapter.getNamespaceURI(this.items[targetIdx]) !== NS.HTML); - this.shortenToLength(targetIdx < 0 ? 0 : targetIdx); - } - shortenToLength(idx) { - while (this.stackTop >= idx) { - const popped = this.current; - if (this.tmplCount > 0 && this._isInTemplate()) { - this.tmplCount -= 1; - } - this.stackTop--; - this._updateCurrentElement(); - this.handler.onItemPop(popped, this.stackTop < idx); - } - } - popUntilElementPopped(element) { - const idx = this._indexOf(element); - this.shortenToLength(idx < 0 ? 0 : idx); - } - popUntilPopped(tagNames, targetNS) { - const idx = this._indexOfTagNames(tagNames, targetNS); - this.shortenToLength(idx < 0 ? 0 : idx); - } - popUntilNumberedHeaderPopped() { - this.popUntilPopped(NUMBERED_HEADERS, NS.HTML); - } - popUntilTableCellPopped() { - this.popUntilPopped(TABLE_CELLS, NS.HTML); - } - popAllUpToHtmlElement() { - //NOTE: here we assume that the root <html> element is always first in the open element stack, so - //we perform this fast stack clean up. - this.tmplCount = 0; - this.shortenToLength(1); - } - _indexOfTagNames(tagNames, namespace) { - for (let i = this.stackTop; i >= 0; i--) { - if (tagNames.has(this.tagIDs[i]) && this.treeAdapter.getNamespaceURI(this.items[i]) === namespace) { - return i; - } - } - return -1; - } - clearBackTo(tagNames, targetNS) { - const idx = this._indexOfTagNames(tagNames, targetNS); - this.shortenToLength(idx + 1); - } - clearBackToTableContext() { - this.clearBackTo(TABLE_CONTEXT, NS.HTML); - } - clearBackToTableBodyContext() { - this.clearBackTo(TABLE_BODY_CONTEXT, NS.HTML); - } - clearBackToTableRowContext() { - this.clearBackTo(TABLE_ROW_CONTEXT, NS.HTML); - } - remove(element) { - const idx = this._indexOf(element); - if (idx >= 0) { - if (idx === this.stackTop) { - this.pop(); - } - else { - this.items.splice(idx, 1); - this.tagIDs.splice(idx, 1); - this.stackTop--; - this._updateCurrentElement(); - this.handler.onItemPop(element, false); - } - } - } - //Search - tryPeekProperlyNestedBodyElement() { - //Properly nested <body> element (should be second element in stack). - return this.stackTop >= 1 && this.tagIDs[1] === $.BODY ? this.items[1] : null; - } - contains(element) { - return this._indexOf(element) > -1; - } - getCommonAncestor(element) { - const elementIdx = this._indexOf(element) - 1; - return elementIdx >= 0 ? this.items[elementIdx] : null; - } - isRootHtmlElementCurrent() { - return this.stackTop === 0 && this.tagIDs[0] === $.HTML; - } - //Element in scope - hasInDynamicScope(tagName, htmlScope) { - for (let i = this.stackTop; i >= 0; i--) { - const tn = this.tagIDs[i]; - switch (this.treeAdapter.getNamespaceURI(this.items[i])) { - case NS.HTML: { - if (tn === tagName) - return true; - if (htmlScope.has(tn)) - return false; - break; - } - case NS.SVG: { - if (SCOPING_ELEMENTS_SVG.has(tn)) - return false; - break; - } - case NS.MATHML: { - if (SCOPING_ELEMENTS_MATHML.has(tn)) - return false; - break; - } - } - } - return true; - } - hasInScope(tagName) { - return this.hasInDynamicScope(tagName, SCOPING_ELEMENTS_HTML); - } - hasInListItemScope(tagName) { - return this.hasInDynamicScope(tagName, SCOPING_ELEMENTS_HTML_LIST); - } - hasInButtonScope(tagName) { - return this.hasInDynamicScope(tagName, SCOPING_ELEMENTS_HTML_BUTTON); - } - hasNumberedHeaderInScope() { - for (let i = this.stackTop; i >= 0; i--) { - const tn = this.tagIDs[i]; - switch (this.treeAdapter.getNamespaceURI(this.items[i])) { - case NS.HTML: { - if (NUMBERED_HEADERS.has(tn)) - return true; - if (SCOPING_ELEMENTS_HTML.has(tn)) - return false; - break; - } - case NS.SVG: { - if (SCOPING_ELEMENTS_SVG.has(tn)) - return false; - break; - } - case NS.MATHML: { - if (SCOPING_ELEMENTS_MATHML.has(tn)) - return false; - break; - } - } - } - return true; - } - hasInTableScope(tagName) { - for (let i = this.stackTop; i >= 0; i--) { - if (this.treeAdapter.getNamespaceURI(this.items[i]) !== NS.HTML) { - continue; - } - switch (this.tagIDs[i]) { - case tagName: { - return true; - } - case $.TABLE: - case $.HTML: { - return false; - } - } - } - return true; - } - hasTableBodyContextInTableScope() { - for (let i = this.stackTop; i >= 0; i--) { - if (this.treeAdapter.getNamespaceURI(this.items[i]) !== NS.HTML) { - continue; - } - switch (this.tagIDs[i]) { - case $.TBODY: - case $.THEAD: - case $.TFOOT: { - return true; - } - case $.TABLE: - case $.HTML: { - return false; - } - } - } - return true; - } - hasInSelectScope(tagName) { - for (let i = this.stackTop; i >= 0; i--) { - if (this.treeAdapter.getNamespaceURI(this.items[i]) !== NS.HTML) { - continue; - } - switch (this.tagIDs[i]) { - case tagName: { - return true; - } - case $.OPTION: - case $.OPTGROUP: { - break; - } - default: { - return false; - } - } - } - return true; - } - //Implied end tags - generateImpliedEndTags() { - while (IMPLICIT_END_TAG_REQUIRED.has(this.currentTagId)) { - this.pop(); - } - } - generateImpliedEndTagsThoroughly() { - while (IMPLICIT_END_TAG_REQUIRED_THOROUGHLY.has(this.currentTagId)) { - this.pop(); - } - } - generateImpliedEndTagsWithExclusion(exclusionId) { - while (this.currentTagId !== exclusionId && IMPLICIT_END_TAG_REQUIRED_THOROUGHLY.has(this.currentTagId)) { - this.pop(); - } - } -} diff --git a/node_modules/parse5/dist/serializer/index.d.ts b/node_modules/parse5/dist/serializer/index.d.ts deleted file mode 100644 index 995b3d7..0000000 --- a/node_modules/parse5/dist/serializer/index.d.ts +++ /dev/null @@ -1,60 +0,0 @@ -import type { TreeAdapter, TreeAdapterTypeMap } from '../tree-adapters/interface.js'; -import { type DefaultTreeAdapterMap } from '../tree-adapters/default.js'; -export interface SerializerOptions<T extends TreeAdapterTypeMap> { - /** - * Specifies input tree format. - * - * @default `treeAdapters.default` - */ - treeAdapter?: TreeAdapter<T>; - /** - * The [scripting flag](https://html.spec.whatwg.org/multipage/parsing.html#scripting-flag). If set - * to `true`, `noscript` element content will not be escaped. - * - * @default `true` - */ - scriptingEnabled?: boolean; -} -/** - * Serializes an AST node to an HTML string. - * - * @example - * - * ```js - * const parse5 = require('parse5'); - * - * const document = parse5.parse('<!DOCTYPE html><html><head></head><body>Hi there!</body></html>'); - * - * // Serializes a document. - * const html = parse5.serialize(document); - * - * // Serializes the <html> element content. - * const str = parse5.serialize(document.childNodes[1]); - * - * console.log(str); //> '<head></head><body>Hi there!</body>' - * ``` - * - * @param node Node to serialize. - * @param options Serialization options. - */ -export declare function serialize<T extends TreeAdapterTypeMap = DefaultTreeAdapterMap>(node: T['parentNode'], options?: SerializerOptions<T>): string; -/** - * Serializes an AST element node to an HTML string, including the element node. - * - * @example - * - * ```js - * const parse5 = require('parse5'); - * - * const document = parse5.parseFragment('<div>Hello, <b>world</b>!</div>'); - * - * // Serializes the <div> element. - * const str = parse5.serializeOuter(document.childNodes[0]); - * - * console.log(str); //> '<div>Hello, <b>world</b>!</div>' - * ``` - * - * @param node Node to serialize. - * @param options Serialization options. - */ -export declare function serializeOuter<T extends TreeAdapterTypeMap = DefaultTreeAdapterMap>(node: T['node'], options?: SerializerOptions<T>): string; diff --git a/node_modules/parse5/dist/serializer/index.js b/node_modules/parse5/dist/serializer/index.js deleted file mode 100644 index 3e01447..0000000 --- a/node_modules/parse5/dist/serializer/index.js +++ /dev/null @@ -1,168 +0,0 @@ -import { TAG_NAMES as $, NS, hasUnescapedText } from '../common/html.js'; -import { escapeText, escapeAttribute } from 'entities/lib/escape.js'; -import { defaultTreeAdapter } from '../tree-adapters/default.js'; -// Sets -const VOID_ELEMENTS = new Set([ - $.AREA, - $.BASE, - $.BASEFONT, - $.BGSOUND, - $.BR, - $.COL, - $.EMBED, - $.FRAME, - $.HR, - $.IMG, - $.INPUT, - $.KEYGEN, - $.LINK, - $.META, - $.PARAM, - $.SOURCE, - $.TRACK, - $.WBR, -]); -function isVoidElement(node, options) { - return (options.treeAdapter.isElementNode(node) && - options.treeAdapter.getNamespaceURI(node) === NS.HTML && - VOID_ELEMENTS.has(options.treeAdapter.getTagName(node))); -} -const defaultOpts = { treeAdapter: defaultTreeAdapter, scriptingEnabled: true }; -/** - * Serializes an AST node to an HTML string. - * - * @example - * - * ```js - * const parse5 = require('parse5'); - * - * const document = parse5.parse('<!DOCTYPE html><html><head></head><body>Hi there!</body></html>'); - * - * // Serializes a document. - * const html = parse5.serialize(document); - * - * // Serializes the <html> element content. - * const str = parse5.serialize(document.childNodes[1]); - * - * console.log(str); //> '<head></head><body>Hi there!</body>' - * ``` - * - * @param node Node to serialize. - * @param options Serialization options. - */ -export function serialize(node, options) { - const opts = { ...defaultOpts, ...options }; - if (isVoidElement(node, opts)) { - return ''; - } - return serializeChildNodes(node, opts); -} -/** - * Serializes an AST element node to an HTML string, including the element node. - * - * @example - * - * ```js - * const parse5 = require('parse5'); - * - * const document = parse5.parseFragment('<div>Hello, <b>world</b>!</div>'); - * - * // Serializes the <div> element. - * const str = parse5.serializeOuter(document.childNodes[0]); - * - * console.log(str); //> '<div>Hello, <b>world</b>!</div>' - * ``` - * - * @param node Node to serialize. - * @param options Serialization options. - */ -export function serializeOuter(node, options) { - const opts = { ...defaultOpts, ...options }; - return serializeNode(node, opts); -} -function serializeChildNodes(parentNode, options) { - let html = ''; - // Get container of the child nodes - const container = options.treeAdapter.isElementNode(parentNode) && - options.treeAdapter.getTagName(parentNode) === $.TEMPLATE && - options.treeAdapter.getNamespaceURI(parentNode) === NS.HTML - ? options.treeAdapter.getTemplateContent(parentNode) - : parentNode; - const childNodes = options.treeAdapter.getChildNodes(container); - if (childNodes) { - for (const currentNode of childNodes) { - html += serializeNode(currentNode, options); - } - } - return html; -} -function serializeNode(node, options) { - if (options.treeAdapter.isElementNode(node)) { - return serializeElement(node, options); - } - if (options.treeAdapter.isTextNode(node)) { - return serializeTextNode(node, options); - } - if (options.treeAdapter.isCommentNode(node)) { - return serializeCommentNode(node, options); - } - if (options.treeAdapter.isDocumentTypeNode(node)) { - return serializeDocumentTypeNode(node, options); - } - // Return an empty string for unknown nodes - return ''; -} -function serializeElement(node, options) { - const tn = options.treeAdapter.getTagName(node); - return `<${tn}${serializeAttributes(node, options)}>${isVoidElement(node, options) ? '' : `${serializeChildNodes(node, options)}</${tn}>`}`; -} -function serializeAttributes(node, { treeAdapter }) { - let html = ''; - for (const attr of treeAdapter.getAttrList(node)) { - html += ' '; - if (attr.namespace) { - switch (attr.namespace) { - case NS.XML: { - html += `xml:${attr.name}`; - break; - } - case NS.XMLNS: { - if (attr.name !== 'xmlns') { - html += 'xmlns:'; - } - html += attr.name; - break; - } - case NS.XLINK: { - html += `xlink:${attr.name}`; - break; - } - default: { - html += `${attr.prefix}:${attr.name}`; - } - } - } - else { - html += attr.name; - } - html += `="${escapeAttribute(attr.value)}"`; - } - return html; -} -function serializeTextNode(node, options) { - const { treeAdapter } = options; - const content = treeAdapter.getTextNodeContent(node); - const parent = treeAdapter.getParentNode(node); - const parentTn = parent && treeAdapter.isElementNode(parent) && treeAdapter.getTagName(parent); - return parentTn && - treeAdapter.getNamespaceURI(parent) === NS.HTML && - hasUnescapedText(parentTn, options.scriptingEnabled) - ? content - : escapeText(content); -} -function serializeCommentNode(node, { treeAdapter }) { - return `<!--${treeAdapter.getCommentNodeContent(node)}-->`; -} -function serializeDocumentTypeNode(node, { treeAdapter }) { - return `<!DOCTYPE ${treeAdapter.getDocumentTypeNodeName(node)}>`; -} diff --git a/node_modules/parse5/dist/tokenizer/index.d.ts b/node_modules/parse5/dist/tokenizer/index.d.ts deleted file mode 100644 index 6819efc..0000000 --- a/node_modules/parse5/dist/tokenizer/index.d.ts +++ /dev/null @@ -1,247 +0,0 @@ -import { Preprocessor } from './preprocessor.js'; -import { type Token, type CharacterToken, type DoctypeToken, type TagToken, type EOFToken, type CommentToken, type Attribute, type Location } from '../common/token.js'; -import { EntityDecoder } from 'entities/lib/decode.js'; -import { ERR, type ParserErrorHandler } from '../common/error-codes.js'; -declare const enum State { - DATA = 0, - RCDATA = 1, - RAWTEXT = 2, - SCRIPT_DATA = 3, - PLAINTEXT = 4, - TAG_OPEN = 5, - END_TAG_OPEN = 6, - TAG_NAME = 7, - RCDATA_LESS_THAN_SIGN = 8, - RCDATA_END_TAG_OPEN = 9, - RCDATA_END_TAG_NAME = 10, - RAWTEXT_LESS_THAN_SIGN = 11, - RAWTEXT_END_TAG_OPEN = 12, - RAWTEXT_END_TAG_NAME = 13, - SCRIPT_DATA_LESS_THAN_SIGN = 14, - SCRIPT_DATA_END_TAG_OPEN = 15, - SCRIPT_DATA_END_TAG_NAME = 16, - SCRIPT_DATA_ESCAPE_START = 17, - SCRIPT_DATA_ESCAPE_START_DASH = 18, - SCRIPT_DATA_ESCAPED = 19, - SCRIPT_DATA_ESCAPED_DASH = 20, - SCRIPT_DATA_ESCAPED_DASH_DASH = 21, - SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN = 22, - SCRIPT_DATA_ESCAPED_END_TAG_OPEN = 23, - SCRIPT_DATA_ESCAPED_END_TAG_NAME = 24, - SCRIPT_DATA_DOUBLE_ESCAPE_START = 25, - SCRIPT_DATA_DOUBLE_ESCAPED = 26, - SCRIPT_DATA_DOUBLE_ESCAPED_DASH = 27, - SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH = 28, - SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN = 29, - SCRIPT_DATA_DOUBLE_ESCAPE_END = 30, - BEFORE_ATTRIBUTE_NAME = 31, - ATTRIBUTE_NAME = 32, - AFTER_ATTRIBUTE_NAME = 33, - BEFORE_ATTRIBUTE_VALUE = 34, - ATTRIBUTE_VALUE_DOUBLE_QUOTED = 35, - ATTRIBUTE_VALUE_SINGLE_QUOTED = 36, - ATTRIBUTE_VALUE_UNQUOTED = 37, - AFTER_ATTRIBUTE_VALUE_QUOTED = 38, - SELF_CLOSING_START_TAG = 39, - BOGUS_COMMENT = 40, - MARKUP_DECLARATION_OPEN = 41, - COMMENT_START = 42, - COMMENT_START_DASH = 43, - COMMENT = 44, - COMMENT_LESS_THAN_SIGN = 45, - COMMENT_LESS_THAN_SIGN_BANG = 46, - COMMENT_LESS_THAN_SIGN_BANG_DASH = 47, - COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH = 48, - COMMENT_END_DASH = 49, - COMMENT_END = 50, - COMMENT_END_BANG = 51, - DOCTYPE = 52, - BEFORE_DOCTYPE_NAME = 53, - DOCTYPE_NAME = 54, - AFTER_DOCTYPE_NAME = 55, - AFTER_DOCTYPE_PUBLIC_KEYWORD = 56, - BEFORE_DOCTYPE_PUBLIC_IDENTIFIER = 57, - DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED = 58, - DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED = 59, - AFTER_DOCTYPE_PUBLIC_IDENTIFIER = 60, - BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS = 61, - AFTER_DOCTYPE_SYSTEM_KEYWORD = 62, - BEFORE_DOCTYPE_SYSTEM_IDENTIFIER = 63, - DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED = 64, - DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED = 65, - AFTER_DOCTYPE_SYSTEM_IDENTIFIER = 66, - BOGUS_DOCTYPE = 67, - CDATA_SECTION = 68, - CDATA_SECTION_BRACKET = 69, - CDATA_SECTION_END = 70, - CHARACTER_REFERENCE = 71, - AMBIGUOUS_AMPERSAND = 72 -} -export declare const TokenizerMode: { - readonly DATA: State.DATA; - readonly RCDATA: State.RCDATA; - readonly RAWTEXT: State.RAWTEXT; - readonly SCRIPT_DATA: State.SCRIPT_DATA; - readonly PLAINTEXT: State.PLAINTEXT; - readonly CDATA_SECTION: State.CDATA_SECTION; -}; -export interface TokenizerOptions { - sourceCodeLocationInfo?: boolean; -} -export interface TokenHandler { - onComment(token: CommentToken): void; - onDoctype(token: DoctypeToken): void; - onStartTag(token: TagToken): void; - onEndTag(token: TagToken): void; - onEof(token: EOFToken): void; - onCharacter(token: CharacterToken): void; - onNullCharacter(token: CharacterToken): void; - onWhitespaceCharacter(token: CharacterToken): void; - onParseError?: ParserErrorHandler | null; -} -export declare class Tokenizer { - protected options: TokenizerOptions; - protected handler: TokenHandler; - preprocessor: Preprocessor; - protected paused: boolean; - /** Ensures that the parsing loop isn't run multiple times at once. */ - protected inLoop: boolean; - /** - * Indicates that the current adjusted node exists, is not an element in the HTML namespace, - * and that it is not an integration point for either MathML or HTML. - * - * @see {@link https://html.spec.whatwg.org/multipage/parsing.html#tree-construction} - */ - inForeignNode: boolean; - lastStartTagName: string; - active: boolean; - state: State; - protected returnState: State; - /** - * We use `entities`' `EntityDecoder` to parse character references. - * - * All of the following states are handled by the `EntityDecoder`: - * - * - Named character reference state - * - Numeric character reference state - * - Hexademical character reference start state - * - Hexademical character reference state - * - Decimal character reference state - * - Numeric character reference end state - */ - protected entityDecoder: EntityDecoder; - protected entityStartPos: number; - protected consumedAfterSnapshot: number; - protected currentLocation: Location | null; - protected currentCharacterToken: CharacterToken | null; - protected currentToken: Token | null; - protected currentAttr: Attribute; - constructor(options: TokenizerOptions, handler: TokenHandler); - protected _err(code: ERR, cpOffset?: number): void; - protected getCurrentLocation(offset: number): Location | null; - protected _runParsingLoop(): void; - pause(): void; - resume(writeCallback?: () => void): void; - write(chunk: string, isLastChunk: boolean, writeCallback?: () => void): void; - insertHtmlAtCurrentPos(chunk: string): void; - protected _ensureHibernation(): boolean; - protected _consume(): number; - protected _advanceBy(count: number): void; - protected _consumeSequenceIfMatch(pattern: string, caseSensitive: boolean): boolean; - protected _createStartTagToken(): void; - protected _createEndTagToken(): void; - protected _createCommentToken(offset: number): void; - protected _createDoctypeToken(initialName: string | null): void; - protected _createCharacterToken(type: CharacterToken['type'], chars: string): void; - protected _createAttr(attrNameFirstCh: string): void; - protected _leaveAttrName(): void; - protected _leaveAttrValue(): void; - protected prepareToken(ct: Token): void; - protected emitCurrentTagToken(): void; - protected emitCurrentComment(ct: CommentToken): void; - protected emitCurrentDoctype(ct: DoctypeToken): void; - protected _emitCurrentCharacterToken(nextLocation: Location | null): void; - protected _emitEOFToken(): void; - protected _appendCharToCurrentCharacterToken(type: CharacterToken['type'], ch: string): void; - protected _emitCodePoint(cp: number): void; - protected _emitChars(ch: string): void; - protected _startCharacterReference(): void; - protected _isCharacterReferenceInAttribute(): boolean; - protected _flushCodePointConsumedAsCharacterReference(cp: number): void; - protected _callState(cp: number): void; - protected _stateData(cp: number): void; - protected _stateRcdata(cp: number): void; - protected _stateRawtext(cp: number): void; - protected _stateScriptData(cp: number): void; - protected _statePlaintext(cp: number): void; - protected _stateTagOpen(cp: number): void; - protected _stateEndTagOpen(cp: number): void; - protected _stateTagName(cp: number): void; - protected _stateRcdataLessThanSign(cp: number): void; - protected _stateRcdataEndTagOpen(cp: number): void; - protected handleSpecialEndTag(_cp: number): boolean; - protected _stateRcdataEndTagName(cp: number): void; - protected _stateRawtextLessThanSign(cp: number): void; - protected _stateRawtextEndTagOpen(cp: number): void; - protected _stateRawtextEndTagName(cp: number): void; - protected _stateScriptDataLessThanSign(cp: number): void; - protected _stateScriptDataEndTagOpen(cp: number): void; - protected _stateScriptDataEndTagName(cp: number): void; - protected _stateScriptDataEscapeStart(cp: number): void; - protected _stateScriptDataEscapeStartDash(cp: number): void; - protected _stateScriptDataEscaped(cp: number): void; - protected _stateScriptDataEscapedDash(cp: number): void; - protected _stateScriptDataEscapedDashDash(cp: number): void; - protected _stateScriptDataEscapedLessThanSign(cp: number): void; - protected _stateScriptDataEscapedEndTagOpen(cp: number): void; - protected _stateScriptDataEscapedEndTagName(cp: number): void; - protected _stateScriptDataDoubleEscapeStart(cp: number): void; - protected _stateScriptDataDoubleEscaped(cp: number): void; - protected _stateScriptDataDoubleEscapedDash(cp: number): void; - protected _stateScriptDataDoubleEscapedDashDash(cp: number): void; - protected _stateScriptDataDoubleEscapedLessThanSign(cp: number): void; - protected _stateScriptDataDoubleEscapeEnd(cp: number): void; - protected _stateBeforeAttributeName(cp: number): void; - protected _stateAttributeName(cp: number): void; - protected _stateAfterAttributeName(cp: number): void; - protected _stateBeforeAttributeValue(cp: number): void; - protected _stateAttributeValueDoubleQuoted(cp: number): void; - protected _stateAttributeValueSingleQuoted(cp: number): void; - protected _stateAttributeValueUnquoted(cp: number): void; - protected _stateAfterAttributeValueQuoted(cp: number): void; - protected _stateSelfClosingStartTag(cp: number): void; - protected _stateBogusComment(cp: number): void; - protected _stateMarkupDeclarationOpen(cp: number): void; - protected _stateCommentStart(cp: number): void; - protected _stateCommentStartDash(cp: number): void; - protected _stateComment(cp: number): void; - protected _stateCommentLessThanSign(cp: number): void; - protected _stateCommentLessThanSignBang(cp: number): void; - protected _stateCommentLessThanSignBangDash(cp: number): void; - protected _stateCommentLessThanSignBangDashDash(cp: number): void; - protected _stateCommentEndDash(cp: number): void; - protected _stateCommentEnd(cp: number): void; - protected _stateCommentEndBang(cp: number): void; - protected _stateDoctype(cp: number): void; - protected _stateBeforeDoctypeName(cp: number): void; - protected _stateDoctypeName(cp: number): void; - protected _stateAfterDoctypeName(cp: number): void; - protected _stateAfterDoctypePublicKeyword(cp: number): void; - protected _stateBeforeDoctypePublicIdentifier(cp: number): void; - protected _stateDoctypePublicIdentifierDoubleQuoted(cp: number): void; - protected _stateDoctypePublicIdentifierSingleQuoted(cp: number): void; - protected _stateAfterDoctypePublicIdentifier(cp: number): void; - protected _stateBetweenDoctypePublicAndSystemIdentifiers(cp: number): void; - protected _stateAfterDoctypeSystemKeyword(cp: number): void; - protected _stateBeforeDoctypeSystemIdentifier(cp: number): void; - protected _stateDoctypeSystemIdentifierDoubleQuoted(cp: number): void; - protected _stateDoctypeSystemIdentifierSingleQuoted(cp: number): void; - protected _stateAfterDoctypeSystemIdentifier(cp: number): void; - protected _stateBogusDoctype(cp: number): void; - protected _stateCdataSection(cp: number): void; - protected _stateCdataSectionBracket(cp: number): void; - protected _stateCdataSectionEnd(cp: number): void; - protected _stateCharacterReference(): void; - protected _stateAmbiguousAmpersand(cp: number): void; -} -export {}; diff --git a/node_modules/parse5/dist/tokenizer/index.js b/node_modules/parse5/dist/tokenizer/index.js deleted file mode 100644 index 5e8e69d..0000000 --- a/node_modules/parse5/dist/tokenizer/index.js +++ /dev/null @@ -1,2710 +0,0 @@ -import { Preprocessor } from './preprocessor.js'; -import { CODE_POINTS as $, SEQUENCES as $$, REPLACEMENT_CHARACTER, isSurrogate, isUndefinedCodePoint, isControlCodePoint, } from '../common/unicode.js'; -import { TokenType, getTokenAttr, } from '../common/token.js'; -import { htmlDecodeTree, EntityDecoder, DecodingMode } from 'entities/lib/decode.js'; -import { ERR } from '../common/error-codes.js'; -import { TAG_ID, getTagID } from '../common/html.js'; -//States -var State; -(function (State) { - State[State["DATA"] = 0] = "DATA"; - State[State["RCDATA"] = 1] = "RCDATA"; - State[State["RAWTEXT"] = 2] = "RAWTEXT"; - State[State["SCRIPT_DATA"] = 3] = "SCRIPT_DATA"; - State[State["PLAINTEXT"] = 4] = "PLAINTEXT"; - State[State["TAG_OPEN"] = 5] = "TAG_OPEN"; - State[State["END_TAG_OPEN"] = 6] = "END_TAG_OPEN"; - State[State["TAG_NAME"] = 7] = "TAG_NAME"; - State[State["RCDATA_LESS_THAN_SIGN"] = 8] = "RCDATA_LESS_THAN_SIGN"; - State[State["RCDATA_END_TAG_OPEN"] = 9] = "RCDATA_END_TAG_OPEN"; - State[State["RCDATA_END_TAG_NAME"] = 10] = "RCDATA_END_TAG_NAME"; - State[State["RAWTEXT_LESS_THAN_SIGN"] = 11] = "RAWTEXT_LESS_THAN_SIGN"; - State[State["RAWTEXT_END_TAG_OPEN"] = 12] = "RAWTEXT_END_TAG_OPEN"; - State[State["RAWTEXT_END_TAG_NAME"] = 13] = "RAWTEXT_END_TAG_NAME"; - State[State["SCRIPT_DATA_LESS_THAN_SIGN"] = 14] = "SCRIPT_DATA_LESS_THAN_SIGN"; - State[State["SCRIPT_DATA_END_TAG_OPEN"] = 15] = "SCRIPT_DATA_END_TAG_OPEN"; - State[State["SCRIPT_DATA_END_TAG_NAME"] = 16] = "SCRIPT_DATA_END_TAG_NAME"; - State[State["SCRIPT_DATA_ESCAPE_START"] = 17] = "SCRIPT_DATA_ESCAPE_START"; - State[State["SCRIPT_DATA_ESCAPE_START_DASH"] = 18] = "SCRIPT_DATA_ESCAPE_START_DASH"; - State[State["SCRIPT_DATA_ESCAPED"] = 19] = "SCRIPT_DATA_ESCAPED"; - State[State["SCRIPT_DATA_ESCAPED_DASH"] = 20] = "SCRIPT_DATA_ESCAPED_DASH"; - State[State["SCRIPT_DATA_ESCAPED_DASH_DASH"] = 21] = "SCRIPT_DATA_ESCAPED_DASH_DASH"; - State[State["SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN"] = 22] = "SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN"; - State[State["SCRIPT_DATA_ESCAPED_END_TAG_OPEN"] = 23] = "SCRIPT_DATA_ESCAPED_END_TAG_OPEN"; - State[State["SCRIPT_DATA_ESCAPED_END_TAG_NAME"] = 24] = "SCRIPT_DATA_ESCAPED_END_TAG_NAME"; - State[State["SCRIPT_DATA_DOUBLE_ESCAPE_START"] = 25] = "SCRIPT_DATA_DOUBLE_ESCAPE_START"; - State[State["SCRIPT_DATA_DOUBLE_ESCAPED"] = 26] = "SCRIPT_DATA_DOUBLE_ESCAPED"; - State[State["SCRIPT_DATA_DOUBLE_ESCAPED_DASH"] = 27] = "SCRIPT_DATA_DOUBLE_ESCAPED_DASH"; - State[State["SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH"] = 28] = "SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH"; - State[State["SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN"] = 29] = "SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN"; - State[State["SCRIPT_DATA_DOUBLE_ESCAPE_END"] = 30] = "SCRIPT_DATA_DOUBLE_ESCAPE_END"; - State[State["BEFORE_ATTRIBUTE_NAME"] = 31] = "BEFORE_ATTRIBUTE_NAME"; - State[State["ATTRIBUTE_NAME"] = 32] = "ATTRIBUTE_NAME"; - State[State["AFTER_ATTRIBUTE_NAME"] = 33] = "AFTER_ATTRIBUTE_NAME"; - State[State["BEFORE_ATTRIBUTE_VALUE"] = 34] = "BEFORE_ATTRIBUTE_VALUE"; - State[State["ATTRIBUTE_VALUE_DOUBLE_QUOTED"] = 35] = "ATTRIBUTE_VALUE_DOUBLE_QUOTED"; - State[State["ATTRIBUTE_VALUE_SINGLE_QUOTED"] = 36] = "ATTRIBUTE_VALUE_SINGLE_QUOTED"; - State[State["ATTRIBUTE_VALUE_UNQUOTED"] = 37] = "ATTRIBUTE_VALUE_UNQUOTED"; - State[State["AFTER_ATTRIBUTE_VALUE_QUOTED"] = 38] = "AFTER_ATTRIBUTE_VALUE_QUOTED"; - State[State["SELF_CLOSING_START_TAG"] = 39] = "SELF_CLOSING_START_TAG"; - State[State["BOGUS_COMMENT"] = 40] = "BOGUS_COMMENT"; - State[State["MARKUP_DECLARATION_OPEN"] = 41] = "MARKUP_DECLARATION_OPEN"; - State[State["COMMENT_START"] = 42] = "COMMENT_START"; - State[State["COMMENT_START_DASH"] = 43] = "COMMENT_START_DASH"; - State[State["COMMENT"] = 44] = "COMMENT"; - State[State["COMMENT_LESS_THAN_SIGN"] = 45] = "COMMENT_LESS_THAN_SIGN"; - State[State["COMMENT_LESS_THAN_SIGN_BANG"] = 46] = "COMMENT_LESS_THAN_SIGN_BANG"; - State[State["COMMENT_LESS_THAN_SIGN_BANG_DASH"] = 47] = "COMMENT_LESS_THAN_SIGN_BANG_DASH"; - State[State["COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH"] = 48] = "COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH"; - State[State["COMMENT_END_DASH"] = 49] = "COMMENT_END_DASH"; - State[State["COMMENT_END"] = 50] = "COMMENT_END"; - State[State["COMMENT_END_BANG"] = 51] = "COMMENT_END_BANG"; - State[State["DOCTYPE"] = 52] = "DOCTYPE"; - State[State["BEFORE_DOCTYPE_NAME"] = 53] = "BEFORE_DOCTYPE_NAME"; - State[State["DOCTYPE_NAME"] = 54] = "DOCTYPE_NAME"; - State[State["AFTER_DOCTYPE_NAME"] = 55] = "AFTER_DOCTYPE_NAME"; - State[State["AFTER_DOCTYPE_PUBLIC_KEYWORD"] = 56] = "AFTER_DOCTYPE_PUBLIC_KEYWORD"; - State[State["BEFORE_DOCTYPE_PUBLIC_IDENTIFIER"] = 57] = "BEFORE_DOCTYPE_PUBLIC_IDENTIFIER"; - State[State["DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED"] = 58] = "DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED"; - State[State["DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED"] = 59] = "DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED"; - State[State["AFTER_DOCTYPE_PUBLIC_IDENTIFIER"] = 60] = "AFTER_DOCTYPE_PUBLIC_IDENTIFIER"; - State[State["BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS"] = 61] = "BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS"; - State[State["AFTER_DOCTYPE_SYSTEM_KEYWORD"] = 62] = "AFTER_DOCTYPE_SYSTEM_KEYWORD"; - State[State["BEFORE_DOCTYPE_SYSTEM_IDENTIFIER"] = 63] = "BEFORE_DOCTYPE_SYSTEM_IDENTIFIER"; - State[State["DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED"] = 64] = "DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED"; - State[State["DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED"] = 65] = "DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED"; - State[State["AFTER_DOCTYPE_SYSTEM_IDENTIFIER"] = 66] = "AFTER_DOCTYPE_SYSTEM_IDENTIFIER"; - State[State["BOGUS_DOCTYPE"] = 67] = "BOGUS_DOCTYPE"; - State[State["CDATA_SECTION"] = 68] = "CDATA_SECTION"; - State[State["CDATA_SECTION_BRACKET"] = 69] = "CDATA_SECTION_BRACKET"; - State[State["CDATA_SECTION_END"] = 70] = "CDATA_SECTION_END"; - State[State["CHARACTER_REFERENCE"] = 71] = "CHARACTER_REFERENCE"; - State[State["AMBIGUOUS_AMPERSAND"] = 72] = "AMBIGUOUS_AMPERSAND"; -})(State || (State = {})); -//Tokenizer initial states for different modes -export const TokenizerMode = { - DATA: State.DATA, - RCDATA: State.RCDATA, - RAWTEXT: State.RAWTEXT, - SCRIPT_DATA: State.SCRIPT_DATA, - PLAINTEXT: State.PLAINTEXT, - CDATA_SECTION: State.CDATA_SECTION, -}; -//Utils -//OPTIMIZATION: these utility functions should not be moved out of this module. V8 Crankshaft will not inline -//this functions if they will be situated in another module due to context switch. -//Always perform inlining check before modifying this functions ('node --trace-inlining'). -function isAsciiDigit(cp) { - return cp >= $.DIGIT_0 && cp <= $.DIGIT_9; -} -function isAsciiUpper(cp) { - return cp >= $.LATIN_CAPITAL_A && cp <= $.LATIN_CAPITAL_Z; -} -function isAsciiLower(cp) { - return cp >= $.LATIN_SMALL_A && cp <= $.LATIN_SMALL_Z; -} -function isAsciiLetter(cp) { - return isAsciiLower(cp) || isAsciiUpper(cp); -} -function isAsciiAlphaNumeric(cp) { - return isAsciiLetter(cp) || isAsciiDigit(cp); -} -function toAsciiLower(cp) { - return cp + 32; -} -function isWhitespace(cp) { - return cp === $.SPACE || cp === $.LINE_FEED || cp === $.TABULATION || cp === $.FORM_FEED; -} -function isScriptDataDoubleEscapeSequenceEnd(cp) { - return isWhitespace(cp) || cp === $.SOLIDUS || cp === $.GREATER_THAN_SIGN; -} -function getErrorForNumericCharacterReference(code) { - if (code === $.NULL) { - return ERR.nullCharacterReference; - } - else if (code > 1114111) { - return ERR.characterReferenceOutsideUnicodeRange; - } - else if (isSurrogate(code)) { - return ERR.surrogateCharacterReference; - } - else if (isUndefinedCodePoint(code)) { - return ERR.noncharacterCharacterReference; - } - else if (isControlCodePoint(code) || code === $.CARRIAGE_RETURN) { - return ERR.controlCharacterReference; - } - return null; -} -//Tokenizer -export class Tokenizer { - constructor(options, handler) { - this.options = options; - this.handler = handler; - this.paused = false; - /** Ensures that the parsing loop isn't run multiple times at once. */ - this.inLoop = false; - /** - * Indicates that the current adjusted node exists, is not an element in the HTML namespace, - * and that it is not an integration point for either MathML or HTML. - * - * @see {@link https://html.spec.whatwg.org/multipage/parsing.html#tree-construction} - */ - this.inForeignNode = false; - this.lastStartTagName = ''; - this.active = false; - this.state = State.DATA; - this.returnState = State.DATA; - this.entityStartPos = 0; - this.consumedAfterSnapshot = -1; - this.currentCharacterToken = null; - this.currentToken = null; - this.currentAttr = { name: '', value: '' }; - this.preprocessor = new Preprocessor(handler); - this.currentLocation = this.getCurrentLocation(-1); - this.entityDecoder = new EntityDecoder(htmlDecodeTree, (cp, consumed) => { - // Note: Set `pos` _before_ flushing, as flushing might drop - // the current chunk and invalidate `entityStartPos`. - this.preprocessor.pos = this.entityStartPos + consumed - 1; - this._flushCodePointConsumedAsCharacterReference(cp); - }, handler.onParseError - ? { - missingSemicolonAfterCharacterReference: () => { - this._err(ERR.missingSemicolonAfterCharacterReference, 1); - }, - absenceOfDigitsInNumericCharacterReference: (consumed) => { - this._err(ERR.absenceOfDigitsInNumericCharacterReference, this.entityStartPos - this.preprocessor.pos + consumed); - }, - validateNumericCharacterReference: (code) => { - const error = getErrorForNumericCharacterReference(code); - if (error) - this._err(error, 1); - }, - } - : undefined); - } - //Errors - _err(code, cpOffset = 0) { - var _a, _b; - (_b = (_a = this.handler).onParseError) === null || _b === void 0 ? void 0 : _b.call(_a, this.preprocessor.getError(code, cpOffset)); - } - // NOTE: `offset` may never run across line boundaries. - getCurrentLocation(offset) { - if (!this.options.sourceCodeLocationInfo) { - return null; - } - return { - startLine: this.preprocessor.line, - startCol: this.preprocessor.col - offset, - startOffset: this.preprocessor.offset - offset, - endLine: -1, - endCol: -1, - endOffset: -1, - }; - } - _runParsingLoop() { - if (this.inLoop) - return; - this.inLoop = true; - while (this.active && !this.paused) { - this.consumedAfterSnapshot = 0; - const cp = this._consume(); - if (!this._ensureHibernation()) { - this._callState(cp); - } - } - this.inLoop = false; - } - //API - pause() { - this.paused = true; - } - resume(writeCallback) { - if (!this.paused) { - throw new Error('Parser was already resumed'); - } - this.paused = false; - // Necessary for synchronous resume. - if (this.inLoop) - return; - this._runParsingLoop(); - if (!this.paused) { - writeCallback === null || writeCallback === void 0 ? void 0 : writeCallback(); - } - } - write(chunk, isLastChunk, writeCallback) { - this.active = true; - this.preprocessor.write(chunk, isLastChunk); - this._runParsingLoop(); - if (!this.paused) { - writeCallback === null || writeCallback === void 0 ? void 0 : writeCallback(); - } - } - insertHtmlAtCurrentPos(chunk) { - this.active = true; - this.preprocessor.insertHtmlAtCurrentPos(chunk); - this._runParsingLoop(); - } - //Hibernation - _ensureHibernation() { - if (this.preprocessor.endOfChunkHit) { - this.preprocessor.retreat(this.consumedAfterSnapshot); - this.consumedAfterSnapshot = 0; - this.active = false; - return true; - } - return false; - } - //Consumption - _consume() { - this.consumedAfterSnapshot++; - return this.preprocessor.advance(); - } - _advanceBy(count) { - this.consumedAfterSnapshot += count; - for (let i = 0; i < count; i++) { - this.preprocessor.advance(); - } - } - _consumeSequenceIfMatch(pattern, caseSensitive) { - if (this.preprocessor.startsWith(pattern, caseSensitive)) { - // We will already have consumed one character before calling this method. - this._advanceBy(pattern.length - 1); - return true; - } - return false; - } - //Token creation - _createStartTagToken() { - this.currentToken = { - type: TokenType.START_TAG, - tagName: '', - tagID: TAG_ID.UNKNOWN, - selfClosing: false, - ackSelfClosing: false, - attrs: [], - location: this.getCurrentLocation(1), - }; - } - _createEndTagToken() { - this.currentToken = { - type: TokenType.END_TAG, - tagName: '', - tagID: TAG_ID.UNKNOWN, - selfClosing: false, - ackSelfClosing: false, - attrs: [], - location: this.getCurrentLocation(2), - }; - } - _createCommentToken(offset) { - this.currentToken = { - type: TokenType.COMMENT, - data: '', - location: this.getCurrentLocation(offset), - }; - } - _createDoctypeToken(initialName) { - this.currentToken = { - type: TokenType.DOCTYPE, - name: initialName, - forceQuirks: false, - publicId: null, - systemId: null, - location: this.currentLocation, - }; - } - _createCharacterToken(type, chars) { - this.currentCharacterToken = { - type, - chars, - location: this.currentLocation, - }; - } - //Tag attributes - _createAttr(attrNameFirstCh) { - this.currentAttr = { - name: attrNameFirstCh, - value: '', - }; - this.currentLocation = this.getCurrentLocation(0); - } - _leaveAttrName() { - var _a; - var _b; - const token = this.currentToken; - if (getTokenAttr(token, this.currentAttr.name) === null) { - token.attrs.push(this.currentAttr); - if (token.location && this.currentLocation) { - const attrLocations = ((_a = (_b = token.location).attrs) !== null && _a !== void 0 ? _a : (_b.attrs = Object.create(null))); - attrLocations[this.currentAttr.name] = this.currentLocation; - // Set end location - this._leaveAttrValue(); - } - } - else { - this._err(ERR.duplicateAttribute); - } - } - _leaveAttrValue() { - if (this.currentLocation) { - this.currentLocation.endLine = this.preprocessor.line; - this.currentLocation.endCol = this.preprocessor.col; - this.currentLocation.endOffset = this.preprocessor.offset; - } - } - //Token emission - prepareToken(ct) { - this._emitCurrentCharacterToken(ct.location); - this.currentToken = null; - if (ct.location) { - ct.location.endLine = this.preprocessor.line; - ct.location.endCol = this.preprocessor.col + 1; - ct.location.endOffset = this.preprocessor.offset + 1; - } - this.currentLocation = this.getCurrentLocation(-1); - } - emitCurrentTagToken() { - const ct = this.currentToken; - this.prepareToken(ct); - ct.tagID = getTagID(ct.tagName); - if (ct.type === TokenType.START_TAG) { - this.lastStartTagName = ct.tagName; - this.handler.onStartTag(ct); - } - else { - if (ct.attrs.length > 0) { - this._err(ERR.endTagWithAttributes); - } - if (ct.selfClosing) { - this._err(ERR.endTagWithTrailingSolidus); - } - this.handler.onEndTag(ct); - } - this.preprocessor.dropParsedChunk(); - } - emitCurrentComment(ct) { - this.prepareToken(ct); - this.handler.onComment(ct); - this.preprocessor.dropParsedChunk(); - } - emitCurrentDoctype(ct) { - this.prepareToken(ct); - this.handler.onDoctype(ct); - this.preprocessor.dropParsedChunk(); - } - _emitCurrentCharacterToken(nextLocation) { - if (this.currentCharacterToken) { - //NOTE: if we have a pending character token, make it's end location equal to the - //current token's start location. - if (nextLocation && this.currentCharacterToken.location) { - this.currentCharacterToken.location.endLine = nextLocation.startLine; - this.currentCharacterToken.location.endCol = nextLocation.startCol; - this.currentCharacterToken.location.endOffset = nextLocation.startOffset; - } - switch (this.currentCharacterToken.type) { - case TokenType.CHARACTER: { - this.handler.onCharacter(this.currentCharacterToken); - break; - } - case TokenType.NULL_CHARACTER: { - this.handler.onNullCharacter(this.currentCharacterToken); - break; - } - case TokenType.WHITESPACE_CHARACTER: { - this.handler.onWhitespaceCharacter(this.currentCharacterToken); - break; - } - } - this.currentCharacterToken = null; - } - } - _emitEOFToken() { - const location = this.getCurrentLocation(0); - if (location) { - location.endLine = location.startLine; - location.endCol = location.startCol; - location.endOffset = location.startOffset; - } - this._emitCurrentCharacterToken(location); - this.handler.onEof({ type: TokenType.EOF, location }); - this.active = false; - } - //Characters emission - //OPTIMIZATION: The specification uses only one type of character token (one token per character). - //This causes a huge memory overhead and a lot of unnecessary parser loops. parse5 uses 3 groups of characters. - //If we have a sequence of characters that belong to the same group, the parser can process it - //as a single solid character token. - //So, there are 3 types of character tokens in parse5: - //1)TokenType.NULL_CHARACTER - \u0000-character sequences (e.g. '\u0000\u0000\u0000') - //2)TokenType.WHITESPACE_CHARACTER - any whitespace/new-line character sequences (e.g. '\n \r\t \f') - //3)TokenType.CHARACTER - any character sequence which don't belong to groups 1 and 2 (e.g. 'abcdef1234@@#$%^') - _appendCharToCurrentCharacterToken(type, ch) { - if (this.currentCharacterToken) { - if (this.currentCharacterToken.type === type) { - this.currentCharacterToken.chars += ch; - return; - } - else { - this.currentLocation = this.getCurrentLocation(0); - this._emitCurrentCharacterToken(this.currentLocation); - this.preprocessor.dropParsedChunk(); - } - } - this._createCharacterToken(type, ch); - } - _emitCodePoint(cp) { - const type = isWhitespace(cp) - ? TokenType.WHITESPACE_CHARACTER - : cp === $.NULL - ? TokenType.NULL_CHARACTER - : TokenType.CHARACTER; - this._appendCharToCurrentCharacterToken(type, String.fromCodePoint(cp)); - } - //NOTE: used when we emit characters explicitly. - //This is always for non-whitespace and non-null characters, which allows us to avoid additional checks. - _emitChars(ch) { - this._appendCharToCurrentCharacterToken(TokenType.CHARACTER, ch); - } - // Character reference helpers - _startCharacterReference() { - this.returnState = this.state; - this.state = State.CHARACTER_REFERENCE; - this.entityStartPos = this.preprocessor.pos; - this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute() ? DecodingMode.Attribute : DecodingMode.Legacy); - } - _isCharacterReferenceInAttribute() { - return (this.returnState === State.ATTRIBUTE_VALUE_DOUBLE_QUOTED || - this.returnState === State.ATTRIBUTE_VALUE_SINGLE_QUOTED || - this.returnState === State.ATTRIBUTE_VALUE_UNQUOTED); - } - _flushCodePointConsumedAsCharacterReference(cp) { - if (this._isCharacterReferenceInAttribute()) { - this.currentAttr.value += String.fromCodePoint(cp); - } - else { - this._emitCodePoint(cp); - } - } - // Calling states this way turns out to be much faster than any other approach. - _callState(cp) { - switch (this.state) { - case State.DATA: { - this._stateData(cp); - break; - } - case State.RCDATA: { - this._stateRcdata(cp); - break; - } - case State.RAWTEXT: { - this._stateRawtext(cp); - break; - } - case State.SCRIPT_DATA: { - this._stateScriptData(cp); - break; - } - case State.PLAINTEXT: { - this._statePlaintext(cp); - break; - } - case State.TAG_OPEN: { - this._stateTagOpen(cp); - break; - } - case State.END_TAG_OPEN: { - this._stateEndTagOpen(cp); - break; - } - case State.TAG_NAME: { - this._stateTagName(cp); - break; - } - case State.RCDATA_LESS_THAN_SIGN: { - this._stateRcdataLessThanSign(cp); - break; - } - case State.RCDATA_END_TAG_OPEN: { - this._stateRcdataEndTagOpen(cp); - break; - } - case State.RCDATA_END_TAG_NAME: { - this._stateRcdataEndTagName(cp); - break; - } - case State.RAWTEXT_LESS_THAN_SIGN: { - this._stateRawtextLessThanSign(cp); - break; - } - case State.RAWTEXT_END_TAG_OPEN: { - this._stateRawtextEndTagOpen(cp); - break; - } - case State.RAWTEXT_END_TAG_NAME: { - this._stateRawtextEndTagName(cp); - break; - } - case State.SCRIPT_DATA_LESS_THAN_SIGN: { - this._stateScriptDataLessThanSign(cp); - break; - } - case State.SCRIPT_DATA_END_TAG_OPEN: { - this._stateScriptDataEndTagOpen(cp); - break; - } - case State.SCRIPT_DATA_END_TAG_NAME: { - this._stateScriptDataEndTagName(cp); - break; - } - case State.SCRIPT_DATA_ESCAPE_START: { - this._stateScriptDataEscapeStart(cp); - break; - } - case State.SCRIPT_DATA_ESCAPE_START_DASH: { - this._stateScriptDataEscapeStartDash(cp); - break; - } - case State.SCRIPT_DATA_ESCAPED: { - this._stateScriptDataEscaped(cp); - break; - } - case State.SCRIPT_DATA_ESCAPED_DASH: { - this._stateScriptDataEscapedDash(cp); - break; - } - case State.SCRIPT_DATA_ESCAPED_DASH_DASH: { - this._stateScriptDataEscapedDashDash(cp); - break; - } - case State.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN: { - this._stateScriptDataEscapedLessThanSign(cp); - break; - } - case State.SCRIPT_DATA_ESCAPED_END_TAG_OPEN: { - this._stateScriptDataEscapedEndTagOpen(cp); - break; - } - case State.SCRIPT_DATA_ESCAPED_END_TAG_NAME: { - this._stateScriptDataEscapedEndTagName(cp); - break; - } - case State.SCRIPT_DATA_DOUBLE_ESCAPE_START: { - this._stateScriptDataDoubleEscapeStart(cp); - break; - } - case State.SCRIPT_DATA_DOUBLE_ESCAPED: { - this._stateScriptDataDoubleEscaped(cp); - break; - } - case State.SCRIPT_DATA_DOUBLE_ESCAPED_DASH: { - this._stateScriptDataDoubleEscapedDash(cp); - break; - } - case State.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH: { - this._stateScriptDataDoubleEscapedDashDash(cp); - break; - } - case State.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN: { - this._stateScriptDataDoubleEscapedLessThanSign(cp); - break; - } - case State.SCRIPT_DATA_DOUBLE_ESCAPE_END: { - this._stateScriptDataDoubleEscapeEnd(cp); - break; - } - case State.BEFORE_ATTRIBUTE_NAME: { - this._stateBeforeAttributeName(cp); - break; - } - case State.ATTRIBUTE_NAME: { - this._stateAttributeName(cp); - break; - } - case State.AFTER_ATTRIBUTE_NAME: { - this._stateAfterAttributeName(cp); - break; - } - case State.BEFORE_ATTRIBUTE_VALUE: { - this._stateBeforeAttributeValue(cp); - break; - } - case State.ATTRIBUTE_VALUE_DOUBLE_QUOTED: { - this._stateAttributeValueDoubleQuoted(cp); - break; - } - case State.ATTRIBUTE_VALUE_SINGLE_QUOTED: { - this._stateAttributeValueSingleQuoted(cp); - break; - } - case State.ATTRIBUTE_VALUE_UNQUOTED: { - this._stateAttributeValueUnquoted(cp); - break; - } - case State.AFTER_ATTRIBUTE_VALUE_QUOTED: { - this._stateAfterAttributeValueQuoted(cp); - break; - } - case State.SELF_CLOSING_START_TAG: { - this._stateSelfClosingStartTag(cp); - break; - } - case State.BOGUS_COMMENT: { - this._stateBogusComment(cp); - break; - } - case State.MARKUP_DECLARATION_OPEN: { - this._stateMarkupDeclarationOpen(cp); - break; - } - case State.COMMENT_START: { - this._stateCommentStart(cp); - break; - } - case State.COMMENT_START_DASH: { - this._stateCommentStartDash(cp); - break; - } - case State.COMMENT: { - this._stateComment(cp); - break; - } - case State.COMMENT_LESS_THAN_SIGN: { - this._stateCommentLessThanSign(cp); - break; - } - case State.COMMENT_LESS_THAN_SIGN_BANG: { - this._stateCommentLessThanSignBang(cp); - break; - } - case State.COMMENT_LESS_THAN_SIGN_BANG_DASH: { - this._stateCommentLessThanSignBangDash(cp); - break; - } - case State.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH: { - this._stateCommentLessThanSignBangDashDash(cp); - break; - } - case State.COMMENT_END_DASH: { - this._stateCommentEndDash(cp); - break; - } - case State.COMMENT_END: { - this._stateCommentEnd(cp); - break; - } - case State.COMMENT_END_BANG: { - this._stateCommentEndBang(cp); - break; - } - case State.DOCTYPE: { - this._stateDoctype(cp); - break; - } - case State.BEFORE_DOCTYPE_NAME: { - this._stateBeforeDoctypeName(cp); - break; - } - case State.DOCTYPE_NAME: { - this._stateDoctypeName(cp); - break; - } - case State.AFTER_DOCTYPE_NAME: { - this._stateAfterDoctypeName(cp); - break; - } - case State.AFTER_DOCTYPE_PUBLIC_KEYWORD: { - this._stateAfterDoctypePublicKeyword(cp); - break; - } - case State.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER: { - this._stateBeforeDoctypePublicIdentifier(cp); - break; - } - case State.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED: { - this._stateDoctypePublicIdentifierDoubleQuoted(cp); - break; - } - case State.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED: { - this._stateDoctypePublicIdentifierSingleQuoted(cp); - break; - } - case State.AFTER_DOCTYPE_PUBLIC_IDENTIFIER: { - this._stateAfterDoctypePublicIdentifier(cp); - break; - } - case State.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS: { - this._stateBetweenDoctypePublicAndSystemIdentifiers(cp); - break; - } - case State.AFTER_DOCTYPE_SYSTEM_KEYWORD: { - this._stateAfterDoctypeSystemKeyword(cp); - break; - } - case State.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER: { - this._stateBeforeDoctypeSystemIdentifier(cp); - break; - } - case State.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED: { - this._stateDoctypeSystemIdentifierDoubleQuoted(cp); - break; - } - case State.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED: { - this._stateDoctypeSystemIdentifierSingleQuoted(cp); - break; - } - case State.AFTER_DOCTYPE_SYSTEM_IDENTIFIER: { - this._stateAfterDoctypeSystemIdentifier(cp); - break; - } - case State.BOGUS_DOCTYPE: { - this._stateBogusDoctype(cp); - break; - } - case State.CDATA_SECTION: { - this._stateCdataSection(cp); - break; - } - case State.CDATA_SECTION_BRACKET: { - this._stateCdataSectionBracket(cp); - break; - } - case State.CDATA_SECTION_END: { - this._stateCdataSectionEnd(cp); - break; - } - case State.CHARACTER_REFERENCE: { - this._stateCharacterReference(); - break; - } - case State.AMBIGUOUS_AMPERSAND: { - this._stateAmbiguousAmpersand(cp); - break; - } - default: { - throw new Error('Unknown state'); - } - } - } - // State machine - // Data state - //------------------------------------------------------------------ - _stateData(cp) { - switch (cp) { - case $.LESS_THAN_SIGN: { - this.state = State.TAG_OPEN; - break; - } - case $.AMPERSAND: { - this._startCharacterReference(); - break; - } - case $.NULL: { - this._err(ERR.unexpectedNullCharacter); - this._emitCodePoint(cp); - break; - } - case $.EOF: { - this._emitEOFToken(); - break; - } - default: { - this._emitCodePoint(cp); - } - } - } - // RCDATA state - //------------------------------------------------------------------ - _stateRcdata(cp) { - switch (cp) { - case $.AMPERSAND: { - this._startCharacterReference(); - break; - } - case $.LESS_THAN_SIGN: { - this.state = State.RCDATA_LESS_THAN_SIGN; - break; - } - case $.NULL: { - this._err(ERR.unexpectedNullCharacter); - this._emitChars(REPLACEMENT_CHARACTER); - break; - } - case $.EOF: { - this._emitEOFToken(); - break; - } - default: { - this._emitCodePoint(cp); - } - } - } - // RAWTEXT state - //------------------------------------------------------------------ - _stateRawtext(cp) { - switch (cp) { - case $.LESS_THAN_SIGN: { - this.state = State.RAWTEXT_LESS_THAN_SIGN; - break; - } - case $.NULL: { - this._err(ERR.unexpectedNullCharacter); - this._emitChars(REPLACEMENT_CHARACTER); - break; - } - case $.EOF: { - this._emitEOFToken(); - break; - } - default: { - this._emitCodePoint(cp); - } - } - } - // Script data state - //------------------------------------------------------------------ - _stateScriptData(cp) { - switch (cp) { - case $.LESS_THAN_SIGN: { - this.state = State.SCRIPT_DATA_LESS_THAN_SIGN; - break; - } - case $.NULL: { - this._err(ERR.unexpectedNullCharacter); - this._emitChars(REPLACEMENT_CHARACTER); - break; - } - case $.EOF: { - this._emitEOFToken(); - break; - } - default: { - this._emitCodePoint(cp); - } - } - } - // PLAINTEXT state - //------------------------------------------------------------------ - _statePlaintext(cp) { - switch (cp) { - case $.NULL: { - this._err(ERR.unexpectedNullCharacter); - this._emitChars(REPLACEMENT_CHARACTER); - break; - } - case $.EOF: { - this._emitEOFToken(); - break; - } - default: { - this._emitCodePoint(cp); - } - } - } - // Tag open state - //------------------------------------------------------------------ - _stateTagOpen(cp) { - if (isAsciiLetter(cp)) { - this._createStartTagToken(); - this.state = State.TAG_NAME; - this._stateTagName(cp); - } - else - switch (cp) { - case $.EXCLAMATION_MARK: { - this.state = State.MARKUP_DECLARATION_OPEN; - break; - } - case $.SOLIDUS: { - this.state = State.END_TAG_OPEN; - break; - } - case $.QUESTION_MARK: { - this._err(ERR.unexpectedQuestionMarkInsteadOfTagName); - this._createCommentToken(1); - this.state = State.BOGUS_COMMENT; - this._stateBogusComment(cp); - break; - } - case $.EOF: { - this._err(ERR.eofBeforeTagName); - this._emitChars('<'); - this._emitEOFToken(); - break; - } - default: { - this._err(ERR.invalidFirstCharacterOfTagName); - this._emitChars('<'); - this.state = State.DATA; - this._stateData(cp); - } - } - } - // End tag open state - //------------------------------------------------------------------ - _stateEndTagOpen(cp) { - if (isAsciiLetter(cp)) { - this._createEndTagToken(); - this.state = State.TAG_NAME; - this._stateTagName(cp); - } - else - switch (cp) { - case $.GREATER_THAN_SIGN: { - this._err(ERR.missingEndTagName); - this.state = State.DATA; - break; - } - case $.EOF: { - this._err(ERR.eofBeforeTagName); - this._emitChars('</'); - this._emitEOFToken(); - break; - } - default: { - this._err(ERR.invalidFirstCharacterOfTagName); - this._createCommentToken(2); - this.state = State.BOGUS_COMMENT; - this._stateBogusComment(cp); - } - } - } - // Tag name state - //------------------------------------------------------------------ - _stateTagName(cp) { - const token = this.currentToken; - switch (cp) { - case $.SPACE: - case $.LINE_FEED: - case $.TABULATION: - case $.FORM_FEED: { - this.state = State.BEFORE_ATTRIBUTE_NAME; - break; - } - case $.SOLIDUS: { - this.state = State.SELF_CLOSING_START_TAG; - break; - } - case $.GREATER_THAN_SIGN: { - this.state = State.DATA; - this.emitCurrentTagToken(); - break; - } - case $.NULL: { - this._err(ERR.unexpectedNullCharacter); - token.tagName += REPLACEMENT_CHARACTER; - break; - } - case $.EOF: { - this._err(ERR.eofInTag); - this._emitEOFToken(); - break; - } - default: { - token.tagName += String.fromCodePoint(isAsciiUpper(cp) ? toAsciiLower(cp) : cp); - } - } - } - // RCDATA less-than sign state - //------------------------------------------------------------------ - _stateRcdataLessThanSign(cp) { - if (cp === $.SOLIDUS) { - this.state = State.RCDATA_END_TAG_OPEN; - } - else { - this._emitChars('<'); - this.state = State.RCDATA; - this._stateRcdata(cp); - } - } - // RCDATA end tag open state - //------------------------------------------------------------------ - _stateRcdataEndTagOpen(cp) { - if (isAsciiLetter(cp)) { - this.state = State.RCDATA_END_TAG_NAME; - this._stateRcdataEndTagName(cp); - } - else { - this._emitChars('</'); - this.state = State.RCDATA; - this._stateRcdata(cp); - } - } - handleSpecialEndTag(_cp) { - if (!this.preprocessor.startsWith(this.lastStartTagName, false)) { - return !this._ensureHibernation(); - } - this._createEndTagToken(); - const token = this.currentToken; - token.tagName = this.lastStartTagName; - const cp = this.preprocessor.peek(this.lastStartTagName.length); - switch (cp) { - case $.SPACE: - case $.LINE_FEED: - case $.TABULATION: - case $.FORM_FEED: { - this._advanceBy(this.lastStartTagName.length); - this.state = State.BEFORE_ATTRIBUTE_NAME; - return false; - } - case $.SOLIDUS: { - this._advanceBy(this.lastStartTagName.length); - this.state = State.SELF_CLOSING_START_TAG; - return false; - } - case $.GREATER_THAN_SIGN: { - this._advanceBy(this.lastStartTagName.length); - this.emitCurrentTagToken(); - this.state = State.DATA; - return false; - } - default: { - return !this._ensureHibernation(); - } - } - } - // RCDATA end tag name state - //------------------------------------------------------------------ - _stateRcdataEndTagName(cp) { - if (this.handleSpecialEndTag(cp)) { - this._emitChars('</'); - this.state = State.RCDATA; - this._stateRcdata(cp); - } - } - // RAWTEXT less-than sign state - //------------------------------------------------------------------ - _stateRawtextLessThanSign(cp) { - if (cp === $.SOLIDUS) { - this.state = State.RAWTEXT_END_TAG_OPEN; - } - else { - this._emitChars('<'); - this.state = State.RAWTEXT; - this._stateRawtext(cp); - } - } - // RAWTEXT end tag open state - //------------------------------------------------------------------ - _stateRawtextEndTagOpen(cp) { - if (isAsciiLetter(cp)) { - this.state = State.RAWTEXT_END_TAG_NAME; - this._stateRawtextEndTagName(cp); - } - else { - this._emitChars('</'); - this.state = State.RAWTEXT; - this._stateRawtext(cp); - } - } - // RAWTEXT end tag name state - //------------------------------------------------------------------ - _stateRawtextEndTagName(cp) { - if (this.handleSpecialEndTag(cp)) { - this._emitChars('</'); - this.state = State.RAWTEXT; - this._stateRawtext(cp); - } - } - // Script data less-than sign state - //------------------------------------------------------------------ - _stateScriptDataLessThanSign(cp) { - switch (cp) { - case $.SOLIDUS: { - this.state = State.SCRIPT_DATA_END_TAG_OPEN; - break; - } - case $.EXCLAMATION_MARK: { - this.state = State.SCRIPT_DATA_ESCAPE_START; - this._emitChars('<!'); - break; - } - default: { - this._emitChars('<'); - this.state = State.SCRIPT_DATA; - this._stateScriptData(cp); - } - } - } - // Script data end tag open state - //------------------------------------------------------------------ - _stateScriptDataEndTagOpen(cp) { - if (isAsciiLetter(cp)) { - this.state = State.SCRIPT_DATA_END_TAG_NAME; - this._stateScriptDataEndTagName(cp); - } - else { - this._emitChars('</'); - this.state = State.SCRIPT_DATA; - this._stateScriptData(cp); - } - } - // Script data end tag name state - //------------------------------------------------------------------ - _stateScriptDataEndTagName(cp) { - if (this.handleSpecialEndTag(cp)) { - this._emitChars('</'); - this.state = State.SCRIPT_DATA; - this._stateScriptData(cp); - } - } - // Script data escape start state - //------------------------------------------------------------------ - _stateScriptDataEscapeStart(cp) { - if (cp === $.HYPHEN_MINUS) { - this.state = State.SCRIPT_DATA_ESCAPE_START_DASH; - this._emitChars('-'); - } - else { - this.state = State.SCRIPT_DATA; - this._stateScriptData(cp); - } - } - // Script data escape start dash state - //------------------------------------------------------------------ - _stateScriptDataEscapeStartDash(cp) { - if (cp === $.HYPHEN_MINUS) { - this.state = State.SCRIPT_DATA_ESCAPED_DASH_DASH; - this._emitChars('-'); - } - else { - this.state = State.SCRIPT_DATA; - this._stateScriptData(cp); - } - } - // Script data escaped state - //------------------------------------------------------------------ - _stateScriptDataEscaped(cp) { - switch (cp) { - case $.HYPHEN_MINUS: { - this.state = State.SCRIPT_DATA_ESCAPED_DASH; - this._emitChars('-'); - break; - } - case $.LESS_THAN_SIGN: { - this.state = State.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN; - break; - } - case $.NULL: { - this._err(ERR.unexpectedNullCharacter); - this._emitChars(REPLACEMENT_CHARACTER); - break; - } - case $.EOF: { - this._err(ERR.eofInScriptHtmlCommentLikeText); - this._emitEOFToken(); - break; - } - default: { - this._emitCodePoint(cp); - } - } - } - // Script data escaped dash state - //------------------------------------------------------------------ - _stateScriptDataEscapedDash(cp) { - switch (cp) { - case $.HYPHEN_MINUS: { - this.state = State.SCRIPT_DATA_ESCAPED_DASH_DASH; - this._emitChars('-'); - break; - } - case $.LESS_THAN_SIGN: { - this.state = State.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN; - break; - } - case $.NULL: { - this._err(ERR.unexpectedNullCharacter); - this.state = State.SCRIPT_DATA_ESCAPED; - this._emitChars(REPLACEMENT_CHARACTER); - break; - } - case $.EOF: { - this._err(ERR.eofInScriptHtmlCommentLikeText); - this._emitEOFToken(); - break; - } - default: { - this.state = State.SCRIPT_DATA_ESCAPED; - this._emitCodePoint(cp); - } - } - } - // Script data escaped dash dash state - //------------------------------------------------------------------ - _stateScriptDataEscapedDashDash(cp) { - switch (cp) { - case $.HYPHEN_MINUS: { - this._emitChars('-'); - break; - } - case $.LESS_THAN_SIGN: { - this.state = State.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN; - break; - } - case $.GREATER_THAN_SIGN: { - this.state = State.SCRIPT_DATA; - this._emitChars('>'); - break; - } - case $.NULL: { - this._err(ERR.unexpectedNullCharacter); - this.state = State.SCRIPT_DATA_ESCAPED; - this._emitChars(REPLACEMENT_CHARACTER); - break; - } - case $.EOF: { - this._err(ERR.eofInScriptHtmlCommentLikeText); - this._emitEOFToken(); - break; - } - default: { - this.state = State.SCRIPT_DATA_ESCAPED; - this._emitCodePoint(cp); - } - } - } - // Script data escaped less-than sign state - //------------------------------------------------------------------ - _stateScriptDataEscapedLessThanSign(cp) { - if (cp === $.SOLIDUS) { - this.state = State.SCRIPT_DATA_ESCAPED_END_TAG_OPEN; - } - else if (isAsciiLetter(cp)) { - this._emitChars('<'); - this.state = State.SCRIPT_DATA_DOUBLE_ESCAPE_START; - this._stateScriptDataDoubleEscapeStart(cp); - } - else { - this._emitChars('<'); - this.state = State.SCRIPT_DATA_ESCAPED; - this._stateScriptDataEscaped(cp); - } - } - // Script data escaped end tag open state - //------------------------------------------------------------------ - _stateScriptDataEscapedEndTagOpen(cp) { - if (isAsciiLetter(cp)) { - this.state = State.SCRIPT_DATA_ESCAPED_END_TAG_NAME; - this._stateScriptDataEscapedEndTagName(cp); - } - else { - this._emitChars('</'); - this.state = State.SCRIPT_DATA_ESCAPED; - this._stateScriptDataEscaped(cp); - } - } - // Script data escaped end tag name state - //------------------------------------------------------------------ - _stateScriptDataEscapedEndTagName(cp) { - if (this.handleSpecialEndTag(cp)) { - this._emitChars('</'); - this.state = State.SCRIPT_DATA_ESCAPED; - this._stateScriptDataEscaped(cp); - } - } - // Script data double escape start state - //------------------------------------------------------------------ - _stateScriptDataDoubleEscapeStart(cp) { - if (this.preprocessor.startsWith($$.SCRIPT, false) && - isScriptDataDoubleEscapeSequenceEnd(this.preprocessor.peek($$.SCRIPT.length))) { - this._emitCodePoint(cp); - for (let i = 0; i < $$.SCRIPT.length; i++) { - this._emitCodePoint(this._consume()); - } - this.state = State.SCRIPT_DATA_DOUBLE_ESCAPED; - } - else if (!this._ensureHibernation()) { - this.state = State.SCRIPT_DATA_ESCAPED; - this._stateScriptDataEscaped(cp); - } - } - // Script data double escaped state - //------------------------------------------------------------------ - _stateScriptDataDoubleEscaped(cp) { - switch (cp) { - case $.HYPHEN_MINUS: { - this.state = State.SCRIPT_DATA_DOUBLE_ESCAPED_DASH; - this._emitChars('-'); - break; - } - case $.LESS_THAN_SIGN: { - this.state = State.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN; - this._emitChars('<'); - break; - } - case $.NULL: { - this._err(ERR.unexpectedNullCharacter); - this._emitChars(REPLACEMENT_CHARACTER); - break; - } - case $.EOF: { - this._err(ERR.eofInScriptHtmlCommentLikeText); - this._emitEOFToken(); - break; - } - default: { - this._emitCodePoint(cp); - } - } - } - // Script data double escaped dash state - //------------------------------------------------------------------ - _stateScriptDataDoubleEscapedDash(cp) { - switch (cp) { - case $.HYPHEN_MINUS: { - this.state = State.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH; - this._emitChars('-'); - break; - } - case $.LESS_THAN_SIGN: { - this.state = State.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN; - this._emitChars('<'); - break; - } - case $.NULL: { - this._err(ERR.unexpectedNullCharacter); - this.state = State.SCRIPT_DATA_DOUBLE_ESCAPED; - this._emitChars(REPLACEMENT_CHARACTER); - break; - } - case $.EOF: { - this._err(ERR.eofInScriptHtmlCommentLikeText); - this._emitEOFToken(); - break; - } - default: { - this.state = State.SCRIPT_DATA_DOUBLE_ESCAPED; - this._emitCodePoint(cp); - } - } - } - // Script data double escaped dash dash state - //------------------------------------------------------------------ - _stateScriptDataDoubleEscapedDashDash(cp) { - switch (cp) { - case $.HYPHEN_MINUS: { - this._emitChars('-'); - break; - } - case $.LESS_THAN_SIGN: { - this.state = State.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN; - this._emitChars('<'); - break; - } - case $.GREATER_THAN_SIGN: { - this.state = State.SCRIPT_DATA; - this._emitChars('>'); - break; - } - case $.NULL: { - this._err(ERR.unexpectedNullCharacter); - this.state = State.SCRIPT_DATA_DOUBLE_ESCAPED; - this._emitChars(REPLACEMENT_CHARACTER); - break; - } - case $.EOF: { - this._err(ERR.eofInScriptHtmlCommentLikeText); - this._emitEOFToken(); - break; - } - default: { - this.state = State.SCRIPT_DATA_DOUBLE_ESCAPED; - this._emitCodePoint(cp); - } - } - } - // Script data double escaped less-than sign state - //------------------------------------------------------------------ - _stateScriptDataDoubleEscapedLessThanSign(cp) { - if (cp === $.SOLIDUS) { - this.state = State.SCRIPT_DATA_DOUBLE_ESCAPE_END; - this._emitChars('/'); - } - else { - this.state = State.SCRIPT_DATA_DOUBLE_ESCAPED; - this._stateScriptDataDoubleEscaped(cp); - } - } - // Script data double escape end state - //------------------------------------------------------------------ - _stateScriptDataDoubleEscapeEnd(cp) { - if (this.preprocessor.startsWith($$.SCRIPT, false) && - isScriptDataDoubleEscapeSequenceEnd(this.preprocessor.peek($$.SCRIPT.length))) { - this._emitCodePoint(cp); - for (let i = 0; i < $$.SCRIPT.length; i++) { - this._emitCodePoint(this._consume()); - } - this.state = State.SCRIPT_DATA_ESCAPED; - } - else if (!this._ensureHibernation()) { - this.state = State.SCRIPT_DATA_DOUBLE_ESCAPED; - this._stateScriptDataDoubleEscaped(cp); - } - } - // Before attribute name state - //------------------------------------------------------------------ - _stateBeforeAttributeName(cp) { - switch (cp) { - case $.SPACE: - case $.LINE_FEED: - case $.TABULATION: - case $.FORM_FEED: { - // Ignore whitespace - break; - } - case $.SOLIDUS: - case $.GREATER_THAN_SIGN: - case $.EOF: { - this.state = State.AFTER_ATTRIBUTE_NAME; - this._stateAfterAttributeName(cp); - break; - } - case $.EQUALS_SIGN: { - this._err(ERR.unexpectedEqualsSignBeforeAttributeName); - this._createAttr('='); - this.state = State.ATTRIBUTE_NAME; - break; - } - default: { - this._createAttr(''); - this.state = State.ATTRIBUTE_NAME; - this._stateAttributeName(cp); - } - } - } - // Attribute name state - //------------------------------------------------------------------ - _stateAttributeName(cp) { - switch (cp) { - case $.SPACE: - case $.LINE_FEED: - case $.TABULATION: - case $.FORM_FEED: - case $.SOLIDUS: - case $.GREATER_THAN_SIGN: - case $.EOF: { - this._leaveAttrName(); - this.state = State.AFTER_ATTRIBUTE_NAME; - this._stateAfterAttributeName(cp); - break; - } - case $.EQUALS_SIGN: { - this._leaveAttrName(); - this.state = State.BEFORE_ATTRIBUTE_VALUE; - break; - } - case $.QUOTATION_MARK: - case $.APOSTROPHE: - case $.LESS_THAN_SIGN: { - this._err(ERR.unexpectedCharacterInAttributeName); - this.currentAttr.name += String.fromCodePoint(cp); - break; - } - case $.NULL: { - this._err(ERR.unexpectedNullCharacter); - this.currentAttr.name += REPLACEMENT_CHARACTER; - break; - } - default: { - this.currentAttr.name += String.fromCodePoint(isAsciiUpper(cp) ? toAsciiLower(cp) : cp); - } - } - } - // After attribute name state - //------------------------------------------------------------------ - _stateAfterAttributeName(cp) { - switch (cp) { - case $.SPACE: - case $.LINE_FEED: - case $.TABULATION: - case $.FORM_FEED: { - // Ignore whitespace - break; - } - case $.SOLIDUS: { - this.state = State.SELF_CLOSING_START_TAG; - break; - } - case $.EQUALS_SIGN: { - this.state = State.BEFORE_ATTRIBUTE_VALUE; - break; - } - case $.GREATER_THAN_SIGN: { - this.state = State.DATA; - this.emitCurrentTagToken(); - break; - } - case $.EOF: { - this._err(ERR.eofInTag); - this._emitEOFToken(); - break; - } - default: { - this._createAttr(''); - this.state = State.ATTRIBUTE_NAME; - this._stateAttributeName(cp); - } - } - } - // Before attribute value state - //------------------------------------------------------------------ - _stateBeforeAttributeValue(cp) { - switch (cp) { - case $.SPACE: - case $.LINE_FEED: - case $.TABULATION: - case $.FORM_FEED: { - // Ignore whitespace - break; - } - case $.QUOTATION_MARK: { - this.state = State.ATTRIBUTE_VALUE_DOUBLE_QUOTED; - break; - } - case $.APOSTROPHE: { - this.state = State.ATTRIBUTE_VALUE_SINGLE_QUOTED; - break; - } - case $.GREATER_THAN_SIGN: { - this._err(ERR.missingAttributeValue); - this.state = State.DATA; - this.emitCurrentTagToken(); - break; - } - default: { - this.state = State.ATTRIBUTE_VALUE_UNQUOTED; - this._stateAttributeValueUnquoted(cp); - } - } - } - // Attribute value (double-quoted) state - //------------------------------------------------------------------ - _stateAttributeValueDoubleQuoted(cp) { - switch (cp) { - case $.QUOTATION_MARK: { - this.state = State.AFTER_ATTRIBUTE_VALUE_QUOTED; - break; - } - case $.AMPERSAND: { - this._startCharacterReference(); - break; - } - case $.NULL: { - this._err(ERR.unexpectedNullCharacter); - this.currentAttr.value += REPLACEMENT_CHARACTER; - break; - } - case $.EOF: { - this._err(ERR.eofInTag); - this._emitEOFToken(); - break; - } - default: { - this.currentAttr.value += String.fromCodePoint(cp); - } - } - } - // Attribute value (single-quoted) state - //------------------------------------------------------------------ - _stateAttributeValueSingleQuoted(cp) { - switch (cp) { - case $.APOSTROPHE: { - this.state = State.AFTER_ATTRIBUTE_VALUE_QUOTED; - break; - } - case $.AMPERSAND: { - this._startCharacterReference(); - break; - } - case $.NULL: { - this._err(ERR.unexpectedNullCharacter); - this.currentAttr.value += REPLACEMENT_CHARACTER; - break; - } - case $.EOF: { - this._err(ERR.eofInTag); - this._emitEOFToken(); - break; - } - default: { - this.currentAttr.value += String.fromCodePoint(cp); - } - } - } - // Attribute value (unquoted) state - //------------------------------------------------------------------ - _stateAttributeValueUnquoted(cp) { - switch (cp) { - case $.SPACE: - case $.LINE_FEED: - case $.TABULATION: - case $.FORM_FEED: { - this._leaveAttrValue(); - this.state = State.BEFORE_ATTRIBUTE_NAME; - break; - } - case $.AMPERSAND: { - this._startCharacterReference(); - break; - } - case $.GREATER_THAN_SIGN: { - this._leaveAttrValue(); - this.state = State.DATA; - this.emitCurrentTagToken(); - break; - } - case $.NULL: { - this._err(ERR.unexpectedNullCharacter); - this.currentAttr.value += REPLACEMENT_CHARACTER; - break; - } - case $.QUOTATION_MARK: - case $.APOSTROPHE: - case $.LESS_THAN_SIGN: - case $.EQUALS_SIGN: - case $.GRAVE_ACCENT: { - this._err(ERR.unexpectedCharacterInUnquotedAttributeValue); - this.currentAttr.value += String.fromCodePoint(cp); - break; - } - case $.EOF: { - this._err(ERR.eofInTag); - this._emitEOFToken(); - break; - } - default: { - this.currentAttr.value += String.fromCodePoint(cp); - } - } - } - // After attribute value (quoted) state - //------------------------------------------------------------------ - _stateAfterAttributeValueQuoted(cp) { - switch (cp) { - case $.SPACE: - case $.LINE_FEED: - case $.TABULATION: - case $.FORM_FEED: { - this._leaveAttrValue(); - this.state = State.BEFORE_ATTRIBUTE_NAME; - break; - } - case $.SOLIDUS: { - this._leaveAttrValue(); - this.state = State.SELF_CLOSING_START_TAG; - break; - } - case $.GREATER_THAN_SIGN: { - this._leaveAttrValue(); - this.state = State.DATA; - this.emitCurrentTagToken(); - break; - } - case $.EOF: { - this._err(ERR.eofInTag); - this._emitEOFToken(); - break; - } - default: { - this._err(ERR.missingWhitespaceBetweenAttributes); - this.state = State.BEFORE_ATTRIBUTE_NAME; - this._stateBeforeAttributeName(cp); - } - } - } - // Self-closing start tag state - //------------------------------------------------------------------ - _stateSelfClosingStartTag(cp) { - switch (cp) { - case $.GREATER_THAN_SIGN: { - const token = this.currentToken; - token.selfClosing = true; - this.state = State.DATA; - this.emitCurrentTagToken(); - break; - } - case $.EOF: { - this._err(ERR.eofInTag); - this._emitEOFToken(); - break; - } - default: { - this._err(ERR.unexpectedSolidusInTag); - this.state = State.BEFORE_ATTRIBUTE_NAME; - this._stateBeforeAttributeName(cp); - } - } - } - // Bogus comment state - //------------------------------------------------------------------ - _stateBogusComment(cp) { - const token = this.currentToken; - switch (cp) { - case $.GREATER_THAN_SIGN: { - this.state = State.DATA; - this.emitCurrentComment(token); - break; - } - case $.EOF: { - this.emitCurrentComment(token); - this._emitEOFToken(); - break; - } - case $.NULL: { - this._err(ERR.unexpectedNullCharacter); - token.data += REPLACEMENT_CHARACTER; - break; - } - default: { - token.data += String.fromCodePoint(cp); - } - } - } - // Markup declaration open state - //------------------------------------------------------------------ - _stateMarkupDeclarationOpen(cp) { - if (this._consumeSequenceIfMatch($$.DASH_DASH, true)) { - this._createCommentToken($$.DASH_DASH.length + 1); - this.state = State.COMMENT_START; - } - else if (this._consumeSequenceIfMatch($$.DOCTYPE, false)) { - // NOTE: Doctypes tokens are created without fixed offsets. We keep track of the moment a doctype *might* start here. - this.currentLocation = this.getCurrentLocation($$.DOCTYPE.length + 1); - this.state = State.DOCTYPE; - } - else if (this._consumeSequenceIfMatch($$.CDATA_START, true)) { - if (this.inForeignNode) { - this.state = State.CDATA_SECTION; - } - else { - this._err(ERR.cdataInHtmlContent); - this._createCommentToken($$.CDATA_START.length + 1); - this.currentToken.data = '[CDATA['; - this.state = State.BOGUS_COMMENT; - } - } - //NOTE: Sequence lookups can be abrupted by hibernation. In that case, lookup - //results are no longer valid and we will need to start over. - else if (!this._ensureHibernation()) { - this._err(ERR.incorrectlyOpenedComment); - this._createCommentToken(2); - this.state = State.BOGUS_COMMENT; - this._stateBogusComment(cp); - } - } - // Comment start state - //------------------------------------------------------------------ - _stateCommentStart(cp) { - switch (cp) { - case $.HYPHEN_MINUS: { - this.state = State.COMMENT_START_DASH; - break; - } - case $.GREATER_THAN_SIGN: { - this._err(ERR.abruptClosingOfEmptyComment); - this.state = State.DATA; - const token = this.currentToken; - this.emitCurrentComment(token); - break; - } - default: { - this.state = State.COMMENT; - this._stateComment(cp); - } - } - } - // Comment start dash state - //------------------------------------------------------------------ - _stateCommentStartDash(cp) { - const token = this.currentToken; - switch (cp) { - case $.HYPHEN_MINUS: { - this.state = State.COMMENT_END; - break; - } - case $.GREATER_THAN_SIGN: { - this._err(ERR.abruptClosingOfEmptyComment); - this.state = State.DATA; - this.emitCurrentComment(token); - break; - } - case $.EOF: { - this._err(ERR.eofInComment); - this.emitCurrentComment(token); - this._emitEOFToken(); - break; - } - default: { - token.data += '-'; - this.state = State.COMMENT; - this._stateComment(cp); - } - } - } - // Comment state - //------------------------------------------------------------------ - _stateComment(cp) { - const token = this.currentToken; - switch (cp) { - case $.HYPHEN_MINUS: { - this.state = State.COMMENT_END_DASH; - break; - } - case $.LESS_THAN_SIGN: { - token.data += '<'; - this.state = State.COMMENT_LESS_THAN_SIGN; - break; - } - case $.NULL: { - this._err(ERR.unexpectedNullCharacter); - token.data += REPLACEMENT_CHARACTER; - break; - } - case $.EOF: { - this._err(ERR.eofInComment); - this.emitCurrentComment(token); - this._emitEOFToken(); - break; - } - default: { - token.data += String.fromCodePoint(cp); - } - } - } - // Comment less-than sign state - //------------------------------------------------------------------ - _stateCommentLessThanSign(cp) { - const token = this.currentToken; - switch (cp) { - case $.EXCLAMATION_MARK: { - token.data += '!'; - this.state = State.COMMENT_LESS_THAN_SIGN_BANG; - break; - } - case $.LESS_THAN_SIGN: { - token.data += '<'; - break; - } - default: { - this.state = State.COMMENT; - this._stateComment(cp); - } - } - } - // Comment less-than sign bang state - //------------------------------------------------------------------ - _stateCommentLessThanSignBang(cp) { - if (cp === $.HYPHEN_MINUS) { - this.state = State.COMMENT_LESS_THAN_SIGN_BANG_DASH; - } - else { - this.state = State.COMMENT; - this._stateComment(cp); - } - } - // Comment less-than sign bang dash state - //------------------------------------------------------------------ - _stateCommentLessThanSignBangDash(cp) { - if (cp === $.HYPHEN_MINUS) { - this.state = State.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH; - } - else { - this.state = State.COMMENT_END_DASH; - this._stateCommentEndDash(cp); - } - } - // Comment less-than sign bang dash dash state - //------------------------------------------------------------------ - _stateCommentLessThanSignBangDashDash(cp) { - if (cp !== $.GREATER_THAN_SIGN && cp !== $.EOF) { - this._err(ERR.nestedComment); - } - this.state = State.COMMENT_END; - this._stateCommentEnd(cp); - } - // Comment end dash state - //------------------------------------------------------------------ - _stateCommentEndDash(cp) { - const token = this.currentToken; - switch (cp) { - case $.HYPHEN_MINUS: { - this.state = State.COMMENT_END; - break; - } - case $.EOF: { - this._err(ERR.eofInComment); - this.emitCurrentComment(token); - this._emitEOFToken(); - break; - } - default: { - token.data += '-'; - this.state = State.COMMENT; - this._stateComment(cp); - } - } - } - // Comment end state - //------------------------------------------------------------------ - _stateCommentEnd(cp) { - const token = this.currentToken; - switch (cp) { - case $.GREATER_THAN_SIGN: { - this.state = State.DATA; - this.emitCurrentComment(token); - break; - } - case $.EXCLAMATION_MARK: { - this.state = State.COMMENT_END_BANG; - break; - } - case $.HYPHEN_MINUS: { - token.data += '-'; - break; - } - case $.EOF: { - this._err(ERR.eofInComment); - this.emitCurrentComment(token); - this._emitEOFToken(); - break; - } - default: { - token.data += '--'; - this.state = State.COMMENT; - this._stateComment(cp); - } - } - } - // Comment end bang state - //------------------------------------------------------------------ - _stateCommentEndBang(cp) { - const token = this.currentToken; - switch (cp) { - case $.HYPHEN_MINUS: { - token.data += '--!'; - this.state = State.COMMENT_END_DASH; - break; - } - case $.GREATER_THAN_SIGN: { - this._err(ERR.incorrectlyClosedComment); - this.state = State.DATA; - this.emitCurrentComment(token); - break; - } - case $.EOF: { - this._err(ERR.eofInComment); - this.emitCurrentComment(token); - this._emitEOFToken(); - break; - } - default: { - token.data += '--!'; - this.state = State.COMMENT; - this._stateComment(cp); - } - } - } - // DOCTYPE state - //------------------------------------------------------------------ - _stateDoctype(cp) { - switch (cp) { - case $.SPACE: - case $.LINE_FEED: - case $.TABULATION: - case $.FORM_FEED: { - this.state = State.BEFORE_DOCTYPE_NAME; - break; - } - case $.GREATER_THAN_SIGN: { - this.state = State.BEFORE_DOCTYPE_NAME; - this._stateBeforeDoctypeName(cp); - break; - } - case $.EOF: { - this._err(ERR.eofInDoctype); - this._createDoctypeToken(null); - const token = this.currentToken; - token.forceQuirks = true; - this.emitCurrentDoctype(token); - this._emitEOFToken(); - break; - } - default: { - this._err(ERR.missingWhitespaceBeforeDoctypeName); - this.state = State.BEFORE_DOCTYPE_NAME; - this._stateBeforeDoctypeName(cp); - } - } - } - // Before DOCTYPE name state - //------------------------------------------------------------------ - _stateBeforeDoctypeName(cp) { - if (isAsciiUpper(cp)) { - this._createDoctypeToken(String.fromCharCode(toAsciiLower(cp))); - this.state = State.DOCTYPE_NAME; - } - else - switch (cp) { - case $.SPACE: - case $.LINE_FEED: - case $.TABULATION: - case $.FORM_FEED: { - // Ignore whitespace - break; - } - case $.NULL: { - this._err(ERR.unexpectedNullCharacter); - this._createDoctypeToken(REPLACEMENT_CHARACTER); - this.state = State.DOCTYPE_NAME; - break; - } - case $.GREATER_THAN_SIGN: { - this._err(ERR.missingDoctypeName); - this._createDoctypeToken(null); - const token = this.currentToken; - token.forceQuirks = true; - this.emitCurrentDoctype(token); - this.state = State.DATA; - break; - } - case $.EOF: { - this._err(ERR.eofInDoctype); - this._createDoctypeToken(null); - const token = this.currentToken; - token.forceQuirks = true; - this.emitCurrentDoctype(token); - this._emitEOFToken(); - break; - } - default: { - this._createDoctypeToken(String.fromCodePoint(cp)); - this.state = State.DOCTYPE_NAME; - } - } - } - // DOCTYPE name state - //------------------------------------------------------------------ - _stateDoctypeName(cp) { - const token = this.currentToken; - switch (cp) { - case $.SPACE: - case $.LINE_FEED: - case $.TABULATION: - case $.FORM_FEED: { - this.state = State.AFTER_DOCTYPE_NAME; - break; - } - case $.GREATER_THAN_SIGN: { - this.state = State.DATA; - this.emitCurrentDoctype(token); - break; - } - case $.NULL: { - this._err(ERR.unexpectedNullCharacter); - token.name += REPLACEMENT_CHARACTER; - break; - } - case $.EOF: { - this._err(ERR.eofInDoctype); - token.forceQuirks = true; - this.emitCurrentDoctype(token); - this._emitEOFToken(); - break; - } - default: { - token.name += String.fromCodePoint(isAsciiUpper(cp) ? toAsciiLower(cp) : cp); - } - } - } - // After DOCTYPE name state - //------------------------------------------------------------------ - _stateAfterDoctypeName(cp) { - const token = this.currentToken; - switch (cp) { - case $.SPACE: - case $.LINE_FEED: - case $.TABULATION: - case $.FORM_FEED: { - // Ignore whitespace - break; - } - case $.GREATER_THAN_SIGN: { - this.state = State.DATA; - this.emitCurrentDoctype(token); - break; - } - case $.EOF: { - this._err(ERR.eofInDoctype); - token.forceQuirks = true; - this.emitCurrentDoctype(token); - this._emitEOFToken(); - break; - } - default: { - if (this._consumeSequenceIfMatch($$.PUBLIC, false)) { - this.state = State.AFTER_DOCTYPE_PUBLIC_KEYWORD; - } - else if (this._consumeSequenceIfMatch($$.SYSTEM, false)) { - this.state = State.AFTER_DOCTYPE_SYSTEM_KEYWORD; - } - //NOTE: sequence lookup can be abrupted by hibernation. In that case lookup - //results are no longer valid and we will need to start over. - else if (!this._ensureHibernation()) { - this._err(ERR.invalidCharacterSequenceAfterDoctypeName); - token.forceQuirks = true; - this.state = State.BOGUS_DOCTYPE; - this._stateBogusDoctype(cp); - } - } - } - } - // After DOCTYPE public keyword state - //------------------------------------------------------------------ - _stateAfterDoctypePublicKeyword(cp) { - const token = this.currentToken; - switch (cp) { - case $.SPACE: - case $.LINE_FEED: - case $.TABULATION: - case $.FORM_FEED: { - this.state = State.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER; - break; - } - case $.QUOTATION_MARK: { - this._err(ERR.missingWhitespaceAfterDoctypePublicKeyword); - token.publicId = ''; - this.state = State.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED; - break; - } - case $.APOSTROPHE: { - this._err(ERR.missingWhitespaceAfterDoctypePublicKeyword); - token.publicId = ''; - this.state = State.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED; - break; - } - case $.GREATER_THAN_SIGN: { - this._err(ERR.missingDoctypePublicIdentifier); - token.forceQuirks = true; - this.state = State.DATA; - this.emitCurrentDoctype(token); - break; - } - case $.EOF: { - this._err(ERR.eofInDoctype); - token.forceQuirks = true; - this.emitCurrentDoctype(token); - this._emitEOFToken(); - break; - } - default: { - this._err(ERR.missingQuoteBeforeDoctypePublicIdentifier); - token.forceQuirks = true; - this.state = State.BOGUS_DOCTYPE; - this._stateBogusDoctype(cp); - } - } - } - // Before DOCTYPE public identifier state - //------------------------------------------------------------------ - _stateBeforeDoctypePublicIdentifier(cp) { - const token = this.currentToken; - switch (cp) { - case $.SPACE: - case $.LINE_FEED: - case $.TABULATION: - case $.FORM_FEED: { - // Ignore whitespace - break; - } - case $.QUOTATION_MARK: { - token.publicId = ''; - this.state = State.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED; - break; - } - case $.APOSTROPHE: { - token.publicId = ''; - this.state = State.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED; - break; - } - case $.GREATER_THAN_SIGN: { - this._err(ERR.missingDoctypePublicIdentifier); - token.forceQuirks = true; - this.state = State.DATA; - this.emitCurrentDoctype(token); - break; - } - case $.EOF: { - this._err(ERR.eofInDoctype); - token.forceQuirks = true; - this.emitCurrentDoctype(token); - this._emitEOFToken(); - break; - } - default: { - this._err(ERR.missingQuoteBeforeDoctypePublicIdentifier); - token.forceQuirks = true; - this.state = State.BOGUS_DOCTYPE; - this._stateBogusDoctype(cp); - } - } - } - // DOCTYPE public identifier (double-quoted) state - //------------------------------------------------------------------ - _stateDoctypePublicIdentifierDoubleQuoted(cp) { - const token = this.currentToken; - switch (cp) { - case $.QUOTATION_MARK: { - this.state = State.AFTER_DOCTYPE_PUBLIC_IDENTIFIER; - break; - } - case $.NULL: { - this._err(ERR.unexpectedNullCharacter); - token.publicId += REPLACEMENT_CHARACTER; - break; - } - case $.GREATER_THAN_SIGN: { - this._err(ERR.abruptDoctypePublicIdentifier); - token.forceQuirks = true; - this.emitCurrentDoctype(token); - this.state = State.DATA; - break; - } - case $.EOF: { - this._err(ERR.eofInDoctype); - token.forceQuirks = true; - this.emitCurrentDoctype(token); - this._emitEOFToken(); - break; - } - default: { - token.publicId += String.fromCodePoint(cp); - } - } - } - // DOCTYPE public identifier (single-quoted) state - //------------------------------------------------------------------ - _stateDoctypePublicIdentifierSingleQuoted(cp) { - const token = this.currentToken; - switch (cp) { - case $.APOSTROPHE: { - this.state = State.AFTER_DOCTYPE_PUBLIC_IDENTIFIER; - break; - } - case $.NULL: { - this._err(ERR.unexpectedNullCharacter); - token.publicId += REPLACEMENT_CHARACTER; - break; - } - case $.GREATER_THAN_SIGN: { - this._err(ERR.abruptDoctypePublicIdentifier); - token.forceQuirks = true; - this.emitCurrentDoctype(token); - this.state = State.DATA; - break; - } - case $.EOF: { - this._err(ERR.eofInDoctype); - token.forceQuirks = true; - this.emitCurrentDoctype(token); - this._emitEOFToken(); - break; - } - default: { - token.publicId += String.fromCodePoint(cp); - } - } - } - // After DOCTYPE public identifier state - //------------------------------------------------------------------ - _stateAfterDoctypePublicIdentifier(cp) { - const token = this.currentToken; - switch (cp) { - case $.SPACE: - case $.LINE_FEED: - case $.TABULATION: - case $.FORM_FEED: { - this.state = State.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS; - break; - } - case $.GREATER_THAN_SIGN: { - this.state = State.DATA; - this.emitCurrentDoctype(token); - break; - } - case $.QUOTATION_MARK: { - this._err(ERR.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers); - token.systemId = ''; - this.state = State.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED; - break; - } - case $.APOSTROPHE: { - this._err(ERR.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers); - token.systemId = ''; - this.state = State.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED; - break; - } - case $.EOF: { - this._err(ERR.eofInDoctype); - token.forceQuirks = true; - this.emitCurrentDoctype(token); - this._emitEOFToken(); - break; - } - default: { - this._err(ERR.missingQuoteBeforeDoctypeSystemIdentifier); - token.forceQuirks = true; - this.state = State.BOGUS_DOCTYPE; - this._stateBogusDoctype(cp); - } - } - } - // Between DOCTYPE public and system identifiers state - //------------------------------------------------------------------ - _stateBetweenDoctypePublicAndSystemIdentifiers(cp) { - const token = this.currentToken; - switch (cp) { - case $.SPACE: - case $.LINE_FEED: - case $.TABULATION: - case $.FORM_FEED: { - // Ignore whitespace - break; - } - case $.GREATER_THAN_SIGN: { - this.emitCurrentDoctype(token); - this.state = State.DATA; - break; - } - case $.QUOTATION_MARK: { - token.systemId = ''; - this.state = State.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED; - break; - } - case $.APOSTROPHE: { - token.systemId = ''; - this.state = State.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED; - break; - } - case $.EOF: { - this._err(ERR.eofInDoctype); - token.forceQuirks = true; - this.emitCurrentDoctype(token); - this._emitEOFToken(); - break; - } - default: { - this._err(ERR.missingQuoteBeforeDoctypeSystemIdentifier); - token.forceQuirks = true; - this.state = State.BOGUS_DOCTYPE; - this._stateBogusDoctype(cp); - } - } - } - // After DOCTYPE system keyword state - //------------------------------------------------------------------ - _stateAfterDoctypeSystemKeyword(cp) { - const token = this.currentToken; - switch (cp) { - case $.SPACE: - case $.LINE_FEED: - case $.TABULATION: - case $.FORM_FEED: { - this.state = State.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER; - break; - } - case $.QUOTATION_MARK: { - this._err(ERR.missingWhitespaceAfterDoctypeSystemKeyword); - token.systemId = ''; - this.state = State.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED; - break; - } - case $.APOSTROPHE: { - this._err(ERR.missingWhitespaceAfterDoctypeSystemKeyword); - token.systemId = ''; - this.state = State.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED; - break; - } - case $.GREATER_THAN_SIGN: { - this._err(ERR.missingDoctypeSystemIdentifier); - token.forceQuirks = true; - this.state = State.DATA; - this.emitCurrentDoctype(token); - break; - } - case $.EOF: { - this._err(ERR.eofInDoctype); - token.forceQuirks = true; - this.emitCurrentDoctype(token); - this._emitEOFToken(); - break; - } - default: { - this._err(ERR.missingQuoteBeforeDoctypeSystemIdentifier); - token.forceQuirks = true; - this.state = State.BOGUS_DOCTYPE; - this._stateBogusDoctype(cp); - } - } - } - // Before DOCTYPE system identifier state - //------------------------------------------------------------------ - _stateBeforeDoctypeSystemIdentifier(cp) { - const token = this.currentToken; - switch (cp) { - case $.SPACE: - case $.LINE_FEED: - case $.TABULATION: - case $.FORM_FEED: { - // Ignore whitespace - break; - } - case $.QUOTATION_MARK: { - token.systemId = ''; - this.state = State.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED; - break; - } - case $.APOSTROPHE: { - token.systemId = ''; - this.state = State.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED; - break; - } - case $.GREATER_THAN_SIGN: { - this._err(ERR.missingDoctypeSystemIdentifier); - token.forceQuirks = true; - this.state = State.DATA; - this.emitCurrentDoctype(token); - break; - } - case $.EOF: { - this._err(ERR.eofInDoctype); - token.forceQuirks = true; - this.emitCurrentDoctype(token); - this._emitEOFToken(); - break; - } - default: { - this._err(ERR.missingQuoteBeforeDoctypeSystemIdentifier); - token.forceQuirks = true; - this.state = State.BOGUS_DOCTYPE; - this._stateBogusDoctype(cp); - } - } - } - // DOCTYPE system identifier (double-quoted) state - //------------------------------------------------------------------ - _stateDoctypeSystemIdentifierDoubleQuoted(cp) { - const token = this.currentToken; - switch (cp) { - case $.QUOTATION_MARK: { - this.state = State.AFTER_DOCTYPE_SYSTEM_IDENTIFIER; - break; - } - case $.NULL: { - this._err(ERR.unexpectedNullCharacter); - token.systemId += REPLACEMENT_CHARACTER; - break; - } - case $.GREATER_THAN_SIGN: { - this._err(ERR.abruptDoctypeSystemIdentifier); - token.forceQuirks = true; - this.emitCurrentDoctype(token); - this.state = State.DATA; - break; - } - case $.EOF: { - this._err(ERR.eofInDoctype); - token.forceQuirks = true; - this.emitCurrentDoctype(token); - this._emitEOFToken(); - break; - } - default: { - token.systemId += String.fromCodePoint(cp); - } - } - } - // DOCTYPE system identifier (single-quoted) state - //------------------------------------------------------------------ - _stateDoctypeSystemIdentifierSingleQuoted(cp) { - const token = this.currentToken; - switch (cp) { - case $.APOSTROPHE: { - this.state = State.AFTER_DOCTYPE_SYSTEM_IDENTIFIER; - break; - } - case $.NULL: { - this._err(ERR.unexpectedNullCharacter); - token.systemId += REPLACEMENT_CHARACTER; - break; - } - case $.GREATER_THAN_SIGN: { - this._err(ERR.abruptDoctypeSystemIdentifier); - token.forceQuirks = true; - this.emitCurrentDoctype(token); - this.state = State.DATA; - break; - } - case $.EOF: { - this._err(ERR.eofInDoctype); - token.forceQuirks = true; - this.emitCurrentDoctype(token); - this._emitEOFToken(); - break; - } - default: { - token.systemId += String.fromCodePoint(cp); - } - } - } - // After DOCTYPE system identifier state - //------------------------------------------------------------------ - _stateAfterDoctypeSystemIdentifier(cp) { - const token = this.currentToken; - switch (cp) { - case $.SPACE: - case $.LINE_FEED: - case $.TABULATION: - case $.FORM_FEED: { - // Ignore whitespace - break; - } - case $.GREATER_THAN_SIGN: { - this.emitCurrentDoctype(token); - this.state = State.DATA; - break; - } - case $.EOF: { - this._err(ERR.eofInDoctype); - token.forceQuirks = true; - this.emitCurrentDoctype(token); - this._emitEOFToken(); - break; - } - default: { - this._err(ERR.unexpectedCharacterAfterDoctypeSystemIdentifier); - this.state = State.BOGUS_DOCTYPE; - this._stateBogusDoctype(cp); - } - } - } - // Bogus DOCTYPE state - //------------------------------------------------------------------ - _stateBogusDoctype(cp) { - const token = this.currentToken; - switch (cp) { - case $.GREATER_THAN_SIGN: { - this.emitCurrentDoctype(token); - this.state = State.DATA; - break; - } - case $.NULL: { - this._err(ERR.unexpectedNullCharacter); - break; - } - case $.EOF: { - this.emitCurrentDoctype(token); - this._emitEOFToken(); - break; - } - default: - // Do nothing - } - } - // CDATA section state - //------------------------------------------------------------------ - _stateCdataSection(cp) { - switch (cp) { - case $.RIGHT_SQUARE_BRACKET: { - this.state = State.CDATA_SECTION_BRACKET; - break; - } - case $.EOF: { - this._err(ERR.eofInCdata); - this._emitEOFToken(); - break; - } - default: { - this._emitCodePoint(cp); - } - } - } - // CDATA section bracket state - //------------------------------------------------------------------ - _stateCdataSectionBracket(cp) { - if (cp === $.RIGHT_SQUARE_BRACKET) { - this.state = State.CDATA_SECTION_END; - } - else { - this._emitChars(']'); - this.state = State.CDATA_SECTION; - this._stateCdataSection(cp); - } - } - // CDATA section end state - //------------------------------------------------------------------ - _stateCdataSectionEnd(cp) { - switch (cp) { - case $.GREATER_THAN_SIGN: { - this.state = State.DATA; - break; - } - case $.RIGHT_SQUARE_BRACKET: { - this._emitChars(']'); - break; - } - default: { - this._emitChars(']]'); - this.state = State.CDATA_SECTION; - this._stateCdataSection(cp); - } - } - } - // Character reference state - //------------------------------------------------------------------ - _stateCharacterReference() { - let length = this.entityDecoder.write(this.preprocessor.html, this.preprocessor.pos); - if (length < 0) { - if (this.preprocessor.lastChunkWritten) { - length = this.entityDecoder.end(); - } - else { - // Wait for the rest of the entity. - this.active = false; - // Mark the entire buffer as read. - this.preprocessor.pos = this.preprocessor.html.length - 1; - this.consumedAfterSnapshot = 0; - this.preprocessor.endOfChunkHit = true; - return; - } - } - if (length === 0) { - // This was not a valid entity. Go back to the beginning, and - // figure out what to do. - this.preprocessor.pos = this.entityStartPos; - this._flushCodePointConsumedAsCharacterReference($.AMPERSAND); - this.state = - !this._isCharacterReferenceInAttribute() && isAsciiAlphaNumeric(this.preprocessor.peek(1)) - ? State.AMBIGUOUS_AMPERSAND - : this.returnState; - } - else { - // We successfully parsed an entity. Switch to the return state. - this.state = this.returnState; - } - } - // Ambiguos ampersand state - //------------------------------------------------------------------ - _stateAmbiguousAmpersand(cp) { - if (isAsciiAlphaNumeric(cp)) { - this._flushCodePointConsumedAsCharacterReference(cp); - } - else { - if (cp === $.SEMICOLON) { - this._err(ERR.unknownNamedCharacterReference); - } - this.state = this.returnState; - this._callState(cp); - } - } -} diff --git a/node_modules/parse5/dist/tokenizer/preprocessor.d.ts b/node_modules/parse5/dist/tokenizer/preprocessor.d.ts deleted file mode 100644 index 1dfede3..0000000 --- a/node_modules/parse5/dist/tokenizer/preprocessor.d.ts +++ /dev/null @@ -1,36 +0,0 @@ -import { ERR, type ParserError, type ParserErrorHandler } from '../common/error-codes.js'; -export declare class Preprocessor { - private handler; - html: string; - pos: number; - private lastGapPos; - private gapStack; - private skipNextNewLine; - lastChunkWritten: boolean; - endOfChunkHit: boolean; - bufferWaterline: number; - private isEol; - private lineStartPos; - droppedBufferSize: number; - line: number; - constructor(handler: { - onParseError?: ParserErrorHandler | null; - }); - /** The column on the current line. If we just saw a gap (eg. a surrogate pair), return the index before. */ - get col(): number; - get offset(): number; - getError(code: ERR, cpOffset: number): ParserError; - private lastErrOffset; - private _err; - private _addGap; - private _processSurrogate; - willDropParsedChunk(): boolean; - dropParsedChunk(): void; - write(chunk: string, isLastChunk: boolean): void; - insertHtmlAtCurrentPos(chunk: string): void; - startsWith(pattern: string, caseSensitive: boolean): boolean; - peek(offset: number): number; - advance(): number; - private _checkForProblematicCharacters; - retreat(count: number): void; -} diff --git a/node_modules/parse5/dist/tokenizer/preprocessor.js b/node_modules/parse5/dist/tokenizer/preprocessor.js deleted file mode 100644 index 530407b..0000000 --- a/node_modules/parse5/dist/tokenizer/preprocessor.js +++ /dev/null @@ -1,196 +0,0 @@ -import { CODE_POINTS as $, getSurrogatePairCodePoint, isControlCodePoint, isSurrogate, isSurrogatePair, isUndefinedCodePoint, } from '../common/unicode.js'; -import { ERR } from '../common/error-codes.js'; -//Const -const DEFAULT_BUFFER_WATERLINE = 1 << 16; -//Preprocessor -//NOTE: HTML input preprocessing -//(see: http://www.whatwg.org/specs/web-apps/current-work/multipage/parsing.html#preprocessing-the-input-stream) -export class Preprocessor { - constructor(handler) { - this.handler = handler; - this.html = ''; - this.pos = -1; - // NOTE: Initial `lastGapPos` is -2, to ensure `col` on initialisation is 0 - this.lastGapPos = -2; - this.gapStack = []; - this.skipNextNewLine = false; - this.lastChunkWritten = false; - this.endOfChunkHit = false; - this.bufferWaterline = DEFAULT_BUFFER_WATERLINE; - this.isEol = false; - this.lineStartPos = 0; - this.droppedBufferSize = 0; - this.line = 1; - //NOTE: avoid reporting errors twice on advance/retreat - this.lastErrOffset = -1; - } - /** The column on the current line. If we just saw a gap (eg. a surrogate pair), return the index before. */ - get col() { - return this.pos - this.lineStartPos + Number(this.lastGapPos !== this.pos); - } - get offset() { - return this.droppedBufferSize + this.pos; - } - getError(code, cpOffset) { - const { line, col, offset } = this; - const startCol = col + cpOffset; - const startOffset = offset + cpOffset; - return { - code, - startLine: line, - endLine: line, - startCol, - endCol: startCol, - startOffset, - endOffset: startOffset, - }; - } - _err(code) { - if (this.handler.onParseError && this.lastErrOffset !== this.offset) { - this.lastErrOffset = this.offset; - this.handler.onParseError(this.getError(code, 0)); - } - } - _addGap() { - this.gapStack.push(this.lastGapPos); - this.lastGapPos = this.pos; - } - _processSurrogate(cp) { - //NOTE: try to peek a surrogate pair - if (this.pos !== this.html.length - 1) { - const nextCp = this.html.charCodeAt(this.pos + 1); - if (isSurrogatePair(nextCp)) { - //NOTE: we have a surrogate pair. Peek pair character and recalculate code point. - this.pos++; - //NOTE: add a gap that should be avoided during retreat - this._addGap(); - return getSurrogatePairCodePoint(cp, nextCp); - } - } - //NOTE: we are at the end of a chunk, therefore we can't infer the surrogate pair yet. - else if (!this.lastChunkWritten) { - this.endOfChunkHit = true; - return $.EOF; - } - //NOTE: isolated surrogate - this._err(ERR.surrogateInInputStream); - return cp; - } - willDropParsedChunk() { - return this.pos > this.bufferWaterline; - } - dropParsedChunk() { - if (this.willDropParsedChunk()) { - this.html = this.html.substring(this.pos); - this.lineStartPos -= this.pos; - this.droppedBufferSize += this.pos; - this.pos = 0; - this.lastGapPos = -2; - this.gapStack.length = 0; - } - } - write(chunk, isLastChunk) { - if (this.html.length > 0) { - this.html += chunk; - } - else { - this.html = chunk; - } - this.endOfChunkHit = false; - this.lastChunkWritten = isLastChunk; - } - insertHtmlAtCurrentPos(chunk) { - this.html = this.html.substring(0, this.pos + 1) + chunk + this.html.substring(this.pos + 1); - this.endOfChunkHit = false; - } - startsWith(pattern, caseSensitive) { - // Check if our buffer has enough characters - if (this.pos + pattern.length > this.html.length) { - this.endOfChunkHit = !this.lastChunkWritten; - return false; - } - if (caseSensitive) { - return this.html.startsWith(pattern, this.pos); - } - for (let i = 0; i < pattern.length; i++) { - const cp = this.html.charCodeAt(this.pos + i) | 0x20; - if (cp !== pattern.charCodeAt(i)) { - return false; - } - } - return true; - } - peek(offset) { - const pos = this.pos + offset; - if (pos >= this.html.length) { - this.endOfChunkHit = !this.lastChunkWritten; - return $.EOF; - } - const code = this.html.charCodeAt(pos); - return code === $.CARRIAGE_RETURN ? $.LINE_FEED : code; - } - advance() { - this.pos++; - //NOTE: LF should be in the last column of the line - if (this.isEol) { - this.isEol = false; - this.line++; - this.lineStartPos = this.pos; - } - if (this.pos >= this.html.length) { - this.endOfChunkHit = !this.lastChunkWritten; - return $.EOF; - } - let cp = this.html.charCodeAt(this.pos); - //NOTE: all U+000D CARRIAGE RETURN (CR) characters must be converted to U+000A LINE FEED (LF) characters - if (cp === $.CARRIAGE_RETURN) { - this.isEol = true; - this.skipNextNewLine = true; - return $.LINE_FEED; - } - //NOTE: any U+000A LINE FEED (LF) characters that immediately follow a U+000D CARRIAGE RETURN (CR) character - //must be ignored. - if (cp === $.LINE_FEED) { - this.isEol = true; - if (this.skipNextNewLine) { - // `line` will be bumped again in the recursive call. - this.line--; - this.skipNextNewLine = false; - this._addGap(); - return this.advance(); - } - } - this.skipNextNewLine = false; - if (isSurrogate(cp)) { - cp = this._processSurrogate(cp); - } - //OPTIMIZATION: first check if code point is in the common allowed - //range (ASCII alphanumeric, whitespaces, big chunk of BMP) - //before going into detailed performance cost validation. - const isCommonValidRange = this.handler.onParseError === null || - (cp > 0x1f && cp < 0x7f) || - cp === $.LINE_FEED || - cp === $.CARRIAGE_RETURN || - (cp > 0x9f && cp < 64976); - if (!isCommonValidRange) { - this._checkForProblematicCharacters(cp); - } - return cp; - } - _checkForProblematicCharacters(cp) { - if (isControlCodePoint(cp)) { - this._err(ERR.controlCharacterInInputStream); - } - else if (isUndefinedCodePoint(cp)) { - this._err(ERR.noncharacterInInputStream); - } - } - retreat(count) { - this.pos -= count; - while (this.pos < this.lastGapPos) { - this.lastGapPos = this.gapStack.pop(); - this.pos--; - } - this.isEol = false; - } -} diff --git a/node_modules/parse5/dist/tree-adapters/default.d.ts b/node_modules/parse5/dist/tree-adapters/default.d.ts deleted file mode 100644 index 98fb8f6..0000000 --- a/node_modules/parse5/dist/tree-adapters/default.d.ts +++ /dev/null @@ -1,84 +0,0 @@ -import { DOCUMENT_MODE, type NS } from '../common/html.js'; -import type { Attribute, Location, ElementLocation } from '../common/token.js'; -import type { TreeAdapter, TreeAdapterTypeMap } from './interface.js'; -export interface Document { - /** The name of the node. */ - nodeName: '#document'; - /** - * Document mode. - * - * @see {@link DOCUMENT_MODE} */ - mode: DOCUMENT_MODE; - /** The node's children. */ - childNodes: ChildNode[]; - /** Comment source code location info. Available if location info is enabled. */ - sourceCodeLocation?: Location | null; -} -export interface DocumentFragment { - /** The name of the node. */ - nodeName: '#document-fragment'; - /** The node's children. */ - childNodes: ChildNode[]; - /** Comment source code location info. Available if location info is enabled. */ - sourceCodeLocation?: Location | null; -} -export interface Element { - /** Element tag name. Same as {@link tagName}. */ - nodeName: string; - /** Element tag name. Same as {@link nodeName}. */ - tagName: string; - /** List of element attributes. */ - attrs: Attribute[]; - /** Element namespace. */ - namespaceURI: NS; - /** Element source code location info, with attributes. Available if location info is enabled. */ - sourceCodeLocation?: ElementLocation | null; - /** Parent node. */ - parentNode: ParentNode | null; - /** The node's children. */ - childNodes: ChildNode[]; -} -export interface CommentNode { - /** The name of the node. */ - nodeName: '#comment'; - /** Parent node. */ - parentNode: ParentNode | null; - /** Comment text. */ - data: string; - /** Comment source code location info. Available if location info is enabled. */ - sourceCodeLocation?: Location | null; -} -export interface TextNode { - nodeName: '#text'; - /** Parent node. */ - parentNode: ParentNode | null; - /** Text content. */ - value: string; - /** Comment source code location info. Available if location info is enabled. */ - sourceCodeLocation?: Location | null; -} -export interface Template extends Element { - nodeName: 'template'; - tagName: 'template'; - /** The content of a `template` tag. */ - content: DocumentFragment; -} -export interface DocumentType { - /** The name of the node. */ - nodeName: '#documentType'; - /** Parent node. */ - parentNode: ParentNode | null; - /** Document type name. */ - name: string; - /** Document type public identifier. */ - publicId: string; - /** Document type system identifier. */ - systemId: string; - /** Comment source code location info. Available if location info is enabled. */ - sourceCodeLocation?: Location | null; -} -export type ParentNode = Document | DocumentFragment | Element | Template; -export type ChildNode = Element | Template | CommentNode | TextNode | DocumentType; -export type Node = ParentNode | ChildNode; -export type DefaultTreeAdapterMap = TreeAdapterTypeMap<Node, ParentNode, ChildNode, Document, DocumentFragment, Element, CommentNode, TextNode, Template, DocumentType>; -export declare const defaultTreeAdapter: TreeAdapter<DefaultTreeAdapterMap>; diff --git a/node_modules/parse5/dist/tree-adapters/default.js b/node_modules/parse5/dist/tree-adapters/default.js deleted file mode 100644 index 567ad82..0000000 --- a/node_modules/parse5/dist/tree-adapters/default.js +++ /dev/null @@ -1,173 +0,0 @@ -import { DOCUMENT_MODE } from '../common/html.js'; -export const defaultTreeAdapter = { - //Node construction - createDocument() { - return { - nodeName: '#document', - mode: DOCUMENT_MODE.NO_QUIRKS, - childNodes: [], - }; - }, - createDocumentFragment() { - return { - nodeName: '#document-fragment', - childNodes: [], - }; - }, - createElement(tagName, namespaceURI, attrs) { - return { - nodeName: tagName, - tagName, - attrs, - namespaceURI, - childNodes: [], - parentNode: null, - }; - }, - createCommentNode(data) { - return { - nodeName: '#comment', - data, - parentNode: null, - }; - }, - createTextNode(value) { - return { - nodeName: '#text', - value, - parentNode: null, - }; - }, - //Tree mutation - appendChild(parentNode, newNode) { - parentNode.childNodes.push(newNode); - newNode.parentNode = parentNode; - }, - insertBefore(parentNode, newNode, referenceNode) { - const insertionIdx = parentNode.childNodes.indexOf(referenceNode); - parentNode.childNodes.splice(insertionIdx, 0, newNode); - newNode.parentNode = parentNode; - }, - setTemplateContent(templateElement, contentElement) { - templateElement.content = contentElement; - }, - getTemplateContent(templateElement) { - return templateElement.content; - }, - setDocumentType(document, name, publicId, systemId) { - const doctypeNode = document.childNodes.find((node) => node.nodeName === '#documentType'); - if (doctypeNode) { - doctypeNode.name = name; - doctypeNode.publicId = publicId; - doctypeNode.systemId = systemId; - } - else { - const node = { - nodeName: '#documentType', - name, - publicId, - systemId, - parentNode: null, - }; - defaultTreeAdapter.appendChild(document, node); - } - }, - setDocumentMode(document, mode) { - document.mode = mode; - }, - getDocumentMode(document) { - return document.mode; - }, - detachNode(node) { - if (node.parentNode) { - const idx = node.parentNode.childNodes.indexOf(node); - node.parentNode.childNodes.splice(idx, 1); - node.parentNode = null; - } - }, - insertText(parentNode, text) { - if (parentNode.childNodes.length > 0) { - const prevNode = parentNode.childNodes[parentNode.childNodes.length - 1]; - if (defaultTreeAdapter.isTextNode(prevNode)) { - prevNode.value += text; - return; - } - } - defaultTreeAdapter.appendChild(parentNode, defaultTreeAdapter.createTextNode(text)); - }, - insertTextBefore(parentNode, text, referenceNode) { - const prevNode = parentNode.childNodes[parentNode.childNodes.indexOf(referenceNode) - 1]; - if (prevNode && defaultTreeAdapter.isTextNode(prevNode)) { - prevNode.value += text; - } - else { - defaultTreeAdapter.insertBefore(parentNode, defaultTreeAdapter.createTextNode(text), referenceNode); - } - }, - adoptAttributes(recipient, attrs) { - const recipientAttrsMap = new Set(recipient.attrs.map((attr) => attr.name)); - for (let j = 0; j < attrs.length; j++) { - if (!recipientAttrsMap.has(attrs[j].name)) { - recipient.attrs.push(attrs[j]); - } - } - }, - //Tree traversing - getFirstChild(node) { - return node.childNodes[0]; - }, - getChildNodes(node) { - return node.childNodes; - }, - getParentNode(node) { - return node.parentNode; - }, - getAttrList(element) { - return element.attrs; - }, - //Node data - getTagName(element) { - return element.tagName; - }, - getNamespaceURI(element) { - return element.namespaceURI; - }, - getTextNodeContent(textNode) { - return textNode.value; - }, - getCommentNodeContent(commentNode) { - return commentNode.data; - }, - getDocumentTypeNodeName(doctypeNode) { - return doctypeNode.name; - }, - getDocumentTypeNodePublicId(doctypeNode) { - return doctypeNode.publicId; - }, - getDocumentTypeNodeSystemId(doctypeNode) { - return doctypeNode.systemId; - }, - //Node types - isTextNode(node) { - return node.nodeName === '#text'; - }, - isCommentNode(node) { - return node.nodeName === '#comment'; - }, - isDocumentTypeNode(node) { - return node.nodeName === '#documentType'; - }, - isElementNode(node) { - return Object.prototype.hasOwnProperty.call(node, 'tagName'); - }, - // Source code location - setNodeSourceCodeLocation(node, location) { - node.sourceCodeLocation = location; - }, - getNodeSourceCodeLocation(node) { - return node.sourceCodeLocation; - }, - updateNodeSourceCodeLocation(node, endLocation) { - node.sourceCodeLocation = { ...node.sourceCodeLocation, ...endLocation }; - }, -}; diff --git a/node_modules/parse5/dist/tree-adapters/interface.d.ts b/node_modules/parse5/dist/tree-adapters/interface.d.ts deleted file mode 100644 index d14091f..0000000 --- a/node_modules/parse5/dist/tree-adapters/interface.d.ts +++ /dev/null @@ -1,255 +0,0 @@ -import type { DOCUMENT_MODE, NS } from '../common/html.js'; -import type { Attribute, ElementLocation } from '../common/token.js'; -export interface TreeAdapterTypeMap<Node = unknown, ParentNode = unknown, ChildNode = unknown, Document = unknown, DocumentFragment = unknown, Element = unknown, CommentNode = unknown, TextNode = unknown, Template = unknown, DocumentType = unknown> { - node: Node; - parentNode: ParentNode; - childNode: ChildNode; - document: Document; - documentFragment: DocumentFragment; - element: Element; - commentNode: CommentNode; - textNode: TextNode; - template: Template; - documentType: DocumentType; -} -/** - * Tree adapter is a set of utility functions that provides minimal required abstraction layer beetween parser and a specific AST format. - * Note that `TreeAdapter` is not designed to be a general purpose AST manipulation library. You can build such library - * on top of existing `TreeAdapter` or use one of the existing libraries from npm. - * - * @see Have a look at the default tree adapter for reference. - */ -export interface TreeAdapter<T extends TreeAdapterTypeMap = TreeAdapterTypeMap> { - /** - * Copies attributes to the given element. Only attributes that are not yet present in the element are copied. - * - * @param recipient - Element to copy attributes into. - * @param attrs - Attributes to copy. - */ - adoptAttributes(recipient: T['element'], attrs: Attribute[]): void; - /** - * Appends a child node to the given parent node. - * - * @param parentNode - Parent node. - * @param newNode - Child node. - */ - appendChild(parentNode: T['parentNode'], newNode: T['childNode']): void; - /** - * Creates a comment node. - * - * @param data - Comment text. - */ - createCommentNode(data: string): T['commentNode']; - /** - * Creates a text node. - * - * @param value - Text. - */ - createTextNode(value: string): T['textNode']; - /** - * Creates a document node. - */ - createDocument(): T['document']; - /** - * Creates a document fragment node. - */ - createDocumentFragment(): T['documentFragment']; - /** - * Creates an element node. - * - * @param tagName - Tag name of the element. - * @param namespaceURI - Namespace of the element. - * @param attrs - Attribute name-value pair array. Foreign attributes may contain `namespace` and `prefix` fields as well. - */ - createElement(tagName: string, namespaceURI: NS, attrs: Attribute[]): T['element']; - /** - * Removes a node from its parent. - * - * @param node - Node to remove. - */ - detachNode(node: T['childNode']): void; - /** - * Returns the given element's attributes in an array, in the form of name-value pairs. - * Foreign attributes may contain `namespace` and `prefix` fields as well. - * - * @param element - Element. - */ - getAttrList(element: T['element']): Attribute[]; - /** - * Returns the given node's children in an array. - * - * @param node - Node. - */ - getChildNodes(node: T['parentNode']): T['childNode'][]; - /** - * Returns the given comment node's content. - * - * @param commentNode - Comment node. - */ - getCommentNodeContent(commentNode: T['commentNode']): string; - /** - * Returns [document mode](https://dom.spec.whatwg.org/#concept-document-limited-quirks). - * - * @param document - Document node. - */ - getDocumentMode(document: T['document']): DOCUMENT_MODE; - /** - * Returns the given document type node's name. - * - * @param doctypeNode - Document type node. - */ - getDocumentTypeNodeName(doctypeNode: T['documentType']): string; - /** - * Returns the given document type node's public identifier. - * - * @param doctypeNode - Document type node. - */ - getDocumentTypeNodePublicId(doctypeNode: T['documentType']): string; - /** - * Returns the given document type node's system identifier. - * - * @param doctypeNode - Document type node. - */ - getDocumentTypeNodeSystemId(doctypeNode: T['documentType']): string; - /** - * Returns the first child of the given node. - * - * @param node - Node. - */ - getFirstChild(node: T['parentNode']): T['childNode'] | null; - /** - * Returns the given element's namespace. - * - * @param element - Element. - */ - getNamespaceURI(element: T['element']): NS; - /** - * Returns the given node's source code location information. - * - * @param node - Node. - */ - getNodeSourceCodeLocation(node: T['node']): ElementLocation | undefined | null; - /** - * Returns the given node's parent. - * - * @param node - Node. - */ - getParentNode(node: T['node']): T['parentNode'] | null; - /** - * Returns the given element's tag name. - * - * @param element - Element. - */ - getTagName(element: T['element']): string; - /** - * Returns the given text node's content. - * - * @param textNode - Text node. - */ - getTextNodeContent(textNode: T['textNode']): string; - /** - * Returns the `<template>` element content element. - * - * @param templateElement - `<template>` element. - */ - getTemplateContent(templateElement: T['template']): T['documentFragment']; - /** - * Inserts a child node to the given parent node before the given reference node. - * - * @param parentNode - Parent node. - * @param newNode - Child node. - * @param referenceNode - Reference node. - */ - insertBefore(parentNode: T['parentNode'], newNode: T['childNode'], referenceNode: T['childNode']): void; - /** - * Inserts text into a node. If the last child of the node is a text node, the provided text will be appended to the - * text node content. Otherwise, inserts a new text node with the given text. - * - * @param parentNode - Node to insert text into. - * @param text - Text to insert. - */ - insertText(parentNode: T['parentNode'], text: string): void; - /** - * Inserts text into a sibling node that goes before the reference node. If this sibling node is the text node, - * the provided text will be appended to the text node content. Otherwise, inserts a new sibling text node with - * the given text before the reference node. - * - * @param parentNode - Node to insert text into. - * @param text - Text to insert. - * @param referenceNode - Node to insert text before. - */ - insertTextBefore(parentNode: T['parentNode'], text: string, referenceNode: T['childNode']): void; - /** - * Determines if the given node is a comment node. - * - * @param node - Node. - */ - isCommentNode(node: T['node']): node is T['commentNode']; - /** - * Determines if the given node is a document type node. - * - * @param node - Node. - */ - isDocumentTypeNode(node: T['node']): node is T['documentType']; - /** - * Determines if the given node is an element. - * - * @param node - Node. - */ - isElementNode(node: T['node']): node is T['element']; - /** - * Determines if the given node is a text node. - * - * @param node - Node. - */ - isTextNode(node: T['node']): node is T['textNode']; - /** - * Sets the [document mode](https://dom.spec.whatwg.org/#concept-document-limited-quirks). - * - * @param document - Document node. - * @param mode - Document mode. - */ - setDocumentMode(document: T['document'], mode: DOCUMENT_MODE): void; - /** - * Sets the document type. If the `document` already contains a document type node, the `name`, `publicId` and `systemId` - * properties of this node will be updated with the provided values. Otherwise, creates a new document type node - * with the given properties and inserts it into the `document`. - * - * @param document - Document node. - * @param name - Document type name. - * @param publicId - Document type public identifier. - * @param systemId - Document type system identifier. - */ - setDocumentType(document: T['document'], name: string, publicId: string, systemId: string): void; - /** - * Attaches source code location information to the node. - * - * @param node - Node. - */ - setNodeSourceCodeLocation(node: T['node'], location: ElementLocation | null): void; - /** - * Updates the source code location information of the node. - * - * @param node - Node. - */ - updateNodeSourceCodeLocation(node: T['node'], location: Partial<ElementLocation>): void; - /** - * Sets the `<template>` element content element. - * - * @param templateElement - `<template>` element. - * @param contentElement - Content element. - */ - setTemplateContent(templateElement: T['template'], contentElement: T['documentFragment']): void; - /** - * Optional callback for elements being pushed to the stack of open elements. - * - * @param element The element being pushed to the stack of open elements. - */ - onItemPush?: (item: T['element']) => void; - /** - * Optional callback for elements being popped from the stack of open elements. - * - * @param item The element being popped. - */ - onItemPop?: (item: T['element'], newTop: T['parentNode']) => void; -} diff --git a/node_modules/parse5/dist/tree-adapters/interface.js b/node_modules/parse5/dist/tree-adapters/interface.js deleted file mode 100644 index cb0ff5c..0000000 --- a/node_modules/parse5/dist/tree-adapters/interface.js +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/node_modules/parse5/package.json b/node_modules/parse5/package.json deleted file mode 100644 index 925cd4c..0000000 --- a/node_modules/parse5/package.json +++ /dev/null @@ -1,50 +0,0 @@ -{ - "name": "parse5", - "type": "module", - "description": "HTML parser and serializer.", - "version": "7.2.1", - "author": "Ivan Nikulin <ifaaan@gmail.com> (https://github.com/inikulin)", - "contributors": "https://github.com/inikulin/parse5/graphs/contributors", - "homepage": "https://parse5.js.org", - "funding": "https://github.com/inikulin/parse5?sponsor=1", - "dependencies": { - "entities": "^4.5.0" - }, - "keywords": [ - "html", - "parser", - "html5", - "WHATWG", - "specification", - "fast", - "html parser", - "html5 parser", - "htmlparser", - "parse5", - "serializer", - "html serializer", - "htmlserializer", - "parse", - "serialize" - ], - "license": "MIT", - "main": "dist/cjs/index.js", - "module": "dist/index.js", - "types": "dist/index.d.ts", - "exports": { - "import": "./dist/index.js", - "require": "./dist/cjs/index.js" - }, - "scripts": { - "build:cjs": "tsc --moduleResolution node10 --module CommonJS --target ES6 --outDir dist/cjs && echo '{\"type\":\"commonjs\"}' > dist/cjs/package.json" - }, - "repository": { - "type": "git", - "url": "git://github.com/inikulin/parse5.git" - }, - "files": [ - "dist/cjs/package.json", - "dist/**/*.js", - "dist/**/*.d.ts" - ] -} diff --git a/node_modules/path-is-absolute/index.js b/node_modules/path-is-absolute/index.js deleted file mode 100644 index 22aa6c3..0000000 --- a/node_modules/path-is-absolute/index.js +++ /dev/null @@ -1,20 +0,0 @@ -'use strict'; - -function posix(path) { - return path.charAt(0) === '/'; -} - -function win32(path) { - // https://github.com/nodejs/node/blob/b3fcc245fb25539909ef1d5eaa01dbf92e168633/lib/path.js#L56 - var splitDeviceRe = /^([a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?([\\\/])?([\s\S]*?)$/; - var result = splitDeviceRe.exec(path); - var device = result[1] || ''; - var isUnc = Boolean(device && device.charAt(1) !== ':'); - - // UNC paths are always absolute - return Boolean(result[2] || isUnc); -} - -module.exports = process.platform === 'win32' ? win32 : posix; -module.exports.posix = posix; -module.exports.win32 = win32; diff --git a/node_modules/path-is-absolute/package.json b/node_modules/path-is-absolute/package.json deleted file mode 100644 index 91196d5..0000000 --- a/node_modules/path-is-absolute/package.json +++ /dev/null @@ -1,43 +0,0 @@ -{ - "name": "path-is-absolute", - "version": "1.0.1", - "description": "Node.js 0.12 path.isAbsolute() ponyfill", - "license": "MIT", - "repository": "sindresorhus/path-is-absolute", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "engines": { - "node": ">=0.10.0" - }, - "scripts": { - "test": "xo && node test.js" - }, - "files": [ - "index.js" - ], - "keywords": [ - "path", - "paths", - "file", - "dir", - "absolute", - "isabsolute", - "is-absolute", - "built-in", - "util", - "utils", - "core", - "ponyfill", - "polyfill", - "shim", - "is", - "detect", - "check" - ], - "devDependencies": { - "xo": "^0.16.0" - } -} diff --git a/node_modules/picomatch/index.js b/node_modules/picomatch/index.js deleted file mode 100644 index d2f2bc5..0000000 --- a/node_modules/picomatch/index.js +++ /dev/null @@ -1,3 +0,0 @@ -'use strict'; - -module.exports = require('./lib/picomatch'); diff --git a/node_modules/picomatch/lib/constants.js b/node_modules/picomatch/lib/constants.js deleted file mode 100644 index a62ef38..0000000 --- a/node_modules/picomatch/lib/constants.js +++ /dev/null @@ -1,179 +0,0 @@ -'use strict'; - -const path = require('path'); -const WIN_SLASH = '\\\\/'; -const WIN_NO_SLASH = `[^${WIN_SLASH}]`; - -/** - * Posix glob regex - */ - -const DOT_LITERAL = '\\.'; -const PLUS_LITERAL = '\\+'; -const QMARK_LITERAL = '\\?'; -const SLASH_LITERAL = '\\/'; -const ONE_CHAR = '(?=.)'; -const QMARK = '[^/]'; -const END_ANCHOR = `(?:${SLASH_LITERAL}|$)`; -const START_ANCHOR = `(?:^|${SLASH_LITERAL})`; -const DOTS_SLASH = `${DOT_LITERAL}{1,2}${END_ANCHOR}`; -const NO_DOT = `(?!${DOT_LITERAL})`; -const NO_DOTS = `(?!${START_ANCHOR}${DOTS_SLASH})`; -const NO_DOT_SLASH = `(?!${DOT_LITERAL}{0,1}${END_ANCHOR})`; -const NO_DOTS_SLASH = `(?!${DOTS_SLASH})`; -const QMARK_NO_DOT = `[^.${SLASH_LITERAL}]`; -const STAR = `${QMARK}*?`; - -const POSIX_CHARS = { - DOT_LITERAL, - PLUS_LITERAL, - QMARK_LITERAL, - SLASH_LITERAL, - ONE_CHAR, - QMARK, - END_ANCHOR, - DOTS_SLASH, - NO_DOT, - NO_DOTS, - NO_DOT_SLASH, - NO_DOTS_SLASH, - QMARK_NO_DOT, - STAR, - START_ANCHOR -}; - -/** - * Windows glob regex - */ - -const WINDOWS_CHARS = { - ...POSIX_CHARS, - - SLASH_LITERAL: `[${WIN_SLASH}]`, - QMARK: WIN_NO_SLASH, - STAR: `${WIN_NO_SLASH}*?`, - DOTS_SLASH: `${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$)`, - NO_DOT: `(?!${DOT_LITERAL})`, - NO_DOTS: `(?!(?:^|[${WIN_SLASH}])${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$))`, - NO_DOT_SLASH: `(?!${DOT_LITERAL}{0,1}(?:[${WIN_SLASH}]|$))`, - NO_DOTS_SLASH: `(?!${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$))`, - QMARK_NO_DOT: `[^.${WIN_SLASH}]`, - START_ANCHOR: `(?:^|[${WIN_SLASH}])`, - END_ANCHOR: `(?:[${WIN_SLASH}]|$)` -}; - -/** - * POSIX Bracket Regex - */ - -const POSIX_REGEX_SOURCE = { - alnum: 'a-zA-Z0-9', - alpha: 'a-zA-Z', - ascii: '\\x00-\\x7F', - blank: ' \\t', - cntrl: '\\x00-\\x1F\\x7F', - digit: '0-9', - graph: '\\x21-\\x7E', - lower: 'a-z', - print: '\\x20-\\x7E ', - punct: '\\-!"#$%&\'()\\*+,./:;<=>?@[\\]^_`{|}~', - space: ' \\t\\r\\n\\v\\f', - upper: 'A-Z', - word: 'A-Za-z0-9_', - xdigit: 'A-Fa-f0-9' -}; - -module.exports = { - MAX_LENGTH: 1024 * 64, - POSIX_REGEX_SOURCE, - - // regular expressions - REGEX_BACKSLASH: /\\(?![*+?^${}(|)[\]])/g, - REGEX_NON_SPECIAL_CHARS: /^[^@![\].,$*+?^{}()|\\/]+/, - REGEX_SPECIAL_CHARS: /[-*+?.^${}(|)[\]]/, - REGEX_SPECIAL_CHARS_BACKREF: /(\\?)((\W)(\3*))/g, - REGEX_SPECIAL_CHARS_GLOBAL: /([-*+?.^${}(|)[\]])/g, - REGEX_REMOVE_BACKSLASH: /(?:\[.*?[^\\]\]|\\(?=.))/g, - - // Replace globs with equivalent patterns to reduce parsing time. - REPLACEMENTS: { - '***': '*', - '**/**': '**', - '**/**/**': '**' - }, - - // Digits - CHAR_0: 48, /* 0 */ - CHAR_9: 57, /* 9 */ - - // Alphabet chars. - CHAR_UPPERCASE_A: 65, /* A */ - CHAR_LOWERCASE_A: 97, /* a */ - CHAR_UPPERCASE_Z: 90, /* Z */ - CHAR_LOWERCASE_Z: 122, /* z */ - - CHAR_LEFT_PARENTHESES: 40, /* ( */ - CHAR_RIGHT_PARENTHESES: 41, /* ) */ - - CHAR_ASTERISK: 42, /* * */ - - // Non-alphabetic chars. - CHAR_AMPERSAND: 38, /* & */ - CHAR_AT: 64, /* @ */ - CHAR_BACKWARD_SLASH: 92, /* \ */ - CHAR_CARRIAGE_RETURN: 13, /* \r */ - CHAR_CIRCUMFLEX_ACCENT: 94, /* ^ */ - CHAR_COLON: 58, /* : */ - CHAR_COMMA: 44, /* , */ - CHAR_DOT: 46, /* . */ - CHAR_DOUBLE_QUOTE: 34, /* " */ - CHAR_EQUAL: 61, /* = */ - CHAR_EXCLAMATION_MARK: 33, /* ! */ - CHAR_FORM_FEED: 12, /* \f */ - CHAR_FORWARD_SLASH: 47, /* / */ - CHAR_GRAVE_ACCENT: 96, /* ` */ - CHAR_HASH: 35, /* # */ - CHAR_HYPHEN_MINUS: 45, /* - */ - CHAR_LEFT_ANGLE_BRACKET: 60, /* < */ - CHAR_LEFT_CURLY_BRACE: 123, /* { */ - CHAR_LEFT_SQUARE_BRACKET: 91, /* [ */ - CHAR_LINE_FEED: 10, /* \n */ - CHAR_NO_BREAK_SPACE: 160, /* \u00A0 */ - CHAR_PERCENT: 37, /* % */ - CHAR_PLUS: 43, /* + */ - CHAR_QUESTION_MARK: 63, /* ? */ - CHAR_RIGHT_ANGLE_BRACKET: 62, /* > */ - CHAR_RIGHT_CURLY_BRACE: 125, /* } */ - CHAR_RIGHT_SQUARE_BRACKET: 93, /* ] */ - CHAR_SEMICOLON: 59, /* ; */ - CHAR_SINGLE_QUOTE: 39, /* ' */ - CHAR_SPACE: 32, /* */ - CHAR_TAB: 9, /* \t */ - CHAR_UNDERSCORE: 95, /* _ */ - CHAR_VERTICAL_LINE: 124, /* | */ - CHAR_ZERO_WIDTH_NOBREAK_SPACE: 65279, /* \uFEFF */ - - SEP: path.sep, - - /** - * Create EXTGLOB_CHARS - */ - - extglobChars(chars) { - return { - '!': { type: 'negate', open: '(?:(?!(?:', close: `))${chars.STAR})` }, - '?': { type: 'qmark', open: '(?:', close: ')?' }, - '+': { type: 'plus', open: '(?:', close: ')+' }, - '*': { type: 'star', open: '(?:', close: ')*' }, - '@': { type: 'at', open: '(?:', close: ')' } - }; - }, - - /** - * Create GLOB_CHARS - */ - - globChars(win32) { - return win32 === true ? WINDOWS_CHARS : POSIX_CHARS; - } -}; diff --git a/node_modules/picomatch/lib/parse.js b/node_modules/picomatch/lib/parse.js deleted file mode 100644 index 58269d0..0000000 --- a/node_modules/picomatch/lib/parse.js +++ /dev/null @@ -1,1091 +0,0 @@ -'use strict'; - -const constants = require('./constants'); -const utils = require('./utils'); - -/** - * Constants - */ - -const { - MAX_LENGTH, - POSIX_REGEX_SOURCE, - REGEX_NON_SPECIAL_CHARS, - REGEX_SPECIAL_CHARS_BACKREF, - REPLACEMENTS -} = constants; - -/** - * Helpers - */ - -const expandRange = (args, options) => { - if (typeof options.expandRange === 'function') { - return options.expandRange(...args, options); - } - - args.sort(); - const value = `[${args.join('-')}]`; - - try { - /* eslint-disable-next-line no-new */ - new RegExp(value); - } catch (ex) { - return args.map(v => utils.escapeRegex(v)).join('..'); - } - - return value; -}; - -/** - * Create the message for a syntax error - */ - -const syntaxError = (type, char) => { - return `Missing ${type}: "${char}" - use "\\\\${char}" to match literal characters`; -}; - -/** - * Parse the given input string. - * @param {String} input - * @param {Object} options - * @return {Object} - */ - -const parse = (input, options) => { - if (typeof input !== 'string') { - throw new TypeError('Expected a string'); - } - - input = REPLACEMENTS[input] || input; - - const opts = { ...options }; - const max = typeof opts.maxLength === 'number' ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH; - - let len = input.length; - if (len > max) { - throw new SyntaxError(`Input length: ${len}, exceeds maximum allowed length: ${max}`); - } - - const bos = { type: 'bos', value: '', output: opts.prepend || '' }; - const tokens = [bos]; - - const capture = opts.capture ? '' : '?:'; - const win32 = utils.isWindows(options); - - // create constants based on platform, for windows or posix - const PLATFORM_CHARS = constants.globChars(win32); - const EXTGLOB_CHARS = constants.extglobChars(PLATFORM_CHARS); - - const { - DOT_LITERAL, - PLUS_LITERAL, - SLASH_LITERAL, - ONE_CHAR, - DOTS_SLASH, - NO_DOT, - NO_DOT_SLASH, - NO_DOTS_SLASH, - QMARK, - QMARK_NO_DOT, - STAR, - START_ANCHOR - } = PLATFORM_CHARS; - - const globstar = opts => { - return `(${capture}(?:(?!${START_ANCHOR}${opts.dot ? DOTS_SLASH : DOT_LITERAL}).)*?)`; - }; - - const nodot = opts.dot ? '' : NO_DOT; - const qmarkNoDot = opts.dot ? QMARK : QMARK_NO_DOT; - let star = opts.bash === true ? globstar(opts) : STAR; - - if (opts.capture) { - star = `(${star})`; - } - - // minimatch options support - if (typeof opts.noext === 'boolean') { - opts.noextglob = opts.noext; - } - - const state = { - input, - index: -1, - start: 0, - dot: opts.dot === true, - consumed: '', - output: '', - prefix: '', - backtrack: false, - negated: false, - brackets: 0, - braces: 0, - parens: 0, - quotes: 0, - globstar: false, - tokens - }; - - input = utils.removePrefix(input, state); - len = input.length; - - const extglobs = []; - const braces = []; - const stack = []; - let prev = bos; - let value; - - /** - * Tokenizing helpers - */ - - const eos = () => state.index === len - 1; - const peek = state.peek = (n = 1) => input[state.index + n]; - const advance = state.advance = () => input[++state.index] || ''; - const remaining = () => input.slice(state.index + 1); - const consume = (value = '', num = 0) => { - state.consumed += value; - state.index += num; - }; - - const append = token => { - state.output += token.output != null ? token.output : token.value; - consume(token.value); - }; - - const negate = () => { - let count = 1; - - while (peek() === '!' && (peek(2) !== '(' || peek(3) === '?')) { - advance(); - state.start++; - count++; - } - - if (count % 2 === 0) { - return false; - } - - state.negated = true; - state.start++; - return true; - }; - - const increment = type => { - state[type]++; - stack.push(type); - }; - - const decrement = type => { - state[type]--; - stack.pop(); - }; - - /** - * Push tokens onto the tokens array. This helper speeds up - * tokenizing by 1) helping us avoid backtracking as much as possible, - * and 2) helping us avoid creating extra tokens when consecutive - * characters are plain text. This improves performance and simplifies - * lookbehinds. - */ - - const push = tok => { - if (prev.type === 'globstar') { - const isBrace = state.braces > 0 && (tok.type === 'comma' || tok.type === 'brace'); - const isExtglob = tok.extglob === true || (extglobs.length && (tok.type === 'pipe' || tok.type === 'paren')); - - if (tok.type !== 'slash' && tok.type !== 'paren' && !isBrace && !isExtglob) { - state.output = state.output.slice(0, -prev.output.length); - prev.type = 'star'; - prev.value = '*'; - prev.output = star; - state.output += prev.output; - } - } - - if (extglobs.length && tok.type !== 'paren') { - extglobs[extglobs.length - 1].inner += tok.value; - } - - if (tok.value || tok.output) append(tok); - if (prev && prev.type === 'text' && tok.type === 'text') { - prev.value += tok.value; - prev.output = (prev.output || '') + tok.value; - return; - } - - tok.prev = prev; - tokens.push(tok); - prev = tok; - }; - - const extglobOpen = (type, value) => { - const token = { ...EXTGLOB_CHARS[value], conditions: 1, inner: '' }; - - token.prev = prev; - token.parens = state.parens; - token.output = state.output; - const output = (opts.capture ? '(' : '') + token.open; - - increment('parens'); - push({ type, value, output: state.output ? '' : ONE_CHAR }); - push({ type: 'paren', extglob: true, value: advance(), output }); - extglobs.push(token); - }; - - const extglobClose = token => { - let output = token.close + (opts.capture ? ')' : ''); - let rest; - - if (token.type === 'negate') { - let extglobStar = star; - - if (token.inner && token.inner.length > 1 && token.inner.includes('/')) { - extglobStar = globstar(opts); - } - - if (extglobStar !== star || eos() || /^\)+$/.test(remaining())) { - output = token.close = `)$))${extglobStar}`; - } - - if (token.inner.includes('*') && (rest = remaining()) && /^\.[^\\/.]+$/.test(rest)) { - // Any non-magical string (`.ts`) or even nested expression (`.{ts,tsx}`) can follow after the closing parenthesis. - // In this case, we need to parse the string and use it in the output of the original pattern. - // Suitable patterns: `/!(*.d).ts`, `/!(*.d).{ts,tsx}`, `**/!(*-dbg).@(js)`. - // - // Disabling the `fastpaths` option due to a problem with parsing strings as `.ts` in the pattern like `**/!(*.d).ts`. - const expression = parse(rest, { ...options, fastpaths: false }).output; - - output = token.close = `)${expression})${extglobStar})`; - } - - if (token.prev.type === 'bos') { - state.negatedExtglob = true; - } - } - - push({ type: 'paren', extglob: true, value, output }); - decrement('parens'); - }; - - /** - * Fast paths - */ - - if (opts.fastpaths !== false && !/(^[*!]|[/()[\]{}"])/.test(input)) { - let backslashes = false; - - let output = input.replace(REGEX_SPECIAL_CHARS_BACKREF, (m, esc, chars, first, rest, index) => { - if (first === '\\') { - backslashes = true; - return m; - } - - if (first === '?') { - if (esc) { - return esc + first + (rest ? QMARK.repeat(rest.length) : ''); - } - if (index === 0) { - return qmarkNoDot + (rest ? QMARK.repeat(rest.length) : ''); - } - return QMARK.repeat(chars.length); - } - - if (first === '.') { - return DOT_LITERAL.repeat(chars.length); - } - - if (first === '*') { - if (esc) { - return esc + first + (rest ? star : ''); - } - return star; - } - return esc ? m : `\\${m}`; - }); - - if (backslashes === true) { - if (opts.unescape === true) { - output = output.replace(/\\/g, ''); - } else { - output = output.replace(/\\+/g, m => { - return m.length % 2 === 0 ? '\\\\' : (m ? '\\' : ''); - }); - } - } - - if (output === input && opts.contains === true) { - state.output = input; - return state; - } - - state.output = utils.wrapOutput(output, state, options); - return state; - } - - /** - * Tokenize input until we reach end-of-string - */ - - while (!eos()) { - value = advance(); - - if (value === '\u0000') { - continue; - } - - /** - * Escaped characters - */ - - if (value === '\\') { - const next = peek(); - - if (next === '/' && opts.bash !== true) { - continue; - } - - if (next === '.' || next === ';') { - continue; - } - - if (!next) { - value += '\\'; - push({ type: 'text', value }); - continue; - } - - // collapse slashes to reduce potential for exploits - const match = /^\\+/.exec(remaining()); - let slashes = 0; - - if (match && match[0].length > 2) { - slashes = match[0].length; - state.index += slashes; - if (slashes % 2 !== 0) { - value += '\\'; - } - } - - if (opts.unescape === true) { - value = advance(); - } else { - value += advance(); - } - - if (state.brackets === 0) { - push({ type: 'text', value }); - continue; - } - } - - /** - * If we're inside a regex character class, continue - * until we reach the closing bracket. - */ - - if (state.brackets > 0 && (value !== ']' || prev.value === '[' || prev.value === '[^')) { - if (opts.posix !== false && value === ':') { - const inner = prev.value.slice(1); - if (inner.includes('[')) { - prev.posix = true; - - if (inner.includes(':')) { - const idx = prev.value.lastIndexOf('['); - const pre = prev.value.slice(0, idx); - const rest = prev.value.slice(idx + 2); - const posix = POSIX_REGEX_SOURCE[rest]; - if (posix) { - prev.value = pre + posix; - state.backtrack = true; - advance(); - - if (!bos.output && tokens.indexOf(prev) === 1) { - bos.output = ONE_CHAR; - } - continue; - } - } - } - } - - if ((value === '[' && peek() !== ':') || (value === '-' && peek() === ']')) { - value = `\\${value}`; - } - - if (value === ']' && (prev.value === '[' || prev.value === '[^')) { - value = `\\${value}`; - } - - if (opts.posix === true && value === '!' && prev.value === '[') { - value = '^'; - } - - prev.value += value; - append({ value }); - continue; - } - - /** - * If we're inside a quoted string, continue - * until we reach the closing double quote. - */ - - if (state.quotes === 1 && value !== '"') { - value = utils.escapeRegex(value); - prev.value += value; - append({ value }); - continue; - } - - /** - * Double quotes - */ - - if (value === '"') { - state.quotes = state.quotes === 1 ? 0 : 1; - if (opts.keepQuotes === true) { - push({ type: 'text', value }); - } - continue; - } - - /** - * Parentheses - */ - - if (value === '(') { - increment('parens'); - push({ type: 'paren', value }); - continue; - } - - if (value === ')') { - if (state.parens === 0 && opts.strictBrackets === true) { - throw new SyntaxError(syntaxError('opening', '(')); - } - - const extglob = extglobs[extglobs.length - 1]; - if (extglob && state.parens === extglob.parens + 1) { - extglobClose(extglobs.pop()); - continue; - } - - push({ type: 'paren', value, output: state.parens ? ')' : '\\)' }); - decrement('parens'); - continue; - } - - /** - * Square brackets - */ - - if (value === '[') { - if (opts.nobracket === true || !remaining().includes(']')) { - if (opts.nobracket !== true && opts.strictBrackets === true) { - throw new SyntaxError(syntaxError('closing', ']')); - } - - value = `\\${value}`; - } else { - increment('brackets'); - } - - push({ type: 'bracket', value }); - continue; - } - - if (value === ']') { - if (opts.nobracket === true || (prev && prev.type === 'bracket' && prev.value.length === 1)) { - push({ type: 'text', value, output: `\\${value}` }); - continue; - } - - if (state.brackets === 0) { - if (opts.strictBrackets === true) { - throw new SyntaxError(syntaxError('opening', '[')); - } - - push({ type: 'text', value, output: `\\${value}` }); - continue; - } - - decrement('brackets'); - - const prevValue = prev.value.slice(1); - if (prev.posix !== true && prevValue[0] === '^' && !prevValue.includes('/')) { - value = `/${value}`; - } - - prev.value += value; - append({ value }); - - // when literal brackets are explicitly disabled - // assume we should match with a regex character class - if (opts.literalBrackets === false || utils.hasRegexChars(prevValue)) { - continue; - } - - const escaped = utils.escapeRegex(prev.value); - state.output = state.output.slice(0, -prev.value.length); - - // when literal brackets are explicitly enabled - // assume we should escape the brackets to match literal characters - if (opts.literalBrackets === true) { - state.output += escaped; - prev.value = escaped; - continue; - } - - // when the user specifies nothing, try to match both - prev.value = `(${capture}${escaped}|${prev.value})`; - state.output += prev.value; - continue; - } - - /** - * Braces - */ - - if (value === '{' && opts.nobrace !== true) { - increment('braces'); - - const open = { - type: 'brace', - value, - output: '(', - outputIndex: state.output.length, - tokensIndex: state.tokens.length - }; - - braces.push(open); - push(open); - continue; - } - - if (value === '}') { - const brace = braces[braces.length - 1]; - - if (opts.nobrace === true || !brace) { - push({ type: 'text', value, output: value }); - continue; - } - - let output = ')'; - - if (brace.dots === true) { - const arr = tokens.slice(); - const range = []; - - for (let i = arr.length - 1; i >= 0; i--) { - tokens.pop(); - if (arr[i].type === 'brace') { - break; - } - if (arr[i].type !== 'dots') { - range.unshift(arr[i].value); - } - } - - output = expandRange(range, opts); - state.backtrack = true; - } - - if (brace.comma !== true && brace.dots !== true) { - const out = state.output.slice(0, brace.outputIndex); - const toks = state.tokens.slice(brace.tokensIndex); - brace.value = brace.output = '\\{'; - value = output = '\\}'; - state.output = out; - for (const t of toks) { - state.output += (t.output || t.value); - } - } - - push({ type: 'brace', value, output }); - decrement('braces'); - braces.pop(); - continue; - } - - /** - * Pipes - */ - - if (value === '|') { - if (extglobs.length > 0) { - extglobs[extglobs.length - 1].conditions++; - } - push({ type: 'text', value }); - continue; - } - - /** - * Commas - */ - - if (value === ',') { - let output = value; - - const brace = braces[braces.length - 1]; - if (brace && stack[stack.length - 1] === 'braces') { - brace.comma = true; - output = '|'; - } - - push({ type: 'comma', value, output }); - continue; - } - - /** - * Slashes - */ - - if (value === '/') { - // if the beginning of the glob is "./", advance the start - // to the current index, and don't add the "./" characters - // to the state. This greatly simplifies lookbehinds when - // checking for BOS characters like "!" and "." (not "./") - if (prev.type === 'dot' && state.index === state.start + 1) { - state.start = state.index + 1; - state.consumed = ''; - state.output = ''; - tokens.pop(); - prev = bos; // reset "prev" to the first token - continue; - } - - push({ type: 'slash', value, output: SLASH_LITERAL }); - continue; - } - - /** - * Dots - */ - - if (value === '.') { - if (state.braces > 0 && prev.type === 'dot') { - if (prev.value === '.') prev.output = DOT_LITERAL; - const brace = braces[braces.length - 1]; - prev.type = 'dots'; - prev.output += value; - prev.value += value; - brace.dots = true; - continue; - } - - if ((state.braces + state.parens) === 0 && prev.type !== 'bos' && prev.type !== 'slash') { - push({ type: 'text', value, output: DOT_LITERAL }); - continue; - } - - push({ type: 'dot', value, output: DOT_LITERAL }); - continue; - } - - /** - * Question marks - */ - - if (value === '?') { - const isGroup = prev && prev.value === '('; - if (!isGroup && opts.noextglob !== true && peek() === '(' && peek(2) !== '?') { - extglobOpen('qmark', value); - continue; - } - - if (prev && prev.type === 'paren') { - const next = peek(); - let output = value; - - if (next === '<' && !utils.supportsLookbehinds()) { - throw new Error('Node.js v10 or higher is required for regex lookbehinds'); - } - - if ((prev.value === '(' && !/[!=<:]/.test(next)) || (next === '<' && !/<([!=]|\w+>)/.test(remaining()))) { - output = `\\${value}`; - } - - push({ type: 'text', value, output }); - continue; - } - - if (opts.dot !== true && (prev.type === 'slash' || prev.type === 'bos')) { - push({ type: 'qmark', value, output: QMARK_NO_DOT }); - continue; - } - - push({ type: 'qmark', value, output: QMARK }); - continue; - } - - /** - * Exclamation - */ - - if (value === '!') { - if (opts.noextglob !== true && peek() === '(') { - if (peek(2) !== '?' || !/[!=<:]/.test(peek(3))) { - extglobOpen('negate', value); - continue; - } - } - - if (opts.nonegate !== true && state.index === 0) { - negate(); - continue; - } - } - - /** - * Plus - */ - - if (value === '+') { - if (opts.noextglob !== true && peek() === '(' && peek(2) !== '?') { - extglobOpen('plus', value); - continue; - } - - if ((prev && prev.value === '(') || opts.regex === false) { - push({ type: 'plus', value, output: PLUS_LITERAL }); - continue; - } - - if ((prev && (prev.type === 'bracket' || prev.type === 'paren' || prev.type === 'brace')) || state.parens > 0) { - push({ type: 'plus', value }); - continue; - } - - push({ type: 'plus', value: PLUS_LITERAL }); - continue; - } - - /** - * Plain text - */ - - if (value === '@') { - if (opts.noextglob !== true && peek() === '(' && peek(2) !== '?') { - push({ type: 'at', extglob: true, value, output: '' }); - continue; - } - - push({ type: 'text', value }); - continue; - } - - /** - * Plain text - */ - - if (value !== '*') { - if (value === '$' || value === '^') { - value = `\\${value}`; - } - - const match = REGEX_NON_SPECIAL_CHARS.exec(remaining()); - if (match) { - value += match[0]; - state.index += match[0].length; - } - - push({ type: 'text', value }); - continue; - } - - /** - * Stars - */ - - if (prev && (prev.type === 'globstar' || prev.star === true)) { - prev.type = 'star'; - prev.star = true; - prev.value += value; - prev.output = star; - state.backtrack = true; - state.globstar = true; - consume(value); - continue; - } - - let rest = remaining(); - if (opts.noextglob !== true && /^\([^?]/.test(rest)) { - extglobOpen('star', value); - continue; - } - - if (prev.type === 'star') { - if (opts.noglobstar === true) { - consume(value); - continue; - } - - const prior = prev.prev; - const before = prior.prev; - const isStart = prior.type === 'slash' || prior.type === 'bos'; - const afterStar = before && (before.type === 'star' || before.type === 'globstar'); - - if (opts.bash === true && (!isStart || (rest[0] && rest[0] !== '/'))) { - push({ type: 'star', value, output: '' }); - continue; - } - - const isBrace = state.braces > 0 && (prior.type === 'comma' || prior.type === 'brace'); - const isExtglob = extglobs.length && (prior.type === 'pipe' || prior.type === 'paren'); - if (!isStart && prior.type !== 'paren' && !isBrace && !isExtglob) { - push({ type: 'star', value, output: '' }); - continue; - } - - // strip consecutive `/**/` - while (rest.slice(0, 3) === '/**') { - const after = input[state.index + 4]; - if (after && after !== '/') { - break; - } - rest = rest.slice(3); - consume('/**', 3); - } - - if (prior.type === 'bos' && eos()) { - prev.type = 'globstar'; - prev.value += value; - prev.output = globstar(opts); - state.output = prev.output; - state.globstar = true; - consume(value); - continue; - } - - if (prior.type === 'slash' && prior.prev.type !== 'bos' && !afterStar && eos()) { - state.output = state.output.slice(0, -(prior.output + prev.output).length); - prior.output = `(?:${prior.output}`; - - prev.type = 'globstar'; - prev.output = globstar(opts) + (opts.strictSlashes ? ')' : '|$)'); - prev.value += value; - state.globstar = true; - state.output += prior.output + prev.output; - consume(value); - continue; - } - - if (prior.type === 'slash' && prior.prev.type !== 'bos' && rest[0] === '/') { - const end = rest[1] !== void 0 ? '|$' : ''; - - state.output = state.output.slice(0, -(prior.output + prev.output).length); - prior.output = `(?:${prior.output}`; - - prev.type = 'globstar'; - prev.output = `${globstar(opts)}${SLASH_LITERAL}|${SLASH_LITERAL}${end})`; - prev.value += value; - - state.output += prior.output + prev.output; - state.globstar = true; - - consume(value + advance()); - - push({ type: 'slash', value: '/', output: '' }); - continue; - } - - if (prior.type === 'bos' && rest[0] === '/') { - prev.type = 'globstar'; - prev.value += value; - prev.output = `(?:^|${SLASH_LITERAL}|${globstar(opts)}${SLASH_LITERAL})`; - state.output = prev.output; - state.globstar = true; - consume(value + advance()); - push({ type: 'slash', value: '/', output: '' }); - continue; - } - - // remove single star from output - state.output = state.output.slice(0, -prev.output.length); - - // reset previous token to globstar - prev.type = 'globstar'; - prev.output = globstar(opts); - prev.value += value; - - // reset output with globstar - state.output += prev.output; - state.globstar = true; - consume(value); - continue; - } - - const token = { type: 'star', value, output: star }; - - if (opts.bash === true) { - token.output = '.*?'; - if (prev.type === 'bos' || prev.type === 'slash') { - token.output = nodot + token.output; - } - push(token); - continue; - } - - if (prev && (prev.type === 'bracket' || prev.type === 'paren') && opts.regex === true) { - token.output = value; - push(token); - continue; - } - - if (state.index === state.start || prev.type === 'slash' || prev.type === 'dot') { - if (prev.type === 'dot') { - state.output += NO_DOT_SLASH; - prev.output += NO_DOT_SLASH; - - } else if (opts.dot === true) { - state.output += NO_DOTS_SLASH; - prev.output += NO_DOTS_SLASH; - - } else { - state.output += nodot; - prev.output += nodot; - } - - if (peek() !== '*') { - state.output += ONE_CHAR; - prev.output += ONE_CHAR; - } - } - - push(token); - } - - while (state.brackets > 0) { - if (opts.strictBrackets === true) throw new SyntaxError(syntaxError('closing', ']')); - state.output = utils.escapeLast(state.output, '['); - decrement('brackets'); - } - - while (state.parens > 0) { - if (opts.strictBrackets === true) throw new SyntaxError(syntaxError('closing', ')')); - state.output = utils.escapeLast(state.output, '('); - decrement('parens'); - } - - while (state.braces > 0) { - if (opts.strictBrackets === true) throw new SyntaxError(syntaxError('closing', '}')); - state.output = utils.escapeLast(state.output, '{'); - decrement('braces'); - } - - if (opts.strictSlashes !== true && (prev.type === 'star' || prev.type === 'bracket')) { - push({ type: 'maybe_slash', value: '', output: `${SLASH_LITERAL}?` }); - } - - // rebuild the output if we had to backtrack at any point - if (state.backtrack === true) { - state.output = ''; - - for (const token of state.tokens) { - state.output += token.output != null ? token.output : token.value; - - if (token.suffix) { - state.output += token.suffix; - } - } - } - - return state; -}; - -/** - * Fast paths for creating regular expressions for common glob patterns. - * This can significantly speed up processing and has very little downside - * impact when none of the fast paths match. - */ - -parse.fastpaths = (input, options) => { - const opts = { ...options }; - const max = typeof opts.maxLength === 'number' ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH; - const len = input.length; - if (len > max) { - throw new SyntaxError(`Input length: ${len}, exceeds maximum allowed length: ${max}`); - } - - input = REPLACEMENTS[input] || input; - const win32 = utils.isWindows(options); - - // create constants based on platform, for windows or posix - const { - DOT_LITERAL, - SLASH_LITERAL, - ONE_CHAR, - DOTS_SLASH, - NO_DOT, - NO_DOTS, - NO_DOTS_SLASH, - STAR, - START_ANCHOR - } = constants.globChars(win32); - - const nodot = opts.dot ? NO_DOTS : NO_DOT; - const slashDot = opts.dot ? NO_DOTS_SLASH : NO_DOT; - const capture = opts.capture ? '' : '?:'; - const state = { negated: false, prefix: '' }; - let star = opts.bash === true ? '.*?' : STAR; - - if (opts.capture) { - star = `(${star})`; - } - - const globstar = opts => { - if (opts.noglobstar === true) return star; - return `(${capture}(?:(?!${START_ANCHOR}${opts.dot ? DOTS_SLASH : DOT_LITERAL}).)*?)`; - }; - - const create = str => { - switch (str) { - case '*': - return `${nodot}${ONE_CHAR}${star}`; - - case '.*': - return `${DOT_LITERAL}${ONE_CHAR}${star}`; - - case '*.*': - return `${nodot}${star}${DOT_LITERAL}${ONE_CHAR}${star}`; - - case '*/*': - return `${nodot}${star}${SLASH_LITERAL}${ONE_CHAR}${slashDot}${star}`; - - case '**': - return nodot + globstar(opts); - - case '**/*': - return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${slashDot}${ONE_CHAR}${star}`; - - case '**/*.*': - return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${slashDot}${star}${DOT_LITERAL}${ONE_CHAR}${star}`; - - case '**/.*': - return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${DOT_LITERAL}${ONE_CHAR}${star}`; - - default: { - const match = /^(.*?)\.(\w+)$/.exec(str); - if (!match) return; - - const source = create(match[1]); - if (!source) return; - - return source + DOT_LITERAL + match[2]; - } - } - }; - - const output = utils.removePrefix(input, state); - let source = create(output); - - if (source && opts.strictSlashes !== true) { - source += `${SLASH_LITERAL}?`; - } - - return source; -}; - -module.exports = parse; diff --git a/node_modules/picomatch/lib/picomatch.js b/node_modules/picomatch/lib/picomatch.js deleted file mode 100644 index 782d809..0000000 --- a/node_modules/picomatch/lib/picomatch.js +++ /dev/null @@ -1,342 +0,0 @@ -'use strict'; - -const path = require('path'); -const scan = require('./scan'); -const parse = require('./parse'); -const utils = require('./utils'); -const constants = require('./constants'); -const isObject = val => val && typeof val === 'object' && !Array.isArray(val); - -/** - * Creates a matcher function from one or more glob patterns. The - * returned function takes a string to match as its first argument, - * and returns true if the string is a match. The returned matcher - * function also takes a boolean as the second argument that, when true, - * returns an object with additional information. - * - * ```js - * const picomatch = require('picomatch'); - * // picomatch(glob[, options]); - * - * const isMatch = picomatch('*.!(*a)'); - * console.log(isMatch('a.a')); //=> false - * console.log(isMatch('a.b')); //=> true - * ``` - * @name picomatch - * @param {String|Array} `globs` One or more glob patterns. - * @param {Object=} `options` - * @return {Function=} Returns a matcher function. - * @api public - */ - -const picomatch = (glob, options, returnState = false) => { - if (Array.isArray(glob)) { - const fns = glob.map(input => picomatch(input, options, returnState)); - const arrayMatcher = str => { - for (const isMatch of fns) { - const state = isMatch(str); - if (state) return state; - } - return false; - }; - return arrayMatcher; - } - - const isState = isObject(glob) && glob.tokens && glob.input; - - if (glob === '' || (typeof glob !== 'string' && !isState)) { - throw new TypeError('Expected pattern to be a non-empty string'); - } - - const opts = options || {}; - const posix = utils.isWindows(options); - const regex = isState - ? picomatch.compileRe(glob, options) - : picomatch.makeRe(glob, options, false, true); - - const state = regex.state; - delete regex.state; - - let isIgnored = () => false; - if (opts.ignore) { - const ignoreOpts = { ...options, ignore: null, onMatch: null, onResult: null }; - isIgnored = picomatch(opts.ignore, ignoreOpts, returnState); - } - - const matcher = (input, returnObject = false) => { - const { isMatch, match, output } = picomatch.test(input, regex, options, { glob, posix }); - const result = { glob, state, regex, posix, input, output, match, isMatch }; - - if (typeof opts.onResult === 'function') { - opts.onResult(result); - } - - if (isMatch === false) { - result.isMatch = false; - return returnObject ? result : false; - } - - if (isIgnored(input)) { - if (typeof opts.onIgnore === 'function') { - opts.onIgnore(result); - } - result.isMatch = false; - return returnObject ? result : false; - } - - if (typeof opts.onMatch === 'function') { - opts.onMatch(result); - } - return returnObject ? result : true; - }; - - if (returnState) { - matcher.state = state; - } - - return matcher; -}; - -/** - * Test `input` with the given `regex`. This is used by the main - * `picomatch()` function to test the input string. - * - * ```js - * const picomatch = require('picomatch'); - * // picomatch.test(input, regex[, options]); - * - * console.log(picomatch.test('foo/bar', /^(?:([^/]*?)\/([^/]*?))$/)); - * // { isMatch: true, match: [ 'foo/', 'foo', 'bar' ], output: 'foo/bar' } - * ``` - * @param {String} `input` String to test. - * @param {RegExp} `regex` - * @return {Object} Returns an object with matching info. - * @api public - */ - -picomatch.test = (input, regex, options, { glob, posix } = {}) => { - if (typeof input !== 'string') { - throw new TypeError('Expected input to be a string'); - } - - if (input === '') { - return { isMatch: false, output: '' }; - } - - const opts = options || {}; - const format = opts.format || (posix ? utils.toPosixSlashes : null); - let match = input === glob; - let output = (match && format) ? format(input) : input; - - if (match === false) { - output = format ? format(input) : input; - match = output === glob; - } - - if (match === false || opts.capture === true) { - if (opts.matchBase === true || opts.basename === true) { - match = picomatch.matchBase(input, regex, options, posix); - } else { - match = regex.exec(output); - } - } - - return { isMatch: Boolean(match), match, output }; -}; - -/** - * Match the basename of a filepath. - * - * ```js - * const picomatch = require('picomatch'); - * // picomatch.matchBase(input, glob[, options]); - * console.log(picomatch.matchBase('foo/bar.js', '*.js'); // true - * ``` - * @param {String} `input` String to test. - * @param {RegExp|String} `glob` Glob pattern or regex created by [.makeRe](#makeRe). - * @return {Boolean} - * @api public - */ - -picomatch.matchBase = (input, glob, options, posix = utils.isWindows(options)) => { - const regex = glob instanceof RegExp ? glob : picomatch.makeRe(glob, options); - return regex.test(path.basename(input)); -}; - -/** - * Returns true if **any** of the given glob `patterns` match the specified `string`. - * - * ```js - * const picomatch = require('picomatch'); - * // picomatch.isMatch(string, patterns[, options]); - * - * console.log(picomatch.isMatch('a.a', ['b.*', '*.a'])); //=> true - * console.log(picomatch.isMatch('a.a', 'b.*')); //=> false - * ``` - * @param {String|Array} str The string to test. - * @param {String|Array} patterns One or more glob patterns to use for matching. - * @param {Object} [options] See available [options](#options). - * @return {Boolean} Returns true if any patterns match `str` - * @api public - */ - -picomatch.isMatch = (str, patterns, options) => picomatch(patterns, options)(str); - -/** - * Parse a glob pattern to create the source string for a regular - * expression. - * - * ```js - * const picomatch = require('picomatch'); - * const result = picomatch.parse(pattern[, options]); - * ``` - * @param {String} `pattern` - * @param {Object} `options` - * @return {Object} Returns an object with useful properties and output to be used as a regex source string. - * @api public - */ - -picomatch.parse = (pattern, options) => { - if (Array.isArray(pattern)) return pattern.map(p => picomatch.parse(p, options)); - return parse(pattern, { ...options, fastpaths: false }); -}; - -/** - * Scan a glob pattern to separate the pattern into segments. - * - * ```js - * const picomatch = require('picomatch'); - * // picomatch.scan(input[, options]); - * - * const result = picomatch.scan('!./foo/*.js'); - * console.log(result); - * { prefix: '!./', - * input: '!./foo/*.js', - * start: 3, - * base: 'foo', - * glob: '*.js', - * isBrace: false, - * isBracket: false, - * isGlob: true, - * isExtglob: false, - * isGlobstar: false, - * negated: true } - * ``` - * @param {String} `input` Glob pattern to scan. - * @param {Object} `options` - * @return {Object} Returns an object with - * @api public - */ - -picomatch.scan = (input, options) => scan(input, options); - -/** - * Compile a regular expression from the `state` object returned by the - * [parse()](#parse) method. - * - * @param {Object} `state` - * @param {Object} `options` - * @param {Boolean} `returnOutput` Intended for implementors, this argument allows you to return the raw output from the parser. - * @param {Boolean} `returnState` Adds the state to a `state` property on the returned regex. Useful for implementors and debugging. - * @return {RegExp} - * @api public - */ - -picomatch.compileRe = (state, options, returnOutput = false, returnState = false) => { - if (returnOutput === true) { - return state.output; - } - - const opts = options || {}; - const prepend = opts.contains ? '' : '^'; - const append = opts.contains ? '' : '$'; - - let source = `${prepend}(?:${state.output})${append}`; - if (state && state.negated === true) { - source = `^(?!${source}).*$`; - } - - const regex = picomatch.toRegex(source, options); - if (returnState === true) { - regex.state = state; - } - - return regex; -}; - -/** - * Create a regular expression from a parsed glob pattern. - * - * ```js - * const picomatch = require('picomatch'); - * const state = picomatch.parse('*.js'); - * // picomatch.compileRe(state[, options]); - * - * console.log(picomatch.compileRe(state)); - * //=> /^(?:(?!\.)(?=.)[^/]*?\.js)$/ - * ``` - * @param {String} `state` The object returned from the `.parse` method. - * @param {Object} `options` - * @param {Boolean} `returnOutput` Implementors may use this argument to return the compiled output, instead of a regular expression. This is not exposed on the options to prevent end-users from mutating the result. - * @param {Boolean} `returnState` Implementors may use this argument to return the state from the parsed glob with the returned regular expression. - * @return {RegExp} Returns a regex created from the given pattern. - * @api public - */ - -picomatch.makeRe = (input, options = {}, returnOutput = false, returnState = false) => { - if (!input || typeof input !== 'string') { - throw new TypeError('Expected a non-empty string'); - } - - let parsed = { negated: false, fastpaths: true }; - - if (options.fastpaths !== false && (input[0] === '.' || input[0] === '*')) { - parsed.output = parse.fastpaths(input, options); - } - - if (!parsed.output) { - parsed = parse(input, options); - } - - return picomatch.compileRe(parsed, options, returnOutput, returnState); -}; - -/** - * Create a regular expression from the given regex source string. - * - * ```js - * const picomatch = require('picomatch'); - * // picomatch.toRegex(source[, options]); - * - * const { output } = picomatch.parse('*.js'); - * console.log(picomatch.toRegex(output)); - * //=> /^(?:(?!\.)(?=.)[^/]*?\.js)$/ - * ``` - * @param {String} `source` Regular expression source string. - * @param {Object} `options` - * @return {RegExp} - * @api public - */ - -picomatch.toRegex = (source, options) => { - try { - const opts = options || {}; - return new RegExp(source, opts.flags || (opts.nocase ? 'i' : '')); - } catch (err) { - if (options && options.debug === true) throw err; - return /$^/; - } -}; - -/** - * Picomatch constants. - * @return {Object} - */ - -picomatch.constants = constants; - -/** - * Expose "picomatch" - */ - -module.exports = picomatch; diff --git a/node_modules/picomatch/lib/scan.js b/node_modules/picomatch/lib/scan.js deleted file mode 100644 index e59cd7a..0000000 --- a/node_modules/picomatch/lib/scan.js +++ /dev/null @@ -1,391 +0,0 @@ -'use strict'; - -const utils = require('./utils'); -const { - CHAR_ASTERISK, /* * */ - CHAR_AT, /* @ */ - CHAR_BACKWARD_SLASH, /* \ */ - CHAR_COMMA, /* , */ - CHAR_DOT, /* . */ - CHAR_EXCLAMATION_MARK, /* ! */ - CHAR_FORWARD_SLASH, /* / */ - CHAR_LEFT_CURLY_BRACE, /* { */ - CHAR_LEFT_PARENTHESES, /* ( */ - CHAR_LEFT_SQUARE_BRACKET, /* [ */ - CHAR_PLUS, /* + */ - CHAR_QUESTION_MARK, /* ? */ - CHAR_RIGHT_CURLY_BRACE, /* } */ - CHAR_RIGHT_PARENTHESES, /* ) */ - CHAR_RIGHT_SQUARE_BRACKET /* ] */ -} = require('./constants'); - -const isPathSeparator = code => { - return code === CHAR_FORWARD_SLASH || code === CHAR_BACKWARD_SLASH; -}; - -const depth = token => { - if (token.isPrefix !== true) { - token.depth = token.isGlobstar ? Infinity : 1; - } -}; - -/** - * Quickly scans a glob pattern and returns an object with a handful of - * useful properties, like `isGlob`, `path` (the leading non-glob, if it exists), - * `glob` (the actual pattern), `negated` (true if the path starts with `!` but not - * with `!(`) and `negatedExtglob` (true if the path starts with `!(`). - * - * ```js - * const pm = require('picomatch'); - * console.log(pm.scan('foo/bar/*.js')); - * { isGlob: true, input: 'foo/bar/*.js', base: 'foo/bar', glob: '*.js' } - * ``` - * @param {String} `str` - * @param {Object} `options` - * @return {Object} Returns an object with tokens and regex source string. - * @api public - */ - -const scan = (input, options) => { - const opts = options || {}; - - const length = input.length - 1; - const scanToEnd = opts.parts === true || opts.scanToEnd === true; - const slashes = []; - const tokens = []; - const parts = []; - - let str = input; - let index = -1; - let start = 0; - let lastIndex = 0; - let isBrace = false; - let isBracket = false; - let isGlob = false; - let isExtglob = false; - let isGlobstar = false; - let braceEscaped = false; - let backslashes = false; - let negated = false; - let negatedExtglob = false; - let finished = false; - let braces = 0; - let prev; - let code; - let token = { value: '', depth: 0, isGlob: false }; - - const eos = () => index >= length; - const peek = () => str.charCodeAt(index + 1); - const advance = () => { - prev = code; - return str.charCodeAt(++index); - }; - - while (index < length) { - code = advance(); - let next; - - if (code === CHAR_BACKWARD_SLASH) { - backslashes = token.backslashes = true; - code = advance(); - - if (code === CHAR_LEFT_CURLY_BRACE) { - braceEscaped = true; - } - continue; - } - - if (braceEscaped === true || code === CHAR_LEFT_CURLY_BRACE) { - braces++; - - while (eos() !== true && (code = advance())) { - if (code === CHAR_BACKWARD_SLASH) { - backslashes = token.backslashes = true; - advance(); - continue; - } - - if (code === CHAR_LEFT_CURLY_BRACE) { - braces++; - continue; - } - - if (braceEscaped !== true && code === CHAR_DOT && (code = advance()) === CHAR_DOT) { - isBrace = token.isBrace = true; - isGlob = token.isGlob = true; - finished = true; - - if (scanToEnd === true) { - continue; - } - - break; - } - - if (braceEscaped !== true && code === CHAR_COMMA) { - isBrace = token.isBrace = true; - isGlob = token.isGlob = true; - finished = true; - - if (scanToEnd === true) { - continue; - } - - break; - } - - if (code === CHAR_RIGHT_CURLY_BRACE) { - braces--; - - if (braces === 0) { - braceEscaped = false; - isBrace = token.isBrace = true; - finished = true; - break; - } - } - } - - if (scanToEnd === true) { - continue; - } - - break; - } - - if (code === CHAR_FORWARD_SLASH) { - slashes.push(index); - tokens.push(token); - token = { value: '', depth: 0, isGlob: false }; - - if (finished === true) continue; - if (prev === CHAR_DOT && index === (start + 1)) { - start += 2; - continue; - } - - lastIndex = index + 1; - continue; - } - - if (opts.noext !== true) { - const isExtglobChar = code === CHAR_PLUS - || code === CHAR_AT - || code === CHAR_ASTERISK - || code === CHAR_QUESTION_MARK - || code === CHAR_EXCLAMATION_MARK; - - if (isExtglobChar === true && peek() === CHAR_LEFT_PARENTHESES) { - isGlob = token.isGlob = true; - isExtglob = token.isExtglob = true; - finished = true; - if (code === CHAR_EXCLAMATION_MARK && index === start) { - negatedExtglob = true; - } - - if (scanToEnd === true) { - while (eos() !== true && (code = advance())) { - if (code === CHAR_BACKWARD_SLASH) { - backslashes = token.backslashes = true; - code = advance(); - continue; - } - - if (code === CHAR_RIGHT_PARENTHESES) { - isGlob = token.isGlob = true; - finished = true; - break; - } - } - continue; - } - break; - } - } - - if (code === CHAR_ASTERISK) { - if (prev === CHAR_ASTERISK) isGlobstar = token.isGlobstar = true; - isGlob = token.isGlob = true; - finished = true; - - if (scanToEnd === true) { - continue; - } - break; - } - - if (code === CHAR_QUESTION_MARK) { - isGlob = token.isGlob = true; - finished = true; - - if (scanToEnd === true) { - continue; - } - break; - } - - if (code === CHAR_LEFT_SQUARE_BRACKET) { - while (eos() !== true && (next = advance())) { - if (next === CHAR_BACKWARD_SLASH) { - backslashes = token.backslashes = true; - advance(); - continue; - } - - if (next === CHAR_RIGHT_SQUARE_BRACKET) { - isBracket = token.isBracket = true; - isGlob = token.isGlob = true; - finished = true; - break; - } - } - - if (scanToEnd === true) { - continue; - } - - break; - } - - if (opts.nonegate !== true && code === CHAR_EXCLAMATION_MARK && index === start) { - negated = token.negated = true; - start++; - continue; - } - - if (opts.noparen !== true && code === CHAR_LEFT_PARENTHESES) { - isGlob = token.isGlob = true; - - if (scanToEnd === true) { - while (eos() !== true && (code = advance())) { - if (code === CHAR_LEFT_PARENTHESES) { - backslashes = token.backslashes = true; - code = advance(); - continue; - } - - if (code === CHAR_RIGHT_PARENTHESES) { - finished = true; - break; - } - } - continue; - } - break; - } - - if (isGlob === true) { - finished = true; - - if (scanToEnd === true) { - continue; - } - - break; - } - } - - if (opts.noext === true) { - isExtglob = false; - isGlob = false; - } - - let base = str; - let prefix = ''; - let glob = ''; - - if (start > 0) { - prefix = str.slice(0, start); - str = str.slice(start); - lastIndex -= start; - } - - if (base && isGlob === true && lastIndex > 0) { - base = str.slice(0, lastIndex); - glob = str.slice(lastIndex); - } else if (isGlob === true) { - base = ''; - glob = str; - } else { - base = str; - } - - if (base && base !== '' && base !== '/' && base !== str) { - if (isPathSeparator(base.charCodeAt(base.length - 1))) { - base = base.slice(0, -1); - } - } - - if (opts.unescape === true) { - if (glob) glob = utils.removeBackslashes(glob); - - if (base && backslashes === true) { - base = utils.removeBackslashes(base); - } - } - - const state = { - prefix, - input, - start, - base, - glob, - isBrace, - isBracket, - isGlob, - isExtglob, - isGlobstar, - negated, - negatedExtglob - }; - - if (opts.tokens === true) { - state.maxDepth = 0; - if (!isPathSeparator(code)) { - tokens.push(token); - } - state.tokens = tokens; - } - - if (opts.parts === true || opts.tokens === true) { - let prevIndex; - - for (let idx = 0; idx < slashes.length; idx++) { - const n = prevIndex ? prevIndex + 1 : start; - const i = slashes[idx]; - const value = input.slice(n, i); - if (opts.tokens) { - if (idx === 0 && start !== 0) { - tokens[idx].isPrefix = true; - tokens[idx].value = prefix; - } else { - tokens[idx].value = value; - } - depth(tokens[idx]); - state.maxDepth += tokens[idx].depth; - } - if (idx !== 0 || value !== '') { - parts.push(value); - } - prevIndex = i; - } - - if (prevIndex && prevIndex + 1 < input.length) { - const value = input.slice(prevIndex + 1); - parts.push(value); - - if (opts.tokens) { - tokens[tokens.length - 1].value = value; - depth(tokens[tokens.length - 1]); - state.maxDepth += tokens[tokens.length - 1].depth; - } - } - - state.slashes = slashes; - state.parts = parts; - } - - return state; -}; - -module.exports = scan; diff --git a/node_modules/picomatch/lib/utils.js b/node_modules/picomatch/lib/utils.js deleted file mode 100644 index c3ca766..0000000 --- a/node_modules/picomatch/lib/utils.js +++ /dev/null @@ -1,64 +0,0 @@ -'use strict'; - -const path = require('path'); -const win32 = process.platform === 'win32'; -const { - REGEX_BACKSLASH, - REGEX_REMOVE_BACKSLASH, - REGEX_SPECIAL_CHARS, - REGEX_SPECIAL_CHARS_GLOBAL -} = require('./constants'); - -exports.isObject = val => val !== null && typeof val === 'object' && !Array.isArray(val); -exports.hasRegexChars = str => REGEX_SPECIAL_CHARS.test(str); -exports.isRegexChar = str => str.length === 1 && exports.hasRegexChars(str); -exports.escapeRegex = str => str.replace(REGEX_SPECIAL_CHARS_GLOBAL, '\\$1'); -exports.toPosixSlashes = str => str.replace(REGEX_BACKSLASH, '/'); - -exports.removeBackslashes = str => { - return str.replace(REGEX_REMOVE_BACKSLASH, match => { - return match === '\\' ? '' : match; - }); -}; - -exports.supportsLookbehinds = () => { - const segs = process.version.slice(1).split('.').map(Number); - if (segs.length === 3 && segs[0] >= 9 || (segs[0] === 8 && segs[1] >= 10)) { - return true; - } - return false; -}; - -exports.isWindows = options => { - if (options && typeof options.windows === 'boolean') { - return options.windows; - } - return win32 === true || path.sep === '\\'; -}; - -exports.escapeLast = (input, char, lastIdx) => { - const idx = input.lastIndexOf(char, lastIdx); - if (idx === -1) return input; - if (input[idx - 1] === '\\') return exports.escapeLast(input, char, idx - 1); - return `${input.slice(0, idx)}\\${input.slice(idx)}`; -}; - -exports.removePrefix = (input, state = {}) => { - let output = input; - if (output.startsWith('./')) { - output = output.slice(2); - state.prefix = './'; - } - return output; -}; - -exports.wrapOutput = (input, state = {}, options = {}) => { - const prepend = options.contains ? '' : '^'; - const append = options.contains ? '' : '$'; - - let output = `${prepend}(?:${input})${append}`; - if (state.negated === true) { - output = `(?:^(?!${output}).*$)`; - } - return output; -}; diff --git a/node_modules/picomatch/package.json b/node_modules/picomatch/package.json deleted file mode 100644 index 3db22d4..0000000 --- a/node_modules/picomatch/package.json +++ /dev/null @@ -1,81 +0,0 @@ -{ - "name": "picomatch", - "description": "Blazing fast and accurate glob matcher written in JavaScript, with no dependencies and full support for standard and extended Bash glob features, including braces, extglobs, POSIX brackets, and regular expressions.", - "version": "2.3.1", - "homepage": "https://github.com/micromatch/picomatch", - "author": "Jon Schlinkert (https://github.com/jonschlinkert)", - "funding": "https://github.com/sponsors/jonschlinkert", - "repository": "micromatch/picomatch", - "bugs": { - "url": "https://github.com/micromatch/picomatch/issues" - }, - "license": "MIT", - "files": [ - "index.js", - "lib" - ], - "main": "index.js", - "engines": { - "node": ">=8.6" - }, - "scripts": { - "lint": "eslint --cache --cache-location node_modules/.cache/.eslintcache --report-unused-disable-directives --ignore-path .gitignore .", - "mocha": "mocha --reporter dot", - "test": "npm run lint && npm run mocha", - "test:ci": "npm run test:cover", - "test:cover": "nyc npm run mocha" - }, - "devDependencies": { - "eslint": "^6.8.0", - "fill-range": "^7.0.1", - "gulp-format-md": "^2.0.0", - "mocha": "^6.2.2", - "nyc": "^15.0.0", - "time-require": "github:jonschlinkert/time-require" - }, - "keywords": [ - "glob", - "match", - "picomatch" - ], - "nyc": { - "reporter": [ - "html", - "lcov", - "text-summary" - ] - }, - "verb": { - "toc": { - "render": true, - "method": "preWrite", - "maxdepth": 3 - }, - "layout": "empty", - "tasks": [ - "readme" - ], - "plugins": [ - "gulp-format-md" - ], - "lint": { - "reflinks": true - }, - "related": { - "list": [ - "braces", - "micromatch" - ] - }, - "reflinks": [ - "braces", - "expand-brackets", - "extglob", - "fill-range", - "micromatch", - "minimatch", - "nanomatch", - "picomatch" - ] - } -} diff --git a/node_modules/pstree.remy/lib/index.js b/node_modules/pstree.remy/lib/index.js deleted file mode 100644 index 743e997..0000000 --- a/node_modules/pstree.remy/lib/index.js +++ /dev/null @@ -1,37 +0,0 @@ -const exec = require('child_process').exec; -const tree = require('./tree'); -const utils = require('./utils'); -var hasPS = true; - -// discover if the OS has `ps`, and therefore can use psTree -exec('ps', (error) => { - module.exports.hasPS = hasPS = !error; -}); - -module.exports = function main(pid, callback) { - if (typeof pid === 'number') { - pid = pid.toString(); - } - - if (hasPS && !process.env.NO_PS) { - return tree(pid, callback); - } - - utils - .getStat() - .then(utils.tree) - .then((tree) => utils.pidsForTree(tree, pid)) - .then((res) => - callback( - null, - res.map((p) => p.PID) - ) - ) - .catch((error) => callback(error)); -}; - -if (!module.parent) { - module.exports(process.argv[2], (e, pids) => console.log(pids)); -} - -module.exports.hasPS = hasPS; diff --git a/node_modules/pstree.remy/lib/tree.js b/node_modules/pstree.remy/lib/tree.js deleted file mode 100644 index bac7cce..0000000 --- a/node_modules/pstree.remy/lib/tree.js +++ /dev/null @@ -1,37 +0,0 @@ -const spawn = require('child_process').spawn; - -module.exports = function (rootPid, callback) { - const pidsOfInterest = new Set([parseInt(rootPid, 10)]); - var output = ''; - - // *nix - const ps = spawn('ps', ['-A', '-o', 'ppid,pid']); - ps.stdout.on('data', (data) => { - output += data.toString('ascii'); - }); - - ps.on('close', () => { - try { - const res = output - .split('\n') - .slice(1) - .map((_) => _.trim()) - .reduce((acc, line) => { - const pids = line.split(/\s+/); - const ppid = parseInt(pids[0], 10); - - if (pidsOfInterest.has(ppid)) { - const pid = parseInt(pids[1], 10); - acc.push(pid); - pidsOfInterest.add(pid); - } - - return acc; - }, []); - - callback(null, res); - } catch (e) { - callback(e, null); - } - }); -}; diff --git a/node_modules/pstree.remy/lib/utils.js b/node_modules/pstree.remy/lib/utils.js deleted file mode 100644 index 8fa5719..0000000 --- a/node_modules/pstree.remy/lib/utils.js +++ /dev/null @@ -1,53 +0,0 @@ -const spawn = require('child_process').spawn; - -module.exports = { tree, pidsForTree, getStat }; - -function getStat() { - return new Promise((resolve) => { - const command = `ls /proc | grep -E '^[0-9]+$' | xargs -I{} cat /proc/{}/stat`; - const spawned = spawn('sh', ['-c', command], { - stdio: ['pipe', 'pipe', 'pipe'], - }); - - var res = ''; - spawned.stdout.on('data', (data) => (res += data)); - spawned.on('close', () => resolve(res)); - }); -} - -function template(s) { - var stat = null; - // 'pid', 'comm', 'state', 'ppid', 'pgrp' - // %d (%s) %c %d %d - s.replace( - /(\d+) \((.*?)\)\s(.+?)\s(\d+)\s/g, - (all, PID, COMMAND, STAT, PPID) => { - stat = { PID, COMMAND, PPID, STAT }; - } - ); - - return stat; -} - -function tree(stats) { - const processes = stats.split('\n').map(template).filter(Boolean); - - return processes; -} - -function pidsForTree(tree, pid) { - if (typeof pid === 'number') { - pid = pid.toString(); - } - const parents = [pid]; - const pids = []; - - tree.forEach((proc) => { - if (parents.indexOf(proc.PPID) !== -1) { - parents.push(proc.PID); - pids.push(proc); - } - }); - - return pids; -} diff --git a/node_modules/pstree.remy/package.json b/node_modules/pstree.remy/package.json deleted file mode 100644 index 35c7068..0000000 --- a/node_modules/pstree.remy/package.json +++ /dev/null @@ -1,33 +0,0 @@ -{ - "name": "pstree.remy", - "version": "1.1.8", - "main": "lib/index.js", - "prettier": { - "trailingComma": "es5", - "semi": true, - "singleQuote": true - }, - "scripts": { - "test": "tap tests/*.test.js", - "_prepublish": "npm test" - }, - "keywords": [ - "ps", - "pstree", - "ps tree" - ], - "author": "Remy Sharp", - "license": "MIT", - "repository": { - "type": "git", - "url": "https://github.com/remy/pstree.git" - }, - "devDependencies": { - "tap": "^11.0.0" - }, - "directories": { - "test": "tests" - }, - "dependencies": {}, - "description": "Collects the full tree of processes from /proc" -} diff --git a/node_modules/raw-body/index.d.ts b/node_modules/raw-body/index.d.ts index dcbbebd..b504611 100644 --- a/node_modules/raw-body/index.d.ts +++ b/node_modules/raw-body/index.d.ts @@ -1,5 +1,3 @@ -import { Readable } from 'stream'; - declare namespace getRawBody { export type Encoding = string | true; @@ -58,29 +56,29 @@ declare namespace getRawBody { * limit. Ideal for parsing request bodies. */ declare function getRawBody( - stream: Readable, + stream: NodeJS.ReadableStream, callback: (err: getRawBody.RawBodyError, body: Buffer) => void ): void; declare function getRawBody( - stream: Readable, + stream: NodeJS.ReadableStream, options: (getRawBody.Options & { encoding: getRawBody.Encoding }) | getRawBody.Encoding, callback: (err: getRawBody.RawBodyError, body: string) => void ): void; declare function getRawBody( - stream: Readable, + stream: NodeJS.ReadableStream, options: getRawBody.Options, callback: (err: getRawBody.RawBodyError, body: Buffer) => void ): void; declare function getRawBody( - stream: Readable, + stream: NodeJS.ReadableStream, options: (getRawBody.Options & { encoding: getRawBody.Encoding }) | getRawBody.Encoding ): Promise<string>; declare function getRawBody( - stream: Readable, + stream: NodeJS.ReadableStream, options?: getRawBody.Options ): Promise<Buffer>; diff --git a/node_modules/raw-body/package.json b/node_modules/raw-body/package.json index aabb1c3..5bc7165 100644 --- a/node_modules/raw-body/package.json +++ b/node_modules/raw-body/package.json @@ -1,7 +1,7 @@ { "name": "raw-body", "description": "Get and validate the raw body of a readable stream.", - "version": "2.5.2", + "version": "3.0.0", "author": "Jonathan Ong <me@jongleberry.com> (http://jongleberry.com)", "contributors": [ "Douglas Christopher Wilson <doug@somethingdoug.com>", @@ -12,20 +12,20 @@ "dependencies": { "bytes": "3.1.2", "http-errors": "2.0.0", - "iconv-lite": "0.4.24", + "iconv-lite": "0.6.3", "unpipe": "1.0.0" }, "devDependencies": { "bluebird": "3.7.2", - "eslint": "8.34.0", + "eslint": "8.57.0", "eslint-config-standard": "15.0.1", - "eslint-plugin-import": "2.27.5", + "eslint-plugin-import": "2.29.1", "eslint-plugin-markdown": "3.0.0", "eslint-plugin-node": "11.1.0", - "eslint-plugin-promise": "6.1.1", + "eslint-plugin-promise": "6.6.0", "eslint-plugin-standard": "4.1.0", - "mocha": "10.2.0", - "nyc": "15.1.0", + "mocha": "10.7.0", + "nyc": "17.0.0", "readable-stream": "2.3.7", "safe-buffer": "5.2.1" }, @@ -44,6 +44,7 @@ "lint": "eslint .", "test": "mocha --trace-deprecation --reporter spec --bail --check-leaks test/", "test-ci": "nyc --reporter=lcovonly --reporter=text npm test", - "test-cov": "nyc --reporter=html --reporter=text npm test" + "test-cov": "nyc --reporter=html --reporter=text npm test", + "version": "node scripts/version-history.js && git add HISTORY.md" } } diff --git a/node_modules/readdirp/index.d.ts b/node_modules/readdirp/index.d.ts deleted file mode 100644 index cbbd76c..0000000 --- a/node_modules/readdirp/index.d.ts +++ /dev/null @@ -1,43 +0,0 @@ -// TypeScript Version: 3.2 - -/// <reference types="node" lib="esnext" /> - -import * as fs from 'fs'; -import { Readable } from 'stream'; - -declare namespace readdir { - interface EntryInfo { - path: string; - fullPath: string; - basename: string; - stats?: fs.Stats; - dirent?: fs.Dirent; - } - - interface ReaddirpOptions { - root?: string; - fileFilter?: string | string[] | ((entry: EntryInfo) => boolean); - directoryFilter?: string | string[] | ((entry: EntryInfo) => boolean); - type?: 'files' | 'directories' | 'files_directories' | 'all'; - lstat?: boolean; - depth?: number; - alwaysStat?: boolean; - } - - interface ReaddirpStream extends Readable, AsyncIterable<EntryInfo> { - read(): EntryInfo; - [Symbol.asyncIterator](): AsyncIterableIterator<EntryInfo>; - } - - function promise( - root: string, - options?: ReaddirpOptions - ): Promise<EntryInfo[]>; -} - -declare function readdir( - root: string, - options?: readdir.ReaddirpOptions -): readdir.ReaddirpStream; - -export = readdir; diff --git a/node_modules/readdirp/index.js b/node_modules/readdirp/index.js deleted file mode 100644 index cf739b2..0000000 --- a/node_modules/readdirp/index.js +++ /dev/null @@ -1,287 +0,0 @@ -'use strict'; - -const fs = require('fs'); -const { Readable } = require('stream'); -const sysPath = require('path'); -const { promisify } = require('util'); -const picomatch = require('picomatch'); - -const readdir = promisify(fs.readdir); -const stat = promisify(fs.stat); -const lstat = promisify(fs.lstat); -const realpath = promisify(fs.realpath); - -/** - * @typedef {Object} EntryInfo - * @property {String} path - * @property {String} fullPath - * @property {fs.Stats=} stats - * @property {fs.Dirent=} dirent - * @property {String} basename - */ - -const BANG = '!'; -const RECURSIVE_ERROR_CODE = 'READDIRP_RECURSIVE_ERROR'; -const NORMAL_FLOW_ERRORS = new Set(['ENOENT', 'EPERM', 'EACCES', 'ELOOP', RECURSIVE_ERROR_CODE]); -const FILE_TYPE = 'files'; -const DIR_TYPE = 'directories'; -const FILE_DIR_TYPE = 'files_directories'; -const EVERYTHING_TYPE = 'all'; -const ALL_TYPES = [FILE_TYPE, DIR_TYPE, FILE_DIR_TYPE, EVERYTHING_TYPE]; - -const isNormalFlowError = error => NORMAL_FLOW_ERRORS.has(error.code); -const [maj, min] = process.versions.node.split('.').slice(0, 2).map(n => Number.parseInt(n, 10)); -const wantBigintFsStats = process.platform === 'win32' && (maj > 10 || (maj === 10 && min >= 5)); - -const normalizeFilter = filter => { - if (filter === undefined) return; - if (typeof filter === 'function') return filter; - - if (typeof filter === 'string') { - const glob = picomatch(filter.trim()); - return entry => glob(entry.basename); - } - - if (Array.isArray(filter)) { - const positive = []; - const negative = []; - for (const item of filter) { - const trimmed = item.trim(); - if (trimmed.charAt(0) === BANG) { - negative.push(picomatch(trimmed.slice(1))); - } else { - positive.push(picomatch(trimmed)); - } - } - - if (negative.length > 0) { - if (positive.length > 0) { - return entry => - positive.some(f => f(entry.basename)) && !negative.some(f => f(entry.basename)); - } - return entry => !negative.some(f => f(entry.basename)); - } - return entry => positive.some(f => f(entry.basename)); - } -}; - -class ReaddirpStream extends Readable { - static get defaultOptions() { - return { - root: '.', - /* eslint-disable no-unused-vars */ - fileFilter: (path) => true, - directoryFilter: (path) => true, - /* eslint-enable no-unused-vars */ - type: FILE_TYPE, - lstat: false, - depth: 2147483648, - alwaysStat: false - }; - } - - constructor(options = {}) { - super({ - objectMode: true, - autoDestroy: true, - highWaterMark: options.highWaterMark || 4096 - }); - const opts = { ...ReaddirpStream.defaultOptions, ...options }; - const { root, type } = opts; - - this._fileFilter = normalizeFilter(opts.fileFilter); - this._directoryFilter = normalizeFilter(opts.directoryFilter); - - const statMethod = opts.lstat ? lstat : stat; - // Use bigint stats if it's windows and stat() supports options (node 10+). - if (wantBigintFsStats) { - this._stat = path => statMethod(path, { bigint: true }); - } else { - this._stat = statMethod; - } - - this._maxDepth = opts.depth; - this._wantsDir = [DIR_TYPE, FILE_DIR_TYPE, EVERYTHING_TYPE].includes(type); - this._wantsFile = [FILE_TYPE, FILE_DIR_TYPE, EVERYTHING_TYPE].includes(type); - this._wantsEverything = type === EVERYTHING_TYPE; - this._root = sysPath.resolve(root); - this._isDirent = ('Dirent' in fs) && !opts.alwaysStat; - this._statsProp = this._isDirent ? 'dirent' : 'stats'; - this._rdOptions = { encoding: 'utf8', withFileTypes: this._isDirent }; - - // Launch stream with one parent, the root dir. - this.parents = [this._exploreDir(root, 1)]; - this.reading = false; - this.parent = undefined; - } - - async _read(batch) { - if (this.reading) return; - this.reading = true; - - try { - while (!this.destroyed && batch > 0) { - const { path, depth, files = [] } = this.parent || {}; - - if (files.length > 0) { - const slice = files.splice(0, batch).map(dirent => this._formatEntry(dirent, path)); - for (const entry of await Promise.all(slice)) { - if (this.destroyed) return; - - const entryType = await this._getEntryType(entry); - if (entryType === 'directory' && this._directoryFilter(entry)) { - if (depth <= this._maxDepth) { - this.parents.push(this._exploreDir(entry.fullPath, depth + 1)); - } - - if (this._wantsDir) { - this.push(entry); - batch--; - } - } else if ((entryType === 'file' || this._includeAsFile(entry)) && this._fileFilter(entry)) { - if (this._wantsFile) { - this.push(entry); - batch--; - } - } - } - } else { - const parent = this.parents.pop(); - if (!parent) { - this.push(null); - break; - } - this.parent = await parent; - if (this.destroyed) return; - } - } - } catch (error) { - this.destroy(error); - } finally { - this.reading = false; - } - } - - async _exploreDir(path, depth) { - let files; - try { - files = await readdir(path, this._rdOptions); - } catch (error) { - this._onError(error); - } - return { files, depth, path }; - } - - async _formatEntry(dirent, path) { - let entry; - try { - const basename = this._isDirent ? dirent.name : dirent; - const fullPath = sysPath.resolve(sysPath.join(path, basename)); - entry = { path: sysPath.relative(this._root, fullPath), fullPath, basename }; - entry[this._statsProp] = this._isDirent ? dirent : await this._stat(fullPath); - } catch (err) { - this._onError(err); - } - return entry; - } - - _onError(err) { - if (isNormalFlowError(err) && !this.destroyed) { - this.emit('warn', err); - } else { - this.destroy(err); - } - } - - async _getEntryType(entry) { - // entry may be undefined, because a warning or an error were emitted - // and the statsProp is undefined - const stats = entry && entry[this._statsProp]; - if (!stats) { - return; - } - if (stats.isFile()) { - return 'file'; - } - if (stats.isDirectory()) { - return 'directory'; - } - if (stats && stats.isSymbolicLink()) { - const full = entry.fullPath; - try { - const entryRealPath = await realpath(full); - const entryRealPathStats = await lstat(entryRealPath); - if (entryRealPathStats.isFile()) { - return 'file'; - } - if (entryRealPathStats.isDirectory()) { - const len = entryRealPath.length; - if (full.startsWith(entryRealPath) && full.substr(len, 1) === sysPath.sep) { - const recursiveError = new Error( - `Circular symlink detected: "${full}" points to "${entryRealPath}"` - ); - recursiveError.code = RECURSIVE_ERROR_CODE; - return this._onError(recursiveError); - } - return 'directory'; - } - } catch (error) { - this._onError(error); - } - } - } - - _includeAsFile(entry) { - const stats = entry && entry[this._statsProp]; - - return stats && this._wantsEverything && !stats.isDirectory(); - } -} - -/** - * @typedef {Object} ReaddirpArguments - * @property {Function=} fileFilter - * @property {Function=} directoryFilter - * @property {String=} type - * @property {Number=} depth - * @property {String=} root - * @property {Boolean=} lstat - * @property {Boolean=} bigint - */ - -/** - * Main function which ends up calling readdirRec and reads all files and directories in given root recursively. - * @param {String} root Root directory - * @param {ReaddirpArguments=} options Options to specify root (start directory), filters and recursion depth - */ -const readdirp = (root, options = {}) => { - let type = options.entryType || options.type; - if (type === 'both') type = FILE_DIR_TYPE; // backwards-compatibility - if (type) options.type = type; - if (!root) { - throw new Error('readdirp: root argument is required. Usage: readdirp(root, options)'); - } else if (typeof root !== 'string') { - throw new TypeError('readdirp: root argument must be a string. Usage: readdirp(root, options)'); - } else if (type && !ALL_TYPES.includes(type)) { - throw new Error(`readdirp: Invalid type passed. Use one of ${ALL_TYPES.join(', ')}`); - } - - options.root = root; - return new ReaddirpStream(options); -}; - -const readdirpPromise = (root, options = {}) => { - return new Promise((resolve, reject) => { - const files = []; - readdirp(root, options) - .on('data', entry => files.push(entry)) - .on('end', () => resolve(files)) - .on('error', error => reject(error)); - }); -}; - -readdirp.promise = readdirpPromise; -readdirp.ReaddirpStream = ReaddirpStream; -readdirp.default = readdirp; - -module.exports = readdirp; diff --git a/node_modules/readdirp/package.json b/node_modules/readdirp/package.json deleted file mode 100644 index dba5388..0000000 --- a/node_modules/readdirp/package.json +++ /dev/null @@ -1,122 +0,0 @@ -{ - "name": "readdirp", - "description": "Recursive version of fs.readdir with streaming API.", - "version": "3.6.0", - "homepage": "https://github.com/paulmillr/readdirp", - "repository": { - "type": "git", - "url": "git://github.com/paulmillr/readdirp.git" - }, - "license": "MIT", - "bugs": { - "url": "https://github.com/paulmillr/readdirp/issues" - }, - "author": "Thorsten Lorenz <thlorenz@gmx.de> (thlorenz.com)", - "contributors": [ - "Thorsten Lorenz <thlorenz@gmx.de> (thlorenz.com)", - "Paul Miller (https://paulmillr.com)" - ], - "main": "index.js", - "engines": { - "node": ">=8.10.0" - }, - "files": [ - "index.js", - "index.d.ts" - ], - "keywords": [ - "recursive", - "fs", - "stream", - "streams", - "readdir", - "filesystem", - "find", - "filter" - ], - "scripts": { - "dtslint": "dtslint", - "nyc": "nyc", - "mocha": "mocha --exit", - "lint": "eslint --report-unused-disable-directives --ignore-path .gitignore .", - "test": "npm run lint && nyc npm run mocha" - }, - "dependencies": { - "picomatch": "^2.2.1" - }, - "devDependencies": { - "@types/node": "^14", - "chai": "^4.2", - "chai-subset": "^1.6", - "dtslint": "^3.3.0", - "eslint": "^7.0.0", - "mocha": "^7.1.1", - "nyc": "^15.0.0", - "rimraf": "^3.0.0", - "typescript": "^4.0.3" - }, - "nyc": { - "reporter": [ - "html", - "text" - ] - }, - "eslintConfig": { - "root": true, - "extends": "eslint:recommended", - "parserOptions": { - "ecmaVersion": 9, - "sourceType": "script" - }, - "env": { - "node": true, - "es6": true - }, - "rules": { - "array-callback-return": "error", - "no-empty": [ - "error", - { - "allowEmptyCatch": true - } - ], - "no-else-return": [ - "error", - { - "allowElseIf": false - } - ], - "no-lonely-if": "error", - "no-var": "error", - "object-shorthand": "error", - "prefer-arrow-callback": [ - "error", - { - "allowNamedFunctions": true - } - ], - "prefer-const": [ - "error", - { - "ignoreReadBeforeAssign": true - } - ], - "prefer-destructuring": [ - "error", - { - "object": true, - "array": false - } - ], - "prefer-spread": "error", - "prefer-template": "error", - "radix": "error", - "semi": "error", - "strict": "error", - "quotes": [ - "error", - "single" - ] - } - } -} diff --git a/node_modules/replace-in-file/bin/cli.js b/node_modules/replace-in-file/bin/cli.js deleted file mode 100644 index af7b75c..0000000 --- a/node_modules/replace-in-file/bin/cli.js +++ /dev/null @@ -1,59 +0,0 @@ -#!/usr/bin/env node -'use strict'; - -/** - * Dependencies - */ -const {argv} = require('yargs'); -const replace = require('../lib/replace-in-file'); -const loadConfig = require('../lib/helpers/load-config'); -const combineConfig = require('../lib/helpers/combine-config'); -const errorHandler = require('../lib/helpers/error-handler'); -const successHandler = require('../lib/helpers/success-handler'); - -/** - * Main routine - */ -async function main() { - - //Extract parameters - const {configFile} = argv; - - //Verify arguments - if (argv._.length < 3 && !configFile) { - throw new Error('Replace in file needs at least 3 arguments'); - } - - //Load config and combine with passed arguments - const config = await loadConfig(configFile); - const options = combineConfig(config, argv); - - //Extract settings - const {from, to, files, isRegex, verbose, quiet} = options; - - //Single star globs already get expanded in the command line - options.files = files.reduce((files, file) => { - return files.concat(file.split(',')); - }, []); - - //If the isRegex flag is passed, convert the from parameter to a RegExp object - if (isRegex) { - const flags = from.replace(/.*\/([gimyus]*)$/, '$1'); - const pattern = from.replace(new RegExp(`^/(.*?)/${flags}$`), '$1'); - options.from = new RegExp(pattern, flags); - } - - //Log - if (!quiet) { - console.log(`Replacing '${from}' with '${to}'`); - } - - //Replace - const results = replace.sync(options); - if (!quiet) { - successHandler(results, verbose); - } -} - -//Call main routine -main().catch(error => errorHandler(error)); diff --git a/node_modules/replace-in-file/index.js b/node_modules/replace-in-file/index.js deleted file mode 100644 index 17af7a1..0000000 --- a/node_modules/replace-in-file/index.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./lib/replace-in-file'); diff --git a/node_modules/replace-in-file/lib/helpers/combine-config.js b/node_modules/replace-in-file/lib/helpers/combine-config.js deleted file mode 100644 index ddf8f8e..0000000 --- a/node_modules/replace-in-file/lib/helpers/combine-config.js +++ /dev/null @@ -1,60 +0,0 @@ -'use strict'; - -/** - * Dependencies - */ -const parseConfig = require('./parse-config'); - -/** - * Combine CLI script arguments with config options - */ -module.exports = function combineConfig(config, argv) { - - //Extract options from config - let { - from, to, files, ignore, encoding, verbose, - allowEmptyPaths, disableGlobs, isRegex, dry, quiet, - } = config; - - //Get from/to parameters from CLI args if not defined in options - if (typeof from === 'undefined') { - from = argv._.shift(); - } - if (typeof to === 'undefined') { - to = argv._.shift(); - } - - //Get files and ignored files - if (typeof files === 'undefined') { - files = argv._; - } - if (typeof ignore === 'undefined' && typeof argv.ignore !== 'undefined') { - ignore = argv.ignore; - } - - //Other parameters - if (typeof encoding === 'undefined') { - encoding = argv.encoding; - } - if (typeof disableGlobs === 'undefined') { - disableGlobs = !!argv.disableGlobs; - } - if (typeof isRegex === 'undefined') { - isRegex = !!argv.isRegex; - } - if (typeof verbose === 'undefined') { - verbose = !!argv.verbose; - } - if (typeof dry === 'undefined') { - dry = !!argv.dry; - } - if (typeof quiet === 'undefined') { - quiet = !!argv.quiet; - } - - //Return through parser to validate - return parseConfig({ - from, to, files, ignore, encoding, verbose, - allowEmptyPaths, disableGlobs, isRegex, dry, quiet, - }); -}; diff --git a/node_modules/replace-in-file/lib/helpers/error-handler.js b/node_modules/replace-in-file/lib/helpers/error-handler.js deleted file mode 100644 index 6c80213..0000000 --- a/node_modules/replace-in-file/lib/helpers/error-handler.js +++ /dev/null @@ -1,9 +0,0 @@ -'use strict'; - -/** - * Error handler - */ -module.exports = function errorHandler(error, exitCode = 1) { - console.error(error); - process.exit(exitCode); -}; diff --git a/node_modules/replace-in-file/lib/helpers/get-paths-async.js b/node_modules/replace-in-file/lib/helpers/get-paths-async.js deleted file mode 100644 index 83cfe43..0000000 --- a/node_modules/replace-in-file/lib/helpers/get-paths-async.js +++ /dev/null @@ -1,26 +0,0 @@ -'use strict'; - -/** - * Dependencies - */ -const globAsync = require('./glob-async'); - -/** - * Get paths asynchrously - */ -module.exports = function getPathsAsync(patterns, config) { - - //Extract relevant config - const {ignore, disableGlobs, allowEmptyPaths, glob: cfg} = config; - - //Not using globs? - if (disableGlobs) { - return Promise.resolve(patterns); - } - - //Expand globs and flatten paths - return Promise - .all(patterns - .map(pattern => globAsync(pattern, ignore, allowEmptyPaths, cfg))) - .then(paths => [].concat.apply([], paths)); -}; diff --git a/node_modules/replace-in-file/lib/helpers/get-paths-sync.js b/node_modules/replace-in-file/lib/helpers/get-paths-sync.js deleted file mode 100644 index a3f3440..0000000 --- a/node_modules/replace-in-file/lib/helpers/get-paths-sync.js +++ /dev/null @@ -1,42 +0,0 @@ -'use strict'; - -/** - * Dependencies - */ -const glob = require('glob'); - -/** - * Get paths (sync) - */ -module.exports = function getPathsSync(patterns, config) { - - //Extract relevant config - const {ignore, disableGlobs, glob: globConfig, cwd} = config; - - //Not using globs? - if (disableGlobs) { - return patterns; - } - - //Prepare glob config - const cfg = Object.assign({ignore}, globConfig, {nodir: true}); - - //Append CWD configuration if given (#56) - //istanbul ignore if - if (cwd) { - cfg.cwd = cwd; - } - - //Get paths - const paths = patterns.map(pattern => glob.sync(pattern, cfg)); - const flattened = [].concat.apply([], paths); - - //Prefix each path with CWD if given (#56) - //istanbul ignore if - if (cwd) { - return flattened.map(path => `${cwd}${path}`); - } - - //Return flattened - return flattened; -}; diff --git a/node_modules/replace-in-file/lib/helpers/glob-async.js b/node_modules/replace-in-file/lib/helpers/glob-async.js deleted file mode 100644 index 792ddad..0000000 --- a/node_modules/replace-in-file/lib/helpers/glob-async.js +++ /dev/null @@ -1,34 +0,0 @@ -'use strict'; - -/** - * Dependencies - */ -const glob = require('glob'); - -/** - * Async wrapper for glob - */ -module.exports = function globAsync(pattern, ignore, allowEmptyPaths, cfg) { - - //Prepare glob config - cfg = Object.assign({ignore}, cfg, {nodir: true}); - - //Return promise - return new Promise((resolve, reject) => { - glob(pattern, cfg, (error, files) => { - - //istanbul ignore if: hard to make glob error - if (error) { - return reject(error); - } - - //Error if no files match, unless allowed - if (!allowEmptyPaths && files.length === 0) { - return reject(new Error('No files match the pattern: ' + pattern)); - } - - //Resolve - resolve(files); - }); - }); -}; diff --git a/node_modules/replace-in-file/lib/helpers/load-config.js b/node_modules/replace-in-file/lib/helpers/load-config.js deleted file mode 100644 index cc190c1..0000000 --- a/node_modules/replace-in-file/lib/helpers/load-config.js +++ /dev/null @@ -1,23 +0,0 @@ -'use strict'; - -/** - * Dependencies - */ -const path = require('path'); - -/** - * Helper to load options from a config file - */ -module.exports = function loadConfig(file) { - - //No config file provided? - if (!file) { - return {}; - } - - //Resolve path - file = path.resolve(file); - - //Try to load - return require(file); -}; diff --git a/node_modules/replace-in-file/lib/helpers/make-replacements.js b/node_modules/replace-in-file/lib/helpers/make-replacements.js deleted file mode 100644 index 0876d7b..0000000 --- a/node_modules/replace-in-file/lib/helpers/make-replacements.js +++ /dev/null @@ -1,75 +0,0 @@ -'use strict'; - -/** - * Get replacement helper - */ -function getReplacement(replace, isArray, i) { - if (isArray && typeof replace[i] === 'undefined') { - return null; - } - if (isArray) { - return replace[i]; - } - return replace; -} - -/** - * Helper to make replacements - */ -module.exports = function makeReplacements(contents, from, to, file, count) { - - //Turn into array - if (!Array.isArray(from)) { - from = [from]; - } - - //Check if replace value is an array and prepare result - const isArray = Array.isArray(to); - const result = {file}; - - //Counting? Initialize number of matches - if (count) { - result.numMatches = 0; - result.numReplacements = 0; - } - - //Make replacements - const newContents = from.reduce((contents, item, i) => { - - //Call function if given, passing in the filename - if (typeof item === 'function') { - item = item(file); - } - - //Get replacement value - let replacement = getReplacement(to, isArray, i); - if (replacement === null) { - return contents; - } - - //Call function if given, appending the filename - if (typeof replacement === 'function') { - const original = replacement; - replacement = (...args) => original(...args, file); - } - - //Count matches - if (count) { - const matches = contents.match(item); - if (matches) { - const replacements = matches.filter(match => match !== replacement); - result.numMatches += matches.length; - result.numReplacements += replacements.length; - } - } - - //Make replacement - return contents.replace(item, replacement); - }, contents); - - //Check if changed - result.hasChanged = (newContents !== contents); - - //Return result and new contents - return [result, newContents]; -}; diff --git a/node_modules/replace-in-file/lib/helpers/parse-config.js b/node_modules/replace-in-file/lib/helpers/parse-config.js deleted file mode 100644 index 1a8950d..0000000 --- a/node_modules/replace-in-file/lib/helpers/parse-config.js +++ /dev/null @@ -1,74 +0,0 @@ -'use strict'; - -/** - * Defaults - */ -const defaults = { - ignore: [], - encoding: 'utf-8', - disableGlobs: false, - allowEmptyPaths: false, - countMatches: false, - isRegex: false, - verbose: false, - quiet: false, - dry: false, - glob: {}, - cwd: null, -}; - -/** - * Parse config - */ -module.exports = function parseConfig(config) { - - //Validate config - if (typeof config !== 'object' || config === null) { - throw new Error('Must specify configuration object'); - } - - //Fix glob - config.glob = config.glob || {}; - - //Extract data - const {files, from, to, processor, ignore, encoding} = config; - - - if (typeof processor !== 'undefined') { - if (typeof processor !== 'function' && !Array.isArray(processor)) { - throw new Error('Processor should be either a function or an array of functions'); - } - } else { - //Validate values - if (typeof files === 'undefined') { - throw new Error('Must specify file or files'); - } - if (typeof from === 'undefined') { - throw new Error('Must specify string or regex to replace'); - } - if (typeof to === 'undefined') { - throw new Error('Must specify a replacement (can be blank string)'); - } - } - - //Ensure arrays - if (!Array.isArray(files)) { - config.files = [files]; - } - if (!Array.isArray(ignore)) { - if (typeof ignore === 'undefined') { - config.ignore = []; - } - else { - config.ignore = [ignore]; - } - } - - //Use default encoding if invalid - if (typeof encoding !== 'string' || encoding === '') { - config.encoding = 'utf-8'; - } - - //Merge config with defaults - return Object.assign({}, defaults, config); -}; diff --git a/node_modules/replace-in-file/lib/helpers/process-async.js b/node_modules/replace-in-file/lib/helpers/process-async.js deleted file mode 100644 index 7f2456c..0000000 --- a/node_modules/replace-in-file/lib/helpers/process-async.js +++ /dev/null @@ -1,45 +0,0 @@ -'use strict'; - -/** - * Dependencies - */ -const fs = require('fs'); -const runProcessors = require('./run-processors'); - -/** - * Helper to process in a single file (async) - */ -module.exports = function processAsync(file, processor, config) { - - //Extract relevant config - const {encoding, dry} = config; - - //Wrap in promise - return new Promise((resolve, reject) => { - fs.readFile(file, encoding, (error, contents) => { - //istanbul ignore if - if (error) { - return reject(error); - } - - //Make replacements - const [result, newContents] = runProcessors( - contents, processor, file, - ); - - //Not changed or dry run? - if (!result.hasChanged || dry) { - return resolve(result); - } - - //Write to file - fs.writeFile(file, newContents, encoding, error => { - //istanbul ignore if - if (error) { - return reject(error); - } - resolve(result); - }); - }); - }); -}; diff --git a/node_modules/replace-in-file/lib/helpers/process-sync.js b/node_modules/replace-in-file/lib/helpers/process-sync.js deleted file mode 100644 index 2966234..0000000 --- a/node_modules/replace-in-file/lib/helpers/process-sync.js +++ /dev/null @@ -1,30 +0,0 @@ -'use strict'; - -/** - * Dependencies - */ -const fs = require('fs'); -const runProcessors = require('./run-processors'); - -/** - * Helper to process in a single file (sync) - */ -module.exports = function processSync(file, processor, config) { - - //Extract relevant config and read file contents - const {encoding, dry} = config; - const contents = fs.readFileSync(file, encoding); - - //Process contents and check if anything changed - const [result, newContents] = runProcessors( - contents, processor, file, - ); - - //Contents changed and not a dry run? Write to file - if (result.hasChanged && !dry) { - fs.writeFileSync(file, newContents, encoding); - } - - //Return result - return result; -}; diff --git a/node_modules/replace-in-file/lib/helpers/replace-async.js b/node_modules/replace-in-file/lib/helpers/replace-async.js deleted file mode 100644 index 5167d4b..0000000 --- a/node_modules/replace-in-file/lib/helpers/replace-async.js +++ /dev/null @@ -1,45 +0,0 @@ -'use strict'; - -/** - * Dependencies - */ -const fs = require('fs'); -const makeReplacements = require('./make-replacements'); - -/** - * Helper to replace in a single file (async) - */ -module.exports = function replaceAsync(file, from, to, config) { - - //Extract relevant config - const {encoding, dry, countMatches} = config; - - //Wrap in promise - return new Promise((resolve, reject) => { - fs.readFile(file, encoding, (error, contents) => { - //istanbul ignore if - if (error) { - return reject(error); - } - - //Make replacements - const [result, newContents] = makeReplacements( - contents, from, to, file, countMatches - ); - - //Not changed or dry run? - if (!result.hasChanged || dry) { - return resolve(result); - } - - //Write to file - fs.writeFile(file, newContents, encoding, error => { - //istanbul ignore if - if (error) { - return reject(error); - } - resolve(result); - }); - }); - }); -}; diff --git a/node_modules/replace-in-file/lib/helpers/replace-sync.js b/node_modules/replace-in-file/lib/helpers/replace-sync.js deleted file mode 100644 index ada3519..0000000 --- a/node_modules/replace-in-file/lib/helpers/replace-sync.js +++ /dev/null @@ -1,30 +0,0 @@ -'use strict'; - -/** - * Dependencies - */ -const fs = require('fs'); -const makeReplacements = require('./make-replacements'); - -/** - * Helper to replace in a single file (sync) - */ -module.exports = function replaceSync(file, from, to, config) { - - //Extract relevant config and read file contents - const {encoding, dry, countMatches} = config; - const contents = fs.readFileSync(file, encoding); - - //Replace contents and check if anything changed - const [result, newContents] = makeReplacements( - contents, from, to, file, countMatches - ); - - //Contents changed and not a dry run? Write to file - if (result.hasChanged && !dry) { - fs.writeFileSync(file, newContents, encoding); - } - - //Return result - return result; -}; diff --git a/node_modules/replace-in-file/lib/helpers/run-processors.js b/node_modules/replace-in-file/lib/helpers/run-processors.js deleted file mode 100644 index b4fd7eb..0000000 --- a/node_modules/replace-in-file/lib/helpers/run-processors.js +++ /dev/null @@ -1,16 +0,0 @@ -/** - * Run processors - */ -module.exports = function runProcessors(contents, processor, file, count) { - - const processors = Array.isArray(processor) ? processor : [processor]; - const result = {file}; - - const newContents = processors.reduce((contents, processor, i) => { - return processor(contents); - }, contents); - - result.hasChanged = (newContents !== contents); - - return [result, newContents]; -}; diff --git a/node_modules/replace-in-file/lib/helpers/success-handler.js b/node_modules/replace-in-file/lib/helpers/success-handler.js deleted file mode 100644 index 9a3051e..0000000 --- a/node_modules/replace-in-file/lib/helpers/success-handler.js +++ /dev/null @@ -1,23 +0,0 @@ -'use strict'; - -/** - * Dependencies - */ -const chalk = require('chalk'); - -/** - * Success handler - */ -module.exports = function successHandler(results, verbose) { - const changed = results.filter(result => result.hasChanged); - const numChanges = changed.length; - if (numChanges > 0) { - console.log(chalk.green(`${numChanges} file(s) were changed`)); - if (verbose) { - changed.forEach(result => console.log(chalk.grey('-', result.file))); - } - } - else { - console.log(chalk.yellow('No files were changed')); - } -}; diff --git a/node_modules/replace-in-file/lib/process-file.js b/node_modules/replace-in-file/lib/process-file.js deleted file mode 100644 index 629afbc..0000000 --- a/node_modules/replace-in-file/lib/process-file.js +++ /dev/null @@ -1,83 +0,0 @@ -'use strict'; - -/** - * Dependencies - */ -const chalk = require('chalk'); -const parseConfig = require('./helpers/parse-config'); -const getPathsSync = require('./helpers/get-paths-sync'); -const getPathsAsync = require('./helpers/get-paths-async'); -const processSync = require('./helpers/process-sync'); -const processAsync = require('./helpers/process-async'); - -function processFile(config, cb) { - - try { - config = parseConfig(config); - } - catch (error) { - if (typeof cb === 'function') { - return cb(error, null); - } - return Promise.reject(error); - } - - const {files, processor, dry, verbose} = config; - - //Dry run? - //istanbul ignore if: No need to test console logs - if (dry && verbose) { - console.log(chalk.yellow('Dry run, not making actual changes')); - } - - //Find paths - return getPathsAsync(files, config) - - .then(paths => Promise.all( - paths.map(file => processAsync(file, processor, config)) - )) - .then(results => { - if (typeof cb === 'function') { - cb(null, results); - } - return results; - }) - .catch(error => { - if (typeof cb === 'function') { - cb(error); - } - else { - throw error; - } - }); -} - -/** - * Sync API - */ -function processFileSync(config) { - - //Parse config - config = parseConfig(config); - - //Get config, paths, and initialize changed files - const {files, processor, dry, verbose} = config; - const paths = getPathsSync(files, config); - - //Dry run? - //istanbul ignore if: No need to test console logs - if (dry && verbose) { - console.log(chalk.yellow('Dry run, not making actual changes')); - } - - //Process synchronously and return results - return paths.map(path => processSync(path, processor, config)); -} - -// Self-reference to support named import -processFile.processFile = processFile; -processFile.processFileSync = processFileSync; -processFile.sync = processFileSync; - -//Export -module.exports = processFile; diff --git a/node_modules/replace-in-file/lib/process-file.spec.js b/node_modules/replace-in-file/lib/process-file.spec.js deleted file mode 100644 index 3ae6a86..0000000 --- a/node_modules/replace-in-file/lib/process-file.spec.js +++ /dev/null @@ -1,751 +0,0 @@ -'use strict'; - -/** - * Dependencies - */ -import transform, {sync, processFile, processFileSync} from './process-file'; -const fs = require('fs'); -const writeFile = Promise.promisify(fs.writeFile); -const deleteFile = Promise.promisify(fs.unlink); - -/** - * Specifications - */ -describe('Process a file', () => { - - //Test JSON - const testData = 'a re place c'; - - /** - * Prepare test files - */ - beforeEach(() => Promise.all([ - writeFile('test1', testData, 'utf8'), - writeFile('test2', testData, 'utf8'), - writeFile('test3', 'nope', 'utf8'), - ])); - - /** - * Clean up test files - */ - afterEach(() => Promise.all([ - deleteFile('test1'), - deleteFile('test2'), - deleteFile('test3'), - ])); - - function fromToToProcessor(config) { - const from = config.from; - const to = config.to; - delete config.from; - delete config.to; - - config.processor = (content) => { - return content.replace(from, to); - }; - return config; - } - - /** - * Async with promises - */ - describe('Async with promises', () => { - - it('should run processor', done => { - transform({ - files: 'test1', - processor: (input) => { - return input.replace(/re\splace/g, 'b'); - }, - }).then(() => { - const test1 = fs.readFileSync('test1', 'utf8'); - const test2 = fs.readFileSync('test2', 'utf8'); - console.log(test1); - expect(test1).to.equal('a b c'); - expect(test2).to.equal(testData); - done(); - }); - }); - - it('should throw an error when no config provided', () => { - return expect(transform()).to.eventually.be.rejectedWith(Error); - }); - - it('should throw an error when invalid config provided', () => { - return expect(transform(42)).to.eventually.be.rejectedWith(Error); - }); - - it('should throw an error when no `files` defined', () => { - return expect(transform(fromToToProcessor({ - from: /re\splace/g, - to: 'b', - }))).to.eventually.be.rejectedWith(Error); - }); - - it('should replace contents in a single file with regex', done => { - transform(fromToToProcessor({ - files: 'test1', - from: /re\splace/g, - to: 'b', - })).then(() => { - const test1 = fs.readFileSync('test1', 'utf8'); - const test2 = fs.readFileSync('test2', 'utf8'); - expect(test1).to.equal('a b c'); - expect(test2).to.equal(testData); - done(); - }); - }); - - it('should replace contents with a string replacement', done => { - transform(fromToToProcessor({ - files: 'test1', - from: 're place', - to: 'b', - })).then(() => { - const test1 = fs.readFileSync('test1', 'utf8'); - expect(test1).to.equal('a b c'); - done(); - }); - }); - - it('should replace contents in a an array of files', done => { - transform(fromToToProcessor({ - files: ['test1', 'test2'], - from: /re\splace/g, - to: 'b', - })).then(() => { - const test1 = fs.readFileSync('test1', 'utf8'); - const test2 = fs.readFileSync('test2', 'utf8'); - expect(test1).to.equal('a b c'); - expect(test2).to.equal('a b c'); - done(); - }); - }); - - it('should expand globs', done => { - transform(fromToToProcessor({ - files: 'test*', - from: /re\splace/g, - to: 'b', - })).then(() => { - const test1 = fs.readFileSync('test1', 'utf8'); - const test2 = fs.readFileSync('test2', 'utf8'); - expect(test1).to.equal('a b c'); - expect(test2).to.equal('a b c'); - done(); - }); - }); - - it('should expand globs while excluding ignored files', done => { - transform(fromToToProcessor({ - files: 'test*', - ignore: 'test1', - from: /re\splace/g, - to: 'b', - })).then(() => { - const test1 = fs.readFileSync('test1', 'utf8'); - const test2 = fs.readFileSync('test2', 'utf8'); - expect(test1).to.equal('a re place c'); - expect(test2).to.equal('a b c'); - done(); - }); - }); - - it('should replace substrings', done => { - transform(fromToToProcessor({ - files: 'test1', - from: /(re)\s(place)/g, - to: '$2 $1', - })).then(() => { - const test1 = fs.readFileSync('test1', 'utf8'); - expect(test1).to.equal('a place re c'); - done(); - }); - }); - - it('should fulfill the promise on success', () => { - return transform(fromToToProcessor({ - files: 'test1', - from: /re\splace/g, - to: 'b', - })).should.be.fulfilled; - }); - - it('should reject the promise with an error on failure', () => { - return expect(transform(fromToToProcessor({ - files: 'nope', - from: /re\splace/g, - to: 'b', - }))).to.eventually.be.rejectedWith(Error); - }); - - it('should not reject the promise if allowEmptyPaths is true', () => { - return transform(fromToToProcessor({ - files: 'nope', - allowEmptyPaths: true, - from: /re\splace/g, - to: 'b', - })).should.be.fulfilled; - }); - - it('should return a results array', done => { - transform(fromToToProcessor({ - files: 'test1', - from: /re\splace/g, - to: 'b', - })).then(results => { - expect(results).to.be.instanceof(Array); - expect(results).to.have.length(1); - expect(results[0].file).to.equal('test1'); - done(); - }); - }); - - it('should mark if something was replaced', done => { - transform(fromToToProcessor({ - files: 'test1', - from: /re\splace/g, - to: 'b', - })).then(results => { - expect(results[0].hasChanged).to.equal(true); - done(); - }); - }); - - it('should not mark if nothing was replaced', done => { - transform(fromToToProcessor({ - files: 'test1', - from: 'nope', - to: 'b', - })).then(results => { - expect(results[0].hasChanged).to.equal(false); - done(); - }); - }); - - it('should return correct results for multiple files', done => { - transform(fromToToProcessor({ - files: ['test1', 'test2', 'test3'], - from: /re\splace/g, - to: 'b', - })).then(results => { - expect(results).to.have.length(3); - expect(results[0].file).to.equal('test1'); - expect(results[0].hasChanged).to.equal(true); - expect(results[1].file).to.equal('test2'); - expect(results[1].hasChanged).to.equal(true); - expect(results[2].file).to.equal('test3'); - expect(results[2].hasChanged).to.equal(false); - done(); - }); - }); - - it('should not replace in a dry run', done => { - transform(fromToToProcessor({ - files: ['test1', 'test2'], - from: /re\splace/g, - to: 'b', - dry: true, - })).then(() => { - const test1 = fs.readFileSync('test1', 'utf8'); - const test2 = fs.readFileSync('test2', 'utf8'); - expect(test1).to.equal('a re place c'); - expect(test2).to.equal('a re place c'); - done(); - }); - }); - - it('should return changed files for a dry run', done => { - transform(fromToToProcessor({ - files: ['test1', 'test2', 'test3'], - from: /re\splace/g, - to: 'b', - dry: true, - })).then(results => { - expect(results).to.have.length(3); - expect(results[0].file).to.equal('test1'); - expect(results[0].hasChanged).to.equal(true); - expect(results[1].file).to.equal('test2'); - expect(results[1].hasChanged).to.equal(true); - expect(results[2].file).to.equal('test3'); - expect(results[2].hasChanged).to.equal(false); - done(); - }); - }); - - it('should accept glob configuration', done => { - transform(fromToToProcessor({ - files: 'test1', - from: /re\splace/g, - to: 'b', - allowEmptyPaths: true, - glob: { - ignore: ['test1'], - }, - })).then(() => { - const test1 = fs.readFileSync('test1', 'utf8'); - expect(test1).to.equal('a re place c'); - done(); - }); - }); - - it('should ignore empty glob configuration', done => { - transform(fromToToProcessor({ - files: 'test1', - from: /re\splace/g, - to: 'b', - glob: null, - })).then(() => { - const test1 = fs.readFileSync('test1', 'utf8'); - expect(test1).to.equal('a b c'); - done(); - }); - }); - }); - - /** - * Async with callback - */ - describe('Async with callback', () => { - - it('should throw an error when no config provided', done => { - transform(null, (error) => { - expect(error).to.be.instanceof(Error); - done(); - }); - }); - - it('should throw an error when invalid config provided', done => { - transform(42, (error) => { - expect(error).to.be.instanceof(Error); - done(); - }); - }); - - it('should throw an error when no `files` defined', done => { - transform(fromToToProcessor({ - from: /re\splace/g, - to: 'b', - }), (error) => { - expect(error).to.be.instanceof(Error); - done(); - }); - }); - - it('should replace contents in a single file with regex', done => { - transform(fromToToProcessor({ - files: 'test1', - from: /re\splace/g, - to: 'b', - }), () => { - const test1 = fs.readFileSync('test1', 'utf8'); - const test2 = fs.readFileSync('test2', 'utf8'); - expect(test1).to.equal('a b c'); - expect(test2).to.equal(testData); - done(); - }); - }); - - it('should replace contents with a string replacement', done => { - transform(fromToToProcessor({ - files: 'test1', - from: 're place', - to: 'b', - }), () => { - const test1 = fs.readFileSync('test1', 'utf8'); - expect(test1).to.equal('a b c'); - done(); - }); - }); - - it('should replace contents in a an array of files', done => { - transform(fromToToProcessor({ - files: ['test1', 'test2'], - from: /re\splace/g, - to: 'b', - }), () => { - const test1 = fs.readFileSync('test1', 'utf8'); - const test2 = fs.readFileSync('test2', 'utf8'); - expect(test1).to.equal('a b c'); - expect(test2).to.equal('a b c'); - done(); - }); - }); - - it('should expand globs', done => { - transform(fromToToProcessor({ - files: 'test*', - from: /re\splace/g, - to: 'b', - }), () => { - const test1 = fs.readFileSync('test1', 'utf8'); - const test2 = fs.readFileSync('test2', 'utf8'); - expect(test1).to.equal('a b c'); - expect(test2).to.equal('a b c'); - done(); - }); - }); - - it('should expand globs while excluding ignored files', done => { - transform(fromToToProcessor({ - files: 'test*', - ignore: 'test1', - from: /re\splace/g, - to: 'b', - }), () => { - const test1 = fs.readFileSync('test1', 'utf8'); - const test2 = fs.readFileSync('test2', 'utf8'); - expect(test1).to.equal('a re place c'); - expect(test2).to.equal('a b c'); - done(); - }); - }); - - it('should not return an error on success', done => { - transform(fromToToProcessor({ - files: 'test1', - from: /re\splace/g, - to: 'b', - }), (error) => { - expect(error).to.equal(null); - done(); - }); - }); - - it('should return an error on failure', done => { - transform(fromToToProcessor({ - files: 'nope', - from: /re\splace/g, - to: 'b', - }), (error) => { - expect(error).to.be.instanceof(Error); - done(); - }); - }); - - it('should not return an error if allowEmptyPaths is true', done => { - transform(fromToToProcessor({ - files: 'nope', - allowEmptyPaths: true, - from: /re\splace/g, - to: 'b', - }), (error) => { - expect(error).to.equal(null); - done(); - }); - }); - - it('should return a results array', done => { - transform(fromToToProcessor({ - files: 'test1', - from: /re\splace/g, - to: 'b', - }), (error, results) => { - expect(results).to.be.instanceof(Array); - expect(results).to.have.length(1); - expect(results[0].file).to.equal('test1'); - done(); - }); - }); - - it('should mark if something was replaced', done => { - transform(fromToToProcessor({ - files: 'test1', - from: /re\splace/g, - to: 'b', - }), (error, results) => { - expect(results[0].hasChanged).to.equal(true); - done(); - }); - }); - - it('should not mark if nothing was replaced', done => { - transform(fromToToProcessor({ - files: 'test1', - from: 'nope', - to: 'b', - }), (error, results) => { - expect(results[0].hasChanged).to.equal(false); - done(); - }); - }); - - it('should return correct results for multiple files', done => { - transform(fromToToProcessor({ - files: ['test1', 'test2', 'test3'], - from: /re\splace/g, - to: 'b', - }), (error, results) => { - expect(results).to.have.length(3); - expect(results[0].file).to.equal('test1'); - expect(results[0].hasChanged).to.equal(true); - expect(results[1].file).to.equal('test2'); - expect(results[1].hasChanged).to.equal(true); - expect(results[2].file).to.equal('test3'); - expect(results[2].hasChanged).to.equal(false); - done(); - }); - }); - - it('should work without expanding globs if disabled', done => { - transform(fromToToProcessor({ - files: ['test1', 'test2'], - from: /re\splace/g, - to: 'b', - disableGlobs: true, - }), () => { - const test1 = fs.readFileSync('test1', 'utf8'); - const test2 = fs.readFileSync('test2', 'utf8'); - expect(test1).to.equal('a b c'); - expect(test2).to.equal('a b c'); - done(); - }); - }); - }); - - /** - * Sync - */ - describe('Sync', () => { - - it('should throw an error when no config provided', () => { - expect(function() { - transform.sync(); - }).to.throw(Error); - }); - - it('should throw an error when invalid config provided', () => { - expect(function() { - transform.sync(42); - }).to.throw(Error); - }); - - it('should throw an error when no `files` defined', () => { - expect(function() { - transform.sync(fromToToProcessor({ - from: /re\splace/g, - to: 'b', - })); - }).to.throw(Error); - }); - - it('should support the encoding parameter', () => { - expect(function() { - transform.sync(fromToToProcessor({ - files: 'test1', - from: /re\splace/g, - to: 'b', - encoding: 'utf-8', - })); - }).to.not.throw(Error); - }); - - it('should fall back to utf-8 encoding with invalid configuration', () => { - expect(function() { - transform.sync(fromToToProcessor({ - files: 'test1', - from: /re\splace/g, - to: 'b', - encoding: '', - })); - }).to.not.throw(Error); - expect(function() { - transform.sync(fromToToProcessor({ - files: 'test1', - from: /re\splace/g, - to: 'b', - encoding: null, - })); - }).to.not.throw(Error); - }); - - it('should replace contents in a single file with regex', function() { - transform.sync(fromToToProcessor({ - files: 'test1', - from: /re\splace/g, - to: 'b', - })); - const test1 = fs.readFileSync('test1', 'utf8'); - const test2 = fs.readFileSync('test2', 'utf8'); - expect(test1).to.equal('a b c'); - expect(test2).to.equal(testData); - }); - - it('should replace contents with a string replacement', function() { - transform.sync(fromToToProcessor({ - files: 'test1', - from: 're place', - to: 'b', - })); - const test1 = fs.readFileSync('test1', 'utf8'); - expect(test1).to.equal('a b c'); - }); - - it('should replace contents in a an array of files', function() { - transform.sync(fromToToProcessor({ - files: ['test1', 'test2'], - from: /re\splace/g, - to: 'b', - })); - const test1 = fs.readFileSync('test1', 'utf8'); - const test2 = fs.readFileSync('test2', 'utf8'); - expect(test1).to.equal('a b c'); - expect(test2).to.equal('a b c'); - }); - - it('should expand globs', function() { - transform.sync(fromToToProcessor({ - files: 'test*', - from: /re\splace/g, - to: 'b', - })); - const test1 = fs.readFileSync('test1', 'utf8'); - const test2 = fs.readFileSync('test2', 'utf8'); - expect(test1).to.equal('a b c'); - expect(test2).to.equal('a b c'); - }); - - it('should return a results array', function() { - const results = transform.sync(fromToToProcessor({ - files: 'test1', - from: /re\splace/g, - to: 'b', - })); - expect(results).to.be.instanceof(Array); - expect(results).to.have.length(1); - expect(results[0].file).to.equal('test1'); - }); - - it('should mark if something was replaced', function() { - const results = transform.sync(fromToToProcessor({ - files: 'test1', - from: /re\splace/g, - to: 'b', - })); - expect(results[0].hasChanged).to.equal(true); - }); - - it('should not mark if nothing was replaced', function() { - const results = transform.sync(fromToToProcessor({ - files: 'test1', - from: 'nope', - to: 'b', - })); - expect(results[0].hasChanged).to.equal(false); - }); - - it('should return corret results for multiple files', function() { - const results = transform.sync(fromToToProcessor({ - files: ['test1', 'test2', 'test3'], - from: /re\splace/g, - to: 'b', - })); - expect(results).to.have.length(3); - expect(results[0].file).to.equal('test1'); - expect(results[0].hasChanged).to.equal(true); - expect(results[1].file).to.equal('test2'); - expect(results[1].hasChanged).to.equal(true); - expect(results[2].file).to.equal('test3'); - expect(results[2].hasChanged).to.equal(false); - }); - - it('should expand globs while excluding ignored files', () => { - transform.sync(fromToToProcessor({ - files: 'test*', - ignore: 'test1', - from: /re\splace/g, - to: 'b', - })); - const test1 = fs.readFileSync('test1', 'utf8'); - const test2 = fs.readFileSync('test2', 'utf8'); - expect(test1).to.equal('a re place c'); - expect(test2).to.equal('a b c'); - }); - - it('should support an array of ignored files', () => { - transform.sync(fromToToProcessor({ - files: 'test*', - ignore: ['test1', 'test3'], - from: /re\splace/g, - to: 'b', - })); - const test1 = fs.readFileSync('test1', 'utf8'); - const test2 = fs.readFileSync('test2', 'utf8'); - expect(test1).to.equal('a re place c'); - expect(test2).to.equal('a b c'); - }); - - it('should not fail when the ignore parameter is undefined', () => { - transform.sync(fromToToProcessor({ - files: 'test*', - ignore: undefined, - from: /re\splace/g, - to: 'b', - })); - const test1 = fs.readFileSync('test1', 'utf8'); - const test2 = fs.readFileSync('test2', 'utf8'); - expect(test1).to.equal('a b c'); - expect(test2).to.equal('a b c'); - }); - - it('should work without expanding globs if disabled', () => { - transform.sync(fromToToProcessor({ - files: ['test1', 'test2'], - from: /re\splace/g, - to: 'b', - disableGlobs: true, - })); - const test1 = fs.readFileSync('test1', 'utf8'); - const test2 = fs.readFileSync('test2', 'utf8'); - expect(test1).to.equal('a b c'); - expect(test2).to.equal('a b c'); - }); - - it('should not replace in a dry run', () => { - transform.sync(fromToToProcessor({ - files: ['test1', 'test2'], - from: /re\splace/g, - to: 'b', - dry: true, - })); - const test1 = fs.readFileSync('test1', 'utf8'); - const test2 = fs.readFileSync('test2', 'utf8'); - expect(test1).to.equal('a re place c'); - expect(test2).to.equal('a re place c'); - }); - - it('should return changed files for a dry run', () => { - const results = transform.sync(fromToToProcessor({ - files: ['test1', 'test2', 'test3'], - from: /re\splace/g, - to: 'b', - dry: true, - })); - expect(results).to.have.length(3); - expect(results[0].file).to.equal('test1'); - expect(results[0].hasChanged).to.equal(true); - expect(results[1].file).to.equal('test2'); - expect(results[1].hasChanged).to.equal(true); - expect(results[2].file).to.equal('test3'); - expect(results[2].hasChanged).to.equal(false); - }); - }); - - describe('module export', () => { - it('default module export refers to async replace implementation', () => { - expect(transform).to.be.a('function'); - }); - - it(`exports named processFile, processFileSync and sync from module facade`, () => { - expect(processFile).to.be.a('function'); - expect(processFileSync).to.be.a('function'); - expect(sync).to.be.a('function'); - }); - - it('exposes inner functions as own fields of transform', () => { - expect(transform.processFile).to.equal(transform); - expect(transform.sync).to.equal(processFileSync); - expect(transform.processFileSync).to.equal(processFileSync); - }); - }); -}); diff --git a/node_modules/replace-in-file/lib/replace-in-file.js b/node_modules/replace-in-file/lib/replace-in-file.js deleted file mode 100644 index 8891103..0000000 --- a/node_modules/replace-in-file/lib/replace-in-file.js +++ /dev/null @@ -1,104 +0,0 @@ -'use strict'; - -/** - * Dependencies - */ -const chalk = require('chalk'); -const parseConfig = require('./helpers/parse-config'); -const getPathsSync = require('./helpers/get-paths-sync'); -const getPathsAsync = require('./helpers/get-paths-async'); -const replaceSync = require('./helpers/replace-sync'); -const replaceAsync = require('./helpers/replace-async'); -const processFile = require('./process-file'); - -/** - * Replace in file helper - */ -function replaceInFile(config, cb) { - - // If custom processor is provided use it instead - if (config && config.processor) { - return processFile(config, cb); - } - - //Parse config - try { - config = parseConfig(config); - } - catch (error) { - if (typeof cb === 'function') { - return cb(error, null); - } - return Promise.reject(error); - } - - //Get config - const {files, from, to, dry, verbose} = config; - - //Dry run? - //istanbul ignore if: No need to test console logs - if (dry && verbose) { - console.log(chalk.yellow('Dry run, not making actual changes')); - } - - //Find paths - return getPathsAsync(files, config) - - //Make replacements - .then(paths => Promise.all( - paths.map(file => replaceAsync(file, from, to, config)) - )) - - //Success handler - .then(results => { - if (typeof cb === 'function') { - cb(null, results); - } - return results; - }) - - //Error handler - .catch(error => { - if (typeof cb === 'function') { - cb(error); - } - else { - throw error; - } - }); -} - -/** - * Sync API - */ -function replaceInFileSync(config) { - - // If custom processor is provided use it instead - if (config && config.processor) { - return processFile.processFileSync(config); - } - - //Parse config - config = parseConfig(config); - - //Get config, paths, and initialize changed files - const {files, from, to, dry, verbose} = config; - const paths = getPathsSync(files, config); - - //Dry run? - //istanbul ignore if: No need to test console logs - if (dry && verbose) { - console.log(chalk.yellow('Dry run, not making actual changes')); - } - - //Process synchronously and return results - return paths.map(path => replaceSync(path, from, to, config)); -} - -// Self-reference to support named import -replaceInFile.replaceInFile = replaceInFile; -replaceInFile.replaceInFileSync = replaceInFileSync; -replaceInFile.sync = replaceInFileSync; - -//Export -module.exports = replaceInFile; diff --git a/node_modules/replace-in-file/lib/replace-in-file.spec.js b/node_modules/replace-in-file/lib/replace-in-file.spec.js deleted file mode 100644 index 2bf39f8..0000000 --- a/node_modules/replace-in-file/lib/replace-in-file.spec.js +++ /dev/null @@ -1,1172 +0,0 @@ -'use strict'; - -/** - * Dependencies - */ -import replace, {sync, replaceInFile, replaceInFileSync} from './replace-in-file'; -const fs = require('fs'); -const writeFile = Promise.promisify(fs.writeFile); -const deleteFile = Promise.promisify(fs.unlink); - -/** - * Specifications - */ -describe('Replace in file', () => { - - //Test JSON - const testData = 'a re place c'; - - /** - * Prepare test files - */ - beforeEach(() => Promise.all([ - writeFile('test1', testData, 'utf8'), - writeFile('test2', testData, 'utf8'), - writeFile('test3', 'nope', 'utf8'), - ])); - - /** - * Clean up test files - */ - afterEach(() => Promise.all([ - deleteFile('test1'), - deleteFile('test2'), - deleteFile('test3'), - ])); - - /** - * Async with promises - */ - describe('Async with promises', () => { - - it('should throw an error when no config provided', () => { - return expect(replace()).to.eventually.be.rejectedWith(Error); - }); - - it('should throw an error when invalid config provided', () => { - return expect(replace(42)).to.eventually.be.rejectedWith(Error); - }); - - it('should throw an error when no `files` defined', () => { - return expect(replace({ - from: /re\splace/g, - to: 'b', - })).to.eventually.be.rejectedWith(Error); - }); - - it('should throw an error when no `from` defined', () => { - return expect(replace({ - files: 'test1', - to: 'b', - })).to.eventually.be.rejectedWith(Error); - }); - - it('should throw an error when no `to` defined', () => { - return expect(replace({ - files: 'test1', - from: /re\splace/g, - })).to.eventually.be.rejectedWith(Error); - }); - - it('should replace contents in a single file with regex', done => { - replace({ - files: 'test1', - from: /re\splace/g, - to: 'b', - }).then(() => { - const test1 = fs.readFileSync('test1', 'utf8'); - const test2 = fs.readFileSync('test2', 'utf8'); - expect(test1).to.equal('a b c'); - expect(test2).to.equal(testData); - done(); - }); - }); - - it('should pass file as an arg to a "from" function', done => { - replace({ - files: 'test1', - from: (file) => { - expect(file).to.equal('test1'); - return /re\splace/g; - }, - to: 'b', - }).then(() => { - const test1 = fs.readFileSync('test1', 'utf8'); - const test2 = fs.readFileSync('test2', 'utf8'); - expect(test1).to.equal('a b c'); - expect(test2).to.equal(testData); - done(); - }); - }); - - it(`should pass the match as first arg and file as last arg to a replacer function replace contents in a single file with regex`, done => { - replace({ - files: 'test1', - from: /re\splace/g, - to: (match, ...args) => { - const file = args.pop(); - expect(match).to.equal('re place'); - expect(file).to.equal('test1'); - return 'b'; - }, - }).then(() => { - const test1 = fs.readFileSync('test1', 'utf8'); - const test2 = fs.readFileSync('test2', 'utf8'); - expect(test1).to.equal('a b c'); - expect(test2).to.equal(testData); - done(); - }); - }); - - it('should replace contents with a string replacement', done => { - replace({ - files: 'test1', - from: 're place', - to: 'b', - }).then(() => { - const test1 = fs.readFileSync('test1', 'utf8'); - expect(test1).to.equal('a b c'); - done(); - }); - }); - - it(`should pass the match as first arg and file as last arg to a replacer function and replace contents with a string replacement`, done => { - replace({ - files: 'test1', - from: 're place', - to: (match, ...args) => { - const file = args.pop(); - expect(match).to.equal('re place'); - expect(file).to.equal('test1'); - return 'b'; - }, - }).then(() => { - const test1 = fs.readFileSync('test1', 'utf8'); - expect(test1).to.equal('a b c'); - done(); - }); - }); - - it('should replace contents in a an array of files', done => { - replace({ - files: ['test1', 'test2'], - from: /re\splace/g, - to: 'b', - }).then(() => { - const test1 = fs.readFileSync('test1', 'utf8'); - const test2 = fs.readFileSync('test2', 'utf8'); - expect(test1).to.equal('a b c'); - expect(test2).to.equal('a b c'); - done(); - }); - }); - - it('should expand globs', done => { - replace({ - files: 'test*', - from: /re\splace/g, - to: 'b', - }).then(() => { - const test1 = fs.readFileSync('test1', 'utf8'); - const test2 = fs.readFileSync('test2', 'utf8'); - expect(test1).to.equal('a b c'); - expect(test2).to.equal('a b c'); - done(); - }); - }); - - it('should expand globs while excluding ignored files', done => { - replace({ - files: 'test*', - ignore: 'test1', - from: /re\splace/g, - to: 'b', - }).then(() => { - const test1 = fs.readFileSync('test1', 'utf8'); - const test2 = fs.readFileSync('test2', 'utf8'); - expect(test1).to.equal('a re place c'); - expect(test2).to.equal('a b c'); - done(); - }); - }); - - it('should replace substrings', done => { - replace({ - files: 'test1', - from: /(re)\s(place)/g, - to: '$2 $1', - }).then(() => { - const test1 = fs.readFileSync('test1', 'utf8'); - expect(test1).to.equal('a place re c'); - done(); - }); - }); - - it('should fulfill the promise on success', () => { - return replace({ - files: 'test1', - from: /re\splace/g, - to: 'b', - }).should.be.fulfilled; - }); - - it('should reject the promise with an error on failure', () => { - return expect(replace({ - files: 'nope', - from: /re\splace/g, - to: 'b', - })).to.eventually.be.rejectedWith(Error); - }); - - it('should not reject the promise if allowEmptyPaths is true', () => { - return replace({ - files: 'nope', - allowEmptyPaths: true, - from: /re\splace/g, - to: 'b', - }).should.be.fulfilled; - }); - - it('should return a results array', done => { - replace({ - files: 'test1', - from: /re\splace/g, - to: 'b', - }).then(results => { - expect(results).to.be.instanceof(Array); - expect(results).to.have.length(1); - expect(results[0].file).to.equal('test1'); - done(); - }); - }); - - it('should mark if something was replaced', done => { - replace({ - files: 'test1', - from: /re\splace/g, - to: 'b', - }).then(results => { - expect(results[0].hasChanged).to.equal(true); - done(); - }); - }); - - it('should not mark if nothing was replaced', done => { - replace({ - files: 'test1', - from: 'nope', - to: 'b', - }).then(results => { - expect(results[0].hasChanged).to.equal(false); - done(); - }); - }); - - it('should return correct results for multiple files', done => { - replace({ - files: ['test1', 'test2', 'test3'], - from: /re\splace/g, - to: 'b', - }).then(results => { - expect(results).to.have.length(3); - expect(results[0].file).to.equal('test1'); - expect(results[0].hasChanged).to.equal(true); - expect(results[1].file).to.equal('test2'); - expect(results[1].hasChanged).to.equal(true); - expect(results[2].file).to.equal('test3'); - expect(results[2].hasChanged).to.equal(false); - done(); - }); - }); - - it('should make multiple replacements with the same string', done => { - replace({ - files: ['test1', 'test2', 'test3'], - from: [/re/g, /place/g], - to: 'b', - }).then(() => { - const test1 = fs.readFileSync('test1', 'utf8'); - const test2 = fs.readFileSync('test2', 'utf8'); - expect(test1).to.equal('a b b c'); - expect(test2).to.equal('a b b c'); - done(); - }); - }); - - it('should make multiple replacements with different strings', done => { - replace({ - files: ['test1', 'test2', 'test3'], - from: [/re/g, /place/g], - to: ['b', 'e'], - }).then(() => { - const test1 = fs.readFileSync('test1', 'utf8'); - const test2 = fs.readFileSync('test2', 'utf8'); - expect(test1).to.equal('a b e c'); - expect(test2).to.equal('a b e c'); - done(); - }); - }); - - it('should not replace with missing replacement values', done => { - replace({ - files: ['test1', 'test2', 'test3'], - from: [/re/g, /place/g], - to: ['b'], - }).then(() => { - const test1 = fs.readFileSync('test1', 'utf8'); - const test2 = fs.readFileSync('test2', 'utf8'); - expect(test1).to.equal('a b place c'); - expect(test2).to.equal('a b place c'); - done(); - }); - }); - - it('should not replace in a dry run', done => { - replace({ - files: ['test1', 'test2'], - from: /re\splace/g, - to: 'b', - dry: true, - }).then(() => { - const test1 = fs.readFileSync('test1', 'utf8'); - const test2 = fs.readFileSync('test2', 'utf8'); - expect(test1).to.equal('a re place c'); - expect(test2).to.equal('a re place c'); - done(); - }); - }); - - it('should return changed files for a dry run', done => { - replace({ - files: ['test1', 'test2', 'test3'], - from: /re\splace/g, - to: 'b', - dry: true, - }).then(results => { - expect(results).to.have.length(3); - expect(results[0].file).to.equal('test1'); - expect(results[0].hasChanged).to.equal(true); - expect(results[1].file).to.equal('test2'); - expect(results[1].hasChanged).to.equal(true); - expect(results[2].file).to.equal('test3'); - expect(results[2].hasChanged).to.equal(false); - done(); - }); - }); - - it('should accept glob configuration', done => { - replace({ - files: 'test1', - from: /re\splace/g, - to: 'b', - allowEmptyPaths: true, - glob: { - ignore: ['test1'], - }, - }).then(() => { - const test1 = fs.readFileSync('test1', 'utf8'); - expect(test1).to.equal('a re place c'); - done(); - }); - }); - - it('should ignore empty glob configuration', done => { - replace({ - files: 'test1', - from: /re\splace/g, - to: 'b', - glob: null, - }).then(() => { - const test1 = fs.readFileSync('test1', 'utf8'); - expect(test1).to.equal('a b c'); - done(); - }); - }); - - it('should count matches if specified in config', done => { - replace({ - files: 'test1', - from: [/re/g, /place/g], - to: 'test', - countMatches: true, - }).then(results => { - expect(results[0].numMatches).to.equal(2); - done(); - }); - }); - - it('should not count matches if not specified in config', done => { - replace({ - files: 'test1', - from: [/re/g, /place/g], - to: 'test', - }).then(results => { - expect(results[0].numMatches).to.be.undefined; - done(); - }); - }); - - it('should return 0 matches if match not found', done => { - replace({ - files: 'test1', - from: 'nope', - to: 'test', - countMatches: true, - }).then(results => { - expect(results[0].numMatches).to.equal(0); - done(); - }); - }); - }); - - /** - * Async with callback - */ - describe('Async with callback', () => { - - it('should throw an error when no config provided', done => { - replace(null, (error) => { - expect(error).to.be.instanceof(Error); - done(); - }); - }); - - it('should throw an error when invalid config provided', done => { - replace(42, (error) => { - expect(error).to.be.instanceof(Error); - done(); - }); - }); - - it('should throw an error when no `files` defined', done => { - replace({ - from: /re\splace/g, - to: 'b', - }, (error) => { - expect(error).to.be.instanceof(Error); - done(); - }); - }); - - it('should throw an error when no `from` defined', done => { - replace({ - files: 'test1', - to: 'b', - }, (error) => { - expect(error).to.be.instanceof(Error); - done(); - }); - }); - - it('should throw an error when no `to` defined', done => { - replace({ - files: 'test1', - from: /re\splace/g, - }, (error) => { - expect(error).to.be.instanceof(Error); - done(); - }); - }); - - it('should replace contents in a single file with regex', done => { - replace({ - files: 'test1', - from: /re\splace/g, - to: 'b', - }, () => { - const test1 = fs.readFileSync('test1', 'utf8'); - const test2 = fs.readFileSync('test2', 'utf8'); - expect(test1).to.equal('a b c'); - expect(test2).to.equal(testData); - done(); - }); - }); - - it('should pass file as an arg to a "from" function', done => { - replace({ - files: 'test1', - from: (file) => { - expect(file).to.equal('test1'); - return /re\splace/g; - }, - to: 'b', - }, () => { - const test1 = fs.readFileSync('test1', 'utf8'); - const test2 = fs.readFileSync('test2', 'utf8'); - expect(test1).to.equal('a b c'); - expect(test2).to.equal(testData); - done(); - }); - }); - - it(`should pass the match as first arg and file as last arg to a replacer function replace contents in a single file with regex`, done => { - replace({ - files: 'test1', - from: /re\splace/g, - to: (match, ...args) => { - const file = args.pop(); - expect(match).to.equal('re place'); - expect(file).to.equal('test1'); - return 'b'; - }, - }, () => { - const test1 = fs.readFileSync('test1', 'utf8'); - const test2 = fs.readFileSync('test2', 'utf8'); - expect(test1).to.equal('a b c'); - expect(test2).to.equal(testData); - done(); - }); - }); - - it('should replace contents with a string replacement', done => { - replace({ - files: 'test1', - from: 're place', - to: 'b', - }, () => { - const test1 = fs.readFileSync('test1', 'utf8'); - expect(test1).to.equal('a b c'); - done(); - }); - }); - - it(`should pass the match as first arg and file as last arg to a replacer function and replace contents with a string replacement`, done => { - replace({ - files: 'test1', - from: 're place', - to: (match, ...args) => { - const file = args.pop(); - expect(match).to.equal('re place'); - expect(file).to.equal('test1'); - return 'b'; - }, - }, () => { - const test1 = fs.readFileSync('test1', 'utf8'); - expect(test1).to.equal('a b c'); - done(); - }); - }); - - it('should replace contents in a an array of files', done => { - replace({ - files: ['test1', 'test2'], - from: /re\splace/g, - to: 'b', - }, () => { - const test1 = fs.readFileSync('test1', 'utf8'); - const test2 = fs.readFileSync('test2', 'utf8'); - expect(test1).to.equal('a b c'); - expect(test2).to.equal('a b c'); - done(); - }); - }); - - it('should expand globs', done => { - replace({ - files: 'test*', - from: /re\splace/g, - to: 'b', - }, () => { - const test1 = fs.readFileSync('test1', 'utf8'); - const test2 = fs.readFileSync('test2', 'utf8'); - expect(test1).to.equal('a b c'); - expect(test2).to.equal('a b c'); - done(); - }); - }); - - it('should expand globs while excluding ignored files', done => { - replace({ - files: 'test*', - ignore: 'test1', - from: /re\splace/g, - to: 'b', - }, () => { - const test1 = fs.readFileSync('test1', 'utf8'); - const test2 = fs.readFileSync('test2', 'utf8'); - expect(test1).to.equal('a re place c'); - expect(test2).to.equal('a b c'); - done(); - }); - }); - - it('should not return an error on success', done => { - replace({ - files: 'test1', - from: /re\splace/g, - to: 'b', - }, (error) => { - expect(error).to.equal(null); - done(); - }); - }); - - it('should return an error on failure', done => { - replace({ - files: 'nope', - from: /re\splace/g, - to: 'b', - }, (error) => { - expect(error).to.be.instanceof(Error); - done(); - }); - }); - - it('should not return an error if allowEmptyPaths is true', done => { - replace({ - files: 'nope', - allowEmptyPaths: true, - from: /re\splace/g, - to: 'b', - }, (error) => { - expect(error).to.equal(null); - done(); - }); - }); - - it('should return a results array', done => { - replace({ - files: 'test1', - from: /re\splace/g, - to: 'b', - }, (error, results) => { - expect(results).to.be.instanceof(Array); - expect(results).to.have.length(1); - expect(results[0].file).to.equal('test1'); - done(); - }); - }); - - it('should mark if something was replaced', done => { - replace({ - files: 'test1', - from: /re\splace/g, - to: 'b', - }, (error, results) => { - expect(results[0].hasChanged).to.equal(true); - done(); - }); - }); - - it('should not mark if nothing was replaced', done => { - replace({ - files: 'test1', - from: 'nope', - to: 'b', - }, (error, results) => { - expect(results[0].hasChanged).to.equal(false); - done(); - }); - }); - - it('should return correct results for multiple files', done => { - replace({ - files: ['test1', 'test2', 'test3'], - from: /re\splace/g, - to: 'b', - }, (error, results) => { - expect(results).to.have.length(3); - expect(results[0].file).to.equal('test1'); - expect(results[0].hasChanged).to.equal(true); - expect(results[1].file).to.equal('test2'); - expect(results[1].hasChanged).to.equal(true); - expect(results[2].file).to.equal('test3'); - expect(results[2].hasChanged).to.equal(false); - done(); - }); - }); - - it('should make multiple replacements with the same string', done => { - replace({ - files: ['test1', 'test2', 'test3'], - from: [/re/g, /place/g], - to: 'b', - }, () => { - const test1 = fs.readFileSync('test1', 'utf8'); - const test2 = fs.readFileSync('test2', 'utf8'); - expect(test1).to.equal('a b b c'); - expect(test2).to.equal('a b b c'); - done(); - }); - }); - - it('should make multiple replacements with different strings', done => { - replace({ - files: ['test1', 'test2', 'test3'], - from: [/re/g, /place/g], - to: ['b', 'e'], - }, () => { - const test1 = fs.readFileSync('test1', 'utf8'); - const test2 = fs.readFileSync('test2', 'utf8'); - expect(test1).to.equal('a b e c'); - expect(test2).to.equal('a b e c'); - done(); - }); - }); - - it('should not replace with missing replacement values', done => { - replace({ - files: ['test1', 'test2', 'test3'], - from: [/re/g, /place/g], - to: ['b'], - }, () => { - const test1 = fs.readFileSync('test1', 'utf8'); - const test2 = fs.readFileSync('test2', 'utf8'); - expect(test1).to.equal('a b place c'); - expect(test2).to.equal('a b place c'); - done(); - }); - }); - - it('should work without expanding globs if disabled', done => { - replace({ - files: ['test1', 'test2'], - from: /re\splace/g, - to: 'b', - disableGlobs: true, - }, () => { - const test1 = fs.readFileSync('test1', 'utf8'); - const test2 = fs.readFileSync('test2', 'utf8'); - expect(test1).to.equal('a b c'); - expect(test2).to.equal('a b c'); - done(); - }); - }); - - it('should count matches if specified in config', done => { - replace({ - files: 'test1', - from: [/re/g, /place/g], - to: 'test', - countMatches: true, - }, (error, results) => { - expect(results[0].numMatches).to.equal(2); - done(); - }); - }); - - it('should not count matches if not specified in config', done => { - replace({ - files: 'test1', - from: [/re/g, /place/g], - to: 'test', - }, (error, results) => { - expect(results[0].numMatches).to.be.undefined; - done(); - }); - }); - - it('should return 0 matches if match not found', done => { - replace({ - files: 'test1', - from: 'nope', - to: 'test', - countMatches: true, - }, (error, results) => { - expect(results[0].numMatches).to.equal(0); - done(); - }); - }); - }); - - /** - * Sync - */ - describe('Sync', () => { - - it('should throw an error when no config provided', () => { - expect(function() { - replace.sync(); - }).to.throw(Error); - }); - - it('should throw an error when invalid config provided', () => { - expect(function() { - replace.sync(42); - }).to.throw(Error); - }); - - it('should throw an error when no `files` defined', () => { - expect(function() { - replace.sync({ - from: /re\splace/g, - to: 'b', - }); - }).to.throw(Error); - }); - - it('should throw an error when no `from` defined', () => { - expect(function() { - replace.sync({ - files: 'test1', - to: 'b', - }); - }).to.throw(Error); - }); - - it('should throw an error when no `to` defined', () => { - expect(function() { - replace.sync({ - files: 'test1', - from: /re\splace/g, - }); - }).to.throw(Error); - }); - - it('should support the encoding parameter', () => { - expect(function() { - replace.sync({ - files: 'test1', - from: /re\splace/g, - to: 'b', - encoding: 'utf-8', - }); - }).to.not.throw(Error); - }); - - it('should fall back to utf-8 encoding with invalid configuration', () => { - expect(function() { - replace.sync({ - files: 'test1', - from: /re\splace/g, - to: 'b', - encoding: '', - }); - }).to.not.throw(Error); - expect(function() { - replace.sync({ - files: 'test1', - from: /re\splace/g, - to: 'b', - encoding: null, - }); - }).to.not.throw(Error); - }); - - it('should replace contents in a single file with regex', function() { - replace.sync({ - files: 'test1', - from: /re\splace/g, - to: 'b', - }); - const test1 = fs.readFileSync('test1', 'utf8'); - const test2 = fs.readFileSync('test2', 'utf8'); - expect(test1).to.equal('a b c'); - expect(test2).to.equal(testData); - }); - - it('should pass file as an arg to a "from" function', function() { - replace.sync({ - files: 'test1', - from: (file) => { - expect(file).to.equal('test1'); - return /re\splace/g; - }, - to: 'b', - }); - const test1 = fs.readFileSync('test1', 'utf8'); - const test2 = fs.readFileSync('test2', 'utf8'); - expect(test1).to.equal('a b c'); - expect(test2).to.equal(testData); - }); - - it(`should pass the match as first arg and file as last arg to a replacer function replace contents in a single file with regex`, function() { - replace.sync({ - files: 'test1', - from: /re\splace/g, - to: (match, ...args) => { - const file = args.pop(); - expect(match).to.equal('re place'); - expect(file).to.equal('test1'); - return 'b'; - }, - }); - const test1 = fs.readFileSync('test1', 'utf8'); - const test2 = fs.readFileSync('test2', 'utf8'); - expect(test1).to.equal('a b c'); - expect(test2).to.equal(testData); - }); - - it('should replace contents with a string replacement', function() { - replace.sync({ - files: 'test1', - from: 're place', - to: 'b', - }); - const test1 = fs.readFileSync('test1', 'utf8'); - expect(test1).to.equal('a b c'); - }); - - it(`should pass the match as first arg and file as last arg to a replacer function and replace contents with a string replacement`, function() { - replace.sync({ - files: 'test1', - from: 're place', - to: (match, ...args) => { - const file = args.pop(); - expect(match).to.equal('re place'); - expect(file).to.equal('test1'); - return 'b'; - }, - }); - const test1 = fs.readFileSync('test1', 'utf8'); - expect(test1).to.equal('a b c'); - }); - - it('should replace contents in a an array of files', function() { - replace.sync({ - files: ['test1', 'test2'], - from: /re\splace/g, - to: 'b', - }); - const test1 = fs.readFileSync('test1', 'utf8'); - const test2 = fs.readFileSync('test2', 'utf8'); - expect(test1).to.equal('a b c'); - expect(test2).to.equal('a b c'); - }); - - it('should expand globs', function() { - replace.sync({ - files: 'test*', - from: /re\splace/g, - to: 'b', - }); - const test1 = fs.readFileSync('test1', 'utf8'); - const test2 = fs.readFileSync('test2', 'utf8'); - expect(test1).to.equal('a b c'); - expect(test2).to.equal('a b c'); - }); - - it('should return a results array', function() { - const results = replace.sync({ - files: 'test1', - from: /re\splace/g, - to: 'b', - }); - expect(results).to.be.instanceof(Array); - expect(results).to.have.length(1); - expect(results[0].file).to.equal('test1'); - }); - - it('should mark if something was replaced', function() { - const results = replace.sync({ - files: 'test1', - from: /re\splace/g, - to: 'b', - }); - expect(results[0].hasChanged).to.equal(true); - }); - - it('should not mark if nothing was replaced', function() { - const results = replace.sync({ - files: 'test1', - from: 'nope', - to: 'b', - }); - expect(results[0].hasChanged).to.equal(false); - }); - - it('should return corret results for multiple files', function() { - const results = replace.sync({ - files: ['test1', 'test2', 'test3'], - from: /re\splace/g, - to: 'b', - }); - expect(results).to.have.length(3); - expect(results[0].file).to.equal('test1'); - expect(results[0].hasChanged).to.equal(true); - expect(results[1].file).to.equal('test2'); - expect(results[1].hasChanged).to.equal(true); - expect(results[2].file).to.equal('test3'); - expect(results[2].hasChanged).to.equal(false); - }); - - it('should make multiple replacements with the same string', () => { - replace.sync({ - files: ['test1', 'test2', 'test3'], - from: [/re/g, /place/g], - to: 'b', - }); - const test1 = fs.readFileSync('test1', 'utf8'); - const test2 = fs.readFileSync('test2', 'utf8'); - expect(test1).to.equal('a b b c'); - expect(test2).to.equal('a b b c'); - }); - - it('should make multiple replacements with different strings', () => { - replace.sync({ - files: ['test1', 'test2', 'test3'], - from: [/re/g, /place/g], - to: ['b', 'e'], - }); - const test1 = fs.readFileSync('test1', 'utf8'); - const test2 = fs.readFileSync('test2', 'utf8'); - expect(test1).to.equal('a b e c'); - expect(test2).to.equal('a b e c'); - }); - - it('should not replace with missing replacement values', () => { - replace.sync({ - files: ['test1', 'test2', 'test3'], - from: [/re/g, /place/g], - to: ['b'], - }); - const test1 = fs.readFileSync('test1', 'utf8'); - const test2 = fs.readFileSync('test2', 'utf8'); - expect(test1).to.equal('a b place c'); - expect(test2).to.equal('a b place c'); - }); - - it('should expand globs while excluding ignored files', () => { - replace.sync({ - files: 'test*', - ignore: 'test1', - from: /re\splace/g, - to: 'b', - }); - const test1 = fs.readFileSync('test1', 'utf8'); - const test2 = fs.readFileSync('test2', 'utf8'); - expect(test1).to.equal('a re place c'); - expect(test2).to.equal('a b c'); - }); - - it('should support an array of ignored files', () => { - replace.sync({ - files: 'test*', - ignore: ['test1', 'test3'], - from: /re\splace/g, - to: 'b', - }); - const test1 = fs.readFileSync('test1', 'utf8'); - const test2 = fs.readFileSync('test2', 'utf8'); - expect(test1).to.equal('a re place c'); - expect(test2).to.equal('a b c'); - }); - - it('should not fail when the ignore parameter is undefined', () => { - replace.sync({ - files: 'test*', - ignore: undefined, - from: /re\splace/g, - to: 'b', - }); - const test1 = fs.readFileSync('test1', 'utf8'); - const test2 = fs.readFileSync('test2', 'utf8'); - expect(test1).to.equal('a b c'); - expect(test2).to.equal('a b c'); - }); - - it('should work without expanding globs if disabled', () => { - replace.sync({ - files: ['test1', 'test2'], - from: /re\splace/g, - to: 'b', - disableGlobs: true, - }); - const test1 = fs.readFileSync('test1', 'utf8'); - const test2 = fs.readFileSync('test2', 'utf8'); - expect(test1).to.equal('a b c'); - expect(test2).to.equal('a b c'); - }); - - it('should not replace in a dry run', () => { - replace.sync({ - files: ['test1', 'test2'], - from: /re\splace/g, - to: 'b', - dry: true, - }); - const test1 = fs.readFileSync('test1', 'utf8'); - const test2 = fs.readFileSync('test2', 'utf8'); - expect(test1).to.equal('a re place c'); - expect(test2).to.equal('a re place c'); - }); - - it('should return changed files for a dry run', () => { - const results = replace.sync({ - files: ['test1', 'test2', 'test3'], - from: /re\splace/g, - to: 'b', - dry: true, - }); - expect(results).to.have.length(3); - expect(results[0].file).to.equal('test1'); - expect(results[0].hasChanged).to.equal(true); - expect(results[1].file).to.equal('test2'); - expect(results[1].hasChanged).to.equal(true); - expect(results[2].file).to.equal('test3'); - expect(results[2].hasChanged).to.equal(false); - }); - - it('should count matches and replacements if specified in config', () => { - const results = replace.sync({ - files: 'test1', - from: [/re/g, /place/g], - to: 'test', - countMatches: true, - }); - expect(results[0].numMatches).to.equal(2); - expect(results[0].numReplacements).to.equal(2); - }); - - it('should differentiate between matches and replacements', () => { - const results = replace.sync({ - files: 'test1', - from: [/re/g, /place/g], - to: 're', - countMatches: true, - }); - expect(results[0].numMatches).to.equal(2); - expect(results[0].numReplacements).to.equal(1); - }); - - it('should count multiple replacements correctly', () => { - const results = replace.sync({ - files: 'test1', - from: [/re/g, /place/g], - to: 'place', - countMatches: true, - }); - expect(results[0].numMatches).to.equal(3); - expect(results[0].numReplacements).to.equal(1); - }); - - it(`should not count matches or replacements if not specified in config`, () => { - const results = replace.sync({ - files: 'test1', - from: [/re/g, /place/g], - to: 'test', - }); - expect(results[0].numMatches).to.be.undefined; - expect(results[0].numReplacements).to.be.undefined; - }); - - it('should return 0 matches and replacements if match not found', () => { - const results = replace.sync({ - files: 'test1', - from: 'nope', - to: 'test', - countMatches: true, - }); - expect(results[0].numMatches).to.equal(0); - expect(results[0].numReplacements).to.equal(0); - }); - }); - - describe('module export', () => { - it('default module export refers to async replace implementation', () => { - expect(replace).to.be.a('function'); - }); - - it(`exports named replaceInFile, replaceInFileSync and sync from module facade`, () => { - expect(replaceInFile).to.be.a('function'); - expect(replaceInFileSync).to.be.a('function'); - expect(sync).to.be.a('function'); - }); - - it('exposes inner functions as own fields of replace', () => { - expect(replace.replaceInFile).to.equal(replace); - expect(replace.sync).to.equal(replaceInFileSync); - expect(replace.replaceInFileSync).to.equal(replaceInFileSync); - }); - }); -}); diff --git a/node_modules/replace-in-file/node_modules/glob/common.js b/node_modules/replace-in-file/node_modules/glob/common.js deleted file mode 100644 index 424c46e..0000000 --- a/node_modules/replace-in-file/node_modules/glob/common.js +++ /dev/null @@ -1,238 +0,0 @@ -exports.setopts = setopts -exports.ownProp = ownProp -exports.makeAbs = makeAbs -exports.finish = finish -exports.mark = mark -exports.isIgnored = isIgnored -exports.childrenIgnored = childrenIgnored - -function ownProp (obj, field) { - return Object.prototype.hasOwnProperty.call(obj, field) -} - -var fs = require("fs") -var path = require("path") -var minimatch = require("minimatch") -var isAbsolute = require("path-is-absolute") -var Minimatch = minimatch.Minimatch - -function alphasort (a, b) { - return a.localeCompare(b, 'en') -} - -function setupIgnores (self, options) { - self.ignore = options.ignore || [] - - if (!Array.isArray(self.ignore)) - self.ignore = [self.ignore] - - if (self.ignore.length) { - self.ignore = self.ignore.map(ignoreMap) - } -} - -// ignore patterns are always in dot:true mode. -function ignoreMap (pattern) { - var gmatcher = null - if (pattern.slice(-3) === '/**') { - var gpattern = pattern.replace(/(\/\*\*)+$/, '') - gmatcher = new Minimatch(gpattern, { dot: true }) - } - - return { - matcher: new Minimatch(pattern, { dot: true }), - gmatcher: gmatcher - } -} - -function setopts (self, pattern, options) { - if (!options) - options = {} - - // base-matching: just use globstar for that. - if (options.matchBase && -1 === pattern.indexOf("/")) { - if (options.noglobstar) { - throw new Error("base matching requires globstar") - } - pattern = "**/" + pattern - } - - self.silent = !!options.silent - self.pattern = pattern - self.strict = options.strict !== false - self.realpath = !!options.realpath - self.realpathCache = options.realpathCache || Object.create(null) - self.follow = !!options.follow - self.dot = !!options.dot - self.mark = !!options.mark - self.nodir = !!options.nodir - if (self.nodir) - self.mark = true - self.sync = !!options.sync - self.nounique = !!options.nounique - self.nonull = !!options.nonull - self.nosort = !!options.nosort - self.nocase = !!options.nocase - self.stat = !!options.stat - self.noprocess = !!options.noprocess - self.absolute = !!options.absolute - self.fs = options.fs || fs - - self.maxLength = options.maxLength || Infinity - self.cache = options.cache || Object.create(null) - self.statCache = options.statCache || Object.create(null) - self.symlinks = options.symlinks || Object.create(null) - - setupIgnores(self, options) - - self.changedCwd = false - var cwd = process.cwd() - if (!ownProp(options, "cwd")) - self.cwd = cwd - else { - self.cwd = path.resolve(options.cwd) - self.changedCwd = self.cwd !== cwd - } - - self.root = options.root || path.resolve(self.cwd, "/") - self.root = path.resolve(self.root) - if (process.platform === "win32") - self.root = self.root.replace(/\\/g, "/") - - // TODO: is an absolute `cwd` supposed to be resolved against `root`? - // e.g. { cwd: '/test', root: __dirname } === path.join(__dirname, '/test') - self.cwdAbs = isAbsolute(self.cwd) ? self.cwd : makeAbs(self, self.cwd) - if (process.platform === "win32") - self.cwdAbs = self.cwdAbs.replace(/\\/g, "/") - self.nomount = !!options.nomount - - // disable comments and negation in Minimatch. - // Note that they are not supported in Glob itself anyway. - options.nonegate = true - options.nocomment = true - // always treat \ in patterns as escapes, not path separators - options.allowWindowsEscape = false - - self.minimatch = new Minimatch(pattern, options) - self.options = self.minimatch.options -} - -function finish (self) { - var nou = self.nounique - var all = nou ? [] : Object.create(null) - - for (var i = 0, l = self.matches.length; i < l; i ++) { - var matches = self.matches[i] - if (!matches || Object.keys(matches).length === 0) { - if (self.nonull) { - // do like the shell, and spit out the literal glob - var literal = self.minimatch.globSet[i] - if (nou) - all.push(literal) - else - all[literal] = true - } - } else { - // had matches - var m = Object.keys(matches) - if (nou) - all.push.apply(all, m) - else - m.forEach(function (m) { - all[m] = true - }) - } - } - - if (!nou) - all = Object.keys(all) - - if (!self.nosort) - all = all.sort(alphasort) - - // at *some* point we statted all of these - if (self.mark) { - for (var i = 0; i < all.length; i++) { - all[i] = self._mark(all[i]) - } - if (self.nodir) { - all = all.filter(function (e) { - var notDir = !(/\/$/.test(e)) - var c = self.cache[e] || self.cache[makeAbs(self, e)] - if (notDir && c) - notDir = c !== 'DIR' && !Array.isArray(c) - return notDir - }) - } - } - - if (self.ignore.length) - all = all.filter(function(m) { - return !isIgnored(self, m) - }) - - self.found = all -} - -function mark (self, p) { - var abs = makeAbs(self, p) - var c = self.cache[abs] - var m = p - if (c) { - var isDir = c === 'DIR' || Array.isArray(c) - var slash = p.slice(-1) === '/' - - if (isDir && !slash) - m += '/' - else if (!isDir && slash) - m = m.slice(0, -1) - - if (m !== p) { - var mabs = makeAbs(self, m) - self.statCache[mabs] = self.statCache[abs] - self.cache[mabs] = self.cache[abs] - } - } - - return m -} - -// lotta situps... -function makeAbs (self, f) { - var abs = f - if (f.charAt(0) === '/') { - abs = path.join(self.root, f) - } else if (isAbsolute(f) || f === '') { - abs = f - } else if (self.changedCwd) { - abs = path.resolve(self.cwd, f) - } else { - abs = path.resolve(f) - } - - if (process.platform === 'win32') - abs = abs.replace(/\\/g, '/') - - return abs -} - - -// Return true, if pattern ends with globstar '**', for the accompanying parent directory. -// Ex:- If node_modules/** is the pattern, add 'node_modules' to ignore list along with it's contents -function isIgnored (self, path) { - if (!self.ignore.length) - return false - - return self.ignore.some(function(item) { - return item.matcher.match(path) || !!(item.gmatcher && item.gmatcher.match(path)) - }) -} - -function childrenIgnored (self, path) { - if (!self.ignore.length) - return false - - return self.ignore.some(function(item) { - return !!(item.gmatcher && item.gmatcher.match(path)) - }) -} diff --git a/node_modules/replace-in-file/node_modules/glob/glob.js b/node_modules/replace-in-file/node_modules/glob/glob.js deleted file mode 100644 index 37a4d7e..0000000 --- a/node_modules/replace-in-file/node_modules/glob/glob.js +++ /dev/null @@ -1,790 +0,0 @@ -// Approach: -// -// 1. Get the minimatch set -// 2. For each pattern in the set, PROCESS(pattern, false) -// 3. Store matches per-set, then uniq them -// -// PROCESS(pattern, inGlobStar) -// Get the first [n] items from pattern that are all strings -// Join these together. This is PREFIX. -// If there is no more remaining, then stat(PREFIX) and -// add to matches if it succeeds. END. -// -// If inGlobStar and PREFIX is symlink and points to dir -// set ENTRIES = [] -// else readdir(PREFIX) as ENTRIES -// If fail, END -// -// with ENTRIES -// If pattern[n] is GLOBSTAR -// // handle the case where the globstar match is empty -// // by pruning it out, and testing the resulting pattern -// PROCESS(pattern[0..n] + pattern[n+1 .. $], false) -// // handle other cases. -// for ENTRY in ENTRIES (not dotfiles) -// // attach globstar + tail onto the entry -// // Mark that this entry is a globstar match -// PROCESS(pattern[0..n] + ENTRY + pattern[n .. $], true) -// -// else // not globstar -// for ENTRY in ENTRIES (not dotfiles, unless pattern[n] is dot) -// Test ENTRY against pattern[n] -// If fails, continue -// If passes, PROCESS(pattern[0..n] + item + pattern[n+1 .. $]) -// -// Caveat: -// Cache all stats and readdirs results to minimize syscall. Since all -// we ever care about is existence and directory-ness, we can just keep -// `true` for files, and [children,...] for directories, or `false` for -// things that don't exist. - -module.exports = glob - -var rp = require('fs.realpath') -var minimatch = require('minimatch') -var Minimatch = minimatch.Minimatch -var inherits = require('inherits') -var EE = require('events').EventEmitter -var path = require('path') -var assert = require('assert') -var isAbsolute = require('path-is-absolute') -var globSync = require('./sync.js') -var common = require('./common.js') -var setopts = common.setopts -var ownProp = common.ownProp -var inflight = require('inflight') -var util = require('util') -var childrenIgnored = common.childrenIgnored -var isIgnored = common.isIgnored - -var once = require('once') - -function glob (pattern, options, cb) { - if (typeof options === 'function') cb = options, options = {} - if (!options) options = {} - - if (options.sync) { - if (cb) - throw new TypeError('callback provided to sync glob') - return globSync(pattern, options) - } - - return new Glob(pattern, options, cb) -} - -glob.sync = globSync -var GlobSync = glob.GlobSync = globSync.GlobSync - -// old api surface -glob.glob = glob - -function extend (origin, add) { - if (add === null || typeof add !== 'object') { - return origin - } - - var keys = Object.keys(add) - var i = keys.length - while (i--) { - origin[keys[i]] = add[keys[i]] - } - return origin -} - -glob.hasMagic = function (pattern, options_) { - var options = extend({}, options_) - options.noprocess = true - - var g = new Glob(pattern, options) - var set = g.minimatch.set - - if (!pattern) - return false - - if (set.length > 1) - return true - - for (var j = 0; j < set[0].length; j++) { - if (typeof set[0][j] !== 'string') - return true - } - - return false -} - -glob.Glob = Glob -inherits(Glob, EE) -function Glob (pattern, options, cb) { - if (typeof options === 'function') { - cb = options - options = null - } - - if (options && options.sync) { - if (cb) - throw new TypeError('callback provided to sync glob') - return new GlobSync(pattern, options) - } - - if (!(this instanceof Glob)) - return new Glob(pattern, options, cb) - - setopts(this, pattern, options) - this._didRealPath = false - - // process each pattern in the minimatch set - var n = this.minimatch.set.length - - // The matches are stored as {<filename>: true,...} so that - // duplicates are automagically pruned. - // Later, we do an Object.keys() on these. - // Keep them as a list so we can fill in when nonull is set. - this.matches = new Array(n) - - if (typeof cb === 'function') { - cb = once(cb) - this.on('error', cb) - this.on('end', function (matches) { - cb(null, matches) - }) - } - - var self = this - this._processing = 0 - - this._emitQueue = [] - this._processQueue = [] - this.paused = false - - if (this.noprocess) - return this - - if (n === 0) - return done() - - var sync = true - for (var i = 0; i < n; i ++) { - this._process(this.minimatch.set[i], i, false, done) - } - sync = false - - function done () { - --self._processing - if (self._processing <= 0) { - if (sync) { - process.nextTick(function () { - self._finish() - }) - } else { - self._finish() - } - } - } -} - -Glob.prototype._finish = function () { - assert(this instanceof Glob) - if (this.aborted) - return - - if (this.realpath && !this._didRealpath) - return this._realpath() - - common.finish(this) - this.emit('end', this.found) -} - -Glob.prototype._realpath = function () { - if (this._didRealpath) - return - - this._didRealpath = true - - var n = this.matches.length - if (n === 0) - return this._finish() - - var self = this - for (var i = 0; i < this.matches.length; i++) - this._realpathSet(i, next) - - function next () { - if (--n === 0) - self._finish() - } -} - -Glob.prototype._realpathSet = function (index, cb) { - var matchset = this.matches[index] - if (!matchset) - return cb() - - var found = Object.keys(matchset) - var self = this - var n = found.length - - if (n === 0) - return cb() - - var set = this.matches[index] = Object.create(null) - found.forEach(function (p, i) { - // If there's a problem with the stat, then it means that - // one or more of the links in the realpath couldn't be - // resolved. just return the abs value in that case. - p = self._makeAbs(p) - rp.realpath(p, self.realpathCache, function (er, real) { - if (!er) - set[real] = true - else if (er.syscall === 'stat') - set[p] = true - else - self.emit('error', er) // srsly wtf right here - - if (--n === 0) { - self.matches[index] = set - cb() - } - }) - }) -} - -Glob.prototype._mark = function (p) { - return common.mark(this, p) -} - -Glob.prototype._makeAbs = function (f) { - return common.makeAbs(this, f) -} - -Glob.prototype.abort = function () { - this.aborted = true - this.emit('abort') -} - -Glob.prototype.pause = function () { - if (!this.paused) { - this.paused = true - this.emit('pause') - } -} - -Glob.prototype.resume = function () { - if (this.paused) { - this.emit('resume') - this.paused = false - if (this._emitQueue.length) { - var eq = this._emitQueue.slice(0) - this._emitQueue.length = 0 - for (var i = 0; i < eq.length; i ++) { - var e = eq[i] - this._emitMatch(e[0], e[1]) - } - } - if (this._processQueue.length) { - var pq = this._processQueue.slice(0) - this._processQueue.length = 0 - for (var i = 0; i < pq.length; i ++) { - var p = pq[i] - this._processing-- - this._process(p[0], p[1], p[2], p[3]) - } - } - } -} - -Glob.prototype._process = function (pattern, index, inGlobStar, cb) { - assert(this instanceof Glob) - assert(typeof cb === 'function') - - if (this.aborted) - return - - this._processing++ - if (this.paused) { - this._processQueue.push([pattern, index, inGlobStar, cb]) - return - } - - //console.error('PROCESS %d', this._processing, pattern) - - // Get the first [n] parts of pattern that are all strings. - var n = 0 - while (typeof pattern[n] === 'string') { - n ++ - } - // now n is the index of the first one that is *not* a string. - - // see if there's anything else - var prefix - switch (n) { - // if not, then this is rather simple - case pattern.length: - this._processSimple(pattern.join('/'), index, cb) - return - - case 0: - // pattern *starts* with some non-trivial item. - // going to readdir(cwd), but not include the prefix in matches. - prefix = null - break - - default: - // pattern has some string bits in the front. - // whatever it starts with, whether that's 'absolute' like /foo/bar, - // or 'relative' like '../baz' - prefix = pattern.slice(0, n).join('/') - break - } - - var remain = pattern.slice(n) - - // get the list of entries. - var read - if (prefix === null) - read = '.' - else if (isAbsolute(prefix) || - isAbsolute(pattern.map(function (p) { - return typeof p === 'string' ? p : '[*]' - }).join('/'))) { - if (!prefix || !isAbsolute(prefix)) - prefix = '/' + prefix - read = prefix - } else - read = prefix - - var abs = this._makeAbs(read) - - //if ignored, skip _processing - if (childrenIgnored(this, read)) - return cb() - - var isGlobStar = remain[0] === minimatch.GLOBSTAR - if (isGlobStar) - this._processGlobStar(prefix, read, abs, remain, index, inGlobStar, cb) - else - this._processReaddir(prefix, read, abs, remain, index, inGlobStar, cb) -} - -Glob.prototype._processReaddir = function (prefix, read, abs, remain, index, inGlobStar, cb) { - var self = this - this._readdir(abs, inGlobStar, function (er, entries) { - return self._processReaddir2(prefix, read, abs, remain, index, inGlobStar, entries, cb) - }) -} - -Glob.prototype._processReaddir2 = function (prefix, read, abs, remain, index, inGlobStar, entries, cb) { - - // if the abs isn't a dir, then nothing can match! - if (!entries) - return cb() - - // It will only match dot entries if it starts with a dot, or if - // dot is set. Stuff like @(.foo|.bar) isn't allowed. - var pn = remain[0] - var negate = !!this.minimatch.negate - var rawGlob = pn._glob - var dotOk = this.dot || rawGlob.charAt(0) === '.' - - var matchedEntries = [] - for (var i = 0; i < entries.length; i++) { - var e = entries[i] - if (e.charAt(0) !== '.' || dotOk) { - var m - if (negate && !prefix) { - m = !e.match(pn) - } else { - m = e.match(pn) - } - if (m) - matchedEntries.push(e) - } - } - - //console.error('prd2', prefix, entries, remain[0]._glob, matchedEntries) - - var len = matchedEntries.length - // If there are no matched entries, then nothing matches. - if (len === 0) - return cb() - - // if this is the last remaining pattern bit, then no need for - // an additional stat *unless* the user has specified mark or - // stat explicitly. We know they exist, since readdir returned - // them. - - if (remain.length === 1 && !this.mark && !this.stat) { - if (!this.matches[index]) - this.matches[index] = Object.create(null) - - for (var i = 0; i < len; i ++) { - var e = matchedEntries[i] - if (prefix) { - if (prefix !== '/') - e = prefix + '/' + e - else - e = prefix + e - } - - if (e.charAt(0) === '/' && !this.nomount) { - e = path.join(this.root, e) - } - this._emitMatch(index, e) - } - // This was the last one, and no stats were needed - return cb() - } - - // now test all matched entries as stand-ins for that part - // of the pattern. - remain.shift() - for (var i = 0; i < len; i ++) { - var e = matchedEntries[i] - var newPattern - if (prefix) { - if (prefix !== '/') - e = prefix + '/' + e - else - e = prefix + e - } - this._process([e].concat(remain), index, inGlobStar, cb) - } - cb() -} - -Glob.prototype._emitMatch = function (index, e) { - if (this.aborted) - return - - if (isIgnored(this, e)) - return - - if (this.paused) { - this._emitQueue.push([index, e]) - return - } - - var abs = isAbsolute(e) ? e : this._makeAbs(e) - - if (this.mark) - e = this._mark(e) - - if (this.absolute) - e = abs - - if (this.matches[index][e]) - return - - if (this.nodir) { - var c = this.cache[abs] - if (c === 'DIR' || Array.isArray(c)) - return - } - - this.matches[index][e] = true - - var st = this.statCache[abs] - if (st) - this.emit('stat', e, st) - - this.emit('match', e) -} - -Glob.prototype._readdirInGlobStar = function (abs, cb) { - if (this.aborted) - return - - // follow all symlinked directories forever - // just proceed as if this is a non-globstar situation - if (this.follow) - return this._readdir(abs, false, cb) - - var lstatkey = 'lstat\0' + abs - var self = this - var lstatcb = inflight(lstatkey, lstatcb_) - - if (lstatcb) - self.fs.lstat(abs, lstatcb) - - function lstatcb_ (er, lstat) { - if (er && er.code === 'ENOENT') - return cb() - - var isSym = lstat && lstat.isSymbolicLink() - self.symlinks[abs] = isSym - - // If it's not a symlink or a dir, then it's definitely a regular file. - // don't bother doing a readdir in that case. - if (!isSym && lstat && !lstat.isDirectory()) { - self.cache[abs] = 'FILE' - cb() - } else - self._readdir(abs, false, cb) - } -} - -Glob.prototype._readdir = function (abs, inGlobStar, cb) { - if (this.aborted) - return - - cb = inflight('readdir\0'+abs+'\0'+inGlobStar, cb) - if (!cb) - return - - //console.error('RD %j %j', +inGlobStar, abs) - if (inGlobStar && !ownProp(this.symlinks, abs)) - return this._readdirInGlobStar(abs, cb) - - if (ownProp(this.cache, abs)) { - var c = this.cache[abs] - if (!c || c === 'FILE') - return cb() - - if (Array.isArray(c)) - return cb(null, c) - } - - var self = this - self.fs.readdir(abs, readdirCb(this, abs, cb)) -} - -function readdirCb (self, abs, cb) { - return function (er, entries) { - if (er) - self._readdirError(abs, er, cb) - else - self._readdirEntries(abs, entries, cb) - } -} - -Glob.prototype._readdirEntries = function (abs, entries, cb) { - if (this.aborted) - return - - // if we haven't asked to stat everything, then just - // assume that everything in there exists, so we can avoid - // having to stat it a second time. - if (!this.mark && !this.stat) { - for (var i = 0; i < entries.length; i ++) { - var e = entries[i] - if (abs === '/') - e = abs + e - else - e = abs + '/' + e - this.cache[e] = true - } - } - - this.cache[abs] = entries - return cb(null, entries) -} - -Glob.prototype._readdirError = function (f, er, cb) { - if (this.aborted) - return - - // handle errors, and cache the information - switch (er.code) { - case 'ENOTSUP': // https://github.com/isaacs/node-glob/issues/205 - case 'ENOTDIR': // totally normal. means it *does* exist. - var abs = this._makeAbs(f) - this.cache[abs] = 'FILE' - if (abs === this.cwdAbs) { - var error = new Error(er.code + ' invalid cwd ' + this.cwd) - error.path = this.cwd - error.code = er.code - this.emit('error', error) - this.abort() - } - break - - case 'ENOENT': // not terribly unusual - case 'ELOOP': - case 'ENAMETOOLONG': - case 'UNKNOWN': - this.cache[this._makeAbs(f)] = false - break - - default: // some unusual error. Treat as failure. - this.cache[this._makeAbs(f)] = false - if (this.strict) { - this.emit('error', er) - // If the error is handled, then we abort - // if not, we threw out of here - this.abort() - } - if (!this.silent) - console.error('glob error', er) - break - } - - return cb() -} - -Glob.prototype._processGlobStar = function (prefix, read, abs, remain, index, inGlobStar, cb) { - var self = this - this._readdir(abs, inGlobStar, function (er, entries) { - self._processGlobStar2(prefix, read, abs, remain, index, inGlobStar, entries, cb) - }) -} - - -Glob.prototype._processGlobStar2 = function (prefix, read, abs, remain, index, inGlobStar, entries, cb) { - //console.error('pgs2', prefix, remain[0], entries) - - // no entries means not a dir, so it can never have matches - // foo.txt/** doesn't match foo.txt - if (!entries) - return cb() - - // test without the globstar, and with every child both below - // and replacing the globstar. - var remainWithoutGlobStar = remain.slice(1) - var gspref = prefix ? [ prefix ] : [] - var noGlobStar = gspref.concat(remainWithoutGlobStar) - - // the noGlobStar pattern exits the inGlobStar state - this._process(noGlobStar, index, false, cb) - - var isSym = this.symlinks[abs] - var len = entries.length - - // If it's a symlink, and we're in a globstar, then stop - if (isSym && inGlobStar) - return cb() - - for (var i = 0; i < len; i++) { - var e = entries[i] - if (e.charAt(0) === '.' && !this.dot) - continue - - // these two cases enter the inGlobStar state - var instead = gspref.concat(entries[i], remainWithoutGlobStar) - this._process(instead, index, true, cb) - - var below = gspref.concat(entries[i], remain) - this._process(below, index, true, cb) - } - - cb() -} - -Glob.prototype._processSimple = function (prefix, index, cb) { - // XXX review this. Shouldn't it be doing the mounting etc - // before doing stat? kinda weird? - var self = this - this._stat(prefix, function (er, exists) { - self._processSimple2(prefix, index, er, exists, cb) - }) -} -Glob.prototype._processSimple2 = function (prefix, index, er, exists, cb) { - - //console.error('ps2', prefix, exists) - - if (!this.matches[index]) - this.matches[index] = Object.create(null) - - // If it doesn't exist, then just mark the lack of results - if (!exists) - return cb() - - if (prefix && isAbsolute(prefix) && !this.nomount) { - var trail = /[\/\\]$/.test(prefix) - if (prefix.charAt(0) === '/') { - prefix = path.join(this.root, prefix) - } else { - prefix = path.resolve(this.root, prefix) - if (trail) - prefix += '/' - } - } - - if (process.platform === 'win32') - prefix = prefix.replace(/\\/g, '/') - - // Mark this as a match - this._emitMatch(index, prefix) - cb() -} - -// Returns either 'DIR', 'FILE', or false -Glob.prototype._stat = function (f, cb) { - var abs = this._makeAbs(f) - var needDir = f.slice(-1) === '/' - - if (f.length > this.maxLength) - return cb() - - if (!this.stat && ownProp(this.cache, abs)) { - var c = this.cache[abs] - - if (Array.isArray(c)) - c = 'DIR' - - // It exists, but maybe not how we need it - if (!needDir || c === 'DIR') - return cb(null, c) - - if (needDir && c === 'FILE') - return cb() - - // otherwise we have to stat, because maybe c=true - // if we know it exists, but not what it is. - } - - var exists - var stat = this.statCache[abs] - if (stat !== undefined) { - if (stat === false) - return cb(null, stat) - else { - var type = stat.isDirectory() ? 'DIR' : 'FILE' - if (needDir && type === 'FILE') - return cb() - else - return cb(null, type, stat) - } - } - - var self = this - var statcb = inflight('stat\0' + abs, lstatcb_) - if (statcb) - self.fs.lstat(abs, statcb) - - function lstatcb_ (er, lstat) { - if (lstat && lstat.isSymbolicLink()) { - // If it's a symlink, then treat it as the target, unless - // the target does not exist, then treat it as a file. - return self.fs.stat(abs, function (er, stat) { - if (er) - self._stat2(f, abs, null, lstat, cb) - else - self._stat2(f, abs, er, stat, cb) - }) - } else { - self._stat2(f, abs, er, lstat, cb) - } - } -} - -Glob.prototype._stat2 = function (f, abs, er, stat, cb) { - if (er && (er.code === 'ENOENT' || er.code === 'ENOTDIR')) { - this.statCache[abs] = false - return cb() - } - - var needDir = f.slice(-1) === '/' - this.statCache[abs] = stat - - if (abs.slice(-1) === '/' && stat && !stat.isDirectory()) - return cb(null, false, stat) - - var c = true - if (stat) - c = stat.isDirectory() ? 'DIR' : 'FILE' - this.cache[abs] = this.cache[abs] || c - - if (needDir && c === 'FILE') - return cb() - - return cb(null, c, stat) -} diff --git a/node_modules/replace-in-file/node_modules/glob/package.json b/node_modules/replace-in-file/node_modules/glob/package.json deleted file mode 100644 index 5940b64..0000000 --- a/node_modules/replace-in-file/node_modules/glob/package.json +++ /dev/null @@ -1,55 +0,0 @@ -{ - "author": "Isaac Z. Schlueter <i@izs.me> (http://blog.izs.me/)", - "name": "glob", - "description": "a little globber", - "version": "7.2.3", - "publishConfig": { - "tag": "v7-legacy" - }, - "repository": { - "type": "git", - "url": "git://github.com/isaacs/node-glob.git" - }, - "main": "glob.js", - "files": [ - "glob.js", - "sync.js", - "common.js" - ], - "engines": { - "node": "*" - }, - "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.1.1", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - }, - "devDependencies": { - "memfs": "^3.2.0", - "mkdirp": "0", - "rimraf": "^2.2.8", - "tap": "^15.0.6", - "tick": "0.0.6" - }, - "tap": { - "before": "test/00-setup.js", - "after": "test/zz-cleanup.js", - "jobs": 1 - }, - "scripts": { - "prepublish": "npm run benchclean", - "profclean": "rm -f v8.log profile.txt", - "test": "tap", - "test-regen": "npm run profclean && TEST_REGEN=1 node test/00-setup.js", - "bench": "bash benchmark.sh", - "prof": "bash prof.sh && cat profile.txt", - "benchclean": "node benchclean.js" - }, - "license": "ISC", - "funding": { - "url": "https://github.com/sponsors/isaacs" - } -} diff --git a/node_modules/replace-in-file/node_modules/glob/sync.js b/node_modules/replace-in-file/node_modules/glob/sync.js deleted file mode 100644 index 2c4f480..0000000 --- a/node_modules/replace-in-file/node_modules/glob/sync.js +++ /dev/null @@ -1,486 +0,0 @@ -module.exports = globSync -globSync.GlobSync = GlobSync - -var rp = require('fs.realpath') -var minimatch = require('minimatch') -var Minimatch = minimatch.Minimatch -var Glob = require('./glob.js').Glob -var util = require('util') -var path = require('path') -var assert = require('assert') -var isAbsolute = require('path-is-absolute') -var common = require('./common.js') -var setopts = common.setopts -var ownProp = common.ownProp -var childrenIgnored = common.childrenIgnored -var isIgnored = common.isIgnored - -function globSync (pattern, options) { - if (typeof options === 'function' || arguments.length === 3) - throw new TypeError('callback provided to sync glob\n'+ - 'See: https://github.com/isaacs/node-glob/issues/167') - - return new GlobSync(pattern, options).found -} - -function GlobSync (pattern, options) { - if (!pattern) - throw new Error('must provide pattern') - - if (typeof options === 'function' || arguments.length === 3) - throw new TypeError('callback provided to sync glob\n'+ - 'See: https://github.com/isaacs/node-glob/issues/167') - - if (!(this instanceof GlobSync)) - return new GlobSync(pattern, options) - - setopts(this, pattern, options) - - if (this.noprocess) - return this - - var n = this.minimatch.set.length - this.matches = new Array(n) - for (var i = 0; i < n; i ++) { - this._process(this.minimatch.set[i], i, false) - } - this._finish() -} - -GlobSync.prototype._finish = function () { - assert.ok(this instanceof GlobSync) - if (this.realpath) { - var self = this - this.matches.forEach(function (matchset, index) { - var set = self.matches[index] = Object.create(null) - for (var p in matchset) { - try { - p = self._makeAbs(p) - var real = rp.realpathSync(p, self.realpathCache) - set[real] = true - } catch (er) { - if (er.syscall === 'stat') - set[self._makeAbs(p)] = true - else - throw er - } - } - }) - } - common.finish(this) -} - - -GlobSync.prototype._process = function (pattern, index, inGlobStar) { - assert.ok(this instanceof GlobSync) - - // Get the first [n] parts of pattern that are all strings. - var n = 0 - while (typeof pattern[n] === 'string') { - n ++ - } - // now n is the index of the first one that is *not* a string. - - // See if there's anything else - var prefix - switch (n) { - // if not, then this is rather simple - case pattern.length: - this._processSimple(pattern.join('/'), index) - return - - case 0: - // pattern *starts* with some non-trivial item. - // going to readdir(cwd), but not include the prefix in matches. - prefix = null - break - - default: - // pattern has some string bits in the front. - // whatever it starts with, whether that's 'absolute' like /foo/bar, - // or 'relative' like '../baz' - prefix = pattern.slice(0, n).join('/') - break - } - - var remain = pattern.slice(n) - - // get the list of entries. - var read - if (prefix === null) - read = '.' - else if (isAbsolute(prefix) || - isAbsolute(pattern.map(function (p) { - return typeof p === 'string' ? p : '[*]' - }).join('/'))) { - if (!prefix || !isAbsolute(prefix)) - prefix = '/' + prefix - read = prefix - } else - read = prefix - - var abs = this._makeAbs(read) - - //if ignored, skip processing - if (childrenIgnored(this, read)) - return - - var isGlobStar = remain[0] === minimatch.GLOBSTAR - if (isGlobStar) - this._processGlobStar(prefix, read, abs, remain, index, inGlobStar) - else - this._processReaddir(prefix, read, abs, remain, index, inGlobStar) -} - - -GlobSync.prototype._processReaddir = function (prefix, read, abs, remain, index, inGlobStar) { - var entries = this._readdir(abs, inGlobStar) - - // if the abs isn't a dir, then nothing can match! - if (!entries) - return - - // It will only match dot entries if it starts with a dot, or if - // dot is set. Stuff like @(.foo|.bar) isn't allowed. - var pn = remain[0] - var negate = !!this.minimatch.negate - var rawGlob = pn._glob - var dotOk = this.dot || rawGlob.charAt(0) === '.' - - var matchedEntries = [] - for (var i = 0; i < entries.length; i++) { - var e = entries[i] - if (e.charAt(0) !== '.' || dotOk) { - var m - if (negate && !prefix) { - m = !e.match(pn) - } else { - m = e.match(pn) - } - if (m) - matchedEntries.push(e) - } - } - - var len = matchedEntries.length - // If there are no matched entries, then nothing matches. - if (len === 0) - return - - // if this is the last remaining pattern bit, then no need for - // an additional stat *unless* the user has specified mark or - // stat explicitly. We know they exist, since readdir returned - // them. - - if (remain.length === 1 && !this.mark && !this.stat) { - if (!this.matches[index]) - this.matches[index] = Object.create(null) - - for (var i = 0; i < len; i ++) { - var e = matchedEntries[i] - if (prefix) { - if (prefix.slice(-1) !== '/') - e = prefix + '/' + e - else - e = prefix + e - } - - if (e.charAt(0) === '/' && !this.nomount) { - e = path.join(this.root, e) - } - this._emitMatch(index, e) - } - // This was the last one, and no stats were needed - return - } - - // now test all matched entries as stand-ins for that part - // of the pattern. - remain.shift() - for (var i = 0; i < len; i ++) { - var e = matchedEntries[i] - var newPattern - if (prefix) - newPattern = [prefix, e] - else - newPattern = [e] - this._process(newPattern.concat(remain), index, inGlobStar) - } -} - - -GlobSync.prototype._emitMatch = function (index, e) { - if (isIgnored(this, e)) - return - - var abs = this._makeAbs(e) - - if (this.mark) - e = this._mark(e) - - if (this.absolute) { - e = abs - } - - if (this.matches[index][e]) - return - - if (this.nodir) { - var c = this.cache[abs] - if (c === 'DIR' || Array.isArray(c)) - return - } - - this.matches[index][e] = true - - if (this.stat) - this._stat(e) -} - - -GlobSync.prototype._readdirInGlobStar = function (abs) { - // follow all symlinked directories forever - // just proceed as if this is a non-globstar situation - if (this.follow) - return this._readdir(abs, false) - - var entries - var lstat - var stat - try { - lstat = this.fs.lstatSync(abs) - } catch (er) { - if (er.code === 'ENOENT') { - // lstat failed, doesn't exist - return null - } - } - - var isSym = lstat && lstat.isSymbolicLink() - this.symlinks[abs] = isSym - - // If it's not a symlink or a dir, then it's definitely a regular file. - // don't bother doing a readdir in that case. - if (!isSym && lstat && !lstat.isDirectory()) - this.cache[abs] = 'FILE' - else - entries = this._readdir(abs, false) - - return entries -} - -GlobSync.prototype._readdir = function (abs, inGlobStar) { - var entries - - if (inGlobStar && !ownProp(this.symlinks, abs)) - return this._readdirInGlobStar(abs) - - if (ownProp(this.cache, abs)) { - var c = this.cache[abs] - if (!c || c === 'FILE') - return null - - if (Array.isArray(c)) - return c - } - - try { - return this._readdirEntries(abs, this.fs.readdirSync(abs)) - } catch (er) { - this._readdirError(abs, er) - return null - } -} - -GlobSync.prototype._readdirEntries = function (abs, entries) { - // if we haven't asked to stat everything, then just - // assume that everything in there exists, so we can avoid - // having to stat it a second time. - if (!this.mark && !this.stat) { - for (var i = 0; i < entries.length; i ++) { - var e = entries[i] - if (abs === '/') - e = abs + e - else - e = abs + '/' + e - this.cache[e] = true - } - } - - this.cache[abs] = entries - - // mark and cache dir-ness - return entries -} - -GlobSync.prototype._readdirError = function (f, er) { - // handle errors, and cache the information - switch (er.code) { - case 'ENOTSUP': // https://github.com/isaacs/node-glob/issues/205 - case 'ENOTDIR': // totally normal. means it *does* exist. - var abs = this._makeAbs(f) - this.cache[abs] = 'FILE' - if (abs === this.cwdAbs) { - var error = new Error(er.code + ' invalid cwd ' + this.cwd) - error.path = this.cwd - error.code = er.code - throw error - } - break - - case 'ENOENT': // not terribly unusual - case 'ELOOP': - case 'ENAMETOOLONG': - case 'UNKNOWN': - this.cache[this._makeAbs(f)] = false - break - - default: // some unusual error. Treat as failure. - this.cache[this._makeAbs(f)] = false - if (this.strict) - throw er - if (!this.silent) - console.error('glob error', er) - break - } -} - -GlobSync.prototype._processGlobStar = function (prefix, read, abs, remain, index, inGlobStar) { - - var entries = this._readdir(abs, inGlobStar) - - // no entries means not a dir, so it can never have matches - // foo.txt/** doesn't match foo.txt - if (!entries) - return - - // test without the globstar, and with every child both below - // and replacing the globstar. - var remainWithoutGlobStar = remain.slice(1) - var gspref = prefix ? [ prefix ] : [] - var noGlobStar = gspref.concat(remainWithoutGlobStar) - - // the noGlobStar pattern exits the inGlobStar state - this._process(noGlobStar, index, false) - - var len = entries.length - var isSym = this.symlinks[abs] - - // If it's a symlink, and we're in a globstar, then stop - if (isSym && inGlobStar) - return - - for (var i = 0; i < len; i++) { - var e = entries[i] - if (e.charAt(0) === '.' && !this.dot) - continue - - // these two cases enter the inGlobStar state - var instead = gspref.concat(entries[i], remainWithoutGlobStar) - this._process(instead, index, true) - - var below = gspref.concat(entries[i], remain) - this._process(below, index, true) - } -} - -GlobSync.prototype._processSimple = function (prefix, index) { - // XXX review this. Shouldn't it be doing the mounting etc - // before doing stat? kinda weird? - var exists = this._stat(prefix) - - if (!this.matches[index]) - this.matches[index] = Object.create(null) - - // If it doesn't exist, then just mark the lack of results - if (!exists) - return - - if (prefix && isAbsolute(prefix) && !this.nomount) { - var trail = /[\/\\]$/.test(prefix) - if (prefix.charAt(0) === '/') { - prefix = path.join(this.root, prefix) - } else { - prefix = path.resolve(this.root, prefix) - if (trail) - prefix += '/' - } - } - - if (process.platform === 'win32') - prefix = prefix.replace(/\\/g, '/') - - // Mark this as a match - this._emitMatch(index, prefix) -} - -// Returns either 'DIR', 'FILE', or false -GlobSync.prototype._stat = function (f) { - var abs = this._makeAbs(f) - var needDir = f.slice(-1) === '/' - - if (f.length > this.maxLength) - return false - - if (!this.stat && ownProp(this.cache, abs)) { - var c = this.cache[abs] - - if (Array.isArray(c)) - c = 'DIR' - - // It exists, but maybe not how we need it - if (!needDir || c === 'DIR') - return c - - if (needDir && c === 'FILE') - return false - - // otherwise we have to stat, because maybe c=true - // if we know it exists, but not what it is. - } - - var exists - var stat = this.statCache[abs] - if (!stat) { - var lstat - try { - lstat = this.fs.lstatSync(abs) - } catch (er) { - if (er && (er.code === 'ENOENT' || er.code === 'ENOTDIR')) { - this.statCache[abs] = false - return false - } - } - - if (lstat && lstat.isSymbolicLink()) { - try { - stat = this.fs.statSync(abs) - } catch (er) { - stat = lstat - } - } else { - stat = lstat - } - } - - this.statCache[abs] = stat - - var c = true - if (stat) - c = stat.isDirectory() ? 'DIR' : 'FILE' - - this.cache[abs] = this.cache[abs] || c - - if (needDir && c === 'FILE') - return false - - return c -} - -GlobSync.prototype._mark = function (p) { - return common.mark(this, p) -} - -GlobSync.prototype._makeAbs = function (f) { - return common.makeAbs(this, f) -} diff --git a/node_modules/replace-in-file/package.json b/node_modules/replace-in-file/package.json deleted file mode 100644 index bc995a4..0000000 --- a/node_modules/replace-in-file/package.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "name": "replace-in-file", - "version": "6.3.5", - "description": "A simple utility to quickly replace text in one or more files.", - "homepage": "https://github.com/adamreisnz/replace-in-file#readme", - "author": { - "name": "Adam Reis", - "email": "adam@reis.nz", - "url": "https://adam.reiz.nz/" - }, - "license": "MIT", - "repository": { - "type": "git", - "url": "https://github.com/adamreisnz/replace-in-file.git" - }, - "bugs": { - "url": "https://github.com/adamreisnz/replace-in-file/issues" - }, - "keywords": [ - "replace", - "text", - "contents", - "file" - ], - "main": "index.js", - "bin": "./bin/cli.js", - "types": "./types/index.d.ts", - "engines": { - "node": ">=10" - }, - "scripts": { - "test": "nyc mocha 'lib/**/*.spec.js'", - "postversion": "git push && git push --tags && npm publish", - "coverage": "open -a \"Google Chrome\" ./coverage/lcov-report/index.html" - }, - "dependencies": { - "chalk": "^4.1.2", - "glob": "^7.2.0", - "yargs": "^17.2.1" - }, - "devDependencies": { - "@babel/core": "^7.15.8", - "@babel/cli": "^7.15.7", - "@babel/preset-env": "^7.15.8", - "@babel/register": "^7.15.3", - "babel-plugin-istanbul": "^6.1.1", - "bluebird": "^3.7.2", - "chai": "^4.3.4", - "chai-as-promised": "^7.1.1", - "dirty-chai": "^2.0.1", - "mocha": "^9.1.3", - "nyc": "^15.0.1" - }, - "browserify": { - "transform": [ - [ - "babelify", - { - "presets": [ - "es2015" - ] - } - ] - ] - } -} diff --git a/node_modules/replace-in-file/test/helpers/setup.js b/node_modules/replace-in-file/test/helpers/setup.js deleted file mode 100644 index 3795bd6..0000000 --- a/node_modules/replace-in-file/test/helpers/setup.js +++ /dev/null @@ -1,18 +0,0 @@ -'use strict'; - -//Load dependencies -const Promise = require('bluebird'); -const chai = require('chai'); -const dirtyChai = require('dirty-chai'); -const chaiAsPromised = require('chai-as-promised'); - -//Enable should assertion style for usage with chai-as-promised -chai.should(); - -//Extend chai -chai.use(dirtyChai); -chai.use(chaiAsPromised); - -//Expose globals -global.Promise = Promise; -global.expect = chai.expect; diff --git a/node_modules/replace-in-file/types/index.d.ts b/node_modules/replace-in-file/types/index.d.ts deleted file mode 100644 index 6a4066b..0000000 --- a/node_modules/replace-in-file/types/index.d.ts +++ /dev/null @@ -1,42 +0,0 @@ - -declare module 'replace-in-file' { - export function replaceInFile(config: ReplaceInFileConfig): Promise<ReplaceResult[]>; - export function replaceInFile(config: ReplaceInFileConfig, cb: (error: Error, results: ReplaceResult[]) => void): void; - export default replaceInFile; - - namespace replaceInFile { - export function sync(config: ReplaceInFileConfig): ReplaceResult[]; - export function replaceInFileSync(config: ReplaceInFileConfig): ReplaceResult[]; - export function replaceInFile(config: ReplaceInFileConfig): Promise<ReplaceResult[]>; - export function replaceInFile(config: ReplaceInFileConfig, cb: (error: Error, results: ReplaceResult[]) => void): void; - } - - export function sync(config: ReplaceInFileConfig): ReplaceResult[]; - export function replaceInFileSync(config: ReplaceInFileConfig): ReplaceResult[]; - - export type From = string | RegExp | FromCallback; - export type To = string | ToCallback; - - export interface ReplaceInFileConfig { - files: string | string[]; - ignore?: string | string[]; - from: From | Array<From>; - to: To | Array<To>; - countMatches?: boolean; - allowEmptyPaths?: boolean, - disableGlobs?: boolean, - encoding?: string, - dry?:boolean - glob?:object - } - - export interface ReplaceResult { - file: string; - hasChanged: boolean; - numMatches?: number, - numReplacements?: number, - } -} - -type FromCallback = (file: string) => string | RegExp | string[] | RegExp[]; -type ToCallback = (match: string, file: string) => string | string[]; diff --git a/node_modules/require-directory/index.js b/node_modules/require-directory/index.js deleted file mode 100644 index cd37da7..0000000 --- a/node_modules/require-directory/index.js +++ /dev/null @@ -1,86 +0,0 @@ -'use strict'; - -var fs = require('fs'), - join = require('path').join, - resolve = require('path').resolve, - dirname = require('path').dirname, - defaultOptions = { - extensions: ['js', 'json', 'coffee'], - recurse: true, - rename: function (name) { - return name; - }, - visit: function (obj) { - return obj; - } - }; - -function checkFileInclusion(path, filename, options) { - return ( - // verify file has valid extension - (new RegExp('\\.(' + options.extensions.join('|') + ')$', 'i').test(filename)) && - - // if options.include is a RegExp, evaluate it and make sure the path passes - !(options.include && options.include instanceof RegExp && !options.include.test(path)) && - - // if options.include is a function, evaluate it and make sure the path passes - !(options.include && typeof options.include === 'function' && !options.include(path, filename)) && - - // if options.exclude is a RegExp, evaluate it and make sure the path doesn't pass - !(options.exclude && options.exclude instanceof RegExp && options.exclude.test(path)) && - - // if options.exclude is a function, evaluate it and make sure the path doesn't pass - !(options.exclude && typeof options.exclude === 'function' && options.exclude(path, filename)) - ); -} - -function requireDirectory(m, path, options) { - var retval = {}; - - // path is optional - if (path && !options && typeof path !== 'string') { - options = path; - path = null; - } - - // default options - options = options || {}; - for (var prop in defaultOptions) { - if (typeof options[prop] === 'undefined') { - options[prop] = defaultOptions[prop]; - } - } - - // if no path was passed in, assume the equivelant of __dirname from caller - // otherwise, resolve path relative to the equivalent of __dirname - path = !path ? dirname(m.filename) : resolve(dirname(m.filename), path); - - // get the path of each file in specified directory, append to current tree node, recurse - fs.readdirSync(path).forEach(function (filename) { - var joined = join(path, filename), - files, - key, - obj; - - if (fs.statSync(joined).isDirectory() && options.recurse) { - // this node is a directory; recurse - files = requireDirectory(m, joined, options); - // exclude empty directories - if (Object.keys(files).length) { - retval[options.rename(filename, joined, filename)] = files; - } - } else { - if (joined !== m.filename && checkFileInclusion(joined, filename, options)) { - // hash node key shouldn't include file extension - key = filename.substring(0, filename.lastIndexOf('.')); - obj = m.require(joined); - retval[options.rename(key, joined, filename)] = options.visit(obj, joined, filename) || obj; - } - } - }); - - return retval; -} - -module.exports = requireDirectory; -module.exports.defaults = defaultOptions; diff --git a/node_modules/require-directory/package.json b/node_modules/require-directory/package.json deleted file mode 100644 index 25ece4b..0000000 --- a/node_modules/require-directory/package.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "author": "Troy Goode <troygoode@gmail.com> (http://github.com/troygoode/)", - "name": "require-directory", - "version": "2.1.1", - "description": "Recursively iterates over specified directory, require()'ing each file, and returning a nested hash structure containing those modules.", - "keywords": [ - "require", - "directory", - "library", - "recursive" - ], - "homepage": "https://github.com/troygoode/node-require-directory/", - "main": "index.js", - "repository": { - "type": "git", - "url": "git://github.com/troygoode/node-require-directory.git" - }, - "contributors": [ - { - "name": "Troy Goode", - "email": "troygoode@gmail.com", - "web": "http://github.com/troygoode/" - } - ], - "license": "MIT", - "bugs": { - "url": "http://github.com/troygoode/node-require-directory/issues/" - }, - "engines": { - "node": ">=0.10.0" - }, - "devDependencies": { - "jshint": "^2.6.0", - "mocha": "^2.1.0" - }, - "scripts": { - "test": "mocha", - "lint": "jshint index.js test/test.js" - } -} diff --git a/node_modules/semver/bin/semver.js b/node_modules/semver/bin/semver.js deleted file mode 100644 index 22fc76e..0000000 --- a/node_modules/semver/bin/semver.js +++ /dev/null @@ -1,189 +0,0 @@ -#!/usr/bin/env node -// Standalone semver comparison program. -// Exits successfully and prints matching version(s) if -// any supplied version is valid and passes all tests. - -const argv = process.argv.slice(2) - -let versions = [] - -const range = [] - -let inc = null - -const version = require('../package.json').version - -let loose = false - -let includePrerelease = false - -let coerce = false - -let rtl = false - -let identifier - -let identifierBase - -const semver = require('../') -const parseOptions = require('../internal/parse-options') - -let reverse = false - -let options = {} - -const main = () => { - if (!argv.length) { - return help() - } - while (argv.length) { - let a = argv.shift() - const indexOfEqualSign = a.indexOf('=') - if (indexOfEqualSign !== -1) { - const value = a.slice(indexOfEqualSign + 1) - a = a.slice(0, indexOfEqualSign) - argv.unshift(value) - } - switch (a) { - case '-rv': case '-rev': case '--rev': case '--reverse': - reverse = true - break - case '-l': case '--loose': - loose = true - break - case '-p': case '--include-prerelease': - includePrerelease = true - break - case '-v': case '--version': - versions.push(argv.shift()) - break - case '-i': case '--inc': case '--increment': - switch (argv[0]) { - case 'major': case 'minor': case 'patch': case 'prerelease': - case 'premajor': case 'preminor': case 'prepatch': - case 'release': - inc = argv.shift() - break - default: - inc = 'patch' - break - } - break - case '--preid': - identifier = argv.shift() - break - case '-r': case '--range': - range.push(argv.shift()) - break - case '-n': - identifierBase = argv.shift() - if (identifierBase === 'false') { - identifierBase = false - } - break - case '-c': case '--coerce': - coerce = true - break - case '--rtl': - rtl = true - break - case '--ltr': - rtl = false - break - case '-h': case '--help': case '-?': - return help() - default: - versions.push(a) - break - } - } - - options = parseOptions({ loose, includePrerelease, rtl }) - - versions = versions.map((v) => { - return coerce ? (semver.coerce(v, options) || { version: v }).version : v - }).filter((v) => { - return semver.valid(v) - }) - if (!versions.length) { - return fail() - } - if (inc && (versions.length !== 1 || range.length)) { - return failInc() - } - - for (let i = 0, l = range.length; i < l; i++) { - versions = versions.filter((v) => { - return semver.satisfies(v, range[i], options) - }) - if (!versions.length) { - return fail() - } - } - versions - .sort((a, b) => semver[reverse ? 'rcompare' : 'compare'](a, b, options)) - .map(v => semver.clean(v, options)) - .map(v => inc ? semver.inc(v, inc, options, identifier, identifierBase) : v) - .forEach(v => console.log(v)) -} - -const failInc = () => { - console.error('--inc can only be used on a single version with no range') - fail() -} - -const fail = () => process.exit(1) - -const help = () => console.log( -`SemVer ${version} - -A JavaScript implementation of the https://semver.org/ specification -Copyright Isaac Z. Schlueter - -Usage: semver [options] <version> [<version> [...]] -Prints valid versions sorted by SemVer precedence - -Options: --r --range <range> - Print versions that match the specified range. - --i --increment [<level>] - Increment a version by the specified level. Level can - be one of: major, minor, patch, premajor, preminor, - prepatch, prerelease, or release. Default level is 'patch'. - Only one version may be specified. - ---preid <identifier> - Identifier to be used to prefix premajor, preminor, - prepatch or prerelease version increments. - --l --loose - Interpret versions and ranges loosely - --p --include-prerelease - Always include prerelease versions in range matching - --c --coerce - Coerce a string into SemVer if possible - (does not imply --loose) - ---rtl - Coerce version strings right to left - ---ltr - Coerce version strings left to right (default) - --n <base> - Base number to be used for the prerelease identifier. - Can be either 0 or 1, or false to omit the number altogether. - Defaults to 0. - -Program exits successfully if any valid version satisfies -all supplied ranges, and prints all satisfying versions. - -If no satisfying versions are found, then exits failure. - -Versions are printed in ascending order, so supplying -multiple versions to the utility will just sort them.`) - -main() diff --git a/node_modules/semver/classes/comparator.js b/node_modules/semver/classes/comparator.js deleted file mode 100644 index 3d39c0e..0000000 --- a/node_modules/semver/classes/comparator.js +++ /dev/null @@ -1,141 +0,0 @@ -const ANY = Symbol('SemVer ANY') -// hoisted class for cyclic dependency -class Comparator { - static get ANY () { - return ANY - } - - constructor (comp, options) { - options = parseOptions(options) - - if (comp instanceof Comparator) { - if (comp.loose === !!options.loose) { - return comp - } else { - comp = comp.value - } - } - - comp = comp.trim().split(/\s+/).join(' ') - debug('comparator', comp, options) - this.options = options - this.loose = !!options.loose - this.parse(comp) - - if (this.semver === ANY) { - this.value = '' - } else { - this.value = this.operator + this.semver.version - } - - debug('comp', this) - } - - parse (comp) { - const r = this.options.loose ? re[t.COMPARATORLOOSE] : re[t.COMPARATOR] - const m = comp.match(r) - - if (!m) { - throw new TypeError(`Invalid comparator: ${comp}`) - } - - this.operator = m[1] !== undefined ? m[1] : '' - if (this.operator === '=') { - this.operator = '' - } - - // if it literally is just '>' or '' then allow anything. - if (!m[2]) { - this.semver = ANY - } else { - this.semver = new SemVer(m[2], this.options.loose) - } - } - - toString () { - return this.value - } - - test (version) { - debug('Comparator.test', version, this.options.loose) - - if (this.semver === ANY || version === ANY) { - return true - } - - if (typeof version === 'string') { - try { - version = new SemVer(version, this.options) - } catch (er) { - return false - } - } - - return cmp(version, this.operator, this.semver, this.options) - } - - intersects (comp, options) { - if (!(comp instanceof Comparator)) { - throw new TypeError('a Comparator is required') - } - - if (this.operator === '') { - if (this.value === '') { - return true - } - return new Range(comp.value, options).test(this.value) - } else if (comp.operator === '') { - if (comp.value === '') { - return true - } - return new Range(this.value, options).test(comp.semver) - } - - options = parseOptions(options) - - // Special cases where nothing can possibly be lower - if (options.includePrerelease && - (this.value === '<0.0.0-0' || comp.value === '<0.0.0-0')) { - return false - } - if (!options.includePrerelease && - (this.value.startsWith('<0.0.0') || comp.value.startsWith('<0.0.0'))) { - return false - } - - // Same direction increasing (> or >=) - if (this.operator.startsWith('>') && comp.operator.startsWith('>')) { - return true - } - // Same direction decreasing (< or <=) - if (this.operator.startsWith('<') && comp.operator.startsWith('<')) { - return true - } - // same SemVer and both sides are inclusive (<= or >=) - if ( - (this.semver.version === comp.semver.version) && - this.operator.includes('=') && comp.operator.includes('=')) { - return true - } - // opposite directions less than - if (cmp(this.semver, '<', comp.semver, options) && - this.operator.startsWith('>') && comp.operator.startsWith('<')) { - return true - } - // opposite directions greater than - if (cmp(this.semver, '>', comp.semver, options) && - this.operator.startsWith('<') && comp.operator.startsWith('>')) { - return true - } - return false - } -} - -module.exports = Comparator - -const parseOptions = require('../internal/parse-options') -const { safeRe: re, t } = require('../internal/re') -const cmp = require('../functions/cmp') -const debug = require('../internal/debug') -const SemVer = require('./semver') -const Range = require('./range') diff --git a/node_modules/semver/classes/index.js b/node_modules/semver/classes/index.js deleted file mode 100644 index 5e3f5c9..0000000 --- a/node_modules/semver/classes/index.js +++ /dev/null @@ -1,5 +0,0 @@ -module.exports = { - SemVer: require('./semver.js'), - Range: require('./range.js'), - Comparator: require('./comparator.js'), -} diff --git a/node_modules/semver/classes/range.js b/node_modules/semver/classes/range.js deleted file mode 100644 index ceee231..0000000 --- a/node_modules/semver/classes/range.js +++ /dev/null @@ -1,554 +0,0 @@ -const SPACE_CHARACTERS = /\s+/g - -// hoisted class for cyclic dependency -class Range { - constructor (range, options) { - options = parseOptions(options) - - if (range instanceof Range) { - if ( - range.loose === !!options.loose && - range.includePrerelease === !!options.includePrerelease - ) { - return range - } else { - return new Range(range.raw, options) - } - } - - if (range instanceof Comparator) { - // just put it in the set and return - this.raw = range.value - this.set = [[range]] - this.formatted = undefined - return this - } - - this.options = options - this.loose = !!options.loose - this.includePrerelease = !!options.includePrerelease - - // First reduce all whitespace as much as possible so we do not have to rely - // on potentially slow regexes like \s*. This is then stored and used for - // future error messages as well. - this.raw = range.trim().replace(SPACE_CHARACTERS, ' ') - - // First, split on || - this.set = this.raw - .split('||') - // map the range to a 2d array of comparators - .map(r => this.parseRange(r.trim())) - // throw out any comparator lists that are empty - // this generally means that it was not a valid range, which is allowed - // in loose mode, but will still throw if the WHOLE range is invalid. - .filter(c => c.length) - - if (!this.set.length) { - throw new TypeError(`Invalid SemVer Range: ${this.raw}`) - } - - // if we have any that are not the null set, throw out null sets. - if (this.set.length > 1) { - // keep the first one, in case they're all null sets - const first = this.set[0] - this.set = this.set.filter(c => !isNullSet(c[0])) - if (this.set.length === 0) { - this.set = [first] - } else if (this.set.length > 1) { - // if we have any that are *, then the range is just * - for (const c of this.set) { - if (c.length === 1 && isAny(c[0])) { - this.set = [c] - break - } - } - } - } - - this.formatted = undefined - } - - get range () { - if (this.formatted === undefined) { - this.formatted = '' - for (let i = 0; i < this.set.length; i++) { - if (i > 0) { - this.formatted += '||' - } - const comps = this.set[i] - for (let k = 0; k < comps.length; k++) { - if (k > 0) { - this.formatted += ' ' - } - this.formatted += comps[k].toString().trim() - } - } - } - return this.formatted - } - - format () { - return this.range - } - - toString () { - return this.range - } - - parseRange (range) { - // memoize range parsing for performance. - // this is a very hot path, and fully deterministic. - const memoOpts = - (this.options.includePrerelease && FLAG_INCLUDE_PRERELEASE) | - (this.options.loose && FLAG_LOOSE) - const memoKey = memoOpts + ':' + range - const cached = cache.get(memoKey) - if (cached) { - return cached - } - - const loose = this.options.loose - // `1.2.3 - 1.2.4` => `>=1.2.3 <=1.2.4` - const hr = loose ? re[t.HYPHENRANGELOOSE] : re[t.HYPHENRANGE] - range = range.replace(hr, hyphenReplace(this.options.includePrerelease)) - debug('hyphen replace', range) - - // `> 1.2.3 < 1.2.5` => `>1.2.3 <1.2.5` - range = range.replace(re[t.COMPARATORTRIM], comparatorTrimReplace) - debug('comparator trim', range) - - // `~ 1.2.3` => `~1.2.3` - range = range.replace(re[t.TILDETRIM], tildeTrimReplace) - debug('tilde trim', range) - - // `^ 1.2.3` => `^1.2.3` - range = range.replace(re[t.CARETTRIM], caretTrimReplace) - debug('caret trim', range) - - // At this point, the range is completely trimmed and - // ready to be split into comparators. - - let rangeList = range - .split(' ') - .map(comp => parseComparator(comp, this.options)) - .join(' ') - .split(/\s+/) - // >=0.0.0 is equivalent to * - .map(comp => replaceGTE0(comp, this.options)) - - if (loose) { - // in loose mode, throw out any that are not valid comparators - rangeList = rangeList.filter(comp => { - debug('loose invalid filter', comp, this.options) - return !!comp.match(re[t.COMPARATORLOOSE]) - }) - } - debug('range list', rangeList) - - // if any comparators are the null set, then replace with JUST null set - // if more than one comparator, remove any * comparators - // also, don't include the same comparator more than once - const rangeMap = new Map() - const comparators = rangeList.map(comp => new Comparator(comp, this.options)) - for (const comp of comparators) { - if (isNullSet(comp)) { - return [comp] - } - rangeMap.set(comp.value, comp) - } - if (rangeMap.size > 1 && rangeMap.has('')) { - rangeMap.delete('') - } - - const result = [...rangeMap.values()] - cache.set(memoKey, result) - return result - } - - intersects (range, options) { - if (!(range instanceof Range)) { - throw new TypeError('a Range is required') - } - - return this.set.some((thisComparators) => { - return ( - isSatisfiable(thisComparators, options) && - range.set.some((rangeComparators) => { - return ( - isSatisfiable(rangeComparators, options) && - thisComparators.every((thisComparator) => { - return rangeComparators.every((rangeComparator) => { - return thisComparator.intersects(rangeComparator, options) - }) - }) - ) - }) - ) - }) - } - - // if ANY of the sets match ALL of its comparators, then pass - test (version) { - if (!version) { - return false - } - - if (typeof version === 'string') { - try { - version = new SemVer(version, this.options) - } catch (er) { - return false - } - } - - for (let i = 0; i < this.set.length; i++) { - if (testSet(this.set[i], version, this.options)) { - return true - } - } - return false - } -} - -module.exports = Range - -const LRU = require('../internal/lrucache') -const cache = new LRU() - -const parseOptions = require('../internal/parse-options') -const Comparator = require('./comparator') -const debug = require('../internal/debug') -const SemVer = require('./semver') -const { - safeRe: re, - t, - comparatorTrimReplace, - tildeTrimReplace, - caretTrimReplace, -} = require('../internal/re') -const { FLAG_INCLUDE_PRERELEASE, FLAG_LOOSE } = require('../internal/constants') - -const isNullSet = c => c.value === '<0.0.0-0' -const isAny = c => c.value === '' - -// take a set of comparators and determine whether there -// exists a version which can satisfy it -const isSatisfiable = (comparators, options) => { - let result = true - const remainingComparators = comparators.slice() - let testComparator = remainingComparators.pop() - - while (result && remainingComparators.length) { - result = remainingComparators.every((otherComparator) => { - return testComparator.intersects(otherComparator, options) - }) - - testComparator = remainingComparators.pop() - } - - return result -} - -// comprised of xranges, tildes, stars, and gtlt's at this point. -// already replaced the hyphen ranges -// turn into a set of JUST comparators. -const parseComparator = (comp, options) => { - debug('comp', comp, options) - comp = replaceCarets(comp, options) - debug('caret', comp) - comp = replaceTildes(comp, options) - debug('tildes', comp) - comp = replaceXRanges(comp, options) - debug('xrange', comp) - comp = replaceStars(comp, options) - debug('stars', comp) - return comp -} - -const isX = id => !id || id.toLowerCase() === 'x' || id === '*' - -// ~, ~> --> * (any, kinda silly) -// ~2, ~2.x, ~2.x.x, ~>2, ~>2.x ~>2.x.x --> >=2.0.0 <3.0.0-0 -// ~2.0, ~2.0.x, ~>2.0, ~>2.0.x --> >=2.0.0 <2.1.0-0 -// ~1.2, ~1.2.x, ~>1.2, ~>1.2.x --> >=1.2.0 <1.3.0-0 -// ~1.2.3, ~>1.2.3 --> >=1.2.3 <1.3.0-0 -// ~1.2.0, ~>1.2.0 --> >=1.2.0 <1.3.0-0 -// ~0.0.1 --> >=0.0.1 <0.1.0-0 -const replaceTildes = (comp, options) => { - return comp - .trim() - .split(/\s+/) - .map((c) => replaceTilde(c, options)) - .join(' ') -} - -const replaceTilde = (comp, options) => { - const r = options.loose ? re[t.TILDELOOSE] : re[t.TILDE] - return comp.replace(r, (_, M, m, p, pr) => { - debug('tilde', comp, _, M, m, p, pr) - let ret - - if (isX(M)) { - ret = '' - } else if (isX(m)) { - ret = `>=${M}.0.0 <${+M + 1}.0.0-0` - } else if (isX(p)) { - // ~1.2 == >=1.2.0 <1.3.0-0 - ret = `>=${M}.${m}.0 <${M}.${+m + 1}.0-0` - } else if (pr) { - debug('replaceTilde pr', pr) - ret = `>=${M}.${m}.${p}-${pr - } <${M}.${+m + 1}.0-0` - } else { - // ~1.2.3 == >=1.2.3 <1.3.0-0 - ret = `>=${M}.${m}.${p - } <${M}.${+m + 1}.0-0` - } - - debug('tilde return', ret) - return ret - }) -} - -// ^ --> * (any, kinda silly) -// ^2, ^2.x, ^2.x.x --> >=2.0.0 <3.0.0-0 -// ^2.0, ^2.0.x --> >=2.0.0 <3.0.0-0 -// ^1.2, ^1.2.x --> >=1.2.0 <2.0.0-0 -// ^1.2.3 --> >=1.2.3 <2.0.0-0 -// ^1.2.0 --> >=1.2.0 <2.0.0-0 -// ^0.0.1 --> >=0.0.1 <0.0.2-0 -// ^0.1.0 --> >=0.1.0 <0.2.0-0 -const replaceCarets = (comp, options) => { - return comp - .trim() - .split(/\s+/) - .map((c) => replaceCaret(c, options)) - .join(' ') -} - -const replaceCaret = (comp, options) => { - debug('caret', comp, options) - const r = options.loose ? re[t.CARETLOOSE] : re[t.CARET] - const z = options.includePrerelease ? '-0' : '' - return comp.replace(r, (_, M, m, p, pr) => { - debug('caret', comp, _, M, m, p, pr) - let ret - - if (isX(M)) { - ret = '' - } else if (isX(m)) { - ret = `>=${M}.0.0${z} <${+M + 1}.0.0-0` - } else if (isX(p)) { - if (M === '0') { - ret = `>=${M}.${m}.0${z} <${M}.${+m + 1}.0-0` - } else { - ret = `>=${M}.${m}.0${z} <${+M + 1}.0.0-0` - } - } else if (pr) { - debug('replaceCaret pr', pr) - if (M === '0') { - if (m === '0') { - ret = `>=${M}.${m}.${p}-${pr - } <${M}.${m}.${+p + 1}-0` - } else { - ret = `>=${M}.${m}.${p}-${pr - } <${M}.${+m + 1}.0-0` - } - } else { - ret = `>=${M}.${m}.${p}-${pr - } <${+M + 1}.0.0-0` - } - } else { - debug('no pr') - if (M === '0') { - if (m === '0') { - ret = `>=${M}.${m}.${p - }${z} <${M}.${m}.${+p + 1}-0` - } else { - ret = `>=${M}.${m}.${p - }${z} <${M}.${+m + 1}.0-0` - } - } else { - ret = `>=${M}.${m}.${p - } <${+M + 1}.0.0-0` - } - } - - debug('caret return', ret) - return ret - }) -} - -const replaceXRanges = (comp, options) => { - debug('replaceXRanges', comp, options) - return comp - .split(/\s+/) - .map((c) => replaceXRange(c, options)) - .join(' ') -} - -const replaceXRange = (comp, options) => { - comp = comp.trim() - const r = options.loose ? re[t.XRANGELOOSE] : re[t.XRANGE] - return comp.replace(r, (ret, gtlt, M, m, p, pr) => { - debug('xRange', comp, ret, gtlt, M, m, p, pr) - const xM = isX(M) - const xm = xM || isX(m) - const xp = xm || isX(p) - const anyX = xp - - if (gtlt === '=' && anyX) { - gtlt = '' - } - - // if we're including prereleases in the match, then we need - // to fix this to -0, the lowest possible prerelease value - pr = options.includePrerelease ? '-0' : '' - - if (xM) { - if (gtlt === '>' || gtlt === '<') { - // nothing is allowed - ret = '<0.0.0-0' - } else { - // nothing is forbidden - ret = '*' - } - } else if (gtlt && anyX) { - // we know patch is an x, because we have any x at all. - // replace X with 0 - if (xm) { - m = 0 - } - p = 0 - - if (gtlt === '>') { - // >1 => >=2.0.0 - // >1.2 => >=1.3.0 - gtlt = '>=' - if (xm) { - M = +M + 1 - m = 0 - p = 0 - } else { - m = +m + 1 - p = 0 - } - } else if (gtlt === '<=') { - // <=0.7.x is actually <0.8.0, since any 0.7.x should - // pass. Similarly, <=7.x is actually <8.0.0, etc. - gtlt = '<' - if (xm) { - M = +M + 1 - } else { - m = +m + 1 - } - } - - if (gtlt === '<') { - pr = '-0' - } - - ret = `${gtlt + M}.${m}.${p}${pr}` - } else if (xm) { - ret = `>=${M}.0.0${pr} <${+M + 1}.0.0-0` - } else if (xp) { - ret = `>=${M}.${m}.0${pr - } <${M}.${+m + 1}.0-0` - } - - debug('xRange return', ret) - - return ret - }) -} - -// Because * is AND-ed with everything else in the comparator, -// and '' means "any version", just remove the *s entirely. -const replaceStars = (comp, options) => { - debug('replaceStars', comp, options) - // Looseness is ignored here. star is always as loose as it gets! - return comp - .trim() - .replace(re[t.STAR], '') -} - -const replaceGTE0 = (comp, options) => { - debug('replaceGTE0', comp, options) - return comp - .trim() - .replace(re[options.includePrerelease ? t.GTE0PRE : t.GTE0], '') -} - -// This function is passed to string.replace(re[t.HYPHENRANGE]) -// M, m, patch, prerelease, build -// 1.2 - 3.4.5 => >=1.2.0 <=3.4.5 -// 1.2.3 - 3.4 => >=1.2.0 <3.5.0-0 Any 3.4.x will do -// 1.2 - 3.4 => >=1.2.0 <3.5.0-0 -// TODO build? -const hyphenReplace = incPr => ($0, - from, fM, fm, fp, fpr, fb, - to, tM, tm, tp, tpr) => { - if (isX(fM)) { - from = '' - } else if (isX(fm)) { - from = `>=${fM}.0.0${incPr ? '-0' : ''}` - } else if (isX(fp)) { - from = `>=${fM}.${fm}.0${incPr ? '-0' : ''}` - } else if (fpr) { - from = `>=${from}` - } else { - from = `>=${from}${incPr ? '-0' : ''}` - } - - if (isX(tM)) { - to = '' - } else if (isX(tm)) { - to = `<${+tM + 1}.0.0-0` - } else if (isX(tp)) { - to = `<${tM}.${+tm + 1}.0-0` - } else if (tpr) { - to = `<=${tM}.${tm}.${tp}-${tpr}` - } else if (incPr) { - to = `<${tM}.${tm}.${+tp + 1}-0` - } else { - to = `<=${to}` - } - - return `${from} ${to}`.trim() -} - -const testSet = (set, version, options) => { - for (let i = 0; i < set.length; i++) { - if (!set[i].test(version)) { - return false - } - } - - if (version.prerelease.length && !options.includePrerelease) { - // Find the set of versions that are allowed to have prereleases - // For example, ^1.2.3-pr.1 desugars to >=1.2.3-pr.1 <2.0.0 - // That should allow `1.2.3-pr.2` to pass. - // However, `1.2.4-alpha.notready` should NOT be allowed, - // even though it's within the range set by the comparators. - for (let i = 0; i < set.length; i++) { - debug(set[i].semver) - if (set[i].semver === Comparator.ANY) { - continue - } - - if (set[i].semver.prerelease.length > 0) { - const allowed = set[i].semver - if (allowed.major === version.major && - allowed.minor === version.minor && - allowed.patch === version.patch) { - return true - } - } - } - - // Version has a -pre, but it's not one of the ones we like. - return false - } - - return true -} diff --git a/node_modules/semver/classes/semver.js b/node_modules/semver/classes/semver.js deleted file mode 100644 index 6fbc062..0000000 --- a/node_modules/semver/classes/semver.js +++ /dev/null @@ -1,318 +0,0 @@ -const debug = require('../internal/debug') -const { MAX_LENGTH, MAX_SAFE_INTEGER } = require('../internal/constants') -const { safeRe: re, safeSrc: src, t } = require('../internal/re') - -const parseOptions = require('../internal/parse-options') -const { compareIdentifiers } = require('../internal/identifiers') -class SemVer { - constructor (version, options) { - options = parseOptions(options) - - if (version instanceof SemVer) { - if (version.loose === !!options.loose && - version.includePrerelease === !!options.includePrerelease) { - return version - } else { - version = version.version - } - } else if (typeof version !== 'string') { - throw new TypeError(`Invalid version. Must be a string. Got type "${typeof version}".`) - } - - if (version.length > MAX_LENGTH) { - throw new TypeError( - `version is longer than ${MAX_LENGTH} characters` - ) - } - - debug('SemVer', version, options) - this.options = options - this.loose = !!options.loose - // this isn't actually relevant for versions, but keep it so that we - // don't run into trouble passing this.options around. - this.includePrerelease = !!options.includePrerelease - - const m = version.trim().match(options.loose ? re[t.LOOSE] : re[t.FULL]) - - if (!m) { - throw new TypeError(`Invalid Version: ${version}`) - } - - this.raw = version - - // these are actually numbers - this.major = +m[1] - this.minor = +m[2] - this.patch = +m[3] - - if (this.major > MAX_SAFE_INTEGER || this.major < 0) { - throw new TypeError('Invalid major version') - } - - if (this.minor > MAX_SAFE_INTEGER || this.minor < 0) { - throw new TypeError('Invalid minor version') - } - - if (this.patch > MAX_SAFE_INTEGER || this.patch < 0) { - throw new TypeError('Invalid patch version') - } - - // numberify any prerelease numeric ids - if (!m[4]) { - this.prerelease = [] - } else { - this.prerelease = m[4].split('.').map((id) => { - if (/^[0-9]+$/.test(id)) { - const num = +id - if (num >= 0 && num < MAX_SAFE_INTEGER) { - return num - } - } - return id - }) - } - - this.build = m[5] ? m[5].split('.') : [] - this.format() - } - - format () { - this.version = `${this.major}.${this.minor}.${this.patch}` - if (this.prerelease.length) { - this.version += `-${this.prerelease.join('.')}` - } - return this.version - } - - toString () { - return this.version - } - - compare (other) { - debug('SemVer.compare', this.version, this.options, other) - if (!(other instanceof SemVer)) { - if (typeof other === 'string' && other === this.version) { - return 0 - } - other = new SemVer(other, this.options) - } - - if (other.version === this.version) { - return 0 - } - - return this.compareMain(other) || this.comparePre(other) - } - - compareMain (other) { - if (!(other instanceof SemVer)) { - other = new SemVer(other, this.options) - } - - return ( - compareIdentifiers(this.major, other.major) || - compareIdentifiers(this.minor, other.minor) || - compareIdentifiers(this.patch, other.patch) - ) - } - - comparePre (other) { - if (!(other instanceof SemVer)) { - other = new SemVer(other, this.options) - } - - // NOT having a prerelease is > having one - if (this.prerelease.length && !other.prerelease.length) { - return -1 - } else if (!this.prerelease.length && other.prerelease.length) { - return 1 - } else if (!this.prerelease.length && !other.prerelease.length) { - return 0 - } - - let i = 0 - do { - const a = this.prerelease[i] - const b = other.prerelease[i] - debug('prerelease compare', i, a, b) - if (a === undefined && b === undefined) { - return 0 - } else if (b === undefined) { - return 1 - } else if (a === undefined) { - return -1 - } else if (a === b) { - continue - } else { - return compareIdentifiers(a, b) - } - } while (++i) - } - - compareBuild (other) { - if (!(other instanceof SemVer)) { - other = new SemVer(other, this.options) - } - - let i = 0 - do { - const a = this.build[i] - const b = other.build[i] - debug('build compare', i, a, b) - if (a === undefined && b === undefined) { - return 0 - } else if (b === undefined) { - return 1 - } else if (a === undefined) { - return -1 - } else if (a === b) { - continue - } else { - return compareIdentifiers(a, b) - } - } while (++i) - } - - // preminor will bump the version up to the next minor release, and immediately - // down to pre-release. premajor and prepatch work the same way. - inc (release, identifier, identifierBase) { - if (release.startsWith('pre')) { - if (!identifier && identifierBase === false) { - throw new Error('invalid increment argument: identifier is empty') - } - // Avoid an invalid semver results - if (identifier) { - const r = new RegExp(`^${this.options.loose ? src[t.PRERELEASELOOSE] : src[t.PRERELEASE]}$`) - const match = `-${identifier}`.match(r) - if (!match || match[1] !== identifier) { - throw new Error(`invalid identifier: ${identifier}`) - } - } - } - - switch (release) { - case 'premajor': - this.prerelease.length = 0 - this.patch = 0 - this.minor = 0 - this.major++ - this.inc('pre', identifier, identifierBase) - break - case 'preminor': - this.prerelease.length = 0 - this.patch = 0 - this.minor++ - this.inc('pre', identifier, identifierBase) - break - case 'prepatch': - // If this is already a prerelease, it will bump to the next version - // drop any prereleases that might already exist, since they are not - // relevant at this point. - this.prerelease.length = 0 - this.inc('patch', identifier, identifierBase) - this.inc('pre', identifier, identifierBase) - break - // If the input is a non-prerelease version, this acts the same as - // prepatch. - case 'prerelease': - if (this.prerelease.length === 0) { - this.inc('patch', identifier, identifierBase) - } - this.inc('pre', identifier, identifierBase) - break - case 'release': - if (this.prerelease.length === 0) { - throw new Error(`version ${this.raw} is not a prerelease`) - } - this.prerelease.length = 0 - break - - case 'major': - // If this is a pre-major version, bump up to the same major version. - // Otherwise increment major. - // 1.0.0-5 bumps to 1.0.0 - // 1.1.0 bumps to 2.0.0 - if ( - this.minor !== 0 || - this.patch !== 0 || - this.prerelease.length === 0 - ) { - this.major++ - } - this.minor = 0 - this.patch = 0 - this.prerelease = [] - break - case 'minor': - // If this is a pre-minor version, bump up to the same minor version. - // Otherwise increment minor. - // 1.2.0-5 bumps to 1.2.0 - // 1.2.1 bumps to 1.3.0 - if (this.patch !== 0 || this.prerelease.length === 0) { - this.minor++ - } - this.patch = 0 - this.prerelease = [] - break - case 'patch': - // If this is not a pre-release version, it will increment the patch. - // If it is a pre-release it will bump up to the same patch version. - // 1.2.0-5 patches to 1.2.0 - // 1.2.0 patches to 1.2.1 - if (this.prerelease.length === 0) { - this.patch++ - } - this.prerelease = [] - break - // This probably shouldn't be used publicly. - // 1.0.0 'pre' would become 1.0.0-0 which is the wrong direction. - case 'pre': { - const base = Number(identifierBase) ? 1 : 0 - - if (this.prerelease.length === 0) { - this.prerelease = [base] - } else { - let i = this.prerelease.length - while (--i >= 0) { - if (typeof this.prerelease[i] === 'number') { - this.prerelease[i]++ - i = -2 - } - } - if (i === -1) { - // didn't increment anything - if (identifier === this.prerelease.join('.') && identifierBase === false) { - throw new Error('invalid increment argument: identifier already exists') - } - this.prerelease.push(base) - } - } - if (identifier) { - // 1.2.0-beta.1 bumps to 1.2.0-beta.2, - // 1.2.0-beta.fooblz or 1.2.0-beta bumps to 1.2.0-beta.0 - let prerelease = [identifier, base] - if (identifierBase === false) { - prerelease = [identifier] - } - if (compareIdentifiers(this.prerelease[0], identifier) === 0) { - if (isNaN(this.prerelease[1])) { - this.prerelease = prerelease - } - } else { - this.prerelease = prerelease - } - } - break - } - default: - throw new Error(`invalid increment argument: ${release}`) - } - this.raw = this.format() - if (this.build.length) { - this.raw += `+${this.build.join('.')}` - } - return this - } -} - -module.exports = SemVer diff --git a/node_modules/semver/functions/clean.js b/node_modules/semver/functions/clean.js deleted file mode 100644 index 811fe6b..0000000 --- a/node_modules/semver/functions/clean.js +++ /dev/null @@ -1,6 +0,0 @@ -const parse = require('./parse') -const clean = (version, options) => { - const s = parse(version.trim().replace(/^[=v]+/, ''), options) - return s ? s.version : null -} -module.exports = clean diff --git a/node_modules/semver/functions/cmp.js b/node_modules/semver/functions/cmp.js deleted file mode 100644 index 4011909..0000000 --- a/node_modules/semver/functions/cmp.js +++ /dev/null @@ -1,52 +0,0 @@ -const eq = require('./eq') -const neq = require('./neq') -const gt = require('./gt') -const gte = require('./gte') -const lt = require('./lt') -const lte = require('./lte') - -const cmp = (a, op, b, loose) => { - switch (op) { - case '===': - if (typeof a === 'object') { - a = a.version - } - if (typeof b === 'object') { - b = b.version - } - return a === b - - case '!==': - if (typeof a === 'object') { - a = a.version - } - if (typeof b === 'object') { - b = b.version - } - return a !== b - - case '': - case '=': - case '==': - return eq(a, b, loose) - - case '!=': - return neq(a, b, loose) - - case '>': - return gt(a, b, loose) - - case '>=': - return gte(a, b, loose) - - case '<': - return lt(a, b, loose) - - case '<=': - return lte(a, b, loose) - - default: - throw new TypeError(`Invalid operator: ${op}`) - } -} -module.exports = cmp diff --git a/node_modules/semver/functions/coerce.js b/node_modules/semver/functions/coerce.js deleted file mode 100644 index b378dce..0000000 --- a/node_modules/semver/functions/coerce.js +++ /dev/null @@ -1,60 +0,0 @@ -const SemVer = require('../classes/semver') -const parse = require('./parse') -const { safeRe: re, t } = require('../internal/re') - -const coerce = (version, options) => { - if (version instanceof SemVer) { - return version - } - - if (typeof version === 'number') { - version = String(version) - } - - if (typeof version !== 'string') { - return null - } - - options = options || {} - - let match = null - if (!options.rtl) { - match = version.match(options.includePrerelease ? re[t.COERCEFULL] : re[t.COERCE]) - } else { - // Find the right-most coercible string that does not share - // a terminus with a more left-ward coercible string. - // Eg, '1.2.3.4' wants to coerce '2.3.4', not '3.4' or '4' - // With includePrerelease option set, '1.2.3.4-rc' wants to coerce '2.3.4-rc', not '2.3.4' - // - // Walk through the string checking with a /g regexp - // Manually set the index so as to pick up overlapping matches. - // Stop when we get a match that ends at the string end, since no - // coercible string can be more right-ward without the same terminus. - const coerceRtlRegex = options.includePrerelease ? re[t.COERCERTLFULL] : re[t.COERCERTL] - let next - while ((next = coerceRtlRegex.exec(version)) && - (!match || match.index + match[0].length !== version.length) - ) { - if (!match || - next.index + next[0].length !== match.index + match[0].length) { - match = next - } - coerceRtlRegex.lastIndex = next.index + next[1].length + next[2].length - } - // leave it in a clean state - coerceRtlRegex.lastIndex = -1 - } - - if (match === null) { - return null - } - - const major = match[2] - const minor = match[3] || '0' - const patch = match[4] || '0' - const prerelease = options.includePrerelease && match[5] ? `-${match[5]}` : '' - const build = options.includePrerelease && match[6] ? `+${match[6]}` : '' - - return parse(`${major}.${minor}.${patch}${prerelease}${build}`, options) -} -module.exports = coerce diff --git a/node_modules/semver/functions/compare-build.js b/node_modules/semver/functions/compare-build.js deleted file mode 100644 index 9eb881b..0000000 --- a/node_modules/semver/functions/compare-build.js +++ /dev/null @@ -1,7 +0,0 @@ -const SemVer = require('../classes/semver') -const compareBuild = (a, b, loose) => { - const versionA = new SemVer(a, loose) - const versionB = new SemVer(b, loose) - return versionA.compare(versionB) || versionA.compareBuild(versionB) -} -module.exports = compareBuild diff --git a/node_modules/semver/functions/compare-loose.js b/node_modules/semver/functions/compare-loose.js deleted file mode 100644 index 4881fbe..0000000 --- a/node_modules/semver/functions/compare-loose.js +++ /dev/null @@ -1,3 +0,0 @@ -const compare = require('./compare') -const compareLoose = (a, b) => compare(a, b, true) -module.exports = compareLoose diff --git a/node_modules/semver/functions/compare.js b/node_modules/semver/functions/compare.js deleted file mode 100644 index 748b7af..0000000 --- a/node_modules/semver/functions/compare.js +++ /dev/null @@ -1,5 +0,0 @@ -const SemVer = require('../classes/semver') -const compare = (a, b, loose) => - new SemVer(a, loose).compare(new SemVer(b, loose)) - -module.exports = compare diff --git a/node_modules/semver/functions/diff.js b/node_modules/semver/functions/diff.js deleted file mode 100644 index 33171dc..0000000 --- a/node_modules/semver/functions/diff.js +++ /dev/null @@ -1,58 +0,0 @@ -const parse = require('./parse.js') - -const diff = (version1, version2) => { - const v1 = parse(version1, null, true) - const v2 = parse(version2, null, true) - const comparison = v1.compare(v2) - - if (comparison === 0) { - return null - } - - const v1Higher = comparison > 0 - const highVersion = v1Higher ? v1 : v2 - const lowVersion = v1Higher ? v2 : v1 - const highHasPre = !!highVersion.prerelease.length - const lowHasPre = !!lowVersion.prerelease.length - - if (lowHasPre && !highHasPre) { - // Going from prerelease -> no prerelease requires some special casing - - // If the low version has only a major, then it will always be a major - // Some examples: - // 1.0.0-1 -> 1.0.0 - // 1.0.0-1 -> 1.1.1 - // 1.0.0-1 -> 2.0.0 - if (!lowVersion.patch && !lowVersion.minor) { - return 'major' - } - - // If the main part has no difference - if (lowVersion.compareMain(highVersion) === 0) { - if (lowVersion.minor && !lowVersion.patch) { - return 'minor' - } - return 'patch' - } - } - - // add the `pre` prefix if we are going to a prerelease version - const prefix = highHasPre ? 'pre' : '' - - if (v1.major !== v2.major) { - return prefix + 'major' - } - - if (v1.minor !== v2.minor) { - return prefix + 'minor' - } - - if (v1.patch !== v2.patch) { - return prefix + 'patch' - } - - // high and low are preleases - return 'prerelease' -} - -module.exports = diff diff --git a/node_modules/semver/functions/eq.js b/node_modules/semver/functions/eq.js deleted file mode 100644 index 271fed9..0000000 --- a/node_modules/semver/functions/eq.js +++ /dev/null @@ -1,3 +0,0 @@ -const compare = require('./compare') -const eq = (a, b, loose) => compare(a, b, loose) === 0 -module.exports = eq diff --git a/node_modules/semver/functions/gt.js b/node_modules/semver/functions/gt.js deleted file mode 100644 index d9b2156..0000000 --- a/node_modules/semver/functions/gt.js +++ /dev/null @@ -1,3 +0,0 @@ -const compare = require('./compare') -const gt = (a, b, loose) => compare(a, b, loose) > 0 -module.exports = gt diff --git a/node_modules/semver/functions/gte.js b/node_modules/semver/functions/gte.js deleted file mode 100644 index 5aeaa63..0000000 --- a/node_modules/semver/functions/gte.js +++ /dev/null @@ -1,3 +0,0 @@ -const compare = require('./compare') -const gte = (a, b, loose) => compare(a, b, loose) >= 0 -module.exports = gte diff --git a/node_modules/semver/functions/inc.js b/node_modules/semver/functions/inc.js deleted file mode 100644 index 7670b1b..0000000 --- a/node_modules/semver/functions/inc.js +++ /dev/null @@ -1,19 +0,0 @@ -const SemVer = require('../classes/semver') - -const inc = (version, release, options, identifier, identifierBase) => { - if (typeof (options) === 'string') { - identifierBase = identifier - identifier = options - options = undefined - } - - try { - return new SemVer( - version instanceof SemVer ? version.version : version, - options - ).inc(release, identifier, identifierBase).version - } catch (er) { - return null - } -} -module.exports = inc diff --git a/node_modules/semver/functions/lt.js b/node_modules/semver/functions/lt.js deleted file mode 100644 index b440ab7..0000000 --- a/node_modules/semver/functions/lt.js +++ /dev/null @@ -1,3 +0,0 @@ -const compare = require('./compare') -const lt = (a, b, loose) => compare(a, b, loose) < 0 -module.exports = lt diff --git a/node_modules/semver/functions/lte.js b/node_modules/semver/functions/lte.js deleted file mode 100644 index 6dcc956..0000000 --- a/node_modules/semver/functions/lte.js +++ /dev/null @@ -1,3 +0,0 @@ -const compare = require('./compare') -const lte = (a, b, loose) => compare(a, b, loose) <= 0 -module.exports = lte diff --git a/node_modules/semver/functions/major.js b/node_modules/semver/functions/major.js deleted file mode 100644 index 4283165..0000000 --- a/node_modules/semver/functions/major.js +++ /dev/null @@ -1,3 +0,0 @@ -const SemVer = require('../classes/semver') -const major = (a, loose) => new SemVer(a, loose).major -module.exports = major diff --git a/node_modules/semver/functions/minor.js b/node_modules/semver/functions/minor.js deleted file mode 100644 index 57b3455..0000000 --- a/node_modules/semver/functions/minor.js +++ /dev/null @@ -1,3 +0,0 @@ -const SemVer = require('../classes/semver') -const minor = (a, loose) => new SemVer(a, loose).minor -module.exports = minor diff --git a/node_modules/semver/functions/neq.js b/node_modules/semver/functions/neq.js deleted file mode 100644 index f944c01..0000000 --- a/node_modules/semver/functions/neq.js +++ /dev/null @@ -1,3 +0,0 @@ -const compare = require('./compare') -const neq = (a, b, loose) => compare(a, b, loose) !== 0 -module.exports = neq diff --git a/node_modules/semver/functions/parse.js b/node_modules/semver/functions/parse.js deleted file mode 100644 index 459b3b1..0000000 --- a/node_modules/semver/functions/parse.js +++ /dev/null @@ -1,16 +0,0 @@ -const SemVer = require('../classes/semver') -const parse = (version, options, throwErrors = false) => { - if (version instanceof SemVer) { - return version - } - try { - return new SemVer(version, options) - } catch (er) { - if (!throwErrors) { - return null - } - throw er - } -} - -module.exports = parse diff --git a/node_modules/semver/functions/patch.js b/node_modules/semver/functions/patch.js deleted file mode 100644 index 63afca2..0000000 --- a/node_modules/semver/functions/patch.js +++ /dev/null @@ -1,3 +0,0 @@ -const SemVer = require('../classes/semver') -const patch = (a, loose) => new SemVer(a, loose).patch -module.exports = patch diff --git a/node_modules/semver/functions/prerelease.js b/node_modules/semver/functions/prerelease.js deleted file mode 100644 index 06aa132..0000000 --- a/node_modules/semver/functions/prerelease.js +++ /dev/null @@ -1,6 +0,0 @@ -const parse = require('./parse') -const prerelease = (version, options) => { - const parsed = parse(version, options) - return (parsed && parsed.prerelease.length) ? parsed.prerelease : null -} -module.exports = prerelease diff --git a/node_modules/semver/functions/rcompare.js b/node_modules/semver/functions/rcompare.js deleted file mode 100644 index 0ac509e..0000000 --- a/node_modules/semver/functions/rcompare.js +++ /dev/null @@ -1,3 +0,0 @@ -const compare = require('./compare') -const rcompare = (a, b, loose) => compare(b, a, loose) -module.exports = rcompare diff --git a/node_modules/semver/functions/rsort.js b/node_modules/semver/functions/rsort.js deleted file mode 100644 index 82404c5..0000000 --- a/node_modules/semver/functions/rsort.js +++ /dev/null @@ -1,3 +0,0 @@ -const compareBuild = require('./compare-build') -const rsort = (list, loose) => list.sort((a, b) => compareBuild(b, a, loose)) -module.exports = rsort diff --git a/node_modules/semver/functions/satisfies.js b/node_modules/semver/functions/satisfies.js deleted file mode 100644 index 50af1c1..0000000 --- a/node_modules/semver/functions/satisfies.js +++ /dev/null @@ -1,10 +0,0 @@ -const Range = require('../classes/range') -const satisfies = (version, range, options) => { - try { - range = new Range(range, options) - } catch (er) { - return false - } - return range.test(version) -} -module.exports = satisfies diff --git a/node_modules/semver/functions/sort.js b/node_modules/semver/functions/sort.js deleted file mode 100644 index 4d10917..0000000 --- a/node_modules/semver/functions/sort.js +++ /dev/null @@ -1,3 +0,0 @@ -const compareBuild = require('./compare-build') -const sort = (list, loose) => list.sort((a, b) => compareBuild(a, b, loose)) -module.exports = sort diff --git a/node_modules/semver/functions/valid.js b/node_modules/semver/functions/valid.js deleted file mode 100644 index f27bae1..0000000 --- a/node_modules/semver/functions/valid.js +++ /dev/null @@ -1,6 +0,0 @@ -const parse = require('./parse') -const valid = (version, options) => { - const v = parse(version, options) - return v ? v.version : null -} -module.exports = valid diff --git a/node_modules/semver/index.js b/node_modules/semver/index.js deleted file mode 100644 index 86d42ac..0000000 --- a/node_modules/semver/index.js +++ /dev/null @@ -1,89 +0,0 @@ -// just pre-load all the stuff that index.js lazily exports -const internalRe = require('./internal/re') -const constants = require('./internal/constants') -const SemVer = require('./classes/semver') -const identifiers = require('./internal/identifiers') -const parse = require('./functions/parse') -const valid = require('./functions/valid') -const clean = require('./functions/clean') -const inc = require('./functions/inc') -const diff = require('./functions/diff') -const major = require('./functions/major') -const minor = require('./functions/minor') -const patch = require('./functions/patch') -const prerelease = require('./functions/prerelease') -const compare = require('./functions/compare') -const rcompare = require('./functions/rcompare') -const compareLoose = require('./functions/compare-loose') -const compareBuild = require('./functions/compare-build') -const sort = require('./functions/sort') -const rsort = require('./functions/rsort') -const gt = require('./functions/gt') -const lt = require('./functions/lt') -const eq = require('./functions/eq') -const neq = require('./functions/neq') -const gte = require('./functions/gte') -const lte = require('./functions/lte') -const cmp = require('./functions/cmp') -const coerce = require('./functions/coerce') -const Comparator = require('./classes/comparator') -const Range = require('./classes/range') -const satisfies = require('./functions/satisfies') -const toComparators = require('./ranges/to-comparators') -const maxSatisfying = require('./ranges/max-satisfying') -const minSatisfying = require('./ranges/min-satisfying') -const minVersion = require('./ranges/min-version') -const validRange = require('./ranges/valid') -const outside = require('./ranges/outside') -const gtr = require('./ranges/gtr') -const ltr = require('./ranges/ltr') -const intersects = require('./ranges/intersects') -const simplifyRange = require('./ranges/simplify') -const subset = require('./ranges/subset') -module.exports = { - parse, - valid, - clean, - inc, - diff, - major, - minor, - patch, - prerelease, - compare, - rcompare, - compareLoose, - compareBuild, - sort, - rsort, - gt, - lt, - eq, - neq, - gte, - lte, - cmp, - coerce, - Comparator, - Range, - satisfies, - toComparators, - maxSatisfying, - minSatisfying, - minVersion, - validRange, - outside, - gtr, - ltr, - intersects, - simplifyRange, - subset, - SemVer, - re: internalRe.re, - src: internalRe.src, - tokens: internalRe.t, - SEMVER_SPEC_VERSION: constants.SEMVER_SPEC_VERSION, - RELEASE_TYPES: constants.RELEASE_TYPES, - compareIdentifiers: identifiers.compareIdentifiers, - rcompareIdentifiers: identifiers.rcompareIdentifiers, -} diff --git a/node_modules/semver/internal/constants.js b/node_modules/semver/internal/constants.js deleted file mode 100644 index 94be1c5..0000000 --- a/node_modules/semver/internal/constants.js +++ /dev/null @@ -1,35 +0,0 @@ -// Note: this is the semver.org version of the spec that it implements -// Not necessarily the package version of this code. -const SEMVER_SPEC_VERSION = '2.0.0' - -const MAX_LENGTH = 256 -const MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER || -/* istanbul ignore next */ 9007199254740991 - -// Max safe segment length for coercion. -const MAX_SAFE_COMPONENT_LENGTH = 16 - -// Max safe length for a build identifier. The max length minus 6 characters for -// the shortest version with a build 0.0.0+BUILD. -const MAX_SAFE_BUILD_LENGTH = MAX_LENGTH - 6 - -const RELEASE_TYPES = [ - 'major', - 'premajor', - 'minor', - 'preminor', - 'patch', - 'prepatch', - 'prerelease', -] - -module.exports = { - MAX_LENGTH, - MAX_SAFE_COMPONENT_LENGTH, - MAX_SAFE_BUILD_LENGTH, - MAX_SAFE_INTEGER, - RELEASE_TYPES, - SEMVER_SPEC_VERSION, - FLAG_INCLUDE_PRERELEASE: 0b001, - FLAG_LOOSE: 0b010, -} diff --git a/node_modules/semver/internal/debug.js b/node_modules/semver/internal/debug.js deleted file mode 100644 index 1c00e13..0000000 --- a/node_modules/semver/internal/debug.js +++ /dev/null @@ -1,9 +0,0 @@ -const debug = ( - typeof process === 'object' && - process.env && - process.env.NODE_DEBUG && - /\bsemver\b/i.test(process.env.NODE_DEBUG) -) ? (...args) => console.error('SEMVER', ...args) - : () => {} - -module.exports = debug diff --git a/node_modules/semver/internal/identifiers.js b/node_modules/semver/internal/identifiers.js deleted file mode 100644 index e612d0a..0000000 --- a/node_modules/semver/internal/identifiers.js +++ /dev/null @@ -1,23 +0,0 @@ -const numeric = /^[0-9]+$/ -const compareIdentifiers = (a, b) => { - const anum = numeric.test(a) - const bnum = numeric.test(b) - - if (anum && bnum) { - a = +a - b = +b - } - - return a === b ? 0 - : (anum && !bnum) ? -1 - : (bnum && !anum) ? 1 - : a < b ? -1 - : 1 -} - -const rcompareIdentifiers = (a, b) => compareIdentifiers(b, a) - -module.exports = { - compareIdentifiers, - rcompareIdentifiers, -} diff --git a/node_modules/semver/internal/lrucache.js b/node_modules/semver/internal/lrucache.js deleted file mode 100644 index 6d89ec9..0000000 --- a/node_modules/semver/internal/lrucache.js +++ /dev/null @@ -1,40 +0,0 @@ -class LRUCache { - constructor () { - this.max = 1000 - this.map = new Map() - } - - get (key) { - const value = this.map.get(key) - if (value === undefined) { - return undefined - } else { - // Remove the key from the map and add it to the end - this.map.delete(key) - this.map.set(key, value) - return value - } - } - - delete (key) { - return this.map.delete(key) - } - - set (key, value) { - const deleted = this.delete(key) - - if (!deleted && value !== undefined) { - // If cache is full, delete the least recently used item - if (this.map.size >= this.max) { - const firstKey = this.map.keys().next().value - this.delete(firstKey) - } - - this.map.set(key, value) - } - - return this - } -} - -module.exports = LRUCache diff --git a/node_modules/semver/internal/parse-options.js b/node_modules/semver/internal/parse-options.js deleted file mode 100644 index 10d64ce..0000000 --- a/node_modules/semver/internal/parse-options.js +++ /dev/null @@ -1,15 +0,0 @@ -// parse out just the options we care about -const looseOption = Object.freeze({ loose: true }) -const emptyOpts = Object.freeze({ }) -const parseOptions = options => { - if (!options) { - return emptyOpts - } - - if (typeof options !== 'object') { - return looseOption - } - - return options -} -module.exports = parseOptions diff --git a/node_modules/semver/internal/re.js b/node_modules/semver/internal/re.js deleted file mode 100644 index 2a956ba..0000000 --- a/node_modules/semver/internal/re.js +++ /dev/null @@ -1,219 +0,0 @@ -const { - MAX_SAFE_COMPONENT_LENGTH, - MAX_SAFE_BUILD_LENGTH, - MAX_LENGTH, -} = require('./constants') -const debug = require('./debug') -exports = module.exports = {} - -// The actual regexps go on exports.re -const re = exports.re = [] -const safeRe = exports.safeRe = [] -const src = exports.src = [] -const safeSrc = exports.safeSrc = [] -const t = exports.t = {} -let R = 0 - -const LETTERDASHNUMBER = '[a-zA-Z0-9-]' - -// Replace some greedy regex tokens to prevent regex dos issues. These regex are -// used internally via the safeRe object since all inputs in this library get -// normalized first to trim and collapse all extra whitespace. The original -// regexes are exported for userland consumption and lower level usage. A -// future breaking change could export the safer regex only with a note that -// all input should have extra whitespace removed. -const safeRegexReplacements = [ - ['\\s', 1], - ['\\d', MAX_LENGTH], - [LETTERDASHNUMBER, MAX_SAFE_BUILD_LENGTH], -] - -const makeSafeRegex = (value) => { - for (const [token, max] of safeRegexReplacements) { - value = value - .split(`${token}*`).join(`${token}{0,${max}}`) - .split(`${token}+`).join(`${token}{1,${max}}`) - } - return value -} - -const createToken = (name, value, isGlobal) => { - const safe = makeSafeRegex(value) - const index = R++ - debug(name, index, value) - t[name] = index - src[index] = value - safeSrc[index] = safe - re[index] = new RegExp(value, isGlobal ? 'g' : undefined) - safeRe[index] = new RegExp(safe, isGlobal ? 'g' : undefined) -} - -// The following Regular Expressions can be used for tokenizing, -// validating, and parsing SemVer version strings. - -// ## Numeric Identifier -// A single `0`, or a non-zero digit followed by zero or more digits. - -createToken('NUMERICIDENTIFIER', '0|[1-9]\\d*') -createToken('NUMERICIDENTIFIERLOOSE', '\\d+') - -// ## Non-numeric Identifier -// Zero or more digits, followed by a letter or hyphen, and then zero or -// more letters, digits, or hyphens. - -createToken('NONNUMERICIDENTIFIER', `\\d*[a-zA-Z-]${LETTERDASHNUMBER}*`) - -// ## Main Version -// Three dot-separated numeric identifiers. - -createToken('MAINVERSION', `(${src[t.NUMERICIDENTIFIER]})\\.` + - `(${src[t.NUMERICIDENTIFIER]})\\.` + - `(${src[t.NUMERICIDENTIFIER]})`) - -createToken('MAINVERSIONLOOSE', `(${src[t.NUMERICIDENTIFIERLOOSE]})\\.` + - `(${src[t.NUMERICIDENTIFIERLOOSE]})\\.` + - `(${src[t.NUMERICIDENTIFIERLOOSE]})`) - -// ## Pre-release Version Identifier -// A numeric identifier, or a non-numeric identifier. - -createToken('PRERELEASEIDENTIFIER', `(?:${src[t.NUMERICIDENTIFIER] -}|${src[t.NONNUMERICIDENTIFIER]})`) - -createToken('PRERELEASEIDENTIFIERLOOSE', `(?:${src[t.NUMERICIDENTIFIERLOOSE] -}|${src[t.NONNUMERICIDENTIFIER]})`) - -// ## Pre-release Version -// Hyphen, followed by one or more dot-separated pre-release version -// identifiers. - -createToken('PRERELEASE', `(?:-(${src[t.PRERELEASEIDENTIFIER] -}(?:\\.${src[t.PRERELEASEIDENTIFIER]})*))`) - -createToken('PRERELEASELOOSE', `(?:-?(${src[t.PRERELEASEIDENTIFIERLOOSE] -}(?:\\.${src[t.PRERELEASEIDENTIFIERLOOSE]})*))`) - -// ## Build Metadata Identifier -// Any combination of digits, letters, or hyphens. - -createToken('BUILDIDENTIFIER', `${LETTERDASHNUMBER}+`) - -// ## Build Metadata -// Plus sign, followed by one or more period-separated build metadata -// identifiers. - -createToken('BUILD', `(?:\\+(${src[t.BUILDIDENTIFIER] -}(?:\\.${src[t.BUILDIDENTIFIER]})*))`) - -// ## Full Version String -// A main version, followed optionally by a pre-release version and -// build metadata. - -// Note that the only major, minor, patch, and pre-release sections of -// the version string are capturing groups. The build metadata is not a -// capturing group, because it should not ever be used in version -// comparison. - -createToken('FULLPLAIN', `v?${src[t.MAINVERSION] -}${src[t.PRERELEASE]}?${ - src[t.BUILD]}?`) - -createToken('FULL', `^${src[t.FULLPLAIN]}$`) - -// like full, but allows v1.2.3 and =1.2.3, which people do sometimes. -// also, 1.0.0alpha1 (prerelease without the hyphen) which is pretty -// common in the npm registry. -createToken('LOOSEPLAIN', `[v=\\s]*${src[t.MAINVERSIONLOOSE] -}${src[t.PRERELEASELOOSE]}?${ - src[t.BUILD]}?`) - -createToken('LOOSE', `^${src[t.LOOSEPLAIN]}$`) - -createToken('GTLT', '((?:<|>)?=?)') - -// Something like "2.*" or "1.2.x". -// Note that "x.x" is a valid xRange identifer, meaning "any version" -// Only the first item is strictly required. -createToken('XRANGEIDENTIFIERLOOSE', `${src[t.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`) -createToken('XRANGEIDENTIFIER', `${src[t.NUMERICIDENTIFIER]}|x|X|\\*`) - -createToken('XRANGEPLAIN', `[v=\\s]*(${src[t.XRANGEIDENTIFIER]})` + - `(?:\\.(${src[t.XRANGEIDENTIFIER]})` + - `(?:\\.(${src[t.XRANGEIDENTIFIER]})` + - `(?:${src[t.PRERELEASE]})?${ - src[t.BUILD]}?` + - `)?)?`) - -createToken('XRANGEPLAINLOOSE', `[v=\\s]*(${src[t.XRANGEIDENTIFIERLOOSE]})` + - `(?:\\.(${src[t.XRANGEIDENTIFIERLOOSE]})` + - `(?:\\.(${src[t.XRANGEIDENTIFIERLOOSE]})` + - `(?:${src[t.PRERELEASELOOSE]})?${ - src[t.BUILD]}?` + - `)?)?`) - -createToken('XRANGE', `^${src[t.GTLT]}\\s*${src[t.XRANGEPLAIN]}$`) -createToken('XRANGELOOSE', `^${src[t.GTLT]}\\s*${src[t.XRANGEPLAINLOOSE]}$`) - -// Coercion. -// Extract anything that could conceivably be a part of a valid semver -createToken('COERCEPLAIN', `${'(^|[^\\d])' + - '(\\d{1,'}${MAX_SAFE_COMPONENT_LENGTH}})` + - `(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?` + - `(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?`) -createToken('COERCE', `${src[t.COERCEPLAIN]}(?:$|[^\\d])`) -createToken('COERCEFULL', src[t.COERCEPLAIN] + - `(?:${src[t.PRERELEASE]})?` + - `(?:${src[t.BUILD]})?` + - `(?:$|[^\\d])`) -createToken('COERCERTL', src[t.COERCE], true) -createToken('COERCERTLFULL', src[t.COERCEFULL], true) - -// Tilde ranges. -// Meaning is "reasonably at or greater than" -createToken('LONETILDE', '(?:~>?)') - -createToken('TILDETRIM', `(\\s*)${src[t.LONETILDE]}\\s+`, true) -exports.tildeTrimReplace = '$1~' - -createToken('TILDE', `^${src[t.LONETILDE]}${src[t.XRANGEPLAIN]}$`) -createToken('TILDELOOSE', `^${src[t.LONETILDE]}${src[t.XRANGEPLAINLOOSE]}$`) - -// Caret ranges. -// Meaning is "at least and backwards compatible with" -createToken('LONECARET', '(?:\\^)') - -createToken('CARETTRIM', `(\\s*)${src[t.LONECARET]}\\s+`, true) -exports.caretTrimReplace = '$1^' - -createToken('CARET', `^${src[t.LONECARET]}${src[t.XRANGEPLAIN]}$`) -createToken('CARETLOOSE', `^${src[t.LONECARET]}${src[t.XRANGEPLAINLOOSE]}$`) - -// A simple gt/lt/eq thing, or just "" to indicate "any version" -createToken('COMPARATORLOOSE', `^${src[t.GTLT]}\\s*(${src[t.LOOSEPLAIN]})$|^$`) -createToken('COMPARATOR', `^${src[t.GTLT]}\\s*(${src[t.FULLPLAIN]})$|^$`) - -// An expression to strip any whitespace between the gtlt and the thing -// it modifies, so that `> 1.2.3` ==> `>1.2.3` -createToken('COMPARATORTRIM', `(\\s*)${src[t.GTLT] -}\\s*(${src[t.LOOSEPLAIN]}|${src[t.XRANGEPLAIN]})`, true) -exports.comparatorTrimReplace = '$1$2$3' - -// Something like `1.2.3 - 1.2.4` -// Note that these all use the loose form, because they'll be -// checked against either the strict or loose comparator form -// later. -createToken('HYPHENRANGE', `^\\s*(${src[t.XRANGEPLAIN]})` + - `\\s+-\\s+` + - `(${src[t.XRANGEPLAIN]})` + - `\\s*$`) - -createToken('HYPHENRANGELOOSE', `^\\s*(${src[t.XRANGEPLAINLOOSE]})` + - `\\s+-\\s+` + - `(${src[t.XRANGEPLAINLOOSE]})` + - `\\s*$`) - -// Star ranges basically just allow anything at all. -createToken('STAR', '(<|>)?=?\\s*\\*') -// >=0.0.0 is like a star -createToken('GTE0', '^\\s*>=\\s*0\\.0\\.0\\s*$') -createToken('GTE0PRE', '^\\s*>=\\s*0\\.0\\.0-0\\s*$') diff --git a/node_modules/semver/package.json b/node_modules/semver/package.json deleted file mode 100644 index c264454..0000000 --- a/node_modules/semver/package.json +++ /dev/null @@ -1,78 +0,0 @@ -{ - "name": "semver", - "version": "7.7.1", - "description": "The semantic version parser used by npm.", - "main": "index.js", - "scripts": { - "test": "tap", - "snap": "tap", - "lint": "npm run eslint", - "postlint": "template-oss-check", - "lintfix": "npm run eslint -- --fix", - "posttest": "npm run lint", - "template-oss-apply": "template-oss-apply --force", - "eslint": "eslint \"**/*.{js,cjs,ts,mjs,jsx,tsx}\"" - }, - "devDependencies": { - "@npmcli/eslint-config": "^5.0.0", - "@npmcli/template-oss": "4.23.4", - "benchmark": "^2.1.4", - "tap": "^16.0.0" - }, - "license": "ISC", - "repository": { - "type": "git", - "url": "git+https://github.com/npm/node-semver.git" - }, - "bin": { - "semver": "bin/semver.js" - }, - "files": [ - "bin/", - "lib/", - "classes/", - "functions/", - "internal/", - "ranges/", - "index.js", - "preload.js", - "range.bnf" - ], - "tap": { - "timeout": 30, - "coverage-map": "map.js", - "nyc-arg": [ - "--exclude", - "tap-snapshots/**" - ] - }, - "engines": { - "node": ">=10" - }, - "author": "GitHub Inc.", - "templateOSS": { - "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", - "version": "4.23.4", - "engines": ">=10", - "distPaths": [ - "classes/", - "functions/", - "internal/", - "ranges/", - "index.js", - "preload.js", - "range.bnf" - ], - "allowPaths": [ - "/classes/", - "/functions/", - "/internal/", - "/ranges/", - "/index.js", - "/preload.js", - "/range.bnf", - "/benchmarks" - ], - "publish": "true" - } -} diff --git a/node_modules/semver/preload.js b/node_modules/semver/preload.js deleted file mode 100644 index 947cd4f..0000000 --- a/node_modules/semver/preload.js +++ /dev/null @@ -1,2 +0,0 @@ -// XXX remove in v8 or beyond -module.exports = require('./index.js') diff --git a/node_modules/semver/ranges/gtr.js b/node_modules/semver/ranges/gtr.js deleted file mode 100644 index db7e355..0000000 --- a/node_modules/semver/ranges/gtr.js +++ /dev/null @@ -1,4 +0,0 @@ -// Determine if version is greater than all the versions possible in the range. -const outside = require('./outside') -const gtr = (version, range, options) => outside(version, range, '>', options) -module.exports = gtr diff --git a/node_modules/semver/ranges/intersects.js b/node_modules/semver/ranges/intersects.js deleted file mode 100644 index e0e9b7c..0000000 --- a/node_modules/semver/ranges/intersects.js +++ /dev/null @@ -1,7 +0,0 @@ -const Range = require('../classes/range') -const intersects = (r1, r2, options) => { - r1 = new Range(r1, options) - r2 = new Range(r2, options) - return r1.intersects(r2, options) -} -module.exports = intersects diff --git a/node_modules/semver/ranges/ltr.js b/node_modules/semver/ranges/ltr.js deleted file mode 100644 index 528a885..0000000 --- a/node_modules/semver/ranges/ltr.js +++ /dev/null @@ -1,4 +0,0 @@ -const outside = require('./outside') -// Determine if version is less than all the versions possible in the range -const ltr = (version, range, options) => outside(version, range, '<', options) -module.exports = ltr diff --git a/node_modules/semver/ranges/max-satisfying.js b/node_modules/semver/ranges/max-satisfying.js deleted file mode 100644 index 6e3d993..0000000 --- a/node_modules/semver/ranges/max-satisfying.js +++ /dev/null @@ -1,25 +0,0 @@ -const SemVer = require('../classes/semver') -const Range = require('../classes/range') - -const maxSatisfying = (versions, range, options) => { - let max = null - let maxSV = null - let rangeObj = null - try { - rangeObj = new Range(range, options) - } catch (er) { - return null - } - versions.forEach((v) => { - if (rangeObj.test(v)) { - // satisfies(v, range, options) - if (!max || maxSV.compare(v) === -1) { - // compare(max, v, true) - max = v - maxSV = new SemVer(max, options) - } - } - }) - return max -} -module.exports = maxSatisfying diff --git a/node_modules/semver/ranges/min-satisfying.js b/node_modules/semver/ranges/min-satisfying.js deleted file mode 100644 index 9b60974..0000000 --- a/node_modules/semver/ranges/min-satisfying.js +++ /dev/null @@ -1,24 +0,0 @@ -const SemVer = require('../classes/semver') -const Range = require('../classes/range') -const minSatisfying = (versions, range, options) => { - let min = null - let minSV = null - let rangeObj = null - try { - rangeObj = new Range(range, options) - } catch (er) { - return null - } - versions.forEach((v) => { - if (rangeObj.test(v)) { - // satisfies(v, range, options) - if (!min || minSV.compare(v) === 1) { - // compare(min, v, true) - min = v - minSV = new SemVer(min, options) - } - } - }) - return min -} -module.exports = minSatisfying diff --git a/node_modules/semver/ranges/min-version.js b/node_modules/semver/ranges/min-version.js deleted file mode 100644 index 350e1f7..0000000 --- a/node_modules/semver/ranges/min-version.js +++ /dev/null @@ -1,61 +0,0 @@ -const SemVer = require('../classes/semver') -const Range = require('../classes/range') -const gt = require('../functions/gt') - -const minVersion = (range, loose) => { - range = new Range(range, loose) - - let minver = new SemVer('0.0.0') - if (range.test(minver)) { - return minver - } - - minver = new SemVer('0.0.0-0') - if (range.test(minver)) { - return minver - } - - minver = null - for (let i = 0; i < range.set.length; ++i) { - const comparators = range.set[i] - - let setMin = null - comparators.forEach((comparator) => { - // Clone to avoid manipulating the comparator's semver object. - const compver = new SemVer(comparator.semver.version) - switch (comparator.operator) { - case '>': - if (compver.prerelease.length === 0) { - compver.patch++ - } else { - compver.prerelease.push(0) - } - compver.raw = compver.format() - /* fallthrough */ - case '': - case '>=': - if (!setMin || gt(compver, setMin)) { - setMin = compver - } - break - case '<': - case '<=': - /* Ignore maximum versions */ - break - /* istanbul ignore next */ - default: - throw new Error(`Unexpected operation: ${comparator.operator}`) - } - }) - if (setMin && (!minver || gt(minver, setMin))) { - minver = setMin - } - } - - if (minver && range.test(minver)) { - return minver - } - - return null -} -module.exports = minVersion diff --git a/node_modules/semver/ranges/outside.js b/node_modules/semver/ranges/outside.js deleted file mode 100644 index ae99b10..0000000 --- a/node_modules/semver/ranges/outside.js +++ /dev/null @@ -1,80 +0,0 @@ -const SemVer = require('../classes/semver') -const Comparator = require('../classes/comparator') -const { ANY } = Comparator -const Range = require('../classes/range') -const satisfies = require('../functions/satisfies') -const gt = require('../functions/gt') -const lt = require('../functions/lt') -const lte = require('../functions/lte') -const gte = require('../functions/gte') - -const outside = (version, range, hilo, options) => { - version = new SemVer(version, options) - range = new Range(range, options) - - let gtfn, ltefn, ltfn, comp, ecomp - switch (hilo) { - case '>': - gtfn = gt - ltefn = lte - ltfn = lt - comp = '>' - ecomp = '>=' - break - case '<': - gtfn = lt - ltefn = gte - ltfn = gt - comp = '<' - ecomp = '<=' - break - default: - throw new TypeError('Must provide a hilo val of "<" or ">"') - } - - // If it satisfies the range it is not outside - if (satisfies(version, range, options)) { - return false - } - - // From now on, variable terms are as if we're in "gtr" mode. - // but note that everything is flipped for the "ltr" function. - - for (let i = 0; i < range.set.length; ++i) { - const comparators = range.set[i] - - let high = null - let low = null - - comparators.forEach((comparator) => { - if (comparator.semver === ANY) { - comparator = new Comparator('>=0.0.0') - } - high = high || comparator - low = low || comparator - if (gtfn(comparator.semver, high.semver, options)) { - high = comparator - } else if (ltfn(comparator.semver, low.semver, options)) { - low = comparator - } - }) - - // If the edge version comparator has a operator then our version - // isn't outside it - if (high.operator === comp || high.operator === ecomp) { - return false - } - - // If the lowest version comparator has an operator and our version - // is less than it then it isn't higher than the range - if ((!low.operator || low.operator === comp) && - ltefn(version, low.semver)) { - return false - } else if (low.operator === ecomp && ltfn(version, low.semver)) { - return false - } - } - return true -} - -module.exports = outside diff --git a/node_modules/semver/ranges/simplify.js b/node_modules/semver/ranges/simplify.js deleted file mode 100644 index 618d5b6..0000000 --- a/node_modules/semver/ranges/simplify.js +++ /dev/null @@ -1,47 +0,0 @@ -// given a set of versions and a range, create a "simplified" range -// that includes the same versions that the original range does -// If the original range is shorter than the simplified one, return that. -const satisfies = require('../functions/satisfies.js') -const compare = require('../functions/compare.js') -module.exports = (versions, range, options) => { - const set = [] - let first = null - let prev = null - const v = versions.sort((a, b) => compare(a, b, options)) - for (const version of v) { - const included = satisfies(version, range, options) - if (included) { - prev = version - if (!first) { - first = version - } - } else { - if (prev) { - set.push([first, prev]) - } - prev = null - first = null - } - } - if (first) { - set.push([first, null]) - } - - const ranges = [] - for (const [min, max] of set) { - if (min === max) { - ranges.push(min) - } else if (!max && min === v[0]) { - ranges.push('*') - } else if (!max) { - ranges.push(`>=${min}`) - } else if (min === v[0]) { - ranges.push(`<=${max}`) - } else { - ranges.push(`${min} - ${max}`) - } - } - const simplified = ranges.join(' || ') - const original = typeof range.raw === 'string' ? range.raw : String(range) - return simplified.length < original.length ? simplified : range -} diff --git a/node_modules/semver/ranges/subset.js b/node_modules/semver/ranges/subset.js deleted file mode 100644 index 1e5c268..0000000 --- a/node_modules/semver/ranges/subset.js +++ /dev/null @@ -1,247 +0,0 @@ -const Range = require('../classes/range.js') -const Comparator = require('../classes/comparator.js') -const { ANY } = Comparator -const satisfies = require('../functions/satisfies.js') -const compare = require('../functions/compare.js') - -// Complex range `r1 || r2 || ...` is a subset of `R1 || R2 || ...` iff: -// - Every simple range `r1, r2, ...` is a null set, OR -// - Every simple range `r1, r2, ...` which is not a null set is a subset of -// some `R1, R2, ...` -// -// Simple range `c1 c2 ...` is a subset of simple range `C1 C2 ...` iff: -// - If c is only the ANY comparator -// - If C is only the ANY comparator, return true -// - Else if in prerelease mode, return false -// - else replace c with `[>=0.0.0]` -// - If C is only the ANY comparator -// - if in prerelease mode, return true -// - else replace C with `[>=0.0.0]` -// - Let EQ be the set of = comparators in c -// - If EQ is more than one, return true (null set) -// - Let GT be the highest > or >= comparator in c -// - Let LT be the lowest < or <= comparator in c -// - If GT and LT, and GT.semver > LT.semver, return true (null set) -// - If any C is a = range, and GT or LT are set, return false -// - If EQ -// - If GT, and EQ does not satisfy GT, return true (null set) -// - If LT, and EQ does not satisfy LT, return true (null set) -// - If EQ satisfies every C, return true -// - Else return false -// - If GT -// - If GT.semver is lower than any > or >= comp in C, return false -// - If GT is >=, and GT.semver does not satisfy every C, return false -// - If GT.semver has a prerelease, and not in prerelease mode -// - If no C has a prerelease and the GT.semver tuple, return false -// - If LT -// - If LT.semver is greater than any < or <= comp in C, return false -// - If LT is <=, and LT.semver does not satisfy every C, return false -// - If GT.semver has a prerelease, and not in prerelease mode -// - If no C has a prerelease and the LT.semver tuple, return false -// - Else return true - -const subset = (sub, dom, options = {}) => { - if (sub === dom) { - return true - } - - sub = new Range(sub, options) - dom = new Range(dom, options) - let sawNonNull = false - - OUTER: for (const simpleSub of sub.set) { - for (const simpleDom of dom.set) { - const isSub = simpleSubset(simpleSub, simpleDom, options) - sawNonNull = sawNonNull || isSub !== null - if (isSub) { - continue OUTER - } - } - // the null set is a subset of everything, but null simple ranges in - // a complex range should be ignored. so if we saw a non-null range, - // then we know this isn't a subset, but if EVERY simple range was null, - // then it is a subset. - if (sawNonNull) { - return false - } - } - return true -} - -const minimumVersionWithPreRelease = [new Comparator('>=0.0.0-0')] -const minimumVersion = [new Comparator('>=0.0.0')] - -const simpleSubset = (sub, dom, options) => { - if (sub === dom) { - return true - } - - if (sub.length === 1 && sub[0].semver === ANY) { - if (dom.length === 1 && dom[0].semver === ANY) { - return true - } else if (options.includePrerelease) { - sub = minimumVersionWithPreRelease - } else { - sub = minimumVersion - } - } - - if (dom.length === 1 && dom[0].semver === ANY) { - if (options.includePrerelease) { - return true - } else { - dom = minimumVersion - } - } - - const eqSet = new Set() - let gt, lt - for (const c of sub) { - if (c.operator === '>' || c.operator === '>=') { - gt = higherGT(gt, c, options) - } else if (c.operator === '<' || c.operator === '<=') { - lt = lowerLT(lt, c, options) - } else { - eqSet.add(c.semver) - } - } - - if (eqSet.size > 1) { - return null - } - - let gtltComp - if (gt && lt) { - gtltComp = compare(gt.semver, lt.semver, options) - if (gtltComp > 0) { - return null - } else if (gtltComp === 0 && (gt.operator !== '>=' || lt.operator !== '<=')) { - return null - } - } - - // will iterate one or zero times - for (const eq of eqSet) { - if (gt && !satisfies(eq, String(gt), options)) { - return null - } - - if (lt && !satisfies(eq, String(lt), options)) { - return null - } - - for (const c of dom) { - if (!satisfies(eq, String(c), options)) { - return false - } - } - - return true - } - - let higher, lower - let hasDomLT, hasDomGT - // if the subset has a prerelease, we need a comparator in the superset - // with the same tuple and a prerelease, or it's not a subset - let needDomLTPre = lt && - !options.includePrerelease && - lt.semver.prerelease.length ? lt.semver : false - let needDomGTPre = gt && - !options.includePrerelease && - gt.semver.prerelease.length ? gt.semver : false - // exception: <1.2.3-0 is the same as <1.2.3 - if (needDomLTPre && needDomLTPre.prerelease.length === 1 && - lt.operator === '<' && needDomLTPre.prerelease[0] === 0) { - needDomLTPre = false - } - - for (const c of dom) { - hasDomGT = hasDomGT || c.operator === '>' || c.operator === '>=' - hasDomLT = hasDomLT || c.operator === '<' || c.operator === '<=' - if (gt) { - if (needDomGTPre) { - if (c.semver.prerelease && c.semver.prerelease.length && - c.semver.major === needDomGTPre.major && - c.semver.minor === needDomGTPre.minor && - c.semver.patch === needDomGTPre.patch) { - needDomGTPre = false - } - } - if (c.operator === '>' || c.operator === '>=') { - higher = higherGT(gt, c, options) - if (higher === c && higher !== gt) { - return false - } - } else if (gt.operator === '>=' && !satisfies(gt.semver, String(c), options)) { - return false - } - } - if (lt) { - if (needDomLTPre) { - if (c.semver.prerelease && c.semver.prerelease.length && - c.semver.major === needDomLTPre.major && - c.semver.minor === needDomLTPre.minor && - c.semver.patch === needDomLTPre.patch) { - needDomLTPre = false - } - } - if (c.operator === '<' || c.operator === '<=') { - lower = lowerLT(lt, c, options) - if (lower === c && lower !== lt) { - return false - } - } else if (lt.operator === '<=' && !satisfies(lt.semver, String(c), options)) { - return false - } - } - if (!c.operator && (lt || gt) && gtltComp !== 0) { - return false - } - } - - // if there was a < or >, and nothing in the dom, then must be false - // UNLESS it was limited by another range in the other direction. - // Eg, >1.0.0 <1.0.1 is still a subset of <2.0.0 - if (gt && hasDomLT && !lt && gtltComp !== 0) { - return false - } - - if (lt && hasDomGT && !gt && gtltComp !== 0) { - return false - } - - // we needed a prerelease range in a specific tuple, but didn't get one - // then this isn't a subset. eg >=1.2.3-pre is not a subset of >=1.0.0, - // because it includes prereleases in the 1.2.3 tuple - if (needDomGTPre || needDomLTPre) { - return false - } - - return true -} - -// >=1.2.3 is lower than >1.2.3 -const higherGT = (a, b, options) => { - if (!a) { - return b - } - const comp = compare(a.semver, b.semver, options) - return comp > 0 ? a - : comp < 0 ? b - : b.operator === '>' && a.operator === '>=' ? b - : a -} - -// <=1.2.3 is higher than <1.2.3 -const lowerLT = (a, b, options) => { - if (!a) { - return b - } - const comp = compare(a.semver, b.semver, options) - return comp < 0 ? a - : comp > 0 ? b - : b.operator === '<' && a.operator === '<=' ? b - : a -} - -module.exports = subset diff --git a/node_modules/semver/ranges/to-comparators.js b/node_modules/semver/ranges/to-comparators.js deleted file mode 100644 index 6c8bc7e..0000000 --- a/node_modules/semver/ranges/to-comparators.js +++ /dev/null @@ -1,8 +0,0 @@ -const Range = require('../classes/range') - -// Mostly just for testing and legacy API reasons -const toComparators = (range, options) => - new Range(range, options).set - .map(comp => comp.map(c => c.value).join(' ').trim().split(' ')) - -module.exports = toComparators diff --git a/node_modules/semver/ranges/valid.js b/node_modules/semver/ranges/valid.js deleted file mode 100644 index 365f356..0000000 --- a/node_modules/semver/ranges/valid.js +++ /dev/null @@ -1,11 +0,0 @@ -const Range = require('../classes/range') -const validRange = (range, options) => { - try { - // Return '*' instead of '' so that truthiness works. - // This will throw if it's invalid anyway - return new Range(range, options).range || '*' - } catch (er) { - return null - } -} -module.exports = validRange diff --git a/node_modules/serve-favicon/index.js b/node_modules/serve-favicon/index.js new file mode 100644 index 0000000..983ca2f --- /dev/null +++ b/node_modules/serve-favicon/index.js @@ -0,0 +1,226 @@ +/*! + * serve-favicon + * Copyright(c) 2010 Sencha Inc. + * Copyright(c) 2011 TJ Holowaychuk + * Copyright(c) 2014-2017 Douglas Christopher Wilson + * MIT Licensed + */ + +'use strict' + +/** + * Module dependencies. + * @private + */ + +var Buffer = require('safe-buffer').Buffer +var etag = require('etag') +var fresh = require('fresh') +var fs = require('fs') +var ms = require('ms') +var parseUrl = require('parseurl') +var path = require('path') +var resolve = path.resolve + +/** + * Module exports. + * @public + */ + +module.exports = favicon + +/** + * Module variables. + * @private + */ + +var ONE_YEAR_MS = 60 * 60 * 24 * 365 * 1000 // 1 year + +/** + * Serves the favicon located by the given `path`. + * + * @public + * @param {String|Buffer} path + * @param {Object} [options] + * @return {Function} middleware + */ + +function favicon (path, options) { + var opts = options || {} + + var icon // favicon cache + var maxAge = calcMaxAge(opts.maxAge) + + if (!path) { + throw new TypeError('path to favicon.ico is required') + } + + if (Buffer.isBuffer(path)) { + icon = createIcon(Buffer.from(path), maxAge) + } else if (typeof path === 'string') { + path = resolveSync(path) + } else { + throw new TypeError('path to favicon.ico must be string or buffer') + } + + return function favicon (req, res, next) { + if (getPathname(req) !== '/favicon.ico') { + next() + return + } + + if (req.method !== 'GET' && req.method !== 'HEAD') { + res.statusCode = req.method === 'OPTIONS' ? 200 : 405 + res.setHeader('Allow', 'GET, HEAD, OPTIONS') + res.setHeader('Content-Length', '0') + res.end() + return + } + + if (icon) { + send(req, res, icon) + return + } + + fs.readFile(path, function (err, buf) { + if (err) return next(err) + icon = createIcon(buf, maxAge) + send(req, res, icon) + }) + } +} + +/** + * Calculate the max-age from a configured value. + * + * @private + * @param {string|number} val + * @return {number} + */ + +function calcMaxAge (val) { + var num = typeof val === 'string' + ? ms(val) + : val + + return num != null + ? Math.min(Math.max(0, num), ONE_YEAR_MS) + : ONE_YEAR_MS +} + +/** + * Create icon data from Buffer and max-age. + * + * @private + * @param {Buffer} buf + * @param {number} maxAge + * @return {object} + */ + +function createIcon (buf, maxAge) { + return { + body: buf, + headers: { + 'Cache-Control': 'public, max-age=' + Math.floor(maxAge / 1000), + 'ETag': etag(buf) + } + } +} + +/** + * Create EISDIR error. + * + * @private + * @param {string} path + * @return {Error} + */ + +function createIsDirError (path) { + var error = new Error('EISDIR, illegal operation on directory \'' + path + '\'') + error.code = 'EISDIR' + error.errno = 28 + error.path = path + error.syscall = 'open' + return error +} + +/** + * Get the request pathname. + * + * @param {object} req + * @return {string} + */ + +function getPathname (req) { + try { + return parseUrl(req).pathname + } catch (e) { + return undefined + } +} + +/** + * Determine if the cached representation is fresh. + * + * @param {object} req + * @param {object} res + * @return {boolean} + * @private + */ + +function isFresh (req, res) { + return fresh(req.headers, { + 'etag': res.getHeader('ETag'), + 'last-modified': res.getHeader('Last-Modified') + }) +} + +/** + * Resolve the path to icon. + * + * @param {string} iconPath + * @private + */ + +function resolveSync (iconPath) { + var path = resolve(iconPath) + var stat = fs.statSync(path) + + if (stat.isDirectory()) { + throw createIsDirError(path) + } + + return path +} + +/** + * Send icon data in response to a request. + * + * @private + * @param {IncomingMessage} req + * @param {OutgoingMessage} res + * @param {object} icon + */ + +function send (req, res, icon) { + // Set headers + var headers = icon.headers + var keys = Object.keys(headers) + for (var i = 0; i < keys.length; i++) { + var key = keys[i] + res.setHeader(key, headers[key]) + } + + // Validate freshness + if (isFresh(req, res)) { + res.statusCode = 304 + res.end() + return + } + + // Send icon + res.statusCode = 200 + res.setHeader('Content-Length', icon.body.length) + res.setHeader('Content-Type', 'image/x-icon') + res.end(icon.body) +} diff --git a/node_modules/serve-favicon/node_modules/ms/index.js b/node_modules/serve-favicon/node_modules/ms/index.js new file mode 100644 index 0000000..7229750 --- /dev/null +++ b/node_modules/serve-favicon/node_modules/ms/index.js @@ -0,0 +1,162 @@ +/** + * Helpers. + */ + +var s = 1000; +var m = s * 60; +var h = m * 60; +var d = h * 24; +var w = d * 7; +var y = d * 365.25; + +/** + * Parse or format the given `val`. + * + * Options: + * + * - `long` verbose formatting [false] + * + * @param {String|Number} val + * @param {Object} [options] + * @throws {Error} throw an error if val is not a non-empty string or a number + * @return {String|Number} + * @api public + */ + +module.exports = function(val, options) { + options = options || {}; + var type = typeof val; + if (type === 'string' && val.length > 0) { + return parse(val); + } else if (type === 'number' && isNaN(val) === false) { + return options.long ? fmtLong(val) : fmtShort(val); + } + throw new Error( + 'val is not a non-empty string or a valid number. val=' + + JSON.stringify(val) + ); +}; + +/** + * Parse the given `str` and return milliseconds. + * + * @param {String} str + * @return {Number} + * @api private + */ + +function parse(str) { + str = String(str); + if (str.length > 100) { + return; + } + var match = /^((?:\d+)?\-?\d?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec( + str + ); + if (!match) { + return; + } + var n = parseFloat(match[1]); + var type = (match[2] || 'ms').toLowerCase(); + switch (type) { + case 'years': + case 'year': + case 'yrs': + case 'yr': + case 'y': + return n * y; + case 'weeks': + case 'week': + case 'w': + return n * w; + case 'days': + case 'day': + case 'd': + return n * d; + case 'hours': + case 'hour': + case 'hrs': + case 'hr': + case 'h': + return n * h; + case 'minutes': + case 'minute': + case 'mins': + case 'min': + case 'm': + return n * m; + case 'seconds': + case 'second': + case 'secs': + case 'sec': + case 's': + return n * s; + case 'milliseconds': + case 'millisecond': + case 'msecs': + case 'msec': + case 'ms': + return n; + default: + return undefined; + } +} + +/** + * Short format for `ms`. + * + * @param {Number} ms + * @return {String} + * @api private + */ + +function fmtShort(ms) { + var msAbs = Math.abs(ms); + if (msAbs >= d) { + return Math.round(ms / d) + 'd'; + } + if (msAbs >= h) { + return Math.round(ms / h) + 'h'; + } + if (msAbs >= m) { + return Math.round(ms / m) + 'm'; + } + if (msAbs >= s) { + return Math.round(ms / s) + 's'; + } + return ms + 'ms'; +} + +/** + * Long format for `ms`. + * + * @param {Number} ms + * @return {String} + * @api private + */ + +function fmtLong(ms) { + var msAbs = Math.abs(ms); + if (msAbs >= d) { + return plural(ms, msAbs, d, 'day'); + } + if (msAbs >= h) { + return plural(ms, msAbs, h, 'hour'); + } + if (msAbs >= m) { + return plural(ms, msAbs, m, 'minute'); + } + if (msAbs >= s) { + return plural(ms, msAbs, s, 'second'); + } + return ms + ' ms'; +} + +/** + * Pluralization helper. + */ + +function plural(ms, msAbs, n, name) { + var isPlural = msAbs >= n * 1.5; + return Math.round(ms / n) + ' ' + name + (isPlural ? 's' : ''); +} diff --git a/node_modules/serve-favicon/node_modules/ms/package.json b/node_modules/serve-favicon/node_modules/ms/package.json new file mode 100644 index 0000000..fc28cb3 --- /dev/null +++ b/node_modules/serve-favicon/node_modules/ms/package.json @@ -0,0 +1,37 @@ +{ + "name": "ms", + "version": "2.1.1", + "description": "Tiny millisecond conversion utility", + "repository": "zeit/ms", + "main": "./index", + "files": [ + "index.js" + ], + "scripts": { + "precommit": "lint-staged", + "lint": "eslint lib/* bin/*", + "test": "mocha tests.js" + }, + "eslintConfig": { + "extends": "eslint:recommended", + "env": { + "node": true, + "es6": true + } + }, + "lint-staged": { + "*.js": [ + "npm run lint", + "prettier --single-quote --write", + "git add" + ] + }, + "license": "MIT", + "devDependencies": { + "eslint": "4.12.1", + "expect.js": "0.3.1", + "husky": "0.14.3", + "lint-staged": "5.0.0", + "mocha": "4.0.1" + } +} diff --git a/node_modules/serve-favicon/node_modules/safe-buffer/index.js b/node_modules/serve-favicon/node_modules/safe-buffer/index.js new file mode 100644 index 0000000..22438da --- /dev/null +++ b/node_modules/serve-favicon/node_modules/safe-buffer/index.js @@ -0,0 +1,62 @@ +/* eslint-disable node/no-deprecated-api */ +var buffer = require('buffer') +var Buffer = buffer.Buffer + +// alternative to using Object.keys for old browsers +function copyProps (src, dst) { + for (var key in src) { + dst[key] = src[key] + } +} +if (Buffer.from && Buffer.alloc && Buffer.allocUnsafe && Buffer.allocUnsafeSlow) { + module.exports = buffer +} else { + // Copy properties from require('buffer') + copyProps(buffer, exports) + exports.Buffer = SafeBuffer +} + +function SafeBuffer (arg, encodingOrOffset, length) { + return Buffer(arg, encodingOrOffset, length) +} + +// Copy static methods from Buffer +copyProps(Buffer, SafeBuffer) + +SafeBuffer.from = function (arg, encodingOrOffset, length) { + if (typeof arg === 'number') { + throw new TypeError('Argument must not be a number') + } + return Buffer(arg, encodingOrOffset, length) +} + +SafeBuffer.alloc = function (size, fill, encoding) { + if (typeof size !== 'number') { + throw new TypeError('Argument must be a number') + } + var buf = Buffer(size) + if (fill !== undefined) { + if (typeof encoding === 'string') { + buf.fill(fill, encoding) + } else { + buf.fill(fill) + } + } else { + buf.fill(0) + } + return buf +} + +SafeBuffer.allocUnsafe = function (size) { + if (typeof size !== 'number') { + throw new TypeError('Argument must be a number') + } + return Buffer(size) +} + +SafeBuffer.allocUnsafeSlow = function (size) { + if (typeof size !== 'number') { + throw new TypeError('Argument must be a number') + } + return buffer.SlowBuffer(size) +} diff --git a/node_modules/serve-favicon/node_modules/safe-buffer/package.json b/node_modules/serve-favicon/node_modules/safe-buffer/package.json new file mode 100644 index 0000000..356d8bf --- /dev/null +++ b/node_modules/serve-favicon/node_modules/safe-buffer/package.json @@ -0,0 +1,37 @@ +{ + "name": "safe-buffer", + "description": "Safer Node.js Buffer API", + "version": "5.1.1", + "author": { + "name": "Feross Aboukhadijeh", + "email": "feross@feross.org", + "url": "http://feross.org" + }, + "bugs": { + "url": "https://github.com/feross/safe-buffer/issues" + }, + "devDependencies": { + "standard": "*", + "tape": "^4.0.0", + "zuul": "^3.0.0" + }, + "homepage": "https://github.com/feross/safe-buffer", + "keywords": [ + "buffer", + "buffer allocate", + "node security", + "safe", + "safe-buffer", + "security", + "uninitialized" + ], + "license": "MIT", + "main": "index.js", + "repository": { + "type": "git", + "url": "git://github.com/feross/safe-buffer.git" + }, + "scripts": { + "test": "standard && tape test.js" + } +} diff --git a/node_modules/serve-favicon/node_modules/safe-buffer/test.js b/node_modules/serve-favicon/node_modules/safe-buffer/test.js new file mode 100644 index 0000000..4925059 --- /dev/null +++ b/node_modules/serve-favicon/node_modules/safe-buffer/test.js @@ -0,0 +1,101 @@ +/* eslint-disable node/no-deprecated-api */ + +var test = require('tape') +var SafeBuffer = require('./').Buffer + +test('new SafeBuffer(value) works just like Buffer', function (t) { + t.deepEqual(new SafeBuffer('hey'), new Buffer('hey')) + t.deepEqual(new SafeBuffer('hey', 'utf8'), new Buffer('hey', 'utf8')) + t.deepEqual(new SafeBuffer('686579', 'hex'), new Buffer('686579', 'hex')) + t.deepEqual(new SafeBuffer([1, 2, 3]), new Buffer([1, 2, 3])) + t.deepEqual(new SafeBuffer(new Uint8Array([1, 2, 3])), new Buffer(new Uint8Array([1, 2, 3]))) + + t.equal(typeof SafeBuffer.isBuffer, 'function') + t.equal(SafeBuffer.isBuffer(new SafeBuffer('hey')), true) + t.equal(Buffer.isBuffer(new SafeBuffer('hey')), true) + t.notOk(SafeBuffer.isBuffer({})) + + t.end() +}) + +test('SafeBuffer.from(value) converts to a Buffer', function (t) { + t.deepEqual(SafeBuffer.from('hey'), new Buffer('hey')) + t.deepEqual(SafeBuffer.from('hey', 'utf8'), new Buffer('hey', 'utf8')) + t.deepEqual(SafeBuffer.from('686579', 'hex'), new Buffer('686579', 'hex')) + t.deepEqual(SafeBuffer.from([1, 2, 3]), new Buffer([1, 2, 3])) + t.deepEqual(SafeBuffer.from(new Uint8Array([1, 2, 3])), new Buffer(new Uint8Array([1, 2, 3]))) + + t.end() +}) + +test('SafeBuffer.alloc(number) returns zeroed-out memory', function (t) { + for (var i = 0; i < 10; i++) { + var expected1 = new Buffer(1000) + expected1.fill(0) + t.deepEqual(SafeBuffer.alloc(1000), expected1) + + var expected2 = new Buffer(1000 * 1000) + expected2.fill(0) + t.deepEqual(SafeBuffer.alloc(1000 * 1000), expected2) + } + t.end() +}) + +test('SafeBuffer.allocUnsafe(number)', function (t) { + var buf = SafeBuffer.allocUnsafe(100) // unitialized memory + t.equal(buf.length, 100) + t.equal(SafeBuffer.isBuffer(buf), true) + t.equal(Buffer.isBuffer(buf), true) + t.end() +}) + +test('SafeBuffer.from() throws with number types', function (t) { + t.plan(5) + t.throws(function () { + SafeBuffer.from(0) + }) + t.throws(function () { + SafeBuffer.from(-1) + }) + t.throws(function () { + SafeBuffer.from(NaN) + }) + t.throws(function () { + SafeBuffer.from(Infinity) + }) + t.throws(function () { + SafeBuffer.from(99) + }) +}) + +test('SafeBuffer.allocUnsafe() throws with non-number types', function (t) { + t.plan(4) + t.throws(function () { + SafeBuffer.allocUnsafe('hey') + }) + t.throws(function () { + SafeBuffer.allocUnsafe('hey', 'utf8') + }) + t.throws(function () { + SafeBuffer.allocUnsafe([1, 2, 3]) + }) + t.throws(function () { + SafeBuffer.allocUnsafe({}) + }) +}) + +test('SafeBuffer.alloc() throws with non-number types', function (t) { + t.plan(4) + t.throws(function () { + SafeBuffer.alloc('hey') + }) + t.throws(function () { + SafeBuffer.alloc('hey', 'utf8') + }) + t.throws(function () { + SafeBuffer.alloc([1, 2, 3]) + }) + t.throws(function () { + SafeBuffer.alloc({}) + }) +}) diff --git a/node_modules/serve-favicon/package.json b/node_modules/serve-favicon/package.json new file mode 100644 index 0000000..078a615 --- /dev/null +++ b/node_modules/serve-favicon/package.json @@ -0,0 +1,47 @@ +{ + "name": "serve-favicon", + "description": "favicon serving middleware with caching", + "version": "2.5.0", + "author": "Douglas Christopher Wilson <doug@somethingdoug.com>", + "license": "MIT", + "keywords": [ + "express", + "favicon", + "middleware" + ], + "repository": "expressjs/serve-favicon", + "dependencies": { + "etag": "~1.8.1", + "fresh": "0.5.2", + "ms": "2.1.1", + "parseurl": "~1.3.2", + "safe-buffer": "5.1.1" + }, + "devDependencies": { + "eslint": "4.19.1", + "eslint-config-standard": "11.0.0", + "eslint-plugin-import": "2.9.0", + "eslint-plugin-markdown": "1.0.0-beta.6", + "eslint-plugin-node": "6.0.1", + "eslint-plugin-promise": "3.7.0", + "eslint-plugin-standard": "3.0.1", + "istanbul": "0.4.5", + "mocha": "2.5.3", + "supertest": "1.1.0", + "temp-path": "1.0.0" + }, + "files": [ + "LICENSE", + "HISTORY.md", + "index.js" + ], + "engines": { + "node": ">= 0.8.0" + }, + "scripts": { + "lint": "eslint --plugin markdown --ext js,md .", + "test": "mocha --reporter spec --bail --check-leaks test/", + "test-ci": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec --check-leaks test/", + "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --check-leaks test/" + } +} diff --git a/node_modules/simple-update-notifier/build/index.d.ts b/node_modules/simple-update-notifier/build/index.d.ts deleted file mode 100644 index 60f53e0..0000000 --- a/node_modules/simple-update-notifier/build/index.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -interface IUpdate { - pkg: { - name: string; - version: string; - }; - updateCheckInterval?: number; - shouldNotifyInNpmScript?: boolean; - distTag?: string; - alwaysRun?: boolean; - debug?: boolean; -} -declare const simpleUpdateNotifier: (args: IUpdate) => Promise<void>; -export { simpleUpdateNotifier as default }; diff --git a/node_modules/simple-update-notifier/build/index.js b/node_modules/simple-update-notifier/build/index.js deleted file mode 100644 index 090f9df..0000000 --- a/node_modules/simple-update-notifier/build/index.js +++ /dev/null @@ -1,210 +0,0 @@ -'use strict'; - -var process$1 = require('process'); -var semver = require('semver'); -var os = require('os'); -var path = require('path'); -var fs = require('fs'); -var https = require('https'); - -/****************************************************************************** -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 */ - - -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()); - }); -} - -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 }; - } -} - -var packageJson = process$1.env.npm_package_json; -var userAgent = process$1.env.npm_config_user_agent; -var isNpm6 = Boolean(userAgent && userAgent.startsWith('npm')); -var isNpm7 = Boolean(packageJson && packageJson.endsWith('package.json')); -var isNpm = isNpm6 || isNpm7; -var isYarn = Boolean(userAgent && userAgent.startsWith('yarn')); -var isNpmOrYarn = isNpm || isYarn; - -var homeDirectory = os.homedir(); -var configDir = process.env.XDG_CONFIG_HOME || - path.join(homeDirectory, '.config', 'simple-update-notifier'); -var getConfigFile = function (packageName) { - return path.join(configDir, "".concat(packageName.replace('@', '').replace('/', '__'), ".json")); -}; -var createConfigDir = function () { - if (!fs.existsSync(configDir)) { - fs.mkdirSync(configDir, { recursive: true }); - } -}; -var getLastUpdate = function (packageName) { - var configFile = getConfigFile(packageName); - try { - if (!fs.existsSync(configFile)) { - return undefined; - } - var file = JSON.parse(fs.readFileSync(configFile, 'utf8')); - return file.lastUpdateCheck; - } - catch (_a) { - return undefined; - } -}; -var saveLastUpdate = function (packageName) { - var configFile = getConfigFile(packageName); - fs.writeFileSync(configFile, JSON.stringify({ lastUpdateCheck: new Date().getTime() })); -}; - -var getDistVersion = function (packageName, distTag) { return __awaiter(void 0, void 0, void 0, function () { - var url; - return __generator(this, function (_a) { - url = "https://registry.npmjs.org/-/package/".concat(packageName, "/dist-tags"); - return [2 /*return*/, new Promise(function (resolve, reject) { - https - .get(url, function (res) { - var body = ''; - res.on('data', function (chunk) { return (body += chunk); }); - res.on('end', function () { - try { - var json = JSON.parse(body); - var version = json[distTag]; - if (!version) { - reject(new Error('Error getting version')); - } - resolve(version); - } - catch (_a) { - reject(new Error('Could not parse version response')); - } - }); - }) - .on('error', function (err) { return reject(err); }); - })]; - }); -}); }; - -var hasNewVersion = function (_a) { - var pkg = _a.pkg, _b = _a.updateCheckInterval, updateCheckInterval = _b === void 0 ? 1000 * 60 * 60 * 24 : _b, _c = _a.distTag, distTag = _c === void 0 ? 'latest' : _c, alwaysRun = _a.alwaysRun, debug = _a.debug; - return __awaiter(void 0, void 0, void 0, function () { - var lastUpdateCheck, latestVersion; - return __generator(this, function (_d) { - switch (_d.label) { - case 0: - createConfigDir(); - lastUpdateCheck = getLastUpdate(pkg.name); - if (!(alwaysRun || - !lastUpdateCheck || - lastUpdateCheck < new Date().getTime() - updateCheckInterval)) return [3 /*break*/, 2]; - return [4 /*yield*/, getDistVersion(pkg.name, distTag)]; - case 1: - latestVersion = _d.sent(); - saveLastUpdate(pkg.name); - if (semver.gt(latestVersion, pkg.version)) { - return [2 /*return*/, latestVersion]; - } - else if (debug) { - console.error("Latest version (".concat(latestVersion, ") not newer than current version (").concat(pkg.version, ")")); - } - return [3 /*break*/, 3]; - case 2: - if (debug) { - console.error("Too recent to check for a new update. simpleUpdateNotifier() interval set to ".concat(updateCheckInterval, "ms but only ").concat(new Date().getTime() - lastUpdateCheck, "ms since last check.")); - } - _d.label = 3; - case 3: return [2 /*return*/, false]; - } - }); - }); -}; - -var borderedText = function (text) { - var lines = text.split('\n'); - var width = Math.max.apply(Math, lines.map(function (l) { return l.length; })); - var res = ["\u250C".concat('─'.repeat(width + 2), "\u2510")]; - for (var _i = 0, lines_1 = lines; _i < lines_1.length; _i++) { - var line = lines_1[_i]; - res.push("\u2502 ".concat(line.padEnd(width), " \u2502")); - } - res.push("\u2514".concat('─'.repeat(width + 2), "\u2518")); - return res.join('\n'); -}; - -var simpleUpdateNotifier = function (args) { return __awaiter(void 0, void 0, void 0, function () { - var latestVersion, err_1; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - if (!args.alwaysRun && - (!process.stdout.isTTY || (isNpmOrYarn && !args.shouldNotifyInNpmScript))) { - if (args.debug) { - console.error('Opting out of running simpleUpdateNotifier()'); - } - return [2 /*return*/]; - } - _a.label = 1; - case 1: - _a.trys.push([1, 3, , 4]); - return [4 /*yield*/, hasNewVersion(args)]; - case 2: - latestVersion = _a.sent(); - if (latestVersion) { - console.error(borderedText("New version of ".concat(args.pkg.name, " available!\nCurrent Version: ").concat(args.pkg.version, "\nLatest Version: ").concat(latestVersion))); - } - return [3 /*break*/, 4]; - case 3: - err_1 = _a.sent(); - // Catch any network errors or cache writing errors so module doesn't cause a crash - if (args.debug && err_1 instanceof Error) { - console.error('Unexpected error in simpleUpdateNotifier():', err_1); - } - return [3 /*break*/, 4]; - case 4: return [2 /*return*/]; - } - }); -}); }; - -module.exports = simpleUpdateNotifier; diff --git a/node_modules/simple-update-notifier/package.json b/node_modules/simple-update-notifier/package.json deleted file mode 100644 index 4d710a7..0000000 --- a/node_modules/simple-update-notifier/package.json +++ /dev/null @@ -1,100 +0,0 @@ -{ - "name": "simple-update-notifier", - "version": "2.0.0", - "description": "Simple update notifier to check for npm updates for cli applications", - "main": "build/index.js", - "types": "build/index.d.ts", - "repository": { - "type": "git", - "url": "https://github.com/alexbrazier/simple-update-notifier.git" - }, - "homepage": "https://github.com/alexbrazier/simple-update-notifier.git", - "author": "alexbrazier", - "license": "MIT", - "engines": { - "node": ">=10" - }, - "scripts": { - "test": "jest src --noStackTrace", - "build": "rollup -c rollup.config.js --bundleConfigAsCjs", - "prettier:check": "prettier --check src/**/*.ts", - "prettier": "prettier --write src/**/*.ts", - "eslint": "eslint src/**/*.ts", - "lint": "yarn prettier:check && yarn eslint", - "prepare": "yarn lint && yarn build", - "release": "release-it" - }, - "dependencies": { - "semver": "^7.5.3" - }, - "devDependencies": { - "@babel/preset-env": "^7.22.5", - "@babel/preset-typescript": "^7.22.5", - "@release-it/conventional-changelog": "^5.1.1", - "@types/jest": "^29.5.2", - "@types/node": "^20.3.1", - "@typescript-eslint/eslint-plugin": "^5.60.0", - "@typescript-eslint/parser": "^5.60.0", - "eslint": "^8.43.0", - "eslint-config-prettier": "^8.8.0", - "eslint-plugin-prettier": "^4.0.0", - "jest": "^29.5.0", - "prettier": "^2.8.8", - "release-it": "^15.11.0", - "rollup": "^3.25.2", - "rollup-plugin-ts": "^3.2.0", - "typescript": "^5.1.3" - }, - "resolutions": { - "semver": "^7.5.3" - }, - "publishConfig": { - "registry": "https://registry.npmjs.org/" - }, - "files": [ - "build", - "src" - ], - "release-it": { - "git": { - "commitMessage": "chore: release ${version}", - "tagName": "v${version}" - }, - "npm": { - "publish": true - }, - "github": { - "release": true - }, - "plugins": { - "@release-it/conventional-changelog": { - "preset": "angular", - "infile": "CHANGELOG.md" - } - } - }, - "eslintConfig": { - "plugins": [ - "@typescript-eslint", - "prettier" - ], - "extends": [ - "prettier", - "eslint:recommended", - "plugin:@typescript-eslint/recommended" - ], - "parser": "@typescript-eslint/parser", - "rules": { - "prettier/prettier": [ - "error", - { - "quoteProps": "consistent", - "singleQuote": true, - "tabWidth": 2, - "trailingComma": "es5", - "useTabs": false - } - ] - } - } -} diff --git a/node_modules/simple-update-notifier/src/borderedText.ts b/node_modules/simple-update-notifier/src/borderedText.ts deleted file mode 100644 index 7145ac2..0000000 --- a/node_modules/simple-update-notifier/src/borderedText.ts +++ /dev/null @@ -1,12 +0,0 @@ -const borderedText = (text: string) => { - const lines = text.split('\n'); - const width = Math.max(...lines.map((l) => l.length)); - const res = [`┌${'─'.repeat(width + 2)}┐`]; - for (const line of lines) { - res.push(`│ ${line.padEnd(width)} │`); - } - res.push(`└${'─'.repeat(width + 2)}┘`); - return res.join('\n'); -}; - -export default borderedText; diff --git a/node_modules/simple-update-notifier/src/cache.spec.ts b/node_modules/simple-update-notifier/src/cache.spec.ts deleted file mode 100644 index 49e1cb2..0000000 --- a/node_modules/simple-update-notifier/src/cache.spec.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { createConfigDir, getLastUpdate, saveLastUpdate } from './cache'; - -createConfigDir(); - -jest.useFakeTimers().setSystemTime(new Date('2022-01-01')); - -const fakeTime = new Date('2022-01-01').getTime(); - -test('can save update then get the update details', () => { - saveLastUpdate('test'); - expect(getLastUpdate('test')).toBe(fakeTime); -}); - -test('prefixed module can save update then get the update details', () => { - saveLastUpdate('@alexbrazier/test'); - expect(getLastUpdate('@alexbrazier/test')).toBe(fakeTime); -}); diff --git a/node_modules/simple-update-notifier/src/cache.ts b/node_modules/simple-update-notifier/src/cache.ts deleted file mode 100644 index e11deba..0000000 --- a/node_modules/simple-update-notifier/src/cache.ts +++ /dev/null @@ -1,44 +0,0 @@ -import os from 'os'; -import path from 'path'; -import fs from 'fs'; - -const homeDirectory = os.homedir(); -const configDir = - process.env.XDG_CONFIG_HOME || - path.join(homeDirectory, '.config', 'simple-update-notifier'); - -const getConfigFile = (packageName: string) => { - return path.join( - configDir, - `${packageName.replace('@', '').replace('/', '__')}.json` - ); -}; - -export const createConfigDir = () => { - if (!fs.existsSync(configDir)) { - fs.mkdirSync(configDir, { recursive: true }); - } -}; - -export const getLastUpdate = (packageName: string) => { - const configFile = getConfigFile(packageName); - - try { - if (!fs.existsSync(configFile)) { - return undefined; - } - const file = JSON.parse(fs.readFileSync(configFile, 'utf8')); - return file.lastUpdateCheck as number; - } catch { - return undefined; - } -}; - -export const saveLastUpdate = (packageName: string) => { - const configFile = getConfigFile(packageName); - - fs.writeFileSync( - configFile, - JSON.stringify({ lastUpdateCheck: new Date().getTime() }) - ); -}; diff --git a/node_modules/simple-update-notifier/src/getDistVersion.spec.ts b/node_modules/simple-update-notifier/src/getDistVersion.spec.ts deleted file mode 100644 index b78a42e..0000000 --- a/node_modules/simple-update-notifier/src/getDistVersion.spec.ts +++ /dev/null @@ -1,35 +0,0 @@ -import Stream from 'stream'; -import https from 'https'; -import getDistVersion from './getDistVersion'; - -jest.mock('https', () => ({ - get: jest.fn(), -})); - -test('Valid response returns version', async () => { - const st = new Stream(); - (https.get as jest.Mock).mockImplementation((url, cb) => { - cb(st); - - st.emit('data', '{"latest":"1.0.0"}'); - st.emit('end'); - }); - - const version = await getDistVersion('test', 'latest'); - - expect(version).toEqual('1.0.0'); -}); - -test('Invalid response throws error', async () => { - const st = new Stream(); - (https.get as jest.Mock).mockImplementation((url, cb) => { - cb(st); - - st.emit('data', 'some invalid json'); - st.emit('end'); - }); - - expect(getDistVersion('test', 'latest')).rejects.toThrow( - 'Could not parse version response' - ); -}); diff --git a/node_modules/simple-update-notifier/src/getDistVersion.ts b/node_modules/simple-update-notifier/src/getDistVersion.ts deleted file mode 100644 index d474e1f..0000000 --- a/node_modules/simple-update-notifier/src/getDistVersion.ts +++ /dev/null @@ -1,29 +0,0 @@ -import https from 'https'; - -const getDistVersion = async (packageName: string, distTag: string) => { - const url = `https://registry.npmjs.org/-/package/${packageName}/dist-tags`; - - return new Promise<string>((resolve, reject) => { - https - .get(url, (res) => { - let body = ''; - - res.on('data', (chunk) => (body += chunk)); - res.on('end', () => { - try { - const json = JSON.parse(body); - const version = json[distTag]; - if (!version) { - reject(new Error('Error getting version')); - } - resolve(version); - } catch { - reject(new Error('Could not parse version response')); - } - }); - }) - .on('error', (err) => reject(err)); - }); -}; - -export default getDistVersion; diff --git a/node_modules/simple-update-notifier/src/hasNewVersion.spec.ts b/node_modules/simple-update-notifier/src/hasNewVersion.spec.ts deleted file mode 100644 index af7ab22..0000000 --- a/node_modules/simple-update-notifier/src/hasNewVersion.spec.ts +++ /dev/null @@ -1,82 +0,0 @@ -import hasNewVersion from './hasNewVersion'; -import { getLastUpdate } from './cache'; -import getDistVersion from './getDistVersion'; - -jest.mock('./getDistVersion', () => jest.fn().mockReturnValue('1.0.0')); -jest.mock('./cache', () => ({ - getLastUpdate: jest.fn().mockReturnValue(undefined), - createConfigDir: jest.fn(), - saveLastUpdate: jest.fn(), -})); - -const pkg = { name: 'test', version: '1.0.0' }; - -afterEach(() => jest.clearAllMocks()); - -const defaultArgs = { - pkg, - shouldNotifyInNpmScript: true, - alwaysRun: true, -}; - -test('it should not trigger update for same version', async () => { - const newVersion = await hasNewVersion(defaultArgs); - - expect(newVersion).toBe(false); -}); - -test('it should trigger update for patch version bump', async () => { - (getDistVersion as jest.Mock).mockReturnValue('1.0.1'); - - const newVersion = await hasNewVersion(defaultArgs); - - expect(newVersion).toBe('1.0.1'); -}); - -test('it should trigger update for minor version bump', async () => { - (getDistVersion as jest.Mock).mockReturnValue('1.1.0'); - - const newVersion = await hasNewVersion(defaultArgs); - - expect(newVersion).toBe('1.1.0'); -}); - -test('it should trigger update for major version bump', async () => { - (getDistVersion as jest.Mock).mockReturnValue('2.0.0'); - - const newVersion = await hasNewVersion(defaultArgs); - - expect(newVersion).toBe('2.0.0'); -}); - -test('it should not trigger update if version is lower', async () => { - (getDistVersion as jest.Mock).mockReturnValue('0.0.9'); - - const newVersion = await hasNewVersion(defaultArgs); - - expect(newVersion).toBe(false); -}); - -it('should trigger update check if last update older than config', async () => { - const TWO_WEEKS = new Date().getTime() - 1000 * 60 * 60 * 24 * 14; - (getLastUpdate as jest.Mock).mockReturnValue(TWO_WEEKS); - const newVersion = await hasNewVersion({ - pkg, - shouldNotifyInNpmScript: true, - }); - - expect(newVersion).toBe(false); - expect(getDistVersion).toHaveBeenCalled(); -}); - -it('should not trigger update check if last update is too recent', async () => { - const TWELVE_HOURS = new Date().getTime() - 1000 * 60 * 60 * 12; - (getLastUpdate as jest.Mock).mockReturnValue(TWELVE_HOURS); - const newVersion = await hasNewVersion({ - pkg, - shouldNotifyInNpmScript: true, - }); - - expect(newVersion).toBe(false); - expect(getDistVersion).not.toHaveBeenCalled(); -}); diff --git a/node_modules/simple-update-notifier/src/hasNewVersion.ts b/node_modules/simple-update-notifier/src/hasNewVersion.ts deleted file mode 100644 index 31d5069..0000000 --- a/node_modules/simple-update-notifier/src/hasNewVersion.ts +++ /dev/null @@ -1,40 +0,0 @@ -import semver from 'semver'; -import { createConfigDir, getLastUpdate, saveLastUpdate } from './cache'; -import getDistVersion from './getDistVersion'; -import { IUpdate } from './types'; - -const hasNewVersion = async ({ - pkg, - updateCheckInterval = 1000 * 60 * 60 * 24, - distTag = 'latest', - alwaysRun, - debug, -}: IUpdate) => { - createConfigDir(); - const lastUpdateCheck = getLastUpdate(pkg.name); - if ( - alwaysRun || - !lastUpdateCheck || - lastUpdateCheck < new Date().getTime() - updateCheckInterval - ) { - const latestVersion = await getDistVersion(pkg.name, distTag); - saveLastUpdate(pkg.name); - if (semver.gt(latestVersion, pkg.version)) { - return latestVersion; - } else if (debug) { - console.error( - `Latest version (${latestVersion}) not newer than current version (${pkg.version})` - ); - } - } else if (debug) { - console.error( - `Too recent to check for a new update. simpleUpdateNotifier() interval set to ${updateCheckInterval}ms but only ${ - new Date().getTime() - lastUpdateCheck - }ms since last check.` - ); - } - - return false; -}; - -export default hasNewVersion; diff --git a/node_modules/simple-update-notifier/src/index.spec.ts b/node_modules/simple-update-notifier/src/index.spec.ts deleted file mode 100644 index 98ffb5a..0000000 --- a/node_modules/simple-update-notifier/src/index.spec.ts +++ /dev/null @@ -1,27 +0,0 @@ -import simpleUpdateNotifier from '.'; -import hasNewVersion from './hasNewVersion'; - -const consoleSpy = jest.spyOn(console, 'error'); - -jest.mock('./hasNewVersion', () => jest.fn().mockResolvedValue('2.0.0')); - -beforeEach(jest.clearAllMocks); - -test('it logs message if update is available', async () => { - await simpleUpdateNotifier({ - pkg: { name: 'test', version: '1.0.0' }, - alwaysRun: true, - }); - - expect(consoleSpy).toHaveBeenCalledTimes(1); -}); - -test('it does not log message if update is not available', async () => { - (hasNewVersion as jest.Mock).mockResolvedValue(false); - await simpleUpdateNotifier({ - pkg: { name: 'test', version: '2.0.0' }, - alwaysRun: true, - }); - - expect(consoleSpy).toHaveBeenCalledTimes(0); -}); diff --git a/node_modules/simple-update-notifier/src/index.ts b/node_modules/simple-update-notifier/src/index.ts deleted file mode 100644 index 2b0d2cf..0000000 --- a/node_modules/simple-update-notifier/src/index.ts +++ /dev/null @@ -1,34 +0,0 @@ -import isNpmOrYarn from './isNpmOrYarn'; -import hasNewVersion from './hasNewVersion'; -import { IUpdate } from './types'; -import borderedText from './borderedText'; - -const simpleUpdateNotifier = async (args: IUpdate) => { - if ( - !args.alwaysRun && - (!process.stdout.isTTY || (isNpmOrYarn && !args.shouldNotifyInNpmScript)) - ) { - if (args.debug) { - console.error('Opting out of running simpleUpdateNotifier()'); - } - return; - } - - try { - const latestVersion = await hasNewVersion(args); - if (latestVersion) { - console.error( - borderedText(`New version of ${args.pkg.name} available! -Current Version: ${args.pkg.version} -Latest Version: ${latestVersion}`) - ); - } - } catch (err) { - // Catch any network errors or cache writing errors so module doesn't cause a crash - if (args.debug && err instanceof Error) { - console.error('Unexpected error in simpleUpdateNotifier():', err); - } - } -}; - -export default simpleUpdateNotifier; diff --git a/node_modules/simple-update-notifier/src/isNpmOrYarn.ts b/node_modules/simple-update-notifier/src/isNpmOrYarn.ts deleted file mode 100644 index ee4c837..0000000 --- a/node_modules/simple-update-notifier/src/isNpmOrYarn.ts +++ /dev/null @@ -1,12 +0,0 @@ -import process from 'process'; - -const packageJson = process.env.npm_package_json; -const userAgent = process.env.npm_config_user_agent; -const isNpm6 = Boolean(userAgent && userAgent.startsWith('npm')); -const isNpm7 = Boolean(packageJson && packageJson.endsWith('package.json')); - -const isNpm = isNpm6 || isNpm7; -const isYarn = Boolean(userAgent && userAgent.startsWith('yarn')); -const isNpmOrYarn = isNpm || isYarn; - -export default isNpmOrYarn; diff --git a/node_modules/simple-update-notifier/src/types.ts b/node_modules/simple-update-notifier/src/types.ts deleted file mode 100644 index c395eb0..0000000 --- a/node_modules/simple-update-notifier/src/types.ts +++ /dev/null @@ -1,8 +0,0 @@ -export interface IUpdate { - pkg: { name: string; version: string }; - updateCheckInterval?: number; - shouldNotifyInNpmScript?: boolean; - distTag?: string; - alwaysRun?: boolean; - debug?: boolean; -} diff --git a/node_modules/supports-color/browser.js b/node_modules/supports-color/browser.js deleted file mode 100644 index 62afa3a..0000000 --- a/node_modules/supports-color/browser.js +++ /dev/null @@ -1,5 +0,0 @@ -'use strict'; -module.exports = { - stdout: false, - stderr: false -}; diff --git a/node_modules/supports-color/index.js b/node_modules/supports-color/index.js deleted file mode 100644 index 1704131..0000000 --- a/node_modules/supports-color/index.js +++ /dev/null @@ -1,131 +0,0 @@ -'use strict'; -const os = require('os'); -const hasFlag = require('has-flag'); - -const env = process.env; - -let forceColor; -if (hasFlag('no-color') || - hasFlag('no-colors') || - hasFlag('color=false')) { - forceColor = false; -} else if (hasFlag('color') || - hasFlag('colors') || - hasFlag('color=true') || - hasFlag('color=always')) { - forceColor = true; -} -if ('FORCE_COLOR' in env) { - forceColor = env.FORCE_COLOR.length === 0 || parseInt(env.FORCE_COLOR, 10) !== 0; -} - -function translateLevel(level) { - if (level === 0) { - return false; - } - - return { - level, - hasBasic: true, - has256: level >= 2, - has16m: level >= 3 - }; -} - -function supportsColor(stream) { - if (forceColor === false) { - return 0; - } - - if (hasFlag('color=16m') || - hasFlag('color=full') || - hasFlag('color=truecolor')) { - return 3; - } - - if (hasFlag('color=256')) { - return 2; - } - - if (stream && !stream.isTTY && forceColor !== true) { - return 0; - } - - const min = forceColor ? 1 : 0; - - if (process.platform === 'win32') { - // Node.js 7.5.0 is the first version of Node.js to include a patch to - // libuv that enables 256 color output on Windows. Anything earlier and it - // won't work. However, here we target Node.js 8 at minimum as it is an LTS - // release, and Node.js 7 is not. Windows 10 build 10586 is the first Windows - // release that supports 256 colors. Windows 10 build 14931 is the first release - // that supports 16m/TrueColor. - const osRelease = os.release().split('.'); - if ( - Number(process.versions.node.split('.')[0]) >= 8 && - Number(osRelease[0]) >= 10 && - Number(osRelease[2]) >= 10586 - ) { - return Number(osRelease[2]) >= 14931 ? 3 : 2; - } - - return 1; - } - - if ('CI' in env) { - if (['TRAVIS', 'CIRCLECI', 'APPVEYOR', 'GITLAB_CI'].some(sign => sign in env) || env.CI_NAME === 'codeship') { - return 1; - } - - return min; - } - - if ('TEAMCITY_VERSION' in env) { - return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0; - } - - if (env.COLORTERM === 'truecolor') { - return 3; - } - - if ('TERM_PROGRAM' in env) { - const version = parseInt((env.TERM_PROGRAM_VERSION || '').split('.')[0], 10); - - switch (env.TERM_PROGRAM) { - case 'iTerm.app': - return version >= 3 ? 3 : 2; - case 'Apple_Terminal': - return 2; - // No default - } - } - - if (/-256(color)?$/i.test(env.TERM)) { - return 2; - } - - if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) { - return 1; - } - - if ('COLORTERM' in env) { - return 1; - } - - if (env.TERM === 'dumb') { - return min; - } - - return min; -} - -function getSupportLevel(stream) { - const level = supportsColor(stream); - return translateLevel(level); -} - -module.exports = { - supportsColor: getSupportLevel, - stdout: getSupportLevel(process.stdout), - stderr: getSupportLevel(process.stderr) -}; diff --git a/node_modules/supports-color/package.json b/node_modules/supports-color/package.json deleted file mode 100644 index ad199f5..0000000 --- a/node_modules/supports-color/package.json +++ /dev/null @@ -1,53 +0,0 @@ -{ - "name": "supports-color", - "version": "5.5.0", - "description": "Detect whether a terminal supports color", - "license": "MIT", - "repository": "chalk/supports-color", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "engines": { - "node": ">=4" - }, - "scripts": { - "test": "xo && ava" - }, - "files": [ - "index.js", - "browser.js" - ], - "keywords": [ - "color", - "colour", - "colors", - "terminal", - "console", - "cli", - "ansi", - "styles", - "tty", - "rgb", - "256", - "shell", - "xterm", - "command-line", - "support", - "supports", - "capability", - "detect", - "truecolor", - "16m" - ], - "dependencies": { - "has-flag": "^3.0.0" - }, - "devDependencies": { - "ava": "^0.25.0", - "import-fresh": "^2.0.0", - "xo": "^0.20.0" - }, - "browser": "browser.js" -} diff --git a/node_modules/to-regex-range/index.js b/node_modules/to-regex-range/index.js deleted file mode 100644 index 77fbace..0000000 --- a/node_modules/to-regex-range/index.js +++ /dev/null @@ -1,288 +0,0 @@ -/*! - * to-regex-range <https://github.com/micromatch/to-regex-range> - * - * Copyright (c) 2015-present, Jon Schlinkert. - * Released under the MIT License. - */ - -'use strict'; - -const isNumber = require('is-number'); - -const toRegexRange = (min, max, options) => { - if (isNumber(min) === false) { - throw new TypeError('toRegexRange: expected the first argument to be a number'); - } - - if (max === void 0 || min === max) { - return String(min); - } - - if (isNumber(max) === false) { - throw new TypeError('toRegexRange: expected the second argument to be a number.'); - } - - let opts = { relaxZeros: true, ...options }; - if (typeof opts.strictZeros === 'boolean') { - opts.relaxZeros = opts.strictZeros === false; - } - - let relax = String(opts.relaxZeros); - let shorthand = String(opts.shorthand); - let capture = String(opts.capture); - let wrap = String(opts.wrap); - let cacheKey = min + ':' + max + '=' + relax + shorthand + capture + wrap; - - if (toRegexRange.cache.hasOwnProperty(cacheKey)) { - return toRegexRange.cache[cacheKey].result; - } - - let a = Math.min(min, max); - let b = Math.max(min, max); - - if (Math.abs(a - b) === 1) { - let result = min + '|' + max; - if (opts.capture) { - return `(${result})`; - } - if (opts.wrap === false) { - return result; - } - return `(?:${result})`; - } - - let isPadded = hasPadding(min) || hasPadding(max); - let state = { min, max, a, b }; - let positives = []; - let negatives = []; - - if (isPadded) { - state.isPadded = isPadded; - state.maxLen = String(state.max).length; - } - - if (a < 0) { - let newMin = b < 0 ? Math.abs(b) : 1; - negatives = splitToPatterns(newMin, Math.abs(a), state, opts); - a = state.a = 0; - } - - if (b >= 0) { - positives = splitToPatterns(a, b, state, opts); - } - - state.negatives = negatives; - state.positives = positives; - state.result = collatePatterns(negatives, positives, opts); - - if (opts.capture === true) { - state.result = `(${state.result})`; - } else if (opts.wrap !== false && (positives.length + negatives.length) > 1) { - state.result = `(?:${state.result})`; - } - - toRegexRange.cache[cacheKey] = state; - return state.result; -}; - -function collatePatterns(neg, pos, options) { - let onlyNegative = filterPatterns(neg, pos, '-', false, options) || []; - let onlyPositive = filterPatterns(pos, neg, '', false, options) || []; - let intersected = filterPatterns(neg, pos, '-?', true, options) || []; - let subpatterns = onlyNegative.concat(intersected).concat(onlyPositive); - return subpatterns.join('|'); -} - -function splitToRanges(min, max) { - let nines = 1; - let zeros = 1; - - let stop = countNines(min, nines); - let stops = new Set([max]); - - while (min <= stop && stop <= max) { - stops.add(stop); - nines += 1; - stop = countNines(min, nines); - } - - stop = countZeros(max + 1, zeros) - 1; - - while (min < stop && stop <= max) { - stops.add(stop); - zeros += 1; - stop = countZeros(max + 1, zeros) - 1; - } - - stops = [...stops]; - stops.sort(compare); - return stops; -} - -/** - * Convert a range to a regex pattern - * @param {Number} `start` - * @param {Number} `stop` - * @return {String} - */ - -function rangeToPattern(start, stop, options) { - if (start === stop) { - return { pattern: start, count: [], digits: 0 }; - } - - let zipped = zip(start, stop); - let digits = zipped.length; - let pattern = ''; - let count = 0; - - for (let i = 0; i < digits; i++) { - let [startDigit, stopDigit] = zipped[i]; - - if (startDigit === stopDigit) { - pattern += startDigit; - - } else if (startDigit !== '0' || stopDigit !== '9') { - pattern += toCharacterClass(startDigit, stopDigit, options); - - } else { - count++; - } - } - - if (count) { - pattern += options.shorthand === true ? '\\d' : '[0-9]'; - } - - return { pattern, count: [count], digits }; -} - -function splitToPatterns(min, max, tok, options) { - let ranges = splitToRanges(min, max); - let tokens = []; - let start = min; - let prev; - - for (let i = 0; i < ranges.length; i++) { - let max = ranges[i]; - let obj = rangeToPattern(String(start), String(max), options); - let zeros = ''; - - if (!tok.isPadded && prev && prev.pattern === obj.pattern) { - if (prev.count.length > 1) { - prev.count.pop(); - } - - prev.count.push(obj.count[0]); - prev.string = prev.pattern + toQuantifier(prev.count); - start = max + 1; - continue; - } - - if (tok.isPadded) { - zeros = padZeros(max, tok, options); - } - - obj.string = zeros + obj.pattern + toQuantifier(obj.count); - tokens.push(obj); - start = max + 1; - prev = obj; - } - - return tokens; -} - -function filterPatterns(arr, comparison, prefix, intersection, options) { - let result = []; - - for (let ele of arr) { - let { string } = ele; - - // only push if _both_ are negative... - if (!intersection && !contains(comparison, 'string', string)) { - result.push(prefix + string); - } - - // or _both_ are positive - if (intersection && contains(comparison, 'string', string)) { - result.push(prefix + string); - } - } - return result; -} - -/** - * Zip strings - */ - -function zip(a, b) { - let arr = []; - for (let i = 0; i < a.length; i++) arr.push([a[i], b[i]]); - return arr; -} - -function compare(a, b) { - return a > b ? 1 : b > a ? -1 : 0; -} - -function contains(arr, key, val) { - return arr.some(ele => ele[key] === val); -} - -function countNines(min, len) { - return Number(String(min).slice(0, -len) + '9'.repeat(len)); -} - -function countZeros(integer, zeros) { - return integer - (integer % Math.pow(10, zeros)); -} - -function toQuantifier(digits) { - let [start = 0, stop = ''] = digits; - if (stop || start > 1) { - return `{${start + (stop ? ',' + stop : '')}}`; - } - return ''; -} - -function toCharacterClass(a, b, options) { - return `[${a}${(b - a === 1) ? '' : '-'}${b}]`; -} - -function hasPadding(str) { - return /^-?(0+)\d/.test(str); -} - -function padZeros(value, tok, options) { - if (!tok.isPadded) { - return value; - } - - let diff = Math.abs(tok.maxLen - String(value).length); - let relax = options.relaxZeros !== false; - - switch (diff) { - case 0: - return ''; - case 1: - return relax ? '0?' : '0'; - case 2: - return relax ? '0{0,2}' : '00'; - default: { - return relax ? `0{0,${diff}}` : `0{${diff}}`; - } - } -} - -/** - * Cache - */ - -toRegexRange.cache = {}; -toRegexRange.clearCache = () => (toRegexRange.cache = {}); - -/** - * Expose `toRegexRange` - */ - -module.exports = toRegexRange; diff --git a/node_modules/to-regex-range/package.json b/node_modules/to-regex-range/package.json deleted file mode 100644 index 4ef194f..0000000 --- a/node_modules/to-regex-range/package.json +++ /dev/null @@ -1,88 +0,0 @@ -{ - "name": "to-regex-range", - "description": "Pass two numbers, get a regex-compatible source string for matching ranges. Validated against more than 2.78 million test assertions.", - "version": "5.0.1", - "homepage": "https://github.com/micromatch/to-regex-range", - "author": "Jon Schlinkert (https://github.com/jonschlinkert)", - "contributors": [ - "Jon Schlinkert (http://twitter.com/jonschlinkert)", - "Rouven Weßling (www.rouvenwessling.de)" - ], - "repository": "micromatch/to-regex-range", - "bugs": { - "url": "https://github.com/micromatch/to-regex-range/issues" - }, - "license": "MIT", - "files": [ - "index.js" - ], - "main": "index.js", - "engines": { - "node": ">=8.0" - }, - "scripts": { - "test": "mocha" - }, - "dependencies": { - "is-number": "^7.0.0" - }, - "devDependencies": { - "fill-range": "^6.0.0", - "gulp-format-md": "^2.0.0", - "mocha": "^6.0.2", - "text-table": "^0.2.0", - "time-diff": "^0.3.1" - }, - "keywords": [ - "bash", - "date", - "expand", - "expansion", - "expression", - "glob", - "match", - "match date", - "match number", - "match numbers", - "match year", - "matches", - "matching", - "number", - "numbers", - "numerical", - "range", - "ranges", - "regex", - "regexp", - "regular", - "regular expression", - "sequence" - ], - "verb": { - "layout": "default", - "toc": false, - "tasks": [ - "readme" - ], - "plugins": [ - "gulp-format-md" - ], - "lint": { - "reflinks": true - }, - "helpers": { - "examples": { - "displayName": "examples" - } - }, - "related": { - "list": [ - "expand-range", - "fill-range", - "micromatch", - "repeat-element", - "repeat-string" - ] - } - } -} diff --git a/node_modules/touch/bin/nodetouch.js b/node_modules/touch/bin/nodetouch.js deleted file mode 100644 index f78f082..0000000 --- a/node_modules/touch/bin/nodetouch.js +++ /dev/null @@ -1,112 +0,0 @@ -#!/usr/bin/env node -const touch = require("../index.js") - -const usage = code => { - console[code ? 'error' : 'log']( - 'usage:\n' + - 'touch [-acfm] [-r file] [-t [[CC]YY]MMDDhhmm[.SS]] file ...' - ) - process.exit(code) -} - -const singleFlags = { - a: 'atime', - m: 'mtime', - c: 'nocreate', - f: 'force' -} - -const singleOpts = { - r: 'ref', - t: 'time' -} - -const files = [] -const args = process.argv.slice(2) -const options = {} -for (let i = 0; i < args.length; i++) { - const arg = args[i] - if (!arg.match(/^-/)) { - files.push(arg) - continue - } - - // expand shorthands - if (arg.charAt(1) !== '-') { - const expand = [] - for (let f = 1; f < arg.length; f++) { - const fc = arg.charAt(f) - const sf = singleFlags[fc] - const so = singleOpts[fc] - if (sf) - expand.push('--' + sf) - else if (so) { - const soslice = arg.slice(f + 1) - const soval = soslice.charAt(0) === '=' ? soslice : '=' + soslice - expand.push('--' + so + soval) - f = arg.length - } else if (arg !== '-' + fc) - expand.push('-' + fc) - } - if (expand.length) { - args.splice.apply(args, [i, 1].concat(expand)) - i-- - continue - } - } - - const argsplit = arg.split('=') - const key = argsplit.shift().replace(/^\-\-/, '') - const val = argsplit.length ? argsplit.join('=') : null - - switch (key) { - case 'time': - const timestr = val || args[++i] - // [-t [[CC]YY]MMDDhhmm[.SS]] - const parsedtime = timestr.match( - /^(([0-9]{2})?([0-9]{2}))?([0-9]{2})([0-9]{2})([0-9]{2})([0-9]{2})(\.([0-9]{2}))?$/ - ) - if (!parsedtime) { - console.error('touch: out of range or illegal ' + - 'time specification: ' + - '[[CC]YY]MMDDhhmm[.SS]') - process.exit(1) - } else { - const y = +parsedtime[1] - const year = parsedtime[2] ? y - : y <= 68 ? 2000 + y - : 1900 + y - - const MM = +parsedtime[4] - 1 - const dd = +parsedtime[5] - const hh = +parsedtime[6] - const mm = +parsedtime[7] - const ss = +parsedtime[8] - - options.time = new Date(Date.UTC(year, MM, dd, hh, mm, ss)) - } - continue - - case 'ref': - options.ref = val || args[++i] - continue - - case 'mtime': - case 'nocreate': - case 'atime': - case 'force': - options[key] = true - continue - - default: - console.error('touch: illegal option -- ' + arg) - usage(1) - } -} - -if (!files.length) - usage() - -process.exitCode = 0 -Promise.all(files.map(f => touch(f, options))) - .catch(er => process.exitCode = 1) diff --git a/node_modules/touch/index.js b/node_modules/touch/index.js deleted file mode 100644 index fa6a8d7..0000000 --- a/node_modules/touch/index.js +++ /dev/null @@ -1,224 +0,0 @@ -'use strict' - -const EE = require('events').EventEmitter -const cons = require('constants') -const fs = require('fs') - -module.exports = (f, options, cb) => { - if (typeof options === 'function') - cb = options, options = {} - - const p = new Promise((res, rej) => { - new Touch(validOpts(options, f, null)) - .on('done', res).on('error', rej) - }) - - return cb ? p.then(res => cb(null, res), cb) : p -} - -module.exports.sync = module.exports.touchSync = (f, options) => - (new TouchSync(validOpts(options, f, null)), undefined) - -module.exports.ftouch = (fd, options, cb) => { - if (typeof options === 'function') - cb = options, options = {} - - const p = new Promise((res, rej) => { - new Touch(validOpts(options, null, fd)) - .on('done', res).on('error', rej) - }) - - return cb ? p.then(res => cb(null, res), cb) : p -} - -module.exports.ftouchSync = (fd, opt) => - (new TouchSync(validOpts(opt, null, fd)), undefined) - -const validOpts = (options, path, fd) => { - options = Object.create(options || {}) - options.fd = fd - options.path = path - - // {mtime: true}, {ctime: true} - // If set to something else, then treat as epoch ms value - const now = new Date(options.time || Date.now()).getTime() / 1000 - if (!options.atime && !options.mtime) - options.atime = options.mtime = now - else { - if (true === options.atime) - options.atime = now - - if (true === options.mtime) - options.mtime = now - } - - let oflags = 0 - if (!options.force) - oflags = oflags | cons.O_RDWR - - if (!options.nocreate) - oflags = oflags | cons.O_CREAT - - options.oflags = oflags - return options -} - -class Touch extends EE { - constructor (options) { - super(options) - this.fd = options.fd - this.path = options.path - this.atime = options.atime - this.mtime = options.mtime - this.ref = options.ref - this.nocreate = !!options.nocreate - this.force = !!options.force - this.closeAfter = options.closeAfter - this.oflags = options.oflags - this.options = options - - if (typeof this.fd !== 'number') { - this.closeAfter = true - this.open() - } else - this.onopen(null, this.fd) - } - - emit (ev, data) { - // we only emit when either done or erroring - // in both cases, need to close - this.close() - return super.emit(ev, data) - } - - close () { - if (typeof this.fd === 'number' && this.closeAfter) - fs.close(this.fd, () => {}) - } - - open () { - fs.open(this.path, this.oflags, (er, fd) => this.onopen(er, fd)) - } - - onopen (er, fd) { - if (er) { - if (er.code === 'EISDIR') - this.onopen(null, null) - else if (er.code === 'ENOENT' && this.nocreate) - this.emit('done') - else - this.emit('error', er) - } else { - this.fd = fd - if (this.ref) - this.statref() - else if (!this.atime || !this.mtime) - this.fstat() - else - this.futimes() - } - } - - statref () { - fs.stat(this.ref, (er, st) => { - if (er) - this.emit('error', er) - else - this.onstatref(st) - }) - } - - onstatref (st) { - this.atime = this.atime && st.atime.getTime()/1000 - this.mtime = this.mtime && st.mtime.getTime()/1000 - if (!this.atime || !this.mtime) - this.fstat() - else - this.futimes() - } - - fstat () { - const stat = this.fd ? 'fstat' : 'stat' - const target = this.fd || this.path - fs[stat](target, (er, st) => { - if (er) - this.emit('error', er) - else - this.onfstat(st) - }) - } - - onfstat (st) { - if (typeof this.atime !== 'number') - this.atime = st.atime.getTime()/1000 - - if (typeof this.mtime !== 'number') - this.mtime = st.mtime.getTime()/1000 - - this.futimes() - } - - futimes () { - const utimes = this.fd ? 'futimes' : 'utimes' - const target = this.fd || this.path - fs[utimes](target, ''+this.atime, ''+this.mtime, er => { - if (er) - this.emit('error', er) - else - this.emit('done') - }) - } -} - -class TouchSync extends Touch { - open () { - try { - this.onopen(null, fs.openSync(this.path, this.oflags)) - } catch (er) { - this.onopen(er) - } - } - - statref () { - let threw = true - try { - this.onstatref(fs.statSync(this.ref)) - threw = false - } finally { - if (threw) - this.close() - } - } - - fstat () { - let threw = true - const stat = this.fd ? 'fstatSync' : 'statSync' - const target = this.fd || this.path - try { - this.onfstat(fs[stat](target)) - threw = false - } finally { - if (threw) - this.close() - } - } - - futimes () { - let threw = true - const utimes = this.fd ? 'futimesSync' : 'utimesSync' - const target = this.fd || this.path - try { - fs[utimes](target, this.atime, this.mtime) - threw = false - } finally { - if (threw) - this.close() - } - this.emit('done') - } - - close () { - if (typeof this.fd === 'number' && this.closeAfter) - try { fs.closeSync(this.fd) } catch (er) {} - } -} diff --git a/node_modules/touch/package.json b/node_modules/touch/package.json deleted file mode 100644 index a51c29b..0000000 --- a/node_modules/touch/package.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "author": "Isaac Z. Schlueter <i@izs.me> (http://blog.izs.me/)", - "name": "touch", - "description": "like touch(1) in node", - "version": "3.1.1", - "repository": "git://github.com/isaacs/node-touch.git", - "bin": { - "nodetouch": "./bin/nodetouch.js" - }, - "license": "ISC", - "scripts": { - "test": "tap test/*.js --100 -J", - "preversion": "npm test", - "postversion": "npm publish", - "postpublish": "git push origin --all; git push origin --tags" - }, - "devDependencies": { - "mutate-fs": "^1.1.0", - "tap": "^10.7.0" - }, - "files": [ - "index.js", - "bin/nodetouch.js" - ] -} diff --git a/node_modules/undefsafe/example.js b/node_modules/undefsafe/example.js deleted file mode 100644 index ed93c23..0000000 --- a/node_modules/undefsafe/example.js +++ /dev/null @@ -1,14 +0,0 @@ -var undefsafe = require('undefsafe'); - -var object = { - a: { - b: { - c: 1, - d: [1, 2, 3], - e: 'remy' - } - } -}; - -console.log(undefsafe(object, 'a.b.e')); // "remy" -console.log(undefsafe(object, 'a.b.not.found')); // undefined diff --git a/node_modules/undefsafe/lib/undefsafe.js b/node_modules/undefsafe/lib/undefsafe.js deleted file mode 100644 index 7446878..0000000 --- a/node_modules/undefsafe/lib/undefsafe.js +++ /dev/null @@ -1,125 +0,0 @@ -'use strict'; - -function undefsafe(obj, path, value, __res) { - // I'm not super keen on this private function, but it's because - // it'll also be use in the browser and I wont *one* function exposed - function split(path) { - var res = []; - var level = 0; - var key = ''; - - for (var i = 0; i < path.length; i++) { - var c = path.substr(i, 1); - - if (level === 0 && (c === '.' || c === '[')) { - if (c === '[') { - level++; - i++; - c = path.substr(i, 1); - } - - if (key) { - // the first value could be a string - res.push(key); - } - key = ''; - continue; - } - - if (c === ']') { - level--; - key = key.slice(0, -1); - continue; - } - - key += c; - } - - res.push(key); - - return res; - } - - // bail if there's nothing - if (obj === undefined || obj === null) { - return undefined; - } - - var parts = split(path); - var key = null; - var type = typeof obj; - var root = obj; - var parent = obj; - - var star = - parts.filter(function(_) { - return _ === '*'; - }).length > 0; - - // we're dealing with a primitive - if (type !== 'object' && type !== 'function') { - return obj; - } else if (path.trim() === '') { - return obj; - } - - key = parts[0]; - var i = 0; - for (; i < parts.length; i++) { - key = parts[i]; - parent = obj; - - if (key === '*') { - // loop through each property - var prop = ''; - var res = __res || []; - - for (prop in parent) { - var shallowObj = undefsafe( - obj[prop], - parts.slice(i + 1).join('.'), - value, - res - ); - if (shallowObj && shallowObj !== res) { - if ((value && shallowObj === value) || value === undefined) { - if (value !== undefined) { - return shallowObj; - } - - res.push(shallowObj); - } - } - } - - if (res.length === 0) { - return undefined; - } - - return res; - } - - if (Object.getOwnPropertyNames(obj).indexOf(key) == -1) { - return undefined; - } - - obj = obj[key]; - if (obj === undefined || obj === null) { - break; - } - } - - // if we have a null object, make sure it's the one the user was after, - // if it's not (i.e. parts has a length) then give undefined back. - if (obj === null && i !== parts.length - 1) { - obj = undefined; - } else if (!star && value) { - key = path.split('.').pop(); - parent[key] = value; - } - return obj; -} - -if (typeof module !== 'undefined') { - module.exports = undefsafe; -} diff --git a/node_modules/undefsafe/package.json b/node_modules/undefsafe/package.json deleted file mode 100644 index a454233..0000000 --- a/node_modules/undefsafe/package.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "name": "undefsafe", - "description": "Undefined safe way of extracting object properties", - "main": "lib/undefsafe.js", - "tonicExampleFilename": "example.js", - "directories": { - "test": "test" - }, - "scripts": { - "test": "tap test/**/*.test.js -R spec", - "cover": "tap test/*.test.js --cov --coverage-report=lcov", - "semantic-release": "semantic-release" - }, - "prettier": { - "trailingComma": "none", - "singleQuote": true - }, - "repository": { - "type": "git", - "url": "https://github.com/remy/undefsafe.git" - }, - "keywords": [ - "undefined" - ], - "author": "Remy Sharp", - "license": "MIT", - "devDependencies": { - "semantic-release": "^18.0.0", - "tap": "^5.7.1", - "tap-only": "0.0.5" - }, - "dependencies": {}, - "version": "2.0.5" -} diff --git a/node_modules/undici/index-fetch.js b/node_modules/undici/index-fetch.js index ba31a65..711d7e8 100644 --- a/node_modules/undici/index-fetch.js +++ b/node_modules/undici/index-fetch.js @@ -1,15 +1,35 @@ 'use strict' -const fetchImpl = require('./lib/fetch').fetch +const { getGlobalDispatcher, setGlobalDispatcher } = require('./lib/global') +const EnvHttpProxyAgent = require('./lib/dispatcher/env-http-proxy-agent') +const fetchImpl = require('./lib/web/fetch').fetch module.exports.fetch = function fetch (resource, init = undefined) { return fetchImpl(resource, init).catch((err) => { - Error.captureStackTrace(err, this) + if (err && typeof err === 'object') { + Error.captureStackTrace(err) + } 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 -module.exports.WebSocket = require('./lib/websocket/websocket').WebSocket +module.exports.FormData = require('./lib/web/fetch/formdata').FormData +module.exports.Headers = require('./lib/web/fetch/headers').Headers +module.exports.Response = require('./lib/web/fetch/response').Response +module.exports.Request = require('./lib/web/fetch/request').Request + +const { CloseEvent, ErrorEvent, MessageEvent, createFastMessageEvent } = require('./lib/web/websocket/events') +module.exports.WebSocket = require('./lib/web/websocket/websocket').WebSocket +module.exports.CloseEvent = CloseEvent +module.exports.ErrorEvent = ErrorEvent +module.exports.MessageEvent = MessageEvent +module.exports.createFastMessageEvent = createFastMessageEvent + +module.exports.EventSource = require('./lib/web/eventsource/eventsource').EventSource + +const api = require('./lib/api') +const Dispatcher = require('./lib/dispatcher/dispatcher') +Object.assign(Dispatcher.prototype, api) +// Expose the fetch implementation to be enabled in Node.js core via a flag +module.exports.EnvHttpProxyAgent = EnvHttpProxyAgent +module.exports.getGlobalDispatcher = getGlobalDispatcher +module.exports.setGlobalDispatcher = setGlobalDispatcher diff --git a/node_modules/undici/index.d.ts b/node_modules/undici/index.d.ts index 83a786d..0883fc7 100644 --- a/node_modules/undici/index.d.ts +++ b/node_modules/undici/index.d.ts @@ -1,3 +1,3 @@ -export * from './types/index' import Undici from './types/index' export default Undici +export * from './types/index' diff --git a/node_modules/undici/index.js b/node_modules/undici/index.js index 26302cc..873f564 100644 --- a/node_modules/undici/index.js +++ b/node_modules/undici/index.js @@ -1,33 +1,27 @@ 'use strict' -const Client = require('./lib/client') -const Dispatcher = require('./lib/dispatcher') +const Client = require('./lib/dispatcher/client') +const Dispatcher = require('./lib/dispatcher/dispatcher') +const Pool = require('./lib/dispatcher/pool') +const BalancedPool = require('./lib/dispatcher/balanced-pool') +const Agent = require('./lib/dispatcher/agent') +const ProxyAgent = require('./lib/dispatcher/proxy-agent') +const EnvHttpProxyAgent = require('./lib/dispatcher/env-http-proxy-agent') +const RetryAgent = require('./lib/dispatcher/retry-agent') 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 { MockCallHistory, MockCallHistoryLog } = require('./lib/mock/mock-call-history') 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 RetryHandler = require('./lib/handler/RetryHandler') +const RetryHandler = require('./lib/handler/retry-handler') 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 -} +const DecoratorHandler = require('./lib/handler/decorator-handler') +const RedirectHandler = require('./lib/handler/redirect-handler') Object.assign(Dispatcher.prototype, api) @@ -37,14 +31,34 @@ module.exports.Pool = Pool module.exports.BalancedPool = BalancedPool module.exports.Agent = Agent module.exports.ProxyAgent = ProxyAgent +module.exports.EnvHttpProxyAgent = EnvHttpProxyAgent +module.exports.RetryAgent = RetryAgent module.exports.RetryHandler = RetryHandler module.exports.DecoratorHandler = DecoratorHandler module.exports.RedirectHandler = RedirectHandler -module.exports.createRedirectInterceptor = createRedirectInterceptor +module.exports.interceptors = { + redirect: require('./lib/interceptor/redirect'), + responseError: require('./lib/interceptor/response-error'), + retry: require('./lib/interceptor/retry'), + dump: require('./lib/interceptor/dump'), + dns: require('./lib/interceptor/dns'), + cache: require('./lib/interceptor/cache') +} + +module.exports.cacheStores = { + MemoryCacheStore: require('./lib/cache/memory-cache-store') +} + +const SqliteCacheStore = require('./lib/cache/sqlite-cache-store') +module.exports.cacheStores.SqliteCacheStore = SqliteCacheStore module.exports.buildConnector = buildConnector module.exports.errors = errors +module.exports.util = { + parseHeaders: util.parseHeaders, + headerNameToString: util.headerNameToString +} function makeDispatcher (fn) { return (url, opts, handler) => { @@ -98,62 +112,56 @@ function makeDispatcher (fn) { 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 +const fetchImpl = require('./lib/web/fetch').fetch +module.exports.fetch = async function fetch (init, options = undefined) { + try { + return await fetchImpl(init, options) + } catch (err) { + if (err && typeof err === 'object') { + Error.captureStackTrace(err) } - try { - return await fetchImpl(...arguments) - } catch (err) { - if (typeof err === 'object') { - Error.captureStackTrace(err, this) - } - - throw err - } + 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) } +module.exports.Headers = require('./lib/web/fetch/headers').Headers +module.exports.Response = require('./lib/web/fetch/response').Response +module.exports.Request = require('./lib/web/fetch/request').Request +module.exports.FormData = require('./lib/web/fetch/formdata').FormData -if (util.nodeMajor >= 16) { - const { deleteCookie, getCookies, getSetCookies, setCookie } = require('./lib/cookies') +const { setGlobalOrigin, getGlobalOrigin } = require('./lib/web/fetch/global') - module.exports.deleteCookie = deleteCookie - module.exports.getCookies = getCookies - module.exports.getSetCookies = getSetCookies - module.exports.setCookie = setCookie +module.exports.setGlobalOrigin = setGlobalOrigin +module.exports.getGlobalOrigin = getGlobalOrigin - const { parseMIMEType, serializeAMimeType } = require('./lib/fetch/dataURL') +const { CacheStorage } = require('./lib/web/cache/cachestorage') +const { kConstruct } = require('./lib/core/symbols') - module.exports.parseMIMEType = parseMIMEType - module.exports.serializeAMimeType = serializeAMimeType -} +// 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 >= 18 && hasCrypto) { - const { WebSocket } = require('./lib/websocket/websocket') +const { deleteCookie, getCookies, getSetCookies, setCookie, parseCookie } = require('./lib/web/cookies') - module.exports.WebSocket = WebSocket -} +module.exports.deleteCookie = deleteCookie +module.exports.getCookies = getCookies +module.exports.getSetCookies = getSetCookies +module.exports.setCookie = setCookie +module.exports.parseCookie = parseCookie + +const { parseMIMEType, serializeAMimeType } = require('./lib/web/fetch/data-url') + +module.exports.parseMIMEType = parseMIMEType +module.exports.serializeAMimeType = serializeAMimeType + +const { CloseEvent, ErrorEvent, MessageEvent } = require('./lib/web/websocket/events') +module.exports.WebSocket = require('./lib/web/websocket/websocket').WebSocket +module.exports.CloseEvent = CloseEvent +module.exports.ErrorEvent = ErrorEvent +module.exports.MessageEvent = MessageEvent + +module.exports.WebSocketStream = require('./lib/web/websocket/stream/websocketstream').WebSocketStream +module.exports.WebSocketError = require('./lib/web/websocket/stream/websocketerror').WebSocketError module.exports.request = makeDispatcher(api.request) module.exports.stream = makeDispatcher(api.stream) @@ -162,6 +170,12 @@ module.exports.connect = makeDispatcher(api.connect) module.exports.upgrade = makeDispatcher(api.upgrade) module.exports.MockClient = MockClient +module.exports.MockCallHistory = MockCallHistory +module.exports.MockCallHistoryLog = MockCallHistoryLog module.exports.MockPool = MockPool module.exports.MockAgent = MockAgent module.exports.mockErrors = mockErrors + +const { EventSource } = require('./lib/web/eventsource/eventsource') + +module.exports.EventSource = EventSource diff --git a/node_modules/undici/lib/agent.js b/node_modules/undici/lib/agent.js deleted file mode 100644 index 0b18f2a..0000000 --- a/node_modules/undici/lib/agent.js +++ /dev/null @@ -1,148 +0,0 @@ -'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 index 2985c1e..608170b 100644 --- a/node_modules/undici/lib/api/abort-signal.js +++ b/node_modules/undici/lib/api/abort-signal.js @@ -1,3 +1,5 @@ +'use strict' + const { addAbortListener } = require('../core/util') const { RequestAbortedError } = require('../core/errors') @@ -6,13 +8,16 @@ const kSignal = Symbol('kSignal') function abort (self) { if (self.abort) { - self.abort() + self.abort(self[kSignal]?.reason) } else { - self.onError(new RequestAbortedError()) + self.reason = self[kSignal]?.reason ?? new RequestAbortedError() } + removeSignal(self) } function addSignal (self, signal) { + self.reason = null + self[kSignal] = null self[kListener] = null diff --git a/node_modules/undici/lib/api/api-connect.js b/node_modules/undici/lib/api/api-connect.js index fd2b6ad..c8b86dd 100644 --- a/node_modules/undici/lib/api/api-connect.js +++ b/node_modules/undici/lib/api/api-connect.js @@ -1,7 +1,8 @@ 'use strict' -const { AsyncResource } = require('async_hooks') -const { InvalidArgumentError, RequestAbortedError, SocketError } = require('../core/errors') +const assert = require('node:assert') +const { AsyncResource } = require('node:async_hooks') +const { InvalidArgumentError, SocketError } = require('../core/errors') const util = require('../core/util') const { addSignal, removeSignal } = require('./abort-signal') @@ -32,10 +33,13 @@ class ConnectHandler extends AsyncResource { } onConnect (abort, context) { - if (!this.callback) { - throw new RequestAbortedError() + if (this.reason) { + abort(this.reason) + return } + assert(this.callback) + this.abort = abort this.context = context } @@ -91,12 +95,14 @@ function connect (opts, callback) { try { const connectHandler = new ConnectHandler(opts, callback) - this.dispatch({ ...opts, method: 'CONNECT' }, connectHandler) + const connectOptions = { ...opts, method: 'CONNECT' } + + this.dispatch(connectOptions, connectHandler) } catch (err) { if (typeof callback !== 'function') { throw err } - const opaque = opts && opts.opaque + const opaque = opts?.opaque queueMicrotask(() => callback(err, { opaque })) } } diff --git a/node_modules/undici/lib/api/api-pipeline.js b/node_modules/undici/lib/api/api-pipeline.js index af4a180..77f3520 100644 --- a/node_modules/undici/lib/api/api-pipeline.js +++ b/node_modules/undici/lib/api/api-pipeline.js @@ -4,16 +4,18 @@ const { Readable, Duplex, PassThrough -} = require('stream') +} = require('node:stream') +const assert = require('node:assert') +const { AsyncResource } = require('node:async_hooks') 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') + +function noop () {} const kResume = Symbol('resume') @@ -92,7 +94,7 @@ class PipelineHandler extends AsyncResource { this.context = null this.onInfo = onInfo || null - this.req = new PipelineRequest().on('error', util.nop) + this.req = new PipelineRequest().on('error', noop) this.ret = new Duplex({ readableObjectMode: opts.objectMode, @@ -100,7 +102,7 @@ class PipelineHandler extends AsyncResource { read: () => { const { body } = this - if (body && body.resume) { + if (body?.resume) { body.resume() } }, @@ -145,14 +147,15 @@ class PipelineHandler extends AsyncResource { } onConnect (abort, context) { - const { ret, res } = this + const { res } = this + + if (this.reason) { + abort(this.reason) + return + } assert(!res, 'pipeline cannot be retried') - if (ret.destroyed) { - throw new RequestAbortedError() - } - this.abort = abort this.context = context } @@ -182,7 +185,7 @@ class PipelineHandler extends AsyncResource { context }) } catch (err) { - this.res.on('error', util.nop) + this.res.on('error', noop) throw err } diff --git a/node_modules/undici/lib/api/api-request.js b/node_modules/undici/lib/api/api-request.js index d4281ce..9ae7ed6 100644 --- a/node_modules/undici/lib/api/api-request.js +++ b/node_modules/undici/lib/api/api-request.js @@ -1,14 +1,12 @@ 'use strict' -const Readable = require('./readable') -const { - InvalidArgumentError, - RequestAbortedError -} = require('../core/errors') +const assert = require('node:assert') +const { AsyncResource } = require('node:async_hooks') +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') + +function noop () {} class RequestHandler extends AsyncResource { constructor (opts, callback) { @@ -16,7 +14,7 @@ class RequestHandler extends AsyncResource { throw new InvalidArgumentError('invalid opts') } - const { signal, method, opaque, body, onInfo, responseHeaders, throwOnError, highWaterMark } = opts + const { signal, method, opaque, body, onInfo, responseHeaders, highWaterMark } = opts try { if (typeof callback !== 'function') { @@ -42,11 +40,12 @@ class RequestHandler extends AsyncResource { super('UNDICI_REQUEST') } catch (err) { if (util.isStream(body)) { - util.destroy(body.on('error', util.nop), err) + util.destroy(body.on('error', noop), err) } throw err } + this.method = method this.responseHeaders = responseHeaders || null this.opaque = opaque || null this.callback = callback @@ -56,23 +55,32 @@ class RequestHandler extends AsyncResource { this.trailers = {} this.context = null this.onInfo = onInfo || null - this.throwOnError = throwOnError this.highWaterMark = highWaterMark + this.reason = null + this.removeAbortListener = null - if (util.isStream(body)) { - body.on('error', (err) => { - this.onError(err) + if (signal?.aborted) { + this.reason = signal.reason ?? new RequestAbortedError() + } else if (signal) { + this.removeAbortListener = util.addAbortListener(signal, () => { + this.reason = signal.reason ?? new RequestAbortedError() + if (this.res) { + util.destroy(this.res.on('error', noop), this.reason) + } else if (this.abort) { + this.abort(this.reason) + } }) } - - addSignal(this, signal) } onConnect (abort, context) { - if (!this.callback) { - throw new RequestAbortedError() + if (this.reason) { + abort(this.reason) + return } + assert(this.callback) + this.abort = abort this.context = context } @@ -91,48 +99,48 @@ class RequestHandler extends AsyncResource { const parsedHeaders = responseHeaders === 'raw' ? util.parseHeaders(rawHeaders) : headers const contentType = parsedHeaders['content-type'] - const body = new Readable({ resume, abort, contentType, highWaterMark }) + const contentLength = parsedHeaders['content-length'] + const res = new Readable({ + resume, + abort, + contentType, + contentLength: this.method !== 'HEAD' && contentLength + ? Number(contentLength) + : null, + highWaterMark + }) + + if (this.removeAbortListener) { + res.on('close', this.removeAbortListener) + this.removeAbortListener = null + } this.callback = null - this.res = body + this.res = res 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 - }) - } + this.runInAsyncScope(callback, null, null, { + statusCode, + headers, + trailers: this.trailers, + opaque, + body: res, + context + }) } } onData (chunk) { - const { res } = this - return res.push(chunk) + return this.res.push(chunk) } onComplete (trailers) { - const { res } = this - - removeSignal(this) - util.parseHeaders(trailers, this.trailers) - - res.push(null) + this.res.push(null) } onError (err) { const { res, callback, body, opaque } = this - removeSignal(this) - if (callback) { // TODO: Does this need queueMicrotask? this.callback = null @@ -145,13 +153,22 @@ class RequestHandler extends AsyncResource { this.res = null // Ensure all queued handlers are invoked before destroying res. queueMicrotask(() => { - util.destroy(res, err) + util.destroy(res.on('error', noop), err) }) } if (body) { this.body = null - util.destroy(body, err) + + if (util.isStream(body)) { + body.on('error', noop) + util.destroy(body, err) + } + } + + if (this.removeAbortListener) { + this.removeAbortListener() + this.removeAbortListener = null } } } @@ -166,12 +183,14 @@ function request (opts, callback) { } try { - this.dispatch(opts, new RequestHandler(opts, callback)) + const handler = new RequestHandler(opts, callback) + + this.dispatch(opts, handler) } catch (err) { if (typeof callback !== 'function') { throw err } - const opaque = opts && opts.opaque + const opaque = opts?.opaque queueMicrotask(() => callback(err, { opaque })) } } diff --git a/node_modules/undici/lib/api/api-stream.js b/node_modules/undici/lib/api/api-stream.js index c571a6f..eb92733 100644 --- a/node_modules/undici/lib/api/api-stream.js +++ b/node_modules/undici/lib/api/api-stream.js @@ -1,23 +1,21 @@ 'use strict' -const { finished, PassThrough } = require('stream') -const { - InvalidArgumentError, - InvalidReturnValueError, - RequestAbortedError -} = require('../core/errors') +const assert = require('node:assert') +const { finished } = require('node:stream') +const { AsyncResource } = require('node:async_hooks') +const { InvalidArgumentError, InvalidReturnValueError } = require('../core/errors') const util = require('../core/util') -const { getResolveErrorBodyCallback } = require('./util') -const { AsyncResource } = require('async_hooks') const { addSignal, removeSignal } = require('./abort-signal') +function noop () {} + 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 + const { signal, method, opaque, body, onInfo, responseHeaders } = opts try { if (typeof callback !== 'function') { @@ -43,7 +41,7 @@ class StreamHandler extends AsyncResource { super('UNDICI_STREAM') } catch (err) { if (util.isStream(body)) { - util.destroy(body.on('error', util.nop), err) + util.destroy(body.on('error', noop), err) } throw err } @@ -58,7 +56,6 @@ class StreamHandler extends AsyncResource { this.trailers = null this.body = body this.onInfo = onInfo || null - this.throwOnError = throwOnError || false if (util.isStream(body)) { body.on('error', (err) => { @@ -70,16 +67,19 @@ class StreamHandler extends AsyncResource { } onConnect (abort, context) { - if (!this.callback) { - throw new RequestAbortedError() + if (this.reason) { + abort(this.reason) + return } + assert(this.callback) + this.abort = abort this.context = context } onHeaders (statusCode, rawHeaders, resume, statusMessage) { - const { factory, opaque, context, callback, responseHeaders } = this + const { factory, opaque, context, responseHeaders } = this const headers = responseHeaders === 'raw' ? util.parseRawHeaders(rawHeaders) : util.parseHeaders(rawHeaders) @@ -92,55 +92,42 @@ class StreamHandler extends AsyncResource { this.factory = null - let res + if (factory === null) { + return + } - if (this.throwOnError && statusCode >= 400) { - const parsedHeaders = responseHeaders === 'raw' ? util.parseHeaders(rawHeaders) : headers - const contentType = parsedHeaders['content-type'] - res = new PassThrough() + const 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(getResolveErrorBodyCallback, null, - { callback, body: res, contentType, statusCode, statusMessage, headers } - ) - } else { - if (factory === null) { - return + this.runInAsyncScope(callback, null, err || null, { opaque, trailers }) + + if (err) { + abort() } - - 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) @@ -148,7 +135,7 @@ class StreamHandler extends AsyncResource { const needDrain = res.writableNeedDrain !== undefined ? res.writableNeedDrain - : res._writableState && res._writableState.needDrain + : res._writableState?.needDrain return needDrain !== true } @@ -207,12 +194,14 @@ function stream (opts, factory, callback) { } try { - this.dispatch(opts, new StreamHandler(opts, factory, callback)) + const handler = new StreamHandler(opts, factory, callback) + + this.dispatch(opts, handler) } catch (err) { if (typeof callback !== 'function') { throw err } - const opaque = opts && opts.opaque + const opaque = opts?.opaque queueMicrotask(() => callback(err, { opaque })) } } diff --git a/node_modules/undici/lib/api/api-upgrade.js b/node_modules/undici/lib/api/api-upgrade.js index ef783e8..f6efdc9 100644 --- a/node_modules/undici/lib/api/api-upgrade.js +++ b/node_modules/undici/lib/api/api-upgrade.js @@ -1,10 +1,10 @@ 'use strict' -const { InvalidArgumentError, RequestAbortedError, SocketError } = require('../core/errors') -const { AsyncResource } = require('async_hooks') +const { InvalidArgumentError, SocketError } = require('../core/errors') +const { AsyncResource } = require('node:async_hooks') +const assert = require('node:assert') const util = require('../core/util') const { addSignal, removeSignal } = require('./abort-signal') -const assert = require('assert') class UpgradeHandler extends AsyncResource { constructor (opts, callback) { @@ -34,10 +34,13 @@ class UpgradeHandler extends AsyncResource { } onConnect (abort, context) { - if (!this.callback) { - throw new RequestAbortedError() + if (this.reason) { + abort(this.reason) + return } + assert(this.callback) + this.abort = abort this.context = null } @@ -47,9 +50,9 @@ class UpgradeHandler extends AsyncResource { } onUpgrade (statusCode, rawHeaders, socket) { - const { callback, opaque, context } = this + assert(statusCode === 101) - assert.strictEqual(statusCode, 101) + const { callback, opaque, context } = this removeSignal(this) @@ -88,16 +91,18 @@ function upgrade (opts, callback) { try { const upgradeHandler = new UpgradeHandler(opts, callback) - this.dispatch({ + const upgradeOpts = { ...opts, method: opts.method || 'GET', upgrade: opts.protocol || 'Websocket' - }, upgradeHandler) + } + + this.dispatch(upgradeOpts, upgradeHandler) } catch (err) { if (typeof callback !== 'function') { throw err } - const opaque = opts && opts.opaque + const opaque = opts?.opaque queueMicrotask(() => callback(err, { opaque })) } } diff --git a/node_modules/undici/lib/api/readable.js b/node_modules/undici/lib/api/readable.js index 5269dfa..31a31ac 100644 --- a/node_modules/undici/lib/api/readable.js +++ b/node_modules/undici/lib/api/readable.js @@ -2,27 +2,42 @@ 'use strict' -const assert = require('assert') -const { Readable } = require('stream') -const { RequestAbortedError, NotSupportedError, InvalidArgumentError } = require('../core/errors') +const assert = require('node:assert') +const { Readable } = require('node:stream') +const { RequestAbortedError, NotSupportedError, InvalidArgumentError, AbortError } = require('../core/errors') const util = require('../core/util') -const { ReadableStreamFrom, toUSVString } = require('../core/util') - -let Blob +const { ReadableStreamFrom } = require('../core/util') const kConsume = Symbol('kConsume') const kReading = Symbol('kReading') const kBody = Symbol('kBody') -const kAbort = Symbol('abort') +const kAbort = Symbol('kAbort') const kContentType = Symbol('kContentType') +const kContentLength = Symbol('kContentLength') +const kUsed = Symbol('kUsed') +const kBytesRead = Symbol('kBytesRead') const noop = () => {} -module.exports = class BodyReadable extends Readable { +/** + * @class + * @extends {Readable} + * @see https://fetch.spec.whatwg.org/#body + */ +class BodyReadable extends Readable { + /** + * @param {object} opts + * @param {(this: Readable, size: number) => void} opts.resume + * @param {() => (void | null)} opts.abort + * @param {string} [opts.contentType = ''] + * @param {number} [opts.contentLength] + * @param {number} [opts.highWaterMark = 64 * 1024] + */ constructor ({ resume, abort, contentType = '', + contentLength, highWaterMark = 64 * 1024 // Same as nodejs fs streams. }) { super({ @@ -34,9 +49,19 @@ module.exports = class BodyReadable extends Readable { this._readableState.dataEmitted = false this[kAbort] = abort + + /** + * @type {Consume | null} + */ this[kConsume] = null + this[kBytesRead] = 0 + /** + * @type {ReadableStream|null} + */ this[kBody] = null + this[kUsed] = false this[kContentType] = contentType + this[kContentLength] = Number.isFinite(contentLength) ? contentLength : null // Is stream being consumed through Readable API? // This is an optimization so that we avoid checking @@ -45,12 +70,12 @@ module.exports = class BodyReadable extends Readable { this[kReading] = false } - destroy (err) { - if (this.destroyed) { - // Node < 16 - return this - } - + /** + * @param {Error|null} err + * @param {(error:(Error|null)) => void} callback + * @returns {void} + */ + _destroy (err, callback) { if (!err && !this._readableState.endEmitted) { err = new RequestAbortedError() } @@ -59,34 +84,49 @@ module.exports = class BodyReadable extends Readable { 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 + // Workaround for Node "bug". If the stream is destroyed in same + // tick as it is created, then a user who is waiting for a + // promise (i.e micro tick) for installing an 'error' listener will + // never get a chance and will always encounter an unhandled exception. + if (!this[kUsed]) { + setImmediate(() => { + callback(err) + }) + } else { + callback(err) } - return super.emit(ev, ...args) } - on (ev, ...args) { - if (ev === 'data' || ev === 'readable') { + /** + * @param {string} event + * @param {(...args: any[]) => void} listener + * @returns {this} + */ + on (event, listener) { + if (event === 'data' || event === 'readable') { this[kReading] = true + this[kUsed] = true } - return super.on(ev, ...args) + return super.on(event, listener) } - addListener (ev, ...args) { - return this.on(ev, ...args) + /** + * @param {string} event + * @param {(...args: any[]) => void} listener + * @returns {this} + */ + addListener (event, listener) { + return this.on(event, listener) } - off (ev, ...args) { - const ret = super.off(ev, ...args) - if (ev === 'data' || ev === 'readable') { + /** + * @param {string|symbol} event + * @param {(...args: any[]) => void} listener + * @returns {this} + */ + off (event, listener) { + const ret = super.off(event, listener) + if (event === 'data' || event === 'readable') { this[kReading] = ( this.listenerCount('data') > 0 || this.listenerCount('readable') > 0 @@ -95,50 +135,107 @@ module.exports = class BodyReadable extends Readable { return ret } - removeListener (ev, ...args) { - return this.off(ev, ...args) + /** + * @param {string|symbol} event + * @param {(...args: any[]) => void} listener + * @returns {this} + */ + removeListener (event, listener) { + return this.off(event, listener) } + /** + * @param {Buffer|null} chunk + * @returns {boolean} + */ push (chunk) { - if (this[kConsume] && chunk !== null && this.readableLength === 0) { + this[kBytesRead] += chunk ? chunk.length : 0 + + if (this[kConsume] && chunk !== null) { 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 () { + /** + * Consumes and returns the body as a string. + * + * @see https://fetch.spec.whatwg.org/#dom-body-text + * @returns {Promise<string>} + */ + text () { return consume(this, 'text') } - // https://fetch.spec.whatwg.org/#dom-body-json - async json () { + /** + * Consumes and returns the body as a JavaScript Object. + * + * @see https://fetch.spec.whatwg.org/#dom-body-json + * @returns {Promise<unknown>} + */ + json () { return consume(this, 'json') } - // https://fetch.spec.whatwg.org/#dom-body-blob - async blob () { + /** + * Consumes and returns the body as a Blob + * + * @see https://fetch.spec.whatwg.org/#dom-body-blob + * @returns {Promise<Blob>} + */ + blob () { return consume(this, 'blob') } - // https://fetch.spec.whatwg.org/#dom-body-arraybuffer - async arrayBuffer () { + /** + * Consumes and returns the body as an Uint8Array. + * + * @see https://fetch.spec.whatwg.org/#dom-body-bytes + * @returns {Promise<Uint8Array>} + */ + bytes () { + return consume(this, 'bytes') + } + + /** + * Consumes and returns the body as an ArrayBuffer. + * + * @see https://fetch.spec.whatwg.org/#dom-body-arraybuffer + * @returns {Promise<ArrayBuffer>} + */ + arrayBuffer () { return consume(this, 'arrayBuffer') } - // https://fetch.spec.whatwg.org/#dom-body-formdata + /** + * Not implemented + * + * @see https://fetch.spec.whatwg.org/#dom-body-formdata + * @throws {NotSupportedError} + */ async formData () { // TODO: Implement. throw new NotSupportedError() } - // https://fetch.spec.whatwg.org/#dom-body-bodyused + /** + * Returns true if the body is not null and the body has been consumed. + * Otherwise, returns false. + * + * @see https://fetch.spec.whatwg.org/#dom-body-bodyused + * @readonly + * @returns {boolean} + */ get bodyUsed () { return util.isDisturbed(this) } - // https://fetch.spec.whatwg.org/#dom-body-body + /** + * @see https://fetch.spec.whatwg.org/#dom-body-body + * @readonly + * @returns {ReadableStream} + */ get body () { if (!this[kBody]) { this[kBody] = ReadableStreamFrom(this) @@ -151,95 +248,161 @@ module.exports = class BodyReadable extends Readable { return this[kBody] } - dump (opts) { - let limit = opts && Number.isFinite(opts.limit) ? opts.limit : 262144 - const signal = opts && opts.signal + /** + * Dumps the response body by reading `limit` number of bytes. + * @param {object} opts + * @param {number} [opts.limit = 131072] Number of bytes to read. + * @param {AbortSignal} [opts.signal] An AbortSignal to cancel the dump. + * @returns {Promise<null>} + */ + async dump (opts) { + const signal = opts?.signal - if (signal) { - try { - if (typeof signal !== 'object' || !('aborted' in signal)) { - throw new InvalidArgumentError('signal must be an AbortSignal') - } - util.throwIfAborted(signal) - } catch (err) { - return Promise.reject(err) + if (signal != null && (typeof signal !== 'object' || !('aborted' in signal))) { + throw new InvalidArgumentError('signal must be an AbortSignal') + } + + const limit = opts?.limit && Number.isFinite(opts.limit) + ? opts.limit + : 128 * 1024 + + signal?.throwIfAborted() + + if (this._readableState.closeEmitted) { + return null + } + + return await new Promise((resolve, reject) => { + if ( + (this[kContentLength] && (this[kContentLength] > limit)) || + this[kBytesRead] > limit + ) { + this.destroy(new AbortError()) } - } - if (this.closed) { - return Promise.resolve(null) - } - - return new Promise((resolve, reject) => { - const signalListenerCleanup = signal - ? util.addAbortListener(signal, () => { - this.destroy() - }) - : noop + if (signal) { + const onAbort = () => { + this.destroy(signal.reason ?? new AbortError()) + } + signal.addEventListener('abort', onAbort) + this + .on('close', function () { + signal.removeEventListener('abort', onAbort) + if (signal.aborted) { + reject(signal.reason ?? new AbortError()) + } else { + resolve(null) + } + }) + } else { + this.on('close', resolve) + } this - .on('close', function () { - signalListenerCleanup() - if (signal && signal.aborted) { - reject(signal.reason || Object.assign(new Error('The operation was aborted'), { name: 'AbortError' })) - } else { - resolve(null) - } - }) .on('error', noop) - .on('data', function (chunk) { - limit -= chunk.length - if (limit <= 0) { + .on('data', () => { + if (this[kBytesRead] > limit) { this.destroy() } }) .resume() }) } -} -// 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') + /** + * @param {BufferEncoding} encoding + * @returns {this} + */ + setEncoding (encoding) { + if (Buffer.isEncoding(encoding)) { + this._readableState.encoding = encoding + } + return this } +} +/** + * @see https://streams.spec.whatwg.org/#readablestream-locked + * @param {BodyReadable} bodyReadable + * @returns {boolean} + */ +function isLocked (bodyReadable) { + // Consume is an implicit lock. + return bodyReadable[kBody]?.locked === true || bodyReadable[kConsume] !== null +} + +/** + * @see https://fetch.spec.whatwg.org/#body-unusable + * @param {BodyReadable} bodyReadable + * @returns {boolean} + */ +function isUnusable (bodyReadable) { + return util.isDisturbed(bodyReadable) || isLocked(bodyReadable) +} + +/** + * @typedef {object} Consume + * @property {string} type + * @property {BodyReadable} stream + * @property {((value?: any) => void)} resolve + * @property {((err: Error) => void)} reject + * @property {number} length + * @property {Buffer[]} body + */ + +/** + * @param {BodyReadable} stream + * @param {string} type + * @returns {Promise<any>} + */ +function consume (stream, type) { 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()) + if (isUnusable(stream)) { + const rState = stream._readableState + if (rState.destroyed && rState.closeEmitted === false) { + stream + .on('error', err => { + reject(err) + }) + .on('close', () => { + reject(new TypeError('unusable')) + }) + } else { + reject(rState.errored ?? new TypeError('unusable')) + } + } else { + queueMicrotask(() => { + stream[kConsume] = { + type, + stream, + resolve, + reject, + length: 0, + body: [] } - }) - process.nextTick(consumeStart, stream[kConsume]) + stream + .on('error', function (err) { + consumeFinish(this[kConsume], err) + }) + .on('close', function () { + if (this[kConsume].body !== null) { + consumeFinish(this[kConsume], new RequestAbortedError()) + } + }) + + consumeStart(stream[kConsume]) + }) + } }) } +/** + * @param {Consume} consume + * @returns {void} + */ function consumeStart (consume) { if (consume.body === null) { return @@ -247,15 +410,23 @@ function consumeStart (consume) { const { _readableState: state } = consume.stream - for (const chunk of state.buffer) { - consumePush(consume, chunk) + if (state.bufferIndex) { + const start = state.bufferIndex + const end = state.buffer.length + for (let n = start; n < end; n++) { + consumePush(consume, state.buffer[n]) + } + } else { + for (const chunk of state.buffer) { + consumePush(consume, chunk) + } } if (state.endEmitted) { - consumeEnd(this[kConsume]) + consumeEnd(this[kConsume], this._readableState.encoding) } else { consume.stream.on('end', function () { - consumeEnd(this[kConsume]) + consumeEnd(this[kConsume], this._readableState.encoding) }) } @@ -266,29 +437,78 @@ function consumeStart (consume) { } } -function consumeEnd (consume) { +/** + * @param {Buffer[]} chunks + * @param {number} length + * @param {BufferEncoding} encoding + * @returns {string} + */ +function chunksDecode (chunks, length, encoding) { + if (chunks.length === 0 || length === 0) { + return '' + } + const buffer = chunks.length === 1 ? chunks[0] : Buffer.concat(chunks, length) + const bufferLength = buffer.length + + // Skip BOM. + const start = + bufferLength > 2 && + buffer[0] === 0xef && + buffer[1] === 0xbb && + buffer[2] === 0xbf + ? 3 + : 0 + if (!encoding || encoding === 'utf8' || encoding === 'utf-8') { + return buffer.utf8Slice(start, bufferLength) + } else { + return buffer.subarray(start, bufferLength).toString(encoding) + } +} + +/** + * @param {Buffer[]} chunks + * @param {number} length + * @returns {Uint8Array} + */ +function chunksConcat (chunks, length) { + if (chunks.length === 0 || length === 0) { + return new Uint8Array(0) + } + if (chunks.length === 1) { + // fast-path + return new Uint8Array(chunks[0]) + } + const buffer = new Uint8Array(Buffer.allocUnsafeSlow(length).buffer) + + let offset = 0 + for (let i = 0; i < chunks.length; ++i) { + const chunk = chunks[i] + buffer.set(chunk, offset) + offset += chunk.length + } + + return buffer +} + +/** + * @param {Consume} consume + * @param {BufferEncoding} encoding + * @returns {void} + */ +function consumeEnd (consume, encoding) { const { type, body, resolve, stream, length } = consume try { if (type === 'text') { - resolve(toUSVString(Buffer.concat(body))) + resolve(chunksDecode(body, length, encoding)) } else if (type === 'json') { - resolve(JSON.parse(Buffer.concat(body))) + resolve(JSON.parse(chunksDecode(body, length, encoding))) } 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.buffer) + resolve(chunksConcat(body, length).buffer) } else if (type === 'blob') { - if (!Blob) { - Blob = require('buffer').Blob - } resolve(new Blob(body, { type: stream[kContentType] })) + } else if (type === 'bytes') { + resolve(chunksConcat(body, length)) } consumeFinish(consume) @@ -297,11 +517,21 @@ function consumeEnd (consume) { } } +/** + * @param {Consume} consume + * @param {Buffer} chunk + * @returns {void} + */ function consumePush (consume, chunk) { consume.length += chunk.length consume.body.push(chunk) } +/** + * @param {Consume} consume + * @param {Error} [err] + * @returns {void} + */ function consumeFinish (consume, err) { if (consume.body === null) { return @@ -313,6 +543,7 @@ function consumeFinish (consume, err) { consume.resolve() } + // Reset the consume object to allow for garbage collection. consume.type = null consume.stream = null consume.resolve = null @@ -320,3 +551,8 @@ function consumeFinish (consume, err) { consume.length = 0 consume.body = null } + +module.exports = { + Readable: BodyReadable, + chunksDecode +} diff --git a/node_modules/undici/lib/api/util.js b/node_modules/undici/lib/api/util.js index bffd702..5512636 100644 --- a/node_modules/undici/lib/api/util.js +++ b/node_modules/undici/lib/api/util.js @@ -1,46 +1,95 @@ -const assert = require('assert') +'use strict' + +const assert = require('node:assert') const { ResponseStatusCodeError } = require('../core/errors') -const { toUSVString } = require('../core/util') + +const { chunksDecode } = require('./readable') +const CHUNK_LIMIT = 128 * 1024 async function getResolveErrorBodyCallback ({ callback, body, contentType, statusCode, statusMessage, headers }) { assert(body) let chunks = [] - let limit = 0 + let length = 0 - for await (const chunk of body) { - chunks.push(chunk) - limit += chunk.length - if (limit > 128 * 1024) { - chunks = null - break + try { + for await (const chunk of body) { + chunks.push(chunk) + length += chunk.length + if (length > CHUNK_LIMIT) { + chunks = [] + length = 0 + break + } } + } catch { + chunks = [] + length = 0 + // Do nothing.... } - if (statusCode === 204 || !contentType || !chunks) { - process.nextTick(callback, new ResponseStatusCodeError(`Response status code ${statusCode}${statusMessage ? `: ${statusMessage}` : ''}`, statusCode, headers)) + const message = `Response status code ${statusCode}${statusMessage ? `: ${statusMessage}` : ''}` + + if (statusCode === 204 || !contentType || !length) { + queueMicrotask(() => callback(new ResponseStatusCodeError(message, statusCode, headers))) return } + const stackTraceLimit = Error.stackTraceLimit + Error.stackTraceLimit = 0 + let payload + 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 (isContentTypeApplicationJson(contentType)) { + payload = JSON.parse(chunksDecode(chunks, length)) + } else if (isContentTypeText(contentType)) { + payload = chunksDecode(chunks, length) } - - 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 + } catch { + // process in a callback to avoid throwing in the microtask queue + } finally { + Error.stackTraceLimit = stackTraceLimit } - - process.nextTick(callback, new ResponseStatusCodeError(`Response status code ${statusCode}${statusMessage ? `: ${statusMessage}` : ''}`, statusCode, headers)) + queueMicrotask(() => callback(new ResponseStatusCodeError(message, statusCode, headers, payload))) } -module.exports = { getResolveErrorBodyCallback } +const isContentTypeApplicationJson = (contentType) => { + return ( + contentType.length > 15 && + contentType[11] === '/' && + contentType[0] === 'a' && + contentType[1] === 'p' && + contentType[2] === 'p' && + contentType[3] === 'l' && + contentType[4] === 'i' && + contentType[5] === 'c' && + contentType[6] === 'a' && + contentType[7] === 't' && + contentType[8] === 'i' && + contentType[9] === 'o' && + contentType[10] === 'n' && + contentType[12] === 'j' && + contentType[13] === 's' && + contentType[14] === 'o' && + contentType[15] === 'n' + ) +} + +const isContentTypeText = (contentType) => { + return ( + contentType.length > 4 && + contentType[4] === '/' && + contentType[0] === 't' && + contentType[1] === 'e' && + contentType[2] === 'x' && + contentType[3] === 't' + ) +} + +module.exports = { + getResolveErrorBodyCallback, + isContentTypeApplicationJson, + isContentTypeText +} diff --git a/node_modules/undici/lib/balanced-pool.js b/node_modules/undici/lib/balanced-pool.js deleted file mode 100644 index 10bc6a4..0000000 --- a/node_modules/undici/lib/balanced-pool.js +++ /dev/null @@ -1,190 +0,0 @@ -'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 deleted file mode 100644 index 9b31108..0000000 --- a/node_modules/undici/lib/cache/cache.js +++ /dev/null @@ -1,838 +0,0 @@ -'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).then(bodyReadPromise.resolve, bodyReadPromise.reject) - } 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 deleted file mode 100644 index 7e7f0cf..0000000 --- a/node_modules/undici/lib/cache/cachestorage.js +++ /dev/null @@ -1,144 +0,0 @@ -'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/memory-cache-store.js b/node_modules/undici/lib/cache/memory-cache-store.js new file mode 100644 index 0000000..6fa7356 --- /dev/null +++ b/node_modules/undici/lib/cache/memory-cache-store.js @@ -0,0 +1,183 @@ +'use strict' + +const { Writable } = require('node:stream') +const { assertCacheKey, assertCacheValue } = require('../util/cache.js') + +/** + * @typedef {import('../../types/cache-interceptor.d.ts').default.CacheKey} CacheKey + * @typedef {import('../../types/cache-interceptor.d.ts').default.CacheValue} CacheValue + * @typedef {import('../../types/cache-interceptor.d.ts').default.CacheStore} CacheStore + * @typedef {import('../../types/cache-interceptor.d.ts').default.GetResult} GetResult + */ + +/** + * @implements {CacheStore} + */ +class MemoryCacheStore { + #maxCount = Infinity + #maxSize = Infinity + #maxEntrySize = Infinity + + #size = 0 + #count = 0 + #entries = new Map() + + /** + * @param {import('../../types/cache-interceptor.d.ts').default.MemoryCacheStoreOpts | undefined} [opts] + */ + constructor (opts) { + if (opts) { + if (typeof opts !== 'object') { + throw new TypeError('MemoryCacheStore options must be an object') + } + + if (opts.maxCount !== undefined) { + if ( + typeof opts.maxCount !== 'number' || + !Number.isInteger(opts.maxCount) || + opts.maxCount < 0 + ) { + throw new TypeError('MemoryCacheStore options.maxCount must be a non-negative integer') + } + this.#maxCount = opts.maxCount + } + + if (opts.maxSize !== undefined) { + if ( + typeof opts.maxSize !== 'number' || + !Number.isInteger(opts.maxSize) || + opts.maxSize < 0 + ) { + throw new TypeError('MemoryCacheStore options.maxSize must be a non-negative integer') + } + this.#maxSize = opts.maxSize + } + + if (opts.maxEntrySize !== undefined) { + if ( + typeof opts.maxEntrySize !== 'number' || + !Number.isInteger(opts.maxEntrySize) || + opts.maxEntrySize < 0 + ) { + throw new TypeError('MemoryCacheStore options.maxEntrySize must be a non-negative integer') + } + this.#maxEntrySize = opts.maxEntrySize + } + } + } + + /** + * @param {import('../../types/cache-interceptor.d.ts').default.CacheKey} req + * @returns {import('../../types/cache-interceptor.d.ts').default.GetResult | undefined} + */ + get (key) { + assertCacheKey(key) + + const topLevelKey = `${key.origin}:${key.path}` + + const now = Date.now() + const entry = this.#entries.get(topLevelKey)?.find((entry) => ( + entry.deleteAt > now && + entry.method === key.method && + (entry.vary == null || Object.keys(entry.vary).every(headerName => { + if (entry.vary[headerName] === null) { + return key.headers[headerName] === undefined + } + + return entry.vary[headerName] === key.headers[headerName] + })) + )) + + return entry == null + ? undefined + : { + statusMessage: entry.statusMessage, + statusCode: entry.statusCode, + headers: entry.headers, + body: entry.body, + vary: entry.vary ? entry.vary : undefined, + etag: entry.etag, + cacheControlDirectives: entry.cacheControlDirectives, + cachedAt: entry.cachedAt, + staleAt: entry.staleAt, + deleteAt: entry.deleteAt + } + } + + /** + * @param {import('../../types/cache-interceptor.d.ts').default.CacheKey} key + * @param {import('../../types/cache-interceptor.d.ts').default.CacheValue} val + * @returns {Writable | undefined} + */ + createWriteStream (key, val) { + assertCacheKey(key) + assertCacheValue(val) + + const topLevelKey = `${key.origin}:${key.path}` + + const store = this + const entry = { ...key, ...val, body: [], size: 0 } + + return new Writable({ + write (chunk, encoding, callback) { + if (typeof chunk === 'string') { + chunk = Buffer.from(chunk, encoding) + } + + entry.size += chunk.byteLength + + if (entry.size >= store.#maxEntrySize) { + this.destroy() + } else { + entry.body.push(chunk) + } + + callback(null) + }, + final (callback) { + let entries = store.#entries.get(topLevelKey) + if (!entries) { + entries = [] + store.#entries.set(topLevelKey, entries) + } + entries.push(entry) + + store.#size += entry.size + store.#count += 1 + + if (store.#size > store.#maxSize || store.#count > store.#maxCount) { + for (const [key, entries] of store.#entries) { + for (const entry of entries.splice(0, entries.length / 2)) { + store.#size -= entry.size + store.#count -= 1 + } + if (entries.length === 0) { + store.#entries.delete(key) + } + } + } + + callback(null) + } + }) + } + + /** + * @param {CacheKey} key + */ + delete (key) { + if (typeof key !== 'object') { + throw new TypeError(`expected key to be object, got ${typeof key}`) + } + + const topLevelKey = `${key.origin}:${key.path}` + + for (const entry of this.#entries.get(topLevelKey) ?? []) { + this.#size -= entry.size + this.#count -= 1 + } + this.#entries.delete(topLevelKey) + } +} + +module.exports = MemoryCacheStore diff --git a/node_modules/undici/lib/cache/sqlite-cache-store.js b/node_modules/undici/lib/cache/sqlite-cache-store.js new file mode 100644 index 0000000..e027cff --- /dev/null +++ b/node_modules/undici/lib/cache/sqlite-cache-store.js @@ -0,0 +1,457 @@ +'use strict' + +const { Writable } = require('stream') +const { assertCacheKey, assertCacheValue } = require('../util/cache.js') + +let DatabaseSync + +const VERSION = 3 + +// 2gb +const MAX_ENTRY_SIZE = 2 * 1000 * 1000 * 1000 + +/** + * @typedef {import('../../types/cache-interceptor.d.ts').default.CacheStore} CacheStore + * @implements {CacheStore} + * + * @typedef {{ + * id: Readonly<number>, + * body?: Uint8Array + * statusCode: number + * statusMessage: string + * headers?: string + * vary?: string + * etag?: string + * cacheControlDirectives?: string + * cachedAt: number + * staleAt: number + * deleteAt: number + * }} SqliteStoreValue + */ +module.exports = class SqliteCacheStore { + #maxEntrySize = MAX_ENTRY_SIZE + #maxCount = Infinity + + /** + * @type {import('node:sqlite').DatabaseSync} + */ + #db + + /** + * @type {import('node:sqlite').StatementSync} + */ + #getValuesQuery + + /** + * @type {import('node:sqlite').StatementSync} + */ + #updateValueQuery + + /** + * @type {import('node:sqlite').StatementSync} + */ + #insertValueQuery + + /** + * @type {import('node:sqlite').StatementSync} + */ + #deleteExpiredValuesQuery + + /** + * @type {import('node:sqlite').StatementSync} + */ + #deleteByUrlQuery + + /** + * @type {import('node:sqlite').StatementSync} + */ + #countEntriesQuery + + /** + * @type {import('node:sqlite').StatementSync | null} + */ + #deleteOldValuesQuery + + /** + * @param {import('../../types/cache-interceptor.d.ts').default.SqliteCacheStoreOpts | undefined} opts + */ + constructor (opts) { + if (opts) { + if (typeof opts !== 'object') { + throw new TypeError('SqliteCacheStore options must be an object') + } + + if (opts.maxEntrySize !== undefined) { + if ( + typeof opts.maxEntrySize !== 'number' || + !Number.isInteger(opts.maxEntrySize) || + opts.maxEntrySize < 0 + ) { + throw new TypeError('SqliteCacheStore options.maxEntrySize must be a non-negative integer') + } + + if (opts.maxEntrySize > MAX_ENTRY_SIZE) { + throw new TypeError('SqliteCacheStore options.maxEntrySize must be less than 2gb') + } + + this.#maxEntrySize = opts.maxEntrySize + } + + if (opts.maxCount !== undefined) { + if ( + typeof opts.maxCount !== 'number' || + !Number.isInteger(opts.maxCount) || + opts.maxCount < 0 + ) { + throw new TypeError('SqliteCacheStore options.maxCount must be a non-negative integer') + } + this.#maxCount = opts.maxCount + } + } + + if (!DatabaseSync) { + DatabaseSync = require('node:sqlite').DatabaseSync + } + this.#db = new DatabaseSync(opts?.location ?? ':memory:') + + this.#db.exec(` + CREATE TABLE IF NOT EXISTS cacheInterceptorV${VERSION} ( + -- Data specific to us + id INTEGER PRIMARY KEY AUTOINCREMENT, + url TEXT NOT NULL, + method TEXT NOT NULL, + + -- Data returned to the interceptor + body BUF NULL, + deleteAt INTEGER NOT NULL, + statusCode INTEGER NOT NULL, + statusMessage TEXT NOT NULL, + headers TEXT NULL, + cacheControlDirectives TEXT NULL, + etag TEXT NULL, + vary TEXT NULL, + cachedAt INTEGER NOT NULL, + staleAt INTEGER NOT NULL + ); + + CREATE INDEX IF NOT EXISTS idx_cacheInterceptorV${VERSION}_url ON cacheInterceptorV${VERSION}(url); + CREATE INDEX IF NOT EXISTS idx_cacheInterceptorV${VERSION}_method ON cacheInterceptorV${VERSION}(method); + CREATE INDEX IF NOT EXISTS idx_cacheInterceptorV${VERSION}_deleteAt ON cacheInterceptorV${VERSION}(deleteAt); + `) + + this.#getValuesQuery = this.#db.prepare(` + SELECT + id, + body, + deleteAt, + statusCode, + statusMessage, + headers, + etag, + cacheControlDirectives, + vary, + cachedAt, + staleAt + FROM cacheInterceptorV${VERSION} + WHERE + url = ? + AND method = ? + ORDER BY + deleteAt ASC + `) + + this.#updateValueQuery = this.#db.prepare(` + UPDATE cacheInterceptorV${VERSION} SET + body = ?, + deleteAt = ?, + statusCode = ?, + statusMessage = ?, + headers = ?, + etag = ?, + cacheControlDirectives = ?, + cachedAt = ?, + staleAt = ? + WHERE + id = ? + `) + + this.#insertValueQuery = this.#db.prepare(` + INSERT INTO cacheInterceptorV${VERSION} ( + url, + method, + body, + deleteAt, + statusCode, + statusMessage, + headers, + etag, + cacheControlDirectives, + vary, + cachedAt, + staleAt + ) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) + `) + + this.#deleteByUrlQuery = this.#db.prepare( + `DELETE FROM cacheInterceptorV${VERSION} WHERE url = ?` + ) + + this.#countEntriesQuery = this.#db.prepare( + `SELECT COUNT(*) AS total FROM cacheInterceptorV${VERSION}` + ) + + this.#deleteExpiredValuesQuery = this.#db.prepare( + `DELETE FROM cacheInterceptorV${VERSION} WHERE deleteAt <= ?` + ) + + this.#deleteOldValuesQuery = this.#maxCount === Infinity + ? null + : this.#db.prepare(` + DELETE FROM cacheInterceptorV${VERSION} + WHERE id IN ( + SELECT + id + FROM cacheInterceptorV${VERSION} + ORDER BY cachedAt DESC + LIMIT ? + ) + `) + } + + close () { + this.#db.close() + } + + /** + * @param {import('../../types/cache-interceptor.d.ts').default.CacheKey} key + * @returns {(import('../../types/cache-interceptor.d.ts').default.GetResult & { body?: Buffer }) | undefined} + */ + get (key) { + assertCacheKey(key) + + const value = this.#findValue(key) + return value + ? { + body: value.body ? Buffer.from(value.body.buffer, value.body.byteOffset, value.body.byteLength) : undefined, + statusCode: value.statusCode, + statusMessage: value.statusMessage, + headers: value.headers ? JSON.parse(value.headers) : undefined, + etag: value.etag ? value.etag : undefined, + vary: value.vary ? JSON.parse(value.vary) : undefined, + cacheControlDirectives: value.cacheControlDirectives + ? JSON.parse(value.cacheControlDirectives) + : undefined, + cachedAt: value.cachedAt, + staleAt: value.staleAt, + deleteAt: value.deleteAt + } + : undefined + } + + /** + * @param {import('../../types/cache-interceptor.d.ts').default.CacheKey} key + * @param {import('../../types/cache-interceptor.d.ts').default.CacheValue & { body: null | Buffer | Array<Buffer>}} value + */ + set (key, value) { + assertCacheKey(key) + + const url = this.#makeValueUrl(key) + const body = Array.isArray(value.body) ? Buffer.concat(value.body) : value.body + const size = body?.byteLength + + if (size && size > this.#maxEntrySize) { + return + } + + const existingValue = this.#findValue(key, true) + if (existingValue) { + // Updating an existing response, let's overwrite it + this.#updateValueQuery.run( + body, + value.deleteAt, + value.statusCode, + value.statusMessage, + value.headers ? JSON.stringify(value.headers) : null, + value.etag ? value.etag : null, + value.cacheControlDirectives ? JSON.stringify(value.cacheControlDirectives) : null, + value.cachedAt, + value.staleAt, + existingValue.id + ) + } else { + this.#prune() + // New response, let's insert it + this.#insertValueQuery.run( + url, + key.method, + body, + value.deleteAt, + value.statusCode, + value.statusMessage, + value.headers ? JSON.stringify(value.headers) : null, + value.etag ? value.etag : null, + value.cacheControlDirectives ? JSON.stringify(value.cacheControlDirectives) : null, + value.vary ? JSON.stringify(value.vary) : null, + value.cachedAt, + value.staleAt + ) + } + } + + /** + * @param {import('../../types/cache-interceptor.d.ts').default.CacheKey} key + * @param {import('../../types/cache-interceptor.d.ts').default.CacheValue} value + * @returns {Writable | undefined} + */ + createWriteStream (key, value) { + assertCacheKey(key) + assertCacheValue(value) + + let size = 0 + /** + * @type {Buffer[] | null} + */ + const body = [] + const store = this + + return new Writable({ + decodeStrings: true, + write (chunk, encoding, callback) { + size += chunk.byteLength + + if (size < store.#maxEntrySize) { + body.push(chunk) + } else { + this.destroy() + } + + callback() + }, + final (callback) { + store.set(key, { ...value, body }) + callback() + } + }) + } + + /** + * @param {import('../../types/cache-interceptor.d.ts').default.CacheKey} key + */ + delete (key) { + if (typeof key !== 'object') { + throw new TypeError(`expected key to be object, got ${typeof key}`) + } + + this.#deleteByUrlQuery.run(this.#makeValueUrl(key)) + } + + #prune () { + if (this.size <= this.#maxCount) { + return 0 + } + + { + const removed = this.#deleteExpiredValuesQuery.run(Date.now()).changes + if (removed) { + return removed + } + } + + { + const removed = this.#deleteOldValuesQuery?.run(Math.max(Math.floor(this.#maxCount * 0.1), 1)).changes + if (removed) { + return removed + } + } + + return 0 + } + + /** + * Counts the number of rows in the cache + * @returns {Number} + */ + get size () { + const { total } = this.#countEntriesQuery.get() + return total + } + + /** + * @param {import('../../types/cache-interceptor.d.ts').default.CacheKey} key + * @returns {string} + */ + #makeValueUrl (key) { + return `${key.origin}/${key.path}` + } + + /** + * @param {import('../../types/cache-interceptor.d.ts').default.CacheKey} key + * @param {boolean} [canBeExpired=false] + * @returns {SqliteStoreValue | undefined} + */ + #findValue (key, canBeExpired = false) { + const url = this.#makeValueUrl(key) + const { headers, method } = key + + /** + * @type {SqliteStoreValue[]} + */ + const values = this.#getValuesQuery.all(url, method) + + if (values.length === 0) { + return undefined + } + + const now = Date.now() + for (const value of values) { + if (now >= value.deleteAt && !canBeExpired) { + return undefined + } + + let matches = true + + if (value.vary) { + const vary = JSON.parse(value.vary) + + for (const header in vary) { + if (!headerValueEquals(headers[header], vary[header])) { + matches = false + break + } + } + } + + if (matches) { + return value + } + } + + return undefined + } +} + +/** + * @param {string|string[]|null|undefined} lhs + * @param {string|string[]|null|undefined} rhs + * @returns {boolean} + */ +function headerValueEquals (lhs, rhs) { + if (lhs == null && rhs == null) { + return true + } + + if ((lhs == null && rhs != null) || + (lhs != null && rhs == null)) { + return false + } + + if (Array.isArray(lhs) && Array.isArray(rhs)) { + if (lhs.length !== rhs.length) { + return false + } + + return lhs.every((x, i) => x === rhs[i]) + } + + return lhs === rhs +} diff --git a/node_modules/undici/lib/cache/symbols.js b/node_modules/undici/lib/cache/symbols.js deleted file mode 100644 index 40448d6..0000000 --- a/node_modules/undici/lib/cache/symbols.js +++ /dev/null @@ -1,5 +0,0 @@ -'use strict' - -module.exports = { - kConstruct: require('../core/symbols').kConstruct -} diff --git a/node_modules/undici/lib/cache/util.js b/node_modules/undici/lib/cache/util.js deleted file mode 100644 index 44d52b7..0000000 --- a/node_modules/undici/lib/cache/util.js +++ /dev/null @@ -1,49 +0,0 @@ -'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 deleted file mode 100644 index 22cb390..0000000 --- a/node_modules/undici/lib/client.js +++ /dev/null @@ -1,2283 +0,0 @@ -// @ts-check - -'use strict' - -/* global WebAssembly */ - -const assert = require('assert') -const net = require('net') -const http = require('http') -const { pipeline } = require('stream') -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, - kHTTPConnVersion, - // HTTP2 - kHost, - kHTTP2Session, - kHTTP2SessionState, - kHTTP2BuildRequest, - kHTTP2CopyHeaders, - kHTTP1BuildRequest -} = require('./core/symbols') - -/** @type {import('http2')} */ -let http2 -try { - http2 = require('http2') -} catch { - // @ts-ignore - http2 = { constants: {} } -} - -const { - constants: { - HTTP2_HEADER_AUTHORITY, - HTTP2_HEADER_METHOD, - HTTP2_HEADER_PATH, - HTTP2_HEADER_SCHEME, - HTTP2_HEADER_CONTENT_LENGTH, - HTTP2_HEADER_EXPECT, - HTTP2_HEADER_STATUS - } -} = http2 - -// Experimental -let h2ExperimentalWarned = false - -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, - // h2 - allowH2, - maxConcurrentStreams - } = {}) { - 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') - } - - // h2 - if (allowH2 != null && typeof allowH2 !== 'boolean') { - throw new InvalidArgumentError('allowH2 must be a valid boolean value') - } - - if (maxConcurrentStreams != null && (typeof maxConcurrentStreams !== 'number' || maxConcurrentStreams < 1)) { - throw new InvalidArgumentError('maxConcurrentStreams must be a possitive integer, greater than 0') - } - - if (typeof connect !== 'function') { - connect = buildConnector({ - ...tls, - maxCachedSessions, - allowH2, - 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 || http.maxHeaderSize - 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 - this[kHTTPConnVersion] = 'h1' - - // HTTP/2 - this[kHTTP2Session] = null - this[kHTTP2SessionState] = !allowH2 - ? null - : { - // streams: null, // Fixed queue of streams - For future support of `push` - openStreams: 0, // Keep track of them to decide wether or not unref the session - maxConcurrentStreams: maxConcurrentStreams != null ? maxConcurrentStreams : 100 // Max peerConcurrentStreams for a Node h2 server - } - this[kHost] = `${this[kUrl].hostname}${this[kUrl].port ? `:${this[kUrl].port}` : ''}` - - // 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 = this[kHTTPConnVersion] === 'h2' - ? Request[kHTTP2BuildRequest](origin, opts, handler) - : Request[kHTTP1BuildRequest](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] () { - // TODO: for H2 we need to gracefully flush the remaining enqueued - // request and close each stream. - 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[kHTTP2Session] != null) { - util.destroy(this[kHTTP2Session], err) - this[kHTTP2Session] = null - this[kHTTP2SessionState] = null - } - - if (!this[kSocket]) { - queueMicrotask(callback) - } else { - util.destroy(this[kSocket].on('close', callback), err) - } - - resume(this) - }) - } -} - -function onHttp2SessionError (err) { - assert(err.code !== 'ERR_TLS_CERT_ALTNAME_INVALID') - - this[kSocket][kError] = err - - onError(this[kClient], err) -} - -function onHttp2FrameError (type, code, id) { - const err = new InformationalError(`HTTP/2: "frameError" received - type ${type}, code ${code}`) - - if (id === 0) { - this[kSocket][kError] = err - onError(this[kClient], err) - } -} - -function onHttp2SessionEnd () { - util.destroy(this, new SocketError('other side closed')) - util.destroy(this[kSocket], new SocketError('other side closed')) -} - -function onHTTP2GoAway (code) { - const client = this[kClient] - const err = new InformationalError(`HTTP/2: "GOAWAY" frame received with code ${code}`) - client[kSocket] = null - client[kHTTP2Session] = null - - if (client.destroyed) { - assert(this[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(this, request, err) - } - } else if (client[kRunning] > 0) { - // 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) -} - -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 - } - - const pause = request.onHeaders(statusCode, headers, this.resume, statusText) === false - - if (request.aborted) { - 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 - - if (request.onData(buf) === false) { - return constants.ERROR.PAUSED - } - } - - 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 - } - - request.onComplete(headers) - - 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 - if (parser) { - parser.readMore() - } -} - -function onSocketError (err) { - const { [kClient]: client, [kParser]: parser } = this - - assert(err.code !== 'ERR_TLS_CERT_ALTNAME_INVALID') - - if (client[kHTTPConnVersion] !== 'h2') { - // 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, [kClient]: client } = this - - if (client[kHTTPConnVersion] !== 'h2') { - 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, [kParser]: parser } = this - - if (client[kHTTPConnVersion] === 'h1' && parser) { - if (!this[kError] && parser.statusCode && !parser.shouldKeepAlive) { - // We treat all incoming data so far as a valid response. - parser.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.substring(1, idx) - - 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 - } - - client[kConnecting] = false - - assert(socket) - - const isH2 = socket.alpnProtocol === 'h2' - if (isH2) { - if (!h2ExperimentalWarned) { - h2ExperimentalWarned = true - process.emitWarning('H2 support is experimental, expect them to change at any time.', { - code: 'UNDICI-H2' - }) - } - - const session = http2.connect(client[kUrl], { - createConnection: () => socket, - peerMaxConcurrentStreams: client[kHTTP2SessionState].maxConcurrentStreams - }) - - client[kHTTPConnVersion] = 'h2' - session[kClient] = client - session[kSocket] = socket - session.on('error', onHttp2SessionError) - session.on('frameError', onHttp2FrameError) - session.on('end', onHttp2SessionEnd) - session.on('goaway', onHTTP2GoAway) - session.on('close', onSocketClose) - session.unref() - - client[kHTTP2Session] = session - socket[kHTTP2Session] = session - } else { - if (!llhttpInstance) { - llhttpInstance = await llhttpPromise - llhttpPromise = null - } - - socket[kNoRef] = false - socket[kWriting] = false - socket[kReset] = false - socket[kBlocking] = false - socket[kParser] = new Parser(client, socket, llhttpInstance) - } - - socket[kCounter] = 0 - socket[kMaxRequests] = client[kMaxRequests] - socket[kClient] = client - socket[kError] = null - - 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 && socket.alpnProtocol !== 'h2') { - 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 && !client[kHTTP2Session]) { - 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 (client[kRunning] > 0 && util.bodyLength(request.body) !== 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) - } - } -} - -// https://www.rfc-editor.org/rfc/rfc7230#section-3.3.2 -function shouldSendContentLength (method) { - return method !== 'GET' && method !== 'HEAD' && method !== 'OPTIONS' && method !== 'TRACE' && method !== 'CONNECT' -} - -function write (client, request) { - if (client[kHTTPConnVersion] === 'h2') { - writeH2(client, client[kHTTP2Session], request) - return - } - - 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) - } - - const bodyLength = util.bodyLength(body) - - let contentLength = bodyLength - - 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 - } - - // https://github.com/nodejs/undici/issues/2046 - // A user agent may send a Content-Length header with 0 value, this should be allowed. - if (shouldSendContentLength(method) && contentLength > 0 && 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 || bodyLength === 0) { - 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 writeH2 (client, session, request) { - const { body, method, path, host, upgrade, expectContinue, signal, headers: reqHeaders } = request - - let headers - if (typeof reqHeaders === 'string') headers = Request[kHTTP2CopyHeaders](reqHeaders.trim()) - else headers = reqHeaders - - if (upgrade) { - errorRequest(client, request, new Error('Upgrade not supported for H2')) - return false - } - - try { - // TODO(HTTP/2): Should we call onConnect immediately or on stream ready event? - request.onConnect((err) => { - if (request.aborted || request.completed) { - return - } - - errorRequest(client, request, err || new RequestAbortedError()) - }) - } catch (err) { - errorRequest(client, request, err) - } - - if (request.aborted) { - return false - } - - /** @type {import('node:http2').ClientHttp2Stream} */ - let stream - const h2State = client[kHTTP2SessionState] - - headers[HTTP2_HEADER_AUTHORITY] = host || client[kHost] - headers[HTTP2_HEADER_METHOD] = method - - if (method === 'CONNECT') { - session.ref() - // we are already connected, streams are pending, first request - // will create a new stream. We trigger a request to create the stream and wait until - // `ready` event is triggered - // We disabled endStream to allow the user to write to the stream - stream = session.request(headers, { endStream: false, signal }) - - if (stream.id && !stream.pending) { - request.onUpgrade(null, null, stream) - ++h2State.openStreams - } else { - stream.once('ready', () => { - request.onUpgrade(null, null, stream) - ++h2State.openStreams - }) - } - - stream.once('close', () => { - h2State.openStreams -= 1 - // TODO(HTTP/2): unref only if current streams count is 0 - if (h2State.openStreams === 0) session.unref() - }) - - return true - } - - // https://tools.ietf.org/html/rfc7540#section-8.3 - // :path and :scheme headers must be omited when sending CONNECT - - headers[HTTP2_HEADER_PATH] = path - headers[HTTP2_HEADER_SCHEME] = 'https' - - // 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 - } - - // https://github.com/nodejs/undici/issues/2046 - // A user agent may send a Content-Length header with 0 value, this should be allowed. - if (shouldSendContentLength(method) && contentLength > 0 && request.contentLength != null && request.contentLength !== contentLength) { - if (client[kStrictContentLength]) { - errorRequest(client, request, new RequestContentLengthMismatchError()) - return false - } - - process.emitWarning(new RequestContentLengthMismatchError()) - } - - if (contentLength != null) { - assert(body, 'no body must not have content length') - headers[HTTP2_HEADER_CONTENT_LENGTH] = `${contentLength}` - } - - session.ref() - - const shouldEndStream = method === 'GET' || method === 'HEAD' - if (expectContinue) { - headers[HTTP2_HEADER_EXPECT] = '100-continue' - stream = session.request(headers, { endStream: shouldEndStream, signal }) - - stream.once('continue', writeBodyH2) - } else { - stream = session.request(headers, { - endStream: shouldEndStream, - signal - }) - writeBodyH2() - } - - // Increment counter as we have new several streams open - ++h2State.openStreams - - stream.once('response', headers => { - const { [HTTP2_HEADER_STATUS]: statusCode, ...realHeaders } = headers - - if (request.onHeaders(Number(statusCode), realHeaders, stream.resume.bind(stream), '') === false) { - stream.pause() - } - }) - - stream.once('end', () => { - request.onComplete([]) - }) - - stream.on('data', (chunk) => { - if (request.onData(chunk) === false) { - stream.pause() - } - }) - - stream.once('close', () => { - h2State.openStreams -= 1 - // TODO(HTTP/2): unref only if current streams count is 0 - if (h2State.openStreams === 0) { - session.unref() - } - }) - - stream.once('error', function (err) { - if (client[kHTTP2Session] && !client[kHTTP2Session].destroyed && !this.closed && !this.destroyed) { - h2State.streams -= 1 - util.destroy(stream, err) - } - }) - - stream.once('frameError', (type, code) => { - const err = new InformationalError(`HTTP/2: "frameError" received - type ${type}, code ${code}`) - errorRequest(client, request, err) - - if (client[kHTTP2Session] && !client[kHTTP2Session].destroyed && !this.closed && !this.destroyed) { - h2State.streams -= 1 - util.destroy(stream, err) - } - }) - - // stream.on('aborted', () => { - // // TODO(HTTP/2): Support aborted - // }) - - // stream.on('timeout', () => { - // // TODO(HTTP/2): Support timeout - // }) - - // stream.on('push', headers => { - // // TODO(HTTP/2): Suppor push - // }) - - // stream.on('trailers', headers => { - // // TODO(HTTP/2): Support trailers - // }) - - return true - - function writeBodyH2 () { - /* istanbul ignore else: assertion */ - if (!body) { - request.onRequestSent() - } else if (util.isBuffer(body)) { - assert(contentLength === body.byteLength, 'buffer body must have content length') - stream.cork() - stream.write(body) - stream.uncork() - stream.end() - request.onBodySent(body) - request.onRequestSent() - } else if (util.isBlobLike(body)) { - if (typeof body.stream === 'function') { - writeIterable({ - client, - request, - contentLength, - h2stream: stream, - expectsPayload, - body: body.stream(), - socket: client[kSocket], - header: '' - }) - } else { - writeBlob({ - body, - client, - request, - contentLength, - expectsPayload, - h2stream: stream, - header: '', - socket: client[kSocket] - }) - } - } else if (util.isStream(body)) { - writeStream({ - body, - client, - request, - contentLength, - expectsPayload, - socket: client[kSocket], - h2stream: stream, - header: '' - }) - } else if (util.isIterable(body)) { - writeIterable({ - body, - client, - request, - contentLength, - expectsPayload, - header: '', - h2stream: stream, - socket: client[kSocket] - }) - } else { - assert(false) - } - } -} - -function writeStream ({ h2stream, body, client, request, socket, contentLength, header, expectsPayload }) { - assert(contentLength !== 0 || client[kRunning] === 0, 'stream body cannot be pipelined') - - if (client[kHTTPConnVersion] === 'h2') { - // For HTTP/2, is enough to pipe the stream - const pipe = pipeline( - body, - h2stream, - (err) => { - if (err) { - util.destroy(body, err) - util.destroy(h2stream, err) - } else { - request.onRequestSent() - } - } - ) - - pipe.on('data', onPipeData) - pipe.once('end', () => { - pipe.removeListener('data', onPipeData) - util.destroy(pipe) - }) - - function onPipeData (chunk) { - request.onBodySent(chunk) - } - - return - } - - 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 () { - if (finished) { - return - } - const err = new RequestAbortedError() - queueMicrotask(() => onFinished(err)) - } - 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 ({ h2stream, body, client, request, socket, contentLength, header, expectsPayload }) { - assert(contentLength === body.size, 'blob body must have content length') - - const isH2 = client[kHTTPConnVersion] === 'h2' - try { - if (contentLength != null && contentLength !== body.size) { - throw new RequestContentLengthMismatchError() - } - - const buffer = Buffer.from(await body.arrayBuffer()) - - if (isH2) { - h2stream.cork() - h2stream.write(buffer) - h2stream.uncork() - } else { - 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(isH2 ? h2stream : socket, err) - } -} - -async function writeIterable ({ h2stream, 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 - } - }) - - if (client[kHTTPConnVersion] === 'h2') { - h2stream - .on('close', onDrain) - .on('drain', onDrain) - - 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] - } - - const res = h2stream.write(chunk) - request.onBodySent(chunk) - if (!res) { - await waitForDrain() - } - } - } catch (err) { - h2stream.destroy(err) - } finally { - request.onRequestSent() - h2stream.end() - h2stream - .off('close', onDrain) - .off('drain', onDrain) - } - - return - } - - 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 deleted file mode 100644 index 8cb99e2..0000000 --- a/node_modules/undici/lib/compat/dispatcher-weakref.js +++ /dev/null @@ -1,48 +0,0 @@ -'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) { - if (dispatcher.on) { - dispatcher.on('disconnect', () => { - if (dispatcher[kConnected] === 0 && dispatcher[kSize] === 0) { - this.finalizer(key) - } - }) - } - } -} - -module.exports = function () { - // FIXME: remove workaround when the Node bug is fixed - // https://github.com/nodejs/node/issues/49344#issuecomment-1741776308 - if (process.env.NODE_V8_COVERAGE) { - return { - WeakRef: CompatWeakRef, - FinalizationRegistry: CompatFinalizer - } - } - 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 deleted file mode 100644 index 85f1fec..0000000 --- a/node_modules/undici/lib/cookies/constants.js +++ /dev/null @@ -1,12 +0,0 @@ -'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 deleted file mode 100644 index c9c1f28..0000000 --- a/node_modules/undici/lib/cookies/index.js +++ /dev/null @@ -1,184 +0,0 @@ -'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 deleted file mode 100644 index aae2750..0000000 --- a/node_modules/undici/lib/cookies/parse.js +++ /dev/null @@ -1,317 +0,0 @@ -'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 deleted file mode 100644 index 2290329..0000000 --- a/node_modules/undici/lib/cookies/util.js +++ /dev/null @@ -1,291 +0,0 @@ -'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 index 3309117..8cd8abc 100644 --- a/node_modules/undici/lib/core/connect.js +++ b/node_modules/undici/lib/core/connect.js @@ -1,9 +1,12 @@ 'use strict' -const net = require('net') -const assert = require('assert') +const net = require('node:net') +const assert = require('node:assert') const util = require('./util') const { InvalidArgumentError, ConnectTimeoutError } = require('./errors') +const timers = require('../util/timers') + +function noop () {} let tls // include tls conditionally since it is not always available @@ -15,7 +18,7 @@ let tls // include tls conditionally since it is not always available let SessionCache // FIXME: remove workaround when the Node bug is fixed // https://github.com/nodejs/node/issues/49344#issuecomment-1741776308 -if (global.FinalizationRegistry && !process.env.NODE_V8_COVERAGE) { +if (global.FinalizationRegistry && !(process.env.NODE_V8_COVERAGE || process.env.UNDICI_NO_FG)) { SessionCache = class WeakSessionCache { constructor (maxCachedSessions) { this._maxCachedSessions = maxCachedSessions @@ -73,7 +76,7 @@ if (global.FinalizationRegistry && !process.env.NODE_V8_COVERAGE) { } } -function buildConnector ({ allowH2, maxCachedSessions, socketPath, timeout, ...opts }) { +function buildConnector ({ allowH2, maxCachedSessions, socketPath, timeout, session: customSession, ...opts }) { if (maxCachedSessions != null && (!Number.isInteger(maxCachedSessions) || maxCachedSessions < 0)) { throw new InvalidArgumentError('maxCachedSessions must be a positive integer or zero') } @@ -86,15 +89,17 @@ function buildConnector ({ allowH2, maxCachedSessions, socketPath, timeout, ...o let socket if (protocol === 'https:') { if (!tls) { - tls = require('tls') + tls = require('node:tls') } servername = servername || options.servername || util.getServerName(host) || null const sessionKey = servername || hostname - const session = sessionCache.get(sessionKey) || null - assert(sessionKey) + const session = customSession || sessionCache.get(sessionKey) || null + + port = port || 443 + socket = tls.connect({ highWaterMark: 16384, // TLS in node can't have bigger HWM anyway... ...options, @@ -104,7 +109,7 @@ function buildConnector ({ allowH2, maxCachedSessions, socketPath, timeout, ...o // TODO(HTTP/2): Add support for h2c ALPNProtocols: allowH2 ? ['http/1.1', 'h2'] : ['http/1.1'], socket: httpSocket, // upgrade socket connection - port: port || 443, + port, host: hostname }) @@ -115,11 +120,14 @@ function buildConnector ({ allowH2, maxCachedSessions, socketPath, timeout, ...o }) } else { assert(!httpSocket, 'httpSocket can only be sent on TLS update') + + port = port || 80 + socket = net.connect({ highWaterMark: 64 * 1024, // Same as nodejs fs streams. ...options, localAddress, - port: port || 80, + port, host: hostname }) } @@ -130,12 +138,12 @@ function buildConnector ({ allowH2, maxCachedSessions, socketPath, timeout, ...o socket.setKeepAlive(true, keepAliveInitialDelay) } - const cancelTimeout = setupTimeout(() => onConnectTimeout(socket), timeout) + const clearConnectTimeout = setupConnectTimeout(new WeakRef(socket), { timeout, hostname, port }) socket .setNoDelay(true) .once(protocol === 'https:' ? 'secureConnect' : 'connect', function () { - cancelTimeout() + queueMicrotask(clearConnectTimeout) if (callback) { const cb = callback @@ -144,7 +152,7 @@ function buildConnector ({ allowH2, maxCachedSessions, socketPath, timeout, ...o } }) .on('error', function (err) { - cancelTimeout() + queueMicrotask(clearConnectTimeout) if (callback) { const cb = callback @@ -157,33 +165,76 @@ function buildConnector ({ allowH2, maxCachedSessions, socketPath, timeout, ...o } } -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() +/** + * @param {WeakRef<net.Socket>} socketWeakRef + * @param {object} opts + * @param {number} opts.timeout + * @param {string} opts.hostname + * @param {number} opts.port + * @returns {() => void} + */ +const setupConnectTimeout = process.platform === 'win32' + ? (socketWeakRef, opts) => { + if (!opts.timeout) { + return noop } - }) - }, timeout) - return () => { - clearTimeout(timeoutId) - clearImmediate(s1) - clearImmediate(s2) - } -} -function onConnectTimeout (socket) { - util.destroy(socket, new ConnectTimeoutError()) + let s1 = null + let s2 = null + const fastTimer = timers.setFastTimeout(() => { + // setImmediate is added to make sure that we prioritize socket error events over timeouts + s1 = setImmediate(() => { + // Windows needs an extra setImmediate probably due to implementation differences in the socket logic + s2 = setImmediate(() => onConnectTimeout(socketWeakRef.deref(), opts)) + }) + }, opts.timeout) + return () => { + timers.clearFastTimeout(fastTimer) + clearImmediate(s1) + clearImmediate(s2) + } + } + : (socketWeakRef, opts) => { + if (!opts.timeout) { + return noop + } + + let s1 = null + const fastTimer = timers.setFastTimeout(() => { + // setImmediate is added to make sure that we prioritize socket error events over timeouts + s1 = setImmediate(() => { + onConnectTimeout(socketWeakRef.deref(), opts) + }) + }, opts.timeout) + return () => { + timers.clearFastTimeout(fastTimer) + clearImmediate(s1) + } + } + +/** + * @param {net.Socket} socket + * @param {object} opts + * @param {number} opts.timeout + * @param {string} opts.hostname + * @param {number} opts.port + */ +function onConnectTimeout (socket, opts) { + // The socket could be already garbage collected + if (socket == null) { + return + } + + let message = 'Connect Timeout Error' + if (Array.isArray(socket.autoSelectFamilyAttemptedAddresses)) { + message += ` (attempted addresses: ${socket.autoSelectFamilyAttemptedAddresses.join(', ')},` + } else { + message += ` (attempted address: ${opts.hostname}:${opts.port},` + } + + message += ` timeout: ${opts.timeout}ms)` + + util.destroy(socket, new ConnectTimeoutError(message)) } module.exports = buildConnector diff --git a/node_modules/undici/lib/core/constants.js b/node_modules/undici/lib/core/constants.js index 6ec770d..088cf47 100644 --- a/node_modules/undici/lib/core/constants.js +++ b/node_modules/undici/lib/core/constants.js @@ -1,10 +1,9 @@ 'use strict' -/** @type {Record<string, string | undefined>} */ -const headerNameLowerCasedRecord = {} - -// https://developer.mozilla.org/docs/Web/HTTP/Headers -const wellknownHeaderNames = [ +/** + * @see https://developer.mozilla.org/docs/Web/HTTP/Headers + */ +const wellknownHeaderNames = /** @type {const} */ ([ 'Accept', 'Accept-Encoding', 'Accept-Language', @@ -100,7 +99,35 @@ const wellknownHeaderNames = [ 'X-Powered-By', 'X-Requested-With', 'X-XSS-Protection' -] +]) + +/** @type {Record<typeof wellknownHeaderNames[number]|Lowercase<typeof wellknownHeaderNames[number]>, string>} */ +const headerNameLowerCasedRecord = {} + +// Note: object prototypes should not be able to be referenced. e.g. `Object#hasOwnProperty`. +Object.setPrototypeOf(headerNameLowerCasedRecord, null) + +/** + * @type {Record<Lowercase<typeof wellknownHeaderNames[number]>, Buffer>} + */ +const wellknownHeaderNameBuffers = {} + +// Note: object prototypes should not be able to be referenced. e.g. `Object#hasOwnProperty`. +Object.setPrototypeOf(wellknownHeaderNameBuffers, null) + +/** + * @param {string} header Lowercased header + * @returns {Buffer} + */ +function getHeaderNameAsBuffer (header) { + let buffer = wellknownHeaderNameBuffers[header] + + if (buffer === undefined) { + buffer = Buffer.from(header) + } + + return buffer +} for (let i = 0; i < wellknownHeaderNames.length; ++i) { const key = wellknownHeaderNames[i] @@ -109,10 +136,8 @@ for (let i = 0; i < wellknownHeaderNames.length; ++i) { lowerCasedKey } -// Note: object prototypes should not be able to be referenced. e.g. `Object#hasOwnProperty`. -Object.setPrototypeOf(headerNameLowerCasedRecord, null) - module.exports = { wellknownHeaderNames, - headerNameLowerCasedRecord + headerNameLowerCasedRecord, + getHeaderNameAsBuffer } diff --git a/node_modules/undici/lib/core/diagnostics.js b/node_modules/undici/lib/core/diagnostics.js new file mode 100644 index 0000000..44c168e --- /dev/null +++ b/node_modules/undici/lib/core/diagnostics.js @@ -0,0 +1,196 @@ +'use strict' + +const diagnosticsChannel = require('node:diagnostics_channel') +const util = require('node:util') + +const undiciDebugLog = util.debuglog('undici') +const fetchDebuglog = util.debuglog('fetch') +const websocketDebuglog = util.debuglog('websocket') + +const channels = { + // Client + beforeConnect: diagnosticsChannel.channel('undici:client:beforeConnect'), + connected: diagnosticsChannel.channel('undici:client:connected'), + connectError: diagnosticsChannel.channel('undici:client:connectError'), + sendHeaders: diagnosticsChannel.channel('undici:client:sendHeaders'), + // Request + create: diagnosticsChannel.channel('undici:request:create'), + bodySent: diagnosticsChannel.channel('undici:request:bodySent'), + headers: diagnosticsChannel.channel('undici:request:headers'), + trailers: diagnosticsChannel.channel('undici:request:trailers'), + error: diagnosticsChannel.channel('undici:request:error'), + // WebSocket + open: diagnosticsChannel.channel('undici:websocket:open'), + close: diagnosticsChannel.channel('undici:websocket:close'), + socketError: diagnosticsChannel.channel('undici:websocket:socket_error'), + ping: diagnosticsChannel.channel('undici:websocket:ping'), + pong: diagnosticsChannel.channel('undici:websocket:pong') +} + +let isTrackingClientEvents = false + +function trackClientEvents (debugLog = undiciDebugLog) { + if (isTrackingClientEvents) { + return + } + + isTrackingClientEvents = true + + diagnosticsChannel.subscribe('undici:client:beforeConnect', + evt => { + const { + connectParams: { version, protocol, port, host } + } = evt + debugLog( + 'connecting to %s%s using %s%s', + host, + port ? `:${port}` : '', + protocol, + version + ) + }) + + diagnosticsChannel.subscribe('undici:client:connected', + evt => { + const { + connectParams: { version, protocol, port, host } + } = evt + debugLog( + 'connected to %s%s using %s%s', + host, + port ? `:${port}` : '', + protocol, + version + ) + }) + + diagnosticsChannel.subscribe('undici:client:connectError', + evt => { + const { + connectParams: { version, protocol, port, host }, + error + } = evt + debugLog( + 'connection to %s%s using %s%s errored - %s', + host, + port ? `:${port}` : '', + protocol, + version, + error.message + ) + }) + + diagnosticsChannel.subscribe('undici:client:sendHeaders', + evt => { + const { + request: { method, path, origin } + } = evt + debugLog('sending request to %s %s/%s', method, origin, path) + }) +} + +let isTrackingRequestEvents = false + +function trackRequestEvents (debugLog = undiciDebugLog) { + if (isTrackingRequestEvents) { + return + } + + isTrackingRequestEvents = true + + diagnosticsChannel.subscribe('undici:request:headers', + evt => { + const { + request: { method, path, origin }, + response: { statusCode } + } = evt + debugLog( + 'received response to %s %s/%s - HTTP %d', + method, + origin, + path, + statusCode + ) + }) + + diagnosticsChannel.subscribe('undici:request:trailers', + evt => { + const { + request: { method, path, origin } + } = evt + debugLog('trailers received from %s %s/%s', method, origin, path) + }) + + diagnosticsChannel.subscribe('undici:request:error', + evt => { + const { + request: { method, path, origin }, + error + } = evt + debugLog( + 'request to %s %s/%s errored - %s', + method, + origin, + path, + error.message + ) + }) +} + +let isTrackingWebSocketEvents = false + +function trackWebSocketEvents (debugLog = websocketDebuglog) { + if (isTrackingWebSocketEvents) { + return + } + + isTrackingWebSocketEvents = true + + diagnosticsChannel.subscribe('undici:websocket:open', + evt => { + const { + address: { address, port } + } = evt + debugLog('connection opened %s%s', address, port ? `:${port}` : '') + }) + + diagnosticsChannel.subscribe('undici:websocket:close', + evt => { + const { websocket, code, reason } = evt + debugLog( + 'closed connection to %s - %s %s', + websocket.url, + code, + reason + ) + }) + + diagnosticsChannel.subscribe('undici:websocket:socket_error', + err => { + debugLog('connection errored - %s', err.message) + }) + + diagnosticsChannel.subscribe('undici:websocket:ping', + evt => { + debugLog('ping received') + }) + + diagnosticsChannel.subscribe('undici:websocket:pong', + evt => { + debugLog('pong received') + }) +} + +if (undiciDebugLog.enabled || fetchDebuglog.enabled) { + trackClientEvents(fetchDebuglog.enabled ? fetchDebuglog : undiciDebugLog) + trackRequestEvents(fetchDebuglog.enabled ? fetchDebuglog : undiciDebugLog) +} + +if (websocketDebuglog.enabled) { + trackClientEvents(undiciDebugLog.enabled ? undiciDebugLog : websocketDebuglog) + trackWebSocketEvents(websocketDebuglog) +} + +module.exports = { + channels +} diff --git a/node_modules/undici/lib/core/errors.js b/node_modules/undici/lib/core/errors.js index 7af704b..b2b3f32 100644 --- a/node_modules/undici/lib/core/errors.js +++ b/node_modules/undici/lib/core/errors.js @@ -1,8 +1,8 @@ 'use strict' class UndiciError extends Error { - constructor (message) { - super(message) + constructor (message, options) { + super(message, options) this.name = 'UndiciError' this.code = 'UND_ERR' } @@ -11,7 +11,6 @@ class UndiciError extends Error { 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' @@ -21,7 +20,6 @@ class ConnectTimeoutError extends UndiciError { 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' @@ -31,7 +29,6 @@ class HeadersTimeoutError extends UndiciError { 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' @@ -41,7 +38,6 @@ class HeadersOverflowError extends UndiciError { 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' @@ -51,7 +47,6 @@ class BodyTimeoutError extends UndiciError { 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' @@ -65,7 +60,6 @@ class ResponseStatusCodeError extends UndiciError { 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' @@ -75,17 +69,23 @@ class InvalidArgumentError extends UndiciError { 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 { +class AbortError extends UndiciError { + constructor (message) { + super(message) + this.name = 'AbortError' + this.message = message || 'The operation was aborted' + } +} + +class RequestAbortedError extends AbortError { constructor (message) { super(message) - Error.captureStackTrace(this, RequestAbortedError) this.name = 'AbortError' this.message = message || 'Request aborted' this.code = 'UND_ERR_ABORTED' @@ -95,7 +95,6 @@ class RequestAbortedError extends UndiciError { 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' @@ -105,7 +104,6 @@ class InformationalError extends UndiciError { 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' @@ -115,7 +113,6 @@ class RequestContentLengthMismatchError extends UndiciError { 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' @@ -125,7 +122,6 @@ class ResponseContentLengthMismatchError extends UndiciError { 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' @@ -135,7 +131,6 @@ class ClientDestroyedError extends UndiciError { 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' @@ -145,7 +140,6 @@ class ClientClosedError extends UndiciError { 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' @@ -156,7 +150,6 @@ class SocketError extends UndiciError { 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' @@ -166,7 +159,6 @@ class NotSupportedError extends UndiciError { 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' @@ -176,7 +168,6 @@ class BalancedPoolMissingUpstreamError extends UndiciError { 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 @@ -186,7 +177,6 @@ class HTTPParserError extends Error { 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' @@ -196,7 +186,6 @@ class ResponseExceededMaxSizeError extends UndiciError { class RequestRetryError extends UndiciError { constructor (message, code, { headers, data }) { super(message) - Error.captureStackTrace(this, RequestRetryError) this.name = 'RequestRetryError' this.message = message || 'Request retry error' this.code = 'UND_ERR_REQ_RETRY' @@ -206,7 +195,30 @@ class RequestRetryError extends UndiciError { } } +class ResponseError extends UndiciError { + constructor (message, code, { headers, body }) { + super(message) + this.name = 'ResponseError' + this.message = message || 'Response error' + this.code = 'UND_ERR_RESPONSE' + this.statusCode = code + this.body = body + this.headers = headers + } +} + +class SecureProxyConnectionError extends UndiciError { + constructor (cause, message, options = {}) { + super(message, { cause, ...options }) + this.name = 'SecureProxyConnectionError' + this.message = message || 'Secure Proxy Connection failed' + this.code = 'UND_ERR_PRX_TLS' + this.cause = cause + } +} + module.exports = { + AbortError, HTTPParserError, UndiciError, HeadersTimeoutError, @@ -226,5 +238,7 @@ module.exports = { ResponseContentLengthMismatchError, BalancedPoolMissingUpstreamError, ResponseExceededMaxSizeError, - RequestRetryError + RequestRetryError, + ResponseError, + SecureProxyConnectionError } diff --git a/node_modules/undici/lib/core/request.js b/node_modules/undici/lib/core/request.js index 3697e6a..a8680b5 100644 --- a/node_modules/undici/lib/core/request.js +++ b/node_modules/undici/lib/core/request.js @@ -4,52 +4,29 @@ const { InvalidArgumentError, NotSupportedError } = require('./errors') -const assert = require('assert') -const { kHTTP2BuildRequest, kHTTP2CopyHeaders, kHTTP1BuildRequest } = require('./symbols') -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]/ +const assert = require('node:assert') +const { + isValidHTTPToken, + isValidHeaderValue, + isStream, + destroy, + isBuffer, + isFormDataLike, + isIterable, + isBlobLike, + serializePathWithQuery, + assertRequestHandler, + getServerName, + normalizedMethodRecords +} = require('./util') +const { channels } = require('./diagnostics.js') +const { headerNameLowerCasedRecord } = require('./constants') // 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, @@ -63,8 +40,9 @@ class Request { headersTimeout, bodyTimeout, reset, - throwOnError, - expectContinue + expectContinue, + servername, + throwOnError }, handler) { if (typeof path !== 'string') { throw new InvalidArgumentError('path must be a string') @@ -74,13 +52,13 @@ class Request { method !== 'CONNECT' ) { throw new InvalidArgumentError('path must be an absolute URL or start with a slash') - } else if (invalidPathRegex.exec(path) !== null) { + } else if (invalidPathRegex.test(path)) { throw new InvalidArgumentError('invalid request path') } if (typeof method !== 'string') { throw new InvalidArgumentError('method must be a string') - } else if (tokenRegExp.exec(method) === null) { + } else if (normalizedMethodRecords[method] === undefined && !isValidHTTPToken(method)) { throw new InvalidArgumentError('invalid request method') } @@ -104,25 +82,27 @@ class Request { throw new InvalidArgumentError('invalid expectContinue') } + if (throwOnError != null) { + throw new InvalidArgumentError('invalid throwOnError') + } + this.headersTimeout = headersTimeout this.bodyTimeout = bodyTimeout - this.throwOnError = throwOnError === true - this.method = method this.abort = null if (body == null) { this.body = null - } else if (util.isStream(body)) { + } else if (isStream(body)) { this.body = body const rState = this.body._readableState if (!rState || !rState.autoDestroy) { this.endHandler = function autoDestroy () { - util.destroy(this) + destroy(this) } this.body.on('end', this.endHandler) } @@ -135,7 +115,7 @@ class Request { } } this.body.on('error', this.errorHandler) - } else if (util.isBuffer(body)) { + } else if (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 @@ -143,19 +123,18 @@ class Request { 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)) { + } else if (isFormDataLike(body) || isIterable(body) || 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.path = query ? serializePathWithQuery(path, query) : path this.origin = origin @@ -163,7 +142,7 @@ class Request { ? method === 'HEAD' || method === 'GET' : idempotent - this.blocking = blocking == null ? false : blocking + this.blocking = blocking ?? this.method !== 'HEAD' this.reset = reset == null ? null : reset @@ -173,7 +152,7 @@ class Request { this.contentType = null - this.headers = '' + this.headers = [] // Only for H2 this.expectContinue = expectContinue != null ? expectContinue : false @@ -186,39 +165,26 @@ class Request { 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]) + if (headers[Symbol.iterator]) { + for (const header of headers) { + if (!Array.isArray(header) || header.length !== 2) { + throw new InvalidArgumentError('headers must be in key-value pair format') + } + processHeader(this, header[0], header[1]) + } + } else { + const keys = Object.keys(headers) + for (let i = 0; i < keys.length; ++i) { + processHeader(this, keys[i], headers[keys[i]]) + } } } 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.') - } + assertRequestHandler(handler, method, upgrade) - 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.servername = servername || getServerName(this.host) || null this[kHandler] = handler @@ -263,6 +229,10 @@ class Request { } } + onResponseStarted () { + return this[kHandler].onResponseStarted?.() + } + onHeaders (statusCode, headers, resume, statusText) { assert(!this.aborted) assert(!this.completed) @@ -301,6 +271,7 @@ class Request { this.onFinally() assert(!this.aborted) + assert(!this.completed) this.completed = true if (channels.trailers.hasSubscribers) { @@ -342,157 +313,84 @@ class Request { } } - // TODO: adjust to support H2 addHeader (key, value) { processHeader(this, key, value) return this } - - static [kHTTP1BuildRequest] (origin, opts, handler) { - // TODO: Migrate header parsing here, to make Requests - // HTTP agnostic - return new Request(origin, opts, handler) - } - - static [kHTTP2BuildRequest] (origin, opts, handler) { - const headers = opts.headers - opts = { ...opts, headers: null } - - const request = new Request(origin, opts, handler) - - request.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(request, headers[i], headers[i + 1], true) - } - } else if (headers && typeof headers === 'object') { - const keys = Object.keys(headers) - for (let i = 0; i < keys.length; i++) { - const key = keys[i] - processHeader(request, key, headers[key], true) - } - } else if (headers != null) { - throw new InvalidArgumentError('headers must be an object or an array') - } - - return request - } - - static [kHTTP2CopyHeaders] (raw) { - const rawHeaders = raw.split('\r\n') - const headers = {} - - for (const header of rawHeaders) { - const [key, value] = header.split(': ') - - if (value == null || value.length === 0) continue - - if (headers[key]) headers[key] += `,${value}` - else headers[key] = value - } - - return headers - } } -function processHeaderValue (key, val, skipAppend) { - 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 skipAppend ? val : `${key}: ${val}\r\n` -} - -function processHeader (request, key, val, skipAppend = false) { +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) { + let headerName = headerNameLowerCasedRecord[key] + + if (headerName === undefined) { + headerName = key.toLowerCase() + if (headerNameLowerCasedRecord[headerName] === undefined && !isValidHTTPToken(headerName)) { + throw new InvalidArgumentError('invalid header key') + } + } + + if (Array.isArray(val)) { + const arr = [] + for (let i = 0; i < val.length; i++) { + if (typeof val[i] === 'string') { + if (!isValidHeaderValue(val[i])) { + throw new InvalidArgumentError(`invalid ${key} header`) + } + arr.push(val[i]) + } else if (val[i] === null) { + arr.push('') + } else if (typeof val[i] === 'object') { + throw new InvalidArgumentError(`invalid ${key} header`) + } else { + arr.push(`${val[i]}`) + } + } + val = arr + } else if (typeof val === 'string') { + if (!isValidHeaderValue(val)) { throw new InvalidArgumentError(`invalid ${key} header`) } + } else if (val === null) { + val = '' + } else { + val = `${val}` + } + + if (request.host === null && headerName === 'host') { + if (typeof val !== 'string') { + throw new InvalidArgumentError('invalid host header') + } // Consumed by Client request.host = val - } else if ( - request.contentLength === null && - key.length === 14 && - key.toLowerCase() === 'content-length' - ) { + } else if (request.contentLength === null && headerName === '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' - ) { + } else if (request.contentType === null && headerName === 'content-type') { request.contentType = val - if (skipAppend) request.headers[key] = processHeaderValue(key, val, skipAppend) - else 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' - ) { + request.headers.push(key, val) + } else if (headerName === 'transfer-encoding' || headerName === 'keep-alive' || headerName === 'upgrade') { + throw new InvalidArgumentError(`invalid ${headerName} header`) + } else if (headerName === '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') { + } + + 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' - ) { + } else if (headerName === '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++) { - if (skipAppend) { - if (request.headers[key]) request.headers[key] += `,${processHeaderValue(key, val[i], skipAppend)}` - else request.headers[key] = processHeaderValue(key, val[i], skipAppend) - } else { - request.headers += processHeaderValue(key, val[i]) - } - } - } else { - if (skipAppend) request.headers[key] = processHeaderValue(key, val, skipAppend) - else request.headers += processHeaderValue(key, val) - } + request.headers.push(key, val) } } diff --git a/node_modules/undici/lib/core/symbols.js b/node_modules/undici/lib/core/symbols.js index 68d8566..f3b563a 100644 --- a/node_modules/undici/lib/core/symbols.js +++ b/node_modules/undici/lib/core/symbols.js @@ -1,3 +1,5 @@ +'use strict' + module.exports = { kClose: Symbol('close'), kDestroy: Symbol('destroy'), @@ -8,7 +10,6 @@ module.exports = { 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'), @@ -21,6 +22,7 @@ module.exports = { kHost: Symbol('host'), kNoRef: Symbol('no ref'), kBodyUsed: Symbol('used'), + kBody: Symbol('abstracted request body'), kRunning: Symbol('running'), kBlocking: Symbol('blocking'), kPending: Symbol('pending'), @@ -33,6 +35,8 @@ module.exports = { kNeedDrain: Symbol('need drain'), kReset: Symbol('reset'), kDestroyed: Symbol.for('nodejs.stream.destroyed'), + kResume: Symbol('resume'), + kOnError: Symbol('on error'), kMaxHeadersSize: Symbol('max headers size'), kRunningIdx: Symbol('running index'), kPendingIdx: Symbol('pending index'), @@ -50,14 +54,15 @@ module.exports = { kMaxRequests: Symbol('maxRequestsPerClient'), kProxy: Symbol('proxy agent options'), kCounter: Symbol('socket request counter'), - kInterceptors: Symbol('dispatch interceptors'), kMaxResponseSize: Symbol('max response size'), kHTTP2Session: Symbol('http2Session'), kHTTP2SessionState: Symbol('http2Session state'), - kHTTP2BuildRequest: Symbol('http2 build request'), - kHTTP1BuildRequest: Symbol('http1 build request'), - kHTTP2CopyHeaders: Symbol('http2 copy headers'), - kHTTPConnVersion: Symbol('http connection version'), kRetryHandlerDefaultRetry: Symbol('retry agent default retry'), - kConstruct: Symbol('constructable') + kConstruct: Symbol('constructable'), + kListeners: Symbol('listeners'), + kHTTPContext: Symbol('http context'), + kMaxConcurrentStreams: Symbol('max concurrent streams'), + kNoProxyAgent: Symbol('no proxy agent'), + kHttpProxyAgent: Symbol('http proxy agent'), + kHttpsProxyAgent: Symbol('https proxy agent') } diff --git a/node_modules/cheerio/node_modules/undici/lib/core/tree.js b/node_modules/undici/lib/core/tree.js similarity index 95% rename from node_modules/cheerio/node_modules/undici/lib/core/tree.js rename to node_modules/undici/lib/core/tree.js index 17dfca4..e7b960c 100644 --- a/node_modules/cheerio/node_modules/undici/lib/core/tree.js +++ b/node_modules/undici/lib/core/tree.js @@ -40,6 +40,7 @@ class TstNode { /** * @param {string} key * @param {any} value + * @returns {void} */ add (key, value) { const length = key.length @@ -47,6 +48,9 @@ class TstNode { throw new TypeError('Unreachable') } let index = 0 + /** + * @type {TstNode} + */ let node = this while (true) { const code = key.charCodeAt(index) @@ -87,6 +91,9 @@ class TstNode { search (key) { const keylength = key.length let index = 0 + /** + * @type {TstNode|null} + */ let node = this while (node !== null && index < keylength) { let code = key[index] @@ -121,6 +128,7 @@ class TernarySearchTree { /** * @param {string} key * @param {any} value + * @returns {void} * */ insert (key, value) { if (this.node === null) { @@ -132,7 +140,7 @@ class TernarySearchTree { /** * @param {Uint8Array} key - * @return {any} + * @returns {any} */ lookup (key) { return this.node?.search(key)?.value ?? null diff --git a/node_modules/undici/lib/core/util.js b/node_modules/undici/lib/core/util.js index 5741650..c7e1f16 100644 --- a/node_modules/undici/lib/core/util.js +++ b/node_modules/undici/lib/core/util.js @@ -1,36 +1,112 @@ 'use strict' -const assert = require('assert') -const { kDestroyed, kBodyUsed } = require('./symbols') -const { IncomingMessage } = require('http') -const stream = require('stream') -const net = require('net') +const assert = require('node:assert') +const { kDestroyed, kBodyUsed, kListeners, kBody } = require('./symbols') +const { IncomingMessage } = require('node:http') +const stream = require('node:stream') +const net = require('node:net') +const { Blob } = require('node:buffer') +const nodeUtil = require('node:util') +const { stringify } = require('node:querystring') +const { EventEmitter: EE } = require('node:events') const { InvalidArgumentError } = require('./errors') -const { Blob } = require('buffer') -const nodeUtil = require('util') -const { stringify } = require('querystring') const { headerNameLowerCasedRecord } = require('./constants') +const { tree } = require('./tree') -const [nodeMajor, nodeMinor] = process.versions.node.split('.').map(v => Number(v)) +const [nodeMajor, nodeMinor] = process.versions.node.split('.', 2).map(v => Number(v)) -function nop () {} +class BodyAsyncIterable { + constructor (body) { + this[kBody] = body + this[kBodyUsed] = false + } + async * [Symbol.asyncIterator] () { + assert(!this[kBodyUsed], 'disturbed') + this[kBodyUsed] = true + yield * this[kBody] + } +} + +/** + * @param {*} body + * @returns {*} + */ +function wrapRequestBody (body) { + if (isStream(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 (bodyLength(body) === 0) { + body + .on('data', function () { + assert(false) + }) + } + + if (typeof body.readableDidRead !== 'boolean') { + body[kBodyUsed] = false + EE.prototype.on.call(body, 'data', function () { + this[kBodyUsed] = true + }) + } + + return body + } else if (body && typeof 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. + return new BodyAsyncIterable(body) + } else if ( + body && + typeof body !== 'string' && + !ArrayBuffer.isView(body) && + isIterable(body) + ) { + // TODO: Should we allow re-using iterable if !this.opts.idempotent + // or through some other flag? + return new BodyAsyncIterable(body) + } else { + return body + } +} + +/** + * @param {*} obj + * @returns {obj is import('node:stream').Stream} + */ 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) +/** + * @param {*} object + * @returns {object is Blob} + * 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]) - ) + if (object === null) { + return false + } else if (object instanceof Blob) { + return true + } else if (typeof object !== 'object') { + return false + } else { + const sTag = object[Symbol.toStringTag] + + return (sTag === 'Blob' || sTag === 'File') && ( + ('stream' in object && typeof object.stream === 'function') || + ('arrayBuffer' in object && typeof object.arrayBuffer === 'function') + ) + } } -function buildURL (url, queryParams) { +/** + * @param {string} url The URL to add the query params to + * @param {import('node:querystring').ParsedUrlQueryInput} queryParams The object to serialize into a URL query string + * @returns {string} The URL with the query params added + */ +function serializePathWithQuery (url, queryParams) { if (url.includes('?') || url.includes('#')) { throw new Error('Query params cannot be passed when url already contains "?" or "#".') } @@ -44,11 +120,54 @@ function buildURL (url, queryParams) { return url } +/** + * @param {number|string|undefined} port + * @returns {boolean} + */ +function isValidPort (port) { + const value = parseInt(port, 10) + return ( + value === Number(port) && + value >= 0 && + value <= 65535 + ) +} + +/** + * Check if the value is a valid http or https prefixed string. + * + * @param {string} value + * @returns {boolean} + */ +function isHttpOrHttpsPrefixed (value) { + return ( + value != null && + value[0] === 'h' && + value[1] === 't' && + value[2] === 't' && + value[3] === 'p' && + ( + value[4] === ':' || + ( + value[4] === 's' && + value[5] === ':' + ) + ) + ) +} + +/** + * @param {string|URL|Record<string,string>} url + * @returns {URL} + */ function parseURL (url) { if (typeof url === 'string') { + /** + * @type {URL} + */ url = new URL(url) - if (!/^https?:/.test(url.origin || url.protocol)) { + if (!isHttpOrHttpsPrefixed(url.origin || url.protocol)) { throw new InvalidArgumentError('Invalid URL protocol: the URL must start with `http:` or `https:`.') } @@ -59,12 +178,8 @@ function parseURL (url) { throw new InvalidArgumentError('Invalid URL: The URL argument must be a non-null object.') } - 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)) { - if (url.port != null && url.port !== '' && !Number.isFinite(parseInt(url.port))) { + if (url.port != null && url.port !== '' && isValidPort(url.port) === false) { throw new InvalidArgumentError('Invalid URL: port must be a valid integer or a string representation of an integer.') } @@ -84,33 +199,45 @@ function parseURL (url) { throw new InvalidArgumentError('Invalid URL origin: the origin must be a string or null/undefined.') } + if (!isHttpOrHttpsPrefixed(url.origin || url.protocol)) { + throw new InvalidArgumentError('Invalid URL protocol: the URL must start with `http:` or `https:`.') + } + const port = url.port != null ? url.port : (url.protocol === 'https:' ? 443 : 80) let origin = url.origin != null ? url.origin - : `${url.protocol}//${url.hostname}:${port}` + : `${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 (origin[origin.length - 1] === '/') { + origin = origin.slice(0, origin.length - 1) } - if (path && !path.startsWith('/')) { + if (path && path[0] !== '/') { 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 new URL(`${origin}${path}`) + } + + if (!isHttpOrHttpsPrefixed(url.origin || url.protocol)) { + throw new InvalidArgumentError('Invalid URL protocol: the URL must start with `http:` or `https:`.') } return url } +/** + * @param {string|URL|Record<string, string>} url + * @returns {URL} + */ function parseOrigin (url) { url = parseURL(url) @@ -121,6 +248,10 @@ function parseOrigin (url) { return url } +/** + * @param {string} host + * @returns {string} + */ function getHostname (host) { if (host[0] === '[') { const idx = host.indexOf(']') @@ -135,14 +266,18 @@ function getHostname (host) { return host.substring(0, idx) } -// IP addresses are not valid server names per RFC6066 -// > Currently, the only server names supported are DNS hostnames +/** + * IP addresses are not valid server names per RFC6066 + * Currently, the only server names supported are DNS hostnames + * @param {string|null} host + * @returns {string|null} + */ function getServerName (host) { if (!host) { return null } - assert.strictEqual(typeof host, 'string') + assert(typeof host === 'string') const servername = getHostname(host) if (net.isIP(servername)) { @@ -152,18 +287,36 @@ function getServerName (host) { return servername } +/** + * @function + * @template T + * @param {T} obj + * @returns {T} + */ function deepClone (obj) { return JSON.parse(JSON.stringify(obj)) } +/** + * @param {*} obj + * @returns {obj is AsyncIterable} + */ function isAsyncIterable (obj) { return !!(obj != null && typeof obj[Symbol.asyncIterator] === 'function') } +/** + * @param {*} obj + * @returns {obj is Iterable} + */ function isIterable (obj) { return !!(obj != null && (typeof obj[Symbol.iterator] === 'function' || typeof obj[Symbol.asyncIterator] === 'function')) } +/** + * @param {Blob|Buffer|import ('stream').Stream} body + * @returns {number|null} + */ function bodyLength (body) { if (body == null) { return 0 @@ -181,15 +334,19 @@ function bodyLength (body) { 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 +/** + * @param {import ('stream').Stream} body + * @returns {boolean} + */ +function isDestroyed (body) { + return body && !!(body.destroyed || body[kDestroyed] || (stream.isDestroyed?.(body))) } +/** + * @param {import ('stream').Stream} stream + * @param {Error} [err] + * @returns {void} + */ function destroy (stream, err) { if (stream == null || !isStream(stream) || isDestroyed(stream)) { return @@ -203,9 +360,9 @@ function destroy (stream, err) { stream.destroy(err) } else if (err) { - process.nextTick((stream, err) => { + queueMicrotask(() => { stream.emit('error', err) - }, stream, err) + }) } if (stream.destroyed !== true) { @@ -214,8 +371,12 @@ function destroy (stream, err) { } const KEEPALIVE_TIMEOUT_EXPR = /timeout=(\d+)/ +/** + * @param {string} val + * @returns {number | null} + */ function parseKeepAliveTimeout (val) { - const m = val.toString().match(KEEPALIVE_TIMEOUT_EXPR) + const m = val.match(KEEPALIVE_TIMEOUT_EXPR) return m ? parseInt(m[1], 10) * 1000 : null } @@ -225,29 +386,45 @@ function parseKeepAliveTimeout (val) { * @returns {string} */ function headerNameToString (value) { - return headerNameLowerCasedRecord[value] || value.toLowerCase() + return typeof value === 'string' + ? headerNameLowerCasedRecord[value] ?? value.toLowerCase() + : tree.lookup(value) ?? value.toString('latin1').toLowerCase() } -function parseHeaders (headers, obj = {}) { - // For H2 support - if (!Array.isArray(headers)) return headers +/** + * Receive the buffer as a string and return its lowercase value. + * @param {Buffer} value Header name + * @returns {string} + */ +function bufferToLowerCasedHeaderName (value) { + return tree.lookup(value) ?? value.toString('latin1').toLowerCase() +} + +/** + * @param {(Buffer | string)[]} headers + * @param {Record<string, string | string[]>} [obj] + * @returns {Record<string, string | string[]>} + */ +function parseHeaders (headers, obj) { + if (obj === undefined) obj = {} for (let i = 0; i < headers.length; i += 2) { - const key = headers[i].toString().toLowerCase() + const key = headerNameToString(headers[i]) let val = obj[key] - if (!val) { - if (Array.isArray(headers[i + 1])) { - obj[key] = headers[i + 1].map(x => x.toString('utf8')) - } else { - obj[key] = headers[i + 1].toString('utf8') - } - } else { - if (!Array.isArray(val)) { + if (val) { + if (typeof val === 'string') { val = [val] obj[key] = val } val.push(headers[i + 1].toString('utf8')) + } else { + const headersValue = headers[i + 1] + if (typeof headersValue === 'string') { + obj[key] = headersValue + } else { + obj[key] = Array.isArray(headersValue) ? headersValue.map(x => x.toString('utf8')) : headersValue.toString('utf8') + } } } @@ -259,23 +436,38 @@ function parseHeaders (headers, obj = {}) { return obj } +/** + * @param {Buffer[]} headers + * @returns {string[]} + */ function parseRawHeaders (headers) { - const ret = [] + const headersLength = headers.length + /** + * @type {string[]} + */ + const ret = new Array(headersLength) + let hasContentLength = false let contentDispositionIdx = -1 + let key + let val + let kLen = 0 - for (let n = 0; n < headers.length; n += 2) { - const key = headers[n + 0].toString() - const val = headers[n + 1].toString('utf8') + for (let n = 0; n < headersLength; n += 2) { + key = headers[n] + val = headers[n + 1] - if (key.length === 14 && (key === 'content-length' || key.toLowerCase() === 'content-length')) { - ret.push(key, val) + typeof key !== 'string' && (key = key.toString()) + typeof val !== 'string' && (val = val.toString('utf8')) + + kLen = key.length + if (kLen === 14 && key[7] === '-' && (key === 'content-length' || key.toLowerCase() === 'content-length')) { 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) + } else if (kLen === 19 && key[7] === '-' && (key === 'content-disposition' || key.toLowerCase() === 'content-disposition')) { + contentDispositionIdx = n + 1 } + ret[n] = key + ret[n + 1] = val } // See https://github.com/nodejs/node/pull/46528 @@ -286,16 +478,44 @@ function parseRawHeaders (headers) { return ret } +/** + * @param {string[]} headers + * @param {Buffer[]} headers + */ +function encodeRawHeaders (headers) { + if (!Array.isArray(headers)) { + throw new TypeError('expected headers to be an array') + } + return headers.map(x => Buffer.from(x)) +} + +/** + * @param {*} buffer + * @returns {buffer is Buffer} + */ function isBuffer (buffer) { // See, https://github.com/mcollina/undici/pull/319 return buffer instanceof Uint8Array || Buffer.isBuffer(buffer) } -function validateHandler (handler, method, upgrade) { +/** + * Asserts that the handler object is a request handler. + * + * @param {object} handler + * @param {string} method + * @param {string} [upgrade] + * @returns {asserts handler is import('../api/api-request').RequestHandler} + */ +function assertRequestHandler (handler, method, upgrade) { if (!handler || typeof handler !== 'object') { throw new InvalidArgumentError('handler must be an object') } + if (typeof handler.onRequestStart === 'function') { + // TODO (fix): More checks... + return + } + if (typeof handler.onConnect !== 'function') { throw new InvalidArgumentError('invalid onConnect method') } @@ -327,35 +547,33 @@ function validateHandler (handler, method, upgrade) { } } -// A body is disturbed if it has been read from and it cannot -// be re-used without losing state or data. +/** + * A body is disturbed if it has been read from and it cannot be re-used without + * losing state or data. + * @param {import('node:stream').Readable} body + * @returns {boolean} + */ 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) - )) + // TODO (fix): Why is body[kBodyUsed] needed? + return !!(body && (stream.isDisturbed(body) || body[kBodyUsed])) } -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) - ))) -} +/** + * @typedef {object} SocketInfo + * @property {string} [localAddress] + * @property {number} [localPort] + * @property {string} [remoteAddress] + * @property {number} [remotePort] + * @property {string} [remoteFamily] + * @property {number} [timeout] + * @property {number} bytesWritten + * @property {number} bytesRead + */ +/** + * @param {import('net').Socket} socket + * @returns {SocketInfo} + */ function getSocketInfo (socket) { return { localAddress: socket.localAddress, @@ -369,21 +587,12 @@ function getSocketInfo (socket) { } } -async function * convertIterableToBuffer (iterable) { - for await (const chunk of iterable) { - yield Buffer.isBuffer(chunk) ? chunk : Buffer.from(chunk) - } -} - -let ReadableStream +/** + * @param {Iterable} iterable + * @returns {ReadableStream} + */ function ReadableStreamFrom (iterable) { - if (!ReadableStream) { - ReadableStream = require('stream/web').ReadableStream - } - - if (ReadableStream.from) { - return ReadableStream.from(convertIterableToBuffer(iterable)) - } + // We cannot use ReadableStream.from here because it does not return a byte stream. let iterator return new ReadableStream( @@ -391,28 +600,40 @@ function ReadableStreamFrom (iterable) { 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)) + pull (controller) { + async function pull () { + const { done, value } = await iterator.next() + if (done) { + queueMicrotask(() => { + controller.close() + controller.byobRequest?.respond(0) + }) + } else { + const buf = Buffer.isBuffer(value) ? value : Buffer.from(value) + if (buf.byteLength) { + controller.enqueue(new Uint8Array(buf)) + } else { + return await pull() + } + } } - return controller.desiredSize > 0 + + return pull() }, - async cancel (reason) { + async cancel () { await iterator.return() - } - }, - 0 + }, + type: 'bytes' + } ) } -// The chunk should be a FormData instance and contains -// all the required methods. +/** + * The object should be a FormData instance and contains all the required + * methods. + * @param {*} object + * @returns {object is FormData} + */ function isFormDataLike (object) { return ( object && @@ -427,50 +648,143 @@ function isFormDataLike (object) { ) } -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 - } - } -} - function addAbortListener (signal, listener) { if ('addEventListener' in signal) { signal.addEventListener('abort', listener, { once: true }) return () => signal.removeEventListener('abort', listener) } - signal.addListener('abort', listener) + signal.once('abort', listener) return () => signal.removeListener('abort', listener) } -const hasToWellFormed = !!String.prototype.toWellFormed +/** + * @function + * @param {string} value + * @returns {string} + */ +const toUSVString = (() => { + if (typeof String.prototype.toWellFormed === 'function') { + /** + * @param {string} value + * @returns {string} + */ + return (value) => `${value}`.toWellFormed() + } else { + /** + * @param {string} value + * @returns {string} + */ + return nodeUtil.toUSVString + } +})() /** - * @param {string} val + * @param {*} value + * @returns {boolean} */ -function toUSVString (val) { - if (hasToWellFormed) { - return `${val}`.toWellFormed() - } else if (nodeUtil.toUSVString) { - return nodeUtil.toUSVString(val) +// TODO: move this to webidl +const isUSVString = (() => { + if (typeof String.prototype.isWellFormed === 'function') { + /** + * @param {*} value + * @returns {boolean} + */ + return (value) => `${value}`.isWellFormed() + } else { + /** + * @param {*} value + * @returns {boolean} + */ + return (value) => toUSVString(value) === `${value}` } +})() - return `${val}` +/** + * @see https://tools.ietf.org/html/rfc7230#section-3.2.6 + * @param {number} c + * @returns {boolean} + */ +function isTokenCharCode (c) { + switch (c) { + case 0x22: + case 0x28: + case 0x29: + case 0x2c: + case 0x2f: + case 0x3a: + case 0x3b: + case 0x3c: + case 0x3d: + case 0x3e: + case 0x3f: + case 0x40: + case 0x5b: + case 0x5c: + case 0x5d: + case 0x7b: + case 0x7d: + // DQUOTE and "(),/:;<=>?@[\]{}" + return false + default: + // VCHAR %x21-7E + return c >= 0x21 && c <= 0x7e + } } -// Parsed accordingly to RFC 9110 -// https://www.rfc-editor.org/rfc/rfc9110#field.content-range +/** + * @param {string} characters + * @returns {boolean} + */ +function isValidHTTPToken (characters) { + if (characters.length === 0) { + return false + } + for (let i = 0; i < characters.length; ++i) { + if (!isTokenCharCode(characters.charCodeAt(i))) { + return false + } + } + return true +} + +// headerCharRegex have been lifted from +// https://github.com/nodejs/node/blob/main/lib/_http_common.js + +/** + * 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]/ + +/** + * @param {string} characters + * @returns {boolean} + */ +function isValidHeaderValue (characters) { + return !headerCharRegex.test(characters) +} + +const rangeHeaderRegex = /^bytes (\d+)-(\d+)\/(\d+)?$/ + +/** + * @typedef {object} RangeHeader + * @property {number} start + * @property {number | null} end + * @property {number | null} size + */ + +/** + * Parse accordingly to RFC 9110 + * @see https://www.rfc-editor.org/rfc/rfc9110#field.content-range + * @param {string} [range] + * @returns {RangeHeader|null} + */ function parseRangeHeader (range) { if (range == null || range === '') return { start: 0, end: null, size: null } - const m = range ? range.match(/^bytes (\d+)-(\d+)\/(\d+)?$/) : null + const m = range ? range.match(rangeHeaderRegex) : null return m ? { start: parseInt(m[1]), @@ -480,17 +794,82 @@ function parseRangeHeader (range) { : null } +/** + * @template {import("events").EventEmitter} T + * @param {T} obj + * @param {string} name + * @param {(...args: any[]) => void} listener + * @returns {T} + */ +function addListener (obj, name, listener) { + const listeners = (obj[kListeners] ??= []) + listeners.push([name, listener]) + obj.on(name, listener) + return obj +} + +/** + * @template {import("events").EventEmitter} T + * @param {T} obj + * @returns {T} + */ +function removeAllListeners (obj) { + if (obj[kListeners] != null) { + for (const [name, listener] of obj[kListeners]) { + obj.removeListener(name, listener) + } + obj[kListeners] = null + } + return obj +} + +/** + * @param {import ('../dispatcher/client')} client + * @param {import ('../core/request')} request + * @param {Error} err + */ +function errorRequest (client, request, err) { + try { + request.onError(err) + assert(request.aborted) + } catch (err) { + client.emit('error', err) + } +} + const kEnumerableProperty = Object.create(null) kEnumerableProperty.enumerable = true +const normalizedMethodRecordsBase = { + delete: 'DELETE', + DELETE: 'DELETE', + get: 'GET', + GET: 'GET', + head: 'HEAD', + HEAD: 'HEAD', + options: 'OPTIONS', + OPTIONS: 'OPTIONS', + post: 'POST', + POST: 'POST', + put: 'PUT', + PUT: 'PUT' +} + +const normalizedMethodRecords = { + ...normalizedMethodRecordsBase, + patch: 'patch', + PATCH: 'PATCH' +} + +// Note: object prototypes should not be able to be referenced. e.g. `Object#hasOwnProperty`. +Object.setPrototypeOf(normalizedMethodRecordsBase, null) +Object.setPrototypeOf(normalizedMethodRecords, null) + module.exports = { kEnumerableProperty, - nop, isDisturbed, - isErrored, - isReadable, toUSVString, - isReadableAborted, + isUSVString, isBlobLike, parseOrigin, parseURL, @@ -500,7 +879,12 @@ module.exports = { isAsyncIterable, isDestroyed, headerNameToString, + bufferToLowerCasedHeaderName, + addListener, + removeAllListeners, + errorRequest, parseRawHeaders, + encodeRawHeaders, parseHeaders, parseKeepAliveTimeout, destroy, @@ -508,15 +892,21 @@ module.exports = { deepClone, ReadableStreamFrom, isBuffer, - validateHandler, + assertRequestHandler, getSocketInfo, isFormDataLike, - buildURL, - throwIfAborted, + serializePathWithQuery, addAbortListener, + isValidHTTPToken, + isValidHeaderValue, + isTokenCharCode, parseRangeHeader, + normalizedMethodRecordsBase, + normalizedMethodRecords, + isValidPort, + isHttpOrHttpsPrefixed, nodeMajor, nodeMinor, - nodeHasAutoSelectFamily: nodeMajor > 18 || (nodeMajor === 18 && nodeMinor >= 13), - safeHTTPMethods: ['GET', 'HEAD', 'OPTIONS', 'TRACE'] + safeHTTPMethods: Object.freeze(['GET', 'HEAD', 'OPTIONS', 'TRACE']), + wrapRequestBody } diff --git a/node_modules/undici/lib/dispatcher-base.js b/node_modules/undici/lib/dispatcher-base.js deleted file mode 100644 index 5c0220b..0000000 --- a/node_modules/undici/lib/dispatcher-base.js +++ /dev/null @@ -1,192 +0,0 @@ -'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 deleted file mode 100644 index 9b809d8..0000000 --- a/node_modules/undici/lib/dispatcher.js +++ /dev/null @@ -1,19 +0,0 @@ -'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/cheerio/node_modules/undici/lib/dispatcher/agent.js b/node_modules/undici/lib/dispatcher/agent.js similarity index 79% rename from node_modules/cheerio/node_modules/undici/lib/dispatcher/agent.js rename to node_modules/undici/lib/dispatcher/agent.js index 98f1486..46fc157 100644 --- a/node_modules/cheerio/node_modules/undici/lib/dispatcher/agent.js +++ b/node_modules/undici/lib/dispatcher/agent.js @@ -1,17 +1,15 @@ 'use strict' const { InvalidArgumentError } = require('../core/errors') -const { kClients, kRunning, kClose, kDestroy, kDispatch, kInterceptors } = require('../core/symbols') +const { kClients, kRunning, kClose, kDestroy, kDispatch } = 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/redirect-interceptor') 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 kOptions = Symbol('options') @@ -23,9 +21,7 @@ function defaultFactory (origin, opts) { } class Agent extends DispatcherBase { - constructor ({ factory = defaultFactory, maxRedirections = 0, connect, ...options } = {}) { - super() - + constructor ({ factory = defaultFactory, connect, ...options } = {}) { if (typeof factory !== 'function') { throw new InvalidArgumentError('factory must be a function.') } @@ -34,23 +30,13 @@ class Agent extends DispatcherBase { 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') - } + super() if (connect && typeof connect !== 'function') { connect = { ...connect } } - this[kInterceptors] = 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() diff --git a/node_modules/cheerio/node_modules/undici/lib/dispatcher/balanced-pool.js b/node_modules/undici/lib/dispatcher/balanced-pool.js similarity index 96% rename from node_modules/cheerio/node_modules/undici/lib/dispatcher/balanced-pool.js rename to node_modules/undici/lib/dispatcher/balanced-pool.js index 1e2de28..5bbec0e 100644 --- a/node_modules/cheerio/node_modules/undici/lib/dispatcher/balanced-pool.js +++ b/node_modules/undici/lib/dispatcher/balanced-pool.js @@ -13,7 +13,7 @@ const { kGetDispatcher } = require('./pool-base') const Pool = require('./pool') -const { kUrl, kInterceptors } = require('../core/symbols') +const { kUrl } = require('../core/symbols') const { parseOrigin } = require('../core/util') const kFactory = Symbol('factory') @@ -50,6 +50,10 @@ function defaultFactory (origin, opts) { class BalancedPool extends PoolBase { constructor (upstreams = [], { factory = defaultFactory, ...opts } = {}) { + if (typeof factory !== 'function') { + throw new InvalidArgumentError('factory must be a function.') + } + super() this[kOptions] = opts @@ -63,13 +67,6 @@ class BalancedPool extends PoolBase { upstreams = [upstreams] } - if (typeof factory !== 'function') { - throw new InvalidArgumentError('factory must be a function.') - } - - this[kInterceptors] = opts.interceptors?.BalancedPool && Array.isArray(opts.interceptors.BalancedPool) - ? opts.interceptors.BalancedPool - : [] this[kFactory] = factory for (const upstream of upstreams) { diff --git a/node_modules/cheerio/node_modules/undici/lib/dispatcher/client-h1.js b/node_modules/undici/lib/dispatcher/client-h1.js similarity index 78% rename from node_modules/cheerio/node_modules/undici/lib/dispatcher/client-h1.js rename to node_modules/undici/lib/dispatcher/client-h1.js index 2b8fa05..37fe94e 100644 --- a/node_modules/cheerio/node_modules/undici/lib/dispatcher/client-h1.js +++ b/node_modules/undici/lib/dispatcher/client-h1.js @@ -49,13 +49,13 @@ const { kMaxResponseSize, kOnError, kResume, - kHTTPContext + kHTTPContext, + kClosed } = require('../core/symbols.js') const constants = require('../llhttp/constants.js') const EMPTY_BUF = Buffer.alloc(0) const FastBuffer = Buffer[Symbol.species] -const addListener = util.addListener const removeAllListeners = util.removeAllListeners let extractBody @@ -78,56 +78,107 @@ async function lazyllhttp () { return await WebAssembly.instantiate(mod, { env: { - /* eslint-disable camelcase */ - + /** + * @param {number} p + * @param {number} at + * @param {number} len + * @returns {number} + */ wasm_on_url: (p, at, len) => { /* istanbul ignore next */ return 0 }, + /** + * @param {number} p + * @param {number} at + * @param {number} len + * @returns {number} + */ wasm_on_status: (p, at, len) => { assert(currentParser.ptr === p) const start = at - currentBufferPtr + currentBufferRef.byteOffset - return currentParser.onStatus(new FastBuffer(currentBufferRef.buffer, start, len)) || 0 + return currentParser.onStatus(new FastBuffer(currentBufferRef.buffer, start, len)) }, + /** + * @param {number} p + * @returns {number} + */ wasm_on_message_begin: (p) => { assert(currentParser.ptr === p) - return currentParser.onMessageBegin() || 0 + return currentParser.onMessageBegin() }, + /** + * @param {number} p + * @param {number} at + * @param {number} len + * @returns {number} + */ wasm_on_header_field: (p, at, len) => { assert(currentParser.ptr === p) const start = at - currentBufferPtr + currentBufferRef.byteOffset - return currentParser.onHeaderField(new FastBuffer(currentBufferRef.buffer, start, len)) || 0 + return currentParser.onHeaderField(new FastBuffer(currentBufferRef.buffer, start, len)) }, + /** + * @param {number} p + * @param {number} at + * @param {number} len + * @returns {number} + */ wasm_on_header_value: (p, at, len) => { assert(currentParser.ptr === p) const start = at - currentBufferPtr + currentBufferRef.byteOffset - return currentParser.onHeaderValue(new FastBuffer(currentBufferRef.buffer, start, len)) || 0 + return currentParser.onHeaderValue(new FastBuffer(currentBufferRef.buffer, start, len)) }, + /** + * @param {number} p + * @param {number} statusCode + * @param {0|1} upgrade + * @param {0|1} shouldKeepAlive + * @returns {number} + */ wasm_on_headers_complete: (p, statusCode, upgrade, shouldKeepAlive) => { assert(currentParser.ptr === p) - return currentParser.onHeadersComplete(statusCode, Boolean(upgrade), Boolean(shouldKeepAlive)) || 0 + return currentParser.onHeadersComplete(statusCode, upgrade === 1, shouldKeepAlive === 1) }, + /** + * @param {number} p + * @param {number} at + * @param {number} len + * @returns {number} + */ wasm_on_body: (p, at, len) => { assert(currentParser.ptr === p) const start = at - currentBufferPtr + currentBufferRef.byteOffset - return currentParser.onBody(new FastBuffer(currentBufferRef.buffer, start, len)) || 0 + return currentParser.onBody(new FastBuffer(currentBufferRef.buffer, start, len)) }, + /** + * @param {number} p + * @returns {number} + */ wasm_on_message_complete: (p) => { assert(currentParser.ptr === p) - return currentParser.onMessageComplete() || 0 + return currentParser.onMessageComplete() } - /* eslint-enable camelcase */ } }) } let llhttpInstance = null +/** + * @type {Promise<WebAssembly.Instance>|null} + */ let llhttpPromise = lazyllhttp() llhttpPromise.catch() +/** + * @type {Parser|null} + */ let currentParser = null let currentBufferRef = null +/** + * @type {number} + */ let currentBufferSize = 0 let currentBufferPtr = null @@ -144,17 +195,23 @@ const TIMEOUT_BODY = 4 | USE_FAST_TIMER const TIMEOUT_KEEP_ALIVE = 8 | USE_NATIVE_TIMER class Parser { + /** + * @param {import('./client.js')} client + * @param {import('net').Socket} socket + * @param {*} llhttp + */ 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 + /** + * @type {import('net').Socket} + */ this.socket = socket this.timeout = null this.timeoutValue = null this.timeoutType = null - this.statusCode = null + this.statusCode = 0 this.statusText = '' this.upgrade = false this.headers = [] @@ -213,7 +270,7 @@ class Parser { } assert(this.ptr != null) - assert(currentParser == null) + assert(currentParser === null) this.llhttp.llhttp_resume(this.ptr) @@ -240,22 +297,27 @@ class Parser { } } - execute (data) { + /** + * @param {Buffer} chunk + */ + execute (chunk) { + assert(currentParser === null) assert(this.ptr != null) - assert(currentParser == null) assert(!this.paused) const { socket, llhttp } = this - if (data.length > currentBufferSize) { + // Allocate a new buffer if the current buffer is too small. + if (chunk.length > currentBufferSize) { if (currentBufferPtr) { llhttp.free(currentBufferPtr) } - currentBufferSize = Math.ceil(data.length / 4096) * 4096 + // Allocate a buffer that is a multiple of 4096 bytes. + currentBufferSize = Math.ceil(chunk.length / 4096) * 4096 currentBufferPtr = llhttp.malloc(currentBufferSize) } - new Uint8Array(llhttp.memory.buffer, currentBufferPtr, currentBufferSize).set(data) + new Uint8Array(llhttp.memory.buffer, currentBufferPtr, currentBufferSize).set(chunk) // Call `execute` on the wasm parser. // We pass the `llhttp_parser` pointer address, the pointer address of buffer view data, @@ -265,9 +327,9 @@ class Parser { let ret try { - currentBufferRef = data + currentBufferRef = chunk currentParser = this - ret = llhttp.llhttp_execute(this.ptr, currentBufferPtr, data.length) + ret = llhttp.llhttp_execute(this.ptr, currentBufferPtr, chunk.length) /* eslint-disable-next-line no-useless-catch */ } catch (err) { /* istanbul ignore next: difficult to make a test case for */ @@ -277,25 +339,27 @@ class Parser { currentBufferRef = null } - const offset = llhttp.llhttp_get_error_pos(this.ptr) - currentBufferPtr + if (ret !== constants.ERROR.OK) { + const data = chunk.subarray(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() + - ')' + if (ret === constants.ERROR.PAUSED_UPGRADE) { + this.onUpgrade(data) + } else if (ret === constants.ERROR.PAUSED) { + this.paused = true + socket.unshift(data) + } else { + 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) } - throw new HTTPParserError(message, constants.ERROR[ret], data.slice(offset)) } } catch (err) { util.destroy(socket, err) @@ -303,8 +367,8 @@ class Parser { } destroy () { + assert(currentParser === null) assert(this.ptr != null) - assert(currentParser == null) this.llhttp.llhttp_free(this.ptr) this.ptr = null @@ -317,10 +381,18 @@ class Parser { this.paused = false } + /** + * @param {Buffer} buf + * @returns {0} + */ onStatus (buf) { this.statusText = buf.toString() + return 0 } + /** + * @returns {0|-1} + */ onMessageBegin () { const { socket, client } = this @@ -334,8 +406,14 @@ class Parser { return -1 } request.onResponseStarted() + + return 0 } + /** + * @param {Buffer} buf + * @returns {number} + */ onHeaderField (buf) { const len = this.headers.length @@ -346,8 +424,14 @@ class Parser { } this.trackHeader(buf.length) + + return 0 } + /** + * @param {Buffer} buf + * @returns {number} + */ onHeaderValue (buf) { let len = this.headers.length @@ -371,8 +455,13 @@ class Parser { } this.trackHeader(buf.length) + + return 0 } + /** + * @param {number} len + */ trackHeader (len) { this.headersSize += len if (this.headersSize >= this.headersMaxSize) { @@ -380,6 +469,9 @@ class Parser { } } + /** + * @param {Buffer} head + */ onUpgrade (head) { const { upgrade, client, socket, headers, statusCode } = this @@ -393,9 +485,9 @@ class Parser { assert(request) assert(request.upgrade || request.method === 'CONNECT') - this.statusCode = null + this.statusCode = 0 this.statusText = '' - this.shouldKeepAlive = null + this.shouldKeepAlive = false this.headers = [] this.headersSize = 0 @@ -424,6 +516,12 @@ class Parser { client[kResume]() } + /** + * @param {number} statusCode + * @param {boolean} upgrade + * @param {boolean} shouldKeepAlive + * @returns {number} + */ onHeadersComplete (statusCode, upgrade, shouldKeepAlive) { const { client, socket, headers, statusText } = this @@ -533,6 +631,10 @@ class Parser { return pause ? constants.ERROR.PAUSED : 0 } + /** + * @param {Buffer} buf + * @returns {number} + */ onBody (buf) { const { client, socket, statusCode, maxResponseSize } = this @@ -563,8 +665,13 @@ class Parser { if (request.onData(buf) === false) { return constants.ERROR.PAUSED } + + return 0 } + /** + * @returns {number} + */ onMessageComplete () { const { client, socket, statusCode, upgrade, headers, contentLength, bytesRead, shouldKeepAlive } = this @@ -573,7 +680,7 @@ class Parser { } if (upgrade) { - return + return 0 } assert(statusCode >= 100) @@ -582,7 +689,7 @@ class Parser { const request = client[kQueue][client[kRunningIdx]] assert(request) - this.statusCode = null + this.statusCode = 0 this.statusText = '' this.bytesRead = 0 this.contentLength = '' @@ -593,7 +700,7 @@ class Parser { this.headersSize = 0 if (statusCode < 200) { - return + return 0 } /* istanbul ignore next: should be handled by llhttp? */ @@ -629,6 +736,8 @@ class Parser { } else { client[kResume]() } + + return 0 } } @@ -651,12 +760,28 @@ function onParserTimeout (parser) { } } +/** + * @param {import ('./client.js')} client + * @param {import('net').Socket} socket + * @returns + */ async function connectH1 (client, socket) { client[kSocket] = socket if (!llhttpInstance) { + const noop = () => {} + socket.on('error', noop) llhttpInstance = await llhttpPromise llhttpPromise = null + socket.off('error', noop) + } + + if (socket.errored) { + throw socket.errored + } + + if (socket.destroyed) { + throw new SocketError('destroyed') } socket[kNoRef] = false @@ -665,110 +790,45 @@ async function connectH1 (client, socket) { socket[kBlocking] = false socket[kParser] = new Parser(client, socket, llhttpInstance) - addListener(socket, 'error', function (err) { - assert(err.code !== 'ERR_TLS_CERT_ALTNAME_INVALID') + util.addListener(socket, 'error', onHttpSocketError) + util.addListener(socket, 'readable', onHttpSocketReadable) + util.addListener(socket, 'end', onHttpSocketEnd) + util.addListener(socket, 'close', onHttpSocketClose) - const parser = this[kParser] - - // 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 - - this[kClient][kOnError](err) - }) - addListener(socket, 'readable', function () { - const parser = this[kParser] - - if (parser) { - parser.readMore() - } - }) - addListener(socket, 'end', function () { - const parser = this[kParser] - - 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))) - }) - addListener(socket, 'close', function () { - const client = this[kClient] - const parser = this[kParser] - - if (parser) { - if (!this[kError] && parser.statusCode && !parser.shouldKeepAlive) { - // We treat all incoming data so far as a valid response. - parser.onMessageComplete() - } - - this[kParser].destroy() - this[kParser] = null - } - - const err = this[kError] || new SocketError('closed', util.getSocketInfo(this)) - - client[kSocket] = null - client[kHTTPContext] = null // TODO (fix): This is hacky... - - 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] - util.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 - - util.errorRequest(client, request, err) - } - - client[kPendingIdx] = client[kRunningIdx] - - assert(client[kRunning] === 0) - - client.emit('disconnect', client[kUrl], [client], err) - - client[kResume]() - }) - - let closed = false - socket.on('close', () => { - closed = true - }) + socket[kClosed] = false + socket.on('close', onSocketClose) return { version: 'h1', defaultPipelining: 1, - write (...args) { - return writeH1(client, ...args) + write (request) { + return writeH1(client, request) }, resume () { resumeH1(client) }, + /** + * @param {Error|undefined} err + * @param {() => void} callback + */ destroy (err, callback) { - if (closed) { + if (socket[kClosed]) { queueMicrotask(callback) } else { - socket.destroy(err).on('close', callback) + socket.on('close', callback) + socket.destroy(err) } }, + /** + * @returns {boolean} + */ get destroyed () { return socket.destroyed }, + /** + * @param {import('../core/request.js')} request + * @returns {boolean} + */ busy (request) { if (socket[kWriting] || socket[kReset] || socket[kBlocking]) { return true @@ -808,6 +868,93 @@ async function connectH1 (client, socket) { } } +function onHttpSocketError (err) { + assert(err.code !== 'ERR_TLS_CERT_ALTNAME_INVALID') + + const parser = this[kParser] + + // 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 + + this[kClient][kOnError](err) +} + +function onHttpSocketReadable () { + this[kParser]?.readMore() +} + +function onHttpSocketEnd () { + const parser = this[kParser] + + 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 onHttpSocketClose () { + const parser = this[kParser] + + if (parser) { + if (!this[kError] && parser.statusCode && !parser.shouldKeepAlive) { + // We treat all incoming data so far as a valid response. + parser.onMessageComplete() + } + + this[kParser].destroy() + this[kParser] = null + } + + const err = this[kError] || new SocketError('closed', util.getSocketInfo(this)) + + const client = this[kClient] + + client[kSocket] = null + client[kHTTPContext] = null // TODO (fix): This is hacky... + + 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] + util.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 + + util.errorRequest(client, request, err) + } + + client[kPendingIdx] = client[kRunningIdx] + + assert(client[kRunning] === 0) + + client.emit('disconnect', client[kUrl], [client], err) + + client[kResume]() +} + +function onSocketClose () { + this[kClosed] = true +} + +/** + * @param {import('./client.js')} client + */ function resumeH1 (client) { const socket = client[kSocket] @@ -843,6 +990,11 @@ function shouldSendContentLength (method) { return method !== 'GET' && method !== 'HEAD' && method !== 'OPTIONS' && method !== 'TRACE' && method !== 'CONNECT' } +/** + * @param {import('./client.js')} client + * @param {import('../core/request.js')} request + * @returns + */ function writeH1 (client, request) { const { method, path, host, upgrade, blocking, reset } = request @@ -916,6 +1068,10 @@ function writeH1 (client, request) { const socket = client[kSocket] + /** + * @param {Error} [err] + * @returns {void} + */ const abort = (err) => { if (request.aborted || request.completed) { return @@ -1021,6 +1177,16 @@ function writeH1 (client, request) { return true } +/** + * @param {AbortCallback} abort + * @param {import('stream').Stream} body + * @param {import('./client.js')} client + * @param {import('../core/request.js')} request + * @param {import('net').Socket} socket + * @param {number} contentLength + * @param {string} header + * @param {boolean} expectsPayload + */ function writeStream (abort, body, client, request, socket, contentLength, header, expectsPayload) { assert(contentLength !== 0 || client[kRunning] === 0, 'stream body cannot be pipelined') @@ -1028,6 +1194,10 @@ function writeStream (abort, body, client, request, socket, contentLength, heade const writer = new AsyncWriter({ abort, socket, request, contentLength, client, expectsPayload, header }) + /** + * @param {Buffer} chunk + * @returns {void} + */ const onData = function (chunk) { if (finished) { return @@ -1041,6 +1211,10 @@ function writeStream (abort, body, client, request, socket, contentLength, heade util.destroy(this, err) } } + + /** + * @returns {void} + */ const onDrain = function () { if (finished) { return @@ -1050,6 +1224,10 @@ function writeStream (abort, body, client, request, socket, contentLength, heade body.resume() } } + + /** + * @returns {void} + */ const onClose = function () { // 'close' might be emitted *before* 'error' for // broken streams. Wait a tick to avoid this case. @@ -1064,6 +1242,11 @@ function writeStream (abort, body, client, request, socket, contentLength, heade queueMicrotask(() => onFinished(err)) } } + + /** + * @param {Error} [err] + * @returns + */ const onFinished = function (err) { if (finished) { return @@ -1124,6 +1307,24 @@ function writeStream (abort, body, client, request, socket, contentLength, heade } } +/** + * @typedef AbortCallback + * @type {Function} + * @param {Error} [err] + * @returns {void} + */ + +/** + * @param {AbortCallback} abort + * @param {Uint8Array|null} body + * @param {import('./client.js')} client + * @param {import('../core/request.js')} request + * @param {import('net').Socket} socket + * @param {number} contentLength + * @param {string} header + * @param {boolean} expectsPayload + * @returns {void} + */ function writeBuffer (abort, body, client, request, socket, contentLength, header, expectsPayload) { try { if (!body) { @@ -1154,6 +1355,17 @@ function writeBuffer (abort, body, client, request, socket, contentLength, heade } } +/** + * @param {AbortCallback} abort + * @param {Blob} body + * @param {import('./client.js')} client + * @param {import('../core/request.js')} request + * @param {import('net').Socket} socket + * @param {number} contentLength + * @param {string} header + * @param {boolean} expectsPayload + * @returns {Promise<void>} + */ async function writeBlob (abort, body, client, request, socket, contentLength, header, expectsPayload) { assert(contentLength === body.size, 'blob body must have content length') @@ -1182,6 +1394,17 @@ async function writeBlob (abort, body, client, request, socket, contentLength, h } } +/** + * @param {AbortCallback} abort + * @param {Iterable} body + * @param {import('./client.js')} client + * @param {import('../core/request.js')} request + * @param {import('net').Socket} socket + * @param {number} contentLength + * @param {string} header + * @param {boolean} expectsPayload + * @returns {Promise<void>} + */ async function writeIterable (abort, body, client, request, socket, contentLength, header, expectsPayload) { assert(contentLength !== 0 || client[kRunning] === 0, 'iterator body cannot be pipelined') @@ -1232,6 +1455,17 @@ async function writeIterable (abort, body, client, request, socket, contentLengt } class AsyncWriter { + /** + * + * @param {object} arg + * @param {AbortCallback} arg.abort + * @param {import('net').Socket} arg.socket + * @param {import('../core/request.js')} arg.request + * @param {number} arg.contentLength + * @param {import('./client.js')} arg.client + * @param {boolean} arg.expectsPayload + * @param {string} arg.header + */ constructor ({ abort, socket, request, contentLength, client, expectsPayload, header }) { this.socket = socket this.request = request @@ -1245,6 +1479,10 @@ class AsyncWriter { socket[kWriting] = true } + /** + * @param {Buffer} chunk + * @returns + */ write (chunk) { const { socket, request, contentLength, client, bytesWritten, expectsPayload, header } = this @@ -1308,6 +1546,9 @@ class AsyncWriter { return ret } + /** + * @returns {void} + */ end () { const { socket, contentLength, client, bytesWritten, expectsPayload, header, request } = this request.onRequestSent() @@ -1355,6 +1596,10 @@ class AsyncWriter { client[kResume]() } + /** + * @param {Error} [err] + * @returns {void} + */ destroy (err) { const { socket, client, abort } = this diff --git a/node_modules/cheerio/node_modules/undici/lib/dispatcher/client-h2.js b/node_modules/undici/lib/dispatcher/client-h2.js similarity index 76% rename from node_modules/cheerio/node_modules/undici/lib/dispatcher/client-h2.js rename to node_modules/undici/lib/dispatcher/client-h2.js index 4a52eff..d34c7ca 100644 --- a/node_modules/cheerio/node_modules/undici/lib/dispatcher/client-h2.js +++ b/node_modules/undici/lib/dispatcher/client-h2.js @@ -26,16 +26,16 @@ const { kHTTP2Session, kResume, kSize, - kHTTPContext + kHTTPContext, + kClosed, + kBodyTimeout } = require('../core/symbols.js') +const { channels } = require('../core/diagnostics.js') const kOpenStreams = Symbol('open streams') let extractBody -// Experimental -let h2ExperimentalWarned = false - /** @type {import('http2')} */ let http2 try { @@ -80,100 +80,51 @@ function parseH2Headers (headers) { async function connectH2 (client, socket) { client[kSocket] = socket - if (!h2ExperimentalWarned) { - h2ExperimentalWarned = true - process.emitWarning('H2 support is experimental, expect them to change at any time.', { - code: 'UNDICI-H2' - }) - } - const session = http2.connect(client[kUrl], { createConnection: () => socket, - peerMaxConcurrentStreams: client[kMaxConcurrentStreams] + peerMaxConcurrentStreams: client[kMaxConcurrentStreams], + settings: { + // TODO(metcoder95): add support for PUSH + enablePush: false + } }) session[kOpenStreams] = 0 session[kClient] = client session[kSocket] = socket + session[kHTTP2Session] = null util.addListener(session, 'error', onHttp2SessionError) util.addListener(session, 'frameError', onHttp2FrameError) util.addListener(session, 'end', onHttp2SessionEnd) - util.addListener(session, 'goaway', onHTTP2GoAway) - util.addListener(session, 'close', function () { - const { [kClient]: client } = this - const { [kSocket]: socket } = client - - const err = this[kSocket][kError] || this[kError] || new SocketError('closed', util.getSocketInfo(socket)) - - client[kHTTP2Session] = 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] - util.errorRequest(client, request, err) - } - } - }) + util.addListener(session, 'goaway', onHttp2SessionGoAway) + util.addListener(session, 'close', onHttp2SessionClose) session.unref() client[kHTTP2Session] = session socket[kHTTP2Session] = session - util.addListener(socket, 'error', function (err) { - assert(err.code !== 'ERR_TLS_CERT_ALTNAME_INVALID') + util.addListener(socket, 'error', onHttp2SocketError) + util.addListener(socket, 'end', onHttp2SocketEnd) + util.addListener(socket, 'close', onHttp2SocketClose) - this[kError] = err - - this[kClient][kOnError](err) - }) - - util.addListener(socket, 'end', function () { - util.destroy(this, new SocketError('other side closed', util.getSocketInfo(this))) - }) - - util.addListener(socket, 'close', function () { - const err = this[kError] || new SocketError('closed', util.getSocketInfo(this)) - - client[kSocket] = null - - if (this[kHTTP2Session] != null) { - this[kHTTP2Session].destroy(err) - } - - client[kPendingIdx] = client[kRunningIdx] - - assert(client[kRunning] === 0) - - client.emit('disconnect', client[kUrl], [client], err) - - client[kResume]() - }) - - let closed = false - socket.on('close', () => { - closed = true - }) + socket[kClosed] = false + socket.on('close', onSocketClose) return { version: 'h2', defaultPipelining: Infinity, - write (...args) { - return writeH2(client, ...args) + write (request) { + return writeH2(client, request) }, resume () { resumeH2(client) }, destroy (err, callback) { - if (closed) { + if (socket[kClosed]) { queueMicrotask(callback) } else { - // Destroying the socket will trigger the session close socket.destroy(err).on('close', callback) } }, @@ -190,7 +141,7 @@ function resumeH2 (client) { const socket = client[kSocket] if (socket?.destroyed === false) { - if (client[kSize] === 0 && client[kMaxConcurrentStreams] === 0) { + if (client[kSize] === 0 || client[kMaxConcurrentStreams] === 0) { socket.unref() client[kHTTP2Session].unref() } else { @@ -225,19 +176,24 @@ function onHttp2SessionEnd () { * This is the root cause of #3011 * We need to handle GOAWAY frames properly, and trigger the session close * along with the socket right away + * + * @this {import('http2').ClientHttp2Session} + * @param {number} errorCode */ -function onHTTP2GoAway (code) { - // We cannot recover, so best to close the session and the socket - const err = this[kError] || new SocketError(`HTTP/2: "GOAWAY" frame received with code ${code}`, util.getSocketInfo(this)) +function onHttp2SessionGoAway (errorCode) { + // TODO(mcollina): Verify if GOAWAY implements the spec correctly: + // https://datatracker.ietf.org/doc/html/rfc7540#section-6.8 + // Specifically, we do not verify the "valid" stream id. + + const err = this[kError] || new SocketError(`HTTP/2: "GOAWAY" frame received with code ${errorCode}`, util.getSocketInfo(this[kSocket])) const client = this[kClient] client[kSocket] = null client[kHTTPContext] = null - if (this[kHTTP2Session] != null) { - this[kHTTP2Session].destroy(err) - this[kHTTP2Session] = null - } + // this is an HTTP2 session + this.close() + this[kHTTP2Session] = null util.destroy(this[kSocket], err) @@ -256,12 +212,71 @@ function onHTTP2GoAway (code) { client[kResume]() } +function onHttp2SessionClose () { + const { [kClient]: client } = this + const { [kSocket]: socket } = client + + const err = this[kSocket][kError] || this[kError] || new SocketError('closed', util.getSocketInfo(socket)) + + client[kSocket] = null + client[kHTTPContext] = 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] + util.errorRequest(client, request, err) + } + } +} + +function onHttp2SocketClose () { + const err = this[kError] || new SocketError('closed', util.getSocketInfo(this)) + + const client = this[kHTTP2Session][kClient] + + client[kSocket] = null + client[kHTTPContext] = null + + if (this[kHTTP2Session] !== null) { + this[kHTTP2Session].destroy(err) + } + + client[kPendingIdx] = client[kRunningIdx] + + assert(client[kRunning] === 0) + + client.emit('disconnect', client[kUrl], [client], err) + + client[kResume]() +} + +function onHttp2SocketError (err) { + assert(err.code !== 'ERR_TLS_CERT_ALTNAME_INVALID') + + this[kError] = err + + this[kClient][kOnError](err) +} + +function onHttp2SocketEnd () { + util.destroy(this, new SocketError('other side closed', util.getSocketInfo(this))) +} + +function onSocketClose () { + this[kClosed] = true +} + // https://www.rfc-editor.org/rfc/rfc7230#section-3.3.2 function shouldSendContentLength (method) { return method !== 'GET' && method !== 'HEAD' && method !== 'OPTIONS' && method !== 'TRACE' && method !== 'CONNECT' } function writeH2 (client, request) { + const requestTimeout = request.bodyTimeout ?? client[kBodyTimeout] const session = client[kHTTP2Session] const { method, path, host, upgrade, expectContinue, signal, headers: reqHeaders } = request let { body } = request @@ -290,7 +305,7 @@ function writeH2 (client, request) { } /** @type {import('node:http2').ClientHttp2Stream} */ - let stream + let stream = null const { hostname, port } = client[kUrl] @@ -307,14 +322,21 @@ function writeH2 (client, request) { util.errorRequest(client, request, err) if (stream != null) { - util.destroy(stream, err) + // Some chunks might still come after abort, + // let's ignore them + stream.removeAllListeners('data') + + // On Abort, we close the stream to send RST_STREAM frame + stream.close() + + // We move the running index to the next request + client[kOnError](err) + client[kResume]() } // We do not destroy the socket as we can continue using the session - // the stream get's destroyed and the session remains to create new streams + // the stream gets destroyed and the session remains to create new streams util.destroy(body, err) - client[kQueue][client[kRunningIdx]++] = null - client[kResume]() } try { @@ -337,7 +359,7 @@ function writeH2 (client, request) { // We disabled endStream to allow the user to write to the stream stream = session.request(headers, { endStream: false, signal }) - if (stream.id && !stream.pending) { + if (!stream.pending) { request.onUpgrade(null, null, stream) ++session[kOpenStreams] client[kQueue][client[kRunningIdx]++] = null @@ -353,6 +375,7 @@ function writeH2 (client, request) { session[kOpenStreams] -= 1 if (session[kOpenStreams] === 0) session.unref() }) + stream.setTimeout(requestTimeout) return true } @@ -426,6 +449,15 @@ function writeH2 (client, request) { session.ref() + if (channels.sendHeaders.hasSubscribers) { + let header = '' + for (const key in headers) { + header += `${key}: ${headers[key]}\r\n` + } + channels.sendHeaders.publish({ request, headers: header, socket: session[kSocket] }) + } + + // TODO(metcoder95): add support for sending trailers const shouldEndStream = method === 'GET' || method === 'HEAD' || body === null if (expectContinue) { headers[HTTP2_HEADER_EXPECT] = '100-continue' @@ -437,11 +469,13 @@ function writeH2 (client, request) { endStream: shouldEndStream, signal }) + writeBodyH2() } // Increment counter as we have new streams open ++session[kOpenStreams] + stream.setTimeout(requestTimeout) stream.once('response', headers => { const { [HTTP2_HEADER_STATUS]: statusCode, ...realHeaders } = headers @@ -453,46 +487,53 @@ function writeH2 (client, request) { // for those scenarios, best effort is to destroy the stream immediately // as there's no value to keep it open. if (request.aborted) { - const err = new RequestAbortedError() - util.errorRequest(client, request, err) - util.destroy(stream, err) + stream.removeAllListeners('data') return } if (request.onHeaders(Number(statusCode), parseH2Headers(realHeaders), stream.resume.bind(stream), '') === false) { stream.pause() } - - stream.on('data', (chunk) => { - if (request.onData(chunk) === false) { - stream.pause() - } - }) }) - stream.once('end', () => { + stream.on('data', (chunk) => { + if (request.onData(chunk) === false) { + stream.pause() + } + }) + + stream.once('end', (err) => { + stream.removeAllListeners('data') // When state is null, it means we haven't consumed body and the stream still do not have // a state. // Present specially when using pipeline or stream if (stream.state?.state == null || stream.state.state < 6) { - request.onComplete([]) - } + // Do not complete the request if it was aborted + // Not prone to happen for as safety net to avoid race conditions with 'trailers' + if (!request.aborted && !request.completed) { + request.onComplete({}) + } - if (session[kOpenStreams] === 0) { + client[kQueue][client[kRunningIdx]++] = null + client[kResume]() + } else { // Stream is closed or half-closed-remote (6), decrement counter and cleanup // It does not have sense to continue working with the stream as we do not // have yet RST_STREAM support on client-side + --session[kOpenStreams] + if (session[kOpenStreams] === 0) { + session.unref() + } - session.unref() + abort(err ?? new InformationalError('HTTP/2: stream half-closed (remote)')) + client[kQueue][client[kRunningIdx]++] = null + client[kPendingIdx] = client[kRunningIdx] + client[kResume]() } - - abort(new InformationalError('HTTP/2: stream half-closed (remote)')) - client[kQueue][client[kRunningIdx]++] = null - client[kPendingIdx] = client[kRunningIdx] - client[kResume]() }) stream.once('close', () => { + stream.removeAllListeners('data') session[kOpenStreams] -= 1 if (session[kOpenStreams] === 0) { session.unref() @@ -500,28 +541,38 @@ function writeH2 (client, request) { }) stream.once('error', function (err) { + stream.removeAllListeners('data') abort(err) }) stream.once('frameError', (type, code) => { + stream.removeAllListeners('data') abort(new InformationalError(`HTTP/2: "frameError" received - type ${type}, code ${code}`)) }) - // stream.on('aborted', () => { - // // TODO(HTTP/2): Support aborted - // }) + stream.on('aborted', () => { + stream.removeAllListeners('data') + }) - // stream.on('timeout', () => { - // // TODO(HTTP/2): Support timeout - // }) + stream.on('timeout', () => { + const err = new InformationalError(`HTTP/2: "stream timeout after ${requestTimeout}"`) + stream.removeAllListeners('data') + session[kOpenStreams] -= 1 - // stream.on('push', headers => { - // // TODO(HTTP/2): Support push - // }) + if (session[kOpenStreams] === 0) { + session.unref() + } - // stream.on('trailers', headers => { - // // TODO(HTTP/2): Support trailers - // }) + abort(err) + }) + + stream.once('trailers', trailers => { + if (request.aborted || request.completed) { + return + } + + request.onComplete(trailers) + }) return true diff --git a/node_modules/cheerio/node_modules/undici/lib/dispatcher/client.js b/node_modules/undici/lib/dispatcher/client.js similarity index 92% rename from node_modules/cheerio/node_modules/undici/lib/dispatcher/client.js rename to node_modules/undici/lib/dispatcher/client.js index 3dc3566..be0e819 100644 --- a/node_modules/cheerio/node_modules/undici/lib/dispatcher/client.js +++ b/node_modules/undici/lib/dispatcher/client.js @@ -1,5 +1,3 @@ -// @ts-check - 'use strict' const assert = require('node:assert') @@ -43,13 +41,11 @@ const { kBodyTimeout, kStrictContentLength, kConnector, - kMaxRedirections, kMaxRequests, kCounter, kClose, kDestroy, kDispatch, - kInterceptors, kLocalAddress, kMaxResponseSize, kOnError, @@ -59,10 +55,16 @@ const { } = require('../core/symbols.js') const connectH1 = require('./client-h1.js') const connectH2 = require('./client-h2.js') -let deprecatedInterceptorWarned = false const kClosedResolve = Symbol('kClosedResolve') +const getDefaultNodeMaxHeaderSize = http && + http.maxHeaderSize && + Number.isInteger(http.maxHeaderSize) && + http.maxHeaderSize > 0 + ? () => http.maxHeaderSize + : () => { throw new InvalidArgumentError('http module not available or http.maxHeaderSize invalid') } + const noop = () => {} function getPipelining (client) { @@ -79,7 +81,6 @@ class Client extends DispatcherBase { * @param {import('../../types/client.js').Client.Options} options */ constructor (url, { - interceptors, maxHeaderSize, headersTimeout, socketTimeout, @@ -97,7 +98,6 @@ class Client extends DispatcherBase { tls, strictContentLength, maxCachedSessions, - maxRedirections, connect, maxRequestsPerClient, localAddress, @@ -108,8 +108,6 @@ class Client extends DispatcherBase { maxConcurrentStreams, allowH2 } = {}) { - super() - if (keepAlive !== undefined) { throw new InvalidArgumentError('unsupported keepAlive, use pipelining=0 instead') } @@ -130,8 +128,14 @@ class Client extends DispatcherBase { throw new InvalidArgumentError('unsupported maxKeepAliveTimeout, use keepAliveMaxTimeout instead') } - if (maxHeaderSize != null && !Number.isFinite(maxHeaderSize)) { - throw new InvalidArgumentError('invalid maxHeaderSize') + if (maxHeaderSize != null) { + if (!Number.isInteger(maxHeaderSize) || maxHeaderSize < 1) { + throw new InvalidArgumentError('invalid maxHeaderSize') + } + } else { + // If maxHeaderSize is not provided, use the default value from the http module + // or if that is not available, throw an error. + maxHeaderSize = getDefaultNodeMaxHeaderSize() } if (socketPath != null && typeof socketPath !== 'string') { @@ -166,10 +170,6 @@ class Client extends DispatcherBase { 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') } @@ -198,6 +198,8 @@ class Client extends DispatcherBase { throw new InvalidArgumentError('maxConcurrentStreams must be a positive integer, greater than 0') } + super() + if (typeof connect !== 'function') { connect = buildConnector({ ...tls, @@ -205,27 +207,15 @@ class Client extends DispatcherBase { allowH2, socketPath, timeout: connectTimeout, - ...(autoSelectFamily ? { autoSelectFamily, autoSelectFamilyAttemptTimeout } : undefined), + ...(typeof autoSelectFamily === 'boolean' ? { autoSelectFamily, autoSelectFamilyAttemptTimeout } : undefined), ...connect }) } - if (interceptors?.Client && Array.isArray(interceptors.Client)) { - this[kInterceptors] = interceptors.Client - if (!deprecatedInterceptorWarned) { - deprecatedInterceptorWarned = true - process.emitWarning('Client.Options#interceptor is deprecated. Use Dispatcher#compose instead.', { - code: 'UNDICI-CLIENT-INTERCEPTOR-DEPRECATED' - }) - } - } else { - this[kInterceptors] = [createRedirectInterceptor({ maxRedirections })] - } - this[kUrl] = util.parseOrigin(url) this[kConnector] = connect this[kPipelining] = pipelining != null ? pipelining : 1 - this[kMaxHeadersSize] = maxHeaderSize || http.maxHeaderSize + this[kMaxHeadersSize] = maxHeaderSize this[kKeepAliveDefaultTimeout] = keepAliveTimeout == null ? 4e3 : keepAliveTimeout this[kKeepAliveMaxTimeout] = keepAliveMaxTimeout == null ? 600e3 : keepAliveMaxTimeout this[kKeepAliveTimeoutThreshold] = keepAliveTimeoutThreshold == null ? 2e3 : keepAliveTimeoutThreshold @@ -238,7 +228,6 @@ class Client extends DispatcherBase { 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 @@ -364,8 +353,6 @@ class Client extends DispatcherBase { } } -const createRedirectInterceptor = require('../interceptor/redirect-interceptor.js') - function onError (client, err) { if ( client[kRunning] === 0 && @@ -404,7 +391,7 @@ async function connect (client) { assert(idx !== -1) const ip = hostname.substring(1, idx) - assert(net.isIP(ip)) + assert(net.isIPv6(ip)) hostname = ip } diff --git a/node_modules/cheerio/node_modules/undici/lib/dispatcher/dispatcher-base.js b/node_modules/undici/lib/dispatcher/dispatcher-base.js similarity index 74% rename from node_modules/cheerio/node_modules/undici/lib/dispatcher/dispatcher-base.js rename to node_modules/undici/lib/dispatcher/dispatcher-base.js index bd860ac..615754d 100644 --- a/node_modules/cheerio/node_modules/undici/lib/dispatcher/dispatcher-base.js +++ b/node_modules/undici/lib/dispatcher/dispatcher-base.js @@ -1,16 +1,16 @@ 'use strict' const Dispatcher = require('./dispatcher') +const UnwrapHandler = require('../handler/unwrap-handler') const { ClientDestroyedError, ClientClosedError, InvalidArgumentError } = require('../core/errors') -const { kDestroy, kClose, kClosed, kDestroyed, kDispatch, kInterceptors } = require('../core/symbols') +const { kDestroy, kClose, kClosed, kDestroyed, kDispatch } = require('../core/symbols') const kOnDestroyed = Symbol('onDestroyed') const kOnClosed = Symbol('onClosed') -const kInterceptedDispatch = Symbol('Intercepted Dispatch') class DispatcherBase extends Dispatcher { constructor () { @@ -30,23 +30,6 @@ class DispatcherBase extends Dispatcher { 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) => { @@ -142,25 +125,13 @@ class DispatcherBase extends Dispatcher { }) } - [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') } + handler = UnwrapHandler.unwrap(handler) + try { if (!opts || typeof opts !== 'object') { throw new InvalidArgumentError('opts must be an object.') @@ -174,10 +145,10 @@ class DispatcherBase extends Dispatcher { throw new ClientClosedError() } - return this[kInterceptedDispatch](opts, handler) + return this[kDispatch](opts, handler) } catch (err) { if (typeof handler.onError !== 'function') { - throw new InvalidArgumentError('invalid onError method') + throw err } handler.onError(err) diff --git a/node_modules/cheerio/node_modules/undici/lib/dispatcher/dispatcher.js b/node_modules/undici/lib/dispatcher/dispatcher.js similarity index 68% rename from node_modules/cheerio/node_modules/undici/lib/dispatcher/dispatcher.js rename to node_modules/undici/lib/dispatcher/dispatcher.js index b1e0098..824dfb6 100644 --- a/node_modules/cheerio/node_modules/undici/lib/dispatcher/dispatcher.js +++ b/node_modules/undici/lib/dispatcher/dispatcher.js @@ -1,5 +1,8 @@ 'use strict' const EventEmitter = require('node:events') +const WrapHandler = require('../handler/wrap-handler') + +const wrapInterceptor = (dispatch) => (opts, handler) => dispatch(opts, WrapHandler.wrap(handler)) class Dispatcher extends EventEmitter { dispatch () { @@ -29,36 +32,16 @@ class Dispatcher extends EventEmitter { } dispatch = interceptor(dispatch) + dispatch = wrapInterceptor(dispatch) if (dispatch == null || typeof dispatch !== 'function' || dispatch.length !== 2) { throw new TypeError('invalid interceptor') } } - return new ComposedDispatcher(this, dispatch) - } -} - -class ComposedDispatcher extends Dispatcher { - #dispatcher = null - #dispatch = null - - constructor (dispatcher, dispatch) { - super() - this.#dispatcher = dispatcher - this.#dispatch = dispatch - } - - dispatch (...args) { - this.#dispatch(...args) - } - - close (...args) { - return this.#dispatcher.close(...args) - } - - destroy (...args) { - return this.#dispatcher.destroy(...args) + return new Proxy(this, { + get: (target, key) => key === 'dispatch' ? dispatch : target[key] + }) } } diff --git a/node_modules/cheerio/node_modules/undici/lib/dispatcher/env-http-proxy-agent.js b/node_modules/undici/lib/dispatcher/env-http-proxy-agent.js similarity index 94% rename from node_modules/cheerio/node_modules/undici/lib/dispatcher/env-http-proxy-agent.js rename to node_modules/undici/lib/dispatcher/env-http-proxy-agent.js index 897011a..48cc3f8 100644 --- a/node_modules/cheerio/node_modules/undici/lib/dispatcher/env-http-proxy-agent.js +++ b/node_modules/undici/lib/dispatcher/env-http-proxy-agent.js @@ -10,8 +10,6 @@ const DEFAULT_PORTS = { 'https:': 443 } -let experimentalWarned = false - class EnvHttpProxyAgent extends DispatcherBase { #noProxyValue = null #noProxyEntries = null @@ -21,13 +19,6 @@ class EnvHttpProxyAgent extends DispatcherBase { super() this.#opts = opts - if (!experimentalWarned) { - experimentalWarned = true - process.emitWarning('EnvHttpProxyAgent is experimental, expect them to change at any time.', { - code: 'UNDICI-EHPA' - }) - } - const { httpProxy, httpsProxy, noProxy, ...agentOpts } = opts this[kNoProxyAgent] = new Agent(agentOpts) diff --git a/node_modules/undici/lib/node/fixed-queue.js b/node_modules/undici/lib/dispatcher/fixed-queue.js similarity index 55% rename from node_modules/undici/lib/node/fixed-queue.js rename to node_modules/undici/lib/dispatcher/fixed-queue.js index 3572681..5f7a08b 100644 --- a/node_modules/undici/lib/node/fixed-queue.js +++ b/node_modules/undici/lib/dispatcher/fixed-queue.js @@ -1,12 +1,10 @@ -/* 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; +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: @@ -17,18 +15,18 @@ const kMask = kSize - 1; // +-----------+ <-----\ +-----------+ <------\ +-----------+ // | [null] | \----- | next | \------- | next | // +-----------+ +-----------+ +-----------+ -// | item | <-- bottom | item | <-- bottom | [empty] | -// | item | | item | | [empty] | -// | item | | item | | [empty] | -// | item | | item | | [empty] | +// | item | <-- bottom | item | <-- bottom | undefined | +// | item | | item | | undefined | +// | item | | item | | undefined | +// | item | | item | | undefined | // | 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] | +// | undefined | <-- top | item | | item | +// | undefined | | item | | item | +// | undefined | | undefined | <-- top top --> | undefined | // +-----------+ +-----------+ +-----------+ // // Or, if there is only one circular buffer, it looks something @@ -40,12 +38,12 @@ const kMask = kSize - 1; // +-----------+ +-----------+ // | [null] | | [null] | // +-----------+ +-----------+ -// | [empty] | | item | -// | [empty] | | item | -// | item | <-- bottom top --> | [empty] | -// | item | | [empty] | -// | [empty] | <-- top bottom --> | item | -// | [empty] | | item | +// | undefined | | item | +// | undefined | | item | +// | item | <-- bottom top --> | undefined | +// | item | | undefined | +// | undefined | <-- top bottom --> | item | +// | undefined | | item | // +-----------+ +-----------+ // // Adding a value means moving `top` forward by one, removing means @@ -56,62 +54,106 @@ const kMask = kSize - 1; // `top + 1 === bottom` it's full. This wastes a single space of storage // but allows much quicker checks. +/** + * @type {FixedCircularBuffer} + * @template T + */ class FixedCircularBuffer { - constructor() { - this.bottom = 0; - this.top = 0; - this.list = new Array(kSize); - this.next = null; + constructor () { + /** + * @type {number} + */ + this.bottom = 0 + /** + * @type {number} + */ + this.top = 0 + /** + * @type {Array<T|undefined>} + */ + this.list = new Array(kSize).fill(undefined) + /** + * @type {T|null} + */ + this.next = null } - isEmpty() { - return this.top === this.bottom; + /** + * @returns {boolean} + */ + isEmpty () { + return this.top === this.bottom } - isFull() { - return ((this.top + 1) & kMask) === this.bottom; + /** + * @returns {boolean} + */ + isFull () { + return ((this.top + 1) & kMask) === this.bottom } - push(data) { - this.list[this.top] = data; - this.top = (this.top + 1) & kMask; + /** + * @param {T} data + * @returns {void} + */ + 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; + /** + * @returns {T|null} + */ + 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 } } +/** + * @template T + */ module.exports = class FixedQueue { - constructor() { - this.head = this.tail = new FixedCircularBuffer(); + constructor () { + /** + * @type {FixedCircularBuffer<T>} + */ + this.head = this.tail = new FixedCircularBuffer() } - isEmpty() { - return this.head.isEmpty(); + /** + * @returns {boolean} + */ + isEmpty () { + return this.head.isEmpty() } - push(data) { + /** + * @param {T} data + */ + 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 = this.head.next = new FixedCircularBuffer() } - this.head.push(data); + this.head.push(data) } - shift() { - const tail = this.tail; - const next = tail.shift(); + /** + * @returns {T|null} + */ + 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; + this.tail = tail.next + tail.next = null } - return next; + return next } -}; +} diff --git a/node_modules/cheerio/node_modules/undici/lib/dispatcher/pool-base.js b/node_modules/undici/lib/dispatcher/pool-base.js similarity index 100% rename from node_modules/cheerio/node_modules/undici/lib/dispatcher/pool-base.js rename to node_modules/undici/lib/dispatcher/pool-base.js diff --git a/node_modules/cheerio/node_modules/undici/lib/dispatcher/pool-stats.js b/node_modules/undici/lib/dispatcher/pool-stats.js similarity index 97% rename from node_modules/cheerio/node_modules/undici/lib/dispatcher/pool-stats.js rename to node_modules/undici/lib/dispatcher/pool-stats.js index 8c7e8c9..c739211 100644 --- a/node_modules/cheerio/node_modules/undici/lib/dispatcher/pool-stats.js +++ b/node_modules/undici/lib/dispatcher/pool-stats.js @@ -1,3 +1,5 @@ +'use strict' + const { kFree, kConnected, kPending, kQueued, kRunning, kSize } = require('../core/symbols') const kPool = Symbol('pool') diff --git a/node_modules/cheerio/node_modules/undici/lib/dispatcher/pool.js b/node_modules/undici/lib/dispatcher/pool.js similarity index 90% rename from node_modules/cheerio/node_modules/undici/lib/dispatcher/pool.js rename to node_modules/undici/lib/dispatcher/pool.js index 0b8a2da..14175cf 100644 --- a/node_modules/cheerio/node_modules/undici/lib/dispatcher/pool.js +++ b/node_modules/undici/lib/dispatcher/pool.js @@ -12,7 +12,7 @@ const { InvalidArgumentError } = require('../core/errors') const util = require('../core/util') -const { kUrl, kInterceptors } = require('../core/symbols') +const { kUrl } = require('../core/symbols') const buildConnector = require('../core/connect') const kOptions = Symbol('options') @@ -37,8 +37,6 @@ class Pool extends PoolBase { allowH2, ...options } = {}) { - super() - if (connections != null && (!Number.isFinite(connections) || connections < 0)) { throw new InvalidArgumentError('invalid connections') } @@ -51,6 +49,8 @@ class Pool extends PoolBase { throw new InvalidArgumentError('connect must be a function or an object') } + super() + if (typeof connect !== 'function') { connect = buildConnector({ ...tls, @@ -58,14 +58,11 @@ class Pool extends PoolBase { allowH2, socketPath, timeout: connectTimeout, - ...(autoSelectFamily ? { autoSelectFamily, autoSelectFamilyAttemptTimeout } : undefined), + ...(typeof autoSelectFamily === 'boolean' ? { autoSelectFamily, autoSelectFamilyAttemptTimeout } : undefined), ...connect }) } - this[kInterceptors] = 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, allowH2 } diff --git a/node_modules/cheerio/node_modules/undici/lib/dispatcher/proxy-agent.js b/node_modules/undici/lib/dispatcher/proxy-agent.js similarity index 96% rename from node_modules/cheerio/node_modules/undici/lib/dispatcher/proxy-agent.js rename to node_modules/undici/lib/dispatcher/proxy-agent.js index c439d7c..c5b4d51 100644 --- a/node_modules/cheerio/node_modules/undici/lib/dispatcher/proxy-agent.js +++ b/node_modules/undici/lib/dispatcher/proxy-agent.js @@ -1,6 +1,6 @@ 'use strict' -const { kProxy, kClose, kDestroy, kInterceptors } = require('../core/symbols') +const { kProxy, kClose, kDestroy } = require('../core/symbols') const { URL } = require('node:url') const Agent = require('./agent') const Pool = require('./pool') @@ -27,8 +27,6 @@ const noop = () => {} class ProxyAgent extends DispatcherBase { constructor (opts) { - super() - if (!opts || (typeof opts === 'object' && !(opts instanceof URL) && !opts.uri)) { throw new InvalidArgumentError('Proxy uri is mandatory') } @@ -38,13 +36,12 @@ class ProxyAgent extends DispatcherBase { throw new InvalidArgumentError('Proxy opts.clientFactory must be a function.') } + super() + const url = this.#getUrl(opts) const { href, origin, port, protocol, username, password, hostname: proxyHostname } = url this[kProxy] = { uri: href, protocol } - this[kInterceptors] = opts.interceptors?.ProxyAgent && Array.isArray(opts.interceptors.ProxyAgent) - ? opts.interceptors.ProxyAgent - : [] this[kRequestTls] = opts.requestTls this[kProxyTls] = opts.proxyTls this[kProxyHeaders] = opts.headers || {} diff --git a/node_modules/cheerio/node_modules/undici/lib/dispatcher/retry-agent.js b/node_modules/undici/lib/dispatcher/retry-agent.js similarity index 100% rename from node_modules/cheerio/node_modules/undici/lib/dispatcher/retry-agent.js rename to node_modules/undici/lib/dispatcher/retry-agent.js diff --git a/node_modules/undici/lib/fetch/body.js b/node_modules/undici/lib/fetch/body.js deleted file mode 100644 index 4afcfdf..0000000 --- a/node_modules/undici/lib/fetch/body.js +++ /dev/null @@ -1,613 +0,0 @@ -'use strict' - -const Busboy = require('@fastify/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 random -try { - const crypto = require('node:crypto') - random = (max) => crypto.randomInt(0, max) -} catch { - random = (max) => Math.floor(Math.random(max)) -} - -let ReadableStream = globalThis.ReadableStream - -/** @type {globalThis['File']} */ -const File = NativeFile ?? UndiciFile -const textEncoder = new TextEncoder() -const textDecoder = new TextDecoder() - -// 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' ? 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-0${`${random(1e11)}`.padStart(11, '0')}` - 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 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 = textEncoder.encode(prefix + - `; name="${escape(normalizeLinefeeds(name))}"` + - `\r\n\r\n${normalizeLinefeeds(value)}\r\n`) - blobParts.push(chunk) - length += chunk.byteLength - } else { - const chunk = textEncoder.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 = textEncoder.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 = new Busboy({ - headers, - preservePath: true - }) - } catch (err) { - throw new DOMException(`${err}`, 'AbortError') - } - - busboy.on('field', (name, value) => { - responseFormData.append(name, value) - }) - busboy.on('file', (name, value, filename, encoding, mimeType) => { - 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 - // Note that streaming decoder is stateful and cannot be reused - const streamingDecoder = 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 += streamingDecoder.decode(chunk, { stream: true }) - } - text += streamingDecoder.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. - await 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 = 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 deleted file mode 100644 index 218fcbe..0000000 --- a/node_modules/undici/lib/fetch/constants.js +++ /dev/null @@ -1,151 +0,0 @@ -'use strict' - -const { MessageChannel, receiveMessageOnPort } = require('worker_threads') - -const corsSafeListedMethods = ['GET', 'HEAD', 'POST'] -const corsSafeListedMethodsSet = new Set(corsSafeListedMethods) - -const nullBodyStatus = [101, 204, 205, 304] - -const redirectStatus = [301, 302, 303, 307, 308] -const redirectStatusSet = new Set(redirectStatus) - -// 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' -] - -const badPortsSet = new Set(badPorts) - -// 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 referrerPolicySet = new Set(referrerPolicy) - -const requestRedirect = ['follow', 'manual', 'error'] - -const safeMethods = ['GET', 'HEAD', 'OPTIONS', 'TRACE'] -const safeMethodsSet = new Set(safeMethods) - -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 forbiddenMethodsSet = new Set(forbiddenMethods) - -const subresource = [ - 'audio', - 'audioworklet', - 'font', - 'image', - 'manifest', - 'paintworklet', - 'script', - 'style', - 'track', - 'video', - 'xslt', - '' -] -const subresourceSet = new Set(subresource) - -/** @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, - subresourceSet, - badPortsSet, - redirectStatusSet, - corsSafeListedMethodsSet, - safeMethodsSet, - forbiddenMethodsSet, - referrerPolicySet -} diff --git a/node_modules/undici/lib/fetch/dataURL.js b/node_modules/undici/lib/fetch/dataURL.js deleted file mode 100644 index 7b6a606..0000000 --- a/node_modules/undici/lib/fetch/dataURL.js +++ /dev/null @@ -1,627 +0,0 @@ -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) { - if (!excludeFragment) { - return url.href - } - - const href = url.href - const hashLength = url.hash.length - - return hashLength === 0 ? href : href.substring(0, href.length - hashLength) -} - -// 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 deleted file mode 100644 index 3133d25..0000000 --- a/node_modules/undici/lib/fetch/file.js +++ /dev/null @@ -1,344 +0,0 @@ -'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') -const encoder = new TextEncoder() - -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(encoder.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 deleted file mode 100644 index 5975e26..0000000 --- a/node_modules/undici/lib/fetch/formdata.js +++ /dev/null @@ -1,265 +0,0 @@ -'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 deleted file mode 100644 index 1df6f12..0000000 --- a/node_modules/undici/lib/fetch/global.js +++ /dev/null @@ -1,40 +0,0 @@ -'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) { - 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 deleted file mode 100644 index 2f1c0be..0000000 --- a/node_modules/undici/lib/fetch/headers.js +++ /dev/null @@ -1,589 +0,0 @@ -// https://github.com/Ethan-Arrowood/undici-fetch - -'use strict' - -const { kHeadersList, kConstruct } = 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') - -/** - * @param {number} code - */ -function isHTTPWhiteSpaceCharCode (code) { - return code === 0x00a || code === 0x00d || code === 0x009 || code === 0x020 -} - -/** - * @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. - let i = 0; let j = potentialValue.length - - while (j > i && isHTTPWhiteSpaceCharCode(potentialValue.charCodeAt(j - 1))) --j - while (j > i && isHTTPWhiteSpaceCharCode(potentialValue.charCodeAt(i))) ++i - - return i === 0 && j === potentialValue.length ? potentialValue : potentialValue.substring(i, j) -} - -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 (let i = 0; i < object.length; ++i) { - const header = object[i] - // 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. - appendHeader(headers, 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 - const keys = Object.keys(object) - for (let i = 0; i < keys.length; ++i) { - appendHeader(headers, keys[i], object[keys[i]]) - } - } else { - throw webidl.errors.conversionFailed({ - prefix: 'Headers constructor', - argument: 'Argument 1', - types: ['sequence<sequence<ByteString>>', 'record<ByteString, ByteString>'] - }) - } -} - -/** - * @see https://fetch.spec.whatwg.org/#concept-headers-append - */ -function appendHeader (headers, name, 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 (headers[kGuard] === 'immutable') { - throw new TypeError('immutable') - } else if (headers[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. - return headers[kHeadersList].append(name, value) - - // 8. If headers’s guard is "request-no-cors", then remove - // privileged no-CORS request headers from headers -} - -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 === null ? null : [...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. - 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 - } - - this[kHeadersMap].delete(name) - } - - // https://fetch.spec.whatwg.org/#concept-header-list-get - get (name) { - const value = this[kHeadersMap].get(name.toLowerCase()) - - // 1. If list does not contain name, then 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 value === undefined ? null : value.value - } - - * [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) { - if (init === kConstruct) { - return - } - 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) - - return appendHeader(this, 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. - 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 - 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 (let i = 0; i < names.length; ++i) { - const [name, value] = names[i] - // 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 (let j = 0; j < cookies.length; ++j) { - headers.push([name, cookies[j]]) - } - } 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) - - if (this[kGuard] === 'immutable') { - const value = this[kHeadersSortedMap] - return makeIterator(() => value, 'Headers', - 'key') - } - - return makeIterator( - () => [...this[kHeadersSortedMap].values()], - 'Headers', - 'key' - ) - } - - values () { - webidl.brandCheck(this, Headers) - - if (this[kGuard] === 'immutable') { - const value = this[kHeadersSortedMap] - return makeIterator(() => value, 'Headers', - 'value') - } - - return makeIterator( - () => [...this[kHeadersSortedMap].values()], - 'Headers', - 'value' - ) - } - - entries () { - webidl.brandCheck(this, Headers) - - if (this[kGuard] === 'immutable') { - const value = this[kHeadersSortedMap] - return makeIterator(() => value, 'Headers', - 'key+value') - } - - 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 deleted file mode 100644 index dea2069..0000000 --- a/node_modules/undici/lib/fetch/index.js +++ /dev/null @@ -1,2148 +0,0 @@ -// 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 { - redirectStatusSet, - nullBodyStatus, - safeMethodsSet, - requestBodyHeader, - subresourceSet, - DOMException -} = require('./constants') -const { kHeadersList } = require('../core/symbols') -const EE = require('events') -const { Readable, pipeline } = require('stream') -const { addAbortListener, 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') -const GET_OR_HEAD = ['GET', 'HEAD'] - -/** @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 -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: - addAbortListener( - requestObject.signal, - () => { - // 1. Set locallyAborted to true. - locallyAborted = true - - // 2. Assert: controller is non-null. - assert(controller != null) - - // 3. Abort controller with requestObject’s signal’s abort reason. - controller.abort(requestObject.signal.reason) - - // 4. Abort the fetch() call with p, request, responseObject, - // and requestObject’s signal’s abort reason. - abortFetch(p, request, responseObject, requestObject.signal.reason) - } - ) - - // 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 Promise.resolve() - } - - // 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 Promise.resolve() - } - - // 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 Promise.resolve() - } - - // 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 (!response.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.href, 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 (subresourceSet.has(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 -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 Promise.resolve(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 Promise.resolve(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 Promise.resolve(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 Promise.resolve(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 Promise.resolve(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 Promise.resolve(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 Promise.resolve(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 Promise.resolve(makeNetworkError('not implemented... yet...')) - } - case 'http:': - case 'https:': { - // Return the result of running HTTP fetch given fetchParams. - - return httpFetch(fetchParams) - .catch((err) => makeNetworkError(err)) - } - default: { - return Promise.resolve(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 -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. - return fullyReadBody(response.body, processBody, processBodyError) - } - return Promise.resolve() - } -} - -// 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 (redirectStatusSet.has(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 -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 Promise.resolve(makeNetworkError(err)) - } - - // 6. If locationURL’s scheme is not an HTTP(S) scheme, then return a network - // error. - if (!urlIsHttpHttpsScheme(locationURL)) { - return Promise.resolve(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 Promise.resolve(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 Promise.resolve(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 Promise.resolve(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 Promise.resolve(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_OR_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') - - // https://fetch.spec.whatwg.org/#authentication-entries - request.headersList.delete('proxy-authorization', true) - - // "Cookie" and "Host" are forbidden request-headers, which undici doesn't implement. - request.headersList.delete('cookie') - request.headersList.delete('host') - } - - // 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', typeof esbuildDetection === 'undefined' ? 'undici' : 'node') - } - - // 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') - } - } - - httpRequest.headersList.delete('host') - - // 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 ( - !safeMethodsSet.has(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, err) - } - - 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 || request.body.stream) : 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 H2, the headers are a plain JS object - // We distinguish between them and iterate accordingly - if (Array.isArray(headersList)) { - 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[kHeadersList].append(key, val) - } - } else { - const keys = Object.keys(headersList) - for (const key of keys) { - const val = headersList[key] - 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()).reverse() - } else if (key.toLowerCase() === 'location') { - location = val - } - - headers[kHeadersList].append(key, val) - } - } - - this.body = new Readable({ read: resume }) - - const decoders = [] - - const willFollow = request.redirect === 'follow' && - location && - redirectStatusSet.has(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({ - // Be less strict when decoding compressed responses, since sometimes - // servers send slightly invalid responses that are still accepted - // by common browsers. - // Always using Z_SYNC_FLUSH is what cURL does. - flush: zlib.constants.Z_SYNC_FLUSH, - finishFlush: zlib.constants.Z_SYNC_FLUSH - })) - } 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[kHeadersList].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 deleted file mode 100644 index 6fe4dff..0000000 --- a/node_modules/undici/lib/fetch/request.js +++ /dev/null @@ -1,946 +0,0 @@ -/* 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, - normalizeMethodRecord -} = require('./util') -const { - forbiddenMethodsSet, - corsSafeListedMethodsSet, - 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, kConstruct } = require('../core/symbols') -const assert = require('assert') -const { getMaxListeners, setMaxListeners, getEventListeners, defaultMaxListeners } = require('events') - -let TransformStream = globalThis.TransformStream - -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 === kConstruct) { - 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] - }) - - const initHasKey = Object.keys(init).length !== 0 - - // 13. If init is not empty, then: - if (initHasKey) { - // 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 scheme is "about" and path is the string "client" - // - parsedReferrer’s origin is not same origin with origin - // then set request’s referrer to "client". - if ( - (parsedReferrer.protocol === 'about:' && parsedReferrer.hostname === 'client') || - (origin && !sameOrigin(parsedReferrer, this[kRealm].settingsObject.baseUrl)) - ) { - request.referrer = 'client' - } else { - // 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 != 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(method)) { - throw new TypeError(`'${method}' is not a valid HTTP method.`) - } - - if (forbiddenMethodsSet.has(method.toUpperCase())) { - throw new TypeError(`'${method}' HTTP method is unsupported.`) - } - - // 3. Normalize method. - method = normalizeMethodRecord[method] ?? normalizeMethod(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. - // TODO: could this be simplified with AbortSignal.any - // (https://dom.spec.whatwg.org/#dom-abortsignal-any) - 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 {} - - util.addAbortListener(signal, abort) - 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(kConstruct) - 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 (!corsSafeListedMethodsSet.has(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 (initHasKey) { - /** @type {HeadersList} */ - const headersList = this[kHeaders][kHeadersList] - // 1. Let headers be a copy of this’s headers and its associated header - // list. - // 2. If init["headers"] exists, then set headers to init["headers"]. - const headers = init.headers !== undefined ? init.headers : new HeadersList(headersList) - - // 3. Empty this’s headers’s header list. - headersList.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 instanceof HeadersList) { - for (const [key, val] of headers) { - headersList.append(key, val) - } - // Note: Copy the `set-cookie` meta-data. - headersList.cookies = headers.cookies - } 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(kConstruct) - clonedRequestObject[kState] = clonedRequest - clonedRequestObject[kRealm] = this[kRealm] - clonedRequestObject[kHeaders] = new Headers(kConstruct) - 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 { - util.addAbortListener( - this.signal, - () => { - ac.abort(this.signal.reason) - } - ) - } - 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 deleted file mode 100644 index 7338612..0000000 --- a/node_modules/undici/lib/fetch/response.js +++ /dev/null @@ -1,571 +0,0 @@ -'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 { - redirectStatusSet, - 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, kConstruct } = require('../core/symbols') -const assert = require('assert') -const { types } = require('util') - -const ReadableStream = globalThis.ReadableStream || require('stream/web').ReadableStream -const textEncoder = new TextEncoder('utf-8') - -// 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, 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 = textEncoder.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 (!redirectStatusSet.has(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(kConstruct) - 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, err = null) { - // 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(Object.assign(new DOMException('The operation was aborted.', 'AbortError'), { cause: err })) - : makeNetworkError(Object.assign(new DOMException('Request was cancelled.'), { cause: err })) -} - -// 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.isArrayBuffer(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 deleted file mode 100644 index 0b947d5..0000000 --- a/node_modules/undici/lib/fetch/symbols.js +++ /dev/null @@ -1,10 +0,0 @@ -'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 deleted file mode 100644 index ede4ec4..0000000 --- a/node_modules/undici/lib/fetch/util.js +++ /dev/null @@ -1,1144 +0,0 @@ -'use strict' - -const { redirectStatusSet, referrerPolicySet: referrerPolicyTokens, badPortsSet } = 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') - -let supportedHashes = [] - -// https://nodejs.org/api/crypto.html#determining-if-crypto-support-is-unavailable -/** @type {import('crypto')|undefined} */ -let crypto - -try { - crypto = require('crypto') - const possibleRelevantHashes = ['sha256', 'sha384', 'sha512'] - supportedHashes = crypto.getHashes().filter((hash) => possibleRelevantHashes.includes(hash)) -/* c8 ignore next 3 */ -} 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 (!redirectStatusSet.has(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) && badPortsSet.has(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 -} - -/** - * @see https://tools.ietf.org/html/rfc7230#section-3.2.6 - * @param {number} c - */ -function isTokenCharCode (c) { - switch (c) { - case 0x22: - case 0x28: - case 0x29: - case 0x2c: - case 0x2f: - case 0x3a: - case 0x3b: - case 0x3c: - case 0x3d: - case 0x3e: - case 0x3f: - case 0x40: - case 0x5b: - case 0x5c: - case 0x5d: - case 0x7b: - case 0x7d: - // DQUOTE and "(),/:;<=>?@[\]{}" - return false - default: - // VCHAR %x21-7E - return c >= 0x21 && c <= 0x7e - } -} - -/** - * @param {string} characters - */ -function isValidHTTPToken (characters) { - if (characters.length === 0) { - return false - } - for (let i = 0; i < characters.length; ++i) { - if (!isTokenCharCode(characters.charCodeAt(i))) { - return false - } - } - return true -} - -/** - * @see https://fetch.spec.whatwg.org/#header-name - * @param {string} potentialValue - */ -function isValidHeaderName (potentialValue) { - 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.has(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 response is not eligible for integrity validation, return false. - // TODO - - // 4. If parsedMetadata is the empty set, return true. - if (parsedMetadata.length === 0) { - return true - } - - // 5. Let metadata be the result of getting the strongest - // metadata from parsedMetadata. - const strongest = getStrongestMetadata(parsedMetadata) - const metadata = filterMetadataListByAlgorithm(parsedMetadata, strongest) - - // 6. 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 - - // See https://github.com/web-platform-tests/wpt/commit/e4c5cc7a5e48093220528dfdd1c4012dc3837a0e - // "be liberal with padding". This is annoying, and it's not even in the spec. - - // 3. Let actualValue be the result of applying algorithm to bytes. - let actualValue = crypto.createHash(algorithm).update(bytes).digest('base64') - - if (actualValue[actualValue.length - 1] === '=') { - if (actualValue[actualValue.length - 2] === '=') { - actualValue = actualValue.slice(0, -2) - } else { - actualValue = actualValue.slice(0, -1) - } - } - - // 4. If actualValue is a case-sensitive match for expectedValue, - // return true. - if (compareBase64Mixed(actualValue, expectedValue)) { - return true - } - } - - // 7. 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-Za-z0-9+/]+|[A-Za-z0-9_-]+)={0,2}(?:\s|$)( +[!-~]*)?)?/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 - - // 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 || - parsedToken.groups.algo === 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.toLowerCase() - - // 5. If algorithm is a hash function recognized by the user - // agent, add the parsed token to result. - if (supportedHashes.includes(algorithm)) { - result.push(parsedToken.groups) - } - } - - // 4. Return no metadata if empty is true, otherwise return result. - if (empty === true) { - return 'no metadata' - } - - return result -} - -/** - * @param {{ algo: 'sha256' | 'sha384' | 'sha512' }[]} metadataList - */ -function getStrongestMetadata (metadataList) { - // Let algorithm be the algo component of the first item in metadataList. - // Can be sha256 - let algorithm = metadataList[0].algo - // If the algorithm is sha512, then it is the strongest - // and we can return immediately - if (algorithm[3] === '5') { - return algorithm - } - - for (let i = 1; i < metadataList.length; ++i) { - const metadata = metadataList[i] - // If the algorithm is sha512, then it is the strongest - // and we can break the loop immediately - if (metadata.algo[3] === '5') { - algorithm = 'sha512' - break - // If the algorithm is sha384, then a potential sha256 or sha384 is ignored - } else if (algorithm[3] === '3') { - continue - // algorithm is sha256, check if algorithm is sha384 and if so, set it as - // the strongest - } else if (metadata.algo[3] === '3') { - algorithm = 'sha384' - } - } - return algorithm -} - -function filterMetadataListByAlgorithm (metadataList, algorithm) { - if (metadataList.length === 1) { - return metadataList - } - - let pos = 0 - for (let i = 0; i < metadataList.length; ++i) { - if (metadataList[i].algo === algorithm) { - metadataList[pos++] = metadataList[i] - } - } - - metadataList.length = pos - - return metadataList -} - -/** - * Compares two base64 strings, allowing for base64url - * in the second string. - * -* @param {string} actualValue always base64 - * @param {string} expectedValue base64 or base64url - * @returns {boolean} - */ -function compareBase64Mixed (actualValue, expectedValue) { - if (actualValue.length !== expectedValue.length) { - return false - } - for (let i = 0; i < actualValue.length; ++i) { - if (actualValue[i] !== expectedValue[i]) { - if ( - (actualValue[i] === '+' && expectedValue[i] === '-') || - (actualValue[i] === '/' && expectedValue[i] === '_') - ) { - continue - } - return false - } - } - - return true -} - -// 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' -} - -const normalizeMethodRecord = { - delete: 'DELETE', - DELETE: 'DELETE', - get: 'GET', - GET: 'GET', - head: 'HEAD', - HEAD: 'HEAD', - options: 'OPTIONS', - OPTIONS: 'OPTIONS', - post: 'POST', - POST: 'POST', - put: 'PUT', - PUT: 'PUT' -} - -// Note: object prototypes should not be able to be referenced. e.g. `Object#hasOwnProperty`. -Object.setPrototypeOf(normalizeMethodRecord, null) - -/** - * @see https://fetch.spec.whatwg.org/#concept-method-normalize - * @param {string} method - */ -function normalizeMethod (method) { - return normalizeMethodRecord[method.toLowerCase()] ?? 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 - */ -async 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 = processBody - - // 3. Let errorSteps be to queue a fetch task to run processBodyError, - // with taskDestination. - const errorSteps = processBodyError - - // 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. - try { - const result = await readAllBytes(reader) - successSteps(result) - } catch (e) { - errorSteps(e) - } -} - -/** @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 - */ -async function readAllBytes (reader) { - const bytes = [] - let byteLength = 0 - - while (true) { - const { done, value: chunk } = await reader.read() - - if (done) { - // 1. Call successSteps with bytes. - return Buffer.concat(bytes, byteLength) - } - - // 1. If chunk is not a Uint8Array object, call failureSteps - // with a TypeError and abort these steps. - if (!isUint8Array(chunk)) { - throw new TypeError('Received non-Uint8Array chunk') - } - - // 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, - normalizeMethodRecord, - parseMetadata -} diff --git a/node_modules/undici/lib/fetch/webidl.js b/node_modules/undici/lib/fetch/webidl.js deleted file mode 100644 index 6fcf2ab..0000000 --- a/node_modules/undici/lib/fetch/webidl.js +++ /dev/null @@ -1,646 +0,0 @@ -'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++) { - if (x.charCodeAt(index) > 255) { - throw new TypeError( - 'Cannot convert argument to a ByteString because the character at ' + - `index ${index} has a value of ${x.charCodeAt(index)} 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 deleted file mode 100644 index 1d1d2b6..0000000 --- a/node_modules/undici/lib/fileapi/encoding.js +++ /dev/null @@ -1,290 +0,0 @@ -'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 deleted file mode 100644 index cd36a22..0000000 --- a/node_modules/undici/lib/fileapi/filereader.js +++ /dev/null @@ -1,344 +0,0 @@ -'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 deleted file mode 100644 index 778cf22..0000000 --- a/node_modules/undici/lib/fileapi/progressevent.js +++ /dev/null @@ -1,78 +0,0 @@ -'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 deleted file mode 100644 index dd11746..0000000 --- a/node_modules/undici/lib/fileapi/symbols.js +++ /dev/null @@ -1,10 +0,0 @@ -'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 deleted file mode 100644 index 1d10899..0000000 --- a/node_modules/undici/lib/fileapi/util.js +++ /dev/null @@ -1,392 +0,0 @@ -'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 index 18bfd73..0c7528f 100644 --- a/node_modules/undici/lib/global.js +++ b/node_modules/undici/lib/global.js @@ -4,7 +4,7 @@ // 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') +const Agent = require('./dispatcher/agent') if (getGlobalDispatcher() === undefined) { setGlobalDispatcher(new Agent()) diff --git a/node_modules/undici/lib/handler/DecoratorHandler.js b/node_modules/undici/lib/handler/DecoratorHandler.js deleted file mode 100644 index 9d70a76..0000000 --- a/node_modules/undici/lib/handler/DecoratorHandler.js +++ /dev/null @@ -1,35 +0,0 @@ -'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 deleted file mode 100644 index 933725f..0000000 --- a/node_modules/undici/lib/handler/RedirectHandler.js +++ /dev/null @@ -1,221 +0,0 @@ -'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) { - if (header.length === 4) { - return util.headerNameToString(header) === 'host' - } - if (removeContent && util.headerNameToString(header).startsWith('content-')) { - return true - } - if (unknownOrigin && (header.length === 13 || header.length === 6 || header.length === 19)) { - const name = util.headerNameToString(header) - return name === 'authorization' || name === 'cookie' || name === 'proxy-authorization' - } - return false -} - -// 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/handler/RetryHandler.js b/node_modules/undici/lib/handler/RetryHandler.js deleted file mode 100644 index 3710447..0000000 --- a/node_modules/undici/lib/handler/RetryHandler.js +++ /dev/null @@ -1,336 +0,0 @@ -const assert = require('assert') - -const { kRetryHandlerDefaultRetry } = require('../core/symbols') -const { RequestRetryError } = require('../core/errors') -const { isDisturbed, parseHeaders, parseRangeHeader } = require('../core/util') - -function calculateRetryAfterHeader (retryAfter) { - const current = Date.now() - const diff = new Date(retryAfter).getTime() - current - - return diff -} - -class RetryHandler { - constructor (opts, handlers) { - const { retryOptions, ...dispatchOpts } = opts - const { - // Retry scoped - retry: retryFn, - maxRetries, - maxTimeout, - minTimeout, - timeoutFactor, - // Response scoped - methods, - errorCodes, - retryAfter, - statusCodes - } = retryOptions ?? {} - - this.dispatch = handlers.dispatch - this.handler = handlers.handler - this.opts = dispatchOpts - this.abort = null - this.aborted = false - this.retryOpts = { - retry: retryFn ?? RetryHandler[kRetryHandlerDefaultRetry], - retryAfter: retryAfter ?? true, - maxTimeout: maxTimeout ?? 30 * 1000, // 30s, - timeout: minTimeout ?? 500, // .5s - timeoutFactor: timeoutFactor ?? 2, - maxRetries: maxRetries ?? 5, - // What errors we should retry - methods: methods ?? ['GET', 'HEAD', 'OPTIONS', 'PUT', 'DELETE', 'TRACE'], - // Indicates which errors to retry - statusCodes: statusCodes ?? [500, 502, 503, 504, 429], - // List of errors to retry - errorCodes: errorCodes ?? [ - 'ECONNRESET', - 'ECONNREFUSED', - 'ENOTFOUND', - 'ENETDOWN', - 'ENETUNREACH', - 'EHOSTDOWN', - 'EHOSTUNREACH', - 'EPIPE' - ] - } - - this.retryCount = 0 - this.start = 0 - this.end = null - this.etag = null - this.resume = null - - // Handle possible onConnect duplication - this.handler.onConnect(reason => { - this.aborted = true - if (this.abort) { - this.abort(reason) - } else { - this.reason = reason - } - }) - } - - onRequestSent () { - if (this.handler.onRequestSent) { - this.handler.onRequestSent() - } - } - - onUpgrade (statusCode, headers, socket) { - if (this.handler.onUpgrade) { - this.handler.onUpgrade(statusCode, headers, socket) - } - } - - onConnect (abort) { - if (this.aborted) { - abort(this.reason) - } else { - this.abort = abort - } - } - - onBodySent (chunk) { - if (this.handler.onBodySent) return this.handler.onBodySent(chunk) - } - - static [kRetryHandlerDefaultRetry] (err, { state, opts }, cb) { - const { statusCode, code, headers } = err - const { method, retryOptions } = opts - const { - maxRetries, - timeout, - maxTimeout, - timeoutFactor, - statusCodes, - errorCodes, - methods - } = retryOptions - let { counter, currentTimeout } = state - - currentTimeout = - currentTimeout != null && currentTimeout > 0 ? currentTimeout : timeout - - // Any code that is not a Undici's originated and allowed to retry - if ( - code && - code !== 'UND_ERR_REQ_RETRY' && - code !== 'UND_ERR_SOCKET' && - !errorCodes.includes(code) - ) { - cb(err) - return - } - - // If a set of method are provided and the current method is not in the list - if (Array.isArray(methods) && !methods.includes(method)) { - cb(err) - return - } - - // If a set of status code are provided and the current status code is not in the list - if ( - statusCode != null && - Array.isArray(statusCodes) && - !statusCodes.includes(statusCode) - ) { - cb(err) - return - } - - // If we reached the max number of retries - if (counter > maxRetries) { - cb(err) - return - } - - let retryAfterHeader = headers != null && headers['retry-after'] - if (retryAfterHeader) { - retryAfterHeader = Number(retryAfterHeader) - retryAfterHeader = isNaN(retryAfterHeader) - ? calculateRetryAfterHeader(retryAfterHeader) - : retryAfterHeader * 1e3 // Retry-After is in seconds - } - - const retryTimeout = - retryAfterHeader > 0 - ? Math.min(retryAfterHeader, maxTimeout) - : Math.min(currentTimeout * timeoutFactor ** counter, maxTimeout) - - state.currentTimeout = retryTimeout - - setTimeout(() => cb(null), retryTimeout) - } - - onHeaders (statusCode, rawHeaders, resume, statusMessage) { - const headers = parseHeaders(rawHeaders) - - this.retryCount += 1 - - if (statusCode >= 300) { - this.abort( - new RequestRetryError('Request failed', statusCode, { - headers, - count: this.retryCount - }) - ) - return false - } - - // Checkpoint for resume from where we left it - if (this.resume != null) { - this.resume = null - - if (statusCode !== 206) { - return true - } - - const contentRange = parseRangeHeader(headers['content-range']) - // If no content range - if (!contentRange) { - this.abort( - new RequestRetryError('Content-Range mismatch', statusCode, { - headers, - count: this.retryCount - }) - ) - return false - } - - // Let's start with a weak etag check - if (this.etag != null && this.etag !== headers.etag) { - this.abort( - new RequestRetryError('ETag mismatch', statusCode, { - headers, - count: this.retryCount - }) - ) - return false - } - - const { start, size, end = size } = contentRange - - assert(this.start === start, 'content-range mismatch') - assert(this.end == null || this.end === end, 'content-range mismatch') - - this.resume = resume - return true - } - - if (this.end == null) { - if (statusCode === 206) { - // First time we receive 206 - const range = parseRangeHeader(headers['content-range']) - - if (range == null) { - return this.handler.onHeaders( - statusCode, - rawHeaders, - resume, - statusMessage - ) - } - - const { start, size, end = size } = range - - assert( - start != null && Number.isFinite(start) && this.start !== start, - 'content-range mismatch' - ) - assert(Number.isFinite(start)) - assert( - end != null && Number.isFinite(end) && this.end !== end, - 'invalid content-length' - ) - - this.start = start - this.end = end - } - - // We make our best to checkpoint the body for further range headers - if (this.end == null) { - const contentLength = headers['content-length'] - this.end = contentLength != null ? Number(contentLength) : null - } - - assert(Number.isFinite(this.start)) - assert( - this.end == null || Number.isFinite(this.end), - 'invalid content-length' - ) - - this.resume = resume - this.etag = headers.etag != null ? headers.etag : null - - return this.handler.onHeaders( - statusCode, - rawHeaders, - resume, - statusMessage - ) - } - - const err = new RequestRetryError('Request failed', statusCode, { - headers, - count: this.retryCount - }) - - this.abort(err) - - return false - } - - onData (chunk) { - this.start += chunk.length - - return this.handler.onData(chunk) - } - - onComplete (rawTrailers) { - this.retryCount = 0 - return this.handler.onComplete(rawTrailers) - } - - onError (err) { - if (this.aborted || isDisturbed(this.opts.body)) { - return this.handler.onError(err) - } - - this.retryOpts.retry( - err, - { - state: { counter: this.retryCount++, currentTimeout: this.retryAfter }, - opts: { retryOptions: this.retryOpts, ...this.opts } - }, - onRetry.bind(this) - ) - - function onRetry (err) { - if (err != null || this.aborted || isDisturbed(this.opts.body)) { - return this.handler.onError(err) - } - - if (this.start !== 0) { - this.opts = { - ...this.opts, - headers: { - ...this.opts.headers, - range: `bytes=${this.start}-${this.end ?? ''}` - } - } - } - - try { - this.dispatch(this.opts, this) - } catch (err) { - this.handler.onError(err) - } - } - } -} - -module.exports = RetryHandler diff --git a/node_modules/undici/lib/handler/cache-handler.js b/node_modules/undici/lib/handler/cache-handler.js new file mode 100644 index 0000000..e02ff9c --- /dev/null +++ b/node_modules/undici/lib/handler/cache-handler.js @@ -0,0 +1,448 @@ +'use strict' + +const util = require('../core/util') +const { + parseCacheControlHeader, + parseVaryHeader, + isEtagUsable +} = require('../util/cache') +const { parseHttpDate } = require('../util/date.js') + +function noop () {} + +// Status codes that we can use some heuristics on to cache +const HEURISTICALLY_CACHEABLE_STATUS_CODES = [ + 200, 203, 204, 206, 300, 301, 308, 404, 405, 410, 414, 501 +] + +const MAX_RESPONSE_AGE = 2147483647000 + +/** + * @typedef {import('../../types/dispatcher.d.ts').default.DispatchHandler} DispatchHandler + * + * @implements {DispatchHandler} + */ +class CacheHandler { + /** + * @type {import('../../types/cache-interceptor.d.ts').default.CacheKey} + */ + #cacheKey + + /** + * @type {import('../../types/cache-interceptor.d.ts').default.CacheHandlerOptions['type']} + */ + #cacheType + + /** + * @type {number | undefined} + */ + #cacheByDefault + + /** + * @type {import('../../types/cache-interceptor.d.ts').default.CacheStore} + */ + #store + + /** + * @type {import('../../types/dispatcher.d.ts').default.DispatchHandler} + */ + #handler + + /** + * @type {import('node:stream').Writable | undefined} + */ + #writeStream + + /** + * @param {import('../../types/cache-interceptor.d.ts').default.CacheHandlerOptions} opts + * @param {import('../../types/cache-interceptor.d.ts').default.CacheKey} cacheKey + * @param {import('../../types/dispatcher.d.ts').default.DispatchHandler} handler + */ + constructor ({ store, type, cacheByDefault }, cacheKey, handler) { + this.#store = store + this.#cacheType = type + this.#cacheByDefault = cacheByDefault + this.#cacheKey = cacheKey + this.#handler = handler + } + + onRequestStart (controller, context) { + this.#writeStream?.destroy() + this.#writeStream = undefined + this.#handler.onRequestStart?.(controller, context) + } + + onRequestUpgrade (controller, statusCode, headers, socket) { + this.#handler.onRequestUpgrade?.(controller, statusCode, headers, socket) + } + + /** + * @param {import('../../types/dispatcher.d.ts').default.DispatchController} controller + * @param {number} statusCode + * @param {import('../../types/header.d.ts').IncomingHttpHeaders} resHeaders + * @param {string} statusMessage + */ + onResponseStart ( + controller, + statusCode, + resHeaders, + statusMessage + ) { + const downstreamOnHeaders = () => + this.#handler.onResponseStart?.( + controller, + statusCode, + resHeaders, + statusMessage + ) + + if ( + !util.safeHTTPMethods.includes(this.#cacheKey.method) && + statusCode >= 200 && + statusCode <= 399 + ) { + // Successful response to an unsafe method, delete it from cache + // https://www.rfc-editor.org/rfc/rfc9111.html#name-invalidating-stored-response + try { + this.#store.delete(this.#cacheKey)?.catch?.(noop) + } catch { + // Fail silently + } + return downstreamOnHeaders() + } + + const cacheControlHeader = resHeaders['cache-control'] + const heuristicallyCacheable = resHeaders['last-modified'] && HEURISTICALLY_CACHEABLE_STATUS_CODES.includes(statusCode) + if ( + !cacheControlHeader && + !resHeaders['expires'] && + !heuristicallyCacheable && + !this.#cacheByDefault + ) { + // Don't have anything to tell us this response is cachable and we're not + // caching by default + return downstreamOnHeaders() + } + + const cacheControlDirectives = cacheControlHeader ? parseCacheControlHeader(cacheControlHeader) : {} + if (!canCacheResponse(this.#cacheType, statusCode, resHeaders, cacheControlDirectives)) { + return downstreamOnHeaders() + } + + const now = Date.now() + const resAge = resHeaders.age ? getAge(resHeaders.age) : undefined + if (resAge && resAge >= MAX_RESPONSE_AGE) { + // Response considered stale + return downstreamOnHeaders() + } + + const resDate = typeof resHeaders.date === 'string' + ? parseHttpDate(resHeaders.date) + : undefined + + const staleAt = + determineStaleAt(this.#cacheType, now, resAge, resHeaders, resDate, cacheControlDirectives) ?? + this.#cacheByDefault + if (staleAt === undefined || (resAge && resAge > staleAt)) { + return downstreamOnHeaders() + } + + const baseTime = resDate ? resDate.getTime() : now + const absoluteStaleAt = staleAt + baseTime + if (now >= absoluteStaleAt) { + // Response is already stale + return downstreamOnHeaders() + } + + let varyDirectives + if (this.#cacheKey.headers && resHeaders.vary) { + varyDirectives = parseVaryHeader(resHeaders.vary, this.#cacheKey.headers) + if (!varyDirectives) { + // Parse error + return downstreamOnHeaders() + } + } + + const deleteAt = determineDeleteAt(baseTime, cacheControlDirectives, absoluteStaleAt) + const strippedHeaders = stripNecessaryHeaders(resHeaders, cacheControlDirectives) + + /** + * @type {import('../../types/cache-interceptor.d.ts').default.CacheValue} + */ + const value = { + statusCode, + statusMessage, + headers: strippedHeaders, + vary: varyDirectives, + cacheControlDirectives, + cachedAt: resAge ? now - resAge : now, + staleAt: absoluteStaleAt, + deleteAt + } + + if (typeof resHeaders.etag === 'string' && isEtagUsable(resHeaders.etag)) { + value.etag = resHeaders.etag + } + + this.#writeStream = this.#store.createWriteStream(this.#cacheKey, value) + if (!this.#writeStream) { + return downstreamOnHeaders() + } + + const handler = this + this.#writeStream + .on('drain', () => controller.resume()) + .on('error', function () { + // TODO (fix): Make error somehow observable? + handler.#writeStream = undefined + + // Delete the value in case the cache store is holding onto state from + // the call to createWriteStream + handler.#store.delete(handler.#cacheKey) + }) + .on('close', function () { + if (handler.#writeStream === this) { + handler.#writeStream = undefined + } + + // TODO (fix): Should we resume even if was paused downstream? + controller.resume() + }) + + return downstreamOnHeaders() + } + + onResponseData (controller, chunk) { + if (this.#writeStream?.write(chunk) === false) { + controller.pause() + } + + this.#handler.onResponseData?.(controller, chunk) + } + + onResponseEnd (controller, trailers) { + this.#writeStream?.end() + this.#handler.onResponseEnd?.(controller, trailers) + } + + onResponseError (controller, err) { + this.#writeStream?.destroy(err) + this.#writeStream = undefined + this.#handler.onResponseError?.(controller, err) + } +} + +/** + * @see https://www.rfc-editor.org/rfc/rfc9111.html#name-storing-responses-to-authen + * + * @param {import('../../types/cache-interceptor.d.ts').default.CacheOptions['type']} cacheType + * @param {number} statusCode + * @param {import('../../types/header.d.ts').IncomingHttpHeaders} resHeaders + * @param {import('../../types/cache-interceptor.d.ts').default.CacheControlDirectives} cacheControlDirectives + */ +function canCacheResponse (cacheType, statusCode, resHeaders, cacheControlDirectives) { + if (statusCode !== 200 && statusCode !== 307) { + return false + } + + if (cacheControlDirectives['no-store']) { + return false + } + + if (cacheType === 'shared' && cacheControlDirectives.private === true) { + return false + } + + // https://www.rfc-editor.org/rfc/rfc9111.html#section-4.1-5 + if (resHeaders.vary?.includes('*')) { + return false + } + + // https://www.rfc-editor.org/rfc/rfc9111.html#name-storing-responses-to-authen + if (resHeaders.authorization) { + if (!cacheControlDirectives.public || typeof resHeaders.authorization !== 'string') { + return false + } + + if ( + Array.isArray(cacheControlDirectives['no-cache']) && + cacheControlDirectives['no-cache'].includes('authorization') + ) { + return false + } + + if ( + Array.isArray(cacheControlDirectives['private']) && + cacheControlDirectives['private'].includes('authorization') + ) { + return false + } + } + + return true +} + +/** + * @param {string | string[]} ageHeader + * @returns {number | undefined} + */ +function getAge (ageHeader) { + const age = parseInt(Array.isArray(ageHeader) ? ageHeader[0] : ageHeader) + + return isNaN(age) ? undefined : age * 1000 +} + +/** + * @param {import('../../types/cache-interceptor.d.ts').default.CacheOptions['type']} cacheType + * @param {number} now + * @param {number | undefined} age + * @param {import('../../types/header.d.ts').IncomingHttpHeaders} resHeaders + * @param {Date | undefined} responseDate + * @param {import('../../types/cache-interceptor.d.ts').default.CacheControlDirectives} cacheControlDirectives + * + * @returns {number | undefined} time that the value is stale at in seconds or undefined if it shouldn't be cached + */ +function determineStaleAt (cacheType, now, age, resHeaders, responseDate, cacheControlDirectives) { + if (cacheType === 'shared') { + // Prioritize s-maxage since we're a shared cache + // s-maxage > max-age > Expire + // https://www.rfc-editor.org/rfc/rfc9111.html#section-5.2.2.10-3 + const sMaxAge = cacheControlDirectives['s-maxage'] + if (sMaxAge !== undefined) { + return sMaxAge > 0 ? sMaxAge * 1000 : undefined + } + } + + const maxAge = cacheControlDirectives['max-age'] + if (maxAge !== undefined) { + return maxAge > 0 ? maxAge * 1000 : undefined + } + + if (typeof resHeaders.expires === 'string') { + // https://www.rfc-editor.org/rfc/rfc9111.html#section-5.3 + const expiresDate = parseHttpDate(resHeaders.expires) + if (expiresDate) { + if (now >= expiresDate.getTime()) { + return undefined + } + + if (responseDate) { + if (responseDate >= expiresDate) { + return undefined + } + + if (age !== undefined && age > (expiresDate - responseDate)) { + return undefined + } + } + + return expiresDate.getTime() - now + } + } + + if (typeof resHeaders['last-modified'] === 'string') { + // https://www.rfc-editor.org/rfc/rfc9111.html#name-calculating-heuristic-fresh + const lastModified = new Date(resHeaders['last-modified']) + if (isValidDate(lastModified)) { + if (lastModified.getTime() >= now) { + return undefined + } + + const responseAge = now - lastModified.getTime() + + return responseAge * 0.1 + } + } + + if (cacheControlDirectives.immutable) { + // https://www.rfc-editor.org/rfc/rfc8246.html#section-2.2 + return 31536000 + } + + return undefined +} + +/** + * @param {number} now + * @param {import('../../types/cache-interceptor.d.ts').default.CacheControlDirectives} cacheControlDirectives + * @param {number} staleAt + */ +function determineDeleteAt (now, cacheControlDirectives, staleAt) { + let staleWhileRevalidate = -Infinity + let staleIfError = -Infinity + let immutable = -Infinity + + if (cacheControlDirectives['stale-while-revalidate']) { + staleWhileRevalidate = staleAt + (cacheControlDirectives['stale-while-revalidate'] * 1000) + } + + if (cacheControlDirectives['stale-if-error']) { + staleIfError = staleAt + (cacheControlDirectives['stale-if-error'] * 1000) + } + + if (staleWhileRevalidate === -Infinity && staleIfError === -Infinity) { + immutable = now + 31536000000 + } + + return Math.max(staleAt, staleWhileRevalidate, staleIfError, immutable) +} + +/** + * Strips headers required to be removed in cached responses + * @param {import('../../types/header.d.ts').IncomingHttpHeaders} resHeaders + * @param {import('../../types/cache-interceptor.d.ts').default.CacheControlDirectives} cacheControlDirectives + * @returns {Record<string, string | string []>} + */ +function stripNecessaryHeaders (resHeaders, cacheControlDirectives) { + const headersToRemove = [ + 'connection', + 'proxy-authenticate', + 'proxy-authentication-info', + 'proxy-authorization', + 'proxy-connection', + 'te', + 'transfer-encoding', + 'upgrade', + // We'll add age back when serving it + 'age' + ] + + if (resHeaders['connection']) { + if (Array.isArray(resHeaders['connection'])) { + // connection: a + // connection: b + headersToRemove.push(...resHeaders['connection'].map(header => header.trim())) + } else { + // connection: a, b + headersToRemove.push(...resHeaders['connection'].split(',').map(header => header.trim())) + } + } + + if (Array.isArray(cacheControlDirectives['no-cache'])) { + headersToRemove.push(...cacheControlDirectives['no-cache']) + } + + if (Array.isArray(cacheControlDirectives['private'])) { + headersToRemove.push(...cacheControlDirectives['private']) + } + + let strippedHeaders + for (const headerName of headersToRemove) { + if (resHeaders[headerName]) { + strippedHeaders ??= { ...resHeaders } + delete strippedHeaders[headerName] + } + } + + return strippedHeaders ?? resHeaders +} + +/** + * @param {Date} date + * @returns {boolean} + */ +function isValidDate (date) { + return date instanceof Date && Number.isFinite(date.valueOf()) +} + +module.exports = CacheHandler diff --git a/node_modules/undici/lib/handler/cache-revalidation-handler.js b/node_modules/undici/lib/handler/cache-revalidation-handler.js new file mode 100644 index 0000000..393d16d --- /dev/null +++ b/node_modules/undici/lib/handler/cache-revalidation-handler.js @@ -0,0 +1,124 @@ +'use strict' + +const assert = require('node:assert') + +/** + * This takes care of revalidation requests we send to the origin. If we get + * a response indicating that what we have is cached (via a HTTP 304), we can + * continue using the cached value. Otherwise, we'll receive the new response + * here, which we then just pass on to the next handler (most likely a + * CacheHandler). Note that this assumes the proper headers were already + * included in the request to tell the origin that we want to revalidate the + * response (i.e. if-modified-since or if-none-match). + * + * @see https://www.rfc-editor.org/rfc/rfc9111.html#name-validation + * + * @implements {import('../../types/dispatcher.d.ts').default.DispatchHandler} + */ +class CacheRevalidationHandler { + #successful = false + + /** + * @type {((boolean, any) => void) | null} + */ + #callback + + /** + * @type {(import('../../types/dispatcher.d.ts').default.DispatchHandler)} + */ + #handler + + #context + + /** + * @type {boolean} + */ + #allowErrorStatusCodes + + /** + * @param {(boolean) => void} callback Function to call if the cached value is valid + * @param {import('../../types/dispatcher.d.ts').default.DispatchHandlers} handler + * @param {boolean} allowErrorStatusCodes + */ + constructor (callback, handler, allowErrorStatusCodes) { + if (typeof callback !== 'function') { + throw new TypeError('callback must be a function') + } + + this.#callback = callback + this.#handler = handler + this.#allowErrorStatusCodes = allowErrorStatusCodes + } + + onRequestStart (_, context) { + this.#successful = false + this.#context = context + } + + onRequestUpgrade (controller, statusCode, headers, socket) { + this.#handler.onRequestUpgrade?.(controller, statusCode, headers, socket) + } + + onResponseStart ( + controller, + statusCode, + headers, + statusMessage + ) { + assert(this.#callback != null) + + // https://www.rfc-editor.org/rfc/rfc9111.html#name-handling-a-validation-respo + // https://datatracker.ietf.org/doc/html/rfc5861#section-4 + this.#successful = statusCode === 304 || + (this.#allowErrorStatusCodes && statusCode >= 500 && statusCode <= 504) + this.#callback(this.#successful, this.#context) + this.#callback = null + + if (this.#successful) { + return true + } + + this.#handler.onRequestStart?.(controller, this.#context) + this.#handler.onResponseStart?.( + controller, + statusCode, + headers, + statusMessage + ) + } + + onResponseData (controller, chunk) { + if (this.#successful) { + return + } + + return this.#handler.onResponseData?.(controller, chunk) + } + + onResponseEnd (controller, trailers) { + if (this.#successful) { + return + } + + this.#handler.onResponseEnd?.(controller, trailers) + } + + onResponseError (controller, err) { + if (this.#successful) { + return + } + + if (this.#callback) { + this.#callback(false) + this.#callback = null + } + + if (typeof this.#handler.onResponseError === 'function') { + this.#handler.onResponseError(controller, err) + } else { + throw err + } + } +} + +module.exports = CacheRevalidationHandler diff --git a/node_modules/undici/lib/handler/decorator-handler.js b/node_modules/undici/lib/handler/decorator-handler.js new file mode 100644 index 0000000..50fbb0c --- /dev/null +++ b/node_modules/undici/lib/handler/decorator-handler.js @@ -0,0 +1,67 @@ +'use strict' + +const assert = require('node:assert') +const WrapHandler = require('./wrap-handler') + +/** + * @deprecated + */ +module.exports = class DecoratorHandler { + #handler + #onCompleteCalled = false + #onErrorCalled = false + #onResponseStartCalled = false + + constructor (handler) { + if (typeof handler !== 'object' || handler === null) { + throw new TypeError('handler must be an object') + } + this.#handler = WrapHandler.wrap(handler) + } + + onRequestStart (...args) { + this.#handler.onRequestStart?.(...args) + } + + onRequestUpgrade (...args) { + assert(!this.#onCompleteCalled) + assert(!this.#onErrorCalled) + + return this.#handler.onRequestUpgrade?.(...args) + } + + onResponseStart (...args) { + assert(!this.#onCompleteCalled) + assert(!this.#onErrorCalled) + assert(!this.#onResponseStartCalled) + + this.#onResponseStartCalled = true + + return this.#handler.onResponseStart?.(...args) + } + + onResponseData (...args) { + assert(!this.#onCompleteCalled) + assert(!this.#onErrorCalled) + + return this.#handler.onResponseData?.(...args) + } + + onResponseEnd (...args) { + assert(!this.#onCompleteCalled) + assert(!this.#onErrorCalled) + + this.#onCompleteCalled = true + return this.#handler.onResponseEnd?.(...args) + } + + onResponseError (...args) { + this.#onErrorCalled = true + return this.#handler.onResponseError?.(...args) + } + + /** + * @deprecated + */ + onBodySent () {} +} diff --git a/node_modules/cheerio/node_modules/undici/lib/handler/redirect-handler.js b/node_modules/undici/lib/handler/redirect-handler.js similarity index 74% rename from node_modules/cheerio/node_modules/undici/lib/handler/redirect-handler.js rename to node_modules/undici/lib/handler/redirect-handler.js index 16a7b21..dd28e1d 100644 --- a/node_modules/cheerio/node_modules/undici/lib/handler/redirect-handler.js +++ b/node_modules/undici/lib/handler/redirect-handler.js @@ -10,6 +10,8 @@ const redirectableStatusCodes = [300, 301, 302, 303, 307, 308] const kBody = Symbol('body') +const noop = () => {} + class BodyAsyncIterable { constructor (body) { this[kBody] = body @@ -24,21 +26,26 @@ class BodyAsyncIterable { } class RedirectHandler { + static buildDispatch (dispatcher, maxRedirections) { + if (maxRedirections != null && (!Number.isInteger(maxRedirections) || maxRedirections < 0)) { + throw new InvalidArgumentError('maxRedirections must be a positive number') + } + + const dispatch = dispatcher.dispatch.bind(dispatcher) + return (opts, originalHandler) => dispatch(opts, new RedirectHandler(dispatch, maxRedirections, opts, originalHandler)) + } + 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 = [] - this.redirectionLimitReached = false if (util.isStream(this.opts.body)) { // TODO (fix): Provide some way for the user to cache the file to e.g. /tmp @@ -66,7 +73,8 @@ class RedirectHandler { this.opts.body && typeof this.opts.body !== 'string' && !ArrayBuffer.isView(this.opts.body) && - util.isIterable(this.opts.body) + util.isIterable(this.opts.body) && + !util.isFormDataLike(this.opts.body) ) { // TODO: Should we allow re-using iterable if !this.opts.idempotent // or through some other flag? @@ -74,40 +82,51 @@ class RedirectHandler { } } - onConnect (abort) { - this.abort = abort - this.handler.onConnect(abort, { history: this.history }) + onRequestStart (controller, context) { + this.handler.onRequestStart?.(controller, { ...context, history: this.history }) } - onUpgrade (statusCode, headers, socket) { - this.handler.onUpgrade(statusCode, headers, socket) + onRequestUpgrade (controller, statusCode, headers, socket) { + this.handler.onRequestUpgrade?.(controller, 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) - + onResponseStart (controller, statusCode, headers, statusMessage) { if (this.opts.throwOnMaxRedirect && this.history.length >= this.maxRedirections) { - if (this.request) { - this.request.abort(new Error('max redirects')) - } - - this.redirectionLimitReached = true - this.abort(new Error('max redirects')) - return + throw new Error('max redirects') } + // https://tools.ietf.org/html/rfc7231#section-6.4.2 + // https://fetch.spec.whatwg.org/#http-redirect-fetch + // In case of HTTP 301 or 302 with POST, change the method to GET + if ((statusCode === 301 || statusCode === 302) && this.opts.method === 'POST') { + this.opts.method = 'GET' + if (util.isStream(this.opts.body)) { + util.destroy(this.opts.body.on('error', noop)) + } + this.opts.body = 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' + if (util.isStream(this.opts.body)) { + util.destroy(this.opts.body.on('error', noop)) + } + this.opts.body = null + } + + this.location = this.history.length >= this.maxRedirections || util.isDisturbed(this.opts.body) || redirectableStatusCodes.indexOf(statusCode) === -1 + ? null + : headers.location + 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) + this.handler.onResponseStart?.(controller, statusCode, headers, statusMessage) + return } const { origin, pathname, search } = util.parseURL(new URL(this.location, this.opts.origin && new URL(this.opts.path, this.opts.origin))) @@ -121,23 +140,16 @@ class RedirectHandler { 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) { + onResponseData (controller, 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 + Redirection is used to serve the requested resource from another URL, so it 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 @@ -150,11 +162,11 @@ class RedirectHandler { servers and browsers implementors, we ignore the body as there is no specified way to eventually parse it. */ } else { - return this.handler.onData(chunk) + this.handler.onResponseData?.(controller, chunk) } } - onComplete (trailers) { + onResponseEnd (controller, trailers) { if (this.location) { /* https://tools.ietf.org/html/rfc7231#section-6.4 @@ -164,32 +176,14 @@ class RedirectHandler { See comment on onData method above for more detailed information. */ - - this.location = null - this.abort = null - this.dispatch(this.opts, this) } else { - this.handler.onComplete(trailers) + this.handler.onResponseEnd(controller, 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].length === 8 && util.headerNameToString(headers[i]) === 'location') { - return headers[i + 1] - } + onResponseError (controller, error) { + this.handler.onResponseError?.(controller, error) } } @@ -218,9 +212,10 @@ function cleanRequestHeaders (headers, removeContent, unknownOrigin) { } } } else if (headers && typeof headers === 'object') { - for (const key of Object.keys(headers)) { + const entries = typeof headers[Symbol.iterator] === 'function' ? headers : Object.entries(headers) + for (const [key, value] of entries) { if (!shouldRemoveHeader(key, removeContent, unknownOrigin)) { - ret.push(key, headers[key]) + ret.push(key, value) } } } else { diff --git a/node_modules/cheerio/node_modules/undici/lib/handler/retry-handler.js b/node_modules/undici/lib/handler/retry-handler.js similarity index 67% rename from node_modules/cheerio/node_modules/undici/lib/handler/retry-handler.js rename to node_modules/undici/lib/handler/retry-handler.js index 5d1ccf0..00f582e 100644 --- a/node_modules/cheerio/node_modules/undici/lib/handler/retry-handler.js +++ b/node_modules/undici/lib/handler/retry-handler.js @@ -3,20 +3,20 @@ const assert = require('node:assert') const { kRetryHandlerDefaultRetry } = require('../core/symbols') const { RequestRetryError } = require('../core/errors') +const WrapHandler = require('./wrap-handler') const { isDisturbed, - parseHeaders, parseRangeHeader, wrapRequestBody } = require('../core/util') function calculateRetryAfterHeader (retryAfter) { - const current = Date.now() - return new Date(retryAfter).getTime() - current + const retryTime = new Date(retryAfter).getTime() + return isNaN(retryTime) ? 0 : retryTime - Date.now() } class RetryHandler { - constructor (opts, handlers) { + constructor (opts, { dispatch, handler }) { const { retryOptions, ...dispatchOpts } = opts const { // Retry scoped @@ -32,11 +32,9 @@ class RetryHandler { statusCodes } = retryOptions ?? {} - this.dispatch = handlers.dispatch - this.handler = handlers.handler + this.dispatch = dispatch + this.handler = WrapHandler.wrap(handler) this.opts = { ...dispatchOpts, body: wrapRequestBody(opts.body) } - this.abort = null - this.aborted = false this.retryOpts = { retry: retryFn ?? RetryHandler[kRetryHandlerDefaultRetry], retryAfter: retryAfter ?? true, @@ -64,44 +62,20 @@ class RetryHandler { this.retryCount = 0 this.retryCountCheckpoint = 0 + this.headersSent = false this.start = 0 this.end = null this.etag = null - this.resume = null - - // Handle possible onConnect duplication - this.handler.onConnect(reason => { - this.aborted = true - if (this.abort) { - this.abort(reason) - } else { - this.reason = reason - } - }) } - onRequestSent () { - if (this.handler.onRequestSent) { - this.handler.onRequestSent() + onRequestStart (controller, context) { + if (!this.headersSent) { + this.handler.onRequestStart?.(controller, context) } } - onUpgrade (statusCode, headers, socket) { - if (this.handler.onUpgrade) { - this.handler.onUpgrade(statusCode, headers, socket) - } - } - - onConnect (abort) { - if (this.aborted) { - abort(this.reason) - } else { - this.abort = abort - } - } - - onBodySent (chunk) { - if (this.handler.onBodySent) return this.handler.onBodySent(chunk) + onRequestUpgrade (controller, statusCode, headers, socket) { + this.handler.onRequestUpgrade?.(controller, statusCode, headers, socket) } static [kRetryHandlerDefaultRetry] (err, { state, opts }, cb) { @@ -150,7 +124,7 @@ class RetryHandler { if (retryAfterHeader) { retryAfterHeader = Number(retryAfterHeader) retryAfterHeader = Number.isNaN(retryAfterHeader) - ? calculateRetryAfterHeader(retryAfterHeader) + ? calculateRetryAfterHeader(headers['retry-after']) : retryAfterHeader * 1e3 // Retry-After is in seconds } @@ -162,80 +136,65 @@ class RetryHandler { setTimeout(() => cb(null), retryTimeout) } - onHeaders (statusCode, rawHeaders, resume, statusMessage) { - const headers = parseHeaders(rawHeaders) - + onResponseStart (controller, statusCode, headers, statusMessage) { this.retryCount += 1 if (statusCode >= 300) { if (this.retryOpts.statusCodes.includes(statusCode) === false) { - return this.handler.onHeaders( + this.headersSent = true + this.handler.onResponseStart?.( + controller, statusCode, - rawHeaders, - resume, + headers, statusMessage ) + return } else { - this.abort( - new RequestRetryError('Request failed', statusCode, { - headers, - data: { - count: this.retryCount - } - }) - ) - return false + throw new RequestRetryError('Request failed', statusCode, { + headers, + data: { + count: this.retryCount + } + }) } } // Checkpoint for resume from where we left it - if (this.resume != null) { - this.resume = null - + if (this.headersSent) { // Only Partial Content 206 supposed to provide Content-Range, // any other status code that partially consumed the payload - // should not be retry because it would result in downstream - // wrongly concatanete multiple responses. + // should not be retried because it would result in downstream + // wrongly concatenate multiple responses. if (statusCode !== 206 && (this.start > 0 || statusCode !== 200)) { - this.abort( - new RequestRetryError('server does not support the range header and the payload was partially consumed', statusCode, { - headers, - data: { count: this.retryCount } - }) - ) - return false + throw new RequestRetryError('server does not support the range header and the payload was partially consumed', statusCode, { + headers, + data: { count: this.retryCount } + }) } const contentRange = parseRangeHeader(headers['content-range']) // If no content range if (!contentRange) { - this.abort( - new RequestRetryError('Content-Range mismatch', statusCode, { - headers, - data: { count: this.retryCount } - }) - ) - return false + throw new RequestRetryError('Content-Range mismatch', statusCode, { + headers, + data: { count: this.retryCount } + }) } // Let's start with a weak etag check if (this.etag != null && this.etag !== headers.etag) { - this.abort( - new RequestRetryError('ETag mismatch', statusCode, { - headers, - data: { count: this.retryCount } - }) - ) - return false + throw new RequestRetryError('ETag mismatch', statusCode, { + headers, + data: { count: this.retryCount } + }) } - const { start, size, end = size - 1 } = contentRange + const { start, size, end = size ? size - 1 : null } = contentRange assert(this.start === start, 'content-range mismatch') assert(this.end == null || this.end === end, 'content-range mismatch') - this.resume = resume - return true + return } if (this.end == null) { @@ -244,15 +203,17 @@ class RetryHandler { const range = parseRangeHeader(headers['content-range']) if (range == null) { - return this.handler.onHeaders( + this.headersSent = true + this.handler.onResponseStart?.( + controller, statusCode, - rawHeaders, - resume, + headers, statusMessage ) + return } - const { start, size, end = size - 1 } = range + const { start, size, end = size ? size - 1 : null } = range assert( start != null && Number.isFinite(start), 'content-range mismatch' @@ -275,48 +236,50 @@ class RetryHandler { 'invalid content-length' ) - this.resume = resume + this.resume = true this.etag = headers.etag != null ? headers.etag : null // Weak etags are not useful for comparison nor cache // for instance not safe to assume if the response is byte-per-byte // equal - if (this.etag != null && this.etag.startsWith('W/')) { + if ( + this.etag != null && + this.etag[0] === 'W' && + this.etag[1] === '/' + ) { this.etag = null } - return this.handler.onHeaders( + this.headersSent = true + this.handler.onResponseStart?.( + controller, statusCode, - rawHeaders, - resume, + headers, statusMessage ) + } else { + throw new RequestRetryError('Request failed', statusCode, { + headers, + data: { count: this.retryCount } + }) } - - const err = new RequestRetryError('Request failed', statusCode, { - headers, - data: { count: this.retryCount } - }) - - this.abort(err) - - return false } - onData (chunk) { + onResponseData (controller, chunk) { this.start += chunk.length - return this.handler.onData(chunk) + this.handler.onResponseData?.(controller, chunk) } - onComplete (rawTrailers) { + onResponseEnd (controller, trailers) { this.retryCount = 0 - return this.handler.onComplete(rawTrailers) + return this.handler.onResponseEnd?.(controller, trailers) } - onError (err) { - if (this.aborted || isDisturbed(this.opts.body)) { - return this.handler.onError(err) + onResponseError (controller, err) { + if (controller?.aborted || isDisturbed(this.opts.body)) { + this.handler.onResponseError?.(controller, err) + return } // We reconcile in case of a mix between network errors @@ -339,9 +302,14 @@ class RetryHandler { onRetry.bind(this) ) + /** + * @this {RetryHandler} + * @param {Error} [err] + * @returns + */ function onRetry (err) { - if (err != null || this.aborted || isDisturbed(this.opts.body)) { - return this.handler.onError(err) + if (err != null || controller?.aborted || isDisturbed(this.opts.body)) { + return this.handler.onResponseError?.(controller, err) } if (this.start !== 0) { @@ -365,7 +333,7 @@ class RetryHandler { this.retryCountCheckpoint = this.retryCount this.dispatch(this.opts, this) } catch (err) { - this.handler.onError(err) + this.handler.onResponseError?.(controller, err) } } } diff --git a/node_modules/undici/lib/handler/unwrap-handler.js b/node_modules/undici/lib/handler/unwrap-handler.js new file mode 100644 index 0000000..865593a --- /dev/null +++ b/node_modules/undici/lib/handler/unwrap-handler.js @@ -0,0 +1,96 @@ +'use strict' + +const { parseHeaders } = require('../core/util') +const { InvalidArgumentError } = require('../core/errors') + +const kResume = Symbol('resume') + +class UnwrapController { + #paused = false + #reason = null + #aborted = false + #abort + + [kResume] = null + + constructor (abort) { + this.#abort = abort + } + + pause () { + this.#paused = true + } + + resume () { + if (this.#paused) { + this.#paused = false + this[kResume]?.() + } + } + + abort (reason) { + if (!this.#aborted) { + this.#aborted = true + this.#reason = reason + this.#abort(reason) + } + } + + get aborted () { + return this.#aborted + } + + get reason () { + return this.#reason + } + + get paused () { + return this.#paused + } +} + +module.exports = class UnwrapHandler { + #handler + #controller + + constructor (handler) { + this.#handler = handler + } + + static unwrap (handler) { + // TODO (fix): More checks... + return !handler.onRequestStart ? handler : new UnwrapHandler(handler) + } + + onConnect (abort, context) { + this.#controller = new UnwrapController(abort) + this.#handler.onRequestStart?.(this.#controller, context) + } + + onUpgrade (statusCode, rawHeaders, socket) { + this.#handler.onRequestUpgrade?.(this.#controller, statusCode, parseHeaders(rawHeaders), socket) + } + + onHeaders (statusCode, rawHeaders, resume, statusMessage) { + this.#controller[kResume] = resume + this.#handler.onResponseStart?.(this.#controller, statusCode, parseHeaders(rawHeaders), statusMessage) + return !this.#controller.paused + } + + onData (data) { + this.#handler.onResponseData?.(this.#controller, data) + return !this.#controller.paused + } + + onComplete (rawTrailers) { + this.#handler.onResponseEnd?.(this.#controller, parseHeaders(rawTrailers)) + } + + onError (err) { + if (!this.#handler.onResponseError) { + throw new InvalidArgumentError('invalid onError method') + } + + this.#handler.onResponseError?.(this.#controller, err) + } +} diff --git a/node_modules/undici/lib/handler/wrap-handler.js b/node_modules/undici/lib/handler/wrap-handler.js new file mode 100644 index 0000000..47caa5f --- /dev/null +++ b/node_modules/undici/lib/handler/wrap-handler.js @@ -0,0 +1,95 @@ +'use strict' + +const { InvalidArgumentError } = require('../core/errors') + +module.exports = class WrapHandler { + #handler + + constructor (handler) { + this.#handler = handler + } + + static wrap (handler) { + // TODO (fix): More checks... + return handler.onRequestStart ? handler : new WrapHandler(handler) + } + + // Unwrap Interface + + onConnect (abort, context) { + return this.#handler.onConnect?.(abort, context) + } + + onHeaders (statusCode, rawHeaders, resume, statusMessage) { + return this.#handler.onHeaders?.(statusCode, rawHeaders, resume, statusMessage) + } + + onUpgrade (statusCode, rawHeaders, socket) { + return this.#handler.onUpgrade?.(statusCode, rawHeaders, socket) + } + + onData (data) { + return this.#handler.onData?.(data) + } + + onComplete (trailers) { + return this.#handler.onComplete?.(trailers) + } + + onError (err) { + if (!this.#handler.onError) { + throw err + } + + return this.#handler.onError?.(err) + } + + // Wrap Interface + + onRequestStart (controller, context) { + this.#handler.onConnect?.((reason) => controller.abort(reason), context) + } + + onRequestUpgrade (controller, statusCode, headers, socket) { + const rawHeaders = [] + for (const [key, val] of Object.entries(headers)) { + rawHeaders.push(Buffer.from(key), Array.isArray(val) ? val.map(v => Buffer.from(v)) : Buffer.from(val)) + } + + this.#handler.onUpgrade?.(statusCode, rawHeaders, socket) + } + + onResponseStart (controller, statusCode, headers, statusMessage) { + const rawHeaders = [] + for (const [key, val] of Object.entries(headers)) { + rawHeaders.push(Buffer.from(key), Array.isArray(val) ? val.map(v => Buffer.from(v)) : Buffer.from(val)) + } + + if (this.#handler.onHeaders?.(statusCode, rawHeaders, () => controller.resume(), statusMessage) === false) { + controller.pause() + } + } + + onResponseData (controller, data) { + if (this.#handler.onData?.(data) === false) { + controller.pause() + } + } + + onResponseEnd (controller, trailers) { + const rawTrailers = [] + for (const [key, val] of Object.entries(trailers)) { + rawTrailers.push(Buffer.from(key), Array.isArray(val) ? val.map(v => Buffer.from(v)) : Buffer.from(val)) + } + + this.#handler.onComplete?.(rawTrailers) + } + + onResponseError (controller, err) { + if (!this.#handler.onError) { + throw new InvalidArgumentError('invalid onError method') + } + + this.#handler.onError?.(err) + } +} diff --git a/node_modules/undici/lib/interceptor/cache.js b/node_modules/undici/lib/interceptor/cache.js new file mode 100644 index 0000000..295c566 --- /dev/null +++ b/node_modules/undici/lib/interceptor/cache.js @@ -0,0 +1,362 @@ +'use strict' + +const assert = require('node:assert') +const { Readable } = require('node:stream') +const util = require('../core/util') +const CacheHandler = require('../handler/cache-handler') +const MemoryCacheStore = require('../cache/memory-cache-store') +const CacheRevalidationHandler = require('../handler/cache-revalidation-handler') +const { assertCacheStore, assertCacheMethods, makeCacheKey, normaliseHeaders, parseCacheControlHeader } = require('../util/cache.js') +const { AbortError } = require('../core/errors.js') + +/** + * @typedef {(options: import('../../types/dispatcher.d.ts').default.DispatchOptions, handler: import('../../types/dispatcher.d.ts').default.DispatchHandler) => void} DispatchFn + */ + +/** + * @param {import('../../types/cache-interceptor.d.ts').default.GetResult} result + * @param {import('../../types/cache-interceptor.d.ts').default.CacheControlDirectives | undefined} cacheControlDirectives + * @returns {boolean} + */ +function needsRevalidation (result, cacheControlDirectives) { + if (cacheControlDirectives?.['no-cache']) { + // Always revalidate requests with the no-cache directive + return true + } + + const now = Date.now() + if (now > result.staleAt) { + // Response is stale + if (cacheControlDirectives?.['max-stale']) { + // There's a threshold where we can serve stale responses, let's see if + // we're in it + // https://www.rfc-editor.org/rfc/rfc9111.html#name-max-stale + const gracePeriod = result.staleAt + (cacheControlDirectives['max-stale'] * 1000) + return now > gracePeriod + } + + return true + } + + if (cacheControlDirectives?.['min-fresh']) { + // https://www.rfc-editor.org/rfc/rfc9111.html#section-5.2.1.3 + + // At this point, staleAt is always > now + const timeLeftTillStale = result.staleAt - now + const threshold = cacheControlDirectives['min-fresh'] * 1000 + + return timeLeftTillStale <= threshold + } + + return false +} + +/** + * @param {DispatchFn} dispatch + * @param {import('../../types/cache-interceptor.d.ts').default.CacheHandlerOptions} globalOpts + * @param {import('../../types/cache-interceptor.d.ts').default.CacheKey} cacheKey + * @param {import('../../types/dispatcher.d.ts').default.DispatchHandler} handler + * @param {import('../../types/dispatcher.d.ts').default.RequestOptions} opts + * @param {import('../../types/cache-interceptor.d.ts').default.CacheControlDirectives | undefined} reqCacheControl + */ +function handleUncachedResponse ( + dispatch, + globalOpts, + cacheKey, + handler, + opts, + reqCacheControl +) { + if (reqCacheControl?.['only-if-cached']) { + let aborted = false + try { + if (typeof handler.onConnect === 'function') { + handler.onConnect(() => { + aborted = true + }) + + if (aborted) { + return + } + } + + if (typeof handler.onHeaders === 'function') { + handler.onHeaders(504, [], () => {}, 'Gateway Timeout') + if (aborted) { + return + } + } + + if (typeof handler.onComplete === 'function') { + handler.onComplete([]) + } + } catch (err) { + if (typeof handler.onError === 'function') { + handler.onError(err) + } + } + + return true + } + + return dispatch(opts, new CacheHandler(globalOpts, cacheKey, handler)) +} + +/** + * @param {import('../../types/dispatcher.d.ts').default.DispatchHandler} handler + * @param {import('../../types/dispatcher.d.ts').default.RequestOptions} opts + * @param {import('../../types/cache-interceptor.d.ts').default.GetResult} result + * @param {number} age + * @param {any} context + * @param {boolean} isStale + */ +function sendCachedValue (handler, opts, result, age, context, isStale) { + // TODO (perf): Readable.from path can be optimized... + const stream = util.isStream(result.body) + ? result.body + : Readable.from(result.body ?? []) + + assert(!stream.destroyed, 'stream should not be destroyed') + assert(!stream.readableDidRead, 'stream should not be readableDidRead') + + const controller = { + resume () { + stream.resume() + }, + pause () { + stream.pause() + }, + get paused () { + return stream.isPaused() + }, + get aborted () { + return stream.destroyed + }, + get reason () { + return stream.errored + }, + abort (reason) { + stream.destroy(reason ?? new AbortError()) + } + } + + stream + .on('error', function (err) { + if (!this.readableEnded) { + if (typeof handler.onResponseError === 'function') { + handler.onResponseError(controller, err) + } else { + throw err + } + } + }) + .on('close', function () { + if (!this.errored) { + handler.onResponseEnd?.(controller, {}) + } + }) + + handler.onRequestStart?.(controller, context) + + if (stream.destroyed) { + return + } + + // Add the age header + // https://www.rfc-editor.org/rfc/rfc9111.html#name-age + const headers = { ...result.headers, age: String(age) } + + if (isStale) { + // Add warning header + // https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Warning + headers.warning = '110 - "response is stale"' + } + + handler.onResponseStart?.(controller, result.statusCode, headers, result.statusMessage) + + if (opts.method === 'HEAD') { + stream.destroy() + } else { + stream.on('data', function (chunk) { + handler.onResponseData?.(controller, chunk) + }) + } +} + +/** + * @param {DispatchFn} dispatch + * @param {import('../../types/cache-interceptor.d.ts').default.CacheHandlerOptions} globalOpts + * @param {import('../../types/cache-interceptor.d.ts').default.CacheKey} cacheKey + * @param {import('../../types/dispatcher.d.ts').default.DispatchHandler} handler + * @param {import('../../types/dispatcher.d.ts').default.RequestOptions} opts + * @param {import('../../types/cache-interceptor.d.ts').default.CacheControlDirectives | undefined} reqCacheControl + * @param {import('../../types/cache-interceptor.d.ts').default.GetResult | undefined} result + */ +function handleResult ( + dispatch, + globalOpts, + cacheKey, + handler, + opts, + reqCacheControl, + result +) { + if (!result) { + return handleUncachedResponse(dispatch, globalOpts, cacheKey, handler, opts, reqCacheControl) + } + + const now = Date.now() + if (now > result.deleteAt) { + // Response is expired, cache store shouldn't have given this to us + return dispatch(opts, new CacheHandler(globalOpts, cacheKey, handler)) + } + + const age = Math.round((now - result.cachedAt) / 1000) + if (reqCacheControl?.['max-age'] && age >= reqCacheControl['max-age']) { + // Response is considered expired for this specific request + // https://www.rfc-editor.org/rfc/rfc9111.html#section-5.2.1.1 + return dispatch(opts, handler) + } + + // Check if the response is stale + if (needsRevalidation(result, reqCacheControl)) { + if (util.isStream(opts.body) && util.bodyLength(opts.body) !== 0) { + // If body is a stream we can't revalidate... + // TODO (fix): This could be less strict... + return dispatch(opts, new CacheHandler(globalOpts, cacheKey, handler)) + } + + let withinStaleIfErrorThreshold = false + const staleIfErrorExpiry = result.cacheControlDirectives['stale-if-error'] ?? reqCacheControl?.['stale-if-error'] + if (staleIfErrorExpiry) { + withinStaleIfErrorThreshold = now < (result.staleAt + (staleIfErrorExpiry * 1000)) + } + + let headers = { + ...normaliseHeaders(opts), + 'if-modified-since': new Date(result.cachedAt).toUTCString() + } + + if (result.etag) { + headers['if-none-match'] = result.etag + } + + if (result.vary) { + headers = { + ...headers, + ...result.vary + } + } + + // We need to revalidate the response + return dispatch( + { + ...opts, + headers + }, + new CacheRevalidationHandler( + (success, context) => { + if (success) { + sendCachedValue(handler, opts, result, age, context, true) + } else if (util.isStream(result.body)) { + result.body.on('error', () => {}).destroy() + } + }, + new CacheHandler(globalOpts, cacheKey, handler), + withinStaleIfErrorThreshold + ) + ) + } + + // Dump request body. + if (util.isStream(opts.body)) { + opts.body.on('error', () => {}).destroy() + } + + sendCachedValue(handler, opts, result, age, null, false) +} + +/** + * @param {import('../../types/cache-interceptor.d.ts').default.CacheOptions} [opts] + * @returns {import('../../types/dispatcher.d.ts').default.DispatcherComposeInterceptor} + */ +module.exports = (opts = {}) => { + const { + store = new MemoryCacheStore(), + methods = ['GET'], + cacheByDefault = undefined, + type = 'shared' + } = opts + + if (typeof opts !== 'object' || opts === null) { + throw new TypeError(`expected type of opts to be an Object, got ${opts === null ? 'null' : typeof opts}`) + } + + assertCacheStore(store, 'opts.store') + assertCacheMethods(methods, 'opts.methods') + + if (typeof cacheByDefault !== 'undefined' && typeof cacheByDefault !== 'number') { + throw new TypeError(`exepcted opts.cacheByDefault to be number or undefined, got ${typeof cacheByDefault}`) + } + + if (typeof type !== 'undefined' && type !== 'shared' && type !== 'private') { + throw new TypeError(`exepcted opts.type to be shared, private, or undefined, got ${typeof type}`) + } + + const globalOpts = { + store, + methods, + cacheByDefault, + type + } + + const safeMethodsToNotCache = util.safeHTTPMethods.filter(method => methods.includes(method) === false) + + return dispatch => { + return (opts, handler) => { + if (!opts.origin || safeMethodsToNotCache.includes(opts.method)) { + // Not a method we want to cache or we don't have the origin, skip + return dispatch(opts, handler) + } + + const reqCacheControl = opts.headers?.['cache-control'] + ? parseCacheControlHeader(opts.headers['cache-control']) + : undefined + + if (reqCacheControl?.['no-store']) { + return dispatch(opts, handler) + } + + /** + * @type {import('../../types/cache-interceptor.d.ts').default.CacheKey} + */ + const cacheKey = makeCacheKey(opts) + const result = store.get(cacheKey) + + if (result && typeof result.then === 'function') { + result.then(result => { + handleResult(dispatch, + globalOpts, + cacheKey, + handler, + opts, + reqCacheControl, + result + ) + }) + } else { + handleResult( + dispatch, + globalOpts, + cacheKey, + handler, + opts, + reqCacheControl, + result + ) + } + + return true + } + } +} diff --git a/node_modules/cheerio/node_modules/undici/lib/interceptor/dns.js b/node_modules/undici/lib/interceptor/dns.js similarity index 75% rename from node_modules/cheerio/node_modules/undici/lib/interceptor/dns.js rename to node_modules/undici/lib/interceptor/dns.js index 9177326..3828760 100644 --- a/node_modules/cheerio/node_modules/undici/lib/interceptor/dns.js +++ b/node_modules/undici/lib/interceptor/dns.js @@ -32,7 +32,7 @@ class DNSInstance { // If full, we just return the origin if (ips == null && this.full) { - cb(null, origin.origin) + cb(null, origin) return } @@ -74,9 +74,9 @@ class DNSInstance { cb( null, - `${origin.protocol}//${ + new URL(`${origin.protocol}//${ ip.family === 6 ? `[${ip.address}]` : ip.address - }${port}` + }${port}`) ) }) } else { @@ -105,9 +105,9 @@ class DNSInstance { cb( null, - `${origin.protocol}//${ + new URL(`${origin.protocol}//${ ip.family === 6 ? `[${ip.address}]` : ip.address - }${port}` + }${port}`) ) } } @@ -192,6 +192,38 @@ class DNSInstance { return ip } + pickFamily (origin, ipFamily) { + const records = this.#records.get(origin.hostname)?.records + if (!records) { + return null + } + + const family = records[ipFamily] + if (!family) { + return null + } + + if (family.offset == null || family.offset === maxInt) { + family.offset = 0 + } else { + family.offset++ + } + + const position = family.offset % family.ips.length + const ip = family.ips[position] ?? null + if (ip == null) { + return ip + } + + if (Date.now() - ip.timestamp > ip.ttl) { // record TTL is already in ms + // We delete expired records + // It is possible that they have different TTL, so we manage them individually + family.ips.splice(position, 1) + } + + return ip + } + setRecords (origin, addresses) { const timestamp = Date.now() const records = { records: { 4: null, 6: null } } @@ -213,6 +245,10 @@ class DNSInstance { this.#records.set(origin.hostname, records) } + deleteRecords (origin) { + this.#records.delete(origin.hostname) + } + getHandler (meta, opts) { return new DNSDispatchHandler(this, meta, opts) } @@ -222,49 +258,68 @@ class DNSDispatchHandler extends DecoratorHandler { #state = null #opts = null #dispatch = null - #handler = null #origin = null + #controller = null + #newOrigin = null + #firstTry = true - constructor (state, { origin, handler, dispatch }, opts) { + constructor (state, { origin, handler, dispatch, newOrigin }, opts) { super(handler) this.#origin = origin - this.#handler = handler + this.#newOrigin = newOrigin this.#opts = { ...opts } this.#state = state this.#dispatch = dispatch } - onError (err) { + onResponseError (controller, err) { switch (err.code) { case 'ETIMEDOUT': case 'ECONNREFUSED': { if (this.#state.dualStack) { - // We delete the record and retry - this.#state.runLookup(this.#origin, this.#opts, (err, newOrigin) => { - if (err) { - return this.#handler.onError(err) - } + if (!this.#firstTry) { + super.onResponseError(controller, err) + return + } + this.#firstTry = false - const dispatchOpts = { - ...this.#opts, - origin: newOrigin - } + // Pick an ip address from the other family + const otherFamily = this.#newOrigin.hostname[0] === '[' ? 4 : 6 + const ip = this.#state.pickFamily(this.#origin, otherFamily) + if (ip == null) { + super.onResponseError(controller, err) + return + } - this.#dispatch(dispatchOpts, this) - }) + let port + if (typeof ip.port === 'number') { + port = `:${ip.port}` + } else if (this.#origin.port !== '') { + port = `:${this.#origin.port}` + } else { + port = '' + } - // if dual-stack disabled, we error out + const dispatchOpts = { + ...this.#opts, + origin: `${this.#origin.protocol}//${ + ip.family === 6 ? `[${ip.address}]` : ip.address + }${port}` + } + this.#dispatch(dispatchOpts, this) return } - this.#handler.onError(err) - return + // if dual-stack disabled, we error out + super.onResponseError(controller, err) + break } case 'ENOTFOUND': - this.#state.deleteRecord(this.#origin) - // eslint-disable-next-line no-fallthrough + this.#state.deleteRecords(this.#origin) + super.onResponseError(controller, err) + break default: - this.#handler.onError(err) + super.onResponseError(controller, err) break } } @@ -349,23 +404,25 @@ module.exports = interceptorOpts => { instance.runLookup(origin, origDispatchOpts, (err, newOrigin) => { if (err) { - return handler.onError(err) + return handler.onResponseError(null, err) } - let dispatchOpts = null - dispatchOpts = { + const dispatchOpts = { ...origDispatchOpts, servername: origin.hostname, // For SNI on TLS - origin: newOrigin, + origin: newOrigin.origin, headers: { - host: origin.hostname, + host: origin.host, ...origDispatchOpts.headers } } dispatch( dispatchOpts, - instance.getHandler({ origin, dispatch, handler }, origDispatchOpts) + instance.getHandler( + { origin, dispatch, handler, newOrigin }, + origDispatchOpts + ) ) }) diff --git a/node_modules/cheerio/node_modules/undici/lib/interceptor/dump.js b/node_modules/undici/lib/interceptor/dump.js similarity index 53% rename from node_modules/cheerio/node_modules/undici/lib/interceptor/dump.js rename to node_modules/undici/lib/interceptor/dump.js index fc9cacb..61c09d5 100644 --- a/node_modules/cheerio/node_modules/undici/lib/interceptor/dump.js +++ b/node_modules/undici/lib/interceptor/dump.js @@ -1,43 +1,40 @@ 'use strict' -const util = require('../core/util') const { InvalidArgumentError, RequestAbortedError } = require('../core/errors') const DecoratorHandler = require('../handler/decorator-handler') class DumpHandler extends DecoratorHandler { #maxSize = 1024 * 1024 - #abort = null #dumped = false - #aborted = false #size = 0 - #reason = null - #handler = null - - constructor ({ maxSize }, handler) { - super(handler) + #controller = null + aborted = false + reason = false + constructor ({ maxSize, signal }, handler) { if (maxSize != null && (!Number.isFinite(maxSize) || maxSize < 1)) { throw new InvalidArgumentError('maxSize must be a number greater than 0') } + super(handler) + this.#maxSize = maxSize ?? this.#maxSize - this.#handler = handler + // this.#handler = handler } - onConnect (abort) { - this.#abort = abort - - this.#handler.onConnect(this.#customAbort.bind(this)) + #abort (reason) { + this.aborted = true + this.reason = reason } - #customAbort (reason) { - this.#aborted = true - this.#reason = reason + onRequestStart (controller, context) { + controller.abort = this.#abort.bind(this) + this.#controller = controller + + return super.onRequestStart(controller, context) } - // TODO: will require adjustment after new hooks are out - onHeaders (statusCode, rawHeaders, resume, statusMessage) { - const headers = util.parseHeaders(rawHeaders) + onResponseStart (controller, statusCode, headers, statusMessage) { const contentLength = headers['content-length'] if (contentLength != null && contentLength > this.#maxSize) { @@ -48,55 +45,50 @@ class DumpHandler extends DecoratorHandler { ) } - if (this.#aborted) { + if (this.aborted === true) { return true } - return this.#handler.onHeaders( - statusCode, - rawHeaders, - resume, - statusMessage - ) + return super.onResponseStart(controller, statusCode, headers, statusMessage) } - onError (err) { + onResponseError (controller, err) { if (this.#dumped) { return } - err = this.#reason ?? err + err = this.#controller.reason ?? err - this.#handler.onError(err) + super.onResponseError(controller, err) } - onData (chunk) { + onResponseData (controller, chunk) { this.#size = this.#size + chunk.length if (this.#size >= this.#maxSize) { this.#dumped = true - if (this.#aborted) { - this.#handler.onError(this.#reason) + if (this.aborted === true) { + super.onResponseError(controller, this.reason) } else { - this.#handler.onComplete([]) + super.onResponseEnd(controller, {}) } } return true } - onComplete (trailers) { + onResponseEnd (controller, trailers) { if (this.#dumped) { return } - if (this.#aborted) { - this.#handler.onError(this.reason) + if (this.#controller.aborted === true) { + super.onResponseError(controller, this.reason) return } - this.#handler.onComplete(trailers) + super.onResponseEnd(controller, trailers) } } @@ -107,13 +99,9 @@ function createDumpInterceptor ( ) { return dispatch => { return function Intercept (opts, handler) { - const { dumpMaxSize = defaultMaxSize } = - opts + const { dumpMaxSize = defaultMaxSize } = opts - const dumpHandler = new DumpHandler( - { maxSize: dumpMaxSize }, - handler - ) + const dumpHandler = new DumpHandler({ maxSize: dumpMaxSize, signal: opts.signal }, handler) return dispatch(opts, dumpHandler) } diff --git a/node_modules/cheerio/node_modules/undici/lib/interceptor/redirect-interceptor.js b/node_modules/undici/lib/interceptor/redirect.js similarity index 52% rename from node_modules/cheerio/node_modules/undici/lib/interceptor/redirect-interceptor.js rename to node_modules/undici/lib/interceptor/redirect.js index 896ee8d..55bad59 100644 --- a/node_modules/cheerio/node_modules/undici/lib/interceptor/redirect-interceptor.js +++ b/node_modules/undici/lib/interceptor/redirect.js @@ -2,18 +2,18 @@ const RedirectHandler = require('../handler/redirect-handler') -function createRedirectInterceptor ({ maxRedirections: defaultMaxRedirections }) { +function createRedirectInterceptor ({ maxRedirections: defaultMaxRedirections } = {}) { return (dispatch) => { return function Intercept (opts, handler) { - const { maxRedirections = defaultMaxRedirections } = opts + const { maxRedirections = defaultMaxRedirections, ...rest } = opts - if (!maxRedirections) { + if (maxRedirections == null || maxRedirections === 0) { 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) + const dispatchOpts = { ...rest, maxRedirections: 0 } // Stop sub dispatcher from also redirecting. + const redirectHandler = new RedirectHandler(dispatch, maxRedirections, dispatchOpts, handler) + return dispatch(dispatchOpts, redirectHandler) } } } diff --git a/node_modules/undici/lib/interceptor/redirectInterceptor.js b/node_modules/undici/lib/interceptor/redirectInterceptor.js deleted file mode 100644 index 7cc035e..0000000 --- a/node_modules/undici/lib/interceptor/redirectInterceptor.js +++ /dev/null @@ -1,21 +0,0 @@ -'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/interceptor/response-error.js b/node_modules/undici/lib/interceptor/response-error.js new file mode 100644 index 0000000..a8105aa --- /dev/null +++ b/node_modules/undici/lib/interceptor/response-error.js @@ -0,0 +1,95 @@ +'use strict' + +// const { parseHeaders } = require('../core/util') +const DecoratorHandler = require('../handler/decorator-handler') +const { ResponseError } = require('../core/errors') + +class ResponseErrorHandler extends DecoratorHandler { + #statusCode + #contentType + #decoder + #headers + #body + + constructor (_opts, { handler }) { + super(handler) + } + + #checkContentType (contentType) { + return (this.#contentType ?? '').indexOf(contentType) === 0 + } + + onRequestStart (controller, context) { + this.#statusCode = 0 + this.#contentType = null + this.#decoder = null + this.#headers = null + this.#body = '' + + return super.onRequestStart(controller, context) + } + + onResponseStart (controller, statusCode, headers, statusMessage) { + this.#statusCode = statusCode + this.#headers = headers + this.#contentType = headers['content-type'] + + if (this.#statusCode < 400) { + return super.onResponseStart(controller, statusCode, headers, statusMessage) + } + + if (this.#checkContentType('application/json') || this.#checkContentType('text/plain')) { + this.#decoder = new TextDecoder('utf-8') + } + } + + onResponseData (controller, chunk) { + if (this.#statusCode < 400) { + return super.onResponseData(controller, chunk) + } + + this.#body += this.#decoder?.decode(chunk, { stream: true }) ?? '' + } + + onResponseEnd (controller, trailers) { + if (this.#statusCode >= 400) { + this.#body += this.#decoder?.decode(undefined, { stream: false }) ?? '' + + if (this.#checkContentType('application/json')) { + try { + this.#body = JSON.parse(this.#body) + } catch { + // Do nothing... + } + } + + let err + const stackTraceLimit = Error.stackTraceLimit + Error.stackTraceLimit = 0 + try { + err = new ResponseError('Response Error', this.#statusCode, { + body: this.#body, + headers: this.#headers + }) + } finally { + Error.stackTraceLimit = stackTraceLimit + } + + super.onResponseError(controller, err) + } else { + super.onResponseEnd(controller, trailers) + } + } + + onResponseError (controller, err) { + super.onResponseError(controller, err) + } +} + +module.exports = () => { + return (dispatch) => { + return function Intercept (opts, handler) { + return dispatch(opts, new ResponseErrorHandler(opts, { handler })) + } + } +} diff --git a/node_modules/cheerio/node_modules/undici/lib/interceptor/retry.js b/node_modules/undici/lib/interceptor/retry.js similarity index 100% rename from node_modules/cheerio/node_modules/undici/lib/interceptor/retry.js rename to node_modules/undici/lib/interceptor/retry.js diff --git a/node_modules/undici/lib/llhttp/constants.d.ts b/node_modules/undici/lib/llhttp/constants.d.ts index b75ab1b..83fa4eb 100644 --- a/node_modules/undici/lib/llhttp/constants.d.ts +++ b/node_modules/undici/lib/llhttp/constants.d.ts @@ -1,112 +1,21 @@ -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 type IntDict = Record<string, number>; +export declare const ERROR: IntDict; +export declare const TYPE: IntDict; +export declare const FLAGS: IntDict; +export declare const LENIENT_FLAGS: IntDict; +export declare const METHODS: IntDict; +export declare const STATUSES: IntDict; +export declare const FINISH: IntDict; +export declare const HEADER_STATE: IntDict; +export declare const METHODS_HTTP: number[]; +export declare const METHODS_ICE: number[]; +export declare const METHODS_RTSP: number[]; +export declare const METHOD_MAP: IntDict; +export declare const H_METHOD_MAP: { + [k: string]: number; +}; +export declare const STATUSES_HTTP: number[]; +export type CharList = Array<string | number>; export declare const ALPHA: CharList; export declare const NUM_MAP: { 0: number; @@ -148,13 +57,13 @@ 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 QUOTED_STRING: CharList; +export declare const HTAB_SP_VCHAR_OBS_TEXT: CharList; export declare const MAJOR: { 0: number; 1: number; @@ -179,21 +88,10 @@ export declare const MINOR: { 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; + connection: number; + 'content-length': number; + 'proxy-connection': number; + 'transfer-encoding': number; + upgrade: number; }; diff --git a/node_modules/undici/lib/llhttp/constants.js b/node_modules/undici/lib/llhttp/constants.js index fb0b5a2..3e1dc01 100644 --- a/node_modules/undici/lib/llhttp/constants.js +++ b/node_modules/undici/lib/llhttp/constants.js @@ -1,192 +1,416 @@ "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; +exports.SPECIAL_HEADERS = exports.MINOR = exports.MAJOR = exports.HTAB_SP_VCHAR_OBS_TEXT = exports.QUOTED_STRING = exports.CONNECTION_TOKEN_CHARS = exports.HEADER_CHARS = exports.TOKEN = exports.HEX = exports.URL_CHAR = exports.USERINFO_CHARS = exports.MARK = exports.ALPHANUM = exports.NUM = exports.HEX_MAP = exports.NUM_MAP = exports.ALPHA = exports.STATUSES_HTTP = exports.H_METHOD_MAP = exports.METHOD_MAP = exports.METHODS_RTSP = exports.METHODS_ICE = exports.METHODS_HTTP = exports.HEADER_STATE = exports.FINISH = exports.STATUSES = 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"; +// Emums +exports.ERROR = { + OK: 0, + INTERNAL: 1, + STRICT: 2, + CR_EXPECTED: 25, + LF_EXPECTED: 3, + UNEXPECTED_CONTENT_LENGTH: 4, + UNEXPECTED_SPACE: 30, + 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, + CB_URL_COMPLETE: 26, + CB_STATUS_COMPLETE: 27, + CB_METHOD_COMPLETE: 32, + CB_VERSION_COMPLETE: 33, + CB_HEADER_FIELD_COMPLETE: 28, + CB_HEADER_VALUE_COMPLETE: 29, + CB_CHUNK_EXTENSION_NAME_COMPLETE: 34, + CB_CHUNK_EXTENSION_VALUE_COMPLETE: 35, + CB_RESET: 31, +}; +exports.TYPE = { + BOTH: 0, // default + REQUEST: 1, + RESPONSE: 2, +}; +exports.FLAGS = { + CONNECTION_KEEP_ALIVE: 1 << 0, + CONNECTION_CLOSE: 1 << 1, + CONNECTION_UPGRADE: 1 << 2, + CHUNKED: 1 << 3, + UPGRADE: 1 << 4, + CONTENT_LENGTH: 1 << 5, + SKIPBODY: 1 << 6, + TRAILING: 1 << 7, // 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"; + TRANSFER_ENCODING: 1 << 9, +}; +exports.LENIENT_FLAGS = { + HEADERS: 1 << 0, + CHUNKED_LENGTH: 1 << 1, + KEEP_ALIVE: 1 << 2, + TRANSFER_ENCODING: 1 << 3, + VERSION: 1 << 4, + DATA_AFTER_CLOSE: 1 << 5, + OPTIONAL_LF_AFTER_CR: 1 << 6, + OPTIONAL_CRLF_AFTER_CHUNK: 1 << 7, + OPTIONAL_CR_BEFORE_LF: 1 << 8, + SPACES_AFTER_CHUNK_SIZE: 1 << 9, +}; +exports.METHODS = { + 'DELETE': 0, + 'GET': 1, + 'HEAD': 2, + 'POST': 3, + 'PUT': 4, /* pathological */ - METHODS[METHODS["CONNECT"] = 5] = "CONNECT"; - METHODS[METHODS["OPTIONS"] = 6] = "OPTIONS"; - METHODS[METHODS["TRACE"] = 7] = "TRACE"; + 'CONNECT': 5, + 'OPTIONS': 6, + 'TRACE': 7, /* 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"; + 'COPY': 8, + 'LOCK': 9, + 'MKCOL': 10, + 'MOVE': 11, + 'PROPFIND': 12, + 'PROPPATCH': 13, + 'SEARCH': 14, + 'UNLOCK': 15, + 'BIND': 16, + 'REBIND': 17, + 'UNBIND': 18, + 'ACL': 19, /* subversion */ - METHODS[METHODS["REPORT"] = 20] = "REPORT"; - METHODS[METHODS["MKACTIVITY"] = 21] = "MKACTIVITY"; - METHODS[METHODS["CHECKOUT"] = 22] = "CHECKOUT"; - METHODS[METHODS["MERGE"] = 23] = "MERGE"; + 'REPORT': 20, + 'MKACTIVITY': 21, + 'CHECKOUT': 22, + 'MERGE': 23, /* upnp */ - METHODS[METHODS["M-SEARCH"] = 24] = "M-SEARCH"; - METHODS[METHODS["NOTIFY"] = 25] = "NOTIFY"; - METHODS[METHODS["SUBSCRIBE"] = 26] = "SUBSCRIBE"; - METHODS[METHODS["UNSUBSCRIBE"] = 27] = "UNSUBSCRIBE"; + 'M-SEARCH': 24, + 'NOTIFY': 25, + 'SUBSCRIBE': 26, + 'UNSUBSCRIBE': 27, /* RFC-5789 */ - METHODS[METHODS["PATCH"] = 28] = "PATCH"; - METHODS[METHODS["PURGE"] = 29] = "PURGE"; + 'PATCH': 28, + 'PURGE': 29, /* CalDAV */ - METHODS[METHODS["MKCALENDAR"] = 30] = "MKCALENDAR"; + 'MKCALENDAR': 30, /* RFC-2068, section 19.6.1.2 */ - METHODS[METHODS["LINK"] = 31] = "LINK"; - METHODS[METHODS["UNLINK"] = 32] = "UNLINK"; + 'LINK': 31, + 'UNLINK': 32, /* icecast */ - METHODS[METHODS["SOURCE"] = 33] = "SOURCE"; + 'SOURCE': 33, /* RFC-7540, section 11.6 */ - METHODS[METHODS["PRI"] = 34] = "PRI"; + 'PRI': 34, /* 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"; + 'DESCRIBE': 35, + 'ANNOUNCE': 36, + 'SETUP': 37, + 'PLAY': 38, + 'PAUSE': 39, + 'TEARDOWN': 40, + 'GET_PARAMETER': 41, + 'SET_PARAMETER': 42, + 'REDIRECT': 43, + 'RECORD': 44, /* RAOP */ - METHODS[METHODS["FLUSH"] = 45] = "FLUSH"; -})(METHODS = exports.METHODS || (exports.METHODS = {})); + 'FLUSH': 45, + /* DRAFT https://www.ietf.org/archive/id/draft-ietf-httpbis-safe-method-w-body-02.html */ + 'QUERY': 46, +}; +exports.STATUSES = { + CONTINUE: 100, + SWITCHING_PROTOCOLS: 101, + PROCESSING: 102, + EARLY_HINTS: 103, + RESPONSE_IS_STALE: 110, // Unofficial + REVALIDATION_FAILED: 111, // Unofficial + DISCONNECTED_OPERATION: 112, // Unofficial + HEURISTIC_EXPIRATION: 113, // Unofficial + MISCELLANEOUS_WARNING: 199, // Unofficial + OK: 200, + CREATED: 201, + ACCEPTED: 202, + NON_AUTHORITATIVE_INFORMATION: 203, + NO_CONTENT: 204, + RESET_CONTENT: 205, + PARTIAL_CONTENT: 206, + MULTI_STATUS: 207, + ALREADY_REPORTED: 208, + TRANSFORMATION_APPLIED: 214, // Unofficial + IM_USED: 226, + MISCELLANEOUS_PERSISTENT_WARNING: 299, // Unofficial + MULTIPLE_CHOICES: 300, + MOVED_PERMANENTLY: 301, + FOUND: 302, + SEE_OTHER: 303, + NOT_MODIFIED: 304, + USE_PROXY: 305, + SWITCH_PROXY: 306, // No longer used + TEMPORARY_REDIRECT: 307, + PERMANENT_REDIRECT: 308, + BAD_REQUEST: 400, + UNAUTHORIZED: 401, + PAYMENT_REQUIRED: 402, + FORBIDDEN: 403, + NOT_FOUND: 404, + METHOD_NOT_ALLOWED: 405, + NOT_ACCEPTABLE: 406, + PROXY_AUTHENTICATION_REQUIRED: 407, + REQUEST_TIMEOUT: 408, + CONFLICT: 409, + GONE: 410, + LENGTH_REQUIRED: 411, + PRECONDITION_FAILED: 412, + PAYLOAD_TOO_LARGE: 413, + URI_TOO_LONG: 414, + UNSUPPORTED_MEDIA_TYPE: 415, + RANGE_NOT_SATISFIABLE: 416, + EXPECTATION_FAILED: 417, + IM_A_TEAPOT: 418, + PAGE_EXPIRED: 419, // Unofficial + ENHANCE_YOUR_CALM: 420, // Unofficial + MISDIRECTED_REQUEST: 421, + UNPROCESSABLE_ENTITY: 422, + LOCKED: 423, + FAILED_DEPENDENCY: 424, + TOO_EARLY: 425, + UPGRADE_REQUIRED: 426, + PRECONDITION_REQUIRED: 428, + TOO_MANY_REQUESTS: 429, + REQUEST_HEADER_FIELDS_TOO_LARGE_UNOFFICIAL: 430, // Unofficial + REQUEST_HEADER_FIELDS_TOO_LARGE: 431, + LOGIN_TIMEOUT: 440, // Unofficial + NO_RESPONSE: 444, // Unofficial + RETRY_WITH: 449, // Unofficial + BLOCKED_BY_PARENTAL_CONTROL: 450, // Unofficial + UNAVAILABLE_FOR_LEGAL_REASONS: 451, + CLIENT_CLOSED_LOAD_BALANCED_REQUEST: 460, // Unofficial + INVALID_X_FORWARDED_FOR: 463, // Unofficial + REQUEST_HEADER_TOO_LARGE: 494, // Unofficial + SSL_CERTIFICATE_ERROR: 495, // Unofficial + SSL_CERTIFICATE_REQUIRED: 496, // Unofficial + HTTP_REQUEST_SENT_TO_HTTPS_PORT: 497, // Unofficial + INVALID_TOKEN: 498, // Unofficial + CLIENT_CLOSED_REQUEST: 499, // Unofficial + INTERNAL_SERVER_ERROR: 500, + NOT_IMPLEMENTED: 501, + BAD_GATEWAY: 502, + SERVICE_UNAVAILABLE: 503, + GATEWAY_TIMEOUT: 504, + HTTP_VERSION_NOT_SUPPORTED: 505, + VARIANT_ALSO_NEGOTIATES: 506, + INSUFFICIENT_STORAGE: 507, + LOOP_DETECTED: 508, + BANDWIDTH_LIMIT_EXCEEDED: 509, + NOT_EXTENDED: 510, + NETWORK_AUTHENTICATION_REQUIRED: 511, + WEB_SERVER_UNKNOWN_ERROR: 520, // Unofficial + WEB_SERVER_IS_DOWN: 521, // Unofficial + CONNECTION_TIMEOUT: 522, // Unofficial + ORIGIN_IS_UNREACHABLE: 523, // Unofficial + TIMEOUT_OCCURED: 524, // Unofficial + SSL_HANDSHAKE_FAILED: 525, // Unofficial + INVALID_SSL_CERTIFICATE: 526, // Unofficial + RAILGUN_ERROR: 527, // Unofficial + SITE_IS_OVERLOADED: 529, // Unofficial + SITE_IS_FROZEN: 530, // Unofficial + IDENTITY_PROVIDER_AUTHENTICATION_ERROR: 561, // Unofficial + NETWORK_READ_TIMEOUT: 598, // Unofficial + NETWORK_CONNECT_TIMEOUT: 599, // Unofficial +}; +exports.FINISH = { + SAFE: 0, + SAFE_WITH_CB: 1, + UNSAFE: 2, +}; +exports.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, +}; +// C headers 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, + exports.METHODS.DELETE, + exports.METHODS.GET, + exports.METHODS.HEAD, + exports.METHODS.POST, + exports.METHODS.PUT, + exports.METHODS.CONNECT, + exports.METHODS.OPTIONS, + exports.METHODS.TRACE, + exports.METHODS.COPY, + exports.METHODS.LOCK, + exports.METHODS.MKCOL, + exports.METHODS.MOVE, + exports.METHODS.PROPFIND, + exports.METHODS.PROPPATCH, + exports.METHODS.SEARCH, + exports.METHODS.UNLOCK, + exports.METHODS.BIND, + exports.METHODS.REBIND, + exports.METHODS.UNBIND, + exports.METHODS.ACL, + exports.METHODS.REPORT, + exports.METHODS.MKACTIVITY, + exports.METHODS.CHECKOUT, + exports.METHODS.MERGE, + exports.METHODS['M-SEARCH'], + exports.METHODS.NOTIFY, + exports.METHODS.SUBSCRIBE, + exports.METHODS.UNSUBSCRIBE, + exports.METHODS.PATCH, + exports.METHODS.PURGE, + exports.METHODS.MKCALENDAR, + exports.METHODS.LINK, + exports.METHODS.UNLINK, + exports.METHODS.PRI, // TODO(indutny): should we allow it with HTTP? - METHODS.SOURCE, + exports.METHODS.SOURCE, + exports.METHODS.QUERY, ]; exports.METHODS_ICE = [ - METHODS.SOURCE, + exports.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, + exports.METHODS.OPTIONS, + exports.METHODS.DESCRIBE, + exports.METHODS.ANNOUNCE, + exports.METHODS.SETUP, + exports.METHODS.PLAY, + exports.METHODS.PAUSE, + exports.METHODS.TEARDOWN, + exports.METHODS.GET_PARAMETER, + exports.METHODS.SET_PARAMETER, + exports.METHODS.REDIRECT, + exports.METHODS.RECORD, + exports.METHODS.FLUSH, // For AirPlay - METHODS.GET, - METHODS.POST, + exports.METHODS.GET, + exports.METHODS.POST, +]; +exports.METHOD_MAP = (0, utils_1.enumToMap)(exports.METHODS); +exports.H_METHOD_MAP = Object.fromEntries(Object.entries(exports.METHODS).filter(([k]) => k.startsWith('H'))); +exports.STATUSES_HTTP = [ + exports.STATUSES.CONTINUE, + exports.STATUSES.SWITCHING_PROTOCOLS, + exports.STATUSES.PROCESSING, + exports.STATUSES.EARLY_HINTS, + exports.STATUSES.RESPONSE_IS_STALE, + exports.STATUSES.REVALIDATION_FAILED, + exports.STATUSES.DISCONNECTED_OPERATION, + exports.STATUSES.HEURISTIC_EXPIRATION, + exports.STATUSES.MISCELLANEOUS_WARNING, + exports.STATUSES.OK, + exports.STATUSES.CREATED, + exports.STATUSES.ACCEPTED, + exports.STATUSES.NON_AUTHORITATIVE_INFORMATION, + exports.STATUSES.NO_CONTENT, + exports.STATUSES.RESET_CONTENT, + exports.STATUSES.PARTIAL_CONTENT, + exports.STATUSES.MULTI_STATUS, + exports.STATUSES.ALREADY_REPORTED, + exports.STATUSES.TRANSFORMATION_APPLIED, + exports.STATUSES.IM_USED, + exports.STATUSES.MISCELLANEOUS_PERSISTENT_WARNING, + exports.STATUSES.MULTIPLE_CHOICES, + exports.STATUSES.MOVED_PERMANENTLY, + exports.STATUSES.FOUND, + exports.STATUSES.SEE_OTHER, + exports.STATUSES.NOT_MODIFIED, + exports.STATUSES.USE_PROXY, + exports.STATUSES.SWITCH_PROXY, + exports.STATUSES.TEMPORARY_REDIRECT, + exports.STATUSES.PERMANENT_REDIRECT, + exports.STATUSES.BAD_REQUEST, + exports.STATUSES.UNAUTHORIZED, + exports.STATUSES.PAYMENT_REQUIRED, + exports.STATUSES.FORBIDDEN, + exports.STATUSES.NOT_FOUND, + exports.STATUSES.METHOD_NOT_ALLOWED, + exports.STATUSES.NOT_ACCEPTABLE, + exports.STATUSES.PROXY_AUTHENTICATION_REQUIRED, + exports.STATUSES.REQUEST_TIMEOUT, + exports.STATUSES.CONFLICT, + exports.STATUSES.GONE, + exports.STATUSES.LENGTH_REQUIRED, + exports.STATUSES.PRECONDITION_FAILED, + exports.STATUSES.PAYLOAD_TOO_LARGE, + exports.STATUSES.URI_TOO_LONG, + exports.STATUSES.UNSUPPORTED_MEDIA_TYPE, + exports.STATUSES.RANGE_NOT_SATISFIABLE, + exports.STATUSES.EXPECTATION_FAILED, + exports.STATUSES.IM_A_TEAPOT, + exports.STATUSES.PAGE_EXPIRED, + exports.STATUSES.ENHANCE_YOUR_CALM, + exports.STATUSES.MISDIRECTED_REQUEST, + exports.STATUSES.UNPROCESSABLE_ENTITY, + exports.STATUSES.LOCKED, + exports.STATUSES.FAILED_DEPENDENCY, + exports.STATUSES.TOO_EARLY, + exports.STATUSES.UPGRADE_REQUIRED, + exports.STATUSES.PRECONDITION_REQUIRED, + exports.STATUSES.TOO_MANY_REQUESTS, + exports.STATUSES.REQUEST_HEADER_FIELDS_TOO_LARGE_UNOFFICIAL, + exports.STATUSES.REQUEST_HEADER_FIELDS_TOO_LARGE, + exports.STATUSES.LOGIN_TIMEOUT, + exports.STATUSES.NO_RESPONSE, + exports.STATUSES.RETRY_WITH, + exports.STATUSES.BLOCKED_BY_PARENTAL_CONTROL, + exports.STATUSES.UNAVAILABLE_FOR_LEGAL_REASONS, + exports.STATUSES.CLIENT_CLOSED_LOAD_BALANCED_REQUEST, + exports.STATUSES.INVALID_X_FORWARDED_FOR, + exports.STATUSES.REQUEST_HEADER_TOO_LARGE, + exports.STATUSES.SSL_CERTIFICATE_ERROR, + exports.STATUSES.SSL_CERTIFICATE_REQUIRED, + exports.STATUSES.HTTP_REQUEST_SENT_TO_HTTPS_PORT, + exports.STATUSES.INVALID_TOKEN, + exports.STATUSES.CLIENT_CLOSED_REQUEST, + exports.STATUSES.INTERNAL_SERVER_ERROR, + exports.STATUSES.NOT_IMPLEMENTED, + exports.STATUSES.BAD_GATEWAY, + exports.STATUSES.SERVICE_UNAVAILABLE, + exports.STATUSES.GATEWAY_TIMEOUT, + exports.STATUSES.HTTP_VERSION_NOT_SUPPORTED, + exports.STATUSES.VARIANT_ALSO_NEGOTIATES, + exports.STATUSES.INSUFFICIENT_STORAGE, + exports.STATUSES.LOOP_DETECTED, + exports.STATUSES.BANDWIDTH_LIMIT_EXCEEDED, + exports.STATUSES.NOT_EXTENDED, + exports.STATUSES.NETWORK_AUTHENTICATION_REQUIRED, + exports.STATUSES.WEB_SERVER_UNKNOWN_ERROR, + exports.STATUSES.WEB_SERVER_IS_DOWN, + exports.STATUSES.CONNECTION_TIMEOUT, + exports.STATUSES.ORIGIN_IS_UNREACHABLE, + exports.STATUSES.TIMEOUT_OCCURED, + exports.STATUSES.SSL_HANDSHAKE_FAILED, + exports.STATUSES.INVALID_SSL_CERTIFICATE, + exports.STATUSES.RAILGUN_ERROR, + exports.STATUSES.SITE_IS_OVERLOADED, + exports.STATUSES.SITE_IS_FROZEN, + exports.STATUSES.IDENTITY_PROVIDER_AUTHENTICATION_ERROR, + exports.STATUSES.NETWORK_READ_TIMEOUT, + exports.STATUSES.NETWORK_CONNECT_TIMEOUT, ]; -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 @@ -213,7 +437,7 @@ exports.USERINFO_CHARS = exports.ALPHANUM .concat(exports.MARK) .concat(['%', ';', ':', '&', '=', '+', '$', ',']); // TODO(indutny): use RFC -exports.STRICT_URL_CHAR = [ +exports.URL_CHAR = [ '!', '"', '$', '%', '&', '\'', '(', ')', '*', '+', ',', '-', '.', '/', ':', ';', '<', '=', '>', @@ -221,12 +445,6 @@ 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> @@ -235,13 +453,12 @@ exports.HEX = exports.NUM.concat(['a', 'b', 'c', 'd', 'e', 'f', 'A', 'B', 'C', ' * | "/" | "[" | "]" | "?" | "=" * | "{" | "}" | SP | HT */ -exports.STRICT_TOKEN = [ +exports.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 @@ -254,25 +471,28 @@ for (let i = 32; i <= 255; i++) { } // ',' = \x44 exports.CONNECTION_TOKEN_CHARS = exports.HEADER_CHARS.filter((c) => c !== 44); +exports.QUOTED_STRING = ['\t', ' ']; +for (let i = 0x21; i <= 0xff; i++) { + if (i !== 0x22 && i !== 0x5c) { // All characters in ASCII except \ and " + exports.QUOTED_STRING.push(i); + } +} +exports.HTAB_SP_VCHAR_OBS_TEXT = ['\t', ' ']; +// VCHAR: https://tools.ietf.org/html/rfc5234#appendix-B.1 +for (let i = 0x21; i <= 0x7E; i++) { + exports.HTAB_SP_VCHAR_OBS_TEXT.push(i); +} +// OBS_TEXT: https://datatracker.ietf.org/doc/html/rfc9110#name-collected-abnf +for (let i = 0x80; i <= 0xff; i++) { + exports.HTAB_SP_VCHAR_OBS_TEXT.push(i); +} 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, + 'connection': exports.HEADER_STATE.CONNECTION, + 'content-length': exports.HEADER_STATE.CONTENT_LENGTH, + 'proxy-connection': exports.HEADER_STATE.CONNECTION, + 'transfer-encoding': exports.HEADER_STATE.TRANSFER_ENCODING, + 'upgrade': exports.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 index 6ac54bc..8373fd6 100644 --- a/node_modules/undici/lib/llhttp/constants.js.map +++ b/node_modules/undici/lib/llhttp/constants.js.map @@ -1 +1 @@ -{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/llhttp/constants.ts"],"names":[],"mappings":";;;AAAA,mCAA8C;AAI9C,YAAY;AAEZ,IAAY,KA6BX;AA7BD,WAAY,KAAK;IACf,6BAAM,CAAA;IACN,yCAAQ,CAAA;IACR,qCAAM,CAAA;IACN,+CAAW,CAAA;IACX,2EAAyB,CAAA;IACzB,2DAAiB,CAAA;IACjB,qDAAc,CAAA;IACd,+CAAW,CAAA;IACX,yDAAgB,CAAA;IAChB,uDAAe,CAAA;IACf,kEAAoB,CAAA;IACpB,sEAAsB,CAAA;IACtB,8DAAkB,CAAA;IAClB,sDAAc,CAAA;IACd,4DAAiB,CAAA;IACjB,4EAAyB,CAAA;IAEzB,0DAAgB,CAAA;IAChB,gEAAmB,CAAA;IACnB,gEAAmB,CAAA;IACnB,wDAAe,CAAA;IACf,4DAAiB,CAAA;IAEjB,sCAAM,CAAA;IACN,sDAAc,CAAA;IACd,4DAAiB,CAAA;IAEjB,kCAAI,CAAA;AACN,CAAC,EA7BW,KAAK,GAAL,aAAK,KAAL,aAAK,QA6BhB;AAED,IAAY,IAIX;AAJD,WAAY,IAAI;IACd,+BAAQ,CAAA;IACR,qCAAO,CAAA;IACP,uCAAQ,CAAA;AACV,CAAC,EAJW,IAAI,GAAJ,YAAI,KAAJ,YAAI,QAIf;AAED,IAAY,KAWX;AAXD,WAAY,KAAK;IACf,mEAA8B,CAAA;IAC9B,yDAAyB,CAAA;IACzB,6DAA2B,CAAA;IAC3B,uCAAgB,CAAA;IAChB,wCAAgB,CAAA;IAChB,sDAAuB,CAAA;IACvB,0CAA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,MAAM,CAAC,CAAE,GAAG,CAAE,CAAC,CAAC;AAE5D;;;GAGG;AACU,QAAA,YAAY,GAAa,CAAE,IAAI,CAAE,CAAC;AAC/C,KAAK,IAAI,CAAC,GAAG,EAAE,EAAE,CAAC,IAAI,GAAG,EAAE,CAAC,EAAE,EAAE;IAC9B,IAAI,CAAC,KAAK,GAAG,EAAE;QACb,oBAAY,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 +{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/llhttp/constants.ts"],"names":[],"mappings":";;;AAAA,mCAAoC;AAIpC,QAAQ;AAEK,QAAA,KAAK,GAAY;IAC5B,EAAE,EAAE,CAAC;IACL,QAAQ,EAAE,CAAC;IACX,MAAM,EAAE,CAAC;IACT,WAAW,EAAE,EAAE;IACf,WAAW,EAA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GAAG;IAC7B,YAAY,EAAE,oBAAY,CAAC,UAAU;IACrC,gBAAgB,EAAE,oBAAY,CAAC,cAAc;IAC7C,kBAAkB,EAAE,oBAAY,CAAC,UAAU;IAC3C,mBAAmB,EAAE,oBAAY,CAAC,iBAAiB;IACnD,SAAS,EAAE,oBAAY,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 index ad4682c..8a7fd76 100644 --- a/node_modules/undici/lib/llhttp/llhttp-wasm.js +++ b/node_modules/undici/lib/llhttp/llhttp-wasm.js @@ -1 +1,15 @@ -module.exports = 'AGFzbQEAAAABMAhgAX8Bf2ADf39/AX9gBH9/f38Bf2AAAGADf39/AGABfwBgAn9/AGAGf39/f39/AALLAQgDZW52GHdhc21fb25faGVhZGVyc19jb21wbGV0ZQACA2VudhV3YXNtX29uX21lc3NhZ2VfYmVnaW4AAANlbnYLd2FzbV9vbl91cmwAAQNlbnYOd2FzbV9vbl9zdGF0dXMAAQNlbnYUd2FzbV9vbl9oZWFkZXJfZmllbGQAAQNlbnYUd2FzbV9vbl9oZWFkZXJfdmFsdWUAAQNlbnYMd2FzbV9vbl9ib2R5AAEDZW52GHdhc21fb25fbWVzc2FnZV9jb21wbGV0ZQAAA0ZFAwMEAAAFAAAAAAAABQEFAAUFBQAABgAAAAAGBgYGAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQABAAABAQcAAAUFAwABBAUBcAESEgUDAQACBggBfwFBgNQECwfRBSIGbWVtb3J5AgALX2luaXRpYWxpemUACRlfX2luZGlyZWN0X2Z1bmN0aW9uX3RhYmxlAQALbGxodHRwX2luaXQAChhsbGh0dHBfc2hvdWxkX2tlZXBfYWxpdmUAQQxsbGh0dHBfYWxsb2MADAZtYWxsb2MARgtsbGh0dHBfZnJlZQANBGZyZWUASA9sbGh0dHBfZ2V0X3R5cGUADhVsbGh0dHBfZ2V0X2h0dHBfb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pCADcDACAAQQhqQgA3AwAgAEHdATYCHEEAC3sBAX8CQCAAKAIMIgMNAAJAIAAoAgRFDQAgACABNgIECwJAIAAgASACEMSAgIAAIgMNACAAKAIMDwsgACADNgIcQQAhAyAAKAIEIgFFDQAgACABIAIgACgCCBGBgICAAAAiAUUNACAAIAI2AhQgACABNgIMIAEhAwsgAwvk8wEDDn8DfgR/I4CAgIAAQRBrIgMkgICAgAAgASEEIAEhBSABIQYgASEHIAEhCCABIQkgASEKIAEhCyABIQwgASENIAEhDiABIQ8CQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkAgACgCHCIQQX9qDt0B2gEB2QECAwQFBgcICQoLDA0O2AEPENcBERLWARMUFRYXGBkaG+AB3wEcHR7VAR8gISIjJCXUASYnKCkqKyzTAdIBLS7RAdABLzAxMjM0NTY3ODk6Ozw9Pj9AQUJDREVG2wFHSElKzwHOAUvNAUzMAU1OT1BRUlNUVVZXWFlaW1xdXl9gYWJjZGVmZ2hpamtsbW5vcHFyc3R1dnd4eXp7fH1+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LQbEBIRAMEgtBswEhEAwRC0GyASEQDBALQbQBIRAMDwtBtQEhEAwOC0G2ASEQDA0LQbcBIRAMDAtBuAEhEAwLC0G5ASEQDAoLQboBIRAMCQtBuwEhEAwIC0HGASEQDAcLQbwBIRAMBgtBvQEhEAwFC0G+ASEQDAQLQb8BIRAMAwtBwAEhEAwCC0HCASEQDAELQcEBIRALA0ACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQ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IcIAAgATYCFCAAQdyIgIAANgIQIABBBzYCDEEAIRAMqwELIBBBP0cNASABQQFqIQELQQUhEAyQAQtBACEQIABBADYCHCAAIAE2AhQgAEH9koCAADYCECAAQQc2AgwMqAELIAAoAgQhECAAQQA2AgQCQCAAIBAgARCngICAACIQDQAgASEBDEILIABB0gA2AhwgACABNgIUIAAgEDYCDEEAIRAMpwELIAAoAgQhECAAQQA2AgQCQCAAIBAgARCngICAACIQDQAgASEBDEILIABB0wA2AhwgACABNgIUIAAgEDYCDEEAIRAMpgELIAAoAgQhECAAQQA2AgQCQCAAIBAgARCngICAACIQDQAgASEBDEYLIABB5QA2AhwgACABNgIUIAAgEDYCDEEAIRAMpQELIAAoAgQhASAAQQA2AgQCQCAAIAEgFBCngICAACIBDQAgFCEBDD8LIABB0gA2AhwgACAUNgIUIAAgATYCDEEAIRAMpAELIAAoAgQhASAAQQA2AgQCQCAAIAEgFBCngICAACIBDQAgFCEBDD8LIABB0wA2AhwgACAUNgIUIAAgATYCDEEAIRAMowELIAAoAgQhASAAQQA2AgQCQCAAIAEgFBCngICAACIBDQAgFCEBDEMLIABB5QA2AhwgACAUNgIUIAAgATYCDEEAIRAMogELIABBADYCHCAAIBQ2AhQgAEHDj4CAADYCECAAQQc2AgxBACEQDKEBCyAAQQA2AhwgACABNgIUIABBw4+AgAA2AhAgAEEHNgIMQQAhEAygAQtBACEQIABBADYCHCAAIBQ2AhQgAEGMnICAADYCECAAQQc2AgwMnwELIABBADYCHCAAIBQ2AhQgAEGMnICAADYCECAAQQc2AgxBACEQDJ4BCyAAQQA2AhwgACAUNgIUIABB/pGAgAA2AhAgAEEHNgIMQQAhEAydAQsgAEEANgIcIAAgATYCFCAAQY6bgIAANgIQIABBBjYCDEEAIRAMnAELIBBBFUYNVyAAQQA2AhwgACABNgIUIABBzI6AgAA2AhAgAEEgNgIMQQAhEAybAQsgAEEANgIAIBBBAWohAUEkIRALIAAgEDoAKSAAKAIEIRAgAEEANgIEIAAgECABEKuAgI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AUoAhAiAgRAIAAgAjYCECACIAA2AhgLIAVBFGooAgAiAkUNACAAQRRqIAI2AgAgAiAANgIYCyABIARqIAQ2AgAgASAEQQFyNgIEIAFBlNQAKAIARw0AQYjUACAENgIADAELIARB/wFNBEAgBEF4cUGo1ABqIQACf0GA1AAoAgAiAkEBIARBA3Z0IgNxRQRAQYDUACACIANyNgIAIAAMAQsgACgCCAsiAiABNgIMIAAgATYCCCABIAA2AgwgASACNgIIDAELQR8hAiAEQf///wdNBEAgBEEmIARBCHZnIgBrdkEBcSAAQQF0a0E+aiECCyABIAI2AhwgAUIANwIQIAJBAnRBsNYAaiEAAkBBhNQAKAIAIgNBASACdCIHcUUEQCAAIAE2AgBBhNQAIAMgB3I2AgAgASAANgIYIAEgATYCCCABIAE2AgwMAQsgBEEZIAJBAXZrQQAgAkEfRxt0IQIgACgCACEAAkADQCAAIgMoAgRBeHEgBEYNASACQR12IQAgAkEBdCECIAMgAEEEcWpBEGoiBygCACIADQALIAcgATYCACABIAM2AhggASABNgIMIAEgATYCCAwBCyADKAIIIgAgATYCDCADIAE2AgggAUEANgIYIAEgAzYCDCABIAA2AggLQaDUAEGg1AAoAgBBAWsiAEF/IAAbNgIACwsHACAALQAoCwcAIAAtACoLBwAgAC0AKwsHACAALQApCwcAIAAvATQLBwAgAC0AMAtAAQR/IAAoAhghASAALwEuIQIgAC0AKCEDIAAoAjghBCAAEDcgACAENgI4IAAgAzoAKCAAIAI7AS4gACABNgIYC8X4AQIHfwN+IAEgAmohBAJAIAAiAygCDCIADQAgAygCBARAIAMgATYCBAsjAEEQayIJJAACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAn8CQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQA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NgIQIANBDDYCDAyAAwsgAUEBaiEBC0EAIQACQCADKAI4IgJFDQAgAigCVCICRQ0AIAMgAhEAACEACyAADQEM0QILIANCADcDIAw8CyAAQRVGBEAgA0EkNgIcIAMgATYCFCADQYYaNgIQIANBFTYCDEEAIQIM/QILQQAhAiADQQA2AhwgAyABNgIUIANB4g02AhAgA0EUNgIMDPwCCyADKAIEIQBBACECIANBADYCBCADIAAgASAMp2oiARAxIgBFDSsgA0EHNgIcIAMgATYCFCADIAA2AgwM+wILIAMtAC5BwABxRQ0BC0EAIQACQCADKAI4IgJFDQAgAigCUCICRQ0AIAMgAhEAACEACyAARQ0rIABBFUYEQCADQQo2AhwgAyABNgIUIANB8Rg2AhAgA0EVNgIMQQAhAgz6AgtBACECIANBADYCHCADIAE2AhQgA0GLDDYCECADQRM2AgwM+QILQQAhAiADQQA2AhwgAyABNgIUIANBsRQ2AhAgA0ECNgIMDPgCC0EAIQIgA0EANgIcIAMgATYCFCADQYwUNgIQIANBGTYCDAz3AgtBACECIANBADYCHCADIAE2AhQgA0HRHDYCECADQRk2AgwM9gILIABBFUYNPUEAIQIgA0EANgIcIAMgATYCFCADQaIPNgIQIANBIjYCDAz1AgsgAygCBCEAQQAhAiADQQA2AgQgAyAAIAEQMiIARQ0oIANBDTYCHCADIAE2AhQgAyAANgIMDPQCCyAAQRVGDTpBACECIANBADYCHCADIAE2AhQgA0GiDzYCECADQSI2AgwM8wILIAMoAgQhAEEAIQIgA0EANgIEIAMgACABEDIiAEUEQCABQQFqIQEMKAsgA0EONgIcIAMgADYCDCADIAFBAWo2AhQM8gILIABBFUYNN0EAIQIgA0EANgIcIAMgATYCFCADQaIPNgIQIANBIjYCDAzxAgsgAygCBCEAQQAhAiADQQA2AgQgAyAAIAEQMiIARQRAIAFBAWohAQwnCyADQQ82AhwgAyAANgIMIAMgAUEBajYCFAzwAgtBACECIANBADYCHCADIAE2AhQgA0HoFjYCECADQRk2AgwM7wILIABBFUYNM0EAIQIgA0EANgIcIAMgATYCFCADQc4MNgIQIANBIzYCDAzuAgsgAygCBCEAQQAhAiADQQA2AgQgAyAAIAEQMyIARQ0lIANBETYCHCADIAE2AhQgAyAANgIMDO0CCyAAQRVGDTBBACECIANBADYCHCADIAE2AhQgA0HODDYCECADQSM2AgwM7AILIAMoAgQhAEEAIQIgA0EANgIEIAMgACABEDMiAEUEQCABQQFqIQEMJQsgA0ESNgIcIAMgADYCDCADIAFBAWo2AhQM6wILIANBL2otAABBAXFFDQELQRUhAgzPAgtBACECIANBADYCHCADIAE2AhQgA0HoFjYCECADQRk2AgwM6AILIABBO0cNACABQQFqIQEMDAtBACECIANBADYCHCADIAE2AhQgA0GYFzYCECADQQI2AgwM5gILIABBFUYNKEEAIQIgA0EANgIcIAMgATYCFCADQc4MNgIQIANBIzYCDAzlAgsgA0EUNgIcIAMgATYCFCADIAA2AgwM5AILIAMoAgQhAEEAIQIgA0EANgIEIAMgACABEDMiAEUEQCABQQFqIQEM3AILIANBFTYCHCADIAA2AgwgAyABQQFqNgIUDOMCCyADKAIEIQBBACECIANBADYCBCADIAAgARAzIgBFBEAgAUEBaiEBDNoCCyADQRc2AhwgAyAANgIMIAMgAUEBajYCFAziAgsgAEEVRg0jQQAhAiADQQA2AhwgAyABNgIUIANBzgw2AhAgA0EjNgIMDOECCyADKAIEIQBBACECIANBADYCBCADIAAgARAzIgBFBEAgAUEBaiEBDB0LIANBGTYCHCADIAA2AgwgAyABQQFqNgIUDOACCyADKAIEIQBBACECIANBADYCBCADIAAgARAzIgBFBEAgAUEBaiEBDNYCCyADQRo2AhwgAyAANgIMIAMgAUEBajYCFAzfAgsgAEEVRg0fQQAhAiADQQA2AhwgAyABNgIUIANBog82AhAgA0EiNgIMDN4CCyADKAIEIQBBACECIANBADYCBCADIAAgARAyIgBFBEAgAUEBaiEBDBsLIANBHDYCHCADIAA2AgwgAyABQQFqNgIUDN0CCyADKAIEIQBBACECIANBADYCBCADIAAgARAyIgBFBEAgAUEBaiEBDNICCyADQR02Ahwg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YCECADQRU2AgxBACECDLMCCyABIARGBEBB6QEhAgyzAgsgAS0AAEHIAEYNASADQQE6ACgLQbYBIQIMlwILQcoBIQIMlgILIAEgBEcEQCADQQw2AgggAyABNgIEQckBIQIMlgILQegBIQIMrwILIAEgBEYEQEHnASECDK8CCyABLQAAQcgARw0EIAFBAWohAUHIASECDJQCCyABIARGBEBB5gEhAgyuAgsCQAJAIAEtAABBxQBrDhAABQUFBQUFBQUFBQUFBQUBBQsgAUEBaiEBQcYBIQIMlAILIAFBAWohAUHHASECDJMCC0HlASECIAEgBEYNrAIgAygCACIAIAQgAWtqIQUgASAAa0ECaiEGAkADQCABLQAAIABB99MAai0AAEcNAyAAQQJGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyADIAU2AgAMrQILIAMoAgQhACADQgA3AwAgAyAAIAZBAWoiARAtIgBFBEBB1AEhAgyTAgsgA0HkATYCHCADIAE2AhQgAyAANgIMQQAhAgysAgtB4wEhAiABIARGDasCIAMoAgAiACAEIAFraiEFIAEgAGtBAWohBgJAA0AgAS0AACAAQfXTAGotAABHDQIgAEEBRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAyAFNgIADKwCCyADQYEEOwEoIAMoAgQhACADQgA3AwAgAyAAIAZBAWoiARAtIgANAwwCCyADQQA2AgALQQAhAiADQQA2AhwgAyABNgIUIANB0B42AhAgA0EINgIMDKkCC0HFASECDI4CCyADQeIBNgIcIAMgATYCFCADIAA2AgxBACECDKcCC0EAIQACQCADKAI4IgJFDQAgAigCOCICRQ0AIAMgAhEAACEACyAARQ1lIABBFUcEQCADQQA2AhwgAyABNgIUIANB1A42AhAgA0EgNgIMQQAhAgynAgsgA0GFATYCHCADIAE2AhQgA0HXGjYCECADQRU2AgxBACECDKYCC0HhASECIAQgASIARg2lAiAEIAFrIAMoAgAiAWohBSAAIAFrQQRqIQYCQANAIAAtAAAgAUHw0wBqLQAARw0BIAFBBEYNAyABQQFqIQEgBCAAQQFqIgBHDQALIAMgBTYCAAymAgsgA0EANgIcIAMgADYCFCADQYQ3NgIQIANBCDYCDCADQQA2AgBBACECDKUCCyABIARHBEAgA0ENNgIIIAMgATYCBEHCASECDIsCC0HgASECDKQCCyADQQA2AgAgBkEBaiEBC0HDASECDIgCCyABIARGBEBB3wEhAgyiAgsgAS0AAEEwayIAQf8BcUEKSQRAIAMgADoAKiABQQFqIQFBwQEhAgyIAgsgAygCBCEAIANBADYCBCADIAAgARAuIgBFDYgCIANB3gE2AhwgAyABNgIUIAMgADYCDEEAIQIMoQILIAEgBEYEQEHdASECDKECCwJAIAEtAABBLkYEQCABQQFqIQEMAQsgAygCBCEAIANBADYCBCADIAAgARAuIgBFDYkCIANB3AE2AhwgAyABNgIUIAMgADYCDEEAIQIMoQILQcABIQIMhgILIAEgBEYEQEHbASECDKACC0EAIQBBASEFQQEhB0EAIQICQAJAAkACQAJAAn8CQAJAAkACQAJAAkACQCABLQAAQTBrDgoKCQABAgMEBQYICwtBAgwGC0EDDAULQQQMBAtBBQwDC0EGDAILQQcMAQtBCAshAkEAIQVBACEHDAILQQkhAkEBIQBBACEFQQAhBwwBC0EAIQVBASECCyADIAI6ACsgAUEBaiEBAkACQCADLQAuQRBxDQACQAJAAkAgAy0AKg4DAQACBAsgB0UNAwwCCyAADQEMAgsgBUUNAQsgAygCBCEAIANBADYCBCADIAAgARAuIgBFDQIgA0HYATYCHCADIAE2AhQgAyAANgIMQQAhAgyiAgsgAygCBCEAIANBADYCBCADIAAgARAuIgBFDYsCIANB2QE2AhwgAyABNgIUIAMgADYCDEEAIQIMoQILIAMoAgQhACADQQA2AgQgAyAAIAEQLiIARQ2JAiADQdoBNgIcIAMgATYCFCADIAA2AgwMoAILQb8BIQIMhQILQQAhAAJAIAMoAjgiAkUNACACKAI8IgJFDQAgAyACEQAAIQALAkAgAARAIABBFUYNASADQQA2AhwgAyABNgIUIANBnA02AhAgA0EhNgIMQQAhAgygAgtBvgEhAgyFAgsgA0HXATYCHCADIAE2AhQgA0HWGTYCECADQRU2Agx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AQarTAGotAABHDSYgAEEBRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAyAFNgIADO0BCyADQQA2AgAgBkEBaiEBQQMMJgtBqgEhAiABIARGDesBIAMoAgAiACAEIAFraiEFIAEgAGtBAWohBgJAA0AgAS0AACAAQajTAGotAABHDSUgAEEBRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAyAFNgIADOwBCyADQQA2AgAgBkEBaiEBQSYMJQsgASAERgRAQakBIQIM6wELAkACQCABLQAAQdQAaw4CAAEnCyABQQFqIQFBjwEhAgzRAQsgAUEBaiEBQZABIQIM0AELQagBIQIgASAERg3pASADKAIAIgAgBCABa2ohBSABIABrQQFqIQYCQANAIAEtAAAgAEGm0wBqLQAARw0jIABBAUYNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAzqAQsgA0EANgIAIAZBAWohAUEnDCMLQacBIQIgASAERg3oASADKAIAIgAgBCABa2ohBSABIABrQQFqIQYCQANAIAEtAAAgAEGk0wBqLQAARw0iIABBAUYNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAzpAQsgA0EANgIAIAZBAWohAUEcDCILQaYBIQIgASAERg3nASADKAIAIgAgBCABa2ohBSABIABrQQVqIQYCQANAIAEtAAAgAEGe0wBqLQAARw0hIABBBUYNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAzoAQsgA0EANgIAIAZBAWohAUEGDCELQaUBIQIgASAERg3mASADKAIAIgAgBCABa2ohBSABIABrQQRqIQYCQANAIAEtAAAgAEGZ0wBqLQAARw0gIABBBEYNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAznAQsgA0EANgIAIAZBAWohAUEZDCALIAEgBEYEQEGkASECDOYBCwJAAkACQAJAIAEtAABBLWsOIwAkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJAEkJCQkJAIkJCQDJAsgAUEBaiEBQYQBIQIMzgELIAFBAWohAUGFASECDM0BCyABQQFqIQFBigEhAgzMAQsgAUEBaiEBQY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ohAUHvACECDLABCyABQQFqIQFB8AAhAgyvAQtBiAEhAiABIARGDcgBIAMoAgAiACAEIAFraiEFIAEgAGtBBWohBgJAA0AgAS0AACAAQeDSAGotAABHDQIgAEEFRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAyAFNgIADMkBCyADQQA2AgAgBkEBaiEBQSQMAgsgA0EANgIADAILIAEgBEYEQEGHASECDMcBCyABLQAAQcwARw0BIAFBAWohAUETCzoAKSADKAIEIQAgA0EANgIEIAMgACABEC0iAA0CDAELQQAhAiADQQA2AhwgAyABNgIUIANB6R42AhAgA0EGNgIMDMQBC0HuACECDKkBCyADQYYBNgIcIAMgATYCFCADIAA2AgxBACECDMIBC0EAIQACQCADKAI4IgJFDQAgAigCOCICRQ0AIAMgAhEAACEACyAARQ0AIABBFUYNASADQQA2AhwgAyABNgIUIANB1A42AhAgA0EgNgIMQQAhAgzBAQtB7QAhAgymAQsgA0GFATYCHCADIAE2AhQgA0HXGjYCECADQRU2AgxBACECDL8BCyABIARGBEBBhQEhAgy/AQsCQCABLQAAQSBGBEAgAUEBaiEBDAELIANBADYCHCADIAE2AhQgA0GGHjYCECADQQY2AgxBACECDL8BC0ECIQIMpAELA0AgAS0AAEEgRw0CIAQgAUEBaiIBRw0AC0GEASECDL0BCyABIARGBEBBgwEhAgy9AQsCQCABLQAAQQlrDgRAAABAAAtB6wAhAgyiAQsgAy0AKUEFRgRAQewAIQIMogELQeoAIQIMoQELIAEgBEYEQEGCASECDLsBCyADQQ82AgggAyABNgIEDAoLIAEgBEYEQEGBASECDLoBCwJAIAEtAABBCWsOBD0AAD0AC0HpACECDJ8BCyABIARHBEAgA0EPNgIIIAMgATYCBEHnACECDJ8BC0GAASECDLgBCwJAIAEgBEcEQANAIAEtAABB4M4Aai0AACIAQQNHBEACQCAAQQFrDgI/AAQLQeYAIQIMoQELIAQgAUEBaiIBRw0AC0H+ACECDLkBC0H+ACECDLgBCyADQQA2AhwgAyABNgIUIANBxh82AhAgA0EHNgIMQQA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BADYCBCADIAAgARArIgBFDRYgA0HwADYCHCADIAE2AhQgAyAANgIMQQAhAgyqAQsgA0EANgIcIAMgATYCFCADQcsPNgIQIANBBzYCDEEAIQIMqQELQeIAIQIMjgELIAEgBEYEQEH4ACECDKgBCyABQQFqDAILIAEgBEYEQEH3ACECDKcBCyABQQFqDAELIAEgBEYNASABQQFqCyEBQQQhAgyKAQtB9gAhAgyjAQsDQCABLQAAQeDKAGotAAAiAEECRwRAIABBAUcEQEHfACECDIsBCwwnCyAEIAFBAWoiAUcNAAtB9QAhAgyiAQsgASAERgRAQfQAIQIMogELAkAgAS0AAEEJaw43JQMGJQQGBgYGBgYGBgYGBgYGBgYGBgYFBgYCBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGAAYLIAFBAWoLIQFBBSECDIYBCyABQQFqDAYLIAMoAgQhACADQQA2AgQgAyAAIAEQKyIARQ0IIANB2wA2AhwgAyABNgIUIAMgADYCDEEAIQIMngELIAMoAgQhACADQQA2AgQgAyAAIAEQKyIARQ0IIANB3QA2AhwgAyABNgIUIAMgADYCDEEAIQIMnQELIAMoAgQhACADQQA2AgQgAyAAIAEQKyIARQ0IIANB8AA2AhwgAyABNgIUIAMgADYCDEEAIQIMnAELIANBADYCHCADIAE2AhQgA0G8EzYCECADQQc2AgxBACECDJsBCwJAAkACQAJAA0AgAS0AAEHgyABqLQAAIgBBBUcEQAJAIABBAWsOBiQDBAUGAAYLQd4AIQIMhgELIAQgAUEBaiIBRw0AC0HzACECDJ4BCyADKAIEIQAgA0EANgIEIAMgACABECsiAEUNByADQdsANgIcIAMgATYCFCADIAA2AgxBACECDJ0BCyADKAIEIQAgA0EANgIEIAMgACABECsiAEUNByADQd0ANgIcIAMgATYCFCADIAA2AgxBACECDJwBCyADKAIEIQAgA0EANgIEIAMgACABECsiAEUNByADQfAANgIcIAMgATYCFCADIAA2AgxBACECDJsBCyADQQA2AhwgAyABNgIUIANB3Ag2AhAgA0EHNgIMQQAhAgyaAQsgASAERg0BIAFBAWoLIQFBBiECDH4LQfIAIQIMlwELAkACQAJAAkADQCABLQAAQeDGAGotAAAiAEEFRwRAIABBAWsOBB8CAwQFCyAEIAFBAWoiAUcNAAtB8QAhAgyaAQsgAygCBCEAIANBADYCBCADIAAgARArIgBFDQMgA0HbADYCHCADIAE2AhQgAyAANgIMQQAhAgyZAQsgAygCBCEAIANBADYCBCADIAAgARArIgBFDQMgA0HdADYCHCADIAE2AhQgAyAANgIMQQAhAgyYAQsgAygCBCEAIANBADYCBCADIAAgARArIgBFDQMgA0HwADYCHCADIAE2AhQgAyAANgIMQQAhAgyXAQsgA0EANgIcIAMgATYCFCADQbQKNgIQIANBBzYCDEEAIQIMlgELQc4AIQIMewtB0AAhAgx6C0HdACECDHkLIAEgBEYEQEHwACECDJMBCwJAIAEtAABBCWsOBBYAABYACyABQQFqIQFB3AAhAgx4CyABIARGBEBB7wAhAgySAQsCQCABLQAAQQlrDgQVAAAVAAtBACEAAkAgAygCOCICRQ0AIAIoAjAiAkUNACADIAIRAAAhAAsgAEUEQEHTASECDHgLIABBFUcEQCADQQA2AhwgAyABNgIUIANBwQ02AhAgA0EaNgIMQQAhAgySAQsgA0HuADYCHCADIAE2AhQgA0HwGTYCECADQRU2AgxBACECDJEBC0HtACECIAEgBEYNkAEgAygCACIAIAQgAWtqIQUgASAAa0EDaiEGAkADQCABLQAAIABB18YAai0AAEcNBCAAQQNGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyADIAU2AgAMkQELIANBADYCACAGQQFqIQEgAy0AKSIAQSNrQQtJDQQCQCAAQQZLDQBBASAAdEHKAHFFDQAMBQtBACECIANBADYCHCADIAE2AhQgA0HlCTYCECADQQg2AgwMkAELQewAIQIgASAERg2PASADKAIAIgAgBCABa2ohBSABIABrQQJqIQYCQANAIAEtAAAgAEHUxgBqLQAARw0DIABBAkYNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAyQAQsgA0EANgIAIAZBAWohASADLQApQSFGDQMgA0EANgIcIAMgATYCFCADQYkKNgIQIANBCDYCDEEAIQIMjwELQesAIQIgASAERg2OASADKAIAIgAgBCABa2ohBSABIABrQQNqIQYCQANAIAEtAAAgAEHQxgBqLQAARw0CIABBA0YNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAyPAQsgA0EANgIAIAZBAWohASADLQApIgBBI0kNAiAAQS5GDQIgA0EANgIcIAMgATYCFCADQcEJNgIQIANBCDYCDEEAIQIMjgELIANBADYCAAtBACECIANBADYCHCADIAE2AhQgA0GENzYCECADQQg2AgwMjAELQdgAIQIMcQsgASAERwRAIANBDTYCCCADIAE2AgRB1wAhAgxxC0HqACECDIoBCyABIARGBEBB6QAhAgyKAQsgAS0AAEEwayIAQf8BcUEKSQRAIAMgADoAKiABQQFqIQFB1gAhAgxwCyADKAIEIQAgA0EANgIEIAMgACABEC4iAEUNdCADQegANgIcIAMgATYCFCADIAA2AgxBACECDIkBCyABIARGBEBB5wAhAgyJAQsCQCABLQAAQS5GBEAgAUEBaiEBDAELIAMoAgQhACADQQA2AgQgAyAAIAEQLiIARQ11IANB5gA2AhwgAyABNgIUIAMgADYCDEEAIQIMiQELQdUAIQIMbgsgASAERgRAQeUAIQIMiAELQQAhAEEBIQVBASEHQQAhAgJAAkACQAJAAkACfwJAAkACQAJAAkACQAJAIAEtAABBMGsOCgoJAAECAwQFBggLC0ECDAYLQQMMBQtBBAwEC0EFDAMLQQYMAgtBBwwBC0EICyECQQAhBUEAIQcMAgtBCSECQQEhAEEAIQVBACEHDAELQQAhBUEBIQILIAMgAjoAKyABQQFqIQECQAJAIAMtAC5BEHENAAJAAkACQCADLQAqDgMBAAIECyAHRQ0DDAILIAANAQwCCyAFRQ0BCyADKAIEIQAgA0EANgIEIAMgACABEC4iAEUNAiADQeIANgIcIAMgATYCFCADIAA2AgxBACECDIoBCyADKAIEIQAgA0EANgIEIAMgACABEC4iAEUNdyADQeMANgIcIAMgATYCFCADIAA2AgxBACECDIkBCyADKAIEIQAgA0EANgIEIAMgACABEC4iAEUNdSADQeQANgIcIAMgATYCFCADIAA2AgwMiAELQdMAIQIMbQsgAy0AKUEiRg2AAUHSACECDGwLQQAhAAJAIAMoAjgiAkUNACACKAI8IgJFDQAgAyACEQAAIQALIABFBEBB1AAhAgxsCyAAQRVHBEAgA0EANgIcIAMgATYCFCADQZwNNgIQIANBITYCDEEAIQIMhgELIANB4QA2AhwgAyABNgIUIANB1hk2AhAgA0EVNgIMQQAhAgyFAQsgASAERgRAQeAAIQIMhQELAkACQAJAAkACQCABLQAAQQprDgQBBAQABAsgAUEBaiEBDAELIAFBAWohASADQS9qLQAAQQFxRQ0BC0HRACECDGwLIANBADYCHCADIAE2AhQgA0GIETYCECADQQk2AgxBACECDIUBCyADQQA2AhwgAyABNgIUIANBiBE2AhAgA0EJNgIMQQAhAgyEAQsgASAERgRAQd8AIQIMhAELIAEtAABBCkYEQCABQQFqIQEMCQsgAy0ALkHAAHENCCADQQA2AhwgAyABNgIUIANBiBE2AhAgA0ECNgIMQQAhAgyDAQsgASAERgRAQd0AIQIMgwELIAEtAAAiAkENRgRAIAFBAWohAUHPACECDGkLIAEhACACQQlrDgQFAQEFAQsgBCABIgBGBEBB3AAhAgyCAQsgAC0AAEEKRw0AIABBAWoMAgtBACECIANBADYCHCADIAA2AhQgA0G1LDYCECADQQc2AgwMgAELIAEgBEYEQEHbACECDIABCwJAIAEtAABBCWsOBAMAAAMACyABQQFqCyEBQc0AIQIMZAsgASAERgRAQdoAIQIMfgsgAS0AAEEJaw4EAAEBAAELQQAhAiADQQA2AhwgA0HsETYCECADQQc2AgwgAyABQQFqNgIUDHwLIANBgBI7ASpBACEAAkAgAygCOCICRQ0AIAIoAjAiAkUNACADIAIRAAAhAAsgAEUNACAAQRVHDQEgA0HZADYCHCADIAE2AhQgA0HwGTYCECADQRU2AgxBACECDHsLQcwAIQIMYAsgA0EANgIcIAMgATYCFCADQcENNgIQIANBGjYCDEEAIQIMeQsgASAERgRAQdkAIQIMeQsgAS0AAEEg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ASADKQMgIgtC//////////8PWARAIAMgC0IEhiAKhDcDIAwCC0EAIQIgA0EANgIcIAMgATYCFCADQa0JNgIQIANBDDYCDAwfC0ElIQIMBAtBJiECDAMLIAMgAToALCADQQA2AgAgB0EBaiEBQQwhAgwCCyADQQA2AgAgBkEBaiEBQQohAgwBCyABQQFqIQFBCCECDAALAAtBACECIANBADYCHCADIAE2AhQgA0HVEDYCECADQQk2AgwMGAtBACECIANBADYCHCADIAE2AhQgA0HXCjYCECADQQk2AgwMFwtBACECIANBADYCHCADIAE2AhQgA0G/EDYCECADQQk2AgwMFgtBACECIANBADYCHCADIAE2AhQgA0GkETYCECADQQk2AgwMFQtBACECIANBADYCHCADIAE2AhQgA0HVEDYCECADQQk2AgwMFAtBACECIANBADYCHCADIAE2AhQgA0HXCjYCECADQQk2AgwMEwtBACECIANBADYCHCADIAE2AhQgA0G/EDYCECADQQk2AgwMEgtBACECIANBADYCHCADIAE2AhQgA0GkETYCECADQQk2AgwMEQtBACECIANBADYCHCADIAE2AhQgA0G/FjYCECADQQ82AgwMEAtBACECIANBADYCHCADIAE2AhQgA0G/FjYCECADQQ82AgwMDwtBACECIANBADYCHCADIAE2AhQgA0HIEjYCECADQQs2AgwMDgtBACECIANBADYCHCADIAE2AhQgA0GVCTYCECADQQs2AgwMDQtBACECIANBADYCHCADIAE2AhQgA0HpDzYCECADQQo2AgwMDAtBACECIANBADYCHCADIAE2AhQgA0GDEDYCECADQQo2AgwMCwtBACECIANBADYCHCADIAE2AhQgA0GmHDYCECADQQI2AgwMCgtBACECIANBADYCHCADIAE2AhQgA0HFFTYCECADQQI2AgwMCQtBACECIANBADYCHCADIAE2AhQgA0H/FzYCECADQQI2AgwMCAtBACECIANBADYCHCADIAE2AhQgA0HKFzYCECADQQI2AgwMBwsgA0ECNgIcIAMgATYCFCADQZQdNgIQIANBFjYCDEEAIQIMBgtB3gAhAiABIARGDQUgCUEIaiEHIAMoAgAhBQJAAkAgASAERwRAIAVBxsYAaiEIIAQgBWogAWshBiAFQX9zQQpqIgUgAWohAANAIAEtAAAgCC0AAEcEQEECIQgMAwsgBUUEQEEAIQggACEBDAMLIAVBAWshBSAIQQFqIQggBCABQQFqIgFHDQALIAYhBSAEIQELIAdBATYCACADIAU2AgAMAQsgA0EANgIAIAcgCDYCAAsgByABNgIEIAkoAgwhACAJKAIIDgMBBQIACwALIANBADYCHCADQa0dNgIQIANBFzYCDCADIABBAWo2AhRBACECDAMLIANBADYCHCADIAA2AhQgA0HCHTYCECADQQk2AgxBACECDAILIAEgBEYEQEEoIQIMAgsgA0EJNgIIIAMgATYCBEEnIQIMAQsgASAERgRAQQEhAgwBCwNAAkACQAJAIAEtAABBCmsOBAABAQABCyABQQFqIQEMAQsgAUEBaiEBIAMtAC5BIHENAEEAIQIgA0EANgIcIAMgATYCFCADQYwgNgIQIANBBTYCDAwCC0EBIQIgASAERw0ACwsgCUEQaiQAIAJFBEAgAygCDCEADAELIAMgAjYCHEEAIQAgAygCBCIBRQ0AIAMgASAEIAMoAggRAQAiAUUNACADIAQ2AhQgAyABNgIMIAEhAAsgAAu+AgECfyAAQQA6AAAgAEHcAGoiAUEBa0EAOgAAIABBADoAAiAAQQA6AAEgAUEDa0EAOgAAIAFBAmtBADoAACAAQQA6AAMgAUEEa0EAOgAAQQAgAGtBA3EiASAAaiIAQQA2AgBB3AAgAWtBfHEiAiAAaiIBQQRrQQA2AgACQCACQQlJDQAgAEEANgIIIABBADYCBCABQQhrQQA2AgAgAUEMa0EANgIAIAJBGUkNACAAQQA2AhggAEEANgIUIABBADYCECAAQQA2AgwgAUEQa0EANgIAIAFBFGtBADYCACABQRhrQQA2AgAgAUEca0EANgIAIAIgAEEEcUEYciICayIBQSBJDQAgACACaiEAA0AgAEIANwMYIABCADcDECAAQgA3AwggAEIANwMAIABBIGohACABQSBrIgFBH0sNAAsLC1YBAX8CQCAAKAIMDQACQAJAAkACQCAALQAxDgMBAAMCCyAAKAI4IgFFDQAgASgCLCIBRQ0AIAAgAREAACIBDQ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enKAAsEAQAAAQBBgcsAC14CAgACAgICAgICAgICAgICAgICAgICAgICAgICAgIAAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAEHpzAALBQECAAEDAEGAzQALXwQFAAAFBQUFBQUFBQUFBQYFBQUFBQUFBQUFBQUABQAHCAUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQAFAAUABQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUAAAAFAEHpzgALBQEBAAEBAEGAzwALAQEAQZrPAAtBAgAAAAAAAAMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAAAAAAAAAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMAQenQAAsFAQEAAQEAQYDRAAsBAQBBitEACwYCAAAAAAIAQaHRAAs6AwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMAAAAAAAADAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwBB4NIAC5oBTk9VTkNFRUNLT1VUTkVDVEVURUNSSUJFTFVTSEVURUFEU0VBUkNIUkdFQ1RJVklUWUxFTkRBUlZFT1RJRllQVElPTlNDSFNFQVlTVEFUQ0hHRVVFUllPUkRJUkVDVE9SVFJDSFBBUkFNRVRFUlVSQ0VCU0NSSUJFQVJET1dOQUNFSU5ETktDS1VCU0NSSUJFSFRUUC9BRFRQLw==' + +let wasmBuffer + +Object.defineProperty(module, 'exports', { + get: () => { + return wasmBuffer + ? wasmBuffer + : (wasmBuffer = Buffer.from(wasmBase64, 'base64')) + } +}) diff --git a/node_modules/undici/lib/llhttp/llhttp_simd-wasm.js b/node_modules/undici/lib/llhttp/llhttp_simd-wasm.js index 017e247..1875d85 100644 --- a/node_modules/undici/lib/llhttp/llhttp_simd-wasm.js +++ b/node_modules/undici/lib/llhttp/llhttp_simd-wasm.js @@ -1 +1,15 @@ -module.exports = 'AGFzbQEAAAABMAhgAX8Bf2ADf39/AX9gBH9/f38Bf2A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kACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAIBAOxwEAAQIDBAUGBwgJCgsMDQ4PEBESExQVFhcYGRobHB4fICEjJSg/QEFERUZHSElKS0xNT1BRUlPeA1dZW1xdYGJlZmdoaWprbG1vcHFyc3R1dn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AgQCQCAAIBAgARCngICAACIQDQAgASEBDE0LIABB0gA2AhwgACABNgIUIAAgEDYCDEEAIRAMsgELIAAoAgQhECAAQQA2AgQCQCAAIBAgARCngICAACIQDQAgASEBDE0LIABB0wA2AhwgACABNgIUIAAgEDYCDEEAIRAMsQELIAAoAgQhECAAQQA2AgQCQCAAIBAgARCngICAACIQDQAgASEBDFELIABB5QA2AhwgACABNgIUIAAgEDYCDEEAIRAMsAELIABBADYCHCAAIAE2AhQgAEHGioCAADYCECAAQQc2AgxBACEQDK8BCyAAKAIEIRAgAEEANgIEAkAgACAQIAEQp4CAgAAiEA0AIAEhAQxJCyAAQdIANgIcIAAgATYCFCAAIBA2AgxBACEQDK4BCyAAKAIEIRAgAEEANgIEAkAgACAQIAEQp4CAgAAiEA0AIAEhAQxJCyAAQdMANgIcIAAgATYCFCAAIBA2AgxBACEQDK0BCyAAKAIEIRAgAEEANgIEAkAgACAQIAEQp4CAgAAiEA0AIAEhAQxNCyAAQeUANgIcIAAgATYCFCAAIBA2AgxBACEQDKwBCyAAQQA2AhwgACABNgIUIABB3IiAgAA2AhAgAEEHNgIMQQAhEAyrAQsgEEE/Rw0BIAFBAWohAQtBBSEQDJABC0EAIRAgAEEANgIcIAAgATYCFCAAQf2SgIAANgIQIABBBzYCDAyoAQsgACgCBCEQIABBADYCBAJAIAAgECABEKeAgIAAIhANACABIQEMQgsgAEHSADYCHCAAIAE2AhQgACAQNgIMQQAhEAynAQsgACgCBCEQIABBADYCBAJAIAAgECABEKeAgIAAIhANACABIQEMQgsgAEHTADYCHCAAIAE2AhQgACAQNgIMQQAhEAymAQsgACgCBCEQIABBADYCBAJAIAAgECABEKeAgIAAIhANACABIQEMRgsgAEHlADYCHCAAIAE2AhQgACAQNgIMQQAhEAylAQsgACgCBCEBIABBADYCBAJAIAAgASAUEKeAgIAAIgENACAUIQEMPwsgAEHSADYCHCAAIBQ2AhQgACABNgIMQQAhEAykAQsgACgCBCEBIABBADYCBAJAIAAgASAUEKeAg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EAAkADQCAAIgMoAgRBeHEgBEYNASACQR12IQAgAkEBdCECIAMgAEEEcWpBEGoiBygCACIADQALIAcgATYCACABIAM2AhggASABNgIMIAEgATYCCAwBCyADKAIIIgAgATYCDCADIAE2AgggAUEANgIYIAEgAzYCDCABIAA2AggLQaDUAEGg1AAoAgBBAWsiAEF/IAAbNgIACwsHACAALQAoCwcAIAAtACoLBwAgAC0AKwsHACAALQApCwcAIAAvATQLBwAgAC0AMAtAAQR/IAAoAhghASAALwEuIQIgAC0AKCEDIAAoAjghBCAAEDcgACAENgI4IAAgAzoAKCAAIAI7AS4gACABNgIYC8X4AQIHfwN+IAEgAmohBAJAIAAiAygCDCIADQAgAygCBARAIAMgATYCBAsjAEEQayIJJAACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAn8CQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkAgAygCHCICQQFrDuwB7gEB6AECAwQFBgcICQoLDA0ODxAREucBE+YBFBXlARYX5AEYGRobHB0eHyDvAe0BIeMBIiMkJSY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JAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAIAMCfwJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACfwJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAn8CQAJAAkACQAJAAkACQAJ/AkACQAJAAn8CQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAIAMCfwJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACfwJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQCACDtQBAAECAwQFBgcICQoLDA0ODxARFBUWFxgZGhscHR4fICEjJCUnKCmIA4cDhQOEA/wC9QLuAusC6ALmAuMC4ALfAt0C2wLWAtUC1ALTAtIC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hwgAyABNgIUIANBsRQ2AhAgA0ECNgIMDPgCC0EAIQIgA0EANgIcIAMgATYCFCADQYwUNgIQIANBGTYCDAz3AgtBACECIANBADYCHCADIAE2AhQgA0HRHDYCECADQRk2AgwM9gILIABBFUYNPUEAIQIgA0EANgIcIAMgATYCFCADQaIPNgIQIANBIjYCDAz1AgsgAygCBCEAQQAhAiADQQA2AgQgAyAAIAEQMiIARQ0oIANBDTYCHCADIAE2AhQgAyAANgIMDPQCCyAAQRVGDTpBACECIANBADYCHCADIAE2AhQgA0GiDzYCECADQSI2AgwM8wILIAMoAgQhAEEAIQIgA0EANgIEIAMgACABEDIiAEUEQCABQQFqIQEMKAsgA0EONgIcIAMgADYCDCADIAFBAWo2AhQM8gILIABBFUYNN0EAIQIgA0EANgIcIAMgATYCFCADQaIPNgIQIANBIjYCDAzxAgsgAygCBCEAQQAhAiADQQA2AgQgAyAAIAEQMiIARQRAIAFBAWohAQwnCyADQQ82AhwgAyAANgIMIAMgAUEBajYCFAzwAgtBACECIANBADYCHCADIAE2AhQgA0HoFjYCECADQRk2AgwM7wILIABBFUYNM0EAIQIgA0EANgIcIAMgATYCFCADQc4MNgIQIANBIzYCDAzuAgsgAygCBCEAQQAhAiADQQA2AgQgAyAAIAEQMyIARQ0lIANBETYCHCADIAE2AhQgAyAANgIMDO0CCyAAQRVGDTBBACECIANBADYCHCADIAE2AhQgA0HODDYCECADQSM2AgwM7AILIAMoAgQhAEEAIQIgA0EANgIEIAMgACABEDMiAEUEQCABQQFqIQEMJQsgA0ESNgIcIAMgADYCDCADIAFBAWo2AhQM6wILIANBL2otAABBAXFFDQELQRUhAgzPAgtBACECIANBADYCHCADIAE2AhQgA0HoFjYCECADQRk2AgwM6AILIABBO0cNACABQQFqIQEMDAtBACECIANBADYCHCADIAE2AhQgA0GYFzYCECADQQI2AgwM5gILIABBFUYNKEEAIQIgA0EANgIcIAMgATYCFCADQc4MNgIQIANBIzYCDAzlAgsgA0EUNgIcIAMgATYCFCADIAA2AgwM5AILIAMoAgQhAEEAIQIgA0EANgIEIAMgACABEDMiAEUEQCABQQFqIQEM3AILIANBFTYCHCADIAA2AgwgAyABQQFqNgIUDOMCCyADKAIEIQBBACECIANBADYCBCADIAAgARAzIgBFBEAgAUEBaiEBDNoCCyADQRc2AhwgAyAANgIMIAMgAUEBajYCFAziAgsgAEEVRg0jQQAhAiADQQA2AhwgAyABNgIUIANBzgw2AhAgA0EjNgIMDOECCyADKAIEIQBBACECIANBADYCBCADIAAgARAzIgBFBEAgAUEBaiEBDB0LIANBGTYCHCADIAA2AgwgAyABQQFqNgIUDOACCyADKAIEIQBBACECIANBADYCBCADIAAgARAzIgBFBEAgAUEBaiEBDNYCCyADQRo2AhwgAyAANgIMIAMgAUEBajYCFAzfAgsgAEEVRg0fQQAhAiADQQA2AhwgAyABNgIUIANBog82AhAgA0EiNgIMDN4CCyADKAIEIQBBACECIANBADYCBCADIAAgARAyIgBFBEAgAUEBaiEBDBsLIANBHDYCHCADIAA2AgwgAyABQQFqNgIUDN0CCyADKAIEIQBBACECIANBADYCBCADIAAgARAyIgBFBEAgAUEBaiEBDNICCyADQR02AhwgAyAANgIMIAMgAUEBajYCFAzcAgsgAEE7Rw0BIAFBAWohAQtBJCECDMACC0EAIQIgA0EANgIcIAMgATYCFCADQc4UNgIQIANBDDYCDAzZAgsgASAERwRAA0AgAS0AAEEgRw3xASAEIAFBAWoiAUcNAAtBLCECDNkCC0EsIQIM2AILIAEgBEYEQEE0IQIM2AILAkACQANAAkAgAS0AAEEKaw4EAgAAAwALIAQgAUEBaiIBRw0AC0E0IQIM2QILIAMoAgQhACADQQA2AgQgAyAAIAEQMCIARQ2MAiADQTI2AhwgAyABNgIUIAMgADYCDEEAIQIM2AILIAMoAgQhACADQQA2AgQgAyAAIAEQMCIARQRAIAFBAWohAQyMAgsgA0EyNgIcIAMgADYCDCADIAFBAWo2AhRBACECDNcCCyABIARHBEACQANAIAEtAABBMGsiAEH/AXFBCk8EQEE5IQIMwAILIAMpA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1AEhAgyTAgsgA0HkATYCHCADIAE2AhQgAyAANgIMQQAhAgysAgtB4wEhAiABIARGDasCIAMoAgAiACAEIAFraiEFIAEgAGtBAWohBgJAA0AgAS0AACAAQfXTAGotAABHDQIgAEEBRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAyAFNgIADKwCCyADQYEEOwEoIAMoAgQhACADQgA3AwAgAyAAIAZBAWoiARAtIgANAwwCCyADQQA2AgALQQAhAiADQQA2AhwgAyABNgIUIANB0B42AhAgA0EINgIMDKkCC0HFASECDI4CCyADQeIBNgIcIAMgATYCFCADIAA2AgxBACECDKcCC0EAIQACQCADKAI4IgJFDQAgAigCOCICRQ0AIAMgAhEAACEACyAARQ1lIABBFUcEQCADQQA2AhwgAyABNgIUIANB1A42AhAgA0EgNgIMQQAhAgynAgsgA0GFATYCHCADIAE2AhQgA0HXGjYCECADQRU2AgxBACECDKYCC0HhASECIAQgASIARg2lAiAEIAFrIAMoAgAiAWohBSAAIAFrQQRqIQYCQANAIAAtAAAgAUHw0wBqLQAARw0BIAFBBEYNAyABQQFqIQEgBCAAQQFqIgBHDQALIAMgBTYCAAymAgsgA0EANgIcIAMgADYCFCADQYQ3NgIQIANBCDYCDCADQQA2AgBBACECDKUCCyABIARHBEAgA0ENNgIIIAMgATYCBEHCASECDIsCC0HgASECDKQCCyADQQA2AgAgBkEBaiEBC0HDASECDIgCCyABIARGBEBB3wEhAgyiAgsgAS0AAEEwayIAQf8BcUEKSQRAIAMgADoAKiABQQFqIQFBwQEhAgyIAgsgAygCBCEAIANBADYCBCADIAAgARAuIgBFDYgCIANB3gE2AhwgAyABNgIUIAMgADYCDEEAIQIMoQILIAEgBEYEQEHdASECDKECCwJAIAEtAABBLkYEQCABQQFqIQEMAQsgAygCBCEAIANBADYCBCADIAAgARAuIgBFDYkCIANB3AE2AhwgAyABNgIUIAMgADYCDEEAIQIMoQILQcABIQIMhgILIAEgBEYEQEHbASECDKACC0EAIQBBASEFQQEhB0EAIQICQAJAAkACQAJ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/wNxIAJB//8Dc0sNACADIAAgAmo7ATQMAgtBACECIANBADYCHCADIAE2AhQgA0GAHTYCECADQQ02AgwMnQILIANBADYCHCADIAE2AhQgA0GAHTYCECADQQ02AgxBACECDJwCC0G7ASECDIECCyABIARGBEBB1AEhAgybAgsCQCABLQAAQTBrQf8BcSICQQpJBEAgAUEBaiEBAkAgAy8BNCIAQZkzSw0AIAMgAEEKbCIAOwE0IABB/v8DcSACQf//A3NLDQAgAyAAIAJqOwE0DAILQQAhAiADQQA2AhwgAyABNgIUIANBgB02AhAgA0ENNgIMDJwCCyADQQA2AhwgAyABNgIUIANBgB02AhAgA0ENNgIMQQAhAgybAgtBugEhAgyAAgsgASAERgRAQdMBIQIMmgILAkACQAJAAkAgAS0AAEEKaw4XAgMDAAMDAwMDAwMDAwMDAwMDAwMDAwEDCyABQQFqDAULIAFBAWohAUG5ASECDIECCyABQQFqIQEgA0Evai0AAEEBcQ0IIANBADYCHCADIAE2AhQgA0GFCzYCECADQQ02AgxBACECDJoCCyADQQA2AhwgAyABNgIUIANBhQs2AhAgA0ENNgIMQQAhAgyZAgsgASAERwRAIANBDjYCCCADIAE2AgRBASECDP8BC0HSASECDJgCCwJAAkADQAJAIAEtAABBCmsOBAIAAAMACyAEIAFBAWoiAUcNAAtB0QEhAgyZAgsgAygCBCEAIANBADYCBCADIAAgARAsIgBFBEAgAUEBaiEBDAQLIANB0AE2AhwgAyAANgIMIAMgAUEBajYCFEEAIQIMmAILIAMoAgQhACADQQA2AgQgAyAAIAEQLCIADQEgAUEBagshAUG3ASECDPwBCyADQc8BNgIcIAMgADYCDCADIAFBAWo2AhRBACECDJUCC0G4ASECDPoBCyADQS9qLQAAQQFxDQEgA0EANgIcIAMgATYCFCADQc8bNgIQIANBGTYCDEEAIQIMkwILIAEgBEYEQEHPASECDJMCCwJAAkACQCABLQAAQQprDgQBAgIAAgsgAUEBaiEBDAILIAFBAWohAQwBCyADLQAuQcAAcUUNAQtBACEAAkAgAygCOCICRQ0AIA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ACAGQQFqIQFBHQwsCyABIARGBEBBsAEhAgzyAQsCQAJAIAEtAABByQBrDgcBLi4uLi4ALgsgAUEBaiEBQZcBIQIM2AELIAFBAWohAUEiDCsLIAEgBEYEQEGvASECDPEBCyABLQAAQdAARw0rIAFBAWohAUGWASECDNYBCyABIARGBEBBrgEhAgzwAQsCQAJAIAEtAABBxgBrDgsALCwsLCwsLCwsASwLIAFBAWohAUGUASECDNYBCyABQQFqIQFBlQEhAgzVAQtBrQEhAiABIARGDe4BIAMoAgAiACAEIAFraiEFIAEgAGtBA2ohBgJAA0AgAS0AACAAQazTAGotAABHDSggAEEDRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAyAFNgIADO8BCyADQQA2AgAgBkEBaiEBQQ0MKAtBrAEhAiABIARGDe0BIAMoAgAiACAEIAFraiEFIAEgAGtBAmohBgJAA0AgAS0AACAAQeHTAGotAABHDScgAEECRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAyAFNgIADO4BCyADQQA2AgAgBkEBaiEBQQwMJwtBqwEhAiABIARGDewBIAMoAgAiACAEIAFraiEFIAEgAGtBAWohBgJAA0AgAS0AACAAQarTAGotAABHDSYgAEEBRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAyAFNgIADO0BCyADQQA2AgAgBkEBaiEBQQMMJgtBqgEhAiABIARGDesBIAMoAgAiACAEIAFraiEFIAEgAGtBAWohBgJAA0AgAS0AACAAQajTAGotAABHDSUgAEEBRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAyAFNgIADOwBCyADQQA2AgAgBkEBaiEBQSYMJQsgASAERgRAQakBIQIM6wELAkACQCABLQAAQdQAaw4CAAEnCyABQQFqIQFBjwEhAgzRAQsgAUEBaiEBQZABIQIM0AELQagBIQIgASAERg3pASADKAIAIgAgBCABa2ohBSABIABrQQFqIQYCQANAIAEtAAAgAEGm0wBqLQAARw0jIABBAUYNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAzqAQsgA0EANgIAIAZBAWohAUEnDCMLQacBIQIgASAERg3oASADKAIAIgAgBCABa2ohBSABIABrQQFqIQYCQANAIAEtAAAgAEGk0wBqLQAARw0iIABBAUYNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAzpAQsgA0EANgIAIAZBAWohAUEcDCILQaYBIQIgASAERg3nASADKAIAIgAgBCABa2ohBSABIABrQQVqIQYCQANAIAEtAAAgAEGe0wBqLQAARw0hIABBBUYNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAzoAQsgA0EANgIAIAZBAWohAUEGDCELQaUBIQIgASAERg3mASADKAIAIgAgBCABa2ohBSABIABrQQRqIQYCQANAIAEtAAAgAEGZ0wBqLQAARw0gIABBBEYNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAznAQsgA0EANgIAIAZBAWohAUEZDCALIAEgBEYEQEGkASECDOYBCwJAAkACQAJAIAEtAABBLWsOIwAkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJAEkJCQkJAIkJCQDJAsgAUEBaiEBQYQBIQIMzgELIAFBAWohAUGFASECDM0BCyABQQFqIQFBigEhAgzMAQsgAUEBaiEBQYsBIQIMywELQaMBIQIgASAERg3kASADKAIAIgAgBCABa2ohBSABIABrQQFqIQYCQANAIAEtAAAgAEGX0wBqLQAARw0eIABBAUYNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAzlAQsgA0EANgIAIAZBAWohAUELDB4LIAEgBEYEQEGiASECDOQBCwJAAkAgAS0AAEHBAGsOAwAgASALIAFBAWohAUGGASECDMoBCyABQQFqIQFBiQEhAgzJAQsgASAERgRAQaEBIQIM4wELAkACQCABLQAAQcEAaw4PAB8fHx8fHx8fHx8fHx8BHwsgAUEBaiEBQYcBIQIMyQELIAFBAWohAUGIASECDMgBCyABIARGBEBBoAEhAgziAQsgAS0AAEHMAEcNHCABQQFqIQFBCgwbC0GfASECIAEgBEYN4AEgAygCACIAIAQgAWtqIQUgASAAa0EFaiEGAkADQCABLQAAIABBkdMA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BzgBrDgMACwELCyABQQFqIQFB9AAhAgy1AQsgAUEBaiEBQfUAIQIMtAELIAEgBEYEQEGNASECDM4BCyABLQAAQdkARw0IIAFBAWohAUEIDAcLQYwBIQIgASAERg3MASADKAIAIgAgBCABa2ohBSABIABrQQNqIQYCQANAIAEtAAAgAEHs0gBqLQAARw0GIABBA0YNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAzNAQsgA0EANgIAIAZBAWohAUEFDAYLQYsBIQIgASAERg3LASADKAIAIgAgBCABa2ohBSABIABrQQVqIQYCQANAIAEtAAAgAEHm0gBqLQAARw0FIABBBUYNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAzMAQsgA0EANgIAIAZBAWohAUEWDAULQYoBIQIgASAERg3KASADKAIAIgAgBCABa2ohBSABIABrQQJqIQYCQANAIAEtAAAgAEHh0wBqLQAARw0EIABBAkYNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAzLAQsgA0EANgIAIAZBAWohAUEQDAQLIAEgBEYEQEGJASECDMoBCwJAAkAgAS0AAEHDAGsODAAGBgYGBgYGBgYGAQYLIAFBAWohAUHvACECDLABCyABQQFqIQFB8AAhAgyvAQtBiAEhAiABIARGDcgBIAMoAgAiACAEIAFraiEFIAEgAGtBBWohBgJAA0AgAS0AACAAQeDSAGotAABHDQIgAEEFRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAyAFNgIADMkBCyADQQA2AgAgBkEBaiEBQSQMAgsgA0EANgIADAILIAEgBEYEQEGHASECDMcBCyABLQAAQcwARw0BIAFBAWohAUETCzoAKSADKAIEIQAgA0EANgIEIAMgACABEC0iAA0CDAELQQAhAiADQQA2AhwgAyABNgIUIANB6R42AhAgA0EGNgIMDMQBC0HuACECDKkBCyADQYYBNgIcIAMgATYCFCADIAA2AgxBACECDMIBC0EAIQACQCADKAI4IgJFDQAgAigCOCICRQ0AIAMgAhEAACEACyAARQ0AIABBFUYNASADQQA2AhwgAyABNgIUIANB1A42AhA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8BCyABQQFqIQFB4wAhAgyeAQsgBCABQQFqIgFHDQALQfoAIQIMtgELIAFBAWoMFAsgAygCBCEAIANBADYCBCADIAAgARArIgBFDR4gA0HbADYCHCADIAE2AhQgAyAANgIMQQAhAgy0AQsgAygCBCEAIANBADYCBCADIAAgARArIgBFDR4gA0HdADYCHCADIAE2AhQgAyAANgIMQQAhAgyzAQsgAygCBCEAIANBADYCBCADIAAgARArIgBFDR4gA0HwADYCHCADIAE2AhQgAyAANgIMQQAhAgyyAQsgA0EANgIcIAMgATYCFCADQcsPNgIQIANBBzYCDEEAIQIMsQELIAEgBEYEQEH5ACECDLEBCwJAIAEtAABB4MwAai0AAEEBaw4INAQFBgAIAgMHCyABQQFqIQELQQMhAgyVAQsgAUEBagwNC0EAIQIgA0EANgIcIANBoxI2AhAgA0EHNgIMIAMgAUEBajYCFAytAQsgAygCBCEAIANBADYCBCADIAAgARArIgBFDRYgA0HbADYCHCADIAE2AhQgAyAANgIMQQAhAgysAQsgAygCBCEAIANBADYCBCADIAAgARArIgBFDRYgA0HdADYCHCADIAE2AhQgAyAANgIMQQAhAgyrAQsgAygCBCEAIANBADYCBCADIAAgARArIgBFDRYgA0HwADYCHCADIAE2AhQgAyAANgIMQQAhAgyqAQsgA0EANgIcIAMgATYCFCADQcsPNgIQIANBBzYCDEEAIQIMqQELQeIAIQIMjgELIAEgBEYEQEH4ACECDKgBCyABQQFqDAILIAEgBEYEQEH3ACECDKcBCyABQQFqDAELIAEgBEYNASABQQFqCyEBQQQhAgyKAQtB9gAhAgyjAQsDQCABLQAAQeDKAGotAAAiAEECRwRAIABBAUcEQEHfACECDIsBCwwnCyAEIAFBAWoiAUcNAAtB9QAhAgyiAQsgASAERgRAQfQAIQIMogELAkAgAS0AAEEJaw43JQMGJQQGBgYGBgYGBgYGBgYGBgYGBgYFBgYCBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGAAYLIAFBAWoLIQFBBSECDIYBCyABQQFqDAYLIAMoAgQhACADQQA2AgQgAyAAIAEQKyIARQ0IIANB2wA2AhwgAyABNgIUIAMgADYCDEEAIQIMngELIAMoAgQhACADQQA2AgQgAyAAIAEQKyIARQ0IIANB3QA2AhwgAyABNgIUIAMgADYCDEEAIQIMnQELIAMoAgQhACADQQA2AgQgAyAAIAEQKyIARQ0IIANB8AA2AhwgAyABNgIUIAMgADYCDEEAIQIMnAELIANBADYCHCADIAE2AhQgA0G8EzYCECADQQc2AgxBACECDJsBCwJAAkACQAJAA0AgAS0AAEHgyABqLQAAIgBBBUcEQAJAIABBAWsOBiQDBAUGAAYLQd4AIQIMhgELIAQgAUEBaiIBRw0AC0HzACECDJ4BCyADKAIEIQAgA0EANgIEIAMgACABECsiAEUNByADQdsANgIcIAMgATYCFCADIAA2AgxBACECDJ0BCyADKAIEIQAgA0EANgIEIAMgACABECsiAEUNByADQd0ANgIcIAMgATYCFCADIAA2AgxBACECDJwBCyADKAIEIQAgA0EANgIEIAMgACABECsiAEUNByADQfAANgIcIAMgATYCFCADIAA2AgxBACECDJsBCyADQQA2AhwgAyABNgIUIANB3Ag2AhAgA0EHNgIMQQAhAgyaAQsgASAERg0BIAFBAWoLIQFBBiECDH4LQfIAIQIMlwELAkACQAJAAkADQCABLQAAQeDGAGotAAAiAEEFRwRAIABBAWsOBB8CAwQFCyAEIAFBAWoiAUcNAAtB8QAhAgyaAQsgAygCBCEAIANBADYCBCADIAAgARArIgBFDQMgA0HbADYCHCADIAE2AhQgAyAANgIMQQAhAgyZAQsgAygCBCEAIANBADYCBCADIAAgARArIgBFDQMgA0HdADYCHCADIAE2AhQgAyAANgIMQQAhAgyYAQsgAygCBCEAIANBADYCBCADIAAgARArIgBFDQMgA0HwADYCHCADIAE2AhQgAyAANgIMQQAhAgyXAQsgA0EANgIcIAMgATYCFCADQbQKNgIQIANBBzYCDEEAIQIMlgELQc4AIQIMewtB0AAhAgx6C0HdACECDHkLIAEgBEYEQEHwACECDJMBCwJAIAEtAABBCWsOBBYAABYACyABQQFqIQFB3AAhAgx4CyABIARGBEBB7wAhAgySAQsCQCABLQAAQQlrDgQVAAAVAAtBACEAAkAgAygCOCICRQ0AIAIoAjAiAkUNACADIAIRAAAhAAsgAEUEQEHTASECDHgLIABBFUcEQCADQQA2AhwgAyABNgIUIANBwQ02AhAgA0EaNgIMQQAhAgySAQsgA0HuADYCHCADIAE2AhQgA0HwGTYCECADQRU2AgxBACECDJEBC0HtACECIAEgBEYNkAEgAygCACIAIAQgAWtqIQUgASAAa0EDaiEGAkADQCABLQAAIABB18YAai0AAEcNBCAAQQNGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyADIAU2AgAMkQELIANBADYCACAGQQFqIQEgAy0AKSIAQSNrQQtJDQQCQCAAQQZLDQBBASAAdEHKAHFFDQAMBQtBACECIANBADYCHCADIAE2AhQgA0HlCTYCECADQQg2AgwMkAELQewAIQIgASAERg2PASADKAIAIgAgBCABa2ohBSABIABrQQJqIQYCQANAIAEtAAAgAEHUxgBqLQAARw0DIABBAkYNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAyQAQsgA0EANgIAIAZBAWohASADLQApQSFGDQMgA0EANgIcIAMgATYCFCADQYkKNgIQIANBCDYCDEEAIQIMjwELQesAIQIgASAERg2OASADKAIAIgAgBCABa2ohBSABIABrQQNqIQYCQANAIAEtAAAgAEHQxgBqLQAARw0CIABBA0YNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAyPAQsgA0EANgIAIAZBAWohASADLQApIgBBI0kNAiAAQS5GDQIgA0EANgIcIAMgATYCFCADQcEJNgIQIANBCDYCDEEAIQIMjgELIANBADYCAAtBACECIANBADYCHCADIAE2AhQgA0GENzYCECADQQg2AgwMjAELQdgAIQIMcQsgASAERwRAIANBDTYCCCADIAE2AgRB1wAhAgxxC0HqACECDIoBCyABIARGBEBB6QAhAgyKAQsgAS0AAEEwayIAQf8BcUEKSQRAIAMgADoAKiABQQFqIQFB1gAhAgxwCyADKAIEIQAgA0EANgIEIAMgACABEC4iAEUNdCADQegANgIcIAMgATYCFCADIAA2AgxBACECDIkBCyABIARGBEBB5wAhAgyJAQsCQCABLQAAQS5GBEAgAUEBaiEBDAELIAMoAgQhACADQQA2AgQgAyAAIAEQLiIARQ11IANB5gA2AhwgAyABNgIUIAMgADYCDEEAIQIMiQELQdUAIQIMbgsgASAERgRAQeUAIQIMiAELQQAhAEEBIQVBASEHQQAhAgJAAkACQAJAAkACfwJAAkACQAJAAkACQAJAIAEtAABBMGsOCgoJAAECAwQFBggLC0ECDAYLQQMMBQtBBAwEC0EFDAMLQQYMAgtBBwwBC0EICyECQQAhBUEAIQcMAgtBCSECQQEhAEEAIQVBACEHDAELQQAhBUEBIQILIAMgAjoAKyABQQFqIQECQAJAIAMtAC5BEHENAAJAAkACQCADLQAqDgMBAAIECyAHRQ0DDAILIAANAQwCCyAFRQ0BCyADKAIEIQAgA0EANgIEIAMgACABEC4iAEUNAiADQeIANgIcIAMgATYCFCADIAA2AgxBACECDIoBCyADKAIEIQAgA0EANgIEIAMgACABEC4iAEUNdyADQeMANgIcIAMgATYCFCADIAA2AgxBACECDIkBCyADKAIEIQAgA0EANgIEIAMgACABEC4iAEUNdSADQeQANgIcIAMgATYCFCADIAA2AgwMiAELQdMAIQIMbQsgAy0AKUEiRg2AAUHSACECDGwLQQAhAAJAIAMoAjgiAkUNACACKAI8IgJFDQAgAyACEQAAIQALIABFBEBB1AAhAgxsCyAAQRVHBEAgA0EANgIcIAMgATYCFCADQZwNNgIQIANBITYCDEEAIQIMhgELIANB4QA2AhwgAyABNgIUIANB1hk2AhAgA0EVNgIMQQAhAgyFAQsgASAERgRAQeAAIQIMhQELAkACQAJAAkACQCABLQAAQQprDgQBBAQABAsgAUEBaiEBDAELIAFBAWohASADQS9qLQAAQQFxRQ0BC0HRACECDGwLIANBADYCHCADIAE2AhQgA0GIETYCECADQQk2AgxBACECDIUBCyADQQA2AhwgAyABNgIUIANBiBE2AhAgA0EJNgIMQQAhAgyEAQsgASAERgRAQd8AIQIM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LwEyQQhyOwEyIAAhAQtBPSECDDcLIANBADoALAtBOCECDDULIAEgBEYEQEE2IQIMTwsCQAJAAkACQAJAIAEtAABBCmsOBAACAgECCyADKAIEIQAgA0EANgIEIAMgACABEDAiAEUNAiADQTM2AhwgAyABNgIUIAMgADYCDEEAIQIMUgsgAygCBCEAIANBADYCBCADIAAgARAwIgBFBEAgAUEBaiEBDAYLIANBMjYCHCADIAA2AgwgAyABQQFqNgIUQQAhAgxRCyADLQAuQQFxBEBB0AEhAgw3CyADKAIEIQAgA0EANgIEIAMgACABEDAiAA0BDEMLQTMhAgw1CyADQTU2AhwgAyABNgIUIAMgADYCDEEAIQIMTgtBNCECDDMLIANBL2otAABBAXENACADQQA2AhwgAyABNgIUIANB8RU2AhAgA0EZNgIMQQAhAgxMC0EyIQIMMQsgASAERgRAQTIhAgxLCwJAIAEtAABBCkYEQCABQQFqIQEMAQsgA0EANgIcIAMgATYCFCADQZgWNgIQIANBAzYCDEEAIQIMSwtBMSECDDALIAEgBEYEQEExIQIMSgsgAS0AACIAQQlHIABBIEdxDQEgAy0ALEEIRw0AIANBADoALAtBPCECDC4LQQEhAgJAAkACQAJAIAMtACxBBWsOBAMBAgAKCyADIAMvATJBCHI7ATIMCQtBAiECDAELQQQhAgsgA0EBOgAsIAMgAy8BMiACcjsBMgwGCyABIARGBEBBMCECDEcLIAEtAABBCkYEQCABQQFqIQEMAQsgAy0ALkEBcQ0AIANBADYCHCADIAE2AhQgA0HHJzYCECADQQI2AgxBACECDEYLQS8hAgwrCyABQQFqIQFBMCECDCoLIAEgBEYEQEEvIQIMRAsgAS0AACIAQQlHIABBIEdxRQRAIAFBAWohASADLQAuQQFxDQEgA0EANgIcIAMgATYCFCADQekPNgIQIANBCjYCDEEAIQIMRAtBASECAkACQAJAAkACQAJAIAMtACxBAmsOBwUEBAMBAgAECyADIAMvATJBCHI7ATIMAwtBAiECDAELQQQhAgsgA0EBOgAsIAMgAy8BMiACcjsBMgtBLiECDCoLIANBADYCHCADIAE2AhQgA0GzEjYCECADQQs2AgxBACECDEMLQdIBIQIMKAsgASAERgRAQS4hAgxCCyADQQA2AgQgA0ERNgIIIAMgASABEDAiAA0BC0EtIQIMJgsgA0EtNgIcIAMgATYCFCADIAA2AgxBACECDD8LQQAhAAJAIAMoAjgiAkUNACACKAJEIgJFDQAgAyACEQAAIQALIABFDQAgAEEVRw0BIANB2AA2AhwgAyABNgIUIANBnho2AhAgA0EVNgIMQQAhAgw+C0HLACECDCMLIANBADYCHCADIAE2AhQgA0GFDjYCECADQR02AgxBACECDDwLIAEgBEYEQEHOACECDDwLIAEtAAAiAEEgRg0CIABBOkYNAQsgA0EAOgAsQQkhAgwgCyADKAIEIQAgA0EANgIEIAMgACABEC8iAA0BDAILIAMtAC5BAXEEQEHPASECDB8LIAMoAgQhACADQQA2AgQgAyAAIAEQLyIARQ0CIANBKjYCHCADIAA2AgwgAyABQQFqNgIUQQAhAgw4CyADQcsANgIcIAMgADYCDCADIAFBAWo2AhRBACECDDcLIAFBAWohAUE/IQIMHAsgAUEBaiEBDCkLIAEgBEYEQEErIQIMNQsCQCABLQAAQQpGBEAgAUEBaiEBDAELIAMtAC5BwABxRQ0GCyADLQAyQYABcQRAQQAhAAJAIAMoAjgiAkUNACACKAJUIgJFDQAgAyACEQAAIQALIABFDREgAEEVRgRAIANBBTYCHCADIAE2AhQgA0GGGjYCECADQRU2AgxBACECDDYLIANBADYCHCADIAE2AhQgA0HiDTYCECADQRQ2AgxBACECDDULIANBMmohAiADEDRBACEAAkAgAygCOCIGRQ0AIAYoAiQiBkUNACADIAYRAAAhAAsgAA4WAgEABAQEBAQEBAQEBAQEBAQEBAQEAwQLIANBAToAMAsgAiACLwEAQcAAcjsBAAtBKiECDBcLIANBKTYCHCADIAE2AhQgA0GyGDYCECADQRU2AgxBACECDDALIANBADYCHCADIAE2AhQgA0HdCzYCECADQRE2AgxBACECDC8LIANBADYCHCADIAE2AhQgA0GdCzYCECADQQI2AgxBACECDC4LQQEhByADLwEy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E2AhQgA0G/EDYCECADQQk2AgwMEgtBACECIANBADYCHCADIAE2AhQgA0GkETYCECADQQk2AgwMEQtBACECIANBADYCHCADIAE2AhQgA0G/FjYCECADQQ82AgwMEAtBACECIANBADYCHCADIAE2AhQgA0G/FjYCECADQQ82AgwMDwtBACECIANBADYCHCADIAE2AhQgA0HIEjYCECADQQs2AgwMDgtBACECIANBADYCHCADIAE2AhQgA0GVCTYCECADQQs2AgwMDQtBACECIANBADYCHCADIAE2AhQgA0HpDzYCECADQQo2AgwMDAtBACECIANBADYCHCADIAE2AhQgA0GDEDYCECADQQo2AgwMCwtBACECIANBADYCHCADIAE2AhQgA0GmHDYCECADQQI2AgwMCgtBACECIANBADYCHCADIAE2AhQgA0HFFTYCECADQQI2AgwMCQtBACECIANBADYCHCADIAE2AhQgA0H/FzYCECADQQI2AgwMCAtBACECIANBADYCHCADIAE2AhQgA0HKFzYCECADQQI2AgwMBwsgA0ECNgIcIAMgATYCFCADQZQdNgIQIANBFjYCDEEAIQIMBgtB3gAhAiABIARGDQUgCUEIaiEHIAMoAgAhBQJAAkAgASAERwRAIAVBxsYAaiEIIAQgBWogAWshBiAFQX9zQQpqIgUgAWohAANAIAEtAAAgCC0AAEcEQEECIQgMAwsgBUUEQEEAIQggACEBDAMLIAVBAWshBSAIQQFqIQggBCABQQFqIgFHDQALIAYhBSAEIQELIAdBATYCACADIAU2AgAMAQsgA0EANgIAIAcgCDYCAAsgByABNgIEIAkoAgwhACAJKAIIDgMBBQIACwALIANBADYCHCADQa0dNgIQIANBFzYCDCADIABBAWo2AhRBACECDAMLIANBADYCHCADIAA2AhQgA0HCHTYCECADQQk2AgxBACECDAILIAEgBEYEQEEoIQIMAgsgA0EJNgIIIAMgATYCBEEnIQIMAQsgASAERgRAQQEhAgwBCwNAAkACQAJAIAEtAABBCmsOBAABAQABCyABQQFqIQEMAQsgAUEBaiEBIAMtAC5BIHENAEEAIQIgA0EANgIcIAMgATYCFCADQYwgNgIQIANBBTYCDAwCC0E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ECIAMgBSACGyEFIAEgACACGyEAIAEhAgwBCwsgACgCGCEJIAAoAgwiAyAARwRAQZDUACgCABogAyAAKAIIIgE2AgggASADNgIMDBALIABBFGoiAigCACIBRQRAIAAoAhAiAUUNAyAAQRBqIQILA0AgAiEHIAEiA0EUaiICKAIAIgENACADQRBqIQIgAygCECIBDQALIAdBADYCAAwPC0F/IQQgAEG/f0sNACAAQRNqIgFBcHEhBEGE1AAoAgAiCEUNAEEAIARrIQUCQAJAAkACf0EAIARBgAJJDQAaQR8gBEH///8HSw0AGiAEQSYgAUEIdmciAGt2QQFxIABBAXRrQT5qCyIGQQJ0QbDWAGooAgAiAkUEQEEAIQFBACEDDAELQQAhASAEQRkgBkEBdmtBACAGQR9HG3QhAEEAIQMDQAJAIAIoAgRBeHEgBGsiByAFTw0AIAIhAyAHIgUNAEEAIQUgAiEBDAMLIAEgAkEUaigCACIHIAcgAiAAQR12QQRxakEQaigCACICRhsgASAHGyEBIABBAXQhACACDQALCyABIANyRQRAQQAhA0ECIAZ0IgBBACAAa3IgCHEiAEUNAyAAaEECdEGw1gBqKAIAIQELIAFFDQELA0AgASgCBEF4cSAEayICIAVJIQAgAiAFIAAbIQUgASADIAAbIQMgASgCECIABH8gAAUgAUEUaigCAAsiAQ0ACwsgA0UNACAFQYjUACgCACAEa08NACADKAIYIQcgAyADKAIMIgBHBEBBkNQAKAIAGiAAIAMoAggiATYCCCABIAA2AgwMDgsgA0EUaiICKAIAIgFFBEAgAygCECIBRQ0DIANBEGohAgsDQCACIQYgASIAQRRqIgIoAgAiAQ0AIABBEGohAiAAKAIQIgENAAsgBkEANgIADA0LQYjUACgCACIDIARPBEBBlNQAKAIAIQECQCADIARrIgJBEE8EQCABIARqIgAgAkEBcjYCBCABIANqIAI2AgAgASAEQQNyNgIEDAELIAEgA0EDcjYCBCABIANqIgAgACgCBEEBcjYCBEEAIQBBACECC0GI1AAgAjYCAEGU1AAgADYCACABQQhqIQEMDwtBjNQAKAIAIgMgBEsEQCAEI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MDAwMDAwMDAwMDAwMDAAAAAAAAAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMAQeDSAAuaAU5PVU5DRUVDS09VVE5FQ1RFVEVDUklCRUxVU0hFVEVBRFNFQVJDSFJHRUNUSVZJVFlMRU5EQVJWRU9USUZZUFRJT05TQ0hTRUFZU1RBVENIR0VVRVJZT1JESVJFQ1RPUlRSQ0hQQVJBTUVURVJVUkNFQlNDUklCRUFSRE9XTkFDRUlORE5LQ0tVQlNDUklCRUhUVFAvQURUUC8=' + +let wasmBuffer + +Object.defineProperty(module, 'exports', { + get: () => { + return wasmBuffer + ? wasmBuffer + : (wasmBuffer = Buffer.from(wasmBase64, 'base64')) + } +}) diff --git a/node_modules/undici/lib/llhttp/utils.d.ts b/node_modules/undici/lib/llhttp/utils.d.ts index 15497f3..b1a9a3a 100644 --- a/node_modules/undici/lib/llhttp/utils.d.ts +++ b/node_modules/undici/lib/llhttp/utils.d.ts @@ -1,4 +1,2 @@ -export interface IEnumMap { - [key: string]: number; -} -export declare function enumToMap(obj: any): IEnumMap; +import { IntDict } from './constants'; +export declare function enumToMap(obj: IntDict, filter?: ReadonlyArray<number>, exceptions?: ReadonlyArray<number>): IntDict; diff --git a/node_modules/undici/lib/llhttp/utils.js b/node_modules/undici/lib/llhttp/utils.js index 8a32e56..aaaa5d8 100644 --- a/node_modules/undici/lib/llhttp/utils.js +++ b/node_modules/undici/lib/llhttp/utils.js @@ -1,15 +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; +function enumToMap(obj, filter = [], exceptions = []) { + var _a, _b; + const emptyFilter = ((_a = filter === null || filter === void 0 ? void 0 : filter.length) !== null && _a !== void 0 ? _a : 0) === 0; + const emptyExceptions = ((_b = exceptions === null || exceptions === void 0 ? void 0 : exceptions.length) !== null && _b !== void 0 ? _b : 0) === 0; + return Object.fromEntries(Object.entries(obj).filter(([, value]) => { + return (typeof value === 'number' && + (emptyFilter || filter.includes(value)) && + (emptyExceptions || !exceptions.includes(value))); + })); } 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 index 2d7c356..5d57852 100644 --- a/node_modules/undici/lib/llhttp/utils.js.map +++ b/node_modules/undici/lib/llhttp/utils.js.map @@ -1 +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 +{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../src/llhttp/utils.ts"],"names":[],"mappings":";;;AAEA,SAAgB,SAAS,CACvB,GAAY,EACZ,SAAgC,EAAE,EAClC,aAAoC,EAAE;;IAEtC,MAAM,WAAW,GAAG,CAAC,MAAA,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,MAAM,mCAAI,CAAC,CAAC,KAAK,CAAC,CAAC;IAChD,MAAM,eAAe,GAAG,CAAC,MAAA,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAE,MAAM,mCAAI,CAAC,CAAC,KAAK,CAAC,CAAC;IAExD,OAAO,MAAM,CAAC,WAAW,CAAC,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC,CAAC,CAAE,AAAD,EAAG,KAAK,CAAE,EAAE,EAAE;QACnE,OAAO,CACL,OAAO,KAAK,KAAK,QAAQ;YACzB,CAAC,WAAW,IAAI,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;YACvC,CAAC,eAAe,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CACjD,CAAC;IACJ,CAAC,CAAC,CAAC,CAAC;AACN,CAAC;AAfD,8BAeC"} \ 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 index 828e8af..3bff409 100644 --- a/node_modules/undici/lib/mock/mock-agent.js +++ b/node_modules/undici/lib/mock/mock-agent.js @@ -1,7 +1,7 @@ 'use strict' const { kClients } = require('../core/symbols') -const Agent = require('../agent') +const Agent = require('../dispatcher/agent') const { kAgent, kMockAgentSet, @@ -11,42 +11,44 @@ const { kNetConnect, kGetNetConnect, kOptions, - kFactory + kFactory, + kMockAgentRegisterCallHistory, + kMockAgentIsCallHistoryEnabled, + kMockAgentAddCallHistoryLog, + kMockAgentMockCallHistoryInstance, + kMockCallHistoryAddLog } = require('./mock-symbols') const MockClient = require('./mock-client') const MockPool = require('./mock-pool') -const { matchValue, buildMockOptions } = require('./mock-utils') +const { matchValue, buildAndValidateMockOptions } = require('./mock-utils') const { InvalidArgumentError, UndiciError } = require('../core/errors') -const Dispatcher = require('../dispatcher') -const Pluralizer = require('./pluralizer') +const Dispatcher = require('../dispatcher/dispatcher') const PendingInterceptorsFormatter = require('./pending-interceptors-formatter') - -class FakeWeakRef { - constructor (value) { - this.value = value - } - - deref () { - return this.value - } -} +const { MockCallHistory } = require('./mock-call-history') class MockAgent extends Dispatcher { constructor (opts) { super(opts) + const mockOptions = buildAndValidateMockOptions(opts) + this[kNetConnect] = true this[kIsMockActive] = true + this[kMockAgentIsCallHistoryEnabled] = mockOptions?.enableCallHistory ?? false // Instantiate Agent and encapsulate - if ((opts && opts.agent && typeof opts.agent.dispatch !== 'function')) { + if (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) + const agent = opts?.agent ? opts.agent : new Agent(opts) this[kAgent] = agent this[kClients] = agent[kClients] - this[kOptions] = buildMockOptions(opts) + this[kOptions] = mockOptions + + if (this[kMockAgentIsCallHistoryEnabled]) { + this[kMockAgentRegisterCallHistory]() + } } get (origin) { @@ -62,10 +64,14 @@ class MockAgent extends Dispatcher { dispatch (opts, handler) { // Call MockAgent.get to perform additional setup before dispatching as normal this.get(opts.origin) + + this[kMockAgentAddCallHistoryLog](opts) + return this[kAgent].dispatch(opts, handler) } async close () { + this.clearCallHistory() await this[kAgent].close() this[kClients].clear() } @@ -96,14 +102,52 @@ class MockAgent extends Dispatcher { this[kNetConnect] = false } + enableCallHistory () { + this[kMockAgentIsCallHistoryEnabled] = true + + return this + } + + disableCallHistory () { + this[kMockAgentIsCallHistoryEnabled] = false + + return this + } + + getCallHistory () { + return this[kMockAgentMockCallHistoryInstance] + } + + clearCallHistory () { + if (this[kMockAgentMockCallHistoryInstance] !== undefined) { + this[kMockAgentMockCallHistoryInstance].clear() + } + } + // This is required to bypass issues caused by using global symbols - see: // https://github.com/nodejs/undici/issues/1447 get isMockActive () { return this[kIsMockActive] } + [kMockAgentRegisterCallHistory] () { + if (this[kMockAgentMockCallHistoryInstance] === undefined) { + this[kMockAgentMockCallHistoryInstance] = new MockCallHistory() + } + } + + [kMockAgentAddCallHistoryLog] (opts) { + if (this[kMockAgentIsCallHistoryEnabled]) { + // additional setup when enableCallHistory class method is used after mockAgent instantiation + this[kMockAgentRegisterCallHistory]() + + // add call history log on every call (intercepted or not) + this[kMockAgentMockCallHistoryInstance][kMockCallHistoryAddLog](opts) + } + } + [kMockAgentSet] (origin, dispatcher) { - this[kClients].set(origin, new FakeWeakRef(dispatcher)) + this[kClients].set(origin, dispatcher) } [kFactory] (origin) { @@ -115,9 +159,9 @@ class MockAgent extends Dispatcher { [kMockAgentGet] (origin) { // First check if we can immediately find it - const ref = this[kClients].get(origin) - if (ref) { - return ref.deref() + const client = this[kClients].get(origin) + if (client) { + return client } // If the origin is not a string create a dummy parent pool and return to user @@ -128,8 +172,7 @@ class MockAgent extends 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() + for (const [keyMatcher, nonExplicitDispatcher] of Array.from(this[kClients])) { if (nonExplicitDispatcher && typeof keyMatcher !== 'string' && matchValue(keyMatcher, origin)) { const dispatcher = this[kFactory](origin) this[kMockAgentSet](origin, dispatcher) @@ -147,7 +190,7 @@ class MockAgent extends Dispatcher { const mockAgentClients = this[kClients] return Array.from(mockAgentClients.entries()) - .flatMap(([origin, scope]) => scope.deref()[kDispatches].map(dispatch => ({ ...dispatch, origin }))) + .flatMap(([origin, scope]) => scope[kDispatches].map(dispatch => ({ ...dispatch, origin }))) .filter(({ pending }) => pending) } @@ -158,13 +201,11 @@ class MockAgent extends Dispatcher { return } - const pluralizer = new Pluralizer('interceptor', 'interceptors').pluralize(pending.length) - - throw new UndiciError(` -${pluralizer.count} ${pluralizer.noun} ${pluralizer.is} pending: - -${pendingInterceptorsFormatter.format(pending)} -`.trim()) + throw new UndiciError( + pending.length === 1 + ? `1 interceptor is pending:\n\n${pendingInterceptorsFormatter.format(pending)}`.trim() + : `${pending.length} interceptors are pending:\n\n${pendingInterceptorsFormatter.format(pending)}`.trim() + ) } } diff --git a/node_modules/undici/lib/mock/mock-call-history.js b/node_modules/undici/lib/mock/mock-call-history.js new file mode 100644 index 0000000..d4a92b2 --- /dev/null +++ b/node_modules/undici/lib/mock/mock-call-history.js @@ -0,0 +1,248 @@ +'use strict' + +const { kMockCallHistoryAddLog } = require('./mock-symbols') +const { InvalidArgumentError } = require('../core/errors') + +function handleFilterCallsWithOptions (criteria, options, handler, store) { + switch (options.operator) { + case 'OR': + store.push(...handler(criteria)) + + return store + case 'AND': + return handler.call({ logs: store }, criteria) + default: + // guard -- should never happens because buildAndValidateFilterCallsOptions is called before + throw new InvalidArgumentError('options.operator must to be a case insensitive string equal to \'OR\' or \'AND\'') + } +} + +function buildAndValidateFilterCallsOptions (options = {}) { + const finalOptions = {} + + if ('operator' in options) { + if (typeof options.operator !== 'string' || (options.operator.toUpperCase() !== 'OR' && options.operator.toUpperCase() !== 'AND')) { + throw new InvalidArgumentError('options.operator must to be a case insensitive string equal to \'OR\' or \'AND\'') + } + + return { + ...finalOptions, + operator: options.operator.toUpperCase() + } + } + + return finalOptions +} + +function makeFilterCalls (parameterName) { + return (parameterValue) => { + if (typeof parameterValue === 'string' || parameterValue == null) { + return this.logs.filter((log) => { + return log[parameterName] === parameterValue + }) + } + if (parameterValue instanceof RegExp) { + return this.logs.filter((log) => { + return parameterValue.test(log[parameterName]) + }) + } + + throw new InvalidArgumentError(`${parameterName} parameter should be one of string, regexp, undefined or null`) + } +} +function computeUrlWithMaybeSearchParameters (requestInit) { + // path can contains query url parameters + // or query can contains query url parameters + try { + const url = new URL(requestInit.path, requestInit.origin) + + // requestInit.path contains query url parameters + // requestInit.query is then undefined + if (url.search.length !== 0) { + return url + } + + // requestInit.query can be populated here + url.search = new URLSearchParams(requestInit.query).toString() + + return url + } catch (error) { + throw new InvalidArgumentError('An error occurred when computing MockCallHistoryLog.url', { cause: error }) + } +} + +class MockCallHistoryLog { + constructor (requestInit = {}) { + this.body = requestInit.body + this.headers = requestInit.headers + this.method = requestInit.method + + const url = computeUrlWithMaybeSearchParameters(requestInit) + + this.fullUrl = url.toString() + this.origin = url.origin + this.path = url.pathname + this.searchParams = Object.fromEntries(url.searchParams) + this.protocol = url.protocol + this.host = url.host + this.port = url.port + this.hash = url.hash + } + + toMap () { + return new Map([ + ['protocol', this.protocol], + ['host', this.host], + ['port', this.port], + ['origin', this.origin], + ['path', this.path], + ['hash', this.hash], + ['searchParams', this.searchParams], + ['fullUrl', this.fullUrl], + ['method', this.method], + ['body', this.body], + ['headers', this.headers]] + ) + } + + toString () { + const options = { betweenKeyValueSeparator: '->', betweenPairSeparator: '|' } + let result = '' + + this.toMap().forEach((value, key) => { + if (typeof value === 'string' || value === undefined || value === null) { + result = `${result}${key}${options.betweenKeyValueSeparator}${value}${options.betweenPairSeparator}` + } + if ((typeof value === 'object' && value !== null) || Array.isArray(value)) { + result = `${result}${key}${options.betweenKeyValueSeparator}${JSON.stringify(value)}${options.betweenPairSeparator}` + } + // maybe miss something for non Record / Array headers and searchParams here + }) + + // delete last betweenPairSeparator + return result.slice(0, -1) + } +} + +class MockCallHistory { + logs = [] + + calls () { + return this.logs + } + + firstCall () { + return this.logs.at(0) + } + + lastCall () { + return this.logs.at(-1) + } + + nthCall (number) { + if (typeof number !== 'number') { + throw new InvalidArgumentError('nthCall must be called with a number') + } + if (!Number.isInteger(number)) { + throw new InvalidArgumentError('nthCall must be called with an integer') + } + if (Math.sign(number) !== 1) { + throw new InvalidArgumentError('nthCall must be called with a positive value. use firstCall or lastCall instead') + } + + // non zero based index. this is more human readable + return this.logs.at(number - 1) + } + + filterCalls (criteria, options) { + // perf + if (this.logs.length === 0) { + return this.logs + } + if (typeof criteria === 'function') { + return this.logs.filter(criteria) + } + if (criteria instanceof RegExp) { + return this.logs.filter((log) => { + return criteria.test(log.toString()) + }) + } + if (typeof criteria === 'object' && criteria !== null) { + // no criteria - returning all logs + if (Object.keys(criteria).length === 0) { + return this.logs + } + + const finalOptions = { operator: 'OR', ...buildAndValidateFilterCallsOptions(options) } + + let maybeDuplicatedLogsFiltered = [] + if ('protocol' in criteria) { + maybeDuplicatedLogsFiltered = handleFilterCallsWithOptions(criteria.protocol, finalOptions, this.filterCallsByProtocol, maybeDuplicatedLogsFiltered) + } + if ('host' in criteria) { + maybeDuplicatedLogsFiltered = handleFilterCallsWithOptions(criteria.host, finalOptions, this.filterCallsByHost, maybeDuplicatedLogsFiltered) + } + if ('port' in criteria) { + maybeDuplicatedLogsFiltered = handleFilterCallsWithOptions(criteria.port, finalOptions, this.filterCallsByPort, maybeDuplicatedLogsFiltered) + } + if ('origin' in criteria) { + maybeDuplicatedLogsFiltered = handleFilterCallsWithOptions(criteria.origin, finalOptions, this.filterCallsByOrigin, maybeDuplicatedLogsFiltered) + } + if ('path' in criteria) { + maybeDuplicatedLogsFiltered = handleFilterCallsWithOptions(criteria.path, finalOptions, this.filterCallsByPath, maybeDuplicatedLogsFiltered) + } + if ('hash' in criteria) { + maybeDuplicatedLogsFiltered = handleFilterCallsWithOptions(criteria.hash, finalOptions, this.filterCallsByHash, maybeDuplicatedLogsFiltered) + } + if ('fullUrl' in criteria) { + maybeDuplicatedLogsFiltered = handleFilterCallsWithOptions(criteria.fullUrl, finalOptions, this.filterCallsByFullUrl, maybeDuplicatedLogsFiltered) + } + if ('method' in criteria) { + maybeDuplicatedLogsFiltered = handleFilterCallsWithOptions(criteria.method, finalOptions, this.filterCallsByMethod, maybeDuplicatedLogsFiltered) + } + + const uniqLogsFiltered = [...new Set(maybeDuplicatedLogsFiltered)] + + return uniqLogsFiltered + } + + throw new InvalidArgumentError('criteria parameter should be one of function, regexp, or object') + } + + filterCallsByProtocol = makeFilterCalls.call(this, 'protocol') + + filterCallsByHost = makeFilterCalls.call(this, 'host') + + filterCallsByPort = makeFilterCalls.call(this, 'port') + + filterCallsByOrigin = makeFilterCalls.call(this, 'origin') + + filterCallsByPath = makeFilterCalls.call(this, 'path') + + filterCallsByHash = makeFilterCalls.call(this, 'hash') + + filterCallsByFullUrl = makeFilterCalls.call(this, 'fullUrl') + + filterCallsByMethod = makeFilterCalls.call(this, 'method') + + clear () { + this.logs = [] + } + + [kMockCallHistoryAddLog] (requestInit) { + const log = new MockCallHistoryLog(requestInit) + + this.logs.push(log) + + return log + } + + * [Symbol.iterator] () { + for (const log of this.calls()) { + yield log + } + } +} + +module.exports.MockCallHistory = MockCallHistory +module.exports.MockCallHistoryLog = MockCallHistoryLog diff --git a/node_modules/undici/lib/mock/mock-client.js b/node_modules/undici/lib/mock/mock-client.js index 5f31215..f8a786c 100644 --- a/node_modules/undici/lib/mock/mock-client.js +++ b/node_modules/undici/lib/mock/mock-client.js @@ -1,7 +1,7 @@ 'use strict' -const { promisify } = require('util') -const Client = require('../client') +const { promisify } = require('node:util') +const Client = require('../dispatcher/client') const { buildMockDispatch } = require('./mock-utils') const { kDispatches, @@ -10,7 +10,8 @@ const { kOriginalClose, kOrigin, kOriginalDispatch, - kConnected + kConnected, + kIgnoreTrailingSlash } = require('./mock-symbols') const { MockInterceptor } = require('./mock-interceptor') const Symbols = require('../core/symbols') @@ -21,14 +22,15 @@ const { InvalidArgumentError } = require('../core/errors') */ 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') } + super(origin, opts) + this[kMockAgent] = opts.agent this[kOrigin] = origin + this[kIgnoreTrailingSlash] = opts.ignoreTrailingSlash ?? false this[kDispatches] = [] this[kConnected] = 1 this[kOriginalDispatch] = this.dispatch @@ -46,7 +48,10 @@ class MockClient extends Client { * Sets up the base interceptor for mocking replies from undici. */ intercept (opts) { - return new MockInterceptor(opts, this[kDispatches]) + return new MockInterceptor( + opts && { ignoreTrailingSlash: this[kIgnoreTrailingSlash], ...opts }, + this[kDispatches] + ) } async [kClose] () { diff --git a/node_modules/undici/lib/mock/mock-errors.js b/node_modules/undici/lib/mock/mock-errors.js index 5442c0e..ebdc786 100644 --- a/node_modules/undici/lib/mock/mock-errors.js +++ b/node_modules/undici/lib/mock/mock-errors.js @@ -2,10 +2,12 @@ const { UndiciError } = require('../core/errors') +/** + * The request does not match any registered mock dispatches. + */ 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' diff --git a/node_modules/undici/lib/mock/mock-interceptor.js b/node_modules/undici/lib/mock/mock-interceptor.js index 781e477..1ea7aac 100644 --- a/node_modules/undici/lib/mock/mock-interceptor.js +++ b/node_modules/undici/lib/mock/mock-interceptor.js @@ -7,10 +7,11 @@ const { kDefaultHeaders, kDefaultTrailers, kContentLength, - kMockDispatch + kMockDispatch, + kIgnoreTrailingSlash } = require('./mock-symbols') const { InvalidArgumentError } = require('../core/errors') -const { buildURL } = require('../core/util') +const { serializePathWithQuery } = require('../core/util') /** * Defines the scope API for an interceptor reply @@ -72,9 +73,9 @@ class MockInterceptor { // fragments to servers when they retrieve a document, if (typeof opts.path === 'string') { if (opts.query) { - opts.path = buildURL(opts.path, opts.query) + opts.path = serializePathWithQuery(opts.path, opts.query) } else { - // Matches https://github.com/nodejs/undici/blob/main/lib/fetch/index.js#L1811 + // Matches https://github.com/nodejs/undici/blob/main/lib/web/fetch/index.js#L1811 const parsedURL = new URL(opts.path, 'data://') opts.path = parsedURL.pathname + parsedURL.search } @@ -85,12 +86,13 @@ class MockInterceptor { this[kDispatchKey] = buildKey(opts) this[kDispatches] = mockDispatches + this[kIgnoreTrailingSlash] = opts.ignoreTrailingSlash ?? false this[kDefaultHeaders] = {} this[kDefaultTrailers] = {} this[kContentLength] = false } - createMockScopeDispatchData (statusCode, data, responseOptions = {}) { + createMockScopeDispatchData ({ statusCode, data, responseOptions }) { const responseData = getResponseData(data) const contentLength = this[kContentLength] ? { 'content-length': responseData.length } : {} const headers = { ...this[kDefaultHeaders], ...contentLength, ...responseOptions.headers } @@ -99,14 +101,11 @@ class MockInterceptor { return { statusCode, data, headers, trailers } } - validateReplyParameters (statusCode, data, responseOptions) { - if (typeof statusCode === 'undefined') { + validateReplyParameters (replyParameters) { + if (typeof replyParameters.statusCode === 'undefined') { throw new InvalidArgumentError('statusCode must be defined') } - if (typeof data === 'undefined') { - throw new InvalidArgumentError('data must be defined') - } - if (typeof responseOptions !== 'object') { + if (typeof replyParameters.responseOptions !== 'object' || replyParameters.responseOptions === null) { throw new InvalidArgumentError('responseOptions must be an object') } } @@ -114,33 +113,33 @@ class MockInterceptor { /** * Mock an undici request with a defined reply. */ - reply (replyData) { + reply (replyOptionsCallbackOrStatusCode) { // Values of reply aren't available right now as they // can only be available when the reply callback is invoked. - if (typeof replyData === 'function') { + if (typeof replyOptionsCallbackOrStatusCode === '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) + const resolvedData = replyOptionsCallbackOrStatusCode(opts) // Check if it is in the right format - if (typeof resolvedData !== 'object') { + if (typeof resolvedData !== 'object' || resolvedData === null) { throw new InvalidArgumentError('reply options callback must return an object') } - const { statusCode, data = '', responseOptions = {} } = resolvedData - this.validateReplyParameters(statusCode, data, responseOptions) + const replyParameters = { data: '', responseOptions: {}, ...resolvedData } + this.validateReplyParameters(replyParameters) // 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) + ...this.createMockScopeDispatchData(replyParameters) } } // 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) + const newMockDispatch = addMockDispatch(this[kDispatches], this[kDispatchKey], wrappedDefaultsCallback, { ignoreTrailingSlash: this[kIgnoreTrailingSlash] }) return new MockScope(newMockDispatch) } @@ -148,12 +147,16 @@ class MockInterceptor { // 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) + const replyParameters = { + statusCode: replyOptionsCallbackOrStatusCode, + data: arguments[1] === undefined ? '' : arguments[1], + responseOptions: arguments[2] === undefined ? {} : arguments[2] + } + this.validateReplyParameters(replyParameters) // Send in-already provided data like usual - const dispatchData = this.createMockScopeDispatchData(statusCode, data, responseOptions) - const newMockDispatch = addMockDispatch(this[kDispatches], this[kDispatchKey], dispatchData) + const dispatchData = this.createMockScopeDispatchData(replyParameters) + const newMockDispatch = addMockDispatch(this[kDispatches], this[kDispatchKey], dispatchData, { ignoreTrailingSlash: this[kIgnoreTrailingSlash] }) return new MockScope(newMockDispatch) } @@ -165,7 +168,7 @@ class MockInterceptor { throw new InvalidArgumentError('error must be defined') } - const newMockDispatch = addMockDispatch(this[kDispatches], this[kDispatchKey], { error }) + const newMockDispatch = addMockDispatch(this[kDispatches], this[kDispatchKey], { error }, { ignoreTrailingSlash: this[kIgnoreTrailingSlash] }) return new MockScope(newMockDispatch) } diff --git a/node_modules/undici/lib/mock/mock-pool.js b/node_modules/undici/lib/mock/mock-pool.js index 0a3a7cd..a266211 100644 --- a/node_modules/undici/lib/mock/mock-pool.js +++ b/node_modules/undici/lib/mock/mock-pool.js @@ -1,7 +1,7 @@ 'use strict' -const { promisify } = require('util') -const Pool = require('../pool') +const { promisify } = require('node:util') +const Pool = require('../dispatcher/pool') const { buildMockDispatch } = require('./mock-utils') const { kDispatches, @@ -10,7 +10,8 @@ const { kOriginalClose, kOrigin, kOriginalDispatch, - kConnected + kConnected, + kIgnoreTrailingSlash } = require('./mock-symbols') const { MockInterceptor } = require('./mock-interceptor') const Symbols = require('../core/symbols') @@ -21,14 +22,15 @@ const { InvalidArgumentError } = require('../core/errors') */ 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') } + super(origin, opts) + this[kMockAgent] = opts.agent this[kOrigin] = origin + this[kIgnoreTrailingSlash] = opts.ignoreTrailingSlash ?? false this[kDispatches] = [] this[kConnected] = 1 this[kOriginalDispatch] = this.dispatch @@ -46,7 +48,10 @@ class MockPool extends Pool { * Sets up the base interceptor for mocking replies from undici. */ intercept (opts) { - return new MockInterceptor(opts, this[kDispatches]) + return new MockInterceptor( + opts && { ignoreTrailingSlash: this[kIgnoreTrailingSlash], ...opts }, + this[kDispatches] + ) } async [kClose] () { diff --git a/node_modules/undici/lib/mock/mock-symbols.js b/node_modules/undici/lib/mock/mock-symbols.js index 8c4cbb6..811002c 100644 --- a/node_modules/undici/lib/mock/mock-symbols.js +++ b/node_modules/undici/lib/mock/mock-symbols.js @@ -15,9 +15,16 @@ module.exports = { kMockDispatch: Symbol('mock dispatch'), kClose: Symbol('close'), kOriginalClose: Symbol('original agent close'), + kOriginalDispatch: Symbol('original dispatch'), kOrigin: Symbol('origin'), kIsMockActive: Symbol('is mock active'), kNetConnect: Symbol('net connect'), kGetNetConnect: Symbol('get net connect'), - kConnected: Symbol('connected') + kConnected: Symbol('connected'), + kIgnoreTrailingSlash: Symbol('ignore trailing slash'), + kMockAgentMockCallHistoryInstance: Symbol('mock agent mock call history name'), + kMockAgentRegisterCallHistory: Symbol('mock agent register mock call history'), + kMockAgentAddCallHistoryLog: Symbol('mock agent add call history log'), + kMockAgentIsCallHistoryEnabled: Symbol('mock agent is call history enabled'), + kMockCallHistoryAddLog: Symbol('mock call history add log') } diff --git a/node_modules/undici/lib/mock/mock-utils.js b/node_modules/undici/lib/mock/mock-utils.js index 42ea185..a418254 100644 --- a/node_modules/undici/lib/mock/mock-utils.js +++ b/node_modules/undici/lib/mock/mock-utils.js @@ -8,13 +8,14 @@ const { kOrigin, kGetNetConnect } = require('./mock-symbols') -const { buildURL, nop } = require('../core/util') -const { STATUS_CODES } = require('http') +const { serializePathWithQuery } = require('../core/util') +const { STATUS_CODES } = require('node:http') const { types: { isPromise } -} = require('util') +} = require('node:util') +const { InvalidArgumentError } = require('../core/errors') function matchValue (match, value) { if (typeof match === 'string') { @@ -96,7 +97,7 @@ function safeUrl (path) { return path } - const pathSegments = path.split('?') + const pathSegments = path.split('?', 3) if (pathSegments.length !== 2) { return path @@ -118,19 +119,33 @@ function matchKey (mockDispatch, { path, method, body, headers }) { function getResponseData (data) { if (Buffer.isBuffer(data)) { return data + } else if (data instanceof Uint8Array) { + return data + } else if (data instanceof ArrayBuffer) { + return data } else if (typeof data === 'object') { return JSON.stringify(data) - } else { + } else if (data) { return data.toString() + } else { + return '' } } function getMockDispatch (mockDispatches, key) { - const basePath = key.query ? buildURL(key.path, key.query) : key.path + const basePath = key.query ? serializePathWithQuery(key.path, key.query) : key.path const resolvedPath = typeof basePath === 'string' ? safeUrl(basePath) : basePath + const resolvedPathWithoutTrailingSlash = removeTrailingSlash(resolvedPath) + // Match path - let matchedMockDispatches = mockDispatches.filter(({ consumed }) => !consumed).filter(({ path }) => matchValue(safeUrl(path), resolvedPath)) + let matchedMockDispatches = mockDispatches + .filter(({ consumed }) => !consumed) + .filter(({ path, ignoreTrailingSlash }) => { + return ignoreTrailingSlash + ? matchValue(removeTrailingSlash(safeUrl(path)), resolvedPathWithoutTrailingSlash) + : matchValue(safeUrl(path), resolvedPath) + }) if (matchedMockDispatches.length === 0) { throw new MockNotMatchedError(`Mock dispatch not matched for path '${resolvedPath}'`) } @@ -138,26 +153,27 @@ function getMockDispatch (mockDispatches, key) { // 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}'`) + throw new MockNotMatchedError(`Mock dispatch not matched for method '${key.method}' on path '${resolvedPath}'`) } // 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}'`) + throw new MockNotMatchedError(`Mock dispatch not matched for body '${key.body}' on path '${resolvedPath}'`) } // 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}'`) + const headers = typeof key.headers === 'object' ? JSON.stringify(key.headers) : key.headers + throw new MockNotMatchedError(`Mock dispatch not matched for headers '${headers}' on path '${resolvedPath}'`) } return matchedMockDispatches[0] } -function addMockDispatch (mockDispatches, key, data) { - const baseData = { timesInvoked: 0, times: 1, persist: false, consumed: false } +function addMockDispatch (mockDispatches, key, data, opts) { + const baseData = { timesInvoked: 0, times: 1, persist: false, consumed: false, ...opts } const replyData = typeof data === 'function' ? { callback: data } : { ...data } const newMockDispatch = { ...baseData, ...key, pending: true, data: { error: null, ...replyData } } mockDispatches.push(newMockDispatch) @@ -176,8 +192,24 @@ function deleteMockDispatch (mockDispatches, key) { } } +/** + * @param {string} path Path to remove trailing slash from + */ +function removeTrailingSlash (path) { + while (path.endsWith('/')) { + path = path.slice(0, -1) + } + + if (path.length === 0) { + path = '/' + } + + return path +} + function buildKey (opts) { const { path, method, body, headers, query } = opts + return { path, method, @@ -188,11 +220,21 @@ function buildKey (opts) { } 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}`) - ], []) + const keys = Object.keys(data) + const result = [] + for (let i = 0; i < keys.length; ++i) { + const key = keys[i] + const value = data[key] + const name = Buffer.from(`${key}`) + if (Array.isArray(value)) { + for (let j = 0; j < value.length; ++j) { + result.push(name, Buffer.from(`${value[j]}`)) + } + } else { + result.push(name, Buffer.from(`${value}`)) + } + } + return result } /** @@ -274,10 +316,10 @@ function mockDispatch (opts, handler) { 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) + handler.onConnect?.(err => handler.onError(err), null) + handler.onHeaders?.(statusCode, responseHeaders, resume, getStatusText(statusCode)) + handler.onData?.(Buffer.from(responseData)) + handler.onComplete?.(responseTrailers) deleteMockDispatch(mockDispatches, key) } @@ -326,9 +368,14 @@ function checkNetConnect (netConnect, origin) { return false } -function buildMockOptions (opts) { +function buildAndValidateMockOptions (opts) { if (opts) { const { agent, ...mockOptions } = opts + + if ('enableCallHistory' in mockOptions && typeof mockOptions.enableCallHistory !== 'boolean') { + throw new InvalidArgumentError('options.enableCallHistory must to be a boolean') + } + return mockOptions } } @@ -346,6 +393,7 @@ module.exports = { mockDispatch, buildMockDispatch, checkNetConnect, - buildMockOptions, - getHeaderByName + buildAndValidateMockOptions, + getHeaderByName, + buildHeadersFromArray } diff --git a/node_modules/undici/lib/mock/pending-interceptors-formatter.js b/node_modules/undici/lib/mock/pending-interceptors-formatter.js index 1bc7539..ccca951 100644 --- a/node_modules/undici/lib/mock/pending-interceptors-formatter.js +++ b/node_modules/undici/lib/mock/pending-interceptors-formatter.js @@ -1,7 +1,10 @@ 'use strict' -const { Transform } = require('stream') -const { Console } = require('console') +const { Transform } = require('node:stream') +const { Console } = require('node:console') + +const PERSISTENT = process.versions.icu ? '✅' : 'Y ' +const NOT_PERSISTENT = process.versions.icu ? '❌' : 'N ' /** * Gets the output of `console.table(…)` as a string. @@ -29,7 +32,7 @@ module.exports = class PendingInterceptorsFormatter { Origin: origin, Path: path, 'Status code': statusCode, - Persistent: persist ? '✅' : '❌', + Persistent: persist ? PERSISTENT : NOT_PERSISTENT, Invocations: timesInvoked, Remaining: persist ? Infinity : times - timesInvoked })) diff --git a/node_modules/undici/lib/mock/pluralizer.js b/node_modules/undici/lib/mock/pluralizer.js deleted file mode 100644 index 47f150b..0000000 --- a/node_modules/undici/lib/mock/pluralizer.js +++ /dev/null @@ -1,29 +0,0 @@ -'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/pool-base.js b/node_modules/undici/lib/pool-base.js deleted file mode 100644 index 2a909ee..0000000 --- a/node_modules/undici/lib/pool-base.js +++ /dev/null @@ -1,194 +0,0 @@ -'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 deleted file mode 100644 index b4af8ae..0000000 --- a/node_modules/undici/lib/pool-stats.js +++ /dev/null @@ -1,34 +0,0 @@ -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 deleted file mode 100644 index e3cd339..0000000 --- a/node_modules/undici/lib/pool.js +++ /dev/null @@ -1,94 +0,0 @@ -'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, - allowH2, - ...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, - allowH2, - socketPath, - timeout: 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, allowH2 } - 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 deleted file mode 100644 index e3c0f6f..0000000 --- a/node_modules/undici/lib/proxy-agent.js +++ /dev/null @@ -1,189 +0,0 @@ -'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 || {} - - const resolvedUrl = new URL(opts.uri) - const { origin, port, host, username, password } = resolvedUrl - - 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 - } else if (username && password) { - this[kProxyHeaders]['proxy-authorization'] = `Basic ${Buffer.from(`${decodeURIComponent(username)}:${decodeURIComponent(password)}`).toString('base64')}` - } - - 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 (${statusCode}) !== 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 deleted file mode 100644 index 5782217..0000000 --- a/node_modules/undici/lib/timers.js +++ /dev/null @@ -1,97 +0,0 @@ -'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/util/cache.js b/node_modules/undici/lib/util/cache.js new file mode 100644 index 0000000..1703970 --- /dev/null +++ b/node_modules/undici/lib/util/cache.js @@ -0,0 +1,370 @@ +'use strict' + +const { + safeHTTPMethods +} = require('../core/util') + +/** + * @param {import('../../types/dispatcher.d.ts').default.DispatchOptions} opts + */ +function makeCacheKey (opts) { + if (!opts.origin) { + throw new Error('opts.origin is undefined') + } + + const headers = normaliseHeaders(opts) + + return { + origin: opts.origin.toString(), + method: opts.method, + path: opts.path, + headers + } +} + +/** + * @param {Record<string, string[] | string>} + * @return {Record<string, string[] | string>} + */ +function normaliseHeaders (opts) { + let headers + if (opts.headers == null) { + headers = {} + } else if (typeof opts.headers[Symbol.iterator] === 'function') { + headers = {} + for (const x of opts.headers) { + if (!Array.isArray(x)) { + throw new Error('opts.headers is not a valid header map') + } + const [key, val] = x + if (typeof key !== 'string' || typeof val !== 'string') { + throw new Error('opts.headers is not a valid header map') + } + headers[key.toLowerCase()] = val + } + } else if (typeof opts.headers === 'object') { + headers = {} + + for (const key of Object.keys(opts.headers)) { + headers[key.toLowerCase()] = opts.headers[key] + } + } else { + throw new Error('opts.headers is not an object') + } + + return headers +} + +/** + * @param {any} key + */ +function assertCacheKey (key) { + if (typeof key !== 'object') { + throw new TypeError(`expected key to be object, got ${typeof key}`) + } + + for (const property of ['origin', 'method', 'path']) { + if (typeof key[property] !== 'string') { + throw new TypeError(`expected key.${property} to be string, got ${typeof key[property]}`) + } + } + + if (key.headers !== undefined && typeof key.headers !== 'object') { + throw new TypeError(`expected headers to be object, got ${typeof key}`) + } +} + +/** + * @param {any} value + */ +function assertCacheValue (value) { + if (typeof value !== 'object') { + throw new TypeError(`expected value to be object, got ${typeof value}`) + } + + for (const property of ['statusCode', 'cachedAt', 'staleAt', 'deleteAt']) { + if (typeof value[property] !== 'number') { + throw new TypeError(`expected value.${property} to be number, got ${typeof value[property]}`) + } + } + + if (typeof value.statusMessage !== 'string') { + throw new TypeError(`expected value.statusMessage to be string, got ${typeof value.statusMessage}`) + } + + if (value.headers != null && typeof value.headers !== 'object') { + throw new TypeError(`expected value.rawHeaders to be object, got ${typeof value.headers}`) + } + + if (value.vary !== undefined && typeof value.vary !== 'object') { + throw new TypeError(`expected value.vary to be object, got ${typeof value.vary}`) + } + + if (value.etag !== undefined && typeof value.etag !== 'string') { + throw new TypeError(`expected value.etag to be string, got ${typeof value.etag}`) + } +} + +/** + * @see https://www.rfc-editor.org/rfc/rfc9111.html#name-cache-control + * @see https://www.iana.org/assignments/http-cache-directives/http-cache-directives.xhtml + + * @param {string | string[]} header + * @returns {import('../../types/cache-interceptor.d.ts').default.CacheControlDirectives} + */ +function parseCacheControlHeader (header) { + /** + * @type {import('../../types/cache-interceptor.d.ts').default.CacheControlDirectives} + */ + const output = {} + + let directives + if (Array.isArray(header)) { + directives = [] + + for (const directive of header) { + directives.push(...directive.split(',')) + } + } else { + directives = header.split(',') + } + + for (let i = 0; i < directives.length; i++) { + const directive = directives[i].toLowerCase() + const keyValueDelimiter = directive.indexOf('=') + + let key + let value + if (keyValueDelimiter !== -1) { + key = directive.substring(0, keyValueDelimiter).trimStart() + value = directive.substring(keyValueDelimiter + 1) + } else { + key = directive.trim() + } + + switch (key) { + case 'min-fresh': + case 'max-stale': + case 'max-age': + case 's-maxage': + case 'stale-while-revalidate': + case 'stale-if-error': { + if (value === undefined || value[0] === ' ') { + continue + } + + if ( + value.length >= 2 && + value[0] === '"' && + value[value.length - 1] === '"' + ) { + value = value.substring(1, value.length - 1) + } + + const parsedValue = parseInt(value, 10) + // eslint-disable-next-line no-self-compare + if (parsedValue !== parsedValue) { + continue + } + + if (key === 'max-age' && key in output && output[key] >= parsedValue) { + continue + } + + output[key] = parsedValue + + break + } + case 'private': + case 'no-cache': { + if (value) { + // The private and no-cache directives can be unqualified (aka just + // `private` or `no-cache`) or qualified (w/ a value). When they're + // qualified, it's a list of headers like `no-cache=header1`, + // `no-cache="header1"`, or `no-cache="header1, header2"` + // If we're given multiple headers, the comma messes us up since + // we split the full header by commas. So, let's loop through the + // remaining parts in front of us until we find one that ends in a + // quote. We can then just splice all of the parts in between the + // starting quote and the ending quote out of the directives array + // and continue parsing like normal. + // https://www.rfc-editor.org/rfc/rfc9111.html#name-no-cache-2 + if (value[0] === '"') { + // Something like `no-cache="some-header"` OR `no-cache="some-header, another-header"`. + + // Add the first header on and cut off the leading quote + const headers = [value.substring(1)] + + let foundEndingQuote = value[value.length - 1] === '"' + if (!foundEndingQuote) { + // Something like `no-cache="some-header, another-header"` + // This can still be something invalid, e.g. `no-cache="some-header, ...` + for (let j = i + 1; j < directives.length; j++) { + const nextPart = directives[j] + const nextPartLength = nextPart.length + + headers.push(nextPart.trim()) + + if (nextPartLength !== 0 && nextPart[nextPartLength - 1] === '"') { + foundEndingQuote = true + break + } + } + } + + if (foundEndingQuote) { + let lastHeader = headers[headers.length - 1] + if (lastHeader[lastHeader.length - 1] === '"') { + lastHeader = lastHeader.substring(0, lastHeader.length - 1) + headers[headers.length - 1] = lastHeader + } + + if (key in output) { + output[key] = output[key].concat(headers) + } else { + output[key] = headers + } + } + } else { + // Something like `no-cache=some-header` + if (key in output) { + output[key] = output[key].concat(value) + } else { + output[key] = [value] + } + } + + break + } + } + // eslint-disable-next-line no-fallthrough + case 'public': + case 'no-store': + case 'must-revalidate': + case 'proxy-revalidate': + case 'immutable': + case 'no-transform': + case 'must-understand': + case 'only-if-cached': + if (value) { + // These are qualified (something like `public=...`) when they aren't + // allowed to be, skip + continue + } + + output[key] = true + break + default: + // Ignore unknown directives as per https://www.rfc-editor.org/rfc/rfc9111.html#section-5.2.3-1 + continue + } + } + + return output +} + +/** + * @param {string | string[]} varyHeader Vary header from the server + * @param {Record<string, string | string[]>} headers Request headers + * @returns {Record<string, string | string[]>} + */ +function parseVaryHeader (varyHeader, headers) { + if (typeof varyHeader === 'string' && varyHeader.includes('*')) { + return headers + } + + const output = /** @type {Record<string, string | string[] | null>} */ ({}) + + const varyingHeaders = typeof varyHeader === 'string' + ? varyHeader.split(',') + : varyHeader + + for (const header of varyingHeaders) { + const trimmedHeader = header.trim().toLowerCase() + + output[trimmedHeader] = headers[trimmedHeader] ?? null + } + + return output +} + +/** + * Note: this deviates from the spec a little. Empty etags ("", W/"") are valid, + * however, including them in cached resposnes serves little to no purpose. + * + * @see https://www.rfc-editor.org/rfc/rfc9110.html#name-etag + * + * @param {string} etag + * @returns {boolean} + */ +function isEtagUsable (etag) { + if (etag.length <= 2) { + // Shortest an etag can be is two chars (just ""). This is where we deviate + // from the spec requiring a min of 3 chars however + return false + } + + if (etag[0] === '"' && etag[etag.length - 1] === '"') { + // ETag: ""asd123"" or ETag: "W/"asd123"", kinda undefined behavior in the + // spec. Some servers will accept these while others don't. + // ETag: "asd123" + return !(etag[1] === '"' || etag.startsWith('"W/')) + } + + if (etag.startsWith('W/"') && etag[etag.length - 1] === '"') { + // ETag: W/"", also where we deviate from the spec & require a min of 3 + // chars + // ETag: for W/"", W/"asd123" + return etag.length !== 4 + } + + // Anything else + return false +} + +/** + * @param {unknown} store + * @returns {asserts store is import('../../types/cache-interceptor.d.ts').default.CacheStore} + */ +function assertCacheStore (store, name = 'CacheStore') { + if (typeof store !== 'object' || store === null) { + throw new TypeError(`expected type of ${name} to be a CacheStore, got ${store === null ? 'null' : typeof store}`) + } + + for (const fn of ['get', 'createWriteStream', 'delete']) { + if (typeof store[fn] !== 'function') { + throw new TypeError(`${name} needs to have a \`${fn}()\` function`) + } + } +} +/** + * @param {unknown} methods + * @returns {asserts methods is import('../../types/cache-interceptor.d.ts').default.CacheMethods[]} + */ +function assertCacheMethods (methods, name = 'CacheMethods') { + if (!Array.isArray(methods)) { + throw new TypeError(`expected type of ${name} needs to be an array, got ${methods === null ? 'null' : typeof methods}`) + } + + if (methods.length === 0) { + throw new TypeError(`${name} needs to have at least one method`) + } + + for (const method of methods) { + if (!safeHTTPMethods.includes(method)) { + throw new TypeError(`element of ${name}-array needs to be one of following values: ${safeHTTPMethods.join(', ')}, got ${method}`) + } + } +} + +module.exports = { + makeCacheKey, + normaliseHeaders, + assertCacheKey, + assertCacheValue, + parseCacheControlHeader, + parseVaryHeader, + isEtagUsable, + assertCacheMethods, + assertCacheStore +} diff --git a/node_modules/undici/lib/util/date.js b/node_modules/undici/lib/util/date.js new file mode 100644 index 0000000..b871c44 --- /dev/null +++ b/node_modules/undici/lib/util/date.js @@ -0,0 +1,259 @@ +'use strict' + +const IMF_DAYS = ['mon', 'tue', 'wed', 'thu', 'fri', 'sat', 'sun'] +const IMF_SPACES = [4, 7, 11, 16, 25] +const IMF_MONTHS = ['jan', 'feb', 'mar', 'apr', 'may', 'jun', 'jul', 'aug', 'sep', 'oct', 'nov', 'dec'] +const IMF_COLONS = [19, 22] + +const ASCTIME_SPACES = [3, 7, 10, 19] + +const RFC850_DAYS = ['monday', 'tuesday', 'wednesday', 'thursday', 'friday', 'saturday', 'sunday'] + +/** + * @see https://www.rfc-editor.org/rfc/rfc9110.html#name-date-time-formats + * + * @param {string} date + * @param {Date} [now] + * @returns {Date | undefined} + */ +function parseHttpDate (date, now) { + // Sun, 06 Nov 1994 08:49:37 GMT ; IMF-fixdate + // Sun Nov 6 08:49:37 1994 ; ANSI C's asctime() format + // Sunday, 06-Nov-94 08:49:37 GMT ; obsolete RFC 850 format + + date = date.toLowerCase() + + switch (date[3]) { + case ',': return parseImfDate(date) + case ' ': return parseAscTimeDate(date) + default: return parseRfc850Date(date, now) + } +} + +/** + * @see https://httpwg.org/specs/rfc9110.html#preferred.date.format + * + * @param {string} date + * @returns {Date | undefined} + */ +function parseImfDate (date) { + if (date.length !== 29) { + return undefined + } + + if (!date.endsWith('gmt')) { + // Unsupported timezone + return undefined + } + + for (const spaceInx of IMF_SPACES) { + if (date[spaceInx] !== ' ') { + return undefined + } + } + + for (const colonIdx of IMF_COLONS) { + if (date[colonIdx] !== ':') { + return undefined + } + } + + const dayName = date.substring(0, 3) + if (!IMF_DAYS.includes(dayName)) { + return undefined + } + + const dayString = date.substring(5, 7) + const day = Number.parseInt(dayString) + if (isNaN(day) || (day < 10 && dayString[0] !== '0')) { + // Not a number, 0, or it's less than 10 and didn't start with a 0 + return undefined + } + + const month = date.substring(8, 11) + const monthIdx = IMF_MONTHS.indexOf(month) + if (monthIdx === -1) { + return undefined + } + + const year = Number.parseInt(date.substring(12, 16)) + if (isNaN(year)) { + return undefined + } + + const hourString = date.substring(17, 19) + const hour = Number.parseInt(hourString) + if (isNaN(hour) || (hour < 10 && hourString[0] !== '0')) { + return undefined + } + + const minuteString = date.substring(20, 22) + const minute = Number.parseInt(minuteString) + if (isNaN(minute) || (minute < 10 && minuteString[0] !== '0')) { + return undefined + } + + const secondString = date.substring(23, 25) + const second = Number.parseInt(secondString) + if (isNaN(second) || (second < 10 && secondString[0] !== '0')) { + return undefined + } + + return new Date(Date.UTC(year, monthIdx, day, hour, minute, second)) +} + +/** + * @see https://httpwg.org/specs/rfc9110.html#obsolete.date.formats + * + * @param {string} date + * @returns {Date | undefined} + */ +function parseAscTimeDate (date) { + // This is assumed to be in UTC + + if (date.length !== 24) { + return undefined + } + + for (const spaceIdx of ASCTIME_SPACES) { + if (date[spaceIdx] !== ' ') { + return undefined + } + } + + const dayName = date.substring(0, 3) + if (!IMF_DAYS.includes(dayName)) { + return undefined + } + + const month = date.substring(4, 7) + const monthIdx = IMF_MONTHS.indexOf(month) + if (monthIdx === -1) { + return undefined + } + + const dayString = date.substring(8, 10) + const day = Number.parseInt(dayString) + if (isNaN(day) || (day < 10 && dayString[0] !== ' ')) { + return undefined + } + + const hourString = date.substring(11, 13) + const hour = Number.parseInt(hourString) + if (isNaN(hour) || (hour < 10 && hourString[0] !== '0')) { + return undefined + } + + const minuteString = date.substring(14, 16) + const minute = Number.parseInt(minuteString) + if (isNaN(minute) || (minute < 10 && minuteString[0] !== '0')) { + return undefined + } + + const secondString = date.substring(17, 19) + const second = Number.parseInt(secondString) + if (isNaN(second) || (second < 10 && secondString[0] !== '0')) { + return undefined + } + + const year = Number.parseInt(date.substring(20, 24)) + if (isNaN(year)) { + return undefined + } + + return new Date(Date.UTC(year, monthIdx, day, hour, minute, second)) +} + +/** + * @see https://httpwg.org/specs/rfc9110.html#obsolete.date.formats + * + * @param {string} date + * @param {Date} [now] + * @returns {Date | undefined} + */ +function parseRfc850Date (date, now = new Date()) { + if (!date.endsWith('gmt')) { + // Unsupported timezone + return undefined + } + + const commaIndex = date.indexOf(',') + if (commaIndex === -1) { + return undefined + } + + if ((date.length - commaIndex - 1) !== 23) { + return undefined + } + + const dayName = date.substring(0, commaIndex) + if (!RFC850_DAYS.includes(dayName)) { + return undefined + } + + if ( + date[commaIndex + 1] !== ' ' || + date[commaIndex + 4] !== '-' || + date[commaIndex + 8] !== '-' || + date[commaIndex + 11] !== ' ' || + date[commaIndex + 14] !== ':' || + date[commaIndex + 17] !== ':' || + date[commaIndex + 20] !== ' ' + ) { + return undefined + } + + const dayString = date.substring(commaIndex + 2, commaIndex + 4) + const day = Number.parseInt(dayString) + if (isNaN(day) || (day < 10 && dayString[0] !== '0')) { + // Not a number, or it's less than 10 and didn't start with a 0 + return undefined + } + + const month = date.substring(commaIndex + 5, commaIndex + 8) + const monthIdx = IMF_MONTHS.indexOf(month) + if (monthIdx === -1) { + return undefined + } + + // As of this point year is just the decade (i.e. 94) + let year = Number.parseInt(date.substring(commaIndex + 9, commaIndex + 11)) + if (isNaN(year)) { + return undefined + } + + const currentYear = now.getUTCFullYear() + const currentDecade = currentYear % 100 + const currentCentury = Math.floor(currentYear / 100) + + if (year > currentDecade && year - currentDecade >= 50) { + // Over 50 years in future, go to previous century + year += (currentCentury - 1) * 100 + } else { + year += currentCentury * 100 + } + + const hourString = date.substring(commaIndex + 12, commaIndex + 14) + const hour = Number.parseInt(hourString) + if (isNaN(hour) || (hour < 10 && hourString[0] !== '0')) { + return undefined + } + + const minuteString = date.substring(commaIndex + 15, commaIndex + 17) + const minute = Number.parseInt(minuteString) + if (isNaN(minute) || (minute < 10 && minuteString[0] !== '0')) { + return undefined + } + + const secondString = date.substring(commaIndex + 18, commaIndex + 20) + const second = Number.parseInt(secondString) + if (isNaN(second) || (second < 10 && secondString[0] !== '0')) { + return undefined + } + + return new Date(Date.UTC(year, monthIdx, day, hour, minute, second)) +} + +module.exports = { + parseHttpDate +} diff --git a/node_modules/cheerio/node_modules/undici/lib/util/timers.js b/node_modules/undici/lib/util/timers.js similarity index 100% rename from node_modules/cheerio/node_modules/undici/lib/util/timers.js rename to node_modules/undici/lib/util/timers.js diff --git a/node_modules/cheerio/node_modules/undici/lib/web/cache/cache.js b/node_modules/undici/lib/web/cache/cache.js similarity index 94% rename from node_modules/cheerio/node_modules/undici/lib/web/cache/cache.js rename to node_modules/undici/lib/web/cache/cache.js index 1c1a591..435891d 100644 --- a/node_modules/cheerio/node_modules/undici/lib/web/cache/cache.js +++ b/node_modules/undici/lib/web/cache/cache.js @@ -1,12 +1,11 @@ 'use strict' -const { kConstruct } = require('./symbols') +const { kConstruct } = require('../../core/symbols') const { urlEquals, getFieldValues } = require('./util') const { kEnumerableProperty, isDisturbed } = require('../../core/util') const { webidl } = require('../fetch/webidl') -const { Response, cloneResponse, fromInnerResponse } = require('../fetch/response') -const { Request, fromInnerRequest } = require('../fetch/request') -const { kState } = require('../fetch/symbols') +const { cloneResponse, fromInnerResponse, getResponseState } = require('../fetch/response') +const { Request, fromInnerRequest, getRequestState } = require('../fetch/request') const { fetching } = require('../fetch/index') const { urlIsHttpHttpsScheme, createDeferredPromise, readAllBytes } = require('../fetch/util') const assert = require('node:assert') @@ -116,7 +115,7 @@ class Cache { } // 3.1 - const r = request[kState] + const r = getRequestState(request) // 3.2 if (!urlIsHttpHttpsScheme(r.url) || r.method !== 'GET') { @@ -134,7 +133,7 @@ class Cache { // 5. for (const request of requests) { // 5.1 - const r = new Request(request)[kState] + const r = getRequestState(new Request(request)) // 5.2 if (!urlIsHttpHttpsScheme(r.url)) { @@ -270,10 +269,10 @@ class Cache { let innerRequest = null // 2. - if (request instanceof Request) { - innerRequest = request[kState] + if (webidl.is.Request(request)) { + innerRequest = getRequestState(request) } else { // 3. - innerRequest = new Request(request)[kState] + innerRequest = getRequestState(new Request(request)) } // 4. @@ -285,7 +284,7 @@ class Cache { } // 5. - const innerResponse = response[kState] + const innerResponse = getResponseState(response) // 6. if (innerResponse.status === 206) { @@ -335,7 +334,7 @@ class Cache { const reader = stream.getReader() // 11.3 - readAllBytes(reader).then(bodyReadPromise.resolve, bodyReadPromise.reject) + readAllBytes(reader, bodyReadPromise.resolve, bodyReadPromise.reject) } else { bodyReadPromise.resolve(undefined) } @@ -402,8 +401,8 @@ class Cache { */ let r = null - if (request instanceof Request) { - r = request[kState] + if (webidl.is.Request(request)) { + r = getRequestState(request) if (r.method !== 'GET' && !options.ignoreMethod) { return false @@ -411,7 +410,7 @@ class Cache { } else { assert(typeof request === 'string') - r = new Request(request)[kState] + r = getRequestState(new Request(request)) } /** @type {CacheBatchOperation[]} */ @@ -468,16 +467,16 @@ class Cache { // 2. if (request !== undefined) { // 2.1 - if (request instanceof Request) { + if (webidl.is.Request(request)) { // 2.1.1 - r = request[kState] + r = getRequestState(request) // 2.1.2 if (r.method !== 'GET' && !options.ignoreMethod) { return [] } } else if (typeof request === 'string') { // 2.2 - r = new Request(request)[kState] + r = getRequestState(new Request(request)) } } @@ -515,6 +514,7 @@ class Cache { for (const request of requests) { const requestObject = fromInnerRequest( request, + undefined, new AbortController().signal, 'immutable' ) @@ -749,9 +749,9 @@ class Cache { // 2. if (request !== undefined) { - if (request instanceof Request) { + if (webidl.is.Request(request)) { // 2.1.1 - r = request[kState] + r = getRequestState(request) // 2.1.2 if (r.method !== 'GET' && !options.ignoreMethod) { @@ -759,7 +759,7 @@ class Cache { } } else if (typeof request === 'string') { // 2.2.1 - r = new Request(request)[kState] + r = getRequestState(new Request(request)) } } @@ -848,7 +848,10 @@ webidl.converters.MultiCacheQueryOptions = webidl.dictionaryConverter([ } ]) -webidl.converters.Response = webidl.interfaceConverter(Response) +webidl.converters.Response = webidl.interfaceConverter( + webidl.is.Response, + 'Response' +) webidl.converters['sequence<RequestInfo>'] = webidl.sequenceConverter( webidl.converters.RequestInfo diff --git a/node_modules/cheerio/node_modules/undici/lib/web/cache/cachestorage.js b/node_modules/undici/lib/web/cache/cachestorage.js similarity index 98% rename from node_modules/cheerio/node_modules/undici/lib/web/cache/cachestorage.js rename to node_modules/undici/lib/web/cache/cachestorage.js index 55dba35..3b1604c 100644 --- a/node_modules/cheerio/node_modules/undici/lib/web/cache/cachestorage.js +++ b/node_modules/undici/lib/web/cache/cachestorage.js @@ -1,9 +1,9 @@ 'use strict' -const { kConstruct } = require('./symbols') const { Cache } = require('./cache') const { webidl } = require('../fetch/webidl') const { kEnumerableProperty } = require('../../core/util') +const { kConstruct } = require('../../core/symbols') class CacheStorage { /** diff --git a/node_modules/cheerio/node_modules/undici/lib/web/cache/util.js b/node_modules/undici/lib/web/cache/util.js similarity index 100% rename from node_modules/cheerio/node_modules/undici/lib/web/cache/util.js rename to node_modules/undici/lib/web/cache/util.js diff --git a/node_modules/cheerio/node_modules/undici/lib/web/cookies/constants.js b/node_modules/undici/lib/web/cookies/constants.js similarity index 100% rename from node_modules/cheerio/node_modules/undici/lib/web/cookies/constants.js rename to node_modules/undici/lib/web/cookies/constants.js diff --git a/node_modules/cheerio/node_modules/undici/lib/web/cookies/index.js b/node_modules/undici/lib/web/cookies/index.js similarity index 82% rename from node_modules/cheerio/node_modules/undici/lib/web/cookies/index.js rename to node_modules/undici/lib/web/cookies/index.js index 323aa9e..8bcb4e2 100644 --- a/node_modules/cheerio/node_modules/undici/lib/web/cookies/index.js +++ b/node_modules/undici/lib/web/cookies/index.js @@ -5,18 +5,20 @@ const { stringify } = require('./util') const { webidl } = require('../fetch/webidl') const { Headers } = require('../fetch/headers') +const brandChecks = webidl.brandCheckMultiple([Headers, globalThis.Headers].filter(Boolean)) + /** * @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 + * @property {Date|number} [expires] + * @property {number} [maxAge] + * @property {string} [domain] + * @property {string} [path] + * @property {boolean} [secure] + * @property {boolean} [httpOnly] + * @property {'Strict'|'Lax'|'None'} [sameSite] + * @property {string[]} [unparsed] */ /** @@ -26,9 +28,11 @@ const { Headers } = require('../fetch/headers') function getCookies (headers) { webidl.argumentLengthCheck(arguments, 1, 'getCookies') - webidl.brandCheck(headers, Headers, { strict: false }) + brandChecks(headers) const cookie = headers.get('cookie') + + /** @type {Record<string, string>} */ const out = {} if (!cookie) { @@ -51,7 +55,7 @@ function getCookies (headers) { * @returns {void} */ function deleteCookie (headers, name, attributes) { - webidl.brandCheck(headers, Headers, { strict: false }) + brandChecks(headers) const prefix = 'deleteCookie' webidl.argumentLengthCheck(arguments, 2, prefix) @@ -76,7 +80,7 @@ function deleteCookie (headers, name, attributes) { function getSetCookies (headers) { webidl.argumentLengthCheck(arguments, 1, 'getSetCookies') - webidl.brandCheck(headers, Headers, { strict: false }) + brandChecks(headers) const cookies = headers.getSetCookie() @@ -87,6 +91,16 @@ function getSetCookies (headers) { return cookies.map((pair) => parseSetCookie(pair)) } +/** + * Parses a cookie string + * @param {string} cookie + */ +function parseCookie (cookie) { + cookie = webidl.converters.DOMString(cookie) + + return parseSetCookie(cookie) +} + /** * @param {Headers} headers * @param {Cookie} cookie @@ -95,14 +109,14 @@ function getSetCookies (headers) { function setCookie (headers, cookie) { webidl.argumentLengthCheck(arguments, 2, 'setCookie') - webidl.brandCheck(headers, Headers, { strict: false }) + brandChecks(headers) cookie = webidl.converters.Cookie(cookie) const str = stringify(cookie) if (str) { - headers.append('Set-Cookie', str) + headers.append('set-cookie', str, true) } } @@ -180,5 +194,6 @@ module.exports = { getCookies, deleteCookie, getSetCookies, - setCookie + setCookie, + parseCookie } diff --git a/node_modules/cheerio/node_modules/undici/lib/web/cookies/parse.js b/node_modules/undici/lib/web/cookies/parse.js similarity index 95% rename from node_modules/cheerio/node_modules/undici/lib/web/cookies/parse.js rename to node_modules/undici/lib/web/cookies/parse.js index 3c48c26..4ac66dc 100644 --- a/node_modules/cheerio/node_modules/undici/lib/web/cookies/parse.js +++ b/node_modules/undici/lib/web/cookies/parse.js @@ -4,12 +4,13 @@ const { maxNameValuePairSize, maxAttributeValueSize } = require('./constants') const { isCTLExcludingHtab } = require('./util') const { collectASequenceOfCodePointsFast } = require('../fetch/data-url') const assert = require('node:assert') +const { unescape } = require('node:querystring') /** * @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 + * @returns {import('./index').Cookie|null} 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 @@ -76,8 +77,12 @@ function parseSetCookie (header) { // 6. The cookie-name is the name string, and the cookie-value is the // value string. + // https://datatracker.ietf.org/doc/html/rfc6265 + // To maximize compatibility with user agents, servers that wish to + // store arbitrary data in a cookie-value SHOULD encode that data, for + // example, using Base64 [RFC4648]. return { - name, value, ...parseUnparsedAttributes(unparsedAttributes) + name, value: unescape(value), ...parseUnparsedAttributes(unparsedAttributes) } } @@ -85,7 +90,7 @@ function parseSetCookie (header) { * 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 + * @param {Object.<string, unknown>} [cookieAttributeList={}] */ function parseUnparsedAttributes (unparsedAttributes, cookieAttributeList = {}) { // 1. If the unparsed-attributes string is empty, skip the rest of diff --git a/node_modules/cheerio/node_modules/undici/lib/web/cookies/util.js b/node_modules/undici/lib/web/cookies/util.js similarity index 100% rename from node_modules/cheerio/node_modules/undici/lib/web/cookies/util.js rename to node_modules/undici/lib/web/cookies/util.js diff --git a/node_modules/cheerio/node_modules/undici/lib/web/eventsource/eventsource-stream.js b/node_modules/undici/lib/web/eventsource/eventsource-stream.js similarity index 95% rename from node_modules/cheerio/node_modules/undici/lib/web/eventsource/eventsource-stream.js rename to node_modules/undici/lib/web/eventsource/eventsource-stream.js index 7549345..59cf746 100644 --- a/node_modules/cheerio/node_modules/undici/lib/web/eventsource/eventsource-stream.js +++ b/node_modules/undici/lib/web/eventsource/eventsource-stream.js @@ -35,16 +35,16 @@ const SPACE = 0x20 /** * @typedef eventSourceSettings * @type {object} - * @property {string} lastEventId The last event ID received from the server. - * @property {string} origin The origin of the event source. - * @property {number} reconnectionTime The reconnection time, in milliseconds. + * @property {string} [lastEventId] The last event ID received from the server. + * @property {string} [origin] The origin of the event source. + * @property {number} [reconnectionTime] The reconnection time, in milliseconds. */ class EventSourceStream extends Transform { /** * @type {eventSourceSettings} */ - state = null + state /** * Leading byte-order-mark check. @@ -63,7 +63,7 @@ class EventSourceStream extends Transform { eventEndCheck = false /** - * @type {Buffer} + * @type {Buffer|null} */ buffer = null @@ -78,8 +78,9 @@ class EventSourceStream extends Transform { /** * @param {object} options - * @param {eventSourceSettings} options.eventSourceSettings - * @param {Function} [options.push] + * @param {boolean} [options.readableObjectMode] + * @param {eventSourceSettings} [options.eventSourceSettings] + * @param {(chunk: any, encoding?: BufferEncoding | undefined) => boolean} [options.push] */ constructor (options = {}) { // Enable object mode as EventSourceStream emits objects of shape @@ -280,7 +281,7 @@ class EventSourceStream extends Transform { /** * @param {Buffer} line - * @param {EventStreamEvent} event + * @param {EventSourceStreamEvent} event */ parseLine (line, event) { // If the line is empty (a blank line) diff --git a/node_modules/cheerio/node_modules/undici/lib/web/eventsource/eventsource.js b/node_modules/undici/lib/web/eventsource/eventsource.js similarity index 98% rename from node_modules/cheerio/node_modules/undici/lib/web/eventsource/eventsource.js rename to node_modules/undici/lib/web/eventsource/eventsource.js index 5a488ff..02f4d47 100644 --- a/node_modules/cheerio/node_modules/undici/lib/web/eventsource/eventsource.js +++ b/node_modules/undici/lib/web/eventsource/eventsource.js @@ -28,7 +28,8 @@ const defaultReconnectionTime = 3000 /** * The readyState attribute represents the state of the connection. - * @enum + * @typedef ReadyState + * @type {0|1|2} * @readonly * @see https://html.spec.whatwg.org/multipage/server-sent-events.html#dom-eventsource-readystate-dev */ @@ -80,9 +81,12 @@ class EventSource extends EventTarget { message: null } - #url = null + #url #withCredentials = false + /** + * @type {ReadyState} + */ #readyState = CONNECTING #request = null @@ -98,7 +102,7 @@ class EventSource extends EventTarget { /** * Creates a new EventSource object. * @param {string} url - * @param {EventSourceInit} [eventSourceInitDict] + * @param {EventSourceInit} [eventSourceInitDict={}] * @see https://html.spec.whatwg.org/multipage/server-sent-events.html#the-eventsource-interface */ constructor (url, eventSourceInitDict = {}) { @@ -117,7 +121,7 @@ class EventSource extends EventTarget { }) } - url = webidl.converters.USVString(url, prefix, 'url') + url = webidl.converters.USVString(url) eventSourceInitDict = webidl.converters.EventSourceInitDict(eventSourceInitDict, prefix, 'eventSourceInitDict') this.#dispatcher = eventSourceInitDict.dispatcher @@ -150,7 +154,7 @@ class EventSource extends EventTarget { // 7. If the value of eventSourceInitDict's withCredentials member is true, // then set corsAttributeState to Use Credentials and set ev's // withCredentials attribute to true. - if (eventSourceInitDict.withCredentials) { + if (eventSourceInitDict.withCredentials === true) { corsAttributeState = USE_CREDENTIALS this.#withCredentials = true } @@ -191,7 +195,7 @@ class EventSource extends EventTarget { /** * Returns the state of this EventSource object's connection. It can have the * values described below. - * @returns {0|1|2} + * @returns {ReadyState} * @readonly */ get readyState () { diff --git a/node_modules/cheerio/node_modules/undici/lib/web/eventsource/util.js b/node_modules/undici/lib/web/eventsource/util.js similarity index 100% rename from node_modules/cheerio/node_modules/undici/lib/web/eventsource/util.js rename to node_modules/undici/lib/web/eventsource/util.js diff --git a/node_modules/cheerio/node_modules/undici/lib/web/fetch/body.js b/node_modules/undici/lib/web/fetch/body.js similarity index 88% rename from node_modules/cheerio/node_modules/undici/lib/web/fetch/body.js rename to node_modules/undici/lib/web/fetch/body.js index aa6e297..81d9b6d 100644 --- a/node_modules/cheerio/node_modules/undici/lib/web/fetch/body.js +++ b/node_modules/undici/lib/web/fetch/body.js @@ -3,16 +3,13 @@ const util = require('../../core/util') const { ReadableStreamFrom, - isBlobLike, - isReadableStreamLike, readableStreamClose, createDeferredPromise, fullyReadBody, extractMimeType, utf8DecodeBytes } = require('./util') -const { FormData } = require('./formdata') -const { kState } = require('./symbols') +const { FormData, setFormDataState } = require('./formdata') const { webidl } = require('./webidl') const { Blob } = require('node:buffer') const assert = require('node:assert') @@ -26,7 +23,7 @@ try { const crypto = require('node:crypto') random = (max) => crypto.randomInt(0, max) } catch { - random = (max) => Math.floor(Math.random(max)) + random = (max) => Math.floor(Math.random() * max) } const textEncoder = new TextEncoder() @@ -50,9 +47,9 @@ function extractBody (object, keepalive = false) { let stream = null // 2. If object is a ReadableStream object, then set stream to object. - if (object instanceof ReadableStream) { + if (webidl.is.ReadableStream(object)) { stream = object - } else if (isBlobLike(object)) { + } else if (webidl.is.Blob(object)) { // 3. Otherwise, if object is a Blob object, set stream to the // result of running object’s get stream. stream = object.stream() @@ -75,7 +72,7 @@ function extractBody (object, keepalive = false) { } // 5. Assert: stream is a ReadableStream object. - assert(isReadableStreamLike(stream)) + assert(webidl.is.ReadableStream(stream)) // 6. Let action be null. let action = null @@ -97,7 +94,7 @@ function extractBody (object, keepalive = false) { // Set type to `text/plain;charset=UTF-8`. type = 'text/plain;charset=UTF-8' - } else if (object instanceof URLSearchParams) { + } else if (webidl.is.URLSearchParams(object)) { // URLSearchParams // spec says to run application/x-www-form-urlencoded on body.list @@ -120,7 +117,7 @@ function extractBody (object, keepalive = false) { // 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)) { + } else if (webidl.is.FormData(object)) { const boundary = `----formdata-undici-0${`${random(1e11)}`.padStart(11, '0')}` const prefix = `--${boundary}\r\nContent-Disposition: form-data` @@ -162,7 +159,10 @@ function extractBody (object, keepalive = false) { } } - const chunk = textEncoder.encode(`--${boundary}--`) + // CRLF is appended to the body to function with legacy servers and match other implementations. + // https://github.com/curl/curl/blob/3434c6b46e682452973972e8313613dfa58cd690/lib/mime.c#L1029-L1030 + // https://github.com/form-data/form-data/issues/63 + const chunk = textEncoder.encode(`--${boundary}--\r\n`) blobParts.push(chunk) length += chunk.byteLength if (hasUnknownSizeValue) { @@ -186,7 +186,7 @@ function extractBody (object, keepalive = false) { // 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)) { + } else if (webidl.is.Blob(object)) { // Blob // Set source to object. @@ -214,7 +214,7 @@ function extractBody (object, keepalive = false) { } stream = - object instanceof ReadableStream ? object : ReadableStreamFrom(object) + webidl.is.ReadableStream(object) ? object : ReadableStreamFrom(object) } // 11. If source is a byte sequence, then set action to a @@ -273,7 +273,7 @@ function safelyExtractBody (object, keepalive = false) { // a byte sequence or BodyInit object object, run these steps: // 1. If object is a ReadableStream object, then: - if (object instanceof ReadableStream) { + if (webidl.is.ReadableStream(object)) { // Assert: object is neither disturbed nor locked. // istanbul ignore next assert(!util.isDisturbed(object), 'The body has already been consumed.') @@ -314,7 +314,7 @@ function throwIfAborted (state) { } } -function bodyMixinMethods (instance) { +function bodyMixinMethods (instance, getInternalState) { const methods = { blob () { // The blob() method steps are to return the result of @@ -323,7 +323,7 @@ function bodyMixinMethods (instance) { // contents are bytes and whose type attribute is this’s // MIME type. return consumeBody(this, (bytes) => { - let mimeType = bodyMimeType(this) + let mimeType = bodyMimeType(getInternalState(this)) if (mimeType === null) { mimeType = '' @@ -334,7 +334,7 @@ function bodyMixinMethods (instance) { // Return a Blob whose contents are bytes and type attribute // is mimeType. return new Blob([bytes], { type: mimeType }) - }, instance) + }, instance, getInternalState) }, arrayBuffer () { @@ -344,19 +344,19 @@ function bodyMixinMethods (instance) { // whose contents are bytes. return consumeBody(this, (bytes) => { return new Uint8Array(bytes).buffer - }, instance) + }, instance, getInternalState) }, text () { // The text() method steps are to return the result of running // consume body with this and UTF-8 decode. - return consumeBody(this, utf8DecodeBytes, instance) + return consumeBody(this, utf8DecodeBytes, instance, getInternalState) }, json () { // The json() method steps are to return the result of running // consume body with this and parse JSON from bytes. - return consumeBody(this, parseJSONFromBytes, instance) + return consumeBody(this, parseJSONFromBytes, instance, getInternalState) }, formData () { @@ -364,7 +364,7 @@ function bodyMixinMethods (instance) { // consume body with this and the following step given a byte sequence bytes: return consumeBody(this, (value) => { // 1. Let mimeType be the result of get the MIME type with this. - const mimeType = bodyMimeType(this) + const mimeType = bodyMimeType(getInternalState(this)) // 2. If mimeType is non-null, then switch on mimeType’s essence and run // the corresponding steps: @@ -372,17 +372,13 @@ function bodyMixinMethods (instance) { switch (mimeType.essence) { case 'multipart/form-data': { // 1. ... [long step] - const parsed = multipartFormDataParser(value, mimeType) - // 2. If that fails for some reason, then throw a TypeError. - if (parsed === 'failure') { - throw new TypeError('Failed to parse body as FormData.') - } + const parsed = multipartFormDataParser(value, mimeType) // 3. Return a new FormData object, appending each entry, // resulting from the parsing operation, to its entry list. const fd = new FormData() - fd[kState] = parsed + setFormDataState(fd, parsed) return fd } @@ -408,7 +404,7 @@ function bodyMixinMethods (instance) { throw new TypeError( 'Content-Type was not one of "multipart/form-data" or "application/x-www-form-urlencoded".' ) - }, instance) + }, instance, getInternalState) }, bytes () { @@ -417,33 +413,36 @@ function bodyMixinMethods (instance) { // result of creating a Uint8Array from bytes in this’s relevant realm. return consumeBody(this, (bytes) => { return new Uint8Array(bytes) - }, instance) + }, instance, getInternalState) } } return methods } -function mixinBody (prototype) { - Object.assign(prototype.prototype, bodyMixinMethods(prototype)) +function mixinBody (prototype, getInternalState) { + Object.assign(prototype.prototype, bodyMixinMethods(prototype, getInternalState)) } /** * @see https://fetch.spec.whatwg.org/#concept-body-consume-body - * @param {Response|Request} object + * @param {any} object internal state * @param {(value: unknown) => unknown} convertBytesToJSValue - * @param {Response|Request} instance + * @param {any} instance + * @param {(target: any) => any} getInternalState */ -async function consumeBody (object, convertBytesToJSValue, instance) { +async function consumeBody (object, convertBytesToJSValue, instance, getInternalState) { webidl.brandCheck(object, instance) + const state = getInternalState(object) + // 1. If object is unusable, then return a promise rejected // with a TypeError. - if (bodyUnusable(object)) { + if (bodyUnusable(state)) { throw new TypeError('Body is unusable: Body has already been read') } - throwIfAborted(object[kState]) + throwIfAborted(state) // 2. Let promise be a new promise. const promise = createDeferredPromise() @@ -465,22 +464,25 @@ async function consumeBody (object, convertBytesToJSValue, instance) { // 5. If object’s body is null, then run successSteps with an // empty byte sequence. - if (object[kState].body == null) { + if (state.body == null) { successSteps(Buffer.allocUnsafe(0)) return promise.promise } // 6. Otherwise, fully read object’s body given successSteps, // errorSteps, and object’s relevant global object. - await fullyReadBody(object[kState].body, successSteps, errorSteps) + fullyReadBody(state.body, successSteps, errorSteps) // 7. Return promise. return promise.promise } -// https://fetch.spec.whatwg.org/#body-unusable +/** + * @see https://fetch.spec.whatwg.org/#body-unusable + * @param {any} object internal state + */ function bodyUnusable (object) { - const body = object[kState].body + const body = object.body // An object including the Body interface mixin is // said to be unusable if its body is non-null and @@ -498,14 +500,14 @@ function parseJSONFromBytes (bytes) { /** * @see https://fetch.spec.whatwg.org/#concept-body-mime-type - * @param {import('./response').Response|import('./request').Request} requestOrResponse + * @param {any} requestOrResponse internal state */ function bodyMimeType (requestOrResponse) { // 1. Let headers be null. // 2. If requestOrResponse is a Request object, then set headers to requestOrResponse’s request’s header list. // 3. Otherwise, set headers to requestOrResponse’s response’s header list. /** @type {import('./headers').HeadersList} */ - const headers = requestOrResponse[kState].headersList + const headers = requestOrResponse.headersList // 4. Let mimeType be the result of extracting a MIME type from headers. const mimeType = extractMimeType(headers) diff --git a/node_modules/cheerio/node_modules/undici/lib/web/fetch/constants.js b/node_modules/undici/lib/web/fetch/constants.js similarity index 92% rename from node_modules/cheerio/node_modules/undici/lib/web/fetch/constants.js rename to node_modules/undici/lib/web/fetch/constants.js index 1f285e0..ef63b0c 100644 --- a/node_modules/cheerio/node_modules/undici/lib/web/fetch/constants.js +++ b/node_modules/undici/lib/web/fetch/constants.js @@ -22,10 +22,9 @@ const badPorts = /** @type {const} */ ([ const badPortsSet = new Set(badPorts) /** - * @see https://w3c.github.io/webappsec-referrer-policy/#referrer-policies + * @see https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-header */ -const referrerPolicy = /** @type {const} */ ([ - '', +const referrerPolicyTokens = /** @type {const} */ ([ 'no-referrer', 'no-referrer-when-downgrade', 'same-origin', @@ -35,7 +34,15 @@ const referrerPolicy = /** @type {const} */ ([ 'strict-origin-when-cross-origin', 'unsafe-url' ]) -const referrerPolicySet = new Set(referrerPolicy) + +/** + * @see https://w3c.github.io/webappsec-referrer-policy/#referrer-policies + */ +const referrerPolicy = /** @type {const} */ ([ + '', + ...referrerPolicyTokens +]) +const referrerPolicyTokensSet = new Set(referrerPolicyTokens) const requestRedirect = /** @type {const} */ (['follow', 'manual', 'error']) @@ -120,5 +127,5 @@ module.exports = { corsSafeListedMethodsSet, safeMethodsSet, forbiddenMethodsSet, - referrerPolicySet + referrerPolicyTokens: referrerPolicyTokensSet } diff --git a/node_modules/cheerio/node_modules/undici/lib/web/fetch/data-url.js b/node_modules/undici/lib/web/fetch/data-url.js similarity index 99% rename from node_modules/cheerio/node_modules/undici/lib/web/fetch/data-url.js rename to node_modules/undici/lib/web/fetch/data-url.js index 7a74db6..bc7a692 100644 --- a/node_modules/cheerio/node_modules/undici/lib/web/fetch/data-url.js +++ b/node_modules/undici/lib/web/fetch/data-url.js @@ -283,7 +283,7 @@ function parseMIMEType (input) { // 5. If position is past the end of input, then return // failure - if (position.position > input.length) { + if (position.position >= input.length) { return 'failure' } @@ -364,7 +364,7 @@ function parseMIMEType (input) { } // 6. If position is past the end of input, then break. - if (position.position > input.length) { + if (position.position >= input.length) { break } @@ -431,7 +431,7 @@ function parseMIMEType (input) { /** @param {string} data */ function forgivingBase64 (data) { // 1. Remove all ASCII whitespace from data. - data = data.replace(ASCII_WHITESPACE_REPLACE_REGEX, '') // eslint-disable-line + data = data.replace(ASCII_WHITESPACE_REPLACE_REGEX, '') let dataLength = data.length // 2. If data’s code point length divides by 4 leaving @@ -471,9 +471,9 @@ function forgivingBase64 (data) { /** * @param {string} input * @param {{ position: number }} position - * @param {boolean?} extractValue + * @param {boolean} [extractValue=false] */ -function collectAnHTTPQuotedString (input, position, extractValue) { +function collectAnHTTPQuotedString (input, position, extractValue = false) { // 1. Let positionStart be position. const positionStart = position.position diff --git a/node_modules/cheerio/node_modules/undici/lib/web/fetch/dispatcher-weakref.js b/node_modules/undici/lib/web/fetch/dispatcher-weakref.js similarity index 100% rename from node_modules/cheerio/node_modules/undici/lib/web/fetch/dispatcher-weakref.js rename to node_modules/undici/lib/web/fetch/dispatcher-weakref.js diff --git a/node_modules/cheerio/node_modules/undici/lib/web/fetch/formdata-parser.js b/node_modules/undici/lib/web/fetch/formdata-parser.js similarity index 81% rename from node_modules/cheerio/node_modules/undici/lib/web/fetch/formdata-parser.js rename to node_modules/undici/lib/web/fetch/formdata-parser.js index 315a462..f43b5fd 100644 --- a/node_modules/cheerio/node_modules/undici/lib/web/fetch/formdata-parser.js +++ b/node_modules/undici/lib/web/fetch/formdata-parser.js @@ -3,15 +3,15 @@ const { isUSVString, bufferToLowerCasedHeaderName } = require('../../core/util') const { utf8DecodeBytes } = require('./util') const { HTTP_TOKEN_CODEPOINTS, isomorphicDecode } = require('./data-url') -const { isFileLike } = require('./file') const { makeEntry } = require('./formdata') +const { webidl } = require('./webidl') const assert = require('node:assert') const { File: NodeFile } = require('node:buffer') const File = globalThis.File ?? NodeFile const formDataNameBuffer = Buffer.from('form-data; name="') -const filenameBuffer = Buffer.from('; filename') +const filenameBuffer = Buffer.from('filename') const dd = Buffer.from('--') const ddcrlf = Buffer.from('--\r\n') @@ -75,7 +75,7 @@ function multipartFormDataParser (input, mimeType) { // Otherwise, let boundary be the result of UTF-8 decoding mimeType’s // parameters["boundary"]. if (boundaryString === undefined) { - return 'failure' + throw parsingError('missing boundary in content-type header') } const boundary = Buffer.from(`--${boundaryString}`, 'utf8') @@ -111,7 +111,7 @@ function multipartFormDataParser (input, mimeType) { if (input.subarray(position.position, position.position + boundary.length).equals(boundary)) { position.position += boundary.length } else { - return 'failure' + throw parsingError('expected a value starting with -- and the boundary') } // 5.2. If position points to the sequence of bytes 0x2D 0x2D 0x0D 0x0A @@ -127,7 +127,7 @@ function multipartFormDataParser (input, mimeType) { // 5.3. If position does not point to a sequence of bytes starting with 0x0D // 0x0A (CR LF), return failure. if (input[position.position] !== 0x0d || input[position.position + 1] !== 0x0a) { - return 'failure' + throw parsingError('expected CRLF') } // 5.4. Advance position by 2. (This skips past the newline.) @@ -138,10 +138,6 @@ function multipartFormDataParser (input, mimeType) { // is not failure. Otherwise, return failure. const result = parseMultipartFormDataHeaders(input, position) - if (result === 'failure') { - return 'failure' - } - let { name, filename, contentType, encoding } = result // 5.6. Advance position by 2. (This skips past the empty line that marks @@ -157,7 +153,7 @@ function multipartFormDataParser (input, mimeType) { const boundaryIndex = input.indexOf(boundary.subarray(2), position.position) if (boundaryIndex === -1) { - return 'failure' + throw parsingError('expected boundary after body') } body = input.subarray(position.position, boundaryIndex - 4) @@ -174,7 +170,7 @@ function multipartFormDataParser (input, mimeType) { // 5.9. If position does not point to a sequence of bytes starting with // 0x0D 0x0A (CR LF), return failure. Otherwise, advance position by 2. if (input[position.position] !== 0x0d || input[position.position + 1] !== 0x0a) { - return 'failure' + throw parsingError('expected CRLF') } else { position.position += 2 } @@ -205,7 +201,7 @@ function multipartFormDataParser (input, mimeType) { // 5.12. Assert: name is a scalar value string and value is either a scalar value string or a File object. assert(isUSVString(name)) - assert((typeof value === 'string' && isUSVString(value)) || isFileLike(value)) + assert((typeof value === 'string' && isUSVString(value)) || webidl.is.File(value)) // 5.13. Create an entry with name and value, and append it to entry list. entryList.push(makeEntry(name, value, filename)) @@ -230,7 +226,7 @@ function parseMultipartFormDataHeaders (input, position) { if (input[position.position] === 0x0d && input[position.position + 1] === 0x0a) { // 2.1.1. If name is null, return failure. if (name === null) { - return 'failure' + throw parsingError('header name is null') } // 2.1.2. Return name, filename and contentType. @@ -250,12 +246,12 @@ function parseMultipartFormDataHeaders (input, position) { // 2.4. If header name does not match the field-name token production, return failure. if (!HTTP_TOKEN_CODEPOINTS.test(headerName.toString())) { - return 'failure' + throw parsingError('header name does not match the field-name token production') } // 2.5. If the byte at position is not 0x3A (:), return failure. if (input[position.position] !== 0x3a) { - return 'failure' + throw parsingError('expected :') } // 2.6. Advance position by 1. @@ -278,7 +274,7 @@ function parseMultipartFormDataHeaders (input, position) { // 2. If position does not point to a sequence of bytes starting with // `form-data; name="`, return failure. if (!bufferStartsWith(input, formDataNameBuffer, position)) { - return 'failure' + throw parsingError('expected form-data; name=" for content-disposition header') } // 3. Advance position so it points at the byte after the next 0x22 (") @@ -290,34 +286,61 @@ function parseMultipartFormDataHeaders (input, position) { // failure. name = parseMultipartFormDataName(input, position) - if (name === null) { - return 'failure' - } - // 5. If position points to a sequence of bytes starting with `; filename="`: - if (bufferStartsWith(input, filenameBuffer, position)) { - // Note: undici also handles filename* - let check = position.position + filenameBuffer.length + if (input[position.position] === 0x3b /* ; */ && input[position.position + 1] === 0x20 /* ' ' */) { + const at = { position: position.position + 2 } - if (input[check] === 0x2a) { - position.position += 1 - check += 1 - } + if (bufferStartsWith(input, filenameBuffer, at)) { + if (input[at.position + 8] === 0x2a /* '*' */) { + at.position += 10 // skip past filename*= - if (input[check] !== 0x3d || input[check + 1] !== 0x22) { // =" - return 'failure' - } + // Remove leading http tab and spaces. See RFC for examples. + // https://datatracker.ietf.org/doc/html/rfc6266#section-5 + collectASequenceOfBytes( + (char) => char === 0x20 || char === 0x09, + input, + at + ) - // 1. Advance position so it points at the byte after the next 0x22 (") byte - // (the one in the sequence of bytes matched above). - position.position += 12 + const headerValue = collectASequenceOfBytes( + (char) => char !== 0x20 && char !== 0x0d && char !== 0x0a, // ' ' or CRLF + input, + at + ) - // 2. Set filename to the result of parsing a multipart/form-data name given - // input and position, if the result is not failure. Otherwise, return failure. - filename = parseMultipartFormDataName(input, position) + if ( + (headerValue[0] !== 0x75 && headerValue[0] !== 0x55) || // u or U + (headerValue[1] !== 0x74 && headerValue[1] !== 0x54) || // t or T + (headerValue[2] !== 0x66 && headerValue[2] !== 0x46) || // f or F + headerValue[3] !== 0x2d || // - + headerValue[4] !== 0x38 // 8 + ) { + throw parsingError('unknown encoding, expected utf-8\'\'') + } - if (filename === null) { - return 'failure' + // skip utf-8'' + filename = decodeURIComponent(new TextDecoder().decode(headerValue.subarray(7))) + + position.position = at.position + } else { + // 1. Advance position so it points at the byte after the next 0x22 (") byte + // (the one in the sequence of bytes matched above). + position.position += 11 + + // Remove leading http tab and spaces. See RFC for examples. + // https://datatracker.ietf.org/doc/html/rfc6266#section-5 + collectASequenceOfBytes( + (char) => char === 0x20 || char === 0x09, + input, + position + ) + + position.position++ // skip past " after removing whitespace + + // 2. Set filename to the result of parsing a multipart/form-data name given + // input and position, if the result is not failure. Otherwise, return failure. + filename = parseMultipartFormDataName(input, position) + } } } @@ -367,7 +390,7 @@ function parseMultipartFormDataHeaders (input, position) { // 2.9. If position does not point to a sequence of bytes starting with 0x0D 0x0A // (CR LF), return failure. Otherwise, advance position by 2 (past the newline). if (input[position.position] !== 0x0d && input[position.position + 1] !== 0x0a) { - return 'failure' + throw parsingError('expected CRLF') } else { position.position += 2 } @@ -393,7 +416,7 @@ function parseMultipartFormDataName (input, position) { // 3. If the byte at position is not 0x22 ("), return failure. Otherwise, advance position by 1. if (input[position.position] !== 0x22) { - return null // name could be 'failure' + throw parsingError('expected "') } else { position.position++ } @@ -468,6 +491,10 @@ function bufferStartsWith (buffer, start, position) { return true } +function parsingError (cause) { + return new TypeError('Failed to parse body as FormData.', { cause: new TypeError(cause) }) +} + module.exports = { multipartFormDataParser, validateBoundary diff --git a/node_modules/cheerio/node_modules/undici/lib/web/fetch/formdata.js b/node_modules/undici/lib/web/fetch/formdata.js similarity index 68% rename from node_modules/cheerio/node_modules/undici/lib/web/fetch/formdata.js rename to node_modules/undici/lib/web/fetch/formdata.js index 544e412..8020a26 100644 --- a/node_modules/cheerio/node_modules/undici/lib/web/fetch/formdata.js +++ b/node_modules/undici/lib/web/fetch/formdata.js @@ -1,9 +1,7 @@ 'use strict' -const { isBlobLike, iteratorMixin } = require('./util') -const { kState } = require('./symbols') +const { iteratorMixin } = require('./util') const { kEnumerableProperty } = require('../../core/util') -const { FileLike, isFileLike } = require('./file') const { webidl } = require('./webidl') const { File: NativeFile } = require('node:buffer') const nodeUtil = require('node:util') @@ -13,6 +11,8 @@ const File = globalThis.File ?? NativeFile // https://xhr.spec.whatwg.org/#formdata class FormData { + #state = [] + constructor (form) { webidl.util.markAsUncloneable(this) @@ -23,8 +23,6 @@ class FormData { types: ['undefined'] }) } - - this[kState] = [] } append (name, value, filename = undefined) { @@ -33,28 +31,26 @@ class FormData { const prefix = 'FormData.append' webidl.argumentLengthCheck(arguments, 2, prefix) - if (arguments.length === 3 && !isBlobLike(value)) { - throw new TypeError( - "Failed to execute 'append' on 'FormData': parameter 2 is not of type 'Blob'" - ) + name = webidl.converters.USVString(name) + + if (arguments.length === 3 || webidl.is.Blob(value)) { + value = webidl.converters.Blob(value, prefix, 'value') + + if (filename !== undefined) { + filename = webidl.converters.USVString(filename) + } + } else { + value = webidl.converters.USVString(value) } // 1. Let value be value if given; otherwise blobValue. - name = webidl.converters.USVString(name, prefix, 'name') - value = isBlobLike(value) - ? webidl.converters.Blob(value, prefix, 'value', { strict: false }) - : webidl.converters.USVString(value, prefix, 'value') - filename = arguments.length === 3 - ? webidl.converters.USVString(filename, prefix, '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) + this.#state.push(entry) } delete (name) { @@ -63,11 +59,11 @@ class FormData { const prefix = 'FormData.delete' webidl.argumentLengthCheck(arguments, 1, prefix) - name = webidl.converters.USVString(name, prefix, 'name') + 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) + this.#state = this.#state.filter(entry => entry.name !== name) } get (name) { @@ -76,18 +72,18 @@ class FormData { const prefix = 'FormData.get' webidl.argumentLengthCheck(arguments, 1, prefix) - name = webidl.converters.USVString(name, prefix, 'name') + 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) + const idx = this.#state.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 + return this.#state[idx].value } getAll (name) { @@ -96,13 +92,13 @@ class FormData { const prefix = 'FormData.getAll' webidl.argumentLengthCheck(arguments, 1, prefix) - name = webidl.converters.USVString(name, prefix, 'name') + 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] + return this.#state .filter((entry) => entry.name === name) .map((entry) => entry.value) } @@ -113,11 +109,11 @@ class FormData { const prefix = 'FormData.has' webidl.argumentLengthCheck(arguments, 1, prefix) - name = webidl.converters.USVString(name, prefix, 'name') + 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 + return this.#state.findIndex((entry) => entry.name === name) !== -1 } set (name, value, filename = undefined) { @@ -126,10 +122,16 @@ class FormData { const prefix = 'FormData.set' webidl.argumentLengthCheck(arguments, 2, prefix) - if (arguments.length === 3 && !isBlobLike(value)) { - throw new TypeError( - "Failed to execute 'set' on 'FormData': parameter 2 is not of type 'Blob'" - ) + name = webidl.converters.USVString(name) + + if (arguments.length === 3 || webidl.is.Blob(value)) { + value = webidl.converters.Blob(value, prefix, 'value') + + if (filename !== undefined) { + filename = webidl.converters.USVString(filename) + } + } else { + value = webidl.converters.USVString(value) } // The set(name, value) and set(name, blobValue, filename) method steps @@ -137,35 +139,27 @@ class FormData { // 1. Let value be value if given; otherwise blobValue. - name = webidl.converters.USVString(name, prefix, 'name') - value = isBlobLike(value) - ? webidl.converters.Blob(value, prefix, 'name', { strict: false }) - : webidl.converters.USVString(value, prefix, 'name') - filename = arguments.length === 3 - ? webidl.converters.USVString(filename, prefix, 'name') - : 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) + const idx = this.#state.findIndex((entry) => entry.name === name) if (idx !== -1) { - this[kState] = [ - ...this[kState].slice(0, idx), + this.#state = [ + ...this.#state.slice(0, idx), entry, - ...this[kState].slice(idx + 1).filter((entry) => entry.name !== name) + ...this.#state.slice(idx + 1).filter((entry) => entry.name !== name) ] } else { // 4. Otherwise, append entry to this’s entry list. - this[kState].push(entry) + this.#state.push(entry) } } [nodeUtil.inspect.custom] (depth, options) { - const state = this[kState].reduce((a, b) => { + const state = this.#state.reduce((a, b) => { if (a[b.name]) { if (Array.isArray(a[b.name])) { a[b.name].push(b.value) @@ -187,9 +181,28 @@ class FormData { // remove [Object null prototype] return `FormData ${output.slice(output.indexOf(']') + 2)}` } + + /** + * @param {FormData} formData + */ + static getFormDataState (formData) { + return formData.#state + } + + /** + * @param {FormData} formData + * @param {any[]} newState + */ + static setFormDataState (formData, newState) { + formData.#state = newState + } } -iteratorMixin('FormData', FormData, kState, 'name', 'value') +const { getFormDataState, setFormDataState } = FormData +Reflect.deleteProperty(FormData, 'getFormDataState') +Reflect.deleteProperty(FormData, 'setFormDataState') + +iteratorMixin('FormData', FormData, getFormDataState, 'name', 'value') Object.defineProperties(FormData.prototype, { append: kEnumerableProperty, @@ -224,10 +237,8 @@ function makeEntry (name, value, filename) { // 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 }) + if (!webidl.is.File(value)) { + value = new File([value], 'blob', { type: value.type }) } // 2. If filename is given, then set value to a new File object, @@ -239,9 +250,7 @@ function makeEntry (name, value, filename) { lastModified: value.lastModified } - value = value instanceof NativeFile - ? new File([value], filename, options) - : new FileLike(value, filename, options) + value = new File([value], filename, options) } } @@ -249,4 +258,6 @@ function makeEntry (name, value, filename) { return { name, value } } -module.exports = { FormData, makeEntry } +webidl.is.FormData = webidl.util.MakeTypeAssertion(FormData) + +module.exports = { FormData, makeEntry, setFormDataState } diff --git a/node_modules/cheerio/node_modules/undici/lib/web/fetch/global.js b/node_modules/undici/lib/web/fetch/global.js similarity index 100% rename from node_modules/cheerio/node_modules/undici/lib/web/fetch/global.js rename to node_modules/undici/lib/web/fetch/global.js diff --git a/node_modules/cheerio/node_modules/undici/lib/web/fetch/headers.js b/node_modules/undici/lib/web/fetch/headers.js similarity index 82% rename from node_modules/cheerio/node_modules/undici/lib/web/fetch/headers.js rename to node_modules/undici/lib/web/fetch/headers.js index a68daf4..d782d2a 100644 --- a/node_modules/cheerio/node_modules/undici/lib/web/fetch/headers.js +++ b/node_modules/undici/lib/web/fetch/headers.js @@ -13,19 +13,18 @@ const { webidl } = require('./webidl') const assert = require('node:assert') const util = require('node:util') -const kHeadersMap = Symbol('headers map') -const kHeadersSortedMap = Symbol('headers map sorted') - /** * @param {number} code + * @returns {code is (0x0a | 0x0d | 0x09 | 0x20)} */ function isHTTPWhiteSpaceCharCode (code) { - return code === 0x00a || code === 0x00d || code === 0x009 || code === 0x020 + return code === 0x0a || code === 0x0d || code === 0x09 || code === 0x20 } /** * @see https://fetch.spec.whatwg.org/#concept-header-value-normalize * @param {string} potentialValue + * @returns {string} */ function headerValueNormalize (potentialValue) { // To normalize a byte sequence potentialValue, remove @@ -39,6 +38,10 @@ function headerValueNormalize (potentialValue) { return i === 0 && j === potentialValue.length ? potentialValue : potentialValue.substring(i, j) } +/** + * @param {Headers} headers + * @param {Array|Object} object + */ function fill (headers, object) { // To fill a Headers object headers with a given object object, run these steps: @@ -78,6 +81,9 @@ function fill (headers, object) { /** * @see https://fetch.spec.whatwg.org/#concept-headers-append + * @param {Headers} headers + * @param {string} name + * @param {string} value */ function appendHeader (headers, name, value) { // 1. Normalize value. @@ -119,6 +125,67 @@ function appendHeader (headers, name, value) { // privileged no-CORS request headers from headers } +// https://fetch.spec.whatwg.org/#concept-header-list-sort-and-combine +/** + * @param {Headers} target + */ +function headersListSortAndCombine (target) { + const headersList = getHeadersList(target) + + if (!headersList) { + return [] + } + + if (headersList.sortedMap) { + return headersList.sortedMap + } + + // 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 = headersList.toSortedArray() + + const cookies = headersList.cookies + + // fast-path + if (cookies === null || cookies.length === 1) { + // Note: The non-null assertion of value has already been done by `HeadersList#toSortedArray` + return (headersList.sortedMap = names) + } + + // 3. For each name of names: + for (let i = 0; i < names.length; ++i) { + const { 0: name, 1: value } = names[i] + // 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 (let j = 0; j < cookies.length; ++j) { + headers.push([name, cookies[j]]) + } + } else { + // 2. Otherwise: + + // 1. Let value be the result of getting name from list. + + // 2. Assert: value is non-null. + // Note: This operation was done by `HeadersList#toSortedArray`. + + // 3. Append (name, value) to headers. + headers.push([name, value]) + } + } + + // 4. Return headers. + return (headersList.sortedMap = headers) +} + function compareHeaderName (a, b) { return a[0] < b[0] ? -1 : 1 } @@ -127,14 +194,17 @@ class HeadersList { /** @type {[string, string][]|null} */ cookies = null + sortedMap + headersMap + constructor (init) { if (init instanceof HeadersList) { - this[kHeadersMap] = new Map(init[kHeadersMap]) - this[kHeadersSortedMap] = init[kHeadersSortedMap] + this.headersMap = new Map(init.headersMap) + this.sortedMap = init.sortedMap this.cookies = init.cookies === null ? null : [...init.cookies] } else { - this[kHeadersMap] = new Map(init) - this[kHeadersSortedMap] = null + this.headersMap = new Map(init) + this.sortedMap = null } } @@ -148,12 +218,12 @@ class HeadersList { // contains a header whose name is a byte-case-insensitive // match for name. - return this[kHeadersMap].has(isLowerCase ? name : name.toLowerCase()) + return this.headersMap.has(isLowerCase ? name : name.toLowerCase()) } clear () { - this[kHeadersMap].clear() - this[kHeadersSortedMap] = null + this.headersMap.clear() + this.sortedMap = null this.cookies = null } @@ -164,22 +234,22 @@ class HeadersList { * @param {boolean} isLowerCase */ append (name, value, isLowerCase) { - this[kHeadersSortedMap] = null + this.sortedMap = null // 1. If list contains name, then set name to the first such // header’s name. const lowercaseName = isLowerCase ? name : name.toLowerCase() - const exists = this[kHeadersMap].get(lowercaseName) + const exists = this.headersMap.get(lowercaseName) // 2. Append (name, value) to list. if (exists) { const delimiter = lowercaseName === 'cookie' ? '; ' : ', ' - this[kHeadersMap].set(lowercaseName, { + this.headersMap.set(lowercaseName, { name: exists.name, value: `${exists.value}${delimiter}${value}` }) } else { - this[kHeadersMap].set(lowercaseName, { name, value }) + this.headersMap.set(lowercaseName, { name, value }) } if (lowercaseName === 'set-cookie') { @@ -194,7 +264,7 @@ class HeadersList { * @param {boolean} isLowerCase */ set (name, value, isLowerCase) { - this[kHeadersSortedMap] = null + this.sortedMap = null const lowercaseName = isLowerCase ? name : name.toLowerCase() if (lowercaseName === 'set-cookie') { @@ -205,7 +275,7 @@ class HeadersList { // the first such header to value and remove the // others. // 2. Otherwise, append header (name, value) to list. - this[kHeadersMap].set(lowercaseName, { name, value }) + this.headersMap.set(lowercaseName, { name, value }) } /** @@ -214,14 +284,14 @@ class HeadersList { * @param {boolean} isLowerCase */ delete (name, isLowerCase) { - this[kHeadersSortedMap] = null + this.sortedMap = null if (!isLowerCase) name = name.toLowerCase() if (name === 'set-cookie') { this.cookies = null } - this[kHeadersMap].delete(name) + this.headersMap.delete(name) } /** @@ -235,12 +305,12 @@ class HeadersList { // 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(isLowerCase ? name : name.toLowerCase())?.value ?? null + return this.headersMap.get(isLowerCase ? name : name.toLowerCase())?.value ?? null } * [Symbol.iterator] () { // use the lowercased name - for (const { 0: name, 1: { value } } of this[kHeadersMap]) { + for (const { 0: name, 1: { value } } of this.headersMap) { yield [name, value] } } @@ -248,8 +318,8 @@ class HeadersList { get entries () { const headers = {} - if (this[kHeadersMap].size !== 0) { - for (const { name, value } of this[kHeadersMap].values()) { + if (this.headersMap.size !== 0) { + for (const { name, value } of this.headersMap.values()) { headers[name] = value } } @@ -258,14 +328,14 @@ class HeadersList { } rawValues () { - return this[kHeadersMap].values() + return this.headersMap.values() } get entriesList () { const headers = [] - if (this[kHeadersMap].size !== 0) { - for (const { 0: lowerName, 1: { name, value } } of this[kHeadersMap]) { + if (this.headersMap.size !== 0) { + for (const { 0: lowerName, 1: { name, value } } of this.headersMap) { if (lowerName === 'set-cookie') { for (const cookie of this.cookies) { headers.push([name, cookie]) @@ -281,7 +351,7 @@ class HeadersList { // https://fetch.spec.whatwg.org/#convert-header-names-to-a-sorted-lowercase-set toSortedArray () { - const size = this[kHeadersMap].size + const size = this.headersMap.size const array = new Array(size) // In most cases, you will use the fast-path. // fast-path: Use binary insertion sort for small arrays. @@ -292,7 +362,7 @@ class HeadersList { } // Improve performance by unrolling loop and avoiding double-loop. // Double-loop-less version of the binary insertion sort. - const iterator = this[kHeadersMap][Symbol.iterator]() + const iterator = this.headersMap[Symbol.iterator]() const firstValue = iterator.next().value // set [name, value] to first index. array[0] = [firstValue[0], firstValue[1].value] @@ -342,7 +412,7 @@ class HeadersList { // This case would be a rare occurrence. // slow-path: fallback let i = 0 - for (const { 0: name, 1: { value } } of this[kHeadersMap]) { + for (const { 0: name, 1: { value } } of this.headersMap) { array[i++] = [name, value] // https://fetch.spec.whatwg.org/#concept-header-list-sort-and-combine // 3.2.2. Assert: value is non-null. @@ -356,8 +426,15 @@ class HeadersList { // https://fetch.spec.whatwg.org/#headers-class class Headers { #guard + /** + * @type {HeadersList} + */ #headersList + /** + * @param {HeadersInit|Symbol} [init] + * @returns + */ constructor (init = undefined) { webidl.util.markAsUncloneable(this) @@ -374,7 +451,7 @@ class Headers { // 2. If init is given, then fill this with init. if (init !== undefined) { - init = webidl.converters.HeadersInit(init, 'Headers contructor', 'init') + init = webidl.converters.HeadersInit(init, 'Headers constructor', 'init') fill(this, init) } } @@ -547,58 +624,6 @@ class Headers { return [] } - // https://fetch.spec.whatwg.org/#concept-header-list-sort-and-combine - get [kHeadersSortedMap] () { - if (this.#headersList[kHeadersSortedMap]) { - return this.#headersList[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.#headersList.toSortedArray() - - const cookies = this.#headersList.cookies - - // fast-path - if (cookies === null || cookies.length === 1) { - // Note: The non-null assertion of value has already been done by `HeadersList#toSortedArray` - return (this.#headersList[kHeadersSortedMap] = names) - } - - // 3. For each name of names: - for (let i = 0; i < names.length; ++i) { - const { 0: name, 1: value } = names[i] - // 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 (let j = 0; j < cookies.length; ++j) { - headers.push([name, cookies[j]]) - } - } else { - // 2. Otherwise: - - // 1. Let value be the result of getting name from list. - - // 2. Assert: value is non-null. - // Note: This operation was done by `HeadersList#toSortedArray`. - - // 3. Append (name, value) to headers. - headers.push([name, value]) - } - } - - // 4. Return headers. - return (this.#headersList[kHeadersSortedMap] = headers) - } - [util.inspect.custom] (depth, options) { options.depth ??= depth @@ -613,12 +638,19 @@ class Headers { o.#guard = guard } + /** + * @param {Headers} o + */ static getHeadersList (o) { return o.#headersList } - static setHeadersList (o, list) { - o.#headersList = list + /** + * @param {Headers} target + * @param {HeadersList} list + */ + static setHeadersList (target, list) { + target.#headersList = list } } @@ -628,7 +660,7 @@ Reflect.deleteProperty(Headers, 'setHeadersGuard') Reflect.deleteProperty(Headers, 'getHeadersList') Reflect.deleteProperty(Headers, 'setHeadersList') -iteratorMixin('Headers', Headers, kHeadersSortedMap, 0, 1) +iteratorMixin('Headers', Headers, headersListSortAndCombine, 0, 1) Object.defineProperties(Headers.prototype, { append: kEnumerableProperty, @@ -647,7 +679,7 @@ Object.defineProperties(Headers.prototype, { }) webidl.converters.HeadersInit = function (V, prefix, argument) { - if (webidl.util.Type(V) === 'Object') { + if (webidl.util.Type(V) === webidl.util.Types.OBJECT) { const iterator = Reflect.get(V, Symbol.iterator) // A work-around to ensure we send the properly-cased Headers when V is a Headers object. diff --git a/node_modules/cheerio/node_modules/undici/lib/web/fetch/index.js b/node_modules/undici/lib/web/fetch/index.js similarity index 96% rename from node_modules/cheerio/node_modules/undici/lib/web/fetch/index.js rename to node_modules/undici/lib/web/fetch/index.js index b74ccf9..645fa19 100644 --- a/node_modules/cheerio/node_modules/undici/lib/web/fetch/index.js +++ b/node_modules/undici/lib/web/fetch/index.js @@ -7,10 +7,11 @@ const { makeAppropriateNetworkError, filterResponse, makeResponse, - fromInnerResponse + fromInnerResponse, + getResponseState } = require('./response') const { HeadersList } = require('./headers') -const { Request, cloneRequest } = require('./request') +const { Request, cloneRequest, getRequestDispatcher, getRequestState } = require('./request') const zlib = require('node:zlib') const { bytesMatch, @@ -30,7 +31,6 @@ const { determineRequestsReferrer, coarsenedSharedCurrentTime, createDeferredPromise, - isBlobLike, sameOrigin, isCancelled, isAborted, @@ -47,7 +47,6 @@ const { createInflate, extractMimeType } = require('./util') -const { kState, kDispatcher } = require('./symbols') const assert = require('node:assert') const { safelyExtractBody, extractBody } = require('./body') const { @@ -58,8 +57,8 @@ const { subresourceSet } = require('./constants') const EE = require('node:events') -const { Readable, pipeline, finished } = require('node:stream') -const { addAbortListener, isErrored, isReadable, bufferToLowerCasedHeaderName } = require('../../core/util') +const { Readable, pipeline, finished, isErrored, isReadable } = require('node:stream') +const { addAbortListener, bufferToLowerCasedHeaderName } = require('../../core/util') const { dataURLProcessor, serializeAMimeType, minimizeSupportedMimeType } = require('./data-url') const { getGlobalDispatcher } = require('../../global') const { webidl } = require('./webidl') @@ -144,7 +143,7 @@ function fetch (input, init = undefined) { } // 3. Let request be requestObject’s request. - const request = requestObject[kState] + const request = getRequestState(requestObject) // 4. If requestObject’s signal’s aborted flag is set, then: if (requestObject.signal.aborted) { @@ -244,7 +243,7 @@ function fetch (input, init = undefined) { request, processResponseEndOfBody: handleFetchDone, processResponse, - dispatcher: requestObject[kDispatcher] // undici + dispatcher: getRequestDispatcher(requestObject) // undici }) // 14. Return p. @@ -310,7 +309,9 @@ function finalizeAndReportTiming (response, initiatorType = 'other') { originalURL.href, initiatorType, globalThis, - cacheState + cacheState, + '', // bodyType + response.status ) } @@ -327,7 +328,7 @@ function abortFetch (p, request, responseObject, 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)) { + if (request.body?.stream != null && isReadable(request.body.stream)) { request.body.stream.cancel(error).catch((err) => { if (err.code === 'ERR_INVALID_STATE') { // Node bug? @@ -343,11 +344,11 @@ function abortFetch (p, request, responseObject, error) { } // 4. Let response be responseObject’s response. - const response = responseObject[kState] + const response = getResponseState(responseObject) // 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)) { + if (response.body?.stream != null && isReadable(response.body.stream)) { response.body.stream.cancel(error).catch((err) => { if (err.code === 'ERR_INVALID_STATE') { // Node bug? @@ -572,53 +573,46 @@ async function mainFetch (fetchParams, recursive = false) { // 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) + 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' - 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. + response = await schemeFetch(fetchParams) - // 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' - ) - } + // request’s mode is "same-origin" + } else if (request.mode === 'same-origin') { + // 1. Return a network error. + response = makeNetworkError('request mode cannot be "same-origin"') + // request’s mode is "no-cors" + } else if (request.mode === 'no-cors') { + // 1. If request’s redirect mode is not "follow", then return a network + // error. + if (request.redirect !== 'follow') { + response = makeNetworkError( + 'redirect mode cannot be "follow" for "no-cors" request' + ) + } else { // 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') + response = await schemeFetch(fetchParams) } + // request’s current URL’s scheme is not an HTTP(S) scheme + } else if (!urlIsHttpHttpsScheme(requestCurrentURL(request))) { + // Return a network error. + response = 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 @@ -632,13 +626,14 @@ async function mainFetch (fetchParams, recursive = false) { // 4. Return corsWithPreflightResponse. // TODO - // Otherwise + // Otherwise + } else { // 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) - })() + response = await httpFetch(fetchParams) + } } // 12. If recursive is true, then return response. @@ -810,7 +805,7 @@ function schemeFetch (fetchParams) { // 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(blob)) { + if (request.method !== 'GET' || !webidl.is.Blob(blob)) { return Promise.resolve(makeNetworkError('invalid method')) } @@ -1001,7 +996,7 @@ function fetchFinale (fetchParams, response) { // 3. Set fetchParams’s controller’s report timing steps to the following steps given a global object global: fetchParams.controller.reportTimingSteps = () => { // 1. If fetchParams’s request’s URL’s scheme is not an HTTP(S) scheme, then return. - if (fetchParams.request.url.protocol !== 'https:') { + if (!urlIsHttpHttpsScheme(fetchParams.request.url)) { return } @@ -1043,7 +1038,6 @@ function fetchFinale (fetchParams, response) { // fetchParams’s request’s URL, fetchParams’s request’s initiator type, global, cacheState, bodyInfo, // and responseStatus. if (fetchParams.request.initiatorType != null) { - // TODO: update markresourcetiming markResourceTiming(timingInfo, fetchParams.request.url.href, fetchParams.request.initiatorType, globalThis, cacheState, bodyInfo, responseStatus) } } @@ -1446,7 +1440,7 @@ async function httpNetworkOrCacheFetch ( // 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) { + if (webidl.is.URL(httpRequest.referrer)) { httpRequest.headersList.append('referer', isomorphicEncode(httpRequest.referrer.href), true) } @@ -1460,7 +1454,7 @@ async function httpNetworkOrCacheFetch ( // user agents should append `User-Agent`/default `User-Agent` value to // httpRequest’s header list. if (!httpRequest.headersList.contains('user-agent', true)) { - httpRequest.headersList.append('user-agent', defaultUserAgent) + httpRequest.headersList.append('user-agent', defaultUserAgent, true) } // 15. If httpRequest’s cache mode is "default" and httpRequest’s header @@ -1888,8 +1882,8 @@ async function httpNetworkFetch ( // 11. Let pullAlgorithm be an action that resumes the ongoing fetch // if it is suspended. - const pullAlgorithm = async () => { - await fetchParams.controller.resume() + const pullAlgorithm = () => { + return fetchParams.controller.resume() } // 12. Let cancelAlgorithm be an algorithm that aborts fetchParams’s @@ -1950,8 +1944,10 @@ async function httpNetworkFetch ( // 19. Run these steps in parallel: // 1. Run these steps, but abort when fetchParams is canceled: - fetchParams.controller.onAborted = onAborted - fetchParams.controller.on('terminated', onAborted) + if (!fetchParams.controller.resume) { + fetchParams.controller.on('terminated', onAborted) + } + fetchParams.controller.resume = async () => { // 1. While true while (true) { @@ -2212,10 +2208,6 @@ async function httpNetworkFetch ( fetchParams.controller.off('terminated', this.abort) } - if (fetchParams.controller.onAborted) { - fetchParams.controller.off('terminated', fetchParams.controller.onAborted) - } - fetchParams.controller.ended = true this.body.push(null) diff --git a/node_modules/cheerio/node_modules/undici/lib/web/fetch/request.js b/node_modules/undici/lib/web/fetch/request.js similarity index 86% rename from node_modules/cheerio/node_modules/undici/lib/web/fetch/request.js rename to node_modules/undici/lib/web/fetch/request.js index ee3ce48..82a4191 100644 --- a/node_modules/cheerio/node_modules/undici/lib/web/fetch/request.js +++ b/node_modules/undici/lib/web/fetch/request.js @@ -23,12 +23,11 @@ const { requestDuplex } = require('./constants') const { kEnumerableProperty, normalizedMethodRecordsBase, normalizedMethodRecords } = util -const { kHeaders, kSignal, kState, kDispatcher } = require('./symbols') const { webidl } = require('./webidl') const { URLSerializer } = require('./data-url') const { kConstruct } = require('../../core/symbols') const assert = require('node:assert') -const { getMaxListeners, setMaxListeners, getEventListeners, defaultMaxListeners } = require('node:events') +const { getMaxListeners, setMaxListeners, defaultMaxListeners } = require('node:events') const kAbortController = Symbol('abortController') @@ -38,6 +37,14 @@ const requestFinalizer = new FinalizationRegistry(({ signal, abort }) => { const dependentControllerMap = new WeakMap() +let abortSignalHasEventHandlerLeakWarning + +try { + abortSignalHasEventHandlerLeakWarning = getMaxListeners(new AbortController().signal) > 0 +} catch { + abortSignalHasEventHandlerLeakWarning = false +} + function buildAbort (acRef) { return abort @@ -80,9 +87,21 @@ let patchMethodWarning = false // https://fetch.spec.whatwg.org/#request-class class Request { + /** @type {AbortSignal} */ + #signal + + /** @type {import('../../dispatcher/dispatcher')} */ + #dispatcher + + /** @type {Headers} */ + #headers + + #state + // https://fetch.spec.whatwg.org/#dom-request - constructor (input, init = {}) { + constructor (input, init = undefined) { webidl.util.markAsUncloneable(this) + if (input === kConstruct) { return } @@ -107,7 +126,7 @@ class Request { // 5. If input is a string, then: if (typeof input === 'string') { - this[kDispatcher] = init.dispatcher + this.#dispatcher = init.dispatcher // 1. Let parsedURL be the result of parsing input with baseURL. // 2. If parsedURL is failure, then throw a TypeError. @@ -132,18 +151,18 @@ class Request { // 5. Set fallbackMode to "cors". fallbackMode = 'cors' } else { - this[kDispatcher] = init.dispatcher || input[kDispatcher] - // 6. Otherwise: // 7. Assert: input is a Request object. - assert(input instanceof Request) + assert(webidl.is.Request(input)) // 8. Set request to input’s request. - request = input[kState] + request = input.#state // 9. Set signal to input’s signal. - signal = input[kSignal] + signal = input.#signal + + this.#dispatcher = init.dispatcher || input.#dispatcher } // 7. Let origin be this’s relevant settings object’s origin. @@ -390,27 +409,17 @@ class Request { } // 27. Set this’s request to request. - this[kState] = request + this.#state = request // 28. Set this’s signal to a new AbortSignal object with this’s relevant // Realm. // TODO: could this be simplified with AbortSignal.any // (https://dom.spec.whatwg.org/#dom-abortsignal-any) const ac = new AbortController() - this[kSignal] = ac.signal + this.#signal = ac.signal // 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 { @@ -423,17 +432,10 @@ class Request { const acRef = new WeakRef(ac) const abort = buildAbort(acRef) - // 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(1500, signal) - } else if (getEventListeners(signal, 'abort').length >= defaultMaxListeners) { - setMaxListeners(1500, signal) - } - } catch {} + // If the max amount of listeners is equal to the default, increase it + if (abortSignalHasEventHandlerLeakWarning && getMaxListeners(signal) === defaultMaxListeners) { + setMaxListeners(1500, signal) + } util.addAbortListener(signal, abort) // The third argument must be a registry key to be unregistered. @@ -447,9 +449,9 @@ class Request { // 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(kConstruct) - setHeadersList(this[kHeaders], request.headersList) - setHeadersGuard(this[kHeaders], 'request') + this.#headers = new Headers(kConstruct) + setHeadersList(this.#headers, request.headersList) + setHeadersGuard(this.#headers, 'request') // 31. If this’s request’s mode is "no-cors", then: if (mode === 'no-cors') { @@ -462,13 +464,13 @@ class Request { } // 2. Set this’s headers’s guard to "request-no-cors". - setHeadersGuard(this[kHeaders], 'request-no-cors') + setHeadersGuard(this.#headers, 'request-no-cors') } // 32. If init is not empty, then: if (initHasKey) { /** @type {HeadersList} */ - const headersList = getHeadersList(this[kHeaders]) + const headersList = getHeadersList(this.#headers) // 1. Let headers be a copy of this’s headers and its associated header // list. // 2. If init["headers"] exists, then set headers to init["headers"]. @@ -487,13 +489,13 @@ class Request { headersList.cookies = headers.cookies } else { // 5. Otherwise, fill this’s headers with headers. - fillHeaders(this[kHeaders], headers) + fillHeaders(this.#headers, 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 + const inputBody = webidl.is.Request(input) ? input.#state.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 @@ -522,8 +524,8 @@ class Request { // 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 && !getHeadersList(this[kHeaders]).contains('content-type', true)) { - this[kHeaders].append('content-type', contentType) + if (contentType && !getHeadersList(this.#headers).contains('content-type', true)) { + this.#headers.append('content-type', contentType, true) } } @@ -558,7 +560,7 @@ class Request { // 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 (bodyUnusable(input)) { + if (bodyUnusable(input.#state)) { throw new TypeError( 'Cannot construct a Request with a Request object that has already been used.' ) @@ -576,7 +578,7 @@ class Request { } // 41. Set this’s request’s body to finalBody. - this[kState].body = finalBody + this.#state.body = finalBody } // Returns request’s HTTP method, which is "GET" by default. @@ -584,7 +586,7 @@ class Request { webidl.brandCheck(this, Request) // The method getter steps are to return this’s request’s method. - return this[kState].method + return this.#state.method } // Returns the URL of request as a string. @@ -592,7 +594,7 @@ class Request { webidl.brandCheck(this, Request) // The url getter steps are to return this’s request’s URL, serialized. - return URLSerializer(this[kState].url) + return URLSerializer(this.#state.url) } // Returns a Headers object consisting of the headers associated with request. @@ -602,7 +604,7 @@ class Request { webidl.brandCheck(this, Request) // The headers getter steps are to return this’s headers. - return this[kHeaders] + return this.#headers } // Returns the kind of resource requested by request, e.g., "document" @@ -611,7 +613,7 @@ class Request { webidl.brandCheck(this, Request) // The destination getter are to return this’s request’s destination. - return this[kState].destination + return this.#state.destination } // Returns the referrer of request. Its value can be a same-origin URL if @@ -624,18 +626,18 @@ class Request { // 1. If this’s request’s referrer is "no-referrer", then return the // empty string. - if (this[kState].referrer === 'no-referrer') { + if (this.#state.referrer === 'no-referrer') { return '' } // 2. If this’s request’s referrer is "client", then return // "about:client". - if (this[kState].referrer === 'client') { + if (this.#state.referrer === 'client') { return 'about:client' } // Return this’s request’s referrer, serialized. - return this[kState].referrer.toString() + return this.#state.referrer.toString() } // Returns the referrer policy associated with request. @@ -645,7 +647,7 @@ class Request { webidl.brandCheck(this, Request) // The referrerPolicy getter steps are to return this’s request’s referrer policy. - return this[kState].referrerPolicy + return this.#state.referrerPolicy } // Returns the mode associated with request, which is a string indicating @@ -655,15 +657,17 @@ class Request { webidl.brandCheck(this, Request) // The mode getter steps are to return this’s request’s mode. - return this[kState].mode + return this.#state.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 () { + webidl.brandCheck(this, Request) + // The credentials getter steps are to return this’s request’s credentials mode. - return this[kState].credentials + return this.#state.credentials } // Returns the cache mode associated with request, @@ -673,7 +677,7 @@ class Request { webidl.brandCheck(this, Request) // The cache getter steps are to return this’s request’s cache mode. - return this[kState].cache + return this.#state.cache } // Returns the redirect mode associated with request, @@ -684,7 +688,7 @@ class Request { webidl.brandCheck(this, Request) // The redirect getter steps are to return this’s request’s redirect mode. - return this[kState].redirect + return this.#state.redirect } // Returns request’s subresource integrity metadata, which is a @@ -695,7 +699,7 @@ class Request { // The integrity getter steps are to return this’s request’s integrity // metadata. - return this[kState].integrity + return this.#state.integrity } // Returns a boolean indicating whether or not request can outlive the @@ -704,7 +708,7 @@ class Request { webidl.brandCheck(this, Request) // The keepalive getter steps are to return this’s request’s keepalive. - return this[kState].keepalive + return this.#state.keepalive } // Returns a boolean indicating whether or not request is for a reload @@ -714,7 +718,7 @@ class 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 + return this.#state.reloadNavigation } // Returns a boolean indicating whether or not request is for a history @@ -724,7 +728,7 @@ class 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 + return this.#state.historyNavigation } // Returns the signal associated with request, which is an AbortSignal @@ -734,19 +738,19 @@ class Request { webidl.brandCheck(this, Request) // The signal getter steps are to return this’s signal. - return this[kSignal] + return this.#signal } get body () { webidl.brandCheck(this, Request) - return this[kState].body ? this[kState].body.stream : null + return this.#state.body ? this.#state.body.stream : null } get bodyUsed () { webidl.brandCheck(this, Request) - return !!this[kState].body && util.isDisturbed(this[kState].body.stream) + return !!this.#state.body && util.isDisturbed(this.#state.body.stream) } get duplex () { @@ -760,12 +764,12 @@ class Request { webidl.brandCheck(this, Request) // 1. If this is unusable, then throw a TypeError. - if (bodyUnusable(this)) { + if (bodyUnusable(this.#state)) { throw new TypeError('unusable') } // 2. Let clonedRequest be the result of cloning this’s request. - const clonedRequest = cloneRequest(this[kState]) + const clonedRequest = cloneRequest(this.#state) // 3. Let clonedRequestObject be the result of creating a Request object, // given clonedRequest, this’s headers’s guard, and this’s relevant Realm. @@ -788,7 +792,7 @@ class Request { } // 4. Return clonedRequestObject. - return fromInnerRequest(clonedRequest, ac.signal, getHeadersGuard(this[kHeaders])) + return fromInnerRequest(clonedRequest, this.#dispatcher, ac.signal, getHeadersGuard(this.#headers)) } [nodeUtil.inspect.custom] (depth, options) { @@ -818,9 +822,64 @@ class Request { return `Request ${nodeUtil.formatWithOptions(options, properties)}` } + + /** + * @param {Request} request + * @param {AbortSignal} newSignal + */ + static setRequestSignal (request, newSignal) { + request.#signal = newSignal + return request + } + + /** + * @param {Request} request + */ + static getRequestDispatcher (request) { + return request.#dispatcher + } + + /** + * @param {Request} request + * @param {import('../../dispatcher/dispatcher')} newDispatcher + */ + static setRequestDispatcher (request, newDispatcher) { + request.#dispatcher = newDispatcher + } + + /** + * @param {Request} request + * @param {Headers} newHeaders + */ + static setRequestHeaders (request, newHeaders) { + request.#headers = newHeaders + } + + /** + * @param {Request} request + */ + static getRequestState (request) { + return request.#state + } + + /** + * @param {Request} request + * @param {any} newState + */ + static setRequestState (request, newState) { + request.#state = newState + } } -mixinBody(Request) +const { setRequestSignal, getRequestDispatcher, setRequestDispatcher, setRequestHeaders, getRequestState, setRequestState } = Request +Reflect.deleteProperty(Request, 'setRequestSignal') +Reflect.deleteProperty(Request, 'getRequestDispatcher') +Reflect.deleteProperty(Request, 'setRequestDispatcher') +Reflect.deleteProperty(Request, 'setRequestHeaders') +Reflect.deleteProperty(Request, 'getRequestState') +Reflect.deleteProperty(Request, 'setRequestState') + +mixinBody(Request, getRequestState) // https://fetch.spec.whatwg.org/#requests function makeRequest (init) { @@ -888,17 +947,20 @@ function cloneRequest (request) { /** * @see https://fetch.spec.whatwg.org/#request-create * @param {any} innerRequest + * @param {import('../../dispatcher/agent')} dispatcher * @param {AbortSignal} signal * @param {'request' | 'immutable' | 'request-no-cors' | 'response' | 'none'} guard * @returns {Request} */ -function fromInnerRequest (innerRequest, signal, guard) { +function fromInnerRequest (innerRequest, dispatcher, signal, guard) { const request = new Request(kConstruct) - request[kState] = innerRequest - request[kSignal] = signal - request[kHeaders] = new Headers(kConstruct) - setHeadersList(request[kHeaders], innerRequest.headersList) - setHeadersGuard(request[kHeaders], guard) + setRequestState(request, innerRequest) + setRequestDispatcher(request, dispatcher) + setRequestSignal(request, signal) + const headers = new Headers(kConstruct) + setRequestHeaders(request, headers) + setHeadersList(headers, innerRequest.headersList) + setHeadersGuard(headers, guard) return request } @@ -929,27 +991,21 @@ Object.defineProperties(Request.prototype, { } }) -webidl.converters.Request = webidl.interfaceConverter( - Request -) +webidl.is.Request = webidl.util.MakeTypeAssertion(Request) // https://fetch.spec.whatwg.org/#requestinfo webidl.converters.RequestInfo = function (V, prefix, argument) { if (typeof V === 'string') { - return webidl.converters.USVString(V, prefix, argument) + return webidl.converters.USVString(V) } - if (V instanceof Request) { - return webidl.converters.Request(V, prefix, argument) + if (webidl.is.Request(V)) { + return V } - return webidl.converters.USVString(V, prefix, argument) + return webidl.converters.USVString(V) } -webidl.converters.AbortSignal = webidl.interfaceConverter( - AbortSignal -) - // https://fetch.spec.whatwg.org/#requestinit webidl.converters.RequestInit = webidl.dictionaryConverter([ { @@ -1014,8 +1070,7 @@ webidl.converters.RequestInit = webidl.dictionaryConverter([ (signal) => webidl.converters.AbortSignal( signal, 'RequestInit', - 'signal', - { strict: false } + 'signal' ) ) }, @@ -1034,4 +1089,11 @@ webidl.converters.RequestInit = webidl.dictionaryConverter([ } ]) -module.exports = { Request, makeRequest, fromInnerRequest, cloneRequest } +module.exports = { + Request, + makeRequest, + fromInnerRequest, + cloneRequest, + getRequestDispatcher, + getRequestState +} diff --git a/node_modules/cheerio/node_modules/undici/lib/web/fetch/response.js b/node_modules/undici/lib/web/fetch/response.js similarity index 85% rename from node_modules/cheerio/node_modules/undici/lib/web/fetch/response.js rename to node_modules/undici/lib/web/fetch/response.js index 3b6af35..be82c25 100644 --- a/node_modules/cheerio/node_modules/undici/lib/web/fetch/response.js +++ b/node_modules/undici/lib/web/fetch/response.js @@ -9,7 +9,6 @@ const { isValidReasonPhrase, isCancelled, isAborted, - isBlobLike, serializeJavascriptValueToJSONString, isErrorLike, isomorphicEncode, @@ -19,9 +18,7 @@ const { redirectStatusSet, nullBodyStatus } = require('./constants') -const { kState, kHeaders } = require('./symbols') const { webidl } = require('./webidl') -const { FormData } = require('./formdata') const { URLSerializer } = require('./data-url') const { kConstruct } = require('../../core/symbols') const assert = require('node:assert') @@ -31,6 +28,11 @@ const textEncoder = new TextEncoder('utf-8') // https://fetch.spec.whatwg.org/#response-class class Response { + /** @type {Headers} */ + #headers + + #state + // Creates network error Response. static error () { // The static error() method steps are to return the result of creating a @@ -42,7 +44,7 @@ class Response { } // https://fetch.spec.whatwg.org/#dom-response-json - static json (data, init = {}) { + static json (data, init = undefined) { webidl.argumentLengthCheck(arguments, 1, 'Response.json') if (init !== null) { @@ -96,21 +98,22 @@ class Response { const responseObject = fromInnerResponse(makeResponse({}), 'immutable') // 5. Set responseObject’s response’s status to status. - responseObject[kState].status = status + responseObject.#state.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, true) + responseObject.#state.headersList.append('location', value, true) // 8. Return responseObject. return responseObject } // https://fetch.spec.whatwg.org/#dom-response - constructor (body = null, init = {}) { + constructor (body = null, init = undefined) { webidl.util.markAsUncloneable(this) + if (body === kConstruct) { return } @@ -122,14 +125,14 @@ class Response { init = webidl.converters.ResponseInit(init) // 1. Set this’s response to a new response. - this[kState] = makeResponse({}) + this.#state = 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(kConstruct) - setHeadersGuard(this[kHeaders], 'response') - setHeadersList(this[kHeaders], this[kState].headersList) + this.#headers = new Headers(kConstruct) + setHeadersGuard(this.#headers, 'response') + setHeadersList(this.#headers, this.#state.headersList) // 3. Let bodyWithType be null. let bodyWithType = null @@ -149,14 +152,14 @@ class Response { webidl.brandCheck(this, Response) // The type getter steps are to return this’s response’s type. - return this[kState].type + return this.#state.type } // Returns response’s URL, if it has one; otherwise the empty string. get url () { webidl.brandCheck(this, Response) - const urlList = this[kState].urlList + const urlList = this.#state.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, @@ -176,7 +179,7 @@ class 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 + return this.#state.urlList.length > 1 } // Returns response’s status. @@ -184,7 +187,7 @@ class Response { webidl.brandCheck(this, Response) // The status getter steps are to return this’s response’s status. - return this[kState].status + return this.#state.status } // Returns whether response’s status is an ok status. @@ -193,7 +196,7 @@ class 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 + return this.#state.status >= 200 && this.#state.status <= 299 } // Returns response’s status message. @@ -202,7 +205,7 @@ class Response { // The statusText getter steps are to return this’s response’s status // message. - return this[kState].statusText + return this.#state.statusText } // Returns response’s headers as Headers. @@ -210,19 +213,19 @@ class Response { webidl.brandCheck(this, Response) // The headers getter steps are to return this’s headers. - return this[kHeaders] + return this.#headers } get body () { webidl.brandCheck(this, Response) - return this[kState].body ? this[kState].body.stream : null + return this.#state.body ? this.#state.body.stream : null } get bodyUsed () { webidl.brandCheck(this, Response) - return !!this[kState].body && util.isDisturbed(this[kState].body.stream) + return !!this.#state.body && util.isDisturbed(this.#state.body.stream) } // Returns a clone of response. @@ -230,7 +233,7 @@ class Response { webidl.brandCheck(this, Response) // 1. If this is unusable, then throw a TypeError. - if (bodyUnusable(this)) { + if (bodyUnusable(this.#state)) { throw webidl.errors.exception({ header: 'Response.clone', message: 'Body has already been consumed.' @@ -238,11 +241,11 @@ class Response { } // 2. Let clonedResponse be the result of cloning this’s response. - const clonedResponse = cloneResponse(this[kState]) + const clonedResponse = cloneResponse(this.#state) // 3. Return the result of creating a Response object, given // clonedResponse, this’s headers’s guard, and this’s relevant Realm. - return fromInnerResponse(clonedResponse, getHeadersGuard(this[kHeaders])) + return fromInnerResponse(clonedResponse, getHeadersGuard(this.#headers)) } [nodeUtil.inspect.custom] (depth, options) { @@ -266,9 +269,45 @@ class Response { return `Response ${nodeUtil.formatWithOptions(options, properties)}` } + + /** + * @param {Response} response + */ + static getResponseHeaders (response) { + return response.#headers + } + + /** + * @param {Response} response + * @param {Headers} newHeaders + */ + static setResponseHeaders (response, newHeaders) { + response.#headers = newHeaders + } + + /** + * @param {Response} response + */ + static getResponseState (response) { + return response.#state + } + + /** + * @param {Response} response + * @param {any} newState + */ + static setResponseState (response, newState) { + response.#state = newState + } } -mixinBody(Response) +const { getResponseHeaders, setResponseHeaders, getResponseState, setResponseState } = Response +Reflect.deleteProperty(Response, 'getResponseHeaders') +Reflect.deleteProperty(Response, 'setResponseHeaders') +Reflect.deleteProperty(Response, 'getResponseState') +Reflect.deleteProperty(Response, 'setResponseState') + +mixinBody(Response, getResponseState) Object.defineProperties(Response.prototype, { type: kEnumerableProperty, @@ -465,17 +504,17 @@ function initializeResponse (response, init, body) { // 3. Set response’s response’s status to init["status"]. if ('status' in init && init.status != null) { - response[kState].status = init.status + getResponseState(response).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 + getResponseState(response).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) + fill(getResponseHeaders(response), init.headers) } // 6. If body was given, then: @@ -489,12 +528,12 @@ function initializeResponse (response, init, body) { } // 2. Set response's body to body's body. - response[kState].body = body.body + getResponseState(response).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', true)) { - response[kState].headersList.append('content-type', body.type, true) + if (body.type != null && !getResponseState(response).headersList.contains('content-type', true)) { + getResponseState(response).headersList.append('content-type', body.type, true) } } } @@ -507,10 +546,11 @@ function initializeResponse (response, init, body) { */ function fromInnerResponse (innerResponse, guard) { const response = new Response(kConstruct) - response[kState] = innerResponse - response[kHeaders] = new Headers(kConstruct) - setHeadersList(response[kHeaders], innerResponse.headersList) - setHeadersGuard(response[kHeaders], guard) + setResponseState(response, innerResponse) + const headers = new Headers(kConstruct) + setResponseHeaders(response, headers) + setHeadersList(headers, innerResponse.headersList) + setHeadersGuard(headers, guard) if (hasFinalizationRegistry && innerResponse.body?.stream) { // If the target (response) is reclaimed, the cleanup callback may be called at some point with @@ -524,38 +564,26 @@ function fromInnerResponse (innerResponse, guard) { return response } -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, prefix, name) { if (typeof V === 'string') { return webidl.converters.USVString(V, prefix, name) } - if (isBlobLike(V)) { - return webidl.converters.Blob(V, prefix, name, { strict: false }) + if (webidl.is.Blob(V)) { + return V } if (ArrayBuffer.isView(V) || types.isArrayBuffer(V)) { - return webidl.converters.BufferSource(V, prefix, name) + return V } - if (util.isFormDataLike(V)) { - return webidl.converters.FormData(V, prefix, name, { strict: false }) + if (webidl.is.FormData(V)) { + return V } - if (V instanceof URLSearchParams) { - return webidl.converters.URLSearchParams(V, prefix, name) + if (webidl.is.URLSearchParams(V)) { + return V } return webidl.converters.DOMString(V, prefix, name) @@ -563,8 +591,8 @@ webidl.converters.XMLHttpRequestBodyInit = function (V, prefix, name) { // https://fetch.spec.whatwg.org/#bodyinit webidl.converters.BodyInit = function (V, prefix, argument) { - if (V instanceof ReadableStream) { - return webidl.converters.ReadableStream(V, prefix, argument) + if (webidl.is.ReadableStream(V)) { + return V } // Note: the spec doesn't include async iterables, @@ -593,6 +621,8 @@ webidl.converters.ResponseInit = webidl.dictionaryConverter([ } ]) +webidl.is.Response = webidl.util.MakeTypeAssertion(Response) + module.exports = { isNetworkError, makeNetworkError, @@ -601,5 +631,6 @@ module.exports = { filterResponse, Response, cloneResponse, - fromInnerResponse + fromInnerResponse, + getResponseState } diff --git a/node_modules/cheerio/node_modules/undici/lib/web/fetch/util.js b/node_modules/undici/lib/web/fetch/util.js similarity index 83% rename from node_modules/cheerio/node_modules/undici/lib/web/fetch/util.js rename to node_modules/undici/lib/web/fetch/util.js index 5101324..be60600 100644 --- a/node_modules/cheerio/node_modules/undici/lib/web/fetch/util.js +++ b/node_modules/undici/lib/web/fetch/util.js @@ -2,11 +2,11 @@ const { Transform } = require('node:stream') const zlib = require('node:zlib') -const { redirectStatusSet, referrerPolicySet: referrerPolicyTokens, badPortsSet } = require('./constants') +const { redirectStatusSet, referrerPolicyTokens, badPortsSet } = require('./constants') const { getGlobalOrigin } = require('./global') const { collectASequenceOfCodePoints, collectAnHTTPQuotedString, removeChars, parseMIMEType } = require('./data-url') const { performance } = require('node:perf_hooks') -const { isBlobLike, ReadableStreamFrom, isValidHTTPToken, normalizedMethodRecordsBase } = require('../../core/util') +const { ReadableStreamFrom, isValidHTTPToken, normalizedMethodRecordsBase } = require('../../core/util') const assert = require('node:assert') const { isUint8Array } = require('node:util/types') const { webidl } = require('./webidl') @@ -170,29 +170,24 @@ function isValidHeaderValue (potentialValue) { ) === false } -// 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 +/** + * Parse a referrer policy from a Referrer-Policy header + * @see https://w3c.github.io/webappsec-referrer-policy/#parse-referrer-policy-from-header + */ +function parseReferrerPolicy (actualResponse) { // 1. Let policy-tokens be the result of extracting header list values given `Referrer-Policy` and response’s header list. - const { headersList } = actualResponse + const policyHeader = (actualResponse.headersList.get('referrer-policy', true) ?? '').split(',') + // 2. Let policy be the empty string. + let policy = '' + // 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', true) ?? '').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) { + if (policyHeader.length) { // The right-most policy takes precedence. // The left-most policy is the fallback. for (let i = policyHeader.length; i !== 0; i--) { @@ -204,6 +199,23 @@ function setRequestReferrerPolicyOnRedirect (request, actualResponse) { } } + // 4. Return policy. + return policy +} + +/** + * 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. + * @see https://w3c.github.io/webappsec-referrer-policy/#set-requests-referrer-policy-on-redirect + * @param {import('./request').Request} request + * @param {import('./response').Response} actualResponse + */ +function setRequestReferrerPolicyOnRedirect (request, actualResponse) { + // 1. Let policy be the result of executing § 8.1 Parse a referrer policy + // from a Referrer-Policy header on actualResponse. + const policy = parseReferrerPolicy(actualResponse) + // 2. If policy is not the empty string, then set request’s referrer policy to policy. if (policy !== '') { request.referrerPolicy = policy @@ -374,8 +386,16 @@ function clonePolicyContainer (policyContainer) { } } -// https://w3c.github.io/webappsec-referrer-policy/#determine-requests-referrer +/** + * Determine request’s Referrer + * + * @see https://w3c.github.io/webappsec-referrer-policy/#determine-requests-referrer + */ function determineRequestsReferrer (request) { + // Given a request request, we can determine the correct referrer information + // to send by examining its referrer policy as detailed in the following + // steps, which return either no referrer or a URL: + // 1. Let policy be request's referrer policy. const policy = request.referrerPolicy @@ -387,6 +407,8 @@ function determineRequestsReferrer (request) { let referrerSource = null // 3. Switch on request’s referrer: + + // "client" 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. @@ -397,9 +419,10 @@ function determineRequestsReferrer (request) { return 'no-referrer' } - // note: we need to clone it as it's mutated + // Note: we need to clone it as it's mutated referrerSource = new URL(globalOrigin) - } else if (request.referrer instanceof URL) { + // a URL + } else if (webidl.is.URL(request.referrer)) { // Let referrerSource be request’s referrer. referrerSource = request.referrer } @@ -418,18 +441,37 @@ function determineRequestsReferrer (request) { referrerURL = referrerOrigin } - const areSameOrigin = sameOrigin(request, referrerURL) - const isNonPotentiallyTrustWorthy = isURLPotentiallyTrustworthy(referrerURL) && - !isURLPotentiallyTrustworthy(request.url) + // 7. The user agent MAY alter referrerURL or referrerOrigin at this point + // to enforce arbitrary policy considerations in the interests of minimizing + // data leakage. For example, the user agent could strip the URL down to an + // origin, modify its host, replace it with an empty string, etc. // 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 'no-referrer': + // Return no referrer + return 'no-referrer' + case 'origin': + // Return referrerOrigin + if (referrerOrigin != null) { + return referrerOrigin + } + return stripURLForReferrer(referrerSource, true) + case 'unsafe-url': + // Return referrerURL. + return referrerURL + case 'strict-origin': { + const currentURL = requestCurrentURL(request) + + // 1. 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' + } + // 2. Return referrerOrigin + return referrerOrigin + } case 'strict-origin-when-cross-origin': { const currentURL = requestCurrentURL(request) @@ -449,39 +491,58 @@ function determineRequestsReferrer (request) { // 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 - */ + case 'same-origin': + // 1. If the origin of referrerURL and the origin of request’s current + // URL are the same, then return referrerURL. + if (sameOrigin(request, referrerURL)) { + return referrerURL + } + // 2. Return no referrer. + return 'no-referrer' + case 'origin-when-cross-origin': + // 1. If the origin of referrerURL and the origin of request’s current + // URL are the same, then return referrerURL. + if (sameOrigin(request, referrerURL)) { + return referrerURL + } + // 2. Return referrerOrigin. + return referrerOrigin + case 'no-referrer-when-downgrade': { + const currentURL = requestCurrentURL(request) - default: // eslint-disable-line - return isNonPotentiallyTrustWorthy ? 'no-referrer' : referrerOrigin + // 1. 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' + } + // 2. Return referrerOrigin + return referrerOrigin + } } } /** + * Certain portions of URLs must not be included when sending a URL as the + * value of a `Referer` header: a URLs fragment, username, and password + * components must be stripped from the URL before it’s sent out. This + * algorithm accepts a origin-only flag, which defaults to false. If set to + * true, the algorithm will additionally remove the URL’s path and query + * components, leaving only the scheme, host, and port. + * * @see https://w3c.github.io/webappsec-referrer-policy/#strip-url * @param {URL} url - * @param {boolean|undefined} originOnly + * @param {boolean} [originOnly=false] */ -function stripURLForReferrer (url, originOnly) { +function stripURLForReferrer (url, originOnly = false) { // 1. Assert: url is a URL. - assert(url instanceof URL) + assert(webidl.is.URL(url)) + // Note: Create a new URL instance to avoid mutating the original URL. url = new URL(url) // 2. If url’s scheme is a local scheme, then return no referrer. - if (url.protocol === 'file:' || url.protocol === 'about:' || url.protocol === 'blank:') { + if (urlIsLocal(url)) { return 'no-referrer' } @@ -495,7 +556,7 @@ function stripURLForReferrer (url, originOnly) { url.hash = '' // 6. If the origin-only flag is true, then: - if (originOnly) { + if (originOnly === true) { // 1. Set url’s path to « the empty string ». url.pathname = '' @@ -507,45 +568,134 @@ function stripURLForReferrer (url, originOnly) { return url } -function isURLPotentiallyTrustworthy (url) { - if (!(url instanceof URL)) { +const potentialleTrustworthyIPv4RegExp = new RegExp('^(?:' + + '(?:127\\.)' + + '(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\\.){2}' + + '(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[1-9])' + +')$') + +const potentialleTrustworthyIPv6RegExp = new RegExp('^(?:' + + '(?:(?:0{1,4}):){7}(?:(?:0{0,3}1))|' + + '(?:(?:0{1,4}):){1,6}(?::(?:0{0,3}1))|' + + '(?:::(?:0{0,3}1))|' + +')$') + +/** + * Check if host matches one of the CIDR notations 127.0.0.0/8 or ::1/128. + * + * @param {string} origin + * @returns {boolean} + */ +function isOriginIPPotentiallyTrustworthy (origin) { + // IPv6 + if (origin.includes(':')) { + // Remove brackets from IPv6 addresses + if (origin[0] === '[' && origin[origin.length - 1] === ']') { + origin = origin.slice(1, -1) + } + return potentialleTrustworthyIPv6RegExp.test(origin) + } + + // IPv4 + return potentialleTrustworthyIPv4RegExp.test(origin) +} + +/** + * A potentially trustworthy origin is one which a user agent can generally + * trust as delivering data securely. + * + * Return value `true` means `Potentially Trustworthy`. + * Return value `false` means `Not Trustworthy`. + * + * @see https://w3c.github.io/webappsec-secure-contexts/#is-origin-trustworthy + * @param {string} origin + * @returns {boolean} + */ +function isOriginPotentiallyTrustworthy (origin) { + // 1. If origin is an opaque origin, return "Not Trustworthy". + if (origin == null || origin === 'null') { return false } - // If child of about, return true + // 2. Assert: origin is a tuple origin. + origin = new URL(origin) + + // 3. If origin’s scheme is either "https" or "wss", + // return "Potentially Trustworthy". + if (origin.protocol === 'https:' || origin.protocol === 'wss:') { + return true + } + + // 4. If origin’s host matches one of the CIDR notations 127.0.0.0/8 or + // ::1/128 [RFC4632], return "Potentially Trustworthy". + if (isOriginIPPotentiallyTrustworthy(origin.hostname)) { + return true + } + + // 5. If the user agent conforms to the name resolution rules in + // [let-localhost-be-localhost] and one of the following is true: + + // origin’s host is "localhost" or "localhost." + if (origin.hostname === 'localhost' || origin.hostname === 'localhost.') { + return true + } + + // origin’s host ends with ".localhost" or ".localhost." + if (origin.hostname.endsWith('.localhost') || origin.hostname.endsWith('.localhost.')) { + return true + } + + // 6. If origin’s scheme is "file", return "Potentially Trustworthy". + if (origin.protocol === 'file:') { + return true + } + + // 7. If origin’s scheme component is one which the user agent considers to + // be authenticated, return "Potentially Trustworthy". + + // 8. If origin has been configured as a trustworthy origin, return + // "Potentially Trustworthy". + + // 9. Return "Not Trustworthy". + return false +} + +/** + * A potentially trustworthy URL is one which either inherits context from its + * creator (about:blank, about:srcdoc, data) or one whose origin is a + * potentially trustworthy origin. + * + * Return value `true` means `Potentially Trustworthy`. + * Return value `false` means `Not Trustworthy`. + * + * @see https://www.w3.org/TR/secure-contexts/#is-url-trustworthy + * @param {URL} url + * @returns {boolean} + */ +function isURLPotentiallyTrustworthy (url) { + // Given a URL record (url), the following algorithm returns "Potentially + // Trustworthy" or "Not Trustworthy" as appropriate: + if (!webidl.is.URL(url)) { + return false + } + + // 1. If url is "about:blank" or "about:srcdoc", + // return "Potentially Trustworthy". if (url.href === 'about:blank' || url.href === 'about:srcdoc') { return true } - // If scheme is data, return true + // 2. If url’s scheme is "data", return "Potentially Trustworthy". if (url.protocol === 'data:') return true - // If file, return true - if (url.protocol === 'file:') return true + // Note: The origin of blob: URLs is the origin of the context in which they + // were created. Therefore, blobs created in a trustworthy origin will + // themselves be potentially trustworthy. + if (url.protocol === 'blob:') return true + // 3. Return the result of executing § 3.1 Is origin potentially trustworthy? + // on url’s origin. 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 - } } /** @@ -825,7 +975,7 @@ const esIteratorPrototype = Object.getPrototypeOf(Object.getPrototypeOf([][Symbo /** * @see https://webidl.spec.whatwg.org/#dfn-iterator-prototype-object * @param {string} name name of the instance - * @param {symbol} kInternalIterator + * @param {((target: any) => any)} kInternalIterator * @param {string | number} [keyIndex] * @param {string | number} [valueIndex] */ @@ -867,7 +1017,7 @@ function createIterator (name, kInternalIterator, keyIndex = 0, valueIndex = 1) // 7. Let kind be object’s kind. // 8. Let values be object’s target's value pairs to iterate over. const index = this.#index - const values = this.#target[kInternalIterator] + const values = kInternalIterator(this.#target) // 9. Let len be the length of values. const len = values.length @@ -961,7 +1111,7 @@ function createIterator (name, kInternalIterator, keyIndex = 0, valueIndex = 1) * @see https://webidl.spec.whatwg.org/#dfn-iterator-prototype-object * @param {string} name name of the instance * @param {any} object class - * @param {symbol} kInternalIterator + * @param {(target: any) => any} kInternalIterator * @param {string | number} [keyIndex] * @param {string | number} [valueIndex] */ @@ -1029,7 +1179,7 @@ function iteratorMixin (name, object, kInternalIterator, keyIndex = 0, valueInde /** * @see https://fetch.spec.whatwg.org/#body-fully-read */ -async function fullyReadBody (body, processBody, processBodyError) { +function fullyReadBody (body, processBody, processBodyError) { // 1. If taskDestination is null, then set taskDestination to // the result of starting a new parallel queue. @@ -1054,18 +1204,7 @@ async function fullyReadBody (body, processBody, processBodyError) { } // 5. Read all bytes from reader, given successSteps and errorSteps. - try { - successSteps(await readAllBytes(reader)) - } catch (e) { - errorSteps(e) - } -} - -function isReadableStreamLike (stream) { - return stream instanceof ReadableStream || ( - stream[Symbol.toStringTag] === 'ReadableStream' && - typeof stream.tee === 'function' - ) + readAllBytes(reader, successSteps, errorSteps) } /** @@ -1103,42 +1242,54 @@ function isomorphicEncode (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) { +async function readAllBytes (reader, successSteps, failureSteps) { const bytes = [] let byteLength = 0 - while (true) { - const { done, value: chunk } = await reader.read() + try { + do { + const { done, value: chunk } = await reader.read() - if (done) { - // 1. Call successSteps with bytes. - return Buffer.concat(bytes, byteLength) - } + 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)) { - throw new TypeError('Received non-Uint8Array chunk') - } + // 1. If chunk is not a Uint8Array object, call failureSteps + // with a TypeError and abort these steps. + if (!isUint8Array(chunk)) { + failureSteps(TypeError('Received non-Uint8Array chunk')) + return + } - // 2. Append the bytes represented by chunk to bytes. - bytes.push(chunk) - byteLength += chunk.length + // 2. Append the bytes represented by chunk to bytes. + bytes.push(chunk) + byteLength += chunk.length // 3. Read-loop given reader, bytes, successSteps, and failureSteps. + } while (true) + } catch (e) { + // 1. Call failureSteps with e. + failureSteps(e) } } /** * @see https://fetch.spec.whatwg.org/#is-local * @param {URL} url + * @returns {boolean} */ function urlIsLocal (url) { assert('protocol' in url) // ensure it's a url object const protocol = url.protocol + // A URL is local if its scheme is a local scheme. + // A local scheme is "about", "blob", or "data". return protocol === 'about:' || protocol === 'blob:' || protocol === 'data:' } @@ -1601,7 +1752,6 @@ module.exports = { requestCurrentURL, responseURL, responseLocationURL, - isBlobLike, isURLPotentiallyTrustworthy, isValidReasonPhrase, sameOrigin, @@ -1614,7 +1764,6 @@ module.exports = { isErrorLike, fullyReadBody, bytesMatch, - isReadableStreamLike, readableStreamClose, isomorphicEncode, urlIsLocal, @@ -1628,5 +1777,6 @@ module.exports = { extractMimeType, getDecodeSplit, utf8DecodeBytes, - environmentSettingsObject + environmentSettingsObject, + isOriginIPPotentiallyTrustworthy } diff --git a/node_modules/cheerio/node_modules/undici/lib/web/fetch/webidl.js b/node_modules/undici/lib/web/fetch/webidl.js similarity index 83% rename from node_modules/cheerio/node_modules/undici/lib/web/fetch/webidl.js rename to node_modules/undici/lib/web/fetch/webidl.js index cd5cb14..46850e1 100644 --- a/node_modules/cheerio/node_modules/undici/lib/web/fetch/webidl.js +++ b/node_modules/undici/lib/web/fetch/webidl.js @@ -4,11 +4,24 @@ const { types, inspect } = require('node:util') const { markAsUncloneable } = require('node:worker_threads') const { toUSVString } = require('../../core/util') +const UNDEFINED = 1 +const BOOLEAN = 2 +const STRING = 3 +const SYMBOL = 4 +const NUMBER = 5 +const BIGINT = 6 +const NULL = 7 +const OBJECT = 8 // function and object + +const FunctionPrototypeSymbolHasInstance = Function.call.bind(Function.prototype[Symbol.hasInstance]) + /** @type {import('../../../types/webidl').Webidl} */ -const webidl = {} -webidl.converters = {} -webidl.util = {} -webidl.errors = {} +const webidl = { + converters: {}, + util: {}, + errors: {}, + is: {} +} webidl.errors.exception = function (message) { return new TypeError(`${message.header}: ${message.message}`) @@ -34,15 +47,19 @@ webidl.errors.invalidArgument = function (context) { } // https://webidl.spec.whatwg.org/#implements -webidl.brandCheck = function (V, I, opts) { - if (opts?.strict !== false) { - if (!(V instanceof I)) { - const err = new TypeError('Illegal invocation') - err.code = 'ERR_INVALID_THIS' // node compat. - throw err - } - } else { - if (V?.[Symbol.toStringTag] !== I.prototype[Symbol.toStringTag]) { +webidl.brandCheck = function (V, I) { + if (!FunctionPrototypeSymbolHasInstance(I, V)) { + const err = new TypeError('Illegal invocation') + err.code = 'ERR_INVALID_THIS' // node compat. + throw err + } +} + +webidl.brandCheckMultiple = function (List) { + const prototypes = List.map((c) => webidl.util.MakeTypeAssertion(c)) + + return (V) => { + if (prototypes.every(typeCheck => !typeCheck(V))) { const err = new TypeError('Illegal invocation') err.code = 'ERR_INVALID_THIS' // node compat. throw err @@ -67,27 +84,56 @@ webidl.illegalConstructor = function () { }) } +webidl.util.MakeTypeAssertion = function (I) { + return (O) => FunctionPrototypeSymbolHasInstance(I, O) +} + // 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 '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 NULL } - return 'Object' + return OBJECT } } } +webidl.util.Types = { + UNDEFINED, + BOOLEAN, + STRING, + SYMBOL, + NUMBER, + BIGINT, + NULL, + OBJECT +} + +webidl.util.TypeValueToString = function (o) { + switch (webidl.util.Type(o)) { + 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 NULL: return 'Null' + case OBJECT: return 'Object' + } +} + webidl.util.markAsUncloneable = markAsUncloneable || (() => {}) + // https://webidl.spec.whatwg.org/#abstract-opdef-converttoint webidl.util.ConvertToInt = function (V, bitLength, signedness, opts) { let upperBound @@ -226,11 +272,11 @@ webidl.util.Stringify = function (V) { const type = webidl.util.Type(V) switch (type) { - case 'Symbol': + case SYMBOL: return `Symbol(${V.description})` - case 'Object': + case OBJECT: return inspect(V) - case 'String': + case STRING: return `"${V}"` default: return `${V}` @@ -241,7 +287,7 @@ webidl.util.Stringify = function (V) { webidl.sequenceConverter = function (converter) { return (V, prefix, argument, Iterable) => { // 1. If Type(V) is not Object, throw a TypeError. - if (webidl.util.Type(V) !== 'Object') { + if (webidl.util.Type(V) !== OBJECT) { throw webidl.errors.exception({ header: prefix, message: `${argument} (${webidl.util.Stringify(V)}) is not iterable.` @@ -284,10 +330,10 @@ webidl.sequenceConverter = function (converter) { webidl.recordConverter = function (keyConverter, valueConverter) { return (O, prefix, argument) => { // 1. If Type(O) is not Object, throw a TypeError. - if (webidl.util.Type(O) !== 'Object') { + if (webidl.util.Type(O) !== OBJECT) { throw webidl.errors.exception({ header: prefix, - message: `${argument} ("${webidl.util.Type(O)}") is not an Object.` + message: `${argument} ("${webidl.util.TypeValueToString(O)}") is not an Object.` }) } @@ -299,12 +345,14 @@ webidl.recordConverter = function (keyConverter, valueConverter) { const keys = [...Object.getOwnPropertyNames(O), ...Object.getOwnPropertySymbols(O)] for (const key of keys) { + const keyName = webidl.util.Stringify(key) + // 1. Let typedKey be key converted to an IDL value of type K. - const typedKey = keyConverter(key, prefix, argument) + const typedKey = keyConverter(key, prefix, `Key ${keyName} in ${argument}`) // 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], prefix, argument) + const typedValue = valueConverter(O[key], prefix, `${argument}[${keyName}]`) // 4. Set result[typedKey] to typedValue. result[typedKey] = typedValue @@ -341,12 +389,12 @@ webidl.recordConverter = function (keyConverter, valueConverter) { } } -webidl.interfaceConverter = function (i) { - return (V, prefix, argument, opts) => { - if (opts?.strict !== false && !(V instanceof i)) { +webidl.interfaceConverter = function (TypeCheck, name) { + return (V, prefix, argument) => { + if (!TypeCheck(V)) { throw webidl.errors.exception({ header: prefix, - message: `Expected ${argument} ("${webidl.util.Stringify(V)}") to be an instance of ${i.name}.` + message: `Expected ${argument} ("${webidl.util.Stringify(V)}") to be an instance of ${name}.` }) } @@ -356,12 +404,9 @@ webidl.interfaceConverter = function (i) { webidl.dictionaryConverter = function (converters) { return (dictionary, prefix, argument) => { - const type = webidl.util.Type(dictionary) const dict = {} - if (type === 'Null' || type === 'Undefined') { - return dict - } else if (type !== 'Object') { + if (dictionary != null && webidl.util.Type(dictionary) !== OBJECT) { throw webidl.errors.exception({ header: prefix, message: `Expected ${dictionary} to be one of: Null, Undefined, Object.` @@ -372,7 +417,7 @@ webidl.dictionaryConverter = function (converters) { const { key, defaultValue, required, converter } = options if (required === true) { - if (!Object.hasOwn(dictionary, key)) { + if (dictionary == null || !Object.hasOwn(dictionary, key)) { throw webidl.errors.exception({ header: prefix, message: `Missing required key "${key}".` @@ -380,13 +425,13 @@ webidl.dictionaryConverter = function (converters) { } } - let value = dictionary[key] - const hasDefault = Object.hasOwn(options, 'defaultValue') + let value = dictionary?.[key] + const hasDefault = defaultValue !== undefined // Only use defaultValue if value is undefined and // a defaultValue options was provided. - if (hasDefault && value !== null) { - value ??= defaultValue() + if (hasDefault && value === undefined) { + value = defaultValue() } // A key can be optional and have no default value. @@ -423,6 +468,14 @@ webidl.nullableConverter = function (converter) { } } +webidl.is.ReadableStream = webidl.util.MakeTypeAssertion(ReadableStream) +webidl.is.Blob = webidl.util.MakeTypeAssertion(Blob) +webidl.is.URLSearchParams = webidl.util.MakeTypeAssertion(URLSearchParams) +webidl.is.File = webidl.util.MakeTypeAssertion(globalThis.File ?? require('node:buffer').File) +webidl.is.URL = webidl.util.MakeTypeAssertion(URL) +webidl.is.AbortSignal = webidl.util.MakeTypeAssertion(AbortSignal) +webidl.is.MessagePort = webidl.util.MakeTypeAssertion(MessagePort) + // https://webidl.spec.whatwg.org/#es-DOMString webidl.converters.DOMString = function (V, prefix, argument, opts) { // 1. If V is null and the conversion is to an IDL type @@ -450,8 +503,14 @@ webidl.converters.DOMString = function (V, prefix, argument, opts) { // https://webidl.spec.whatwg.org/#es-ByteString webidl.converters.ByteString = function (V, prefix, argument) { // 1. Let x be ? ToString(V). - // Note: DOMString converter perform ? ToString(V) - const x = webidl.converters.DOMString(V, prefix, argument) + if (typeof V === 'symbol') { + throw webidl.errors.exception({ + header: prefix, + message: `${argument} is a symbol, which cannot be converted to a ByteString.` + }) + } + + const x = String(V) // 2. If the value of any element of x is greater than // 255, then throw a TypeError. @@ -537,7 +596,7 @@ webidl.converters.ArrayBuffer = function (V, prefix, argument, opts) { // 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' || + webidl.util.Type(V) !== OBJECT || !types.isAnyArrayBuffer(V) ) { throw webidl.errors.conversionFailed({ @@ -581,7 +640,7 @@ webidl.converters.TypedArray = function (V, T, prefix, name, opts) { // [[TypedArrayName]] internal slot with a value // equal to T’s name, then throw a TypeError. if ( - webidl.util.Type(V) !== 'Object' || + webidl.util.Type(V) !== OBJECT || !types.isTypedArray(V) || V.constructor.name !== T.name ) { @@ -622,7 +681,7 @@ webidl.converters.TypedArray = function (V, T, prefix, name, opts) { webidl.converters.DataView = function (V, prefix, name, 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)) { + if (webidl.util.Type(V) !== OBJECT || !types.isDataView(V)) { throw webidl.errors.exception({ header: prefix, message: `${name} is not a DataView.` @@ -656,27 +715,6 @@ webidl.converters.DataView = function (V, prefix, name, opts) { return V } -// https://webidl.spec.whatwg.org/#BufferSource -webidl.converters.BufferSource = function (V, prefix, name, opts) { - if (types.isAnyArrayBuffer(V)) { - return webidl.converters.ArrayBuffer(V, prefix, name, { ...opts, allowShared: false }) - } - - if (types.isTypedArray(V)) { - return webidl.converters.TypedArray(V, V.constructor, prefix, name, { ...opts, allowShared: false }) - } - - if (types.isDataView(V)) { - return webidl.converters.DataView(V, prefix, name, { ...opts, allowShared: false }) - } - - throw webidl.errors.conversionFailed({ - prefix, - argument: `${name} ("${webidl.util.Stringify(V)}")`, - types: ['BufferSource'] - }) -} - webidl.converters['sequence<ByteString>'] = webidl.sequenceConverter( webidl.converters.ByteString ) @@ -690,6 +728,13 @@ webidl.converters['record<ByteString, ByteString>'] = webidl.recordConverter( webidl.converters.ByteString ) +webidl.converters.Blob = webidl.interfaceConverter(webidl.is.Blob, 'Blob') + +webidl.converters.AbortSignal = webidl.interfaceConverter( + webidl.is.AbortSignal, + 'AbortSignal' +) + module.exports = { webidl } diff --git a/node_modules/cheerio/node_modules/undici/lib/web/websocket/connection.js b/node_modules/undici/lib/web/websocket/connection.js similarity index 61% rename from node_modules/cheerio/node_modules/undici/lib/web/websocket/connection.js rename to node_modules/undici/lib/web/websocket/connection.js index bb87d36..0d0c580 100644 --- a/node_modules/cheerio/node_modules/undici/lib/web/websocket/connection.js +++ b/node_modules/undici/lib/web/websocket/connection.js @@ -1,21 +1,14 @@ 'use strict' const { uid, states, sentCloseFrameState, emptyBuffer, opcodes } = require('./constants') -const { - kReadyState, - kSentClose, - kByteParser, - kReceivedClose, - kResponse -} = require('./symbols') -const { fireEvent, failWebsocketConnection, isClosing, isClosed, isEstablished, parseExtensions } = require('./util') +const { parseExtensions, isClosed, isClosing, isEstablished, validateCloseCodeAndReason } = require('./util') const { channels } = require('../../core/diagnostics') -const { CloseEvent } = require('./events') const { makeRequest } = require('../fetch/request') const { fetching } = require('../fetch/index') const { Headers, getHeadersList } = require('../fetch/headers') const { getDecodeSplit } = require('../fetch/util') const { WebsocketFrameSend } = require('./frame') +const assert = require('node:assert') /** @type {import('crypto')} */ let crypto @@ -30,11 +23,10 @@ try { * @see https://websockets.spec.whatwg.org/#concept-websocket-establish * @param {URL} url * @param {string|string[]} protocols - * @param {import('./websocket').WebSocket} ws - * @param {(response: any, extensions: string[] | undefined) => void} onEstablish - * @param {Partial<import('../../types/websocket').WebSocketInit>} options + * @param {import('./websocket').Handler} handler + * @param {Partial<import('../../../types/websocket').WebSocketInit>} options */ -function establishWebSocketConnection (url, protocols, client, ws, onEstablish, options) { +function establishWebSocketConnection (url, protocols, client, handler, 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 @@ -75,17 +67,17 @@ function establishWebSocketConnection (url, protocols, client, ws, onEstablish, // 6. Append (`Sec-WebSocket-Key`, keyValue) to request’s // header list. - request.headersList.append('sec-websocket-key', keyValue) + request.headersList.append('sec-websocket-key', keyValue, true) // 7. Append (`Sec-WebSocket-Version`, `13`) to request’s // header list. - request.headersList.append('sec-websocket-version', '13') + request.headersList.append('sec-websocket-version', '13', true) // 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) + request.headersList.append('sec-websocket-protocol', protocol, true) } // 9. Let permessageDeflate be a user-agent defined @@ -95,7 +87,7 @@ function establishWebSocketConnection (url, protocols, client, ws, onEstablish, // 10. Append (`Sec-WebSocket-Extensions`, permessageDeflate) to // request’s header list. - request.headersList.append('sec-websocket-extensions', permessageDeflate) + request.headersList.append('sec-websocket-extensions', permessageDeflate, true) // 11. Fetch request with useParallelQueue set to true, and // processResponse given response being these steps: @@ -104,10 +96,16 @@ function establishWebSocketConnection (url, protocols, client, ws, onEstablish, useParallelQueue: true, dispatcher: options.dispatcher, processResponse (response) { + if (response.type === 'error') { + // If the WebSocket connection could not be established, it is also said + // that _The WebSocket Connection is Closed_, but not _cleanly_. + handler.readyState = states.CLOSED + } + // 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.') + failWebsocketConnection(handler, 1002, 'Received network error or non-101 status code.') return } @@ -116,7 +114,7 @@ function establishWebSocketConnection (url, protocols, client, ws, onEstablish, // 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.') + failWebsocketConnection(handler, 1002, 'Server did not respond with sent protocols.') return } @@ -131,7 +129,7 @@ function establishWebSocketConnection (url, protocols, client, ws, onEstablish, // 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".') + failWebsocketConnection(handler, 1002, 'Server did not set Upgrade header to "websocket".') return } @@ -140,7 +138,7 @@ function establishWebSocketConnection (url, protocols, client, ws, onEstablish, // 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".') + failWebsocketConnection(handler, 1002, 'Server did not set Connection header to "upgrade".') return } @@ -154,7 +152,7 @@ function establishWebSocketConnection (url, protocols, client, ws, onEstablish, const secWSAccept = response.headersList.get('Sec-WebSocket-Accept') const digest = crypto.createHash('sha1').update(keyValue + uid).digest('base64') if (secWSAccept !== digest) { - failWebsocketConnection(ws, 'Incorrect hash received in Sec-WebSocket-Accept header.') + failWebsocketConnection(handler, 1002, 'Incorrect hash received in Sec-WebSocket-Accept header.') return } @@ -172,7 +170,7 @@ function establishWebSocketConnection (url, protocols, client, ws, onEstablish, extensions = parseExtensions(secExtension) if (!extensions.has('permessage-deflate')) { - failWebsocketConnection(ws, 'Sec-WebSocket-Extensions header does not match.') + failWebsocketConnection(handler, 1002, 'Sec-WebSocket-Extensions header does not match.') return } } @@ -193,14 +191,14 @@ function establishWebSocketConnection (url, protocols, client, ws, onEstablish, // the selected subprotocol values in its response for the connection to // be established. if (!requestProtocols.includes(secProtocol)) { - failWebsocketConnection(ws, 'Protocol was not set in the opening handshake.') + failWebsocketConnection(handler, 1002, 'Protocol was not set in the opening handshake.') return } } - response.socket.on('data', onSocketData) - response.socket.on('close', onSocketClose) - response.socket.on('error', onSocketError) + response.socket.on('data', handler.onSocketData) + response.socket.on('close', handler.onSocketClose) + response.socket.on('error', handler.onSocketError) if (channels.open.hasSubscribers) { channels.open.publish({ @@ -210,35 +208,45 @@ function establishWebSocketConnection (url, protocols, client, ws, onEstablish, }) } - onEstablish(response, extensions) + handler.wasEverConnected = true + handler.onConnectionEstablished(response, extensions) } }) return controller } -function closeWebSocketConnection (ws, code, reason, reasonByteLength) { - if (isClosing(ws) || isClosed(ws)) { - // If this's ready state is CLOSING (2) or CLOSED (3) - // Do nothing. - } else if (!isEstablished(ws)) { - // If the WebSocket connection is not yet established - // Fail the WebSocket connection and set this's ready state - // to CLOSING (2). - failWebsocketConnection(ws, 'Connection was closed before it was established.') - ws[kReadyState] = states.CLOSING - } else if (ws[kSentClose] === sentCloseFrameState.NOT_SENT) { - // 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. +/** + * @see https://whatpr.org/websockets/48.html#close-the-websocket + * @param {import('./websocket').Handler} object + * @param {number} [code=null] + * @param {string} [reason=''] + */ +function closeWebSocketConnection (object, code, reason, validate = false) { + // 1. If code was not supplied, let code be null. + code ??= null - ws[kSentClose] = sentCloseFrameState.PROCESSING + // 2. If reason was not supplied, let reason be the empty string. + reason ??= '' + + // 3. Validate close code and reason with code and reason. + if (validate) validateCloseCodeAndReason(code, reason) + + // 4. Run the first matching steps from the following list: + // - If object’s ready state is CLOSING (2) or CLOSED (3) + // - If the WebSocket connection is not yet established [WSP] + // - If the WebSocket closing handshake has not yet been started [WSP] + // - Otherwise + if (isClosed(object.readyState) || isClosing(object.readyState)) { + // Do nothing. + } else if (!isEstablished(object.readyState)) { + // Fail the WebSocket connection and set object’s ready state to CLOSING (2). [WSP] + failWebsocketConnection(object) + object.readyState = states.CLOSING + } else if (!object.closeState.has(sentCloseFrameState.SENT) && !object.closeState.has(sentCloseFrameState.RECEIVED)) { + // 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. const frame = new WebsocketFrameSend() @@ -247,13 +255,24 @@ function closeWebSocketConnection (ws, code, reason, reasonByteLength) { // 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) { + // If code is null and reason is the empty string, the WebSocket Close frame must not have a body. + // If reason is non-empty but code is null, then set code to 1000 ("Normal Closure"). + if (reason.length !== 0 && code === null) { + code = 1000 + } + + // If code is set, then the status code to use in the WebSocket Close frame must be the integer given by code. + assert(code === null || Number.isInteger(code)) + + if (code === null && reason.length === 0) { + frame.frameData = emptyBuffer + } else if (code !== null && reason === null) { frame.frameData = Buffer.allocUnsafe(2) frame.frameData.writeUInt16BE(code, 0) - } else if (code !== undefined && reason !== undefined) { + } else if (code !== null && reason !== null) { // 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 = Buffer.allocUnsafe(2 + Buffer.byteLength(reason)) frame.frameData.writeUInt16BE(code, 0) // the body MAY contain UTF-8-encoded data with value /reason/ frame.frameData.write(reason, 2, 'utf-8') @@ -261,111 +280,46 @@ function closeWebSocketConnection (ws, code, reason, reasonByteLength) { frame.frameData = emptyBuffer } - /** @type {import('stream').Duplex} */ - const socket = ws[kResponse].socket + object.socket.write(frame.createFrame(opcodes.CLOSE)) - socket.write(frame.createFrame(opcodes.CLOSE)) - - ws[kSentClose] = sentCloseFrameState.SENT + object.closeState.add(sentCloseFrameState.SENT) // 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. - ws[kReadyState] = states.CLOSING + object.readyState = states.CLOSING } else { - // Otherwise - // Set this's ready state to CLOSING (2). - ws[kReadyState] = states.CLOSING + // Set object’s ready state to CLOSING (2). + object.readyState = states.CLOSING } } /** - * @param {Buffer} chunk + * @param {import('./websocket').Handler} handler + * @param {number} code + * @param {string|undefined} reason + * @returns {void} */ -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 - const { [kResponse]: response } = ws - - response.socket.off('data', onSocketData) - response.socket.off('close', onSocketClose) - response.socket.off('error', onSocketError) - - // 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] === sentCloseFrameState.SENT && ws[kReceivedClose] - - let code = 1005 - let reason = '' - - const result = ws[kByteParser].closingInfo - - if (result && !result.error) { - code = result.code ?? 1005 - reason = result.reason - } else if (!ws[kReceivedClose]) { - // 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 +function failWebsocketConnection (handler, code, reason) { + // If _The WebSocket Connection is Established_ prior to the point where + // the endpoint is required to _Fail the WebSocket Connection_, the + // endpoint SHOULD send a Close frame with an appropriate status code + // (Section 7.4) before proceeding to _Close the WebSocket Connection_. + if (isEstablished(handler.readyState)) { + closeWebSocketConnection(handler, code, reason, false) } - // 1. Change the ready state to CLOSED (3). - ws[kReadyState] = states.CLOSED + handler.controller.abort() - // 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. - // TODO: process.nextTick - fireEvent('close', ws, (type, init) => new CloseEvent(type, init), { - 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) + if (handler.socket?.destroyed === false) { + handler.socket.destroy() } - this.destroy() + handler.onFail(code, reason) } module.exports = { establishWebSocketConnection, + failWebsocketConnection, closeWebSocketConnection } diff --git a/node_modules/undici/lib/web/websocket/constants.js b/node_modules/undici/lib/web/websocket/constants.js new file mode 100644 index 0000000..e4e6990 --- /dev/null +++ b/node_modules/undici/lib/web/websocket/constants.js @@ -0,0 +1,126 @@ +'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 + * @type {'258EAFA5-E914-47DA-95CA-C5AB0DC85B11'} + */ +const uid = '258EAFA5-E914-47DA-95CA-C5AB0DC85B11' + +/** + * @type {PropertyDescriptor} + */ +const staticPropertyDescriptors = { + enumerable: true, + writable: false, + configurable: false +} + +/** + * The states of the WebSocket connection. + * + * @readonly + * @enum + * @property {0} CONNECTING + * @property {1} OPEN + * @property {2} CLOSING + * @property {3} CLOSED + */ +const states = { + CONNECTING: 0, + OPEN: 1, + CLOSING: 2, + CLOSED: 3 +} + +/** + * @readonly + * @enum + * @property {0} NOT_SENT + * @property {1} PROCESSING + * @property {2} SENT + */ +const sentCloseFrameState = { + SENT: 1, + RECEIVED: 2 +} + +/** + * The WebSocket opcodes. + * + * @readonly + * @enum + * @property {0x0} CONTINUATION + * @property {0x1} TEXT + * @property {0x2} BINARY + * @property {0x8} CLOSE + * @property {0x9} PING + * @property {0xA} PONG + * @see https://datatracker.ietf.org/doc/html/rfc6455#section-5.2 + */ +const opcodes = { + CONTINUATION: 0x0, + TEXT: 0x1, + BINARY: 0x2, + CLOSE: 0x8, + PING: 0x9, + PONG: 0xA +} + +/** + * The maximum value for an unsigned 16-bit integer. + * + * @type {65535} 2 ** 16 - 1 + */ +const maxUnsigned16Bit = 65535 + +/** + * The states of the parser. + * + * @readonly + * @enum + * @property {0} INFO + * @property {2} PAYLOADLENGTH_16 + * @property {3} PAYLOADLENGTH_64 + * @property {4} READ_DATA + */ +const parserStates = { + INFO: 0, + PAYLOADLENGTH_16: 2, + PAYLOADLENGTH_64: 3, + READ_DATA: 4 +} + +/** + * An empty buffer. + * + * @type {Buffer} + */ +const emptyBuffer = Buffer.allocUnsafe(0) + +/** + * @readonly + * @property {1} text + * @property {2} typedArray + * @property {3} arrayBuffer + * @property {4} blob + */ +const sendHints = { + text: 1, + typedArray: 2, + arrayBuffer: 3, + blob: 4 +} + +module.exports = { + uid, + sentCloseFrameState, + staticPropertyDescriptors, + states, + opcodes, + maxUnsigned16Bit, + parserStates, + emptyBuffer, + sendHints +} diff --git a/node_modules/cheerio/node_modules/undici/lib/web/websocket/events.js b/node_modules/undici/lib/web/websocket/events.js similarity index 98% rename from node_modules/cheerio/node_modules/undici/lib/web/websocket/events.js rename to node_modules/undici/lib/web/websocket/events.js index f899c21..3432279 100644 --- a/node_modules/cheerio/node_modules/undici/lib/web/websocket/events.js +++ b/node_modules/undici/lib/web/websocket/events.js @@ -3,7 +3,6 @@ const { webidl } = require('../fetch/webidl') const { kEnumerableProperty } = require('../../core/util') const { kConstruct } = require('../../core/symbols') -const { MessagePort } = require('node:worker_threads') /** * @see https://html.spec.whatwg.org/multipage/comms.html#messageevent @@ -219,7 +218,10 @@ Object.defineProperties(ErrorEvent.prototype, { error: kEnumerableProperty }) -webidl.converters.MessagePort = webidl.interfaceConverter(MessagePort) +webidl.converters.MessagePort = webidl.interfaceConverter( + webidl.is.MessagePort, + 'MessagePort' +) webidl.converters['sequence<MessagePort>'] = webidl.sequenceConverter( webidl.converters.MessagePort diff --git a/node_modules/cheerio/node_modules/undici/lib/web/websocket/frame.js b/node_modules/undici/lib/web/websocket/frame.js similarity index 63% rename from node_modules/cheerio/node_modules/undici/lib/web/websocket/frame.js rename to node_modules/undici/lib/web/websocket/frame.js index b062ffd..e773b33 100644 --- a/node_modules/cheerio/node_modules/undici/lib/web/websocket/frame.js +++ b/node_modules/undici/lib/web/websocket/frame.js @@ -1,8 +1,8 @@ 'use strict' -const { maxUnsigned16Bit } = require('./constants') +const { maxUnsigned16Bit, opcodes } = require('./constants') -const BUFFER_SIZE = 16386 +const BUFFER_SIZE = 8 * 1024 /** @type {import('crypto')} */ let crypto @@ -27,7 +27,7 @@ try { function generateMask () { if (bufIdx === BUFFER_SIZE) { bufIdx = 0 - crypto.randomFillSync((buffer ??= Buffer.allocUnsafe(BUFFER_SIZE)), 0, BUFFER_SIZE) + crypto.randomFillSync((buffer ??= Buffer.allocUnsafeSlow(BUFFER_SIZE)), 0, BUFFER_SIZE) } return [buffer[bufIdx++], buffer[bufIdx++], buffer[bufIdx++], buffer[bufIdx++]] } @@ -89,6 +89,48 @@ class WebsocketFrameSend { return buffer } + + /** + * @param {Uint8Array} buffer + */ + static createFastTextFrame (buffer) { + const maskKey = generateMask() + + const bodyLength = buffer.length + + // mask body + for (let i = 0; i < bodyLength; ++i) { + buffer[i] ^= maskKey[i & 3] + } + + let payloadLength = bodyLength + 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 head = Buffer.allocUnsafeSlow(offset) + + head[0] = 0x80 /* FIN */ | opcodes.TEXT /* opcode TEXT */ + head[1] = payloadLength | 0x80 /* MASK */ + head[offset - 4] = maskKey[0] + head[offset - 3] = maskKey[1] + head[offset - 2] = maskKey[2] + head[offset - 1] = maskKey[3] + + if (payloadLength === 126) { + head.writeUInt16BE(bodyLength, 2) + } else if (payloadLength === 127) { + head[2] = head[3] = 0 + head.writeUIntBE(bodyLength, 4, 6) + } + + return [head, buffer] + } } module.exports = { diff --git a/node_modules/cheerio/node_modules/undici/lib/web/websocket/permessage-deflate.js b/node_modules/undici/lib/web/websocket/permessage-deflate.js similarity index 100% rename from node_modules/cheerio/node_modules/undici/lib/web/websocket/permessage-deflate.js rename to node_modules/undici/lib/web/websocket/permessage-deflate.js diff --git a/node_modules/cheerio/node_modules/undici/lib/web/websocket/receiver.js b/node_modules/undici/lib/web/websocket/receiver.js similarity index 73% rename from node_modules/cheerio/node_modules/undici/lib/web/websocket/receiver.js rename to node_modules/undici/lib/web/websocket/receiver.js index 581c251..3ea603e 100644 --- a/node_modules/cheerio/node_modules/undici/lib/web/websocket/receiver.js +++ b/node_modules/undici/lib/web/websocket/receiver.js @@ -3,20 +3,18 @@ const { Writable } = require('node:stream') const assert = require('node:assert') const { parserStates, opcodes, states, emptyBuffer, sentCloseFrameState } = require('./constants') -const { kReadyState, kSentClose, kResponse, kReceivedClose } = require('./symbols') const { channels } = require('../../core/diagnostics') const { isValidStatusCode, isValidOpcode, - failWebsocketConnection, websocketMessageReceived, utf8Decode, isControlFrame, isTextBinaryFrame, isContinuationFrame } = require('./util') +const { failWebsocketConnection } = require('./connection') const { WebsocketFrameSend } = require('./frame') -const { closeWebSocketConnection } = require('./connection') const { PerMessageDeflate } = require('./permessage-deflate') // This code was influenced by ws released under the MIT license. @@ -26,6 +24,7 @@ const { PerMessageDeflate } = require('./permessage-deflate') class ByteParser extends Writable { #buffers = [] + #fragmentsBytes = 0 #byteOffset = 0 #loop = false @@ -37,10 +36,13 @@ class ByteParser extends Writable { /** @type {Map<string, PerMessageDeflate>} */ #extensions - constructor (ws, extensions) { + /** @type {import('./websocket').Handler} */ + #handler + + constructor (handler, extensions) { super() - this.ws = ws + this.#handler = handler this.#extensions = extensions == null ? new Map() : extensions if (this.#extensions.has('permessage-deflate')) { @@ -86,12 +88,12 @@ class ByteParser extends Writable { const rsv3 = buffer[0] & 0x10 if (!isValidOpcode(opcode)) { - failWebsocketConnection(this.ws, 'Invalid opcode received') + failWebsocketConnection(this.#handler, 1002, 'Invalid opcode received') return callback() } if (masked) { - failWebsocketConnection(this.ws, 'Frame cannot be masked') + failWebsocketConnection(this.#handler, 1002, 'Frame cannot be masked') return callback() } @@ -105,43 +107,43 @@ class ByteParser extends Writable { // WebSocket connection where a PMCE is in use, this bit indicates // whether a message is compressed or not. if (rsv1 !== 0 && !this.#extensions.has('permessage-deflate')) { - failWebsocketConnection(this.ws, 'Expected RSV1 to be clear.') + failWebsocketConnection(this.#handler, 1002, 'Expected RSV1 to be clear.') return } if (rsv2 !== 0 || rsv3 !== 0) { - failWebsocketConnection(this.ws, 'RSV1, RSV2, RSV3 must be clear') + failWebsocketConnection(this.#handler, 1002, 'RSV1, RSV2, RSV3 must be clear') return } if (fragmented && !isTextBinaryFrame(opcode)) { // Only text and binary frames can be fragmented - failWebsocketConnection(this.ws, 'Invalid frame type was fragmented.') + failWebsocketConnection(this.#handler, 1002, 'Invalid frame type was fragmented.') return } // If we are already parsing a text/binary frame and do not receive either // a continuation frame or close frame, fail the connection. if (isTextBinaryFrame(opcode) && this.#fragments.length > 0) { - failWebsocketConnection(this.ws, 'Expected continuation frame') + failWebsocketConnection(this.#handler, 1002, 'Expected continuation frame') return } if (this.#info.fragmented && fragmented) { // A fragmented frame can't be fragmented itself - failWebsocketConnection(this.ws, 'Fragmented frame exceeded 125 bytes.') + failWebsocketConnection(this.#handler, 1002, 'Fragmented frame exceeded 125 bytes.') return } // "All control frames MUST have a payload length of 125 bytes or less // and MUST NOT be fragmented." if ((payloadLength > 125 || fragmented) && isControlFrame(opcode)) { - failWebsocketConnection(this.ws, 'Control frame either too large or fragmented') + failWebsocketConnection(this.#handler, 1002, 'Control frame either too large or fragmented') return } if (isContinuationFrame(opcode) && this.#fragments.length === 0 && !this.#info.compressed) { - failWebsocketConnection(this.ws, 'Unexpected continuation frame') + failWebsocketConnection(this.#handler, 1002, 'Unexpected continuation frame') return } @@ -187,7 +189,7 @@ class ByteParser extends Writable { // 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.') + failWebsocketConnection(this.#handler, 1009, 'Received payload length > 2^31 bytes.') return } @@ -207,27 +209,25 @@ class ByteParser extends Writable { this.#state = parserStates.INFO } else { if (!this.#info.compressed) { - this.#fragments.push(body) + this.writeFragments(body) // If the frame is not fragmented, a message has been received. // If the frame is fragmented, it will terminate with a fin bit set // and an opcode of 0 (continuation), therefore we handle that when // parsing continuation frames, not here. if (!this.#info.fragmented && this.#info.fin) { - const fullMessage = Buffer.concat(this.#fragments) - websocketMessageReceived(this.ws, this.#info.binaryType, fullMessage) - this.#fragments.length = 0 + websocketMessageReceived(this.#handler, this.#info.binaryType, this.consumeFragments()) } this.#state = parserStates.INFO } else { this.#extensions.get('permessage-deflate').decompress(body, this.#info.fin, (error, data) => { if (error) { - closeWebSocketConnection(this.ws, 1007, error.message, error.message.length) + failWebsocketConnection(this.#handler, 1007, error.message) return } - this.#fragments.push(data) + this.writeFragments(data) if (!this.#info.fin) { this.#state = parserStates.INFO @@ -236,11 +236,10 @@ class ByteParser extends Writable { return } - websocketMessageReceived(this.ws, this.#info.binaryType, Buffer.concat(this.#fragments)) + websocketMessageReceived(this.#handler, this.#info.binaryType, this.consumeFragments()) this.#loop = true this.#state = parserStates.INFO - this.#fragments.length = 0 this.run(callback) }) @@ -264,34 +263,70 @@ class ByteParser extends Writable { 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 + const first = this.#buffers[0] + + if (first.length > n) { + // replace with remaining buffer + this.#buffers[0] = first.subarray(n, first.length) + return first.subarray(0, n) + } else if (first.length === n) { + // prefect match + return this.#buffers.shift() + } else { + let offset = 0 + // If Buffer.allocUnsafe is used, extra copies will be made because the offset is non-zero. + const buffer = Buffer.allocUnsafeSlow(n) + while (offset !== n) { + const next = this.#buffers[0] + const length = next.length + + 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 += length + } + } + + return buffer + } + } + + writeFragments (fragment) { + this.#fragmentsBytes += fragment.length + this.#fragments.push(fragment) + } + + consumeFragments () { + const fragments = this.#fragments + + if (fragments.length === 1) { + // single fragment + this.#fragmentsBytes = 0 + return fragments.shift() + } + + let offset = 0 + // If Buffer.allocUnsafe is used, extra copies will be made because the offset is non-zero. + const output = Buffer.allocUnsafeSlow(this.#fragmentsBytes) + + for (let i = 0; i < fragments.length; ++i) { + const buffer = fragments[i] + output.set(buffer, offset) + offset += buffer.length + } + + this.#fragments = [] + this.#fragmentsBytes = 0 + + return output } parseCloseBody (data) { @@ -339,7 +374,7 @@ class ByteParser extends Writable { if (opcode === opcodes.CLOSE) { if (payloadLength === 1) { - failWebsocketConnection(this.ws, 'Received close frame with a 1-byte body.') + failWebsocketConnection(this.#handler, 1002, 'Received close frame with a 1-byte body.') return false } @@ -348,12 +383,13 @@ class ByteParser extends Writable { if (this.#info.closeInfo.error) { const { code, reason } = this.#info.closeInfo - closeWebSocketConnection(this.ws, code, reason, reason.length) - failWebsocketConnection(this.ws, reason) + failWebsocketConnection(this.#handler, code, reason) return false } - if (this.ws[kSentClose] !== sentCloseFrameState.SENT) { + // Upon receiving such a frame, the other peer sends a + // Close frame in response, if it hasn't already sent one. + if (!this.#handler.closeState.has(sentCloseFrameState.SENT) && !this.#handler.closeState.has(sentCloseFrameState.RECEIVED)) { // 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 @@ -365,21 +401,15 @@ class ByteParser extends Writable { } const closeFrame = new WebsocketFrameSend(body) - this.ws[kResponse].socket.write( - closeFrame.createFrame(opcodes.CLOSE), - (err) => { - if (!err) { - this.ws[kSentClose] = sentCloseFrameState.SENT - } - } - ) + this.#handler.socket.write(closeFrame.createFrame(opcodes.CLOSE)) + this.#handler.closeState.add(sentCloseFrameState.SENT) } // 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.#handler.readyState = states.CLOSING + this.#handler.closeState.add(sentCloseFrameState.RECEIVED) return false } else if (opcode === opcodes.PING) { @@ -388,10 +418,10 @@ class ByteParser extends Writable { // A Pong frame sent in response to a Ping frame must have identical // "Application data" - if (!this.ws[kReceivedClose]) { + if (!this.#handler.closeState.has(sentCloseFrameState.RECEIVED)) { const frame = new WebsocketFrameSend(body) - this.ws[kResponse].socket.write(frame.createFrame(opcodes.PONG)) + this.#handler.socket.write(frame.createFrame(opcodes.PONG)) if (channels.ping.hasSubscribers) { channels.ping.publish({ diff --git a/node_modules/cheerio/node_modules/undici/lib/web/websocket/sender.js b/node_modules/undici/lib/web/websocket/sender.js similarity index 72% rename from node_modules/cheerio/node_modules/undici/lib/web/websocket/sender.js rename to node_modules/undici/lib/web/websocket/sender.js index 1b1468d..c647bf6 100644 --- a/node_modules/cheerio/node_modules/undici/lib/web/websocket/sender.js +++ b/node_modules/undici/lib/web/websocket/sender.js @@ -4,9 +4,6 @@ const { WebsocketFrameSend } = require('./frame') const { opcodes, sendHints } = require('./constants') const FixedQueue = require('../../dispatcher/fixed-queue') -/** @type {typeof Uint8Array} */ -const FastBuffer = Buffer[Symbol.species] - /** * @typedef {object} SendQueueNode * @property {Promise<void> | null} promise @@ -34,16 +31,25 @@ class SendQueue { add (item, cb, hint) { if (hint !== sendHints.blob) { - const frame = createFrame(item, hint) if (!this.#running) { - // fast-path - this.#socket.write(frame, cb) + // TODO(@tsctx): support fast-path for string on running + if (hint === sendHints.text) { + // special fast-path for string + const { 0: head, 1: body } = WebsocketFrameSend.createFastTextFrame(item) + this.#socket.cork() + this.#socket.write(head) + this.#socket.write(body, cb) + this.#socket.uncork() + } else { + // direct writing + this.#socket.write(createFrame(item, hint), cb) + } } else { /** @type {SendQueueNode} */ const node = { promise: null, callback: cb, - frame + frame: createFrame(item, hint) } this.#queue.push(node) } @@ -86,18 +92,17 @@ class SendQueue { } function createFrame (data, hint) { - return new WebsocketFrameSend(toBuffer(data, hint)).createFrame(hint === sendHints.string ? opcodes.TEXT : opcodes.BINARY) + return new WebsocketFrameSend(toBuffer(data, hint)).createFrame(hint === sendHints.text ? opcodes.TEXT : opcodes.BINARY) } function toBuffer (data, hint) { switch (hint) { - case sendHints.string: - return Buffer.from(data) + case sendHints.text: + case sendHints.typedArray: + return new Uint8Array(data.buffer, data.byteOffset, data.byteLength) case sendHints.arrayBuffer: case sendHints.blob: - return new FastBuffer(data) - case sendHints.typedArray: - return new FastBuffer(data.buffer, data.byteOffset, data.byteLength) + return new Uint8Array(data) } } diff --git a/node_modules/undici/lib/web/websocket/stream/websocketerror.js b/node_modules/undici/lib/web/websocket/stream/websocketerror.js new file mode 100644 index 0000000..888af98 --- /dev/null +++ b/node_modules/undici/lib/web/websocket/stream/websocketerror.js @@ -0,0 +1,83 @@ +'use strict' + +const { webidl } = require('../../fetch/webidl') +const { validateCloseCodeAndReason } = require('../util') +const { kConstruct } = require('../../../core/symbols') +const { kEnumerableProperty } = require('../../../core/util') + +class WebSocketError extends DOMException { + #closeCode + #reason + + constructor (message = '', init = undefined) { + message = webidl.converters.DOMString(message, 'WebSocketError', 'message') + + // 1. Set this 's name to " WebSocketError ". + // 2. Set this 's message to message . + super(message, 'WebSocketError') + + if (init === kConstruct) { + return + } else if (init !== null) { + init = webidl.converters.WebSocketCloseInfo(init) + } + + // 3. Let code be init [" closeCode "] if it exists , or null otherwise. + let code = init.closeCode ?? null + + // 4. Let reason be init [" reason "] if it exists , or the empty string otherwise. + const reason = init.reason ?? '' + + // 5. Validate close code and reason with code and reason . + validateCloseCodeAndReason(code, reason) + + // 6. If reason is non-empty, but code is not set, then set code to 1000 ("Normal Closure"). + if (reason.length !== 0 && code === null) { + code = 1000 + } + + // 7. Set this 's closeCode to code . + this.#closeCode = code + + // 8. Set this 's reason to reason . + this.#reason = reason + } + + get closeCode () { + return this.#closeCode + } + + get reason () { + return this.#reason + } + + /** + * @param {string} message + * @param {number|null} code + * @param {string} reason + */ + static createUnvalidatedWebSocketError (message, code, reason) { + const error = new WebSocketError(message, kConstruct) + error.#closeCode = code + error.#reason = reason + return error + } +} + +const { createUnvalidatedWebSocketError } = WebSocketError +delete WebSocketError.createUnvalidatedWebSocketError + +Object.defineProperties(WebSocketError.prototype, { + closeCode: kEnumerableProperty, + reason: kEnumerableProperty, + [Symbol.toStringTag]: { + value: 'WebSocketError', + writable: false, + enumerable: false, + configurable: true + } +}) + +webidl.is.WebSocketError = webidl.util.MakeTypeAssertion(WebSocketError) + +module.exports = { WebSocketError, createUnvalidatedWebSocketError } diff --git a/node_modules/undici/lib/web/websocket/stream/websocketstream.js b/node_modules/undici/lib/web/websocket/stream/websocketstream.js new file mode 100644 index 0000000..c44183d --- /dev/null +++ b/node_modules/undici/lib/web/websocket/stream/websocketstream.js @@ -0,0 +1,485 @@ +'use strict' + +const { createDeferredPromise, environmentSettingsObject } = require('../../fetch/util') +const { states, opcodes, sentCloseFrameState } = require('../constants') +const { webidl } = require('../../fetch/webidl') +const { getURLRecord, isValidSubprotocol, isEstablished, utf8Decode } = require('../util') +const { establishWebSocketConnection, failWebsocketConnection, closeWebSocketConnection } = require('../connection') +const { types } = require('node:util') +const { channels } = require('../../../core/diagnostics') +const { WebsocketFrameSend } = require('../frame') +const { ByteParser } = require('../receiver') +const { WebSocketError, createUnvalidatedWebSocketError } = require('./websocketerror') +const { utf8DecodeBytes } = require('../../fetch/util') +const { kEnumerableProperty } = require('../../../core/util') + +let emittedExperimentalWarning = false + +class WebSocketStream { + // Each WebSocketStream object has an associated url , which is a URL record . + /** @type {URL} */ + #url + + // Each WebSocketStream object has an associated opened promise , which is a promise. + /** @type {ReturnType<typeof createDeferredPromise>} */ + #openedPromise + + // Each WebSocketStream object has an associated closed promise , which is a promise. + /** @type {ReturnType<typeof createDeferredPromise>} */ + #closedPromise + + // Each WebSocketStream object has an associated readable stream , which is a ReadableStream . + /** @type {ReadableStream} */ + #readableStream + /** @type {ReadableStreamDefaultController} */ + #readableStreamController + + // Each WebSocketStream object has an associated writable stream , which is a WritableStream . + /** @type {WritableStream} */ + #writableStream + + // Each WebSocketStream object has an associated boolean handshake aborted , which is initially false. + #handshakeAborted = false + + /** @type {import('../websocket').Handler} */ + #handler = { + // https://whatpr.org/websockets/48/7b748d3...d5570f3.html#feedback-to-websocket-stream-from-the-protocol + onConnectionEstablished: (response, extensions) => this.#onConnectionEstablished(response, extensions), + onFail: (_code, _reason) => {}, + onMessage: (opcode, data) => this.#onMessage(opcode, data), + onParserError: (err) => failWebsocketConnection(this.#handler, null, err.message), + onParserDrain: () => this.#handler.socket.resume(), + onSocketData: (chunk) => { + if (!this.#parser.write(chunk)) { + this.#handler.socket.pause() + } + }, + onSocketError: (err) => { + this.#handler.readyState = states.CLOSING + + if (channels.socketError.hasSubscribers) { + channels.socketError.publish(err) + } + + this.#handler.socket.destroy() + }, + onSocketClose: () => this.#onSocketClose(), + + readyState: states.CONNECTING, + socket: null, + closeState: new Set(), + controller: null, + wasEverConnected: false + } + + /** @type {import('../receiver').ByteParser} */ + #parser + + constructor (url, options = undefined) { + if (!emittedExperimentalWarning) { + process.emitWarning('WebSocketStream is experimental! Expect it to change at any time.', { + code: 'UNDICI-WSS' + }) + emittedExperimentalWarning = true + } + + webidl.argumentLengthCheck(arguments, 1, 'WebSocket') + + url = webidl.converters.USVString(url) + if (options !== null) { + options = webidl.converters.WebSocketStreamOptions(options) + } + + // 1. Let baseURL be this 's relevant settings object 's API base URL . + const baseURL = environmentSettingsObject.settingsObject.baseUrl + + // 2. Let urlRecord be the result of getting a URL record given url and baseURL . + const urlRecord = getURLRecord(url, baseURL) + + // 3. Let protocols be options [" protocols "] if it exists , otherwise an empty sequence. + const protocols = options.protocols + + // 4. 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 . [WSP] + 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') + } + + // 5. Set this 's url to urlRecord . + this.#url = urlRecord.toString() + + // 6. Set this 's opened promise and closed promise to new promises. + this.#openedPromise = createDeferredPromise() + this.#closedPromise = createDeferredPromise() + + // 7. Apply backpressure to the WebSocket. + // TODO + + // 8. If options [" signal "] exists , + if (options.signal != null) { + // 8.1. Let signal be options [" signal "]. + const signal = options.signal + + // 8.2. If signal is aborted , then reject this 's opened promise and closed promise with signal ’s abort reason + // and return. + if (signal.aborted) { + this.#openedPromise.reject(signal.reason) + this.#closedPromise.reject(signal.reason) + return + } + + // 8.3. Add the following abort steps to signal : + signal.addEventListener('abort', () => { + // 8.3.1. If the WebSocket connection is not yet established : [WSP] + if (!isEstablished(this.#handler.readyState)) { + // 8.3.1.1. Fail the WebSocket connection . + failWebsocketConnection(this.#handler) + + // Set this 's ready state to CLOSING . + this.#handler.readyState = states.CLOSING + + // Reject this 's opened promise and closed promise with signal ’s abort reason . + this.#openedPromise.reject(signal.reason) + this.#closedPromise.reject(signal.reason) + + // Set this 's handshake aborted to true. + this.#handshakeAborted = true + } + }, { once: true }) + } + + // 9. Let client be this 's relevant settings object . + const client = environmentSettingsObject.settingsObject + + // 10. Run this step in parallel : + // 10.1. Establish a WebSocket connection given urlRecord , protocols , and client . [FETCH] + this.#handler.controller = establishWebSocketConnection( + urlRecord, + protocols, + client, + this.#handler, + options + ) + } + + // The url getter steps are to return this 's url , serialized . + get url () { + return this.#url.toString() + } + + // The opened getter steps are to return this 's opened promise . + get opened () { + return this.#openedPromise.promise + } + + // The closed getter steps are to return this 's closed promise . + get closed () { + return this.#closedPromise.promise + } + + // The close( closeInfo ) method steps are: + close (closeInfo = undefined) { + if (closeInfo !== null) { + closeInfo = webidl.converters.WebSocketCloseInfo(closeInfo) + } + + // 1. Let code be closeInfo [" closeCode "] if present, or null otherwise. + const code = closeInfo.closeCode ?? null + + // 2. Let reason be closeInfo [" reason "]. + const reason = closeInfo.reason + + // 3. Close the WebSocket with this , code , and reason . + closeWebSocketConnection(this.#handler, code, reason, true) + } + + #write (chunk) { + // 1. Let promise be a new promise created in stream ’s relevant realm . + const promise = createDeferredPromise() + + // 2. Let data be null. + let data = null + + // 3. Let opcode be null. + let opcode = null + + // 4. If chunk is a BufferSource , + if (ArrayBuffer.isView(chunk) || types.isArrayBuffer(chunk)) { + // 4.1. Set data to a copy of the bytes given chunk . + data = new Uint8Array(ArrayBuffer.isView(chunk) ? new Uint8Array(chunk.buffer, chunk.byteOffset, chunk.byteLength) : chunk) + + // 4.2. Set opcode to a binary frame opcode. + opcode = opcodes.BINARY + } else { + // 5. Otherwise, + + // 5.1. Let string be the result of converting chunk to an IDL USVString . + // If this throws an exception, return a promise rejected with the exception. + let string + + try { + string = webidl.converters.DOMString(chunk) + } catch (e) { + promise.reject(e) + return + } + + // 5.2. Set data to the result of UTF-8 encoding string . + data = new TextEncoder().encode(string) + + // 5.3. Set opcode to a text frame opcode. + opcode = opcodes.TEXT + } + + // 6. In parallel, + // 6.1. Wait until there is sufficient buffer space in stream to send the message. + + // 6.2. If the closing handshake has not yet started , Send a WebSocket Message to stream comprised of data using opcode . + if (!this.#handler.closeState.has(sentCloseFrameState.SENT) && !this.#handler.closeState.has(sentCloseFrameState.RECEIVED)) { + const frame = new WebsocketFrameSend(data) + + this.#handler.socket.write(frame.createFrame(opcode), () => { + promise.resolve(undefined) + }) + } + + // 6.3. Queue a global task on the WebSocket task source given stream ’s relevant global object to resolve promise with undefined. + return promise + } + + /** @type {import('../websocket').Handler['onConnectionEstablished']} */ + #onConnectionEstablished (response, parsedExtensions) { + this.#handler.socket = response.socket + + const parser = new ByteParser(this.#handler, parsedExtensions) + parser.on('drain', () => this.#handler.onParserDrain()) + parser.on('error', (err) => this.#handler.onParserError(err)) + + this.#parser = parser + + // 1. Change stream ’s ready state to OPEN (1). + this.#handler.readyState = states.OPEN + + // 2. Set stream ’s was ever connected to true. + // This is done in the opening handshake. + + // 3. Let extensions be the extensions in use . + const extensions = parsedExtensions ?? '' + + // 4. Let protocol be the subprotocol in use . + const protocol = response.headersList.get('sec-websocket-protocol') ?? '' + + // 5. Let pullAlgorithm be an action that pulls bytes from stream . + // 6. Let cancelAlgorithm be an action that cancels stream with reason , given reason . + // 7. Let readable be a new ReadableStream . + // 8. Set up readable with pullAlgorithm and cancelAlgorithm . + const readable = new ReadableStream({ + start: (controller) => { + this.#readableStreamController = controller + }, + pull (controller) { + let chunk + while (controller.desiredSize > 0 && (chunk = response.socket.read()) !== null) { + controller.enqueue(chunk) + } + }, + cancel: (reason) => this.#cancel(reason) + }) + + // 9. Let writeAlgorithm be an action that writes chunk to stream , given chunk . + // 10. Let closeAlgorithm be an action that closes stream . + // 11. Let abortAlgorithm be an action that aborts stream with reason , given reason . + // 12. Let writable be a new WritableStream . + // 13. Set up writable with writeAlgorithm , closeAlgorithm , and abortAlgorithm . + const writable = new WritableStream({ + write: (chunk) => this.#write(chunk), + close: () => closeWebSocketConnection(this.#handler, null, null), + abort: (reason) => this.#closeUsingReason(reason) + }) + + // Set stream ’s readable stream to readable . + this.#readableStream = readable + + // Set stream ’s writable stream to writable . + this.#writableStream = writable + + // Resolve stream ’s opened promise with WebSocketOpenInfo «[ " extensions " → extensions , " protocol " → protocol , " readable " → readable , " writable " → writable ]». + this.#openedPromise.resolve({ + extensions, + protocol, + readable, + writable + }) + } + + /** @type {import('../websocket').Handler['onMessage']} */ + #onMessage (type, data) { + // 1. If stream’s ready state is not OPEN (1), then return. + if (this.#handler.readyState !== states.OPEN) { + return + } + + // 2. Let chunk be determined by switching on type: + // - type indicates that the data is Text + // a new DOMString containing data + // - type indicates that the data is Binary + // a new Uint8Array object, created in the relevant Realm of the + // WebSocketStream object, whose contents are data + let chunk + + if (type === opcodes.TEXT) { + try { + chunk = utf8Decode(data) + } catch { + failWebsocketConnection(this.#handler, 'Received invalid UTF-8 in text frame.') + return + } + } else if (type === opcodes.BINARY) { + chunk = new Uint8Array(data.buffer, data.byteOffset, data.byteLength) + } + + // 3. Enqueue chunk into stream’s readable stream. + this.#readableStreamController.enqueue(chunk) + + // 4. Apply backpressure to the WebSocket. + } + + /** @type {import('../websocket').Handler['onSocketClose']} */ + #onSocketClose () { + const wasClean = + this.#handler.closeState.has(sentCloseFrameState.SENT) && + this.#handler.closeState.has(sentCloseFrameState.RECEIVED) + + // 1. Change the ready state to CLOSED (3). + this.#handler.readyState = states.CLOSED + + // 2. If stream ’s handshake aborted is true, then return. + if (this.#handshakeAborted) { + return + } + + // 3. If stream ’s was ever connected is false, then reject stream ’s opened promise with a new WebSocketError. + if (!this.#handler.wasEverConnected) { + this.#openedPromise.reject(new WebSocketError('Socket never opened')) + } + + const result = this.#parser.closingInfo + + // 4. Let code be the WebSocket connection close code . + // https://datatracker.ietf.org/doc/html/rfc6455#section-7.1.5 + // If this Close control frame contains no status code, _The WebSocket + // Connection Close Code_ is considered to be 1005. 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. + let code = result?.code ?? 1005 + + if (!this.#handler.closeState.has(sentCloseFrameState.SENT) && !this.#handler.closeState.has(sentCloseFrameState.RECEIVED)) { + code = 1006 + } + + // 5. Let reason be the result of applying UTF-8 decode without BOM to the WebSocket connection close reason . + const reason = result?.reason == null ? '' : utf8DecodeBytes(Buffer.from(result.reason)) + + // 6. If the connection was closed cleanly , + if (wasClean) { + // 6.1. Close stream ’s readable stream . + this.#readableStream.cancel().catch(() => {}) + + // 6.2. Error stream ’s writable stream with an " InvalidStateError " DOMException indicating that a closed WebSocketStream cannot be written to. + if (!this.#writableStream.locked) { + this.#writableStream.abort(new DOMException('A closed WebSocketStream cannot be written to', 'InvalidStateError')) + } + + // 6.3. Resolve stream ’s closed promise with WebSocketCloseInfo «[ " closeCode " → code , " reason " → reason ]». + this.#closedPromise.resolve({ + closeCode: code, + reason + }) + } else { + // 7. Otherwise, + + // 7.1. Let error be a new WebSocketError whose closeCode is code and reason is reason . + const error = createUnvalidatedWebSocketError('unclean close', code, reason) + + // 7.2. Error stream ’s readable stream with error . + this.#readableStreamController.error(error) + + // 7.3. Error stream ’s writable stream with error . + this.#writableStream.abort(error) + + // 7.4. Reject stream ’s closed promise with error . + this.#closedPromise.reject(error) + } + } + + #closeUsingReason (reason) { + // 1. Let code be null. + let code = null + + // 2. Let reasonString be the empty string. + let reasonString = '' + + // 3. If reason implements WebSocketError , + if (webidl.is.WebSocketError(reason)) { + // 3.1. Set code to reason ’s closeCode . + code = reason.closeCode + + // 3.2. Set reasonString to reason ’s reason . + reasonString = reason.reason + } + + // 4. Close the WebSocket with stream , code , and reasonString . If this throws an exception, + // discard code and reasonString and close the WebSocket with stream . + closeWebSocketConnection(this.#handler, code, reasonString) + } + + // To cancel a WebSocketStream stream given reason , close using reason giving stream and reason . + #cancel (reason) { + this.#closeUsingReason(reason) + } +} + +Object.defineProperties(WebSocketStream.prototype, { + url: kEnumerableProperty, + opened: kEnumerableProperty, + closed: kEnumerableProperty, + close: kEnumerableProperty, + [Symbol.toStringTag]: { + value: 'WebSocketStream', + writable: false, + enumerable: false, + configurable: true + } +}) + +webidl.converters.WebSocketStreamOptions = webidl.dictionaryConverter([ + { + key: 'protocols', + converter: webidl.sequenceConverter(webidl.converters.USVString), + defaultValue: () => [] + }, + { + key: 'signal', + converter: webidl.nullableConverter(webidl.converters.AbortSignal), + defaultValue: () => null + } +]) + +webidl.converters.WebSocketCloseInfo = webidl.dictionaryConverter([ + { + key: 'closeCode', + converter: (V) => webidl.converters['unsigned short'](V, { enforceRange: true }) + }, + { + key: 'reason', + converter: webidl.converters.USVString, + defaultValue: () => '' + } +]) + +module.exports = { WebSocketStream } diff --git a/node_modules/cheerio/node_modules/undici/lib/web/websocket/util.js b/node_modules/undici/lib/web/websocket/util.js similarity index 62% rename from node_modules/cheerio/node_modules/undici/lib/web/websocket/util.js rename to node_modules/undici/lib/web/websocket/util.js index e5ce789..ae8f076 100644 --- a/node_modules/cheerio/node_modules/undici/lib/web/websocket/util.js +++ b/node_modules/undici/lib/web/websocket/util.js @@ -1,51 +1,47 @@ 'use strict' -const { kReadyState, kController, kResponse, kBinaryType, kWebSocketURL } = require('./symbols') const { states, opcodes } = require('./constants') -const { ErrorEvent, createFastMessageEvent } = require('./events') const { isUtf8 } = require('node:buffer') const { collectASequenceOfCodePointsFast, removeHTTPWhitespace } = require('../fetch/data-url') -/* globals Blob */ - /** - * @param {import('./websocket').WebSocket} ws + * @param {number} readyState * @returns {boolean} */ -function isConnecting (ws) { +function isConnecting (readyState) { // If the WebSocket connection is not yet established, and the connection // is not yet closed, then the WebSocket connection is in the CONNECTING state. - return ws[kReadyState] === states.CONNECTING + return readyState === states.CONNECTING } /** - * @param {import('./websocket').WebSocket} ws + * @param {number} readyState * @returns {boolean} */ -function isEstablished (ws) { +function isEstablished (readyState) { // 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 + return readyState === states.OPEN } /** - * @param {import('./websocket').WebSocket} ws + * @param {number} readyState * @returns {boolean} */ -function isClosing (ws) { +function isClosing (readyState) { // 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 + return readyState === states.CLOSING } /** - * @param {import('./websocket').WebSocket} ws + * @param {number} readyState * @returns {boolean} */ -function isClosed (ws) { - return ws[kReadyState] === states.CLOSED +function isClosed (readyState) { + return readyState === states.CLOSED } /** @@ -54,6 +50,7 @@ function isClosed (ws) { * @param {EventTarget} target * @param {(...args: ConstructorParameters<typeof Event>) => Event} eventFactory * @param {EventInit | undefined} eventInitDict + * @returns {void} */ function fireEvent (e, target, eventFactory = (type, init) => new Event(type, init), eventInitDict = {}) { // 1. If eventConstructor is not given, then let eventConstructor be Event. @@ -73,56 +70,24 @@ function fireEvent (e, target, eventFactory = (type, init) => new Event(type, in /** * @see https://websockets.spec.whatwg.org/#feedback-from-the-protocol - * @param {import('./websocket').WebSocket} ws + * @param {import('./websocket').Handler} handler * @param {number} type Opcode * @param {Buffer} data application data + * @returns {void} */ -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 = utf8Decode(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 = toArrayBuffer(data) - } - } - - // 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, createFastMessageEvent, { - origin: ws[kWebSocketURL].origin, - data: dataForEvent - }) +function websocketMessageReceived (handler, type, data) { + handler.onMessage(type, data) } +/** + * @param {Buffer} buffer + * @returns {ArrayBuffer} + */ function toArrayBuffer (buffer) { if (buffer.byteLength === buffer.buffer.byteLength) { return buffer.buffer } - return buffer.buffer.slice(buffer.byteOffset, buffer.byteOffset + buffer.byteLength) + return new Uint8Array(buffer).buffer } /** @@ -130,6 +95,7 @@ function toArrayBuffer (buffer) { * @see https://datatracker.ietf.org/doc/html/rfc2616 * @see https://bugs.chromium.org/p/chromium/issues/detail?id=398407 * @param {string} protocol + * @returns {boolean} */ function isValidSubprotocol (protocol) { // If present, this value indicates one @@ -176,6 +142,7 @@ function isValidSubprotocol (protocol) { /** * @see https://datatracker.ietf.org/doc/html/rfc6455#section-7-4 * @param {number} code + * @returns {boolean} */ function isValidStatusCode (code) { if (code >= 1000 && code < 1015) { @@ -189,31 +156,10 @@ function isValidStatusCode (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) { - // TODO: process.nextTick - fireEvent('error', ws, (type, init) => new ErrorEvent(type, init), { - error: new Error(reason), - message: reason - }) - } -} - /** * @see https://datatracker.ietf.org/doc/html/rfc6455#section-5.5 * @param {number} opcode + * @returns {boolean} */ function isControlFrame (opcode) { return ( @@ -223,14 +169,27 @@ function isControlFrame (opcode) { ) } +/** + * @param {number} opcode + * @returns {boolean} + */ function isContinuationFrame (opcode) { return opcode === opcodes.CONTINUATION } +/** + * @param {number} opcode + * @returns {boolean} + */ function isTextBinaryFrame (opcode) { return opcode === opcodes.TEXT || opcode === opcodes.BINARY } +/** + * + * @param {number} opcode + * @returns {boolean} + */ function isValidOpcode (opcode) { return isTextBinaryFrame(opcode) || isContinuationFrame(opcode) || isControlFrame(opcode) } @@ -247,7 +206,7 @@ function parseExtensions (extensions) { while (position.position < extensions.length) { const pair = collectASequenceOfCodePointsFast(';', extensions, position) - const [name, value = ''] = pair.split('=') + const [name, value = ''] = pair.split('=', 2) extensionList.set( removeHTTPWhitespace(name, true, false), @@ -264,6 +223,7 @@ function parseExtensions (extensions) { * @see https://www.rfc-editor.org/rfc/rfc7692#section-7.1.2.2 * @description "client-max-window-bits = 1*DIGIT" * @param {string} value + * @returns {boolean} */ function isValidClientWindowBits (value) { for (let i = 0; i < value.length; i++) { @@ -277,22 +237,84 @@ function isValidClientWindowBits (value) { return true } -// https://nodejs.org/api/intl.html#detecting-internationalization-support -const hasIntl = typeof process.versions.icu === 'string' -const fatalDecoder = hasIntl ? new TextDecoder('utf-8', { fatal: true }) : undefined +/** + * @see https://whatpr.org/websockets/48/7b748d3...d5570f3.html#get-a-url-record + * @param {string} url + * @param {string} [baseURL] + */ +function getURLRecord (url, baseURL) { + // 1. Let urlRecord be the result of applying the URL parser to url with baseURL . + // 2. If urlRecord is failure, then throw a " SyntaxError " DOMException . + let urlRecord + + try { + urlRecord = new URL(url, baseURL) + } catch (e) { + throw new DOMException(e, 'SyntaxError') + } + + // 3. If urlRecord ’s scheme is " http ", then set urlRecord ’s scheme to " ws ". + // 4. Otherwise, if urlRecord ’s scheme is " https ", set urlRecord ’s scheme to " wss ". + if (urlRecord.protocol === 'http:') { + urlRecord.protocol = 'ws:' + } else if (urlRecord.protocol === 'https:') { + urlRecord.protocol = 'wss:' + } + + // 5. 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: url', 'SyntaxError') + } + + // If urlRecord ’s fragment is non-null, then throw a " SyntaxError " DOMException . + if (urlRecord.hash.length || urlRecord.href.endsWith('#')) { + throw new DOMException('hash', 'SyntaxError') + } + + // Return urlRecord . + return urlRecord +} + +// https://whatpr.org/websockets/48.html#validate-close-code-and-reason +function validateCloseCodeAndReason (code, reason) { + // 1. If code is not null, but is neither an integer equal to + // 1000 nor an integer in the range 3000 to 4999, inclusive, + // throw an "InvalidAccessError" DOMException. + if (code !== null) { + if (code !== 1000 && (code < 3000 || code > 4999)) { + throw new DOMException('invalid code', 'InvalidAccessError') + } + } + + // 2. If reason is not null, then: + if (reason !== null) { + // 2.1. Let reasonBytes be the result of UTF-8 encoding reason. + // 2.2. If reasonBytes is longer than 123 bytes, then throw a + // "SyntaxError" DOMException. + const reasonBytesLength = Buffer.byteLength(reason) + + if (reasonBytesLength > 123) { + throw new DOMException(`Reason must be less than 123 bytes; received ${reasonBytesLength}`, 'SyntaxError') + } + } +} /** * Converts a Buffer to utf-8, even on platforms without icu. - * @param {Buffer} buffer + * @type {(buffer: Buffer) => string} */ -const utf8Decode = hasIntl - ? fatalDecoder.decode.bind(fatalDecoder) - : function (buffer) { +const utf8Decode = (() => { + if (typeof process.versions.icu === 'string') { + const fatalDecoder = new TextDecoder('utf-8', { fatal: true }) + return fatalDecoder.decode.bind(fatalDecoder) + } + return function (buffer) { if (isUtf8(buffer)) { return buffer.toString('utf-8') } throw new TypeError('Invalid utf-8 received.') } +})() module.exports = { isConnecting, @@ -302,7 +324,6 @@ module.exports = { fireEvent, isValidSubprotocol, isValidStatusCode, - failWebsocketConnection, websocketMessageReceived, utf8Decode, isControlFrame, @@ -310,5 +331,8 @@ module.exports = { isTextBinaryFrame, isValidOpcode, parseExtensions, - isValidClientWindowBits + isValidClientWindowBits, + toArrayBuffer, + getURLRecord, + validateCloseCodeAndReason } diff --git a/node_modules/cheerio/node_modules/undici/lib/web/websocket/websocket.js b/node_modules/undici/lib/web/websocket/websocket.js similarity index 61% rename from node_modules/cheerio/node_modules/undici/lib/web/websocket/websocket.js rename to node_modules/undici/lib/web/websocket/websocket.js index e405302..651eadd 100644 --- a/node_modules/cheerio/node_modules/undici/lib/web/websocket/websocket.js +++ b/node_modules/undici/lib/web/websocket/websocket.js @@ -3,30 +3,43 @@ const { webidl } = require('../fetch/webidl') const { URLSerializer } = require('../fetch/data-url') const { environmentSettingsObject } = require('../fetch/util') -const { staticPropertyDescriptors, states, sentCloseFrameState, sendHints } = require('./constants') -const { - kWebSocketURL, - kReadyState, - kController, - kBinaryType, - kResponse, - kSentClose, - kByteParser -} = require('./symbols') +const { staticPropertyDescriptors, states, sentCloseFrameState, sendHints, opcodes } = require('./constants') const { isConnecting, isEstablished, isClosing, isValidSubprotocol, - fireEvent + fireEvent, + utf8Decode, + toArrayBuffer, + getURLRecord } = require('./util') -const { establishWebSocketConnection, closeWebSocketConnection } = require('./connection') +const { establishWebSocketConnection, closeWebSocketConnection, failWebsocketConnection } = require('./connection') const { ByteParser } = require('./receiver') -const { kEnumerableProperty, isBlobLike } = require('../../core/util') +const { kEnumerableProperty } = require('../../core/util') const { getGlobalDispatcher } = require('../../global') const { types } = require('node:util') -const { ErrorEvent, CloseEvent } = require('./events') +const { ErrorEvent, CloseEvent, createFastMessageEvent } = require('./events') const { SendQueue } = require('./sender') +const { channels } = require('../../core/diagnostics') + +/** + * @typedef {object} Handler + * @property {(response: any, extensions?: string[]) => void} onConnectionEstablished + * @property {(code: number, reason: any) => void} onFail + * @property {(opcode: number, data: Buffer) => void} onMessage + * @property {(error: Error) => void} onParserError + * @property {() => void} onParserDrain + * @property {(chunk: Buffer) => void} onSocketData + * @property {(err: Error) => void} onSocketError + * @property {() => void} onSocketClose + * + * @property {number} readyState + * @property {import('stream').Duplex} socket + * @property {Set<number>} closeState + * @property {import('../fetch/index').Fetch} controller + * @property {boolean} [wasEverConnected=false] + */ // https://websockets.spec.whatwg.org/#interface-definition class WebSocket extends EventTarget { @@ -44,6 +57,41 @@ class WebSocket extends EventTarget { /** @type {SendQueue} */ #sendQueue + /** @type {Handler} */ + #handler = { + onConnectionEstablished: (response, extensions) => this.#onConnectionEstablished(response, extensions), + onFail: (code, reason) => this.#onFail(code, reason), + onMessage: (opcode, data) => this.#onMessage(opcode, data), + onParserError: (err) => failWebsocketConnection(this.#handler, null, err.message), + onParserDrain: () => this.#onParserDrain(), + onSocketData: (chunk) => { + if (!this.#parser.write(chunk)) { + this.#handler.socket.pause() + } + }, + onSocketError: (err) => { + this.#handler.readyState = states.CLOSING + + if (channels.socketError.hasSubscribers) { + channels.socketError.publish(err) + } + + this.#handler.socket.destroy() + }, + onSocketClose: () => this.#onSocketClose(), + + readyState: states.CONNECTING, + socket: null, + closeState: new Set(), + controller: null, + wasEverConnected: false + } + + #url + #binaryType + /** @type {import('./receiver').ByteParser} */ + #parser + /** * @param {string} url * @param {string|string[]} protocols @@ -58,51 +106,22 @@ class WebSocket extends EventTarget { const options = webidl.converters['DOMString or sequence<DOMString> or WebSocketInit'](protocols, prefix, 'options') - url = webidl.converters.USVString(url, prefix, 'url') + url = webidl.converters.USVString(url) protocols = options.protocols // 1. Let baseURL be this's relevant settings object's API base URL. const baseURL = environmentSettingsObject.settingsObject.baseUrl - // 1. Let urlRecord be the result of applying the URL parser to url with baseURL. - let urlRecord + // 2. Let urlRecord be the result of getting a URL record given url and baseURL. + const urlRecord = getURLRecord(url, baseURL) - try { - urlRecord = new URL(url, baseURL) - } catch (e) { - // 3. If urlRecord is failure, then throw a "SyntaxError" DOMException. - throw new DOMException(e, 'SyntaxError') - } - - // 4. If urlRecord’s scheme is "http", then set urlRecord’s scheme to "ws". - if (urlRecord.protocol === 'http:') { - urlRecord.protocol = 'ws:' - } else if (urlRecord.protocol === 'https:') { - // 5. Otherwise, if urlRecord’s scheme is "https", set urlRecord’s scheme to "wss". - urlRecord.protocol = 'wss:' - } - - // 6. 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' - ) - } - - // 7. If urlRecord’s fragment is non-null, then throw a "SyntaxError" - // DOMException. - if (urlRecord.hash || urlRecord.href.endsWith('#')) { - throw new DOMException('Got fragment', 'SyntaxError') - } - - // 8. If protocols is a string, set protocols to a sequence consisting + // 3. If protocols is a string, set protocols to a sequence consisting // of just that string. if (typeof protocols === 'string') { protocols = [protocols] } - // 9. If any of the values in protocols occur more than once or otherwise + // 4. 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. @@ -114,31 +133,27 @@ class WebSocket extends EventTarget { throw new DOMException('Invalid Sec-WebSocket-Protocol value', 'SyntaxError') } - // 10. Set this's url to urlRecord. - this[kWebSocketURL] = new URL(urlRecord.href) + // 5. Set this's url to urlRecord. + this.#url = new URL(urlRecord.href) - // 11. Let client be this's relevant settings object. + // 6. Let client be this's relevant settings object. const client = environmentSettingsObject.settingsObject - // 12. Run this step in parallel: - - // 1. Establish a WebSocket connection given urlRecord, protocols, - // and client. - this[kController] = establishWebSocketConnection( + // 7. Run this step in parallel: + // 7.1. Establish a WebSocket connection given urlRecord, protocols, + // and client. + this.#handler.controller = establishWebSocketConnection( urlRecord, protocols, client, - this, - (response, extensions) => this.#onConnectionEstablished(response, extensions), + this.#handler, 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 - - this[kSentClose] = sentCloseFrameState.NOT_SENT + this.#handler.readyState = WebSocket.CONNECTING // The extensions attribute must initially return the empty string. @@ -146,7 +161,7 @@ class WebSocket extends EventTarget { // Each WebSocket object has an associated binary type, which is a // BinaryType. Initially it must be "blob". - this[kBinaryType] = 'blob' + this.#binaryType = 'blob' } /** @@ -164,37 +179,17 @@ class WebSocket extends EventTarget { } if (reason !== undefined) { - reason = webidl.converters.USVString(reason, prefix, 'reason') + 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') - } - } + // 1. If code is the special value "missing", then set code to null. + code ??= null - let reasonByteLength = 0 + // 2. If reason is the special value "missing", then set reason to the empty string. + reason ??= '' - // 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: - closeWebSocketConnection(this, code, reason, reasonByteLength) + // 3. Close the WebSocket with this, code, and reason. + closeWebSocketConnection(this.#handler, code, reason, true) } /** @@ -211,7 +206,7 @@ class WebSocket extends EventTarget { // 1. If this's ready state is CONNECTING, then throw an // "InvalidStateError" DOMException. - if (isConnecting(this)) { + if (isConnecting(this.#handler.readyState)) { throw new DOMException('Sent before connected.', 'InvalidStateError') } @@ -219,7 +214,7 @@ class WebSocket extends EventTarget { // 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)) { + if (!isEstablished(this.#handler.readyState) || isClosing(this.#handler.readyState)) { return } @@ -236,12 +231,12 @@ class WebSocket extends EventTarget { // the bufferedAmount attribute by the number of bytes needed to // express the argument as UTF-8. - const length = Buffer.byteLength(data) + const buffer = Buffer.from(data) - this.#bufferedAmount += length - this.#sendQueue.add(data, () => { - this.#bufferedAmount -= length - }, sendHints.string) + this.#bufferedAmount += buffer.byteLength + this.#sendQueue.add(buffer, () => { + this.#bufferedAmount -= buffer.byteLength + }, sendHints.text) } 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 @@ -276,7 +271,7 @@ class WebSocket extends EventTarget { this.#sendQueue.add(data, () => { this.#bufferedAmount -= data.byteLength }, sendHints.typedArray) - } else if (isBlobLike(data)) { + } else if (webidl.is.Blob(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 @@ -299,7 +294,7 @@ class WebSocket extends EventTarget { webidl.brandCheck(this, WebSocket) // The readyState getter steps are to return this's ready state. - return this[kReadyState] + return this.#handler.readyState } get bufferedAmount () { @@ -312,7 +307,7 @@ class WebSocket extends EventTarget { webidl.brandCheck(this, WebSocket) // The url getter steps are to return this's url, serialized. - return URLSerializer(this[kWebSocketURL]) + return URLSerializer(this.#url) } get extensions () { @@ -414,16 +409,16 @@ class WebSocket extends EventTarget { get binaryType () { webidl.brandCheck(this, WebSocket) - return this[kBinaryType] + return this.#binaryType } set binaryType (type) { webidl.brandCheck(this, WebSocket) if (type !== 'blob' && type !== 'arraybuffer') { - this[kBinaryType] = 'blob' + this.#binaryType = 'blob' } else { - this[kBinaryType] = type + this.#binaryType = type } } @@ -433,19 +428,17 @@ class WebSocket extends EventTarget { #onConnectionEstablished (response, parsedExtensions) { // processResponse is called when the "response’s header list has been received and initialized." // once this happens, the connection is open - this[kResponse] = response + this.#handler.socket = response.socket - const parser = new ByteParser(this, parsedExtensions) - parser.on('drain', onParserDrain) - parser.on('error', onParserError.bind(this)) - - response.socket.ws = this - this[kByteParser] = parser + const parser = new ByteParser(this.#handler, parsedExtensions) + parser.on('drain', () => this.#handler.onParserDrain()) + parser.on('error', (err) => this.#handler.onParserError(err)) + this.#parser = parser this.#sendQueue = new SendQueue(response.socket) // 1. Change the ready state to OPEN (1). - this[kReadyState] = states.OPEN + this.#handler.readyState = states.OPEN // 2. Change the extensions attribute’s value to the extensions in use, if // it is not the null value. @@ -468,6 +461,131 @@ class WebSocket extends EventTarget { // 4. Fire an event named open at the WebSocket object. fireEvent('open', this) } + + #onFail (code, reason) { + if (reason) { + // TODO: process.nextTick + fireEvent('error', this, (type, init) => new ErrorEvent(type, init), { + error: new Error(reason), + message: reason + }) + } + + if (!this.#handler.wasEverConnected) { + this.#handler.readyState = states.CLOSED + + // If the WebSocket connection could not be established, it is also said + // that _The WebSocket Connection is Closed_, but not _cleanly_. + fireEvent('close', this, (type, init) => new CloseEvent(type, init), { + wasClean: false, code, reason + }) + } + } + + #onMessage (type, data) { + // 1. If ready state is not OPEN (1), then return. + if (this.#handler.readyState !== 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 = utf8Decode(data) + } catch { + failWebsocketConnection(this.#handler, 1007, 'Received invalid UTF-8 in text frame.') + return + } + } else if (type === opcodes.BINARY) { + if (this.#binaryType === '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 = toArrayBuffer(data) + } + } + + // 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', this, createFastMessageEvent, { + origin: this.#url.origin, + data: dataForEvent + }) + } + + #onParserDrain () { + this.#handler.socket.resume() + } + + /** + * @see https://websockets.spec.whatwg.org/#feedback-from-the-protocol + * @see https://datatracker.ietf.org/doc/html/rfc6455#section-7.1.4 + */ + #onSocketClose () { + // 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 = + this.#handler.closeState.has(sentCloseFrameState.SENT) && + this.#handler.closeState.has(sentCloseFrameState.RECEIVED) + + let code = 1005 + let reason = '' + + const result = this.#parser.closingInfo + + if (result && !result.error) { + code = result.code ?? 1005 + reason = result.reason + } else if (!this.#handler.closeState.has(sentCloseFrameState.RECEIVED)) { + // 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). + this.#handler.readyState = 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. + // TODO: process.nextTick + fireEvent('close', this, (type, init) => new CloseEvent(type, init), { + wasClean, code, reason + }) + + if (channels.close.hasSubscribers) { + channels.close.publish({ + websocket: this, + code, + reason + }) + } + } } // https://websockets.spec.whatwg.org/#dom-websocket-connecting @@ -516,7 +634,7 @@ webidl.converters['sequence<DOMString>'] = webidl.sequenceConverter( ) webidl.converters['DOMString or sequence<DOMString>'] = function (V, prefix, argument) { - if (webidl.util.Type(V) === 'Object' && Symbol.iterator in V) { + if (webidl.util.Type(V) === webidl.util.Types.OBJECT && Symbol.iterator in V) { return webidl.converters['sequence<DOMString>'](V) } @@ -542,7 +660,7 @@ webidl.converters.WebSocketInit = webidl.dictionaryConverter([ ]) webidl.converters['DOMString or sequence<DOMString> or WebSocketInit'] = function (V) { - if (webidl.util.Type(V) === 'Object' && !(Symbol.iterator in V)) { + if (webidl.util.Type(V) === webidl.util.Types.OBJECT && !(Symbol.iterator in V)) { return webidl.converters.WebSocketInit(V) } @@ -550,39 +668,19 @@ webidl.converters['DOMString or sequence<DOMString> or WebSocketInit'] = functio } webidl.converters.WebSocketSendData = function (V) { - if (webidl.util.Type(V) === 'Object') { - if (isBlobLike(V)) { - return webidl.converters.Blob(V, { strict: false }) + if (webidl.util.Type(V) === webidl.util.Types.OBJECT) { + if (webidl.is.Blob(V)) { + return V } if (ArrayBuffer.isView(V) || types.isArrayBuffer(V)) { - return webidl.converters.BufferSource(V) + return V } } return webidl.converters.USVString(V) } -function onParserDrain () { - this.ws[kResponse].socket.resume() -} - -function onParserError (err) { - let message - let code - - if (err instanceof CloseEvent) { - message = err.reason - code = err.code - } else { - message = err.message - } - - fireEvent('error', this, () => new ErrorEvent('error', { error: err, message })) - - closeWebSocketConnection(this, code) -} - module.exports = { WebSocket } diff --git a/node_modules/undici/lib/websocket/connection.js b/node_modules/undici/lib/websocket/connection.js deleted file mode 100644 index e0fa697..0000000 --- a/node_modules/undici/lib/websocket/connection.js +++ /dev/null @@ -1,291 +0,0 @@ -'use strict' - -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') - -/** @type {import('crypto')} */ -let crypto -try { - crypto = require('crypto') -} catch { - -} - -/** - * @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 = crypto.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 = crypto.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 deleted file mode 100644 index 406b8e3..0000000 --- a/node_modules/undici/lib/websocket/constants.js +++ /dev/null @@ -1,51 +0,0 @@ -'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 deleted file mode 100644 index 621a226..0000000 --- a/node_modules/undici/lib/websocket/events.js +++ /dev/null @@ -1,303 +0,0 @@ -'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 deleted file mode 100644 index d867ad1..0000000 --- a/node_modules/undici/lib/websocket/frame.js +++ /dev/null @@ -1,73 +0,0 @@ -'use strict' - -const { maxUnsigned16Bit } = require('./constants') - -/** @type {import('crypto')} */ -let crypto -try { - crypto = require('crypto') -} catch { - -} - -class WebsocketFrameSend { - /** - * @param {Buffer|undefined} data - */ - constructor (data) { - this.frameData = data - this.maskKey = crypto.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 deleted file mode 100644 index bdd2031..0000000 --- a/node_modules/undici/lib/websocket/receiver.js +++ /dev/null @@ -1,344 +0,0 @@ -'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 deleted file mode 100644 index 11d03e3..0000000 --- a/node_modules/undici/lib/websocket/symbols.js +++ /dev/null @@ -1,12 +0,0 @@ -'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 deleted file mode 100644 index 6c59b2c..0000000 --- a/node_modules/undici/lib/websocket/util.js +++ /dev/null @@ -1,200 +0,0 @@ -'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 deleted file mode 100644 index e4aa58f..0000000 --- a/node_modules/undici/lib/websocket/websocket.js +++ /dev/null @@ -1,641 +0,0 @@ -'use strict' - -const { webidl } = require('../fetch/webidl') -const { DOMException } = require('../fetch/constants') -const { URLSerializer } = require('../fetch/dataURL') -const { getGlobalOrigin } = require('../fetch/global') -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 baseURL be this's relevant settings object's API base URL. - const baseURL = getGlobalOrigin() - - // 1. Let urlRecord be the result of applying the URL parser to url with baseURL. - let urlRecord - - try { - urlRecord = new URL(url, baseURL) - } catch (e) { - // 3. If urlRecord is failure, then throw a "SyntaxError" DOMException. - throw new DOMException(e, 'SyntaxError') - } - - // 4. If urlRecord’s scheme is "http", then set urlRecord’s scheme to "ws". - if (urlRecord.protocol === 'http:') { - urlRecord.protocol = 'ws:' - } else if (urlRecord.protocol === 'https:') { - // 5. Otherwise, if urlRecord’s scheme is "https", set urlRecord’s scheme to "wss". - urlRecord.protocol = 'wss:' - } - - // 6. 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' - ) - } - - // 7. If urlRecord’s fragment is non-null, then throw a "SyntaxError" - // DOMException. - if (urlRecord.hash || urlRecord.href.endsWith('#')) { - throw new DOMException('Got fragment', 'SyntaxError') - } - - // 8. If protocols is a string, set protocols to a sequence consisting - // of just that string. - if (typeof protocols === 'string') { - protocols = [protocols] - } - - // 9. 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') - } - - // 10. Set this's url to urlRecord. - this[kWebSocketURL] = new URL(urlRecord.href) - - // 11. Let client be this's relevant settings object. - - // 12. 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 index 0c6b71e..9c04f80 100644 --- a/node_modules/undici/package.json +++ b/node_modules/undici/package.json @@ -1,6 +1,6 @@ { "name": "undici", - "version": "5.28.5", + "version": "7.6.0", "description": "An HTTP/1.1 client, written from scratch for Node.js", "homepage": "https://undici.nodejs.org", "bugs": { @@ -61,91 +61,76 @@ ], "main": "index.js", "types": "index.d.ts", - "files": [ - "*.d.ts", - "index.js", - "index-fetch.js", - "lib", - "types", - "docs" - ], "scripts": { - "build:node": "npx esbuild@0.19.4 index-fetch.js --bundle --platform=node --outfile=undici-fetch.js --define:esbuildDetection=1 --keep-names", - "prebuild:wasm": "node build/wasm.js --prebuild", + "build:node": "esbuild index-fetch.js --bundle --platform=node --outfile=undici-fetch.js --define:esbuildDetection=1 --keep-names && node scripts/strip-comments.js", "build:wasm": "node build/wasm.js --docker", - "lint": "standard | snazzy", - "lint:fix": "standard --fix | snazzy", - "test": "node scripts/generate-pem && 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 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" + "generate-pem": "node scripts/generate-pem.js", + "lint": "eslint --cache", + "lint:fix": "eslint --fix --cache", + "test": "npm run test:javascript && cross-env NODE_V8_COVERAGE= npm run test:typescript", + "test:javascript": "npm run test:javascript:no-jest && npm run test:jest", + "test:javascript:no-jest": "npm run generate-pem && npm run test:unit && npm run test:node-fetch && npm run test:cache && npm run test:cache-interceptor && npm run test:interceptors && npm run test:fetch && npm run test:cookies && npm run test:eventsource && npm run test:wpt && npm run test:websocket && npm run test:node-test && npm run test:cache-tests", + "test:javascript:without-intl": "npm run test:javascript:no-jest", + "test:busboy": "borp -p \"test/busboy/*.js\"", + "test:cache": "borp -p \"test/cache/*.js\"", + "test:sqlite": "NODE_OPTIONS=--experimental-sqlite borp -p \"test/cache-interceptor/*.js\"", + "test:cache-interceptor": "borp -p \"test/cache-interceptor/*.js\"", + "test:cookies": "borp -p \"test/cookie/*.js\"", + "test:eventsource": "npm run build:node && borp --expose-gc -p \"test/eventsource/*.js\"", + "test:fuzzing": "node test/fuzzing/fuzzing.test.js", + "test:fetch": "npm run build:node && borp --timeout 180000 --expose-gc --concurrency 1 -p \"test/fetch/*.js\" && npm run test:webidl && npm run test:busboy", + "test:h2": "npm run test:h2:core && npm run test:h2:fetch", + "test:h2:core": "borp -p \"test/http2*.js\"", + "test:h2:fetch": "npm run build:node && borp -p \"test/fetch/http2*.js\"", + "test:interceptors": "borp -p \"test/interceptors/*.js\"", + "test:jest": "cross-env NODE_V8_COVERAGE= jest", + "test:unit": "borp --expose-gc -p \"test/*.js\"", + "test:node-fetch": "borp -p \"test/node-fetch/**/*.js\"", + "test:node-test": "borp -p \"test/node-test/**/*.js\"", + "test:tdd": "borp --expose-gc -p \"test/*.js\"", + "test:tdd:node-test": "borp -p \"test/node-test/**/*.js\" -w", + "test:typescript": "tsd && tsc test/imports/undici-import.ts --typeRoots ./types --noEmit && tsc ./types/*.d.ts --noEmit --typeRoots ./types", + "test:webidl": "borp -p \"test/webidl/*.js\"", + "test:websocket": "borp -p \"test/websocket/*.js\"", + "test:websocket:autobahn": "node test/autobahn/client.js", + "test:websocket:autobahn:report": "node test/autobahn/report.js", + "test:wpt": "node test/wpt/start-fetch.mjs && node test/wpt/start-mimesniff.mjs && node test/wpt/start-xhr.mjs && node test/wpt/start-websockets.mjs && node test/wpt/start-cacheStorage.mjs && node test/wpt/start-eventsource.mjs", + "test:wpt:withoutintl": "node test/wpt/start-fetch.mjs && node test/wpt/start-mimesniff.mjs && node test/wpt/start-xhr.mjs && node test/wpt/start-cacheStorage.mjs && node test/wpt/start-eventsource.mjs", + "test:cache-tests": "node test/cache-interceptor/cache-tests.mjs --ci", + "coverage": "npm run coverage:clean && cross-env NODE_V8_COVERAGE=./coverage/tmp npm run test:javascript && npm run coverage:report", + "coverage:ci": "npm run coverage:clean && cross-env NODE_V8_COVERAGE=./coverage/tmp npm run test:javascript && npm run coverage:report:ci", + "coverage:clean": "node ./scripts/clean-coverage.js", + "coverage:report": "cross-env NODE_V8_COVERAGE= c8 report", + "coverage:report:ci": "c8 report", + "bench": "echo \"Error: Benchmarks have been moved to '/benchmarks'\" && exit 1", + "serve:website": "echo \"Error: Documentation has been moved to '/docs'\" && exit 1", + "prepare": "husky && node ./scripts/platform-shell.js" }, "devDependencies": { - "@sinonjs/fake-timers": "^11.1.0", - "@types/node": "^18.0.3", + "@fastify/busboy": "3.1.1", + "@matteo.collina/tspl": "^0.2.0", + "@sinonjs/fake-timers": "^12.0.0", + "@types/node": "^18.19.50", "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", + "borp": "^0.19.0", + "c8": "^10.0.0", + "cross-env": "^7.0.3", "dns-packet": "^5.4.0", - "docsify-cli": "^4.4.3", - "form-data": "^4.0.0", - "formdata-node": "^4.3.1", + "esbuild": "^0.24.0", + "eslint": "^9.9.0", + "fast-check": "^3.17.1", "https-pem": "^3.0.0", - "husky": "^8.0.1", - "import-fresh": "^3.3.0", + "husky": "^9.0.7", "jest": "^29.0.2", - "jsdom": "^23.0.0", - "jsfuzz": "^1.0.15", - "mocha": "^10.0.0", - "mockttp": "^3.9.2", - "p-timeout": "^3.2.0", - "pre-commit": "^1.2.2", - "proxy": "^1.0.2", - "proxyquire": "^2.1.3", - "semver": "^7.5.4", - "sinon": "^17.0.1", - "snazzy": "^9.0.0", - "standard": "^17.0.0", - "table": "^6.8.0", - "tap": "^16.1.0", - "tsd": "^0.29.0", - "typescript": "^5.0.2", - "wait-on": "^7.0.1", + "neostandard": "^0.12.0", + "node-forge": "^1.3.1", + "proxy": "^2.1.1", + "tsd": "^0.31.2", + "typescript": "^5.6.2", "ws": "^8.11.0" }, "engines": { - "node": ">=14.0" - }, - "standard": { - "env": [ - "mocha" - ], - "ignore": [ - "lib/llhttp/constants.js", - "lib/llhttp/utils.js", - "test/wpt/tests" - ] + "node": ">=20.18.1" }, "tsd": { "directory": "test/types", @@ -160,8 +145,5 @@ "testMatch": [ "<rootDir>/test/jest/**" ] - }, - "dependencies": { - "@fastify/busboy": "^2.0.0" } } diff --git a/node_modules/cheerio/node_modules/undici/scripts/strip-comments.js b/node_modules/undici/scripts/strip-comments.js similarity index 58% rename from node_modules/cheerio/node_modules/undici/scripts/strip-comments.js rename to node_modules/undici/scripts/strip-comments.js index 9e4396a..d687a26 100644 --- a/node_modules/cheerio/node_modules/undici/scripts/strip-comments.js +++ b/node_modules/undici/scripts/strip-comments.js @@ -3,6 +3,8 @@ const { readFileSync, writeFileSync } = require('node:fs') const { transcode } = require('node:buffer') -const buffer = transcode(readFileSync('./undici-fetch.js'), 'utf8', 'latin1') +const buffer = transcode + ? transcode(readFileSync('./undici-fetch.js'), 'utf8', 'latin1') + : readFileSync('./undici-fetch.js') writeFileSync('./undici-fetch.js', buffer.toString('latin1')) diff --git a/node_modules/undici/types/agent.d.ts b/node_modules/undici/types/agent.d.ts index 58081ce..ee313b5 100644 --- a/node_modules/undici/types/agent.d.ts +++ b/node_modules/undici/types/agent.d.ts @@ -1,17 +1,17 @@ import { URL } from 'url' import Pool from './pool' -import Dispatcher from "./dispatcher"; +import Dispatcher from './dispatcher' export default Agent -declare class Agent extends Dispatcher{ - constructor(opts?: Agent.Options) +declare class Agent extends Dispatcher { + constructor (opts?: Agent.Options) /** `true` after `dispatcher.close()` has been called. */ - closed: boolean; + closed: boolean /** `true` after `dispatcher.destroyed()` has been called or `dispatcher.close()` has been called and the dispatcher shutdown has completed. */ - destroyed: boolean; + destroyed: boolean /** Dispatches a request. */ - dispatch(options: Agent.DispatchOptions, handler: Dispatcher.DispatchHandlers): boolean; + dispatch (options: Agent.DispatchOptions, handler: Dispatcher.DispatchHandler): boolean } declare namespace Agent { @@ -21,7 +21,7 @@ declare namespace Agent { /** Integer. Default: `0` */ maxRedirections?: number; - interceptors?: { Agent?: readonly Dispatcher.DispatchInterceptor[] } & Pool.Options["interceptors"] + interceptors?: { Agent?: readonly Dispatcher.DispatchInterceptor[] } & Pool.Options['interceptors'] } export interface DispatchOptions extends Dispatcher.DispatchOptions { diff --git a/node_modules/undici/types/api.d.ts b/node_modules/undici/types/api.d.ts index 400341d..e58d08f 100644 --- a/node_modules/undici/types/api.d.ts +++ b/node_modules/undici/types/api.d.ts @@ -2,42 +2,42 @@ import { URL, UrlObject } from 'url' import { Duplex } from 'stream' import Dispatcher from './dispatcher' +/** Performs an HTTP request. */ +declare function request<TOpaque = null> ( + url: string | URL | UrlObject, + options?: { dispatcher?: Dispatcher } & Omit<Dispatcher.RequestOptions<TOpaque>, 'origin' | 'path' | 'method'> & Partial<Pick<Dispatcher.RequestOptions, 'method'>>, +): Promise<Dispatcher.ResponseData<TOpaque>> + +/** A faster version of `request`. */ +declare function stream<TOpaque = null> ( + url: string | URL | UrlObject, + options: { dispatcher?: Dispatcher } & Omit<Dispatcher.RequestOptions<TOpaque>, 'origin' | 'path'>, + factory: Dispatcher.StreamFactory<TOpaque> +): Promise<Dispatcher.StreamData<TOpaque>> + +/** For easy use with `stream.pipeline`. */ +declare function pipeline<TOpaque = null> ( + url: string | URL | UrlObject, + options: { dispatcher?: Dispatcher } & Omit<Dispatcher.PipelineOptions<TOpaque>, 'origin' | 'path'>, + handler: Dispatcher.PipelineHandler<TOpaque> +): Duplex + +/** Starts two-way communications with the requested resource. */ +declare function connect<TOpaque = null> ( + url: string | URL | UrlObject, + options?: { dispatcher?: Dispatcher } & Omit<Dispatcher.ConnectOptions<TOpaque>, 'origin' | 'path'> +): Promise<Dispatcher.ConnectData<TOpaque>> + +/** Upgrade to a different protocol. */ +declare function upgrade ( + url: string | URL | UrlObject, + options?: { dispatcher?: Dispatcher } & Omit<Dispatcher.UpgradeOptions, 'origin' | 'path'> +): Promise<Dispatcher.UpgradeData> + export { request, stream, pipeline, connect, - upgrade, + 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 index d1e9375..733239c 100644 --- a/node_modules/undici/types/balanced-pool.d.ts +++ b/node_modules/undici/types/balanced-pool.d.ts @@ -4,15 +4,26 @@ import { URL } from 'url' export default BalancedPool -declare class BalancedPool extends Dispatcher { - constructor(url: string | string[] | URL | URL[], options?: Pool.Options); +type BalancedPoolConnectOptions = Omit<Dispatcher.ConnectOptions, 'origin'> - addUpstream(upstream: string | URL): BalancedPool; - removeUpstream(upstream: string | URL): BalancedPool; - upstreams: Array<string>; +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; + closed: boolean /** `true` after `pool.destroyed()` has been called or `pool.close()` has been called and the pool shutdown has completed. */ - destroyed: boolean; + destroyed: boolean + + // Override dispatcher APIs. + override connect ( + options: BalancedPoolConnectOptions + ): Promise<Dispatcher.ConnectData> + override connect ( + options: BalancedPoolConnectOptions, + callback: (err: Error | null, data: Dispatcher.ConnectData) => void + ): void } diff --git a/node_modules/undici/types/cache-interceptor.d.ts b/node_modules/undici/types/cache-interceptor.d.ts new file mode 100644 index 0000000..e53be60 --- /dev/null +++ b/node_modules/undici/types/cache-interceptor.d.ts @@ -0,0 +1,172 @@ +import { Readable, Writable } from 'node:stream' + +export default CacheHandler + +declare namespace CacheHandler { + export type CacheMethods = 'GET' | 'HEAD' | 'OPTIONS' | 'TRACE' + + export interface CacheHandlerOptions { + store: CacheStore + + cacheByDefault?: number + + type?: CacheOptions['type'] + } + + export interface CacheOptions { + store?: CacheStore + + /** + * The methods to cache + * Note we can only cache safe methods. Unsafe methods (i.e. PUT, POST) + * invalidate the cache for a origin. + * @see https://www.rfc-editor.org/rfc/rfc9111.html#name-invalidating-stored-respons + * @see https://www.rfc-editor.org/rfc/rfc9110#section-9.2.1 + */ + methods?: CacheMethods[] + + /** + * RFC9111 allows for caching responses that we aren't explicitly told to + * cache or to not cache. + * @see https://www.rfc-editor.org/rfc/rfc9111.html#section-3-5 + * @default undefined + */ + cacheByDefault?: number + + /** + * TODO docs + * @default 'shared' + */ + type?: 'shared' | 'private' + } + + export interface CacheControlDirectives { + 'max-stale'?: number; + 'min-fresh'?: number; + 'max-age'?: number; + 's-maxage'?: number; + 'stale-while-revalidate'?: number; + 'stale-if-error'?: number; + public?: true; + private?: true | string[]; + 'no-store'?: true; + 'no-cache'?: true | string[]; + 'must-revalidate'?: true; + 'proxy-revalidate'?: true; + immutable?: true; + 'no-transform'?: true; + 'must-understand'?: true; + 'only-if-cached'?: true; + } + + export interface CacheKey { + origin: string + method: string + path: string + headers?: Record<string, string | string[]> + } + + export interface CacheValue { + statusCode: number + statusMessage: string + headers: Record<string, string | string[]> + vary?: Record<string, string | string[] | null> + etag?: string + cacheControlDirectives?: CacheControlDirectives + cachedAt: number + staleAt: number + deleteAt: number + } + + export interface DeleteByUri { + origin: string + method: string + path: string + } + + type GetResult = { + statusCode: number + statusMessage: string + headers: Record<string, string | string[]> + vary?: Record<string, string | string[] | null> + etag?: string + body?: Readable | Iterable<Buffer> | AsyncIterable<Buffer> | Buffer | Iterable<string> | AsyncIterable<string> | string + cacheControlDirectives: CacheControlDirectives, + cachedAt: number + staleAt: number + deleteAt: number + } + + /** + * Underlying storage provider for cached responses + */ + export interface CacheStore { + get(key: CacheKey): GetResult | Promise<GetResult | undefined> | undefined + + createWriteStream(key: CacheKey, val: CacheValue): Writable | undefined + + delete(key: CacheKey): void | Promise<void> + } + + export interface MemoryCacheStoreOpts { + /** + * @default Infinity + */ + maxCount?: number + + /** + * @default Infinity + */ + maxSize?: number + + /** + * @default Infinity + */ + maxEntrySize?: number + + errorCallback?: (err: Error) => void + } + + export class MemoryCacheStore implements CacheStore { + constructor (opts?: MemoryCacheStoreOpts) + + get (key: CacheKey): GetResult | Promise<GetResult | undefined> | undefined + + createWriteStream (key: CacheKey, value: CacheValue): Writable | undefined + + delete (key: CacheKey): void | Promise<void> + } + + export interface SqliteCacheStoreOpts { + /** + * Location of the database + * @default ':memory:' + */ + location?: string + + /** + * @default Infinity + */ + maxCount?: number + + /** + * @default Infinity + */ + maxEntrySize?: number + } + + export class SqliteCacheStore implements CacheStore { + constructor (opts?: SqliteCacheStoreOpts) + + /** + * Closes the connection to the database + */ + close (): void + + get (key: CacheKey): GetResult | Promise<GetResult | undefined> | undefined + + createWriteStream (key: CacheKey, value: CacheValue): Writable | undefined + + delete (key: CacheKey): void | Promise<void> + } +} diff --git a/node_modules/undici/types/client.d.ts b/node_modules/undici/types/client.d.ts index 56e78cc..55bfcef 100644 --- a/node_modules/undici/types/client.d.ts +++ b/node_modules/undici/types/client.d.ts @@ -1,19 +1,29 @@ import { URL } from 'url' -import { TlsOptions } from 'tls' import Dispatcher from './dispatcher' -import buildConnector from "./connector"; +import buildConnector from './connector' + +type ClientConnectOptions = Omit<Dispatcher.ConnectOptions, 'origin'> /** * 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); + constructor (url: string | URL, options?: Client.Options) /** Property to get and set the pipelining factor. */ - pipelining: number; + pipelining: number /** `true` after `client.close()` has been called. */ - closed: boolean; + closed: boolean /** `true` after `client.destroyed()` has been called or `client.close()` has been called and the client shutdown has completed. */ - destroyed: boolean; + destroyed: boolean + + // Override dispatcher APIs. + override connect ( + options: ClientConnectOptions + ): Promise<Dispatcher.ConnectData> + override connect ( + options: ClientConnectOptions, + callback: (err: Error | null, data: Dispatcher.ConnectData) => void + ): void } export declare namespace Client { @@ -60,7 +70,7 @@ export declare namespace Client { /** TODO */ maxRedirections?: number; /** TODO */ - connect?: buildConnector.BuildOptions | buildConnector.connector; + connect?: Partial<buildConnector.BuildOptions> | buildConnector.connector; /** TODO */ maxRequestsPerClient?: number; /** TODO */ @@ -94,4 +104,4 @@ export declare namespace Client { } } -export default Client; +export default Client diff --git a/node_modules/undici/types/cookies.d.ts b/node_modules/undici/types/cookies.d.ts index aa38cae..f746d35 100644 --- a/node_modules/undici/types/cookies.d.ts +++ b/node_modules/undici/types/cookies.d.ts @@ -26,3 +26,5 @@ export function getCookies (headers: Headers): Record<string, string> export function getSetCookies (headers: Headers): Cookie[] export function setCookie (headers: Headers, cookie: Cookie): void + +export function parseCookie (cookie: string): Cookie | null diff --git a/node_modules/undici/types/diagnostics-channel.d.ts b/node_modules/undici/types/diagnostics-channel.d.ts index 85d4482..0c8477e 100644 --- a/node_modules/undici/types/diagnostics-channel.d.ts +++ b/node_modules/undici/types/diagnostics-channel.d.ts @@ -1,7 +1,7 @@ -import { Socket } from "net"; -import { URL } from "url"; -import Connector from "./connector"; -import Dispatcher from "./dispatcher"; +import { Socket } from 'net' +import { URL } from 'url' +import buildConnector from './connector' +import Dispatcher from './dispatcher' declare namespace DiagnosticsChannel { interface Request { @@ -9,23 +9,22 @@ declare namespace DiagnosticsChannel { completed: boolean; method?: Dispatcher.HttpMethod; path: string; - headers: string; - addHeader(key: string, value: string): Request; + headers: any; } interface Response { statusCode: number; statusText: string; headers: Array<Buffer>; } - type Error = unknown; + type Error = unknown interface ConnectParams { - host: URL["host"]; - hostname: URL["hostname"]; - protocol: URL["protocol"]; - port: URL["port"]; + host: URL['host']; + hostname: URL['hostname']; + protocol: URL['protocol']; + port: URL['port']; servername: string | null; } - type Connector = Connector.connector; + type Connector = buildConnector.connector export interface RequestCreateMessage { request: Request; } diff --git a/node_modules/undici/types/dispatcher.d.ts b/node_modules/undici/types/dispatcher.d.ts index efc53ee..17bb441 100644 --- a/node_modules/undici/types/dispatcher.d.ts +++ b/node_modules/undici/types/dispatcher.d.ts @@ -6,93 +6,96 @@ import { IncomingHttpHeaders } from './header' import BodyReadable from './readable' import { FormData } from './formdata' import Errors from './errors' +import { Autocomplete } from './utility' -type AbortSignal = unknown; +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; + dispatch (options: Dispatcher.DispatchOptions, handler: Dispatcher.DispatchHandler): 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; + connect<TOpaque = null>(options: Dispatcher.ConnectOptions<TOpaque>): Promise<Dispatcher.ConnectData<TOpaque>> + connect<TOpaque = null>(options: Dispatcher.ConnectOptions<TOpaque>, callback: (err: Error | null, data: Dispatcher.ConnectData<TOpaque>) => void): void + /** Compose a chain of dispatchers */ + compose (dispatchers: Dispatcher.DispatcherComposeInterceptor[]): Dispatcher.ComposedDispatcher + compose (...dispatchers: Dispatcher.DispatcherComposeInterceptor[]): Dispatcher.ComposedDispatcher /** Performs an HTTP request. */ - request(options: Dispatcher.RequestOptions): Promise<Dispatcher.ResponseData>; - request(options: Dispatcher.RequestOptions, callback: (err: Error | null, data: Dispatcher.ResponseData) => void): void; + request<TOpaque = null>(options: Dispatcher.RequestOptions<TOpaque>): Promise<Dispatcher.ResponseData<TOpaque>> + request<TOpaque = null>(options: Dispatcher.RequestOptions<TOpaque>, callback: (err: Error | null, data: Dispatcher.ResponseData<TOpaque>) => void): void /** For easy use with `stream.pipeline`. */ - pipeline(options: Dispatcher.PipelineOptions, handler: Dispatcher.PipelineHandler): Duplex; + pipeline<TOpaque = null>(options: Dispatcher.PipelineOptions<TOpaque>, handler: Dispatcher.PipelineHandler<TOpaque>): 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; + stream<TOpaque = null>(options: Dispatcher.RequestOptions<TOpaque>, factory: Dispatcher.StreamFactory<TOpaque>): Promise<Dispatcher.StreamData<TOpaque>> + stream<TOpaque = null>(options: Dispatcher.RequestOptions<TOpaque>, factory: Dispatcher.StreamFactory<TOpaque>, callback: (err: Error | null, data: Dispatcher.StreamData<TOpaque>) => 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; + 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; + 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; + 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; + 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 - 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 - 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; + 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 - 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; + 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 - 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; + 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)[] - 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; + 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)[] - 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; + 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 ComposedDispatcher extends Dispatcher {} + export type DispatcherComposeInterceptor = (dispatch: Dispatcher['dispatch']) => Dispatcher['dispatch'] export interface DispatchOptions { origin?: string | URL; path: string; @@ -100,12 +103,12 @@ declare namespace Dispatcher { /** Default: `null` */ body?: string | Buffer | Uint8Array | Readable | null | FormData; /** Default: `null` */ - headers?: IncomingHttpHeaders | string[] | null; + headers?: Record<string, string | string[]> | IncomingHttpHeaders | string[] | Iterable<[string, string | string[] | undefined]> | 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. */ + /** 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. Defaults to `method !== 'HEAD'`. */ 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; @@ -117,37 +120,42 @@ declare namespace Dispatcher { reset?: boolean; /** Whether Undici should throw an error upon receiving a 4xx or 5xx response from the server. Defaults to false */ throwOnError?: boolean; - /** For H2, it appends the expect: 100-continue header, and halts the request body until a 100-continue is received from the remote server*/ + /** For H2, it appends the expect: 100-continue header, and halts the request body until a 100-continue is received from the remote server */ expectContinue?: boolean; } - export interface ConnectOptions { + export interface ConnectOptions<TOpaque = null> { + origin: string | URL; path: string; /** Default: `null` */ headers?: IncomingHttpHeaders | string[] | null; /** Default: `null` */ signal?: AbortSignal | EventEmitter | null; /** This argument parameter is passed through to `ConnectData` */ - opaque?: unknown; + opaque?: TOpaque; /** Default: 0 */ maxRedirections?: number; + /** Default: false */ + redirectionLimitReached?: boolean; /** Default: `null` */ - responseHeader?: 'raw' | null; + responseHeaders?: 'raw' | null; } - export interface RequestOptions extends DispatchOptions { + export interface RequestOptions<TOpaque = null> extends DispatchOptions { /** Default: `null` */ - opaque?: unknown; + opaque?: TOpaque; /** Default: `null` */ signal?: AbortSignal | EventEmitter | null; /** Default: 0 */ maxRedirections?: number; + /** Default: false */ + redirectionLimitReached?: boolean; /** Default: `null` */ onInfo?: (info: { statusCode: number, headers: Record<string, string | string[]> }) => void; /** Default: `null` */ - responseHeader?: 'raw' | null; + responseHeaders?: 'raw' | null; /** Default: `64 KiB` */ highWaterMark?: number; } - export interface PipelineOptions extends RequestOptions { + export interface PipelineOptions<TOpaque = null> extends RequestOptions<TOpaque> { /** `true` if the `handler` will return an object stream. Default: `false` */ objectMode?: boolean; } @@ -163,73 +171,103 @@ declare namespace Dispatcher { signal?: AbortSignal | EventEmitter | null; /** Default: 0 */ maxRedirections?: number; + /** Default: false */ + redirectionLimitReached?: boolean; /** Default: `null` */ - responseHeader?: 'raw' | null; + responseHeaders?: 'raw' | null; } - export interface ConnectData { + export interface ConnectData<TOpaque = null> { statusCode: number; headers: IncomingHttpHeaders; socket: Duplex; - opaque: unknown; + opaque: TOpaque; } - export interface ResponseData { + export interface ResponseData<TOpaque = null> { statusCode: number; headers: IncomingHttpHeaders; body: BodyReadable & BodyMixin; trailers: Record<string, string>; - opaque: unknown; + opaque: TOpaque; context: object; } - export interface PipelineHandlerData { + export interface PipelineHandlerData<TOpaque = null> { statusCode: number; headers: IncomingHttpHeaders; - opaque: unknown; + opaque: TOpaque; body: BodyReadable; context: object; } - export interface StreamData { - opaque: unknown; + export interface StreamData<TOpaque = null> { + opaque: TOpaque; trailers: Record<string, string>; } - export interface UpgradeData { + export interface UpgradeData<TOpaque = null> { headers: IncomingHttpHeaders; socket: Duplex; - opaque: unknown; + opaque: TOpaque; } - export interface StreamFactoryData { + export interface StreamFactoryData<TOpaque = null> { statusCode: number; headers: IncomingHttpHeaders; - opaque: unknown; + opaque: TOpaque; context: object; } - export type StreamFactory = (data: StreamFactoryData) => Writable; - export interface DispatchHandlers { + export type StreamFactory<TOpaque = null> = (data: StreamFactoryData<TOpaque>) => Writable + + export interface DispatchController { + get aborted () : boolean + get paused () : boolean + get reason () : Error | null + abort (reason: Error): void + pause(): void + resume(): void + } + + export interface DispatchHandler { + onRequestStart?(controller: DispatchController, context: any): void; + onRequestUpgrade?(controller: DispatchController, statusCode: number, headers: IncomingHttpHeaders, socket: Duplex): void; + onResponseStart?(controller: DispatchController, statusCode: number, headers: IncomingHttpHeaders, statusMessage?: string): void; + onResponseData?(controller: DispatchController, chunk: Buffer): void; + onResponseEnd?(controller: DispatchController, trailers: IncomingHttpHeaders): void; + onResponseError?(controller: DispatchController, error: Error): 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. */ - onConnect?(abort: () => void): void; + /** @deprecated */ + onConnect?(abort: (err?: Error) => void): void; /** Invoked when an error has occurred. */ + /** @deprecated */ onError?(err: Error): void; /** Invoked when request is upgraded either due to a `Upgrade` header or `CONNECT` method. */ + /** @deprecated */ onUpgrade?(statusCode: number, headers: Buffer[] | string[] | null, socket: Duplex): void; + /** Invoked when response is received, before headers have been read. **/ + /** @deprecated */ + onResponseStarted?(): 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, statusText: string): boolean; + /** @deprecated */ + onHeaders?(statusCode: number, headers: Buffer[], resume: () => void, statusText: string): boolean; /** Invoked when response payload data is received. */ + /** @deprecated */ onData?(chunk: Buffer): boolean; /** Invoked when response payload and trailers have been received and the request has completed. */ + /** @deprecated */ onComplete?(trailers: string[] | null): void; /** Invoked when a body chunk is sent to the server. May be invoked multiple times for chunked requests */ + /** @deprecated */ onBodySent?(chunkSize: number, totalBytesSent: number): void; } - export type PipelineHandler = (data: PipelineHandlerData) => Readable; - export type HttpMethod = 'GET' | 'HEAD' | 'POST' | 'PUT' | 'DELETE' | 'CONNECT' | 'OPTIONS' | 'TRACE' | 'PATCH'; + export type PipelineHandler<TOpaque = null> = (data: PipelineHandlerData<TOpaque>) => Readable + export type HttpMethod = Autocomplete<'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 body?: never; readonly bodyUsed: boolean; arrayBuffer(): Promise<ArrayBuffer>; blob(): Promise<Blob>; + bytes(): Promise<Uint8Array>; formData(): Promise<never>; json(): Promise<unknown>; text(): Promise<string>; diff --git a/node_modules/cheerio/node_modules/undici/types/env-http-proxy-agent.d.ts b/node_modules/undici/types/env-http-proxy-agent.d.ts similarity index 79% rename from node_modules/cheerio/node_modules/undici/types/env-http-proxy-agent.d.ts rename to node_modules/undici/types/env-http-proxy-agent.d.ts index d6509dc..28fbb84 100644 --- a/node_modules/cheerio/node_modules/undici/types/env-http-proxy-agent.d.ts +++ b/node_modules/undici/types/env-http-proxy-agent.d.ts @@ -4,9 +4,9 @@ import Dispatcher from './dispatcher' export default EnvHttpProxyAgent declare class EnvHttpProxyAgent extends Dispatcher { - constructor(opts?: EnvHttpProxyAgent.Options) + constructor (opts?: EnvHttpProxyAgent.Options) - dispatch(options: Agent.DispatchOptions, handler: Dispatcher.DispatchHandlers): boolean; + dispatch (options: Agent.DispatchOptions, handler: Dispatcher.DispatchHandler): boolean } declare namespace EnvHttpProxyAgent { diff --git a/node_modules/undici/types/errors.d.ts b/node_modules/undici/types/errors.d.ts index 7923ddd..387420d 100644 --- a/node_modules/undici/types/errors.d.ts +++ b/node_modules/undici/types/errors.d.ts @@ -1,24 +1,24 @@ -import { IncomingHttpHeaders } from "./header"; +import { IncomingHttpHeaders } from './header' import Client from './client' export default Errors declare namespace Errors { export class UndiciError extends Error { - name: string; - code: string; + name: string + code: string } /** Connect timeout error. */ export class ConnectTimeoutError extends UndiciError { - name: 'ConnectTimeoutError'; - code: 'UND_ERR_CONNECT_TIMEOUT'; + 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'; + name: 'HeadersTimeoutError' + code: 'UND_ERR_HEADERS_TIMEOUT' } /** Headers overflow error. */ @@ -29,8 +29,24 @@ declare namespace Errors { /** A body exceeds the `bodyTimeout` option. */ export class BodyTimeoutError extends UndiciError { - name: 'BodyTimeoutError'; - code: 'UND_ERR_BODY_TIMEOUT'; + name: 'BodyTimeoutError' + code: 'UND_ERR_BODY_TIMEOUT' + } + + export class ResponseError extends UndiciError { + constructor ( + message: string, + code: number, + options: { + headers?: IncomingHttpHeaders | string[] | null, + body?: null | Record<string, any> | string + } + ) + name: 'ResponseError' + code: 'UND_ERR_RESPONSE' + statusCode: number + body: null | Record<string, any> | string + headers: IncomingHttpHeaders | string[] | null } export class ResponseStatusCodeError extends UndiciError { @@ -39,90 +55,117 @@ declare namespace Errors { statusCode?: number, headers?: IncomingHttpHeaders | string[] | null, body?: null | Record<string, any> | string - ); - name: 'ResponseStatusCodeError'; - code: 'UND_ERR_RESPONSE_STATUS_CODE'; + ) + name: 'ResponseStatusCodeError' + code: 'UND_ERR_RESPONSE_STATUS_CODE' body: null | Record<string, any> | string status: number statusCode: number - headers: IncomingHttpHeaders | string[] | null; + headers: IncomingHttpHeaders | string[] | null } /** Passed an invalid argument. */ export class InvalidArgumentError extends UndiciError { - name: 'InvalidArgumentError'; - code: 'UND_ERR_INVALID_ARG'; + name: 'InvalidArgumentError' + code: 'UND_ERR_INVALID_ARG' } /** Returned an invalid value. */ export class InvalidReturnValueError extends UndiciError { - name: 'InvalidReturnValueError'; - code: 'UND_ERR_INVALID_RETURN_VALUE'; + 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'; + name: 'AbortError' + code: 'UND_ERR_ABORTED' } /** Expected error with reason. */ export class InformationalError extends UndiciError { - name: 'InformationalError'; - code: 'UND_ERR_INFO'; + 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'; + 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'; + 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'; + name: 'ClientDestroyedError' + code: 'UND_ERR_DESTROYED' } /** Trying to use a closed client. */ export class ClientClosedError extends UndiciError { - name: 'ClientClosedError'; - code: 'UND_ERR_CLOSED'; + name: 'ClientClosedError' + code: 'UND_ERR_CLOSED' } /** There is an error with the socket. */ export class SocketError extends UndiciError { - name: 'SocketError'; - code: 'UND_ERR_SOCKET'; + 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'; + 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'; + name: 'MissingUpstreamError' + code: 'UND_ERR_BPL_MISSING_UPSTREAM' } export class HTTPParserError extends UndiciError { - name: 'HTTPParserError'; - code: string; + name: 'HTTPParserError' + code: string } /** The response exceed the length allowed. */ export class ResponseExceededMaxSizeError extends UndiciError { - name: 'ResponseExceededMaxSizeError'; - code: 'UND_ERR_RES_EXCEEDED_MAX_SIZE'; + name: 'ResponseExceededMaxSizeError' + code: 'UND_ERR_RES_EXCEEDED_MAX_SIZE' + } + + export class RequestRetryError extends UndiciError { + constructor ( + message: string, + statusCode: number, + headers?: IncomingHttpHeaders | string[] | null, + body?: null | Record<string, any> | string + ) + name: 'RequestRetryError' + code: 'UND_ERR_REQ_RETRY' + statusCode: number + data: { + count: number; + } + + headers: Record<string, string | string[]> + } + + export class SecureProxyConnectionError extends UndiciError { + constructor ( + cause?: Error, + message?: string, + options?: Record<any, any> + ) + name: 'SecureProxyConnectionError' + code: 'UND_ERR_PRX_TLS' } } diff --git a/node_modules/cheerio/node_modules/undici/types/eventsource.d.ts b/node_modules/undici/types/eventsource.d.ts similarity index 100% rename from node_modules/cheerio/node_modules/undici/types/eventsource.d.ts rename to node_modules/undici/types/eventsource.d.ts diff --git a/node_modules/undici/types/fetch.d.ts b/node_modules/undici/types/fetch.d.ts index 440f2b0..4edf41e 100644 --- a/node_modules/undici/types/fetch.d.ts +++ b/node_modules/undici/types/fetch.d.ts @@ -6,7 +6,7 @@ import { Blob } from 'buffer' import { URL, URLSearchParams } from 'url' import { ReadableStream } from 'stream/web' import { FormData } from './formdata' - +import { HeaderRecord } from './header' import Dispatcher from './dispatcher' export type RequestInfo = string | URL | Request @@ -27,12 +27,29 @@ export type BodyInit = | null | string -export interface BodyMixin { +export class BodyMixin { readonly body: ReadableStream | null readonly bodyUsed: boolean readonly arrayBuffer: () => Promise<ArrayBuffer> readonly blob: () => Promise<Blob> + /** + * @deprecated This method is not recommended for parsing multipart/form-data bodies in server environments. + * It is recommended to use a library such as [@fastify/busboy](https://www.npmjs.com/package/@fastify/busboy) as follows: + * + * @example + * ```js + * import { Busboy } from '@fastify/busboy' + * import { Readable } from 'node:stream' + * + * const response = await fetch('...') + * const busboy = new Busboy({ headers: { 'content-type': response.headers.get('content-type') } }) + * + * // handle events emitted from `busboy` + * + * Readable.fromWeb(response.body).pipe(busboy) + * ``` + */ readonly formData: () => Promise<FormData> readonly json: () => Promise<unknown> readonly text: () => Promise<string> @@ -50,7 +67,7 @@ export interface SpecIterable<T> { [Symbol.iterator](): SpecIterator<T>; } -export type HeadersInit = string[][] | Record<string, string | ReadonlyArray<string>> | Headers +export type HeadersInit = [string, string][] | HeaderRecord | Headers export declare class Headers implements SpecIterable<[string, string]> { constructor (init?: HeadersInit) @@ -68,7 +85,7 @@ export declare class Headers implements SpecIterable<[string, string]> { readonly keys: () => SpecIterableIterator<string> readonly values: () => SpecIterableIterator<string> readonly entries: () => SpecIterableIterator<[string, string]> - readonly [Symbol.iterator]: () => SpecIterator<[string, string]> + readonly [Symbol.iterator]: () => SpecIterableIterator<[string, string]> } export type RequestCache = @@ -102,20 +119,21 @@ type RequestDestination = | 'xslt' export interface RequestInit { - method?: string - keepalive?: boolean - headers?: HeadersInit - body?: BodyInit - redirect?: RequestRedirect - integrity?: string - signal?: AbortSignal | null + body?: BodyInit | null + cache?: RequestCache credentials?: RequestCredentials - mode?: RequestMode - referrer?: string - referrerPolicy?: ReferrerPolicy - window?: null dispatcher?: Dispatcher duplex?: RequestDuplex + headers?: HeadersInit + integrity?: string + keepalive?: boolean + method?: string + mode?: RequestMode + redirect?: RequestRedirect + referrer?: string + referrerPolicy?: ReferrerPolicy + signal?: AbortSignal | null + window?: null } export type ReferrerPolicy = @@ -127,7 +145,7 @@ export type ReferrerPolicy = | 'same-origin' | 'strict-origin' | 'strict-origin-when-cross-origin' - | 'unsafe-url'; + | 'unsafe-url' export type RequestMode = 'cors' | 'navigate' | 'no-cors' | 'same-origin' @@ -135,7 +153,7 @@ export type RequestRedirect = 'error' | 'follow' | 'manual' export type RequestDuplex = 'half' -export declare class Request implements BodyMixin { +export declare class Request extends BodyMixin { constructor (input: RequestInfo, init?: RequestInit) readonly cache: RequestCache @@ -146,22 +164,14 @@ export declare class Request implements BodyMixin { readonly method: string readonly mode: RequestMode readonly redirect: RequestRedirect - readonly referrerPolicy: string + readonly referrer: string + readonly referrerPolicy: ReferrerPolicy 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 } @@ -181,7 +191,7 @@ export type ResponseType = export type ResponseRedirectStatus = 301 | 302 | 303 | 307 | 308 -export declare class Response implements BodyMixin { +export declare class Response extends BodyMixin { constructor (body?: BodyInit, init?: ResponseInit) readonly headers: Headers @@ -192,18 +202,9 @@ export declare class Response implements BodyMixin { 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 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 deleted file mode 100644 index c695b7a..0000000 --- a/node_modules/undici/types/file.d.ts +++ /dev/null @@ -1,39 +0,0 @@ -// 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 deleted file mode 100644 index f05d231..0000000 --- a/node_modules/undici/types/filereader.d.ts +++ /dev/null @@ -1,54 +0,0 @@ -/// <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 index df29a57..030f548 100644 --- a/node_modules/undici/types/formdata.d.ts +++ b/node_modules/undici/types/formdata.d.ts @@ -1,8 +1,8 @@ // 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' +import { File } from 'buffer' +import { SpecIterableIterator } from './fetch' /** * A `string` or `File` that represents a single value from a set of `FormData` key-value pairs. @@ -24,7 +24,7 @@ export declare class FormData { 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 + append (name: string, value: unknown, fileName?: string): void /** * Set a new value for an existing key inside FormData, @@ -36,7 +36,7 @@ export declare class FormData { * @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 + set (name: string, value: unknown, fileName?: string): void /** * Returns the first value associated with a given key from within a `FormData` object. @@ -46,7 +46,7 @@ export declare class FormData { * * @returns A `FormDataEntryValue` containing the value. If the key doesn't exist, the method returns null. */ - get(name: string): FormDataEntryValue | null + get (name: string): FormDataEntryValue | null /** * Returns all the values associated with a given key from within a `FormData` object. @@ -55,7 +55,7 @@ export declare class FormData { * * @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[] + getAll (name: string): FormDataEntryValue[] /** * Returns a boolean stating whether a `FormData` object contains a certain key. @@ -64,14 +64,14 @@ export declare class FormData { * * @return A boolean value. */ - has(name: string): boolean + 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 + delete (name: string): void /** * Executes given callback function for each field of the FormData instance diff --git a/node_modules/undici/types/global-dispatcher.d.ts b/node_modules/undici/types/global-dispatcher.d.ts index 728f95c..2760e13 100644 --- a/node_modules/undici/types/global-dispatcher.d.ts +++ b/node_modules/undici/types/global-dispatcher.d.ts @@ -1,9 +1,9 @@ -import Dispatcher from "./dispatcher"; +import Dispatcher from './dispatcher' + +declare function setGlobalDispatcher<DispatcherImplementation extends Dispatcher> (dispatcher: DispatcherImplementation): void +declare function getGlobalDispatcher (): 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 index 322542d..265769b 100644 --- a/node_modules/undici/types/global-origin.d.ts +++ b/node_modules/undici/types/global-origin.d.ts @@ -1,7 +1,7 @@ +declare function setGlobalOrigin (origin: string | URL | undefined): void +declare function getGlobalOrigin (): URL | undefined + export { - setGlobalOrigin, - getGlobalOrigin + 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 index eb4f5a9..a165f26 100644 --- a/node_modules/undici/types/handlers.d.ts +++ b/node_modules/undici/types/handlers.d.ts @@ -1,9 +1,15 @@ -import Dispatcher from "./dispatcher"; +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 RedirectHandler implements Dispatcher.DispatchHandler { + constructor ( + dispatch: Dispatcher, + maxRedirections: number, + opts: Dispatcher.DispatchOptions, + handler: Dispatcher.DispatchHandler, + redirectionLimitReached: boolean + ) } -export declare class DecoratorHandler implements Dispatcher.DispatchHandlers{ - constructor (handler: Dispatcher.DispatchHandlers) +export declare class DecoratorHandler implements Dispatcher.DispatchHandler { + constructor (handler: Dispatcher.DispatchHandler) } diff --git a/node_modules/undici/types/header.d.ts b/node_modules/undici/types/header.d.ts index bfdb329..efd7b1d 100644 --- a/node_modules/undici/types/header.d.ts +++ b/node_modules/undici/types/header.d.ts @@ -1,4 +1,160 @@ +import { Autocomplete } from './utility' + /** * The header type declaration of `undici`. */ -export type IncomingHttpHeaders = Record<string, string | string[] | undefined>; +export type IncomingHttpHeaders = Record<string, string | string[] | undefined> + +type HeaderNames = Autocomplete< + | 'Accept' + | 'Accept-CH' + | 'Accept-Charset' + | 'Accept-Encoding' + | 'Accept-Language' + | 'Accept-Patch' + | 'Accept-Post' + | 'Accept-Ranges' + | 'Access-Control-Allow-Credentials' + | 'Access-Control-Allow-Headers' + | 'Access-Control-Allow-Methods' + | 'Access-Control-Allow-Origin' + | 'Access-Control-Expose-Headers' + | 'Access-Control-Max-Age' + | 'Access-Control-Request-Headers' + | 'Access-Control-Request-Method' + | 'Age' + | 'Allow' + | 'Alt-Svc' + | 'Alt-Used' + | 'Authorization' + | 'Cache-Control' + | 'Clear-Site-Data' + | 'Connection' + | 'Content-Disposition' + | 'Content-Encoding' + | 'Content-Language' + | 'Content-Length' + | 'Content-Location' + | 'Content-Range' + | 'Content-Security-Policy' + | 'Content-Security-Policy-Report-Only' + | 'Content-Type' + | 'Cookie' + | 'Cross-Origin-Embedder-Policy' + | 'Cross-Origin-Opener-Policy' + | 'Cross-Origin-Resource-Policy' + | 'Date' + | 'Device-Memory' + | 'ETag' + | 'Expect' + | 'Expect-CT' + | 'Expires' + | 'Forwarded' + | 'From' + | 'Host' + | 'If-Match' + | 'If-Modified-Since' + | 'If-None-Match' + | 'If-Range' + | 'If-Unmodified-Since' + | 'Keep-Alive' + | 'Last-Modified' + | 'Link' + | 'Location' + | 'Max-Forwards' + | 'Origin' + | 'Permissions-Policy' + | 'Priority' + | 'Proxy-Authenticate' + | 'Proxy-Authorization' + | 'Range' + | 'Referer' + | 'Referrer-Policy' + | 'Retry-After' + | 'Sec-Fetch-Dest' + | 'Sec-Fetch-Mode' + | 'Sec-Fetch-Site' + | 'Sec-Fetch-User' + | 'Sec-Purpose' + | 'Sec-WebSocket-Accept' + | 'Server' + | 'Server-Timing' + | 'Service-Worker-Navigation-Preload' + | 'Set-Cookie' + | 'SourceMap' + | 'Strict-Transport-Security' + | 'TE' + | 'Timing-Allow-Origin' + | 'Trailer' + | 'Transfer-Encoding' + | 'Upgrade' + | 'Upgrade-Insecure-Requests' + | 'User-Agent' + | 'Vary' + | 'Via' + | 'WWW-Authenticate' + | 'X-Content-Type-Options' + | 'X-Frame-Options' +> + +type IANARegisteredMimeType = Autocomplete< + | 'audio/aac' + | 'video/x-msvideo' + | 'image/avif' + | 'video/av1' + | 'application/octet-stream' + | 'image/bmp' + | 'text/css' + | 'text/csv' + | 'application/vnd.ms-fontobject' + | 'application/epub+zip' + | 'image/gif' + | 'application/gzip' + | 'text/html' + | 'image/x-icon' + | 'text/calendar' + | 'image/jpeg' + | 'text/javascript' + | 'application/json' + | 'application/ld+json' + | 'audio/x-midi' + | 'audio/mpeg' + | 'video/mp4' + | 'video/mpeg' + | 'audio/ogg' + | 'video/ogg' + | 'application/ogg' + | 'audio/opus' + | 'font/otf' + | 'application/pdf' + | 'image/png' + | 'application/rtf' + | 'image/svg+xml' + | 'image/tiff' + | 'video/mp2t' + | 'font/ttf' + | 'text/plain' + | 'application/wasm' + | 'video/webm' + | 'audio/webm' + | 'image/webp' + | 'font/woff' + | 'font/woff2' + | 'application/xhtml+xml' + | 'application/xml' + | 'application/zip' + | 'video/3gpp' + | 'video/3gpp2' + | 'model/gltf+json' + | 'model/gltf-binary' +> + +type KnownHeaderValues = { + 'content-type': IANARegisteredMimeType +} + +export type HeaderRecord = { + [K in HeaderNames | Lowercase<HeaderNames>]?: Lowercase<K> extends keyof KnownHeaderValues + ? KnownHeaderValues[Lowercase<K>] + : string +} diff --git a/node_modules/undici/types/index.d.ts b/node_modules/undici/types/index.d.ts index 0ea8bdc..bfc724e 100644 --- a/node_modules/undici/types/index.d.ts +++ b/node_modules/undici/types/index.d.ts @@ -1,26 +1,30 @@ -import Dispatcher from'./dispatcher' +import Dispatcher from './dispatcher' import { setGlobalDispatcher, getGlobalDispatcher } from './global-dispatcher' import { setGlobalOrigin, getGlobalOrigin } from './global-origin' -import Pool from'./pool' +import Pool from './pool' import { RedirectHandler, DecoratorHandler } from './handlers' import BalancedPool from './balanced-pool' -import Client from'./client' -import buildConnector from'./connector' -import errors from'./errors' -import Agent from'./agent' -import MockClient from'./mock-client' -import MockPool from'./mock-pool' -import MockAgent from'./mock-agent' -import mockErrors from'./mock-errors' -import ProxyAgent from'./proxy-agent' -import RetryHandler from'./retry-handler' +import Client from './client' +import buildConnector from './connector' +import errors from './errors' +import Agent from './agent' +import MockClient from './mock-client' +import MockPool from './mock-pool' +import MockAgent from './mock-agent' +import { MockCallHistory, MockCallHistoryLog } from './mock-call-history' +import mockErrors from './mock-errors' +import ProxyAgent from './proxy-agent' +import EnvHttpProxyAgent from './env-http-proxy-agent' +import RetryHandler from './retry-handler' +import RetryAgent from './retry-agent' import { request, pipeline, stream, connect, upgrade } from './api' +import interceptors from './interceptors' +export * from './util' export * from './cookies' +export * from './eventsource' export * from './fetch' -export * from './file' -export * from './filereader' export * from './formdata' export * from './diagnostics-channel' export * from './websocket' @@ -28,38 +32,42 @@ export * from './content-type' export * from './cache' export { Interceptable } from './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, RetryHandler } +export { Dispatcher, BalancedPool, Pool, Client, buildConnector, errors, Agent, request, stream, pipeline, connect, upgrade, setGlobalDispatcher, getGlobalDispatcher, setGlobalOrigin, getGlobalOrigin, interceptors, MockClient, MockPool, MockAgent, MockCallHistory, MockCallHistoryLog, mockErrors, ProxyAgent, EnvHttpProxyAgent, RedirectHandler, DecoratorHandler, RetryHandler, RetryAgent } export default Undici declare namespace Undici { - var Dispatcher: typeof import('./dispatcher').default - var Pool: typeof import('./pool').default; - var RedirectHandler: typeof import ('./handlers').RedirectHandler - var DecoratorHandler: typeof import ('./handlers').DecoratorHandler - var RetryHandler: typeof import ('./retry-handler').default - var createRedirectInterceptor: typeof import ('./interceptors').createRedirectInterceptor - var BalancedPool: typeof import('./balanced-pool').default; - var Client: typeof import('./client').default; - var buildConnector: typeof import('./connector').default; - var errors: typeof import('./errors').default; - var Agent: typeof import('./agent').default; - var setGlobalDispatcher: typeof import('./global-dispatcher').setGlobalDispatcher; - var getGlobalDispatcher: typeof import('./global-dispatcher').getGlobalDispatcher; - var request: typeof import('./api').request; - var stream: typeof import('./api').stream; - var pipeline: typeof import('./api').pipeline; - var connect: typeof import('./api').connect; - var upgrade: typeof import('./api').upgrade; - var MockClient: typeof import('./mock-client').default; - var MockPool: typeof import('./mock-pool').default; - var MockAgent: typeof import('./mock-agent').default; - var mockErrors: typeof import('./mock-errors').default; - var fetch: typeof import('./fetch').fetch; - var Headers: typeof import('./fetch').Headers; - var Response: typeof import('./fetch').Response; - var Request: typeof import('./fetch').Request; - var FormData: typeof import('./formdata').FormData; - var File: typeof import('./file').File; - var FileReader: typeof import('./filereader').FileReader; - var caches: typeof import('./cache').caches; + const Dispatcher: typeof import('./dispatcher').default + const Pool: typeof import('./pool').default + const RedirectHandler: typeof import ('./handlers').RedirectHandler + const DecoratorHandler: typeof import ('./handlers').DecoratorHandler + const RetryHandler: typeof import ('./retry-handler').default + const BalancedPool: typeof import('./balanced-pool').default + const Client: typeof import('./client').default + const buildConnector: typeof import('./connector').default + const errors: typeof import('./errors').default + const Agent: typeof import('./agent').default + const setGlobalDispatcher: typeof import('./global-dispatcher').setGlobalDispatcher + const getGlobalDispatcher: typeof import('./global-dispatcher').getGlobalDispatcher + const request: typeof import('./api').request + const stream: typeof import('./api').stream + const pipeline: typeof import('./api').pipeline + const connect: typeof import('./api').connect + const upgrade: typeof import('./api').upgrade + const MockClient: typeof import('./mock-client').default + const MockPool: typeof import('./mock-pool').default + const MockAgent: typeof import('./mock-agent').default + const MockCallHistory: typeof import('./mock-call-history').MockCallHistory + const MockCallHistoryLog: typeof import('./mock-call-history').MockCallHistoryLog + const mockErrors: typeof import('./mock-errors').default + const fetch: typeof import('./fetch').fetch + const Headers: typeof import('./fetch').Headers + const Response: typeof import('./fetch').Response + const Request: typeof import('./fetch').Request + const FormData: typeof import('./formdata').FormData + const caches: typeof import('./cache').caches + const interceptors: typeof import('./interceptors').default + const cacheStores: { + MemoryCacheStore: typeof import('./cache-interceptor').default.MemoryCacheStore, + SqliteCacheStore: typeof import('./cache-interceptor').default.SqliteCacheStore + } } diff --git a/node_modules/undici/types/interceptors.d.ts b/node_modules/undici/types/interceptors.d.ts index 047ac17..5a6fcb2 100644 --- a/node_modules/undici/types/interceptors.d.ts +++ b/node_modules/undici/types/interceptors.d.ts @@ -1,5 +1,34 @@ -import Dispatcher from "./dispatcher"; +import CacheHandler from './cache-interceptor' +import Dispatcher from './dispatcher' +import RetryHandler from './retry-handler' +import { LookupOptions } from 'node:dns' -type RedirectInterceptorOpts = { maxRedirections?: number } +export default Interceptors -export declare function createRedirectInterceptor (opts: RedirectInterceptorOpts): Dispatcher.DispatchInterceptor +declare namespace Interceptors { + export type DumpInterceptorOpts = { maxSize?: number } + export type RetryInterceptorOpts = RetryHandler.RetryOptions + export type RedirectInterceptorOpts = { maxRedirections?: number } + + export type ResponseErrorInterceptorOpts = { throwOnError: boolean } + export type CacheInterceptorOpts = CacheHandler.CacheOptions + + // DNS interceptor + export type DNSInterceptorRecord = { address: string, ttl: number, family: 4 | 6 } + export type DNSInterceptorOriginRecords = { 4: { ips: DNSInterceptorRecord[] } | null, 6: { ips: DNSInterceptorRecord[] } | null } + export type DNSInterceptorOpts = { + maxTTL?: number + maxItems?: number + lookup?: (hostname: string, options: LookupOptions, callback: (err: NodeJS.ErrnoException | null, addresses: DNSInterceptorRecord[]) => void) => void + pick?: (origin: URL, records: DNSInterceptorOriginRecords, affinity: 4 | 6) => DNSInterceptorRecord + dualStack?: boolean + affinity?: 4 | 6 + } + + export function dump (opts?: DumpInterceptorOpts): Dispatcher.DispatcherComposeInterceptor + export function retry (opts?: RetryInterceptorOpts): Dispatcher.DispatcherComposeInterceptor + export function redirect (opts?: RedirectInterceptorOpts): Dispatcher.DispatcherComposeInterceptor + export function responseError (opts?: ResponseErrorInterceptorOpts): Dispatcher.DispatcherComposeInterceptor + export function dns (opts?: DNSInterceptorOpts): Dispatcher.DispatcherComposeInterceptor + export function cache (opts?: CacheInterceptorOpts): Dispatcher.DispatcherComposeInterceptor +} diff --git a/node_modules/undici/types/mock-agent.d.ts b/node_modules/undici/types/mock-agent.d.ts index 98cd645..0b83212 100644 --- a/node_modules/undici/types/mock-agent.d.ts +++ b/node_modules/undici/types/mock-agent.d.ts @@ -1,7 +1,8 @@ import Agent from './agent' import Dispatcher from './dispatcher' import { Interceptable, MockInterceptor } from './mock-interceptor' -import MockDispatch = MockInterceptor.MockDispatch; +import MockDispatch = MockInterceptor.MockDispatch +import { MockCallHistory } from './mock-call-history' export default MockAgent @@ -11,30 +12,38 @@ interface PendingInterceptor extends MockDispatch { /** 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) + constructor (options?: TMockAgentOptions) /** 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; + 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; + dispatch (options: Agent.DispatchOptions, handler: Dispatcher.DispatchHandler): boolean /** Closes the mock agent and waits for registered mock pools and clients to also close before resolving. */ - close(): Promise<void>; + close (): Promise<void> /** Disables mocking in MockAgent. */ - deactivate(): void; + 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; + 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; + 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?: { + disableNetConnect (): void + /** get call history. returns the MockAgent call history or undefined if the option is not enabled. */ + getCallHistory (): MockCallHistory | undefined + /** clear every call history. Any MockCallHistoryLog will be deleted on the MockCallHistory instance */ + clearCallHistory (): void + /** Enable call history. Any subsequence calls will then be registered. */ + enableCallHistory (): this + /** Disable call history. Any subsequence calls will then not be registered. */ + disableCallHistory (): this + pendingInterceptors (): PendingInterceptor[] + assertNoPendingInterceptors (options?: { pendingInterceptorsFormatter?: PendingInterceptorsFormatter; - }): void; + }): void } interface PendingInterceptorsFormatter { @@ -45,6 +54,12 @@ declare namespace MockAgent { /** MockAgent options. */ export interface Options extends Agent.Options { /** A custom agent to be encapsulated by the MockAgent. */ - agent?: Agent; + agent?: Dispatcher; + + /** Ignore trailing slashes in the path */ + ignoreTrailingSlash?: boolean; + + /** Enable call history. you can either call MockAgent.enableCallHistory(). default false */ + enableCallHistory?: boolean } } diff --git a/node_modules/undici/types/mock-call-history.d.ts b/node_modules/undici/types/mock-call-history.d.ts new file mode 100644 index 0000000..df07fa0 --- /dev/null +++ b/node_modules/undici/types/mock-call-history.d.ts @@ -0,0 +1,111 @@ +import Dispatcher from './dispatcher' + +declare namespace MockCallHistoryLog { + /** request's configuration properties */ + export type MockCallHistoryLogProperties = 'protocol' | 'host' | 'port' | 'origin' | 'path' | 'hash' | 'fullUrl' | 'method' | 'searchParams' | 'body' | 'headers' +} + +/** a log reflecting request configuration */ +declare class MockCallHistoryLog { + constructor (requestInit: Dispatcher.DispatchOptions) + /** protocol used. ie. 'https:' or 'http:' etc... */ + protocol: string + /** request's host. */ + host: string + /** request's port. */ + port: string + /** request's origin. ie. https://localhost:3000. */ + origin: string + /** path. never contains searchParams. */ + path: string + /** request's hash. */ + hash: string + /** the full url requested. */ + fullUrl: string + /** request's method. */ + method: string + /** search params. */ + searchParams: Record<string, string> + /** request's body */ + body: string | null | undefined + /** request's headers */ + headers: Record<string, string | string[]> | null | undefined + + /** returns an Map of property / value pair */ + toMap (): Map<MockCallHistoryLog.MockCallHistoryLogProperties, string | Record<string, string | string[]> | null | undefined> + + /** returns a string computed with all key value pair */ + toString (): string +} + +declare namespace MockCallHistory { + export type FilterCallsOperator = 'AND' | 'OR' + + /** modify the filtering behavior */ + export interface FilterCallsOptions { + /** the operator to apply when filtering. 'OR' will adds any MockCallHistoryLog matching any criteria given. 'AND' will adds only MockCallHistoryLog matching every criteria given. (default 'OR') */ + operator?: FilterCallsOperator | Lowercase<FilterCallsOperator> + } + /** a function to be executed for filtering MockCallHistoryLog */ + export type FilterCallsFunctionCriteria = (log: MockCallHistoryLog) => boolean + + /** parameter to filter MockCallHistoryLog */ + export type FilterCallsParameter = string | RegExp | undefined | null + + /** an object to execute multiple filtering at once */ + export interface FilterCallsObjectCriteria extends Record<string, FilterCallsParameter> { + /** filter by request protocol. ie https: */ + protocol?: FilterCallsParameter; + /** filter by request host. */ + host?: FilterCallsParameter; + /** filter by request port. */ + port?: FilterCallsParameter; + /** filter by request origin. */ + origin?: FilterCallsParameter; + /** filter by request path. */ + path?: FilterCallsParameter; + /** filter by request hash. */ + hash?: FilterCallsParameter; + /** filter by request fullUrl. */ + fullUrl?: FilterCallsParameter; + /** filter by request method. */ + method?: FilterCallsParameter; + } +} + +/** a call history to track requests configuration */ +declare class MockCallHistory { + constructor (name: string) + /** returns an array of MockCallHistoryLog. */ + calls (): Array<MockCallHistoryLog> + /** returns the first MockCallHistoryLog */ + firstCall (): MockCallHistoryLog | undefined + /** returns the last MockCallHistoryLog. */ + lastCall (): MockCallHistoryLog | undefined + /** returns the nth MockCallHistoryLog. */ + nthCall (position: number): MockCallHistoryLog | undefined + /** return all MockCallHistoryLog matching any of criteria given. if an object is used with multiple properties, you can change the operator to apply during filtering on options */ + filterCalls (criteria: MockCallHistory.FilterCallsFunctionCriteria | MockCallHistory.FilterCallsObjectCriteria | RegExp, options?: MockCallHistory.FilterCallsOptions): Array<MockCallHistoryLog> + /** return all MockCallHistoryLog matching the given protocol. if a string is given, it is matched with includes */ + filterCallsByProtocol (protocol: MockCallHistory.FilterCallsParameter): Array<MockCallHistoryLog> + /** return all MockCallHistoryLog matching the given host. if a string is given, it is matched with includes */ + filterCallsByHost (host: MockCallHistory.FilterCallsParameter): Array<MockCallHistoryLog> + /** return all MockCallHistoryLog matching the given port. if a string is given, it is matched with includes */ + filterCallsByPort (port: MockCallHistory.FilterCallsParameter): Array<MockCallHistoryLog> + /** return all MockCallHistoryLog matching the given origin. if a string is given, it is matched with includes */ + filterCallsByOrigin (origin: MockCallHistory.FilterCallsParameter): Array<MockCallHistoryLog> + /** return all MockCallHistoryLog matching the given path. if a string is given, it is matched with includes */ + filterCallsByPath (path: MockCallHistory.FilterCallsParameter): Array<MockCallHistoryLog> + /** return all MockCallHistoryLog matching the given hash. if a string is given, it is matched with includes */ + filterCallsByHash (hash: MockCallHistory.FilterCallsParameter): Array<MockCallHistoryLog> + /** return all MockCallHistoryLog matching the given fullUrl. if a string is given, it is matched with includes */ + filterCallsByFullUrl (fullUrl: MockCallHistory.FilterCallsParameter): Array<MockCallHistoryLog> + /** return all MockCallHistoryLog matching the given method. if a string is given, it is matched with includes */ + filterCallsByMethod (method: MockCallHistory.FilterCallsParameter): Array<MockCallHistoryLog> + /** clear all MockCallHistoryLog on this MockCallHistory. */ + clear (): void + /** use it with for..of loop or spread operator */ + [Symbol.iterator]: () => Generator<MockCallHistoryLog> +} + +export { MockCallHistoryLog, MockCallHistory } diff --git a/node_modules/undici/types/mock-client.d.ts b/node_modules/undici/types/mock-client.d.ts index 51d008c..88e16d9 100644 --- a/node_modules/undici/types/mock-client.d.ts +++ b/node_modules/undici/types/mock-client.d.ts @@ -7,13 +7,13 @@ 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); + constructor (origin: string, options: MockClient.Options) /** Intercepts any matching requests that use the same origin as this mock client. */ - intercept(options: MockInterceptor.Options): MockInterceptor; + intercept (options: MockInterceptor.Options): MockInterceptor /** Dispatches a mocked request. */ - dispatch(options: Dispatcher.DispatchOptions, handlers: Dispatcher.DispatchHandlers): boolean; + dispatch (options: Dispatcher.DispatchOptions, handlers: Dispatcher.DispatchHandler): boolean /** Closes the mock client and gracefully waits for enqueued requests to complete. */ - close(): Promise<void>; + close (): Promise<void> } declare namespace MockClient { diff --git a/node_modules/undici/types/mock-errors.d.ts b/node_modules/undici/types/mock-errors.d.ts index 3d9e727..eefeecd 100644 --- a/node_modules/undici/types/mock-errors.d.ts +++ b/node_modules/undici/types/mock-errors.d.ts @@ -5,8 +5,8 @@ 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'; + 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 index 6b3961c..418db41 100644 --- a/node_modules/undici/types/mock-interceptor.d.ts +++ b/node_modules/undici/types/mock-interceptor.d.ts @@ -1,42 +1,36 @@ import { IncomingHttpHeaders } from './header' -import Dispatcher from './dispatcher'; +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>); + constructor (mockDispatch: MockInterceptor.MockDispatch<TData>) /** Delay a reply by a set amount of time in ms. */ - delay(waitInMs: number): MockScope<TData>; + 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>; + persist (): MockScope<TData> /** Define a reply for a set amount of matching requests. */ - times(repeatTimes: number): MockScope<TData>; + times (repeatTimes: number): MockScope<TData> } /** The interceptor for a Mock. */ declare class MockInterceptor { - constructor(options: MockInterceptor.Options, mockDispatches: MockInterceptor.MockDispatch[]); + 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>(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>; + ): MockScope<TData> /** Mock an undici request by throwing the defined reply error. */ - replyWithError<TError extends Error = Error>(error: TError): MockScope; + replyWithError<TError extends Error = Error>(error: TError): MockScope /** Set default reply headers on the interceptor for subsequent mocked replies. */ - defaultReplyHeaders(headers: IncomingHttpHeaders): MockInterceptor; + defaultReplyHeaders (headers: IncomingHttpHeaders): MockInterceptor /** Set default reply trailers on the interceptor for subsequent mocked replies. */ - defaultReplyTrailers(trailers: Record<string, string>): MockInterceptor; + defaultReplyTrailers (trailers: Record<string, string>): MockInterceptor /** Set automatically calculated content-length header on subsequent mocked replies. */ - replyContentLength(): MockInterceptor; + replyContentLength (): MockInterceptor } declare namespace MockInterceptor { @@ -71,16 +65,16 @@ declare namespace MockInterceptor { export interface MockResponseCallbackOptions { path: string; - origin: string; method: string; - body?: BodyInit | Dispatcher.DispatchOptions['body']; - headers: Headers | Record<string, string>; - maxRedirections: number; + headers?: Headers | Record<string, string>; + origin?: string; + body?: BodyInit | Dispatcher.DispatchOptions['body'] | null; + maxRedirections?: number; } export type MockResponseDataHandler<TData extends object = object> = ( opts: MockResponseCallbackOptions - ) => TData | Buffer | string; + ) => TData | Buffer | string export type MockReplyOptionsCallback<TData extends object = object> = ( opts: MockResponseCallbackOptions @@ -91,3 +85,9 @@ interface Interceptable extends Dispatcher { /** Intercepts any matching requests that use the same origin as this mock client. */ intercept(options: MockInterceptor.Options): MockInterceptor; } + +export { + Interceptable, + MockInterceptor, + MockScope +} diff --git a/node_modules/undici/types/mock-pool.d.ts b/node_modules/undici/types/mock-pool.d.ts index 39e709a..5a9d9cb 100644 --- a/node_modules/undici/types/mock-pool.d.ts +++ b/node_modules/undici/types/mock-pool.d.ts @@ -7,13 +7,13 @@ 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); + constructor (origin: string, options: MockPool.Options) /** Intercepts any matching requests that use the same origin as this mock pool. */ - intercept(options: MockInterceptor.Options): MockInterceptor; + intercept (options: MockInterceptor.Options): MockInterceptor /** Dispatches a mocked request. */ - dispatch(options: Dispatcher.DispatchOptions, handlers: Dispatcher.DispatchHandlers): boolean; + dispatch (options: Dispatcher.DispatchOptions, handlers: Dispatcher.DispatchHandler): boolean /** Closes the mock pool and gracefully waits for enqueued requests to complete. */ - close(): Promise<void>; + close (): Promise<void> } declare namespace MockPool { diff --git a/node_modules/undici/types/patch.d.ts b/node_modules/undici/types/patch.d.ts index 3871acf..8f7acbb 100644 --- a/node_modules/undici/types/patch.d.ts +++ b/node_modules/undici/types/patch.d.ts @@ -2,48 +2,6 @@ // 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 diff --git a/node_modules/undici/types/pool-stats.d.ts b/node_modules/undici/types/pool-stats.d.ts index 8b6d2bf..f76a5f6 100644 --- a/node_modules/undici/types/pool-stats.d.ts +++ b/node_modules/undici/types/pool-stats.d.ts @@ -1,19 +1,19 @@ -import Pool from "./pool" +import Pool from './pool' export default PoolStats declare class PoolStats { - constructor(pool: Pool); + constructor (pool: Pool) /** Number of open socket connections in this pool. */ - connected: number; + connected: number /** Number of open socket connections in this pool that do not have an active request. */ - free: number; + free: number /** Number of pending requests across all clients in this pool. */ - pending: number; + pending: number /** Number of queued requests across all clients in this pool. */ - queued: number; + queued: number /** Number of currently active requests across all clients in this pool. */ - running: number; + running: number /** Number of active, pending, or queued requests across all clients in this pool. */ - size: number; + size: number } diff --git a/node_modules/undici/types/pool.d.ts b/node_modules/undici/types/pool.d.ts index 7747d48..4814606 100644 --- a/node_modules/undici/types/pool.d.ts +++ b/node_modules/undici/types/pool.d.ts @@ -1,28 +1,39 @@ import Client from './client' import TPoolStats from './pool-stats' import { URL } from 'url' -import Dispatcher from "./dispatcher"; +import Dispatcher from './dispatcher' export default Pool +type PoolConnectOptions = Omit<Dispatcher.ConnectOptions, 'origin'> + declare class Pool extends Dispatcher { - constructor(url: string | URL, options?: Pool.Options) + constructor (url: string | URL, options?: Pool.Options) /** `true` after `pool.close()` has been called. */ - closed: boolean; + closed: boolean /** `true` after `pool.destroyed()` has been called or `pool.close()` has been called and the pool shutdown has completed. */ - destroyed: boolean; + destroyed: boolean /** Aggregate stats for a Pool. */ - readonly stats: TPoolStats; + readonly stats: TPoolStats + + // Override dispatcher APIs. + override connect ( + options: PoolConnectOptions + ): Promise<Dispatcher.ConnectData> + override connect ( + options: PoolConnectOptions, + callback: (err: Error | null, data: Dispatcher.ConnectData) => void + ): void } declare namespace Pool { - export type PoolStats = TPoolStats; + 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"] + 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 index 96b2638..7d39f97 100644 --- a/node_modules/undici/types/proxy-agent.d.ts +++ b/node_modules/undici/types/proxy-agent.d.ts @@ -1,17 +1,15 @@ import Agent from './agent' -import buildConnector from './connector'; -import Client from './client' +import buildConnector from './connector' 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) + constructor (options: ProxyAgent.Options | string) - dispatch(options: Agent.DispatchOptions, handler: Dispatcher.DispatchHandlers): boolean; - close(): Promise<void>; + dispatch (options: Agent.DispatchOptions, handler: Dispatcher.DispatchHandler): boolean + close (): Promise<void> } declare namespace ProxyAgent { diff --git a/node_modules/undici/types/readable.d.ts b/node_modules/undici/types/readable.d.ts index 4549a8c..e4f314b 100644 --- a/node_modules/undici/types/readable.d.ts +++ b/node_modules/undici/types/readable.d.ts @@ -1,40 +1,47 @@ -import { Readable } from "stream"; +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 - ) + constructor (opts: { + resume: (this: Readable, size: number) => void | null; + abort: () => void | null; + contentType?: string; + contentLength?: number; + highWaterMark?: number; + }) /** Consumes and returns the body as a string * https://fetch.spec.whatwg.org/#dom-body-text */ - text(): Promise<string> + text (): Promise<string> /** Consumes and returns the body as a JavaScript Object * https://fetch.spec.whatwg.org/#dom-body-json */ - json(): Promise<unknown> + json (): Promise<unknown> /** Consumes and returns the body as a Blob * https://fetch.spec.whatwg.org/#dom-body-blob */ - blob(): Promise<Blob> + blob (): Promise<Blob> + + /** Consumes and returns the body as an Uint8Array + * https://fetch.spec.whatwg.org/#dom-body-bytes + */ + bytes (): Promise<Uint8Array> /** Consumes and returns the body as an ArrayBuffer * https://fetch.spec.whatwg.org/#dom-body-arraybuffer */ - arrayBuffer(): Promise<ArrayBuffer> + arrayBuffer (): Promise<ArrayBuffer> /** Not implemented * * https://fetch.spec.whatwg.org/#dom-body-formdata */ - formData(): Promise<never> + formData (): Promise<never> /** Returns true if the body is not null and the body has been consumed * @@ -44,9 +51,8 @@ declare class BodyReadable extends Readable { */ readonly bodyUsed: boolean - /** Throws on node 16.6.0 - * - * If body is null, it should return null as the body + /** + * If body is null, it should return null as the body * * If body is not null, should return the body as a ReadableStream * @@ -55,7 +61,8 @@ declare class BodyReadable extends Readable { 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 + * @param opts.limit Number of bytes to read (optional) - Default: 131072 + * @param opts.signal AbortSignal to cancel the operation (optional) */ - dump(opts?: { limit: number }): Promise<void> + dump (opts?: { limit: number; signal?: AbortSignal }): Promise<void> } diff --git a/node_modules/cheerio/node_modules/undici/types/retry-agent.d.ts b/node_modules/undici/types/retry-agent.d.ts similarity index 67% rename from node_modules/cheerio/node_modules/undici/types/retry-agent.d.ts rename to node_modules/undici/types/retry-agent.d.ts index 963cea9..82268c3 100644 --- a/node_modules/cheerio/node_modules/undici/types/retry-agent.d.ts +++ b/node_modules/undici/types/retry-agent.d.ts @@ -4,5 +4,5 @@ import RetryHandler from './retry-handler' export default RetryAgent declare class RetryAgent extends Dispatcher { - constructor(dispatcher: Dispatcher, options?: RetryHandler.RetryOptions) + constructor (dispatcher: Dispatcher, options?: RetryHandler.RetryOptions) } diff --git a/node_modules/undici/types/retry-handler.d.ts b/node_modules/undici/types/retry-handler.d.ts index 0528eb4..988e74b 100644 --- a/node_modules/undici/types/retry-handler.d.ts +++ b/node_modules/undici/types/retry-handler.d.ts @@ -1,18 +1,18 @@ -import Dispatcher from "./dispatcher"; +import Dispatcher from './dispatcher' -export default RetryHandler; +export default RetryHandler -declare class RetryHandler implements Dispatcher.DispatchHandlers { - constructor( +declare class RetryHandler implements Dispatcher.DispatchHandler { + constructor ( options: Dispatcher.DispatchOptions & { retryOptions?: RetryHandler.RetryOptions; }, retryHandlers: RetryHandler.RetryHandlers - ); + ) } declare namespace RetryHandler { - export type RetryState = { counter: number; currentTimeout: number }; + export type RetryState = { counter: number; } export type RetryContext = { state: RetryState; @@ -21,7 +21,7 @@ declare namespace RetryHandler { }; } - export type OnRetryCallback = (result?: Error | null) => void; + export type OnRetryCallback = (result?: Error | null) => void export type RetryCallback = ( err: Error, @@ -32,7 +32,7 @@ declare namespace RetryHandler { }; }, callback: OnRetryCallback - ) => number | null; + ) => void export interface RetryOptions { /** @@ -110,7 +110,7 @@ declare namespace RetryHandler { } export interface RetryHandlers { - dispatch: Dispatcher["dispatch"]; - handler: Dispatcher.DispatchHandlers; + dispatch: Dispatcher['dispatch']; + handler: Dispatcher.DispatchHandler; } } diff --git a/node_modules/cheerio/node_modules/undici/types/util.d.ts b/node_modules/undici/types/util.d.ts similarity index 77% rename from node_modules/cheerio/node_modules/undici/types/util.d.ts rename to node_modules/undici/types/util.d.ts index 77cf147..8fc50cc 100644 --- a/node_modules/cheerio/node_modules/undici/types/util.d.ts +++ b/node_modules/undici/types/util.d.ts @@ -3,7 +3,7 @@ export namespace util { * Retrieves a header name and returns its lowercase value. * @param value Header name */ - export function headerNameToString(value: string | Buffer): string; + export function headerNameToString (value: string | Buffer): string /** * Receives a header object and returns the parsed value. @@ -11,8 +11,8 @@ export namespace util { * @param obj Object to specify a proxy object. Used to assign parsed values. * @returns If `obj` is specified, it is equivalent to `obj`. */ - export function parseHeaders( + export function parseHeaders ( headers: (Buffer | string | (Buffer | string)[])[], obj?: Record<string, string | string[]> - ): Record<string, string | string[]>; + ): Record<string, string | string[]> } diff --git a/node_modules/undici/types/utility.d.ts b/node_modules/undici/types/utility.d.ts new file mode 100644 index 0000000..bfb3ca7 --- /dev/null +++ b/node_modules/undici/types/utility.d.ts @@ -0,0 +1,7 @@ +type AutocompletePrimitiveBaseType<T> = + T extends string ? string : + T extends number ? number : + T extends boolean ? boolean : + never + +export type Autocomplete<T> = T | (AutocompletePrimitiveBaseType<T> & Record<never, never>) diff --git a/node_modules/undici/types/webidl.d.ts b/node_modules/undici/types/webidl.d.ts index 40cfe06..33b9343 100644 --- a/node_modules/undici/types/webidl.d.ts +++ b/node_modules/undici/types/webidl.d.ts @@ -1,11 +1,12 @@ // These types are not exported, and are only used internally +import * as undici from './index' /** * 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 SequenceConverter<T> = (object: unknown, iterable?: IterableIterator<T>) => T[] type RecordConverter<K extends string, V> = (object: unknown) => Record<K, V> @@ -34,11 +35,24 @@ interface WebidlErrors { }): TypeError } +interface WebIDLTypes { + UNDEFINED: 1, + BOOLEAN: 2, + STRING: 3, + SYMBOL: 4, + NUMBER: 5, + BIGINT: 6, + NULL: 7 + OBJECT: 8 +} + interface WebidlUtil { /** * @see https://tc39.es/ecma262/#sec-ecmascript-data-types-and-values */ - Type (object: unknown): + Type (object: unknown): WebIDLTypes[keyof WebIDLTypes] + + TypeValueToString (o: unknown): | 'Undefined' | 'Boolean' | 'String' @@ -48,6 +62,8 @@ interface WebidlUtil { | 'Null' | 'Object' + Types: WebIDLTypes + /** * @see https://webidl.spec.whatwg.org/#abstract-opdef-converttoint */ @@ -62,20 +78,33 @@ interface WebidlUtil { * @see https://webidl.spec.whatwg.org/#abstract-opdef-converttoint */ IntegerPart (N: number): number + + /** + * Stringifies {@param V} + */ + Stringify (V: any): string + + MakeTypeAssertion <I>(I: I): (arg: any) => arg is I + + /** + * Mark a value as uncloneable for Node.js. + * This is only effective in some newer Node.js versions. + */ + markAsUncloneable (V: any): void } interface WebidlConverters { /** * @see https://webidl.spec.whatwg.org/#es-DOMString */ - DOMString (V: unknown, opts?: { + DOMString (V: unknown, prefix: string, argument: string, opts?: { legacyNullToEmptyString: boolean }): string /** * @see https://webidl.spec.whatwg.org/#es-ByteString */ - ByteString (V: unknown): string + ByteString (V: unknown, prefix: string, argument: string): string /** * @see https://webidl.spec.whatwg.org/#es-USVString @@ -145,7 +174,7 @@ interface WebidlConverters { ): NodeJS.TypedArray | ArrayBufferLike | DataView ['sequence<ByteString>']: SequenceConverter<string> - + ['sequence<sequence<ByteString>>']: SequenceConverter<string[]> ['record<ByteString, ByteString>']: RecordConverter<string, string> @@ -153,16 +182,35 @@ interface WebidlConverters { [Key: string]: (...args: any[]) => unknown } +type IsAssertion<T> = (arg: any) => arg is T + +interface WebidlIs { + Request: IsAssertion<undici.Request> + Response: IsAssertion<undici.Response> + ReadableStream: IsAssertion<ReadableStream> + Blob: IsAssertion<Blob> + URLSearchParams: IsAssertion<URLSearchParams> + File: IsAssertion<File> + FormData: IsAssertion<undici.FormData> + URL: IsAssertion<URL> + WebSocketError: IsAssertion<undici.WebSocketError> + AbortSignal: IsAssertion<AbortSignal> + MessagePort: IsAssertion<MessagePort> +} + export interface Webidl { errors: WebidlErrors util: WebidlUtil converters: WebidlConverters + is: WebidlIs /** * @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 + brandCheck <Interface extends new () => unknown>(V: unknown, cls: Interface): asserts V is Interface + + brandCheckMultiple <Interfaces extends (new () => unknown)[]> (list: Interfaces): (V: any) => asserts V is Interfaces[number] /** * @see https://webidl.spec.whatwg.org/#es-sequence @@ -185,10 +233,11 @@ export interface Webidl { * Similar to {@link Webidl.brandCheck} but allows skipping the check if third party * interfaces are allowed. */ - interfaceConverter <Interface>(cls: Interface): ( + interfaceConverter <Interface>(typeCheck: IsAssertion<Interface>, name: string): ( V: unknown, - opts?: { strict: boolean } - ) => asserts V is typeof cls + prefix: string, + argument: string + ) => asserts V is Interface // TODO(@KhafraDev): a type could likely be implemented that can infer the return type // from the converters given? @@ -199,7 +248,7 @@ export interface Webidl { */ dictionaryConverter (converters: { key: string, - defaultValue?: unknown, + defaultValue?: () => unknown, required?: boolean, converter: (...args: unknown[]) => unknown, allowedValues?: unknown[] @@ -213,8 +262,5 @@ export interface Webidl { converter: Converter<T> ): (V: unknown) => ReturnType<typeof converter> | null - argumentLengthCheck (args: { length: number }, min: number, context: { - header: string - message?: string - }): void + argumentLengthCheck (args: { length: number }, min: number, context: string): void } diff --git a/node_modules/undici/types/websocket.d.ts b/node_modules/undici/types/websocket.d.ts index 15a357d..5638664 100644 --- a/node_modules/undici/types/websocket.d.ts +++ b/node_modules/undici/types/websocket.d.ts @@ -3,8 +3,6 @@ import type { Blob } from 'buffer' import type { MessagePort } from 'worker_threads' import { - EventTarget, - Event, EventInit, EventListenerOptions, AddEventListenerOptions, @@ -17,14 +15,14 @@ export type BinaryType = 'blob' | 'arraybuffer' interface WebSocketEventMap { close: CloseEvent - error: Event + error: ErrorEvent message: MessageEvent open: Event } interface WebSocket extends EventTarget { binaryType: BinaryType - + readonly bufferedAmount: number readonly extensions: string @@ -124,8 +122,62 @@ export declare const MessageEvent: { new<T>(type: string, eventInitDict?: MessageEventInit<T>): MessageEvent<T> } +interface ErrorEventInit extends EventInit { + message?: string + filename?: string + lineno?: number + colno?: number + error?: any +} + +interface ErrorEvent extends Event { + readonly message: string + readonly filename: string + readonly lineno: number + readonly colno: number + readonly error: any +} + +export declare const ErrorEvent: { + prototype: ErrorEvent + new (type: string, eventInitDict?: ErrorEventInit): ErrorEvent +} + interface WebSocketInit { protocols?: string | string[], dispatcher?: Dispatcher, headers?: HeadersInit } + +interface WebSocketStreamOptions { + protocols?: string | string[] + signal?: AbortSignal +} + +interface WebSocketCloseInfo { + closeCode: number + reason: string +} + +interface WebSocketStream { + closed: Promise<WebSocketCloseInfo> + opened: Promise<{ + extensions: string + protocol: string + readable: ReadableStream + writable: WritableStream + }> + url: string +} + +export declare const WebSocketStream: { + prototype: WebSocketStream + new (url: string | URL, options?: WebSocketStreamOptions): WebSocketStream +} + +interface WebSocketError extends Event, WebSocketCloseInfo {} + +export declare const WebSocketError: { + prototype: WebSocketError + new (type: string, init?: WebSocketCloseInfo): WebSocketError +} diff --git a/node_modules/whatwg-encoding/lib/labels-to-names.json b/node_modules/whatwg-encoding/lib/labels-to-names.json deleted file mode 100644 index 8370144..0000000 --- a/node_modules/whatwg-encoding/lib/labels-to-names.json +++ /dev/null @@ -1,217 +0,0 @@ -{ - "866": "IBM866", - "unicode-1-1-utf-8": "UTF-8", - "unicode11utf8": "UTF-8", - "unicode20utf8": "UTF-8", - "utf-8": "UTF-8", - "utf8": "UTF-8", - "x-unicode20utf8": "UTF-8", - "cp866": "IBM866", - "csibm866": "IBM866", - "ibm866": "IBM866", - "csisolatin2": "ISO-8859-2", - "iso-8859-2": "ISO-8859-2", - "iso-ir-101": "ISO-8859-2", - "iso8859-2": "ISO-8859-2", - "iso88592": "ISO-8859-2", - "iso_8859-2": "ISO-8859-2", - "iso_8859-2:1987": "ISO-8859-2", - "l2": "ISO-8859-2", - "latin2": "ISO-8859-2", - "csisolatin3": "ISO-8859-3", - "iso-8859-3": "ISO-8859-3", - "iso-ir-109": "ISO-8859-3", - "iso8859-3": "ISO-8859-3", - "iso88593": "ISO-8859-3", - "iso_8859-3": "ISO-8859-3", - "iso_8859-3:1988": "ISO-8859-3", - "l3": "ISO-8859-3", - "latin3": "ISO-8859-3", - "csisolatin4": "ISO-8859-4", - "iso-8859-4": "ISO-8859-4", - "iso-ir-110": "ISO-8859-4", - "iso8859-4": "ISO-8859-4", - "iso88594": "ISO-8859-4", - "iso_8859-4": "ISO-8859-4", - "iso_8859-4:1988": "ISO-8859-4", - "l4": "ISO-8859-4", - "latin4": "ISO-8859-4", - "csisolatincyrillic": "ISO-8859-5", - "cyrillic": "ISO-8859-5", - "iso-8859-5": "ISO-8859-5", - "iso-ir-144": "ISO-8859-5", - "iso8859-5": "ISO-8859-5", - "iso88595": "ISO-8859-5", - "iso_8859-5": "ISO-8859-5", - "iso_8859-5:1988": "ISO-8859-5", - "arabic": "ISO-8859-6", - "asmo-708": "ISO-8859-6", - "csiso88596e": "ISO-8859-6", - "csiso88596i": "ISO-8859-6", - "csisolatinarabic": "ISO-8859-6", - "ecma-114": "ISO-8859-6", - "iso-8859-6": "ISO-8859-6", - "iso-8859-6-e": "ISO-8859-6", - "iso-8859-6-i": "ISO-8859-6", - "iso-ir-127": "ISO-8859-6", - "iso8859-6": "ISO-8859-6", - "iso88596": "ISO-8859-6", - "iso_8859-6": "ISO-8859-6", - "iso_8859-6:1987": "ISO-8859-6", - "csisolatingreek": "ISO-8859-7", - "ecma-118": "ISO-8859-7", - "elot_928": "ISO-8859-7", - "greek": "ISO-8859-7", - "greek8": "ISO-8859-7", - "iso-8859-7": "ISO-8859-7", - "iso-ir-126": "ISO-8859-7", - "iso8859-7": "ISO-8859-7", - "iso88597": "ISO-8859-7", - "iso_8859-7": "ISO-8859-7", - "iso_8859-7:1987": "ISO-8859-7", - "sun_eu_greek": "ISO-8859-7", - "csiso88598e": "ISO-8859-8", - "csisolatinhebrew": "ISO-8859-8", - "hebrew": "ISO-8859-8", - "iso-8859-8": "ISO-8859-8", - "iso-8859-8-e": "ISO-8859-8", - "iso-ir-138": "ISO-8859-8", - "iso8859-8": "ISO-8859-8", - "iso88598": "ISO-8859-8", - "iso_8859-8": "ISO-8859-8", - "iso_8859-8:1988": "ISO-8859-8", - "visual": "ISO-8859-8", - "csisolatin6": "ISO-8859-10", - "iso-8859-10": "ISO-8859-10", - "iso-ir-157": "ISO-8859-10", - "iso8859-10": "ISO-8859-10", - "iso885910": "ISO-8859-10", - "l6": "ISO-8859-10", - "latin6": "ISO-8859-10", - "iso-8859-13": "ISO-8859-13", - "iso8859-13": "ISO-8859-13", - "iso885913": "ISO-8859-13", - "iso-8859-14": "ISO-8859-14", - "iso8859-14": "ISO-8859-14", - "iso885914": "ISO-8859-14", - "csisolatin9": "ISO-8859-15", - "iso-8859-15": "ISO-8859-15", - "iso8859-15": "ISO-8859-15", - "iso885915": "ISO-8859-15", - "iso_8859-15": "ISO-8859-15", - "l9": "ISO-8859-15", - "iso-8859-16": "ISO-8859-16", - "cskoi8r": "KOI8-R", - "koi": "KOI8-R", - "koi8": "KOI8-R", - "koi8-r": "KOI8-R", - "koi8_r": "KOI8-R", - "koi8-ru": "KOI8-U", - "koi8-u": "KOI8-U", - "csmacintosh": "macintosh", - "mac": "macintosh", - "macintosh": "macintosh", - "x-mac-roman": "macintosh", - "dos-874": "windows-874", - "iso-8859-11": "windows-874", - "iso8859-11": "windows-874", - "iso885911": "windows-874", - "tis-620": "windows-874", - "windows-874": "windows-874", - "cp1250": "windows-1250", - "windows-1250": "windows-1250", - "x-cp1250": "windows-1250", - "cp1251": "windows-1251", - "windows-1251": "windows-1251", - "x-cp1251": "windows-1251", - "ansi_x3.4-1968": "windows-1252", - "ascii": "windows-1252", - "cp1252": "windows-1252", - "cp819": "windows-1252", - "csisolatin1": "windows-1252", - "ibm819": "windows-1252", - "iso-8859-1": "windows-1252", - "iso-ir-100": "windows-1252", - "iso8859-1": "windows-1252", - "iso88591": "windows-1252", - "iso_8859-1": "windows-1252", - "iso_8859-1:1987": "windows-1252", - "l1": "windows-1252", - "latin1": "windows-1252", - "us-ascii": "windows-1252", - "windows-1252": "windows-1252", - "x-cp1252": "windows-1252", - "cp1253": "windows-1253", - "windows-1253": "windows-1253", - "x-cp1253": "windows-1253", - "cp1254": "windows-1254", - "csisolatin5": "windows-1254", - "iso-8859-9": "windows-1254", - "iso-ir-148": "windows-1254", - "iso8859-9": "windows-1254", - "iso88599": "windows-1254", - "iso_8859-9": "windows-1254", - "iso_8859-9:1989": "windows-1254", - "l5": "windows-1254", - "latin5": "windows-1254", - "windows-1254": "windows-1254", - "x-cp1254": "windows-1254", - "cp1255": "windows-1255", - "windows-1255": "windows-1255", - "x-cp1255": "windows-1255", - "cp1256": "windows-1256", - "windows-1256": "windows-1256", - "x-cp1256": "windows-1256", - "cp1257": "windows-1257", - "windows-1257": "windows-1257", - "x-cp1257": "windows-1257", - "cp1258": "windows-1258", - "windows-1258": "windows-1258", - "x-cp1258": "windows-1258", - "chinese": "GBK", - "csgb2312": "GBK", - "csiso58gb231280": "GBK", - "gb2312": "GBK", - "gb_2312": "GBK", - "gb_2312-80": "GBK", - "gbk": "GBK", - "iso-ir-58": "GBK", - "x-gbk": "GBK", - "gb18030": "gb18030", - "big5": "Big5", - "big5-hkscs": "Big5", - "cn-big5": "Big5", - "csbig5": "Big5", - "x-x-big5": "Big5", - "cseucpkdfmtjapanese": "EUC-JP", - "euc-jp": "EUC-JP", - "x-euc-jp": "EUC-JP", - "csshiftjis": "Shift_JIS", - "ms932": "Shift_JIS", - "ms_kanji": "Shift_JIS", - "shift-jis": "Shift_JIS", - "shift_jis": "Shift_JIS", - "sjis": "Shift_JIS", - "windows-31j": "Shift_JIS", - "x-sjis": "Shift_JIS", - "cseuckr": "EUC-KR", - "csksc56011987": "EUC-KR", - "euc-kr": "EUC-KR", - "iso-ir-149": "EUC-KR", - "korean": "EUC-KR", - "ks_c_5601-1987": "EUC-KR", - "ks_c_5601-1989": "EUC-KR", - "ksc5601": "EUC-KR", - "ksc_5601": "EUC-KR", - "windows-949": "EUC-KR", - "unicodefffe": "UTF-16BE", - "utf-16be": "UTF-16BE", - "csunicode": "UTF-16LE", - "iso-10646-ucs-2": "UTF-16LE", - "ucs-2": "UTF-16LE", - "unicode": "UTF-16LE", - "unicodefeff": "UTF-16LE", - "utf-16": "UTF-16LE", - "utf-16le": "UTF-16LE", - "x-user-defined": "x-user-defined" -} \ No newline at end of file diff --git a/node_modules/whatwg-encoding/lib/supported-names.json b/node_modules/whatwg-encoding/lib/supported-names.json deleted file mode 100644 index 6ea2fc0..0000000 --- a/node_modules/whatwg-encoding/lib/supported-names.json +++ /dev/null @@ -1,38 +0,0 @@ -[ - "UTF-8", - "IBM866", - "ISO-8859-2", - "ISO-8859-3", - "ISO-8859-4", - "ISO-8859-5", - "ISO-8859-6", - "ISO-8859-7", - "ISO-8859-8", - "ISO-8859-10", - "ISO-8859-13", - "ISO-8859-14", - "ISO-8859-15", - "ISO-8859-16", - "KOI8-R", - "KOI8-U", - "macintosh", - "windows-874", - "windows-1250", - "windows-1251", - "windows-1252", - "windows-1253", - "windows-1254", - "windows-1255", - "windows-1256", - "windows-1257", - "windows-1258", - "GBK", - "gb18030", - "Big5", - "EUC-JP", - "Shift_JIS", - "EUC-KR", - "UTF-16BE", - "UTF-16LE", - "x-user-defined" -] \ No newline at end of file diff --git a/node_modules/whatwg-encoding/lib/whatwg-encoding.js b/node_modules/whatwg-encoding/lib/whatwg-encoding.js deleted file mode 100644 index 3123b5a..0000000 --- a/node_modules/whatwg-encoding/lib/whatwg-encoding.js +++ /dev/null @@ -1,60 +0,0 @@ -"use strict"; -const iconvLite = require("iconv-lite"); -const supportedNames = require("./supported-names.json"); -const labelsToNames = require("./labels-to-names.json"); - -const supportedNamesSet = new Set(supportedNames); - -// https://encoding.spec.whatwg.org/#concept-encoding-get -exports.labelToName = label => { - label = String(label).trim().toLowerCase(); - - return labelsToNames[label] || null; -}; - -// https://encoding.spec.whatwg.org/#decode -exports.decode = (uint8Array, fallbackEncodingName) => { - let encoding = fallbackEncodingName; - if (!exports.isSupported(encoding)) { - throw new RangeError(`"${encoding}" is not a supported encoding name`); - } - - const bomEncoding = exports.getBOMEncoding(uint8Array); - if (bomEncoding !== null) { - encoding = bomEncoding; - // iconv-lite will strip BOMs for us, so no need to do the extra byte removal that the spec does. - // Note that we won't end up in the x-user-defined case when there's a bomEncoding. - } - - if (encoding === "x-user-defined") { - // https://encoding.spec.whatwg.org/#x-user-defined-decoder - let result = ""; - for (const byte of uint8Array) { - if (byte <= 0x7F) { - result += String.fromCodePoint(byte); - } else { - result += String.fromCodePoint(0xF780 + byte - 0x80); - } - } - return result; - } - - return iconvLite.decode(uint8Array, encoding); -}; - -// https://github.com/whatwg/html/issues/1910#issuecomment-254017369 -exports.getBOMEncoding = uint8Array => { - if (uint8Array[0] === 0xFE && uint8Array[1] === 0xFF) { - return "UTF-16BE"; - } else if (uint8Array[0] === 0xFF && uint8Array[1] === 0xFE) { - return "UTF-16LE"; - } else if (uint8Array[0] === 0xEF && uint8Array[1] === 0xBB && uint8Array[2] === 0xBF) { - return "UTF-8"; - } - - return null; -}; - -exports.isSupported = name => { - return supportedNamesSet.has(String(name)); -}; diff --git a/node_modules/whatwg-encoding/node_modules/iconv-lite/encodings/dbcs-data.js b/node_modules/whatwg-encoding/node_modules/iconv-lite/encodings/dbcs-data.js deleted file mode 100644 index 0d17e58..0000000 --- a/node_modules/whatwg-encoding/node_modules/iconv-lite/encodings/dbcs-data.js +++ /dev/null @@ -1,188 +0,0 @@ -"use strict"; - -// Description of supported double byte encodings and aliases. -// Tables are not require()-d until they are needed to speed up library load. -// require()-s are direct to support Browserify. - -module.exports = { - - // == Japanese/ShiftJIS ==================================================== - // All japanese encodings are based on JIS X set of standards: - // JIS X 0201 - Single-byte encoding of ASCII + ¥ + Kana chars at 0xA1-0xDF. - // JIS X 0208 - Main set of 6879 characters, placed in 94x94 plane, to be encoded by 2 bytes. - // Has several variations in 1978, 1983, 1990 and 1997. - // JIS X 0212 - Supplementary plane of 6067 chars in 94x94 plane. 1990. Effectively dead. - // JIS X 0213 - Extension and modern replacement of 0208 and 0212. Total chars: 11233. - // 2 planes, first is superset of 0208, second - revised 0212. - // Introduced in 2000, revised 2004. Some characters are in Unicode Plane 2 (0x2xxxx) - - // Byte encodings are: - // * Shift_JIS: Compatible with 0201, uses not defined chars in top half as lead bytes for double-byte - // encoding of 0208. Lead byte ranges: 0x81-0x9F, 0xE0-0xEF; Trail byte ranges: 0x40-0x7E, 0x80-0x9E, 0x9F-0xFC. - // Windows CP932 is a superset of Shift_JIS. Some companies added more chars, notably KDDI. - // * EUC-JP: Up to 3 bytes per character. Used mostly on *nixes. - // 0x00-0x7F - lower part of 0201 - // 0x8E, 0xA1-0xDF - upper part of 0201 - // (0xA1-0xFE)x2 - 0208 plane (94x94). - // 0x8F, (0xA1-0xFE)x2 - 0212 plane (94x94). - // * JIS X 208: 7-bit, direct encoding of 0208. Byte ranges: 0x21-0x7E (94 values). Uncommon. - // Used as-is in ISO2022 family. - // * ISO2022-JP: Stateful encoding, with escape sequences to switch between ASCII, - // 0201-1976 Roman, 0208-1978, 0208-1983. - // * ISO2022-JP-1: Adds esc seq for 0212-1990. - // * ISO2022-JP-2: Adds esc seq for GB2313-1980, KSX1001-1992, ISO8859-1, ISO8859-7. - // * ISO2022-JP-3: Adds esc seq for 0201-1976 Kana set, 0213-2000 Planes 1, 2. - // * ISO2022-JP-2004: Adds 0213-2004 Plane 1. - // - // After JIS X 0213 appeared, Shift_JIS-2004, EUC-JISX0213 and ISO2022-JP-2004 followed, with just changing the planes. - // - // Overall, it seems that it's a mess :( http://www8.plala.or.jp/tkubota1/unicode-symbols-map2.html - - 'shiftjis': { - type: '_dbcs', - table: function() { return require('./tables/shiftjis.json') }, - encodeAdd: {'\u00a5': 0x5C, '\u203E': 0x7E}, - encodeSkipVals: [{from: 0xED40, to: 0xF940}], - }, - 'csshiftjis': 'shiftjis', - 'mskanji': 'shiftjis', - 'sjis': 'shiftjis', - 'windows31j': 'shiftjis', - 'ms31j': 'shiftjis', - 'xsjis': 'shiftjis', - 'windows932': 'shiftjis', - 'ms932': 'shiftjis', - '932': 'shiftjis', - 'cp932': 'shiftjis', - - 'eucjp': { - type: '_dbcs', - table: function() { return require('./tables/eucjp.json') }, - encodeAdd: {'\u00a5': 0x5C, '\u203E': 0x7E}, - }, - - // TODO: KDDI extension to Shift_JIS - // TODO: IBM CCSID 942 = CP932, but F0-F9 custom chars and other char changes. - // TODO: IBM CCSID 943 = Shift_JIS = CP932 with original Shift_JIS lower 128 chars. - - - // == Chinese/GBK ========================================================== - // http://en.wikipedia.org/wiki/GBK - // We mostly implement W3C recommendation: https://www.w3.org/TR/encoding/#gbk-encoder - - // Oldest GB2312 (1981, ~7600 chars) is a subset of CP936 - 'gb2312': 'cp936', - 'gb231280': 'cp936', - 'gb23121980': 'cp936', - 'csgb2312': 'cp936', - 'csiso58gb231280': 'cp936', - 'euccn': 'cp936', - - // Microsoft's CP936 is a subset and approximation of GBK. - 'windows936': 'cp936', - 'ms936': 'cp936', - '936': 'cp936', - 'cp936': { - type: '_dbcs', - table: function() { return require('./tables/cp936.json') }, - }, - - // GBK (~22000 chars) is an extension of CP936 that added user-mapped chars and some other. - 'gbk': { - type: '_dbcs', - table: function() { return require('./tables/cp936.json').concat(require('./tables/gbk-added.json')) }, - }, - 'xgbk': 'gbk', - 'isoir58': 'gbk', - - // GB18030 is an algorithmic extension of GBK. - // Main source: https://www.w3.org/TR/encoding/#gbk-encoder - // http://icu-project.org/docs/papers/gb18030.html - // http://source.icu-project.org/repos/icu/data/trunk/charset/data/xml/gb-18030-2000.xml - // http://www.khngai.com/chinese/charmap/tblgbk.php?page=0 - 'gb18030': { - type: '_dbcs', - table: function() { return require('./tables/cp936.json').concat(require('./tables/gbk-added.json')) }, - gb18030: function() { return require('./tables/gb18030-ranges.json') }, - encodeSkipVals: [0x80], - encodeAdd: {'€': 0xA2E3}, - }, - - 'chinese': 'gb18030', - - - // == Korean =============================================================== - // EUC-KR, KS_C_5601 and KS X 1001 are exactly the same. - 'windows949': 'cp949', - 'ms949': 'cp949', - '949': 'cp949', - 'cp949': { - type: '_dbcs', - table: function() { return require('./tables/cp949.json') }, - }, - - 'cseuckr': 'cp949', - 'csksc56011987': 'cp949', - 'euckr': 'cp949', - 'isoir149': 'cp949', - 'korean': 'cp949', - 'ksc56011987': 'cp949', - 'ksc56011989': 'cp949', - 'ksc5601': 'cp949', - - - // == Big5/Taiwan/Hong Kong ================================================ - // There are lots of tables for Big5 and cp950. Please see the following links for history: - // http://moztw.org/docs/big5/ http://www.haible.de/bruno/charsets/conversion-tables/Big5.html - // Variations, in roughly number of defined chars: - // * Windows CP 950: Microsoft variant of Big5. Canonical: http://www.unicode.org/Public/MAPPINGS/VENDORS/MICSFT/WINDOWS/CP950.TXT - // * Windows CP 951: Microsoft variant of Big5-HKSCS-2001. Seems to be never public. http://me.abelcheung.org/articles/research/what-is-cp951/ - // * Big5-2003 (Taiwan standard) almost superset of cp950. - // * Unicode-at-on (UAO) / Mozilla 1.8. Falling out of use on the Web. Not supported by other browsers. - // * Big5-HKSCS (-2001, -2004, -2008). Hong Kong standard. - // many unicode code points moved from PUA to Supplementary plane (U+2XXXX) over the years. - // Plus, it has 4 combining sequences. - // Seems that Mozilla refused to support it for 10 yrs. https://bugzilla.mozilla.org/show_bug.cgi?id=162431 https://bugzilla.mozilla.org/show_bug.cgi?id=310299 - // because big5-hkscs is the only encoding to include astral characters in non-algorithmic way. - // Implementations are not consistent within browsers; sometimes labeled as just big5. - // MS Internet Explorer switches from big5 to big5-hkscs when a patch applied. - // Great discussion & recap of what's going on https://bugzilla.mozilla.org/show_bug.cgi?id=912470#c31 - // In the encoder, it might make sense to support encoding old PUA mappings to Big5 bytes seq-s. - // Official spec: http://www.ogcio.gov.hk/en/business/tech_promotion/ccli/terms/doc/2003cmp_2008.txt - // http://www.ogcio.gov.hk/tc/business/tech_promotion/ccli/terms/doc/hkscs-2008-big5-iso.txt - // - // Current understanding of how to deal with Big5(-HKSCS) is in the Encoding Standard, http://encoding.spec.whatwg.org/#big5-encoder - // Unicode mapping (http://www.unicode.org/Public/MAPPINGS/OBSOLETE/EASTASIA/OTHER/BIG5.TXT) is said to be wrong. - - 'windows950': 'cp950', - 'ms950': 'cp950', - '950': 'cp950', - 'cp950': { - type: '_dbcs', - table: function() { return require('./tables/cp950.json') }, - }, - - // Big5 has many variations and is an extension of cp950. We use Encoding Standard's as a consensus. - 'big5': 'big5hkscs', - 'big5hkscs': { - type: '_dbcs', - table: function() { return require('./tables/cp950.json').concat(require('./tables/big5-added.json')) }, - encodeSkipVals: [ - // Although Encoding Standard says we should avoid encoding to HKSCS area (See Step 1 of - // https://encoding.spec.whatwg.org/#index-big5-pointer), we still do it to increase compatibility with ICU. - // But if a single unicode point can be encoded both as HKSCS and regular Big5, we prefer the latter. - 0x8e69, 0x8e6f, 0x8e7e, 0x8eab, 0x8eb4, 0x8ecd, 0x8ed0, 0x8f57, 0x8f69, 0x8f6e, 0x8fcb, 0x8ffe, - 0x906d, 0x907a, 0x90c4, 0x90dc, 0x90f1, 0x91bf, 0x92af, 0x92b0, 0x92b1, 0x92b2, 0x92d1, 0x9447, 0x94ca, - 0x95d9, 0x96fc, 0x9975, 0x9b76, 0x9b78, 0x9b7b, 0x9bc6, 0x9bde, 0x9bec, 0x9bf6, 0x9c42, 0x9c53, 0x9c62, - 0x9c68, 0x9c6b, 0x9c77, 0x9cbc, 0x9cbd, 0x9cd0, 0x9d57, 0x9d5a, 0x9dc4, 0x9def, 0x9dfb, 0x9ea9, 0x9eef, - 0x9efd, 0x9f60, 0x9fcb, 0xa077, 0xa0dc, 0xa0df, 0x8fcc, 0x92c8, 0x9644, 0x96ed, - - // Step 2 of https://encoding.spec.whatwg.org/#index-big5-pointer: Use last pointer for U+2550, U+255E, U+2561, U+256A, U+5341, or U+5345 - 0xa2a4, 0xa2a5, 0xa2a7, 0xa2a6, 0xa2cc, 0xa2ce, - ], - }, - - 'cnbig5': 'big5hkscs', - 'csbig5': 'big5hkscs', - 'xxbig5': 'big5hkscs', -}; diff --git a/node_modules/whatwg-encoding/node_modules/iconv-lite/encodings/sbcs-codec.js b/node_modules/whatwg-encoding/node_modules/iconv-lite/encodings/sbcs-codec.js deleted file mode 100644 index abac5ff..0000000 --- a/node_modules/whatwg-encoding/node_modules/iconv-lite/encodings/sbcs-codec.js +++ /dev/null @@ -1,72 +0,0 @@ -"use strict"; -var Buffer = require("safer-buffer").Buffer; - -// Single-byte codec. Needs a 'chars' string parameter that contains 256 or 128 chars that -// correspond to encoded bytes (if 128 - then lower half is ASCII). - -exports._sbcs = SBCSCodec; -function SBCSCodec(codecOptions, iconv) { - if (!codecOptions) - throw new Error("SBCS codec is called without the data.") - - // Prepare char buffer for decoding. - if (!codecOptions.chars || (codecOptions.chars.length !== 128 && codecOptions.chars.length !== 256)) - throw new Error("Encoding '"+codecOptions.type+"' has incorrect 'chars' (must be of len 128 or 256)"); - - if (codecOptions.chars.length === 128) { - var asciiString = ""; - for (var i = 0; i < 128; i++) - asciiString += String.fromCharCode(i); - codecOptions.chars = asciiString + codecOptions.chars; - } - - this.decodeBuf = Buffer.from(codecOptions.chars, 'ucs2'); - - // Encoding buffer. - var encodeBuf = Buffer.alloc(65536, iconv.defaultCharSingleByte.charCodeAt(0)); - - for (var i = 0; i < codecOptions.chars.length; i++) - encodeBuf[codecOptions.chars.charCodeAt(i)] = i; - - this.encodeBuf = encodeBuf; -} - -SBCSCodec.prototype.encoder = SBCSEncoder; -SBCSCodec.prototype.decoder = SBCSDecoder; - - -function SBCSEncoder(options, codec) { - this.encodeBuf = codec.encodeBuf; -} - -SBCSEncoder.prototype.write = function(str) { - var buf = Buffer.alloc(str.length); - for (var i = 0; i < str.length; i++) - buf[i] = this.encodeBuf[str.charCodeAt(i)]; - - return buf; -} - -SBCSEncoder.prototype.end = function() { -} - - -function SBCSDecoder(options, codec) { - this.decodeBuf = codec.decodeBuf; -} - -SBCSDecoder.prototype.write = function(buf) { - // Strings are immutable in JS -> we use ucs2 buffer to speed up computations. - var decodeBuf = this.decodeBuf; - var newBuf = Buffer.alloc(buf.length*2); - var idx1 = 0, idx2 = 0; - for (var i = 0; i < buf.length; i++) { - idx1 = buf[i]*2; idx2 = i*2; - newBuf[idx2] = decodeBuf[idx1]; - newBuf[idx2+1] = decodeBuf[idx1+1]; - } - return newBuf.toString('ucs2'); -} - -SBCSDecoder.prototype.end = function() { -} diff --git a/node_modules/whatwg-encoding/node_modules/iconv-lite/encodings/sbcs-data-generated.js b/node_modules/whatwg-encoding/node_modules/iconv-lite/encodings/sbcs-data-generated.js deleted file mode 100644 index 9b48236..0000000 --- a/node_modules/whatwg-encoding/node_modules/iconv-lite/encodings/sbcs-data-generated.js +++ /dev/null @@ -1,451 +0,0 @@ -"use strict"; - -// Generated data for sbcs codec. Don't edit manually. Regenerate using generation/gen-sbcs.js script. -module.exports = { - "437": "cp437", - "737": "cp737", - "775": "cp775", - "850": "cp850", - "852": "cp852", - "855": "cp855", - "856": "cp856", - "857": "cp857", - "858": "cp858", - "860": "cp860", - "861": "cp861", - "862": "cp862", - "863": "cp863", - "864": "cp864", - "865": "cp865", - "866": "cp866", - "869": "cp869", - "874": "windows874", - "922": "cp922", - "1046": "cp1046", - "1124": "cp1124", - "1125": "cp1125", - "1129": "cp1129", - "1133": "cp1133", - "1161": "cp1161", - "1162": "cp1162", - "1163": "cp1163", - "1250": "windows1250", - "1251": "windows1251", - "1252": "windows1252", - "1253": "windows1253", - "1254": "windows1254", - "1255": "windows1255", - "1256": "windows1256", - "1257": "windows1257", - "1258": "windows1258", - "28591": "iso88591", - "28592": "iso88592", - "28593": "iso88593", - "28594": "iso88594", - "28595": "iso88595", - "28596": "iso88596", - "28597": "iso88597", - "28598": "iso88598", - "28599": "iso88599", - "28600": "iso885910", - "28601": "iso885911", - "28603": "iso885913", - "28604": "iso885914", - "28605": "iso885915", - "28606": "iso885916", - "windows874": { - "type": "_sbcs", - "chars": "€����…�����������‘’“”•–—�������� กขฃคฅฆงจฉชซฌญฎฏฐฑฒณดตถทธนบปผฝพฟภมยรฤลฦวศษสหฬอฮฯะัาำิีึืฺุู����฿เแโใไๅๆ็่้๊๋์ํ๎๏๐๑๒๓๔๕๖๗๘๙๚๛����" - }, - "win874": "windows874", - "cp874": "windows874", - "windows1250": { - "type": "_sbcs", - "chars": "€�‚�„…†‡�‰Š‹ŚŤŽŹ�‘’“”•–—�™š›śťžź ˇ˘Ł¤Ą¦§¨©Ş«¬®Ż°±˛ł´µ¶·¸ąş»Ľ˝ľżŔÁÂĂÄĹĆÇČÉĘËĚÍÎĎĐŃŇÓÔŐÖ×ŘŮÚŰÜÝŢßŕáâăäĺćçčéęëěíîďđńňóôőö÷řůúűüýţ˙" - }, - "win1250": "windows1250", - "cp1250": "windows1250", - "windows1251": { - "type": "_sbcs", - "chars": "ЂЃ‚ѓ„…†‡€‰Љ‹ЊЌЋЏђ‘’“”•–—�™љ›њќћџ ЎўЈ¤Ґ¦§Ё©Є«¬®Ї°±Ііґµ¶·ё№є»јЅѕїАБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыьэюя" - }, - "win1251": "windows1251", - "cp1251": "windows1251", - "windows1252": { - "type": "_sbcs", - "chars": "€�‚ƒ„…†‡ˆ‰Š‹Œ�Ž��‘’“”•–—˜™š›œ�žŸ ¡¢£¤¥¦§¨©ª«¬®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖרÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ" - }, - "win1252": "windows1252", - "cp1252": "windows1252", - "windows1253": { - "type": "_sbcs", - "chars": "€�‚ƒ„…†‡�‰�‹�����‘’“”•–—�™�›���� ΅Ά£¤¥¦§¨©�«¬®―°±²³΄µ¶·ΈΉΊ»Ό½ΎΏΐΑΒΓΔΕΖΗΘΙΚΛΜΝΞΟΠΡ�ΣΤΥΦΧΨΩΪΫάέήίΰαβγδεζηθικλμνξοπρςστυφχψωϊϋόύώ�" - }, - "win1253": "windows1253", - "cp1253": "windows1253", - "windows1254": { - "type": "_sbcs", - "chars": "€�‚ƒ„…†‡ˆ‰Š‹Œ����‘’“”•–—˜™š›œ��Ÿ ¡¢£¤¥¦§¨©ª«¬®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏĞÑÒÓÔÕÖרÙÚÛÜİŞßàáâãäåæçèéêëìíîïğñòóôõö÷øùúûüışÿ" - }, - "win1254": "windows1254", - "cp1254": "windows1254", - "windows1255": { - "type": "_sbcs", - "chars": "€�‚ƒ„…†‡ˆ‰�‹�����‘’“”•–—˜™�›���� ¡¢£₪¥¦§¨©×«¬®¯°±²³´µ¶·¸¹÷»¼½¾¿ְֱֲֳִֵֶַָֹֺֻּֽ־ֿ׀ׁׂ׃װױײ׳״�������אבגדהוזחטיךכלםמןנסעףפץצקרשת���" - }, - "win1255": "windows1255", - "cp1255": "windows1255", - "windows1256": { - "type": "_sbcs", - "chars": "€پ‚ƒ„…†‡ˆ‰ٹ‹Œچژڈگ‘’“”•–—ک™ڑ›œں ،¢£¤¥¦§¨©ھ«¬®¯°±²³´µ¶·¸¹؛»¼½¾؟ہءآأؤإئابةتثجحخدذرزسشصض×طظعغـفقكàلâمنهوçèéêëىيîïًٌٍَôُِ÷ّùْûüے" - }, - "win1256": "windows1256", - "cp1256": "windows1256", - "windows1257": { - "type": "_sbcs", - "chars": "€�‚�„…†‡�‰�‹�¨ˇ¸�‘’“”•–—�™�›�¯˛� �¢£¤�¦§Ø©Ŗ«¬®Æ°±²³´µ¶·ø¹ŗ»¼½¾æĄĮĀĆÄÅĘĒČÉŹĖĢĶĪĻŠŃŅÓŌÕÖ×ŲŁŚŪÜŻŽßąįāćäåęēčéźėģķīļšńņóōõö÷ųłśūüżž˙" - }, - "win1257": "windows1257", - "cp1257": "windows1257", - "windows1258": { - "type": "_sbcs", - "chars": "€�‚ƒ„…†‡ˆ‰�‹Œ����‘’“”•–—˜™�›œ��Ÿ ¡¢£¤¥¦§¨©ª«¬®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂĂÄÅÆÇÈÉÊË̀ÍÎÏĐÑ̉ÓÔƠÖרÙÚÛÜỮßàáâăäåæçèéêë́íîïđṇ̃óôơö÷øùúûüư₫ÿ" - }, - "win1258": "windows1258", - "cp1258": "windows1258", - "iso88591": { - "type": "_sbcs", - "chars": " ¡¢£¤¥¦§¨©ª«¬®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖרÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ" - }, - "cp28591": "iso88591", - "iso88592": { - "type": "_sbcs", - "chars": " Ą˘Ł¤ĽŚ§¨ŠŞŤŹŽŻ°ą˛ł´ľśˇ¸šşťź˝žżŔÁÂĂÄĹĆÇČÉĘËĚÍÎĎĐŃŇÓÔŐÖ×ŘŮÚŰÜÝŢßŕáâăäĺćçčéęëěíîďđńňóôőö÷řůúűüýţ˙" - }, - "cp28592": "iso88592", - "iso88593": { - "type": "_sbcs", - "chars": " Ħ˘£¤�Ĥ§¨İŞĞĴ�ݰħ²³´µĥ·¸ışğĵ½�żÀÁÂ�ÄĊĈÇÈÉÊËÌÍÎÏ�ÑÒÓÔĠÖ×ĜÙÚÛÜŬŜßàáâ�äċĉçèéêëìíîï�ñòóôġö÷ĝùúûüŭŝ˙" - }, - "cp28593": "iso88593", - "iso88594": { - "type": "_sbcs", - "chars": " ĄĸŖ¤Ĩϧ¨ŠĒĢŦޝ°ą˛ŗ´ĩšēģŧŊžŋĀÁÂÃÄÅÆĮČÉĘËĖÍÎĪĐŅŌĶÔÕÖרŲÚÛÜŨŪßāáâãäåæįčéęëėíîīđņōķôõö÷øųúûüũū˙" - }, - "cp28594": "iso88594", - "iso88595": { - "type": "_sbcs", - "chars": " ЁЂЃЄЅІЇЈЉЊЋЌЎЏАБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыьэюя№ёђѓєѕіїјљњћќ§ўџ" - }, - "cp28595": "iso88595", - "iso88596": { - "type": "_sbcs", - "chars": " ���¤�������،�������������؛���؟�ءآأؤإئابةتثجحخدذرزسشصضطظعغ�����ـفقكلمنهوىيًٌٍَُِّْ�������������" - }, - "cp28596": "iso88596", - "iso88597": { - "type": "_sbcs", - "chars": " ‘’£€₯¦§¨©ͺ«¬�―°±²³΄΅Ά·ΈΉΊ»Ό½ΎΏΐΑΒΓΔΕΖΗΘΙΚΛΜΝΞΟΠΡ�ΣΤΥΦΧΨΩΪΫάέήίΰαβγδεζηθικλμνξοπρςστυφχψωϊϋόύώ�" - }, - "cp28597": "iso88597", - "iso88598": { - "type": "_sbcs", - "chars": " �¢£¤¥¦§¨©×«¬®¯°±²³´µ¶·¸¹÷»¼½¾��������������������������������‗אבגדהוזחטיךכלםמןנסעףפץצקרשת���" - }, - "cp28598": "iso88598", - "iso88599": { - "type": "_sbcs", - "chars": " ¡¢£¤¥¦§¨©ª«¬®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏĞÑÒÓÔÕÖרÙÚÛÜİŞßàáâãäåæçèéêëìíîïğñòóôõö÷øùúûüışÿ" - }, - "cp28599": "iso88599", - "iso885910": { - "type": "_sbcs", - "chars": " ĄĒĢĪĨͧĻĐŠŦŽŪŊ°ąēģīĩķ·ļđšŧž―ūŋĀÁÂÃÄÅÆĮČÉĘËĖÍÎÏÐŅŌÓÔÕÖŨØŲÚÛÜÝÞßāáâãäåæįčéęëėíîïðņōóôõöũøųúûüýþĸ" - }, - "cp28600": "iso885910", - "iso885911": { - "type": "_sbcs", - "chars": " กขฃคฅฆงจฉชซฌญฎฏฐฑฒณดตถทธนบปผฝพฟภมยรฤลฦวศษสหฬอฮฯะัาำิีึืฺุู����฿เแโใไๅๆ็่้๊๋์ํ๎๏๐๑๒๓๔๕๖๗๘๙๚๛����" - }, - "cp28601": "iso885911", - "iso885913": { - "type": "_sbcs", - "chars": " ”¢£¤„¦§Ø©Ŗ«¬®Æ°±²³“µ¶·ø¹ŗ»¼½¾æĄĮĀĆÄÅĘĒČÉŹĖĢĶĪĻŠŃŅÓŌÕÖ×ŲŁŚŪÜŻŽßąįāćäåęēčéźėģķīļšńņóōõö÷ųłśūüżž’" - }, - "cp28603": "iso885913", - "iso885914": { - "type": "_sbcs", - "chars": " Ḃḃ£ĊċḊ§Ẁ©ẂḋỲ®ŸḞḟĠġṀṁ¶ṖẁṗẃṠỳẄẅṡÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏŴÑÒÓÔÕÖṪØÙÚÛÜÝŶßàáâãäåæçèéêëìíîïŵñòóôõöṫøùúûüýŷÿ" - }, - "cp28604": "iso885914", - "iso885915": { - "type": "_sbcs", - "chars": " ¡¢£€¥Š§š©ª«¬®¯°±²³Žµ¶·ž¹º»ŒœŸ¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖרÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ" - }, - "cp28605": "iso885915", - "iso885916": { - "type": "_sbcs", - "chars": " ĄąŁ€„Чš©Ș«ŹźŻ°±ČłŽ”¶·žčș»ŒœŸżÀÁÂĂÄĆÆÇÈÉÊËÌÍÎÏĐŃÒÓÔŐÖŚŰÙÚÛÜĘȚßàáâăäćæçèéêëìíîïđńòóôőöśűùúûüęțÿ" - }, - "cp28606": "iso885916", - "cp437": { - "type": "_sbcs", - "chars": "ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜ¢£¥₧ƒáíóúñѪº¿⌐¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ " - }, - "ibm437": "cp437", - "csibm437": "cp437", - "cp737": { - "type": "_sbcs", - "chars": "ΑΒΓΔΕΖΗΘΙΚΛΜΝΞΟΠΡΣΤΥΦΧΨΩαβγδεζηθικλμνξοπρσςτυφχψ░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀ωάέήϊίόύϋώΆΈΉΊΌΎΏ±≥≤ΪΫ÷≈°∙·√ⁿ²■ " - }, - "ibm737": "cp737", - "csibm737": "cp737", - "cp775": { - "type": "_sbcs", - "chars": "ĆüéāäģåćłēŖŗīŹÄÅÉæÆōöĢ¢ŚśÖÜø£Ø×¤ĀĪóŻżź”¦©®¬½¼Ł«»░▒▓│┤ĄČĘĖ╣║╗╝ĮŠ┐└┴┬├─┼ŲŪ╚╔╩╦╠═╬Žąčęėįšųūž┘┌█▄▌▐▀ÓßŌŃõÕµńĶķĻļņĒŅ’±“¾¶§÷„°∙·¹³²■ " - }, - "ibm775": "cp775", - "csibm775": "cp775", - "cp850": { - "type": "_sbcs", - "chars": "ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜø£Ø×ƒáíóúñѪº¿®¬½¼¡«»░▒▓│┤ÁÂÀ©╣║╗╝¢¥┐└┴┬├─┼ãÃ╚╔╩╦╠═╬¤ðÐÊËÈıÍÎÏ┘┌█▄¦Ì▀ÓßÔÒõÕµþÞÚÛÙýݯ´±‗¾¶§÷¸°¨·¹³²■ " - }, - "ibm850": "cp850", - "csibm850": "cp850", - "cp852": { - "type": "_sbcs", - "chars": "ÇüéâäůćçłëŐőîŹÄĆÉĹĺôöĽľŚśÖÜŤťŁ×čáíóúĄąŽžĘ꬟Ⱥ«»░▒▓│┤ÁÂĚŞ╣║╗╝Żż┐└┴┬├─┼Ăă╚╔╩╦╠═╬¤đĐĎËďŇÍÎě┘┌█▄ŢŮ▀ÓßÔŃńňŠšŔÚŕŰýÝţ´˝˛ˇ˘§÷¸°¨˙űŘř■ " - }, - "ibm852": "cp852", - "csibm852": "cp852", - "cp855": { - "type": "_sbcs", - "chars": "ђЂѓЃёЁєЄѕЅіІїЇјЈљЉњЊћЋќЌўЎџЏюЮъЪаАбБцЦдДеЕфФгГ«»░▒▓│┤хХиИ╣║╗╝йЙ┐└┴┬├─┼кК╚╔╩╦╠═╬¤лЛмМнНоОп┘┌█▄Пя▀ЯрРсСтТуУжЖвВьЬ№ыЫзЗшШэЭщЩчЧ§■ " - }, - "ibm855": "cp855", - "csibm855": "cp855", - "cp856": { - "type": "_sbcs", - "chars": "אבגדהוזחטיךכלםמןנסעףפץצקרשת�£�×����������®¬½¼�«»░▒▓│┤���©╣║╗╝¢¥┐└┴┬├─┼��╚╔╩╦╠═╬¤���������┘┌█▄¦�▀������µ�������¯´±‗¾¶§÷¸°¨·¹³²■ " - }, - "ibm856": "cp856", - "csibm856": "cp856", - "cp857": { - "type": "_sbcs", - "chars": "ÇüéâäàåçêëèïîıÄÅÉæÆôöòûùİÖÜø£ØŞşáíóúñÑĞ𿮬½¼¡«»░▒▓│┤ÁÂÀ©╣║╗╝¢¥┐└┴┬├─┼ãÃ╚╔╩╦╠═╬¤ºªÊËÈ�ÍÎÏ┘┌█▄¦Ì▀ÓßÔÒõÕµ�×ÚÛÙìÿ¯´±�¾¶§÷¸°¨·¹³²■ " - }, - "ibm857": "cp857", - "csibm857": "cp857", - "cp858": { - "type": "_sbcs", - "chars": "ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜø£Ø×ƒáíóúñѪº¿®¬½¼¡«»░▒▓│┤ÁÂÀ©╣║╗╝¢¥┐└┴┬├─┼ãÃ╚╔╩╦╠═╬¤ðÐÊËÈ€ÍÎÏ┘┌█▄¦Ì▀ÓßÔÒõÕµþÞÚÛÙýݯ´±‗¾¶§÷¸°¨·¹³²■ " - }, - "ibm858": "cp858", - "csibm858": "cp858", - "cp860": { - "type": "_sbcs", - "chars": "ÇüéâãàÁçêÊèÍÔìÃÂÉÀÈôõòÚùÌÕÜ¢£Ù₧ÓáíóúñѪº¿Ò¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ " - }, - "ibm860": "cp860", - "csibm860": "cp860", - "cp861": { - "type": "_sbcs", - "chars": "ÇüéâäàåçêëèÐðÞÄÅÉæÆôöþûÝýÖÜø£Ø₧ƒáíóúÁÍÓÚ¿⌐¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ " - }, - "ibm861": "cp861", - "csibm861": "cp861", - "cp862": { - "type": "_sbcs", - "chars": "אבגדהוזחטיךכלםמןנסעףפץצקרשת¢£¥₧ƒáíóúñѪº¿⌐¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ " - }, - "ibm862": "cp862", - "csibm862": "cp862", - "cp863": { - "type": "_sbcs", - "chars": "ÇüéâÂà¶çêëèïî‗À§ÉÈÊôËÏûù¤ÔÜ¢£ÙÛƒ¦´óú¨¸³¯Î⌐¬½¼¾«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ " - }, - "ibm863": "cp863", - "csibm863": "cp863", - "cp864": { - "type": "_sbcs", - "chars": "\u0000\u0001\u0002\u0003\u0004\u0005\u0006\u0007\b\t\n\u000b\f\r\u000e\u000f\u0010\u0011\u0012\u0013\u0014\u0015\u0016\u0017\u0018\u0019\u001a\u001b\u001c\u001d\u001e\u001f !\"#$٪&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~°·∙√▒─│┼┤┬├┴┐┌└┘β∞φ±½¼≈«»ﻷﻸ��ﻻﻼ� ﺂ£¤ﺄ��ﺎﺏﺕﺙ،ﺝﺡﺥ٠١٢٣٤٥٦٧٨٩ﻑ؛ﺱﺵﺹ؟¢ﺀﺁﺃﺅﻊﺋﺍﺑﺓﺗﺛﺟﺣﺧﺩﺫﺭﺯﺳﺷﺻﺿﻁﻅﻋﻏ¦¬÷×ﻉـﻓﻗﻛﻟﻣﻧﻫﻭﻯﻳﺽﻌﻎﻍﻡﹽّﻥﻩﻬﻰﻲﻐﻕﻵﻶﻝﻙﻱ■�" - }, - "ibm864": "cp864", - "csibm864": "cp864", - "cp865": { - "type": "_sbcs", - "chars": "ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜø£Ø₧ƒáíóúñѪº¿⌐¬½¼¡«¤░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ " - }, - "ibm865": "cp865", - "csibm865": "cp865", - "cp866": { - "type": "_sbcs", - "chars": "АБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмноп░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀рстуфхцчшщъыьэюяЁёЄєЇїЎў°∙·√№¤■ " - }, - "ibm866": "cp866", - "csibm866": "cp866", - "cp869": { - "type": "_sbcs", - "chars": "������Ά�·¬¦‘’Έ―ΉΊΪΌ��ΎΫ©Ώ²³ά£έήίϊΐόύΑΒΓΔΕΖΗ½ΘΙ«»░▒▓│┤ΚΛΜΝ╣║╗╝ΞΟ┐└┴┬├─┼ΠΡ╚╔╩╦╠═╬ΣΤΥΦΧΨΩαβγ┘┌█▄δε▀ζηθικλμνξοπρσςτ΄±υφχ§ψ΅°¨ωϋΰώ■ " - }, - "ibm869": "cp869", - "csibm869": "cp869", - "cp922": { - "type": "_sbcs", - "chars": " ¡¢£¤¥¦§¨©ª«¬®‾°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏŠÑÒÓÔÕÖרÙÚÛÜÝŽßàáâãäåæçèéêëìíîïšñòóôõö÷øùúûüýžÿ" - }, - "ibm922": "cp922", - "csibm922": "cp922", - "cp1046": { - "type": "_sbcs", - "chars": "ﺈ×÷ﹱ■│─┐┌└┘ﹹﹻﹽﹿﹷﺊﻰﻳﻲﻎﻏﻐﻶﻸﻺﻼ ¤ﺋﺑﺗﺛﺟﺣ،ﺧﺳ٠١٢٣٤٥٦٧٨٩ﺷ؛ﺻﺿﻊ؟ﻋءآأؤإئابةتثجحخدذرزسشصضطﻇعغﻌﺂﺄﺎﻓـفقكلمنهوىيًٌٍَُِّْﻗﻛﻟﻵﻷﻹﻻﻣﻧﻬﻩ�" - }, - "ibm1046": "cp1046", - "csibm1046": "cp1046", - "cp1124": { - "type": "_sbcs", - "chars": " ЁЂҐЄЅІЇЈЉЊЋЌЎЏАБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыьэюя№ёђґєѕіїјљњћќ§ўџ" - }, - "ibm1124": "cp1124", - "csibm1124": "cp1124", - "cp1125": { - "type": "_sbcs", - "chars": "АБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмноп░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀рстуфхцчшщъыьэюяЁёҐґЄєІіЇї·√№¤■ " - }, - "ibm1125": "cp1125", - "csibm1125": "cp1125", - "cp1129": { - "type": "_sbcs", - "chars": " ¡¢£¤¥¦§œ©ª«¬®¯°±²³Ÿµ¶·Œ¹º»¼½¾¿ÀÁÂĂÄÅÆÇÈÉÊË̀ÍÎÏĐÑ̉ÓÔƠÖרÙÚÛÜỮßàáâăäåæçèéêë́íîïđṇ̃óôơö÷øùúûüư₫ÿ" - }, - "ibm1129": "cp1129", - "csibm1129": "cp1129", - "cp1133": { - "type": "_sbcs", - "chars": " ກຂຄງຈສຊຍດຕຖທນບປຜຝພຟມຢຣລວຫອຮ���ຯະາຳິີຶືຸູຼັົຽ���ເແໂໃໄ່້໊໋໌ໍໆ�ໜໝ₭����������������໐໑໒໓໔໕໖໗໘໙��¢¬¦�" - }, - "ibm1133": "cp1133", - "csibm1133": "cp1133", - "cp1161": { - "type": "_sbcs", - "chars": "��������������������������������่กขฃคฅฆงจฉชซฌญฎฏฐฑฒณดตถทธนบปผฝพฟภมยรฤลฦวศษสหฬอฮฯะัาำิีึืฺุู้๊๋€฿เแโใไๅๆ็่้๊๋์ํ๎๏๐๑๒๓๔๕๖๗๘๙๚๛¢¬¦ " - }, - "ibm1161": "cp1161", - "csibm1161": "cp1161", - "cp1162": { - "type": "_sbcs", - "chars": "€…‘’“”•–— กขฃคฅฆงจฉชซฌญฎฏฐฑฒณดตถทธนบปผฝพฟภมยรฤลฦวศษสหฬอฮฯะัาำิีึืฺุู����฿เแโใไๅๆ็่้๊๋์ํ๎๏๐๑๒๓๔๕๖๗๘๙๚๛����" - }, - "ibm1162": "cp1162", - "csibm1162": "cp1162", - "cp1163": { - "type": "_sbcs", - "chars": " ¡¢£€¥¦§œ©ª«¬®¯°±²³Ÿµ¶·Œ¹º»¼½¾¿ÀÁÂĂÄÅÆÇÈÉÊË̀ÍÎÏĐÑ̉ÓÔƠÖרÙÚÛÜỮßàáâăäåæçèéêë́íîïđṇ̃óôơö÷øùúûüư₫ÿ" - }, - "ibm1163": "cp1163", - "csibm1163": "cp1163", - "maccroatian": { - "type": "_sbcs", - "chars": "ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®Š™´¨≠ŽØ∞±≤≥∆µ∂∑∏š∫ªºΩžø¿¡¬√ƒ≈ƫȅ ÀÃÕŒœĐ—“”‘’÷◊�©⁄¤‹›Æ»–·‚„‰ÂćÁčÈÍÎÏÌÓÔđÒÚÛÙıˆ˜¯πË˚¸Êæˇ" - }, - "maccyrillic": { - "type": "_sbcs", - "chars": "АБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯ†°¢£§•¶І®©™Ђђ≠Ѓѓ∞±≤≥іµ∂ЈЄєЇїЉљЊњјЅ¬√ƒ≈∆«»… ЋћЌќѕ–—“”‘’÷„ЎўЏџ№Ёёяабвгдежзийклмнопрстуфхцчшщъыьэю¤" - }, - "macgreek": { - "type": "_sbcs", - "chars": "Ĺ²É³ÖÜ΅àâä΄¨çéèê룙î‰ôö¦ùûü†ΓΔΘΛΞΠß®©ΣΪ§≠°·Α±≤≥¥ΒΕΖΗΙΚΜΦΫΨΩάΝ¬ΟΡ≈Τ«»… ΥΧΆΈœ–―“”‘’÷ΉΊΌΎέήίόΏύαβψδεφγηιξκλμνοπώρστθωςχυζϊϋΐΰ�" - }, - "maciceland": { - "type": "_sbcs", - "chars": "ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûüݰ¢£§•¶ß®©™´¨≠ÆØ∞±≤≥¥µ∂∑∏π∫ªºΩæø¿¡¬√ƒ≈∆«»… ÀÃÕŒœ–—“”‘’÷◊ÿŸ⁄¤ÐðÞþý·‚„‰ÂÊÁËÈÍÎÏÌÓÔ�ÒÚÛÙıˆ˜¯˘˙˚¸˝˛ˇ" - }, - "macroman": { - "type": "_sbcs", - "chars": "ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®©™´¨≠ÆØ∞±≤≥¥µ∂∑∏π∫ªºΩæø¿¡¬√ƒ≈∆«»… ÀÃÕŒœ–—“”‘’÷◊ÿŸ⁄¤‹›fifl‡·‚„‰ÂÊÁËÈÍÎÏÌÓÔ�ÒÚÛÙıˆ˜¯˘˙˚¸˝˛ˇ" - }, - "macromania": { - "type": "_sbcs", - "chars": "ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®©™´¨≠ĂŞ∞±≤≥¥µ∂∑∏π∫ªºΩăş¿¡¬√ƒ≈∆«»… ÀÃÕŒœ–—“”‘’÷◊ÿŸ⁄¤‹›Ţţ‡·‚„‰ÂÊÁËÈÍÎÏÌÓÔ�ÒÚÛÙıˆ˜¯˘˙˚¸˝˛ˇ" - }, - "macthai": { - "type": "_sbcs", - "chars": "«»…“”�•‘’� กขฃคฅฆงจฉชซฌญฎฏฐฑฒณดตถทธนบปผฝพฟภมยรฤลฦวศษสหฬอฮฯะัาำิีึืฺุู–—฿เแโใไๅๆ็่้๊๋์ํ™๏๐๑๒๓๔๕๖๗๘๙®©����" - }, - "macturkish": { - "type": "_sbcs", - "chars": "ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®©™´¨≠ÆØ∞±≤≥¥µ∂∑∏π∫ªºΩæø¿¡¬√ƒ≈∆«»… ÀÃÕŒœ–—“”‘’÷◊ÿŸĞğİıŞş‡·‚„‰ÂÊÁËÈÍÎÏÌÓÔ�ÒÚÛÙ�ˆ˜¯˘˙˚¸˝˛ˇ" - }, - "macukraine": { - "type": "_sbcs", - "chars": "АБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯ†°Ґ£§•¶І®©™Ђђ≠Ѓѓ∞±≤≥іµґЈЄєЇїЉљЊњјЅ¬√ƒ≈∆«»… ЋћЌќѕ–—“”‘’÷„ЎўЏџ№Ёёяабвгдежзийклмнопрстуфхцчшщъыьэю¤" - }, - "koi8r": { - "type": "_sbcs", - "chars": "─│┌┐└┘├┤┬┴┼▀▄█▌▐░▒▓⌠■∙√≈≤≥ ⌡°²·÷═║╒ё╓╔╕╖╗╘╙╚╛╜╝╞╟╠╡Ё╢╣╤╥╦╧╨╩╪╫╬©юабцдефгхийклмнопярстужвьызшэщчъЮАБЦДЕФГХИЙКЛМНОПЯРСТУЖВЬЫЗШЭЩЧЪ" - }, - "koi8u": { - "type": "_sbcs", - "chars": "─│┌┐└┘├┤┬┴┼▀▄█▌▐░▒▓⌠■∙√≈≤≥ ⌡°²·÷═║╒ёє╔ії╗╘╙╚╛ґ╝╞╟╠╡ЁЄ╣ІЇ╦╧╨╩╪Ґ╬©юабцдефгхийклмнопярстужвьызшэщчъЮАБЦДЕФГХИЙКЛМНОПЯРСТУЖВЬЫЗШЭЩЧЪ" - }, - "koi8ru": { - "type": "_sbcs", - "chars": "─│┌┐└┘├┤┬┴┼▀▄█▌▐░▒▓⌠■∙√≈≤≥ ⌡°²·÷═║╒ёє╔ії╗╘╙╚╛ґў╞╟╠╡ЁЄ╣ІЇ╦╧╨╩╪ҐЎ©юабцдефгхийклмнопярстужвьызшэщчъЮАБЦДЕФГХИЙКЛМНОПЯРСТУЖВЬЫЗШЭЩЧЪ" - }, - "koi8t": { - "type": "_sbcs", - "chars": "қғ‚Ғ„…†‡�‰ҳ‹ҲҷҶ�Қ‘’“”•–—�™�›�����ӯӮё¤ӣ¦§���«¬®�°±²Ё�Ӣ¶·�№�»���©юабцдефгхийклмнопярстужвьызшэщчъЮАБЦДЕФГХИЙКЛМНОПЯРСТУЖВЬЫЗШЭЩЧЪ" - }, - "armscii8": { - "type": "_sbcs", - "chars": " �և։)(»«—.՝,-֊…՜՛՞ԱաԲբԳգԴդԵեԶզԷէԸըԹթԺժԻիԼլԽխԾծԿկՀհՁձՂղՃճՄմՅյՆնՇշՈոՉչՊպՋջՌռՍսՎվՏտՐրՑցՒւՓփՔքՕօՖֆ՚�" - }, - "rk1048": { - "type": "_sbcs", - "chars": "ЂЃ‚ѓ„…†‡€‰Љ‹ЊҚҺЏђ‘’“”•–—�™љ›њқһџ ҰұӘ¤Ө¦§Ё©Ғ«¬®Ү°±Ііөµ¶·ё№ғ»әҢңүАБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыьэюя" - }, - "tcvn": { - "type": "_sbcs", - "chars": "\u0000ÚỤ\u0003ỪỬỮ\u0007\b\t\n\u000b\f\r\u000e\u000f\u0010ỨỰỲỶỸÝỴ\u0018\u0019\u001a\u001b\u001c\u001d\u001e\u001f !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~ÀẢÃÁẠẶẬÈẺẼÉẸỆÌỈĨÍỊÒỎÕÓỌỘỜỞỠỚỢÙỦŨ ĂÂÊÔƠƯĐăâêôơưđẶ̀̀̉̃́àảãáạẲằẳẵắẴẮẦẨẪẤỀặầẩẫấậèỂẻẽéẹềểễếệìỉỄẾỒĩíịòỔỏõóọồổỗốộờởỡớợùỖủũúụừửữứựỳỷỹýỵỐ" - }, - "georgianacademy": { - "type": "_sbcs", - "chars": "‚ƒ„…†‡ˆ‰Š‹Œ‘’“”•–—˜™š›œŸ ¡¢£¤¥¦§¨©ª«¬®¯°±²³´µ¶·¸¹º»¼½¾¿აბგდევზთიკლმნოპჟრსტუფქღყშჩცძწჭხჯჰჱჲჳჴჵჶçèéêëìíîïðñòóôõö÷øùúûüýþÿ" - }, - "georgianps": { - "type": "_sbcs", - "chars": "‚ƒ„…†‡ˆ‰Š‹Œ‘’“”•–—˜™š›œŸ ¡¢£¤¥¦§¨©ª«¬®¯°±²³´µ¶·¸¹º»¼½¾¿აბგდევზჱთიკლმნჲოპჟრსტჳუფქღყშჩცძწჭხჴჯჰჵæçèéêëìíîïðñòóôõö÷øùúûüýþÿ" - }, - "pt154": { - "type": "_sbcs", - "chars": "ҖҒӮғ„…ҶҮҲүҠӢҢҚҺҸҗ‘’“”•–—ҳҷҡӣңқһҹ ЎўЈӨҘҰ§Ё©Ә«¬ӯ®Ҝ°ұІіҙө¶·ё№ә»јҪҫҝАБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыьэюя" - }, - "viscii": { - "type": "_sbcs", - "chars": "\u0000\u0001Ẳ\u0003\u0004ẴẪ\u0007\b\t\n\u000b\f\r\u000e\u000f\u0010\u0011\u0012\u0013Ỷ\u0015\u0016\u0017\u0018Ỹ\u001a\u001b\u001c\u001dỴ\u001f !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~ẠẮẰẶẤẦẨẬẼẸẾỀỂỄỆỐỒỔỖỘỢỚỜỞỊỎỌỈỦŨỤỲÕắằặấầẩậẽẹếềểễệốồổỗỠƠộờởịỰỨỪỬơớƯÀÁÂÃẢĂẳẵÈÉÊẺÌÍĨỳĐứÒÓÔạỷừửÙÚỹỵÝỡưàáâãảăữẫèéêẻìíĩỉđựòóôõỏọụùúũủýợỮ" - }, - "iso646cn": { - "type": "_sbcs", - "chars": "\u0000\u0001\u0002\u0003\u0004\u0005\u0006\u0007\b\t\n\u000b\f\r\u000e\u000f\u0010\u0011\u0012\u0013\u0014\u0015\u0016\u0017\u0018\u0019\u001a\u001b\u001c\u001d\u001e\u001f !\"#¥%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}‾��������������������������������������������������������������������������������������������������������������������������������" - }, - "iso646jp": { - "type": "_sbcs", - "chars": "\u0000\u0001\u0002\u0003\u0004\u0005\u0006\u0007\b\t\n\u000b\f\r\u000e\u000f\u0010\u0011\u0012\u0013\u0014\u0015\u0016\u0017\u0018\u0019\u001a\u001b\u001c\u001d\u001e\u001f !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[¥]^_`abcdefghijklmnopqrstuvwxyz{|}‾��������������������������������������������������������������������������������������������������������������������������������" - }, - "hproman8": { - "type": "_sbcs", - "chars": " ÀÂÈÊËÎÏ´ˋˆ¨˜ÙÛ₤¯Ýý°ÇçÑñ¡¿¤£¥§ƒ¢âêôûáéóúàèòùäëöüÅîØÆåíøæÄìÖÜÉïßÔÁÃãÐðÍÌÓÒÕõŠšÚŸÿÞþ·µ¶¾—¼½ªº«■»±�" - }, - "macintosh": { - "type": "_sbcs", - "chars": "ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®©™´¨≠ÆØ∞±≤≥¥µ∂∑∏π∫ªºΩæø¿¡¬√ƒ≈∆«»… ÀÃÕŒœ–—“”‘’÷◊ÿŸ⁄¤‹›fifl‡·‚„‰ÂÊÁËÈÍÎÏÌÓÔ�ÒÚÛÙıˆ˜¯˘˙˚¸˝˛ˇ" - }, - "ascii": { - "type": "_sbcs", - "chars": "��������������������������������������������������������������������������������������������������������������������������������" - }, - "tis620": { - "type": "_sbcs", - "chars": "���������������������������������กขฃคฅฆงจฉชซฌญฎฏฐฑฒณดตถทธนบปผฝพฟภมยรฤลฦวศษสหฬอฮฯะัาำิีึืฺุู����฿เแโใไๅๆ็่้๊๋์ํ๎๏๐๑๒๓๔๕๖๗๘๙๚๛����" - } -} \ No newline at end of file diff --git a/node_modules/whatwg-encoding/node_modules/iconv-lite/encodings/sbcs-data.js b/node_modules/whatwg-encoding/node_modules/iconv-lite/encodings/sbcs-data.js deleted file mode 100644 index 066f904..0000000 --- a/node_modules/whatwg-encoding/node_modules/iconv-lite/encodings/sbcs-data.js +++ /dev/null @@ -1,179 +0,0 @@ -"use strict"; - -// Manually added data to be used by sbcs codec in addition to generated one. - -module.exports = { - // Not supported by iconv, not sure why. - "10029": "maccenteuro", - "maccenteuro": { - "type": "_sbcs", - "chars": "ÄĀāÉĄÖÜáąČäčĆć鏟ĎíďĒēĖóėôöõúĚěü†°Ę£§•¶ß®©™ę¨≠ģĮįĪ≤≥īĶ∂∑łĻļĽľĹĺŅņѬ√ńŇ∆«»… ňŐÕőŌ–—“”‘’÷◊ōŔŕŘ‹›řŖŗŠ‚„šŚśÁŤťÍŽžŪÓÔūŮÚůŰűŲųÝýķŻŁżĢˇ" - }, - - "808": "cp808", - "ibm808": "cp808", - "cp808": { - "type": "_sbcs", - "chars": "АБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмноп░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀рстуфхцчшщъыьэюяЁёЄєЇїЎў°∙·√№€■ " - }, - - "mik": { - "type": "_sbcs", - "chars": "АБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыьэюя└┴┬├─┼╣║╚╔╩╦╠═╬┐░▒▓│┤№§╗╝┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ " - }, - - "cp720": { - "type": "_sbcs", - "chars": "\x80\x81éâ\x84à\x86çêëèïî\x8d\x8e\x8f\x90\u0651\u0652ô¤ـûùءآأؤ£إئابةتثجحخدذرزسشص«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀ضطظعغفµقكلمنهوىي≡\u064b\u064c\u064d\u064e\u064f\u0650≈°∙·√ⁿ²■\u00a0" - }, - - // Aliases of generated encodings. - "ascii8bit": "ascii", - "usascii": "ascii", - "ansix34": "ascii", - "ansix341968": "ascii", - "ansix341986": "ascii", - "csascii": "ascii", - "cp367": "ascii", - "ibm367": "ascii", - "isoir6": "ascii", - "iso646us": "ascii", - "iso646irv": "ascii", - "us": "ascii", - - "latin1": "iso88591", - "latin2": "iso88592", - "latin3": "iso88593", - "latin4": "iso88594", - "latin5": "iso88599", - "latin6": "iso885910", - "latin7": "iso885913", - "latin8": "iso885914", - "latin9": "iso885915", - "latin10": "iso885916", - - "csisolatin1": "iso88591", - "csisolatin2": "iso88592", - "csisolatin3": "iso88593", - "csisolatin4": "iso88594", - "csisolatincyrillic": "iso88595", - "csisolatinarabic": "iso88596", - "csisolatingreek" : "iso88597", - "csisolatinhebrew": "iso88598", - "csisolatin5": "iso88599", - "csisolatin6": "iso885910", - - "l1": "iso88591", - "l2": "iso88592", - "l3": "iso88593", - "l4": "iso88594", - "l5": "iso88599", - "l6": "iso885910", - "l7": "iso885913", - "l8": "iso885914", - "l9": "iso885915", - "l10": "iso885916", - - "isoir14": "iso646jp", - "isoir57": "iso646cn", - "isoir100": "iso88591", - "isoir101": "iso88592", - "isoir109": "iso88593", - "isoir110": "iso88594", - "isoir144": "iso88595", - "isoir127": "iso88596", - "isoir126": "iso88597", - "isoir138": "iso88598", - "isoir148": "iso88599", - "isoir157": "iso885910", - "isoir166": "tis620", - "isoir179": "iso885913", - "isoir199": "iso885914", - "isoir203": "iso885915", - "isoir226": "iso885916", - - "cp819": "iso88591", - "ibm819": "iso88591", - - "cyrillic": "iso88595", - - "arabic": "iso88596", - "arabic8": "iso88596", - "ecma114": "iso88596", - "asmo708": "iso88596", - - "greek" : "iso88597", - "greek8" : "iso88597", - "ecma118" : "iso88597", - "elot928" : "iso88597", - - "hebrew": "iso88598", - "hebrew8": "iso88598", - - "turkish": "iso88599", - "turkish8": "iso88599", - - "thai": "iso885911", - "thai8": "iso885911", - - "celtic": "iso885914", - "celtic8": "iso885914", - "isoceltic": "iso885914", - - "tis6200": "tis620", - "tis62025291": "tis620", - "tis62025330": "tis620", - - "10000": "macroman", - "10006": "macgreek", - "10007": "maccyrillic", - "10079": "maciceland", - "10081": "macturkish", - - "cspc8codepage437": "cp437", - "cspc775baltic": "cp775", - "cspc850multilingual": "cp850", - "cspcp852": "cp852", - "cspc862latinhebrew": "cp862", - "cpgr": "cp869", - - "msee": "cp1250", - "mscyrl": "cp1251", - "msansi": "cp1252", - "msgreek": "cp1253", - "msturk": "cp1254", - "mshebr": "cp1255", - "msarab": "cp1256", - "winbaltrim": "cp1257", - - "cp20866": "koi8r", - "20866": "koi8r", - "ibm878": "koi8r", - "cskoi8r": "koi8r", - - "cp21866": "koi8u", - "21866": "koi8u", - "ibm1168": "koi8u", - - "strk10482002": "rk1048", - - "tcvn5712": "tcvn", - "tcvn57121": "tcvn", - - "gb198880": "iso646cn", - "cn": "iso646cn", - - "csiso14jisc6220ro": "iso646jp", - "jisc62201969ro": "iso646jp", - "jp": "iso646jp", - - "cshproman8": "hproman8", - "r8": "hproman8", - "roman8": "hproman8", - "xroman8": "hproman8", - "ibm1051": "hproman8", - - "mac": "macintosh", - "csmacintosh": "macintosh", -}; - diff --git a/node_modules/whatwg-encoding/node_modules/iconv-lite/encodings/tables/big5-added.json b/node_modules/whatwg-encoding/node_modules/iconv-lite/encodings/tables/big5-added.json deleted file mode 100644 index 3c3d3c2..0000000 --- a/node_modules/whatwg-encoding/node_modules/iconv-lite/encodings/tables/big5-added.json +++ /dev/null @@ -1,122 +0,0 @@ -[ -["8740","䏰䰲䘃䖦䕸𧉧䵷䖳𧲱䳢𧳅㮕䜶䝄䱇䱀𤊿𣘗𧍒𦺋𧃒䱗𪍑䝏䗚䲅𧱬䴇䪤䚡𦬣爥𥩔𡩣𣸆𣽡晍囻"], -["8767","綕夝𨮹㷴霴𧯯寛𡵞媤㘥𩺰嫑宷峼杮薓𩥅瑡璝㡵𡵓𣚞𦀡㻬"], -["87a1","𥣞㫵竼龗𤅡𨤍𣇪𠪊𣉞䌊蒄龖鐯䤰蘓墖靊鈘秐稲晠権袝瑌篅枂稬剏遆㓦珄𥶹瓆鿇垳䤯呌䄱𣚎堘穲𧭥讏䚮𦺈䆁𥶙箮𢒼鿈𢓁𢓉𢓌鿉蔄𣖻䂴鿊䓡𪷿拁灮鿋"], -["8840","㇀",4,"𠄌㇅𠃑𠃍㇆㇇𠃋𡿨㇈𠃊㇉㇊㇋㇌𠄎㇍㇎ĀÁǍÀĒÉĚÈŌÓǑÒÊ̄ẾÊ̌ỀÊāáǎàɑēéěèīíǐìōóǒòūúǔùǖǘǚ"], -["88a1","ǜüê̄ếê̌ềêɡ⏚⏛"], -["8940","𪎩𡅅"], -["8943","攊"], -["8946","丽滝鵎釟"], -["894c","𧜵撑会伨侨兖兴农凤务动医华发变团声处备夲头学实実岚庆总斉柾栄桥济炼电纤纬纺织经统缆缷艺苏药视设询车轧轮"], -["89a1","琑糼緍楆竉刧"], -["89ab","醌碸酞肼"], -["89b0","贋胶𠧧"], -["89b5","肟黇䳍鷉鸌䰾𩷶𧀎鸊𪄳㗁"], -["89c1","溚舾甙"], -["89c5","䤑马骏龙禇𨑬𡷊𠗐𢫦两亁亀亇亿仫伷㑌侽㹈倃傈㑽㒓㒥円夅凛凼刅争剹劐匧㗇厩㕑厰㕓参吣㕭㕲㚁咓咣咴咹哐哯唘唣唨㖘唿㖥㖿嗗㗅"], -["8a40","𧶄唥"], -["8a43","𠱂𠴕𥄫喐𢳆㧬𠍁蹆𤶸𩓥䁓𨂾睺𢰸㨴䟕𨅝𦧲𤷪擝𠵼𠾴𠳕𡃴撍蹾𠺖𠰋𠽤𢲩𨉖𤓓"], -["8a64","𠵆𩩍𨃩䟴𤺧𢳂骲㩧𩗴㿭㔆𥋇𩟔𧣈𢵄鵮頕"], -["8a76","䏙𦂥撴哣𢵌𢯊𡁷㧻𡁯"], -["8aa1","𦛚𦜖𧦠擪𥁒𠱃蹨𢆡𨭌𠜱"], -["8aac","䠋𠆩㿺塳𢶍"], -["8ab2","𤗈𠓼𦂗𠽌𠶖啹䂻䎺"], -["8abb","䪴𢩦𡂝膪飵𠶜捹㧾𢝵跀嚡摼㹃"], -["8ac9","𪘁𠸉𢫏𢳉"], -["8ace","𡃈𣧂㦒㨆𨊛㕸𥹉𢃇噒𠼱𢲲𩜠㒼氽𤸻"], -["8adf","𧕴𢺋𢈈𪙛𨳍𠹺𠰴𦠜羓𡃏𢠃𢤹㗻𥇣𠺌𠾍𠺪㾓𠼰𠵇𡅏𠹌"], -["8af6","𠺫𠮩𠵈𡃀𡄽㿹𢚖搲𠾭"], -["8b40","𣏴𧘹𢯎𠵾𠵿𢱑𢱕㨘𠺘𡃇𠼮𪘲𦭐𨳒𨶙𨳊閪哌苄喹"], -["8b55","𩻃鰦骶𧝞𢷮煀腭胬尜𦕲脴㞗卟𨂽醶𠻺𠸏𠹷𠻻㗝𤷫㘉𠳖嚯𢞵𡃉𠸐𠹸𡁸𡅈𨈇𡑕𠹹𤹐𢶤婔𡀝𡀞𡃵𡃶垜𠸑"], -["8ba1","𧚔𨋍𠾵𠹻𥅾㜃𠾶𡆀𥋘𪊽𤧚𡠺𤅷𨉼墙剨㘚𥜽箲孨䠀䬬鼧䧧鰟鮍𥭴𣄽嗻㗲嚉丨夂𡯁屮靑𠂆乛亻㔾尣彑忄㣺扌攵歺氵氺灬爫丬犭𤣩罒礻糹罓𦉪㓁"], -["8bde","𦍋耂肀𦘒𦥑卝衤见𧢲讠贝钅镸长门𨸏韦页风飞饣𩠐鱼鸟黄歯龜丷𠂇阝户钢"], -["8c40","倻淾𩱳龦㷉袏𤅎灷峵䬠𥇍㕙𥴰愢𨨲辧釶熑朙玺𣊁𪄇㲋𡦀䬐磤琂冮𨜏䀉橣𪊺䈣蘏𠩯稪𩥇𨫪靕灍匤𢁾鏴盙𨧣龧矝亣俰傼丯众龨吴綋墒壐𡶶庒庙忂𢜒斋"], -["8ca1","𣏹椙橃𣱣泿"], -["8ca7","爀𤔅玌㻛𤨓嬕璹讃𥲤𥚕窓篬糃繬苸薗龩袐龪躹龫迏蕟駠鈡龬𨶹𡐿䁱䊢娚"], -["8cc9","顨杫䉶圽"], -["8cce","藖𤥻芿𧄍䲁𦵴嵻𦬕𦾾龭龮宖龯曧繛湗秊㶈䓃𣉖𢞖䎚䔶"], -["8ce6","峕𣬚諹屸㴒𣕑嵸龲煗䕘𤃬𡸣䱷㥸㑊𠆤𦱁諌侴𠈹妿腬顖𩣺弻"], -["8d40","𠮟"], -["8d42","𢇁𨥭䄂䚻𩁹㼇龳𪆵䃸㟖䛷𦱆䅼𨚲𧏿䕭㣔𥒚䕡䔛䶉䱻䵶䗪㿈𤬏㙡䓞䒽䇭崾嵈嵖㷼㠏嶤嶹㠠㠸幂庽弥徃㤈㤔㤿㥍惗愽峥㦉憷憹懏㦸戬抐拥挘㧸嚱"], -["8da1","㨃揢揻搇摚㩋擀崕嘡龟㪗斆㪽旿晓㫲暒㬢朖㭂枤栀㭘桊梄㭲㭱㭻椉楃牜楤榟榅㮼槖㯝橥橴橱檂㯬檙㯲檫檵櫔櫶殁毁毪汵沪㳋洂洆洦涁㳯涤涱渕渘温溆𨧀溻滢滚齿滨滩漤漴㵆𣽁澁澾㵪㵵熷岙㶊瀬㶑灐灔灯灿炉𠌥䏁㗱𠻘"], -["8e40","𣻗垾𦻓焾𥟠㙎榢𨯩孴穉𥣡𩓙穥穽𥦬窻窰竂竃燑𦒍䇊竚竝竪䇯咲𥰁笋筕笩𥌎𥳾箢筯莜𥮴𦱿篐萡箒箸𥴠㶭𥱥蒒篺簆簵𥳁籄粃𤢂粦晽𤕸糉糇糦籴糳糵糎"], -["8ea1","繧䔝𦹄絝𦻖璍綉綫焵綳緒𤁗𦀩緤㴓緵𡟹緥𨍭縝𦄡𦅚繮纒䌫鑬縧罀罁罇礶𦋐駡羗𦍑羣𡙡𠁨䕜𣝦䔃𨌺翺𦒉者耈耝耨耯𪂇𦳃耻耼聡𢜔䦉𦘦𣷣𦛨朥肧𨩈脇脚墰𢛶汿𦒘𤾸擧𡒊舘𡡞橓𤩥𤪕䑺舩𠬍𦩒𣵾俹𡓽蓢荢𦬊𤦧𣔰𡝳𣷸芪椛芳䇛"], -["8f40","蕋苐茚𠸖𡞴㛁𣅽𣕚艻苢茘𣺋𦶣𦬅𦮗𣗎㶿茝嗬莅䔋𦶥莬菁菓㑾𦻔橗蕚㒖𦹂𢻯葘𥯤葱㷓䓤檧葊𣲵祘蒨𦮖𦹷𦹃蓞萏莑䒠蒓蓤𥲑䉀𥳀䕃蔴嫲𦺙䔧蕳䔖枿蘖"], -["8fa1","𨘥𨘻藁𧂈蘂𡖂𧃍䕫䕪蘨㙈𡢢号𧎚虾蝱𪃸蟮𢰧螱蟚蠏噡虬桖䘏衅衆𧗠𣶹𧗤衞袜䙛袴袵揁装睷𧜏覇覊覦覩覧覼𨨥觧𧤤𧪽誜瞓釾誐𧩙竩𧬺𣾏䜓𧬸煼謌謟𥐰𥕥謿譌譍誩𤩺讐讛誯𡛟䘕衏貛𧵔𧶏貫㜥𧵓賖𧶘𧶽贒贃𡤐賛灜贑𤳉㻐起"], -["9040","趩𨀂𡀔𤦊㭼𨆼𧄌竧躭躶軃鋔輙輭𨍥𨐒辥錃𪊟𠩐辳䤪𨧞𨔽𣶻廸𣉢迹𪀔𨚼𨔁𢌥㦀𦻗逷𨔼𧪾遡𨕬𨘋邨𨜓郄𨛦邮都酧㫰醩釄粬𨤳𡺉鈎沟鉁鉢𥖹銹𨫆𣲛𨬌𥗛"], -["90a1","𠴱錬鍫𨫡𨯫炏嫃𨫢𨫥䥥鉄𨯬𨰹𨯿鍳鑛躼閅閦鐦閠濶䊹𢙺𨛘𡉼𣸮䧟氜陻隖䅬隣𦻕懚隶磵𨫠隽双䦡𦲸𠉴𦐐𩂯𩃥𤫑𡤕𣌊霱虂霶䨏䔽䖅𤫩灵孁霛靜𩇕靗孊𩇫靟鐥僐𣂷𣂼鞉鞟鞱鞾韀韒韠𥑬韮琜𩐳響韵𩐝𧥺䫑頴頳顋顦㬎𧅵㵑𠘰𤅜"], -["9140","𥜆飊颷飈飇䫿𦴧𡛓喰飡飦飬鍸餹𤨩䭲𩡗𩤅駵騌騻騐驘𥜥㛄𩂱𩯕髠髢𩬅髴䰎鬔鬭𨘀倴鬴𦦨㣃𣁽魐魀𩴾婅𡡣鮎𤉋鰂鯿鰌𩹨鷔𩾷𪆒𪆫𪃡𪄣𪇟鵾鶃𪄴鸎梈"], -["91a1","鷄𢅛𪆓𪈠𡤻𪈳鴹𪂹𪊴麐麕麞麢䴴麪麯𤍤黁㭠㧥㴝伲㞾𨰫鼂鼈䮖鐤𦶢鼗鼖鼹嚟嚊齅馸𩂋韲葿齢齩竜龎爖䮾𤥵𤦻煷𤧸𤍈𤩑玞𨯚𡣺禟𨥾𨸶鍩鏳𨩄鋬鎁鏋𨥬𤒹爗㻫睲穃烐𤑳𤏸煾𡟯炣𡢾𣖙㻇𡢅𥐯𡟸㜢𡛻𡠹㛡𡝴𡣑𥽋㜣𡛀坛𤨥𡏾𡊨"], -["9240","𡏆𡒶蔃𣚦蔃葕𤦔𧅥𣸱𥕜𣻻𧁒䓴𣛮𩦝𦼦柹㜳㰕㷧塬𡤢栐䁗𣜿𤃡𤂋𤄏𦰡哋嚞𦚱嚒𠿟𠮨𠸍鏆𨬓鎜仸儫㠙𤐶亼𠑥𠍿佋侊𥙑婨𠆫𠏋㦙𠌊𠐔㐵伩𠋀𨺳𠉵諚𠈌亘"], -["92a1","働儍侢伃𤨎𣺊佂倮偬傁俌俥偘僼兙兛兝兞湶𣖕𣸹𣺿浲𡢄𣺉冨凃𠗠䓝𠒣𠒒𠒑赺𨪜𠜎剙劤𠡳勡鍮䙺熌𤎌𠰠𤦬𡃤槑𠸝瑹㻞璙琔瑖玘䮎𤪼𤂍叐㖄爏𤃉喴𠍅响𠯆圝鉝雴鍦埝垍坿㘾壋媙𨩆𡛺𡝯𡜐娬妸銏婾嫏娒𥥆𡧳𡡡𤊕㛵洅瑃娡𥺃"], -["9340","媁𨯗𠐓鏠璌𡌃焅䥲鐈𨧻鎽㞠尞岞幞幈𡦖𡥼𣫮廍孏𡤃𡤄㜁𡢠㛝𡛾㛓脪𨩇𡶺𣑲𨦨弌弎𡤧𡞫婫𡜻孄蘔𧗽衠恾𢡠𢘫忛㺸𢖯𢖾𩂈𦽳懀𠀾𠁆𢘛憙憘恵𢲛𢴇𤛔𩅍"], -["93a1","摱𤙥𢭪㨩𢬢𣑐𩣪𢹸挷𪑛撶挱揑𤧣𢵧护𢲡搻敫楲㯴𣂎𣊭𤦉𣊫唍𣋠𡣙𩐿曎𣊉𣆳㫠䆐𥖄𨬢𥖏𡛼𥕛𥐥磮𣄃𡠪𣈴㑤𣈏𣆂𤋉暎𦴤晫䮓昰𧡰𡷫晣𣋒𣋡昞𥡲㣑𣠺𣞼㮙𣞢𣏾瓐㮖枏𤘪梶栞㯄檾㡣𣟕𤒇樳橒櫉欅𡤒攑梘橌㯗橺歗𣿀𣲚鎠鋲𨯪𨫋"], -["9440","銉𨀞𨧜鑧涥漋𤧬浧𣽿㶏渄𤀼娽渊塇洤硂焻𤌚𤉶烱牐犇犔𤞏𤜥兹𤪤𠗫瑺𣻸𣙟𤩊𤤗𥿡㼆㺱𤫟𨰣𣼵悧㻳瓌琼鎇琷䒟𦷪䕑疃㽣𤳙𤴆㽘畕癳𪗆㬙瑨𨫌𤦫𤦎㫻"], -["94a1","㷍𤩎㻿𤧅𤣳釺圲鍂𨫣𡡤僟𥈡𥇧睸𣈲眎眏睻𤚗𣞁㩞𤣰琸璛㺿𤪺𤫇䃈𤪖𦆮錇𥖁砞碍碈磒珐祙𧝁𥛣䄎禛蒖禥樭𣻺稺秴䅮𡛦䄲鈵秱𠵌𤦌𠊙𣶺𡝮㖗啫㕰㚪𠇔𠰍竢婙𢛵𥪯𥪜娍𠉛磰娪𥯆竾䇹籝籭䈑𥮳𥺼𥺦糍𤧹𡞰粎籼粮檲緜縇緓罎𦉡"], -["9540","𦅜𧭈綗𥺂䉪𦭵𠤖柖𠁎𣗏埄𦐒𦏸𤥢翝笧𠠬𥫩𥵃笌𥸎駦虅驣樜𣐿㧢𤧷𦖭騟𦖠蒀𧄧𦳑䓪脷䐂胆脉腂𦞴飃𦩂艢艥𦩑葓𦶧蘐𧈛媆䅿𡡀嬫𡢡嫤𡣘蚠蜨𣶏蠭𧐢娂"], -["95a1","衮佅袇袿裦襥襍𥚃襔𧞅𧞄𨯵𨯙𨮜𨧹㺭蒣䛵䛏㟲訽訜𩑈彍鈫𤊄旔焩烄𡡅鵭貟賩𧷜妚矃姰䍮㛔踪躧𤰉輰轊䋴汘澻𢌡䢛潹溋𡟚鯩㚵𤤯邻邗啱䤆醻鐄𨩋䁢𨫼鐧𨰝𨰻蓥訫閙閧閗閖𨴴瑅㻂𤣿𤩂𤏪㻧𣈥随𨻧𨹦𨹥㻌𤧭𤩸𣿮琒瑫㻼靁𩂰"], -["9640","桇䨝𩂓𥟟靝鍨𨦉𨰦𨬯𦎾銺嬑譩䤼珹𤈛鞛靱餸𠼦巁𨯅𤪲頟𩓚鋶𩗗釥䓀𨭐𤩧𨭤飜𨩅㼀鈪䤥萔餻饍𧬆㷽馛䭯馪驜𨭥𥣈檏騡嫾騯𩣱䮐𩥈馼䮽䮗鍽塲𡌂堢𤦸"], -["96a1","𡓨硄𢜟𣶸棅㵽鑘㤧慐𢞁𢥫愇鱏鱓鱻鰵鰐魿鯏𩸭鮟𪇵𪃾鴡䲮𤄄鸘䲰鴌𪆴𪃭𪃳𩤯鶥蒽𦸒𦿟𦮂藼䔳𦶤𦺄𦷰萠藮𦸀𣟗𦁤秢𣖜𣙀䤭𤧞㵢鏛銾鍈𠊿碹鉷鑍俤㑀遤𥕝砽硔碶硋𡝗𣇉𤥁㚚佲濚濙瀞瀞吔𤆵垻壳垊鴖埗焴㒯𤆬燫𦱀𤾗嬨𡞵𨩉"], -["9740","愌嫎娋䊼𤒈㜬䭻𨧼鎻鎸𡣖𠼝葲𦳀𡐓𤋺𢰦𤏁妔𣶷𦝁綨𦅛𦂤𤦹𤦋𨧺鋥珢㻩璴𨭣𡢟㻡𤪳櫘珳珻㻖𤨾𤪔𡟙𤩦𠎧𡐤𤧥瑈𤤖炥𤥶銄珦鍟𠓾錱𨫎𨨖鎆𨯧𥗕䤵𨪂煫"], -["97a1","𤥃𠳿嚤𠘚𠯫𠲸唂秄𡟺緾𡛂𤩐𡡒䔮鐁㜊𨫀𤦭妰𡢿𡢃𧒄媡㛢𣵛㚰鉟婹𨪁𡡢鍴㳍𠪴䪖㦊僴㵩㵌𡎜煵䋻𨈘渏𩃤䓫浗𧹏灧沯㳖𣿭𣸭渂漌㵯𠏵畑㚼㓈䚀㻚䡱姄鉮䤾轁𨰜𦯀堒埈㛖𡑒烾𤍢𤩱𢿣𡊰𢎽梹楧𡎘𣓥𧯴𣛟𨪃𣟖𣏺𤲟樚𣚭𦲷萾䓟䓎"], -["9840","𦴦𦵑𦲂𦿞漗𧄉茽𡜺菭𦲀𧁓𡟛妉媂𡞳婡婱𡤅𤇼㜭姯𡜼㛇熎鎐暚𤊥婮娫𤊓樫𣻹𧜶𤑛𤋊焝𤉙𨧡侰𦴨峂𤓎𧹍𤎽樌𤉖𡌄炦焳𤏩㶥泟勇𤩏繥姫崯㷳彜𤩝𡟟綤萦"], -["98a1","咅𣫺𣌀𠈔坾𠣕𠘙㿥𡾞𪊶瀃𩅛嵰玏糓𨩙𩐠俈翧狍猐𧫴猸猹𥛶獁獈㺩𧬘遬燵𤣲珡臶㻊県㻑沢国琙琞琟㻢㻰㻴㻺瓓㼎㽓畂畭畲疍㽼痈痜㿀癍㿗癴㿜発𤽜熈嘣覀塩䀝睃䀹条䁅㗛瞘䁪䁯属瞾矋売砘点砜䂨砹硇硑硦葈𥔵礳栃礲䄃"], -["9940","䄉禑禙辻稆込䅧窑䆲窼艹䇄竏竛䇏両筢筬筻簒簛䉠䉺类粜䊌粸䊔糭输烀𠳏総緔緐緽羮羴犟䎗耠耥笹耮耱联㷌垴炠肷胩䏭脌猪脎脒畠脔䐁㬹腖腙腚"], -["99a1","䐓堺腼膄䐥膓䐭膥埯臁臤艔䒏芦艶苊苘苿䒰荗险榊萅烵葤惣蒈䔄蒾蓡蓸蔐蔸蕒䔻蕯蕰藠䕷虲蚒蚲蛯际螋䘆䘗袮裿褤襇覑𧥧訩訸誔誴豑賔賲贜䞘塟跃䟭仮踺嗘坔蹱嗵躰䠷軎転軤軭軲辷迁迊迌逳駄䢭飠鈓䤞鈨鉘鉫銱銮銿"], -["9a40","鋣鋫鋳鋴鋽鍃鎄鎭䥅䥑麿鐗匁鐝鐭鐾䥪鑔鑹锭関䦧间阳䧥枠䨤靀䨵鞲韂噔䫤惨颹䬙飱塄餎餙冴餜餷饂饝饢䭰駅䮝騼鬏窃魩鮁鯝鯱鯴䱭鰠㝯𡯂鵉鰺"], -["9aa1","黾噐鶓鶽鷀鷼银辶鹻麬麱麽黆铜黢黱黸竈齄𠂔𠊷𠎠椚铃妬𠓗塀铁㞹𠗕𠘕𠙶𡚺块煳𠫂𠫍𠮿呪吆𠯋咞𠯻𠰻𠱓𠱥𠱼惧𠲍噺𠲵𠳝𠳭𠵯𠶲𠷈楕鰯螥𠸄𠸎𠻗𠾐𠼭𠹳尠𠾼帋𡁜𡁏𡁶朞𡁻𡂈𡂖㙇𡂿𡃓𡄯𡄻卤蒭𡋣𡍵𡌶讁𡕷𡘙𡟃𡟇乸炻𡠭𡥪"], -["9b40","𡨭𡩅𡰪𡱰𡲬𡻈拃𡻕𡼕熘桕𢁅槩㛈𢉼𢏗𢏺𢜪𢡱𢥏苽𢥧𢦓𢫕覥𢫨辠𢬎鞸𢬿顇骽𢱌"], -["9b62","𢲈𢲷𥯨𢴈𢴒𢶷𢶕𢹂𢽴𢿌𣀳𣁦𣌟𣏞徱晈暿𧩹𣕧𣗳爁𤦺矗𣘚𣜖纇𠍆墵朎"], -["9ba1","椘𣪧𧙗𥿢𣸑𣺹𧗾𢂚䣐䪸𤄙𨪚𤋮𤌍𤀻𤌴𤎖𤩅𠗊凒𠘑妟𡺨㮾𣳿𤐄𤓖垈𤙴㦛𤜯𨗨𩧉㝢𢇃譞𨭎駖𤠒𤣻𤨕爉𤫀𠱸奥𤺥𤾆𠝹軚𥀬劏圿煱𥊙𥐙𣽊𤪧喼𥑆𥑮𦭒釔㑳𥔿𧘲𥕞䜘𥕢𥕦𥟇𤤿𥡝偦㓻𣏌惞𥤃䝼𨥈𥪮𥮉𥰆𡶐垡煑澶𦄂𧰒遖𦆲𤾚譢𦐂𦑊"], -["9c40","嵛𦯷輶𦒄𡤜諪𤧶𦒈𣿯𦔒䯀𦖿𦚵𢜛鑥𥟡憕娧晉侻嚹𤔡𦛼乪𤤴陖涏𦲽㘘襷𦞙𦡮𦐑𦡞營𦣇筂𩃀𠨑𦤦鄄𦤹穅鷰𦧺騦𦨭㙟𦑩𠀡禃𦨴𦭛崬𣔙菏𦮝䛐𦲤画补𦶮墶"], -["9ca1","㜜𢖍𧁋𧇍㱔𧊀𧊅銁𢅺𧊋錰𧋦𤧐氹钟𧑐𠻸蠧裵𢤦𨑳𡞱溸𤨪𡠠㦤㚹尐秣䔿暶𩲭𩢤襃𧟌𧡘囖䃟𡘊㦡𣜯𨃨𡏅熭荦𧧝𩆨婧䲷𧂯𨦫𧧽𧨊𧬋𧵦𤅺筃祾𨀉澵𪋟樃𨌘厢𦸇鎿栶靝𨅯𨀣𦦵𡏭𣈯𨁈嶅𨰰𨂃圕頣𨥉嶫𤦈斾槕叒𤪥𣾁㰑朶𨂐𨃴𨄮𡾡𨅏"], -["9d40","𨆉𨆯𨈚𨌆𨌯𨎊㗊𨑨𨚪䣺揦𨥖砈鉕𨦸䏲𨧧䏟𨧨𨭆𨯔姸𨰉輋𨿅𩃬筑𩄐𩄼㷷𩅞𤫊运犏嚋𩓧𩗩𩖰𩖸𩜲𩣑𩥉𩥪𩧃𩨨𩬎𩵚𩶛纟𩻸𩼣䲤镇𪊓熢𪋿䶑递𪗋䶜𠲜达嗁"], -["9da1","辺𢒰边𤪓䔉繿潖檱仪㓤𨬬𧢝㜺躀𡟵𨀤𨭬𨮙𧨾𦚯㷫𧙕𣲷𥘵𥥖亚𥺁𦉘嚿𠹭踎孭𣺈𤲞揞拐𡟶𡡻攰嘭𥱊吚𥌑㷆𩶘䱽嘢嘞罉𥻘奵𣵀蝰东𠿪𠵉𣚺脗鵞贘瘻鱅癎瞹鍅吲腈苷嘥脲萘肽嗪祢噃吖𠺝㗎嘅嗱曱𨋢㘭甴嗰喺咗啲𠱁𠲖廐𥅈𠹶𢱢"], -["9e40","𠺢麫絚嗞𡁵抝靭咔賍燶酶揼掹揾啩𢭃鱲𢺳冚㓟𠶧冧呍唞唓癦踭𦢊疱肶蠄螆裇膶萜𡃁䓬猄𤜆宐茋𦢓噻𢛴𧴯𤆣𧵳𦻐𧊶酰𡇙鈈𣳼𪚩𠺬𠻹牦𡲢䝎𤿂𧿹𠿫䃺"], -["9ea1","鱝攟𢶠䣳𤟠𩵼𠿬𠸊恢𧖣𠿭"], -["9ead","𦁈𡆇熣纎鵐业丄㕷嬍沲卧㚬㧜卽㚥𤘘墚𤭮舭呋垪𥪕𠥹"], -["9ec5","㩒𢑥獴𩺬䴉鯭𣳾𩼰䱛𤾩𩖞𩿞葜𣶶𧊲𦞳𣜠挮紥𣻷𣸬㨪逈勌㹴㙺䗩𠒎癀嫰𠺶硺𧼮墧䂿噼鮋嵴癔𪐴麅䳡痹㟻愙𣃚𤏲"], -["9ef5","噝𡊩垧𤥣𩸆刴𧂮㖭汊鵼"], -["9f40","籖鬹埞𡝬屓擓𩓐𦌵𧅤蚭𠴨𦴢𤫢𠵱"], -["9f4f","凾𡼏嶎霃𡷑麁遌笟鬂峑箣扨挵髿篏鬪籾鬮籂粆鰕篼鬉鼗鰛𤤾齚啳寃俽麘俲剠㸆勑坧偖妷帒韈鶫轜呩鞴饀鞺匬愰"], -["9fa1","椬叚鰊鴂䰻陁榀傦畆𡝭駚剳"], -["9fae","酙隁酜"], -["9fb2","酑𨺗捿𦴣櫊嘑醎畺抅𠏼獏籰𥰡𣳽"], -["9fc1","𤤙盖鮝个𠳔莾衂"], -["9fc9","届槀僭坺刟巵从氱𠇲伹咜哚劚趂㗾弌㗳"], -["9fdb","歒酼龥鮗頮颴骺麨麄煺笔"], -["9fe7","毺蠘罸"], -["9feb","嘠𪙊蹷齓"], -["9ff0","跔蹏鸜踁抂𨍽踨蹵竓𤩷稾磘泪詧瘇"], -["a040","𨩚鼦泎蟖痃𪊲硓咢贌狢獱謭猂瓱賫𤪻蘯徺袠䒷"], -["a055","𡠻𦸅"], -["a058","詾𢔛"], -["a05b","惽癧髗鵄鍮鮏蟵"], -["a063","蠏賷猬霡鮰㗖犲䰇籑饊𦅙慙䰄麖慽"], -["a073","坟慯抦戹拎㩜懢厪𣏵捤栂㗒"], -["a0a1","嵗𨯂迚𨸹"], -["a0a6","僙𡵆礆匲阸𠼻䁥"], -["a0ae","矾"], -["a0b0","糂𥼚糚稭聦聣絍甅瓲覔舚朌聢𧒆聛瓰脃眤覉𦟌畓𦻑螩蟎臈螌詉貭譃眫瓸蓚㘵榲趦"], -["a0d4","覩瑨涹蟁𤀑瓧㷛煶悤憜㳑煢恷"], -["a0e2","罱𨬭牐惩䭾删㰘𣳇𥻗𧙖𥔱𡥄𡋾𩤃𦷜𧂭峁𦆭𨨏𣙷𠃮𦡆𤼎䕢嬟𦍌齐麦𦉫"], -["a3c0","␀",31,"␡"], -["c6a1","①",9,"⑴",9,"ⅰ",9,"丶丿亅亠冂冖冫勹匸卩厶夊宀巛⼳广廴彐彡攴无疒癶辵隶¨ˆヽヾゝゞ〃仝々〆〇ー[]✽ぁ",23], -["c740","す",58,"ァアィイ"], -["c7a1","ゥ",81,"А",5,"ЁЖ",4], -["c840","Л",26,"ёж",25,"⇧↸↹㇏𠃌乚𠂊刂䒑"], -["c8a1","龰冈龱𧘇"], -["c8cd","¬¦'"㈱№℡゛゜⺀⺄⺆⺇⺈⺊⺌⺍⺕⺜⺝⺥⺧⺪⺬⺮⺶⺼⺾⻆⻊⻌⻍⻏⻖⻗⻞⻣"], -["c8f5","ʃɐɛɔɵœøŋʊɪ"], -["f9fe","■"], -["fa40","𠕇鋛𠗟𣿅蕌䊵珯况㙉𤥂𨧤鍄𡧛苮𣳈砼杄拟𤤳𨦪𠊠𦮳𡌅侫𢓭倈𦴩𧪄𣘀𤪱𢔓倩𠍾徤𠎀𠍇滛𠐟偽儁㑺儎顬㝃萖𤦤𠒇兠𣎴兪𠯿𢃼𠋥𢔰𠖎𣈳𡦃宂蝽𠖳𣲙冲冸"], -["faa1","鴴凉减凑㳜凓𤪦决凢卂凭菍椾𣜭彻刋刦刼劵剗劔効勅簕蕂勠蘍𦬓包𨫞啉滙𣾀𠥔𣿬匳卄𠯢泋𡜦栛珕恊㺪㣌𡛨燝䒢卭却𨚫卾卿𡖖𡘓矦厓𨪛厠厫厮玧𥝲㽙玜叁叅汉义埾叙㪫𠮏叠𣿫𢶣叶𠱷吓灹唫晗浛呭𦭓𠵴啝咏咤䞦𡜍𠻝㶴𠵍"], -["fb40","𨦼𢚘啇䳭启琗喆喩嘅𡣗𤀺䕒𤐵暳𡂴嘷曍𣊊暤暭噍噏磱囱鞇叾圀囯园𨭦㘣𡉏坆𤆥汮炋坂㚱𦱾埦𡐖堃𡑔𤍣堦𤯵塜墪㕡壠壜𡈼壻寿坃𪅐𤉸鏓㖡够梦㛃湙"], -["fba1","𡘾娤啓𡚒蔅姉𠵎𦲁𦴪𡟜姙𡟻𡞲𦶦浱𡠨𡛕姹𦹅媫婣㛦𤦩婷㜈媖瑥嫓𦾡𢕔㶅𡤑㜲𡚸広勐孶斈孼𧨎䀄䡝𠈄寕慠𡨴𥧌𠖥寳宝䴐尅𡭄尓珎尔𡲥𦬨屉䣝岅峩峯嶋𡷹𡸷崐崘嵆𡺤岺巗苼㠭𤤁𢁉𢅳芇㠶㯂帮檊幵幺𤒼𠳓厦亷廐厨𡝱帉廴𨒂"], -["fc40","廹廻㢠廼栾鐛弍𠇁弢㫞䢮𡌺强𦢈𢏐彘𢑱彣鞽𦹮彲鍀𨨶徧嶶㵟𥉐𡽪𧃸𢙨釖𠊞𨨩怱暅𡡷㥣㷇㘹垐𢞴祱㹀悞悤悳𤦂𤦏𧩓璤僡媠慤萤慂慈𦻒憁凴𠙖憇宪𣾷"], -["fca1","𢡟懓𨮝𩥝懐㤲𢦀𢣁怣慜攞掋𠄘担𡝰拕𢸍捬𤧟㨗搸揸𡎎𡟼撐澊𢸶頔𤂌𥜝擡擥鑻㩦携㩗敍漖𤨨𤨣斅敭敟𣁾斵𤥀䬷旑䃘𡠩无旣忟𣐀昘𣇷𣇸晄𣆤𣆥晋𠹵晧𥇦晳晴𡸽𣈱𨗴𣇈𥌓矅𢣷馤朂𤎜𤨡㬫槺𣟂杞杧杢𤇍𩃭柗䓩栢湐鈼栁𣏦𦶠桝"], -["fd40","𣑯槡樋𨫟楳棃𣗍椁椀㴲㨁𣘼㮀枬楡𨩊䋼椶榘㮡𠏉荣傐槹𣙙𢄪橅𣜃檝㯳枱櫈𩆜㰍欝𠤣惞欵歴𢟍溵𣫛𠎵𡥘㝀吡𣭚毡𣻼毜氷𢒋𤣱𦭑汚舦汹𣶼䓅𣶽𤆤𤤌𤤀"], -["fda1","𣳉㛥㳫𠴲鮃𣇹𢒑羏样𦴥𦶡𦷫涖浜湼漄𤥿𤂅𦹲蔳𦽴凇沜渝萮𨬡港𣸯瑓𣾂秌湏媑𣁋濸㜍澝𣸰滺𡒗𤀽䕕鏰潄潜㵎潴𩅰㴻澟𤅄濓𤂑𤅕𤀹𣿰𣾴𤄿凟𤅖𤅗𤅀𦇝灋灾炧炁烌烕烖烟䄄㷨熴熖𤉷焫煅媈煊煮岜𤍥煏鍢𤋁焬𤑚𤨧𤨢熺𨯨炽爎"], -["fe40","鑂爕夑鑃爤鍁𥘅爮牀𤥴梽牕牗㹕𣁄栍漽犂猪猫𤠣𨠫䣭𨠄猨献珏玪𠰺𦨮珉瑉𤇢𡛧𤨤昣㛅𤦷𤦍𤧻珷琕椃𤨦琹𠗃㻗瑜𢢭瑠𨺲瑇珤瑶莹瑬㜰瑴鏱樬璂䥓𤪌"], -["fea1","𤅟𤩹𨮏孆𨰃𡢞瓈𡦈甎瓩甞𨻙𡩋寗𨺬鎅畍畊畧畮𤾂㼄𤴓疎瑝疞疴瘂瘬癑癏癯癶𦏵皐臯㟸𦤑𦤎皡皥皷盌𦾟葢𥂝𥅽𡸜眞眦着撯𥈠睘𣊬瞯𨥤𨥨𡛁矴砉𡍶𤨒棊碯磇磓隥礮𥗠磗礴碱𧘌辸袄𨬫𦂃𢘜禆褀椂禀𥡗禝𧬹礼禩渪𧄦㺨秆𩄍秔"] -] diff --git a/node_modules/whatwg-encoding/node_modules/iconv-lite/encodings/tables/cp936.json b/node_modules/whatwg-encoding/node_modules/iconv-lite/encodings/tables/cp936.json deleted file mode 100644 index 49ddb9a..0000000 --- a/node_modules/whatwg-encoding/node_modules/iconv-lite/encodings/tables/cp936.json +++ /dev/null @@ -1,264 +0,0 @@ -[ -["0","\u0000",127,"€"], -["8140","丂丄丅丆丏丒丗丟丠両丣並丩丮丯丱丳丵丷丼乀乁乂乄乆乊乑乕乗乚乛乢乣乤乥乧乨乪",5,"乲乴",9,"乿",6,"亇亊"], -["8180","亐亖亗亙亜亝亞亣亪亯亰亱亴亶亷亸亹亼亽亾仈仌仏仐仒仚仛仜仠仢仦仧仩仭仮仯仱仴仸仹仺仼仾伀伂",6,"伋伌伒",4,"伜伝伡伣伨伩伬伭伮伱伳伵伷伹伻伾",4,"佄佅佇",5,"佒佔佖佡佢佦佨佪佫佭佮佱佲併佷佸佹佺佽侀侁侂侅來侇侊侌侎侐侒侓侕侖侘侙侚侜侞侟価侢"], -["8240","侤侫侭侰",4,"侶",8,"俀俁係俆俇俈俉俋俌俍俒",4,"俙俛俠俢俤俥俧俫俬俰俲俴俵俶俷俹俻俼俽俿",11], -["8280","個倎倐們倓倕倖倗倛倝倞倠倢倣値倧倫倯",10,"倻倽倿偀偁偂偄偅偆偉偊偋偍偐",4,"偖偗偘偙偛偝",7,"偦",5,"偭",8,"偸偹偺偼偽傁傂傃傄傆傇傉傊傋傌傎",20,"傤傦傪傫傭",4,"傳",6,"傼"], -["8340","傽",17,"僐",5,"僗僘僙僛",10,"僨僩僪僫僯僰僱僲僴僶",4,"僼",9,"儈"], -["8380","儉儊儌",5,"儓",13,"儢",28,"兂兇兊兌兎兏児兒兓兗兘兙兛兝",4,"兣兤兦內兩兪兯兲兺兾兿冃冄円冇冊冋冎冏冐冑冓冔冘冚冝冞冟冡冣冦",4,"冭冮冴冸冹冺冾冿凁凂凃凅凈凊凍凎凐凒",5], -["8440","凘凙凚凜凞凟凢凣凥",5,"凬凮凱凲凴凷凾刄刅刉刋刌刏刐刓刔刕刜刞刟刡刢刣別刦刧刪刬刯刱刲刴刵刼刾剄",5,"剋剎剏剒剓剕剗剘"], -["8480","剙剚剛剝剟剠剢剣剤剦剨剫剬剭剮剰剱剳",9,"剾劀劃",4,"劉",6,"劑劒劔",6,"劜劤劥劦劧劮劯劰労",9,"勀勁勂勄勅勆勈勊勌勍勎勏勑勓勔動勗務",5,"勠勡勢勣勥",10,"勱",7,"勻勼勽匁匂匃匄匇匉匊匋匌匎"], -["8540","匑匒匓匔匘匛匜匞匟匢匤匥匧匨匩匫匬匭匯",9,"匼匽區卂卄卆卋卌卍卐協単卙卛卝卥卨卪卬卭卲卶卹卻卼卽卾厀厁厃厇厈厊厎厏"], -["8580","厐",4,"厖厗厙厛厜厞厠厡厤厧厪厫厬厭厯",6,"厷厸厹厺厼厽厾叀參",4,"収叏叐叒叓叕叚叜叝叞叡叢叧叴叺叾叿吀吂吅吇吋吔吘吙吚吜吢吤吥吪吰吳吶吷吺吽吿呁呂呄呅呇呉呌呍呎呏呑呚呝",4,"呣呥呧呩",7,"呴呹呺呾呿咁咃咅咇咈咉咊咍咑咓咗咘咜咞咟咠咡"], -["8640","咢咥咮咰咲咵咶咷咹咺咼咾哃哅哊哋哖哘哛哠",4,"哫哬哯哰哱哴",5,"哻哾唀唂唃唄唅唈唊",4,"唒唓唕",5,"唜唝唞唟唡唥唦"], -["8680","唨唩唫唭唲唴唵唶唸唹唺唻唽啀啂啅啇啈啋",4,"啑啒啓啔啗",4,"啝啞啟啠啢啣啨啩啫啯",5,"啹啺啽啿喅喆喌喍喎喐喒喓喕喖喗喚喛喞喠",6,"喨",8,"喲喴営喸喺喼喿",4,"嗆嗇嗈嗊嗋嗎嗏嗐嗕嗗",4,"嗞嗠嗢嗧嗩嗭嗮嗰嗱嗴嗶嗸",4,"嗿嘂嘃嘄嘅"], -["8740","嘆嘇嘊嘋嘍嘐",7,"嘙嘚嘜嘝嘠嘡嘢嘥嘦嘨嘩嘪嘫嘮嘯嘰嘳嘵嘷嘸嘺嘼嘽嘾噀",11,"噏",4,"噕噖噚噛噝",4], -["8780","噣噥噦噧噭噮噯噰噲噳噴噵噷噸噹噺噽",7,"嚇",6,"嚐嚑嚒嚔",14,"嚤",10,"嚰",6,"嚸嚹嚺嚻嚽",12,"囋",8,"囕囖囘囙囜団囥",5,"囬囮囯囲図囶囷囸囻囼圀圁圂圅圇國",6], -["8840","園",9,"圝圞圠圡圢圤圥圦圧圫圱圲圴",4,"圼圽圿坁坃坄坅坆坈坉坋坒",4,"坘坙坢坣坥坧坬坮坰坱坲坴坵坸坹坺坽坾坿垀"], -["8880","垁垇垈垉垊垍",4,"垔",6,"垜垝垞垟垥垨垪垬垯垰垱垳垵垶垷垹",8,"埄",6,"埌埍埐埑埓埖埗埛埜埞埡埢埣埥",7,"埮埰埱埲埳埵埶執埻埼埾埿堁堃堄堅堈堉堊堌堎堏堐堒堓堔堖堗堘堚堛堜堝堟堢堣堥",4,"堫",4,"報堲堳場堶",7], -["8940","堾",5,"塅",6,"塎塏塐塒塓塕塖塗塙",4,"塟",5,"塦",4,"塭",16,"塿墂墄墆墇墈墊墋墌"], -["8980","墍",4,"墔",4,"墛墜墝墠",7,"墪",17,"墽墾墿壀壂壃壄壆",10,"壒壓壔壖",13,"壥",5,"壭壯壱売壴壵壷壸壺",7,"夃夅夆夈",4,"夎夐夑夒夓夗夘夛夝夞夠夡夢夣夦夨夬夰夲夳夵夶夻"], -["8a40","夽夾夿奀奃奅奆奊奌奍奐奒奓奙奛",4,"奡奣奤奦",12,"奵奷奺奻奼奾奿妀妅妉妋妌妎妏妐妑妔妕妘妚妛妜妝妟妠妡妢妦"], -["8a80","妧妬妭妰妱妳",5,"妺妼妽妿",6,"姇姈姉姌姍姎姏姕姖姙姛姞",4,"姤姦姧姩姪姫姭",11,"姺姼姽姾娀娂娊娋娍娎娏娐娒娔娕娖娗娙娚娛娝娞娡娢娤娦娧娨娪",6,"娳娵娷",4,"娽娾娿婁",4,"婇婈婋",9,"婖婗婘婙婛",5], -["8b40","婡婣婤婥婦婨婩婫",8,"婸婹婻婼婽婾媀",17,"媓",6,"媜",13,"媫媬"], -["8b80","媭",4,"媴媶媷媹",4,"媿嫀嫃",5,"嫊嫋嫍",4,"嫓嫕嫗嫙嫚嫛嫝嫞嫟嫢嫤嫥嫧嫨嫪嫬",4,"嫲",22,"嬊",11,"嬘",25,"嬳嬵嬶嬸",7,"孁",6], -["8c40","孈",7,"孒孖孞孠孡孧孨孫孭孮孯孲孴孶孷學孹孻孼孾孿宂宆宊宍宎宐宑宒宔宖実宧宨宩宬宭宮宯宱宲宷宺宻宼寀寁寃寈寉寊寋寍寎寏"], -["8c80","寑寔",8,"寠寢寣實寧審",4,"寯寱",6,"寽対尀専尃尅將專尋尌對導尐尒尓尗尙尛尞尟尠尡尣尦尨尩尪尫尭尮尯尰尲尳尵尶尷屃屄屆屇屌屍屒屓屔屖屗屘屚屛屜屝屟屢層屧",6,"屰屲",6,"屻屼屽屾岀岃",4,"岉岊岋岎岏岒岓岕岝",4,"岤",4], -["8d40","岪岮岯岰岲岴岶岹岺岻岼岾峀峂峃峅",5,"峌",5,"峓",5,"峚",6,"峢峣峧峩峫峬峮峯峱",9,"峼",4], -["8d80","崁崄崅崈",5,"崏",4,"崕崗崘崙崚崜崝崟",4,"崥崨崪崫崬崯",4,"崵",7,"崿",7,"嵈嵉嵍",10,"嵙嵚嵜嵞",10,"嵪嵭嵮嵰嵱嵲嵳嵵",12,"嶃",21,"嶚嶛嶜嶞嶟嶠"], -["8e40","嶡",21,"嶸",12,"巆",6,"巎",12,"巜巟巠巣巤巪巬巭"], -["8e80","巰巵巶巸",4,"巿帀帄帇帉帊帋帍帎帒帓帗帞",7,"帨",4,"帯帰帲",4,"帹帺帾帿幀幁幃幆",5,"幍",6,"幖",4,"幜幝幟幠幣",14,"幵幷幹幾庁庂広庅庈庉庌庍庎庒庘庛庝庡庢庣庤庨",4,"庮",4,"庴庺庻庼庽庿",6], -["8f40","廆廇廈廋",5,"廔廕廗廘廙廚廜",11,"廩廫",8,"廵廸廹廻廼廽弅弆弇弉弌弍弎弐弒弔弖弙弚弜弝弞弡弢弣弤"], -["8f80","弨弫弬弮弰弲",6,"弻弽弾弿彁",14,"彑彔彙彚彛彜彞彟彠彣彥彧彨彫彮彯彲彴彵彶彸彺彽彾彿徃徆徍徎徏徑従徔徖徚徛徝從徟徠徢",5,"復徫徬徯",5,"徶徸徹徺徻徾",4,"忇忈忊忋忎忓忔忕忚忛応忞忟忢忣忥忦忨忩忬忯忰忲忳忴忶忷忹忺忼怇"], -["9040","怈怉怋怌怐怑怓怗怘怚怞怟怢怣怤怬怭怮怰",4,"怶",4,"怽怾恀恄",6,"恌恎恏恑恓恔恖恗恘恛恜恞恟恠恡恥恦恮恱恲恴恵恷恾悀"], -["9080","悁悂悅悆悇悈悊悋悎悏悐悑悓悕悗悘悙悜悞悡悢悤悥悧悩悪悮悰悳悵悶悷悹悺悽",7,"惇惈惉惌",4,"惒惓惔惖惗惙惛惞惡",4,"惪惱惲惵惷惸惻",4,"愂愃愄愅愇愊愋愌愐",4,"愖愗愘愙愛愜愝愞愡愢愥愨愩愪愬",18,"慀",6], -["9140","慇慉態慍慏慐慒慓慔慖",6,"慞慟慠慡慣慤慥慦慩",6,"慱慲慳慴慶慸",18,"憌憍憏",4,"憕"], -["9180","憖",6,"憞",8,"憪憫憭",9,"憸",5,"憿懀懁懃",4,"應懌",4,"懓懕",16,"懧",13,"懶",8,"戀",5,"戇戉戓戔戙戜戝戞戠戣戦戧戨戩戫戭戯戰戱戲戵戶戸",4,"扂扄扅扆扊"], -["9240","扏扐払扖扗扙扚扜",6,"扤扥扨扱扲扴扵扷扸扺扻扽抁抂抃抅抆抇抈抋",5,"抔抙抜抝択抣抦抧抩抪抭抮抯抰抲抳抴抶抷抸抺抾拀拁"], -["9280","拃拋拏拑拕拝拞拠拡拤拪拫拰拲拵拸拹拺拻挀挃挄挅挆挊挋挌挍挏挐挒挓挔挕挗挘挙挜挦挧挩挬挭挮挰挱挳",5,"挻挼挾挿捀捁捄捇捈捊捑捒捓捔捖",7,"捠捤捥捦捨捪捫捬捯捰捲捳捴捵捸捹捼捽捾捿掁掃掄掅掆掋掍掑掓掔掕掗掙",6,"採掤掦掫掯掱掲掵掶掹掻掽掿揀"], -["9340","揁揂揃揅揇揈揊揋揌揑揓揔揕揗",6,"揟揢揤",4,"揫揬揮揯揰揱揳揵揷揹揺揻揼揾搃搄搆",4,"損搎搑搒搕",5,"搝搟搢搣搤"], -["9380","搥搧搨搩搫搮",5,"搵",4,"搻搼搾摀摂摃摉摋",6,"摓摕摖摗摙",4,"摟",7,"摨摪摫摬摮",9,"摻",6,"撃撆撈",8,"撓撔撗撘撚撛撜撝撟",4,"撥撦撧撨撪撫撯撱撲撳撴撶撹撻撽撾撿擁擃擄擆",6,"擏擑擓擔擕擖擙據"], -["9440","擛擜擝擟擠擡擣擥擧",24,"攁",7,"攊",7,"攓",4,"攙",8], -["9480","攢攣攤攦",4,"攬攭攰攱攲攳攷攺攼攽敀",4,"敆敇敊敋敍敎敐敒敓敔敗敘敚敜敟敠敡敤敥敧敨敩敪敭敮敯敱敳敵敶數",14,"斈斉斊斍斎斏斒斔斕斖斘斚斝斞斠斢斣斦斨斪斬斮斱",7,"斺斻斾斿旀旂旇旈旉旊旍旐旑旓旔旕旘",7,"旡旣旤旪旫"], -["9540","旲旳旴旵旸旹旻",4,"昁昄昅昇昈昉昋昍昐昑昒昖昗昘昚昛昜昞昡昢昣昤昦昩昪昫昬昮昰昲昳昷",4,"昽昿晀時晄",6,"晍晎晐晑晘"], -["9580","晙晛晜晝晞晠晢晣晥晧晩",4,"晱晲晳晵晸晹晻晼晽晿暀暁暃暅暆暈暉暊暋暍暎暏暐暒暓暔暕暘",4,"暞",8,"暩",4,"暯",4,"暵暶暷暸暺暻暼暽暿",25,"曚曞",7,"曧曨曪",5,"曱曵曶書曺曻曽朁朂會"], -["9640","朄朅朆朇朌朎朏朑朒朓朖朘朙朚朜朞朠",5,"朧朩朮朰朲朳朶朷朸朹朻朼朾朿杁杄杅杇杊杋杍杒杔杕杗",4,"杝杢杣杤杦杧杫杬杮東杴杶"], -["9680","杸杹杺杻杽枀枂枃枅枆枈枊枌枍枎枏枑枒枓枔枖枙枛枟枠枡枤枦枩枬枮枱枲枴枹",7,"柂柅",9,"柕柖柗柛柟柡柣柤柦柧柨柪柫柭柮柲柵",7,"柾栁栂栃栄栆栍栐栒栔栕栘",4,"栞栟栠栢",6,"栫",6,"栴栵栶栺栻栿桇桋桍桏桒桖",5], -["9740","桜桝桞桟桪桬",7,"桵桸",8,"梂梄梇",7,"梐梑梒梔梕梖梘",9,"梣梤梥梩梪梫梬梮梱梲梴梶梷梸"], -["9780","梹",6,"棁棃",5,"棊棌棎棏棐棑棓棔棖棗棙棛",4,"棡棢棤",9,"棯棲棳棴棶棷棸棻棽棾棿椀椂椃椄椆",4,"椌椏椑椓",11,"椡椢椣椥",7,"椮椯椱椲椳椵椶椷椸椺椻椼椾楀楁楃",16,"楕楖楘楙楛楜楟"], -["9840","楡楢楤楥楧楨楩楪楬業楯楰楲",4,"楺楻楽楾楿榁榃榅榊榋榌榎",5,"榖榗榙榚榝",9,"榩榪榬榮榯榰榲榳榵榶榸榹榺榼榽"], -["9880","榾榿槀槂",7,"構槍槏槑槒槓槕",5,"槜槝槞槡",11,"槮槯槰槱槳",9,"槾樀",9,"樋",11,"標",5,"樠樢",5,"権樫樬樭樮樰樲樳樴樶",6,"樿",4,"橅橆橈",7,"橑",6,"橚"], -["9940","橜",4,"橢橣橤橦",10,"橲",6,"橺橻橽橾橿檁檂檃檅",8,"檏檒",4,"檘",7,"檡",5], -["9980","檧檨檪檭",114,"欥欦欨",6], -["9a40","欯欰欱欳欴欵欶欸欻欼欽欿歀歁歂歄歅歈歊歋歍",11,"歚",7,"歨歩歫",13,"歺歽歾歿殀殅殈"], -["9a80","殌殎殏殐殑殔殕殗殘殙殜",4,"殢",7,"殫",7,"殶殸",6,"毀毃毄毆",4,"毌毎毐毑毘毚毜",4,"毢",7,"毬毭毮毰毱毲毴毶毷毸毺毻毼毾",6,"氈",4,"氎氒気氜氝氞氠氣氥氫氬氭氱氳氶氷氹氺氻氼氾氿汃汄汅汈汋",4,"汑汒汓汖汘"], -["9b40","汙汚汢汣汥汦汧汫",4,"汱汳汵汷汸決汻汼汿沀沄沇沊沋沍沎沑沒沕沖沗沘沚沜沝沞沠沢沨沬沯沰沴沵沶沷沺泀況泂泃泆泇泈泋泍泎泏泑泒泘"], -["9b80","泙泚泜泝泟泤泦泧泩泬泭泲泴泹泿洀洂洃洅洆洈洉洊洍洏洐洑洓洔洕洖洘洜洝洟",5,"洦洨洩洬洭洯洰洴洶洷洸洺洿浀浂浄浉浌浐浕浖浗浘浛浝浟浡浢浤浥浧浨浫浬浭浰浱浲浳浵浶浹浺浻浽",4,"涃涄涆涇涊涋涍涏涐涒涖",4,"涜涢涥涬涭涰涱涳涴涶涷涹",5,"淁淂淃淈淉淊"], -["9c40","淍淎淏淐淒淓淔淕淗淚淛淜淟淢淣淥淧淨淩淪淭淯淰淲淴淵淶淸淺淽",7,"渆渇済渉渋渏渒渓渕渘渙減渜渞渟渢渦渧渨渪測渮渰渱渳渵"], -["9c80","渶渷渹渻",7,"湅",7,"湏湐湑湒湕湗湙湚湜湝湞湠",10,"湬湭湯",14,"満溁溂溄溇溈溊",4,"溑",6,"溙溚溛溝溞溠溡溣溤溦溨溩溫溬溭溮溰溳溵溸溹溼溾溿滀滃滄滅滆滈滉滊滌滍滎滐滒滖滘滙滛滜滝滣滧滪",5], -["9d40","滰滱滲滳滵滶滷滸滺",7,"漃漄漅漇漈漊",4,"漐漑漒漖",9,"漡漢漣漥漦漧漨漬漮漰漲漴漵漷",6,"漿潀潁潂"], -["9d80","潃潄潅潈潉潊潌潎",9,"潙潚潛潝潟潠潡潣潤潥潧",5,"潯潰潱潳潵潶潷潹潻潽",6,"澅澆澇澊澋澏",12,"澝澞澟澠澢",4,"澨",10,"澴澵澷澸澺",5,"濁濃",5,"濊",6,"濓",10,"濟濢濣濤濥"], -["9e40","濦",7,"濰",32,"瀒",7,"瀜",6,"瀤",6], -["9e80","瀫",9,"瀶瀷瀸瀺",17,"灍灎灐",13,"灟",11,"灮灱灲灳灴灷灹灺灻災炁炂炃炄炆炇炈炋炌炍炏炐炑炓炗炘炚炛炞",12,"炰炲炴炵炶為炾炿烄烅烆烇烉烋",12,"烚"], -["9f40","烜烝烞烠烡烢烣烥烪烮烰",6,"烸烺烻烼烾",10,"焋",4,"焑焒焔焗焛",10,"焧",7,"焲焳焴"], -["9f80","焵焷",13,"煆煇煈煉煋煍煏",12,"煝煟",4,"煥煩",4,"煯煰煱煴煵煶煷煹煻煼煾",5,"熅",4,"熋熌熍熎熐熑熒熓熕熖熗熚",4,"熡",6,"熩熪熫熭",5,"熴熶熷熸熺",8,"燄",9,"燏",4], -["a040","燖",9,"燡燢燣燤燦燨",5,"燯",9,"燺",11,"爇",19], -["a080","爛爜爞",9,"爩爫爭爮爯爲爳爴爺爼爾牀",6,"牉牊牋牎牏牐牑牓牔牕牗牘牚牜牞牠牣牤牥牨牪牫牬牭牰牱牳牴牶牷牸牻牼牽犂犃犅",4,"犌犎犐犑犓",11,"犠",11,"犮犱犲犳犵犺",6,"狅狆狇狉狊狋狌狏狑狓狔狕狖狘狚狛"], -["a1a1"," 、。·ˉˇ¨〃々—~‖…‘’“”〔〕〈",7,"〖〗【】±×÷∶∧∨∑∏∪∩∈∷√⊥∥∠⌒⊙∫∮≡≌≈∽∝≠≮≯≤≥∞∵∴♂♀°′″℃$¤¢£‰§№☆★○●◎◇◆□■△▲※→←↑↓〓"], -["a2a1","ⅰ",9], -["a2b1","⒈",19,"⑴",19,"①",9], -["a2e5","㈠",9], -["a2f1","Ⅰ",11], -["a3a1","!"#¥%",88," ̄"], -["a4a1","ぁ",82], -["a5a1","ァ",85], -["a6a1","Α",16,"Σ",6], -["a6c1","α",16,"σ",6], -["a6e0","︵︶︹︺︿﹀︽︾﹁﹂﹃﹄"], -["a6ee","︻︼︷︸︱"], -["a6f4","︳︴"], -["a7a1","А",5,"ЁЖ",25], -["a7d1","а",5,"ёж",25], -["a840","ˊˋ˙–―‥‵℅℉↖↗↘↙∕∟∣≒≦≧⊿═",35,"▁",6], -["a880","█",7,"▓▔▕▼▽◢◣◤◥☉⊕〒〝〞"], -["a8a1","āáǎàēéěèīíǐìōóǒòūúǔùǖǘǚǜüêɑ"], -["a8bd","ńň"], -["a8c0","ɡ"], -["a8c5","ㄅ",36], -["a940","〡",8,"㊣㎎㎏㎜㎝㎞㎡㏄㏎㏑㏒㏕︰¬¦"], -["a959","℡㈱"], -["a95c","‐"], -["a960","ー゛゜ヽヾ〆ゝゞ﹉",9,"﹔﹕﹖﹗﹙",8], -["a980","﹢",4,"﹨﹩﹪﹫"], -["a996","〇"], -["a9a4","─",75], -["aa40","狜狝狟狢",5,"狪狫狵狶狹狽狾狿猀猂猄",5,"猋猌猍猏猐猑猒猔猘猙猚猟猠猣猤猦猧猨猭猯猰猲猳猵猶猺猻猼猽獀",8], -["aa80","獉獊獋獌獎獏獑獓獔獕獖獘",7,"獡",10,"獮獰獱"], -["ab40","獲",11,"獿",4,"玅玆玈玊玌玍玏玐玒玓玔玕玗玘玙玚玜玝玞玠玡玣",5,"玪玬玭玱玴玵玶玸玹玼玽玾玿珁珃",4], -["ab80","珋珌珎珒",6,"珚珛珜珝珟珡珢珣珤珦珨珪珫珬珮珯珰珱珳",4], -["ac40","珸",10,"琄琇琈琋琌琍琎琑",8,"琜",5,"琣琤琧琩琫琭琯琱琲琷",4,"琽琾琿瑀瑂",11], -["ac80","瑎",6,"瑖瑘瑝瑠",12,"瑮瑯瑱",4,"瑸瑹瑺"], -["ad40","瑻瑼瑽瑿璂璄璅璆璈璉璊璌璍璏璑",10,"璝璟",7,"璪",15,"璻",12], -["ad80","瓈",9,"瓓",8,"瓝瓟瓡瓥瓧",6,"瓰瓱瓲"], -["ae40","瓳瓵瓸",6,"甀甁甂甃甅",7,"甎甐甒甔甕甖甗甛甝甞甠",4,"甦甧甪甮甴甶甹甼甽甿畁畂畃畄畆畇畉畊畍畐畑畒畓畕畖畗畘"], -["ae80","畝",7,"畧畨畩畫",6,"畳畵當畷畺",4,"疀疁疂疄疅疇"], -["af40","疈疉疊疌疍疎疐疓疕疘疛疜疞疢疦",4,"疭疶疷疺疻疿痀痁痆痋痌痎痏痐痑痓痗痙痚痜痝痟痠痡痥痩痬痭痮痯痲痳痵痶痷痸痺痻痽痾瘂瘄瘆瘇"], -["af80","瘈瘉瘋瘍瘎瘏瘑瘒瘓瘔瘖瘚瘜瘝瘞瘡瘣瘧瘨瘬瘮瘯瘱瘲瘶瘷瘹瘺瘻瘽癁療癄"], -["b040","癅",6,"癎",5,"癕癗",4,"癝癟癠癡癢癤",6,"癬癭癮癰",7,"癹発發癿皀皁皃皅皉皊皌皍皏皐皒皔皕皗皘皚皛"], -["b080","皜",7,"皥",8,"皯皰皳皵",9,"盀盁盃啊阿埃挨哎唉哀皑癌蔼矮艾碍爱隘鞍氨安俺按暗岸胺案肮昂盎凹敖熬翱袄傲奥懊澳芭捌扒叭吧笆八疤巴拔跋靶把耙坝霸罢爸白柏百摆佰败拜稗斑班搬扳般颁板版扮拌伴瓣半办绊邦帮梆榜膀绑棒磅蚌镑傍谤苞胞包褒剥"], -["b140","盄盇盉盋盌盓盕盙盚盜盝盞盠",4,"盦",7,"盰盳盵盶盷盺盻盽盿眀眂眃眅眆眊県眎",10,"眛眜眝眞眡眣眤眥眧眪眫"], -["b180","眬眮眰",4,"眹眻眽眾眿睂睄睅睆睈",7,"睒",7,"睜薄雹保堡饱宝抱报暴豹鲍爆杯碑悲卑北辈背贝钡倍狈备惫焙被奔苯本笨崩绷甭泵蹦迸逼鼻比鄙笔彼碧蓖蔽毕毙毖币庇痹闭敝弊必辟壁臂避陛鞭边编贬扁便变卞辨辩辫遍标彪膘表鳖憋别瘪彬斌濒滨宾摈兵冰柄丙秉饼炳"], -["b240","睝睞睟睠睤睧睩睪睭",11,"睺睻睼瞁瞂瞃瞆",5,"瞏瞐瞓",11,"瞡瞣瞤瞦瞨瞫瞭瞮瞯瞱瞲瞴瞶",4], -["b280","瞼瞾矀",12,"矎",8,"矘矙矚矝",4,"矤病并玻菠播拨钵波博勃搏铂箔伯帛舶脖膊渤泊驳捕卜哺补埠不布步簿部怖擦猜裁材才财睬踩采彩菜蔡餐参蚕残惭惨灿苍舱仓沧藏操糙槽曹草厕策侧册测层蹭插叉茬茶查碴搽察岔差诧拆柴豺搀掺蝉馋谗缠铲产阐颤昌猖"], -["b340","矦矨矪矯矰矱矲矴矵矷矹矺矻矼砃",5,"砊砋砎砏砐砓砕砙砛砞砠砡砢砤砨砪砫砮砯砱砲砳砵砶砽砿硁硂硃硄硆硈硉硊硋硍硏硑硓硔硘硙硚"], -["b380","硛硜硞",11,"硯",7,"硸硹硺硻硽",6,"场尝常长偿肠厂敞畅唱倡超抄钞朝嘲潮巢吵炒车扯撤掣彻澈郴臣辰尘晨忱沉陈趁衬撑称城橙成呈乘程惩澄诚承逞骋秤吃痴持匙池迟弛驰耻齿侈尺赤翅斥炽充冲虫崇宠抽酬畴踌稠愁筹仇绸瞅丑臭初出橱厨躇锄雏滁除楚"], -["b440","碄碅碆碈碊碋碏碐碒碔碕碖碙碝碞碠碢碤碦碨",7,"碵碶碷碸確碻碼碽碿磀磂磃磄磆磇磈磌磍磎磏磑磒磓磖磗磘磚",9], -["b480","磤磥磦磧磩磪磫磭",4,"磳磵磶磸磹磻",5,"礂礃礄礆",6,"础储矗搐触处揣川穿椽传船喘串疮窗幢床闯创吹炊捶锤垂春椿醇唇淳纯蠢戳绰疵茨磁雌辞慈瓷词此刺赐次聪葱囱匆从丛凑粗醋簇促蹿篡窜摧崔催脆瘁粹淬翠村存寸磋撮搓措挫错搭达答瘩打大呆歹傣戴带殆代贷袋待逮"], -["b540","礍",5,"礔",9,"礟",4,"礥",14,"礵",4,"礽礿祂祃祄祅祇祊",8,"祔祕祘祙祡祣"], -["b580","祤祦祩祪祫祬祮祰",6,"祹祻",4,"禂禃禆禇禈禉禋禌禍禎禐禑禒怠耽担丹单郸掸胆旦氮但惮淡诞弹蛋当挡党荡档刀捣蹈倒岛祷导到稻悼道盗德得的蹬灯登等瞪凳邓堤低滴迪敌笛狄涤翟嫡抵底地蒂第帝弟递缔颠掂滇碘点典靛垫电佃甸店惦奠淀殿碉叼雕凋刁掉吊钓调跌爹碟蝶迭谍叠"], -["b640","禓",6,"禛",11,"禨",10,"禴",4,"禼禿秂秄秅秇秈秊秌秎秏秐秓秔秖秗秙",5,"秠秡秢秥秨秪"], -["b680","秬秮秱",6,"秹秺秼秾秿稁稄稅稇稈稉稊稌稏",4,"稕稖稘稙稛稜丁盯叮钉顶鼎锭定订丢东冬董懂动栋侗恫冻洞兜抖斗陡豆逗痘都督毒犊独读堵睹赌杜镀肚度渡妒端短锻段断缎堆兑队对墩吨蹲敦顿囤钝盾遁掇哆多夺垛躲朵跺舵剁惰堕蛾峨鹅俄额讹娥恶厄扼遏鄂饿恩而儿耳尔饵洱二"], -["b740","稝稟稡稢稤",14,"稴稵稶稸稺稾穀",5,"穇",9,"穒",4,"穘",16], -["b780","穩",6,"穱穲穳穵穻穼穽穾窂窅窇窉窊窋窌窎窏窐窓窔窙窚窛窞窡窢贰发罚筏伐乏阀法珐藩帆番翻樊矾钒繁凡烦反返范贩犯饭泛坊芳方肪房防妨仿访纺放菲非啡飞肥匪诽吠肺废沸费芬酚吩氛分纷坟焚汾粉奋份忿愤粪丰封枫蜂峰锋风疯烽逢冯缝讽奉凤佛否夫敷肤孵扶拂辐幅氟符伏俘服"], -["b840","窣窤窧窩窪窫窮",4,"窴",10,"竀",10,"竌",9,"竗竘竚竛竜竝竡竢竤竧",5,"竮竰竱竲竳"], -["b880","竴",4,"竻竼竾笀笁笂笅笇笉笌笍笎笐笒笓笖笗笘笚笜笝笟笡笢笣笧笩笭浮涪福袱弗甫抚辅俯釜斧脯腑府腐赴副覆赋复傅付阜父腹负富讣附妇缚咐噶嘎该改概钙盖溉干甘杆柑竿肝赶感秆敢赣冈刚钢缸肛纲岗港杠篙皋高膏羔糕搞镐稿告哥歌搁戈鸽胳疙割革葛格蛤阁隔铬个各给根跟耕更庚羹"], -["b940","笯笰笲笴笵笶笷笹笻笽笿",5,"筆筈筊筍筎筓筕筗筙筜筞筟筡筣",10,"筯筰筳筴筶筸筺筼筽筿箁箂箃箄箆",6,"箎箏"], -["b980","箑箒箓箖箘箙箚箛箞箟箠箣箤箥箮箯箰箲箳箵箶箷箹",7,"篂篃範埂耿梗工攻功恭龚供躬公宫弓巩汞拱贡共钩勾沟苟狗垢构购够辜菇咕箍估沽孤姑鼓古蛊骨谷股故顾固雇刮瓜剐寡挂褂乖拐怪棺关官冠观管馆罐惯灌贯光广逛瑰规圭硅归龟闺轨鬼诡癸桂柜跪贵刽辊滚棍锅郭国果裹过哈"], -["ba40","篅篈築篊篋篍篎篏篐篒篔",4,"篛篜篞篟篠篢篣篤篧篨篩篫篬篭篯篰篲",4,"篸篹篺篻篽篿",7,"簈簉簊簍簎簐",5,"簗簘簙"], -["ba80","簚",4,"簠",5,"簨簩簫",12,"簹",5,"籂骸孩海氦亥害骇酣憨邯韩含涵寒函喊罕翰撼捍旱憾悍焊汗汉夯杭航壕嚎豪毫郝好耗号浩呵喝荷菏核禾和何合盒貉阂河涸赫褐鹤贺嘿黑痕很狠恨哼亨横衡恒轰哄烘虹鸿洪宏弘红喉侯猴吼厚候后呼乎忽瑚壶葫胡蝴狐糊湖"], -["bb40","籃",9,"籎",36,"籵",5,"籾",9], -["bb80","粈粊",6,"粓粔粖粙粚粛粠粡粣粦粧粨粩粫粬粭粯粰粴",4,"粺粻弧虎唬护互沪户花哗华猾滑画划化话槐徊怀淮坏欢环桓还缓换患唤痪豢焕涣宦幻荒慌黄磺蝗簧皇凰惶煌晃幌恍谎灰挥辉徽恢蛔回毁悔慧卉惠晦贿秽会烩汇讳诲绘荤昏婚魂浑混豁活伙火获或惑霍货祸击圾基机畸稽积箕"], -["bc40","粿糀糂糃糄糆糉糋糎",6,"糘糚糛糝糞糡",6,"糩",5,"糰",7,"糹糺糼",13,"紋",5], -["bc80","紑",14,"紡紣紤紥紦紨紩紪紬紭紮細",6,"肌饥迹激讥鸡姬绩缉吉极棘辑籍集及急疾汲即嫉级挤几脊己蓟技冀季伎祭剂悸济寄寂计记既忌际妓继纪嘉枷夹佳家加荚颊贾甲钾假稼价架驾嫁歼监坚尖笺间煎兼肩艰奸缄茧检柬碱硷拣捡简俭剪减荐槛鉴践贱见键箭件"], -["bd40","紷",54,"絯",7], -["bd80","絸",32,"健舰剑饯渐溅涧建僵姜将浆江疆蒋桨奖讲匠酱降蕉椒礁焦胶交郊浇骄娇嚼搅铰矫侥脚狡角饺缴绞剿教酵轿较叫窖揭接皆秸街阶截劫节桔杰捷睫竭洁结解姐戒藉芥界借介疥诫届巾筋斤金今津襟紧锦仅谨进靳晋禁近烬浸"], -["be40","継",12,"綧",6,"綯",42], -["be80","線",32,"尽劲荆兢茎睛晶鲸京惊精粳经井警景颈静境敬镜径痉靖竟竞净炯窘揪究纠玖韭久灸九酒厩救旧臼舅咎就疚鞠拘狙疽居驹菊局咀矩举沮聚拒据巨具距踞锯俱句惧炬剧捐鹃娟倦眷卷绢撅攫抉掘倔爵觉决诀绝均菌钧军君峻"], -["bf40","緻",62], -["bf80","縺縼",4,"繂",4,"繈",21,"俊竣浚郡骏喀咖卡咯开揩楷凯慨刊堪勘坎砍看康慷糠扛抗亢炕考拷烤靠坷苛柯棵磕颗科壳咳可渴克刻客课肯啃垦恳坑吭空恐孔控抠口扣寇枯哭窟苦酷库裤夸垮挎跨胯块筷侩快宽款匡筐狂框矿眶旷况亏盔岿窥葵奎魁傀"], -["c040","繞",35,"纃",23,"纜纝纞"], -["c080","纮纴纻纼绖绤绬绹缊缐缞缷缹缻",6,"罃罆",9,"罒罓馈愧溃坤昆捆困括扩廓阔垃拉喇蜡腊辣啦莱来赖蓝婪栏拦篮阑兰澜谰揽览懒缆烂滥琅榔狼廊郎朗浪捞劳牢老佬姥酪烙涝勒乐雷镭蕾磊累儡垒擂肋类泪棱楞冷厘梨犁黎篱狸离漓理李里鲤礼莉荔吏栗丽厉励砾历利傈例俐"], -["c140","罖罙罛罜罝罞罠罣",4,"罫罬罭罯罰罳罵罶罷罸罺罻罼罽罿羀羂",7,"羋羍羏",4,"羕",4,"羛羜羠羢羣羥羦羨",6,"羱"], -["c180","羳",4,"羺羻羾翀翂翃翄翆翇翈翉翋翍翏",4,"翖翗翙",5,"翢翣痢立粒沥隶力璃哩俩联莲连镰廉怜涟帘敛脸链恋炼练粮凉梁粱良两辆量晾亮谅撩聊僚疗燎寥辽潦了撂镣廖料列裂烈劣猎琳林磷霖临邻鳞淋凛赁吝拎玲菱零龄铃伶羚凌灵陵岭领另令溜琉榴硫馏留刘瘤流柳六龙聋咙笼窿"], -["c240","翤翧翨翪翫翬翭翯翲翴",6,"翽翾翿耂耇耈耉耊耎耏耑耓耚耛耝耞耟耡耣耤耫",5,"耲耴耹耺耼耾聀聁聄聅聇聈聉聎聏聐聑聓聕聖聗"], -["c280","聙聛",13,"聫",5,"聲",11,"隆垄拢陇楼娄搂篓漏陋芦卢颅庐炉掳卤虏鲁麓碌露路赂鹿潞禄录陆戮驴吕铝侣旅履屡缕虑氯律率滤绿峦挛孪滦卵乱掠略抡轮伦仑沦纶论萝螺罗逻锣箩骡裸落洛骆络妈麻玛码蚂马骂嘛吗埋买麦卖迈脉瞒馒蛮满蔓曼慢漫"], -["c340","聾肁肂肅肈肊肍",5,"肔肕肗肙肞肣肦肧肨肬肰肳肵肶肸肹肻胅胇",4,"胏",6,"胘胟胠胢胣胦胮胵胷胹胻胾胿脀脁脃脄脅脇脈脋"], -["c380","脌脕脗脙脛脜脝脟",12,"脭脮脰脳脴脵脷脹",4,"脿谩芒茫盲氓忙莽猫茅锚毛矛铆卯茂冒帽貌贸么玫枚梅酶霉煤没眉媒镁每美昧寐妹媚门闷们萌蒙檬盟锰猛梦孟眯醚靡糜迷谜弥米秘觅泌蜜密幂棉眠绵冕免勉娩缅面苗描瞄藐秒渺庙妙蔑灭民抿皿敏悯闽明螟鸣铭名命谬摸"], -["c440","腀",5,"腇腉腍腎腏腒腖腗腘腛",4,"腡腢腣腤腦腨腪腫腬腯腲腳腵腶腷腸膁膃",4,"膉膋膌膍膎膐膒",5,"膙膚膞",4,"膤膥"], -["c480","膧膩膫",7,"膴",5,"膼膽膾膿臄臅臇臈臉臋臍",6,"摹蘑模膜磨摩魔抹末莫墨默沫漠寞陌谋牟某拇牡亩姆母墓暮幕募慕木目睦牧穆拿哪呐钠那娜纳氖乃奶耐奈南男难囊挠脑恼闹淖呢馁内嫩能妮霓倪泥尼拟你匿腻逆溺蔫拈年碾撵捻念娘酿鸟尿捏聂孽啮镊镍涅您柠狞凝宁"], -["c540","臔",14,"臤臥臦臨臩臫臮",4,"臵",5,"臽臿舃與",4,"舎舏舑舓舕",5,"舝舠舤舥舦舧舩舮舲舺舼舽舿"], -["c580","艀艁艂艃艅艆艈艊艌艍艎艐",7,"艙艛艜艝艞艠",7,"艩拧泞牛扭钮纽脓浓农弄奴努怒女暖虐疟挪懦糯诺哦欧鸥殴藕呕偶沤啪趴爬帕怕琶拍排牌徘湃派攀潘盘磐盼畔判叛乓庞旁耪胖抛咆刨炮袍跑泡呸胚培裴赔陪配佩沛喷盆砰抨烹澎彭蓬棚硼篷膨朋鹏捧碰坯砒霹批披劈琵毗"], -["c640","艪艫艬艭艱艵艶艷艸艻艼芀芁芃芅芆芇芉芌芐芓芔芕芖芚芛芞芠芢芣芧芲芵芶芺芻芼芿苀苂苃苅苆苉苐苖苙苚苝苢苧苨苩苪苬苭苮苰苲苳苵苶苸"], -["c680","苺苼",4,"茊茋茍茐茒茓茖茘茙茝",9,"茩茪茮茰茲茷茻茽啤脾疲皮匹痞僻屁譬篇偏片骗飘漂瓢票撇瞥拼频贫品聘乒坪苹萍平凭瓶评屏坡泼颇婆破魄迫粕剖扑铺仆莆葡菩蒲埔朴圃普浦谱曝瀑期欺栖戚妻七凄漆柒沏其棋奇歧畦崎脐齐旗祈祁骑起岂乞企启契砌器气迄弃汽泣讫掐"], -["c740","茾茿荁荂荄荅荈荊",4,"荓荕",4,"荝荢荰",6,"荹荺荾",6,"莇莈莊莋莌莍莏莐莑莔莕莖莗莙莚莝莟莡",6,"莬莭莮"], -["c780","莯莵莻莾莿菂菃菄菆菈菉菋菍菎菐菑菒菓菕菗菙菚菛菞菢菣菤菦菧菨菫菬菭恰洽牵扦钎铅千迁签仟谦乾黔钱钳前潜遣浅谴堑嵌欠歉枪呛腔羌墙蔷强抢橇锹敲悄桥瞧乔侨巧鞘撬翘峭俏窍切茄且怯窃钦侵亲秦琴勤芹擒禽寝沁青轻氢倾卿清擎晴氰情顷请庆琼穷秋丘邱球求囚酋泅趋区蛆曲躯屈驱渠"], -["c840","菮華菳",4,"菺菻菼菾菿萀萂萅萇萈萉萊萐萒",5,"萙萚萛萞",5,"萩",7,"萲",5,"萹萺萻萾",7,"葇葈葉"], -["c880","葊",6,"葒",4,"葘葝葞葟葠葢葤",4,"葪葮葯葰葲葴葷葹葻葼取娶龋趣去圈颧权醛泉全痊拳犬券劝缺炔瘸却鹊榷确雀裙群然燃冉染瓤壤攘嚷让饶扰绕惹热壬仁人忍韧任认刃妊纫扔仍日戎茸蓉荣融熔溶容绒冗揉柔肉茹蠕儒孺如辱乳汝入褥软阮蕊瑞锐闰润若弱撒洒萨腮鳃塞赛三叁"], -["c940","葽",4,"蒃蒄蒅蒆蒊蒍蒏",7,"蒘蒚蒛蒝蒞蒟蒠蒢",12,"蒰蒱蒳蒵蒶蒷蒻蒼蒾蓀蓂蓃蓅蓆蓇蓈蓋蓌蓎蓏蓒蓔蓕蓗"], -["c980","蓘",4,"蓞蓡蓢蓤蓧",4,"蓭蓮蓯蓱",10,"蓽蓾蔀蔁蔂伞散桑嗓丧搔骚扫嫂瑟色涩森僧莎砂杀刹沙纱傻啥煞筛晒珊苫杉山删煽衫闪陕擅赡膳善汕扇缮墒伤商赏晌上尚裳梢捎稍烧芍勺韶少哨邵绍奢赊蛇舌舍赦摄射慑涉社设砷申呻伸身深娠绅神沈审婶甚肾慎渗声生甥牲升绳"], -["ca40","蔃",8,"蔍蔎蔏蔐蔒蔔蔕蔖蔘蔙蔛蔜蔝蔞蔠蔢",8,"蔭",9,"蔾",4,"蕄蕅蕆蕇蕋",10], -["ca80","蕗蕘蕚蕛蕜蕝蕟",4,"蕥蕦蕧蕩",8,"蕳蕵蕶蕷蕸蕼蕽蕿薀薁省盛剩胜圣师失狮施湿诗尸虱十石拾时什食蚀实识史矢使屎驶始式示士世柿事拭誓逝势是嗜噬适仕侍释饰氏市恃室视试收手首守寿授售受瘦兽蔬枢梳殊抒输叔舒淑疏书赎孰熟薯暑曙署蜀黍鼠属术述树束戍竖墅庶数漱"], -["cb40","薂薃薆薈",6,"薐",10,"薝",6,"薥薦薧薩薫薬薭薱",5,"薸薺",6,"藂",6,"藊",4,"藑藒"], -["cb80","藔藖",5,"藝",6,"藥藦藧藨藪",14,"恕刷耍摔衰甩帅栓拴霜双爽谁水睡税吮瞬顺舜说硕朔烁斯撕嘶思私司丝死肆寺嗣四伺似饲巳松耸怂颂送宋讼诵搜艘擞嗽苏酥俗素速粟僳塑溯宿诉肃酸蒜算虽隋随绥髓碎岁穗遂隧祟孙损笋蓑梭唆缩琐索锁所塌他它她塔"], -["cc40","藹藺藼藽藾蘀",4,"蘆",10,"蘒蘓蘔蘕蘗",15,"蘨蘪",13,"蘹蘺蘻蘽蘾蘿虀"], -["cc80","虁",11,"虒虓處",4,"虛虜虝號虠虡虣",7,"獭挞蹋踏胎苔抬台泰酞太态汰坍摊贪瘫滩坛檀痰潭谭谈坦毯袒碳探叹炭汤塘搪堂棠膛唐糖倘躺淌趟烫掏涛滔绦萄桃逃淘陶讨套特藤腾疼誊梯剔踢锑提题蹄啼体替嚏惕涕剃屉天添填田甜恬舔腆挑条迢眺跳贴铁帖厅听烃"], -["cd40","虭虯虰虲",6,"蚃",6,"蚎",4,"蚔蚖",5,"蚞",4,"蚥蚦蚫蚭蚮蚲蚳蚷蚸蚹蚻",4,"蛁蛂蛃蛅蛈蛌蛍蛒蛓蛕蛖蛗蛚蛜"], -["cd80","蛝蛠蛡蛢蛣蛥蛦蛧蛨蛪蛫蛬蛯蛵蛶蛷蛺蛻蛼蛽蛿蜁蜄蜅蜆蜋蜌蜎蜏蜐蜑蜔蜖汀廷停亭庭挺艇通桐酮瞳同铜彤童桶捅筒统痛偷投头透凸秃突图徒途涂屠土吐兔湍团推颓腿蜕褪退吞屯臀拖托脱鸵陀驮驼椭妥拓唾挖哇蛙洼娃瓦袜歪外豌弯湾玩顽丸烷完碗挽晚皖惋宛婉万腕汪王亡枉网往旺望忘妄威"], -["ce40","蜙蜛蜝蜟蜠蜤蜦蜧蜨蜪蜫蜬蜭蜯蜰蜲蜳蜵蜶蜸蜹蜺蜼蜽蝀",6,"蝊蝋蝍蝏蝐蝑蝒蝔蝕蝖蝘蝚",5,"蝡蝢蝦",7,"蝯蝱蝲蝳蝵"], -["ce80","蝷蝸蝹蝺蝿螀螁螄螆螇螉螊螌螎",4,"螔螕螖螘",6,"螠",4,"巍微危韦违桅围唯惟为潍维苇萎委伟伪尾纬未蔚味畏胃喂魏位渭谓尉慰卫瘟温蚊文闻纹吻稳紊问嗡翁瓮挝蜗涡窝我斡卧握沃巫呜钨乌污诬屋无芜梧吾吴毋武五捂午舞伍侮坞戊雾晤物勿务悟误昔熙析西硒矽晰嘻吸锡牺"], -["cf40","螥螦螧螩螪螮螰螱螲螴螶螷螸螹螻螼螾螿蟁",4,"蟇蟈蟉蟌",4,"蟔",6,"蟜蟝蟞蟟蟡蟢蟣蟤蟦蟧蟨蟩蟫蟬蟭蟯",9], -["cf80","蟺蟻蟼蟽蟿蠀蠁蠂蠄",5,"蠋",7,"蠔蠗蠘蠙蠚蠜",4,"蠣稀息希悉膝夕惜熄烯溪汐犀檄袭席习媳喜铣洗系隙戏细瞎虾匣霞辖暇峡侠狭下厦夏吓掀锨先仙鲜纤咸贤衔舷闲涎弦嫌显险现献县腺馅羡宪陷限线相厢镶香箱襄湘乡翔祥详想响享项巷橡像向象萧硝霄削哮嚣销消宵淆晓"], -["d040","蠤",13,"蠳",5,"蠺蠻蠽蠾蠿衁衂衃衆",5,"衎",5,"衕衖衘衚",6,"衦衧衪衭衯衱衳衴衵衶衸衹衺"], -["d080","衻衼袀袃袆袇袉袊袌袎袏袐袑袓袔袕袗",4,"袝",4,"袣袥",5,"小孝校肖啸笑效楔些歇蝎鞋协挟携邪斜胁谐写械卸蟹懈泄泻谢屑薪芯锌欣辛新忻心信衅星腥猩惺兴刑型形邢行醒幸杏性姓兄凶胸匈汹雄熊休修羞朽嗅锈秀袖绣墟戌需虚嘘须徐许蓄酗叙旭序畜恤絮婿绪续轩喧宣悬旋玄"], -["d140","袬袮袯袰袲",4,"袸袹袺袻袽袾袿裀裃裄裇裈裊裋裌裍裏裐裑裓裖裗裚",4,"裠裡裦裧裩",6,"裲裵裶裷裺裻製裿褀褁褃",5], -["d180","褉褋",4,"褑褔",4,"褜",4,"褢褣褤褦褧褨褩褬褭褮褯褱褲褳褵褷选癣眩绚靴薛学穴雪血勋熏循旬询寻驯巡殉汛训讯逊迅压押鸦鸭呀丫芽牙蚜崖衙涯雅哑亚讶焉咽阉烟淹盐严研蜒岩延言颜阎炎沿奄掩眼衍演艳堰燕厌砚雁唁彦焰宴谚验殃央鸯秧杨扬佯疡羊洋阳氧仰痒养样漾邀腰妖瑶"], -["d240","褸",8,"襂襃襅",24,"襠",5,"襧",19,"襼"], -["d280","襽襾覀覂覄覅覇",26,"摇尧遥窑谣姚咬舀药要耀椰噎耶爷野冶也页掖业叶曳腋夜液一壹医揖铱依伊衣颐夷遗移仪胰疑沂宜姨彝椅蚁倚已乙矣以艺抑易邑屹亿役臆逸肄疫亦裔意毅忆义益溢诣议谊译异翼翌绎茵荫因殷音阴姻吟银淫寅饮尹引隐"], -["d340","覢",30,"觃觍觓觔觕觗觘觙觛觝觟觠觡觢觤觧觨觩觪觬觭觮觰觱觲觴",6], -["d380","觻",4,"訁",5,"計",21,"印英樱婴鹰应缨莹萤营荧蝇迎赢盈影颖硬映哟拥佣臃痈庸雍踊蛹咏泳涌永恿勇用幽优悠忧尤由邮铀犹油游酉有友右佑釉诱又幼迂淤于盂榆虞愚舆余俞逾鱼愉渝渔隅予娱雨与屿禹宇语羽玉域芋郁吁遇喻峪御愈欲狱育誉"], -["d440","訞",31,"訿",8,"詉",21], -["d480","詟",25,"詺",6,"浴寓裕预豫驭鸳渊冤元垣袁原援辕园员圆猿源缘远苑愿怨院曰约越跃钥岳粤月悦阅耘云郧匀陨允运蕴酝晕韵孕匝砸杂栽哉灾宰载再在咱攒暂赞赃脏葬遭糟凿藻枣早澡蚤躁噪造皂灶燥责择则泽贼怎增憎曾赠扎喳渣札轧"], -["d540","誁",7,"誋",7,"誔",46], -["d580","諃",32,"铡闸眨栅榨咋乍炸诈摘斋宅窄债寨瞻毡詹粘沾盏斩辗崭展蘸栈占战站湛绽樟章彰漳张掌涨杖丈帐账仗胀瘴障招昭找沼赵照罩兆肇召遮折哲蛰辙者锗蔗这浙珍斟真甄砧臻贞针侦枕疹诊震振镇阵蒸挣睁征狰争怔整拯正政"], -["d640","諤",34,"謈",27], -["d680","謤謥謧",30,"帧症郑证芝枝支吱蜘知肢脂汁之织职直植殖执值侄址指止趾只旨纸志挚掷至致置帜峙制智秩稚质炙痔滞治窒中盅忠钟衷终种肿重仲众舟周州洲诌粥轴肘帚咒皱宙昼骤珠株蛛朱猪诸诛逐竹烛煮拄瞩嘱主著柱助蛀贮铸筑"], -["d740","譆",31,"譧",4,"譭",25], -["d780","讇",24,"讬讱讻诇诐诪谉谞住注祝驻抓爪拽专砖转撰赚篆桩庄装妆撞壮状椎锥追赘坠缀谆准捉拙卓桌琢茁酌啄着灼浊兹咨资姿滋淄孜紫仔籽滓子自渍字鬃棕踪宗综总纵邹走奏揍租足卒族祖诅阻组钻纂嘴醉最罪尊遵昨左佐柞做作坐座"], -["d840","谸",8,"豂豃豄豅豈豊豋豍",7,"豖豗豘豙豛",5,"豣",6,"豬",6,"豴豵豶豷豻",6,"貃貄貆貇"], -["d880","貈貋貍",6,"貕貖貗貙",20,"亍丌兀丐廿卅丕亘丞鬲孬噩丨禺丿匕乇夭爻卮氐囟胤馗毓睾鼗丶亟鼐乜乩亓芈孛啬嘏仄厍厝厣厥厮靥赝匚叵匦匮匾赜卦卣刂刈刎刭刳刿剀剌剞剡剜蒯剽劂劁劐劓冂罔亻仃仉仂仨仡仫仞伛仳伢佤仵伥伧伉伫佞佧攸佚佝"], -["d940","貮",62], -["d980","賭",32,"佟佗伲伽佶佴侑侉侃侏佾佻侪佼侬侔俦俨俪俅俚俣俜俑俟俸倩偌俳倬倏倮倭俾倜倌倥倨偾偃偕偈偎偬偻傥傧傩傺僖儆僭僬僦僮儇儋仝氽佘佥俎龠汆籴兮巽黉馘冁夔勹匍訇匐凫夙兕亠兖亳衮袤亵脔裒禀嬴蠃羸冫冱冽冼"], -["da40","贎",14,"贠赑赒赗赟赥赨赩赪赬赮赯赱赲赸",8,"趂趃趆趇趈趉趌",4,"趒趓趕",9,"趠趡"], -["da80","趢趤",12,"趲趶趷趹趻趽跀跁跂跅跇跈跉跊跍跐跒跓跔凇冖冢冥讠讦讧讪讴讵讷诂诃诋诏诎诒诓诔诖诘诙诜诟诠诤诨诩诮诰诳诶诹诼诿谀谂谄谇谌谏谑谒谔谕谖谙谛谘谝谟谠谡谥谧谪谫谮谯谲谳谵谶卩卺阝阢阡阱阪阽阼陂陉陔陟陧陬陲陴隈隍隗隰邗邛邝邙邬邡邴邳邶邺"], -["db40","跕跘跙跜跠跡跢跥跦跧跩跭跮跰跱跲跴跶跼跾",6,"踆踇踈踋踍踎踐踑踒踓踕",7,"踠踡踤",4,"踫踭踰踲踳踴踶踷踸踻踼踾"], -["db80","踿蹃蹅蹆蹌",4,"蹓",5,"蹚",11,"蹧蹨蹪蹫蹮蹱邸邰郏郅邾郐郄郇郓郦郢郜郗郛郫郯郾鄄鄢鄞鄣鄱鄯鄹酃酆刍奂劢劬劭劾哿勐勖勰叟燮矍廴凵凼鬯厶弁畚巯坌垩垡塾墼壅壑圩圬圪圳圹圮圯坜圻坂坩垅坫垆坼坻坨坭坶坳垭垤垌垲埏垧垴垓垠埕埘埚埙埒垸埴埯埸埤埝"], -["dc40","蹳蹵蹷",4,"蹽蹾躀躂躃躄躆躈",6,"躑躒躓躕",6,"躝躟",11,"躭躮躰躱躳",6,"躻",7], -["dc80","軃",10,"軏",21,"堋堍埽埭堀堞堙塄堠塥塬墁墉墚墀馨鼙懿艹艽艿芏芊芨芄芎芑芗芙芫芸芾芰苈苊苣芘芷芮苋苌苁芩芴芡芪芟苄苎芤苡茉苷苤茏茇苜苴苒苘茌苻苓茑茚茆茔茕苠苕茜荑荛荜茈莒茼茴茱莛荞茯荏荇荃荟荀茗荠茭茺茳荦荥"], -["dd40","軥",62], -["dd80","輤",32,"荨茛荩荬荪荭荮莰荸莳莴莠莪莓莜莅荼莶莩荽莸荻莘莞莨莺莼菁萁菥菘堇萘萋菝菽菖萜萸萑萆菔菟萏萃菸菹菪菅菀萦菰菡葜葑葚葙葳蒇蒈葺蒉葸萼葆葩葶蒌蒎萱葭蓁蓍蓐蓦蒽蓓蓊蒿蒺蓠蒡蒹蒴蒗蓥蓣蔌甍蔸蓰蔹蔟蔺"], -["de40","轅",32,"轪辀辌辒辝辠辡辢辤辥辦辧辪辬辭辮辯農辳辴辵辷辸辺辻込辿迀迃迆"], -["de80","迉",4,"迏迒迖迗迚迠迡迣迧迬迯迱迲迴迵迶迺迻迼迾迿逇逈逌逎逓逕逘蕖蔻蓿蓼蕙蕈蕨蕤蕞蕺瞢蕃蕲蕻薤薨薇薏蕹薮薜薅薹薷薰藓藁藜藿蘧蘅蘩蘖蘼廾弈夼奁耷奕奚奘匏尢尥尬尴扌扪抟抻拊拚拗拮挢拶挹捋捃掭揶捱捺掎掴捭掬掊捩掮掼揲揸揠揿揄揞揎摒揆掾摅摁搋搛搠搌搦搡摞撄摭撖"], -["df40","這逜連逤逥逧",5,"逰",4,"逷逹逺逽逿遀遃遅遆遈",4,"過達違遖遙遚遜",5,"遤遦遧適遪遫遬遯",4,"遶",6,"遾邁"], -["df80","還邅邆邇邉邊邌",4,"邒邔邖邘邚邜邞邟邠邤邥邧邨邩邫邭邲邷邼邽邿郀摺撷撸撙撺擀擐擗擤擢攉攥攮弋忒甙弑卟叱叽叩叨叻吒吖吆呋呒呓呔呖呃吡呗呙吣吲咂咔呷呱呤咚咛咄呶呦咝哐咭哂咴哒咧咦哓哔呲咣哕咻咿哌哙哚哜咩咪咤哝哏哞唛哧唠哽唔哳唢唣唏唑唧唪啧喏喵啉啭啁啕唿啐唼"], -["e040","郂郃郆郈郉郋郌郍郒郔郕郖郘郙郚郞郟郠郣郤郥郩郪郬郮郰郱郲郳郵郶郷郹郺郻郼郿鄀鄁鄃鄅",19,"鄚鄛鄜"], -["e080","鄝鄟鄠鄡鄤",10,"鄰鄲",6,"鄺",8,"酄唷啖啵啶啷唳唰啜喋嗒喃喱喹喈喁喟啾嗖喑啻嗟喽喾喔喙嗪嗷嗉嘟嗑嗫嗬嗔嗦嗝嗄嗯嗥嗲嗳嗌嗍嗨嗵嗤辔嘞嘈嘌嘁嘤嘣嗾嘀嘧嘭噘嘹噗嘬噍噢噙噜噌噔嚆噤噱噫噻噼嚅嚓嚯囔囗囝囡囵囫囹囿圄圊圉圜帏帙帔帑帱帻帼"], -["e140","酅酇酈酑酓酔酕酖酘酙酛酜酟酠酦酧酨酫酭酳酺酻酼醀",4,"醆醈醊醎醏醓",6,"醜",5,"醤",5,"醫醬醰醱醲醳醶醷醸醹醻"], -["e180","醼",10,"釈釋釐釒",9,"針",8,"帷幄幔幛幞幡岌屺岍岐岖岈岘岙岑岚岜岵岢岽岬岫岱岣峁岷峄峒峤峋峥崂崃崧崦崮崤崞崆崛嵘崾崴崽嵬嵛嵯嵝嵫嵋嵊嵩嵴嶂嶙嶝豳嶷巅彳彷徂徇徉後徕徙徜徨徭徵徼衢彡犭犰犴犷犸狃狁狎狍狒狨狯狩狲狴狷猁狳猃狺"], -["e240","釦",62], -["e280","鈥",32,"狻猗猓猡猊猞猝猕猢猹猥猬猸猱獐獍獗獠獬獯獾舛夥飧夤夂饣饧",5,"饴饷饽馀馄馇馊馍馐馑馓馔馕庀庑庋庖庥庠庹庵庾庳赓廒廑廛廨廪膺忄忉忖忏怃忮怄忡忤忾怅怆忪忭忸怙怵怦怛怏怍怩怫怊怿怡恸恹恻恺恂"], -["e340","鉆",45,"鉵",16], -["e380","銆",7,"銏",24,"恪恽悖悚悭悝悃悒悌悛惬悻悱惝惘惆惚悴愠愦愕愣惴愀愎愫慊慵憬憔憧憷懔懵忝隳闩闫闱闳闵闶闼闾阃阄阆阈阊阋阌阍阏阒阕阖阗阙阚丬爿戕氵汔汜汊沣沅沐沔沌汨汩汴汶沆沩泐泔沭泷泸泱泗沲泠泖泺泫泮沱泓泯泾"], -["e440","銨",5,"銯",24,"鋉",31], -["e480","鋩",32,"洹洧洌浃浈洇洄洙洎洫浍洮洵洚浏浒浔洳涑浯涞涠浞涓涔浜浠浼浣渚淇淅淞渎涿淠渑淦淝淙渖涫渌涮渫湮湎湫溲湟溆湓湔渲渥湄滟溱溘滠漭滢溥溧溽溻溷滗溴滏溏滂溟潢潆潇漤漕滹漯漶潋潴漪漉漩澉澍澌潸潲潼潺濑"], -["e540","錊",51,"錿",10], -["e580","鍊",31,"鍫濉澧澹澶濂濡濮濞濠濯瀚瀣瀛瀹瀵灏灞宀宄宕宓宥宸甯骞搴寤寮褰寰蹇謇辶迓迕迥迮迤迩迦迳迨逅逄逋逦逑逍逖逡逵逶逭逯遄遑遒遐遨遘遢遛暹遴遽邂邈邃邋彐彗彖彘尻咫屐屙孱屣屦羼弪弩弭艴弼鬻屮妁妃妍妩妪妣"], -["e640","鍬",34,"鎐",27], -["e680","鎬",29,"鏋鏌鏍妗姊妫妞妤姒妲妯姗妾娅娆姝娈姣姘姹娌娉娲娴娑娣娓婀婧婊婕娼婢婵胬媪媛婷婺媾嫫媲嫒嫔媸嫠嫣嫱嫖嫦嫘嫜嬉嬗嬖嬲嬷孀尕尜孚孥孳孑孓孢驵驷驸驺驿驽骀骁骅骈骊骐骒骓骖骘骛骜骝骟骠骢骣骥骧纟纡纣纥纨纩"], -["e740","鏎",7,"鏗",54], -["e780","鐎",32,"纭纰纾绀绁绂绉绋绌绐绔绗绛绠绡绨绫绮绯绱绲缍绶绺绻绾缁缂缃缇缈缋缌缏缑缒缗缙缜缛缟缡",6,"缪缫缬缭缯",4,"缵幺畿巛甾邕玎玑玮玢玟珏珂珑玷玳珀珉珈珥珙顼琊珩珧珞玺珲琏琪瑛琦琥琨琰琮琬"], -["e840","鐯",14,"鐿",43,"鑬鑭鑮鑯"], -["e880","鑰",20,"钑钖钘铇铏铓铔铚铦铻锜锠琛琚瑁瑜瑗瑕瑙瑷瑭瑾璜璎璀璁璇璋璞璨璩璐璧瓒璺韪韫韬杌杓杞杈杩枥枇杪杳枘枧杵枨枞枭枋杷杼柰栉柘栊柩枰栌柙枵柚枳柝栀柃枸柢栎柁柽栲栳桠桡桎桢桄桤梃栝桕桦桁桧桀栾桊桉栩梵梏桴桷梓桫棂楮棼椟椠棹"], -["e940","锧锳锽镃镈镋镕镚镠镮镴镵長",7,"門",42], -["e980","閫",32,"椤棰椋椁楗棣椐楱椹楠楂楝榄楫榀榘楸椴槌榇榈槎榉楦楣楹榛榧榻榫榭槔榱槁槊槟榕槠榍槿樯槭樗樘橥槲橄樾檠橐橛樵檎橹樽樨橘橼檑檐檩檗檫猷獒殁殂殇殄殒殓殍殚殛殡殪轫轭轱轲轳轵轶轸轷轹轺轼轾辁辂辄辇辋"], -["ea40","闌",27,"闬闿阇阓阘阛阞阠阣",6,"阫阬阭阯阰阷阸阹阺阾陁陃陊陎陏陑陒陓陖陗"], -["ea80","陘陙陚陜陝陞陠陣陥陦陫陭",4,"陳陸",12,"隇隉隊辍辎辏辘辚軎戋戗戛戟戢戡戥戤戬臧瓯瓴瓿甏甑甓攴旮旯旰昊昙杲昃昕昀炅曷昝昴昱昶昵耆晟晔晁晏晖晡晗晷暄暌暧暝暾曛曜曦曩贲贳贶贻贽赀赅赆赈赉赇赍赕赙觇觊觋觌觎觏觐觑牮犟牝牦牯牾牿犄犋犍犏犒挈挲掰"], -["eb40","隌階隑隒隓隕隖隚際隝",9,"隨",7,"隱隲隴隵隷隸隺隻隿雂雃雈雊雋雐雑雓雔雖",9,"雡",6,"雫"], -["eb80","雬雭雮雰雱雲雴雵雸雺電雼雽雿霂霃霅霊霋霌霐霑霒霔霕霗",4,"霝霟霠搿擘耄毪毳毽毵毹氅氇氆氍氕氘氙氚氡氩氤氪氲攵敕敫牍牒牖爰虢刖肟肜肓肼朊肽肱肫肭肴肷胧胨胩胪胛胂胄胙胍胗朐胝胫胱胴胭脍脎胲胼朕脒豚脶脞脬脘脲腈腌腓腴腙腚腱腠腩腼腽腭腧塍媵膈膂膑滕膣膪臌朦臊膻"], -["ec40","霡",8,"霫霬霮霯霱霳",4,"霺霻霼霽霿",18,"靔靕靗靘靚靜靝靟靣靤靦靧靨靪",7], -["ec80","靲靵靷",4,"靽",7,"鞆",4,"鞌鞎鞏鞐鞓鞕鞖鞗鞙",4,"臁膦欤欷欹歃歆歙飑飒飓飕飙飚殳彀毂觳斐齑斓於旆旄旃旌旎旒旖炀炜炖炝炻烀炷炫炱烨烊焐焓焖焯焱煳煜煨煅煲煊煸煺熘熳熵熨熠燠燔燧燹爝爨灬焘煦熹戾戽扃扈扉礻祀祆祉祛祜祓祚祢祗祠祯祧祺禅禊禚禧禳忑忐"], -["ed40","鞞鞟鞡鞢鞤",6,"鞬鞮鞰鞱鞳鞵",46], -["ed80","韤韥韨韮",4,"韴韷",23,"怼恝恚恧恁恙恣悫愆愍慝憩憝懋懑戆肀聿沓泶淼矶矸砀砉砗砘砑斫砭砜砝砹砺砻砟砼砥砬砣砩硎硭硖硗砦硐硇硌硪碛碓碚碇碜碡碣碲碹碥磔磙磉磬磲礅磴礓礤礞礴龛黹黻黼盱眄眍盹眇眈眚眢眙眭眦眵眸睐睑睇睃睚睨"], -["ee40","頏",62], -["ee80","顎",32,"睢睥睿瞍睽瞀瞌瞑瞟瞠瞰瞵瞽町畀畎畋畈畛畲畹疃罘罡罟詈罨罴罱罹羁罾盍盥蠲钅钆钇钋钊钌钍钏钐钔钗钕钚钛钜钣钤钫钪钭钬钯钰钲钴钶",4,"钼钽钿铄铈",6,"铐铑铒铕铖铗铙铘铛铞铟铠铢铤铥铧铨铪"], -["ef40","顯",5,"颋颎颒颕颙颣風",37,"飏飐飔飖飗飛飜飝飠",4], -["ef80","飥飦飩",30,"铩铫铮铯铳铴铵铷铹铼铽铿锃锂锆锇锉锊锍锎锏锒",4,"锘锛锝锞锟锢锪锫锩锬锱锲锴锶锷锸锼锾锿镂锵镄镅镆镉镌镎镏镒镓镔镖镗镘镙镛镞镟镝镡镢镤",8,"镯镱镲镳锺矧矬雉秕秭秣秫稆嵇稃稂稞稔"], -["f040","餈",4,"餎餏餑",28,"餯",26], -["f080","饊",9,"饖",12,"饤饦饳饸饹饻饾馂馃馉稹稷穑黏馥穰皈皎皓皙皤瓞瓠甬鸠鸢鸨",4,"鸲鸱鸶鸸鸷鸹鸺鸾鹁鹂鹄鹆鹇鹈鹉鹋鹌鹎鹑鹕鹗鹚鹛鹜鹞鹣鹦",6,"鹱鹭鹳疒疔疖疠疝疬疣疳疴疸痄疱疰痃痂痖痍痣痨痦痤痫痧瘃痱痼痿瘐瘀瘅瘌瘗瘊瘥瘘瘕瘙"], -["f140","馌馎馚",10,"馦馧馩",47], -["f180","駙",32,"瘛瘼瘢瘠癀瘭瘰瘿瘵癃瘾瘳癍癞癔癜癖癫癯翊竦穸穹窀窆窈窕窦窠窬窨窭窳衤衩衲衽衿袂袢裆袷袼裉裢裎裣裥裱褚裼裨裾裰褡褙褓褛褊褴褫褶襁襦襻疋胥皲皴矜耒耔耖耜耠耢耥耦耧耩耨耱耋耵聃聆聍聒聩聱覃顸颀颃"], -["f240","駺",62], -["f280","騹",32,"颉颌颍颏颔颚颛颞颟颡颢颥颦虍虔虬虮虿虺虼虻蚨蚍蚋蚬蚝蚧蚣蚪蚓蚩蚶蛄蚵蛎蚰蚺蚱蚯蛉蛏蚴蛩蛱蛲蛭蛳蛐蜓蛞蛴蛟蛘蛑蜃蜇蛸蜈蜊蜍蜉蜣蜻蜞蜥蜮蜚蜾蝈蜴蜱蜩蜷蜿螂蜢蝽蝾蝻蝠蝰蝌蝮螋蝓蝣蝼蝤蝙蝥螓螯螨蟒"], -["f340","驚",17,"驲骃骉骍骎骔骕骙骦骩",6,"骲骳骴骵骹骻骽骾骿髃髄髆",4,"髍髎髏髐髒體髕髖髗髙髚髛髜"], -["f380","髝髞髠髢髣髤髥髧髨髩髪髬髮髰",8,"髺髼",6,"鬄鬅鬆蟆螈螅螭螗螃螫蟥螬螵螳蟋蟓螽蟑蟀蟊蟛蟪蟠蟮蠖蠓蟾蠊蠛蠡蠹蠼缶罂罄罅舐竺竽笈笃笄笕笊笫笏筇笸笪笙笮笱笠笥笤笳笾笞筘筚筅筵筌筝筠筮筻筢筲筱箐箦箧箸箬箝箨箅箪箜箢箫箴篑篁篌篝篚篥篦篪簌篾篼簏簖簋"], -["f440","鬇鬉",5,"鬐鬑鬒鬔",10,"鬠鬡鬢鬤",10,"鬰鬱鬳",7,"鬽鬾鬿魀魆魊魋魌魎魐魒魓魕",5], -["f480","魛",32,"簟簪簦簸籁籀臾舁舂舄臬衄舡舢舣舭舯舨舫舸舻舳舴舾艄艉艋艏艚艟艨衾袅袈裘裟襞羝羟羧羯羰羲籼敉粑粝粜粞粢粲粼粽糁糇糌糍糈糅糗糨艮暨羿翎翕翥翡翦翩翮翳糸絷綦綮繇纛麸麴赳趄趔趑趱赧赭豇豉酊酐酎酏酤"], -["f540","魼",62], -["f580","鮻",32,"酢酡酰酩酯酽酾酲酴酹醌醅醐醍醑醢醣醪醭醮醯醵醴醺豕鹾趸跫踅蹙蹩趵趿趼趺跄跖跗跚跞跎跏跛跆跬跷跸跣跹跻跤踉跽踔踝踟踬踮踣踯踺蹀踹踵踽踱蹉蹁蹂蹑蹒蹊蹰蹶蹼蹯蹴躅躏躔躐躜躞豸貂貊貅貘貔斛觖觞觚觜"], -["f640","鯜",62], -["f680","鰛",32,"觥觫觯訾謦靓雩雳雯霆霁霈霏霎霪霭霰霾龀龃龅",5,"龌黾鼋鼍隹隼隽雎雒瞿雠銎銮鋈錾鍪鏊鎏鐾鑫鱿鲂鲅鲆鲇鲈稣鲋鲎鲐鲑鲒鲔鲕鲚鲛鲞",5,"鲥",4,"鲫鲭鲮鲰",7,"鲺鲻鲼鲽鳄鳅鳆鳇鳊鳋"], -["f740","鰼",62], -["f780","鱻鱽鱾鲀鲃鲄鲉鲊鲌鲏鲓鲖鲗鲘鲙鲝鲪鲬鲯鲹鲾",4,"鳈鳉鳑鳒鳚鳛鳠鳡鳌",4,"鳓鳔鳕鳗鳘鳙鳜鳝鳟鳢靼鞅鞑鞒鞔鞯鞫鞣鞲鞴骱骰骷鹘骶骺骼髁髀髅髂髋髌髑魅魃魇魉魈魍魑飨餍餮饕饔髟髡髦髯髫髻髭髹鬈鬏鬓鬟鬣麽麾縻麂麇麈麋麒鏖麝麟黛黜黝黠黟黢黩黧黥黪黯鼢鼬鼯鼹鼷鼽鼾齄"], -["f840","鳣",62], -["f880","鴢",32], -["f940","鵃",62], -["f980","鶂",32], -["fa40","鶣",62], -["fa80","鷢",32], -["fb40","鸃",27,"鸤鸧鸮鸰鸴鸻鸼鹀鹍鹐鹒鹓鹔鹖鹙鹝鹟鹠鹡鹢鹥鹮鹯鹲鹴",9,"麀"], -["fb80","麁麃麄麅麆麉麊麌",5,"麔",8,"麞麠",5,"麧麨麩麪"], -["fc40","麫",8,"麵麶麷麹麺麼麿",4,"黅黆黇黈黊黋黌黐黒黓黕黖黗黙黚點黡黣黤黦黨黫黬黭黮黰",8,"黺黽黿",6], -["fc80","鼆",4,"鼌鼏鼑鼒鼔鼕鼖鼘鼚",5,"鼡鼣",8,"鼭鼮鼰鼱"], -["fd40","鼲",4,"鼸鼺鼼鼿",4,"齅",10,"齒",38], -["fd80","齹",5,"龁龂龍",11,"龜龝龞龡",4,"郎凉秊裏隣"], -["fe40","兀嗀﨎﨏﨑﨓﨔礼﨟蘒﨡﨣﨤﨧﨨﨩"] -] diff --git a/node_modules/whatwg-encoding/node_modules/iconv-lite/encodings/tables/cp949.json b/node_modules/whatwg-encoding/node_modules/iconv-lite/encodings/tables/cp949.json deleted file mode 100644 index 2022a00..0000000 --- a/node_modules/whatwg-encoding/node_modules/iconv-lite/encodings/tables/cp949.json +++ /dev/null @@ -1,273 +0,0 @@ -[ -["0","\u0000",127], -["8141","갂갃갅갆갋",4,"갘갞갟갡갢갣갥",6,"갮갲갳갴"], -["8161","갵갶갷갺갻갽갾갿걁",9,"걌걎",5,"걕"], -["8181","걖걗걙걚걛걝",18,"걲걳걵걶걹걻",4,"겂겇겈겍겎겏겑겒겓겕",6,"겞겢",5,"겫겭겮겱",6,"겺겾겿곀곂곃곅곆곇곉곊곋곍",7,"곖곘",7,"곢곣곥곦곩곫곭곮곲곴곷",4,"곾곿괁괂괃괅괇",4,"괎괐괒괓"], -["8241","괔괕괖괗괙괚괛괝괞괟괡",7,"괪괫괮",5], -["8261","괶괷괹괺괻괽",6,"굆굈굊",5,"굑굒굓굕굖굗"], -["8281","굙",7,"굢굤",7,"굮굯굱굲굷굸굹굺굾궀궃",4,"궊궋궍궎궏궑",10,"궞",5,"궥",17,"궸",7,"귂귃귅귆귇귉",6,"귒귔",7,"귝귞귟귡귢귣귥",18], -["8341","귺귻귽귾긂",5,"긊긌긎",5,"긕",7], -["8361","긝",18,"긲긳긵긶긹긻긼"], -["8381","긽긾긿깂깄깇깈깉깋깏깑깒깓깕깗",4,"깞깢깣깤깦깧깪깫깭깮깯깱",6,"깺깾",5,"꺆",5,"꺍",46,"꺿껁껂껃껅",6,"껎껒",5,"껚껛껝",8], -["8441","껦껧껩껪껬껮",5,"껵껶껷껹껺껻껽",8], -["8461","꼆꼉꼊꼋꼌꼎꼏꼑",18], -["8481","꼤",7,"꼮꼯꼱꼳꼵",6,"꼾꽀꽄꽅꽆꽇꽊",5,"꽑",10,"꽞",5,"꽦",18,"꽺",5,"꾁꾂꾃꾅꾆꾇꾉",6,"꾒꾓꾔꾖",5,"꾝",26,"꾺꾻꾽꾾"], -["8541","꾿꿁",5,"꿊꿌꿏",4,"꿕",6,"꿝",4], -["8561","꿢",5,"꿪",5,"꿲꿳꿵꿶꿷꿹",6,"뀂뀃"], -["8581","뀅",6,"뀍뀎뀏뀑뀒뀓뀕",6,"뀞",9,"뀩",26,"끆끇끉끋끍끏끐끑끒끖끘끚끛끜끞",29,"끾끿낁낂낃낅",6,"낎낐낒",5,"낛낝낞낣낤"], -["8641","낥낦낧낪낰낲낶낷낹낺낻낽",6,"냆냊",5,"냒"], -["8661","냓냕냖냗냙",6,"냡냢냣냤냦",10], -["8681","냱",22,"넊넍넎넏넑넔넕넖넗넚넞",4,"넦넧넩넪넫넭",6,"넶넺",5,"녂녃녅녆녇녉",6,"녒녓녖녗녙녚녛녝녞녟녡",22,"녺녻녽녾녿놁놃",4,"놊놌놎놏놐놑놕놖놗놙놚놛놝"], -["8741","놞",9,"놩",15], -["8761","놹",18,"뇍뇎뇏뇑뇒뇓뇕"], -["8781","뇖",5,"뇞뇠",7,"뇪뇫뇭뇮뇯뇱",7,"뇺뇼뇾",5,"눆눇눉눊눍",6,"눖눘눚",5,"눡",18,"눵",6,"눽",26,"뉙뉚뉛뉝뉞뉟뉡",6,"뉪",4], -["8841","뉯",4,"뉶",5,"뉽",6,"늆늇늈늊",4], -["8861","늏늒늓늕늖늗늛",4,"늢늤늧늨늩늫늭늮늯늱늲늳늵늶늷"], -["8881","늸",15,"닊닋닍닎닏닑닓",4,"닚닜닞닟닠닡닣닧닩닪닰닱닲닶닼닽닾댂댃댅댆댇댉",6,"댒댖",5,"댝",54,"덗덙덚덝덠덡덢덣"], -["8941","덦덨덪덬덭덯덲덳덵덶덷덹",6,"뎂뎆",5,"뎍"], -["8961","뎎뎏뎑뎒뎓뎕",10,"뎢",5,"뎩뎪뎫뎭"], -["8981","뎮",21,"돆돇돉돊돍돏돑돒돓돖돘돚돜돞돟돡돢돣돥돦돧돩",18,"돽",18,"됑",6,"됙됚됛됝됞됟됡",6,"됪됬",7,"됵",15], -["8a41","둅",10,"둒둓둕둖둗둙",6,"둢둤둦"], -["8a61","둧",4,"둭",18,"뒁뒂"], -["8a81","뒃",4,"뒉",19,"뒞",5,"뒥뒦뒧뒩뒪뒫뒭",7,"뒶뒸뒺",5,"듁듂듃듅듆듇듉",6,"듑듒듓듔듖",5,"듞듟듡듢듥듧",4,"듮듰듲",5,"듹",26,"딖딗딙딚딝"], -["8b41","딞",5,"딦딫",4,"딲딳딵딶딷딹",6,"땂땆"], -["8b61","땇땈땉땊땎땏땑땒땓땕",6,"땞땢",8], -["8b81","땫",52,"떢떣떥떦떧떩떬떭떮떯떲떶",4,"떾떿뗁뗂뗃뗅",6,"뗎뗒",5,"뗙",18,"뗭",18], -["8c41","똀",15,"똒똓똕똖똗똙",4], -["8c61","똞",6,"똦",5,"똭",6,"똵",5], -["8c81","똻",12,"뙉",26,"뙥뙦뙧뙩",50,"뚞뚟뚡뚢뚣뚥",5,"뚭뚮뚯뚰뚲",16], -["8d41","뛃",16,"뛕",8], -["8d61","뛞",17,"뛱뛲뛳뛵뛶뛷뛹뛺"], -["8d81","뛻",4,"뜂뜃뜄뜆",33,"뜪뜫뜭뜮뜱",6,"뜺뜼",7,"띅띆띇띉띊띋띍",6,"띖",9,"띡띢띣띥띦띧띩",6,"띲띴띶",5,"띾띿랁랂랃랅",6,"랎랓랔랕랚랛랝랞"], -["8e41","랟랡",6,"랪랮",5,"랶랷랹",8], -["8e61","럂",4,"럈럊",19], -["8e81","럞",13,"럮럯럱럲럳럵",6,"럾렂",4,"렊렋렍렎렏렑",6,"렚렜렞",5,"렦렧렩렪렫렭",6,"렶렺",5,"롁롂롃롅",11,"롒롔",7,"롞롟롡롢롣롥",6,"롮롰롲",5,"롹롺롻롽",7], -["8f41","뢅",7,"뢎",17], -["8f61","뢠",7,"뢩",6,"뢱뢲뢳뢵뢶뢷뢹",4], -["8f81","뢾뢿룂룄룆",5,"룍룎룏룑룒룓룕",7,"룞룠룢",5,"룪룫룭룮룯룱",6,"룺룼룾",5,"뤅",18,"뤙",6,"뤡",26,"뤾뤿륁륂륃륅",6,"륍륎륐륒",5], -["9041","륚륛륝륞륟륡",6,"륪륬륮",5,"륶륷륹륺륻륽"], -["9061","륾",5,"릆릈릋릌릏",15], -["9081","릟",12,"릮릯릱릲릳릵",6,"릾맀맂",5,"맊맋맍맓",4,"맚맜맟맠맢맦맧맩맪맫맭",6,"맶맻",4,"먂",5,"먉",11,"먖",33,"먺먻먽먾먿멁멃멄멅멆"], -["9141","멇멊멌멏멐멑멒멖멗멙멚멛멝",6,"멦멪",5], -["9161","멲멳멵멶멷멹",9,"몆몈몉몊몋몍",5], -["9181","몓",20,"몪몭몮몯몱몳",4,"몺몼몾",5,"뫅뫆뫇뫉",14,"뫚",33,"뫽뫾뫿묁묂묃묅",7,"묎묐묒",5,"묙묚묛묝묞묟묡",6], -["9241","묨묪묬",7,"묷묹묺묿",4,"뭆뭈뭊뭋뭌뭎뭑뭒"], -["9261","뭓뭕뭖뭗뭙",7,"뭢뭤",7,"뭭",4], -["9281","뭲",21,"뮉뮊뮋뮍뮎뮏뮑",18,"뮥뮦뮧뮩뮪뮫뮭",6,"뮵뮶뮸",7,"믁믂믃믅믆믇믉",6,"믑믒믔",35,"믺믻믽믾밁"], -["9341","밃",4,"밊밎밐밒밓밙밚밠밡밢밣밦밨밪밫밬밮밯밲밳밵"], -["9361","밶밷밹",6,"뱂뱆뱇뱈뱊뱋뱎뱏뱑",8], -["9381","뱚뱛뱜뱞",37,"벆벇벉벊벍벏",4,"벖벘벛",4,"벢벣벥벦벩",6,"벲벶",5,"벾벿볁볂볃볅",7,"볎볒볓볔볖볗볙볚볛볝",22,"볷볹볺볻볽"], -["9441","볾",5,"봆봈봊",5,"봑봒봓봕",8], -["9461","봞",5,"봥",6,"봭",12], -["9481","봺",5,"뵁",6,"뵊뵋뵍뵎뵏뵑",6,"뵚",9,"뵥뵦뵧뵩",22,"붂붃붅붆붋",4,"붒붔붖붗붘붛붝",6,"붥",10,"붱",6,"붹",24], -["9541","뷒뷓뷖뷗뷙뷚뷛뷝",11,"뷪",5,"뷱"], -["9561","뷲뷳뷵뷶뷷뷹",6,"븁븂븄븆",5,"븎븏븑븒븓"], -["9581","븕",6,"븞븠",35,"빆빇빉빊빋빍빏",4,"빖빘빜빝빞빟빢빣빥빦빧빩빫",4,"빲빶",4,"빾빿뺁뺂뺃뺅",6,"뺎뺒",5,"뺚",13,"뺩",14], -["9641","뺸",23,"뻒뻓"], -["9661","뻕뻖뻙",6,"뻡뻢뻦",5,"뻭",8], -["9681","뻶",10,"뼂",5,"뼊",13,"뼚뼞",33,"뽂뽃뽅뽆뽇뽉",6,"뽒뽓뽔뽖",44], -["9741","뾃",16,"뾕",8], -["9761","뾞",17,"뾱",7], -["9781","뾹",11,"뿆",5,"뿎뿏뿑뿒뿓뿕",6,"뿝뿞뿠뿢",89,"쀽쀾쀿"], -["9841","쁀",16,"쁒",5,"쁙쁚쁛"], -["9861","쁝쁞쁟쁡",6,"쁪",15], -["9881","쁺",21,"삒삓삕삖삗삙",6,"삢삤삦",5,"삮삱삲삷",4,"삾샂샃샄샆샇샊샋샍샎샏샑",6,"샚샞",5,"샦샧샩샪샫샭",6,"샶샸샺",5,"섁섂섃섅섆섇섉",6,"섑섒섓섔섖",5,"섡섢섥섨섩섪섫섮"], -["9941","섲섳섴섵섷섺섻섽섾섿셁",6,"셊셎",5,"셖셗"], -["9961","셙셚셛셝",6,"셦셪",5,"셱셲셳셵셶셷셹셺셻"], -["9981","셼",8,"솆",5,"솏솑솒솓솕솗",4,"솞솠솢솣솤솦솧솪솫솭솮솯솱",11,"솾",5,"쇅쇆쇇쇉쇊쇋쇍",6,"쇕쇖쇙",6,"쇡쇢쇣쇥쇦쇧쇩",6,"쇲쇴",7,"쇾쇿숁숂숃숅",6,"숎숐숒",5,"숚숛숝숞숡숢숣"], -["9a41","숤숥숦숧숪숬숮숰숳숵",16], -["9a61","쉆쉇쉉",6,"쉒쉓쉕쉖쉗쉙",6,"쉡쉢쉣쉤쉦"], -["9a81","쉧",4,"쉮쉯쉱쉲쉳쉵",6,"쉾슀슂",5,"슊",5,"슑",6,"슙슚슜슞",5,"슦슧슩슪슫슮",5,"슶슸슺",33,"싞싟싡싢싥",5,"싮싰싲싳싴싵싷싺싽싾싿쌁",6,"쌊쌋쌎쌏"], -["9b41","쌐쌑쌒쌖쌗쌙쌚쌛쌝",6,"쌦쌧쌪",8], -["9b61","쌳",17,"썆",7], -["9b81","썎",25,"썪썫썭썮썯썱썳",4,"썺썻썾",5,"쎅쎆쎇쎉쎊쎋쎍",50,"쏁",22,"쏚"], -["9c41","쏛쏝쏞쏡쏣",4,"쏪쏫쏬쏮",5,"쏶쏷쏹",5], -["9c61","쏿",8,"쐉",6,"쐑",9], -["9c81","쐛",8,"쐥",6,"쐭쐮쐯쐱쐲쐳쐵",6,"쐾",9,"쑉",26,"쑦쑧쑩쑪쑫쑭",6,"쑶쑷쑸쑺",5,"쒁",18,"쒕",6,"쒝",12], -["9d41","쒪",13,"쒹쒺쒻쒽",8], -["9d61","쓆",25], -["9d81","쓠",8,"쓪",5,"쓲쓳쓵쓶쓷쓹쓻쓼쓽쓾씂",9,"씍씎씏씑씒씓씕",6,"씝",10,"씪씫씭씮씯씱",6,"씺씼씾",5,"앆앇앋앏앐앑앒앖앚앛앜앟앢앣앥앦앧앩",6,"앲앶",5,"앾앿얁얂얃얅얆얈얉얊얋얎얐얒얓얔"], -["9e41","얖얙얚얛얝얞얟얡",7,"얪",9,"얶"], -["9e61","얷얺얿",4,"엋엍엏엒엓엕엖엗엙",6,"엢엤엦엧"], -["9e81","엨엩엪엫엯엱엲엳엵엸엹엺엻옂옃옄옉옊옋옍옎옏옑",6,"옚옝",6,"옦옧옩옪옫옯옱옲옶옸옺옼옽옾옿왂왃왅왆왇왉",6,"왒왖",5,"왞왟왡",10,"왭왮왰왲",5,"왺왻왽왾왿욁",6,"욊욌욎",5,"욖욗욙욚욛욝",6,"욦"], -["9f41","욨욪",5,"욲욳욵욶욷욻",4,"웂웄웆",5,"웎"], -["9f61","웏웑웒웓웕",6,"웞웟웢",5,"웪웫웭웮웯웱웲"], -["9f81","웳",4,"웺웻웼웾",5,"윆윇윉윊윋윍",6,"윖윘윚",5,"윢윣윥윦윧윩",6,"윲윴윶윸윹윺윻윾윿읁읂읃읅",4,"읋읎읐읙읚읛읝읞읟읡",6,"읩읪읬",7,"읶읷읹읺읻읿잀잁잂잆잋잌잍잏잒잓잕잙잛",4,"잢잧",4,"잮잯잱잲잳잵잶잷"], -["a041","잸잹잺잻잾쟂",5,"쟊쟋쟍쟏쟑",6,"쟙쟚쟛쟜"], -["a061","쟞",5,"쟥쟦쟧쟩쟪쟫쟭",13], -["a081","쟻",4,"젂젃젅젆젇젉젋",4,"젒젔젗",4,"젞젟젡젢젣젥",6,"젮젰젲",5,"젹젺젻젽젾젿졁",6,"졊졋졎",5,"졕",26,"졲졳졵졶졷졹졻",4,"좂좄좈좉좊좎",5,"좕",7,"좞좠좢좣좤"], -["a141","좥좦좧좩",18,"좾좿죀죁"], -["a161","죂죃죅죆죇죉죊죋죍",6,"죖죘죚",5,"죢죣죥"], -["a181","죦",14,"죶",5,"죾죿줁줂줃줇",4,"줎 、。·‥…¨〃―∥\∼‘’“”〔〕〈",9,"±×÷≠≤≥∞∴°′″℃Å¢£¥♂♀∠⊥⌒∂∇≡≒§※☆★○●◎◇◆□■△▲▽▼→←↑↓↔〓≪≫√∽∝∵∫∬∈∋⊆⊇⊂⊃∪∩∧∨¬"], -["a241","줐줒",5,"줙",18], -["a261","줭",6,"줵",18], -["a281","쥈",7,"쥒쥓쥕쥖쥗쥙",6,"쥢쥤",7,"쥭쥮쥯⇒⇔∀∃´~ˇ˘˝˚˙¸˛¡¿ː∮∑∏¤℉‰◁◀▷▶♤♠♡♥♧♣⊙◈▣◐◑▒▤▥▨▧▦▩♨☏☎☜☞¶†‡↕↗↙↖↘♭♩♪♬㉿㈜№㏇™㏂㏘℡€®"], -["a341","쥱쥲쥳쥵",6,"쥽",10,"즊즋즍즎즏"], -["a361","즑",6,"즚즜즞",16], -["a381","즯",16,"짂짃짅짆짉짋",4,"짒짔짗짘짛!",58,"₩]",32," ̄"], -["a441","짞짟짡짣짥짦짨짩짪짫짮짲",5,"짺짻짽짾짿쨁쨂쨃쨄"], -["a461","쨅쨆쨇쨊쨎",5,"쨕쨖쨗쨙",12], -["a481","쨦쨧쨨쨪",28,"ㄱ",93], -["a541","쩇",4,"쩎쩏쩑쩒쩓쩕",6,"쩞쩢",5,"쩩쩪"], -["a561","쩫",17,"쩾",5,"쪅쪆"], -["a581","쪇",16,"쪙",14,"ⅰ",9], -["a5b0","Ⅰ",9], -["a5c1","Α",16,"Σ",6], -["a5e1","α",16,"σ",6], -["a641","쪨",19,"쪾쪿쫁쫂쫃쫅"], -["a661","쫆",5,"쫎쫐쫒쫔쫕쫖쫗쫚",5,"쫡",6], -["a681","쫨쫩쫪쫫쫭",6,"쫵",18,"쬉쬊─│┌┐┘└├┬┤┴┼━┃┏┓┛┗┣┳┫┻╋┠┯┨┷┿┝┰┥┸╂┒┑┚┙┖┕┎┍┞┟┡┢┦┧┩┪┭┮┱┲┵┶┹┺┽┾╀╁╃",7], -["a741","쬋",4,"쬑쬒쬓쬕쬖쬗쬙",6,"쬢",7], -["a761","쬪",22,"쭂쭃쭄"], -["a781","쭅쭆쭇쭊쭋쭍쭎쭏쭑",6,"쭚쭛쭜쭞",5,"쭥",7,"㎕㎖㎗ℓ㎘㏄㎣㎤㎥㎦㎙",9,"㏊㎍㎎㎏㏏㎈㎉㏈㎧㎨㎰",9,"㎀",4,"㎺",5,"㎐",4,"Ω㏀㏁㎊㎋㎌㏖㏅㎭㎮㎯㏛㎩㎪㎫㎬㏝㏐㏓㏃㏉㏜㏆"], -["a841","쭭",10,"쭺",14], -["a861","쮉",18,"쮝",6], -["a881","쮤",19,"쮹",11,"ÆÐªĦ"], -["a8a6","IJ"], -["a8a8","ĿŁØŒºÞŦŊ"], -["a8b1","㉠",27,"ⓐ",25,"①",14,"½⅓⅔¼¾⅛⅜⅝⅞"], -["a941","쯅",14,"쯕",10], -["a961","쯠쯡쯢쯣쯥쯦쯨쯪",18], -["a981","쯽",14,"찎찏찑찒찓찕",6,"찞찟찠찣찤æđðħıijĸŀłøœßþŧŋʼn㈀",27,"⒜",25,"⑴",14,"¹²³⁴ⁿ₁₂₃₄"], -["aa41","찥찦찪찫찭찯찱",6,"찺찿",4,"챆챇챉챊챋챍챎"], -["aa61","챏",4,"챖챚",5,"챡챢챣챥챧챩",6,"챱챲"], -["aa81","챳챴챶",29,"ぁ",82], -["ab41","첔첕첖첗첚첛첝첞첟첡",6,"첪첮",5,"첶첷첹"], -["ab61","첺첻첽",6,"쳆쳈쳊",5,"쳑쳒쳓쳕",5], -["ab81","쳛",8,"쳥",6,"쳭쳮쳯쳱",12,"ァ",85], -["ac41","쳾쳿촀촂",5,"촊촋촍촎촏촑",6,"촚촜촞촟촠"], -["ac61","촡촢촣촥촦촧촩촪촫촭",11,"촺",4], -["ac81","촿",28,"쵝쵞쵟А",5,"ЁЖ",25], -["acd1","а",5,"ёж",25], -["ad41","쵡쵢쵣쵥",6,"쵮쵰쵲",5,"쵹",7], -["ad61","춁",6,"춉",10,"춖춗춙춚춛춝춞춟"], -["ad81","춠춡춢춣춦춨춪",5,"춱",18,"췅"], -["ae41","췆",5,"췍췎췏췑",16], -["ae61","췢",5,"췩췪췫췭췮췯췱",6,"췺췼췾",4], -["ae81","츃츅츆츇츉츊츋츍",6,"츕츖츗츘츚",5,"츢츣츥츦츧츩츪츫"], -["af41","츬츭츮츯츲츴츶",19], -["af61","칊",13,"칚칛칝칞칢",5,"칪칬"], -["af81","칮",5,"칶칷칹칺칻칽",6,"캆캈캊",5,"캒캓캕캖캗캙"], -["b041","캚",5,"캢캦",5,"캮",12], -["b061","캻",5,"컂",19], -["b081","컖",13,"컦컧컩컪컭",6,"컶컺",5,"가각간갇갈갉갊감",7,"같",4,"갠갤갬갭갯갰갱갸갹갼걀걋걍걔걘걜거걱건걷걸걺검겁것겄겅겆겉겊겋게겐겔겜겝겟겠겡겨격겪견겯결겸겹겻겼경곁계곈곌곕곗고곡곤곧골곪곬곯곰곱곳공곶과곽관괄괆"], -["b141","켂켃켅켆켇켉",6,"켒켔켖",5,"켝켞켟켡켢켣"], -["b161","켥",6,"켮켲",5,"켹",11], -["b181","콅",14,"콖콗콙콚콛콝",6,"콦콨콪콫콬괌괍괏광괘괜괠괩괬괭괴괵괸괼굄굅굇굉교굔굘굡굣구국군굳굴굵굶굻굼굽굿궁궂궈궉권궐궜궝궤궷귀귁귄귈귐귑귓규균귤그극근귿글긁금급긋긍긔기긱긴긷길긺김깁깃깅깆깊까깍깎깐깔깖깜깝깟깠깡깥깨깩깬깰깸"], -["b241","콭콮콯콲콳콵콶콷콹",6,"쾁쾂쾃쾄쾆",5,"쾍"], -["b261","쾎",18,"쾢",5,"쾩"], -["b281","쾪",5,"쾱",18,"쿅",6,"깹깻깼깽꺄꺅꺌꺼꺽꺾껀껄껌껍껏껐껑께껙껜껨껫껭껴껸껼꼇꼈꼍꼐꼬꼭꼰꼲꼴꼼꼽꼿꽁꽂꽃꽈꽉꽐꽜꽝꽤꽥꽹꾀꾄꾈꾐꾑꾕꾜꾸꾹꾼꿀꿇꿈꿉꿋꿍꿎꿔꿜꿨꿩꿰꿱꿴꿸뀀뀁뀄뀌뀐뀔뀜뀝뀨끄끅끈끊끌끎끓끔끕끗끙"], -["b341","쿌",19,"쿢쿣쿥쿦쿧쿩"], -["b361","쿪",5,"쿲쿴쿶",5,"쿽쿾쿿퀁퀂퀃퀅",5], -["b381","퀋",5,"퀒",5,"퀙",19,"끝끼끽낀낄낌낍낏낑나낙낚난낟날낡낢남납낫",4,"낱낳내낵낸낼냄냅냇냈냉냐냑냔냘냠냥너넉넋넌널넒넓넘넙넛넜넝넣네넥넨넬넴넵넷넸넹녀녁년녈념녑녔녕녘녜녠노녹논놀놂놈놉놋농높놓놔놘놜놨뇌뇐뇔뇜뇝"], -["b441","퀮",5,"퀶퀷퀹퀺퀻퀽",6,"큆큈큊",5], -["b461","큑큒큓큕큖큗큙",6,"큡",10,"큮큯"], -["b481","큱큲큳큵",6,"큾큿킀킂",18,"뇟뇨뇩뇬뇰뇹뇻뇽누눅눈눋눌눔눕눗눙눠눴눼뉘뉜뉠뉨뉩뉴뉵뉼늄늅늉느늑는늘늙늚늠늡늣능늦늪늬늰늴니닉닌닐닒님닙닛닝닢다닥닦단닫",4,"닳담답닷",4,"닿대댁댄댈댐댑댓댔댕댜더덕덖던덛덜덞덟덤덥"], -["b541","킕",14,"킦킧킩킪킫킭",5], -["b561","킳킶킸킺",5,"탂탃탅탆탇탊",5,"탒탖",4], -["b581","탛탞탟탡탢탣탥",6,"탮탲",5,"탹",11,"덧덩덫덮데덱덴델뎀뎁뎃뎄뎅뎌뎐뎔뎠뎡뎨뎬도독돈돋돌돎돐돔돕돗동돛돝돠돤돨돼됐되된될됨됩됫됴두둑둔둘둠둡둣둥둬뒀뒈뒝뒤뒨뒬뒵뒷뒹듀듄듈듐듕드득든듣들듦듬듭듯등듸디딕딘딛딜딤딥딧딨딩딪따딱딴딸"], -["b641","턅",7,"턎",17], -["b661","턠",15,"턲턳턵턶턷턹턻턼턽턾"], -["b681","턿텂텆",5,"텎텏텑텒텓텕",6,"텞텠텢",5,"텩텪텫텭땀땁땃땄땅땋때땍땐땔땜땝땟땠땡떠떡떤떨떪떫떰떱떳떴떵떻떼떽뗀뗄뗌뗍뗏뗐뗑뗘뗬또똑똔똘똥똬똴뙈뙤뙨뚜뚝뚠뚤뚫뚬뚱뛔뛰뛴뛸뜀뜁뜅뜨뜩뜬뜯뜰뜸뜹뜻띄띈띌띔띕띠띤띨띰띱띳띵라락란랄람랍랏랐랑랒랖랗"], -["b741","텮",13,"텽",6,"톅톆톇톉톊"], -["b761","톋",20,"톢톣톥톦톧"], -["b781","톩",6,"톲톴톶톷톸톹톻톽톾톿퇁",14,"래랙랜랠램랩랫랬랭랴략랸럇량러럭런럴럼럽럿렀렁렇레렉렌렐렘렙렛렝려력련렬렴렵렷렸령례롄롑롓로록론롤롬롭롯롱롸롼뢍뢨뢰뢴뢸룀룁룃룅료룐룔룝룟룡루룩룬룰룸룹룻룽뤄뤘뤠뤼뤽륀륄륌륏륑류륙륜률륨륩"], -["b841","퇐",7,"퇙",17], -["b861","퇫",8,"퇵퇶퇷퇹",13], -["b881","툈툊",5,"툑",24,"륫륭르륵른를름릅릇릉릊릍릎리릭린릴림립릿링마막만많",4,"맘맙맛망맞맡맣매맥맨맬맴맵맷맸맹맺먀먁먈먕머먹먼멀멂멈멉멋멍멎멓메멕멘멜멤멥멧멨멩며멱면멸몃몄명몇몌모목몫몬몰몲몸몹못몽뫄뫈뫘뫙뫼"], -["b941","툪툫툮툯툱툲툳툵",6,"툾퉀퉂",5,"퉉퉊퉋퉌"], -["b961","퉍",14,"퉝",6,"퉥퉦퉧퉨"], -["b981","퉩",22,"튂튃튅튆튇튉튊튋튌묀묄묍묏묑묘묜묠묩묫무묵묶문묻물묽묾뭄뭅뭇뭉뭍뭏뭐뭔뭘뭡뭣뭬뮈뮌뮐뮤뮨뮬뮴뮷므믄믈믐믓미믹민믿밀밂밈밉밋밌밍및밑바",4,"받",4,"밤밥밧방밭배백밴밸뱀뱁뱃뱄뱅뱉뱌뱍뱐뱝버벅번벋벌벎범법벗"], -["ba41","튍튎튏튒튓튔튖",5,"튝튞튟튡튢튣튥",6,"튭"], -["ba61","튮튯튰튲",5,"튺튻튽튾틁틃",4,"틊틌",5], -["ba81","틒틓틕틖틗틙틚틛틝",6,"틦",9,"틲틳틵틶틷틹틺벙벚베벡벤벧벨벰벱벳벴벵벼벽변별볍볏볐병볕볘볜보복볶본볼봄봅봇봉봐봔봤봬뵀뵈뵉뵌뵐뵘뵙뵤뵨부북분붇불붉붊붐붑붓붕붙붚붜붤붰붸뷔뷕뷘뷜뷩뷰뷴뷸븀븃븅브븍븐블븜븝븟비빅빈빌빎빔빕빗빙빚빛빠빡빤"], -["bb41","틻",4,"팂팄팆",5,"팏팑팒팓팕팗",4,"팞팢팣"], -["bb61","팤팦팧팪팫팭팮팯팱",6,"팺팾",5,"퍆퍇퍈퍉"], -["bb81","퍊",31,"빨빪빰빱빳빴빵빻빼빽뺀뺄뺌뺍뺏뺐뺑뺘뺙뺨뻐뻑뻔뻗뻘뻠뻣뻤뻥뻬뼁뼈뼉뼘뼙뼛뼜뼝뽀뽁뽄뽈뽐뽑뽕뾔뾰뿅뿌뿍뿐뿔뿜뿟뿡쀼쁑쁘쁜쁠쁨쁩삐삑삔삘삠삡삣삥사삭삯산삳살삵삶삼삽삿샀상샅새색샌샐샘샙샛샜생샤"], -["bc41","퍪",17,"퍾퍿펁펂펃펅펆펇"], -["bc61","펈펉펊펋펎펒",5,"펚펛펝펞펟펡",6,"펪펬펮"], -["bc81","펯",4,"펵펶펷펹펺펻펽",6,"폆폇폊",5,"폑",5,"샥샨샬샴샵샷샹섀섄섈섐섕서",4,"섣설섦섧섬섭섯섰성섶세섹센셀셈셉셋셌셍셔셕션셜셤셥셧셨셩셰셴셸솅소속솎손솔솖솜솝솟송솥솨솩솬솰솽쇄쇈쇌쇔쇗쇘쇠쇤쇨쇰쇱쇳쇼쇽숀숄숌숍숏숑수숙순숟술숨숩숫숭"], -["bd41","폗폙",7,"폢폤",7,"폮폯폱폲폳폵폶폷"], -["bd61","폸폹폺폻폾퐀퐂",5,"퐉",13], -["bd81","퐗",5,"퐞",25,"숯숱숲숴쉈쉐쉑쉔쉘쉠쉥쉬쉭쉰쉴쉼쉽쉿슁슈슉슐슘슛슝스슥슨슬슭슴습슷승시식신싣실싫심십싯싱싶싸싹싻싼쌀쌈쌉쌌쌍쌓쌔쌕쌘쌜쌤쌥쌨쌩썅써썩썬썰썲썸썹썼썽쎄쎈쎌쏀쏘쏙쏜쏟쏠쏢쏨쏩쏭쏴쏵쏸쐈쐐쐤쐬쐰"], -["be41","퐸",7,"푁푂푃푅",14], -["be61","푔",7,"푝푞푟푡푢푣푥",7,"푮푰푱푲"], -["be81","푳",4,"푺푻푽푾풁풃",4,"풊풌풎",5,"풕",8,"쐴쐼쐽쑈쑤쑥쑨쑬쑴쑵쑹쒀쒔쒜쒸쒼쓩쓰쓱쓴쓸쓺쓿씀씁씌씐씔씜씨씩씬씰씸씹씻씽아악안앉않알앍앎앓암압앗았앙앝앞애액앤앨앰앱앳앴앵야약얀얄얇얌얍얏양얕얗얘얜얠얩어억언얹얻얼얽얾엄",6,"엌엎"], -["bf41","풞",10,"풪",14], -["bf61","풹",18,"퓍퓎퓏퓑퓒퓓퓕"], -["bf81","퓖",5,"퓝퓞퓠",7,"퓩퓪퓫퓭퓮퓯퓱",6,"퓹퓺퓼에엑엔엘엠엡엣엥여역엮연열엶엷염",5,"옅옆옇예옌옐옘옙옛옜오옥온올옭옮옰옳옴옵옷옹옻와왁완왈왐왑왓왔왕왜왝왠왬왯왱외왹왼욀욈욉욋욍요욕욘욜욤욥욧용우욱운울욹욺움웁웃웅워웍원월웜웝웠웡웨"], -["c041","퓾",5,"픅픆픇픉픊픋픍",6,"픖픘",5], -["c061","픞",25], -["c081","픸픹픺픻픾픿핁핂핃핅",6,"핎핐핒",5,"핚핛핝핞핟핡핢핣웩웬웰웸웹웽위윅윈윌윔윕윗윙유육윤율윰윱윳융윷으윽은을읊음읍읏응",7,"읜읠읨읫이익인일읽읾잃임입잇있잉잊잎자작잔잖잗잘잚잠잡잣잤장잦재잭잰잴잼잽잿쟀쟁쟈쟉쟌쟎쟐쟘쟝쟤쟨쟬저적전절젊"], -["c141","핤핦핧핪핬핮",5,"핶핷핹핺핻핽",6,"햆햊햋"], -["c161","햌햍햎햏햑",19,"햦햧"], -["c181","햨",31,"점접젓정젖제젝젠젤젬젭젯젱져젼졀졈졉졌졍졔조족존졸졺좀좁좃종좆좇좋좌좍좔좝좟좡좨좼좽죄죈죌죔죕죗죙죠죡죤죵주죽준줄줅줆줌줍줏중줘줬줴쥐쥑쥔쥘쥠쥡쥣쥬쥰쥴쥼즈즉즌즐즘즙즛증지직진짇질짊짐집짓"], -["c241","헊헋헍헎헏헑헓",4,"헚헜헞",5,"헦헧헩헪헫헭헮"], -["c261","헯",4,"헶헸헺",5,"혂혃혅혆혇혉",6,"혒"], -["c281","혖",5,"혝혞혟혡혢혣혥",7,"혮",9,"혺혻징짖짙짚짜짝짠짢짤짧짬짭짯짰짱째짹짼쨀쨈쨉쨋쨌쨍쨔쨘쨩쩌쩍쩐쩔쩜쩝쩟쩠쩡쩨쩽쪄쪘쪼쪽쫀쫄쫌쫍쫏쫑쫓쫘쫙쫠쫬쫴쬈쬐쬔쬘쬠쬡쭁쭈쭉쭌쭐쭘쭙쭝쭤쭸쭹쮜쮸쯔쯤쯧쯩찌찍찐찔찜찝찡찢찧차착찬찮찰참찹찻"], -["c341","혽혾혿홁홂홃홄홆홇홊홌홎홏홐홒홓홖홗홙홚홛홝",4], -["c361","홢",4,"홨홪",5,"홲홳홵",11], -["c381","횁횂횄횆",5,"횎횏횑횒횓횕",7,"횞횠횢",5,"횩횪찼창찾채책챈챌챔챕챗챘챙챠챤챦챨챰챵처척천철첨첩첫첬청체첵첸첼쳄쳅쳇쳉쳐쳔쳤쳬쳰촁초촉촌촐촘촙촛총촤촨촬촹최쵠쵤쵬쵭쵯쵱쵸춈추축춘출춤춥춧충춰췄췌췐취췬췰췸췹췻췽츄츈츌츔츙츠측츤츨츰츱츳층"], -["c441","횫횭횮횯횱",7,"횺횼",7,"훆훇훉훊훋"], -["c461","훍훎훏훐훒훓훕훖훘훚",5,"훡훢훣훥훦훧훩",4], -["c481","훮훯훱훲훳훴훶",5,"훾훿휁휂휃휅",11,"휒휓휔치칙친칟칠칡침칩칫칭카칵칸칼캄캅캇캉캐캑캔캘캠캡캣캤캥캬캭컁커컥컨컫컬컴컵컷컸컹케켁켄켈켐켑켓켕켜켠켤켬켭켯켰켱켸코콕콘콜콤콥콧콩콰콱콴콸쾀쾅쾌쾡쾨쾰쿄쿠쿡쿤쿨쿰쿱쿳쿵쿼퀀퀄퀑퀘퀭퀴퀵퀸퀼"], -["c541","휕휖휗휚휛휝휞휟휡",6,"휪휬휮",5,"휶휷휹"], -["c561","휺휻휽",6,"흅흆흈흊",5,"흒흓흕흚",4], -["c581","흟흢흤흦흧흨흪흫흭흮흯흱흲흳흵",6,"흾흿힀힂",5,"힊힋큄큅큇큉큐큔큘큠크큭큰클큼큽킁키킥킨킬킴킵킷킹타탁탄탈탉탐탑탓탔탕태택탠탤탬탭탯탰탱탸턍터턱턴털턺텀텁텃텄텅테텍텐텔템텝텟텡텨텬텼톄톈토톡톤톨톰톱톳통톺톼퇀퇘퇴퇸툇툉툐투툭툰툴툼툽툿퉁퉈퉜"], -["c641","힍힎힏힑",6,"힚힜힞",5], -["c6a1","퉤튀튁튄튈튐튑튕튜튠튤튬튱트특튼튿틀틂틈틉틋틔틘틜틤틥티틱틴틸팀팁팃팅파팍팎판팔팖팜팝팟팠팡팥패팩팬팰팸팹팻팼팽퍄퍅퍼퍽펀펄펌펍펏펐펑페펙펜펠펨펩펫펭펴편펼폄폅폈평폐폘폡폣포폭폰폴폼폽폿퐁"], -["c7a1","퐈퐝푀푄표푠푤푭푯푸푹푼푿풀풂품풉풋풍풔풩퓌퓐퓔퓜퓟퓨퓬퓰퓸퓻퓽프픈플픔픕픗피픽핀필핌핍핏핑하학한할핥함합핫항해핵핸핼햄햅햇했행햐향허헉헌헐헒험헙헛헝헤헥헨헬헴헵헷헹혀혁현혈혐협혓혔형혜혠"], -["c8a1","혤혭호혹혼홀홅홈홉홋홍홑화확환활홧황홰홱홴횃횅회획횐횔횝횟횡효횬횰횹횻후훅훈훌훑훔훗훙훠훤훨훰훵훼훽휀휄휑휘휙휜휠휨휩휫휭휴휵휸휼흄흇흉흐흑흔흖흗흘흙흠흡흣흥흩희흰흴흼흽힁히힉힌힐힘힙힛힝"], -["caa1","伽佳假價加可呵哥嘉嫁家暇架枷柯歌珂痂稼苛茄街袈訶賈跏軻迦駕刻却各恪慤殼珏脚覺角閣侃刊墾奸姦干幹懇揀杆柬桿澗癎看磵稈竿簡肝艮艱諫間乫喝曷渴碣竭葛褐蝎鞨勘坎堪嵌感憾戡敢柑橄減甘疳監瞰紺邯鑑鑒龕"], -["cba1","匣岬甲胛鉀閘剛堈姜岡崗康强彊慷江畺疆糠絳綱羌腔舡薑襁講鋼降鱇介价個凱塏愷愾慨改槪漑疥皆盖箇芥蓋豈鎧開喀客坑更粳羹醵倨去居巨拒据據擧渠炬祛距踞車遽鉅鋸乾件健巾建愆楗腱虔蹇鍵騫乞傑杰桀儉劍劒檢"], -["cca1","瞼鈐黔劫怯迲偈憩揭擊格檄激膈覡隔堅牽犬甄絹繭肩見譴遣鵑抉決潔結缺訣兼慊箝謙鉗鎌京俓倞傾儆勁勍卿坰境庚徑慶憬擎敬景暻更梗涇炅烱璟璥瓊痙硬磬竟競絅經耕耿脛莖警輕逕鏡頃頸驚鯨係啓堺契季屆悸戒桂械"], -["cda1","棨溪界癸磎稽系繫繼計誡谿階鷄古叩告呱固姑孤尻庫拷攷故敲暠枯槁沽痼皐睾稿羔考股膏苦苽菰藁蠱袴誥賈辜錮雇顧高鼓哭斛曲梏穀谷鵠困坤崑昆梱棍滾琨袞鯤汨滑骨供公共功孔工恐恭拱控攻珙空蚣貢鞏串寡戈果瓜"], -["cea1","科菓誇課跨過鍋顆廓槨藿郭串冠官寬慣棺款灌琯瓘管罐菅觀貫關館刮恝括适侊光匡壙廣曠洸炚狂珖筐胱鑛卦掛罫乖傀塊壞怪愧拐槐魁宏紘肱轟交僑咬喬嬌嶠巧攪敎校橋狡皎矯絞翹膠蕎蛟較轎郊餃驕鮫丘久九仇俱具勾"], -["cfa1","區口句咎嘔坵垢寇嶇廐懼拘救枸柩構歐毆毬求溝灸狗玖球瞿矩究絿耉臼舅舊苟衢謳購軀逑邱鉤銶駒驅鳩鷗龜國局菊鞠鞫麴君窘群裙軍郡堀屈掘窟宮弓穹窮芎躬倦券勸卷圈拳捲權淃眷厥獗蕨蹶闕机櫃潰詭軌饋句晷歸貴"], -["d0a1","鬼龜叫圭奎揆槻珪硅窺竅糾葵規赳逵閨勻均畇筠菌鈞龜橘克剋劇戟棘極隙僅劤勤懃斤根槿瑾筋芹菫覲謹近饉契今妗擒昑檎琴禁禽芩衾衿襟金錦伋及急扱汲級給亘兢矜肯企伎其冀嗜器圻基埼夔奇妓寄岐崎己幾忌技旗旣"], -["d1a1","朞期杞棋棄機欺氣汽沂淇玘琦琪璂璣畸畿碁磯祁祇祈祺箕紀綺羈耆耭肌記譏豈起錡錤飢饑騎騏驥麒緊佶吉拮桔金喫儺喇奈娜懦懶拏拿癩",5,"那樂",4,"諾酪駱亂卵暖欄煖爛蘭難鸞捏捺南嵐枏楠湳濫男藍襤拉"], -["d2a1","納臘蠟衲囊娘廊",4,"乃來內奈柰耐冷女年撚秊念恬拈捻寧寗努勞奴弩怒擄櫓爐瑙盧",5,"駑魯",10,"濃籠聾膿農惱牢磊腦賂雷尿壘",7,"嫩訥杻紐勒",5,"能菱陵尼泥匿溺多茶"], -["d3a1","丹亶但單團壇彖斷旦檀段湍短端簞緞蛋袒鄲鍛撻澾獺疸達啖坍憺擔曇淡湛潭澹痰聃膽蕁覃談譚錟沓畓答踏遝唐堂塘幢戇撞棠當糖螳黨代垈坮大對岱帶待戴擡玳臺袋貸隊黛宅德悳倒刀到圖堵塗導屠島嶋度徒悼挑掉搗桃"], -["d4a1","棹櫂淘渡滔濤燾盜睹禱稻萄覩賭跳蹈逃途道都鍍陶韜毒瀆牘犢獨督禿篤纛讀墩惇敦旽暾沌焞燉豚頓乭突仝冬凍動同憧東桐棟洞潼疼瞳童胴董銅兜斗杜枓痘竇荳讀豆逗頭屯臀芚遁遯鈍得嶝橙燈登等藤謄鄧騰喇懶拏癩羅"], -["d5a1","蘿螺裸邏樂洛烙珞絡落諾酪駱丹亂卵欄欒瀾爛蘭鸞剌辣嵐擥攬欖濫籃纜藍襤覽拉臘蠟廊朗浪狼琅瑯螂郞來崍徠萊冷掠略亮倆兩凉梁樑粮粱糧良諒輛量侶儷勵呂廬慮戾旅櫚濾礪藜蠣閭驢驪麗黎力曆歷瀝礫轢靂憐戀攣漣"], -["d6a1","煉璉練聯蓮輦連鍊冽列劣洌烈裂廉斂殮濂簾獵令伶囹寧岺嶺怜玲笭羚翎聆逞鈴零靈領齡例澧禮醴隷勞怒撈擄櫓潞瀘爐盧老蘆虜路輅露魯鷺鹵碌祿綠菉錄鹿麓論壟弄朧瀧瓏籠聾儡瀨牢磊賂賚賴雷了僚寮廖料燎療瞭聊蓼"], -["d7a1","遼鬧龍壘婁屢樓淚漏瘻累縷蔞褸鏤陋劉旒柳榴流溜瀏琉瑠留瘤硫謬類六戮陸侖倫崙淪綸輪律慄栗率隆勒肋凜凌楞稜綾菱陵俚利厘吏唎履悧李梨浬犁狸理璃異痢籬罹羸莉裏裡里釐離鯉吝潾燐璘藺躪隣鱗麟林淋琳臨霖砬"], -["d8a1","立笠粒摩瑪痲碼磨馬魔麻寞幕漠膜莫邈万卍娩巒彎慢挽晩曼滿漫灣瞞萬蔓蠻輓饅鰻唜抹末沫茉襪靺亡妄忘忙望網罔芒茫莽輞邙埋妹媒寐昧枚梅每煤罵買賣邁魅脈貊陌驀麥孟氓猛盲盟萌冪覓免冕勉棉沔眄眠綿緬面麵滅"], -["d9a1","蔑冥名命明暝椧溟皿瞑茗蓂螟酩銘鳴袂侮冒募姆帽慕摸摹暮某模母毛牟牡瑁眸矛耗芼茅謀謨貌木沐牧目睦穆鶩歿沒夢朦蒙卯墓妙廟描昴杳渺猫竗苗錨務巫憮懋戊拇撫无楙武毋無珷畝繆舞茂蕪誣貿霧鵡墨默們刎吻問文"], -["daa1","汶紊紋聞蚊門雯勿沕物味媚尾嵋彌微未梶楣渼湄眉米美薇謎迷靡黴岷悶愍憫敏旻旼民泯玟珉緡閔密蜜謐剝博拍搏撲朴樸泊珀璞箔粕縛膊舶薄迫雹駁伴半反叛拌搬攀斑槃泮潘班畔瘢盤盼磐磻礬絆般蟠返頒飯勃拔撥渤潑"], -["dba1","發跋醱鉢髮魃倣傍坊妨尨幇彷房放方旁昉枋榜滂磅紡肪膀舫芳蒡蚌訪謗邦防龐倍俳北培徘拜排杯湃焙盃背胚裴裵褙賠輩配陪伯佰帛柏栢白百魄幡樊煩燔番磻繁蕃藩飜伐筏罰閥凡帆梵氾汎泛犯範范法琺僻劈壁擘檗璧癖"], -["dca1","碧蘗闢霹便卞弁變辨辯邊別瞥鱉鼈丙倂兵屛幷昞昺柄棅炳甁病秉竝輧餠騈保堡報寶普步洑湺潽珤甫菩補褓譜輔伏僕匐卜宓復服福腹茯蔔複覆輹輻馥鰒本乶俸奉封峯峰捧棒烽熢琫縫蓬蜂逢鋒鳳不付俯傅剖副否咐埠夫婦"], -["dda1","孚孵富府復扶敷斧浮溥父符簿缶腐腑膚艀芙莩訃負賦賻赴趺部釜阜附駙鳧北分吩噴墳奔奮忿憤扮昐汾焚盆粉糞紛芬賁雰不佛弗彿拂崩朋棚硼繃鵬丕備匕匪卑妃婢庇悲憊扉批斐枇榧比毖毗毘沸泌琵痺砒碑秕秘粃緋翡肥"], -["dea1","脾臂菲蜚裨誹譬費鄙非飛鼻嚬嬪彬斌檳殯浜濱瀕牝玭貧賓頻憑氷聘騁乍事些仕伺似使俟僿史司唆嗣四士奢娑寫寺射巳師徙思捨斜斯柶査梭死沙泗渣瀉獅砂社祀祠私篩紗絲肆舍莎蓑蛇裟詐詞謝賜赦辭邪飼駟麝削數朔索"], -["dfa1","傘刪山散汕珊産疝算蒜酸霰乷撒殺煞薩三參杉森渗芟蔘衫揷澁鈒颯上傷像償商喪嘗孀尙峠常床庠廂想桑橡湘爽牀狀相祥箱翔裳觴詳象賞霜塞璽賽嗇塞穡索色牲生甥省笙墅壻嶼序庶徐恕抒捿敍暑曙書栖棲犀瑞筮絮緖署"], -["e0a1","胥舒薯西誓逝鋤黍鼠夕奭席惜昔晳析汐淅潟石碩蓆釋錫仙僊先善嬋宣扇敾旋渲煽琁瑄璇璿癬禪線繕羨腺膳船蘚蟬詵跣選銑鐥饍鮮卨屑楔泄洩渫舌薛褻設說雪齧剡暹殲纖蟾贍閃陝攝涉燮葉城姓宬性惺成星晟猩珹盛省筬"], -["e1a1","聖聲腥誠醒世勢歲洗稅笹細說貰召嘯塑宵小少巢所掃搔昭梳沼消溯瀟炤燒甦疏疎瘙笑篠簫素紹蔬蕭蘇訴逍遡邵銷韶騷俗屬束涑粟續謖贖速孫巽損蓀遜飡率宋悚松淞訟誦送頌刷殺灑碎鎖衰釗修受嗽囚垂壽嫂守岫峀帥愁"], -["e2a1","戍手授搜收數樹殊水洙漱燧狩獸琇璲瘦睡秀穗竪粹綏綬繡羞脩茱蒐蓚藪袖誰讐輸遂邃酬銖銹隋隧隨雖需須首髓鬚叔塾夙孰宿淑潚熟琡璹肅菽巡徇循恂旬栒楯橓殉洵淳珣盾瞬筍純脣舜荀蓴蕣詢諄醇錞順馴戌術述鉥崇崧"], -["e3a1","嵩瑟膝蝨濕拾習褶襲丞乘僧勝升承昇繩蠅陞侍匙嘶始媤尸屎屍市弑恃施是時枾柴猜矢示翅蒔蓍視試詩諡豕豺埴寔式息拭植殖湜熄篒蝕識軾食飾伸侁信呻娠宸愼新晨燼申神紳腎臣莘薪藎蜃訊身辛辰迅失室實悉審尋心沁"], -["e4a1","沈深瀋甚芯諶什十拾雙氏亞俄兒啞娥峨我牙芽莪蛾衙訝阿雅餓鴉鵝堊岳嶽幄惡愕握樂渥鄂鍔顎鰐齷安岸按晏案眼雁鞍顔鮟斡謁軋閼唵岩巖庵暗癌菴闇壓押狎鴨仰央怏昻殃秧鴦厓哀埃崖愛曖涯碍艾隘靄厄扼掖液縊腋額"], -["e5a1","櫻罌鶯鸚也倻冶夜惹揶椰爺耶若野弱掠略約若葯蒻藥躍亮佯兩凉壤孃恙揚攘敭暘梁楊樣洋瀁煬痒瘍禳穰糧羊良襄諒讓釀陽量養圄御於漁瘀禦語馭魚齬億憶抑檍臆偃堰彦焉言諺孼蘖俺儼嚴奄掩淹嶪業円予余勵呂女如廬"], -["e6a1","旅歟汝濾璵礖礪與艅茹輿轝閭餘驪麗黎亦力域役易曆歷疫繹譯轢逆驛嚥堧姸娟宴年延憐戀捐挻撚椽沇沿涎涓淵演漣烟然煙煉燃燕璉硏硯秊筵緣練縯聯衍軟輦蓮連鉛鍊鳶列劣咽悅涅烈熱裂說閱厭廉念捻染殮炎焰琰艶苒"], -["e7a1","簾閻髥鹽曄獵燁葉令囹塋寧嶺嶸影怜映暎楹榮永泳渶潁濚瀛瀯煐營獰玲瑛瑩瓔盈穎纓羚聆英詠迎鈴鍈零霙靈領乂倪例刈叡曳汭濊猊睿穢芮藝蘂禮裔詣譽豫醴銳隸霓預五伍俉傲午吾吳嗚塢墺奧娛寤悟惡懊敖旿晤梧汚澳"], -["e8a1","烏熬獒筽蜈誤鰲鼇屋沃獄玉鈺溫瑥瘟穩縕蘊兀壅擁瓮甕癰翁邕雍饔渦瓦窩窪臥蛙蝸訛婉完宛梡椀浣玩琓琬碗緩翫脘腕莞豌阮頑曰往旺枉汪王倭娃歪矮外嵬巍猥畏了僚僥凹堯夭妖姚寥寮尿嶢拗搖撓擾料曜樂橈燎燿瑤療"], -["e9a1","窈窯繇繞耀腰蓼蟯要謠遙遼邀饒慾欲浴縟褥辱俑傭冗勇埇墉容庸慂榕涌湧溶熔瑢用甬聳茸蓉踊鎔鏞龍于佑偶優又友右宇寓尤愚憂旴牛玗瑀盂祐禑禹紆羽芋藕虞迂遇郵釪隅雨雩勖彧旭昱栯煜稶郁頊云暈橒殞澐熉耘芸蕓"], -["eaa1","運隕雲韻蔚鬱亐熊雄元原員圓園垣媛嫄寃怨愿援沅洹湲源爰猿瑗苑袁轅遠阮院願鴛月越鉞位偉僞危圍委威尉慰暐渭爲瑋緯胃萎葦蔿蝟衛褘謂違韋魏乳侑儒兪劉唯喩孺宥幼幽庾悠惟愈愉揄攸有杻柔柚柳楡楢油洧流游溜"], -["eba1","濡猶猷琉瑜由留癒硫紐維臾萸裕誘諛諭踰蹂遊逾遺酉釉鍮類六堉戮毓肉育陸倫允奫尹崙淪潤玧胤贇輪鈗閏律慄栗率聿戎瀜絨融隆垠恩慇殷誾銀隱乙吟淫蔭陰音飮揖泣邑凝應膺鷹依倚儀宜意懿擬椅毅疑矣義艤薏蟻衣誼"], -["eca1","議醫二以伊利吏夷姨履已弛彛怡易李梨泥爾珥理異痍痢移罹而耳肄苡荑裏裡貽貳邇里離飴餌匿溺瀷益翊翌翼謚人仁刃印吝咽因姻寅引忍湮燐璘絪茵藺蚓認隣靭靷鱗麟一佚佾壹日溢逸鎰馹任壬妊姙恁林淋稔臨荏賃入卄"], -["eda1","立笠粒仍剩孕芿仔刺咨姉姿子字孜恣慈滋炙煮玆瓷疵磁紫者自茨蔗藉諮資雌作勺嚼斫昨灼炸爵綽芍酌雀鵲孱棧殘潺盞岑暫潛箴簪蠶雜丈仗匠場墻壯奬將帳庄張掌暲杖樟檣欌漿牆狀獐璋章粧腸臟臧莊葬蔣薔藏裝贓醬長"], -["eea1","障再哉在宰才材栽梓渽滓災縡裁財載齋齎爭箏諍錚佇低儲咀姐底抵杵楮樗沮渚狙猪疽箸紵苧菹著藷詛貯躇這邸雎齟勣吊嫡寂摘敵滴狄炙的積笛籍績翟荻謫賊赤跡蹟迪迹適鏑佃佺傳全典前剪塡塼奠專展廛悛戰栓殿氈澱"], -["efa1","煎琠田甸畑癲筌箋箭篆纏詮輾轉鈿銓錢鐫電顚顫餞切截折浙癤竊節絶占岾店漸点粘霑鮎點接摺蝶丁井亭停偵呈姃定幀庭廷征情挺政整旌晶晸柾楨檉正汀淀淨渟湞瀞炡玎珽町睛碇禎程穽精綎艇訂諪貞鄭酊釘鉦鋌錠霆靖"], -["f0a1","靜頂鼎制劑啼堤帝弟悌提梯濟祭第臍薺製諸蹄醍除際霽題齊俎兆凋助嘲弔彫措操早晁曺曹朝條棗槽漕潮照燥爪璪眺祖祚租稠窕粗糟組繰肇藻蚤詔調趙躁造遭釣阻雕鳥族簇足鏃存尊卒拙猝倧宗從悰慫棕淙琮種終綜縱腫"], -["f1a1","踪踵鍾鐘佐坐左座挫罪主住侏做姝胄呪周嗾奏宙州廚晝朱柱株注洲湊澍炷珠疇籌紂紬綢舟蛛註誅走躊輳週酎酒鑄駐竹粥俊儁准埈寯峻晙樽浚準濬焌畯竣蠢逡遵雋駿茁中仲衆重卽櫛楫汁葺增憎曾拯烝甑症繒蒸證贈之只"], -["f2a1","咫地址志持指摯支旨智枝枳止池沚漬知砥祉祗紙肢脂至芝芷蜘誌識贄趾遲直稙稷織職唇嗔塵振搢晉晋桭榛殄津溱珍瑨璡畛疹盡眞瞋秦縉縝臻蔯袗診賑軫辰進鎭陣陳震侄叱姪嫉帙桎瓆疾秩窒膣蛭質跌迭斟朕什執潗緝輯"], -["f3a1","鏶集徵懲澄且侘借叉嗟嵯差次此磋箚茶蹉車遮捉搾着窄錯鑿齪撰澯燦璨瓚竄簒纂粲纘讚贊鑽餐饌刹察擦札紮僭參塹慘慙懺斬站讒讖倉倡創唱娼廠彰愴敞昌昶暢槍滄漲猖瘡窓脹艙菖蒼債埰寀寨彩採砦綵菜蔡采釵冊柵策"], -["f4a1","責凄妻悽處倜刺剔尺慽戚拓擲斥滌瘠脊蹠陟隻仟千喘天川擅泉淺玔穿舛薦賤踐遷釧闡阡韆凸哲喆徹撤澈綴輟轍鐵僉尖沾添甛瞻簽籤詹諂堞妾帖捷牒疊睫諜貼輒廳晴淸聽菁請靑鯖切剃替涕滯締諦逮遞體初剿哨憔抄招梢"], -["f5a1","椒楚樵炒焦硝礁礎秒稍肖艸苕草蕉貂超酢醋醮促囑燭矗蜀觸寸忖村邨叢塚寵悤憁摠總聰蔥銃撮催崔最墜抽推椎楸樞湫皺秋芻萩諏趨追鄒酋醜錐錘鎚雛騶鰍丑畜祝竺筑築縮蓄蹙蹴軸逐春椿瑃出朮黜充忠沖蟲衝衷悴膵萃"], -["f6a1","贅取吹嘴娶就炊翠聚脆臭趣醉驟鷲側仄厠惻測層侈値嗤峙幟恥梔治淄熾痔痴癡稚穉緇緻置致蚩輜雉馳齒則勅飭親七柒漆侵寢枕沈浸琛砧針鍼蟄秤稱快他咤唾墮妥惰打拖朶楕舵陀馱駝倬卓啄坼度托拓擢晫柝濁濯琢琸託"], -["f7a1","鐸呑嘆坦彈憚歎灘炭綻誕奪脫探眈耽貪塔搭榻宕帑湯糖蕩兌台太怠態殆汰泰笞胎苔跆邰颱宅擇澤撑攄兎吐土討慟桶洞痛筒統通堆槌腿褪退頹偸套妬投透鬪慝特闖坡婆巴把播擺杷波派爬琶破罷芭跛頗判坂板版瓣販辦鈑"], -["f8a1","阪八叭捌佩唄悖敗沛浿牌狽稗覇貝彭澎烹膨愎便偏扁片篇編翩遍鞭騙貶坪平枰萍評吠嬖幣廢弊斃肺蔽閉陛佈包匍匏咆哺圃布怖抛抱捕暴泡浦疱砲胞脯苞葡蒲袍褒逋鋪飽鮑幅暴曝瀑爆輻俵剽彪慓杓標漂瓢票表豹飇飄驃"], -["f9a1","品稟楓諷豊風馮彼披疲皮被避陂匹弼必泌珌畢疋筆苾馝乏逼下何厦夏廈昰河瑕荷蝦賀遐霞鰕壑學虐謔鶴寒恨悍旱汗漢澣瀚罕翰閑閒限韓割轄函含咸啣喊檻涵緘艦銜陷鹹合哈盒蛤閤闔陜亢伉姮嫦巷恒抗杭桁沆港缸肛航"], -["faa1","行降項亥偕咳垓奚孩害懈楷海瀣蟹解該諧邂駭骸劾核倖幸杏荇行享向嚮珦鄕響餉饗香噓墟虛許憲櫶獻軒歇險驗奕爀赫革俔峴弦懸晛泫炫玄玹現眩睍絃絢縣舷衒見賢鉉顯孑穴血頁嫌俠協夾峽挾浹狹脅脇莢鋏頰亨兄刑型"], -["fba1","形泂滎瀅灐炯熒珩瑩荊螢衡逈邢鎣馨兮彗惠慧暳蕙蹊醯鞋乎互呼壕壺好岵弧戶扈昊晧毫浩淏湖滸澔濠濩灝狐琥瑚瓠皓祜糊縞胡芦葫蒿虎號蝴護豪鎬頀顥惑或酷婚昏混渾琿魂忽惚笏哄弘汞泓洪烘紅虹訌鴻化和嬅樺火畵"], -["fca1","禍禾花華話譁貨靴廓擴攫確碻穫丸喚奐宦幻患換歡晥桓渙煥環紈還驩鰥活滑猾豁闊凰幌徨恍惶愰慌晃晄榥況湟滉潢煌璜皇篁簧荒蝗遑隍黃匯回廻徊恢悔懷晦會檜淮澮灰獪繪膾茴蛔誨賄劃獲宖橫鐄哮嚆孝效斅曉梟涍淆"], -["fda1","爻肴酵驍侯候厚后吼喉嗅帿後朽煦珝逅勛勳塤壎焄熏燻薰訓暈薨喧暄煊萱卉喙毁彙徽揮暉煇諱輝麾休携烋畦虧恤譎鷸兇凶匈洶胸黑昕欣炘痕吃屹紇訖欠欽歆吸恰洽翕興僖凞喜噫囍姬嬉希憙憘戱晞曦熙熹熺犧禧稀羲詰"] -] diff --git a/node_modules/whatwg-encoding/node_modules/iconv-lite/encodings/tables/cp950.json b/node_modules/whatwg-encoding/node_modules/iconv-lite/encodings/tables/cp950.json deleted file mode 100644 index d8bc871..0000000 --- a/node_modules/whatwg-encoding/node_modules/iconv-lite/encodings/tables/cp950.json +++ /dev/null @@ -1,177 +0,0 @@ -[ -["0","\u0000",127], -["a140"," ,、。.‧;:?!︰…‥﹐﹑﹒·﹔﹕﹖﹗|–︱—︳╴︴﹏()︵︶{}︷︸〔〕︹︺【】︻︼《》︽︾〈〉︿﹀「」﹁﹂『』﹃﹄﹙﹚"], -["a1a1","﹛﹜﹝﹞‘’“”〝〞‵′#&*※§〃○●△▲◎☆★◇◆□■▽▼㊣℅¯ ̄_ˍ﹉﹊﹍﹎﹋﹌﹟﹠﹡+-×÷±√<>=≦≧≠∞≒≡﹢",4,"~∩∪⊥∠∟⊿㏒㏑∫∮∵∴♀♂⊕⊙↑↓←→↖↗↙↘∥∣/"], -["a240","\∕﹨$¥〒¢£%@℃℉﹩﹪﹫㏕㎜㎝㎞㏎㎡㎎㎏㏄°兙兛兞兝兡兣嗧瓩糎▁",7,"▏▎▍▌▋▊▉┼┴┬┤├▔─│▕┌┐└┘╭"], -["a2a1","╮╰╯═╞╪╡◢◣◥◤╱╲╳0",9,"Ⅰ",9,"〡",8,"十卄卅A",25,"a",21], -["a340","wxyzΑ",16,"Σ",6,"α",16,"σ",6,"ㄅ",10], -["a3a1","ㄐ",25,"˙ˉˊˇˋ"], -["a3e1","€"], -["a440","一乙丁七乃九了二人儿入八几刀刁力匕十卜又三下丈上丫丸凡久么也乞于亡兀刃勺千叉口土士夕大女子孑孓寸小尢尸山川工己已巳巾干廾弋弓才"], -["a4a1","丑丐不中丰丹之尹予云井互五亢仁什仃仆仇仍今介仄元允內六兮公冗凶分切刈勻勾勿化匹午升卅卞厄友及反壬天夫太夭孔少尤尺屯巴幻廿弔引心戈戶手扎支文斗斤方日曰月木欠止歹毋比毛氏水火爪父爻片牙牛犬王丙"], -["a540","世丕且丘主乍乏乎以付仔仕他仗代令仙仞充兄冉冊冬凹出凸刊加功包匆北匝仟半卉卡占卯卮去可古右召叮叩叨叼司叵叫另只史叱台句叭叻四囚外"], -["a5a1","央失奴奶孕它尼巨巧左市布平幼弁弘弗必戊打扔扒扑斥旦朮本未末札正母民氐永汁汀氾犯玄玉瓜瓦甘生用甩田由甲申疋白皮皿目矛矢石示禾穴立丞丟乒乓乩亙交亦亥仿伉伙伊伕伍伐休伏仲件任仰仳份企伋光兇兆先全"], -["a640","共再冰列刑划刎刖劣匈匡匠印危吉吏同吊吐吁吋各向名合吃后吆吒因回囝圳地在圭圬圯圩夙多夷夸妄奸妃好她如妁字存宇守宅安寺尖屹州帆并年"], -["a6a1","式弛忙忖戎戌戍成扣扛托收早旨旬旭曲曳有朽朴朱朵次此死氖汝汗汙江池汐汕污汛汍汎灰牟牝百竹米糸缶羊羽老考而耒耳聿肉肋肌臣自至臼舌舛舟艮色艾虫血行衣西阡串亨位住佇佗佞伴佛何估佐佑伽伺伸佃佔似但佣"], -["a740","作你伯低伶余佝佈佚兌克免兵冶冷別判利刪刨劫助努劬匣即卵吝吭吞吾否呎吧呆呃吳呈呂君吩告吹吻吸吮吵吶吠吼呀吱含吟听囪困囤囫坊坑址坍"], -["a7a1","均坎圾坐坏圻壯夾妝妒妨妞妣妙妖妍妤妓妊妥孝孜孚孛完宋宏尬局屁尿尾岐岑岔岌巫希序庇床廷弄弟彤形彷役忘忌志忍忱快忸忪戒我抄抗抖技扶抉扭把扼找批扳抒扯折扮投抓抑抆改攻攸旱更束李杏材村杜杖杞杉杆杠"], -["a840","杓杗步每求汞沙沁沈沉沅沛汪決沐汰沌汨沖沒汽沃汲汾汴沆汶沍沔沘沂灶灼災灸牢牡牠狄狂玖甬甫男甸皂盯矣私秀禿究系罕肖肓肝肘肛肚育良芒"], -["a8a1","芋芍見角言谷豆豕貝赤走足身車辛辰迂迆迅迄巡邑邢邪邦那酉釆里防阮阱阪阬並乖乳事些亞享京佯依侍佳使佬供例來侃佰併侈佩佻侖佾侏侑佺兔兒兕兩具其典冽函刻券刷刺到刮制剁劾劻卒協卓卑卦卷卸卹取叔受味呵"], -["a940","咖呸咕咀呻呷咄咒咆呼咐呱呶和咚呢周咋命咎固垃坷坪坩坡坦坤坼夜奉奇奈奄奔妾妻委妹妮姑姆姐姍始姓姊妯妳姒姅孟孤季宗定官宜宙宛尚屈居"], -["a9a1","屆岷岡岸岩岫岱岳帘帚帖帕帛帑幸庚店府底庖延弦弧弩往征彿彼忝忠忽念忿怏怔怯怵怖怪怕怡性怩怫怛或戕房戾所承拉拌拄抿拂抹拒招披拓拔拋拈抨抽押拐拙拇拍抵拚抱拘拖拗拆抬拎放斧於旺昔易昌昆昂明昀昏昕昊"], -["aa40","昇服朋杭枋枕東果杳杷枇枝林杯杰板枉松析杵枚枓杼杪杲欣武歧歿氓氛泣注泳沱泌泥河沽沾沼波沫法泓沸泄油況沮泗泅泱沿治泡泛泊沬泯泜泖泠"], -["aaa1","炕炎炒炊炙爬爭爸版牧物狀狎狙狗狐玩玨玟玫玥甽疝疙疚的盂盲直知矽社祀祁秉秈空穹竺糾罔羌羋者肺肥肢肱股肫肩肴肪肯臥臾舍芳芝芙芭芽芟芹花芬芥芯芸芣芰芾芷虎虱初表軋迎返近邵邸邱邶采金長門阜陀阿阻附"], -["ab40","陂隹雨青非亟亭亮信侵侯便俠俑俏保促侶俘俟俊俗侮俐俄係俚俎俞侷兗冒冑冠剎剃削前剌剋則勇勉勃勁匍南卻厚叛咬哀咨哎哉咸咦咳哇哂咽咪品"], -["aba1","哄哈咯咫咱咻咩咧咿囿垂型垠垣垢城垮垓奕契奏奎奐姜姘姿姣姨娃姥姪姚姦威姻孩宣宦室客宥封屎屏屍屋峙峒巷帝帥帟幽庠度建弈弭彥很待徊律徇後徉怒思怠急怎怨恍恰恨恢恆恃恬恫恪恤扁拜挖按拼拭持拮拽指拱拷"], -["ac40","拯括拾拴挑挂政故斫施既春昭映昧是星昨昱昤曷柿染柱柔某柬架枯柵柩柯柄柑枴柚查枸柏柞柳枰柙柢柝柒歪殃殆段毒毗氟泉洋洲洪流津洌洱洞洗"], -["aca1","活洽派洶洛泵洹洧洸洩洮洵洎洫炫為炳炬炯炭炸炮炤爰牲牯牴狩狠狡玷珊玻玲珍珀玳甚甭畏界畎畋疫疤疥疢疣癸皆皇皈盈盆盃盅省盹相眉看盾盼眇矜砂研砌砍祆祉祈祇禹禺科秒秋穿突竿竽籽紂紅紀紉紇約紆缸美羿耄"], -["ad40","耐耍耑耶胖胥胚胃胄背胡胛胎胞胤胝致舢苧范茅苣苛苦茄若茂茉苒苗英茁苜苔苑苞苓苟苯茆虐虹虻虺衍衫要觔計訂訃貞負赴赳趴軍軌述迦迢迪迥"], -["ada1","迭迫迤迨郊郎郁郃酋酊重閂限陋陌降面革韋韭音頁風飛食首香乘亳倌倍倣俯倦倥俸倩倖倆值借倚倒們俺倀倔倨俱倡個候倘俳修倭倪俾倫倉兼冤冥冢凍凌准凋剖剜剔剛剝匪卿原厝叟哨唐唁唷哼哥哲唆哺唔哩哭員唉哮哪"], -["ae40","哦唧唇哽唏圃圄埂埔埋埃堉夏套奘奚娑娘娜娟娛娓姬娠娣娩娥娌娉孫屘宰害家宴宮宵容宸射屑展屐峭峽峻峪峨峰島崁峴差席師庫庭座弱徒徑徐恙"], -["aea1","恣恥恐恕恭恩息悄悟悚悍悔悌悅悖扇拳挈拿捎挾振捕捂捆捏捉挺捐挽挪挫挨捍捌效敉料旁旅時晉晏晃晒晌晅晁書朔朕朗校核案框桓根桂桔栩梳栗桌桑栽柴桐桀格桃株桅栓栘桁殊殉殷氣氧氨氦氤泰浪涕消涇浦浸海浙涓"], -["af40","浬涉浮浚浴浩涌涊浹涅浥涔烊烘烤烙烈烏爹特狼狹狽狸狷玆班琉珮珠珪珞畔畝畜畚留疾病症疲疳疽疼疹痂疸皋皰益盍盎眩真眠眨矩砰砧砸砝破砷"], -["afa1","砥砭砠砟砲祕祐祠祟祖神祝祗祚秤秣秧租秦秩秘窄窈站笆笑粉紡紗紋紊素索純紐紕級紜納紙紛缺罟羔翅翁耆耘耕耙耗耽耿胱脂胰脅胭胴脆胸胳脈能脊胼胯臭臬舀舐航舫舨般芻茫荒荔荊茸荐草茵茴荏茲茹茶茗荀茱茨荃"], -["b040","虔蚊蚪蚓蚤蚩蚌蚣蚜衰衷袁袂衽衹記訐討訌訕訊託訓訖訏訑豈豺豹財貢起躬軒軔軏辱送逆迷退迺迴逃追逅迸邕郡郝郢酒配酌釘針釗釜釙閃院陣陡"], -["b0a1","陛陝除陘陞隻飢馬骨高鬥鬲鬼乾偺偽停假偃偌做偉健偶偎偕偵側偷偏倏偯偭兜冕凰剪副勒務勘動匐匏匙匿區匾參曼商啪啦啄啞啡啃啊唱啖問啕唯啤唸售啜唬啣唳啁啗圈國圉域堅堊堆埠埤基堂堵執培夠奢娶婁婉婦婪婀"], -["b140","娼婢婚婆婊孰寇寅寄寂宿密尉專將屠屜屝崇崆崎崛崖崢崑崩崔崙崤崧崗巢常帶帳帷康庸庶庵庾張強彗彬彩彫得徙從徘御徠徜恿患悉悠您惋悴惦悽"], -["b1a1","情悻悵惜悼惘惕惆惟悸惚惇戚戛扈掠控捲掖探接捷捧掘措捱掩掉掃掛捫推掄授掙採掬排掏掀捻捩捨捺敝敖救教敗啟敏敘敕敔斜斛斬族旋旌旎晝晚晤晨晦晞曹勗望梁梯梢梓梵桿桶梱梧梗械梃棄梭梆梅梔條梨梟梡梂欲殺"], -["b240","毫毬氫涎涼淳淙液淡淌淤添淺清淇淋涯淑涮淞淹涸混淵淅淒渚涵淚淫淘淪深淮淨淆淄涪淬涿淦烹焉焊烽烯爽牽犁猜猛猖猓猙率琅琊球理現琍瓠瓶"], -["b2a1","瓷甜產略畦畢異疏痔痕疵痊痍皎盔盒盛眷眾眼眶眸眺硫硃硎祥票祭移窒窕笠笨笛第符笙笞笮粒粗粕絆絃統紮紹紼絀細紳組累終紲紱缽羞羚翌翎習耜聊聆脯脖脣脫脩脰脤舂舵舷舶船莎莞莘荸莢莖莽莫莒莊莓莉莠荷荻荼"], -["b340","莆莧處彪蛇蛀蚶蛄蚵蛆蛋蚱蚯蛉術袞袈被袒袖袍袋覓規訪訝訣訥許設訟訛訢豉豚販責貫貨貪貧赧赦趾趺軛軟這逍通逗連速逝逐逕逞造透逢逖逛途"], -["b3a1","部郭都酗野釵釦釣釧釭釩閉陪陵陳陸陰陴陶陷陬雀雪雩章竟頂頃魚鳥鹵鹿麥麻傢傍傅備傑傀傖傘傚最凱割剴創剩勞勝勛博厥啻喀喧啼喊喝喘喂喜喪喔喇喋喃喳單喟唾喲喚喻喬喱啾喉喫喙圍堯堪場堤堰報堡堝堠壹壺奠"], -["b440","婷媚婿媒媛媧孳孱寒富寓寐尊尋就嵌嵐崴嵇巽幅帽幀幃幾廊廁廂廄弼彭復循徨惑惡悲悶惠愜愣惺愕惰惻惴慨惱愎惶愉愀愒戟扉掣掌描揀揩揉揆揍"], -["b4a1","插揣提握揖揭揮捶援揪換摒揚揹敞敦敢散斑斐斯普晰晴晶景暑智晾晷曾替期朝棺棕棠棘棗椅棟棵森棧棹棒棲棣棋棍植椒椎棉棚楮棻款欺欽殘殖殼毯氮氯氬港游湔渡渲湧湊渠渥渣減湛湘渤湖湮渭渦湯渴湍渺測湃渝渾滋"], -["b540","溉渙湎湣湄湲湩湟焙焚焦焰無然煮焜牌犄犀猶猥猴猩琺琪琳琢琥琵琶琴琯琛琦琨甥甦畫番痢痛痣痙痘痞痠登發皖皓皴盜睏短硝硬硯稍稈程稅稀窘"], -["b5a1","窗窖童竣等策筆筐筒答筍筋筏筑粟粥絞結絨絕紫絮絲絡給絢絰絳善翔翕耋聒肅腕腔腋腑腎脹腆脾腌腓腴舒舜菩萃菸萍菠菅萋菁華菱菴著萊菰萌菌菽菲菊萸萎萄菜萇菔菟虛蛟蛙蛭蛔蛛蛤蛐蛞街裁裂袱覃視註詠評詞証詁"], -["b640","詔詛詐詆訴診訶詖象貂貯貼貳貽賁費賀貴買貶貿貸越超趁跎距跋跚跑跌跛跆軻軸軼辜逮逵週逸進逶鄂郵鄉郾酣酥量鈔鈕鈣鈉鈞鈍鈐鈇鈑閔閏開閑"], -["b6a1","間閒閎隊階隋陽隅隆隍陲隄雁雅雄集雇雯雲韌項順須飧飪飯飩飲飭馮馭黃黍黑亂傭債傲傳僅傾催傷傻傯僇剿剷剽募勦勤勢勣匯嗟嗨嗓嗦嗎嗜嗇嗑嗣嗤嗯嗚嗡嗅嗆嗥嗉園圓塞塑塘塗塚塔填塌塭塊塢塒塋奧嫁嫉嫌媾媽媼"], -["b740","媳嫂媲嵩嵯幌幹廉廈弒彙徬微愚意慈感想愛惹愁愈慎慌慄慍愾愴愧愍愆愷戡戢搓搾搞搪搭搽搬搏搜搔損搶搖搗搆敬斟新暗暉暇暈暖暄暘暍會榔業"], -["b7a1","楚楷楠楔極椰概楊楨楫楞楓楹榆楝楣楛歇歲毀殿毓毽溢溯滓溶滂源溝滇滅溥溘溼溺溫滑準溜滄滔溪溧溴煎煙煩煤煉照煜煬煦煌煥煞煆煨煖爺牒猷獅猿猾瑯瑚瑕瑟瑞瑁琿瑙瑛瑜當畸瘀痰瘁痲痱痺痿痴痳盞盟睛睫睦睞督"], -["b840","睹睪睬睜睥睨睢矮碎碰碗碘碌碉硼碑碓硿祺祿禁萬禽稜稚稠稔稟稞窟窠筷節筠筮筧粱粳粵經絹綑綁綏絛置罩罪署義羨群聖聘肆肄腱腰腸腥腮腳腫"], -["b8a1","腹腺腦舅艇蒂葷落萱葵葦葫葉葬葛萼萵葡董葩葭葆虞虜號蛹蜓蜈蜇蜀蛾蛻蜂蜃蜆蜊衙裟裔裙補裘裝裡裊裕裒覜解詫該詳試詩詰誇詼詣誠話誅詭詢詮詬詹詻訾詨豢貊貉賊資賈賄貲賃賂賅跡跟跨路跳跺跪跤跦躲較載軾輊"], -["b940","辟農運遊道遂達逼違遐遇遏過遍遑逾遁鄒鄗酬酪酩釉鈷鉗鈸鈽鉀鈾鉛鉋鉤鉑鈴鉉鉍鉅鈹鈿鉚閘隘隔隕雍雋雉雊雷電雹零靖靴靶預頑頓頊頒頌飼飴"], -["b9a1","飽飾馳馱馴髡鳩麂鼎鼓鼠僧僮僥僖僭僚僕像僑僱僎僩兢凳劃劂匱厭嗾嘀嘛嘗嗽嘔嘆嘉嘍嘎嗷嘖嘟嘈嘐嗶團圖塵塾境墓墊塹墅塽壽夥夢夤奪奩嫡嫦嫩嫗嫖嫘嫣孵寞寧寡寥實寨寢寤察對屢嶄嶇幛幣幕幗幔廓廖弊彆彰徹慇"], -["ba40","愿態慷慢慣慟慚慘慵截撇摘摔撤摸摟摺摑摧搴摭摻敲斡旗旖暢暨暝榜榨榕槁榮槓構榛榷榻榫榴槐槍榭槌榦槃榣歉歌氳漳演滾漓滴漩漾漠漬漏漂漢"], -["baa1","滿滯漆漱漸漲漣漕漫漯澈漪滬漁滲滌滷熔熙煽熊熄熒爾犒犖獄獐瑤瑣瑪瑰瑭甄疑瘧瘍瘋瘉瘓盡監瞄睽睿睡磁碟碧碳碩碣禎福禍種稱窪窩竭端管箕箋筵算箝箔箏箸箇箄粹粽精綻綰綜綽綾綠緊綴網綱綺綢綿綵綸維緒緇綬"], -["bb40","罰翠翡翟聞聚肇腐膀膏膈膊腿膂臧臺與舔舞艋蓉蒿蓆蓄蒙蒞蒲蒜蓋蒸蓀蓓蒐蒼蓑蓊蜿蜜蜻蜢蜥蜴蜘蝕蜷蜩裳褂裴裹裸製裨褚裯誦誌語誣認誡誓誤"], -["bba1","說誥誨誘誑誚誧豪貍貌賓賑賒赫趙趕跼輔輒輕輓辣遠遘遜遣遙遞遢遝遛鄙鄘鄞酵酸酷酴鉸銀銅銘銖鉻銓銜銨鉼銑閡閨閩閣閥閤隙障際雌雒需靼鞅韶頗領颯颱餃餅餌餉駁骯骰髦魁魂鳴鳶鳳麼鼻齊億儀僻僵價儂儈儉儅凜"], -["bc40","劇劈劉劍劊勰厲嘮嘻嘹嘲嘿嘴嘩噓噎噗噴嘶嘯嘰墀墟增墳墜墮墩墦奭嬉嫻嬋嫵嬌嬈寮寬審寫層履嶝嶔幢幟幡廢廚廟廝廣廠彈影德徵慶慧慮慝慕憂"], -["bca1","慼慰慫慾憧憐憫憎憬憚憤憔憮戮摩摯摹撞撲撈撐撰撥撓撕撩撒撮播撫撚撬撙撢撳敵敷數暮暫暴暱樣樟槨樁樞標槽模樓樊槳樂樅槭樑歐歎殤毅毆漿潼澄潑潦潔澆潭潛潸潮澎潺潰潤澗潘滕潯潠潟熟熬熱熨牖犛獎獗瑩璋璃"], -["bd40","瑾璀畿瘠瘩瘟瘤瘦瘡瘢皚皺盤瞎瞇瞌瞑瞋磋磅確磊碾磕碼磐稿稼穀稽稷稻窯窮箭箱範箴篆篇篁箠篌糊締練緯緻緘緬緝編緣線緞緩綞緙緲緹罵罷羯"], -["bda1","翩耦膛膜膝膠膚膘蔗蔽蔚蓮蔬蔭蔓蔑蔣蔡蔔蓬蔥蓿蔆螂蝴蝶蝠蝦蝸蝨蝙蝗蝌蝓衛衝褐複褒褓褕褊誼諒談諄誕請諸課諉諂調誰論諍誶誹諛豌豎豬賠賞賦賤賬賭賢賣賜質賡赭趟趣踫踐踝踢踏踩踟踡踞躺輝輛輟輩輦輪輜輞"], -["be40","輥適遮遨遭遷鄰鄭鄧鄱醇醉醋醃鋅銻銷鋪銬鋤鋁銳銼鋒鋇鋰銲閭閱霄霆震霉靠鞍鞋鞏頡頫頜颳養餓餒餘駝駐駟駛駑駕駒駙骷髮髯鬧魅魄魷魯鴆鴉"], -["bea1","鴃麩麾黎墨齒儒儘儔儐儕冀冪凝劑劓勳噙噫噹噩噤噸噪器噥噱噯噬噢噶壁墾壇壅奮嬝嬴學寰導彊憲憑憩憊懍憶憾懊懈戰擅擁擋撻撼據擄擇擂操撿擒擔撾整曆曉暹曄曇暸樽樸樺橙橫橘樹橄橢橡橋橇樵機橈歙歷氅濂澱澡"], -["bf40","濃澤濁澧澳激澹澶澦澠澴熾燉燐燒燈燕熹燎燙燜燃燄獨璜璣璘璟璞瓢甌甍瘴瘸瘺盧盥瞠瞞瞟瞥磨磚磬磧禦積穎穆穌穋窺篙簑築篤篛篡篩篦糕糖縊"], -["bfa1","縑縈縛縣縞縝縉縐罹羲翰翱翮耨膳膩膨臻興艘艙蕊蕙蕈蕨蕩蕃蕉蕭蕪蕞螃螟螞螢融衡褪褲褥褫褡親覦諦諺諫諱謀諜諧諮諾謁謂諷諭諳諶諼豫豭貓賴蹄踱踴蹂踹踵輻輯輸輳辨辦遵遴選遲遼遺鄴醒錠錶鋸錳錯錢鋼錫錄錚"], -["c040","錐錦錡錕錮錙閻隧隨險雕霎霑霖霍霓霏靛靜靦鞘頰頸頻頷頭頹頤餐館餞餛餡餚駭駢駱骸骼髻髭鬨鮑鴕鴣鴦鴨鴒鴛默黔龍龜優償儡儲勵嚎嚀嚐嚅嚇"], -["c0a1","嚏壕壓壑壎嬰嬪嬤孺尷屨嶼嶺嶽嶸幫彌徽應懂懇懦懋戲戴擎擊擘擠擰擦擬擱擢擭斂斃曙曖檀檔檄檢檜櫛檣橾檗檐檠歜殮毚氈濘濱濟濠濛濤濫濯澀濬濡濩濕濮濰燧營燮燦燥燭燬燴燠爵牆獰獲璩環璦璨癆療癌盪瞳瞪瞰瞬"], -["c140","瞧瞭矯磷磺磴磯礁禧禪穗窿簇簍篾篷簌篠糠糜糞糢糟糙糝縮績繆縷縲繃縫總縱繅繁縴縹繈縵縿縯罄翳翼聱聲聰聯聳臆臃膺臂臀膿膽臉膾臨舉艱薪"], -["c1a1","薄蕾薜薑薔薯薛薇薨薊虧蟀蟑螳蟒蟆螫螻螺蟈蟋褻褶襄褸褽覬謎謗謙講謊謠謝謄謐豁谿豳賺賽購賸賻趨蹉蹋蹈蹊轄輾轂轅輿避遽還邁邂邀鄹醣醞醜鍍鎂錨鍵鍊鍥鍋錘鍾鍬鍛鍰鍚鍔闊闋闌闈闆隱隸雖霜霞鞠韓顆颶餵騁"], -["c240","駿鮮鮫鮪鮭鴻鴿麋黏點黜黝黛鼾齋叢嚕嚮壙壘嬸彝懣戳擴擲擾攆擺擻擷斷曜朦檳檬櫃檻檸櫂檮檯歟歸殯瀉瀋濾瀆濺瀑瀏燻燼燾燸獷獵璧璿甕癖癘"], -["c2a1","癒瞽瞿瞻瞼礎禮穡穢穠竄竅簫簧簪簞簣簡糧織繕繞繚繡繒繙罈翹翻職聶臍臏舊藏薩藍藐藉薰薺薹薦蟯蟬蟲蟠覆覲觴謨謹謬謫豐贅蹙蹣蹦蹤蹟蹕軀轉轍邇邃邈醫醬釐鎔鎊鎖鎢鎳鎮鎬鎰鎘鎚鎗闔闖闐闕離雜雙雛雞霤鞣鞦"], -["c340","鞭韹額顏題顎顓颺餾餿餽餮馥騎髁鬃鬆魏魎魍鯊鯉鯽鯈鯀鵑鵝鵠黠鼕鼬儳嚥壞壟壢寵龐廬懲懷懶懵攀攏曠曝櫥櫝櫚櫓瀛瀟瀨瀚瀝瀕瀘爆爍牘犢獸"], -["c3a1","獺璽瓊瓣疇疆癟癡矇礙禱穫穩簾簿簸簽簷籀繫繭繹繩繪羅繳羶羹羸臘藩藝藪藕藤藥藷蟻蠅蠍蟹蟾襠襟襖襞譁譜識證譚譎譏譆譙贈贊蹼蹲躇蹶蹬蹺蹴轔轎辭邊邋醱醮鏡鏑鏟鏃鏈鏜鏝鏖鏢鏍鏘鏤鏗鏨關隴難霪霧靡韜韻類"], -["c440","願顛颼饅饉騖騙鬍鯨鯧鯖鯛鶉鵡鵲鵪鵬麒麗麓麴勸嚨嚷嚶嚴嚼壤孀孃孽寶巉懸懺攘攔攙曦朧櫬瀾瀰瀲爐獻瓏癢癥礦礪礬礫竇競籌籃籍糯糰辮繽繼"], -["c4a1","纂罌耀臚艦藻藹蘑藺蘆蘋蘇蘊蠔蠕襤覺觸議譬警譯譟譫贏贍躉躁躅躂醴釋鐘鐃鏽闡霰飄饒饑馨騫騰騷騵鰓鰍鹹麵黨鼯齟齣齡儷儸囁囀囂夔屬巍懼懾攝攜斕曩櫻欄櫺殲灌爛犧瓖瓔癩矓籐纏續羼蘗蘭蘚蠣蠢蠡蠟襪襬覽譴"], -["c540","護譽贓躊躍躋轟辯醺鐮鐳鐵鐺鐸鐲鐫闢霸霹露響顧顥饗驅驃驀騾髏魔魑鰭鰥鶯鶴鷂鶸麝黯鼙齜齦齧儼儻囈囊囉孿巔巒彎懿攤權歡灑灘玀瓤疊癮癬"], -["c5a1","禳籠籟聾聽臟襲襯觼讀贖贗躑躓轡酈鑄鑑鑒霽霾韃韁顫饕驕驍髒鬚鱉鰱鰾鰻鷓鷗鼴齬齪龔囌巖戀攣攫攪曬欐瓚竊籤籣籥纓纖纔臢蘸蘿蠱變邐邏鑣鑠鑤靨顯饜驚驛驗髓體髑鱔鱗鱖鷥麟黴囑壩攬灞癱癲矗罐羈蠶蠹衢讓讒"], -["c640","讖艷贛釀鑪靂靈靄韆顰驟鬢魘鱟鷹鷺鹼鹽鼇齷齲廳欖灣籬籮蠻觀躡釁鑲鑰顱饞髖鬣黌灤矚讚鑷韉驢驥纜讜躪釅鑽鑾鑼鱷鱸黷豔鑿鸚爨驪鬱鸛鸞籲"], -["c940","乂乜凵匚厂万丌乇亍囗兀屮彳丏冇与丮亓仂仉仈冘勼卬厹圠夃夬尐巿旡殳毌气爿丱丼仨仜仩仡仝仚刌匜卌圢圣夗夯宁宄尒尻屴屳帄庀庂忉戉扐氕"], -["c9a1","氶汃氿氻犮犰玊禸肊阞伎优伬仵伔仱伀价伈伝伂伅伢伓伄仴伒冱刓刉刐劦匢匟卍厊吇囡囟圮圪圴夼妀奼妅奻奾奷奿孖尕尥屼屺屻屾巟幵庄异弚彴忕忔忏扜扞扤扡扦扢扙扠扚扥旯旮朾朹朸朻机朿朼朳氘汆汒汜汏汊汔汋"], -["ca40","汌灱牞犴犵玎甪癿穵网艸艼芀艽艿虍襾邙邗邘邛邔阢阤阠阣佖伻佢佉体佤伾佧佒佟佁佘伭伳伿佡冏冹刜刞刡劭劮匉卣卲厎厏吰吷吪呔呅吙吜吥吘"], -["caa1","吽呏呁吨吤呇囮囧囥坁坅坌坉坋坒夆奀妦妘妠妗妎妢妐妏妧妡宎宒尨尪岍岏岈岋岉岒岊岆岓岕巠帊帎庋庉庌庈庍弅弝彸彶忒忑忐忭忨忮忳忡忤忣忺忯忷忻怀忴戺抃抌抎抏抔抇扱扻扺扰抁抈扷扽扲扴攷旰旴旳旲旵杅杇"], -["cb40","杙杕杌杈杝杍杚杋毐氙氚汸汧汫沄沋沏汱汯汩沚汭沇沕沜汦汳汥汻沎灴灺牣犿犽狃狆狁犺狅玕玗玓玔玒町甹疔疕皁礽耴肕肙肐肒肜芐芏芅芎芑芓"], -["cba1","芊芃芄豸迉辿邟邡邥邞邧邠阰阨阯阭丳侘佼侅佽侀侇佶佴侉侄佷佌侗佪侚佹侁佸侐侜侔侞侒侂侕佫佮冞冼冾刵刲刳剆刱劼匊匋匼厒厔咇呿咁咑咂咈呫呺呾呥呬呴呦咍呯呡呠咘呣呧呤囷囹坯坲坭坫坱坰坶垀坵坻坳坴坢"], -["cc40","坨坽夌奅妵妺姏姎妲姌姁妶妼姃姖妱妽姀姈妴姇孢孥宓宕屄屇岮岤岠岵岯岨岬岟岣岭岢岪岧岝岥岶岰岦帗帔帙弨弢弣弤彔徂彾彽忞忥怭怦怙怲怋"], -["cca1","怴怊怗怳怚怞怬怢怍怐怮怓怑怌怉怜戔戽抭抴拑抾抪抶拊抮抳抯抻抩抰抸攽斨斻昉旼昄昒昈旻昃昋昍昅旽昑昐曶朊枅杬枎枒杶杻枘枆构杴枍枌杺枟枑枙枃杽极杸杹枔欥殀歾毞氝沓泬泫泮泙沶泔沭泧沷泐泂沺泃泆泭泲"], -["cd40","泒泝沴沊沝沀泞泀洰泍泇沰泹泏泩泑炔炘炅炓炆炄炑炖炂炚炃牪狖狋狘狉狜狒狔狚狌狑玤玡玭玦玢玠玬玝瓝瓨甿畀甾疌疘皯盳盱盰盵矸矼矹矻矺"], -["cda1","矷祂礿秅穸穻竻籵糽耵肏肮肣肸肵肭舠芠苀芫芚芘芛芵芧芮芼芞芺芴芨芡芩苂芤苃芶芢虰虯虭虮豖迒迋迓迍迖迕迗邲邴邯邳邰阹阽阼阺陃俍俅俓侲俉俋俁俔俜俙侻侳俛俇俖侺俀侹俬剄剉勀勂匽卼厗厖厙厘咺咡咭咥哏"], -["ce40","哃茍咷咮哖咶哅哆咠呰咼咢咾呲哞咰垵垞垟垤垌垗垝垛垔垘垏垙垥垚垕壴复奓姡姞姮娀姱姝姺姽姼姶姤姲姷姛姩姳姵姠姾姴姭宨屌峐峘峌峗峋峛"], -["cea1","峞峚峉峇峊峖峓峔峏峈峆峎峟峸巹帡帢帣帠帤庰庤庢庛庣庥弇弮彖徆怷怹恔恲恞恅恓恇恉恛恌恀恂恟怤恄恘恦恮扂扃拏挍挋拵挎挃拫拹挏挌拸拶挀挓挔拺挕拻拰敁敃斪斿昶昡昲昵昜昦昢昳昫昺昝昴昹昮朏朐柁柲柈枺"], -["cf40","柜枻柸柘柀枷柅柫柤柟枵柍枳柷柶柮柣柂枹柎柧柰枲柼柆柭柌枮柦柛柺柉柊柃柪柋欨殂殄殶毖毘毠氠氡洨洴洭洟洼洿洒洊泚洳洄洙洺洚洑洀洝浂"], -["cfa1","洁洘洷洃洏浀洇洠洬洈洢洉洐炷炟炾炱炰炡炴炵炩牁牉牊牬牰牳牮狊狤狨狫狟狪狦狣玅珌珂珈珅玹玶玵玴珫玿珇玾珃珆玸珋瓬瓮甮畇畈疧疪癹盄眈眃眄眅眊盷盻盺矧矨砆砑砒砅砐砏砎砉砃砓祊祌祋祅祄秕种秏秖秎窀"], -["d040","穾竑笀笁籺籸籹籿粀粁紃紈紁罘羑羍羾耇耎耏耔耷胘胇胠胑胈胂胐胅胣胙胜胊胕胉胏胗胦胍臿舡芔苙苾苹茇苨茀苕茺苫苖苴苬苡苲苵茌苻苶苰苪"], -["d0a1","苤苠苺苳苭虷虴虼虳衁衎衧衪衩觓訄訇赲迣迡迮迠郱邽邿郕郅邾郇郋郈釔釓陔陏陑陓陊陎倞倅倇倓倢倰倛俵俴倳倷倬俶俷倗倜倠倧倵倯倱倎党冔冓凊凄凅凈凎剡剚剒剞剟剕剢勍匎厞唦哢唗唒哧哳哤唚哿唄唈哫唑唅哱"], -["d140","唊哻哷哸哠唎唃唋圁圂埌堲埕埒垺埆垽垼垸垶垿埇埐垹埁夎奊娙娖娭娮娕娏娗娊娞娳孬宧宭宬尃屖屔峬峿峮峱峷崀峹帩帨庨庮庪庬弳弰彧恝恚恧"], -["d1a1","恁悢悈悀悒悁悝悃悕悛悗悇悜悎戙扆拲挐捖挬捄捅挶捃揤挹捋捊挼挩捁挴捘捔捙挭捇挳捚捑挸捗捀捈敊敆旆旃旄旂晊晟晇晑朒朓栟栚桉栲栳栻桋桏栖栱栜栵栫栭栯桎桄栴栝栒栔栦栨栮桍栺栥栠欬欯欭欱欴歭肂殈毦毤"], -["d240","毨毣毢毧氥浺浣浤浶洍浡涒浘浢浭浯涑涍淯浿涆浞浧浠涗浰浼浟涂涘洯浨涋浾涀涄洖涃浻浽浵涐烜烓烑烝烋缹烢烗烒烞烠烔烍烅烆烇烚烎烡牂牸"], -["d2a1","牷牶猀狺狴狾狶狳狻猁珓珙珥珖玼珧珣珩珜珒珛珔珝珚珗珘珨瓞瓟瓴瓵甡畛畟疰痁疻痄痀疿疶疺皊盉眝眛眐眓眒眣眑眕眙眚眢眧砣砬砢砵砯砨砮砫砡砩砳砪砱祔祛祏祜祓祒祑秫秬秠秮秭秪秜秞秝窆窉窅窋窌窊窇竘笐"], -["d340","笄笓笅笏笈笊笎笉笒粄粑粊粌粈粍粅紞紝紑紎紘紖紓紟紒紏紌罜罡罞罠罝罛羖羒翃翂翀耖耾耹胺胲胹胵脁胻脀舁舯舥茳茭荄茙荑茥荖茿荁茦茜茢"], -["d3a1","荂荎茛茪茈茼荍茖茤茠茷茯茩荇荅荌荓茞茬荋茧荈虓虒蚢蚨蚖蚍蚑蚞蚇蚗蚆蚋蚚蚅蚥蚙蚡蚧蚕蚘蚎蚝蚐蚔衃衄衭衵衶衲袀衱衿衯袃衾衴衼訒豇豗豻貤貣赶赸趵趷趶軑軓迾迵适迿迻逄迼迶郖郠郙郚郣郟郥郘郛郗郜郤酐"], -["d440","酎酏釕釢釚陜陟隼飣髟鬯乿偰偪偡偞偠偓偋偝偲偈偍偁偛偊偢倕偅偟偩偫偣偤偆偀偮偳偗偑凐剫剭剬剮勖勓匭厜啵啶唼啍啐唴唪啑啢唶唵唰啒啅"], -["d4a1","唌唲啥啎唹啈唭唻啀啋圊圇埻堔埢埶埜埴堀埭埽堈埸堋埳埏堇埮埣埲埥埬埡堎埼堐埧堁堌埱埩埰堍堄奜婠婘婕婧婞娸娵婭婐婟婥婬婓婤婗婃婝婒婄婛婈媎娾婍娹婌婰婩婇婑婖婂婜孲孮寁寀屙崞崋崝崚崠崌崨崍崦崥崏"], -["d540","崰崒崣崟崮帾帴庱庴庹庲庳弶弸徛徖徟悊悐悆悾悰悺惓惔惏惤惙惝惈悱惛悷惊悿惃惍惀挲捥掊掂捽掽掞掭掝掗掫掎捯掇掐据掯捵掜捭掮捼掤挻掟"], -["d5a1","捸掅掁掑掍捰敓旍晥晡晛晙晜晢朘桹梇梐梜桭桮梮梫楖桯梣梬梩桵桴梲梏桷梒桼桫桲梪梀桱桾梛梖梋梠梉梤桸桻梑梌梊桽欶欳欷欸殑殏殍殎殌氪淀涫涴涳湴涬淩淢涷淶淔渀淈淠淟淖涾淥淜淝淛淴淊涽淭淰涺淕淂淏淉"], -["d640","淐淲淓淽淗淍淣涻烺焍烷焗烴焌烰焄烳焐烼烿焆焓焀烸烶焋焂焎牾牻牼牿猝猗猇猑猘猊猈狿猏猞玈珶珸珵琄琁珽琇琀珺珼珿琌琋珴琈畤畣痎痒痏"], -["d6a1","痋痌痑痐皏皉盓眹眯眭眱眲眴眳眽眥眻眵硈硒硉硍硊硌砦硅硐祤祧祩祪祣祫祡离秺秸秶秷窏窔窐笵筇笴笥笰笢笤笳笘笪笝笱笫笭笯笲笸笚笣粔粘粖粣紵紽紸紶紺絅紬紩絁絇紾紿絊紻紨罣羕羜羝羛翊翋翍翐翑翇翏翉耟"], -["d740","耞耛聇聃聈脘脥脙脛脭脟脬脞脡脕脧脝脢舑舸舳舺舴舲艴莐莣莨莍荺荳莤荴莏莁莕莙荵莔莩荽莃莌莝莛莪莋荾莥莯莈莗莰荿莦莇莮荶莚虙虖蚿蚷"], -["d7a1","蛂蛁蛅蚺蚰蛈蚹蚳蚸蛌蚴蚻蚼蛃蚽蚾衒袉袕袨袢袪袚袑袡袟袘袧袙袛袗袤袬袌袓袎覂觖觙觕訰訧訬訞谹谻豜豝豽貥赽赻赹趼跂趹趿跁軘軞軝軜軗軠軡逤逋逑逜逌逡郯郪郰郴郲郳郔郫郬郩酖酘酚酓酕釬釴釱釳釸釤釹釪"], -["d840","釫釷釨釮镺閆閈陼陭陫陱陯隿靪頄飥馗傛傕傔傞傋傣傃傌傎傝偨傜傒傂傇兟凔匒匑厤厧喑喨喥喭啷噅喢喓喈喏喵喁喣喒喤啽喌喦啿喕喡喎圌堩堷"], -["d8a1","堙堞堧堣堨埵塈堥堜堛堳堿堶堮堹堸堭堬堻奡媯媔媟婺媢媞婸媦婼媥媬媕媮娷媄媊媗媃媋媩婻婽媌媜媏媓媝寪寍寋寔寑寊寎尌尰崷嵃嵫嵁嵋崿崵嵑嵎嵕崳崺嵒崽崱嵙嵂崹嵉崸崼崲崶嵀嵅幄幁彘徦徥徫惉悹惌惢惎惄愔"], -["d940","惲愊愖愅惵愓惸惼惾惁愃愘愝愐惿愄愋扊掔掱掰揎揥揨揯揃撝揳揊揠揶揕揲揵摡揟掾揝揜揄揘揓揂揇揌揋揈揰揗揙攲敧敪敤敜敨敥斌斝斞斮旐旒"], -["d9a1","晼晬晻暀晱晹晪晲朁椌棓椄棜椪棬棪棱椏棖棷棫棤棶椓椐棳棡椇棌椈楰梴椑棯棆椔棸棐棽棼棨椋椊椗棎棈棝棞棦棴棑椆棔棩椕椥棇欹欻欿欼殔殗殙殕殽毰毲毳氰淼湆湇渟湉溈渼渽湅湢渫渿湁湝湳渜渳湋湀湑渻渃渮湞"], -["da40","湨湜湡渱渨湠湱湫渹渢渰湓湥渧湸湤湷湕湹湒湦渵渶湚焠焞焯烻焮焱焣焥焢焲焟焨焺焛牋牚犈犉犆犅犋猒猋猰猢猱猳猧猲猭猦猣猵猌琮琬琰琫琖"], -["daa1","琚琡琭琱琤琣琝琩琠琲瓻甯畯畬痧痚痡痦痝痟痤痗皕皒盚睆睇睄睍睅睊睎睋睌矞矬硠硤硥硜硭硱硪确硰硩硨硞硢祴祳祲祰稂稊稃稌稄窙竦竤筊笻筄筈筌筎筀筘筅粢粞粨粡絘絯絣絓絖絧絪絏絭絜絫絒絔絩絑絟絎缾缿罥"], -["db40","罦羢羠羡翗聑聏聐胾胔腃腊腒腏腇脽腍脺臦臮臷臸臹舄舼舽舿艵茻菏菹萣菀菨萒菧菤菼菶萐菆菈菫菣莿萁菝菥菘菿菡菋菎菖菵菉萉萏菞萑萆菂菳"], -["dba1","菕菺菇菑菪萓菃菬菮菄菻菗菢萛菛菾蛘蛢蛦蛓蛣蛚蛪蛝蛫蛜蛬蛩蛗蛨蛑衈衖衕袺裗袹袸裀袾袶袼袷袽袲褁裉覕覘覗觝觚觛詎詍訹詙詀詗詘詄詅詒詈詑詊詌詏豟貁貀貺貾貰貹貵趄趀趉跘跓跍跇跖跜跏跕跙跈跗跅軯軷軺"], -["dc40","軹軦軮軥軵軧軨軶軫軱軬軴軩逭逴逯鄆鄬鄄郿郼鄈郹郻鄁鄀鄇鄅鄃酡酤酟酢酠鈁鈊鈥鈃鈚鈦鈏鈌鈀鈒釿釽鈆鈄鈧鈂鈜鈤鈙鈗鈅鈖镻閍閌閐隇陾隈"], -["dca1","隉隃隀雂雈雃雱雰靬靰靮頇颩飫鳦黹亃亄亶傽傿僆傮僄僊傴僈僂傰僁傺傱僋僉傶傸凗剺剸剻剼嗃嗛嗌嗐嗋嗊嗝嗀嗔嗄嗩喿嗒喍嗏嗕嗢嗖嗈嗲嗍嗙嗂圔塓塨塤塏塍塉塯塕塎塝塙塥塛堽塣塱壼嫇嫄嫋媺媸媱媵媰媿嫈媻嫆"], -["dd40","媷嫀嫊媴媶嫍媹媐寖寘寙尟尳嵱嵣嵊嵥嵲嵬嵞嵨嵧嵢巰幏幎幊幍幋廅廌廆廋廇彀徯徭惷慉慊愫慅愶愲愮慆愯慏愩慀戠酨戣戥戤揅揱揫搐搒搉搠搤"], -["dda1","搳摃搟搕搘搹搷搢搣搌搦搰搨摁搵搯搊搚摀搥搧搋揧搛搮搡搎敯斒旓暆暌暕暐暋暊暙暔晸朠楦楟椸楎楢楱椿楅楪椹楂楗楙楺楈楉椵楬椳椽楥棰楸椴楩楀楯楄楶楘楁楴楌椻楋椷楜楏楑椲楒椯楻椼歆歅歃歂歈歁殛嗀毻毼"], -["de40","毹毷毸溛滖滈溏滀溟溓溔溠溱溹滆滒溽滁溞滉溷溰滍溦滏溲溾滃滜滘溙溒溎溍溤溡溿溳滐滊溗溮溣煇煔煒煣煠煁煝煢煲煸煪煡煂煘煃煋煰煟煐煓"], -["dea1","煄煍煚牏犍犌犑犐犎猼獂猻猺獀獊獉瑄瑊瑋瑒瑑瑗瑀瑏瑐瑎瑂瑆瑍瑔瓡瓿瓾瓽甝畹畷榃痯瘏瘃痷痾痼痹痸瘐痻痶痭痵痽皙皵盝睕睟睠睒睖睚睩睧睔睙睭矠碇碚碔碏碄碕碅碆碡碃硹碙碀碖硻祼禂祽祹稑稘稙稒稗稕稢稓"], -["df40","稛稐窣窢窞竫筦筤筭筴筩筲筥筳筱筰筡筸筶筣粲粴粯綈綆綀綍絿綅絺綎絻綃絼綌綔綄絽綒罭罫罧罨罬羦羥羧翛翜耡腤腠腷腜腩腛腢腲朡腞腶腧腯"], -["dfa1","腄腡舝艉艄艀艂艅蓱萿葖葶葹蒏蒍葥葑葀蒆葧萰葍葽葚葙葴葳葝蔇葞萷萺萴葺葃葸萲葅萩菙葋萯葂萭葟葰萹葎葌葒葯蓅蒎萻葇萶萳葨葾葄萫葠葔葮葐蜋蜄蛷蜌蛺蛖蛵蝍蛸蜎蜉蜁蛶蜍蜅裖裋裍裎裞裛裚裌裐覅覛觟觥觤"], -["e040","觡觠觢觜触詶誆詿詡訿詷誂誄詵誃誁詴詺谼豋豊豥豤豦貆貄貅賌赨赩趑趌趎趏趍趓趔趐趒跰跠跬跱跮跐跩跣跢跧跲跫跴輆軿輁輀輅輇輈輂輋遒逿"], -["e0a1","遄遉逽鄐鄍鄏鄑鄖鄔鄋鄎酮酯鉈鉒鈰鈺鉦鈳鉥鉞銃鈮鉊鉆鉭鉬鉏鉠鉧鉯鈶鉡鉰鈱鉔鉣鉐鉲鉎鉓鉌鉖鈲閟閜閞閛隒隓隑隗雎雺雽雸雵靳靷靸靲頏頍頎颬飶飹馯馲馰馵骭骫魛鳪鳭鳧麀黽僦僔僗僨僳僛僪僝僤僓僬僰僯僣僠"], -["e140","凘劀劁勩勫匰厬嘧嘕嘌嘒嗼嘏嘜嘁嘓嘂嗺嘝嘄嗿嗹墉塼墐墘墆墁塿塴墋塺墇墑墎塶墂墈塻墔墏壾奫嫜嫮嫥嫕嫪嫚嫭嫫嫳嫢嫠嫛嫬嫞嫝嫙嫨嫟孷寠"], -["e1a1","寣屣嶂嶀嵽嶆嵺嶁嵷嶊嶉嶈嵾嵼嶍嵹嵿幘幙幓廘廑廗廎廜廕廙廒廔彄彃彯徶愬愨慁慞慱慳慒慓慲慬憀慴慔慺慛慥愻慪慡慖戩戧戫搫摍摛摝摴摶摲摳摽摵摦撦摎撂摞摜摋摓摠摐摿搿摬摫摙摥摷敳斠暡暠暟朅朄朢榱榶槉"], -["e240","榠槎榖榰榬榼榑榙榎榧榍榩榾榯榿槄榽榤槔榹槊榚槏榳榓榪榡榞槙榗榐槂榵榥槆歊歍歋殞殟殠毃毄毾滎滵滱漃漥滸漷滻漮漉潎漙漚漧漘漻漒滭漊"], -["e2a1","漶潳滹滮漭潀漰漼漵滫漇漎潃漅滽滶漹漜滼漺漟漍漞漈漡熇熐熉熀熅熂熏煻熆熁熗牄牓犗犕犓獃獍獑獌瑢瑳瑱瑵瑲瑧瑮甀甂甃畽疐瘖瘈瘌瘕瘑瘊瘔皸瞁睼瞅瞂睮瞀睯睾瞃碲碪碴碭碨硾碫碞碥碠碬碢碤禘禊禋禖禕禔禓"], -["e340","禗禈禒禐稫穊稰稯稨稦窨窫窬竮箈箜箊箑箐箖箍箌箛箎箅箘劄箙箤箂粻粿粼粺綧綷緂綣綪緁緀緅綝緎緄緆緋緌綯綹綖綼綟綦綮綩綡緉罳翢翣翥翞"], -["e3a1","耤聝聜膉膆膃膇膍膌膋舕蒗蒤蒡蒟蒺蓎蓂蒬蒮蒫蒹蒴蓁蓍蒪蒚蒱蓐蒝蒧蒻蒢蒔蓇蓌蒛蒩蒯蒨蓖蒘蒶蓏蒠蓗蓔蓒蓛蒰蒑虡蜳蜣蜨蝫蝀蜮蜞蜡蜙蜛蝃蜬蝁蜾蝆蜠蜲蜪蜭蜼蜒蜺蜱蜵蝂蜦蜧蜸蜤蜚蜰蜑裷裧裱裲裺裾裮裼裶裻"], -["e440","裰裬裫覝覡覟覞觩觫觨誫誙誋誒誏誖谽豨豩賕賏賗趖踉踂跿踍跽踊踃踇踆踅跾踀踄輐輑輎輍鄣鄜鄠鄢鄟鄝鄚鄤鄡鄛酺酲酹酳銥銤鉶銛鉺銠銔銪銍"], -["e4a1","銦銚銫鉹銗鉿銣鋮銎銂銕銢鉽銈銡銊銆銌銙銧鉾銇銩銝銋鈭隞隡雿靘靽靺靾鞃鞀鞂靻鞄鞁靿韎韍頖颭颮餂餀餇馝馜駃馹馻馺駂馽駇骱髣髧鬾鬿魠魡魟鳱鳲鳵麧僿儃儰僸儆儇僶僾儋儌僽儊劋劌勱勯噈噂噌嘵噁噊噉噆噘"], -["e540","噚噀嘳嘽嘬嘾嘸嘪嘺圚墫墝墱墠墣墯墬墥墡壿嫿嫴嫽嫷嫶嬃嫸嬂嫹嬁嬇嬅嬏屧嶙嶗嶟嶒嶢嶓嶕嶠嶜嶡嶚嶞幩幝幠幜緳廛廞廡彉徲憋憃慹憱憰憢憉"], -["e5a1","憛憓憯憭憟憒憪憡憍慦憳戭摮摰撖撠撅撗撜撏撋撊撌撣撟摨撱撘敶敺敹敻斲斳暵暰暩暲暷暪暯樀樆樗槥槸樕槱槤樠槿槬槢樛樝槾樧槲槮樔槷槧橀樈槦槻樍槼槫樉樄樘樥樏槶樦樇槴樖歑殥殣殢殦氁氀毿氂潁漦潾澇濆澒"], -["e640","澍澉澌潢潏澅潚澖潶潬澂潕潲潒潐潗澔澓潝漀潡潫潽潧澐潓澋潩潿澕潣潷潪潻熲熯熛熰熠熚熩熵熝熥熞熤熡熪熜熧熳犘犚獘獒獞獟獠獝獛獡獚獙"], -["e6a1","獢璇璉璊璆璁瑽璅璈瑼瑹甈甇畾瘥瘞瘙瘝瘜瘣瘚瘨瘛皜皝皞皛瞍瞏瞉瞈磍碻磏磌磑磎磔磈磃磄磉禚禡禠禜禢禛歶稹窲窴窳箷篋箾箬篎箯箹篊箵糅糈糌糋緷緛緪緧緗緡縃緺緦緶緱緰緮緟罶羬羰羭翭翫翪翬翦翨聤聧膣膟"], -["e740","膞膕膢膙膗舖艏艓艒艐艎艑蔤蔻蔏蔀蔩蔎蔉蔍蔟蔊蔧蔜蓻蔫蓺蔈蔌蓴蔪蓲蔕蓷蓫蓳蓼蔒蓪蓩蔖蓾蔨蔝蔮蔂蓽蔞蓶蔱蔦蓧蓨蓰蓯蓹蔘蔠蔰蔋蔙蔯虢"], -["e7a1","蝖蝣蝤蝷蟡蝳蝘蝔蝛蝒蝡蝚蝑蝞蝭蝪蝐蝎蝟蝝蝯蝬蝺蝮蝜蝥蝏蝻蝵蝢蝧蝩衚褅褌褔褋褗褘褙褆褖褑褎褉覢覤覣觭觰觬諏諆誸諓諑諔諕誻諗誾諀諅諘諃誺誽諙谾豍貏賥賟賙賨賚賝賧趠趜趡趛踠踣踥踤踮踕踛踖踑踙踦踧"], -["e840","踔踒踘踓踜踗踚輬輤輘輚輠輣輖輗遳遰遯遧遫鄯鄫鄩鄪鄲鄦鄮醅醆醊醁醂醄醀鋐鋃鋄鋀鋙銶鋏鋱鋟鋘鋩鋗鋝鋌鋯鋂鋨鋊鋈鋎鋦鋍鋕鋉鋠鋞鋧鋑鋓"], -["e8a1","銵鋡鋆銴镼閬閫閮閰隤隢雓霅霈霂靚鞊鞎鞈韐韏頞頝頦頩頨頠頛頧颲餈飺餑餔餖餗餕駜駍駏駓駔駎駉駖駘駋駗駌骳髬髫髳髲髱魆魃魧魴魱魦魶魵魰魨魤魬鳼鳺鳽鳿鳷鴇鴀鳹鳻鴈鴅鴄麃黓鼏鼐儜儓儗儚儑凞匴叡噰噠噮"], -["e940","噳噦噣噭噲噞噷圜圛壈墽壉墿墺壂墼壆嬗嬙嬛嬡嬔嬓嬐嬖嬨嬚嬠嬞寯嶬嶱嶩嶧嶵嶰嶮嶪嶨嶲嶭嶯嶴幧幨幦幯廩廧廦廨廥彋徼憝憨憖懅憴懆懁懌憺"], -["e9a1","憿憸憌擗擖擐擏擉撽撉擃擛擳擙攳敿敼斢曈暾曀曊曋曏暽暻暺曌朣樴橦橉橧樲橨樾橝橭橶橛橑樨橚樻樿橁橪橤橐橏橔橯橩橠樼橞橖橕橍橎橆歕歔歖殧殪殫毈毇氄氃氆澭濋澣濇澼濎濈潞濄澽澞濊澨瀄澥澮澺澬澪濏澿澸"], -["ea40","澢濉澫濍澯澲澰燅燂熿熸燖燀燁燋燔燊燇燏熽燘熼燆燚燛犝犞獩獦獧獬獥獫獪瑿璚璠璔璒璕璡甋疀瘯瘭瘱瘽瘳瘼瘵瘲瘰皻盦瞚瞝瞡瞜瞛瞢瞣瞕瞙"], -["eaa1","瞗磝磩磥磪磞磣磛磡磢磭磟磠禤穄穈穇窶窸窵窱窷篞篣篧篝篕篥篚篨篹篔篪篢篜篫篘篟糒糔糗糐糑縒縡縗縌縟縠縓縎縜縕縚縢縋縏縖縍縔縥縤罃罻罼罺羱翯耪耩聬膱膦膮膹膵膫膰膬膴膲膷膧臲艕艖艗蕖蕅蕫蕍蕓蕡蕘"], -["eb40","蕀蕆蕤蕁蕢蕄蕑蕇蕣蔾蕛蕱蕎蕮蕵蕕蕧蕠薌蕦蕝蕔蕥蕬虣虥虤螛螏螗螓螒螈螁螖螘蝹螇螣螅螐螑螝螄螔螜螚螉褞褦褰褭褮褧褱褢褩褣褯褬褟觱諠"], -["eba1","諢諲諴諵諝謔諤諟諰諈諞諡諨諿諯諻貑貒貐賵賮賱賰賳赬赮趥趧踳踾踸蹀蹅踶踼踽蹁踰踿躽輶輮輵輲輹輷輴遶遹遻邆郺鄳鄵鄶醓醐醑醍醏錧錞錈錟錆錏鍺錸錼錛錣錒錁鍆錭錎錍鋋錝鋺錥錓鋹鋷錴錂錤鋿錩錹錵錪錔錌"], -["ec40","錋鋾錉錀鋻錖閼闍閾閹閺閶閿閵閽隩雔霋霒霐鞙鞗鞔韰韸頵頯頲餤餟餧餩馞駮駬駥駤駰駣駪駩駧骹骿骴骻髶髺髹髷鬳鮀鮅鮇魼魾魻鮂鮓鮒鮐魺鮕"], -["eca1","魽鮈鴥鴗鴠鴞鴔鴩鴝鴘鴢鴐鴙鴟麈麆麇麮麭黕黖黺鼒鼽儦儥儢儤儠儩勴嚓嚌嚍嚆嚄嚃噾嚂噿嚁壖壔壏壒嬭嬥嬲嬣嬬嬧嬦嬯嬮孻寱寲嶷幬幪徾徻懃憵憼懧懠懥懤懨懞擯擩擣擫擤擨斁斀斶旚曒檍檖檁檥檉檟檛檡檞檇檓檎"], -["ed40","檕檃檨檤檑橿檦檚檅檌檒歛殭氉濌澩濴濔濣濜濭濧濦濞濲濝濢濨燡燱燨燲燤燰燢獳獮獯璗璲璫璐璪璭璱璥璯甐甑甒甏疄癃癈癉癇皤盩瞵瞫瞲瞷瞶"], -["eda1","瞴瞱瞨矰磳磽礂磻磼磲礅磹磾礄禫禨穜穛穖穘穔穚窾竀竁簅簏篲簀篿篻簎篴簋篳簂簉簃簁篸篽簆篰篱簐簊糨縭縼繂縳顈縸縪繉繀繇縩繌縰縻縶繄縺罅罿罾罽翴翲耬膻臄臌臊臅臇膼臩艛艚艜薃薀薏薧薕薠薋薣蕻薤薚薞"], -["ee40","蕷蕼薉薡蕺蕸蕗薎薖薆薍薙薝薁薢薂薈薅蕹蕶薘薐薟虨螾螪螭蟅螰螬螹螵螼螮蟉蟃蟂蟌螷螯蟄蟊螴螶螿螸螽蟞螲褵褳褼褾襁襒褷襂覭覯覮觲觳謞"], -["eea1","謘謖謑謅謋謢謏謒謕謇謍謈謆謜謓謚豏豰豲豱豯貕貔賹赯蹎蹍蹓蹐蹌蹇轃轀邅遾鄸醚醢醛醙醟醡醝醠鎡鎃鎯鍤鍖鍇鍼鍘鍜鍶鍉鍐鍑鍠鍭鎏鍌鍪鍹鍗鍕鍒鍏鍱鍷鍻鍡鍞鍣鍧鎀鍎鍙闇闀闉闃闅閷隮隰隬霠霟霘霝霙鞚鞡鞜"], -["ef40","鞞鞝韕韔韱顁顄顊顉顅顃餥餫餬餪餳餲餯餭餱餰馘馣馡騂駺駴駷駹駸駶駻駽駾駼騃骾髾髽鬁髼魈鮚鮨鮞鮛鮦鮡鮥鮤鮆鮢鮠鮯鴳鵁鵧鴶鴮鴯鴱鴸鴰"], -["efa1","鵅鵂鵃鴾鴷鵀鴽翵鴭麊麉麍麰黈黚黻黿鼤鼣鼢齔龠儱儭儮嚘嚜嚗嚚嚝嚙奰嬼屩屪巀幭幮懘懟懭懮懱懪懰懫懖懩擿攄擽擸攁攃擼斔旛曚曛曘櫅檹檽櫡櫆檺檶檷櫇檴檭歞毉氋瀇瀌瀍瀁瀅瀔瀎濿瀀濻瀦濼濷瀊爁燿燹爃燽獶"], -["f040","璸瓀璵瓁璾璶璻瓂甔甓癜癤癙癐癓癗癚皦皽盬矂瞺磿礌礓礔礉礐礒礑禭禬穟簜簩簙簠簟簭簝簦簨簢簥簰繜繐繖繣繘繢繟繑繠繗繓羵羳翷翸聵臑臒"], -["f0a1","臐艟艞薴藆藀藃藂薳薵薽藇藄薿藋藎藈藅薱薶藒蘤薸薷薾虩蟧蟦蟢蟛蟫蟪蟥蟟蟳蟤蟔蟜蟓蟭蟘蟣螤蟗蟙蠁蟴蟨蟝襓襋襏襌襆襐襑襉謪謧謣謳謰謵譇謯謼謾謱謥謷謦謶謮謤謻謽謺豂豵貙貘貗賾贄贂贀蹜蹢蹠蹗蹖蹞蹥蹧"], -["f140","蹛蹚蹡蹝蹩蹔轆轇轈轋鄨鄺鄻鄾醨醥醧醯醪鎵鎌鎒鎷鎛鎝鎉鎧鎎鎪鎞鎦鎕鎈鎙鎟鎍鎱鎑鎲鎤鎨鎴鎣鎥闒闓闑隳雗雚巂雟雘雝霣霢霥鞬鞮鞨鞫鞤鞪"], -["f1a1","鞢鞥韗韙韖韘韺顐顑顒颸饁餼餺騏騋騉騍騄騑騊騅騇騆髀髜鬈鬄鬅鬩鬵魊魌魋鯇鯆鯃鮿鯁鮵鮸鯓鮶鯄鮹鮽鵜鵓鵏鵊鵛鵋鵙鵖鵌鵗鵒鵔鵟鵘鵚麎麌黟鼁鼀鼖鼥鼫鼪鼩鼨齌齕儴儵劖勷厴嚫嚭嚦嚧嚪嚬壚壝壛夒嬽嬾嬿巃幰"], -["f240","徿懻攇攐攍攉攌攎斄旞旝曞櫧櫠櫌櫑櫙櫋櫟櫜櫐櫫櫏櫍櫞歠殰氌瀙瀧瀠瀖瀫瀡瀢瀣瀩瀗瀤瀜瀪爌爊爇爂爅犥犦犤犣犡瓋瓅璷瓃甖癠矉矊矄矱礝礛"], -["f2a1","礡礜礗礞禰穧穨簳簼簹簬簻糬糪繶繵繸繰繷繯繺繲繴繨罋罊羃羆羷翽翾聸臗臕艤艡艣藫藱藭藙藡藨藚藗藬藲藸藘藟藣藜藑藰藦藯藞藢蠀蟺蠃蟶蟷蠉蠌蠋蠆蟼蠈蟿蠊蠂襢襚襛襗襡襜襘襝襙覈覷覶觶譐譈譊譀譓譖譔譋譕"], -["f340","譑譂譒譗豃豷豶貚贆贇贉趬趪趭趫蹭蹸蹳蹪蹯蹻軂轒轑轏轐轓辴酀鄿醰醭鏞鏇鏏鏂鏚鏐鏹鏬鏌鏙鎩鏦鏊鏔鏮鏣鏕鏄鏎鏀鏒鏧镽闚闛雡霩霫霬霨霦"], -["f3a1","鞳鞷鞶韝韞韟顜顙顝顗颿颽颻颾饈饇饃馦馧騚騕騥騝騤騛騢騠騧騣騞騜騔髂鬋鬊鬎鬌鬷鯪鯫鯠鯞鯤鯦鯢鯰鯔鯗鯬鯜鯙鯥鯕鯡鯚鵷鶁鶊鶄鶈鵱鶀鵸鶆鶋鶌鵽鵫鵴鵵鵰鵩鶅鵳鵻鶂鵯鵹鵿鶇鵨麔麑黀黼鼭齀齁齍齖齗齘匷嚲"], -["f440","嚵嚳壣孅巆巇廮廯忀忁懹攗攖攕攓旟曨曣曤櫳櫰櫪櫨櫹櫱櫮櫯瀼瀵瀯瀷瀴瀱灂瀸瀿瀺瀹灀瀻瀳灁爓爔犨獽獼璺皫皪皾盭矌矎矏矍矲礥礣礧礨礤礩"], -["f4a1","禲穮穬穭竷籉籈籊籇籅糮繻繾纁纀羺翿聹臛臙舋艨艩蘢藿蘁藾蘛蘀藶蘄蘉蘅蘌藽蠙蠐蠑蠗蠓蠖襣襦覹觷譠譪譝譨譣譥譧譭趮躆躈躄轙轖轗轕轘轚邍酃酁醷醵醲醳鐋鐓鏻鐠鐏鐔鏾鐕鐐鐨鐙鐍鏵鐀鏷鐇鐎鐖鐒鏺鐉鏸鐊鏿"], -["f540","鏼鐌鏶鐑鐆闞闠闟霮霯鞹鞻韽韾顠顢顣顟飁飂饐饎饙饌饋饓騲騴騱騬騪騶騩騮騸騭髇髊髆鬐鬒鬑鰋鰈鯷鰅鰒鯸鱀鰇鰎鰆鰗鰔鰉鶟鶙鶤鶝鶒鶘鶐鶛"], -["f5a1","鶠鶔鶜鶪鶗鶡鶚鶢鶨鶞鶣鶿鶩鶖鶦鶧麙麛麚黥黤黧黦鼰鼮齛齠齞齝齙龑儺儹劘劗囃嚽嚾孈孇巋巏廱懽攛欂櫼欃櫸欀灃灄灊灈灉灅灆爝爚爙獾甗癪矐礭礱礯籔籓糲纊纇纈纋纆纍罍羻耰臝蘘蘪蘦蘟蘣蘜蘙蘧蘮蘡蘠蘩蘞蘥"], -["f640","蠩蠝蠛蠠蠤蠜蠫衊襭襩襮襫觺譹譸譅譺譻贐贔趯躎躌轞轛轝酆酄酅醹鐿鐻鐶鐩鐽鐼鐰鐹鐪鐷鐬鑀鐱闥闤闣霵霺鞿韡顤飉飆飀饘饖騹騽驆驄驂驁騺"], -["f6a1","騿髍鬕鬗鬘鬖鬺魒鰫鰝鰜鰬鰣鰨鰩鰤鰡鶷鶶鶼鷁鷇鷊鷏鶾鷅鷃鶻鶵鷎鶹鶺鶬鷈鶱鶭鷌鶳鷍鶲鹺麜黫黮黭鼛鼘鼚鼱齎齥齤龒亹囆囅囋奱孋孌巕巑廲攡攠攦攢欋欈欉氍灕灖灗灒爞爟犩獿瓘瓕瓙瓗癭皭礵禴穰穱籗籜籙籛籚"], -["f740","糴糱纑罏羇臞艫蘴蘵蘳蘬蘲蘶蠬蠨蠦蠪蠥襱覿覾觻譾讄讂讆讅譿贕躕躔躚躒躐躖躗轠轢酇鑌鑐鑊鑋鑏鑇鑅鑈鑉鑆霿韣顪顩飋饔饛驎驓驔驌驏驈驊"], -["f7a1","驉驒驐髐鬙鬫鬻魖魕鱆鱈鰿鱄鰹鰳鱁鰼鰷鰴鰲鰽鰶鷛鷒鷞鷚鷋鷐鷜鷑鷟鷩鷙鷘鷖鷵鷕鷝麶黰鼵鼳鼲齂齫龕龢儽劙壨壧奲孍巘蠯彏戁戃戄攩攥斖曫欑欒欏毊灛灚爢玂玁玃癰矔籧籦纕艬蘺虀蘹蘼蘱蘻蘾蠰蠲蠮蠳襶襴襳觾"], -["f840","讌讎讋讈豅贙躘轤轣醼鑢鑕鑝鑗鑞韄韅頀驖驙鬞鬟鬠鱒鱘鱐鱊鱍鱋鱕鱙鱌鱎鷻鷷鷯鷣鷫鷸鷤鷶鷡鷮鷦鷲鷰鷢鷬鷴鷳鷨鷭黂黐黲黳鼆鼜鼸鼷鼶齃齏"], -["f8a1","齱齰齮齯囓囍孎屭攭曭曮欓灟灡灝灠爣瓛瓥矕礸禷禶籪纗羉艭虃蠸蠷蠵衋讔讕躞躟躠躝醾醽釂鑫鑨鑩雥靆靃靇韇韥驞髕魙鱣鱧鱦鱢鱞鱠鸂鷾鸇鸃鸆鸅鸀鸁鸉鷿鷽鸄麠鼞齆齴齵齶囔攮斸欘欙欗欚灢爦犪矘矙礹籩籫糶纚"], -["f940","纘纛纙臠臡虆虇虈襹襺襼襻觿讘讙躥躤躣鑮鑭鑯鑱鑳靉顲饟鱨鱮鱭鸋鸍鸐鸏鸒鸑麡黵鼉齇齸齻齺齹圞灦籯蠼趲躦釃鑴鑸鑶鑵驠鱴鱳鱱鱵鸔鸓黶鼊"], -["f9a1","龤灨灥糷虪蠾蠽蠿讞貜躩軉靋顳顴飌饡馫驤驦驧鬤鸕鸗齈戇欞爧虌躨钂钀钁驩驨鬮鸙爩虋讟钃鱹麷癵驫鱺鸝灩灪麤齾齉龘碁銹裏墻恒粧嫺╔╦╗╠╬╣╚╩╝╒╤╕╞╪╡╘╧╛╓╥╖╟╫╢╙╨╜║═╭╮╰╯▓"] -] diff --git a/node_modules/whatwg-encoding/node_modules/iconv-lite/encodings/tables/eucjp.json b/node_modules/whatwg-encoding/node_modules/iconv-lite/encodings/tables/eucjp.json deleted file mode 100644 index 4fa61ca..0000000 --- a/node_modules/whatwg-encoding/node_modules/iconv-lite/encodings/tables/eucjp.json +++ /dev/null @@ -1,182 +0,0 @@ -[ -["0","\u0000",127], -["8ea1","。",62], -["a1a1"," 、。,.・:;?!゛゜´`¨^ ̄_ヽヾゝゞ〃仝々〆〇ー―‐/\~∥|…‥‘’“”()〔〕[]{}〈",9,"+-±×÷=≠<>≦≧∞∴♂♀°′″℃¥$¢£%#&*@§☆★○●◎◇"], -["a2a1","◆□■△▲▽▼※〒→←↑↓〓"], -["a2ba","∈∋⊆⊇⊂⊃∪∩"], -["a2ca","∧∨¬⇒⇔∀∃"], -["a2dc","∠⊥⌒∂∇≡≒≪≫√∽∝∵∫∬"], -["a2f2","ʼn♯♭♪†‡¶"], -["a2fe","◯"], -["a3b0","0",9], -["a3c1","A",25], -["a3e1","a",25], -["a4a1","ぁ",82], -["a5a1","ァ",85], -["a6a1","Α",16,"Σ",6], -["a6c1","α",16,"σ",6], -["a7a1","А",5,"ЁЖ",25], -["a7d1","а",5,"ёж",25], -["a8a1","─│┌┐┘└├┬┤┴┼━┃┏┓┛┗┣┳┫┻╋┠┯┨┷┿┝┰┥┸╂"], -["ada1","①",19,"Ⅰ",9], -["adc0","㍉㌔㌢㍍㌘㌧㌃㌶㍑㍗㌍㌦㌣㌫㍊㌻㎜㎝㎞㎎㎏㏄㎡"], -["addf","㍻〝〟№㏍℡㊤",4,"㈱㈲㈹㍾㍽㍼≒≡∫∮∑√⊥∠∟⊿∵∩∪"], -["b0a1","亜唖娃阿哀愛挨姶逢葵茜穐悪握渥旭葦芦鯵梓圧斡扱宛姐虻飴絢綾鮎或粟袷安庵按暗案闇鞍杏以伊位依偉囲夷委威尉惟意慰易椅為畏異移維緯胃萎衣謂違遺医井亥域育郁磯一壱溢逸稲茨芋鰯允印咽員因姻引飲淫胤蔭"], -["b1a1","院陰隠韻吋右宇烏羽迂雨卯鵜窺丑碓臼渦嘘唄欝蔚鰻姥厩浦瓜閏噂云運雲荏餌叡営嬰影映曳栄永泳洩瑛盈穎頴英衛詠鋭液疫益駅悦謁越閲榎厭円園堰奄宴延怨掩援沿演炎焔煙燕猿縁艶苑薗遠鉛鴛塩於汚甥凹央奥往応"], -["b2a1","押旺横欧殴王翁襖鴬鴎黄岡沖荻億屋憶臆桶牡乙俺卸恩温穏音下化仮何伽価佳加可嘉夏嫁家寡科暇果架歌河火珂禍禾稼箇花苛茄荷華菓蝦課嘩貨迦過霞蚊俄峨我牙画臥芽蛾賀雅餓駕介会解回塊壊廻快怪悔恢懐戒拐改"], -["b3a1","魁晦械海灰界皆絵芥蟹開階貝凱劾外咳害崖慨概涯碍蓋街該鎧骸浬馨蛙垣柿蛎鈎劃嚇各廓拡撹格核殻獲確穫覚角赫較郭閣隔革学岳楽額顎掛笠樫橿梶鰍潟割喝恰括活渇滑葛褐轄且鰹叶椛樺鞄株兜竃蒲釜鎌噛鴨栢茅萱"], -["b4a1","粥刈苅瓦乾侃冠寒刊勘勧巻喚堪姦完官寛干幹患感慣憾換敢柑桓棺款歓汗漢澗潅環甘監看竿管簡緩缶翰肝艦莞観諌貫還鑑間閑関陥韓館舘丸含岸巌玩癌眼岩翫贋雁頑顔願企伎危喜器基奇嬉寄岐希幾忌揮机旗既期棋棄"], -["b5a1","機帰毅気汽畿祈季稀紀徽規記貴起軌輝飢騎鬼亀偽儀妓宜戯技擬欺犠疑祇義蟻誼議掬菊鞠吉吃喫桔橘詰砧杵黍却客脚虐逆丘久仇休及吸宮弓急救朽求汲泣灸球究窮笈級糾給旧牛去居巨拒拠挙渠虚許距鋸漁禦魚亨享京"], -["b6a1","供侠僑兇競共凶協匡卿叫喬境峡強彊怯恐恭挟教橋況狂狭矯胸脅興蕎郷鏡響饗驚仰凝尭暁業局曲極玉桐粁僅勤均巾錦斤欣欽琴禁禽筋緊芹菌衿襟謹近金吟銀九倶句区狗玖矩苦躯駆駈駒具愚虞喰空偶寓遇隅串櫛釧屑屈"], -["b7a1","掘窟沓靴轡窪熊隈粂栗繰桑鍬勲君薫訓群軍郡卦袈祁係傾刑兄啓圭珪型契形径恵慶慧憩掲携敬景桂渓畦稽系経継繋罫茎荊蛍計詣警軽頚鶏芸迎鯨劇戟撃激隙桁傑欠決潔穴結血訣月件倹倦健兼券剣喧圏堅嫌建憲懸拳捲"], -["b8a1","検権牽犬献研硯絹県肩見謙賢軒遣鍵険顕験鹸元原厳幻弦減源玄現絃舷言諺限乎個古呼固姑孤己庫弧戸故枯湖狐糊袴股胡菰虎誇跨鈷雇顧鼓五互伍午呉吾娯後御悟梧檎瑚碁語誤護醐乞鯉交佼侯候倖光公功効勾厚口向"], -["b9a1","后喉坑垢好孔孝宏工巧巷幸広庚康弘恒慌抗拘控攻昂晃更杭校梗構江洪浩港溝甲皇硬稿糠紅紘絞綱耕考肯肱腔膏航荒行衡講貢購郊酵鉱砿鋼閤降項香高鴻剛劫号合壕拷濠豪轟麹克刻告国穀酷鵠黒獄漉腰甑忽惚骨狛込"], -["baa1","此頃今困坤墾婚恨懇昏昆根梱混痕紺艮魂些佐叉唆嵯左差査沙瑳砂詐鎖裟坐座挫債催再最哉塞妻宰彩才採栽歳済災采犀砕砦祭斎細菜裁載際剤在材罪財冴坂阪堺榊肴咲崎埼碕鷺作削咋搾昨朔柵窄策索錯桜鮭笹匙冊刷"], -["bba1","察拶撮擦札殺薩雑皐鯖捌錆鮫皿晒三傘参山惨撒散桟燦珊産算纂蚕讃賛酸餐斬暫残仕仔伺使刺司史嗣四士始姉姿子屍市師志思指支孜斯施旨枝止死氏獅祉私糸紙紫肢脂至視詞詩試誌諮資賜雌飼歯事似侍児字寺慈持時"], -["bca1","次滋治爾璽痔磁示而耳自蒔辞汐鹿式識鴫竺軸宍雫七叱執失嫉室悉湿漆疾質実蔀篠偲柴芝屡蕊縞舎写射捨赦斜煮社紗者謝車遮蛇邪借勺尺杓灼爵酌釈錫若寂弱惹主取守手朱殊狩珠種腫趣酒首儒受呪寿授樹綬需囚収周"], -["bda1","宗就州修愁拾洲秀秋終繍習臭舟蒐衆襲讐蹴輯週酋酬集醜什住充十従戎柔汁渋獣縦重銃叔夙宿淑祝縮粛塾熟出術述俊峻春瞬竣舜駿准循旬楯殉淳準潤盾純巡遵醇順処初所暑曙渚庶緒署書薯藷諸助叙女序徐恕鋤除傷償"], -["bea1","勝匠升召哨商唱嘗奨妾娼宵将小少尚庄床廠彰承抄招掌捷昇昌昭晶松梢樟樵沼消渉湘焼焦照症省硝礁祥称章笑粧紹肖菖蒋蕉衝裳訟証詔詳象賞醤鉦鍾鐘障鞘上丈丞乗冗剰城場壌嬢常情擾条杖浄状畳穣蒸譲醸錠嘱埴飾"], -["bfa1","拭植殖燭織職色触食蝕辱尻伸信侵唇娠寝審心慎振新晋森榛浸深申疹真神秦紳臣芯薪親診身辛進針震人仁刃塵壬尋甚尽腎訊迅陣靭笥諏須酢図厨逗吹垂帥推水炊睡粋翠衰遂酔錐錘随瑞髄崇嵩数枢趨雛据杉椙菅頗雀裾"], -["c0a1","澄摺寸世瀬畝是凄制勢姓征性成政整星晴棲栖正清牲生盛精聖声製西誠誓請逝醒青静斉税脆隻席惜戚斥昔析石積籍績脊責赤跡蹟碩切拙接摂折設窃節説雪絶舌蝉仙先千占宣専尖川戦扇撰栓栴泉浅洗染潜煎煽旋穿箭線"], -["c1a1","繊羨腺舛船薦詮賎践選遷銭銑閃鮮前善漸然全禅繕膳糎噌塑岨措曾曽楚狙疏疎礎祖租粗素組蘇訴阻遡鼠僧創双叢倉喪壮奏爽宋層匝惣想捜掃挿掻操早曹巣槍槽漕燥争痩相窓糟総綜聡草荘葬蒼藻装走送遭鎗霜騒像増憎"], -["c2a1","臓蔵贈造促側則即息捉束測足速俗属賊族続卒袖其揃存孫尊損村遜他多太汰詑唾堕妥惰打柁舵楕陀駄騨体堆対耐岱帯待怠態戴替泰滞胎腿苔袋貸退逮隊黛鯛代台大第醍題鷹滝瀧卓啄宅托択拓沢濯琢託鐸濁諾茸凧蛸只"], -["c3a1","叩但達辰奪脱巽竪辿棚谷狸鱈樽誰丹単嘆坦担探旦歎淡湛炭短端箪綻耽胆蛋誕鍛団壇弾断暖檀段男談値知地弛恥智池痴稚置致蜘遅馳築畜竹筑蓄逐秩窒茶嫡着中仲宙忠抽昼柱注虫衷註酎鋳駐樗瀦猪苧著貯丁兆凋喋寵"], -["c4a1","帖帳庁弔張彫徴懲挑暢朝潮牒町眺聴脹腸蝶調諜超跳銚長頂鳥勅捗直朕沈珍賃鎮陳津墜椎槌追鎚痛通塚栂掴槻佃漬柘辻蔦綴鍔椿潰坪壷嬬紬爪吊釣鶴亭低停偵剃貞呈堤定帝底庭廷弟悌抵挺提梯汀碇禎程締艇訂諦蹄逓"], -["c5a1","邸鄭釘鼎泥摘擢敵滴的笛適鏑溺哲徹撤轍迭鉄典填天展店添纏甜貼転顛点伝殿澱田電兎吐堵塗妬屠徒斗杜渡登菟賭途都鍍砥砺努度土奴怒倒党冬凍刀唐塔塘套宕島嶋悼投搭東桃梼棟盗淘湯涛灯燈当痘祷等答筒糖統到"], -["c6a1","董蕩藤討謄豆踏逃透鐙陶頭騰闘働動同堂導憧撞洞瞳童胴萄道銅峠鴇匿得徳涜特督禿篤毒独読栃橡凸突椴届鳶苫寅酉瀞噸屯惇敦沌豚遁頓呑曇鈍奈那内乍凪薙謎灘捺鍋楢馴縄畷南楠軟難汝二尼弐迩匂賑肉虹廿日乳入"], -["c7a1","如尿韮任妊忍認濡禰祢寧葱猫熱年念捻撚燃粘乃廼之埜嚢悩濃納能脳膿農覗蚤巴把播覇杷波派琶破婆罵芭馬俳廃拝排敗杯盃牌背肺輩配倍培媒梅楳煤狽買売賠陪這蝿秤矧萩伯剥博拍柏泊白箔粕舶薄迫曝漠爆縛莫駁麦"], -["c8a1","函箱硲箸肇筈櫨幡肌畑畠八鉢溌発醗髪伐罰抜筏閥鳩噺塙蛤隼伴判半反叛帆搬斑板氾汎版犯班畔繁般藩販範釆煩頒飯挽晩番盤磐蕃蛮匪卑否妃庇彼悲扉批披斐比泌疲皮碑秘緋罷肥被誹費避非飛樋簸備尾微枇毘琵眉美"], -["c9a1","鼻柊稗匹疋髭彦膝菱肘弼必畢筆逼桧姫媛紐百謬俵彪標氷漂瓢票表評豹廟描病秒苗錨鋲蒜蛭鰭品彬斌浜瀕貧賓頻敏瓶不付埠夫婦富冨布府怖扶敷斧普浮父符腐膚芙譜負賦赴阜附侮撫武舞葡蕪部封楓風葺蕗伏副復幅服"], -["caa1","福腹複覆淵弗払沸仏物鮒分吻噴墳憤扮焚奮粉糞紛雰文聞丙併兵塀幣平弊柄並蔽閉陛米頁僻壁癖碧別瞥蔑箆偏変片篇編辺返遍便勉娩弁鞭保舗鋪圃捕歩甫補輔穂募墓慕戊暮母簿菩倣俸包呆報奉宝峰峯崩庖抱捧放方朋"], -["cba1","法泡烹砲縫胞芳萌蓬蜂褒訪豊邦鋒飽鳳鵬乏亡傍剖坊妨帽忘忙房暴望某棒冒紡肪膨謀貌貿鉾防吠頬北僕卜墨撲朴牧睦穆釦勃没殆堀幌奔本翻凡盆摩磨魔麻埋妹昧枚毎哩槙幕膜枕鮪柾鱒桝亦俣又抹末沫迄侭繭麿万慢満"], -["cca1","漫蔓味未魅巳箕岬密蜜湊蓑稔脈妙粍民眠務夢無牟矛霧鵡椋婿娘冥名命明盟迷銘鳴姪牝滅免棉綿緬面麺摸模茂妄孟毛猛盲網耗蒙儲木黙目杢勿餅尤戻籾貰問悶紋門匁也冶夜爺耶野弥矢厄役約薬訳躍靖柳薮鑓愉愈油癒"], -["cda1","諭輸唯佑優勇友宥幽悠憂揖有柚湧涌猶猷由祐裕誘遊邑郵雄融夕予余与誉輿預傭幼妖容庸揚揺擁曜楊様洋溶熔用窯羊耀葉蓉要謡踊遥陽養慾抑欲沃浴翌翼淀羅螺裸来莱頼雷洛絡落酪乱卵嵐欄濫藍蘭覧利吏履李梨理璃"], -["cea1","痢裏裡里離陸律率立葎掠略劉流溜琉留硫粒隆竜龍侶慮旅虜了亮僚両凌寮料梁涼猟療瞭稜糧良諒遼量陵領力緑倫厘林淋燐琳臨輪隣鱗麟瑠塁涙累類令伶例冷励嶺怜玲礼苓鈴隷零霊麗齢暦歴列劣烈裂廉恋憐漣煉簾練聯"], -["cfa1","蓮連錬呂魯櫓炉賂路露労婁廊弄朗楼榔浪漏牢狼篭老聾蝋郎六麓禄肋録論倭和話歪賄脇惑枠鷲亙亘鰐詫藁蕨椀湾碗腕"], -["d0a1","弌丐丕个丱丶丼丿乂乖乘亂亅豫亊舒弍于亞亟亠亢亰亳亶从仍仄仆仂仗仞仭仟价伉佚估佛佝佗佇佶侈侏侘佻佩佰侑佯來侖儘俔俟俎俘俛俑俚俐俤俥倚倨倔倪倥倅伜俶倡倩倬俾俯們倆偃假會偕偐偈做偖偬偸傀傚傅傴傲"], -["d1a1","僉僊傳僂僖僞僥僭僣僮價僵儉儁儂儖儕儔儚儡儺儷儼儻儿兀兒兌兔兢竸兩兪兮冀冂囘册冉冏冑冓冕冖冤冦冢冩冪冫决冱冲冰况冽凅凉凛几處凩凭凰凵凾刄刋刔刎刧刪刮刳刹剏剄剋剌剞剔剪剴剩剳剿剽劍劔劒剱劈劑辨"], -["d2a1","辧劬劭劼劵勁勍勗勞勣勦飭勠勳勵勸勹匆匈甸匍匐匏匕匚匣匯匱匳匸區卆卅丗卉卍凖卞卩卮夘卻卷厂厖厠厦厥厮厰厶參簒雙叟曼燮叮叨叭叺吁吽呀听吭吼吮吶吩吝呎咏呵咎呟呱呷呰咒呻咀呶咄咐咆哇咢咸咥咬哄哈咨"], -["d3a1","咫哂咤咾咼哘哥哦唏唔哽哮哭哺哢唹啀啣啌售啜啅啖啗唸唳啝喙喀咯喊喟啻啾喘喞單啼喃喩喇喨嗚嗅嗟嗄嗜嗤嗔嘔嗷嘖嗾嗽嘛嗹噎噐營嘴嘶嘲嘸噫噤嘯噬噪嚆嚀嚊嚠嚔嚏嚥嚮嚶嚴囂嚼囁囃囀囈囎囑囓囗囮囹圀囿圄圉"], -["d4a1","圈國圍圓團圖嗇圜圦圷圸坎圻址坏坩埀垈坡坿垉垓垠垳垤垪垰埃埆埔埒埓堊埖埣堋堙堝塲堡塢塋塰毀塒堽塹墅墹墟墫墺壞墻墸墮壅壓壑壗壙壘壥壜壤壟壯壺壹壻壼壽夂夊夐夛梦夥夬夭夲夸夾竒奕奐奎奚奘奢奠奧奬奩"], -["d5a1","奸妁妝佞侫妣妲姆姨姜妍姙姚娥娟娑娜娉娚婀婬婉娵娶婢婪媚媼媾嫋嫂媽嫣嫗嫦嫩嫖嫺嫻嬌嬋嬖嬲嫐嬪嬶嬾孃孅孀孑孕孚孛孥孩孰孳孵學斈孺宀它宦宸寃寇寉寔寐寤實寢寞寥寫寰寶寳尅將專對尓尠尢尨尸尹屁屆屎屓"], -["d6a1","屐屏孱屬屮乢屶屹岌岑岔妛岫岻岶岼岷峅岾峇峙峩峽峺峭嶌峪崋崕崗嵜崟崛崑崔崢崚崙崘嵌嵒嵎嵋嵬嵳嵶嶇嶄嶂嶢嶝嶬嶮嶽嶐嶷嶼巉巍巓巒巖巛巫已巵帋帚帙帑帛帶帷幄幃幀幎幗幔幟幢幤幇幵并幺麼广庠廁廂廈廐廏"], -["d7a1","廖廣廝廚廛廢廡廨廩廬廱廳廰廴廸廾弃弉彝彜弋弑弖弩弭弸彁彈彌彎弯彑彖彗彙彡彭彳彷徃徂彿徊很徑徇從徙徘徠徨徭徼忖忻忤忸忱忝悳忿怡恠怙怐怩怎怱怛怕怫怦怏怺恚恁恪恷恟恊恆恍恣恃恤恂恬恫恙悁悍惧悃悚"], -["d8a1","悄悛悖悗悒悧悋惡悸惠惓悴忰悽惆悵惘慍愕愆惶惷愀惴惺愃愡惻惱愍愎慇愾愨愧慊愿愼愬愴愽慂慄慳慷慘慙慚慫慴慯慥慱慟慝慓慵憙憖憇憬憔憚憊憑憫憮懌懊應懷懈懃懆憺懋罹懍懦懣懶懺懴懿懽懼懾戀戈戉戍戌戔戛"], -["d9a1","戞戡截戮戰戲戳扁扎扞扣扛扠扨扼抂抉找抒抓抖拔抃抔拗拑抻拏拿拆擔拈拜拌拊拂拇抛拉挌拮拱挧挂挈拯拵捐挾捍搜捏掖掎掀掫捶掣掏掉掟掵捫捩掾揩揀揆揣揉插揶揄搖搴搆搓搦搶攝搗搨搏摧摯摶摎攪撕撓撥撩撈撼"], -["daa1","據擒擅擇撻擘擂擱擧舉擠擡抬擣擯攬擶擴擲擺攀擽攘攜攅攤攣攫攴攵攷收攸畋效敖敕敍敘敞敝敲數斂斃變斛斟斫斷旃旆旁旄旌旒旛旙无旡旱杲昊昃旻杳昵昶昴昜晏晄晉晁晞晝晤晧晨晟晢晰暃暈暎暉暄暘暝曁暹曉暾暼"], -["dba1","曄暸曖曚曠昿曦曩曰曵曷朏朖朞朦朧霸朮朿朶杁朸朷杆杞杠杙杣杤枉杰枩杼杪枌枋枦枡枅枷柯枴柬枳柩枸柤柞柝柢柮枹柎柆柧檜栞框栩桀桍栲桎梳栫桙档桷桿梟梏梭梔條梛梃檮梹桴梵梠梺椏梍桾椁棊椈棘椢椦棡椌棍"], -["dca1","棔棧棕椶椒椄棗棣椥棹棠棯椨椪椚椣椡棆楹楷楜楸楫楔楾楮椹楴椽楙椰楡楞楝榁楪榲榮槐榿槁槓榾槎寨槊槝榻槃榧樮榑榠榜榕榴槞槨樂樛槿權槹槲槧樅榱樞槭樔槫樊樒櫁樣樓橄樌橲樶橸橇橢橙橦橈樸樢檐檍檠檄檢檣"], -["dda1","檗蘗檻櫃櫂檸檳檬櫞櫑櫟檪櫚櫪櫻欅蘖櫺欒欖鬱欟欸欷盜欹飮歇歃歉歐歙歔歛歟歡歸歹歿殀殄殃殍殘殕殞殤殪殫殯殲殱殳殷殼毆毋毓毟毬毫毳毯麾氈氓气氛氤氣汞汕汢汪沂沍沚沁沛汾汨汳沒沐泄泱泓沽泗泅泝沮沱沾"], -["dea1","沺泛泯泙泪洟衍洶洫洽洸洙洵洳洒洌浣涓浤浚浹浙涎涕濤涅淹渕渊涵淇淦涸淆淬淞淌淨淒淅淺淙淤淕淪淮渭湮渮渙湲湟渾渣湫渫湶湍渟湃渺湎渤滿渝游溂溪溘滉溷滓溽溯滄溲滔滕溏溥滂溟潁漑灌滬滸滾漿滲漱滯漲滌"], -["dfa1","漾漓滷澆潺潸澁澀潯潛濳潭澂潼潘澎澑濂潦澳澣澡澤澹濆澪濟濕濬濔濘濱濮濛瀉瀋濺瀑瀁瀏濾瀛瀚潴瀝瀘瀟瀰瀾瀲灑灣炙炒炯烱炬炸炳炮烟烋烝烙焉烽焜焙煥煕熈煦煢煌煖煬熏燻熄熕熨熬燗熹熾燒燉燔燎燠燬燧燵燼"], -["e0a1","燹燿爍爐爛爨爭爬爰爲爻爼爿牀牆牋牘牴牾犂犁犇犒犖犢犧犹犲狃狆狄狎狒狢狠狡狹狷倏猗猊猜猖猝猴猯猩猥猾獎獏默獗獪獨獰獸獵獻獺珈玳珎玻珀珥珮珞璢琅瑯琥珸琲琺瑕琿瑟瑙瑁瑜瑩瑰瑣瑪瑶瑾璋璞璧瓊瓏瓔珱"], -["e1a1","瓠瓣瓧瓩瓮瓲瓰瓱瓸瓷甄甃甅甌甎甍甕甓甞甦甬甼畄畍畊畉畛畆畚畩畤畧畫畭畸當疆疇畴疊疉疂疔疚疝疥疣痂疳痃疵疽疸疼疱痍痊痒痙痣痞痾痿痼瘁痰痺痲痳瘋瘍瘉瘟瘧瘠瘡瘢瘤瘴瘰瘻癇癈癆癜癘癡癢癨癩癪癧癬癰"], -["e2a1","癲癶癸發皀皃皈皋皎皖皓皙皚皰皴皸皹皺盂盍盖盒盞盡盥盧盪蘯盻眈眇眄眩眤眞眥眦眛眷眸睇睚睨睫睛睥睿睾睹瞎瞋瞑瞠瞞瞰瞶瞹瞿瞼瞽瞻矇矍矗矚矜矣矮矼砌砒礦砠礪硅碎硴碆硼碚碌碣碵碪碯磑磆磋磔碾碼磅磊磬"], -["e3a1","磧磚磽磴礇礒礑礙礬礫祀祠祗祟祚祕祓祺祿禊禝禧齋禪禮禳禹禺秉秕秧秬秡秣稈稍稘稙稠稟禀稱稻稾稷穃穗穉穡穢穩龝穰穹穽窈窗窕窘窖窩竈窰窶竅竄窿邃竇竊竍竏竕竓站竚竝竡竢竦竭竰笂笏笊笆笳笘笙笞笵笨笶筐"], -["e4a1","筺笄筍笋筌筅筵筥筴筧筰筱筬筮箝箘箟箍箜箚箋箒箏筝箙篋篁篌篏箴篆篝篩簑簔篦篥籠簀簇簓篳篷簗簍篶簣簧簪簟簷簫簽籌籃籔籏籀籐籘籟籤籖籥籬籵粃粐粤粭粢粫粡粨粳粲粱粮粹粽糀糅糂糘糒糜糢鬻糯糲糴糶糺紆"], -["e5a1","紂紜紕紊絅絋紮紲紿紵絆絳絖絎絲絨絮絏絣經綉絛綏絽綛綺綮綣綵緇綽綫總綢綯緜綸綟綰緘緝緤緞緻緲緡縅縊縣縡縒縱縟縉縋縢繆繦縻縵縹繃縷縲縺繧繝繖繞繙繚繹繪繩繼繻纃緕繽辮繿纈纉續纒纐纓纔纖纎纛纜缸缺"], -["e6a1","罅罌罍罎罐网罕罔罘罟罠罨罩罧罸羂羆羃羈羇羌羔羞羝羚羣羯羲羹羮羶羸譱翅翆翊翕翔翡翦翩翳翹飜耆耄耋耒耘耙耜耡耨耿耻聊聆聒聘聚聟聢聨聳聲聰聶聹聽聿肄肆肅肛肓肚肭冐肬胛胥胙胝胄胚胖脉胯胱脛脩脣脯腋"], -["e7a1","隋腆脾腓腑胼腱腮腥腦腴膃膈膊膀膂膠膕膤膣腟膓膩膰膵膾膸膽臀臂膺臉臍臑臙臘臈臚臟臠臧臺臻臾舁舂舅與舊舍舐舖舩舫舸舳艀艙艘艝艚艟艤艢艨艪艫舮艱艷艸艾芍芒芫芟芻芬苡苣苟苒苴苳苺莓范苻苹苞茆苜茉苙"], -["e8a1","茵茴茖茲茱荀茹荐荅茯茫茗茘莅莚莪莟莢莖茣莎莇莊荼莵荳荵莠莉莨菴萓菫菎菽萃菘萋菁菷萇菠菲萍萢萠莽萸蔆菻葭萪萼蕚蒄葷葫蒭葮蒂葩葆萬葯葹萵蓊葢蒹蒿蒟蓙蓍蒻蓚蓐蓁蓆蓖蒡蔡蓿蓴蔗蔘蔬蔟蔕蔔蓼蕀蕣蕘蕈"], -["e9a1","蕁蘂蕋蕕薀薤薈薑薊薨蕭薔薛藪薇薜蕷蕾薐藉薺藏薹藐藕藝藥藜藹蘊蘓蘋藾藺蘆蘢蘚蘰蘿虍乕虔號虧虱蚓蚣蚩蚪蚋蚌蚶蚯蛄蛆蚰蛉蠣蚫蛔蛞蛩蛬蛟蛛蛯蜒蜆蜈蜀蜃蛻蜑蜉蜍蛹蜊蜴蜿蜷蜻蜥蜩蜚蝠蝟蝸蝌蝎蝴蝗蝨蝮蝙"], -["eaa1","蝓蝣蝪蠅螢螟螂螯蟋螽蟀蟐雖螫蟄螳蟇蟆螻蟯蟲蟠蠏蠍蟾蟶蟷蠎蟒蠑蠖蠕蠢蠡蠱蠶蠹蠧蠻衄衂衒衙衞衢衫袁衾袞衵衽袵衲袂袗袒袮袙袢袍袤袰袿袱裃裄裔裘裙裝裹褂裼裴裨裲褄褌褊褓襃褞褥褪褫襁襄褻褶褸襌褝襠襞"], -["eba1","襦襤襭襪襯襴襷襾覃覈覊覓覘覡覩覦覬覯覲覺覽覿觀觚觜觝觧觴觸訃訖訐訌訛訝訥訶詁詛詒詆詈詼詭詬詢誅誂誄誨誡誑誥誦誚誣諄諍諂諚諫諳諧諤諱謔諠諢諷諞諛謌謇謚諡謖謐謗謠謳鞫謦謫謾謨譁譌譏譎證譖譛譚譫"], -["eca1","譟譬譯譴譽讀讌讎讒讓讖讙讚谺豁谿豈豌豎豐豕豢豬豸豺貂貉貅貊貍貎貔豼貘戝貭貪貽貲貳貮貶賈賁賤賣賚賽賺賻贄贅贊贇贏贍贐齎贓賍贔贖赧赭赱赳趁趙跂趾趺跏跚跖跌跛跋跪跫跟跣跼踈踉跿踝踞踐踟蹂踵踰踴蹊"], -["eda1","蹇蹉蹌蹐蹈蹙蹤蹠踪蹣蹕蹶蹲蹼躁躇躅躄躋躊躓躑躔躙躪躡躬躰軆躱躾軅軈軋軛軣軼軻軫軾輊輅輕輒輙輓輜輟輛輌輦輳輻輹轅轂輾轌轉轆轎轗轜轢轣轤辜辟辣辭辯辷迚迥迢迪迯邇迴逅迹迺逑逕逡逍逞逖逋逧逶逵逹迸"], -["eea1","遏遐遑遒逎遉逾遖遘遞遨遯遶隨遲邂遽邁邀邊邉邏邨邯邱邵郢郤扈郛鄂鄒鄙鄲鄰酊酖酘酣酥酩酳酲醋醉醂醢醫醯醪醵醴醺釀釁釉釋釐釖釟釡釛釼釵釶鈞釿鈔鈬鈕鈑鉞鉗鉅鉉鉤鉈銕鈿鉋鉐銜銖銓銛鉚鋏銹銷鋩錏鋺鍄錮"], -["efa1","錙錢錚錣錺錵錻鍜鍠鍼鍮鍖鎰鎬鎭鎔鎹鏖鏗鏨鏥鏘鏃鏝鏐鏈鏤鐚鐔鐓鐃鐇鐐鐶鐫鐵鐡鐺鑁鑒鑄鑛鑠鑢鑞鑪鈩鑰鑵鑷鑽鑚鑼鑾钁鑿閂閇閊閔閖閘閙閠閨閧閭閼閻閹閾闊濶闃闍闌闕闔闖關闡闥闢阡阨阮阯陂陌陏陋陷陜陞"], -["f0a1","陝陟陦陲陬隍隘隕隗險隧隱隲隰隴隶隸隹雎雋雉雍襍雜霍雕雹霄霆霈霓霎霑霏霖霙霤霪霰霹霽霾靄靆靈靂靉靜靠靤靦靨勒靫靱靹鞅靼鞁靺鞆鞋鞏鞐鞜鞨鞦鞣鞳鞴韃韆韈韋韜韭齏韲竟韶韵頏頌頸頤頡頷頽顆顏顋顫顯顰"], -["f1a1","顱顴顳颪颯颱颶飄飃飆飩飫餃餉餒餔餘餡餝餞餤餠餬餮餽餾饂饉饅饐饋饑饒饌饕馗馘馥馭馮馼駟駛駝駘駑駭駮駱駲駻駸騁騏騅駢騙騫騷驅驂驀驃騾驕驍驛驗驟驢驥驤驩驫驪骭骰骼髀髏髑髓體髞髟髢髣髦髯髫髮髴髱髷"], -["f2a1","髻鬆鬘鬚鬟鬢鬣鬥鬧鬨鬩鬪鬮鬯鬲魄魃魏魍魎魑魘魴鮓鮃鮑鮖鮗鮟鮠鮨鮴鯀鯊鮹鯆鯏鯑鯒鯣鯢鯤鯔鯡鰺鯲鯱鯰鰕鰔鰉鰓鰌鰆鰈鰒鰊鰄鰮鰛鰥鰤鰡鰰鱇鰲鱆鰾鱚鱠鱧鱶鱸鳧鳬鳰鴉鴈鳫鴃鴆鴪鴦鶯鴣鴟鵄鴕鴒鵁鴿鴾鵆鵈"], -["f3a1","鵝鵞鵤鵑鵐鵙鵲鶉鶇鶫鵯鵺鶚鶤鶩鶲鷄鷁鶻鶸鶺鷆鷏鷂鷙鷓鷸鷦鷭鷯鷽鸚鸛鸞鹵鹹鹽麁麈麋麌麒麕麑麝麥麩麸麪麭靡黌黎黏黐黔黜點黝黠黥黨黯黴黶黷黹黻黼黽鼇鼈皷鼕鼡鼬鼾齊齒齔齣齟齠齡齦齧齬齪齷齲齶龕龜龠"], -["f4a1","堯槇遙瑤凜熙"], -["f9a1","纊褜鍈銈蓜俉炻昱棈鋹曻彅丨仡仼伀伃伹佖侒侊侚侔俍偀倢俿倞偆偰偂傔僴僘兊兤冝冾凬刕劜劦勀勛匀匇匤卲厓厲叝﨎咜咊咩哿喆坙坥垬埈埇﨏塚增墲夋奓奛奝奣妤妺孖寀甯寘寬尞岦岺峵崧嵓﨑嵂嵭嶸嶹巐弡弴彧德"], -["faa1","忞恝悅悊惞惕愠惲愑愷愰憘戓抦揵摠撝擎敎昀昕昻昉昮昞昤晥晗晙晴晳暙暠暲暿曺朎朗杦枻桒柀栁桄棏﨓楨﨔榘槢樰橫橆橳橾櫢櫤毖氿汜沆汯泚洄涇浯涖涬淏淸淲淼渹湜渧渼溿澈澵濵瀅瀇瀨炅炫焏焄煜煆煇凞燁燾犱"], -["fba1","犾猤猪獷玽珉珖珣珒琇珵琦琪琩琮瑢璉璟甁畯皂皜皞皛皦益睆劯砡硎硤硺礰礼神祥禔福禛竑竧靖竫箞精絈絜綷綠緖繒罇羡羽茁荢荿菇菶葈蒴蕓蕙蕫﨟薰蘒﨡蠇裵訒訷詹誧誾諟諸諶譓譿賰賴贒赶﨣軏﨤逸遧郞都鄕鄧釚"], -["fca1","釗釞釭釮釤釥鈆鈐鈊鈺鉀鈼鉎鉙鉑鈹鉧銧鉷鉸鋧鋗鋙鋐﨧鋕鋠鋓錥錡鋻﨨錞鋿錝錂鍰鍗鎤鏆鏞鏸鐱鑅鑈閒隆﨩隝隯霳霻靃靍靏靑靕顗顥飯飼餧館馞驎髙髜魵魲鮏鮱鮻鰀鵰鵫鶴鸙黑"], -["fcf1","ⅰ",9,"¬¦'""], -["8fa2af","˘ˇ¸˙˝¯˛˚~΄΅"], -["8fa2c2","¡¦¿"], -["8fa2eb","ºª©®™¤№"], -["8fa6e1","ΆΈΉΊΪ"], -["8fa6e7","Ό"], -["8fa6e9","ΎΫ"], -["8fa6ec","Ώ"], -["8fa6f1","άέήίϊΐόςύϋΰώ"], -["8fa7c2","Ђ",10,"ЎЏ"], -["8fa7f2","ђ",10,"ўџ"], -["8fa9a1","ÆĐ"], -["8fa9a4","Ħ"], -["8fa9a6","IJ"], -["8fa9a8","ŁĿ"], -["8fa9ab","ŊØŒ"], -["8fa9af","ŦÞ"], -["8fa9c1","æđðħıijĸłŀʼnŋøœßŧþ"], -["8faaa1","ÁÀÄÂĂǍĀĄÅÃĆĈČÇĊĎÉÈËÊĚĖĒĘ"], -["8faaba","ĜĞĢĠĤÍÌÏÎǏİĪĮĨĴĶĹĽĻŃŇŅÑÓÒÖÔǑŐŌÕŔŘŖŚŜŠŞŤŢÚÙÜÛŬǓŰŪŲŮŨǗǛǙǕŴÝŸŶŹŽŻ"], -["8faba1","áàäâăǎāąåãćĉčçċďéèëêěėēęǵĝğ"], -["8fabbd","ġĥíìïîǐ"], -["8fabc5","īįĩĵķĺľļńňņñóòöôǒőōõŕřŗśŝšşťţúùüûŭǔűūųůũǘǜǚǖŵýÿŷźžż"], -["8fb0a1","丂丄丅丌丒丟丣两丨丫丮丯丰丵乀乁乄乇乑乚乜乣乨乩乴乵乹乿亍亖亗亝亯亹仃仐仚仛仠仡仢仨仯仱仳仵份仾仿伀伂伃伈伋伌伒伕伖众伙伮伱你伳伵伷伹伻伾佀佂佈佉佋佌佒佔佖佘佟佣佪佬佮佱佷佸佹佺佽佾侁侂侄"], -["8fb1a1","侅侉侊侌侎侐侒侓侔侗侙侚侞侟侲侷侹侻侼侽侾俀俁俅俆俈俉俋俌俍俏俒俜俠俢俰俲俼俽俿倀倁倄倇倊倌倎倐倓倗倘倛倜倝倞倢倧倮倰倲倳倵偀偁偂偅偆偊偌偎偑偒偓偗偙偟偠偢偣偦偧偪偭偰偱倻傁傃傄傆傊傎傏傐"], -["8fb2a1","傒傓傔傖傛傜傞",4,"傪傯傰傹傺傽僀僃僄僇僌僎僐僓僔僘僜僝僟僢僤僦僨僩僯僱僶僺僾儃儆儇儈儋儌儍儎僲儐儗儙儛儜儝儞儣儧儨儬儭儯儱儳儴儵儸儹兂兊兏兓兕兗兘兟兤兦兾冃冄冋冎冘冝冡冣冭冸冺冼冾冿凂"], -["8fb3a1","凈减凑凒凓凕凘凞凢凥凮凲凳凴凷刁刂刅划刓刕刖刘刢刨刱刲刵刼剅剉剕剗剘剚剜剟剠剡剦剮剷剸剹劀劂劅劊劌劓劕劖劗劘劚劜劤劥劦劧劯劰劶劷劸劺劻劽勀勄勆勈勌勏勑勔勖勛勜勡勥勨勩勪勬勰勱勴勶勷匀匃匊匋"], -["8fb4a1","匌匑匓匘匛匜匞匟匥匧匨匩匫匬匭匰匲匵匼匽匾卂卌卋卙卛卡卣卥卬卭卲卹卾厃厇厈厎厓厔厙厝厡厤厪厫厯厲厴厵厷厸厺厽叀叅叏叒叓叕叚叝叞叠另叧叵吂吓吚吡吧吨吪启吱吴吵呃呄呇呍呏呞呢呤呦呧呩呫呭呮呴呿"], -["8fb5a1","咁咃咅咈咉咍咑咕咖咜咟咡咦咧咩咪咭咮咱咷咹咺咻咿哆哊响哎哠哪哬哯哶哼哾哿唀唁唅唈唉唌唍唎唕唪唫唲唵唶唻唼唽啁啇啉啊啍啐啑啘啚啛啞啠啡啤啦啿喁喂喆喈喎喏喑喒喓喔喗喣喤喭喲喿嗁嗃嗆嗉嗋嗌嗎嗑嗒"], -["8fb6a1","嗓嗗嗘嗛嗞嗢嗩嗶嗿嘅嘈嘊嘍",5,"嘙嘬嘰嘳嘵嘷嘹嘻嘼嘽嘿噀噁噃噄噆噉噋噍噏噔噞噠噡噢噣噦噩噭噯噱噲噵嚄嚅嚈嚋嚌嚕嚙嚚嚝嚞嚟嚦嚧嚨嚩嚫嚬嚭嚱嚳嚷嚾囅囉囊囋囏囐囌囍囙囜囝囟囡囤",4,"囱囫园"], -["8fb7a1","囶囷圁圂圇圊圌圑圕圚圛圝圠圢圣圤圥圩圪圬圮圯圳圴圽圾圿坅坆坌坍坒坢坥坧坨坫坭",4,"坳坴坵坷坹坺坻坼坾垁垃垌垔垗垙垚垜垝垞垟垡垕垧垨垩垬垸垽埇埈埌埏埕埝埞埤埦埧埩埭埰埵埶埸埽埾埿堃堄堈堉埡"], -["8fb8a1","堌堍堛堞堟堠堦堧堭堲堹堿塉塌塍塏塐塕塟塡塤塧塨塸塼塿墀墁墇墈墉墊墌墍墏墐墔墖墝墠墡墢墦墩墱墲壄墼壂壈壍壎壐壒壔壖壚壝壡壢壩壳夅夆夋夌夒夓夔虁夝夡夣夤夨夯夰夳夵夶夿奃奆奒奓奙奛奝奞奟奡奣奫奭"], -["8fb9a1","奯奲奵奶她奻奼妋妌妎妒妕妗妟妤妧妭妮妯妰妳妷妺妼姁姃姄姈姊姍姒姝姞姟姣姤姧姮姯姱姲姴姷娀娄娌娍娎娒娓娞娣娤娧娨娪娭娰婄婅婇婈婌婐婕婞婣婥婧婭婷婺婻婾媋媐媓媖媙媜媞媟媠媢媧媬媱媲媳媵媸媺媻媿"], -["8fbaa1","嫄嫆嫈嫏嫚嫜嫠嫥嫪嫮嫵嫶嫽嬀嬁嬈嬗嬴嬙嬛嬝嬡嬥嬭嬸孁孋孌孒孖孞孨孮孯孼孽孾孿宁宄宆宊宎宐宑宓宔宖宨宩宬宭宯宱宲宷宺宼寀寁寍寏寖",4,"寠寯寱寴寽尌尗尞尟尣尦尩尫尬尮尰尲尵尶屙屚屜屢屣屧屨屩"], -["8fbba1","屭屰屴屵屺屻屼屽岇岈岊岏岒岝岟岠岢岣岦岪岲岴岵岺峉峋峒峝峗峮峱峲峴崁崆崍崒崫崣崤崦崧崱崴崹崽崿嵂嵃嵆嵈嵕嵑嵙嵊嵟嵠嵡嵢嵤嵪嵭嵰嵹嵺嵾嵿嶁嶃嶈嶊嶒嶓嶔嶕嶙嶛嶟嶠嶧嶫嶰嶴嶸嶹巃巇巋巐巎巘巙巠巤"], -["8fbca1","巩巸巹帀帇帍帒帔帕帘帟帠帮帨帲帵帾幋幐幉幑幖幘幛幜幞幨幪",4,"幰庀庋庎庢庤庥庨庪庬庱庳庽庾庿廆廌廋廎廑廒廔廕廜廞廥廫异弆弇弈弎弙弜弝弡弢弣弤弨弫弬弮弰弴弶弻弽弿彀彄彅彇彍彐彔彘彛彠彣彤彧"], -["8fbda1","彯彲彴彵彸彺彽彾徉徍徏徖徜徝徢徧徫徤徬徯徰徱徸忄忇忈忉忋忐",4,"忞忡忢忨忩忪忬忭忮忯忲忳忶忺忼怇怊怍怓怔怗怘怚怟怤怭怳怵恀恇恈恉恌恑恔恖恗恝恡恧恱恾恿悂悆悈悊悎悑悓悕悘悝悞悢悤悥您悰悱悷"], -["8fbea1","悻悾惂惄惈惉惊惋惎惏惔惕惙惛惝惞惢惥惲惵惸惼惽愂愇愊愌愐",4,"愖愗愙愜愞愢愪愫愰愱愵愶愷愹慁慅慆慉慞慠慬慲慸慻慼慿憀憁憃憄憋憍憒憓憗憘憜憝憟憠憥憨憪憭憸憹憼懀懁懂懎懏懕懜懝懞懟懡懢懧懩懥"], -["8fbfa1","懬懭懯戁戃戄戇戓戕戜戠戢戣戧戩戫戹戽扂扃扄扆扌扐扑扒扔扖扚扜扤扭扯扳扺扽抍抎抏抐抦抨抳抶抷抺抾抿拄拎拕拖拚拪拲拴拼拽挃挄挊挋挍挐挓挖挘挩挪挭挵挶挹挼捁捂捃捄捆捊捋捎捒捓捔捘捛捥捦捬捭捱捴捵"], -["8fc0a1","捸捼捽捿掂掄掇掊掐掔掕掙掚掞掤掦掭掮掯掽揁揅揈揎揑揓揔揕揜揠揥揪揬揲揳揵揸揹搉搊搐搒搔搘搞搠搢搤搥搩搪搯搰搵搽搿摋摏摑摒摓摔摚摛摜摝摟摠摡摣摭摳摴摻摽撅撇撏撐撑撘撙撛撝撟撡撣撦撨撬撳撽撾撿"], -["8fc1a1","擄擉擊擋擌擎擐擑擕擗擤擥擩擪擭擰擵擷擻擿攁攄攈攉攊攏攓攔攖攙攛攞攟攢攦攩攮攱攺攼攽敃敇敉敐敒敔敟敠敧敫敺敽斁斅斊斒斕斘斝斠斣斦斮斲斳斴斿旂旈旉旎旐旔旖旘旟旰旲旴旵旹旾旿昀昄昈昉昍昑昒昕昖昝"], -["8fc2a1","昞昡昢昣昤昦昩昪昫昬昮昰昱昳昹昷晀晅晆晊晌晑晎晗晘晙晛晜晠晡曻晪晫晬晾晳晵晿晷晸晹晻暀晼暋暌暍暐暒暙暚暛暜暟暠暤暭暱暲暵暻暿曀曂曃曈曌曎曏曔曛曟曨曫曬曮曺朅朇朎朓朙朜朠朢朳朾杅杇杈杌杔杕杝"], -["8fc3a1","杦杬杮杴杶杻极构枎枏枑枓枖枘枙枛枰枱枲枵枻枼枽柹柀柂柃柅柈柉柒柗柙柜柡柦柰柲柶柷桒栔栙栝栟栨栧栬栭栯栰栱栳栻栿桄桅桊桌桕桗桘桛桫桮",4,"桵桹桺桻桼梂梄梆梈梖梘梚梜梡梣梥梩梪梮梲梻棅棈棌棏"], -["8fc4a1","棐棑棓棖棙棜棝棥棨棪棫棬棭棰棱棵棶棻棼棽椆椉椊椐椑椓椖椗椱椳椵椸椻楂楅楉楎楗楛楣楤楥楦楨楩楬楰楱楲楺楻楿榀榍榒榖榘榡榥榦榨榫榭榯榷榸榺榼槅槈槑槖槗槢槥槮槯槱槳槵槾樀樁樃樏樑樕樚樝樠樤樨樰樲"], -["8fc5a1","樴樷樻樾樿橅橆橉橊橎橐橑橒橕橖橛橤橧橪橱橳橾檁檃檆檇檉檋檑檛檝檞檟檥檫檯檰檱檴檽檾檿櫆櫉櫈櫌櫐櫔櫕櫖櫜櫝櫤櫧櫬櫰櫱櫲櫼櫽欂欃欆欇欉欏欐欑欗欛欞欤欨欫欬欯欵欶欻欿歆歊歍歒歖歘歝歠歧歫歮歰歵歽"], -["8fc6a1","歾殂殅殗殛殟殠殢殣殨殩殬殭殮殰殸殹殽殾毃毄毉毌毖毚毡毣毦毧毮毱毷毹毿氂氄氅氉氍氎氐氒氙氟氦氧氨氬氮氳氵氶氺氻氿汊汋汍汏汒汔汙汛汜汫汭汯汴汶汸汹汻沅沆沇沉沔沕沗沘沜沟沰沲沴泂泆泍泏泐泑泒泔泖"], -["8fc7a1","泚泜泠泧泩泫泬泮泲泴洄洇洊洎洏洑洓洚洦洧洨汧洮洯洱洹洼洿浗浞浟浡浥浧浯浰浼涂涇涑涒涔涖涗涘涪涬涴涷涹涽涿淄淈淊淎淏淖淛淝淟淠淢淥淩淯淰淴淶淼渀渄渞渢渧渲渶渹渻渼湄湅湈湉湋湏湑湒湓湔湗湜湝湞"], -["8fc8a1","湢湣湨湳湻湽溍溓溙溠溧溭溮溱溳溻溿滀滁滃滇滈滊滍滎滏滫滭滮滹滻滽漄漈漊漌漍漖漘漚漛漦漩漪漯漰漳漶漻漼漭潏潑潒潓潗潙潚潝潞潡潢潨潬潽潾澃澇澈澋澌澍澐澒澓澔澖澚澟澠澥澦澧澨澮澯澰澵澶澼濅濇濈濊"], -["8fc9a1","濚濞濨濩濰濵濹濼濽瀀瀅瀆瀇瀍瀗瀠瀣瀯瀴瀷瀹瀼灃灄灈灉灊灋灔灕灝灞灎灤灥灬灮灵灶灾炁炅炆炔",4,"炛炤炫炰炱炴炷烊烑烓烔烕烖烘烜烤烺焃",4,"焋焌焏焞焠焫焭焯焰焱焸煁煅煆煇煊煋煐煒煗煚煜煞煠"], -["8fcaa1","煨煹熀熅熇熌熒熚熛熠熢熯熰熲熳熺熿燀燁燄燋燌燓燖燙燚燜燸燾爀爇爈爉爓爗爚爝爟爤爫爯爴爸爹牁牂牃牅牎牏牐牓牕牖牚牜牞牠牣牨牫牮牯牱牷牸牻牼牿犄犉犍犎犓犛犨犭犮犱犴犾狁狇狉狌狕狖狘狟狥狳狴狺狻"], -["8fcba1","狾猂猄猅猇猋猍猒猓猘猙猞猢猤猧猨猬猱猲猵猺猻猽獃獍獐獒獖獘獝獞獟獠獦獧獩獫獬獮獯獱獷獹獼玀玁玃玅玆玎玐玓玕玗玘玜玞玟玠玢玥玦玪玫玭玵玷玹玼玽玿珅珆珉珋珌珏珒珓珖珙珝珡珣珦珧珩珴珵珷珹珺珻珽"], -["8fcca1","珿琀琁琄琇琊琑琚琛琤琦琨",9,"琹瑀瑃瑄瑆瑇瑋瑍瑑瑒瑗瑝瑢瑦瑧瑨瑫瑭瑮瑱瑲璀璁璅璆璇璉璏璐璑璒璘璙璚璜璟璠璡璣璦璨璩璪璫璮璯璱璲璵璹璻璿瓈瓉瓌瓐瓓瓘瓚瓛瓞瓟瓤瓨瓪瓫瓯瓴瓺瓻瓼瓿甆"], -["8fcda1","甒甖甗甠甡甤甧甩甪甯甶甹甽甾甿畀畃畇畈畎畐畒畗畞畟畡畯畱畹",5,"疁疅疐疒疓疕疙疜疢疤疴疺疿痀痁痄痆痌痎痏痗痜痟痠痡痤痧痬痮痯痱痹瘀瘂瘃瘄瘇瘈瘊瘌瘏瘒瘓瘕瘖瘙瘛瘜瘝瘞瘣瘥瘦瘩瘭瘲瘳瘵瘸瘹"], -["8fcea1","瘺瘼癊癀癁癃癄癅癉癋癕癙癟癤癥癭癮癯癱癴皁皅皌皍皕皛皜皝皟皠皢",6,"皪皭皽盁盅盉盋盌盎盔盙盠盦盨盬盰盱盶盹盼眀眆眊眎眒眔眕眗眙眚眜眢眨眭眮眯眴眵眶眹眽眾睂睅睆睊睍睎睏睒睖睗睜睞睟睠睢"], -["8fcfa1","睤睧睪睬睰睲睳睴睺睽瞀瞄瞌瞍瞔瞕瞖瞚瞟瞢瞧瞪瞮瞯瞱瞵瞾矃矉矑矒矕矙矞矟矠矤矦矪矬矰矱矴矸矻砅砆砉砍砎砑砝砡砢砣砭砮砰砵砷硃硄硇硈硌硎硒硜硞硠硡硣硤硨硪确硺硾碊碏碔碘碡碝碞碟碤碨碬碭碰碱碲碳"], -["8fd0a1","碻碽碿磇磈磉磌磎磒磓磕磖磤磛磟磠磡磦磪磲磳礀磶磷磺磻磿礆礌礐礚礜礞礟礠礥礧礩礭礱礴礵礻礽礿祄祅祆祊祋祏祑祔祘祛祜祧祩祫祲祹祻祼祾禋禌禑禓禔禕禖禘禛禜禡禨禩禫禯禱禴禸离秂秄秇秈秊秏秔秖秚秝秞"], -["8fd1a1","秠秢秥秪秫秭秱秸秼稂稃稇稉稊稌稑稕稛稞稡稧稫稭稯稰稴稵稸稹稺穄穅穇穈穌穕穖穙穜穝穟穠穥穧穪穭穵穸穾窀窂窅窆窊窋窐窑窔窞窠窣窬窳窵窹窻窼竆竉竌竎竑竛竨竩竫竬竱竴竻竽竾笇笔笟笣笧笩笪笫笭笮笯笰"], -["8fd2a1","笱笴笽笿筀筁筇筎筕筠筤筦筩筪筭筯筲筳筷箄箉箎箐箑箖箛箞箠箥箬箯箰箲箵箶箺箻箼箽篂篅篈篊篔篖篗篙篚篛篨篪篲篴篵篸篹篺篼篾簁簂簃簄簆簉簋簌簎簏簙簛簠簥簦簨簬簱簳簴簶簹簺籆籊籕籑籒籓籙",5], -["8fd3a1","籡籣籧籩籭籮籰籲籹籼籽粆粇粏粔粞粠粦粰粶粷粺粻粼粿糄糇糈糉糍糏糓糔糕糗糙糚糝糦糩糫糵紃紇紈紉紏紑紒紓紖紝紞紣紦紪紭紱紼紽紾絀絁絇絈絍絑絓絗絙絚絜絝絥絧絪絰絸絺絻絿綁綂綃綅綆綈綋綌綍綑綖綗綝"], -["8fd4a1","綞綦綧綪綳綶綷綹緂",4,"緌緍緎緗緙縀緢緥緦緪緫緭緱緵緶緹緺縈縐縑縕縗縜縝縠縧縨縬縭縯縳縶縿繄繅繇繎繐繒繘繟繡繢繥繫繮繯繳繸繾纁纆纇纊纍纑纕纘纚纝纞缼缻缽缾缿罃罄罇罏罒罓罛罜罝罡罣罤罥罦罭"], -["8fd5a1","罱罽罾罿羀羋羍羏羐羑羖羗羜羡羢羦羪羭羴羼羿翀翃翈翎翏翛翟翣翥翨翬翮翯翲翺翽翾翿耇耈耊耍耎耏耑耓耔耖耝耞耟耠耤耦耬耮耰耴耵耷耹耺耼耾聀聄聠聤聦聭聱聵肁肈肎肜肞肦肧肫肸肹胈胍胏胒胔胕胗胘胠胭胮"], -["8fd6a1","胰胲胳胶胹胺胾脃脋脖脗脘脜脞脠脤脧脬脰脵脺脼腅腇腊腌腒腗腠腡腧腨腩腭腯腷膁膐膄膅膆膋膎膖膘膛膞膢膮膲膴膻臋臃臅臊臎臏臕臗臛臝臞臡臤臫臬臰臱臲臵臶臸臹臽臿舀舃舏舓舔舙舚舝舡舢舨舲舴舺艃艄艅艆"], -["8fd7a1","艋艎艏艑艖艜艠艣艧艭艴艻艽艿芀芁芃芄芇芉芊芎芑芔芖芘芚芛芠芡芣芤芧芨芩芪芮芰芲芴芷芺芼芾芿苆苐苕苚苠苢苤苨苪苭苯苶苷苽苾茀茁茇茈茊茋荔茛茝茞茟茡茢茬茭茮茰茳茷茺茼茽荂荃荄荇荍荎荑荕荖荗荰荸"], -["8fd8a1","荽荿莀莂莄莆莍莒莔莕莘莙莛莜莝莦莧莩莬莾莿菀菇菉菏菐菑菔菝荓菨菪菶菸菹菼萁萆萊萏萑萕萙莭萯萹葅葇葈葊葍葏葑葒葖葘葙葚葜葠葤葥葧葪葰葳葴葶葸葼葽蒁蒅蒒蒓蒕蒞蒦蒨蒩蒪蒯蒱蒴蒺蒽蒾蓀蓂蓇蓈蓌蓏蓓"], -["8fd9a1","蓜蓧蓪蓯蓰蓱蓲蓷蔲蓺蓻蓽蔂蔃蔇蔌蔎蔐蔜蔞蔢蔣蔤蔥蔧蔪蔫蔯蔳蔴蔶蔿蕆蕏",4,"蕖蕙蕜",6,"蕤蕫蕯蕹蕺蕻蕽蕿薁薅薆薉薋薌薏薓薘薝薟薠薢薥薧薴薶薷薸薼薽薾薿藂藇藊藋藎薭藘藚藟藠藦藨藭藳藶藼"], -["8fdaa1","藿蘀蘄蘅蘍蘎蘐蘑蘒蘘蘙蘛蘞蘡蘧蘩蘶蘸蘺蘼蘽虀虂虆虒虓虖虗虘虙虝虠",4,"虩虬虯虵虶虷虺蚍蚑蚖蚘蚚蚜蚡蚦蚧蚨蚭蚱蚳蚴蚵蚷蚸蚹蚿蛀蛁蛃蛅蛑蛒蛕蛗蛚蛜蛠蛣蛥蛧蚈蛺蛼蛽蜄蜅蜇蜋蜎蜏蜐蜓蜔蜙蜞蜟蜡蜣"], -["8fdba1","蜨蜮蜯蜱蜲蜹蜺蜼蜽蜾蝀蝃蝅蝍蝘蝝蝡蝤蝥蝯蝱蝲蝻螃",6,"螋螌螐螓螕螗螘螙螞螠螣螧螬螭螮螱螵螾螿蟁蟈蟉蟊蟎蟕蟖蟙蟚蟜蟟蟢蟣蟤蟪蟫蟭蟱蟳蟸蟺蟿蠁蠃蠆蠉蠊蠋蠐蠙蠒蠓蠔蠘蠚蠛蠜蠞蠟蠨蠭蠮蠰蠲蠵"], -["8fdca1","蠺蠼衁衃衅衈衉衊衋衎衑衕衖衘衚衜衟衠衤衩衱衹衻袀袘袚袛袜袟袠袨袪袺袽袾裀裊",4,"裑裒裓裛裞裧裯裰裱裵裷褁褆褍褎褏褕褖褘褙褚褜褠褦褧褨褰褱褲褵褹褺褾襀襂襅襆襉襏襒襗襚襛襜襡襢襣襫襮襰襳襵襺"], -["8fdda1","襻襼襽覉覍覐覔覕覛覜覟覠覥覰覴覵覶覷覼觔",4,"觥觩觫觭觱觳觶觹觽觿訄訅訇訏訑訒訔訕訞訠訢訤訦訫訬訯訵訷訽訾詀詃詅詇詉詍詎詓詖詗詘詜詝詡詥詧詵詶詷詹詺詻詾詿誀誃誆誋誏誐誒誖誗誙誟誧誩誮誯誳"], -["8fdea1","誶誷誻誾諃諆諈諉諊諑諓諔諕諗諝諟諬諰諴諵諶諼諿謅謆謋謑謜謞謟謊謭謰謷謼譂",4,"譈譒譓譔譙譍譞譣譭譶譸譹譼譾讁讄讅讋讍讏讔讕讜讞讟谸谹谽谾豅豇豉豋豏豑豓豔豗豘豛豝豙豣豤豦豨豩豭豳豵豶豻豾貆"], -["8fdfa1","貇貋貐貒貓貙貛貜貤貹貺賅賆賉賋賏賖賕賙賝賡賨賬賯賰賲賵賷賸賾賿贁贃贉贒贗贛赥赩赬赮赿趂趄趈趍趐趑趕趞趟趠趦趫趬趯趲趵趷趹趻跀跅跆跇跈跊跎跑跔跕跗跙跤跥跧跬跰趼跱跲跴跽踁踄踅踆踋踑踔踖踠踡踢"], -["8fe0a1","踣踦踧踱踳踶踷踸踹踽蹀蹁蹋蹍蹎蹏蹔蹛蹜蹝蹞蹡蹢蹩蹬蹭蹯蹰蹱蹹蹺蹻躂躃躉躐躒躕躚躛躝躞躢躧躩躭躮躳躵躺躻軀軁軃軄軇軏軑軔軜軨軮軰軱軷軹軺軭輀輂輇輈輏輐輖輗輘輞輠輡輣輥輧輨輬輭輮輴輵輶輷輺轀轁"], -["8fe1a1","轃轇轏轑",4,"轘轝轞轥辝辠辡辤辥辦辵辶辸达迀迁迆迊迋迍运迒迓迕迠迣迤迨迮迱迵迶迻迾适逄逈逌逘逛逨逩逯逪逬逭逳逴逷逿遃遄遌遛遝遢遦遧遬遰遴遹邅邈邋邌邎邐邕邗邘邙邛邠邡邢邥邰邲邳邴邶邽郌邾郃"], -["8fe2a1","郄郅郇郈郕郗郘郙郜郝郟郥郒郶郫郯郰郴郾郿鄀鄄鄅鄆鄈鄍鄐鄔鄖鄗鄘鄚鄜鄞鄠鄥鄢鄣鄧鄩鄮鄯鄱鄴鄶鄷鄹鄺鄼鄽酃酇酈酏酓酗酙酚酛酡酤酧酭酴酹酺酻醁醃醅醆醊醎醑醓醔醕醘醞醡醦醨醬醭醮醰醱醲醳醶醻醼醽醿"], -["8fe3a1","釂釃釅釓釔釗釙釚釞釤釥釩釪釬",5,"釷釹釻釽鈀鈁鈄鈅鈆鈇鈉鈊鈌鈐鈒鈓鈖鈘鈜鈝鈣鈤鈥鈦鈨鈮鈯鈰鈳鈵鈶鈸鈹鈺鈼鈾鉀鉂鉃鉆鉇鉊鉍鉎鉏鉑鉘鉙鉜鉝鉠鉡鉥鉧鉨鉩鉮鉯鉰鉵",4,"鉻鉼鉽鉿銈銉銊銍銎銒銗"], -["8fe4a1","銙銟銠銤銥銧銨銫銯銲銶銸銺銻銼銽銿",4,"鋅鋆鋇鋈鋋鋌鋍鋎鋐鋓鋕鋗鋘鋙鋜鋝鋟鋠鋡鋣鋥鋧鋨鋬鋮鋰鋹鋻鋿錀錂錈錍錑錔錕錜錝錞錟錡錤錥錧錩錪錳錴錶錷鍇鍈鍉鍐鍑鍒鍕鍗鍘鍚鍞鍤鍥鍧鍩鍪鍭鍯鍰鍱鍳鍴鍶"], -["8fe5a1","鍺鍽鍿鎀鎁鎂鎈鎊鎋鎍鎏鎒鎕鎘鎛鎞鎡鎣鎤鎦鎨鎫鎴鎵鎶鎺鎩鏁鏄鏅鏆鏇鏉",4,"鏓鏙鏜鏞鏟鏢鏦鏧鏹鏷鏸鏺鏻鏽鐁鐂鐄鐈鐉鐍鐎鐏鐕鐖鐗鐟鐮鐯鐱鐲鐳鐴鐻鐿鐽鑃鑅鑈鑊鑌鑕鑙鑜鑟鑡鑣鑨鑫鑭鑮鑯鑱鑲钄钃镸镹"], -["8fe6a1","镾閄閈閌閍閎閝閞閟閡閦閩閫閬閴閶閺閽閿闆闈闉闋闐闑闒闓闙闚闝闞闟闠闤闦阝阞阢阤阥阦阬阱阳阷阸阹阺阼阽陁陒陔陖陗陘陡陮陴陻陼陾陿隁隂隃隄隉隑隖隚隝隟隤隥隦隩隮隯隳隺雊雒嶲雘雚雝雞雟雩雯雱雺霂"], -["8fe7a1","霃霅霉霚霛霝霡霢霣霨霱霳靁靃靊靎靏靕靗靘靚靛靣靧靪靮靳靶靷靸靻靽靿鞀鞉鞕鞖鞗鞙鞚鞞鞟鞢鞬鞮鞱鞲鞵鞶鞸鞹鞺鞼鞾鞿韁韄韅韇韉韊韌韍韎韐韑韔韗韘韙韝韞韠韛韡韤韯韱韴韷韸韺頇頊頙頍頎頔頖頜頞頠頣頦"], -["8fe8a1","頫頮頯頰頲頳頵頥頾顄顇顊顑顒顓顖顗顙顚顢顣顥顦顪顬颫颭颮颰颴颷颸颺颻颿飂飅飈飌飡飣飥飦飧飪飳飶餂餇餈餑餕餖餗餚餛餜餟餢餦餧餫餱",4,"餹餺餻餼饀饁饆饇饈饍饎饔饘饙饛饜饞饟饠馛馝馟馦馰馱馲馵"], -["8fe9a1","馹馺馽馿駃駉駓駔駙駚駜駞駧駪駫駬駰駴駵駹駽駾騂騃騄騋騌騐騑騖騞騠騢騣騤騧騭騮騳騵騶騸驇驁驄驊驋驌驎驑驔驖驝骪骬骮骯骲骴骵骶骹骻骾骿髁髃髆髈髎髐髒髕髖髗髛髜髠髤髥髧髩髬髲髳髵髹髺髽髿",4], -["8feaa1","鬄鬅鬈鬉鬋鬌鬍鬎鬐鬒鬖鬙鬛鬜鬠鬦鬫鬭鬳鬴鬵鬷鬹鬺鬽魈魋魌魕魖魗魛魞魡魣魥魦魨魪",4,"魳魵魷魸魹魿鮀鮄鮅鮆鮇鮉鮊鮋鮍鮏鮐鮔鮚鮝鮞鮦鮧鮩鮬鮰鮱鮲鮷鮸鮻鮼鮾鮿鯁鯇鯈鯎鯐鯗鯘鯝鯟鯥鯧鯪鯫鯯鯳鯷鯸"], -["8feba1","鯹鯺鯽鯿鰀鰂鰋鰏鰑鰖鰘鰙鰚鰜鰞鰢鰣鰦",4,"鰱鰵鰶鰷鰽鱁鱃鱄鱅鱉鱊鱎鱏鱐鱓鱔鱖鱘鱛鱝鱞鱟鱣鱩鱪鱜鱫鱨鱮鱰鱲鱵鱷鱻鳦鳲鳷鳹鴋鴂鴑鴗鴘鴜鴝鴞鴯鴰鴲鴳鴴鴺鴼鵅鴽鵂鵃鵇鵊鵓鵔鵟鵣鵢鵥鵩鵪鵫鵰鵶鵷鵻"], -["8feca1","鵼鵾鶃鶄鶆鶊鶍鶎鶒鶓鶕鶖鶗鶘鶡鶪鶬鶮鶱鶵鶹鶼鶿鷃鷇鷉鷊鷔鷕鷖鷗鷚鷞鷟鷠鷥鷧鷩鷫鷮鷰鷳鷴鷾鸊鸂鸇鸎鸐鸑鸒鸕鸖鸙鸜鸝鹺鹻鹼麀麂麃麄麅麇麎麏麖麘麛麞麤麨麬麮麯麰麳麴麵黆黈黋黕黟黤黧黬黭黮黰黱黲黵"], -["8feda1","黸黿鼂鼃鼉鼏鼐鼑鼒鼔鼖鼗鼙鼚鼛鼟鼢鼦鼪鼫鼯鼱鼲鼴鼷鼹鼺鼼鼽鼿齁齃",4,"齓齕齖齗齘齚齝齞齨齩齭",4,"齳齵齺齽龏龐龑龒龔龖龗龞龡龢龣龥"] -] diff --git a/node_modules/whatwg-encoding/node_modules/iconv-lite/encodings/tables/gb18030-ranges.json b/node_modules/whatwg-encoding/node_modules/iconv-lite/encodings/tables/gb18030-ranges.json deleted file mode 100644 index 85c6934..0000000 --- a/node_modules/whatwg-encoding/node_modules/iconv-lite/encodings/tables/gb18030-ranges.json +++ /dev/null @@ -1 +0,0 @@ -{"uChars":[128,165,169,178,184,216,226,235,238,244,248,251,253,258,276,284,300,325,329,334,364,463,465,467,469,471,473,475,477,506,594,610,712,716,730,930,938,962,970,1026,1104,1106,8209,8215,8218,8222,8231,8241,8244,8246,8252,8365,8452,8454,8458,8471,8482,8556,8570,8596,8602,8713,8720,8722,8726,8731,8737,8740,8742,8748,8751,8760,8766,8777,8781,8787,8802,8808,8816,8854,8858,8870,8896,8979,9322,9372,9548,9588,9616,9622,9634,9652,9662,9672,9676,9680,9702,9735,9738,9793,9795,11906,11909,11913,11917,11928,11944,11947,11951,11956,11960,11964,11979,12284,12292,12312,12319,12330,12351,12436,12447,12535,12543,12586,12842,12850,12964,13200,13215,13218,13253,13263,13267,13270,13384,13428,13727,13839,13851,14617,14703,14801,14816,14964,15183,15471,15585,16471,16736,17208,17325,17330,17374,17623,17997,18018,18212,18218,18301,18318,18760,18811,18814,18820,18823,18844,18848,18872,19576,19620,19738,19887,40870,59244,59336,59367,59413,59417,59423,59431,59437,59443,59452,59460,59478,59493,63789,63866,63894,63976,63986,64016,64018,64021,64025,64034,64037,64042,65074,65093,65107,65112,65127,65132,65375,65510,65536],"gbChars":[0,36,38,45,50,81,89,95,96,100,103,104,105,109,126,133,148,172,175,179,208,306,307,308,309,310,311,312,313,341,428,443,544,545,558,741,742,749,750,805,819,820,7922,7924,7925,7927,7934,7943,7944,7945,7950,8062,8148,8149,8152,8164,8174,8236,8240,8262,8264,8374,8380,8381,8384,8388,8390,8392,8393,8394,8396,8401,8406,8416,8419,8424,8437,8439,8445,8482,8485,8496,8521,8603,8936,8946,9046,9050,9063,9066,9076,9092,9100,9108,9111,9113,9131,9162,9164,9218,9219,11329,11331,11334,11336,11346,11361,11363,11366,11370,11372,11375,11389,11682,11686,11687,11692,11694,11714,11716,11723,11725,11730,11736,11982,11989,12102,12336,12348,12350,12384,12393,12395,12397,12510,12553,12851,12962,12973,13738,13823,13919,13933,14080,14298,14585,14698,15583,15847,16318,16434,16438,16481,16729,17102,17122,17315,17320,17402,17418,17859,17909,17911,17915,17916,17936,17939,17961,18664,18703,18814,18962,19043,33469,33470,33471,33484,33485,33490,33497,33501,33505,33513,33520,33536,33550,37845,37921,37948,38029,38038,38064,38065,38066,38069,38075,38076,38078,39108,39109,39113,39114,39115,39116,39265,39394,189000]} \ No newline at end of file diff --git a/node_modules/whatwg-encoding/node_modules/iconv-lite/encodings/tables/shiftjis.json b/node_modules/whatwg-encoding/node_modules/iconv-lite/encodings/tables/shiftjis.json deleted file mode 100644 index 5a3a43c..0000000 --- a/node_modules/whatwg-encoding/node_modules/iconv-lite/encodings/tables/shiftjis.json +++ /dev/null @@ -1,125 +0,0 @@ -[ -["0","\u0000",128], -["a1","。",62], -["8140"," 、。,.・:;?!゛゜´`¨^ ̄_ヽヾゝゞ〃仝々〆〇ー―‐/\~∥|…‥‘’“”()〔〕[]{}〈",9,"+-±×"], -["8180","÷=≠<>≦≧∞∴♂♀°′″℃¥$¢£%#&*@§☆★○●◎◇◆□■△▲▽▼※〒→←↑↓〓"], -["81b8","∈∋⊆⊇⊂⊃∪∩"], -["81c8","∧∨¬⇒⇔∀∃"], -["81da","∠⊥⌒∂∇≡≒≪≫√∽∝∵∫∬"], -["81f0","ʼn♯♭♪†‡¶"], -["81fc","◯"], -["824f","0",9], -["8260","A",25], -["8281","a",25], -["829f","ぁ",82], -["8340","ァ",62], -["8380","ム",22], -["839f","Α",16,"Σ",6], -["83bf","α",16,"σ",6], -["8440","А",5,"ЁЖ",25], -["8470","а",5,"ёж",7], -["8480","о",17], -["849f","─│┌┐┘└├┬┤┴┼━┃┏┓┛┗┣┳┫┻╋┠┯┨┷┿┝┰┥┸╂"], -["8740","①",19,"Ⅰ",9], -["875f","㍉㌔㌢㍍㌘㌧㌃㌶㍑㍗㌍㌦㌣㌫㍊㌻㎜㎝㎞㎎㎏㏄㎡"], -["877e","㍻"], -["8780","〝〟№㏍℡㊤",4,"㈱㈲㈹㍾㍽㍼≒≡∫∮∑√⊥∠∟⊿∵∩∪"], -["889f","亜唖娃阿哀愛挨姶逢葵茜穐悪握渥旭葦芦鯵梓圧斡扱宛姐虻飴絢綾鮎或粟袷安庵按暗案闇鞍杏以伊位依偉囲夷委威尉惟意慰易椅為畏異移維緯胃萎衣謂違遺医井亥域育郁磯一壱溢逸稲茨芋鰯允印咽員因姻引飲淫胤蔭"], -["8940","院陰隠韻吋右宇烏羽迂雨卯鵜窺丑碓臼渦嘘唄欝蔚鰻姥厩浦瓜閏噂云運雲荏餌叡営嬰影映曳栄永泳洩瑛盈穎頴英衛詠鋭液疫益駅悦謁越閲榎厭円"], -["8980","園堰奄宴延怨掩援沿演炎焔煙燕猿縁艶苑薗遠鉛鴛塩於汚甥凹央奥往応押旺横欧殴王翁襖鴬鴎黄岡沖荻億屋憶臆桶牡乙俺卸恩温穏音下化仮何伽価佳加可嘉夏嫁家寡科暇果架歌河火珂禍禾稼箇花苛茄荷華菓蝦課嘩貨迦過霞蚊俄峨我牙画臥芽蛾賀雅餓駕介会解回塊壊廻快怪悔恢懐戒拐改"], -["8a40","魁晦械海灰界皆絵芥蟹開階貝凱劾外咳害崖慨概涯碍蓋街該鎧骸浬馨蛙垣柿蛎鈎劃嚇各廓拡撹格核殻獲確穫覚角赫較郭閣隔革学岳楽額顎掛笠樫"], -["8a80","橿梶鰍潟割喝恰括活渇滑葛褐轄且鰹叶椛樺鞄株兜竃蒲釜鎌噛鴨栢茅萱粥刈苅瓦乾侃冠寒刊勘勧巻喚堪姦完官寛干幹患感慣憾換敢柑桓棺款歓汗漢澗潅環甘監看竿管簡緩缶翰肝艦莞観諌貫還鑑間閑関陥韓館舘丸含岸巌玩癌眼岩翫贋雁頑顔願企伎危喜器基奇嬉寄岐希幾忌揮机旗既期棋棄"], -["8b40","機帰毅気汽畿祈季稀紀徽規記貴起軌輝飢騎鬼亀偽儀妓宜戯技擬欺犠疑祇義蟻誼議掬菊鞠吉吃喫桔橘詰砧杵黍却客脚虐逆丘久仇休及吸宮弓急救"], -["8b80","朽求汲泣灸球究窮笈級糾給旧牛去居巨拒拠挙渠虚許距鋸漁禦魚亨享京供侠僑兇競共凶協匡卿叫喬境峡強彊怯恐恭挟教橋況狂狭矯胸脅興蕎郷鏡響饗驚仰凝尭暁業局曲極玉桐粁僅勤均巾錦斤欣欽琴禁禽筋緊芹菌衿襟謹近金吟銀九倶句区狗玖矩苦躯駆駈駒具愚虞喰空偶寓遇隅串櫛釧屑屈"], -["8c40","掘窟沓靴轡窪熊隈粂栗繰桑鍬勲君薫訓群軍郡卦袈祁係傾刑兄啓圭珪型契形径恵慶慧憩掲携敬景桂渓畦稽系経継繋罫茎荊蛍計詣警軽頚鶏芸迎鯨"], -["8c80","劇戟撃激隙桁傑欠決潔穴結血訣月件倹倦健兼券剣喧圏堅嫌建憲懸拳捲検権牽犬献研硯絹県肩見謙賢軒遣鍵険顕験鹸元原厳幻弦減源玄現絃舷言諺限乎個古呼固姑孤己庫弧戸故枯湖狐糊袴股胡菰虎誇跨鈷雇顧鼓五互伍午呉吾娯後御悟梧檎瑚碁語誤護醐乞鯉交佼侯候倖光公功効勾厚口向"], -["8d40","后喉坑垢好孔孝宏工巧巷幸広庚康弘恒慌抗拘控攻昂晃更杭校梗構江洪浩港溝甲皇硬稿糠紅紘絞綱耕考肯肱腔膏航荒行衡講貢購郊酵鉱砿鋼閤降"], -["8d80","項香高鴻剛劫号合壕拷濠豪轟麹克刻告国穀酷鵠黒獄漉腰甑忽惚骨狛込此頃今困坤墾婚恨懇昏昆根梱混痕紺艮魂些佐叉唆嵯左差査沙瑳砂詐鎖裟坐座挫債催再最哉塞妻宰彩才採栽歳済災采犀砕砦祭斎細菜裁載際剤在材罪財冴坂阪堺榊肴咲崎埼碕鷺作削咋搾昨朔柵窄策索錯桜鮭笹匙冊刷"], -["8e40","察拶撮擦札殺薩雑皐鯖捌錆鮫皿晒三傘参山惨撒散桟燦珊産算纂蚕讃賛酸餐斬暫残仕仔伺使刺司史嗣四士始姉姿子屍市師志思指支孜斯施旨枝止"], -["8e80","死氏獅祉私糸紙紫肢脂至視詞詩試誌諮資賜雌飼歯事似侍児字寺慈持時次滋治爾璽痔磁示而耳自蒔辞汐鹿式識鴫竺軸宍雫七叱執失嫉室悉湿漆疾質実蔀篠偲柴芝屡蕊縞舎写射捨赦斜煮社紗者謝車遮蛇邪借勺尺杓灼爵酌釈錫若寂弱惹主取守手朱殊狩珠種腫趣酒首儒受呪寿授樹綬需囚収周"], -["8f40","宗就州修愁拾洲秀秋終繍習臭舟蒐衆襲讐蹴輯週酋酬集醜什住充十従戎柔汁渋獣縦重銃叔夙宿淑祝縮粛塾熟出術述俊峻春瞬竣舜駿准循旬楯殉淳"], -["8f80","準潤盾純巡遵醇順処初所暑曙渚庶緒署書薯藷諸助叙女序徐恕鋤除傷償勝匠升召哨商唱嘗奨妾娼宵将小少尚庄床廠彰承抄招掌捷昇昌昭晶松梢樟樵沼消渉湘焼焦照症省硝礁祥称章笑粧紹肖菖蒋蕉衝裳訟証詔詳象賞醤鉦鍾鐘障鞘上丈丞乗冗剰城場壌嬢常情擾条杖浄状畳穣蒸譲醸錠嘱埴飾"], -["9040","拭植殖燭織職色触食蝕辱尻伸信侵唇娠寝審心慎振新晋森榛浸深申疹真神秦紳臣芯薪親診身辛進針震人仁刃塵壬尋甚尽腎訊迅陣靭笥諏須酢図厨"], -["9080","逗吹垂帥推水炊睡粋翠衰遂酔錐錘随瑞髄崇嵩数枢趨雛据杉椙菅頗雀裾澄摺寸世瀬畝是凄制勢姓征性成政整星晴棲栖正清牲生盛精聖声製西誠誓請逝醒青静斉税脆隻席惜戚斥昔析石積籍績脊責赤跡蹟碩切拙接摂折設窃節説雪絶舌蝉仙先千占宣専尖川戦扇撰栓栴泉浅洗染潜煎煽旋穿箭線"], -["9140","繊羨腺舛船薦詮賎践選遷銭銑閃鮮前善漸然全禅繕膳糎噌塑岨措曾曽楚狙疏疎礎祖租粗素組蘇訴阻遡鼠僧創双叢倉喪壮奏爽宋層匝惣想捜掃挿掻"], -["9180","操早曹巣槍槽漕燥争痩相窓糟総綜聡草荘葬蒼藻装走送遭鎗霜騒像増憎臓蔵贈造促側則即息捉束測足速俗属賊族続卒袖其揃存孫尊損村遜他多太汰詑唾堕妥惰打柁舵楕陀駄騨体堆対耐岱帯待怠態戴替泰滞胎腿苔袋貸退逮隊黛鯛代台大第醍題鷹滝瀧卓啄宅托択拓沢濯琢託鐸濁諾茸凧蛸只"], -["9240","叩但達辰奪脱巽竪辿棚谷狸鱈樽誰丹単嘆坦担探旦歎淡湛炭短端箪綻耽胆蛋誕鍛団壇弾断暖檀段男談値知地弛恥智池痴稚置致蜘遅馳築畜竹筑蓄"], -["9280","逐秩窒茶嫡着中仲宙忠抽昼柱注虫衷註酎鋳駐樗瀦猪苧著貯丁兆凋喋寵帖帳庁弔張彫徴懲挑暢朝潮牒町眺聴脹腸蝶調諜超跳銚長頂鳥勅捗直朕沈珍賃鎮陳津墜椎槌追鎚痛通塚栂掴槻佃漬柘辻蔦綴鍔椿潰坪壷嬬紬爪吊釣鶴亭低停偵剃貞呈堤定帝底庭廷弟悌抵挺提梯汀碇禎程締艇訂諦蹄逓"], -["9340","邸鄭釘鼎泥摘擢敵滴的笛適鏑溺哲徹撤轍迭鉄典填天展店添纏甜貼転顛点伝殿澱田電兎吐堵塗妬屠徒斗杜渡登菟賭途都鍍砥砺努度土奴怒倒党冬"], -["9380","凍刀唐塔塘套宕島嶋悼投搭東桃梼棟盗淘湯涛灯燈当痘祷等答筒糖統到董蕩藤討謄豆踏逃透鐙陶頭騰闘働動同堂導憧撞洞瞳童胴萄道銅峠鴇匿得徳涜特督禿篤毒独読栃橡凸突椴届鳶苫寅酉瀞噸屯惇敦沌豚遁頓呑曇鈍奈那内乍凪薙謎灘捺鍋楢馴縄畷南楠軟難汝二尼弐迩匂賑肉虹廿日乳入"], -["9440","如尿韮任妊忍認濡禰祢寧葱猫熱年念捻撚燃粘乃廼之埜嚢悩濃納能脳膿農覗蚤巴把播覇杷波派琶破婆罵芭馬俳廃拝排敗杯盃牌背肺輩配倍培媒梅"], -["9480","楳煤狽買売賠陪這蝿秤矧萩伯剥博拍柏泊白箔粕舶薄迫曝漠爆縛莫駁麦函箱硲箸肇筈櫨幡肌畑畠八鉢溌発醗髪伐罰抜筏閥鳩噺塙蛤隼伴判半反叛帆搬斑板氾汎版犯班畔繁般藩販範釆煩頒飯挽晩番盤磐蕃蛮匪卑否妃庇彼悲扉批披斐比泌疲皮碑秘緋罷肥被誹費避非飛樋簸備尾微枇毘琵眉美"], -["9540","鼻柊稗匹疋髭彦膝菱肘弼必畢筆逼桧姫媛紐百謬俵彪標氷漂瓢票表評豹廟描病秒苗錨鋲蒜蛭鰭品彬斌浜瀕貧賓頻敏瓶不付埠夫婦富冨布府怖扶敷"], -["9580","斧普浮父符腐膚芙譜負賦赴阜附侮撫武舞葡蕪部封楓風葺蕗伏副復幅服福腹複覆淵弗払沸仏物鮒分吻噴墳憤扮焚奮粉糞紛雰文聞丙併兵塀幣平弊柄並蔽閉陛米頁僻壁癖碧別瞥蔑箆偏変片篇編辺返遍便勉娩弁鞭保舗鋪圃捕歩甫補輔穂募墓慕戊暮母簿菩倣俸包呆報奉宝峰峯崩庖抱捧放方朋"], -["9640","法泡烹砲縫胞芳萌蓬蜂褒訪豊邦鋒飽鳳鵬乏亡傍剖坊妨帽忘忙房暴望某棒冒紡肪膨謀貌貿鉾防吠頬北僕卜墨撲朴牧睦穆釦勃没殆堀幌奔本翻凡盆"], -["9680","摩磨魔麻埋妹昧枚毎哩槙幕膜枕鮪柾鱒桝亦俣又抹末沫迄侭繭麿万慢満漫蔓味未魅巳箕岬密蜜湊蓑稔脈妙粍民眠務夢無牟矛霧鵡椋婿娘冥名命明盟迷銘鳴姪牝滅免棉綿緬面麺摸模茂妄孟毛猛盲網耗蒙儲木黙目杢勿餅尤戻籾貰問悶紋門匁也冶夜爺耶野弥矢厄役約薬訳躍靖柳薮鑓愉愈油癒"], -["9740","諭輸唯佑優勇友宥幽悠憂揖有柚湧涌猶猷由祐裕誘遊邑郵雄融夕予余与誉輿預傭幼妖容庸揚揺擁曜楊様洋溶熔用窯羊耀葉蓉要謡踊遥陽養慾抑欲"], -["9780","沃浴翌翼淀羅螺裸来莱頼雷洛絡落酪乱卵嵐欄濫藍蘭覧利吏履李梨理璃痢裏裡里離陸律率立葎掠略劉流溜琉留硫粒隆竜龍侶慮旅虜了亮僚両凌寮料梁涼猟療瞭稜糧良諒遼量陵領力緑倫厘林淋燐琳臨輪隣鱗麟瑠塁涙累類令伶例冷励嶺怜玲礼苓鈴隷零霊麗齢暦歴列劣烈裂廉恋憐漣煉簾練聯"], -["9840","蓮連錬呂魯櫓炉賂路露労婁廊弄朗楼榔浪漏牢狼篭老聾蝋郎六麓禄肋録論倭和話歪賄脇惑枠鷲亙亘鰐詫藁蕨椀湾碗腕"], -["989f","弌丐丕个丱丶丼丿乂乖乘亂亅豫亊舒弍于亞亟亠亢亰亳亶从仍仄仆仂仗仞仭仟价伉佚估佛佝佗佇佶侈侏侘佻佩佰侑佯來侖儘俔俟俎俘俛俑俚俐俤俥倚倨倔倪倥倅伜俶倡倩倬俾俯們倆偃假會偕偐偈做偖偬偸傀傚傅傴傲"], -["9940","僉僊傳僂僖僞僥僭僣僮價僵儉儁儂儖儕儔儚儡儺儷儼儻儿兀兒兌兔兢竸兩兪兮冀冂囘册冉冏冑冓冕冖冤冦冢冩冪冫决冱冲冰况冽凅凉凛几處凩凭"], -["9980","凰凵凾刄刋刔刎刧刪刮刳刹剏剄剋剌剞剔剪剴剩剳剿剽劍劔劒剱劈劑辨辧劬劭劼劵勁勍勗勞勣勦飭勠勳勵勸勹匆匈甸匍匐匏匕匚匣匯匱匳匸區卆卅丗卉卍凖卞卩卮夘卻卷厂厖厠厦厥厮厰厶參簒雙叟曼燮叮叨叭叺吁吽呀听吭吼吮吶吩吝呎咏呵咎呟呱呷呰咒呻咀呶咄咐咆哇咢咸咥咬哄哈咨"], -["9a40","咫哂咤咾咼哘哥哦唏唔哽哮哭哺哢唹啀啣啌售啜啅啖啗唸唳啝喙喀咯喊喟啻啾喘喞單啼喃喩喇喨嗚嗅嗟嗄嗜嗤嗔嘔嗷嘖嗾嗽嘛嗹噎噐營嘴嘶嘲嘸"], -["9a80","噫噤嘯噬噪嚆嚀嚊嚠嚔嚏嚥嚮嚶嚴囂嚼囁囃囀囈囎囑囓囗囮囹圀囿圄圉圈國圍圓團圖嗇圜圦圷圸坎圻址坏坩埀垈坡坿垉垓垠垳垤垪垰埃埆埔埒埓堊埖埣堋堙堝塲堡塢塋塰毀塒堽塹墅墹墟墫墺壞墻墸墮壅壓壑壗壙壘壥壜壤壟壯壺壹壻壼壽夂夊夐夛梦夥夬夭夲夸夾竒奕奐奎奚奘奢奠奧奬奩"], -["9b40","奸妁妝佞侫妣妲姆姨姜妍姙姚娥娟娑娜娉娚婀婬婉娵娶婢婪媚媼媾嫋嫂媽嫣嫗嫦嫩嫖嫺嫻嬌嬋嬖嬲嫐嬪嬶嬾孃孅孀孑孕孚孛孥孩孰孳孵學斈孺宀"], -["9b80","它宦宸寃寇寉寔寐寤實寢寞寥寫寰寶寳尅將專對尓尠尢尨尸尹屁屆屎屓屐屏孱屬屮乢屶屹岌岑岔妛岫岻岶岼岷峅岾峇峙峩峽峺峭嶌峪崋崕崗嵜崟崛崑崔崢崚崙崘嵌嵒嵎嵋嵬嵳嵶嶇嶄嶂嶢嶝嶬嶮嶽嶐嶷嶼巉巍巓巒巖巛巫已巵帋帚帙帑帛帶帷幄幃幀幎幗幔幟幢幤幇幵并幺麼广庠廁廂廈廐廏"], -["9c40","廖廣廝廚廛廢廡廨廩廬廱廳廰廴廸廾弃弉彝彜弋弑弖弩弭弸彁彈彌彎弯彑彖彗彙彡彭彳彷徃徂彿徊很徑徇從徙徘徠徨徭徼忖忻忤忸忱忝悳忿怡恠"], -["9c80","怙怐怩怎怱怛怕怫怦怏怺恚恁恪恷恟恊恆恍恣恃恤恂恬恫恙悁悍惧悃悚悄悛悖悗悒悧悋惡悸惠惓悴忰悽惆悵惘慍愕愆惶惷愀惴惺愃愡惻惱愍愎慇愾愨愧慊愿愼愬愴愽慂慄慳慷慘慙慚慫慴慯慥慱慟慝慓慵憙憖憇憬憔憚憊憑憫憮懌懊應懷懈懃懆憺懋罹懍懦懣懶懺懴懿懽懼懾戀戈戉戍戌戔戛"], -["9d40","戞戡截戮戰戲戳扁扎扞扣扛扠扨扼抂抉找抒抓抖拔抃抔拗拑抻拏拿拆擔拈拜拌拊拂拇抛拉挌拮拱挧挂挈拯拵捐挾捍搜捏掖掎掀掫捶掣掏掉掟掵捫"], -["9d80","捩掾揩揀揆揣揉插揶揄搖搴搆搓搦搶攝搗搨搏摧摯摶摎攪撕撓撥撩撈撼據擒擅擇撻擘擂擱擧舉擠擡抬擣擯攬擶擴擲擺攀擽攘攜攅攤攣攫攴攵攷收攸畋效敖敕敍敘敞敝敲數斂斃變斛斟斫斷旃旆旁旄旌旒旛旙无旡旱杲昊昃旻杳昵昶昴昜晏晄晉晁晞晝晤晧晨晟晢晰暃暈暎暉暄暘暝曁暹曉暾暼"], -["9e40","曄暸曖曚曠昿曦曩曰曵曷朏朖朞朦朧霸朮朿朶杁朸朷杆杞杠杙杣杤枉杰枩杼杪枌枋枦枡枅枷柯枴柬枳柩枸柤柞柝柢柮枹柎柆柧檜栞框栩桀桍栲桎"], -["9e80","梳栫桙档桷桿梟梏梭梔條梛梃檮梹桴梵梠梺椏梍桾椁棊椈棘椢椦棡椌棍棔棧棕椶椒椄棗棣椥棹棠棯椨椪椚椣椡棆楹楷楜楸楫楔楾楮椹楴椽楙椰楡楞楝榁楪榲榮槐榿槁槓榾槎寨槊槝榻槃榧樮榑榠榜榕榴槞槨樂樛槿權槹槲槧樅榱樞槭樔槫樊樒櫁樣樓橄樌橲樶橸橇橢橙橦橈樸樢檐檍檠檄檢檣"], -["9f40","檗蘗檻櫃櫂檸檳檬櫞櫑櫟檪櫚櫪櫻欅蘖櫺欒欖鬱欟欸欷盜欹飮歇歃歉歐歙歔歛歟歡歸歹歿殀殄殃殍殘殕殞殤殪殫殯殲殱殳殷殼毆毋毓毟毬毫毳毯"], -["9f80","麾氈氓气氛氤氣汞汕汢汪沂沍沚沁沛汾汨汳沒沐泄泱泓沽泗泅泝沮沱沾沺泛泯泙泪洟衍洶洫洽洸洙洵洳洒洌浣涓浤浚浹浙涎涕濤涅淹渕渊涵淇淦涸淆淬淞淌淨淒淅淺淙淤淕淪淮渭湮渮渙湲湟渾渣湫渫湶湍渟湃渺湎渤滿渝游溂溪溘滉溷滓溽溯滄溲滔滕溏溥滂溟潁漑灌滬滸滾漿滲漱滯漲滌"], -["e040","漾漓滷澆潺潸澁澀潯潛濳潭澂潼潘澎澑濂潦澳澣澡澤澹濆澪濟濕濬濔濘濱濮濛瀉瀋濺瀑瀁瀏濾瀛瀚潴瀝瀘瀟瀰瀾瀲灑灣炙炒炯烱炬炸炳炮烟烋烝"], -["e080","烙焉烽焜焙煥煕熈煦煢煌煖煬熏燻熄熕熨熬燗熹熾燒燉燔燎燠燬燧燵燼燹燿爍爐爛爨爭爬爰爲爻爼爿牀牆牋牘牴牾犂犁犇犒犖犢犧犹犲狃狆狄狎狒狢狠狡狹狷倏猗猊猜猖猝猴猯猩猥猾獎獏默獗獪獨獰獸獵獻獺珈玳珎玻珀珥珮珞璢琅瑯琥珸琲琺瑕琿瑟瑙瑁瑜瑩瑰瑣瑪瑶瑾璋璞璧瓊瓏瓔珱"], -["e140","瓠瓣瓧瓩瓮瓲瓰瓱瓸瓷甄甃甅甌甎甍甕甓甞甦甬甼畄畍畊畉畛畆畚畩畤畧畫畭畸當疆疇畴疊疉疂疔疚疝疥疣痂疳痃疵疽疸疼疱痍痊痒痙痣痞痾痿"], -["e180","痼瘁痰痺痲痳瘋瘍瘉瘟瘧瘠瘡瘢瘤瘴瘰瘻癇癈癆癜癘癡癢癨癩癪癧癬癰癲癶癸發皀皃皈皋皎皖皓皙皚皰皴皸皹皺盂盍盖盒盞盡盥盧盪蘯盻眈眇眄眩眤眞眥眦眛眷眸睇睚睨睫睛睥睿睾睹瞎瞋瞑瞠瞞瞰瞶瞹瞿瞼瞽瞻矇矍矗矚矜矣矮矼砌砒礦砠礪硅碎硴碆硼碚碌碣碵碪碯磑磆磋磔碾碼磅磊磬"], -["e240","磧磚磽磴礇礒礑礙礬礫祀祠祗祟祚祕祓祺祿禊禝禧齋禪禮禳禹禺秉秕秧秬秡秣稈稍稘稙稠稟禀稱稻稾稷穃穗穉穡穢穩龝穰穹穽窈窗窕窘窖窩竈窰"], -["e280","窶竅竄窿邃竇竊竍竏竕竓站竚竝竡竢竦竭竰笂笏笊笆笳笘笙笞笵笨笶筐筺笄筍笋筌筅筵筥筴筧筰筱筬筮箝箘箟箍箜箚箋箒箏筝箙篋篁篌篏箴篆篝篩簑簔篦篥籠簀簇簓篳篷簗簍篶簣簧簪簟簷簫簽籌籃籔籏籀籐籘籟籤籖籥籬籵粃粐粤粭粢粫粡粨粳粲粱粮粹粽糀糅糂糘糒糜糢鬻糯糲糴糶糺紆"], -["e340","紂紜紕紊絅絋紮紲紿紵絆絳絖絎絲絨絮絏絣經綉絛綏絽綛綺綮綣綵緇綽綫總綢綯緜綸綟綰緘緝緤緞緻緲緡縅縊縣縡縒縱縟縉縋縢繆繦縻縵縹繃縷"], -["e380","縲縺繧繝繖繞繙繚繹繪繩繼繻纃緕繽辮繿纈纉續纒纐纓纔纖纎纛纜缸缺罅罌罍罎罐网罕罔罘罟罠罨罩罧罸羂羆羃羈羇羌羔羞羝羚羣羯羲羹羮羶羸譱翅翆翊翕翔翡翦翩翳翹飜耆耄耋耒耘耙耜耡耨耿耻聊聆聒聘聚聟聢聨聳聲聰聶聹聽聿肄肆肅肛肓肚肭冐肬胛胥胙胝胄胚胖脉胯胱脛脩脣脯腋"], -["e440","隋腆脾腓腑胼腱腮腥腦腴膃膈膊膀膂膠膕膤膣腟膓膩膰膵膾膸膽臀臂膺臉臍臑臙臘臈臚臟臠臧臺臻臾舁舂舅與舊舍舐舖舩舫舸舳艀艙艘艝艚艟艤"], -["e480","艢艨艪艫舮艱艷艸艾芍芒芫芟芻芬苡苣苟苒苴苳苺莓范苻苹苞茆苜茉苙茵茴茖茲茱荀茹荐荅茯茫茗茘莅莚莪莟莢莖茣莎莇莊荼莵荳荵莠莉莨菴萓菫菎菽萃菘萋菁菷萇菠菲萍萢萠莽萸蔆菻葭萪萼蕚蒄葷葫蒭葮蒂葩葆萬葯葹萵蓊葢蒹蒿蒟蓙蓍蒻蓚蓐蓁蓆蓖蒡蔡蓿蓴蔗蔘蔬蔟蔕蔔蓼蕀蕣蕘蕈"], -["e540","蕁蘂蕋蕕薀薤薈薑薊薨蕭薔薛藪薇薜蕷蕾薐藉薺藏薹藐藕藝藥藜藹蘊蘓蘋藾藺蘆蘢蘚蘰蘿虍乕虔號虧虱蚓蚣蚩蚪蚋蚌蚶蚯蛄蛆蚰蛉蠣蚫蛔蛞蛩蛬"], -["e580","蛟蛛蛯蜒蜆蜈蜀蜃蛻蜑蜉蜍蛹蜊蜴蜿蜷蜻蜥蜩蜚蝠蝟蝸蝌蝎蝴蝗蝨蝮蝙蝓蝣蝪蠅螢螟螂螯蟋螽蟀蟐雖螫蟄螳蟇蟆螻蟯蟲蟠蠏蠍蟾蟶蟷蠎蟒蠑蠖蠕蠢蠡蠱蠶蠹蠧蠻衄衂衒衙衞衢衫袁衾袞衵衽袵衲袂袗袒袮袙袢袍袤袰袿袱裃裄裔裘裙裝裹褂裼裴裨裲褄褌褊褓襃褞褥褪褫襁襄褻褶褸襌褝襠襞"], -["e640","襦襤襭襪襯襴襷襾覃覈覊覓覘覡覩覦覬覯覲覺覽覿觀觚觜觝觧觴觸訃訖訐訌訛訝訥訶詁詛詒詆詈詼詭詬詢誅誂誄誨誡誑誥誦誚誣諄諍諂諚諫諳諧"], -["e680","諤諱謔諠諢諷諞諛謌謇謚諡謖謐謗謠謳鞫謦謫謾謨譁譌譏譎證譖譛譚譫譟譬譯譴譽讀讌讎讒讓讖讙讚谺豁谿豈豌豎豐豕豢豬豸豺貂貉貅貊貍貎貔豼貘戝貭貪貽貲貳貮貶賈賁賤賣賚賽賺賻贄贅贊贇贏贍贐齎贓賍贔贖赧赭赱赳趁趙跂趾趺跏跚跖跌跛跋跪跫跟跣跼踈踉跿踝踞踐踟蹂踵踰踴蹊"], -["e740","蹇蹉蹌蹐蹈蹙蹤蹠踪蹣蹕蹶蹲蹼躁躇躅躄躋躊躓躑躔躙躪躡躬躰軆躱躾軅軈軋軛軣軼軻軫軾輊輅輕輒輙輓輜輟輛輌輦輳輻輹轅轂輾轌轉轆轎轗轜"], -["e780","轢轣轤辜辟辣辭辯辷迚迥迢迪迯邇迴逅迹迺逑逕逡逍逞逖逋逧逶逵逹迸遏遐遑遒逎遉逾遖遘遞遨遯遶隨遲邂遽邁邀邊邉邏邨邯邱邵郢郤扈郛鄂鄒鄙鄲鄰酊酖酘酣酥酩酳酲醋醉醂醢醫醯醪醵醴醺釀釁釉釋釐釖釟釡釛釼釵釶鈞釿鈔鈬鈕鈑鉞鉗鉅鉉鉤鉈銕鈿鉋鉐銜銖銓銛鉚鋏銹銷鋩錏鋺鍄錮"], -["e840","錙錢錚錣錺錵錻鍜鍠鍼鍮鍖鎰鎬鎭鎔鎹鏖鏗鏨鏥鏘鏃鏝鏐鏈鏤鐚鐔鐓鐃鐇鐐鐶鐫鐵鐡鐺鑁鑒鑄鑛鑠鑢鑞鑪鈩鑰鑵鑷鑽鑚鑼鑾钁鑿閂閇閊閔閖閘閙"], -["e880","閠閨閧閭閼閻閹閾闊濶闃闍闌闕闔闖關闡闥闢阡阨阮阯陂陌陏陋陷陜陞陝陟陦陲陬隍隘隕隗險隧隱隲隰隴隶隸隹雎雋雉雍襍雜霍雕雹霄霆霈霓霎霑霏霖霙霤霪霰霹霽霾靄靆靈靂靉靜靠靤靦靨勒靫靱靹鞅靼鞁靺鞆鞋鞏鞐鞜鞨鞦鞣鞳鞴韃韆韈韋韜韭齏韲竟韶韵頏頌頸頤頡頷頽顆顏顋顫顯顰"], -["e940","顱顴顳颪颯颱颶飄飃飆飩飫餃餉餒餔餘餡餝餞餤餠餬餮餽餾饂饉饅饐饋饑饒饌饕馗馘馥馭馮馼駟駛駝駘駑駭駮駱駲駻駸騁騏騅駢騙騫騷驅驂驀驃"], -["e980","騾驕驍驛驗驟驢驥驤驩驫驪骭骰骼髀髏髑髓體髞髟髢髣髦髯髫髮髴髱髷髻鬆鬘鬚鬟鬢鬣鬥鬧鬨鬩鬪鬮鬯鬲魄魃魏魍魎魑魘魴鮓鮃鮑鮖鮗鮟鮠鮨鮴鯀鯊鮹鯆鯏鯑鯒鯣鯢鯤鯔鯡鰺鯲鯱鯰鰕鰔鰉鰓鰌鰆鰈鰒鰊鰄鰮鰛鰥鰤鰡鰰鱇鰲鱆鰾鱚鱠鱧鱶鱸鳧鳬鳰鴉鴈鳫鴃鴆鴪鴦鶯鴣鴟鵄鴕鴒鵁鴿鴾鵆鵈"], -["ea40","鵝鵞鵤鵑鵐鵙鵲鶉鶇鶫鵯鵺鶚鶤鶩鶲鷄鷁鶻鶸鶺鷆鷏鷂鷙鷓鷸鷦鷭鷯鷽鸚鸛鸞鹵鹹鹽麁麈麋麌麒麕麑麝麥麩麸麪麭靡黌黎黏黐黔黜點黝黠黥黨黯"], -["ea80","黴黶黷黹黻黼黽鼇鼈皷鼕鼡鼬鼾齊齒齔齣齟齠齡齦齧齬齪齷齲齶龕龜龠堯槇遙瑤凜熙"], -["ed40","纊褜鍈銈蓜俉炻昱棈鋹曻彅丨仡仼伀伃伹佖侒侊侚侔俍偀倢俿倞偆偰偂傔僴僘兊兤冝冾凬刕劜劦勀勛匀匇匤卲厓厲叝﨎咜咊咩哿喆坙坥垬埈埇﨏"], -["ed80","塚增墲夋奓奛奝奣妤妺孖寀甯寘寬尞岦岺峵崧嵓﨑嵂嵭嶸嶹巐弡弴彧德忞恝悅悊惞惕愠惲愑愷愰憘戓抦揵摠撝擎敎昀昕昻昉昮昞昤晥晗晙晴晳暙暠暲暿曺朎朗杦枻桒柀栁桄棏﨓楨﨔榘槢樰橫橆橳橾櫢櫤毖氿汜沆汯泚洄涇浯涖涬淏淸淲淼渹湜渧渼溿澈澵濵瀅瀇瀨炅炫焏焄煜煆煇凞燁燾犱"], -["ee40","犾猤猪獷玽珉珖珣珒琇珵琦琪琩琮瑢璉璟甁畯皂皜皞皛皦益睆劯砡硎硤硺礰礼神祥禔福禛竑竧靖竫箞精絈絜綷綠緖繒罇羡羽茁荢荿菇菶葈蒴蕓蕙"], -["ee80","蕫﨟薰蘒﨡蠇裵訒訷詹誧誾諟諸諶譓譿賰賴贒赶﨣軏﨤逸遧郞都鄕鄧釚釗釞釭釮釤釥鈆鈐鈊鈺鉀鈼鉎鉙鉑鈹鉧銧鉷鉸鋧鋗鋙鋐﨧鋕鋠鋓錥錡鋻﨨錞鋿錝錂鍰鍗鎤鏆鏞鏸鐱鑅鑈閒隆﨩隝隯霳霻靃靍靏靑靕顗顥飯飼餧館馞驎髙髜魵魲鮏鮱鮻鰀鵰鵫鶴鸙黑"], -["eeef","ⅰ",9,"¬¦'""], -["f040","",62], -["f080","",124], -["f140","",62], -["f180","",124], -["f240","",62], -["f280","",124], -["f340","",62], -["f380","",124], -["f440","",62], -["f480","",124], -["f540","",62], -["f580","",124], -["f640","",62], -["f680","",124], -["f740","",62], -["f780","",124], -["f840","",62], -["f880","",124], -["f940",""], -["fa40","ⅰ",9,"Ⅰ",9,"¬¦'"㈱№℡∵纊褜鍈銈蓜俉炻昱棈鋹曻彅丨仡仼伀伃伹佖侒侊侚侔俍偀倢俿倞偆偰偂傔僴僘兊"], -["fa80","兤冝冾凬刕劜劦勀勛匀匇匤卲厓厲叝﨎咜咊咩哿喆坙坥垬埈埇﨏塚增墲夋奓奛奝奣妤妺孖寀甯寘寬尞岦岺峵崧嵓﨑嵂嵭嶸嶹巐弡弴彧德忞恝悅悊惞惕愠惲愑愷愰憘戓抦揵摠撝擎敎昀昕昻昉昮昞昤晥晗晙晴晳暙暠暲暿曺朎朗杦枻桒柀栁桄棏﨓楨﨔榘槢樰橫橆橳橾櫢櫤毖氿汜沆汯泚洄涇浯"], -["fb40","涖涬淏淸淲淼渹湜渧渼溿澈澵濵瀅瀇瀨炅炫焏焄煜煆煇凞燁燾犱犾猤猪獷玽珉珖珣珒琇珵琦琪琩琮瑢璉璟甁畯皂皜皞皛皦益睆劯砡硎硤硺礰礼神"], -["fb80","祥禔福禛竑竧靖竫箞精絈絜綷綠緖繒罇羡羽茁荢荿菇菶葈蒴蕓蕙蕫﨟薰蘒﨡蠇裵訒訷詹誧誾諟諸諶譓譿賰賴贒赶﨣軏﨤逸遧郞都鄕鄧釚釗釞釭釮釤釥鈆鈐鈊鈺鉀鈼鉎鉙鉑鈹鉧銧鉷鉸鋧鋗鋙鋐﨧鋕鋠鋓錥錡鋻﨨錞鋿錝錂鍰鍗鎤鏆鏞鏸鐱鑅鑈閒隆﨩隝隯霳霻靃靍靏靑靕顗顥飯飼餧館馞驎髙"], -["fc40","髜魵魲鮏鮱鮻鰀鵰鵫鶴鸙黑"] -] diff --git a/node_modules/whatwg-encoding/node_modules/iconv-lite/encodings/utf16.js b/node_modules/whatwg-encoding/node_modules/iconv-lite/encodings/utf16.js deleted file mode 100644 index 97d0669..0000000 --- a/node_modules/whatwg-encoding/node_modules/iconv-lite/encodings/utf16.js +++ /dev/null @@ -1,197 +0,0 @@ -"use strict"; -var Buffer = require("safer-buffer").Buffer; - -// Note: UTF16-LE (or UCS2) codec is Node.js native. See encodings/internal.js - -// == UTF16-BE codec. ========================================================== - -exports.utf16be = Utf16BECodec; -function Utf16BECodec() { -} - -Utf16BECodec.prototype.encoder = Utf16BEEncoder; -Utf16BECodec.prototype.decoder = Utf16BEDecoder; -Utf16BECodec.prototype.bomAware = true; - - -// -- Encoding - -function Utf16BEEncoder() { -} - -Utf16BEEncoder.prototype.write = function(str) { - var buf = Buffer.from(str, 'ucs2'); - for (var i = 0; i < buf.length; i += 2) { - var tmp = buf[i]; buf[i] = buf[i+1]; buf[i+1] = tmp; - } - return buf; -} - -Utf16BEEncoder.prototype.end = function() { -} - - -// -- Decoding - -function Utf16BEDecoder() { - this.overflowByte = -1; -} - -Utf16BEDecoder.prototype.write = function(buf) { - if (buf.length == 0) - return ''; - - var buf2 = Buffer.alloc(buf.length + 1), - i = 0, j = 0; - - if (this.overflowByte !== -1) { - buf2[0] = buf[0]; - buf2[1] = this.overflowByte; - i = 1; j = 2; - } - - for (; i < buf.length-1; i += 2, j+= 2) { - buf2[j] = buf[i+1]; - buf2[j+1] = buf[i]; - } - - this.overflowByte = (i == buf.length-1) ? buf[buf.length-1] : -1; - - return buf2.slice(0, j).toString('ucs2'); -} - -Utf16BEDecoder.prototype.end = function() { - this.overflowByte = -1; -} - - -// == UTF-16 codec ============================================================= -// Decoder chooses automatically from UTF-16LE and UTF-16BE using BOM and space-based heuristic. -// Defaults to UTF-16LE, as it's prevalent and default in Node. -// http://en.wikipedia.org/wiki/UTF-16 and http://encoding.spec.whatwg.org/#utf-16le -// Decoder default can be changed: iconv.decode(buf, 'utf16', {defaultEncoding: 'utf-16be'}); - -// Encoder uses UTF-16LE and prepends BOM (which can be overridden with addBOM: false). - -exports.utf16 = Utf16Codec; -function Utf16Codec(codecOptions, iconv) { - this.iconv = iconv; -} - -Utf16Codec.prototype.encoder = Utf16Encoder; -Utf16Codec.prototype.decoder = Utf16Decoder; - - -// -- Encoding (pass-through) - -function Utf16Encoder(options, codec) { - options = options || {}; - if (options.addBOM === undefined) - options.addBOM = true; - this.encoder = codec.iconv.getEncoder('utf-16le', options); -} - -Utf16Encoder.prototype.write = function(str) { - return this.encoder.write(str); -} - -Utf16Encoder.prototype.end = function() { - return this.encoder.end(); -} - - -// -- Decoding - -function Utf16Decoder(options, codec) { - this.decoder = null; - this.initialBufs = []; - this.initialBufsLen = 0; - - this.options = options || {}; - this.iconv = codec.iconv; -} - -Utf16Decoder.prototype.write = function(buf) { - if (!this.decoder) { - // Codec is not chosen yet. Accumulate initial bytes. - this.initialBufs.push(buf); - this.initialBufsLen += buf.length; - - if (this.initialBufsLen < 16) // We need more bytes to use space heuristic (see below) - return ''; - - // We have enough bytes -> detect endianness. - var encoding = detectEncoding(this.initialBufs, this.options.defaultEncoding); - this.decoder = this.iconv.getDecoder(encoding, this.options); - - var resStr = ''; - for (var i = 0; i < this.initialBufs.length; i++) - resStr += this.decoder.write(this.initialBufs[i]); - - this.initialBufs.length = this.initialBufsLen = 0; - return resStr; - } - - return this.decoder.write(buf); -} - -Utf16Decoder.prototype.end = function() { - if (!this.decoder) { - var encoding = detectEncoding(this.initialBufs, this.options.defaultEncoding); - this.decoder = this.iconv.getDecoder(encoding, this.options); - - var resStr = ''; - for (var i = 0; i < this.initialBufs.length; i++) - resStr += this.decoder.write(this.initialBufs[i]); - - var trail = this.decoder.end(); - if (trail) - resStr += trail; - - this.initialBufs.length = this.initialBufsLen = 0; - return resStr; - } - return this.decoder.end(); -} - -function detectEncoding(bufs, defaultEncoding) { - var b = []; - var charsProcessed = 0; - var asciiCharsLE = 0, asciiCharsBE = 0; // Number of ASCII chars when decoded as LE or BE. - - outer_loop: - for (var i = 0; i < bufs.length; i++) { - var buf = bufs[i]; - for (var j = 0; j < buf.length; j++) { - b.push(buf[j]); - if (b.length === 2) { - if (charsProcessed === 0) { - // Check BOM first. - if (b[0] === 0xFF && b[1] === 0xFE) return 'utf-16le'; - if (b[0] === 0xFE && b[1] === 0xFF) return 'utf-16be'; - } - - if (b[0] === 0 && b[1] !== 0) asciiCharsBE++; - if (b[0] !== 0 && b[1] === 0) asciiCharsLE++; - - b.length = 0; - charsProcessed++; - - if (charsProcessed >= 100) { - break outer_loop; - } - } - } - } - - // Make decisions. - // Most of the time, the content has ASCII chars (U+00**), but the opposite (U+**00) is uncommon. - // So, we count ASCII as if it was LE or BE, and decide from that. - if (asciiCharsBE > asciiCharsLE) return 'utf-16be'; - if (asciiCharsBE < asciiCharsLE) return 'utf-16le'; - - // Couldn't decide (likely all zeros or not enough data). - return defaultEncoding || 'utf-16le'; -} - - diff --git a/node_modules/whatwg-encoding/node_modules/iconv-lite/encodings/utf32.js b/node_modules/whatwg-encoding/node_modules/iconv-lite/encodings/utf32.js deleted file mode 100644 index 2fa900a..0000000 --- a/node_modules/whatwg-encoding/node_modules/iconv-lite/encodings/utf32.js +++ /dev/null @@ -1,319 +0,0 @@ -'use strict'; - -var Buffer = require('safer-buffer').Buffer; - -// == UTF32-LE/BE codec. ========================================================== - -exports._utf32 = Utf32Codec; - -function Utf32Codec(codecOptions, iconv) { - this.iconv = iconv; - this.bomAware = true; - this.isLE = codecOptions.isLE; -} - -exports.utf32le = { type: '_utf32', isLE: true }; -exports.utf32be = { type: '_utf32', isLE: false }; - -// Aliases -exports.ucs4le = 'utf32le'; -exports.ucs4be = 'utf32be'; - -Utf32Codec.prototype.encoder = Utf32Encoder; -Utf32Codec.prototype.decoder = Utf32Decoder; - -// -- Encoding - -function Utf32Encoder(options, codec) { - this.isLE = codec.isLE; - this.highSurrogate = 0; -} - -Utf32Encoder.prototype.write = function(str) { - var src = Buffer.from(str, 'ucs2'); - var dst = Buffer.alloc(src.length * 2); - var write32 = this.isLE ? dst.writeUInt32LE : dst.writeUInt32BE; - var offset = 0; - - for (var i = 0; i < src.length; i += 2) { - var code = src.readUInt16LE(i); - var isHighSurrogate = (0xD800 <= code && code < 0xDC00); - var isLowSurrogate = (0xDC00 <= code && code < 0xE000); - - if (this.highSurrogate) { - if (isHighSurrogate || !isLowSurrogate) { - // There shouldn't be two high surrogates in a row, nor a high surrogate which isn't followed by a low - // surrogate. If this happens, keep the pending high surrogate as a stand-alone semi-invalid character - // (technically wrong, but expected by some applications, like Windows file names). - write32.call(dst, this.highSurrogate, offset); - offset += 4; - } - else { - // Create 32-bit value from high and low surrogates; - var codepoint = (((this.highSurrogate - 0xD800) << 10) | (code - 0xDC00)) + 0x10000; - - write32.call(dst, codepoint, offset); - offset += 4; - this.highSurrogate = 0; - - continue; - } - } - - if (isHighSurrogate) - this.highSurrogate = code; - else { - // Even if the current character is a low surrogate, with no previous high surrogate, we'll - // encode it as a semi-invalid stand-alone character for the same reasons expressed above for - // unpaired high surrogates. - write32.call(dst, code, offset); - offset += 4; - this.highSurrogate = 0; - } - } - - if (offset < dst.length) - dst = dst.slice(0, offset); - - return dst; -}; - -Utf32Encoder.prototype.end = function() { - // Treat any leftover high surrogate as a semi-valid independent character. - if (!this.highSurrogate) - return; - - var buf = Buffer.alloc(4); - - if (this.isLE) - buf.writeUInt32LE(this.highSurrogate, 0); - else - buf.writeUInt32BE(this.highSurrogate, 0); - - this.highSurrogate = 0; - - return buf; -}; - -// -- Decoding - -function Utf32Decoder(options, codec) { - this.isLE = codec.isLE; - this.badChar = codec.iconv.defaultCharUnicode.charCodeAt(0); - this.overflow = []; -} - -Utf32Decoder.prototype.write = function(src) { - if (src.length === 0) - return ''; - - var i = 0; - var codepoint = 0; - var dst = Buffer.alloc(src.length + 4); - var offset = 0; - var isLE = this.isLE; - var overflow = this.overflow; - var badChar = this.badChar; - - if (overflow.length > 0) { - for (; i < src.length && overflow.length < 4; i++) - overflow.push(src[i]); - - if (overflow.length === 4) { - // NOTE: codepoint is a signed int32 and can be negative. - // NOTE: We copied this block from below to help V8 optimize it (it works with array, not buffer). - if (isLE) { - codepoint = overflow[i] | (overflow[i+1] << 8) | (overflow[i+2] << 16) | (overflow[i+3] << 24); - } else { - codepoint = overflow[i+3] | (overflow[i+2] << 8) | (overflow[i+1] << 16) | (overflow[i] << 24); - } - overflow.length = 0; - - offset = _writeCodepoint(dst, offset, codepoint, badChar); - } - } - - // Main loop. Should be as optimized as possible. - for (; i < src.length - 3; i += 4) { - // NOTE: codepoint is a signed int32 and can be negative. - if (isLE) { - codepoint = src[i] | (src[i+1] << 8) | (src[i+2] << 16) | (src[i+3] << 24); - } else { - codepoint = src[i+3] | (src[i+2] << 8) | (src[i+1] << 16) | (src[i] << 24); - } - offset = _writeCodepoint(dst, offset, codepoint, badChar); - } - - // Keep overflowing bytes. - for (; i < src.length; i++) { - overflow.push(src[i]); - } - - return dst.slice(0, offset).toString('ucs2'); -}; - -function _writeCodepoint(dst, offset, codepoint, badChar) { - // NOTE: codepoint is signed int32 and can be negative. We keep it that way to help V8 with optimizations. - if (codepoint < 0 || codepoint > 0x10FFFF) { - // Not a valid Unicode codepoint - codepoint = badChar; - } - - // Ephemeral Planes: Write high surrogate. - if (codepoint >= 0x10000) { - codepoint -= 0x10000; - - var high = 0xD800 | (codepoint >> 10); - dst[offset++] = high & 0xff; - dst[offset++] = high >> 8; - - // Low surrogate is written below. - var codepoint = 0xDC00 | (codepoint & 0x3FF); - } - - // Write BMP char or low surrogate. - dst[offset++] = codepoint & 0xff; - dst[offset++] = codepoint >> 8; - - return offset; -}; - -Utf32Decoder.prototype.end = function() { - this.overflow.length = 0; -}; - -// == UTF-32 Auto codec ============================================================= -// Decoder chooses automatically from UTF-32LE and UTF-32BE using BOM and space-based heuristic. -// Defaults to UTF-32LE. http://en.wikipedia.org/wiki/UTF-32 -// Encoder/decoder default can be changed: iconv.decode(buf, 'utf32', {defaultEncoding: 'utf-32be'}); - -// Encoder prepends BOM (which can be overridden with (addBOM: false}). - -exports.utf32 = Utf32AutoCodec; -exports.ucs4 = 'utf32'; - -function Utf32AutoCodec(options, iconv) { - this.iconv = iconv; -} - -Utf32AutoCodec.prototype.encoder = Utf32AutoEncoder; -Utf32AutoCodec.prototype.decoder = Utf32AutoDecoder; - -// -- Encoding - -function Utf32AutoEncoder(options, codec) { - options = options || {}; - - if (options.addBOM === undefined) - options.addBOM = true; - - this.encoder = codec.iconv.getEncoder(options.defaultEncoding || 'utf-32le', options); -} - -Utf32AutoEncoder.prototype.write = function(str) { - return this.encoder.write(str); -}; - -Utf32AutoEncoder.prototype.end = function() { - return this.encoder.end(); -}; - -// -- Decoding - -function Utf32AutoDecoder(options, codec) { - this.decoder = null; - this.initialBufs = []; - this.initialBufsLen = 0; - this.options = options || {}; - this.iconv = codec.iconv; -} - -Utf32AutoDecoder.prototype.write = function(buf) { - if (!this.decoder) { - // Codec is not chosen yet. Accumulate initial bytes. - this.initialBufs.push(buf); - this.initialBufsLen += buf.length; - - if (this.initialBufsLen < 32) // We need more bytes to use space heuristic (see below) - return ''; - - // We have enough bytes -> detect endianness. - var encoding = detectEncoding(this.initialBufs, this.options.defaultEncoding); - this.decoder = this.iconv.getDecoder(encoding, this.options); - - var resStr = ''; - for (var i = 0; i < this.initialBufs.length; i++) - resStr += this.decoder.write(this.initialBufs[i]); - - this.initialBufs.length = this.initialBufsLen = 0; - return resStr; - } - - return this.decoder.write(buf); -}; - -Utf32AutoDecoder.prototype.end = function() { - if (!this.decoder) { - var encoding = detectEncoding(this.initialBufs, this.options.defaultEncoding); - this.decoder = this.iconv.getDecoder(encoding, this.options); - - var resStr = ''; - for (var i = 0; i < this.initialBufs.length; i++) - resStr += this.decoder.write(this.initialBufs[i]); - - var trail = this.decoder.end(); - if (trail) - resStr += trail; - - this.initialBufs.length = this.initialBufsLen = 0; - return resStr; - } - - return this.decoder.end(); -}; - -function detectEncoding(bufs, defaultEncoding) { - var b = []; - var charsProcessed = 0; - var invalidLE = 0, invalidBE = 0; // Number of invalid chars when decoded as LE or BE. - var bmpCharsLE = 0, bmpCharsBE = 0; // Number of BMP chars when decoded as LE or BE. - - outer_loop: - for (var i = 0; i < bufs.length; i++) { - var buf = bufs[i]; - for (var j = 0; j < buf.length; j++) { - b.push(buf[j]); - if (b.length === 4) { - if (charsProcessed === 0) { - // Check BOM first. - if (b[0] === 0xFF && b[1] === 0xFE && b[2] === 0 && b[3] === 0) { - return 'utf-32le'; - } - if (b[0] === 0 && b[1] === 0 && b[2] === 0xFE && b[3] === 0xFF) { - return 'utf-32be'; - } - } - - if (b[0] !== 0 || b[1] > 0x10) invalidBE++; - if (b[3] !== 0 || b[2] > 0x10) invalidLE++; - - if (b[0] === 0 && b[1] === 0 && (b[2] !== 0 || b[3] !== 0)) bmpCharsBE++; - if ((b[0] !== 0 || b[1] !== 0) && b[2] === 0 && b[3] === 0) bmpCharsLE++; - - b.length = 0; - charsProcessed++; - - if (charsProcessed >= 100) { - break outer_loop; - } - } - } - } - - // Make decisions. - if (bmpCharsBE - invalidBE > bmpCharsLE - invalidLE) return 'utf-32be'; - if (bmpCharsBE - invalidBE < bmpCharsLE - invalidLE) return 'utf-32le'; - - // Couldn't decide (likely all zeros or not enough data). - return defaultEncoding || 'utf-32le'; -} diff --git a/node_modules/whatwg-encoding/node_modules/iconv-lite/encodings/utf7.js b/node_modules/whatwg-encoding/node_modules/iconv-lite/encodings/utf7.js deleted file mode 100644 index eacae34..0000000 --- a/node_modules/whatwg-encoding/node_modules/iconv-lite/encodings/utf7.js +++ /dev/null @@ -1,290 +0,0 @@ -"use strict"; -var Buffer = require("safer-buffer").Buffer; - -// UTF-7 codec, according to https://tools.ietf.org/html/rfc2152 -// See also below a UTF-7-IMAP codec, according to http://tools.ietf.org/html/rfc3501#section-5.1.3 - -exports.utf7 = Utf7Codec; -exports.unicode11utf7 = 'utf7'; // Alias UNICODE-1-1-UTF-7 -function Utf7Codec(codecOptions, iconv) { - this.iconv = iconv; -}; - -Utf7Codec.prototype.encoder = Utf7Encoder; -Utf7Codec.prototype.decoder = Utf7Decoder; -Utf7Codec.prototype.bomAware = true; - - -// -- Encoding - -var nonDirectChars = /[^A-Za-z0-9'\(\),-\.\/:\? \n\r\t]+/g; - -function Utf7Encoder(options, codec) { - this.iconv = codec.iconv; -} - -Utf7Encoder.prototype.write = function(str) { - // Naive implementation. - // Non-direct chars are encoded as "+<base64>-"; single "+" char is encoded as "+-". - return Buffer.from(str.replace(nonDirectChars, function(chunk) { - return "+" + (chunk === '+' ? '' : - this.iconv.encode(chunk, 'utf16-be').toString('base64').replace(/=+$/, '')) - + "-"; - }.bind(this))); -} - -Utf7Encoder.prototype.end = function() { -} - - -// -- Decoding - -function Utf7Decoder(options, codec) { - this.iconv = codec.iconv; - this.inBase64 = false; - this.base64Accum = ''; -} - -var base64Regex = /[A-Za-z0-9\/+]/; -var base64Chars = []; -for (var i = 0; i < 256; i++) - base64Chars[i] = base64Regex.test(String.fromCharCode(i)); - -var plusChar = '+'.charCodeAt(0), - minusChar = '-'.charCodeAt(0), - andChar = '&'.charCodeAt(0); - -Utf7Decoder.prototype.write = function(buf) { - var res = "", lastI = 0, - inBase64 = this.inBase64, - base64Accum = this.base64Accum; - - // The decoder is more involved as we must handle chunks in stream. - - for (var i = 0; i < buf.length; i++) { - if (!inBase64) { // We're in direct mode. - // Write direct chars until '+' - if (buf[i] == plusChar) { - res += this.iconv.decode(buf.slice(lastI, i), "ascii"); // Write direct chars. - lastI = i+1; - inBase64 = true; - } - } else { // We decode base64. - if (!base64Chars[buf[i]]) { // Base64 ended. - if (i == lastI && buf[i] == minusChar) {// "+-" -> "+" - res += "+"; - } else { - var b64str = base64Accum + this.iconv.decode(buf.slice(lastI, i), "ascii"); - res += this.iconv.decode(Buffer.from(b64str, 'base64'), "utf16-be"); - } - - if (buf[i] != minusChar) // Minus is absorbed after base64. - i--; - - lastI = i+1; - inBase64 = false; - base64Accum = ''; - } - } - } - - if (!inBase64) { - res += this.iconv.decode(buf.slice(lastI), "ascii"); // Write direct chars. - } else { - var b64str = base64Accum + this.iconv.decode(buf.slice(lastI), "ascii"); - - var canBeDecoded = b64str.length - (b64str.length % 8); // Minimal chunk: 2 quads -> 2x3 bytes -> 3 chars. - base64Accum = b64str.slice(canBeDecoded); // The rest will be decoded in future. - b64str = b64str.slice(0, canBeDecoded); - - res += this.iconv.decode(Buffer.from(b64str, 'base64'), "utf16-be"); - } - - this.inBase64 = inBase64; - this.base64Accum = base64Accum; - - return res; -} - -Utf7Decoder.prototype.end = function() { - var res = ""; - if (this.inBase64 && this.base64Accum.length > 0) - res = this.iconv.decode(Buffer.from(this.base64Accum, 'base64'), "utf16-be"); - - this.inBase64 = false; - this.base64Accum = ''; - return res; -} - - -// UTF-7-IMAP codec. -// RFC3501 Sec. 5.1.3 Modified UTF-7 (http://tools.ietf.org/html/rfc3501#section-5.1.3) -// Differences: -// * Base64 part is started by "&" instead of "+" -// * Direct characters are 0x20-0x7E, except "&" (0x26) -// * In Base64, "," is used instead of "/" -// * Base64 must not be used to represent direct characters. -// * No implicit shift back from Base64 (should always end with '-') -// * String must end in non-shifted position. -// * "-&" while in base64 is not allowed. - - -exports.utf7imap = Utf7IMAPCodec; -function Utf7IMAPCodec(codecOptions, iconv) { - this.iconv = iconv; -}; - -Utf7IMAPCodec.prototype.encoder = Utf7IMAPEncoder; -Utf7IMAPCodec.prototype.decoder = Utf7IMAPDecoder; -Utf7IMAPCodec.prototype.bomAware = true; - - -// -- Encoding - -function Utf7IMAPEncoder(options, codec) { - this.iconv = codec.iconv; - this.inBase64 = false; - this.base64Accum = Buffer.alloc(6); - this.base64AccumIdx = 0; -} - -Utf7IMAPEncoder.prototype.write = function(str) { - var inBase64 = this.inBase64, - base64Accum = this.base64Accum, - base64AccumIdx = this.base64AccumIdx, - buf = Buffer.alloc(str.length*5 + 10), bufIdx = 0; - - for (var i = 0; i < str.length; i++) { - var uChar = str.charCodeAt(i); - if (0x20 <= uChar && uChar <= 0x7E) { // Direct character or '&'. - if (inBase64) { - if (base64AccumIdx > 0) { - bufIdx += buf.write(base64Accum.slice(0, base64AccumIdx).toString('base64').replace(/\//g, ',').replace(/=+$/, ''), bufIdx); - base64AccumIdx = 0; - } - - buf[bufIdx++] = minusChar; // Write '-', then go to direct mode. - inBase64 = false; - } - - if (!inBase64) { - buf[bufIdx++] = uChar; // Write direct character - - if (uChar === andChar) // Ampersand -> '&-' - buf[bufIdx++] = minusChar; - } - - } else { // Non-direct character - if (!inBase64) { - buf[bufIdx++] = andChar; // Write '&', then go to base64 mode. - inBase64 = true; - } - if (inBase64) { - base64Accum[base64AccumIdx++] = uChar >> 8; - base64Accum[base64AccumIdx++] = uChar & 0xFF; - - if (base64AccumIdx == base64Accum.length) { - bufIdx += buf.write(base64Accum.toString('base64').replace(/\//g, ','), bufIdx); - base64AccumIdx = 0; - } - } - } - } - - this.inBase64 = inBase64; - this.base64AccumIdx = base64AccumIdx; - - return buf.slice(0, bufIdx); -} - -Utf7IMAPEncoder.prototype.end = function() { - var buf = Buffer.alloc(10), bufIdx = 0; - if (this.inBase64) { - if (this.base64AccumIdx > 0) { - bufIdx += buf.write(this.base64Accum.slice(0, this.base64AccumIdx).toString('base64').replace(/\//g, ',').replace(/=+$/, ''), bufIdx); - this.base64AccumIdx = 0; - } - - buf[bufIdx++] = minusChar; // Write '-', then go to direct mode. - this.inBase64 = false; - } - - return buf.slice(0, bufIdx); -} - - -// -- Decoding - -function Utf7IMAPDecoder(options, codec) { - this.iconv = codec.iconv; - this.inBase64 = false; - this.base64Accum = ''; -} - -var base64IMAPChars = base64Chars.slice(); -base64IMAPChars[','.charCodeAt(0)] = true; - -Utf7IMAPDecoder.prototype.write = function(buf) { - var res = "", lastI = 0, - inBase64 = this.inBase64, - base64Accum = this.base64Accum; - - // The decoder is more involved as we must handle chunks in stream. - // It is forgiving, closer to standard UTF-7 (for example, '-' is optional at the end). - - for (var i = 0; i < buf.length; i++) { - if (!inBase64) { // We're in direct mode. - // Write direct chars until '&' - if (buf[i] == andChar) { - res += this.iconv.decode(buf.slice(lastI, i), "ascii"); // Write direct chars. - lastI = i+1; - inBase64 = true; - } - } else { // We decode base64. - if (!base64IMAPChars[buf[i]]) { // Base64 ended. - if (i == lastI && buf[i] == minusChar) { // "&-" -> "&" - res += "&"; - } else { - var b64str = base64Accum + this.iconv.decode(buf.slice(lastI, i), "ascii").replace(/,/g, '/'); - res += this.iconv.decode(Buffer.from(b64str, 'base64'), "utf16-be"); - } - - if (buf[i] != minusChar) // Minus may be absorbed after base64. - i--; - - lastI = i+1; - inBase64 = false; - base64Accum = ''; - } - } - } - - if (!inBase64) { - res += this.iconv.decode(buf.slice(lastI), "ascii"); // Write direct chars. - } else { - var b64str = base64Accum + this.iconv.decode(buf.slice(lastI), "ascii").replace(/,/g, '/'); - - var canBeDecoded = b64str.length - (b64str.length % 8); // Minimal chunk: 2 quads -> 2x3 bytes -> 3 chars. - base64Accum = b64str.slice(canBeDecoded); // The rest will be decoded in future. - b64str = b64str.slice(0, canBeDecoded); - - res += this.iconv.decode(Buffer.from(b64str, 'base64'), "utf16-be"); - } - - this.inBase64 = inBase64; - this.base64Accum = base64Accum; - - return res; -} - -Utf7IMAPDecoder.prototype.end = function() { - var res = ""; - if (this.inBase64 && this.base64Accum.length > 0) - res = this.iconv.decode(Buffer.from(this.base64Accum, 'base64'), "utf16-be"); - - this.inBase64 = false; - this.base64Accum = ''; - return res; -} - - diff --git a/node_modules/whatwg-encoding/node_modules/iconv-lite/lib/bom-handling.js b/node_modules/whatwg-encoding/node_modules/iconv-lite/lib/bom-handling.js deleted file mode 100644 index 1050872..0000000 --- a/node_modules/whatwg-encoding/node_modules/iconv-lite/lib/bom-handling.js +++ /dev/null @@ -1,52 +0,0 @@ -"use strict"; - -var BOMChar = '\uFEFF'; - -exports.PrependBOM = PrependBOMWrapper -function PrependBOMWrapper(encoder, options) { - this.encoder = encoder; - this.addBOM = true; -} - -PrependBOMWrapper.prototype.write = function(str) { - if (this.addBOM) { - str = BOMChar + str; - this.addBOM = false; - } - - return this.encoder.write(str); -} - -PrependBOMWrapper.prototype.end = function() { - return this.encoder.end(); -} - - -//------------------------------------------------------------------------------ - -exports.StripBOM = StripBOMWrapper; -function StripBOMWrapper(decoder, options) { - this.decoder = decoder; - this.pass = false; - this.options = options || {}; -} - -StripBOMWrapper.prototype.write = function(buf) { - var res = this.decoder.write(buf); - if (this.pass || !res) - return res; - - if (res[0] === BOMChar) { - res = res.slice(1); - if (typeof this.options.stripBOM === 'function') - this.options.stripBOM(); - } - - this.pass = true; - return res; -} - -StripBOMWrapper.prototype.end = function() { - return this.decoder.end(); -} - diff --git a/node_modules/whatwg-encoding/node_modules/iconv-lite/lib/streams.js b/node_modules/whatwg-encoding/node_modules/iconv-lite/lib/streams.js deleted file mode 100644 index a150648..0000000 --- a/node_modules/whatwg-encoding/node_modules/iconv-lite/lib/streams.js +++ /dev/null @@ -1,109 +0,0 @@ -"use strict"; - -var Buffer = require("safer-buffer").Buffer; - -// NOTE: Due to 'stream' module being pretty large (~100Kb, significant in browser environments), -// we opt to dependency-inject it instead of creating a hard dependency. -module.exports = function(stream_module) { - var Transform = stream_module.Transform; - - // == Encoder stream ======================================================= - - function IconvLiteEncoderStream(conv, options) { - this.conv = conv; - options = options || {}; - options.decodeStrings = false; // We accept only strings, so we don't need to decode them. - Transform.call(this, options); - } - - IconvLiteEncoderStream.prototype = Object.create(Transform.prototype, { - constructor: { value: IconvLiteEncoderStream } - }); - - IconvLiteEncoderStream.prototype._transform = function(chunk, encoding, done) { - if (typeof chunk != 'string') - return done(new Error("Iconv encoding stream needs strings as its input.")); - try { - var res = this.conv.write(chunk); - if (res && res.length) this.push(res); - done(); - } - catch (e) { - done(e); - } - } - - IconvLiteEncoderStream.prototype._flush = function(done) { - try { - var res = this.conv.end(); - if (res && res.length) this.push(res); - done(); - } - catch (e) { - done(e); - } - } - - IconvLiteEncoderStream.prototype.collect = function(cb) { - var chunks = []; - this.on('error', cb); - this.on('data', function(chunk) { chunks.push(chunk); }); - this.on('end', function() { - cb(null, Buffer.concat(chunks)); - }); - return this; - } - - - // == Decoder stream ======================================================= - - function IconvLiteDecoderStream(conv, options) { - this.conv = conv; - options = options || {}; - options.encoding = this.encoding = 'utf8'; // We output strings. - Transform.call(this, options); - } - - IconvLiteDecoderStream.prototype = Object.create(Transform.prototype, { - constructor: { value: IconvLiteDecoderStream } - }); - - IconvLiteDecoderStream.prototype._transform = function(chunk, encoding, done) { - if (!Buffer.isBuffer(chunk) && !(chunk instanceof Uint8Array)) - return done(new Error("Iconv decoding stream needs buffers as its input.")); - try { - var res = this.conv.write(chunk); - if (res && res.length) this.push(res, this.encoding); - done(); - } - catch (e) { - done(e); - } - } - - IconvLiteDecoderStream.prototype._flush = function(done) { - try { - var res = this.conv.end(); - if (res && res.length) this.push(res, this.encoding); - done(); - } - catch (e) { - done(e); - } - } - - IconvLiteDecoderStream.prototype.collect = function(cb) { - var res = ''; - this.on('error', cb); - this.on('data', function(chunk) { res += chunk; }); - this.on('end', function() { - cb(null, res); - }); - return this; - } - - return { - IconvLiteEncoderStream: IconvLiteEncoderStream, - IconvLiteDecoderStream: IconvLiteDecoderStream, - }; -}; diff --git a/node_modules/whatwg-encoding/node_modules/iconv-lite/package.json b/node_modules/whatwg-encoding/node_modules/iconv-lite/package.json deleted file mode 100644 index d351115..0000000 --- a/node_modules/whatwg-encoding/node_modules/iconv-lite/package.json +++ /dev/null @@ -1,44 +0,0 @@ -{ - "name": "iconv-lite", - "description": "Convert character encodings in pure javascript.", - "version": "0.6.3", - "license": "MIT", - "keywords": [ - "iconv", - "convert", - "charset", - "icu" - ], - "author": "Alexander Shtuchkin <ashtuchkin@gmail.com>", - "main": "./lib/index.js", - "typings": "./lib/index.d.ts", - "homepage": "https://github.com/ashtuchkin/iconv-lite", - "bugs": "https://github.com/ashtuchkin/iconv-lite/issues", - "repository": { - "type": "git", - "url": "git://github.com/ashtuchkin/iconv-lite.git" - }, - "engines": { - "node": ">=0.10.0" - }, - "scripts": { - "coverage": "c8 _mocha --grep .", - "test": "mocha --reporter spec --grep ." - }, - "browser": { - "stream": false - }, - "devDependencies": { - "async": "^3.2.0", - "c8": "^7.2.0", - "errto": "^0.2.1", - "iconv": "^2.3.5", - "mocha": "^3.5.3", - "request": "^2.88.2", - "semver": "^6.3.0", - "unorm": "^1.6.0" - }, - "dependencies": { - "safer-buffer": ">= 2.1.2 < 3.0.0" - } -} diff --git a/node_modules/whatwg-encoding/package.json b/node_modules/whatwg-encoding/package.json deleted file mode 100644 index e403c3b..0000000 --- a/node_modules/whatwg-encoding/package.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "name": "whatwg-encoding", - "description": "Decode strings according to the WHATWG Encoding Standard", - "keywords": [ - "encoding", - "whatwg" - ], - "version": "3.1.1", - "author": "Domenic Denicola <d@domenic.me> (https://domenic.me/)", - "license": "MIT", - "repository": "jsdom/whatwg-encoding", - "main": "lib/whatwg-encoding.js", - "files": [ - "lib/" - ], - "scripts": { - "pretest": "npm run prepare", - "test": "node --test", - "lint": "eslint .", - "prepare": "node scripts/update.js" - }, - "dependencies": { - "iconv-lite": "0.6.3" - }, - "devDependencies": { - "@domenic/eslint-config": "^3.0.0", - "eslint": "^8.53.0" - }, - "engines": { - "node": ">=18" - } -} diff --git a/node_modules/whatwg-mimetype/lib/mime-type-parameters.js b/node_modules/whatwg-mimetype/lib/mime-type-parameters.js deleted file mode 100644 index ea4b2f0..0000000 --- a/node_modules/whatwg-mimetype/lib/mime-type-parameters.js +++ /dev/null @@ -1,70 +0,0 @@ -"use strict"; -const { - asciiLowercase, - solelyContainsHTTPTokenCodePoints, - soleyContainsHTTPQuotedStringTokenCodePoints -} = require("./utils.js"); - -module.exports = class MIMETypeParameters { - constructor(map) { - this._map = map; - } - - get size() { - return this._map.size; - } - - get(name) { - name = asciiLowercase(String(name)); - return this._map.get(name); - } - - has(name) { - name = asciiLowercase(String(name)); - return this._map.has(name); - } - - set(name, value) { - name = asciiLowercase(String(name)); - value = String(value); - - if (!solelyContainsHTTPTokenCodePoints(name)) { - throw new Error(`Invalid MIME type parameter name "${name}": only HTTP token code points are valid.`); - } - if (!soleyContainsHTTPQuotedStringTokenCodePoints(value)) { - throw new Error(`Invalid MIME type parameter value "${value}": only HTTP quoted-string token code points are ` + - `valid.`); - } - - return this._map.set(name, value); - } - - clear() { - this._map.clear(); - } - - delete(name) { - name = asciiLowercase(String(name)); - return this._map.delete(name); - } - - forEach(callbackFn, thisArg) { - this._map.forEach(callbackFn, thisArg); - } - - keys() { - return this._map.keys(); - } - - values() { - return this._map.values(); - } - - entries() { - return this._map.entries(); - } - - [Symbol.iterator]() { - return this._map[Symbol.iterator](); - } -}; diff --git a/node_modules/whatwg-mimetype/lib/mime-type.js b/node_modules/whatwg-mimetype/lib/mime-type.js deleted file mode 100644 index d0d0dda..0000000 --- a/node_modules/whatwg-mimetype/lib/mime-type.js +++ /dev/null @@ -1,127 +0,0 @@ -"use strict"; -const MIMETypeParameters = require("./mime-type-parameters.js"); -const parse = require("./parser.js"); -const serialize = require("./serializer.js"); -const { - asciiLowercase, - solelyContainsHTTPTokenCodePoints -} = require("./utils.js"); - -module.exports = class MIMEType { - constructor(string) { - string = String(string); - const result = parse(string); - if (result === null) { - throw new Error(`Could not parse MIME type string "${string}"`); - } - - this._type = result.type; - this._subtype = result.subtype; - this._parameters = new MIMETypeParameters(result.parameters); - } - - static parse(string) { - try { - return new this(string); - } catch (e) { - return null; - } - } - - get essence() { - return `${this.type}/${this.subtype}`; - } - - get type() { - return this._type; - } - - set type(value) { - value = asciiLowercase(String(value)); - - if (value.length === 0) { - throw new Error("Invalid type: must be a non-empty string"); - } - if (!solelyContainsHTTPTokenCodePoints(value)) { - throw new Error(`Invalid type ${value}: must contain only HTTP token code points`); - } - - this._type = value; - } - - get subtype() { - return this._subtype; - } - - set subtype(value) { - value = asciiLowercase(String(value)); - - if (value.length === 0) { - throw new Error("Invalid subtype: must be a non-empty string"); - } - if (!solelyContainsHTTPTokenCodePoints(value)) { - throw new Error(`Invalid subtype ${value}: must contain only HTTP token code points`); - } - - this._subtype = value; - } - - get parameters() { - return this._parameters; - } - - toString() { - // The serialize function works on both "MIME type records" (i.e. the results of parse) and on this class, since - // this class's interface is identical. - return serialize(this); - } - - isJavaScript({ prohibitParameters = false } = {}) { - switch (this._type) { - case "text": { - switch (this._subtype) { - case "ecmascript": - case "javascript": - case "javascript1.0": - case "javascript1.1": - case "javascript1.2": - case "javascript1.3": - case "javascript1.4": - case "javascript1.5": - case "jscript": - case "livescript": - case "x-ecmascript": - case "x-javascript": { - return !prohibitParameters || this._parameters.size === 0; - } - default: { - return false; - } - } - } - case "application": { - switch (this._subtype) { - case "ecmascript": - case "javascript": - case "x-ecmascript": - case "x-javascript": { - return !prohibitParameters || this._parameters.size === 0; - } - default: { - return false; - } - } - } - default: { - return false; - } - } - } - isXML() { - return (this._subtype === "xml" && (this._type === "text" || this._type === "application")) || - this._subtype.endsWith("+xml"); - } - isHTML() { - return this._subtype === "html" && this._type === "text"; - } -}; diff --git a/node_modules/whatwg-mimetype/lib/parser.js b/node_modules/whatwg-mimetype/lib/parser.js deleted file mode 100644 index 8eddbaf..0000000 --- a/node_modules/whatwg-mimetype/lib/parser.js +++ /dev/null @@ -1,105 +0,0 @@ -"use strict"; -const { - removeLeadingAndTrailingHTTPWhitespace, - removeTrailingHTTPWhitespace, - isHTTPWhitespaceChar, - solelyContainsHTTPTokenCodePoints, - soleyContainsHTTPQuotedStringTokenCodePoints, - asciiLowercase, - collectAnHTTPQuotedString -} = require("./utils.js"); - -module.exports = input => { - input = removeLeadingAndTrailingHTTPWhitespace(input); - - let position = 0; - let type = ""; - while (position < input.length && input[position] !== "/") { - type += input[position]; - ++position; - } - - if (type.length === 0 || !solelyContainsHTTPTokenCodePoints(type)) { - return null; - } - - if (position >= input.length) { - return null; - } - - // Skips past "/" - ++position; - - let subtype = ""; - while (position < input.length && input[position] !== ";") { - subtype += input[position]; - ++position; - } - - subtype = removeTrailingHTTPWhitespace(subtype); - - if (subtype.length === 0 || !solelyContainsHTTPTokenCodePoints(subtype)) { - return null; - } - - const mimeType = { - type: asciiLowercase(type), - subtype: asciiLowercase(subtype), - parameters: new Map() - }; - - while (position < input.length) { - // Skip past ";" - ++position; - - while (isHTTPWhitespaceChar(input[position])) { - ++position; - } - - let parameterName = ""; - while (position < input.length && input[position] !== ";" && input[position] !== "=") { - parameterName += input[position]; - ++position; - } - parameterName = asciiLowercase(parameterName); - - if (position < input.length) { - if (input[position] === ";") { - continue; - } - - // Skip past "=" - ++position; - } - - let parameterValue = null; - if (input[position] === "\"") { - [parameterValue, position] = collectAnHTTPQuotedString(input, position); - - while (position < input.length && input[position] !== ";") { - ++position; - } - } else { - parameterValue = ""; - while (position < input.length && input[position] !== ";") { - parameterValue += input[position]; - ++position; - } - - parameterValue = removeTrailingHTTPWhitespace(parameterValue); - - if (parameterValue === "") { - continue; - } - } - - if (parameterName.length > 0 && - solelyContainsHTTPTokenCodePoints(parameterName) && - soleyContainsHTTPQuotedStringTokenCodePoints(parameterValue) && - !mimeType.parameters.has(parameterName)) { - mimeType.parameters.set(parameterName, parameterValue); - } - } - - return mimeType; -}; diff --git a/node_modules/whatwg-mimetype/lib/serializer.js b/node_modules/whatwg-mimetype/lib/serializer.js deleted file mode 100644 index 2d7aaf0..0000000 --- a/node_modules/whatwg-mimetype/lib/serializer.js +++ /dev/null @@ -1,25 +0,0 @@ -"use strict"; -const { solelyContainsHTTPTokenCodePoints } = require("./utils.js"); - -module.exports = mimeType => { - let serialization = `${mimeType.type}/${mimeType.subtype}`; - - if (mimeType.parameters.size === 0) { - return serialization; - } - - for (let [name, value] of mimeType.parameters) { - serialization += ";"; - serialization += name; - serialization += "="; - - if (!solelyContainsHTTPTokenCodePoints(value) || value.length === 0) { - value = value.replace(/(["\\])/ug, "\\$1"); - value = `"${value}"`; - } - - serialization += value; - } - - return serialization; -}; diff --git a/node_modules/whatwg-mimetype/lib/utils.js b/node_modules/whatwg-mimetype/lib/utils.js deleted file mode 100644 index 5a814fc..0000000 --- a/node_modules/whatwg-mimetype/lib/utils.js +++ /dev/null @@ -1,60 +0,0 @@ -"use strict"; - -exports.removeLeadingAndTrailingHTTPWhitespace = string => { - return string.replace(/^[ \t\n\r]+/u, "").replace(/[ \t\n\r]+$/u, ""); -}; - -exports.removeTrailingHTTPWhitespace = string => { - return string.replace(/[ \t\n\r]+$/u, ""); -}; - -exports.isHTTPWhitespaceChar = char => { - return char === " " || char === "\t" || char === "\n" || char === "\r"; -}; - -exports.solelyContainsHTTPTokenCodePoints = string => { - return /^[-!#$%&'*+.^_`|~A-Za-z0-9]*$/u.test(string); -}; - -exports.soleyContainsHTTPQuotedStringTokenCodePoints = string => { - return /^[\t\u0020-\u007E\u0080-\u00FF]*$/u.test(string); -}; - -exports.asciiLowercase = string => { - return string.replace(/[A-Z]/ug, l => l.toLowerCase()); -}; - -// This variant only implements it with the extract-value flag set. -exports.collectAnHTTPQuotedString = (input, position) => { - let value = ""; - - position++; - - while (true) { - while (position < input.length && input[position] !== "\"" && input[position] !== "\\") { - value += input[position]; - ++position; - } - - if (position >= input.length) { - break; - } - - const quoteOrBackslash = input[position]; - ++position; - - if (quoteOrBackslash === "\\") { - if (position >= input.length) { - value += "\\"; - break; - } - - value += input[position]; - ++position; - } else { - break; - } - } - - return [value, position]; -}; diff --git a/node_modules/whatwg-mimetype/package.json b/node_modules/whatwg-mimetype/package.json deleted file mode 100644 index ff098c1..0000000 --- a/node_modules/whatwg-mimetype/package.json +++ /dev/null @@ -1,45 +0,0 @@ -{ - "name": "whatwg-mimetype", - "description": "Parses, serializes, and manipulates MIME types, according to the WHATWG MIME Sniffing Standard", - "keywords": [ - "content-type", - "mime type", - "mimesniff", - "http", - "whatwg" - ], - "version": "4.0.0", - "author": "Domenic Denicola <d@domenic.me> (https://domenic.me/)", - "license": "MIT", - "repository": "jsdom/whatwg-mimetype", - "main": "lib/mime-type.js", - "files": [ - "lib/" - ], - "scripts": { - "test": "node --test", - "coverage": "c8 node --test --experimental-test-coverage", - "lint": "eslint .", - "pretest": "node scripts/get-latest-platform-tests.js" - }, - "devDependencies": { - "@domenic/eslint-config": "^3.0.0", - "c8": "^8.0.1", - "eslint": "^8.53.0", - "printable-string": "^0.3.0", - "whatwg-encoding": "^3.0.0" - }, - "engines": { - "node": ">=18" - }, - "c8": { - "reporter": [ - "text", - "html" - ], - "exclude": [ - "scripts/", - "test/" - ] - } -} diff --git a/node_modules/wrappy/package.json b/node_modules/wrappy/package.json deleted file mode 100644 index 1307520..0000000 --- a/node_modules/wrappy/package.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "name": "wrappy", - "version": "1.0.2", - "description": "Callback wrapping utility", - "main": "wrappy.js", - "files": [ - "wrappy.js" - ], - "directories": { - "test": "test" - }, - "dependencies": {}, - "devDependencies": { - "tap": "^2.3.1" - }, - "scripts": { - "test": "tap --coverage test/*.js" - }, - "repository": { - "type": "git", - "url": "https://github.com/npm/wrappy" - }, - "author": "Isaac Z. Schlueter <i@izs.me> (http://blog.izs.me/)", - "license": "ISC", - "bugs": { - "url": "https://github.com/npm/wrappy/issues" - }, - "homepage": "https://github.com/npm/wrappy" -} diff --git a/node_modules/wrappy/wrappy.js b/node_modules/wrappy/wrappy.js deleted file mode 100644 index bb7e7d6..0000000 --- a/node_modules/wrappy/wrappy.js +++ /dev/null @@ -1,33 +0,0 @@ -// Returns a wrapper function that returns a wrapped callback -// The wrapper function should do some stuff, and return a -// presumably different callback function. -// This makes sure that own properties are retained, so that -// decorations and such are not lost along the way. -module.exports = wrappy -function wrappy (fn, cb) { - if (fn && cb) return wrappy(fn)(cb) - - if (typeof fn !== 'function') - throw new TypeError('need wrapper function') - - Object.keys(fn).forEach(function (k) { - wrapper[k] = fn[k] - }) - - return wrapper - - function wrapper() { - var args = new Array(arguments.length) - for (var i = 0; i < args.length; i++) { - args[i] = arguments[i] - } - var ret = fn.apply(this, args) - var cb = args[args.length-1] - if (typeof ret === 'function' && ret !== cb) { - Object.keys(cb).forEach(function (k) { - ret[k] = cb[k] - }) - } - return ret - } -} diff --git a/node_modules/y18n/build/index.cjs b/node_modules/y18n/build/index.cjs deleted file mode 100644 index b2731e1..0000000 --- a/node_modules/y18n/build/index.cjs +++ /dev/null @@ -1,203 +0,0 @@ -'use strict'; - -var fs = require('fs'); -var util = require('util'); -var path = require('path'); - -let shim; -class Y18N { - constructor(opts) { - // configurable options. - opts = opts || {}; - this.directory = opts.directory || './locales'; - this.updateFiles = typeof opts.updateFiles === 'boolean' ? opts.updateFiles : true; - this.locale = opts.locale || 'en'; - this.fallbackToLanguage = typeof opts.fallbackToLanguage === 'boolean' ? opts.fallbackToLanguage : true; - // internal stuff. - this.cache = Object.create(null); - this.writeQueue = []; - } - __(...args) { - if (typeof arguments[0] !== 'string') { - return this._taggedLiteral(arguments[0], ...arguments); - } - const str = args.shift(); - let cb = function () { }; // start with noop. - if (typeof args[args.length - 1] === 'function') - cb = args.pop(); - cb = cb || function () { }; // noop. - if (!this.cache[this.locale]) - this._readLocaleFile(); - // we've observed a new string, update the language file. - if (!this.cache[this.locale][str] && this.updateFiles) { - this.cache[this.locale][str] = str; - // include the current directory and locale, - // since these values could change before the - // write is performed. - this._enqueueWrite({ - directory: this.directory, - locale: this.locale, - cb - }); - } - else { - cb(); - } - return shim.format.apply(shim.format, [this.cache[this.locale][str] || str].concat(args)); - } - __n() { - const args = Array.prototype.slice.call(arguments); - const singular = args.shift(); - const plural = args.shift(); - const quantity = args.shift(); - let cb = function () { }; // start with noop. - if (typeof args[args.length - 1] === 'function') - cb = args.pop(); - if (!this.cache[this.locale]) - this._readLocaleFile(); - let str = quantity === 1 ? singular : plural; - if (this.cache[this.locale][singular]) { - const entry = this.cache[this.locale][singular]; - str = entry[quantity === 1 ? 'one' : 'other']; - } - // we've observed a new string, update the language file. - if (!this.cache[this.locale][singular] && this.updateFiles) { - this.cache[this.locale][singular] = { - one: singular, - other: plural - }; - // include the current directory and locale, - // since these values could change before the - // write is performed. - this._enqueueWrite({ - directory: this.directory, - locale: this.locale, - cb - }); - } - else { - cb(); - } - // if a %d placeholder is provided, add quantity - // to the arguments expanded by util.format. - const values = [str]; - if (~str.indexOf('%d')) - values.push(quantity); - return shim.format.apply(shim.format, values.concat(args)); - } - setLocale(locale) { - this.locale = locale; - } - getLocale() { - return this.locale; - } - updateLocale(obj) { - if (!this.cache[this.locale]) - this._readLocaleFile(); - for (const key in obj) { - if (Object.prototype.hasOwnProperty.call(obj, key)) { - this.cache[this.locale][key] = obj[key]; - } - } - } - _taggedLiteral(parts, ...args) { - let str = ''; - parts.forEach(function (part, i) { - const arg = args[i + 1]; - str += part; - if (typeof arg !== 'undefined') { - str += '%s'; - } - }); - return this.__.apply(this, [str].concat([].slice.call(args, 1))); - } - _enqueueWrite(work) { - this.writeQueue.push(work); - if (this.writeQueue.length === 1) - this._processWriteQueue(); - } - _processWriteQueue() { - const _this = this; - const work = this.writeQueue[0]; - // destructure the enqueued work. - const directory = work.directory; - const locale = work.locale; - const cb = work.cb; - const languageFile = this._resolveLocaleFile(directory, locale); - const serializedLocale = JSON.stringify(this.cache[locale], null, 2); - shim.fs.writeFile(languageFile, serializedLocale, 'utf-8', function (err) { - _this.writeQueue.shift(); - if (_this.writeQueue.length > 0) - _this._processWriteQueue(); - cb(err); - }); - } - _readLocaleFile() { - let localeLookup = {}; - const languageFile = this._resolveLocaleFile(this.directory, this.locale); - try { - // When using a bundler such as webpack, readFileSync may not be defined: - if (shim.fs.readFileSync) { - localeLookup = JSON.parse(shim.fs.readFileSync(languageFile, 'utf-8')); - } - } - catch (err) { - if (err instanceof SyntaxError) { - err.message = 'syntax error in ' + languageFile; - } - if (err.code === 'ENOENT') - localeLookup = {}; - else - throw err; - } - this.cache[this.locale] = localeLookup; - } - _resolveLocaleFile(directory, locale) { - let file = shim.resolve(directory, './', locale + '.json'); - if (this.fallbackToLanguage && !this._fileExistsSync(file) && ~locale.lastIndexOf('_')) { - // attempt fallback to language only - const languageFile = shim.resolve(directory, './', locale.split('_')[0] + '.json'); - if (this._fileExistsSync(languageFile)) - file = languageFile; - } - return file; - } - _fileExistsSync(file) { - return shim.exists(file); - } -} -function y18n$1(opts, _shim) { - shim = _shim; - const y18n = new Y18N(opts); - return { - __: y18n.__.bind(y18n), - __n: y18n.__n.bind(y18n), - setLocale: y18n.setLocale.bind(y18n), - getLocale: y18n.getLocale.bind(y18n), - updateLocale: y18n.updateLocale.bind(y18n), - locale: y18n.locale - }; -} - -var nodePlatformShim = { - fs: { - readFileSync: fs.readFileSync, - writeFile: fs.writeFile - }, - format: util.format, - resolve: path.resolve, - exists: (file) => { - try { - return fs.statSync(file).isFile(); - } - catch (err) { - return false; - } - } -}; - -const y18n = (opts) => { - return y18n$1(opts, nodePlatformShim); -}; - -module.exports = y18n; diff --git a/node_modules/y18n/build/lib/cjs.js b/node_modules/y18n/build/lib/cjs.js deleted file mode 100644 index ff58470..0000000 --- a/node_modules/y18n/build/lib/cjs.js +++ /dev/null @@ -1,6 +0,0 @@ -import { y18n as _y18n } from './index.js'; -import nodePlatformShim from './platform-shims/node.js'; -const y18n = (opts) => { - return _y18n(opts, nodePlatformShim); -}; -export default y18n; diff --git a/node_modules/y18n/build/lib/index.js b/node_modules/y18n/build/lib/index.js deleted file mode 100644 index e38f335..0000000 --- a/node_modules/y18n/build/lib/index.js +++ /dev/null @@ -1,174 +0,0 @@ -let shim; -class Y18N { - constructor(opts) { - // configurable options. - opts = opts || {}; - this.directory = opts.directory || './locales'; - this.updateFiles = typeof opts.updateFiles === 'boolean' ? opts.updateFiles : true; - this.locale = opts.locale || 'en'; - this.fallbackToLanguage = typeof opts.fallbackToLanguage === 'boolean' ? opts.fallbackToLanguage : true; - // internal stuff. - this.cache = Object.create(null); - this.writeQueue = []; - } - __(...args) { - if (typeof arguments[0] !== 'string') { - return this._taggedLiteral(arguments[0], ...arguments); - } - const str = args.shift(); - let cb = function () { }; // start with noop. - if (typeof args[args.length - 1] === 'function') - cb = args.pop(); - cb = cb || function () { }; // noop. - if (!this.cache[this.locale]) - this._readLocaleFile(); - // we've observed a new string, update the language file. - if (!this.cache[this.locale][str] && this.updateFiles) { - this.cache[this.locale][str] = str; - // include the current directory and locale, - // since these values could change before the - // write is performed. - this._enqueueWrite({ - directory: this.directory, - locale: this.locale, - cb - }); - } - else { - cb(); - } - return shim.format.apply(shim.format, [this.cache[this.locale][str] || str].concat(args)); - } - __n() { - const args = Array.prototype.slice.call(arguments); - const singular = args.shift(); - const plural = args.shift(); - const quantity = args.shift(); - let cb = function () { }; // start with noop. - if (typeof args[args.length - 1] === 'function') - cb = args.pop(); - if (!this.cache[this.locale]) - this._readLocaleFile(); - let str = quantity === 1 ? singular : plural; - if (this.cache[this.locale][singular]) { - const entry = this.cache[this.locale][singular]; - str = entry[quantity === 1 ? 'one' : 'other']; - } - // we've observed a new string, update the language file. - if (!this.cache[this.locale][singular] && this.updateFiles) { - this.cache[this.locale][singular] = { - one: singular, - other: plural - }; - // include the current directory and locale, - // since these values could change before the - // write is performed. - this._enqueueWrite({ - directory: this.directory, - locale: this.locale, - cb - }); - } - else { - cb(); - } - // if a %d placeholder is provided, add quantity - // to the arguments expanded by util.format. - const values = [str]; - if (~str.indexOf('%d')) - values.push(quantity); - return shim.format.apply(shim.format, values.concat(args)); - } - setLocale(locale) { - this.locale = locale; - } - getLocale() { - return this.locale; - } - updateLocale(obj) { - if (!this.cache[this.locale]) - this._readLocaleFile(); - for (const key in obj) { - if (Object.prototype.hasOwnProperty.call(obj, key)) { - this.cache[this.locale][key] = obj[key]; - } - } - } - _taggedLiteral(parts, ...args) { - let str = ''; - parts.forEach(function (part, i) { - const arg = args[i + 1]; - str += part; - if (typeof arg !== 'undefined') { - str += '%s'; - } - }); - return this.__.apply(this, [str].concat([].slice.call(args, 1))); - } - _enqueueWrite(work) { - this.writeQueue.push(work); - if (this.writeQueue.length === 1) - this._processWriteQueue(); - } - _processWriteQueue() { - const _this = this; - const work = this.writeQueue[0]; - // destructure the enqueued work. - const directory = work.directory; - const locale = work.locale; - const cb = work.cb; - const languageFile = this._resolveLocaleFile(directory, locale); - const serializedLocale = JSON.stringify(this.cache[locale], null, 2); - shim.fs.writeFile(languageFile, serializedLocale, 'utf-8', function (err) { - _this.writeQueue.shift(); - if (_this.writeQueue.length > 0) - _this._processWriteQueue(); - cb(err); - }); - } - _readLocaleFile() { - let localeLookup = {}; - const languageFile = this._resolveLocaleFile(this.directory, this.locale); - try { - // When using a bundler such as webpack, readFileSync may not be defined: - if (shim.fs.readFileSync) { - localeLookup = JSON.parse(shim.fs.readFileSync(languageFile, 'utf-8')); - } - } - catch (err) { - if (err instanceof SyntaxError) { - err.message = 'syntax error in ' + languageFile; - } - if (err.code === 'ENOENT') - localeLookup = {}; - else - throw err; - } - this.cache[this.locale] = localeLookup; - } - _resolveLocaleFile(directory, locale) { - let file = shim.resolve(directory, './', locale + '.json'); - if (this.fallbackToLanguage && !this._fileExistsSync(file) && ~locale.lastIndexOf('_')) { - // attempt fallback to language only - const languageFile = shim.resolve(directory, './', locale.split('_')[0] + '.json'); - if (this._fileExistsSync(languageFile)) - file = languageFile; - } - return file; - } - _fileExistsSync(file) { - return shim.exists(file); - } -} -export function y18n(opts, _shim) { - shim = _shim; - const y18n = new Y18N(opts); - return { - __: y18n.__.bind(y18n), - __n: y18n.__n.bind(y18n), - setLocale: y18n.setLocale.bind(y18n), - getLocale: y18n.getLocale.bind(y18n), - updateLocale: y18n.updateLocale.bind(y18n), - locale: y18n.locale - }; -} diff --git a/node_modules/y18n/build/lib/platform-shims/node.js b/node_modules/y18n/build/lib/platform-shims/node.js deleted file mode 100644 index 181208b..0000000 --- a/node_modules/y18n/build/lib/platform-shims/node.js +++ /dev/null @@ -1,19 +0,0 @@ -import { readFileSync, statSync, writeFile } from 'fs'; -import { format } from 'util'; -import { resolve } from 'path'; -export default { - fs: { - readFileSync, - writeFile - }, - format, - resolve, - exists: (file) => { - try { - return statSync(file).isFile(); - } - catch (err) { - return false; - } - } -}; diff --git a/node_modules/y18n/index.mjs b/node_modules/y18n/index.mjs deleted file mode 100644 index 46c8213..0000000 --- a/node_modules/y18n/index.mjs +++ /dev/null @@ -1,8 +0,0 @@ -import shim from './build/lib/platform-shims/node.js' -import { y18n as _y18n } from './build/lib/index.js' - -const y18n = (opts) => { - return _y18n(opts, shim) -} - -export default y18n diff --git a/node_modules/y18n/package.json b/node_modules/y18n/package.json deleted file mode 100644 index 4e5c1ca..0000000 --- a/node_modules/y18n/package.json +++ /dev/null @@ -1,70 +0,0 @@ -{ - "name": "y18n", - "version": "5.0.8", - "description": "the bare-bones internationalization library used by yargs", - "exports": { - ".": [ - { - "import": "./index.mjs", - "require": "./build/index.cjs" - }, - "./build/index.cjs" - ] - }, - "type": "module", - "module": "./build/lib/index.js", - "keywords": [ - "i18n", - "internationalization", - "yargs" - ], - "homepage": "https://github.com/yargs/y18n", - "bugs": { - "url": "https://github.com/yargs/y18n/issues" - }, - "repository": "yargs/y18n", - "license": "ISC", - "author": "Ben Coe <bencoe@gmail.com>", - "main": "./build/index.cjs", - "scripts": { - "check": "standardx **/*.ts **/*.cjs **/*.mjs", - "fix": "standardx --fix **/*.ts **/*.cjs **/*.mjs", - "pretest": "rimraf build && tsc -p tsconfig.test.json && cross-env NODE_ENV=test npm run build:cjs", - "test": "c8 --reporter=text --reporter=html mocha test/*.cjs", - "test:esm": "c8 --reporter=text --reporter=html mocha test/esm/*.mjs", - "posttest": "npm run check", - "coverage": "c8 report --check-coverage", - "precompile": "rimraf build", - "compile": "tsc", - "postcompile": "npm run build:cjs", - "build:cjs": "rollup -c", - "prepare": "npm run compile" - }, - "devDependencies": { - "@types/node": "^14.6.4", - "@wessberg/rollup-plugin-ts": "^1.3.1", - "c8": "^7.3.0", - "chai": "^4.0.1", - "cross-env": "^7.0.2", - "gts": "^3.0.0", - "mocha": "^8.0.0", - "rimraf": "^3.0.2", - "rollup": "^2.26.10", - "standardx": "^7.0.0", - "ts-transform-default-export": "^1.0.2", - "typescript": "^4.0.0" - }, - "files": [ - "build", - "index.mjs", - "!*.d.ts" - ], - "engines": { - "node": ">=10" - }, - "standardx": { - "ignore": [ - "build" - ] - } -} diff --git a/node_modules/yargs-parser/browser.js b/node_modules/yargs-parser/browser.js deleted file mode 100644 index 241202c..0000000 --- a/node_modules/yargs-parser/browser.js +++ /dev/null @@ -1,29 +0,0 @@ -// Main entrypoint for ESM web browser environments. Avoids using Node.js -// specific libraries, such as "path". -// -// TODO: figure out reasonable web equivalents for "resolve", "normalize", etc. -import { camelCase, decamelize, looksLikeNumber } from './build/lib/string-utils.js' -import { YargsParser } from './build/lib/yargs-parser.js' -const parser = new YargsParser({ - cwd: () => { return '' }, - format: (str, arg) => { return str.replace('%s', arg) }, - normalize: (str) => { return str }, - resolve: (str) => { return str }, - require: () => { - throw Error('loading config from files not currently supported in browser') - }, - env: () => {} -}) - -const yargsParser = function Parser (args, opts) { - const result = parser.parse(args.slice(), opts) - return result.argv -} -yargsParser.detailed = function (args, opts) { - return parser.parse(args.slice(), opts) -} -yargsParser.camelCase = camelCase -yargsParser.decamelize = decamelize -yargsParser.looksLikeNumber = looksLikeNumber - -export default yargsParser diff --git a/node_modules/yargs-parser/build/index.cjs b/node_modules/yargs-parser/build/index.cjs deleted file mode 100644 index cf6f50f..0000000 --- a/node_modules/yargs-parser/build/index.cjs +++ /dev/null @@ -1,1050 +0,0 @@ -'use strict'; - -var util = require('util'); -var path = require('path'); -var fs = require('fs'); - -function camelCase(str) { - const isCamelCase = str !== str.toLowerCase() && str !== str.toUpperCase(); - if (!isCamelCase) { - str = str.toLowerCase(); - } - if (str.indexOf('-') === -1 && str.indexOf('_') === -1) { - return str; - } - else { - let camelcase = ''; - let nextChrUpper = false; - const leadingHyphens = str.match(/^-+/); - for (let i = leadingHyphens ? leadingHyphens[0].length : 0; i < str.length; i++) { - let chr = str.charAt(i); - if (nextChrUpper) { - nextChrUpper = false; - chr = chr.toUpperCase(); - } - if (i !== 0 && (chr === '-' || chr === '_')) { - nextChrUpper = true; - } - else if (chr !== '-' && chr !== '_') { - camelcase += chr; - } - } - return camelcase; - } -} -function decamelize(str, joinString) { - const lowercase = str.toLowerCase(); - joinString = joinString || '-'; - let notCamelcase = ''; - for (let i = 0; i < str.length; i++) { - const chrLower = lowercase.charAt(i); - const chrString = str.charAt(i); - if (chrLower !== chrString && i > 0) { - notCamelcase += `${joinString}${lowercase.charAt(i)}`; - } - else { - notCamelcase += chrString; - } - } - return notCamelcase; -} -function looksLikeNumber(x) { - if (x === null || x === undefined) - return false; - if (typeof x === 'number') - return true; - if (/^0x[0-9a-f]+$/i.test(x)) - return true; - if (/^0[^.]/.test(x)) - return false; - return /^[-]?(?:\d+(?:\.\d*)?|\.\d+)(e[-+]?\d+)?$/.test(x); -} - -function tokenizeArgString(argString) { - if (Array.isArray(argString)) { - return argString.map(e => typeof e !== 'string' ? e + '' : e); - } - argString = argString.trim(); - let i = 0; - let prevC = null; - let c = null; - let opening = null; - const args = []; - for (let ii = 0; ii < argString.length; ii++) { - prevC = c; - c = argString.charAt(ii); - if (c === ' ' && !opening) { - if (!(prevC === ' ')) { - i++; - } - continue; - } - if (c === opening) { - opening = null; - } - else if ((c === "'" || c === '"') && !opening) { - opening = c; - } - if (!args[i]) - args[i] = ''; - args[i] += c; - } - return args; -} - -var DefaultValuesForTypeKey; -(function (DefaultValuesForTypeKey) { - DefaultValuesForTypeKey["BOOLEAN"] = "boolean"; - DefaultValuesForTypeKey["STRING"] = "string"; - DefaultValuesForTypeKey["NUMBER"] = "number"; - DefaultValuesForTypeKey["ARRAY"] = "array"; -})(DefaultValuesForTypeKey || (DefaultValuesForTypeKey = {})); - -let mixin; -class YargsParser { - constructor(_mixin) { - mixin = _mixin; - } - parse(argsInput, options) { - const opts = Object.assign({ - alias: undefined, - array: undefined, - boolean: undefined, - config: undefined, - configObjects: undefined, - configuration: undefined, - coerce: undefined, - count: undefined, - default: undefined, - envPrefix: undefined, - narg: undefined, - normalize: undefined, - string: undefined, - number: undefined, - __: undefined, - key: undefined - }, options); - const args = tokenizeArgString(argsInput); - const inputIsString = typeof argsInput === 'string'; - const aliases = combineAliases(Object.assign(Object.create(null), opts.alias)); - const configuration = Object.assign({ - 'boolean-negation': true, - 'camel-case-expansion': true, - 'combine-arrays': false, - 'dot-notation': true, - 'duplicate-arguments-array': true, - 'flatten-duplicate-arrays': true, - 'greedy-arrays': true, - 'halt-at-non-option': false, - 'nargs-eats-options': false, - 'negation-prefix': 'no-', - 'parse-numbers': true, - 'parse-positional-numbers': true, - 'populate--': false, - 'set-placeholder-key': false, - 'short-option-groups': true, - 'strip-aliased': false, - 'strip-dashed': false, - 'unknown-options-as-args': false - }, opts.configuration); - const defaults = Object.assign(Object.create(null), opts.default); - const configObjects = opts.configObjects || []; - const envPrefix = opts.envPrefix; - const notFlagsOption = configuration['populate--']; - const notFlagsArgv = notFlagsOption ? '--' : '_'; - const newAliases = Object.create(null); - const defaulted = Object.create(null); - const __ = opts.__ || mixin.format; - const flags = { - aliases: Object.create(null), - arrays: Object.create(null), - bools: Object.create(null), - strings: Object.create(null), - numbers: Object.create(null), - counts: Object.create(null), - normalize: Object.create(null), - configs: Object.create(null), - nargs: Object.create(null), - coercions: Object.create(null), - keys: [] - }; - const negative = /^-([0-9]+(\.[0-9]+)?|\.[0-9]+)$/; - const negatedBoolean = new RegExp('^--' + configuration['negation-prefix'] + '(.+)'); - [].concat(opts.array || []).filter(Boolean).forEach(function (opt) { - const key = typeof opt === 'object' ? opt.key : opt; - const assignment = Object.keys(opt).map(function (key) { - const arrayFlagKeys = { - boolean: 'bools', - string: 'strings', - number: 'numbers' - }; - return arrayFlagKeys[key]; - }).filter(Boolean).pop(); - if (assignment) { - flags[assignment][key] = true; - } - flags.arrays[key] = true; - flags.keys.push(key); - }); - [].concat(opts.boolean || []).filter(Boolean).forEach(function (key) { - flags.bools[key] = true; - flags.keys.push(key); - }); - [].concat(opts.string || []).filter(Boolean).forEach(function (key) { - flags.strings[key] = true; - flags.keys.push(key); - }); - [].concat(opts.number || []).filter(Boolean).forEach(function (key) { - flags.numbers[key] = true; - flags.keys.push(key); - }); - [].concat(opts.count || []).filter(Boolean).forEach(function (key) { - flags.counts[key] = true; - flags.keys.push(key); - }); - [].concat(opts.normalize || []).filter(Boolean).forEach(function (key) { - flags.normalize[key] = true; - flags.keys.push(key); - }); - if (typeof opts.narg === 'object') { - Object.entries(opts.narg).forEach(([key, value]) => { - if (typeof value === 'number') { - flags.nargs[key] = value; - flags.keys.push(key); - } - }); - } - if (typeof opts.coerce === 'object') { - Object.entries(opts.coerce).forEach(([key, value]) => { - if (typeof value === 'function') { - flags.coercions[key] = value; - flags.keys.push(key); - } - }); - } - if (typeof opts.config !== 'undefined') { - if (Array.isArray(opts.config) || typeof opts.config === 'string') { - [].concat(opts.config).filter(Boolean).forEach(function (key) { - flags.configs[key] = true; - }); - } - else if (typeof opts.config === 'object') { - Object.entries(opts.config).forEach(([key, value]) => { - if (typeof value === 'boolean' || typeof value === 'function') { - flags.configs[key] = value; - } - }); - } - } - extendAliases(opts.key, aliases, opts.default, flags.arrays); - Object.keys(defaults).forEach(function (key) { - (flags.aliases[key] || []).forEach(function (alias) { - defaults[alias] = defaults[key]; - }); - }); - let error = null; - checkConfiguration(); - let notFlags = []; - const argv = Object.assign(Object.create(null), { _: [] }); - const argvReturn = {}; - for (let i = 0; i < args.length; i++) { - const arg = args[i]; - const truncatedArg = arg.replace(/^-{3,}/, '---'); - let broken; - let key; - let letters; - let m; - let next; - let value; - if (arg !== '--' && /^-/.test(arg) && isUnknownOptionAsArg(arg)) { - pushPositional(arg); - } - else if (truncatedArg.match(/^---+(=|$)/)) { - pushPositional(arg); - continue; - } - else if (arg.match(/^--.+=/) || (!configuration['short-option-groups'] && arg.match(/^-.+=/))) { - m = arg.match(/^--?([^=]+)=([\s\S]*)$/); - if (m !== null && Array.isArray(m) && m.length >= 3) { - if (checkAllAliases(m[1], flags.arrays)) { - i = eatArray(i, m[1], args, m[2]); - } - else if (checkAllAliases(m[1], flags.nargs) !== false) { - i = eatNargs(i, m[1], args, m[2]); - } - else { - setArg(m[1], m[2], true); - } - } - } - else if (arg.match(negatedBoolean) && configuration['boolean-negation']) { - m = arg.match(negatedBoolean); - if (m !== null && Array.isArray(m) && m.length >= 2) { - key = m[1]; - setArg(key, checkAllAliases(key, flags.arrays) ? [false] : false); - } - } - else if (arg.match(/^--.+/) || (!configuration['short-option-groups'] && arg.match(/^-[^-]+/))) { - m = arg.match(/^--?(.+)/); - if (m !== null && Array.isArray(m) && m.length >= 2) { - key = m[1]; - if (checkAllAliases(key, flags.arrays)) { - i = eatArray(i, key, args); - } - else if (checkAllAliases(key, flags.nargs) !== false) { - i = eatNargs(i, key, args); - } - else { - next = args[i + 1]; - if (next !== undefined && (!next.match(/^-/) || - next.match(negative)) && - !checkAllAliases(key, flags.bools) && - !checkAllAliases(key, flags.counts)) { - setArg(key, next); - i++; - } - else if (/^(true|false)$/.test(next)) { - setArg(key, next); - i++; - } - else { - setArg(key, defaultValue(key)); - } - } - } - } - else if (arg.match(/^-.\..+=/)) { - m = arg.match(/^-([^=]+)=([\s\S]*)$/); - if (m !== null && Array.isArray(m) && m.length >= 3) { - setArg(m[1], m[2]); - } - } - else if (arg.match(/^-.\..+/) && !arg.match(negative)) { - next = args[i + 1]; - m = arg.match(/^-(.\..+)/); - if (m !== null && Array.isArray(m) && m.length >= 2) { - key = m[1]; - if (next !== undefined && !next.match(/^-/) && - !checkAllAliases(key, flags.bools) && - !checkAllAliases(key, flags.counts)) { - setArg(key, next); - i++; - } - else { - setArg(key, defaultValue(key)); - } - } - } - else if (arg.match(/^-[^-]+/) && !arg.match(negative)) { - letters = arg.slice(1, -1).split(''); - broken = false; - for (let j = 0; j < letters.length; j++) { - next = arg.slice(j + 2); - if (letters[j + 1] && letters[j + 1] === '=') { - value = arg.slice(j + 3); - key = letters[j]; - if (checkAllAliases(key, flags.arrays)) { - i = eatArray(i, key, args, value); - } - else if (checkAllAliases(key, flags.nargs) !== false) { - i = eatNargs(i, key, args, value); - } - else { - setArg(key, value); - } - broken = true; - break; - } - if (next === '-') { - setArg(letters[j], next); - continue; - } - if (/[A-Za-z]/.test(letters[j]) && - /^-?\d+(\.\d*)?(e-?\d+)?$/.test(next) && - checkAllAliases(next, flags.bools) === false) { - setArg(letters[j], next); - broken = true; - break; - } - if (letters[j + 1] && letters[j + 1].match(/\W/)) { - setArg(letters[j], next); - broken = true; - break; - } - else { - setArg(letters[j], defaultValue(letters[j])); - } - } - key = arg.slice(-1)[0]; - if (!broken && key !== '-') { - if (checkAllAliases(key, flags.arrays)) { - i = eatArray(i, key, args); - } - else if (checkAllAliases(key, flags.nargs) !== false) { - i = eatNargs(i, key, args); - } - else { - next = args[i + 1]; - if (next !== undefined && (!/^(-|--)[^-]/.test(next) || - next.match(negative)) && - !checkAllAliases(key, flags.bools) && - !checkAllAliases(key, flags.counts)) { - setArg(key, next); - i++; - } - else if (/^(true|false)$/.test(next)) { - setArg(key, next); - i++; - } - else { - setArg(key, defaultValue(key)); - } - } - } - } - else if (arg.match(/^-[0-9]$/) && - arg.match(negative) && - checkAllAliases(arg.slice(1), flags.bools)) { - key = arg.slice(1); - setArg(key, defaultValue(key)); - } - else if (arg === '--') { - notFlags = args.slice(i + 1); - break; - } - else if (configuration['halt-at-non-option']) { - notFlags = args.slice(i); - break; - } - else { - pushPositional(arg); - } - } - applyEnvVars(argv, true); - applyEnvVars(argv, false); - setConfig(argv); - setConfigObjects(); - applyDefaultsAndAliases(argv, flags.aliases, defaults, true); - applyCoercions(argv); - if (configuration['set-placeholder-key']) - setPlaceholderKeys(argv); - Object.keys(flags.counts).forEach(function (key) { - if (!hasKey(argv, key.split('.'))) - setArg(key, 0); - }); - if (notFlagsOption && notFlags.length) - argv[notFlagsArgv] = []; - notFlags.forEach(function (key) { - argv[notFlagsArgv].push(key); - }); - if (configuration['camel-case-expansion'] && configuration['strip-dashed']) { - Object.keys(argv).filter(key => key !== '--' && key.includes('-')).forEach(key => { - delete argv[key]; - }); - } - if (configuration['strip-aliased']) { - [].concat(...Object.keys(aliases).map(k => aliases[k])).forEach(alias => { - if (configuration['camel-case-expansion'] && alias.includes('-')) { - delete argv[alias.split('.').map(prop => camelCase(prop)).join('.')]; - } - delete argv[alias]; - }); - } - function pushPositional(arg) { - const maybeCoercedNumber = maybeCoerceNumber('_', arg); - if (typeof maybeCoercedNumber === 'string' || typeof maybeCoercedNumber === 'number') { - argv._.push(maybeCoercedNumber); - } - } - function eatNargs(i, key, args, argAfterEqualSign) { - let ii; - let toEat = checkAllAliases(key, flags.nargs); - toEat = typeof toEat !== 'number' || isNaN(toEat) ? 1 : toEat; - if (toEat === 0) { - if (!isUndefined(argAfterEqualSign)) { - error = Error(__('Argument unexpected for: %s', key)); - } - setArg(key, defaultValue(key)); - return i; - } - let available = isUndefined(argAfterEqualSign) ? 0 : 1; - if (configuration['nargs-eats-options']) { - if (args.length - (i + 1) + available < toEat) { - error = Error(__('Not enough arguments following: %s', key)); - } - available = toEat; - } - else { - for (ii = i + 1; ii < args.length; ii++) { - if (!args[ii].match(/^-[^0-9]/) || args[ii].match(negative) || isUnknownOptionAsArg(args[ii])) - available++; - else - break; - } - if (available < toEat) - error = Error(__('Not enough arguments following: %s', key)); - } - let consumed = Math.min(available, toEat); - if (!isUndefined(argAfterEqualSign) && consumed > 0) { - setArg(key, argAfterEqualSign); - consumed--; - } - for (ii = i + 1; ii < (consumed + i + 1); ii++) { - setArg(key, args[ii]); - } - return (i + consumed); - } - function eatArray(i, key, args, argAfterEqualSign) { - let argsToSet = []; - let next = argAfterEqualSign || args[i + 1]; - const nargsCount = checkAllAliases(key, flags.nargs); - if (checkAllAliases(key, flags.bools) && !(/^(true|false)$/.test(next))) { - argsToSet.push(true); - } - else if (isUndefined(next) || - (isUndefined(argAfterEqualSign) && /^-/.test(next) && !negative.test(next) && !isUnknownOptionAsArg(next))) { - if (defaults[key] !== undefined) { - const defVal = defaults[key]; - argsToSet = Array.isArray(defVal) ? defVal : [defVal]; - } - } - else { - if (!isUndefined(argAfterEqualSign)) { - argsToSet.push(processValue(key, argAfterEqualSign, true)); - } - for (let ii = i + 1; ii < args.length; ii++) { - if ((!configuration['greedy-arrays'] && argsToSet.length > 0) || - (nargsCount && typeof nargsCount === 'number' && argsToSet.length >= nargsCount)) - break; - next = args[ii]; - if (/^-/.test(next) && !negative.test(next) && !isUnknownOptionAsArg(next)) - break; - i = ii; - argsToSet.push(processValue(key, next, inputIsString)); - } - } - if (typeof nargsCount === 'number' && ((nargsCount && argsToSet.length < nargsCount) || - (isNaN(nargsCount) && argsToSet.length === 0))) { - error = Error(__('Not enough arguments following: %s', key)); - } - setArg(key, argsToSet); - return i; - } - function setArg(key, val, shouldStripQuotes = inputIsString) { - if (/-/.test(key) && configuration['camel-case-expansion']) { - const alias = key.split('.').map(function (prop) { - return camelCase(prop); - }).join('.'); - addNewAlias(key, alias); - } - const value = processValue(key, val, shouldStripQuotes); - const splitKey = key.split('.'); - setKey(argv, splitKey, value); - if (flags.aliases[key]) { - flags.aliases[key].forEach(function (x) { - const keyProperties = x.split('.'); - setKey(argv, keyProperties, value); - }); - } - if (splitKey.length > 1 && configuration['dot-notation']) { - (flags.aliases[splitKey[0]] || []).forEach(function (x) { - let keyProperties = x.split('.'); - const a = [].concat(splitKey); - a.shift(); - keyProperties = keyProperties.concat(a); - if (!(flags.aliases[key] || []).includes(keyProperties.join('.'))) { - setKey(argv, keyProperties, value); - } - }); - } - if (checkAllAliases(key, flags.normalize) && !checkAllAliases(key, flags.arrays)) { - const keys = [key].concat(flags.aliases[key] || []); - keys.forEach(function (key) { - Object.defineProperty(argvReturn, key, { - enumerable: true, - get() { - return val; - }, - set(value) { - val = typeof value === 'string' ? mixin.normalize(value) : value; - } - }); - }); - } - } - function addNewAlias(key, alias) { - if (!(flags.aliases[key] && flags.aliases[key].length)) { - flags.aliases[key] = [alias]; - newAliases[alias] = true; - } - if (!(flags.aliases[alias] && flags.aliases[alias].length)) { - addNewAlias(alias, key); - } - } - function processValue(key, val, shouldStripQuotes) { - if (shouldStripQuotes) { - val = stripQuotes(val); - } - if (checkAllAliases(key, flags.bools) || checkAllAliases(key, flags.counts)) { - if (typeof val === 'string') - val = val === 'true'; - } - let value = Array.isArray(val) - ? val.map(function (v) { return maybeCoerceNumber(key, v); }) - : maybeCoerceNumber(key, val); - if (checkAllAliases(key, flags.counts) && (isUndefined(value) || typeof value === 'boolean')) { - value = increment(); - } - if (checkAllAliases(key, flags.normalize) && checkAllAliases(key, flags.arrays)) { - if (Array.isArray(val)) - value = val.map((val) => { return mixin.normalize(val); }); - else - value = mixin.normalize(val); - } - return value; - } - function maybeCoerceNumber(key, value) { - if (!configuration['parse-positional-numbers'] && key === '_') - return value; - if (!checkAllAliases(key, flags.strings) && !checkAllAliases(key, flags.bools) && !Array.isArray(value)) { - const shouldCoerceNumber = looksLikeNumber(value) && configuration['parse-numbers'] && (Number.isSafeInteger(Math.floor(parseFloat(`${value}`)))); - if (shouldCoerceNumber || (!isUndefined(value) && checkAllAliases(key, flags.numbers))) { - value = Number(value); - } - } - return value; - } - function setConfig(argv) { - const configLookup = Object.create(null); - applyDefaultsAndAliases(configLookup, flags.aliases, defaults); - Object.keys(flags.configs).forEach(function (configKey) { - const configPath = argv[configKey] || configLookup[configKey]; - if (configPath) { - try { - let config = null; - const resolvedConfigPath = mixin.resolve(mixin.cwd(), configPath); - const resolveConfig = flags.configs[configKey]; - if (typeof resolveConfig === 'function') { - try { - config = resolveConfig(resolvedConfigPath); - } - catch (e) { - config = e; - } - if (config instanceof Error) { - error = config; - return; - } - } - else { - config = mixin.require(resolvedConfigPath); - } - setConfigObject(config); - } - catch (ex) { - if (ex.name === 'PermissionDenied') - error = ex; - else if (argv[configKey]) - error = Error(__('Invalid JSON config file: %s', configPath)); - } - } - }); - } - function setConfigObject(config, prev) { - Object.keys(config).forEach(function (key) { - const value = config[key]; - const fullKey = prev ? prev + '.' + key : key; - if (typeof value === 'object' && value !== null && !Array.isArray(value) && configuration['dot-notation']) { - setConfigObject(value, fullKey); - } - else { - if (!hasKey(argv, fullKey.split('.')) || (checkAllAliases(fullKey, flags.arrays) && configuration['combine-arrays'])) { - setArg(fullKey, value); - } - } - }); - } - function setConfigObjects() { - if (typeof configObjects !== 'undefined') { - configObjects.forEach(function (configObject) { - setConfigObject(configObject); - }); - } - } - function applyEnvVars(argv, configOnly) { - if (typeof envPrefix === 'undefined') - return; - const prefix = typeof envPrefix === 'string' ? envPrefix : ''; - const env = mixin.env(); - Object.keys(env).forEach(function (envVar) { - if (prefix === '' || envVar.lastIndexOf(prefix, 0) === 0) { - const keys = envVar.split('__').map(function (key, i) { - if (i === 0) { - key = key.substring(prefix.length); - } - return camelCase(key); - }); - if (((configOnly && flags.configs[keys.join('.')]) || !configOnly) && !hasKey(argv, keys)) { - setArg(keys.join('.'), env[envVar]); - } - } - }); - } - function applyCoercions(argv) { - let coerce; - const applied = new Set(); - Object.keys(argv).forEach(function (key) { - if (!applied.has(key)) { - coerce = checkAllAliases(key, flags.coercions); - if (typeof coerce === 'function') { - try { - const value = maybeCoerceNumber(key, coerce(argv[key])); - ([].concat(flags.aliases[key] || [], key)).forEach(ali => { - applied.add(ali); - argv[ali] = value; - }); - } - catch (err) { - error = err; - } - } - } - }); - } - function setPlaceholderKeys(argv) { - flags.keys.forEach((key) => { - if (~key.indexOf('.')) - return; - if (typeof argv[key] === 'undefined') - argv[key] = undefined; - }); - return argv; - } - function applyDefaultsAndAliases(obj, aliases, defaults, canLog = false) { - Object.keys(defaults).forEach(function (key) { - if (!hasKey(obj, key.split('.'))) { - setKey(obj, key.split('.'), defaults[key]); - if (canLog) - defaulted[key] = true; - (aliases[key] || []).forEach(function (x) { - if (hasKey(obj, x.split('.'))) - return; - setKey(obj, x.split('.'), defaults[key]); - }); - } - }); - } - function hasKey(obj, keys) { - let o = obj; - if (!configuration['dot-notation']) - keys = [keys.join('.')]; - keys.slice(0, -1).forEach(function (key) { - o = (o[key] || {}); - }); - const key = keys[keys.length - 1]; - if (typeof o !== 'object') - return false; - else - return key in o; - } - function setKey(obj, keys, value) { - let o = obj; - if (!configuration['dot-notation']) - keys = [keys.join('.')]; - keys.slice(0, -1).forEach(function (key) { - key = sanitizeKey(key); - if (typeof o === 'object' && o[key] === undefined) { - o[key] = {}; - } - if (typeof o[key] !== 'object' || Array.isArray(o[key])) { - if (Array.isArray(o[key])) { - o[key].push({}); - } - else { - o[key] = [o[key], {}]; - } - o = o[key][o[key].length - 1]; - } - else { - o = o[key]; - } - }); - const key = sanitizeKey(keys[keys.length - 1]); - const isTypeArray = checkAllAliases(keys.join('.'), flags.arrays); - const isValueArray = Array.isArray(value); - let duplicate = configuration['duplicate-arguments-array']; - if (!duplicate && checkAllAliases(key, flags.nargs)) { - duplicate = true; - if ((!isUndefined(o[key]) && flags.nargs[key] === 1) || (Array.isArray(o[key]) && o[key].length === flags.nargs[key])) { - o[key] = undefined; - } - } - if (value === increment()) { - o[key] = increment(o[key]); - } - else if (Array.isArray(o[key])) { - if (duplicate && isTypeArray && isValueArray) { - o[key] = configuration['flatten-duplicate-arrays'] ? o[key].concat(value) : (Array.isArray(o[key][0]) ? o[key] : [o[key]]).concat([value]); - } - else if (!duplicate && Boolean(isTypeArray) === Boolean(isValueArray)) { - o[key] = value; - } - else { - o[key] = o[key].concat([value]); - } - } - else if (o[key] === undefined && isTypeArray) { - o[key] = isValueArray ? value : [value]; - } - else if (duplicate && !(o[key] === undefined || - checkAllAliases(key, flags.counts) || - checkAllAliases(key, flags.bools))) { - o[key] = [o[key], value]; - } - else { - o[key] = value; - } - } - function extendAliases(...args) { - args.forEach(function (obj) { - Object.keys(obj || {}).forEach(function (key) { - if (flags.aliases[key]) - return; - flags.aliases[key] = [].concat(aliases[key] || []); - flags.aliases[key].concat(key).forEach(function (x) { - if (/-/.test(x) && configuration['camel-case-expansion']) { - const c = camelCase(x); - if (c !== key && flags.aliases[key].indexOf(c) === -1) { - flags.aliases[key].push(c); - newAliases[c] = true; - } - } - }); - flags.aliases[key].concat(key).forEach(function (x) { - if (x.length > 1 && /[A-Z]/.test(x) && configuration['camel-case-expansion']) { - const c = decamelize(x, '-'); - if (c !== key && flags.aliases[key].indexOf(c) === -1) { - flags.aliases[key].push(c); - newAliases[c] = true; - } - } - }); - flags.aliases[key].forEach(function (x) { - flags.aliases[x] = [key].concat(flags.aliases[key].filter(function (y) { - return x !== y; - })); - }); - }); - }); - } - function checkAllAliases(key, flag) { - const toCheck = [].concat(flags.aliases[key] || [], key); - const keys = Object.keys(flag); - const setAlias = toCheck.find(key => keys.includes(key)); - return setAlias ? flag[setAlias] : false; - } - function hasAnyFlag(key) { - const flagsKeys = Object.keys(flags); - const toCheck = [].concat(flagsKeys.map(k => flags[k])); - return toCheck.some(function (flag) { - return Array.isArray(flag) ? flag.includes(key) : flag[key]; - }); - } - function hasFlagsMatching(arg, ...patterns) { - const toCheck = [].concat(...patterns); - return toCheck.some(function (pattern) { - const match = arg.match(pattern); - return match && hasAnyFlag(match[1]); - }); - } - function hasAllShortFlags(arg) { - if (arg.match(negative) || !arg.match(/^-[^-]+/)) { - return false; - } - let hasAllFlags = true; - let next; - const letters = arg.slice(1).split(''); - for (let j = 0; j < letters.length; j++) { - next = arg.slice(j + 2); - if (!hasAnyFlag(letters[j])) { - hasAllFlags = false; - break; - } - if ((letters[j + 1] && letters[j + 1] === '=') || - next === '-' || - (/[A-Za-z]/.test(letters[j]) && /^-?\d+(\.\d*)?(e-?\d+)?$/.test(next)) || - (letters[j + 1] && letters[j + 1].match(/\W/))) { - break; - } - } - return hasAllFlags; - } - function isUnknownOptionAsArg(arg) { - return configuration['unknown-options-as-args'] && isUnknownOption(arg); - } - function isUnknownOption(arg) { - arg = arg.replace(/^-{3,}/, '--'); - if (arg.match(negative)) { - return false; - } - if (hasAllShortFlags(arg)) { - return false; - } - const flagWithEquals = /^-+([^=]+?)=[\s\S]*$/; - const normalFlag = /^-+([^=]+?)$/; - const flagEndingInHyphen = /^-+([^=]+?)-$/; - const flagEndingInDigits = /^-+([^=]+?\d+)$/; - const flagEndingInNonWordCharacters = /^-+([^=]+?)\W+.*$/; - return !hasFlagsMatching(arg, flagWithEquals, negatedBoolean, normalFlag, flagEndingInHyphen, flagEndingInDigits, flagEndingInNonWordCharacters); - } - function defaultValue(key) { - if (!checkAllAliases(key, flags.bools) && - !checkAllAliases(key, flags.counts) && - `${key}` in defaults) { - return defaults[key]; - } - else { - return defaultForType(guessType(key)); - } - } - function defaultForType(type) { - const def = { - [DefaultValuesForTypeKey.BOOLEAN]: true, - [DefaultValuesForTypeKey.STRING]: '', - [DefaultValuesForTypeKey.NUMBER]: undefined, - [DefaultValuesForTypeKey.ARRAY]: [] - }; - return def[type]; - } - function guessType(key) { - let type = DefaultValuesForTypeKey.BOOLEAN; - if (checkAllAliases(key, flags.strings)) - type = DefaultValuesForTypeKey.STRING; - else if (checkAllAliases(key, flags.numbers)) - type = DefaultValuesForTypeKey.NUMBER; - else if (checkAllAliases(key, flags.bools)) - type = DefaultValuesForTypeKey.BOOLEAN; - else if (checkAllAliases(key, flags.arrays)) - type = DefaultValuesForTypeKey.ARRAY; - return type; - } - function isUndefined(num) { - return num === undefined; - } - function checkConfiguration() { - Object.keys(flags.counts).find(key => { - if (checkAllAliases(key, flags.arrays)) { - error = Error(__('Invalid configuration: %s, opts.count excludes opts.array.', key)); - return true; - } - else if (checkAllAliases(key, flags.nargs)) { - error = Error(__('Invalid configuration: %s, opts.count excludes opts.narg.', key)); - return true; - } - return false; - }); - } - return { - aliases: Object.assign({}, flags.aliases), - argv: Object.assign(argvReturn, argv), - configuration: configuration, - defaulted: Object.assign({}, defaulted), - error: error, - newAliases: Object.assign({}, newAliases) - }; - } -} -function combineAliases(aliases) { - const aliasArrays = []; - const combined = Object.create(null); - let change = true; - Object.keys(aliases).forEach(function (key) { - aliasArrays.push([].concat(aliases[key], key)); - }); - while (change) { - change = false; - for (let i = 0; i < aliasArrays.length; i++) { - for (let ii = i + 1; ii < aliasArrays.length; ii++) { - const intersect = aliasArrays[i].filter(function (v) { - return aliasArrays[ii].indexOf(v) !== -1; - }); - if (intersect.length) { - aliasArrays[i] = aliasArrays[i].concat(aliasArrays[ii]); - aliasArrays.splice(ii, 1); - change = true; - break; - } - } - } - } - aliasArrays.forEach(function (aliasArray) { - aliasArray = aliasArray.filter(function (v, i, self) { - return self.indexOf(v) === i; - }); - const lastAlias = aliasArray.pop(); - if (lastAlias !== undefined && typeof lastAlias === 'string') { - combined[lastAlias] = aliasArray; - } - }); - return combined; -} -function increment(orig) { - return orig !== undefined ? orig + 1 : 1; -} -function sanitizeKey(key) { - if (key === '__proto__') - return '___proto___'; - return key; -} -function stripQuotes(val) { - return (typeof val === 'string' && - (val[0] === "'" || val[0] === '"') && - val[val.length - 1] === val[0]) - ? val.substring(1, val.length - 1) - : val; -} - -var _a, _b, _c; -const minNodeVersion = (process && process.env && process.env.YARGS_MIN_NODE_VERSION) - ? Number(process.env.YARGS_MIN_NODE_VERSION) - : 12; -const nodeVersion = (_b = (_a = process === null || process === void 0 ? void 0 : process.versions) === null || _a === void 0 ? void 0 : _a.node) !== null && _b !== void 0 ? _b : (_c = process === null || process === void 0 ? void 0 : process.version) === null || _c === void 0 ? void 0 : _c.slice(1); -if (nodeVersion) { - const major = Number(nodeVersion.match(/^([^.]+)/)[1]); - if (major < minNodeVersion) { - throw Error(`yargs parser supports a minimum Node.js version of ${minNodeVersion}. Read our version support policy: https://github.com/yargs/yargs-parser#supported-nodejs-versions`); - } -} -const env = process ? process.env : {}; -const parser = new YargsParser({ - cwd: process.cwd, - env: () => { - return env; - }, - format: util.format, - normalize: path.normalize, - resolve: path.resolve, - require: (path) => { - if (typeof require !== 'undefined') { - return require(path); - } - else if (path.match(/\.json$/)) { - return JSON.parse(fs.readFileSync(path, 'utf8')); - } - else { - throw Error('only .json config files are supported in ESM'); - } - } -}); -const yargsParser = function Parser(args, opts) { - const result = parser.parse(args.slice(), opts); - return result.argv; -}; -yargsParser.detailed = function (args, opts) { - return parser.parse(args.slice(), opts); -}; -yargsParser.camelCase = camelCase; -yargsParser.decamelize = decamelize; -yargsParser.looksLikeNumber = looksLikeNumber; - -module.exports = yargsParser; diff --git a/node_modules/yargs-parser/build/lib/index.js b/node_modules/yargs-parser/build/lib/index.js deleted file mode 100644 index 43ef485..0000000 --- a/node_modules/yargs-parser/build/lib/index.js +++ /dev/null @@ -1,62 +0,0 @@ -/** - * @fileoverview Main entrypoint for libraries using yargs-parser in Node.js - * CJS and ESM environments. - * - * @license - * Copyright (c) 2016, Contributors - * SPDX-License-Identifier: ISC - */ -var _a, _b, _c; -import { format } from 'util'; -import { normalize, resolve } from 'path'; -import { camelCase, decamelize, looksLikeNumber } from './string-utils.js'; -import { YargsParser } from './yargs-parser.js'; -import { readFileSync } from 'fs'; -// See https://github.com/yargs/yargs-parser#supported-nodejs-versions for our -// version support policy. The YARGS_MIN_NODE_VERSION is used for testing only. -const minNodeVersion = (process && process.env && process.env.YARGS_MIN_NODE_VERSION) - ? Number(process.env.YARGS_MIN_NODE_VERSION) - : 12; -const nodeVersion = (_b = (_a = process === null || process === void 0 ? void 0 : process.versions) === null || _a === void 0 ? void 0 : _a.node) !== null && _b !== void 0 ? _b : (_c = process === null || process === void 0 ? void 0 : process.version) === null || _c === void 0 ? void 0 : _c.slice(1); -if (nodeVersion) { - const major = Number(nodeVersion.match(/^([^.]+)/)[1]); - if (major < minNodeVersion) { - throw Error(`yargs parser supports a minimum Node.js version of ${minNodeVersion}. Read our version support policy: https://github.com/yargs/yargs-parser#supported-nodejs-versions`); - } -} -// Creates a yargs-parser instance using Node.js standard libraries: -const env = process ? process.env : {}; -const parser = new YargsParser({ - cwd: process.cwd, - env: () => { - return env; - }, - format, - normalize, - resolve, - // TODO: figure out a way to combine ESM and CJS coverage, such that - // we can exercise all the lines below: - require: (path) => { - if (typeof require !== 'undefined') { - return require(path); - } - else if (path.match(/\.json$/)) { - // Addresses: https://github.com/yargs/yargs/issues/2040 - return JSON.parse(readFileSync(path, 'utf8')); - } - else { - throw Error('only .json config files are supported in ESM'); - } - } -}); -const yargsParser = function Parser(args, opts) { - const result = parser.parse(args.slice(), opts); - return result.argv; -}; -yargsParser.detailed = function (args, opts) { - return parser.parse(args.slice(), opts); -}; -yargsParser.camelCase = camelCase; -yargsParser.decamelize = decamelize; -yargsParser.looksLikeNumber = looksLikeNumber; -export default yargsParser; diff --git a/node_modules/yargs-parser/build/lib/string-utils.js b/node_modules/yargs-parser/build/lib/string-utils.js deleted file mode 100644 index 4e8bd99..0000000 --- a/node_modules/yargs-parser/build/lib/string-utils.js +++ /dev/null @@ -1,65 +0,0 @@ -/** - * @license - * Copyright (c) 2016, Contributors - * SPDX-License-Identifier: ISC - */ -export function camelCase(str) { - // Handle the case where an argument is provided as camel case, e.g., fooBar. - // by ensuring that the string isn't already mixed case: - const isCamelCase = str !== str.toLowerCase() && str !== str.toUpperCase(); - if (!isCamelCase) { - str = str.toLowerCase(); - } - if (str.indexOf('-') === -1 && str.indexOf('_') === -1) { - return str; - } - else { - let camelcase = ''; - let nextChrUpper = false; - const leadingHyphens = str.match(/^-+/); - for (let i = leadingHyphens ? leadingHyphens[0].length : 0; i < str.length; i++) { - let chr = str.charAt(i); - if (nextChrUpper) { - nextChrUpper = false; - chr = chr.toUpperCase(); - } - if (i !== 0 && (chr === '-' || chr === '_')) { - nextChrUpper = true; - } - else if (chr !== '-' && chr !== '_') { - camelcase += chr; - } - } - return camelcase; - } -} -export function decamelize(str, joinString) { - const lowercase = str.toLowerCase(); - joinString = joinString || '-'; - let notCamelcase = ''; - for (let i = 0; i < str.length; i++) { - const chrLower = lowercase.charAt(i); - const chrString = str.charAt(i); - if (chrLower !== chrString && i > 0) { - notCamelcase += `${joinString}${lowercase.charAt(i)}`; - } - else { - notCamelcase += chrString; - } - } - return notCamelcase; -} -export function looksLikeNumber(x) { - if (x === null || x === undefined) - return false; - // if loaded from config, may already be a number. - if (typeof x === 'number') - return true; - // hexadecimal. - if (/^0x[0-9a-f]+$/i.test(x)) - return true; - // don't treat 0123 as a number; as it drops the leading '0'. - if (/^0[^.]/.test(x)) - return false; - return /^[-]?(?:\d+(?:\.\d*)?|\.\d+)(e[-+]?\d+)?$/.test(x); -} diff --git a/node_modules/yargs-parser/build/lib/tokenize-arg-string.js b/node_modules/yargs-parser/build/lib/tokenize-arg-string.js deleted file mode 100644 index 5e732ef..0000000 --- a/node_modules/yargs-parser/build/lib/tokenize-arg-string.js +++ /dev/null @@ -1,40 +0,0 @@ -/** - * @license - * Copyright (c) 2016, Contributors - * SPDX-License-Identifier: ISC - */ -// take an un-split argv string and tokenize it. -export function tokenizeArgString(argString) { - if (Array.isArray(argString)) { - return argString.map(e => typeof e !== 'string' ? e + '' : e); - } - argString = argString.trim(); - let i = 0; - let prevC = null; - let c = null; - let opening = null; - const args = []; - for (let ii = 0; ii < argString.length; ii++) { - prevC = c; - c = argString.charAt(ii); - // split on spaces unless we're in quotes. - if (c === ' ' && !opening) { - if (!(prevC === ' ')) { - i++; - } - continue; - } - // don't split the string if we're in matching - // opening or closing single and double quotes. - if (c === opening) { - opening = null; - } - else if ((c === "'" || c === '"') && !opening) { - opening = c; - } - if (!args[i]) - args[i] = ''; - args[i] += c; - } - return args; -} diff --git a/node_modules/yargs-parser/build/lib/yargs-parser-types.js b/node_modules/yargs-parser/build/lib/yargs-parser-types.js deleted file mode 100644 index 63b7c31..0000000 --- a/node_modules/yargs-parser/build/lib/yargs-parser-types.js +++ /dev/null @@ -1,12 +0,0 @@ -/** - * @license - * Copyright (c) 2016, Contributors - * SPDX-License-Identifier: ISC - */ -export var DefaultValuesForTypeKey; -(function (DefaultValuesForTypeKey) { - DefaultValuesForTypeKey["BOOLEAN"] = "boolean"; - DefaultValuesForTypeKey["STRING"] = "string"; - DefaultValuesForTypeKey["NUMBER"] = "number"; - DefaultValuesForTypeKey["ARRAY"] = "array"; -})(DefaultValuesForTypeKey || (DefaultValuesForTypeKey = {})); diff --git a/node_modules/yargs-parser/build/lib/yargs-parser.js b/node_modules/yargs-parser/build/lib/yargs-parser.js deleted file mode 100644 index 415d4bc..0000000 --- a/node_modules/yargs-parser/build/lib/yargs-parser.js +++ /dev/null @@ -1,1045 +0,0 @@ -/** - * @license - * Copyright (c) 2016, Contributors - * SPDX-License-Identifier: ISC - */ -import { tokenizeArgString } from './tokenize-arg-string.js'; -import { DefaultValuesForTypeKey } from './yargs-parser-types.js'; -import { camelCase, decamelize, looksLikeNumber } from './string-utils.js'; -let mixin; -export class YargsParser { - constructor(_mixin) { - mixin = _mixin; - } - parse(argsInput, options) { - const opts = Object.assign({ - alias: undefined, - array: undefined, - boolean: undefined, - config: undefined, - configObjects: undefined, - configuration: undefined, - coerce: undefined, - count: undefined, - default: undefined, - envPrefix: undefined, - narg: undefined, - normalize: undefined, - string: undefined, - number: undefined, - __: undefined, - key: undefined - }, options); - // allow a string argument to be passed in rather - // than an argv array. - const args = tokenizeArgString(argsInput); - // tokenizeArgString adds extra quotes to args if argsInput is a string - // only strip those extra quotes in processValue if argsInput is a string - const inputIsString = typeof argsInput === 'string'; - // aliases might have transitive relationships, normalize this. - const aliases = combineAliases(Object.assign(Object.create(null), opts.alias)); - const configuration = Object.assign({ - 'boolean-negation': true, - 'camel-case-expansion': true, - 'combine-arrays': false, - 'dot-notation': true, - 'duplicate-arguments-array': true, - 'flatten-duplicate-arrays': true, - 'greedy-arrays': true, - 'halt-at-non-option': false, - 'nargs-eats-options': false, - 'negation-prefix': 'no-', - 'parse-numbers': true, - 'parse-positional-numbers': true, - 'populate--': false, - 'set-placeholder-key': false, - 'short-option-groups': true, - 'strip-aliased': false, - 'strip-dashed': false, - 'unknown-options-as-args': false - }, opts.configuration); - const defaults = Object.assign(Object.create(null), opts.default); - const configObjects = opts.configObjects || []; - const envPrefix = opts.envPrefix; - const notFlagsOption = configuration['populate--']; - const notFlagsArgv = notFlagsOption ? '--' : '_'; - const newAliases = Object.create(null); - const defaulted = Object.create(null); - // allow a i18n handler to be passed in, default to a fake one (util.format). - const __ = opts.__ || mixin.format; - const flags = { - aliases: Object.create(null), - arrays: Object.create(null), - bools: Object.create(null), - strings: Object.create(null), - numbers: Object.create(null), - counts: Object.create(null), - normalize: Object.create(null), - configs: Object.create(null), - nargs: Object.create(null), - coercions: Object.create(null), - keys: [] - }; - const negative = /^-([0-9]+(\.[0-9]+)?|\.[0-9]+)$/; - const negatedBoolean = new RegExp('^--' + configuration['negation-prefix'] + '(.+)'); - [].concat(opts.array || []).filter(Boolean).forEach(function (opt) { - const key = typeof opt === 'object' ? opt.key : opt; - // assign to flags[bools|strings|numbers] - const assignment = Object.keys(opt).map(function (key) { - const arrayFlagKeys = { - boolean: 'bools', - string: 'strings', - number: 'numbers' - }; - return arrayFlagKeys[key]; - }).filter(Boolean).pop(); - // assign key to be coerced - if (assignment) { - flags[assignment][key] = true; - } - flags.arrays[key] = true; - flags.keys.push(key); - }); - [].concat(opts.boolean || []).filter(Boolean).forEach(function (key) { - flags.bools[key] = true; - flags.keys.push(key); - }); - [].concat(opts.string || []).filter(Boolean).forEach(function (key) { - flags.strings[key] = true; - flags.keys.push(key); - }); - [].concat(opts.number || []).filter(Boolean).forEach(function (key) { - flags.numbers[key] = true; - flags.keys.push(key); - }); - [].concat(opts.count || []).filter(Boolean).forEach(function (key) { - flags.counts[key] = true; - flags.keys.push(key); - }); - [].concat(opts.normalize || []).filter(Boolean).forEach(function (key) { - flags.normalize[key] = true; - flags.keys.push(key); - }); - if (typeof opts.narg === 'object') { - Object.entries(opts.narg).forEach(([key, value]) => { - if (typeof value === 'number') { - flags.nargs[key] = value; - flags.keys.push(key); - } - }); - } - if (typeof opts.coerce === 'object') { - Object.entries(opts.coerce).forEach(([key, value]) => { - if (typeof value === 'function') { - flags.coercions[key] = value; - flags.keys.push(key); - } - }); - } - if (typeof opts.config !== 'undefined') { - if (Array.isArray(opts.config) || typeof opts.config === 'string') { - ; - [].concat(opts.config).filter(Boolean).forEach(function (key) { - flags.configs[key] = true; - }); - } - else if (typeof opts.config === 'object') { - Object.entries(opts.config).forEach(([key, value]) => { - if (typeof value === 'boolean' || typeof value === 'function') { - flags.configs[key] = value; - } - }); - } - } - // create a lookup table that takes into account all - // combinations of aliases: {f: ['foo'], foo: ['f']} - extendAliases(opts.key, aliases, opts.default, flags.arrays); - // apply default values to all aliases. - Object.keys(defaults).forEach(function (key) { - (flags.aliases[key] || []).forEach(function (alias) { - defaults[alias] = defaults[key]; - }); - }); - let error = null; - checkConfiguration(); - let notFlags = []; - const argv = Object.assign(Object.create(null), { _: [] }); - // TODO(bcoe): for the first pass at removing object prototype we didn't - // remove all prototypes from objects returned by this API, we might want - // to gradually move towards doing so. - const argvReturn = {}; - for (let i = 0; i < args.length; i++) { - const arg = args[i]; - const truncatedArg = arg.replace(/^-{3,}/, '---'); - let broken; - let key; - let letters; - let m; - let next; - let value; - // any unknown option (except for end-of-options, "--") - if (arg !== '--' && /^-/.test(arg) && isUnknownOptionAsArg(arg)) { - pushPositional(arg); - // ---, ---=, ----, etc, - } - else if (truncatedArg.match(/^---+(=|$)/)) { - // options without key name are invalid. - pushPositional(arg); - continue; - // -- separated by = - } - else if (arg.match(/^--.+=/) || (!configuration['short-option-groups'] && arg.match(/^-.+=/))) { - // Using [\s\S] instead of . because js doesn't support the - // 'dotall' regex modifier. See: - // http://stackoverflow.com/a/1068308/13216 - m = arg.match(/^--?([^=]+)=([\s\S]*)$/); - // arrays format = '--f=a b c' - if (m !== null && Array.isArray(m) && m.length >= 3) { - if (checkAllAliases(m[1], flags.arrays)) { - i = eatArray(i, m[1], args, m[2]); - } - else if (checkAllAliases(m[1], flags.nargs) !== false) { - // nargs format = '--f=monkey washing cat' - i = eatNargs(i, m[1], args, m[2]); - } - else { - setArg(m[1], m[2], true); - } - } - } - else if (arg.match(negatedBoolean) && configuration['boolean-negation']) { - m = arg.match(negatedBoolean); - if (m !== null && Array.isArray(m) && m.length >= 2) { - key = m[1]; - setArg(key, checkAllAliases(key, flags.arrays) ? [false] : false); - } - // -- separated by space. - } - else if (arg.match(/^--.+/) || (!configuration['short-option-groups'] && arg.match(/^-[^-]+/))) { - m = arg.match(/^--?(.+)/); - if (m !== null && Array.isArray(m) && m.length >= 2) { - key = m[1]; - if (checkAllAliases(key, flags.arrays)) { - // array format = '--foo a b c' - i = eatArray(i, key, args); - } - else if (checkAllAliases(key, flags.nargs) !== false) { - // nargs format = '--foo a b c' - // should be truthy even if: flags.nargs[key] === 0 - i = eatNargs(i, key, args); - } - else { - next = args[i + 1]; - if (next !== undefined && (!next.match(/^-/) || - next.match(negative)) && - !checkAllAliases(key, flags.bools) && - !checkAllAliases(key, flags.counts)) { - setArg(key, next); - i++; - } - else if (/^(true|false)$/.test(next)) { - setArg(key, next); - i++; - } - else { - setArg(key, defaultValue(key)); - } - } - } - // dot-notation flag separated by '='. - } - else if (arg.match(/^-.\..+=/)) { - m = arg.match(/^-([^=]+)=([\s\S]*)$/); - if (m !== null && Array.isArray(m) && m.length >= 3) { - setArg(m[1], m[2]); - } - // dot-notation flag separated by space. - } - else if (arg.match(/^-.\..+/) && !arg.match(negative)) { - next = args[i + 1]; - m = arg.match(/^-(.\..+)/); - if (m !== null && Array.isArray(m) && m.length >= 2) { - key = m[1]; - if (next !== undefined && !next.match(/^-/) && - !checkAllAliases(key, flags.bools) && - !checkAllAliases(key, flags.counts)) { - setArg(key, next); - i++; - } - else { - setArg(key, defaultValue(key)); - } - } - } - else if (arg.match(/^-[^-]+/) && !arg.match(negative)) { - letters = arg.slice(1, -1).split(''); - broken = false; - for (let j = 0; j < letters.length; j++) { - next = arg.slice(j + 2); - if (letters[j + 1] && letters[j + 1] === '=') { - value = arg.slice(j + 3); - key = letters[j]; - if (checkAllAliases(key, flags.arrays)) { - // array format = '-f=a b c' - i = eatArray(i, key, args, value); - } - else if (checkAllAliases(key, flags.nargs) !== false) { - // nargs format = '-f=monkey washing cat' - i = eatNargs(i, key, args, value); - } - else { - setArg(key, value); - } - broken = true; - break; - } - if (next === '-') { - setArg(letters[j], next); - continue; - } - // current letter is an alphabetic character and next value is a number - if (/[A-Za-z]/.test(letters[j]) && - /^-?\d+(\.\d*)?(e-?\d+)?$/.test(next) && - checkAllAliases(next, flags.bools) === false) { - setArg(letters[j], next); - broken = true; - break; - } - if (letters[j + 1] && letters[j + 1].match(/\W/)) { - setArg(letters[j], next); - broken = true; - break; - } - else { - setArg(letters[j], defaultValue(letters[j])); - } - } - key = arg.slice(-1)[0]; - if (!broken && key !== '-') { - if (checkAllAliases(key, flags.arrays)) { - // array format = '-f a b c' - i = eatArray(i, key, args); - } - else if (checkAllAliases(key, flags.nargs) !== false) { - // nargs format = '-f a b c' - // should be truthy even if: flags.nargs[key] === 0 - i = eatNargs(i, key, args); - } - else { - next = args[i + 1]; - if (next !== undefined && (!/^(-|--)[^-]/.test(next) || - next.match(negative)) && - !checkAllAliases(key, flags.bools) && - !checkAllAliases(key, flags.counts)) { - setArg(key, next); - i++; - } - else if (/^(true|false)$/.test(next)) { - setArg(key, next); - i++; - } - else { - setArg(key, defaultValue(key)); - } - } - } - } - else if (arg.match(/^-[0-9]$/) && - arg.match(negative) && - checkAllAliases(arg.slice(1), flags.bools)) { - // single-digit boolean alias, e.g: xargs -0 - key = arg.slice(1); - setArg(key, defaultValue(key)); - } - else if (arg === '--') { - notFlags = args.slice(i + 1); - break; - } - else if (configuration['halt-at-non-option']) { - notFlags = args.slice(i); - break; - } - else { - pushPositional(arg); - } - } - // order of precedence: - // 1. command line arg - // 2. value from env var - // 3. value from config file - // 4. value from config objects - // 5. configured default value - applyEnvVars(argv, true); // special case: check env vars that point to config file - applyEnvVars(argv, false); - setConfig(argv); - setConfigObjects(); - applyDefaultsAndAliases(argv, flags.aliases, defaults, true); - applyCoercions(argv); - if (configuration['set-placeholder-key']) - setPlaceholderKeys(argv); - // for any counts either not in args or without an explicit default, set to 0 - Object.keys(flags.counts).forEach(function (key) { - if (!hasKey(argv, key.split('.'))) - setArg(key, 0); - }); - // '--' defaults to undefined. - if (notFlagsOption && notFlags.length) - argv[notFlagsArgv] = []; - notFlags.forEach(function (key) { - argv[notFlagsArgv].push(key); - }); - if (configuration['camel-case-expansion'] && configuration['strip-dashed']) { - Object.keys(argv).filter(key => key !== '--' && key.includes('-')).forEach(key => { - delete argv[key]; - }); - } - if (configuration['strip-aliased']) { - ; - [].concat(...Object.keys(aliases).map(k => aliases[k])).forEach(alias => { - if (configuration['camel-case-expansion'] && alias.includes('-')) { - delete argv[alias.split('.').map(prop => camelCase(prop)).join('.')]; - } - delete argv[alias]; - }); - } - // Push argument into positional array, applying numeric coercion: - function pushPositional(arg) { - const maybeCoercedNumber = maybeCoerceNumber('_', arg); - if (typeof maybeCoercedNumber === 'string' || typeof maybeCoercedNumber === 'number') { - argv._.push(maybeCoercedNumber); - } - } - // how many arguments should we consume, based - // on the nargs option? - function eatNargs(i, key, args, argAfterEqualSign) { - let ii; - let toEat = checkAllAliases(key, flags.nargs); - // NaN has a special meaning for the array type, indicating that one or - // more values are expected. - toEat = typeof toEat !== 'number' || isNaN(toEat) ? 1 : toEat; - if (toEat === 0) { - if (!isUndefined(argAfterEqualSign)) { - error = Error(__('Argument unexpected for: %s', key)); - } - setArg(key, defaultValue(key)); - return i; - } - let available = isUndefined(argAfterEqualSign) ? 0 : 1; - if (configuration['nargs-eats-options']) { - // classic behavior, yargs eats positional and dash arguments. - if (args.length - (i + 1) + available < toEat) { - error = Error(__('Not enough arguments following: %s', key)); - } - available = toEat; - } - else { - // nargs will not consume flag arguments, e.g., -abc, --foo, - // and terminates when one is observed. - for (ii = i + 1; ii < args.length; ii++) { - if (!args[ii].match(/^-[^0-9]/) || args[ii].match(negative) || isUnknownOptionAsArg(args[ii])) - available++; - else - break; - } - if (available < toEat) - error = Error(__('Not enough arguments following: %s', key)); - } - let consumed = Math.min(available, toEat); - if (!isUndefined(argAfterEqualSign) && consumed > 0) { - setArg(key, argAfterEqualSign); - consumed--; - } - for (ii = i + 1; ii < (consumed + i + 1); ii++) { - setArg(key, args[ii]); - } - return (i + consumed); - } - // if an option is an array, eat all non-hyphenated arguments - // following it... YUM! - // e.g., --foo apple banana cat becomes ["apple", "banana", "cat"] - function eatArray(i, key, args, argAfterEqualSign) { - let argsToSet = []; - let next = argAfterEqualSign || args[i + 1]; - // If both array and nargs are configured, enforce the nargs count: - const nargsCount = checkAllAliases(key, flags.nargs); - if (checkAllAliases(key, flags.bools) && !(/^(true|false)$/.test(next))) { - argsToSet.push(true); - } - else if (isUndefined(next) || - (isUndefined(argAfterEqualSign) && /^-/.test(next) && !negative.test(next) && !isUnknownOptionAsArg(next))) { - // for keys without value ==> argsToSet remains an empty [] - // set user default value, if available - if (defaults[key] !== undefined) { - const defVal = defaults[key]; - argsToSet = Array.isArray(defVal) ? defVal : [defVal]; - } - } - else { - // value in --option=value is eaten as is - if (!isUndefined(argAfterEqualSign)) { - argsToSet.push(processValue(key, argAfterEqualSign, true)); - } - for (let ii = i + 1; ii < args.length; ii++) { - if ((!configuration['greedy-arrays'] && argsToSet.length > 0) || - (nargsCount && typeof nargsCount === 'number' && argsToSet.length >= nargsCount)) - break; - next = args[ii]; - if (/^-/.test(next) && !negative.test(next) && !isUnknownOptionAsArg(next)) - break; - i = ii; - argsToSet.push(processValue(key, next, inputIsString)); - } - } - // If both array and nargs are configured, create an error if less than - // nargs positionals were found. NaN has special meaning, indicating - // that at least one value is required (more are okay). - if (typeof nargsCount === 'number' && ((nargsCount && argsToSet.length < nargsCount) || - (isNaN(nargsCount) && argsToSet.length === 0))) { - error = Error(__('Not enough arguments following: %s', key)); - } - setArg(key, argsToSet); - return i; - } - function setArg(key, val, shouldStripQuotes = inputIsString) { - if (/-/.test(key) && configuration['camel-case-expansion']) { - const alias = key.split('.').map(function (prop) { - return camelCase(prop); - }).join('.'); - addNewAlias(key, alias); - } - const value = processValue(key, val, shouldStripQuotes); - const splitKey = key.split('.'); - setKey(argv, splitKey, value); - // handle populating aliases of the full key - if (flags.aliases[key]) { - flags.aliases[key].forEach(function (x) { - const keyProperties = x.split('.'); - setKey(argv, keyProperties, value); - }); - } - // handle populating aliases of the first element of the dot-notation key - if (splitKey.length > 1 && configuration['dot-notation']) { - ; - (flags.aliases[splitKey[0]] || []).forEach(function (x) { - let keyProperties = x.split('.'); - // expand alias with nested objects in key - const a = [].concat(splitKey); - a.shift(); // nuke the old key. - keyProperties = keyProperties.concat(a); - // populate alias only if is not already an alias of the full key - // (already populated above) - if (!(flags.aliases[key] || []).includes(keyProperties.join('.'))) { - setKey(argv, keyProperties, value); - } - }); - } - // Set normalize getter and setter when key is in 'normalize' but isn't an array - if (checkAllAliases(key, flags.normalize) && !checkAllAliases(key, flags.arrays)) { - const keys = [key].concat(flags.aliases[key] || []); - keys.forEach(function (key) { - Object.defineProperty(argvReturn, key, { - enumerable: true, - get() { - return val; - }, - set(value) { - val = typeof value === 'string' ? mixin.normalize(value) : value; - } - }); - }); - } - } - function addNewAlias(key, alias) { - if (!(flags.aliases[key] && flags.aliases[key].length)) { - flags.aliases[key] = [alias]; - newAliases[alias] = true; - } - if (!(flags.aliases[alias] && flags.aliases[alias].length)) { - addNewAlias(alias, key); - } - } - function processValue(key, val, shouldStripQuotes) { - // strings may be quoted, clean this up as we assign values. - if (shouldStripQuotes) { - val = stripQuotes(val); - } - // handle parsing boolean arguments --foo=true --bar false. - if (checkAllAliases(key, flags.bools) || checkAllAliases(key, flags.counts)) { - if (typeof val === 'string') - val = val === 'true'; - } - let value = Array.isArray(val) - ? val.map(function (v) { return maybeCoerceNumber(key, v); }) - : maybeCoerceNumber(key, val); - // increment a count given as arg (either no value or value parsed as boolean) - if (checkAllAliases(key, flags.counts) && (isUndefined(value) || typeof value === 'boolean')) { - value = increment(); - } - // Set normalized value when key is in 'normalize' and in 'arrays' - if (checkAllAliases(key, flags.normalize) && checkAllAliases(key, flags.arrays)) { - if (Array.isArray(val)) - value = val.map((val) => { return mixin.normalize(val); }); - else - value = mixin.normalize(val); - } - return value; - } - function maybeCoerceNumber(key, value) { - if (!configuration['parse-positional-numbers'] && key === '_') - return value; - if (!checkAllAliases(key, flags.strings) && !checkAllAliases(key, flags.bools) && !Array.isArray(value)) { - const shouldCoerceNumber = looksLikeNumber(value) && configuration['parse-numbers'] && (Number.isSafeInteger(Math.floor(parseFloat(`${value}`)))); - if (shouldCoerceNumber || (!isUndefined(value) && checkAllAliases(key, flags.numbers))) { - value = Number(value); - } - } - return value; - } - // set args from config.json file, this should be - // applied last so that defaults can be applied. - function setConfig(argv) { - const configLookup = Object.create(null); - // expand defaults/aliases, in-case any happen to reference - // the config.json file. - applyDefaultsAndAliases(configLookup, flags.aliases, defaults); - Object.keys(flags.configs).forEach(function (configKey) { - const configPath = argv[configKey] || configLookup[configKey]; - if (configPath) { - try { - let config = null; - const resolvedConfigPath = mixin.resolve(mixin.cwd(), configPath); - const resolveConfig = flags.configs[configKey]; - if (typeof resolveConfig === 'function') { - try { - config = resolveConfig(resolvedConfigPath); - } - catch (e) { - config = e; - } - if (config instanceof Error) { - error = config; - return; - } - } - else { - config = mixin.require(resolvedConfigPath); - } - setConfigObject(config); - } - catch (ex) { - // Deno will receive a PermissionDenied error if an attempt is - // made to load config without the --allow-read flag: - if (ex.name === 'PermissionDenied') - error = ex; - else if (argv[configKey]) - error = Error(__('Invalid JSON config file: %s', configPath)); - } - } - }); - } - // set args from config object. - // it recursively checks nested objects. - function setConfigObject(config, prev) { - Object.keys(config).forEach(function (key) { - const value = config[key]; - const fullKey = prev ? prev + '.' + key : key; - // if the value is an inner object and we have dot-notation - // enabled, treat inner objects in config the same as - // heavily nested dot notations (foo.bar.apple). - if (typeof value === 'object' && value !== null && !Array.isArray(value) && configuration['dot-notation']) { - // if the value is an object but not an array, check nested object - setConfigObject(value, fullKey); - } - else { - // setting arguments via CLI takes precedence over - // values within the config file. - if (!hasKey(argv, fullKey.split('.')) || (checkAllAliases(fullKey, flags.arrays) && configuration['combine-arrays'])) { - setArg(fullKey, value); - } - } - }); - } - // set all config objects passed in opts - function setConfigObjects() { - if (typeof configObjects !== 'undefined') { - configObjects.forEach(function (configObject) { - setConfigObject(configObject); - }); - } - } - function applyEnvVars(argv, configOnly) { - if (typeof envPrefix === 'undefined') - return; - const prefix = typeof envPrefix === 'string' ? envPrefix : ''; - const env = mixin.env(); - Object.keys(env).forEach(function (envVar) { - if (prefix === '' || envVar.lastIndexOf(prefix, 0) === 0) { - // get array of nested keys and convert them to camel case - const keys = envVar.split('__').map(function (key, i) { - if (i === 0) { - key = key.substring(prefix.length); - } - return camelCase(key); - }); - if (((configOnly && flags.configs[keys.join('.')]) || !configOnly) && !hasKey(argv, keys)) { - setArg(keys.join('.'), env[envVar]); - } - } - }); - } - function applyCoercions(argv) { - let coerce; - const applied = new Set(); - Object.keys(argv).forEach(function (key) { - if (!applied.has(key)) { // If we haven't already coerced this option via one of its aliases - coerce = checkAllAliases(key, flags.coercions); - if (typeof coerce === 'function') { - try { - const value = maybeCoerceNumber(key, coerce(argv[key])); - ([].concat(flags.aliases[key] || [], key)).forEach(ali => { - applied.add(ali); - argv[ali] = value; - }); - } - catch (err) { - error = err; - } - } - } - }); - } - function setPlaceholderKeys(argv) { - flags.keys.forEach((key) => { - // don't set placeholder keys for dot notation options 'foo.bar'. - if (~key.indexOf('.')) - return; - if (typeof argv[key] === 'undefined') - argv[key] = undefined; - }); - return argv; - } - function applyDefaultsAndAliases(obj, aliases, defaults, canLog = false) { - Object.keys(defaults).forEach(function (key) { - if (!hasKey(obj, key.split('.'))) { - setKey(obj, key.split('.'), defaults[key]); - if (canLog) - defaulted[key] = true; - (aliases[key] || []).forEach(function (x) { - if (hasKey(obj, x.split('.'))) - return; - setKey(obj, x.split('.'), defaults[key]); - }); - } - }); - } - function hasKey(obj, keys) { - let o = obj; - if (!configuration['dot-notation']) - keys = [keys.join('.')]; - keys.slice(0, -1).forEach(function (key) { - o = (o[key] || {}); - }); - const key = keys[keys.length - 1]; - if (typeof o !== 'object') - return false; - else - return key in o; - } - function setKey(obj, keys, value) { - let o = obj; - if (!configuration['dot-notation']) - keys = [keys.join('.')]; - keys.slice(0, -1).forEach(function (key) { - // TODO(bcoe): in the next major version of yargs, switch to - // Object.create(null) for dot notation: - key = sanitizeKey(key); - if (typeof o === 'object' && o[key] === undefined) { - o[key] = {}; - } - if (typeof o[key] !== 'object' || Array.isArray(o[key])) { - // ensure that o[key] is an array, and that the last item is an empty object. - if (Array.isArray(o[key])) { - o[key].push({}); - } - else { - o[key] = [o[key], {}]; - } - // we want to update the empty object at the end of the o[key] array, so set o to that object - o = o[key][o[key].length - 1]; - } - else { - o = o[key]; - } - }); - // TODO(bcoe): in the next major version of yargs, switch to - // Object.create(null) for dot notation: - const key = sanitizeKey(keys[keys.length - 1]); - const isTypeArray = checkAllAliases(keys.join('.'), flags.arrays); - const isValueArray = Array.isArray(value); - let duplicate = configuration['duplicate-arguments-array']; - // nargs has higher priority than duplicate - if (!duplicate && checkAllAliases(key, flags.nargs)) { - duplicate = true; - if ((!isUndefined(o[key]) && flags.nargs[key] === 1) || (Array.isArray(o[key]) && o[key].length === flags.nargs[key])) { - o[key] = undefined; - } - } - if (value === increment()) { - o[key] = increment(o[key]); - } - else if (Array.isArray(o[key])) { - if (duplicate && isTypeArray && isValueArray) { - o[key] = configuration['flatten-duplicate-arrays'] ? o[key].concat(value) : (Array.isArray(o[key][0]) ? o[key] : [o[key]]).concat([value]); - } - else if (!duplicate && Boolean(isTypeArray) === Boolean(isValueArray)) { - o[key] = value; - } - else { - o[key] = o[key].concat([value]); - } - } - else if (o[key] === undefined && isTypeArray) { - o[key] = isValueArray ? value : [value]; - } - else if (duplicate && !(o[key] === undefined || - checkAllAliases(key, flags.counts) || - checkAllAliases(key, flags.bools))) { - o[key] = [o[key], value]; - } - else { - o[key] = value; - } - } - // extend the aliases list with inferred aliases. - function extendAliases(...args) { - args.forEach(function (obj) { - Object.keys(obj || {}).forEach(function (key) { - // short-circuit if we've already added a key - // to the aliases array, for example it might - // exist in both 'opts.default' and 'opts.key'. - if (flags.aliases[key]) - return; - flags.aliases[key] = [].concat(aliases[key] || []); - // For "--option-name", also set argv.optionName - flags.aliases[key].concat(key).forEach(function (x) { - if (/-/.test(x) && configuration['camel-case-expansion']) { - const c = camelCase(x); - if (c !== key && flags.aliases[key].indexOf(c) === -1) { - flags.aliases[key].push(c); - newAliases[c] = true; - } - } - }); - // For "--optionName", also set argv['option-name'] - flags.aliases[key].concat(key).forEach(function (x) { - if (x.length > 1 && /[A-Z]/.test(x) && configuration['camel-case-expansion']) { - const c = decamelize(x, '-'); - if (c !== key && flags.aliases[key].indexOf(c) === -1) { - flags.aliases[key].push(c); - newAliases[c] = true; - } - } - }); - flags.aliases[key].forEach(function (x) { - flags.aliases[x] = [key].concat(flags.aliases[key].filter(function (y) { - return x !== y; - })); - }); - }); - }); - } - function checkAllAliases(key, flag) { - const toCheck = [].concat(flags.aliases[key] || [], key); - const keys = Object.keys(flag); - const setAlias = toCheck.find(key => keys.includes(key)); - return setAlias ? flag[setAlias] : false; - } - function hasAnyFlag(key) { - const flagsKeys = Object.keys(flags); - const toCheck = [].concat(flagsKeys.map(k => flags[k])); - return toCheck.some(function (flag) { - return Array.isArray(flag) ? flag.includes(key) : flag[key]; - }); - } - function hasFlagsMatching(arg, ...patterns) { - const toCheck = [].concat(...patterns); - return toCheck.some(function (pattern) { - const match = arg.match(pattern); - return match && hasAnyFlag(match[1]); - }); - } - // based on a simplified version of the short flag group parsing logic - function hasAllShortFlags(arg) { - // if this is a negative number, or doesn't start with a single hyphen, it's not a short flag group - if (arg.match(negative) || !arg.match(/^-[^-]+/)) { - return false; - } - let hasAllFlags = true; - let next; - const letters = arg.slice(1).split(''); - for (let j = 0; j < letters.length; j++) { - next = arg.slice(j + 2); - if (!hasAnyFlag(letters[j])) { - hasAllFlags = false; - break; - } - if ((letters[j + 1] && letters[j + 1] === '=') || - next === '-' || - (/[A-Za-z]/.test(letters[j]) && /^-?\d+(\.\d*)?(e-?\d+)?$/.test(next)) || - (letters[j + 1] && letters[j + 1].match(/\W/))) { - break; - } - } - return hasAllFlags; - } - function isUnknownOptionAsArg(arg) { - return configuration['unknown-options-as-args'] && isUnknownOption(arg); - } - function isUnknownOption(arg) { - arg = arg.replace(/^-{3,}/, '--'); - // ignore negative numbers - if (arg.match(negative)) { - return false; - } - // if this is a short option group and all of them are configured, it isn't unknown - if (hasAllShortFlags(arg)) { - return false; - } - // e.g. '--count=2' - const flagWithEquals = /^-+([^=]+?)=[\s\S]*$/; - // e.g. '-a' or '--arg' - const normalFlag = /^-+([^=]+?)$/; - // e.g. '-a-' - const flagEndingInHyphen = /^-+([^=]+?)-$/; - // e.g. '-abc123' - const flagEndingInDigits = /^-+([^=]+?\d+)$/; - // e.g. '-a/usr/local' - const flagEndingInNonWordCharacters = /^-+([^=]+?)\W+.*$/; - // check the different types of flag styles, including negatedBoolean, a pattern defined near the start of the parse method - return !hasFlagsMatching(arg, flagWithEquals, negatedBoolean, normalFlag, flagEndingInHyphen, flagEndingInDigits, flagEndingInNonWordCharacters); - } - // make a best effort to pick a default value - // for an option based on name and type. - function defaultValue(key) { - if (!checkAllAliases(key, flags.bools) && - !checkAllAliases(key, flags.counts) && - `${key}` in defaults) { - return defaults[key]; - } - else { - return defaultForType(guessType(key)); - } - } - // return a default value, given the type of a flag., - function defaultForType(type) { - const def = { - [DefaultValuesForTypeKey.BOOLEAN]: true, - [DefaultValuesForTypeKey.STRING]: '', - [DefaultValuesForTypeKey.NUMBER]: undefined, - [DefaultValuesForTypeKey.ARRAY]: [] - }; - return def[type]; - } - // given a flag, enforce a default type. - function guessType(key) { - let type = DefaultValuesForTypeKey.BOOLEAN; - if (checkAllAliases(key, flags.strings)) - type = DefaultValuesForTypeKey.STRING; - else if (checkAllAliases(key, flags.numbers)) - type = DefaultValuesForTypeKey.NUMBER; - else if (checkAllAliases(key, flags.bools)) - type = DefaultValuesForTypeKey.BOOLEAN; - else if (checkAllAliases(key, flags.arrays)) - type = DefaultValuesForTypeKey.ARRAY; - return type; - } - function isUndefined(num) { - return num === undefined; - } - // check user configuration settings for inconsistencies - function checkConfiguration() { - // count keys should not be set as array/narg - Object.keys(flags.counts).find(key => { - if (checkAllAliases(key, flags.arrays)) { - error = Error(__('Invalid configuration: %s, opts.count excludes opts.array.', key)); - return true; - } - else if (checkAllAliases(key, flags.nargs)) { - error = Error(__('Invalid configuration: %s, opts.count excludes opts.narg.', key)); - return true; - } - return false; - }); - } - return { - aliases: Object.assign({}, flags.aliases), - argv: Object.assign(argvReturn, argv), - configuration: configuration, - defaulted: Object.assign({}, defaulted), - error: error, - newAliases: Object.assign({}, newAliases) - }; - } -} -// if any aliases reference each other, we should -// merge them together. -function combineAliases(aliases) { - const aliasArrays = []; - const combined = Object.create(null); - let change = true; - // turn alias lookup hash {key: ['alias1', 'alias2']} into - // a simple array ['key', 'alias1', 'alias2'] - Object.keys(aliases).forEach(function (key) { - aliasArrays.push([].concat(aliases[key], key)); - }); - // combine arrays until zero changes are - // made in an iteration. - while (change) { - change = false; - for (let i = 0; i < aliasArrays.length; i++) { - for (let ii = i + 1; ii < aliasArrays.length; ii++) { - const intersect = aliasArrays[i].filter(function (v) { - return aliasArrays[ii].indexOf(v) !== -1; - }); - if (intersect.length) { - aliasArrays[i] = aliasArrays[i].concat(aliasArrays[ii]); - aliasArrays.splice(ii, 1); - change = true; - break; - } - } - } - } - // map arrays back to the hash-lookup (de-dupe while - // we're at it). - aliasArrays.forEach(function (aliasArray) { - aliasArray = aliasArray.filter(function (v, i, self) { - return self.indexOf(v) === i; - }); - const lastAlias = aliasArray.pop(); - if (lastAlias !== undefined && typeof lastAlias === 'string') { - combined[lastAlias] = aliasArray; - } - }); - return combined; -} -// this function should only be called when a count is given as an arg -// it is NOT called to set a default value -// thus we can start the count at 1 instead of 0 -function increment(orig) { - return orig !== undefined ? orig + 1 : 1; -} -// TODO(bcoe): in the next major version of yargs, switch to -// Object.create(null) for dot notation: -function sanitizeKey(key) { - if (key === '__proto__') - return '___proto___'; - return key; -} -function stripQuotes(val) { - return (typeof val === 'string' && - (val[0] === "'" || val[0] === '"') && - val[val.length - 1] === val[0]) - ? val.substring(1, val.length - 1) - : val; -} diff --git a/node_modules/yargs-parser/package.json b/node_modules/yargs-parser/package.json deleted file mode 100644 index decd0c3..0000000 --- a/node_modules/yargs-parser/package.json +++ /dev/null @@ -1,92 +0,0 @@ -{ - "name": "yargs-parser", - "version": "21.1.1", - "description": "the mighty option parser used by yargs", - "main": "build/index.cjs", - "exports": { - ".": [ - { - "import": "./build/lib/index.js", - "require": "./build/index.cjs" - }, - "./build/index.cjs" - ], - "./browser": [ - "./browser.js" - ] - }, - "type": "module", - "module": "./build/lib/index.js", - "scripts": { - "check": "standardx '**/*.ts' && standardx '**/*.js' && standardx '**/*.cjs'", - "fix": "standardx --fix '**/*.ts' && standardx --fix '**/*.js' && standardx --fix '**/*.cjs'", - "pretest": "rimraf build && tsc -p tsconfig.test.json && cross-env NODE_ENV=test npm run build:cjs", - "test": "c8 --reporter=text --reporter=html mocha test/*.cjs", - "test:esm": "c8 --reporter=text --reporter=html mocha test/*.mjs", - "test:browser": "start-server-and-test 'serve ./ -p 8080' http://127.0.0.1:8080/package.json 'node ./test/browser/yargs-test.cjs'", - "pretest:typescript": "npm run pretest", - "test:typescript": "c8 mocha ./build/test/typescript/*.js", - "coverage": "c8 report --check-coverage", - "precompile": "rimraf build", - "compile": "tsc", - "postcompile": "npm run build:cjs", - "build:cjs": "rollup -c", - "prepare": "npm run compile" - }, - "repository": { - "type": "git", - "url": "https://github.com/yargs/yargs-parser.git" - }, - "keywords": [ - "argument", - "parser", - "yargs", - "command", - "cli", - "parsing", - "option", - "args", - "argument" - ], - "author": "Ben Coe <ben@npmjs.com>", - "license": "ISC", - "devDependencies": { - "@types/chai": "^4.2.11", - "@types/mocha": "^9.0.0", - "@types/node": "^16.11.4", - "@typescript-eslint/eslint-plugin": "^3.10.1", - "@typescript-eslint/parser": "^3.10.1", - "c8": "^7.3.0", - "chai": "^4.2.0", - "cross-env": "^7.0.2", - "eslint": "^7.0.0", - "eslint-plugin-import": "^2.20.1", - "eslint-plugin-node": "^11.0.0", - "gts": "^3.0.0", - "mocha": "^10.0.0", - "puppeteer": "^16.0.0", - "rimraf": "^3.0.2", - "rollup": "^2.22.1", - "rollup-plugin-cleanup": "^3.1.1", - "rollup-plugin-ts": "^3.0.2", - "serve": "^14.0.0", - "standardx": "^7.0.0", - "start-server-and-test": "^1.11.2", - "ts-transform-default-export": "^1.0.2", - "typescript": "^4.0.0" - }, - "files": [ - "browser.js", - "build", - "!*.d.ts", - "!*.d.cts" - ], - "engines": { - "node": ">=12" - }, - "standardx": { - "ignore": [ - "build" - ] - } -} diff --git a/node_modules/yargs/browser.d.ts b/node_modules/yargs/browser.d.ts deleted file mode 100644 index 21f3fc6..0000000 --- a/node_modules/yargs/browser.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -import {YargsFactory} from './build/lib/yargs-factory'; - -declare const Yargs: ReturnType<typeof YargsFactory>; - -export default Yargs; diff --git a/node_modules/yargs/browser.mjs b/node_modules/yargs/browser.mjs deleted file mode 100644 index 2d0d6e9..0000000 --- a/node_modules/yargs/browser.mjs +++ /dev/null @@ -1,7 +0,0 @@ -// Bootstrap yargs for browser: -import browserPlatformShim from './lib/platform-shims/browser.mjs'; -import {YargsFactory} from './build/lib/yargs-factory.js'; - -const Yargs = YargsFactory(browserPlatformShim); - -export default Yargs; diff --git a/node_modules/yargs/build/index.cjs b/node_modules/yargs/build/index.cjs deleted file mode 100644 index e9cf013..0000000 --- a/node_modules/yargs/build/index.cjs +++ /dev/null @@ -1 +0,0 @@ -"use strict";var t=require("assert");class e extends Error{constructor(t){super(t||"yargs error"),this.name="YError",Error.captureStackTrace&&Error.captureStackTrace(this,e)}}let s,i=[];function n(t,o,a,h){s=h;let l={};if(Object.prototype.hasOwnProperty.call(t,"extends")){if("string"!=typeof t.extends)return l;const r=/\.json|\..*rc$/.test(t.extends);let h=null;if(r)h=function(t,e){return s.path.resolve(t,e)}(o,t.extends);else try{h=require.resolve(t.extends)}catch(e){return t}!function(t){if(i.indexOf(t)>-1)throw new e(`Circular extended configurations: '${t}'.`)}(h),i.push(h),l=r?JSON.parse(s.readFileSync(h,"utf8")):require(t.extends),delete t.extends,l=n(l,s.path.dirname(h),a,s)}return i=[],a?r(l,t):Object.assign({},l,t)}function r(t,e){const s={};function i(t){return t&&"object"==typeof t&&!Array.isArray(t)}Object.assign(s,t);for(const n of Object.keys(e))i(e[n])&&i(s[n])?s[n]=r(t[n],e[n]):s[n]=e[n];return s}function o(t){const e=t.replace(/\s{2,}/g," ").split(/\s+(?![^[]*]|[^<]*>)/),s=/\.*[\][<>]/g,i=e.shift();if(!i)throw new Error(`No command found in: ${t}`);const n={cmd:i.replace(s,""),demanded:[],optional:[]};return e.forEach(((t,i)=>{let r=!1;t=t.replace(/\s/g,""),/\.+[\]>]/.test(t)&&i===e.length-1&&(r=!0),/^\[/.test(t)?n.optional.push({cmd:t.replace(s,"").split("|"),variadic:r}):n.demanded.push({cmd:t.replace(s,"").split("|"),variadic:r})})),n}const a=["first","second","third","fourth","fifth","sixth"];function h(t,s,i){try{let n=0;const[r,a,h]="object"==typeof t?[{demanded:[],optional:[]},t,s]:[o(`cmd ${t}`),s,i],f=[].slice.call(a);for(;f.length&&void 0===f[f.length-1];)f.pop();const d=h||f.length;if(d<r.demanded.length)throw new e(`Not enough arguments provided. Expected ${r.demanded.length} but received ${f.length}.`);const u=r.demanded.length+r.optional.length;if(d>u)throw new e(`Too many arguments provided. Expected max ${u} but received ${d}.`);r.demanded.forEach((t=>{const e=l(f.shift());0===t.cmd.filter((t=>t===e||"*"===t)).length&&c(e,t.cmd,n),n+=1})),r.optional.forEach((t=>{if(0===f.length)return;const e=l(f.shift());0===t.cmd.filter((t=>t===e||"*"===t)).length&&c(e,t.cmd,n),n+=1}))}catch(t){console.warn(t.stack)}}function l(t){return Array.isArray(t)?"array":null===t?"null":typeof t}function c(t,s,i){throw new e(`Invalid ${a[i]||"manyith"} argument. Expected ${s.join(" or ")} but received ${t}.`)}function f(t){return!!t&&!!t.then&&"function"==typeof t.then}function d(t,e,s,i){s.assert.notStrictEqual(t,e,i)}function u(t,e){e.assert.strictEqual(typeof t,"string")}function p(t){return Object.keys(t)}function g(t={},e=(()=>!0)){const s={};return p(t).forEach((i=>{e(i,t[i])&&(s[i]=t[i])})),s}function m(){return process.versions.electron&&!process.defaultApp?0:1}function y(){return process.argv[m()]}var b=Object.freeze({__proto__:null,hideBin:function(t){return t.slice(m()+1)},getProcessArgvBin:y});function v(t,e,s,i){if("a"===s&&!i)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!i:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===s?i:"a"===s?i.call(t):i?i.value:e.get(t)}function O(t,e,s,i,n){if("m"===i)throw new TypeError("Private method is not writable");if("a"===i&&!n)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!n:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===i?n.call(t,s):n?n.value=s:e.set(t,s),s}class w{constructor(t){this.globalMiddleware=[],this.frozens=[],this.yargs=t}addMiddleware(t,e,s=!0,i=!1){if(h("<array|function> [boolean] [boolean] [boolean]",[t,e,s],arguments.length),Array.isArray(t)){for(let i=0;i<t.length;i++){if("function"!=typeof t[i])throw Error("middleware must be a function");const n=t[i];n.applyBeforeValidation=e,n.global=s}Array.prototype.push.apply(this.globalMiddleware,t)}else if("function"==typeof t){const n=t;n.applyBeforeValidation=e,n.global=s,n.mutates=i,this.globalMiddleware.push(t)}return this.yargs}addCoerceMiddleware(t,e){const s=this.yargs.getAliases();return this.globalMiddleware=this.globalMiddleware.filter((t=>{const i=[...s[e]||[],e];return!t.option||!i.includes(t.option)})),t.option=e,this.addMiddleware(t,!0,!0,!0)}getMiddleware(){return this.globalMiddleware}freeze(){this.frozens.push([...this.globalMiddleware])}unfreeze(){const t=this.frozens.pop();void 0!==t&&(this.globalMiddleware=t)}reset(){this.globalMiddleware=this.globalMiddleware.filter((t=>t.global))}}function C(t,e,s,i){return s.reduce(((t,s)=>{if(s.applyBeforeValidation!==i)return t;if(s.mutates){if(s.applied)return t;s.applied=!0}if(f(t))return t.then((t=>Promise.all([t,s(t,e)]))).then((([t,e])=>Object.assign(t,e)));{const i=s(t,e);return f(i)?i.then((e=>Object.assign(t,e))):Object.assign(t,i)}}),t)}function j(t,e,s=(t=>{throw t})){try{const s="function"==typeof t?t():t;return f(s)?s.then((t=>e(t))):e(s)}catch(t){return s(t)}}const M=/(^\*)|(^\$0)/;class _{constructor(t,e,s,i){this.requireCache=new Set,this.handlers={},this.aliasMap={},this.frozens=[],this.shim=i,this.usage=t,this.globalMiddleware=s,this.validation=e}addDirectory(t,e,s,i){"boolean"!=typeof(i=i||{}).recurse&&(i.recurse=!1),Array.isArray(i.extensions)||(i.extensions=["js"]);const n="function"==typeof i.visit?i.visit:t=>t;i.visit=(t,e,s)=>{const i=n(t,e,s);if(i){if(this.requireCache.has(e))return i;this.requireCache.add(e),this.addHandler(i)}return i},this.shim.requireDirectory({require:e,filename:s},t,i)}addHandler(t,e,s,i,n,r){let a=[];const h=function(t){return t?t.map((t=>(t.applyBeforeValidation=!1,t))):[]}(n);if(i=i||(()=>{}),Array.isArray(t))if(function(t){return t.every((t=>"string"==typeof t))}(t))[t,...a]=t;else for(const e of t)this.addHandler(e);else{if(function(t){return"object"==typeof t&&!Array.isArray(t)}(t)){let e=Array.isArray(t.command)||"string"==typeof t.command?t.command:this.moduleName(t);return t.aliases&&(e=[].concat(e).concat(t.aliases)),void this.addHandler(e,this.extractDesc(t),t.builder,t.handler,t.middlewares,t.deprecated)}if(k(s))return void this.addHandler([t].concat(a),e,s.builder,s.handler,s.middlewares,s.deprecated)}if("string"==typeof t){const n=o(t);a=a.map((t=>o(t).cmd));let l=!1;const c=[n.cmd].concat(a).filter((t=>!M.test(t)||(l=!0,!1)));0===c.length&&l&&c.push("$0"),l&&(n.cmd=c[0],a=c.slice(1),t=t.replace(M,n.cmd)),a.forEach((t=>{this.aliasMap[t]=n.cmd})),!1!==e&&this.usage.command(t,e,l,a,r),this.handlers[n.cmd]={original:t,description:e,handler:i,builder:s||{},middlewares:h,deprecated:r,demanded:n.demanded,optional:n.optional},l&&(this.defaultCommand=this.handlers[n.cmd])}}getCommandHandlers(){return this.handlers}getCommands(){return Object.keys(this.handlers).concat(Object.keys(this.aliasMap))}hasDefaultCommand(){return!!this.defaultCommand}runCommand(t,e,s,i,n,r){const o=this.handlers[t]||this.handlers[this.aliasMap[t]]||this.defaultCommand,a=e.getInternalMethods().getContext(),h=a.commands.slice(),l=!t;t&&(a.commands.push(t),a.fullCommands.push(o.original));const c=this.applyBuilderUpdateUsageAndParse(l,o,e,s.aliases,h,i,n,r);return f(c)?c.then((t=>this.applyMiddlewareAndGetResult(l,o,t.innerArgv,a,n,t.aliases,e))):this.applyMiddlewareAndGetResult(l,o,c.innerArgv,a,n,c.aliases,e)}applyBuilderUpdateUsageAndParse(t,e,s,i,n,r,o,a){const h=e.builder;let l=s;if(x(h)){s.getInternalMethods().getUsageInstance().freeze();const c=h(s.getInternalMethods().reset(i),a);if(f(c))return c.then((i=>{var a;return l=(a=i)&&"function"==typeof a.getInternalMethods?i:s,this.parseAndUpdateUsage(t,e,l,n,r,o)}))}else(function(t){return"object"==typeof t})(h)&&(s.getInternalMethods().getUsageInstance().freeze(),l=s.getInternalMethods().reset(i),Object.keys(e.builder).forEach((t=>{l.option(t,h[t])})));return this.parseAndUpdateUsage(t,e,l,n,r,o)}parseAndUpdateUsage(t,e,s,i,n,r){t&&s.getInternalMethods().getUsageInstance().unfreeze(!0),this.shouldUpdateUsage(s)&&s.getInternalMethods().getUsageInstance().usage(this.usageFromParentCommandsCommandHandler(i,e),e.description);const o=s.getInternalMethods().runYargsParserAndExecuteCommands(null,void 0,!0,n,r);return f(o)?o.then((t=>({aliases:s.parsed.aliases,innerArgv:t}))):{aliases:s.parsed.aliases,innerArgv:o}}shouldUpdateUsage(t){return!t.getInternalMethods().getUsageInstance().getUsageDisabled()&&0===t.getInternalMethods().getUsageInstance().getUsage().length}usageFromParentCommandsCommandHandler(t,e){const s=M.test(e.original)?e.original.replace(M,"").trim():e.original,i=t.filter((t=>!M.test(t)));return i.push(s),`$0 ${i.join(" ")}`}handleValidationAndGetResult(t,e,s,i,n,r,o,a){if(!r.getInternalMethods().getHasOutput()){const e=r.getInternalMethods().runValidation(n,a,r.parsed.error,t);s=j(s,(t=>(e(t),t)))}if(e.handler&&!r.getInternalMethods().getHasOutput()){r.getInternalMethods().setHasOutput();const i=!!r.getOptions().configuration["populate--"];r.getInternalMethods().postProcess(s,i,!1,!1),s=j(s=C(s,r,o,!1),(t=>{const s=e.handler(t);return f(s)?s.then((()=>t)):t})),t||r.getInternalMethods().getUsageInstance().cacheHelpMessage(),f(s)&&!r.getInternalMethods().hasParseCallback()&&s.catch((t=>{try{r.getInternalMethods().getUsageInstance().fail(null,t)}catch(t){}}))}return t||(i.commands.pop(),i.fullCommands.pop()),s}applyMiddlewareAndGetResult(t,e,s,i,n,r,o){let a={};if(n)return s;o.getInternalMethods().getHasOutput()||(a=this.populatePositionals(e,s,i,o));const h=this.globalMiddleware.getMiddleware().slice(0).concat(e.middlewares),l=C(s,o,h,!0);return f(l)?l.then((s=>this.handleValidationAndGetResult(t,e,s,i,r,o,h,a))):this.handleValidationAndGetResult(t,e,l,i,r,o,h,a)}populatePositionals(t,e,s,i){e._=e._.slice(s.commands.length);const n=t.demanded.slice(0),r=t.optional.slice(0),o={};for(this.validation.positionalCount(n.length,e._.length);n.length;){const t=n.shift();this.populatePositional(t,e,o)}for(;r.length;){const t=r.shift();this.populatePositional(t,e,o)}return e._=s.commands.concat(e._.map((t=>""+t))),this.postProcessPositionals(e,o,this.cmdToParseOptions(t.original),i),o}populatePositional(t,e,s){const i=t.cmd[0];t.variadic?s[i]=e._.splice(0).map(String):e._.length&&(s[i]=[String(e._.shift())])}cmdToParseOptions(t){const e={array:[],default:{},alias:{},demand:{}},s=o(t);return s.demanded.forEach((t=>{const[s,...i]=t.cmd;t.variadic&&(e.array.push(s),e.default[s]=[]),e.alias[s]=i,e.demand[s]=!0})),s.optional.forEach((t=>{const[s,...i]=t.cmd;t.variadic&&(e.array.push(s),e.default[s]=[]),e.alias[s]=i})),e}postProcessPositionals(t,e,s,i){const n=Object.assign({},i.getOptions());n.default=Object.assign(s.default,n.default);for(const t of Object.keys(s.alias))n.alias[t]=(n.alias[t]||[]).concat(s.alias[t]);n.array=n.array.concat(s.array),n.config={};const r=[];if(Object.keys(e).forEach((t=>{e[t].map((e=>{n.configuration["unknown-options-as-args"]&&(n.key[t]=!0),r.push(`--${t}`),r.push(e)}))})),!r.length)return;const o=Object.assign({},n.configuration,{"populate--":!1}),a=this.shim.Parser.detailed(r,Object.assign({},n,{configuration:o}));if(a.error)i.getInternalMethods().getUsageInstance().fail(a.error.message,a.error);else{const s=Object.keys(e);Object.keys(e).forEach((t=>{s.push(...a.aliases[t])})),Object.keys(a.argv).forEach((n=>{s.includes(n)&&(e[n]||(e[n]=a.argv[n]),!this.isInConfigs(i,n)&&!this.isDefaulted(i,n)&&Object.prototype.hasOwnProperty.call(t,n)&&Object.prototype.hasOwnProperty.call(a.argv,n)&&(Array.isArray(t[n])||Array.isArray(a.argv[n]))?t[n]=[].concat(t[n],a.argv[n]):t[n]=a.argv[n])}))}}isDefaulted(t,e){const{default:s}=t.getOptions();return Object.prototype.hasOwnProperty.call(s,e)||Object.prototype.hasOwnProperty.call(s,this.shim.Parser.camelCase(e))}isInConfigs(t,e){const{configObjects:s}=t.getOptions();return s.some((t=>Object.prototype.hasOwnProperty.call(t,e)))||s.some((t=>Object.prototype.hasOwnProperty.call(t,this.shim.Parser.camelCase(e))))}runDefaultBuilderOn(t){if(!this.defaultCommand)return;if(this.shouldUpdateUsage(t)){const e=M.test(this.defaultCommand.original)?this.defaultCommand.original:this.defaultCommand.original.replace(/^[^[\]<>]*/,"$0 ");t.getInternalMethods().getUsageInstance().usage(e,this.defaultCommand.description)}const e=this.defaultCommand.builder;if(x(e))return e(t,!0);k(e)||Object.keys(e).forEach((s=>{t.option(s,e[s])}))}moduleName(t){const e=function(t){if("undefined"==typeof require)return null;for(let e,s=0,i=Object.keys(require.cache);s<i.length;s++)if(e=require.cache[i[s]],e.exports===t)return e;return null}(t);if(!e)throw new Error(`No command name given for module: ${this.shim.inspect(t)}`);return this.commandFromFilename(e.filename)}commandFromFilename(t){return this.shim.path.basename(t,this.shim.path.extname(t))}extractDesc({describe:t,description:e,desc:s}){for(const i of[t,e,s]){if("string"==typeof i||!1===i)return i;d(i,!0,this.shim)}return!1}freeze(){this.frozens.push({handlers:this.handlers,aliasMap:this.aliasMap,defaultCommand:this.defaultCommand})}unfreeze(){const t=this.frozens.pop();d(t,void 0,this.shim),({handlers:this.handlers,aliasMap:this.aliasMap,defaultCommand:this.defaultCommand}=t)}reset(){return this.handlers={},this.aliasMap={},this.defaultCommand=void 0,this.requireCache=new Set,this}}function k(t){return"object"==typeof t&&!!t.builder&&"function"==typeof t.handler}function x(t){return"function"==typeof t}function E(t){"undefined"!=typeof process&&[process.stdout,process.stderr].forEach((e=>{const s=e;s._handle&&s.isTTY&&"function"==typeof s._handle.setBlocking&&s._handle.setBlocking(t)}))}function A(t){return"boolean"==typeof t}function P(t,s){const i=s.y18n.__,n={},r=[];n.failFn=function(t){r.push(t)};let o=null,a=null,h=!0;n.showHelpOnFail=function(e=!0,s){const[i,r]="string"==typeof e?[!0,e]:[e,s];return t.getInternalMethods().isGlobalContext()&&(a=r),o=r,h=i,n};let l=!1;n.fail=function(s,i){const c=t.getInternalMethods().getLoggerInstance();if(!r.length){if(t.getExitProcess()&&E(!0),!l){l=!0,h&&(t.showHelp("error"),c.error()),(s||i)&&c.error(s||i);const e=o||a;e&&((s||i)&&c.error(""),c.error(e))}if(i=i||new e(s),t.getExitProcess())return t.exit(1);if(t.getInternalMethods().hasParseCallback())return t.exit(1,i);throw i}for(let t=r.length-1;t>=0;--t){const e=r[t];if(A(e)){if(i)throw i;if(s)throw Error(s)}else e(s,i,n)}};let c=[],f=!1;n.usage=(t,e)=>null===t?(f=!0,c=[],n):(f=!1,c.push([t,e||""]),n),n.getUsage=()=>c,n.getUsageDisabled=()=>f,n.getPositionalGroupName=()=>i("Positionals:");let d=[];n.example=(t,e)=>{d.push([t,e||""])};let u=[];n.command=function(t,e,s,i,n=!1){s&&(u=u.map((t=>(t[2]=!1,t)))),u.push([t,e||"",s,i,n])},n.getCommands=()=>u;let p={};n.describe=function(t,e){Array.isArray(t)?t.forEach((t=>{n.describe(t,e)})):"object"==typeof t?Object.keys(t).forEach((e=>{n.describe(e,t[e])})):p[t]=e},n.getDescriptions=()=>p;let m=[];n.epilog=t=>{m.push(t)};let y,b=!1;n.wrap=t=>{b=!0,y=t},n.getWrap=()=>s.getEnv("YARGS_DISABLE_WRAP")?null:(b||(y=function(){const t=80;return s.process.stdColumns?Math.min(t,s.process.stdColumns):t}(),b=!0),y);const v="__yargsString__:";function O(t,e,i){let n=0;return Array.isArray(t)||(t=Object.values(t).map((t=>[t]))),t.forEach((t=>{n=Math.max(s.stringWidth(i?`${i} ${I(t[0])}`:I(t[0]))+$(t[0]),n)})),e&&(n=Math.min(n,parseInt((.5*e).toString(),10))),n}let w;function C(e){return t.getOptions().hiddenOptions.indexOf(e)<0||t.parsed.argv[t.getOptions().showHiddenOpt]}function j(t,e){let s=`[${i("default:")} `;if(void 0===t&&!e)return null;if(e)s+=e;else switch(typeof t){case"string":s+=`"${t}"`;break;case"object":s+=JSON.stringify(t);break;default:s+=t}return`${s}]`}n.deferY18nLookup=t=>v+t,n.help=function(){if(w)return w;!function(){const e=t.getDemandedOptions(),s=t.getOptions();(Object.keys(s.alias)||[]).forEach((i=>{s.alias[i].forEach((r=>{p[r]&&n.describe(i,p[r]),r in e&&t.demandOption(i,e[r]),s.boolean.includes(r)&&t.boolean(i),s.count.includes(r)&&t.count(i),s.string.includes(r)&&t.string(i),s.normalize.includes(r)&&t.normalize(i),s.array.includes(r)&&t.array(i),s.number.includes(r)&&t.number(i)}))}))}();const e=t.customScriptName?t.$0:s.path.basename(t.$0),r=t.getDemandedOptions(),o=t.getDemandedCommands(),a=t.getDeprecatedOptions(),h=t.getGroups(),l=t.getOptions();let g=[];g=g.concat(Object.keys(p)),g=g.concat(Object.keys(r)),g=g.concat(Object.keys(o)),g=g.concat(Object.keys(l.default)),g=g.filter(C),g=Object.keys(g.reduce(((t,e)=>("_"!==e&&(t[e]=!0),t)),{}));const y=n.getWrap(),b=s.cliui({width:y,wrap:!!y});if(!f)if(c.length)c.forEach((t=>{b.div({text:`${t[0].replace(/\$0/g,e)}`}),t[1]&&b.div({text:`${t[1]}`,padding:[1,0,0,0]})})),b.div();else if(u.length){let t=null;t=o._?`${e} <${i("command")}>\n`:`${e} [${i("command")}]\n`,b.div(`${t}`)}if(u.length>1||1===u.length&&!u[0][2]){b.div(i("Commands:"));const s=t.getInternalMethods().getContext(),n=s.commands.length?`${s.commands.join(" ")} `:"";!0===t.getInternalMethods().getParserConfiguration()["sort-commands"]&&(u=u.sort(((t,e)=>t[0].localeCompare(e[0]))));const r=e?`${e} `:"";u.forEach((t=>{const s=`${r}${n}${t[0].replace(/^\$0 ?/,"")}`;b.span({text:s,padding:[0,2,0,2],width:O(u,y,`${e}${n}`)+4},{text:t[1]});const o=[];t[2]&&o.push(`[${i("default")}]`),t[3]&&t[3].length&&o.push(`[${i("aliases:")} ${t[3].join(", ")}]`),t[4]&&("string"==typeof t[4]?o.push(`[${i("deprecated: %s",t[4])}]`):o.push(`[${i("deprecated")}]`)),o.length?b.div({text:o.join(" "),padding:[0,0,0,2],align:"right"}):b.div()})),b.div()}const M=(Object.keys(l.alias)||[]).concat(Object.keys(t.parsed.newAliases)||[]);g=g.filter((e=>!t.parsed.newAliases[e]&&M.every((t=>-1===(l.alias[t]||[]).indexOf(e)))));const _=i("Options:");h[_]||(h[_]=[]),function(t,e,s,i){let n=[],r=null;Object.keys(s).forEach((t=>{n=n.concat(s[t])})),t.forEach((t=>{r=[t].concat(e[t]),r.some((t=>-1!==n.indexOf(t)))||s[i].push(t)}))}(g,l.alias,h,_);const k=t=>/^--/.test(I(t)),x=Object.keys(h).filter((t=>h[t].length>0)).map((t=>({groupName:t,normalizedKeys:h[t].filter(C).map((t=>{if(M.includes(t))return t;for(let e,s=0;void 0!==(e=M[s]);s++)if((l.alias[e]||[]).includes(t))return e;return t}))}))).filter((({normalizedKeys:t})=>t.length>0)).map((({groupName:t,normalizedKeys:e})=>{const s=e.reduce(((e,s)=>(e[s]=[s].concat(l.alias[s]||[]).map((e=>t===n.getPositionalGroupName()?e:(/^[0-9]$/.test(e)?l.boolean.includes(s)?"-":"--":e.length>1?"--":"-")+e)).sort(((t,e)=>k(t)===k(e)?0:k(t)?1:-1)).join(", "),e)),{});return{groupName:t,normalizedKeys:e,switches:s}}));if(x.filter((({groupName:t})=>t!==n.getPositionalGroupName())).some((({normalizedKeys:t,switches:e})=>!t.every((t=>k(e[t])))))&&x.filter((({groupName:t})=>t!==n.getPositionalGroupName())).forEach((({normalizedKeys:t,switches:e})=>{t.forEach((t=>{var s,i;k(e[t])&&(e[t]=(s=e[t],i=4,S(s)?{text:s.text,indentation:s.indentation+i}:{text:s,indentation:i}))}))})),x.forEach((({groupName:e,normalizedKeys:s,switches:o})=>{b.div(e),s.forEach((e=>{const s=o[e];let h=p[e]||"",c=null;h.includes(v)&&(h=i(h.substring(16))),l.boolean.includes(e)&&(c=`[${i("boolean")}]`),l.count.includes(e)&&(c=`[${i("count")}]`),l.string.includes(e)&&(c=`[${i("string")}]`),l.normalize.includes(e)&&(c=`[${i("string")}]`),l.array.includes(e)&&(c=`[${i("array")}]`),l.number.includes(e)&&(c=`[${i("number")}]`);const f=[e in a?(d=a[e],"string"==typeof d?`[${i("deprecated: %s",d)}]`:`[${i("deprecated")}]`):null,c,e in r?`[${i("required")}]`:null,l.choices&&l.choices[e]?`[${i("choices:")} ${n.stringifiedValues(l.choices[e])}]`:null,j(l.default[e],l.defaultDescription[e])].filter(Boolean).join(" ");var d;b.span({text:I(s),padding:[0,2,0,2+$(s)],width:O(o,y)+4},h);const u=!0===t.getInternalMethods().getUsageConfiguration()["hide-types"];f&&!u?b.div({text:f,padding:[0,0,0,2],align:"right"}):b.div()})),b.div()})),d.length&&(b.div(i("Examples:")),d.forEach((t=>{t[0]=t[0].replace(/\$0/g,e)})),d.forEach((t=>{""===t[1]?b.div({text:t[0],padding:[0,2,0,2]}):b.div({text:t[0],padding:[0,2,0,2],width:O(d,y)+4},{text:t[1]})})),b.div()),m.length>0){const t=m.map((t=>t.replace(/\$0/g,e))).join("\n");b.div(`${t}\n`)}return b.toString().replace(/\s*$/,"")},n.cacheHelpMessage=function(){w=this.help()},n.clearCachedHelpMessage=function(){w=void 0},n.hasCachedHelpMessage=function(){return!!w},n.showHelp=e=>{const s=t.getInternalMethods().getLoggerInstance();e||(e="error");("function"==typeof e?e:s[e])(n.help())},n.functionDescription=t=>["(",t.name?s.Parser.decamelize(t.name,"-"):i("generated-value"),")"].join(""),n.stringifiedValues=function(t,e){let s="";const i=e||", ",n=[].concat(t);return t&&n.length?(n.forEach((t=>{s.length&&(s+=i),s+=JSON.stringify(t)})),s):s};let M=null;n.version=t=>{M=t},n.showVersion=e=>{const s=t.getInternalMethods().getLoggerInstance();e||(e="error");("function"==typeof e?e:s[e])(M)},n.reset=function(t){return o=null,l=!1,c=[],f=!1,m=[],d=[],u=[],p=g(p,(e=>!t[e])),n};const _=[];return n.freeze=function(){_.push({failMessage:o,failureOutput:l,usages:c,usageDisabled:f,epilogs:m,examples:d,commands:u,descriptions:p})},n.unfreeze=function(t=!1){const e=_.pop();e&&(t?(p={...e.descriptions,...p},u=[...e.commands,...u],c=[...e.usages,...c],d=[...e.examples,...d],m=[...e.epilogs,...m]):({failMessage:o,failureOutput:l,usages:c,usageDisabled:f,epilogs:m,examples:d,commands:u,descriptions:p}=e))},n}function S(t){return"object"==typeof t}function $(t){return S(t)?t.indentation:0}function I(t){return S(t)?t.text:t}class D{constructor(t,e,s,i){var n,r,o;this.yargs=t,this.usage=e,this.command=s,this.shim=i,this.completionKey="get-yargs-completions",this.aliases=null,this.customCompletionFunction=null,this.indexAfterLastReset=0,this.zshShell=null!==(o=(null===(n=this.shim.getEnv("SHELL"))||void 0===n?void 0:n.includes("zsh"))||(null===(r=this.shim.getEnv("ZSH_NAME"))||void 0===r?void 0:r.includes("zsh")))&&void 0!==o&&o}defaultCompletion(t,e,s,i){const n=this.command.getCommandHandlers();for(let e=0,s=t.length;e<s;++e)if(n[t[e]]&&n[t[e]].builder){const s=n[t[e]].builder;if(x(s)){this.indexAfterLastReset=e+1;const t=this.yargs.getInternalMethods().reset();return s(t,!0),t.argv}}const r=[];this.commandCompletions(r,t,s),this.optionCompletions(r,t,e,s),this.choicesFromOptionsCompletions(r,t,e,s),this.choicesFromPositionalsCompletions(r,t,e,s),i(null,r)}commandCompletions(t,e,s){const i=this.yargs.getInternalMethods().getContext().commands;s.match(/^-/)||i[i.length-1]===s||this.previousArgHasChoices(e)||this.usage.getCommands().forEach((s=>{const i=o(s[0]).cmd;if(-1===e.indexOf(i))if(this.zshShell){const e=s[1]||"";t.push(i.replace(/:/g,"\\:")+":"+e)}else t.push(i)}))}optionCompletions(t,e,s,i){if((i.match(/^-/)||""===i&&0===t.length)&&!this.previousArgHasChoices(e)){const s=this.yargs.getOptions(),n=this.yargs.getGroups()[this.usage.getPositionalGroupName()]||[];Object.keys(s.key).forEach((r=>{const o=!!s.configuration["boolean-negation"]&&s.boolean.includes(r);n.includes(r)||s.hiddenOptions.includes(r)||this.argsContainKey(e,r,o)||this.completeOptionKey(r,t,i,o&&!!s.default[r])}))}}choicesFromOptionsCompletions(t,e,s,i){if(this.previousArgHasChoices(e)){const s=this.getPreviousArgChoices(e);s&&s.length>0&&t.push(...s.map((t=>t.replace(/:/g,"\\:"))))}}choicesFromPositionalsCompletions(t,e,s,i){if(""===i&&t.length>0&&this.previousArgHasChoices(e))return;const n=this.yargs.getGroups()[this.usage.getPositionalGroupName()]||[],r=Math.max(this.indexAfterLastReset,this.yargs.getInternalMethods().getContext().commands.length+1),o=n[s._.length-r-1];if(!o)return;const a=this.yargs.getOptions().choices[o]||[];for(const e of a)e.startsWith(i)&&t.push(e.replace(/:/g,"\\:"))}getPreviousArgChoices(t){if(t.length<1)return;let e=t[t.length-1],s="";if(!e.startsWith("-")&&t.length>1&&(s=e,e=t[t.length-2]),!e.startsWith("-"))return;const i=e.replace(/^-+/,""),n=this.yargs.getOptions(),r=[i,...this.yargs.getAliases()[i]||[]];let o;for(const t of r)if(Object.prototype.hasOwnProperty.call(n.key,t)&&Array.isArray(n.choices[t])){o=n.choices[t];break}return o?o.filter((t=>!s||t.startsWith(s))):void 0}previousArgHasChoices(t){const e=this.getPreviousArgChoices(t);return void 0!==e&&e.length>0}argsContainKey(t,e,s){const i=e=>-1!==t.indexOf((/^[^0-9]$/.test(e)?"-":"--")+e);if(i(e))return!0;if(s&&i(`no-${e}`))return!0;if(this.aliases)for(const t of this.aliases[e])if(i(t))return!0;return!1}completeOptionKey(t,e,s,i){var n,r,o,a;let h=t;if(this.zshShell){const e=this.usage.getDescriptions(),s=null===(r=null===(n=null==this?void 0:this.aliases)||void 0===n?void 0:n[t])||void 0===r?void 0:r.find((t=>{const s=e[t];return"string"==typeof s&&s.length>0})),i=s?e[s]:void 0,l=null!==(a=null!==(o=e[t])&&void 0!==o?o:i)&&void 0!==a?a:"";h=`${t.replace(/:/g,"\\:")}:${l.replace("__yargsString__:","").replace(/(\r\n|\n|\r)/gm," ")}`}const l=!/^--/.test(s)&&(t=>/^[^0-9]$/.test(t))(t)?"-":"--";e.push(l+h),i&&e.push(l+"no-"+h)}customCompletion(t,e,s,i){if(d(this.customCompletionFunction,null,this.shim),this.customCompletionFunction.length<3){const t=this.customCompletionFunction(s,e);return f(t)?t.then((t=>{this.shim.process.nextTick((()=>{i(null,t)}))})).catch((t=>{this.shim.process.nextTick((()=>{i(t,void 0)}))})):i(null,t)}return function(t){return t.length>3}(this.customCompletionFunction)?this.customCompletionFunction(s,e,((n=i)=>this.defaultCompletion(t,e,s,n)),(t=>{i(null,t)})):this.customCompletionFunction(s,e,(t=>{i(null,t)}))}getCompletion(t,e){const s=t.length?t[t.length-1]:"",i=this.yargs.parse(t,!0),n=this.customCompletionFunction?i=>this.customCompletion(t,i,s,e):i=>this.defaultCompletion(t,i,s,e);return f(i)?i.then(n):n(i)}generateCompletionScript(t,e){let s=this.zshShell?'#compdef {{app_name}}\n###-begin-{{app_name}}-completions-###\n#\n# yargs command completion script\n#\n# Installation: {{app_path}} {{completion_command}} >> ~/.zshrc\n# or {{app_path}} {{completion_command}} >> ~/.zprofile on OSX.\n#\n_{{app_name}}_yargs_completions()\n{\n local reply\n local si=$IFS\n IFS=$\'\n\' reply=($(COMP_CWORD="$((CURRENT-1))" COMP_LINE="$BUFFER" COMP_POINT="$CURSOR" {{app_path}} --get-yargs-completions "${words[@]}"))\n IFS=$si\n _describe \'values\' reply\n}\ncompdef _{{app_name}}_yargs_completions {{app_name}}\n###-end-{{app_name}}-completions-###\n':'###-begin-{{app_name}}-completions-###\n#\n# yargs command completion script\n#\n# Installation: {{app_path}} {{completion_command}} >> ~/.bashrc\n# or {{app_path}} {{completion_command}} >> ~/.bash_profile on OSX.\n#\n_{{app_name}}_yargs_completions()\n{\n local cur_word args type_list\n\n cur_word="${COMP_WORDS[COMP_CWORD]}"\n args=("${COMP_WORDS[@]}")\n\n # ask yargs to generate completions.\n type_list=$({{app_path}} --get-yargs-completions "${args[@]}")\n\n COMPREPLY=( $(compgen -W "${type_list}" -- ${cur_word}) )\n\n # if no match was found, fall back to filename completion\n if [ ${#COMPREPLY[@]} -eq 0 ]; then\n COMPREPLY=()\n fi\n\n return 0\n}\ncomplete -o bashdefault -o default -F _{{app_name}}_yargs_completions {{app_name}}\n###-end-{{app_name}}-completions-###\n';const i=this.shim.path.basename(t);return t.match(/\.js$/)&&(t=`./${t}`),s=s.replace(/{{app_name}}/g,i),s=s.replace(/{{completion_command}}/g,e),s.replace(/{{app_path}}/g,t)}registerFunction(t){this.customCompletionFunction=t}setParsed(t){this.aliases=t.aliases}}function N(t,e){if(0===t.length)return e.length;if(0===e.length)return t.length;const s=[];let i,n;for(i=0;i<=e.length;i++)s[i]=[i];for(n=0;n<=t.length;n++)s[0][n]=n;for(i=1;i<=e.length;i++)for(n=1;n<=t.length;n++)e.charAt(i-1)===t.charAt(n-1)?s[i][n]=s[i-1][n-1]:i>1&&n>1&&e.charAt(i-2)===t.charAt(n-1)&&e.charAt(i-1)===t.charAt(n-2)?s[i][n]=s[i-2][n-2]+1:s[i][n]=Math.min(s[i-1][n-1]+1,Math.min(s[i][n-1]+1,s[i-1][n]+1));return s[e.length][t.length]}const H=["$0","--","_"];var z,W,q,U,F,L,V,G,R,T,B,Y,K,J,Z,X,Q,tt,et,st,it,nt,rt,ot,at,ht,lt,ct,ft,dt,ut,pt,gt,mt,yt;const bt=Symbol("copyDoubleDash"),vt=Symbol("copyDoubleDash"),Ot=Symbol("deleteFromParserHintObject"),wt=Symbol("emitWarning"),Ct=Symbol("freeze"),jt=Symbol("getDollarZero"),Mt=Symbol("getParserConfiguration"),_t=Symbol("getUsageConfiguration"),kt=Symbol("guessLocale"),xt=Symbol("guessVersion"),Et=Symbol("parsePositionalNumbers"),At=Symbol("pkgUp"),Pt=Symbol("populateParserHintArray"),St=Symbol("populateParserHintSingleValueDictionary"),$t=Symbol("populateParserHintArrayDictionary"),It=Symbol("populateParserHintDictionary"),Dt=Symbol("sanitizeKey"),Nt=Symbol("setKey"),Ht=Symbol("unfreeze"),zt=Symbol("validateAsync"),Wt=Symbol("getCommandInstance"),qt=Symbol("getContext"),Ut=Symbol("getHasOutput"),Ft=Symbol("getLoggerInstance"),Lt=Symbol("getParseContext"),Vt=Symbol("getUsageInstance"),Gt=Symbol("getValidationInstance"),Rt=Symbol("hasParseCallback"),Tt=Symbol("isGlobalContext"),Bt=Symbol("postProcess"),Yt=Symbol("rebase"),Kt=Symbol("reset"),Jt=Symbol("runYargsParserAndExecuteCommands"),Zt=Symbol("runValidation"),Xt=Symbol("setHasOutput"),Qt=Symbol("kTrackManuallySetKeys");class te{constructor(t=[],e,s,i){this.customScriptName=!1,this.parsed=!1,z.set(this,void 0),W.set(this,void 0),q.set(this,{commands:[],fullCommands:[]}),U.set(this,null),F.set(this,null),L.set(this,"show-hidden"),V.set(this,null),G.set(this,!0),R.set(this,{}),T.set(this,!0),B.set(this,[]),Y.set(this,void 0),K.set(this,{}),J.set(this,!1),Z.set(this,null),X.set(this,!0),Q.set(this,void 0),tt.set(this,""),et.set(this,void 0),st.set(this,void 0),it.set(this,{}),nt.set(this,null),rt.set(this,null),ot.set(this,{}),at.set(this,{}),ht.set(this,void 0),lt.set(this,!1),ct.set(this,void 0),ft.set(this,!1),dt.set(this,!1),ut.set(this,!1),pt.set(this,void 0),gt.set(this,{}),mt.set(this,null),yt.set(this,void 0),O(this,ct,i,"f"),O(this,ht,t,"f"),O(this,W,e,"f"),O(this,st,s,"f"),O(this,Y,new w(this),"f"),this.$0=this[jt](),this[Kt](),O(this,z,v(this,z,"f"),"f"),O(this,pt,v(this,pt,"f"),"f"),O(this,yt,v(this,yt,"f"),"f"),O(this,et,v(this,et,"f"),"f"),v(this,et,"f").showHiddenOpt=v(this,L,"f"),O(this,Q,this[vt](),"f")}addHelpOpt(t,e){return h("[string|boolean] [string]",[t,e],arguments.length),v(this,Z,"f")&&(this[Ot](v(this,Z,"f")),O(this,Z,null,"f")),!1===t&&void 0===e||(O(this,Z,"string"==typeof t?t:"help","f"),this.boolean(v(this,Z,"f")),this.describe(v(this,Z,"f"),e||v(this,pt,"f").deferY18nLookup("Show help"))),this}help(t,e){return this.addHelpOpt(t,e)}addShowHiddenOpt(t,e){if(h("[string|boolean] [string]",[t,e],arguments.length),!1===t&&void 0===e)return this;const s="string"==typeof t?t:v(this,L,"f");return this.boolean(s),this.describe(s,e||v(this,pt,"f").deferY18nLookup("Show hidden options")),v(this,et,"f").showHiddenOpt=s,this}showHidden(t,e){return this.addShowHiddenOpt(t,e)}alias(t,e){return h("<object|string|array> [string|array]",[t,e],arguments.length),this[$t](this.alias.bind(this),"alias",t,e),this}array(t){return h("<array|string>",[t],arguments.length),this[Pt]("array",t),this[Qt](t),this}boolean(t){return h("<array|string>",[t],arguments.length),this[Pt]("boolean",t),this[Qt](t),this}check(t,e){return h("<function> [boolean]",[t,e],arguments.length),this.middleware(((e,s)=>j((()=>t(e,s.getOptions())),(s=>(s?("string"==typeof s||s instanceof Error)&&v(this,pt,"f").fail(s.toString(),s):v(this,pt,"f").fail(v(this,ct,"f").y18n.__("Argument check failed: %s",t.toString())),e)),(t=>(v(this,pt,"f").fail(t.message?t.message:t.toString(),t),e)))),!1,e),this}choices(t,e){return h("<object|string|array> [string|array]",[t,e],arguments.length),this[$t](this.choices.bind(this),"choices",t,e),this}coerce(t,s){if(h("<object|string|array> [function]",[t,s],arguments.length),Array.isArray(t)){if(!s)throw new e("coerce callback must be provided");for(const e of t)this.coerce(e,s);return this}if("object"==typeof t){for(const e of Object.keys(t))this.coerce(e,t[e]);return this}if(!s)throw new e("coerce callback must be provided");return v(this,et,"f").key[t]=!0,v(this,Y,"f").addCoerceMiddleware(((i,n)=>{let r;return Object.prototype.hasOwnProperty.call(i,t)?j((()=>(r=n.getAliases(),s(i[t]))),(e=>{i[t]=e;const s=n.getInternalMethods().getParserConfiguration()["strip-aliased"];if(r[t]&&!0!==s)for(const s of r[t])i[s]=e;return i}),(t=>{throw new e(t.message)})):i}),t),this}conflicts(t,e){return h("<string|object> [string|array]",[t,e],arguments.length),v(this,yt,"f").conflicts(t,e),this}config(t="config",e,s){return h("[object|string] [string|function] [function]",[t,e,s],arguments.length),"object"!=typeof t||Array.isArray(t)?("function"==typeof e&&(s=e,e=void 0),this.describe(t,e||v(this,pt,"f").deferY18nLookup("Path to JSON config file")),(Array.isArray(t)?t:[t]).forEach((t=>{v(this,et,"f").config[t]=s||!0})),this):(t=n(t,v(this,W,"f"),this[Mt]()["deep-merge-config"]||!1,v(this,ct,"f")),v(this,et,"f").configObjects=(v(this,et,"f").configObjects||[]).concat(t),this)}completion(t,e,s){return h("[string] [string|boolean|function] [function]",[t,e,s],arguments.length),"function"==typeof e&&(s=e,e=void 0),O(this,F,t||v(this,F,"f")||"completion","f"),e||!1===e||(e="generate completion script"),this.command(v(this,F,"f"),e),s&&v(this,U,"f").registerFunction(s),this}command(t,e,s,i,n,r){return h("<string|array|object> [string|boolean] [function|object] [function] [array] [boolean|string]",[t,e,s,i,n,r],arguments.length),v(this,z,"f").addHandler(t,e,s,i,n,r),this}commands(t,e,s,i,n,r){return this.command(t,e,s,i,n,r)}commandDir(t,e){h("<string> [object]",[t,e],arguments.length);const s=v(this,st,"f")||v(this,ct,"f").require;return v(this,z,"f").addDirectory(t,s,v(this,ct,"f").getCallerFile(),e),this}count(t){return h("<array|string>",[t],arguments.length),this[Pt]("count",t),this[Qt](t),this}default(t,e,s){return h("<object|string|array> [*] [string]",[t,e,s],arguments.length),s&&(u(t,v(this,ct,"f")),v(this,et,"f").defaultDescription[t]=s),"function"==typeof e&&(u(t,v(this,ct,"f")),v(this,et,"f").defaultDescription[t]||(v(this,et,"f").defaultDescription[t]=v(this,pt,"f").functionDescription(e)),e=e.call()),this[St](this.default.bind(this),"default",t,e),this}defaults(t,e,s){return this.default(t,e,s)}demandCommand(t=1,e,s,i){return h("[number] [number|string] [string|null|undefined] [string|null|undefined]",[t,e,s,i],arguments.length),"number"!=typeof e&&(s=e,e=1/0),this.global("_",!1),v(this,et,"f").demandedCommands._={min:t,max:e,minMsg:s,maxMsg:i},this}demand(t,e,s){return Array.isArray(e)?(e.forEach((t=>{d(s,!0,v(this,ct,"f")),this.demandOption(t,s)})),e=1/0):"number"!=typeof e&&(s=e,e=1/0),"number"==typeof t?(d(s,!0,v(this,ct,"f")),this.demandCommand(t,e,s,s)):Array.isArray(t)?t.forEach((t=>{d(s,!0,v(this,ct,"f")),this.demandOption(t,s)})):"string"==typeof s?this.demandOption(t,s):!0!==s&&void 0!==s||this.demandOption(t),this}demandOption(t,e){return h("<object|string|array> [string]",[t,e],arguments.length),this[St](this.demandOption.bind(this),"demandedOptions",t,e),this}deprecateOption(t,e){return h("<string> [string|boolean]",[t,e],arguments.length),v(this,et,"f").deprecatedOptions[t]=e,this}describe(t,e){return h("<object|string|array> [string]",[t,e],arguments.length),this[Nt](t,!0),v(this,pt,"f").describe(t,e),this}detectLocale(t){return h("<boolean>",[t],arguments.length),O(this,G,t,"f"),this}env(t){return h("[string|boolean]",[t],arguments.length),!1===t?delete v(this,et,"f").envPrefix:v(this,et,"f").envPrefix=t||"",this}epilogue(t){return h("<string>",[t],arguments.length),v(this,pt,"f").epilog(t),this}epilog(t){return this.epilogue(t)}example(t,e){return h("<string|array> [string]",[t,e],arguments.length),Array.isArray(t)?t.forEach((t=>this.example(...t))):v(this,pt,"f").example(t,e),this}exit(t,e){O(this,J,!0,"f"),O(this,V,e,"f"),v(this,T,"f")&&v(this,ct,"f").process.exit(t)}exitProcess(t=!0){return h("[boolean]",[t],arguments.length),O(this,T,t,"f"),this}fail(t){if(h("<function|boolean>",[t],arguments.length),"boolean"==typeof t&&!1!==t)throw new e("Invalid first argument. Expected function or boolean 'false'");return v(this,pt,"f").failFn(t),this}getAliases(){return this.parsed?this.parsed.aliases:{}}async getCompletion(t,e){return h("<array> [function]",[t,e],arguments.length),e?v(this,U,"f").getCompletion(t,e):new Promise(((e,s)=>{v(this,U,"f").getCompletion(t,((t,i)=>{t?s(t):e(i)}))}))}getDemandedOptions(){return h([],0),v(this,et,"f").demandedOptions}getDemandedCommands(){return h([],0),v(this,et,"f").demandedCommands}getDeprecatedOptions(){return h([],0),v(this,et,"f").deprecatedOptions}getDetectLocale(){return v(this,G,"f")}getExitProcess(){return v(this,T,"f")}getGroups(){return Object.assign({},v(this,K,"f"),v(this,at,"f"))}getHelp(){if(O(this,J,!0,"f"),!v(this,pt,"f").hasCachedHelpMessage()){if(!this.parsed){const t=this[Jt](v(this,ht,"f"),void 0,void 0,0,!0);if(f(t))return t.then((()=>v(this,pt,"f").help()))}const t=v(this,z,"f").runDefaultBuilderOn(this);if(f(t))return t.then((()=>v(this,pt,"f").help()))}return Promise.resolve(v(this,pt,"f").help())}getOptions(){return v(this,et,"f")}getStrict(){return v(this,ft,"f")}getStrictCommands(){return v(this,dt,"f")}getStrictOptions(){return v(this,ut,"f")}global(t,e){return h("<string|array> [boolean]",[t,e],arguments.length),t=[].concat(t),!1!==e?v(this,et,"f").local=v(this,et,"f").local.filter((e=>-1===t.indexOf(e))):t.forEach((t=>{v(this,et,"f").local.includes(t)||v(this,et,"f").local.push(t)})),this}group(t,e){h("<string|array> <string>",[t,e],arguments.length);const s=v(this,at,"f")[e]||v(this,K,"f")[e];v(this,at,"f")[e]&&delete v(this,at,"f")[e];const i={};return v(this,K,"f")[e]=(s||[]).concat(t).filter((t=>!i[t]&&(i[t]=!0))),this}hide(t){return h("<string>",[t],arguments.length),v(this,et,"f").hiddenOptions.push(t),this}implies(t,e){return h("<string|object> [number|string|array]",[t,e],arguments.length),v(this,yt,"f").implies(t,e),this}locale(t){return h("[string]",[t],arguments.length),void 0===t?(this[kt](),v(this,ct,"f").y18n.getLocale()):(O(this,G,!1,"f"),v(this,ct,"f").y18n.setLocale(t),this)}middleware(t,e,s){return v(this,Y,"f").addMiddleware(t,!!e,s)}nargs(t,e){return h("<string|object|array> [number]",[t,e],arguments.length),this[St](this.nargs.bind(this),"narg",t,e),this}normalize(t){return h("<array|string>",[t],arguments.length),this[Pt]("normalize",t),this}number(t){return h("<array|string>",[t],arguments.length),this[Pt]("number",t),this[Qt](t),this}option(t,e){if(h("<string|object> [object]",[t,e],arguments.length),"object"==typeof t)Object.keys(t).forEach((e=>{this.options(e,t[e])}));else{"object"!=typeof e&&(e={}),this[Qt](t),!v(this,mt,"f")||"version"!==t&&"version"!==(null==e?void 0:e.alias)||this[wt](['"version" is a reserved word.',"Please do one of the following:",'- Disable version with `yargs.version(false)` if using "version" as an option',"- Use the built-in `yargs.version` method instead (if applicable)","- Use a different option key","https://yargs.js.org/docs/#api-reference-version"].join("\n"),void 0,"versionWarning"),v(this,et,"f").key[t]=!0,e.alias&&this.alias(t,e.alias);const s=e.deprecate||e.deprecated;s&&this.deprecateOption(t,s);const i=e.demand||e.required||e.require;i&&this.demand(t,i),e.demandOption&&this.demandOption(t,"string"==typeof e.demandOption?e.demandOption:void 0),e.conflicts&&this.conflicts(t,e.conflicts),"default"in e&&this.default(t,e.default),void 0!==e.implies&&this.implies(t,e.implies),void 0!==e.nargs&&this.nargs(t,e.nargs),e.config&&this.config(t,e.configParser),e.normalize&&this.normalize(t),e.choices&&this.choices(t,e.choices),e.coerce&&this.coerce(t,e.coerce),e.group&&this.group(t,e.group),(e.boolean||"boolean"===e.type)&&(this.boolean(t),e.alias&&this.boolean(e.alias)),(e.array||"array"===e.type)&&(this.array(t),e.alias&&this.array(e.alias)),(e.number||"number"===e.type)&&(this.number(t),e.alias&&this.number(e.alias)),(e.string||"string"===e.type)&&(this.string(t),e.alias&&this.string(e.alias)),(e.count||"count"===e.type)&&this.count(t),"boolean"==typeof e.global&&this.global(t,e.global),e.defaultDescription&&(v(this,et,"f").defaultDescription[t]=e.defaultDescription),e.skipValidation&&this.skipValidation(t);const n=e.describe||e.description||e.desc,r=v(this,pt,"f").getDescriptions();Object.prototype.hasOwnProperty.call(r,t)&&"string"!=typeof n||this.describe(t,n),e.hidden&&this.hide(t),e.requiresArg&&this.requiresArg(t)}return this}options(t,e){return this.option(t,e)}parse(t,e,s){h("[string|array] [function|boolean|object] [function]",[t,e,s],arguments.length),this[Ct](),void 0===t&&(t=v(this,ht,"f")),"object"==typeof e&&(O(this,rt,e,"f"),e=s),"function"==typeof e&&(O(this,nt,e,"f"),e=!1),e||O(this,ht,t,"f"),v(this,nt,"f")&&O(this,T,!1,"f");const i=this[Jt](t,!!e),n=this.parsed;return v(this,U,"f").setParsed(this.parsed),f(i)?i.then((t=>(v(this,nt,"f")&&v(this,nt,"f").call(this,v(this,V,"f"),t,v(this,tt,"f")),t))).catch((t=>{throw v(this,nt,"f")&&v(this,nt,"f")(t,this.parsed.argv,v(this,tt,"f")),t})).finally((()=>{this[Ht](),this.parsed=n})):(v(this,nt,"f")&&v(this,nt,"f").call(this,v(this,V,"f"),i,v(this,tt,"f")),this[Ht](),this.parsed=n,i)}parseAsync(t,e,s){const i=this.parse(t,e,s);return f(i)?i:Promise.resolve(i)}parseSync(t,s,i){const n=this.parse(t,s,i);if(f(n))throw new e(".parseSync() must not be used with asynchronous builders, handlers, or middleware");return n}parserConfiguration(t){return h("<object>",[t],arguments.length),O(this,it,t,"f"),this}pkgConf(t,e){h("<string> [string]",[t,e],arguments.length);let s=null;const i=this[At](e||v(this,W,"f"));return i[t]&&"object"==typeof i[t]&&(s=n(i[t],e||v(this,W,"f"),this[Mt]()["deep-merge-config"]||!1,v(this,ct,"f")),v(this,et,"f").configObjects=(v(this,et,"f").configObjects||[]).concat(s)),this}positional(t,e){h("<string> <object>",[t,e],arguments.length);const s=["default","defaultDescription","implies","normalize","choices","conflicts","coerce","type","describe","desc","description","alias"];e=g(e,((t,e)=>!("type"===t&&!["string","number","boolean"].includes(e))&&s.includes(t)));const i=v(this,q,"f").fullCommands[v(this,q,"f").fullCommands.length-1],n=i?v(this,z,"f").cmdToParseOptions(i):{array:[],alias:{},default:{},demand:{}};return p(n).forEach((s=>{const i=n[s];Array.isArray(i)?-1!==i.indexOf(t)&&(e[s]=!0):i[t]&&!(s in e)&&(e[s]=i[t])})),this.group(t,v(this,pt,"f").getPositionalGroupName()),this.option(t,e)}recommendCommands(t=!0){return h("[boolean]",[t],arguments.length),O(this,lt,t,"f"),this}required(t,e,s){return this.demand(t,e,s)}require(t,e,s){return this.demand(t,e,s)}requiresArg(t){return h("<array|string|object> [number]",[t],arguments.length),"string"==typeof t&&v(this,et,"f").narg[t]||this[St](this.requiresArg.bind(this),"narg",t,NaN),this}showCompletionScript(t,e){return h("[string] [string]",[t,e],arguments.length),t=t||this.$0,v(this,Q,"f").log(v(this,U,"f").generateCompletionScript(t,e||v(this,F,"f")||"completion")),this}showHelp(t){if(h("[string|function]",[t],arguments.length),O(this,J,!0,"f"),!v(this,pt,"f").hasCachedHelpMessage()){if(!this.parsed){const e=this[Jt](v(this,ht,"f"),void 0,void 0,0,!0);if(f(e))return e.then((()=>{v(this,pt,"f").showHelp(t)})),this}const e=v(this,z,"f").runDefaultBuilderOn(this);if(f(e))return e.then((()=>{v(this,pt,"f").showHelp(t)})),this}return v(this,pt,"f").showHelp(t),this}scriptName(t){return this.customScriptName=!0,this.$0=t,this}showHelpOnFail(t,e){return h("[boolean|string] [string]",[t,e],arguments.length),v(this,pt,"f").showHelpOnFail(t,e),this}showVersion(t){return h("[string|function]",[t],arguments.length),v(this,pt,"f").showVersion(t),this}skipValidation(t){return h("<array|string>",[t],arguments.length),this[Pt]("skipValidation",t),this}strict(t){return h("[boolean]",[t],arguments.length),O(this,ft,!1!==t,"f"),this}strictCommands(t){return h("[boolean]",[t],arguments.length),O(this,dt,!1!==t,"f"),this}strictOptions(t){return h("[boolean]",[t],arguments.length),O(this,ut,!1!==t,"f"),this}string(t){return h("<array|string>",[t],arguments.length),this[Pt]("string",t),this[Qt](t),this}terminalWidth(){return h([],0),v(this,ct,"f").process.stdColumns}updateLocale(t){return this.updateStrings(t)}updateStrings(t){return h("<object>",[t],arguments.length),O(this,G,!1,"f"),v(this,ct,"f").y18n.updateLocale(t),this}usage(t,s,i,n){if(h("<string|null|undefined> [string|boolean] [function|object] [function]",[t,s,i,n],arguments.length),void 0!==s){if(d(t,null,v(this,ct,"f")),(t||"").match(/^\$0( |$)/))return this.command(t,s,i,n);throw new e(".usage() description must start with $0 if being used as alias for .command()")}return v(this,pt,"f").usage(t),this}usageConfiguration(t){return h("<object>",[t],arguments.length),O(this,gt,t,"f"),this}version(t,e,s){const i="version";if(h("[boolean|string] [string] [string]",[t,e,s],arguments.length),v(this,mt,"f")&&(this[Ot](v(this,mt,"f")),v(this,pt,"f").version(void 0),O(this,mt,null,"f")),0===arguments.length)s=this[xt](),t=i;else if(1===arguments.length){if(!1===t)return this;s=t,t=i}else 2===arguments.length&&(s=e,e=void 0);return O(this,mt,"string"==typeof t?t:i,"f"),e=e||v(this,pt,"f").deferY18nLookup("Show version number"),v(this,pt,"f").version(s||void 0),this.boolean(v(this,mt,"f")),this.describe(v(this,mt,"f"),e),this}wrap(t){return h("<number|null|undefined>",[t],arguments.length),v(this,pt,"f").wrap(t),this}[(z=new WeakMap,W=new WeakMap,q=new WeakMap,U=new WeakMap,F=new WeakMap,L=new WeakMap,V=new WeakMap,G=new WeakMap,R=new WeakMap,T=new WeakMap,B=new WeakMap,Y=new WeakMap,K=new WeakMap,J=new WeakMap,Z=new WeakMap,X=new WeakMap,Q=new WeakMap,tt=new WeakMap,et=new WeakMap,st=new WeakMap,it=new WeakMap,nt=new WeakMap,rt=new WeakMap,ot=new WeakMap,at=new WeakMap,ht=new WeakMap,lt=new WeakMap,ct=new WeakMap,ft=new WeakMap,dt=new WeakMap,ut=new WeakMap,pt=new WeakMap,gt=new WeakMap,mt=new WeakMap,yt=new WeakMap,bt)](t){if(!t._||!t["--"])return t;t._.push.apply(t._,t["--"]);try{delete t["--"]}catch(t){}return t}[vt](){return{log:(...t)=>{this[Rt]()||console.log(...t),O(this,J,!0,"f"),v(this,tt,"f").length&&O(this,tt,v(this,tt,"f")+"\n","f"),O(this,tt,v(this,tt,"f")+t.join(" "),"f")},error:(...t)=>{this[Rt]()||console.error(...t),O(this,J,!0,"f"),v(this,tt,"f").length&&O(this,tt,v(this,tt,"f")+"\n","f"),O(this,tt,v(this,tt,"f")+t.join(" "),"f")}}}[Ot](t){p(v(this,et,"f")).forEach((e=>{if("configObjects"===e)return;const s=v(this,et,"f")[e];Array.isArray(s)?s.includes(t)&&s.splice(s.indexOf(t),1):"object"==typeof s&&delete s[t]})),delete v(this,pt,"f").getDescriptions()[t]}[wt](t,e,s){v(this,R,"f")[s]||(v(this,ct,"f").process.emitWarning(t,e),v(this,R,"f")[s]=!0)}[Ct](){v(this,B,"f").push({options:v(this,et,"f"),configObjects:v(this,et,"f").configObjects.slice(0),exitProcess:v(this,T,"f"),groups:v(this,K,"f"),strict:v(this,ft,"f"),strictCommands:v(this,dt,"f"),strictOptions:v(this,ut,"f"),completionCommand:v(this,F,"f"),output:v(this,tt,"f"),exitError:v(this,V,"f"),hasOutput:v(this,J,"f"),parsed:this.parsed,parseFn:v(this,nt,"f"),parseContext:v(this,rt,"f")}),v(this,pt,"f").freeze(),v(this,yt,"f").freeze(),v(this,z,"f").freeze(),v(this,Y,"f").freeze()}[jt](){let t,e="";return t=/\b(node|iojs|electron)(\.exe)?$/.test(v(this,ct,"f").process.argv()[0])?v(this,ct,"f").process.argv().slice(1,2):v(this,ct,"f").process.argv().slice(0,1),e=t.map((t=>{const e=this[Yt](v(this,W,"f"),t);return t.match(/^(\/|([a-zA-Z]:)?\\)/)&&e.length<t.length?e:t})).join(" ").trim(),v(this,ct,"f").getEnv("_")&&v(this,ct,"f").getProcessArgvBin()===v(this,ct,"f").getEnv("_")&&(e=v(this,ct,"f").getEnv("_").replace(`${v(this,ct,"f").path.dirname(v(this,ct,"f").process.execPath())}/`,"")),e}[Mt](){return v(this,it,"f")}[_t](){return v(this,gt,"f")}[kt](){if(!v(this,G,"f"))return;const t=v(this,ct,"f").getEnv("LC_ALL")||v(this,ct,"f").getEnv("LC_MESSAGES")||v(this,ct,"f").getEnv("LANG")||v(this,ct,"f").getEnv("LANGUAGE")||"en_US";this.locale(t.replace(/[.:].*/,""))}[xt](){return this[At]().version||"unknown"}[Et](t){const e=t["--"]?t["--"]:t._;for(let t,s=0;void 0!==(t=e[s]);s++)v(this,ct,"f").Parser.looksLikeNumber(t)&&Number.isSafeInteger(Math.floor(parseFloat(`${t}`)))&&(e[s]=Number(t));return t}[At](t){const e=t||"*";if(v(this,ot,"f")[e])return v(this,ot,"f")[e];let s={};try{let e=t||v(this,ct,"f").mainFilename;!t&&v(this,ct,"f").path.extname(e)&&(e=v(this,ct,"f").path.dirname(e));const i=v(this,ct,"f").findUp(e,((t,e)=>e.includes("package.json")?"package.json":void 0));d(i,void 0,v(this,ct,"f")),s=JSON.parse(v(this,ct,"f").readFileSync(i,"utf8"))}catch(t){}return v(this,ot,"f")[e]=s||{},v(this,ot,"f")[e]}[Pt](t,e){(e=[].concat(e)).forEach((e=>{e=this[Dt](e),v(this,et,"f")[t].push(e)}))}[St](t,e,s,i){this[It](t,e,s,i,((t,e,s)=>{v(this,et,"f")[t][e]=s}))}[$t](t,e,s,i){this[It](t,e,s,i,((t,e,s)=>{v(this,et,"f")[t][e]=(v(this,et,"f")[t][e]||[]).concat(s)}))}[It](t,e,s,i,n){if(Array.isArray(s))s.forEach((e=>{t(e,i)}));else if((t=>"object"==typeof t)(s))for(const e of p(s))t(e,s[e]);else n(e,this[Dt](s),i)}[Dt](t){return"__proto__"===t?"___proto___":t}[Nt](t,e){return this[St](this[Nt].bind(this),"key",t,e),this}[Ht](){var t,e,s,i,n,r,o,a,h,l,c,f;const u=v(this,B,"f").pop();let p;d(u,void 0,v(this,ct,"f")),t=this,e=this,s=this,i=this,n=this,r=this,o=this,a=this,h=this,l=this,c=this,f=this,({options:{set value(e){O(t,et,e,"f")}}.value,configObjects:p,exitProcess:{set value(t){O(e,T,t,"f")}}.value,groups:{set value(t){O(s,K,t,"f")}}.value,output:{set value(t){O(i,tt,t,"f")}}.value,exitError:{set value(t){O(n,V,t,"f")}}.value,hasOutput:{set value(t){O(r,J,t,"f")}}.value,parsed:this.parsed,strict:{set value(t){O(o,ft,t,"f")}}.value,strictCommands:{set value(t){O(a,dt,t,"f")}}.value,strictOptions:{set value(t){O(h,ut,t,"f")}}.value,completionCommand:{set value(t){O(l,F,t,"f")}}.value,parseFn:{set value(t){O(c,nt,t,"f")}}.value,parseContext:{set value(t){O(f,rt,t,"f")}}.value}=u),v(this,et,"f").configObjects=p,v(this,pt,"f").unfreeze(),v(this,yt,"f").unfreeze(),v(this,z,"f").unfreeze(),v(this,Y,"f").unfreeze()}[zt](t,e){return j(e,(e=>(t(e),e)))}getInternalMethods(){return{getCommandInstance:this[Wt].bind(this),getContext:this[qt].bind(this),getHasOutput:this[Ut].bind(this),getLoggerInstance:this[Ft].bind(this),getParseContext:this[Lt].bind(this),getParserConfiguration:this[Mt].bind(this),getUsageConfiguration:this[_t].bind(this),getUsageInstance:this[Vt].bind(this),getValidationInstance:this[Gt].bind(this),hasParseCallback:this[Rt].bind(this),isGlobalContext:this[Tt].bind(this),postProcess:this[Bt].bind(this),reset:this[Kt].bind(this),runValidation:this[Zt].bind(this),runYargsParserAndExecuteCommands:this[Jt].bind(this),setHasOutput:this[Xt].bind(this)}}[Wt](){return v(this,z,"f")}[qt](){return v(this,q,"f")}[Ut](){return v(this,J,"f")}[Ft](){return v(this,Q,"f")}[Lt](){return v(this,rt,"f")||{}}[Vt](){return v(this,pt,"f")}[Gt](){return v(this,yt,"f")}[Rt](){return!!v(this,nt,"f")}[Tt](){return v(this,X,"f")}[Bt](t,e,s,i){if(s)return t;if(f(t))return t;e||(t=this[bt](t));return(this[Mt]()["parse-positional-numbers"]||void 0===this[Mt]()["parse-positional-numbers"])&&(t=this[Et](t)),i&&(t=C(t,this,v(this,Y,"f").getMiddleware(),!1)),t}[Kt](t={}){O(this,et,v(this,et,"f")||{},"f");const e={};e.local=v(this,et,"f").local||[],e.configObjects=v(this,et,"f").configObjects||[];const s={};e.local.forEach((e=>{s[e]=!0,(t[e]||[]).forEach((t=>{s[t]=!0}))})),Object.assign(v(this,at,"f"),Object.keys(v(this,K,"f")).reduce(((t,e)=>{const i=v(this,K,"f")[e].filter((t=>!(t in s)));return i.length>0&&(t[e]=i),t}),{})),O(this,K,{},"f");return["array","boolean","string","skipValidation","count","normalize","number","hiddenOptions"].forEach((t=>{e[t]=(v(this,et,"f")[t]||[]).filter((t=>!s[t]))})),["narg","key","alias","default","defaultDescription","config","choices","demandedOptions","demandedCommands","deprecatedOptions"].forEach((t=>{e[t]=g(v(this,et,"f")[t],(t=>!s[t]))})),e.envPrefix=v(this,et,"f").envPrefix,O(this,et,e,"f"),O(this,pt,v(this,pt,"f")?v(this,pt,"f").reset(s):P(this,v(this,ct,"f")),"f"),O(this,yt,v(this,yt,"f")?v(this,yt,"f").reset(s):function(t,e,s){const i=s.y18n.__,n=s.y18n.__n,r={nonOptionCount:function(s){const i=t.getDemandedCommands(),r=s._.length+(s["--"]?s["--"].length:0)-t.getInternalMethods().getContext().commands.length;i._&&(r<i._.min||r>i._.max)&&(r<i._.min?void 0!==i._.minMsg?e.fail(i._.minMsg?i._.minMsg.replace(/\$0/g,r.toString()).replace(/\$1/,i._.min.toString()):null):e.fail(n("Not enough non-option arguments: got %s, need at least %s","Not enough non-option arguments: got %s, need at least %s",r,r.toString(),i._.min.toString())):r>i._.max&&(void 0!==i._.maxMsg?e.fail(i._.maxMsg?i._.maxMsg.replace(/\$0/g,r.toString()).replace(/\$1/,i._.max.toString()):null):e.fail(n("Too many non-option arguments: got %s, maximum of %s","Too many non-option arguments: got %s, maximum of %s",r,r.toString(),i._.max.toString()))))},positionalCount:function(t,s){s<t&&e.fail(n("Not enough non-option arguments: got %s, need at least %s","Not enough non-option arguments: got %s, need at least %s",s,s+"",t+""))},requiredArguments:function(t,s){let i=null;for(const e of Object.keys(s))Object.prototype.hasOwnProperty.call(t,e)&&void 0!==t[e]||(i=i||{},i[e]=s[e]);if(i){const t=[];for(const e of Object.keys(i)){const s=i[e];s&&t.indexOf(s)<0&&t.push(s)}const s=t.length?`\n${t.join("\n")}`:"";e.fail(n("Missing required argument: %s","Missing required arguments: %s",Object.keys(i).length,Object.keys(i).join(", ")+s))}},unknownArguments:function(s,i,o,a,h=!0){var l;const c=t.getInternalMethods().getCommandInstance().getCommands(),f=[],d=t.getInternalMethods().getContext();if(Object.keys(s).forEach((e=>{H.includes(e)||Object.prototype.hasOwnProperty.call(o,e)||Object.prototype.hasOwnProperty.call(t.getInternalMethods().getParseContext(),e)||r.isValidAndSomeAliasIsNotNew(e,i)||f.push(e)})),h&&(d.commands.length>0||c.length>0||a)&&s._.slice(d.commands.length).forEach((t=>{c.includes(""+t)||f.push(""+t)})),h){const e=(null===(l=t.getDemandedCommands()._)||void 0===l?void 0:l.max)||0,i=d.commands.length+e;i<s._.length&&s._.slice(i).forEach((t=>{t=String(t),d.commands.includes(t)||f.includes(t)||f.push(t)}))}f.length&&e.fail(n("Unknown argument: %s","Unknown arguments: %s",f.length,f.map((t=>t.trim()?t:`"${t}"`)).join(", ")))},unknownCommands:function(s){const i=t.getInternalMethods().getCommandInstance().getCommands(),r=[],o=t.getInternalMethods().getContext();return(o.commands.length>0||i.length>0)&&s._.slice(o.commands.length).forEach((t=>{i.includes(""+t)||r.push(""+t)})),r.length>0&&(e.fail(n("Unknown command: %s","Unknown commands: %s",r.length,r.join(", "))),!0)},isValidAndSomeAliasIsNotNew:function(e,s){if(!Object.prototype.hasOwnProperty.call(s,e))return!1;const i=t.parsed.newAliases;return[e,...s[e]].some((t=>!Object.prototype.hasOwnProperty.call(i,t)||!i[e]))},limitedChoices:function(s){const n=t.getOptions(),r={};if(!Object.keys(n.choices).length)return;Object.keys(s).forEach((t=>{-1===H.indexOf(t)&&Object.prototype.hasOwnProperty.call(n.choices,t)&&[].concat(s[t]).forEach((e=>{-1===n.choices[t].indexOf(e)&&void 0!==e&&(r[t]=(r[t]||[]).concat(e))}))}));const o=Object.keys(r);if(!o.length)return;let a=i("Invalid values:");o.forEach((t=>{a+=`\n ${i("Argument: %s, Given: %s, Choices: %s",t,e.stringifiedValues(r[t]),e.stringifiedValues(n.choices[t]))}`})),e.fail(a)}};let o={};function a(t,e){const s=Number(e);return"number"==typeof(e=isNaN(s)?e:s)?e=t._.length>=e:e.match(/^--no-.+/)?(e=e.match(/^--no-(.+)/)[1],e=!Object.prototype.hasOwnProperty.call(t,e)):e=Object.prototype.hasOwnProperty.call(t,e),e}r.implies=function(e,i){h("<string|object> [array|number|string]",[e,i],arguments.length),"object"==typeof e?Object.keys(e).forEach((t=>{r.implies(t,e[t])})):(t.global(e),o[e]||(o[e]=[]),Array.isArray(i)?i.forEach((t=>r.implies(e,t))):(d(i,void 0,s),o[e].push(i)))},r.getImplied=function(){return o},r.implications=function(t){const s=[];if(Object.keys(o).forEach((e=>{const i=e;(o[e]||[]).forEach((e=>{let n=i;const r=e;n=a(t,n),e=a(t,e),n&&!e&&s.push(` ${i} -> ${r}`)}))})),s.length){let t=`${i("Implications failed:")}\n`;s.forEach((e=>{t+=e})),e.fail(t)}};let l={};r.conflicts=function(e,s){h("<string|object> [array|string]",[e,s],arguments.length),"object"==typeof e?Object.keys(e).forEach((t=>{r.conflicts(t,e[t])})):(t.global(e),l[e]||(l[e]=[]),Array.isArray(s)?s.forEach((t=>r.conflicts(e,t))):l[e].push(s))},r.getConflicting=()=>l,r.conflicting=function(n){Object.keys(n).forEach((t=>{l[t]&&l[t].forEach((s=>{s&&void 0!==n[t]&&void 0!==n[s]&&e.fail(i("Arguments %s and %s are mutually exclusive",t,s))}))})),t.getInternalMethods().getParserConfiguration()["strip-dashed"]&&Object.keys(l).forEach((t=>{l[t].forEach((r=>{r&&void 0!==n[s.Parser.camelCase(t)]&&void 0!==n[s.Parser.camelCase(r)]&&e.fail(i("Arguments %s and %s are mutually exclusive",t,r))}))}))},r.recommendCommands=function(t,s){s=s.sort(((t,e)=>e.length-t.length));let n=null,r=1/0;for(let e,i=0;void 0!==(e=s[i]);i++){const s=N(t,e);s<=3&&s<r&&(r=s,n=e)}n&&e.fail(i("Did you mean %s?",n))},r.reset=function(t){return o=g(o,(e=>!t[e])),l=g(l,(e=>!t[e])),r};const c=[];return r.freeze=function(){c.push({implied:o,conflicting:l})},r.unfreeze=function(){const t=c.pop();d(t,void 0,s),({implied:o,conflicting:l}=t)},r}(this,v(this,pt,"f"),v(this,ct,"f")),"f"),O(this,z,v(this,z,"f")?v(this,z,"f").reset():function(t,e,s,i){return new _(t,e,s,i)}(v(this,pt,"f"),v(this,yt,"f"),v(this,Y,"f"),v(this,ct,"f")),"f"),v(this,U,"f")||O(this,U,function(t,e,s,i){return new D(t,e,s,i)}(this,v(this,pt,"f"),v(this,z,"f"),v(this,ct,"f")),"f"),v(this,Y,"f").reset(),O(this,F,null,"f"),O(this,tt,"","f"),O(this,V,null,"f"),O(this,J,!1,"f"),this.parsed=!1,this}[Yt](t,e){return v(this,ct,"f").path.relative(t,e)}[Jt](t,s,i,n=0,r=!1){let o=!!i||r;t=t||v(this,ht,"f"),v(this,et,"f").__=v(this,ct,"f").y18n.__,v(this,et,"f").configuration=this[Mt]();const a=!!v(this,et,"f").configuration["populate--"],h=Object.assign({},v(this,et,"f").configuration,{"populate--":!0}),l=v(this,ct,"f").Parser.detailed(t,Object.assign({},v(this,et,"f"),{configuration:{"parse-positional-numbers":!1,...h}})),c=Object.assign(l.argv,v(this,rt,"f"));let d;const u=l.aliases;let p=!1,g=!1;Object.keys(c).forEach((t=>{t===v(this,Z,"f")&&c[t]?p=!0:t===v(this,mt,"f")&&c[t]&&(g=!0)})),c.$0=this.$0,this.parsed=l,0===n&&v(this,pt,"f").clearCachedHelpMessage();try{if(this[kt](),s)return this[Bt](c,a,!!i,!1);if(v(this,Z,"f")){[v(this,Z,"f")].concat(u[v(this,Z,"f")]||[]).filter((t=>t.length>1)).includes(""+c._[c._.length-1])&&(c._.pop(),p=!0)}O(this,X,!1,"f");const h=v(this,z,"f").getCommands(),m=v(this,U,"f").completionKey in c,y=p||m||r;if(c._.length){if(h.length){let t;for(let e,s=n||0;void 0!==c._[s];s++){if(e=String(c._[s]),h.includes(e)&&e!==v(this,F,"f")){const t=v(this,z,"f").runCommand(e,this,l,s+1,r,p||g||r);return this[Bt](t,a,!!i,!1)}if(!t&&e!==v(this,F,"f")){t=e;break}}!v(this,z,"f").hasDefaultCommand()&&v(this,lt,"f")&&t&&!y&&v(this,yt,"f").recommendCommands(t,h)}v(this,F,"f")&&c._.includes(v(this,F,"f"))&&!m&&(v(this,T,"f")&&E(!0),this.showCompletionScript(),this.exit(0))}if(v(this,z,"f").hasDefaultCommand()&&!y){const t=v(this,z,"f").runCommand(null,this,l,0,r,p||g||r);return this[Bt](t,a,!!i,!1)}if(m){v(this,T,"f")&&E(!0);const s=(t=[].concat(t)).slice(t.indexOf(`--${v(this,U,"f").completionKey}`)+1);return v(this,U,"f").getCompletion(s,((t,s)=>{if(t)throw new e(t.message);(s||[]).forEach((t=>{v(this,Q,"f").log(t)})),this.exit(0)})),this[Bt](c,!a,!!i,!1)}if(v(this,J,"f")||(p?(v(this,T,"f")&&E(!0),o=!0,this.showHelp("log"),this.exit(0)):g&&(v(this,T,"f")&&E(!0),o=!0,v(this,pt,"f").showVersion("log"),this.exit(0))),!o&&v(this,et,"f").skipValidation.length>0&&(o=Object.keys(c).some((t=>v(this,et,"f").skipValidation.indexOf(t)>=0&&!0===c[t]))),!o){if(l.error)throw new e(l.error.message);if(!m){const t=this[Zt](u,{},l.error);i||(d=C(c,this,v(this,Y,"f").getMiddleware(),!0)),d=this[zt](t,null!=d?d:c),f(d)&&!i&&(d=d.then((()=>C(c,this,v(this,Y,"f").getMiddleware(),!1))))}}}catch(t){if(!(t instanceof e))throw t;v(this,pt,"f").fail(t.message,t)}return this[Bt](null!=d?d:c,a,!!i,!0)}[Zt](t,s,i,n){const r={...this.getDemandedOptions()};return o=>{if(i)throw new e(i.message);v(this,yt,"f").nonOptionCount(o),v(this,yt,"f").requiredArguments(o,r);let a=!1;v(this,dt,"f")&&(a=v(this,yt,"f").unknownCommands(o)),v(this,ft,"f")&&!a?v(this,yt,"f").unknownArguments(o,t,s,!!n):v(this,ut,"f")&&v(this,yt,"f").unknownArguments(o,t,{},!1,!1),v(this,yt,"f").limitedChoices(o),v(this,yt,"f").implications(o),v(this,yt,"f").conflicting(o)}}[Xt](){O(this,J,!0,"f")}[Qt](t){if("string"==typeof t)v(this,et,"f").key[t]=!0;else for(const e of t)v(this,et,"f").key[e]=!0}}var ee,se;const{readFileSync:ie}=require("fs"),{inspect:ne}=require("util"),{resolve:re}=require("path"),oe=require("y18n"),ae=require("yargs-parser");var he,le={assert:{notStrictEqual:t.notStrictEqual,strictEqual:t.strictEqual},cliui:require("cliui"),findUp:require("escalade/sync"),getEnv:t=>process.env[t],getCallerFile:require("get-caller-file"),getProcessArgvBin:y,inspect:ne,mainFilename:null!==(se=null===(ee=null===require||void 0===require?void 0:require.main)||void 0===ee?void 0:ee.filename)&&void 0!==se?se:process.cwd(),Parser:ae,path:require("path"),process:{argv:()=>process.argv,cwd:process.cwd,emitWarning:(t,e)=>process.emitWarning(t,e),execPath:()=>process.execPath,exit:t=>{process.exit(t)},nextTick:process.nextTick,stdColumns:void 0!==process.stdout.columns?process.stdout.columns:null},readFileSync:ie,require:require,requireDirectory:require("require-directory"),stringWidth:require("string-width"),y18n:oe({directory:re(__dirname,"../locales"),updateFiles:!1})};const ce=(null===(he=null===process||void 0===process?void 0:process.env)||void 0===he?void 0:he.YARGS_MIN_NODE_VERSION)?Number(process.env.YARGS_MIN_NODE_VERSION):12;if(process&&process.version){if(Number(process.version.match(/v([^.]+)/)[1])<ce)throw Error(`yargs supports a minimum Node.js version of ${ce}. Read our version support policy: https://github.com/yargs/yargs#supported-nodejs-versions`)}const fe=require("yargs-parser");var de,ue={applyExtends:n,cjsPlatformShim:le,Yargs:(de=le,(t=[],e=de.process.cwd(),s)=>{const i=new te(t,e,s,de);return Object.defineProperty(i,"argv",{get:()=>i.parse(),enumerable:!0}),i.help(),i.version(),i}),argsert:h,isPromise:f,objFilter:g,parseCommand:o,Parser:fe,processArgv:b,YError:e};module.exports=ue; diff --git a/node_modules/yargs/build/lib/argsert.js b/node_modules/yargs/build/lib/argsert.js deleted file mode 100644 index be5b3aa..0000000 --- a/node_modules/yargs/build/lib/argsert.js +++ /dev/null @@ -1,62 +0,0 @@ -import { YError } from './yerror.js'; -import { parseCommand } from './parse-command.js'; -const positionName = ['first', 'second', 'third', 'fourth', 'fifth', 'sixth']; -export function argsert(arg1, arg2, arg3) { - function parseArgs() { - return typeof arg1 === 'object' - ? [{ demanded: [], optional: [] }, arg1, arg2] - : [ - parseCommand(`cmd ${arg1}`), - arg2, - arg3, - ]; - } - try { - let position = 0; - const [parsed, callerArguments, _length] = parseArgs(); - const args = [].slice.call(callerArguments); - while (args.length && args[args.length - 1] === undefined) - args.pop(); - const length = _length || args.length; - if (length < parsed.demanded.length) { - throw new YError(`Not enough arguments provided. Expected ${parsed.demanded.length} but received ${args.length}.`); - } - const totalCommands = parsed.demanded.length + parsed.optional.length; - if (length > totalCommands) { - throw new YError(`Too many arguments provided. Expected max ${totalCommands} but received ${length}.`); - } - parsed.demanded.forEach(demanded => { - const arg = args.shift(); - const observedType = guessType(arg); - const matchingTypes = demanded.cmd.filter(type => type === observedType || type === '*'); - if (matchingTypes.length === 0) - argumentTypeError(observedType, demanded.cmd, position); - position += 1; - }); - parsed.optional.forEach(optional => { - if (args.length === 0) - return; - const arg = args.shift(); - const observedType = guessType(arg); - const matchingTypes = optional.cmd.filter(type => type === observedType || type === '*'); - if (matchingTypes.length === 0) - argumentTypeError(observedType, optional.cmd, position); - position += 1; - }); - } - catch (err) { - console.warn(err.stack); - } -} -function guessType(arg) { - if (Array.isArray(arg)) { - return 'array'; - } - else if (arg === null) { - return 'null'; - } - return typeof arg; -} -function argumentTypeError(observedType, allowedTypes, position) { - throw new YError(`Invalid ${positionName[position] || 'manyith'} argument. Expected ${allowedTypes.join(' or ')} but received ${observedType}.`); -} diff --git a/node_modules/yargs/build/lib/command.js b/node_modules/yargs/build/lib/command.js deleted file mode 100644 index 47c1ed6..0000000 --- a/node_modules/yargs/build/lib/command.js +++ /dev/null @@ -1,449 +0,0 @@ -import { assertNotStrictEqual, } from './typings/common-types.js'; -import { isPromise } from './utils/is-promise.js'; -import { applyMiddleware, commandMiddlewareFactory, } from './middleware.js'; -import { parseCommand } from './parse-command.js'; -import { isYargsInstance, } from './yargs-factory.js'; -import { maybeAsyncResult } from './utils/maybe-async-result.js'; -import whichModule from './utils/which-module.js'; -const DEFAULT_MARKER = /(^\*)|(^\$0)/; -export class CommandInstance { - constructor(usage, validation, globalMiddleware, shim) { - this.requireCache = new Set(); - this.handlers = {}; - this.aliasMap = {}; - this.frozens = []; - this.shim = shim; - this.usage = usage; - this.globalMiddleware = globalMiddleware; - this.validation = validation; - } - addDirectory(dir, req, callerFile, opts) { - opts = opts || {}; - if (typeof opts.recurse !== 'boolean') - opts.recurse = false; - if (!Array.isArray(opts.extensions)) - opts.extensions = ['js']; - const parentVisit = typeof opts.visit === 'function' ? opts.visit : (o) => o; - opts.visit = (obj, joined, filename) => { - const visited = parentVisit(obj, joined, filename); - if (visited) { - if (this.requireCache.has(joined)) - return visited; - else - this.requireCache.add(joined); - this.addHandler(visited); - } - return visited; - }; - this.shim.requireDirectory({ require: req, filename: callerFile }, dir, opts); - } - addHandler(cmd, description, builder, handler, commandMiddleware, deprecated) { - let aliases = []; - const middlewares = commandMiddlewareFactory(commandMiddleware); - handler = handler || (() => { }); - if (Array.isArray(cmd)) { - if (isCommandAndAliases(cmd)) { - [cmd, ...aliases] = cmd; - } - else { - for (const command of cmd) { - this.addHandler(command); - } - } - } - else if (isCommandHandlerDefinition(cmd)) { - let command = Array.isArray(cmd.command) || typeof cmd.command === 'string' - ? cmd.command - : this.moduleName(cmd); - if (cmd.aliases) - command = [].concat(command).concat(cmd.aliases); - this.addHandler(command, this.extractDesc(cmd), cmd.builder, cmd.handler, cmd.middlewares, cmd.deprecated); - return; - } - else if (isCommandBuilderDefinition(builder)) { - this.addHandler([cmd].concat(aliases), description, builder.builder, builder.handler, builder.middlewares, builder.deprecated); - return; - } - if (typeof cmd === 'string') { - const parsedCommand = parseCommand(cmd); - aliases = aliases.map(alias => parseCommand(alias).cmd); - let isDefault = false; - const parsedAliases = [parsedCommand.cmd].concat(aliases).filter(c => { - if (DEFAULT_MARKER.test(c)) { - isDefault = true; - return false; - } - return true; - }); - if (parsedAliases.length === 0 && isDefault) - parsedAliases.push('$0'); - if (isDefault) { - parsedCommand.cmd = parsedAliases[0]; - aliases = parsedAliases.slice(1); - cmd = cmd.replace(DEFAULT_MARKER, parsedCommand.cmd); - } - aliases.forEach(alias => { - this.aliasMap[alias] = parsedCommand.cmd; - }); - if (description !== false) { - this.usage.command(cmd, description, isDefault, aliases, deprecated); - } - this.handlers[parsedCommand.cmd] = { - original: cmd, - description, - handler, - builder: builder || {}, - middlewares, - deprecated, - demanded: parsedCommand.demanded, - optional: parsedCommand.optional, - }; - if (isDefault) - this.defaultCommand = this.handlers[parsedCommand.cmd]; - } - } - getCommandHandlers() { - return this.handlers; - } - getCommands() { - return Object.keys(this.handlers).concat(Object.keys(this.aliasMap)); - } - hasDefaultCommand() { - return !!this.defaultCommand; - } - runCommand(command, yargs, parsed, commandIndex, helpOnly, helpOrVersionSet) { - const commandHandler = this.handlers[command] || - this.handlers[this.aliasMap[command]] || - this.defaultCommand; - const currentContext = yargs.getInternalMethods().getContext(); - const parentCommands = currentContext.commands.slice(); - const isDefaultCommand = !command; - if (command) { - currentContext.commands.push(command); - currentContext.fullCommands.push(commandHandler.original); - } - const builderResult = this.applyBuilderUpdateUsageAndParse(isDefaultCommand, commandHandler, yargs, parsed.aliases, parentCommands, commandIndex, helpOnly, helpOrVersionSet); - return isPromise(builderResult) - ? builderResult.then(result => this.applyMiddlewareAndGetResult(isDefaultCommand, commandHandler, result.innerArgv, currentContext, helpOnly, result.aliases, yargs)) - : this.applyMiddlewareAndGetResult(isDefaultCommand, commandHandler, builderResult.innerArgv, currentContext, helpOnly, builderResult.aliases, yargs); - } - applyBuilderUpdateUsageAndParse(isDefaultCommand, commandHandler, yargs, aliases, parentCommands, commandIndex, helpOnly, helpOrVersionSet) { - const builder = commandHandler.builder; - let innerYargs = yargs; - if (isCommandBuilderCallback(builder)) { - yargs.getInternalMethods().getUsageInstance().freeze(); - const builderOutput = builder(yargs.getInternalMethods().reset(aliases), helpOrVersionSet); - if (isPromise(builderOutput)) { - return builderOutput.then(output => { - innerYargs = isYargsInstance(output) ? output : yargs; - return this.parseAndUpdateUsage(isDefaultCommand, commandHandler, innerYargs, parentCommands, commandIndex, helpOnly); - }); - } - } - else if (isCommandBuilderOptionDefinitions(builder)) { - yargs.getInternalMethods().getUsageInstance().freeze(); - innerYargs = yargs.getInternalMethods().reset(aliases); - Object.keys(commandHandler.builder).forEach(key => { - innerYargs.option(key, builder[key]); - }); - } - return this.parseAndUpdateUsage(isDefaultCommand, commandHandler, innerYargs, parentCommands, commandIndex, helpOnly); - } - parseAndUpdateUsage(isDefaultCommand, commandHandler, innerYargs, parentCommands, commandIndex, helpOnly) { - if (isDefaultCommand) - innerYargs.getInternalMethods().getUsageInstance().unfreeze(true); - if (this.shouldUpdateUsage(innerYargs)) { - innerYargs - .getInternalMethods() - .getUsageInstance() - .usage(this.usageFromParentCommandsCommandHandler(parentCommands, commandHandler), commandHandler.description); - } - const innerArgv = innerYargs - .getInternalMethods() - .runYargsParserAndExecuteCommands(null, undefined, true, commandIndex, helpOnly); - return isPromise(innerArgv) - ? innerArgv.then(argv => ({ - aliases: innerYargs.parsed.aliases, - innerArgv: argv, - })) - : { - aliases: innerYargs.parsed.aliases, - innerArgv: innerArgv, - }; - } - shouldUpdateUsage(yargs) { - return (!yargs.getInternalMethods().getUsageInstance().getUsageDisabled() && - yargs.getInternalMethods().getUsageInstance().getUsage().length === 0); - } - usageFromParentCommandsCommandHandler(parentCommands, commandHandler) { - const c = DEFAULT_MARKER.test(commandHandler.original) - ? commandHandler.original.replace(DEFAULT_MARKER, '').trim() - : commandHandler.original; - const pc = parentCommands.filter(c => { - return !DEFAULT_MARKER.test(c); - }); - pc.push(c); - return `$0 ${pc.join(' ')}`; - } - handleValidationAndGetResult(isDefaultCommand, commandHandler, innerArgv, currentContext, aliases, yargs, middlewares, positionalMap) { - if (!yargs.getInternalMethods().getHasOutput()) { - const validation = yargs - .getInternalMethods() - .runValidation(aliases, positionalMap, yargs.parsed.error, isDefaultCommand); - innerArgv = maybeAsyncResult(innerArgv, result => { - validation(result); - return result; - }); - } - if (commandHandler.handler && !yargs.getInternalMethods().getHasOutput()) { - yargs.getInternalMethods().setHasOutput(); - const populateDoubleDash = !!yargs.getOptions().configuration['populate--']; - yargs - .getInternalMethods() - .postProcess(innerArgv, populateDoubleDash, false, false); - innerArgv = applyMiddleware(innerArgv, yargs, middlewares, false); - innerArgv = maybeAsyncResult(innerArgv, result => { - const handlerResult = commandHandler.handler(result); - return isPromise(handlerResult) - ? handlerResult.then(() => result) - : result; - }); - if (!isDefaultCommand) { - yargs.getInternalMethods().getUsageInstance().cacheHelpMessage(); - } - if (isPromise(innerArgv) && - !yargs.getInternalMethods().hasParseCallback()) { - innerArgv.catch(error => { - try { - yargs.getInternalMethods().getUsageInstance().fail(null, error); - } - catch (_err) { - } - }); - } - } - if (!isDefaultCommand) { - currentContext.commands.pop(); - currentContext.fullCommands.pop(); - } - return innerArgv; - } - applyMiddlewareAndGetResult(isDefaultCommand, commandHandler, innerArgv, currentContext, helpOnly, aliases, yargs) { - let positionalMap = {}; - if (helpOnly) - return innerArgv; - if (!yargs.getInternalMethods().getHasOutput()) { - positionalMap = this.populatePositionals(commandHandler, innerArgv, currentContext, yargs); - } - const middlewares = this.globalMiddleware - .getMiddleware() - .slice(0) - .concat(commandHandler.middlewares); - const maybePromiseArgv = applyMiddleware(innerArgv, yargs, middlewares, true); - return isPromise(maybePromiseArgv) - ? maybePromiseArgv.then(resolvedInnerArgv => this.handleValidationAndGetResult(isDefaultCommand, commandHandler, resolvedInnerArgv, currentContext, aliases, yargs, middlewares, positionalMap)) - : this.handleValidationAndGetResult(isDefaultCommand, commandHandler, maybePromiseArgv, currentContext, aliases, yargs, middlewares, positionalMap); - } - populatePositionals(commandHandler, argv, context, yargs) { - argv._ = argv._.slice(context.commands.length); - const demanded = commandHandler.demanded.slice(0); - const optional = commandHandler.optional.slice(0); - const positionalMap = {}; - this.validation.positionalCount(demanded.length, argv._.length); - while (demanded.length) { - const demand = demanded.shift(); - this.populatePositional(demand, argv, positionalMap); - } - while (optional.length) { - const maybe = optional.shift(); - this.populatePositional(maybe, argv, positionalMap); - } - argv._ = context.commands.concat(argv._.map(a => '' + a)); - this.postProcessPositionals(argv, positionalMap, this.cmdToParseOptions(commandHandler.original), yargs); - return positionalMap; - } - populatePositional(positional, argv, positionalMap) { - const cmd = positional.cmd[0]; - if (positional.variadic) { - positionalMap[cmd] = argv._.splice(0).map(String); - } - else { - if (argv._.length) - positionalMap[cmd] = [String(argv._.shift())]; - } - } - cmdToParseOptions(cmdString) { - const parseOptions = { - array: [], - default: {}, - alias: {}, - demand: {}, - }; - const parsed = parseCommand(cmdString); - parsed.demanded.forEach(d => { - const [cmd, ...aliases] = d.cmd; - if (d.variadic) { - parseOptions.array.push(cmd); - parseOptions.default[cmd] = []; - } - parseOptions.alias[cmd] = aliases; - parseOptions.demand[cmd] = true; - }); - parsed.optional.forEach(o => { - const [cmd, ...aliases] = o.cmd; - if (o.variadic) { - parseOptions.array.push(cmd); - parseOptions.default[cmd] = []; - } - parseOptions.alias[cmd] = aliases; - }); - return parseOptions; - } - postProcessPositionals(argv, positionalMap, parseOptions, yargs) { - const options = Object.assign({}, yargs.getOptions()); - options.default = Object.assign(parseOptions.default, options.default); - for (const key of Object.keys(parseOptions.alias)) { - options.alias[key] = (options.alias[key] || []).concat(parseOptions.alias[key]); - } - options.array = options.array.concat(parseOptions.array); - options.config = {}; - const unparsed = []; - Object.keys(positionalMap).forEach(key => { - positionalMap[key].map(value => { - if (options.configuration['unknown-options-as-args']) - options.key[key] = true; - unparsed.push(`--${key}`); - unparsed.push(value); - }); - }); - if (!unparsed.length) - return; - const config = Object.assign({}, options.configuration, { - 'populate--': false, - }); - const parsed = this.shim.Parser.detailed(unparsed, Object.assign({}, options, { - configuration: config, - })); - if (parsed.error) { - yargs - .getInternalMethods() - .getUsageInstance() - .fail(parsed.error.message, parsed.error); - } - else { - const positionalKeys = Object.keys(positionalMap); - Object.keys(positionalMap).forEach(key => { - positionalKeys.push(...parsed.aliases[key]); - }); - Object.keys(parsed.argv).forEach(key => { - if (positionalKeys.includes(key)) { - if (!positionalMap[key]) - positionalMap[key] = parsed.argv[key]; - if (!this.isInConfigs(yargs, key) && - !this.isDefaulted(yargs, key) && - Object.prototype.hasOwnProperty.call(argv, key) && - Object.prototype.hasOwnProperty.call(parsed.argv, key) && - (Array.isArray(argv[key]) || Array.isArray(parsed.argv[key]))) { - argv[key] = [].concat(argv[key], parsed.argv[key]); - } - else { - argv[key] = parsed.argv[key]; - } - } - }); - } - } - isDefaulted(yargs, key) { - const { default: defaults } = yargs.getOptions(); - return (Object.prototype.hasOwnProperty.call(defaults, key) || - Object.prototype.hasOwnProperty.call(defaults, this.shim.Parser.camelCase(key))); - } - isInConfigs(yargs, key) { - const { configObjects } = yargs.getOptions(); - return (configObjects.some(c => Object.prototype.hasOwnProperty.call(c, key)) || - configObjects.some(c => Object.prototype.hasOwnProperty.call(c, this.shim.Parser.camelCase(key)))); - } - runDefaultBuilderOn(yargs) { - if (!this.defaultCommand) - return; - if (this.shouldUpdateUsage(yargs)) { - const commandString = DEFAULT_MARKER.test(this.defaultCommand.original) - ? this.defaultCommand.original - : this.defaultCommand.original.replace(/^[^[\]<>]*/, '$0 '); - yargs - .getInternalMethods() - .getUsageInstance() - .usage(commandString, this.defaultCommand.description); - } - const builder = this.defaultCommand.builder; - if (isCommandBuilderCallback(builder)) { - return builder(yargs, true); - } - else if (!isCommandBuilderDefinition(builder)) { - Object.keys(builder).forEach(key => { - yargs.option(key, builder[key]); - }); - } - return undefined; - } - moduleName(obj) { - const mod = whichModule(obj); - if (!mod) - throw new Error(`No command name given for module: ${this.shim.inspect(obj)}`); - return this.commandFromFilename(mod.filename); - } - commandFromFilename(filename) { - return this.shim.path.basename(filename, this.shim.path.extname(filename)); - } - extractDesc({ describe, description, desc }) { - for (const test of [describe, description, desc]) { - if (typeof test === 'string' || test === false) - return test; - assertNotStrictEqual(test, true, this.shim); - } - return false; - } - freeze() { - this.frozens.push({ - handlers: this.handlers, - aliasMap: this.aliasMap, - defaultCommand: this.defaultCommand, - }); - } - unfreeze() { - const frozen = this.frozens.pop(); - assertNotStrictEqual(frozen, undefined, this.shim); - ({ - handlers: this.handlers, - aliasMap: this.aliasMap, - defaultCommand: this.defaultCommand, - } = frozen); - } - reset() { - this.handlers = {}; - this.aliasMap = {}; - this.defaultCommand = undefined; - this.requireCache = new Set(); - return this; - } -} -export function command(usage, validation, globalMiddleware, shim) { - return new CommandInstance(usage, validation, globalMiddleware, shim); -} -export function isCommandBuilderDefinition(builder) { - return (typeof builder === 'object' && - !!builder.builder && - typeof builder.handler === 'function'); -} -function isCommandAndAliases(cmd) { - return cmd.every(c => typeof c === 'string'); -} -export function isCommandBuilderCallback(builder) { - return typeof builder === 'function'; -} -function isCommandBuilderOptionDefinitions(builder) { - return typeof builder === 'object'; -} -export function isCommandHandlerDefinition(cmd) { - return typeof cmd === 'object' && !Array.isArray(cmd); -} diff --git a/node_modules/yargs/build/lib/completion-templates.js b/node_modules/yargs/build/lib/completion-templates.js deleted file mode 100644 index 2c4dcb5..0000000 --- a/node_modules/yargs/build/lib/completion-templates.js +++ /dev/null @@ -1,48 +0,0 @@ -export const completionShTemplate = `###-begin-{{app_name}}-completions-### -# -# yargs command completion script -# -# Installation: {{app_path}} {{completion_command}} >> ~/.bashrc -# or {{app_path}} {{completion_command}} >> ~/.bash_profile on OSX. -# -_{{app_name}}_yargs_completions() -{ - local cur_word args type_list - - cur_word="\${COMP_WORDS[COMP_CWORD]}" - args=("\${COMP_WORDS[@]}") - - # ask yargs to generate completions. - type_list=$({{app_path}} --get-yargs-completions "\${args[@]}") - - COMPREPLY=( $(compgen -W "\${type_list}" -- \${cur_word}) ) - - # if no match was found, fall back to filename completion - if [ \${#COMPREPLY[@]} -eq 0 ]; then - COMPREPLY=() - fi - - return 0 -} -complete -o bashdefault -o default -F _{{app_name}}_yargs_completions {{app_name}} -###-end-{{app_name}}-completions-### -`; -export const completionZshTemplate = `#compdef {{app_name}} -###-begin-{{app_name}}-completions-### -# -# yargs command completion script -# -# Installation: {{app_path}} {{completion_command}} >> ~/.zshrc -# or {{app_path}} {{completion_command}} >> ~/.zprofile on OSX. -# -_{{app_name}}_yargs_completions() -{ - local reply - local si=$IFS - IFS=$'\n' reply=($(COMP_CWORD="$((CURRENT-1))" COMP_LINE="$BUFFER" COMP_POINT="$CURSOR" {{app_path}} --get-yargs-completions "\${words[@]}")) - IFS=$si - _describe 'values' reply -} -compdef _{{app_name}}_yargs_completions {{app_name}} -###-end-{{app_name}}-completions-### -`; diff --git a/node_modules/yargs/build/lib/completion.js b/node_modules/yargs/build/lib/completion.js deleted file mode 100644 index cef2bbe..0000000 --- a/node_modules/yargs/build/lib/completion.js +++ /dev/null @@ -1,243 +0,0 @@ -import { isCommandBuilderCallback } from './command.js'; -import { assertNotStrictEqual } from './typings/common-types.js'; -import * as templates from './completion-templates.js'; -import { isPromise } from './utils/is-promise.js'; -import { parseCommand } from './parse-command.js'; -export class Completion { - constructor(yargs, usage, command, shim) { - var _a, _b, _c; - this.yargs = yargs; - this.usage = usage; - this.command = command; - this.shim = shim; - this.completionKey = 'get-yargs-completions'; - this.aliases = null; - this.customCompletionFunction = null; - this.indexAfterLastReset = 0; - this.zshShell = - (_c = (((_a = this.shim.getEnv('SHELL')) === null || _a === void 0 ? void 0 : _a.includes('zsh')) || - ((_b = this.shim.getEnv('ZSH_NAME')) === null || _b === void 0 ? void 0 : _b.includes('zsh')))) !== null && _c !== void 0 ? _c : false; - } - defaultCompletion(args, argv, current, done) { - const handlers = this.command.getCommandHandlers(); - for (let i = 0, ii = args.length; i < ii; ++i) { - if (handlers[args[i]] && handlers[args[i]].builder) { - const builder = handlers[args[i]].builder; - if (isCommandBuilderCallback(builder)) { - this.indexAfterLastReset = i + 1; - const y = this.yargs.getInternalMethods().reset(); - builder(y, true); - return y.argv; - } - } - } - const completions = []; - this.commandCompletions(completions, args, current); - this.optionCompletions(completions, args, argv, current); - this.choicesFromOptionsCompletions(completions, args, argv, current); - this.choicesFromPositionalsCompletions(completions, args, argv, current); - done(null, completions); - } - commandCompletions(completions, args, current) { - const parentCommands = this.yargs - .getInternalMethods() - .getContext().commands; - if (!current.match(/^-/) && - parentCommands[parentCommands.length - 1] !== current && - !this.previousArgHasChoices(args)) { - this.usage.getCommands().forEach(usageCommand => { - const commandName = parseCommand(usageCommand[0]).cmd; - if (args.indexOf(commandName) === -1) { - if (!this.zshShell) { - completions.push(commandName); - } - else { - const desc = usageCommand[1] || ''; - completions.push(commandName.replace(/:/g, '\\:') + ':' + desc); - } - } - }); - } - } - optionCompletions(completions, args, argv, current) { - if ((current.match(/^-/) || (current === '' && completions.length === 0)) && - !this.previousArgHasChoices(args)) { - const options = this.yargs.getOptions(); - const positionalKeys = this.yargs.getGroups()[this.usage.getPositionalGroupName()] || []; - Object.keys(options.key).forEach(key => { - const negable = !!options.configuration['boolean-negation'] && - options.boolean.includes(key); - const isPositionalKey = positionalKeys.includes(key); - if (!isPositionalKey && - !options.hiddenOptions.includes(key) && - !this.argsContainKey(args, key, negable)) { - this.completeOptionKey(key, completions, current, negable && !!options.default[key]); - } - }); - } - } - choicesFromOptionsCompletions(completions, args, argv, current) { - if (this.previousArgHasChoices(args)) { - const choices = this.getPreviousArgChoices(args); - if (choices && choices.length > 0) { - completions.push(...choices.map(c => c.replace(/:/g, '\\:'))); - } - } - } - choicesFromPositionalsCompletions(completions, args, argv, current) { - if (current === '' && - completions.length > 0 && - this.previousArgHasChoices(args)) { - return; - } - const positionalKeys = this.yargs.getGroups()[this.usage.getPositionalGroupName()] || []; - const offset = Math.max(this.indexAfterLastReset, this.yargs.getInternalMethods().getContext().commands.length + - 1); - const positionalKey = positionalKeys[argv._.length - offset - 1]; - if (!positionalKey) { - return; - } - const choices = this.yargs.getOptions().choices[positionalKey] || []; - for (const choice of choices) { - if (choice.startsWith(current)) { - completions.push(choice.replace(/:/g, '\\:')); - } - } - } - getPreviousArgChoices(args) { - if (args.length < 1) - return; - let previousArg = args[args.length - 1]; - let filter = ''; - if (!previousArg.startsWith('-') && args.length > 1) { - filter = previousArg; - previousArg = args[args.length - 2]; - } - if (!previousArg.startsWith('-')) - return; - const previousArgKey = previousArg.replace(/^-+/, ''); - const options = this.yargs.getOptions(); - const possibleAliases = [ - previousArgKey, - ...(this.yargs.getAliases()[previousArgKey] || []), - ]; - let choices; - for (const possibleAlias of possibleAliases) { - if (Object.prototype.hasOwnProperty.call(options.key, possibleAlias) && - Array.isArray(options.choices[possibleAlias])) { - choices = options.choices[possibleAlias]; - break; - } - } - if (choices) { - return choices.filter(choice => !filter || choice.startsWith(filter)); - } - } - previousArgHasChoices(args) { - const choices = this.getPreviousArgChoices(args); - return choices !== undefined && choices.length > 0; - } - argsContainKey(args, key, negable) { - const argsContains = (s) => args.indexOf((/^[^0-9]$/.test(s) ? '-' : '--') + s) !== -1; - if (argsContains(key)) - return true; - if (negable && argsContains(`no-${key}`)) - return true; - if (this.aliases) { - for (const alias of this.aliases[key]) { - if (argsContains(alias)) - return true; - } - } - return false; - } - completeOptionKey(key, completions, current, negable) { - var _a, _b, _c, _d; - let keyWithDesc = key; - if (this.zshShell) { - const descs = this.usage.getDescriptions(); - const aliasKey = (_b = (_a = this === null || this === void 0 ? void 0 : this.aliases) === null || _a === void 0 ? void 0 : _a[key]) === null || _b === void 0 ? void 0 : _b.find(alias => { - const desc = descs[alias]; - return typeof desc === 'string' && desc.length > 0; - }); - const descFromAlias = aliasKey ? descs[aliasKey] : undefined; - const desc = (_d = (_c = descs[key]) !== null && _c !== void 0 ? _c : descFromAlias) !== null && _d !== void 0 ? _d : ''; - keyWithDesc = `${key.replace(/:/g, '\\:')}:${desc - .replace('__yargsString__:', '') - .replace(/(\r\n|\n|\r)/gm, ' ')}`; - } - const startsByTwoDashes = (s) => /^--/.test(s); - const isShortOption = (s) => /^[^0-9]$/.test(s); - const dashes = !startsByTwoDashes(current) && isShortOption(key) ? '-' : '--'; - completions.push(dashes + keyWithDesc); - if (negable) { - completions.push(dashes + 'no-' + keyWithDesc); - } - } - customCompletion(args, argv, current, done) { - assertNotStrictEqual(this.customCompletionFunction, null, this.shim); - if (isSyncCompletionFunction(this.customCompletionFunction)) { - const result = this.customCompletionFunction(current, argv); - if (isPromise(result)) { - return result - .then(list => { - this.shim.process.nextTick(() => { - done(null, list); - }); - }) - .catch(err => { - this.shim.process.nextTick(() => { - done(err, undefined); - }); - }); - } - return done(null, result); - } - else if (isFallbackCompletionFunction(this.customCompletionFunction)) { - return this.customCompletionFunction(current, argv, (onCompleted = done) => this.defaultCompletion(args, argv, current, onCompleted), completions => { - done(null, completions); - }); - } - else { - return this.customCompletionFunction(current, argv, completions => { - done(null, completions); - }); - } - } - getCompletion(args, done) { - const current = args.length ? args[args.length - 1] : ''; - const argv = this.yargs.parse(args, true); - const completionFunction = this.customCompletionFunction - ? (argv) => this.customCompletion(args, argv, current, done) - : (argv) => this.defaultCompletion(args, argv, current, done); - return isPromise(argv) - ? argv.then(completionFunction) - : completionFunction(argv); - } - generateCompletionScript($0, cmd) { - let script = this.zshShell - ? templates.completionZshTemplate - : templates.completionShTemplate; - const name = this.shim.path.basename($0); - if ($0.match(/\.js$/)) - $0 = `./${$0}`; - script = script.replace(/{{app_name}}/g, name); - script = script.replace(/{{completion_command}}/g, cmd); - return script.replace(/{{app_path}}/g, $0); - } - registerFunction(fn) { - this.customCompletionFunction = fn; - } - setParsed(parsed) { - this.aliases = parsed.aliases; - } -} -export function completion(yargs, usage, command, shim) { - return new Completion(yargs, usage, command, shim); -} -function isSyncCompletionFunction(completionFunction) { - return completionFunction.length < 3; -} -function isFallbackCompletionFunction(completionFunction) { - return completionFunction.length > 3; -} diff --git a/node_modules/yargs/build/lib/middleware.js b/node_modules/yargs/build/lib/middleware.js deleted file mode 100644 index 4e561a7..0000000 --- a/node_modules/yargs/build/lib/middleware.js +++ /dev/null @@ -1,88 +0,0 @@ -import { argsert } from './argsert.js'; -import { isPromise } from './utils/is-promise.js'; -export class GlobalMiddleware { - constructor(yargs) { - this.globalMiddleware = []; - this.frozens = []; - this.yargs = yargs; - } - addMiddleware(callback, applyBeforeValidation, global = true, mutates = false) { - argsert('<array|function> [boolean] [boolean] [boolean]', [callback, applyBeforeValidation, global], arguments.length); - if (Array.isArray(callback)) { - for (let i = 0; i < callback.length; i++) { - if (typeof callback[i] !== 'function') { - throw Error('middleware must be a function'); - } - const m = callback[i]; - m.applyBeforeValidation = applyBeforeValidation; - m.global = global; - } - Array.prototype.push.apply(this.globalMiddleware, callback); - } - else if (typeof callback === 'function') { - const m = callback; - m.applyBeforeValidation = applyBeforeValidation; - m.global = global; - m.mutates = mutates; - this.globalMiddleware.push(callback); - } - return this.yargs; - } - addCoerceMiddleware(callback, option) { - const aliases = this.yargs.getAliases(); - this.globalMiddleware = this.globalMiddleware.filter(m => { - const toCheck = [...(aliases[option] || []), option]; - if (!m.option) - return true; - else - return !toCheck.includes(m.option); - }); - callback.option = option; - return this.addMiddleware(callback, true, true, true); - } - getMiddleware() { - return this.globalMiddleware; - } - freeze() { - this.frozens.push([...this.globalMiddleware]); - } - unfreeze() { - const frozen = this.frozens.pop(); - if (frozen !== undefined) - this.globalMiddleware = frozen; - } - reset() { - this.globalMiddleware = this.globalMiddleware.filter(m => m.global); - } -} -export function commandMiddlewareFactory(commandMiddleware) { - if (!commandMiddleware) - return []; - return commandMiddleware.map(middleware => { - middleware.applyBeforeValidation = false; - return middleware; - }); -} -export function applyMiddleware(argv, yargs, middlewares, beforeValidation) { - return middlewares.reduce((acc, middleware) => { - if (middleware.applyBeforeValidation !== beforeValidation) { - return acc; - } - if (middleware.mutates) { - if (middleware.applied) - return acc; - middleware.applied = true; - } - if (isPromise(acc)) { - return acc - .then(initialObj => Promise.all([initialObj, middleware(initialObj, yargs)])) - .then(([initialObj, middlewareObj]) => Object.assign(initialObj, middlewareObj)); - } - else { - const result = middleware(acc, yargs); - return isPromise(result) - ? result.then(middlewareObj => Object.assign(acc, middlewareObj)) - : Object.assign(acc, result); - } - }, argv); -} diff --git a/node_modules/yargs/build/lib/parse-command.js b/node_modules/yargs/build/lib/parse-command.js deleted file mode 100644 index 4989f53..0000000 --- a/node_modules/yargs/build/lib/parse-command.js +++ /dev/null @@ -1,32 +0,0 @@ -export function parseCommand(cmd) { - const extraSpacesStrippedCommand = cmd.replace(/\s{2,}/g, ' '); - const splitCommand = extraSpacesStrippedCommand.split(/\s+(?![^[]*]|[^<]*>)/); - const bregex = /\.*[\][<>]/g; - const firstCommand = splitCommand.shift(); - if (!firstCommand) - throw new Error(`No command found in: ${cmd}`); - const parsedCommand = { - cmd: firstCommand.replace(bregex, ''), - demanded: [], - optional: [], - }; - splitCommand.forEach((cmd, i) => { - let variadic = false; - cmd = cmd.replace(/\s/g, ''); - if (/\.+[\]>]/.test(cmd) && i === splitCommand.length - 1) - variadic = true; - if (/^\[/.test(cmd)) { - parsedCommand.optional.push({ - cmd: cmd.replace(bregex, '').split('|'), - variadic, - }); - } - else { - parsedCommand.demanded.push({ - cmd: cmd.replace(bregex, '').split('|'), - variadic, - }); - } - }); - return parsedCommand; -} diff --git a/node_modules/yargs/build/lib/typings/common-types.js b/node_modules/yargs/build/lib/typings/common-types.js deleted file mode 100644 index 73e1773..0000000 --- a/node_modules/yargs/build/lib/typings/common-types.js +++ /dev/null @@ -1,9 +0,0 @@ -export function assertNotStrictEqual(actual, expected, shim, message) { - shim.assert.notStrictEqual(actual, expected, message); -} -export function assertSingleKey(actual, shim) { - shim.assert.strictEqual(typeof actual, 'string'); -} -export function objectKeys(object) { - return Object.keys(object); -} diff --git a/node_modules/yargs/build/lib/typings/yargs-parser-types.js b/node_modules/yargs/build/lib/typings/yargs-parser-types.js deleted file mode 100644 index cb0ff5c..0000000 --- a/node_modules/yargs/build/lib/typings/yargs-parser-types.js +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/node_modules/yargs/build/lib/usage.js b/node_modules/yargs/build/lib/usage.js deleted file mode 100644 index 0127c13..0000000 --- a/node_modules/yargs/build/lib/usage.js +++ /dev/null @@ -1,584 +0,0 @@ -import { objFilter } from './utils/obj-filter.js'; -import { YError } from './yerror.js'; -import setBlocking from './utils/set-blocking.js'; -function isBoolean(fail) { - return typeof fail === 'boolean'; -} -export function usage(yargs, shim) { - const __ = shim.y18n.__; - const self = {}; - const fails = []; - self.failFn = function failFn(f) { - fails.push(f); - }; - let failMessage = null; - let globalFailMessage = null; - let showHelpOnFail = true; - self.showHelpOnFail = function showHelpOnFailFn(arg1 = true, arg2) { - const [enabled, message] = typeof arg1 === 'string' ? [true, arg1] : [arg1, arg2]; - if (yargs.getInternalMethods().isGlobalContext()) { - globalFailMessage = message; - } - failMessage = message; - showHelpOnFail = enabled; - return self; - }; - let failureOutput = false; - self.fail = function fail(msg, err) { - const logger = yargs.getInternalMethods().getLoggerInstance(); - if (fails.length) { - for (let i = fails.length - 1; i >= 0; --i) { - const fail = fails[i]; - if (isBoolean(fail)) { - if (err) - throw err; - else if (msg) - throw Error(msg); - } - else { - fail(msg, err, self); - } - } - } - else { - if (yargs.getExitProcess()) - setBlocking(true); - if (!failureOutput) { - failureOutput = true; - if (showHelpOnFail) { - yargs.showHelp('error'); - logger.error(); - } - if (msg || err) - logger.error(msg || err); - const globalOrCommandFailMessage = failMessage || globalFailMessage; - if (globalOrCommandFailMessage) { - if (msg || err) - logger.error(''); - logger.error(globalOrCommandFailMessage); - } - } - err = err || new YError(msg); - if (yargs.getExitProcess()) { - return yargs.exit(1); - } - else if (yargs.getInternalMethods().hasParseCallback()) { - return yargs.exit(1, err); - } - else { - throw err; - } - } - }; - let usages = []; - let usageDisabled = false; - self.usage = (msg, description) => { - if (msg === null) { - usageDisabled = true; - usages = []; - return self; - } - usageDisabled = false; - usages.push([msg, description || '']); - return self; - }; - self.getUsage = () => { - return usages; - }; - self.getUsageDisabled = () => { - return usageDisabled; - }; - self.getPositionalGroupName = () => { - return __('Positionals:'); - }; - let examples = []; - self.example = (cmd, description) => { - examples.push([cmd, description || '']); - }; - let commands = []; - self.command = function command(cmd, description, isDefault, aliases, deprecated = false) { - if (isDefault) { - commands = commands.map(cmdArray => { - cmdArray[2] = false; - return cmdArray; - }); - } - commands.push([cmd, description || '', isDefault, aliases, deprecated]); - }; - self.getCommands = () => commands; - let descriptions = {}; - self.describe = function describe(keyOrKeys, desc) { - if (Array.isArray(keyOrKeys)) { - keyOrKeys.forEach(k => { - self.describe(k, desc); - }); - } - else if (typeof keyOrKeys === 'object') { - Object.keys(keyOrKeys).forEach(k => { - self.describe(k, keyOrKeys[k]); - }); - } - else { - descriptions[keyOrKeys] = desc; - } - }; - self.getDescriptions = () => descriptions; - let epilogs = []; - self.epilog = msg => { - epilogs.push(msg); - }; - let wrapSet = false; - let wrap; - self.wrap = cols => { - wrapSet = true; - wrap = cols; - }; - self.getWrap = () => { - if (shim.getEnv('YARGS_DISABLE_WRAP')) { - return null; - } - if (!wrapSet) { - wrap = windowWidth(); - wrapSet = true; - } - return wrap; - }; - const deferY18nLookupPrefix = '__yargsString__:'; - self.deferY18nLookup = str => deferY18nLookupPrefix + str; - self.help = function help() { - if (cachedHelpMessage) - return cachedHelpMessage; - normalizeAliases(); - const base$0 = yargs.customScriptName - ? yargs.$0 - : shim.path.basename(yargs.$0); - const demandedOptions = yargs.getDemandedOptions(); - const demandedCommands = yargs.getDemandedCommands(); - const deprecatedOptions = yargs.getDeprecatedOptions(); - const groups = yargs.getGroups(); - const options = yargs.getOptions(); - let keys = []; - keys = keys.concat(Object.keys(descriptions)); - keys = keys.concat(Object.keys(demandedOptions)); - keys = keys.concat(Object.keys(demandedCommands)); - keys = keys.concat(Object.keys(options.default)); - keys = keys.filter(filterHiddenOptions); - keys = Object.keys(keys.reduce((acc, key) => { - if (key !== '_') - acc[key] = true; - return acc; - }, {})); - const theWrap = self.getWrap(); - const ui = shim.cliui({ - width: theWrap, - wrap: !!theWrap, - }); - if (!usageDisabled) { - if (usages.length) { - usages.forEach(usage => { - ui.div({ text: `${usage[0].replace(/\$0/g, base$0)}` }); - if (usage[1]) { - ui.div({ text: `${usage[1]}`, padding: [1, 0, 0, 0] }); - } - }); - ui.div(); - } - else if (commands.length) { - let u = null; - if (demandedCommands._) { - u = `${base$0} <${__('command')}>\n`; - } - else { - u = `${base$0} [${__('command')}]\n`; - } - ui.div(`${u}`); - } - } - if (commands.length > 1 || (commands.length === 1 && !commands[0][2])) { - ui.div(__('Commands:')); - const context = yargs.getInternalMethods().getContext(); - const parentCommands = context.commands.length - ? `${context.commands.join(' ')} ` - : ''; - if (yargs.getInternalMethods().getParserConfiguration()['sort-commands'] === - true) { - commands = commands.sort((a, b) => a[0].localeCompare(b[0])); - } - const prefix = base$0 ? `${base$0} ` : ''; - commands.forEach(command => { - const commandString = `${prefix}${parentCommands}${command[0].replace(/^\$0 ?/, '')}`; - ui.span({ - text: commandString, - padding: [0, 2, 0, 2], - width: maxWidth(commands, theWrap, `${base$0}${parentCommands}`) + 4, - }, { text: command[1] }); - const hints = []; - if (command[2]) - hints.push(`[${__('default')}]`); - if (command[3] && command[3].length) { - hints.push(`[${__('aliases:')} ${command[3].join(', ')}]`); - } - if (command[4]) { - if (typeof command[4] === 'string') { - hints.push(`[${__('deprecated: %s', command[4])}]`); - } - else { - hints.push(`[${__('deprecated')}]`); - } - } - if (hints.length) { - ui.div({ - text: hints.join(' '), - padding: [0, 0, 0, 2], - align: 'right', - }); - } - else { - ui.div(); - } - }); - ui.div(); - } - const aliasKeys = (Object.keys(options.alias) || []).concat(Object.keys(yargs.parsed.newAliases) || []); - keys = keys.filter(key => !yargs.parsed.newAliases[key] && - aliasKeys.every(alias => (options.alias[alias] || []).indexOf(key) === -1)); - const defaultGroup = __('Options:'); - if (!groups[defaultGroup]) - groups[defaultGroup] = []; - addUngroupedKeys(keys, options.alias, groups, defaultGroup); - const isLongSwitch = (sw) => /^--/.test(getText(sw)); - const displayedGroups = Object.keys(groups) - .filter(groupName => groups[groupName].length > 0) - .map(groupName => { - const normalizedKeys = groups[groupName] - .filter(filterHiddenOptions) - .map(key => { - if (aliasKeys.includes(key)) - return key; - for (let i = 0, aliasKey; (aliasKey = aliasKeys[i]) !== undefined; i++) { - if ((options.alias[aliasKey] || []).includes(key)) - return aliasKey; - } - return key; - }); - return { groupName, normalizedKeys }; - }) - .filter(({ normalizedKeys }) => normalizedKeys.length > 0) - .map(({ groupName, normalizedKeys }) => { - const switches = normalizedKeys.reduce((acc, key) => { - acc[key] = [key] - .concat(options.alias[key] || []) - .map(sw => { - if (groupName === self.getPositionalGroupName()) - return sw; - else { - return ((/^[0-9]$/.test(sw) - ? options.boolean.includes(key) - ? '-' - : '--' - : sw.length > 1 - ? '--' - : '-') + sw); - } - }) - .sort((sw1, sw2) => isLongSwitch(sw1) === isLongSwitch(sw2) - ? 0 - : isLongSwitch(sw1) - ? 1 - : -1) - .join(', '); - return acc; - }, {}); - return { groupName, normalizedKeys, switches }; - }); - const shortSwitchesUsed = displayedGroups - .filter(({ groupName }) => groupName !== self.getPositionalGroupName()) - .some(({ normalizedKeys, switches }) => !normalizedKeys.every(key => isLongSwitch(switches[key]))); - if (shortSwitchesUsed) { - displayedGroups - .filter(({ groupName }) => groupName !== self.getPositionalGroupName()) - .forEach(({ normalizedKeys, switches }) => { - normalizedKeys.forEach(key => { - if (isLongSwitch(switches[key])) { - switches[key] = addIndentation(switches[key], '-x, '.length); - } - }); - }); - } - displayedGroups.forEach(({ groupName, normalizedKeys, switches }) => { - ui.div(groupName); - normalizedKeys.forEach(key => { - const kswitch = switches[key]; - let desc = descriptions[key] || ''; - let type = null; - if (desc.includes(deferY18nLookupPrefix)) - desc = __(desc.substring(deferY18nLookupPrefix.length)); - if (options.boolean.includes(key)) - type = `[${__('boolean')}]`; - if (options.count.includes(key)) - type = `[${__('count')}]`; - if (options.string.includes(key)) - type = `[${__('string')}]`; - if (options.normalize.includes(key)) - type = `[${__('string')}]`; - if (options.array.includes(key)) - type = `[${__('array')}]`; - if (options.number.includes(key)) - type = `[${__('number')}]`; - const deprecatedExtra = (deprecated) => typeof deprecated === 'string' - ? `[${__('deprecated: %s', deprecated)}]` - : `[${__('deprecated')}]`; - const extra = [ - key in deprecatedOptions - ? deprecatedExtra(deprecatedOptions[key]) - : null, - type, - key in demandedOptions ? `[${__('required')}]` : null, - options.choices && options.choices[key] - ? `[${__('choices:')} ${self.stringifiedValues(options.choices[key])}]` - : null, - defaultString(options.default[key], options.defaultDescription[key]), - ] - .filter(Boolean) - .join(' '); - ui.span({ - text: getText(kswitch), - padding: [0, 2, 0, 2 + getIndentation(kswitch)], - width: maxWidth(switches, theWrap) + 4, - }, desc); - const shouldHideOptionExtras = yargs.getInternalMethods().getUsageConfiguration()['hide-types'] === - true; - if (extra && !shouldHideOptionExtras) - ui.div({ text: extra, padding: [0, 0, 0, 2], align: 'right' }); - else - ui.div(); - }); - ui.div(); - }); - if (examples.length) { - ui.div(__('Examples:')); - examples.forEach(example => { - example[0] = example[0].replace(/\$0/g, base$0); - }); - examples.forEach(example => { - if (example[1] === '') { - ui.div({ - text: example[0], - padding: [0, 2, 0, 2], - }); - } - else { - ui.div({ - text: example[0], - padding: [0, 2, 0, 2], - width: maxWidth(examples, theWrap) + 4, - }, { - text: example[1], - }); - } - }); - ui.div(); - } - if (epilogs.length > 0) { - const e = epilogs - .map(epilog => epilog.replace(/\$0/g, base$0)) - .join('\n'); - ui.div(`${e}\n`); - } - return ui.toString().replace(/\s*$/, ''); - }; - function maxWidth(table, theWrap, modifier) { - let width = 0; - if (!Array.isArray(table)) { - table = Object.values(table).map(v => [v]); - } - table.forEach(v => { - width = Math.max(shim.stringWidth(modifier ? `${modifier} ${getText(v[0])}` : getText(v[0])) + getIndentation(v[0]), width); - }); - if (theWrap) - width = Math.min(width, parseInt((theWrap * 0.5).toString(), 10)); - return width; - } - function normalizeAliases() { - const demandedOptions = yargs.getDemandedOptions(); - const options = yargs.getOptions(); - (Object.keys(options.alias) || []).forEach(key => { - options.alias[key].forEach(alias => { - if (descriptions[alias]) - self.describe(key, descriptions[alias]); - if (alias in demandedOptions) - yargs.demandOption(key, demandedOptions[alias]); - if (options.boolean.includes(alias)) - yargs.boolean(key); - if (options.count.includes(alias)) - yargs.count(key); - if (options.string.includes(alias)) - yargs.string(key); - if (options.normalize.includes(alias)) - yargs.normalize(key); - if (options.array.includes(alias)) - yargs.array(key); - if (options.number.includes(alias)) - yargs.number(key); - }); - }); - } - let cachedHelpMessage; - self.cacheHelpMessage = function () { - cachedHelpMessage = this.help(); - }; - self.clearCachedHelpMessage = function () { - cachedHelpMessage = undefined; - }; - self.hasCachedHelpMessage = function () { - return !!cachedHelpMessage; - }; - function addUngroupedKeys(keys, aliases, groups, defaultGroup) { - let groupedKeys = []; - let toCheck = null; - Object.keys(groups).forEach(group => { - groupedKeys = groupedKeys.concat(groups[group]); - }); - keys.forEach(key => { - toCheck = [key].concat(aliases[key]); - if (!toCheck.some(k => groupedKeys.indexOf(k) !== -1)) { - groups[defaultGroup].push(key); - } - }); - return groupedKeys; - } - function filterHiddenOptions(key) { - return (yargs.getOptions().hiddenOptions.indexOf(key) < 0 || - yargs.parsed.argv[yargs.getOptions().showHiddenOpt]); - } - self.showHelp = (level) => { - const logger = yargs.getInternalMethods().getLoggerInstance(); - if (!level) - level = 'error'; - const emit = typeof level === 'function' ? level : logger[level]; - emit(self.help()); - }; - self.functionDescription = fn => { - const description = fn.name - ? shim.Parser.decamelize(fn.name, '-') - : __('generated-value'); - return ['(', description, ')'].join(''); - }; - self.stringifiedValues = function stringifiedValues(values, separator) { - let string = ''; - const sep = separator || ', '; - const array = [].concat(values); - if (!values || !array.length) - return string; - array.forEach(value => { - if (string.length) - string += sep; - string += JSON.stringify(value); - }); - return string; - }; - function defaultString(value, defaultDescription) { - let string = `[${__('default:')} `; - if (value === undefined && !defaultDescription) - return null; - if (defaultDescription) { - string += defaultDescription; - } - else { - switch (typeof value) { - case 'string': - string += `"${value}"`; - break; - case 'object': - string += JSON.stringify(value); - break; - default: - string += value; - } - } - return `${string}]`; - } - function windowWidth() { - const maxWidth = 80; - if (shim.process.stdColumns) { - return Math.min(maxWidth, shim.process.stdColumns); - } - else { - return maxWidth; - } - } - let version = null; - self.version = ver => { - version = ver; - }; - self.showVersion = level => { - const logger = yargs.getInternalMethods().getLoggerInstance(); - if (!level) - level = 'error'; - const emit = typeof level === 'function' ? level : logger[level]; - emit(version); - }; - self.reset = function reset(localLookup) { - failMessage = null; - failureOutput = false; - usages = []; - usageDisabled = false; - epilogs = []; - examples = []; - commands = []; - descriptions = objFilter(descriptions, k => !localLookup[k]); - return self; - }; - const frozens = []; - self.freeze = function freeze() { - frozens.push({ - failMessage, - failureOutput, - usages, - usageDisabled, - epilogs, - examples, - commands, - descriptions, - }); - }; - self.unfreeze = function unfreeze(defaultCommand = false) { - const frozen = frozens.pop(); - if (!frozen) - return; - if (defaultCommand) { - descriptions = { ...frozen.descriptions, ...descriptions }; - commands = [...frozen.commands, ...commands]; - usages = [...frozen.usages, ...usages]; - examples = [...frozen.examples, ...examples]; - epilogs = [...frozen.epilogs, ...epilogs]; - } - else { - ({ - failMessage, - failureOutput, - usages, - usageDisabled, - epilogs, - examples, - commands, - descriptions, - } = frozen); - } - }; - return self; -} -function isIndentedText(text) { - return typeof text === 'object'; -} -function addIndentation(text, indent) { - return isIndentedText(text) - ? { text: text.text, indentation: text.indentation + indent } - : { text, indentation: indent }; -} -function getIndentation(text) { - return isIndentedText(text) ? text.indentation : 0; -} -function getText(text) { - return isIndentedText(text) ? text.text : text; -} diff --git a/node_modules/yargs/build/lib/utils/apply-extends.js b/node_modules/yargs/build/lib/utils/apply-extends.js deleted file mode 100644 index 0e593b4..0000000 --- a/node_modules/yargs/build/lib/utils/apply-extends.js +++ /dev/null @@ -1,59 +0,0 @@ -import { YError } from '../yerror.js'; -let previouslyVisitedConfigs = []; -let shim; -export function applyExtends(config, cwd, mergeExtends, _shim) { - shim = _shim; - let defaultConfig = {}; - if (Object.prototype.hasOwnProperty.call(config, 'extends')) { - if (typeof config.extends !== 'string') - return defaultConfig; - const isPath = /\.json|\..*rc$/.test(config.extends); - let pathToDefault = null; - if (!isPath) { - try { - pathToDefault = require.resolve(config.extends); - } - catch (_err) { - return config; - } - } - else { - pathToDefault = getPathToDefaultConfig(cwd, config.extends); - } - checkForCircularExtends(pathToDefault); - previouslyVisitedConfigs.push(pathToDefault); - defaultConfig = isPath - ? JSON.parse(shim.readFileSync(pathToDefault, 'utf8')) - : require(config.extends); - delete config.extends; - defaultConfig = applyExtends(defaultConfig, shim.path.dirname(pathToDefault), mergeExtends, shim); - } - previouslyVisitedConfigs = []; - return mergeExtends - ? mergeDeep(defaultConfig, config) - : Object.assign({}, defaultConfig, config); -} -function checkForCircularExtends(cfgPath) { - if (previouslyVisitedConfigs.indexOf(cfgPath) > -1) { - throw new YError(`Circular extended configurations: '${cfgPath}'.`); - } -} -function getPathToDefaultConfig(cwd, pathToExtend) { - return shim.path.resolve(cwd, pathToExtend); -} -function mergeDeep(config1, config2) { - const target = {}; - function isObject(obj) { - return obj && typeof obj === 'object' && !Array.isArray(obj); - } - Object.assign(target, config1); - for (const key of Object.keys(config2)) { - if (isObject(config2[key]) && isObject(target[key])) { - target[key] = mergeDeep(config1[key], config2[key]); - } - else { - target[key] = config2[key]; - } - } - return target; -} diff --git a/node_modules/yargs/build/lib/utils/is-promise.js b/node_modules/yargs/build/lib/utils/is-promise.js deleted file mode 100644 index d250c08..0000000 --- a/node_modules/yargs/build/lib/utils/is-promise.js +++ /dev/null @@ -1,5 +0,0 @@ -export function isPromise(maybePromise) { - return (!!maybePromise && - !!maybePromise.then && - typeof maybePromise.then === 'function'); -} diff --git a/node_modules/yargs/build/lib/utils/levenshtein.js b/node_modules/yargs/build/lib/utils/levenshtein.js deleted file mode 100644 index 60575ef..0000000 --- a/node_modules/yargs/build/lib/utils/levenshtein.js +++ /dev/null @@ -1,34 +0,0 @@ -export function levenshtein(a, b) { - if (a.length === 0) - return b.length; - if (b.length === 0) - return a.length; - const matrix = []; - let i; - for (i = 0; i <= b.length; i++) { - matrix[i] = [i]; - } - let j; - for (j = 0; j <= a.length; j++) { - matrix[0][j] = j; - } - for (i = 1; i <= b.length; i++) { - for (j = 1; j <= a.length; j++) { - if (b.charAt(i - 1) === a.charAt(j - 1)) { - matrix[i][j] = matrix[i - 1][j - 1]; - } - else { - if (i > 1 && - j > 1 && - b.charAt(i - 2) === a.charAt(j - 1) && - b.charAt(i - 1) === a.charAt(j - 2)) { - matrix[i][j] = matrix[i - 2][j - 2] + 1; - } - else { - matrix[i][j] = Math.min(matrix[i - 1][j - 1] + 1, Math.min(matrix[i][j - 1] + 1, matrix[i - 1][j] + 1)); - } - } - } - } - return matrix[b.length][a.length]; -} diff --git a/node_modules/yargs/build/lib/utils/maybe-async-result.js b/node_modules/yargs/build/lib/utils/maybe-async-result.js deleted file mode 100644 index 8c6a40c..0000000 --- a/node_modules/yargs/build/lib/utils/maybe-async-result.js +++ /dev/null @@ -1,17 +0,0 @@ -import { isPromise } from './is-promise.js'; -export function maybeAsyncResult(getResult, resultHandler, errorHandler = (err) => { - throw err; -}) { - try { - const result = isFunction(getResult) ? getResult() : getResult; - return isPromise(result) - ? result.then((result) => resultHandler(result)) - : resultHandler(result); - } - catch (err) { - return errorHandler(err); - } -} -function isFunction(arg) { - return typeof arg === 'function'; -} diff --git a/node_modules/yargs/build/lib/utils/obj-filter.js b/node_modules/yargs/build/lib/utils/obj-filter.js deleted file mode 100644 index cd68ad2..0000000 --- a/node_modules/yargs/build/lib/utils/obj-filter.js +++ /dev/null @@ -1,10 +0,0 @@ -import { objectKeys } from '../typings/common-types.js'; -export function objFilter(original = {}, filter = () => true) { - const obj = {}; - objectKeys(original).forEach(key => { - if (filter(key, original[key])) { - obj[key] = original[key]; - } - }); - return obj; -} diff --git a/node_modules/yargs/build/lib/utils/process-argv.js b/node_modules/yargs/build/lib/utils/process-argv.js deleted file mode 100644 index 74dc9e4..0000000 --- a/node_modules/yargs/build/lib/utils/process-argv.js +++ /dev/null @@ -1,17 +0,0 @@ -function getProcessArgvBinIndex() { - if (isBundledElectronApp()) - return 0; - return 1; -} -function isBundledElectronApp() { - return isElectronApp() && !process.defaultApp; -} -function isElectronApp() { - return !!process.versions.electron; -} -export function hideBin(argv) { - return argv.slice(getProcessArgvBinIndex() + 1); -} -export function getProcessArgvBin() { - return process.argv[getProcessArgvBinIndex()]; -} diff --git a/node_modules/yargs/build/lib/utils/set-blocking.js b/node_modules/yargs/build/lib/utils/set-blocking.js deleted file mode 100644 index 88fb806..0000000 --- a/node_modules/yargs/build/lib/utils/set-blocking.js +++ /dev/null @@ -1,12 +0,0 @@ -export default function setBlocking(blocking) { - if (typeof process === 'undefined') - return; - [process.stdout, process.stderr].forEach(_stream => { - const stream = _stream; - if (stream._handle && - stream.isTTY && - typeof stream._handle.setBlocking === 'function') { - stream._handle.setBlocking(blocking); - } - }); -} diff --git a/node_modules/yargs/build/lib/utils/which-module.js b/node_modules/yargs/build/lib/utils/which-module.js deleted file mode 100644 index 5974e22..0000000 --- a/node_modules/yargs/build/lib/utils/which-module.js +++ /dev/null @@ -1,10 +0,0 @@ -export default function whichModule(exported) { - if (typeof require === 'undefined') - return null; - for (let i = 0, files = Object.keys(require.cache), mod; i < files.length; i++) { - mod = require.cache[files[i]]; - if (mod.exports === exported) - return mod; - } - return null; -} diff --git a/node_modules/yargs/build/lib/validation.js b/node_modules/yargs/build/lib/validation.js deleted file mode 100644 index bd2e1b8..0000000 --- a/node_modules/yargs/build/lib/validation.js +++ /dev/null @@ -1,305 +0,0 @@ -import { argsert } from './argsert.js'; -import { assertNotStrictEqual, } from './typings/common-types.js'; -import { levenshtein as distance } from './utils/levenshtein.js'; -import { objFilter } from './utils/obj-filter.js'; -const specialKeys = ['$0', '--', '_']; -export function validation(yargs, usage, shim) { - const __ = shim.y18n.__; - const __n = shim.y18n.__n; - const self = {}; - self.nonOptionCount = function nonOptionCount(argv) { - const demandedCommands = yargs.getDemandedCommands(); - const positionalCount = argv._.length + (argv['--'] ? argv['--'].length : 0); - const _s = positionalCount - yargs.getInternalMethods().getContext().commands.length; - if (demandedCommands._ && - (_s < demandedCommands._.min || _s > demandedCommands._.max)) { - if (_s < demandedCommands._.min) { - if (demandedCommands._.minMsg !== undefined) { - usage.fail(demandedCommands._.minMsg - ? demandedCommands._.minMsg - .replace(/\$0/g, _s.toString()) - .replace(/\$1/, demandedCommands._.min.toString()) - : null); - } - else { - usage.fail(__n('Not enough non-option arguments: got %s, need at least %s', 'Not enough non-option arguments: got %s, need at least %s', _s, _s.toString(), demandedCommands._.min.toString())); - } - } - else if (_s > demandedCommands._.max) { - if (demandedCommands._.maxMsg !== undefined) { - usage.fail(demandedCommands._.maxMsg - ? demandedCommands._.maxMsg - .replace(/\$0/g, _s.toString()) - .replace(/\$1/, demandedCommands._.max.toString()) - : null); - } - else { - usage.fail(__n('Too many non-option arguments: got %s, maximum of %s', 'Too many non-option arguments: got %s, maximum of %s', _s, _s.toString(), demandedCommands._.max.toString())); - } - } - } - }; - self.positionalCount = function positionalCount(required, observed) { - if (observed < required) { - usage.fail(__n('Not enough non-option arguments: got %s, need at least %s', 'Not enough non-option arguments: got %s, need at least %s', observed, observed + '', required + '')); - } - }; - self.requiredArguments = function requiredArguments(argv, demandedOptions) { - let missing = null; - for (const key of Object.keys(demandedOptions)) { - if (!Object.prototype.hasOwnProperty.call(argv, key) || - typeof argv[key] === 'undefined') { - missing = missing || {}; - missing[key] = demandedOptions[key]; - } - } - if (missing) { - const customMsgs = []; - for (const key of Object.keys(missing)) { - const msg = missing[key]; - if (msg && customMsgs.indexOf(msg) < 0) { - customMsgs.push(msg); - } - } - const customMsg = customMsgs.length ? `\n${customMsgs.join('\n')}` : ''; - usage.fail(__n('Missing required argument: %s', 'Missing required arguments: %s', Object.keys(missing).length, Object.keys(missing).join(', ') + customMsg)); - } - }; - self.unknownArguments = function unknownArguments(argv, aliases, positionalMap, isDefaultCommand, checkPositionals = true) { - var _a; - const commandKeys = yargs - .getInternalMethods() - .getCommandInstance() - .getCommands(); - const unknown = []; - const currentContext = yargs.getInternalMethods().getContext(); - Object.keys(argv).forEach(key => { - if (!specialKeys.includes(key) && - !Object.prototype.hasOwnProperty.call(positionalMap, key) && - !Object.prototype.hasOwnProperty.call(yargs.getInternalMethods().getParseContext(), key) && - !self.isValidAndSomeAliasIsNotNew(key, aliases)) { - unknown.push(key); - } - }); - if (checkPositionals && - (currentContext.commands.length > 0 || - commandKeys.length > 0 || - isDefaultCommand)) { - argv._.slice(currentContext.commands.length).forEach(key => { - if (!commandKeys.includes('' + key)) { - unknown.push('' + key); - } - }); - } - if (checkPositionals) { - const demandedCommands = yargs.getDemandedCommands(); - const maxNonOptDemanded = ((_a = demandedCommands._) === null || _a === void 0 ? void 0 : _a.max) || 0; - const expected = currentContext.commands.length + maxNonOptDemanded; - if (expected < argv._.length) { - argv._.slice(expected).forEach(key => { - key = String(key); - if (!currentContext.commands.includes(key) && - !unknown.includes(key)) { - unknown.push(key); - } - }); - } - } - if (unknown.length) { - usage.fail(__n('Unknown argument: %s', 'Unknown arguments: %s', unknown.length, unknown.map(s => (s.trim() ? s : `"${s}"`)).join(', '))); - } - }; - self.unknownCommands = function unknownCommands(argv) { - const commandKeys = yargs - .getInternalMethods() - .getCommandInstance() - .getCommands(); - const unknown = []; - const currentContext = yargs.getInternalMethods().getContext(); - if (currentContext.commands.length > 0 || commandKeys.length > 0) { - argv._.slice(currentContext.commands.length).forEach(key => { - if (!commandKeys.includes('' + key)) { - unknown.push('' + key); - } - }); - } - if (unknown.length > 0) { - usage.fail(__n('Unknown command: %s', 'Unknown commands: %s', unknown.length, unknown.join(', '))); - return true; - } - else { - return false; - } - }; - self.isValidAndSomeAliasIsNotNew = function isValidAndSomeAliasIsNotNew(key, aliases) { - if (!Object.prototype.hasOwnProperty.call(aliases, key)) { - return false; - } - const newAliases = yargs.parsed.newAliases; - return [key, ...aliases[key]].some(a => !Object.prototype.hasOwnProperty.call(newAliases, a) || !newAliases[key]); - }; - self.limitedChoices = function limitedChoices(argv) { - const options = yargs.getOptions(); - const invalid = {}; - if (!Object.keys(options.choices).length) - return; - Object.keys(argv).forEach(key => { - if (specialKeys.indexOf(key) === -1 && - Object.prototype.hasOwnProperty.call(options.choices, key)) { - [].concat(argv[key]).forEach(value => { - if (options.choices[key].indexOf(value) === -1 && - value !== undefined) { - invalid[key] = (invalid[key] || []).concat(value); - } - }); - } - }); - const invalidKeys = Object.keys(invalid); - if (!invalidKeys.length) - return; - let msg = __('Invalid values:'); - invalidKeys.forEach(key => { - msg += `\n ${__('Argument: %s, Given: %s, Choices: %s', key, usage.stringifiedValues(invalid[key]), usage.stringifiedValues(options.choices[key]))}`; - }); - usage.fail(msg); - }; - let implied = {}; - self.implies = function implies(key, value) { - argsert('<string|object> [array|number|string]', [key, value], arguments.length); - if (typeof key === 'object') { - Object.keys(key).forEach(k => { - self.implies(k, key[k]); - }); - } - else { - yargs.global(key); - if (!implied[key]) { - implied[key] = []; - } - if (Array.isArray(value)) { - value.forEach(i => self.implies(key, i)); - } - else { - assertNotStrictEqual(value, undefined, shim); - implied[key].push(value); - } - } - }; - self.getImplied = function getImplied() { - return implied; - }; - function keyExists(argv, val) { - const num = Number(val); - val = isNaN(num) ? val : num; - if (typeof val === 'number') { - val = argv._.length >= val; - } - else if (val.match(/^--no-.+/)) { - val = val.match(/^--no-(.+)/)[1]; - val = !Object.prototype.hasOwnProperty.call(argv, val); - } - else { - val = Object.prototype.hasOwnProperty.call(argv, val); - } - return val; - } - self.implications = function implications(argv) { - const implyFail = []; - Object.keys(implied).forEach(key => { - const origKey = key; - (implied[key] || []).forEach(value => { - let key = origKey; - const origValue = value; - key = keyExists(argv, key); - value = keyExists(argv, value); - if (key && !value) { - implyFail.push(` ${origKey} -> ${origValue}`); - } - }); - }); - if (implyFail.length) { - let msg = `${__('Implications failed:')}\n`; - implyFail.forEach(value => { - msg += value; - }); - usage.fail(msg); - } - }; - let conflicting = {}; - self.conflicts = function conflicts(key, value) { - argsert('<string|object> [array|string]', [key, value], arguments.length); - if (typeof key === 'object') { - Object.keys(key).forEach(k => { - self.conflicts(k, key[k]); - }); - } - else { - yargs.global(key); - if (!conflicting[key]) { - conflicting[key] = []; - } - if (Array.isArray(value)) { - value.forEach(i => self.conflicts(key, i)); - } - else { - conflicting[key].push(value); - } - } - }; - self.getConflicting = () => conflicting; - self.conflicting = function conflictingFn(argv) { - Object.keys(argv).forEach(key => { - if (conflicting[key]) { - conflicting[key].forEach(value => { - if (value && argv[key] !== undefined && argv[value] !== undefined) { - usage.fail(__('Arguments %s and %s are mutually exclusive', key, value)); - } - }); - } - }); - if (yargs.getInternalMethods().getParserConfiguration()['strip-dashed']) { - Object.keys(conflicting).forEach(key => { - conflicting[key].forEach(value => { - if (value && - argv[shim.Parser.camelCase(key)] !== undefined && - argv[shim.Parser.camelCase(value)] !== undefined) { - usage.fail(__('Arguments %s and %s are mutually exclusive', key, value)); - } - }); - }); - } - }; - self.recommendCommands = function recommendCommands(cmd, potentialCommands) { - const threshold = 3; - potentialCommands = potentialCommands.sort((a, b) => b.length - a.length); - let recommended = null; - let bestDistance = Infinity; - for (let i = 0, candidate; (candidate = potentialCommands[i]) !== undefined; i++) { - const d = distance(cmd, candidate); - if (d <= threshold && d < bestDistance) { - bestDistance = d; - recommended = candidate; - } - } - if (recommended) - usage.fail(__('Did you mean %s?', recommended)); - }; - self.reset = function reset(localLookup) { - implied = objFilter(implied, k => !localLookup[k]); - conflicting = objFilter(conflicting, k => !localLookup[k]); - return self; - }; - const frozens = []; - self.freeze = function freeze() { - frozens.push({ - implied, - conflicting, - }); - }; - self.unfreeze = function unfreeze() { - const frozen = frozens.pop(); - assertNotStrictEqual(frozen, undefined, shim); - ({ implied, conflicting } = frozen); - }; - return self; -} diff --git a/node_modules/yargs/build/lib/yargs-factory.js b/node_modules/yargs/build/lib/yargs-factory.js deleted file mode 100644 index c4b1d50..0000000 --- a/node_modules/yargs/build/lib/yargs-factory.js +++ /dev/null @@ -1,1512 +0,0 @@ -var __classPrivateFieldSet = (this && this.__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; -}; -var __classPrivateFieldGet = (this && this.__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); -}; -var _YargsInstance_command, _YargsInstance_cwd, _YargsInstance_context, _YargsInstance_completion, _YargsInstance_completionCommand, _YargsInstance_defaultShowHiddenOpt, _YargsInstance_exitError, _YargsInstance_detectLocale, _YargsInstance_emittedWarnings, _YargsInstance_exitProcess, _YargsInstance_frozens, _YargsInstance_globalMiddleware, _YargsInstance_groups, _YargsInstance_hasOutput, _YargsInstance_helpOpt, _YargsInstance_isGlobalContext, _YargsInstance_logger, _YargsInstance_output, _YargsInstance_options, _YargsInstance_parentRequire, _YargsInstance_parserConfig, _YargsInstance_parseFn, _YargsInstance_parseContext, _YargsInstance_pkgs, _YargsInstance_preservedGroups, _YargsInstance_processArgs, _YargsInstance_recommendCommands, _YargsInstance_shim, _YargsInstance_strict, _YargsInstance_strictCommands, _YargsInstance_strictOptions, _YargsInstance_usage, _YargsInstance_usageConfig, _YargsInstance_versionOpt, _YargsInstance_validation; -import { command as Command, } from './command.js'; -import { assertNotStrictEqual, assertSingleKey, objectKeys, } from './typings/common-types.js'; -import { YError } from './yerror.js'; -import { usage as Usage } from './usage.js'; -import { argsert } from './argsert.js'; -import { completion as Completion, } from './completion.js'; -import { validation as Validation, } from './validation.js'; -import { objFilter } from './utils/obj-filter.js'; -import { applyExtends } from './utils/apply-extends.js'; -import { applyMiddleware, GlobalMiddleware, } from './middleware.js'; -import { isPromise } from './utils/is-promise.js'; -import { maybeAsyncResult } from './utils/maybe-async-result.js'; -import setBlocking from './utils/set-blocking.js'; -export function YargsFactory(_shim) { - return (processArgs = [], cwd = _shim.process.cwd(), parentRequire) => { - const yargs = new YargsInstance(processArgs, cwd, parentRequire, _shim); - Object.defineProperty(yargs, 'argv', { - get: () => { - return yargs.parse(); - }, - enumerable: true, - }); - yargs.help(); - yargs.version(); - return yargs; - }; -} -const kCopyDoubleDash = Symbol('copyDoubleDash'); -const kCreateLogger = Symbol('copyDoubleDash'); -const kDeleteFromParserHintObject = Symbol('deleteFromParserHintObject'); -const kEmitWarning = Symbol('emitWarning'); -const kFreeze = Symbol('freeze'); -const kGetDollarZero = Symbol('getDollarZero'); -const kGetParserConfiguration = Symbol('getParserConfiguration'); -const kGetUsageConfiguration = Symbol('getUsageConfiguration'); -const kGuessLocale = Symbol('guessLocale'); -const kGuessVersion = Symbol('guessVersion'); -const kParsePositionalNumbers = Symbol('parsePositionalNumbers'); -const kPkgUp = Symbol('pkgUp'); -const kPopulateParserHintArray = Symbol('populateParserHintArray'); -const kPopulateParserHintSingleValueDictionary = Symbol('populateParserHintSingleValueDictionary'); -const kPopulateParserHintArrayDictionary = Symbol('populateParserHintArrayDictionary'); -const kPopulateParserHintDictionary = Symbol('populateParserHintDictionary'); -const kSanitizeKey = Symbol('sanitizeKey'); -const kSetKey = Symbol('setKey'); -const kUnfreeze = Symbol('unfreeze'); -const kValidateAsync = Symbol('validateAsync'); -const kGetCommandInstance = Symbol('getCommandInstance'); -const kGetContext = Symbol('getContext'); -const kGetHasOutput = Symbol('getHasOutput'); -const kGetLoggerInstance = Symbol('getLoggerInstance'); -const kGetParseContext = Symbol('getParseContext'); -const kGetUsageInstance = Symbol('getUsageInstance'); -const kGetValidationInstance = Symbol('getValidationInstance'); -const kHasParseCallback = Symbol('hasParseCallback'); -const kIsGlobalContext = Symbol('isGlobalContext'); -const kPostProcess = Symbol('postProcess'); -const kRebase = Symbol('rebase'); -const kReset = Symbol('reset'); -const kRunYargsParserAndExecuteCommands = Symbol('runYargsParserAndExecuteCommands'); -const kRunValidation = Symbol('runValidation'); -const kSetHasOutput = Symbol('setHasOutput'); -const kTrackManuallySetKeys = Symbol('kTrackManuallySetKeys'); -export class YargsInstance { - constructor(processArgs = [], cwd, parentRequire, shim) { - this.customScriptName = false; - this.parsed = false; - _YargsInstance_command.set(this, void 0); - _YargsInstance_cwd.set(this, void 0); - _YargsInstance_context.set(this, { commands: [], fullCommands: [] }); - _YargsInstance_completion.set(this, null); - _YargsInstance_completionCommand.set(this, null); - _YargsInstance_defaultShowHiddenOpt.set(this, 'show-hidden'); - _YargsInstance_exitError.set(this, null); - _YargsInstance_detectLocale.set(this, true); - _YargsInstance_emittedWarnings.set(this, {}); - _YargsInstance_exitProcess.set(this, true); - _YargsInstance_frozens.set(this, []); - _YargsInstance_globalMiddleware.set(this, void 0); - _YargsInstance_groups.set(this, {}); - _YargsInstance_hasOutput.set(this, false); - _YargsInstance_helpOpt.set(this, null); - _YargsInstance_isGlobalContext.set(this, true); - _YargsInstance_logger.set(this, void 0); - _YargsInstance_output.set(this, ''); - _YargsInstance_options.set(this, void 0); - _YargsInstance_parentRequire.set(this, void 0); - _YargsInstance_parserConfig.set(this, {}); - _YargsInstance_parseFn.set(this, null); - _YargsInstance_parseContext.set(this, null); - _YargsInstance_pkgs.set(this, {}); - _YargsInstance_preservedGroups.set(this, {}); - _YargsInstance_processArgs.set(this, void 0); - _YargsInstance_recommendCommands.set(this, false); - _YargsInstance_shim.set(this, void 0); - _YargsInstance_strict.set(this, false); - _YargsInstance_strictCommands.set(this, false); - _YargsInstance_strictOptions.set(this, false); - _YargsInstance_usage.set(this, void 0); - _YargsInstance_usageConfig.set(this, {}); - _YargsInstance_versionOpt.set(this, null); - _YargsInstance_validation.set(this, void 0); - __classPrivateFieldSet(this, _YargsInstance_shim, shim, "f"); - __classPrivateFieldSet(this, _YargsInstance_processArgs, processArgs, "f"); - __classPrivateFieldSet(this, _YargsInstance_cwd, cwd, "f"); - __classPrivateFieldSet(this, _YargsInstance_parentRequire, parentRequire, "f"); - __classPrivateFieldSet(this, _YargsInstance_globalMiddleware, new GlobalMiddleware(this), "f"); - this.$0 = this[kGetDollarZero](); - this[kReset](); - __classPrivateFieldSet(this, _YargsInstance_command, __classPrivateFieldGet(this, _YargsInstance_command, "f"), "f"); - __classPrivateFieldSet(this, _YargsInstance_usage, __classPrivateFieldGet(this, _YargsInstance_usage, "f"), "f"); - __classPrivateFieldSet(this, _YargsInstance_validation, __classPrivateFieldGet(this, _YargsInstance_validation, "f"), "f"); - __classPrivateFieldSet(this, _YargsInstance_options, __classPrivateFieldGet(this, _YargsInstance_options, "f"), "f"); - __classPrivateFieldGet(this, _YargsInstance_options, "f").showHiddenOpt = __classPrivateFieldGet(this, _YargsInstance_defaultShowHiddenOpt, "f"); - __classPrivateFieldSet(this, _YargsInstance_logger, this[kCreateLogger](), "f"); - } - addHelpOpt(opt, msg) { - const defaultHelpOpt = 'help'; - argsert('[string|boolean] [string]', [opt, msg], arguments.length); - if (__classPrivateFieldGet(this, _YargsInstance_helpOpt, "f")) { - this[kDeleteFromParserHintObject](__classPrivateFieldGet(this, _YargsInstance_helpOpt, "f")); - __classPrivateFieldSet(this, _YargsInstance_helpOpt, null, "f"); - } - if (opt === false && msg === undefined) - return this; - __classPrivateFieldSet(this, _YargsInstance_helpOpt, typeof opt === 'string' ? opt : defaultHelpOpt, "f"); - this.boolean(__classPrivateFieldGet(this, _YargsInstance_helpOpt, "f")); - this.describe(__classPrivateFieldGet(this, _YargsInstance_helpOpt, "f"), msg || __classPrivateFieldGet(this, _YargsInstance_usage, "f").deferY18nLookup('Show help')); - return this; - } - help(opt, msg) { - return this.addHelpOpt(opt, msg); - } - addShowHiddenOpt(opt, msg) { - argsert('[string|boolean] [string]', [opt, msg], arguments.length); - if (opt === false && msg === undefined) - return this; - const showHiddenOpt = typeof opt === 'string' ? opt : __classPrivateFieldGet(this, _YargsInstance_defaultShowHiddenOpt, "f"); - this.boolean(showHiddenOpt); - this.describe(showHiddenOpt, msg || __classPrivateFieldGet(this, _YargsInstance_usage, "f").deferY18nLookup('Show hidden options')); - __classPrivateFieldGet(this, _YargsInstance_options, "f").showHiddenOpt = showHiddenOpt; - return this; - } - showHidden(opt, msg) { - return this.addShowHiddenOpt(opt, msg); - } - alias(key, value) { - argsert('<object|string|array> [string|array]', [key, value], arguments.length); - this[kPopulateParserHintArrayDictionary](this.alias.bind(this), 'alias', key, value); - return this; - } - array(keys) { - argsert('<array|string>', [keys], arguments.length); - this[kPopulateParserHintArray]('array', keys); - this[kTrackManuallySetKeys](keys); - return this; - } - boolean(keys) { - argsert('<array|string>', [keys], arguments.length); - this[kPopulateParserHintArray]('boolean', keys); - this[kTrackManuallySetKeys](keys); - return this; - } - check(f, global) { - argsert('<function> [boolean]', [f, global], arguments.length); - this.middleware((argv, _yargs) => { - return maybeAsyncResult(() => { - return f(argv, _yargs.getOptions()); - }, (result) => { - if (!result) { - __classPrivateFieldGet(this, _YargsInstance_usage, "f").fail(__classPrivateFieldGet(this, _YargsInstance_shim, "f").y18n.__('Argument check failed: %s', f.toString())); - } - else if (typeof result === 'string' || result instanceof Error) { - __classPrivateFieldGet(this, _YargsInstance_usage, "f").fail(result.toString(), result); - } - return argv; - }, (err) => { - __classPrivateFieldGet(this, _YargsInstance_usage, "f").fail(err.message ? err.message : err.toString(), err); - return argv; - }); - }, false, global); - return this; - } - choices(key, value) { - argsert('<object|string|array> [string|array]', [key, value], arguments.length); - this[kPopulateParserHintArrayDictionary](this.choices.bind(this), 'choices', key, value); - return this; - } - coerce(keys, value) { - argsert('<object|string|array> [function]', [keys, value], arguments.length); - if (Array.isArray(keys)) { - if (!value) { - throw new YError('coerce callback must be provided'); - } - for (const key of keys) { - this.coerce(key, value); - } - return this; - } - else if (typeof keys === 'object') { - for (const key of Object.keys(keys)) { - this.coerce(key, keys[key]); - } - return this; - } - if (!value) { - throw new YError('coerce callback must be provided'); - } - __classPrivateFieldGet(this, _YargsInstance_options, "f").key[keys] = true; - __classPrivateFieldGet(this, _YargsInstance_globalMiddleware, "f").addCoerceMiddleware((argv, yargs) => { - let aliases; - const shouldCoerce = Object.prototype.hasOwnProperty.call(argv, keys); - if (!shouldCoerce) { - return argv; - } - return maybeAsyncResult(() => { - aliases = yargs.getAliases(); - return value(argv[keys]); - }, (result) => { - argv[keys] = result; - const stripAliased = yargs - .getInternalMethods() - .getParserConfiguration()['strip-aliased']; - if (aliases[keys] && stripAliased !== true) { - for (const alias of aliases[keys]) { - argv[alias] = result; - } - } - return argv; - }, (err) => { - throw new YError(err.message); - }); - }, keys); - return this; - } - conflicts(key1, key2) { - argsert('<string|object> [string|array]', [key1, key2], arguments.length); - __classPrivateFieldGet(this, _YargsInstance_validation, "f").conflicts(key1, key2); - return this; - } - config(key = 'config', msg, parseFn) { - argsert('[object|string] [string|function] [function]', [key, msg, parseFn], arguments.length); - if (typeof key === 'object' && !Array.isArray(key)) { - key = applyExtends(key, __classPrivateFieldGet(this, _YargsInstance_cwd, "f"), this[kGetParserConfiguration]()['deep-merge-config'] || false, __classPrivateFieldGet(this, _YargsInstance_shim, "f")); - __classPrivateFieldGet(this, _YargsInstance_options, "f").configObjects = (__classPrivateFieldGet(this, _YargsInstance_options, "f").configObjects || []).concat(key); - return this; - } - if (typeof msg === 'function') { - parseFn = msg; - msg = undefined; - } - this.describe(key, msg || __classPrivateFieldGet(this, _YargsInstance_usage, "f").deferY18nLookup('Path to JSON config file')); - (Array.isArray(key) ? key : [key]).forEach(k => { - __classPrivateFieldGet(this, _YargsInstance_options, "f").config[k] = parseFn || true; - }); - return this; - } - completion(cmd, desc, fn) { - argsert('[string] [string|boolean|function] [function]', [cmd, desc, fn], arguments.length); - if (typeof desc === 'function') { - fn = desc; - desc = undefined; - } - __classPrivateFieldSet(this, _YargsInstance_completionCommand, cmd || __classPrivateFieldGet(this, _YargsInstance_completionCommand, "f") || 'completion', "f"); - if (!desc && desc !== false) { - desc = 'generate completion script'; - } - this.command(__classPrivateFieldGet(this, _YargsInstance_completionCommand, "f"), desc); - if (fn) - __classPrivateFieldGet(this, _YargsInstance_completion, "f").registerFunction(fn); - return this; - } - command(cmd, description, builder, handler, middlewares, deprecated) { - argsert('<string|array|object> [string|boolean] [function|object] [function] [array] [boolean|string]', [cmd, description, builder, handler, middlewares, deprecated], arguments.length); - __classPrivateFieldGet(this, _YargsInstance_command, "f").addHandler(cmd, description, builder, handler, middlewares, deprecated); - return this; - } - commands(cmd, description, builder, handler, middlewares, deprecated) { - return this.command(cmd, description, builder, handler, middlewares, deprecated); - } - commandDir(dir, opts) { - argsert('<string> [object]', [dir, opts], arguments.length); - const req = __classPrivateFieldGet(this, _YargsInstance_parentRequire, "f") || __classPrivateFieldGet(this, _YargsInstance_shim, "f").require; - __classPrivateFieldGet(this, _YargsInstance_command, "f").addDirectory(dir, req, __classPrivateFieldGet(this, _YargsInstance_shim, "f").getCallerFile(), opts); - return this; - } - count(keys) { - argsert('<array|string>', [keys], arguments.length); - this[kPopulateParserHintArray]('count', keys); - this[kTrackManuallySetKeys](keys); - return this; - } - default(key, value, defaultDescription) { - argsert('<object|string|array> [*] [string]', [key, value, defaultDescription], arguments.length); - if (defaultDescription) { - assertSingleKey(key, __classPrivateFieldGet(this, _YargsInstance_shim, "f")); - __classPrivateFieldGet(this, _YargsInstance_options, "f").defaultDescription[key] = defaultDescription; - } - if (typeof value === 'function') { - assertSingleKey(key, __classPrivateFieldGet(this, _YargsInstance_shim, "f")); - if (!__classPrivateFieldGet(this, _YargsInstance_options, "f").defaultDescription[key]) - __classPrivateFieldGet(this, _YargsInstance_options, "f").defaultDescription[key] = - __classPrivateFieldGet(this, _YargsInstance_usage, "f").functionDescription(value); - value = value.call(); - } - this[kPopulateParserHintSingleValueDictionary](this.default.bind(this), 'default', key, value); - return this; - } - defaults(key, value, defaultDescription) { - return this.default(key, value, defaultDescription); - } - demandCommand(min = 1, max, minMsg, maxMsg) { - argsert('[number] [number|string] [string|null|undefined] [string|null|undefined]', [min, max, minMsg, maxMsg], arguments.length); - if (typeof max !== 'number') { - minMsg = max; - max = Infinity; - } - this.global('_', false); - __classPrivateFieldGet(this, _YargsInstance_options, "f").demandedCommands._ = { - min, - max, - minMsg, - maxMsg, - }; - return this; - } - demand(keys, max, msg) { - if (Array.isArray(max)) { - max.forEach(key => { - assertNotStrictEqual(msg, true, __classPrivateFieldGet(this, _YargsInstance_shim, "f")); - this.demandOption(key, msg); - }); - max = Infinity; - } - else if (typeof max !== 'number') { - msg = max; - max = Infinity; - } - if (typeof keys === 'number') { - assertNotStrictEqual(msg, true, __classPrivateFieldGet(this, _YargsInstance_shim, "f")); - this.demandCommand(keys, max, msg, msg); - } - else if (Array.isArray(keys)) { - keys.forEach(key => { - assertNotStrictEqual(msg, true, __classPrivateFieldGet(this, _YargsInstance_shim, "f")); - this.demandOption(key, msg); - }); - } - else { - if (typeof msg === 'string') { - this.demandOption(keys, msg); - } - else if (msg === true || typeof msg === 'undefined') { - this.demandOption(keys); - } - } - return this; - } - demandOption(keys, msg) { - argsert('<object|string|array> [string]', [keys, msg], arguments.length); - this[kPopulateParserHintSingleValueDictionary](this.demandOption.bind(this), 'demandedOptions', keys, msg); - return this; - } - deprecateOption(option, message) { - argsert('<string> [string|boolean]', [option, message], arguments.length); - __classPrivateFieldGet(this, _YargsInstance_options, "f").deprecatedOptions[option] = message; - return this; - } - describe(keys, description) { - argsert('<object|string|array> [string]', [keys, description], arguments.length); - this[kSetKey](keys, true); - __classPrivateFieldGet(this, _YargsInstance_usage, "f").describe(keys, description); - return this; - } - detectLocale(detect) { - argsert('<boolean>', [detect], arguments.length); - __classPrivateFieldSet(this, _YargsInstance_detectLocale, detect, "f"); - return this; - } - env(prefix) { - argsert('[string|boolean]', [prefix], arguments.length); - if (prefix === false) - delete __classPrivateFieldGet(this, _YargsInstance_options, "f").envPrefix; - else - __classPrivateFieldGet(this, _YargsInstance_options, "f").envPrefix = prefix || ''; - return this; - } - epilogue(msg) { - argsert('<string>', [msg], arguments.length); - __classPrivateFieldGet(this, _YargsInstance_usage, "f").epilog(msg); - return this; - } - epilog(msg) { - return this.epilogue(msg); - } - example(cmd, description) { - argsert('<string|array> [string]', [cmd, description], arguments.length); - if (Array.isArray(cmd)) { - cmd.forEach(exampleParams => this.example(...exampleParams)); - } - else { - __classPrivateFieldGet(this, _YargsInstance_usage, "f").example(cmd, description); - } - return this; - } - exit(code, err) { - __classPrivateFieldSet(this, _YargsInstance_hasOutput, true, "f"); - __classPrivateFieldSet(this, _YargsInstance_exitError, err, "f"); - if (__classPrivateFieldGet(this, _YargsInstance_exitProcess, "f")) - __classPrivateFieldGet(this, _YargsInstance_shim, "f").process.exit(code); - } - exitProcess(enabled = true) { - argsert('[boolean]', [enabled], arguments.length); - __classPrivateFieldSet(this, _YargsInstance_exitProcess, enabled, "f"); - return this; - } - fail(f) { - argsert('<function|boolean>', [f], arguments.length); - if (typeof f === 'boolean' && f !== false) { - throw new YError("Invalid first argument. Expected function or boolean 'false'"); - } - __classPrivateFieldGet(this, _YargsInstance_usage, "f").failFn(f); - return this; - } - getAliases() { - return this.parsed ? this.parsed.aliases : {}; - } - async getCompletion(args, done) { - argsert('<array> [function]', [args, done], arguments.length); - if (!done) { - return new Promise((resolve, reject) => { - __classPrivateFieldGet(this, _YargsInstance_completion, "f").getCompletion(args, (err, completions) => { - if (err) - reject(err); - else - resolve(completions); - }); - }); - } - else { - return __classPrivateFieldGet(this, _YargsInstance_completion, "f").getCompletion(args, done); - } - } - getDemandedOptions() { - argsert([], 0); - return __classPrivateFieldGet(this, _YargsInstance_options, "f").demandedOptions; - } - getDemandedCommands() { - argsert([], 0); - return __classPrivateFieldGet(this, _YargsInstance_options, "f").demandedCommands; - } - getDeprecatedOptions() { - argsert([], 0); - return __classPrivateFieldGet(this, _YargsInstance_options, "f").deprecatedOptions; - } - getDetectLocale() { - return __classPrivateFieldGet(this, _YargsInstance_detectLocale, "f"); - } - getExitProcess() { - return __classPrivateFieldGet(this, _YargsInstance_exitProcess, "f"); - } - getGroups() { - return Object.assign({}, __classPrivateFieldGet(this, _YargsInstance_groups, "f"), __classPrivateFieldGet(this, _YargsInstance_preservedGroups, "f")); - } - getHelp() { - __classPrivateFieldSet(this, _YargsInstance_hasOutput, true, "f"); - if (!__classPrivateFieldGet(this, _YargsInstance_usage, "f").hasCachedHelpMessage()) { - if (!this.parsed) { - const parse = this[kRunYargsParserAndExecuteCommands](__classPrivateFieldGet(this, _YargsInstance_processArgs, "f"), undefined, undefined, 0, true); - if (isPromise(parse)) { - return parse.then(() => { - return __classPrivateFieldGet(this, _YargsInstance_usage, "f").help(); - }); - } - } - const builderResponse = __classPrivateFieldGet(this, _YargsInstance_command, "f").runDefaultBuilderOn(this); - if (isPromise(builderResponse)) { - return builderResponse.then(() => { - return __classPrivateFieldGet(this, _YargsInstance_usage, "f").help(); - }); - } - } - return Promise.resolve(__classPrivateFieldGet(this, _YargsInstance_usage, "f").help()); - } - getOptions() { - return __classPrivateFieldGet(this, _YargsInstance_options, "f"); - } - getStrict() { - return __classPrivateFieldGet(this, _YargsInstance_strict, "f"); - } - getStrictCommands() { - return __classPrivateFieldGet(this, _YargsInstance_strictCommands, "f"); - } - getStrictOptions() { - return __classPrivateFieldGet(this, _YargsInstance_strictOptions, "f"); - } - global(globals, global) { - argsert('<string|array> [boolean]', [globals, global], arguments.length); - globals = [].concat(globals); - if (global !== false) { - __classPrivateFieldGet(this, _YargsInstance_options, "f").local = __classPrivateFieldGet(this, _YargsInstance_options, "f").local.filter(l => globals.indexOf(l) === -1); - } - else { - globals.forEach(g => { - if (!__classPrivateFieldGet(this, _YargsInstance_options, "f").local.includes(g)) - __classPrivateFieldGet(this, _YargsInstance_options, "f").local.push(g); - }); - } - return this; - } - group(opts, groupName) { - argsert('<string|array> <string>', [opts, groupName], arguments.length); - const existing = __classPrivateFieldGet(this, _YargsInstance_preservedGroups, "f")[groupName] || __classPrivateFieldGet(this, _YargsInstance_groups, "f")[groupName]; - if (__classPrivateFieldGet(this, _YargsInstance_preservedGroups, "f")[groupName]) { - delete __classPrivateFieldGet(this, _YargsInstance_preservedGroups, "f")[groupName]; - } - const seen = {}; - __classPrivateFieldGet(this, _YargsInstance_groups, "f")[groupName] = (existing || []).concat(opts).filter(key => { - if (seen[key]) - return false; - return (seen[key] = true); - }); - return this; - } - hide(key) { - argsert('<string>', [key], arguments.length); - __classPrivateFieldGet(this, _YargsInstance_options, "f").hiddenOptions.push(key); - return this; - } - implies(key, value) { - argsert('<string|object> [number|string|array]', [key, value], arguments.length); - __classPrivateFieldGet(this, _YargsInstance_validation, "f").implies(key, value); - return this; - } - locale(locale) { - argsert('[string]', [locale], arguments.length); - if (locale === undefined) { - this[kGuessLocale](); - return __classPrivateFieldGet(this, _YargsInstance_shim, "f").y18n.getLocale(); - } - __classPrivateFieldSet(this, _YargsInstance_detectLocale, false, "f"); - __classPrivateFieldGet(this, _YargsInstance_shim, "f").y18n.setLocale(locale); - return this; - } - middleware(callback, applyBeforeValidation, global) { - return __classPrivateFieldGet(this, _YargsInstance_globalMiddleware, "f").addMiddleware(callback, !!applyBeforeValidation, global); - } - nargs(key, value) { - argsert('<string|object|array> [number]', [key, value], arguments.length); - this[kPopulateParserHintSingleValueDictionary](this.nargs.bind(this), 'narg', key, value); - return this; - } - normalize(keys) { - argsert('<array|string>', [keys], arguments.length); - this[kPopulateParserHintArray]('normalize', keys); - return this; - } - number(keys) { - argsert('<array|string>', [keys], arguments.length); - this[kPopulateParserHintArray]('number', keys); - this[kTrackManuallySetKeys](keys); - return this; - } - option(key, opt) { - argsert('<string|object> [object]', [key, opt], arguments.length); - if (typeof key === 'object') { - Object.keys(key).forEach(k => { - this.options(k, key[k]); - }); - } - else { - if (typeof opt !== 'object') { - opt = {}; - } - this[kTrackManuallySetKeys](key); - if (__classPrivateFieldGet(this, _YargsInstance_versionOpt, "f") && (key === 'version' || (opt === null || opt === void 0 ? void 0 : opt.alias) === 'version')) { - this[kEmitWarning]([ - '"version" is a reserved word.', - 'Please do one of the following:', - '- Disable version with `yargs.version(false)` if using "version" as an option', - '- Use the built-in `yargs.version` method instead (if applicable)', - '- Use a different option key', - 'https://yargs.js.org/docs/#api-reference-version', - ].join('\n'), undefined, 'versionWarning'); - } - __classPrivateFieldGet(this, _YargsInstance_options, "f").key[key] = true; - if (opt.alias) - this.alias(key, opt.alias); - const deprecate = opt.deprecate || opt.deprecated; - if (deprecate) { - this.deprecateOption(key, deprecate); - } - const demand = opt.demand || opt.required || opt.require; - if (demand) { - this.demand(key, demand); - } - if (opt.demandOption) { - this.demandOption(key, typeof opt.demandOption === 'string' ? opt.demandOption : undefined); - } - if (opt.conflicts) { - this.conflicts(key, opt.conflicts); - } - if ('default' in opt) { - this.default(key, opt.default); - } - if (opt.implies !== undefined) { - this.implies(key, opt.implies); - } - if (opt.nargs !== undefined) { - this.nargs(key, opt.nargs); - } - if (opt.config) { - this.config(key, opt.configParser); - } - if (opt.normalize) { - this.normalize(key); - } - if (opt.choices) { - this.choices(key, opt.choices); - } - if (opt.coerce) { - this.coerce(key, opt.coerce); - } - if (opt.group) { - this.group(key, opt.group); - } - if (opt.boolean || opt.type === 'boolean') { - this.boolean(key); - if (opt.alias) - this.boolean(opt.alias); - } - if (opt.array || opt.type === 'array') { - this.array(key); - if (opt.alias) - this.array(opt.alias); - } - if (opt.number || opt.type === 'number') { - this.number(key); - if (opt.alias) - this.number(opt.alias); - } - if (opt.string || opt.type === 'string') { - this.string(key); - if (opt.alias) - this.string(opt.alias); - } - if (opt.count || opt.type === 'count') { - this.count(key); - } - if (typeof opt.global === 'boolean') { - this.global(key, opt.global); - } - if (opt.defaultDescription) { - __classPrivateFieldGet(this, _YargsInstance_options, "f").defaultDescription[key] = opt.defaultDescription; - } - if (opt.skipValidation) { - this.skipValidation(key); - } - const desc = opt.describe || opt.description || opt.desc; - const descriptions = __classPrivateFieldGet(this, _YargsInstance_usage, "f").getDescriptions(); - if (!Object.prototype.hasOwnProperty.call(descriptions, key) || - typeof desc === 'string') { - this.describe(key, desc); - } - if (opt.hidden) { - this.hide(key); - } - if (opt.requiresArg) { - this.requiresArg(key); - } - } - return this; - } - options(key, opt) { - return this.option(key, opt); - } - parse(args, shortCircuit, _parseFn) { - argsert('[string|array] [function|boolean|object] [function]', [args, shortCircuit, _parseFn], arguments.length); - this[kFreeze](); - if (typeof args === 'undefined') { - args = __classPrivateFieldGet(this, _YargsInstance_processArgs, "f"); - } - if (typeof shortCircuit === 'object') { - __classPrivateFieldSet(this, _YargsInstance_parseContext, shortCircuit, "f"); - shortCircuit = _parseFn; - } - if (typeof shortCircuit === 'function') { - __classPrivateFieldSet(this, _YargsInstance_parseFn, shortCircuit, "f"); - shortCircuit = false; - } - if (!shortCircuit) - __classPrivateFieldSet(this, _YargsInstance_processArgs, args, "f"); - if (__classPrivateFieldGet(this, _YargsInstance_parseFn, "f")) - __classPrivateFieldSet(this, _YargsInstance_exitProcess, false, "f"); - const parsed = this[kRunYargsParserAndExecuteCommands](args, !!shortCircuit); - const tmpParsed = this.parsed; - __classPrivateFieldGet(this, _YargsInstance_completion, "f").setParsed(this.parsed); - if (isPromise(parsed)) { - return parsed - .then(argv => { - if (__classPrivateFieldGet(this, _YargsInstance_parseFn, "f")) - __classPrivateFieldGet(this, _YargsInstance_parseFn, "f").call(this, __classPrivateFieldGet(this, _YargsInstance_exitError, "f"), argv, __classPrivateFieldGet(this, _YargsInstance_output, "f")); - return argv; - }) - .catch(err => { - if (__classPrivateFieldGet(this, _YargsInstance_parseFn, "f")) { - __classPrivateFieldGet(this, _YargsInstance_parseFn, "f")(err, this.parsed.argv, __classPrivateFieldGet(this, _YargsInstance_output, "f")); - } - throw err; - }) - .finally(() => { - this[kUnfreeze](); - this.parsed = tmpParsed; - }); - } - else { - if (__classPrivateFieldGet(this, _YargsInstance_parseFn, "f")) - __classPrivateFieldGet(this, _YargsInstance_parseFn, "f").call(this, __classPrivateFieldGet(this, _YargsInstance_exitError, "f"), parsed, __classPrivateFieldGet(this, _YargsInstance_output, "f")); - this[kUnfreeze](); - this.parsed = tmpParsed; - } - return parsed; - } - parseAsync(args, shortCircuit, _parseFn) { - const maybePromise = this.parse(args, shortCircuit, _parseFn); - return !isPromise(maybePromise) - ? Promise.resolve(maybePromise) - : maybePromise; - } - parseSync(args, shortCircuit, _parseFn) { - const maybePromise = this.parse(args, shortCircuit, _parseFn); - if (isPromise(maybePromise)) { - throw new YError('.parseSync() must not be used with asynchronous builders, handlers, or middleware'); - } - return maybePromise; - } - parserConfiguration(config) { - argsert('<object>', [config], arguments.length); - __classPrivateFieldSet(this, _YargsInstance_parserConfig, config, "f"); - return this; - } - pkgConf(key, rootPath) { - argsert('<string> [string]', [key, rootPath], arguments.length); - let conf = null; - const obj = this[kPkgUp](rootPath || __classPrivateFieldGet(this, _YargsInstance_cwd, "f")); - if (obj[key] && typeof obj[key] === 'object') { - conf = applyExtends(obj[key], rootPath || __classPrivateFieldGet(this, _YargsInstance_cwd, "f"), this[kGetParserConfiguration]()['deep-merge-config'] || false, __classPrivateFieldGet(this, _YargsInstance_shim, "f")); - __classPrivateFieldGet(this, _YargsInstance_options, "f").configObjects = (__classPrivateFieldGet(this, _YargsInstance_options, "f").configObjects || []).concat(conf); - } - return this; - } - positional(key, opts) { - argsert('<string> <object>', [key, opts], arguments.length); - const supportedOpts = [ - 'default', - 'defaultDescription', - 'implies', - 'normalize', - 'choices', - 'conflicts', - 'coerce', - 'type', - 'describe', - 'desc', - 'description', - 'alias', - ]; - opts = objFilter(opts, (k, v) => { - if (k === 'type' && !['string', 'number', 'boolean'].includes(v)) - return false; - return supportedOpts.includes(k); - }); - const fullCommand = __classPrivateFieldGet(this, _YargsInstance_context, "f").fullCommands[__classPrivateFieldGet(this, _YargsInstance_context, "f").fullCommands.length - 1]; - const parseOptions = fullCommand - ? __classPrivateFieldGet(this, _YargsInstance_command, "f").cmdToParseOptions(fullCommand) - : { - array: [], - alias: {}, - default: {}, - demand: {}, - }; - objectKeys(parseOptions).forEach(pk => { - const parseOption = parseOptions[pk]; - if (Array.isArray(parseOption)) { - if (parseOption.indexOf(key) !== -1) - opts[pk] = true; - } - else { - if (parseOption[key] && !(pk in opts)) - opts[pk] = parseOption[key]; - } - }); - this.group(key, __classPrivateFieldGet(this, _YargsInstance_usage, "f").getPositionalGroupName()); - return this.option(key, opts); - } - recommendCommands(recommend = true) { - argsert('[boolean]', [recommend], arguments.length); - __classPrivateFieldSet(this, _YargsInstance_recommendCommands, recommend, "f"); - return this; - } - required(keys, max, msg) { - return this.demand(keys, max, msg); - } - require(keys, max, msg) { - return this.demand(keys, max, msg); - } - requiresArg(keys) { - argsert('<array|string|object> [number]', [keys], arguments.length); - if (typeof keys === 'string' && __classPrivateFieldGet(this, _YargsInstance_options, "f").narg[keys]) { - return this; - } - else { - this[kPopulateParserHintSingleValueDictionary](this.requiresArg.bind(this), 'narg', keys, NaN); - } - return this; - } - showCompletionScript($0, cmd) { - argsert('[string] [string]', [$0, cmd], arguments.length); - $0 = $0 || this.$0; - __classPrivateFieldGet(this, _YargsInstance_logger, "f").log(__classPrivateFieldGet(this, _YargsInstance_completion, "f").generateCompletionScript($0, cmd || __classPrivateFieldGet(this, _YargsInstance_completionCommand, "f") || 'completion')); - return this; - } - showHelp(level) { - argsert('[string|function]', [level], arguments.length); - __classPrivateFieldSet(this, _YargsInstance_hasOutput, true, "f"); - if (!__classPrivateFieldGet(this, _YargsInstance_usage, "f").hasCachedHelpMessage()) { - if (!this.parsed) { - const parse = this[kRunYargsParserAndExecuteCommands](__classPrivateFieldGet(this, _YargsInstance_processArgs, "f"), undefined, undefined, 0, true); - if (isPromise(parse)) { - parse.then(() => { - __classPrivateFieldGet(this, _YargsInstance_usage, "f").showHelp(level); - }); - return this; - } - } - const builderResponse = __classPrivateFieldGet(this, _YargsInstance_command, "f").runDefaultBuilderOn(this); - if (isPromise(builderResponse)) { - builderResponse.then(() => { - __classPrivateFieldGet(this, _YargsInstance_usage, "f").showHelp(level); - }); - return this; - } - } - __classPrivateFieldGet(this, _YargsInstance_usage, "f").showHelp(level); - return this; - } - scriptName(scriptName) { - this.customScriptName = true; - this.$0 = scriptName; - return this; - } - showHelpOnFail(enabled, message) { - argsert('[boolean|string] [string]', [enabled, message], arguments.length); - __classPrivateFieldGet(this, _YargsInstance_usage, "f").showHelpOnFail(enabled, message); - return this; - } - showVersion(level) { - argsert('[string|function]', [level], arguments.length); - __classPrivateFieldGet(this, _YargsInstance_usage, "f").showVersion(level); - return this; - } - skipValidation(keys) { - argsert('<array|string>', [keys], arguments.length); - this[kPopulateParserHintArray]('skipValidation', keys); - return this; - } - strict(enabled) { - argsert('[boolean]', [enabled], arguments.length); - __classPrivateFieldSet(this, _YargsInstance_strict, enabled !== false, "f"); - return this; - } - strictCommands(enabled) { - argsert('[boolean]', [enabled], arguments.length); - __classPrivateFieldSet(this, _YargsInstance_strictCommands, enabled !== false, "f"); - return this; - } - strictOptions(enabled) { - argsert('[boolean]', [enabled], arguments.length); - __classPrivateFieldSet(this, _YargsInstance_strictOptions, enabled !== false, "f"); - return this; - } - string(keys) { - argsert('<array|string>', [keys], arguments.length); - this[kPopulateParserHintArray]('string', keys); - this[kTrackManuallySetKeys](keys); - return this; - } - terminalWidth() { - argsert([], 0); - return __classPrivateFieldGet(this, _YargsInstance_shim, "f").process.stdColumns; - } - updateLocale(obj) { - return this.updateStrings(obj); - } - updateStrings(obj) { - argsert('<object>', [obj], arguments.length); - __classPrivateFieldSet(this, _YargsInstance_detectLocale, false, "f"); - __classPrivateFieldGet(this, _YargsInstance_shim, "f").y18n.updateLocale(obj); - return this; - } - usage(msg, description, builder, handler) { - argsert('<string|null|undefined> [string|boolean] [function|object] [function]', [msg, description, builder, handler], arguments.length); - if (description !== undefined) { - assertNotStrictEqual(msg, null, __classPrivateFieldGet(this, _YargsInstance_shim, "f")); - if ((msg || '').match(/^\$0( |$)/)) { - return this.command(msg, description, builder, handler); - } - else { - throw new YError('.usage() description must start with $0 if being used as alias for .command()'); - } - } - else { - __classPrivateFieldGet(this, _YargsInstance_usage, "f").usage(msg); - return this; - } - } - usageConfiguration(config) { - argsert('<object>', [config], arguments.length); - __classPrivateFieldSet(this, _YargsInstance_usageConfig, config, "f"); - return this; - } - version(opt, msg, ver) { - const defaultVersionOpt = 'version'; - argsert('[boolean|string] [string] [string]', [opt, msg, ver], arguments.length); - if (__classPrivateFieldGet(this, _YargsInstance_versionOpt, "f")) { - this[kDeleteFromParserHintObject](__classPrivateFieldGet(this, _YargsInstance_versionOpt, "f")); - __classPrivateFieldGet(this, _YargsInstance_usage, "f").version(undefined); - __classPrivateFieldSet(this, _YargsInstance_versionOpt, null, "f"); - } - if (arguments.length === 0) { - ver = this[kGuessVersion](); - opt = defaultVersionOpt; - } - else if (arguments.length === 1) { - if (opt === false) { - return this; - } - ver = opt; - opt = defaultVersionOpt; - } - else if (arguments.length === 2) { - ver = msg; - msg = undefined; - } - __classPrivateFieldSet(this, _YargsInstance_versionOpt, typeof opt === 'string' ? opt : defaultVersionOpt, "f"); - msg = msg || __classPrivateFieldGet(this, _YargsInstance_usage, "f").deferY18nLookup('Show version number'); - __classPrivateFieldGet(this, _YargsInstance_usage, "f").version(ver || undefined); - this.boolean(__classPrivateFieldGet(this, _YargsInstance_versionOpt, "f")); - this.describe(__classPrivateFieldGet(this, _YargsInstance_versionOpt, "f"), msg); - return this; - } - wrap(cols) { - argsert('<number|null|undefined>', [cols], arguments.length); - __classPrivateFieldGet(this, _YargsInstance_usage, "f").wrap(cols); - return this; - } - [(_YargsInstance_command = new WeakMap(), _YargsInstance_cwd = new WeakMap(), _YargsInstance_context = new WeakMap(), _YargsInstance_completion = new WeakMap(), _YargsInstance_completionCommand = new WeakMap(), _YargsInstance_defaultShowHiddenOpt = new WeakMap(), _YargsInstance_exitError = new WeakMap(), _YargsInstance_detectLocale = new WeakMap(), _YargsInstance_emittedWarnings = new WeakMap(), _YargsInstance_exitProcess = new WeakMap(), _YargsInstance_frozens = new WeakMap(), _YargsInstance_globalMiddleware = new WeakMap(), _YargsInstance_groups = new WeakMap(), _YargsInstance_hasOutput = new WeakMap(), _YargsInstance_helpOpt = new WeakMap(), _YargsInstance_isGlobalContext = new WeakMap(), _YargsInstance_logger = new WeakMap(), _YargsInstance_output = new WeakMap(), _YargsInstance_options = new WeakMap(), _YargsInstance_parentRequire = new WeakMap(), _YargsInstance_parserConfig = new WeakMap(), _YargsInstance_parseFn = new WeakMap(), _YargsInstance_parseContext = new WeakMap(), _YargsInstance_pkgs = new WeakMap(), _YargsInstance_preservedGroups = new WeakMap(), _YargsInstance_processArgs = new WeakMap(), _YargsInstance_recommendCommands = new WeakMap(), _YargsInstance_shim = new WeakMap(), _YargsInstance_strict = new WeakMap(), _YargsInstance_strictCommands = new WeakMap(), _YargsInstance_strictOptions = new WeakMap(), _YargsInstance_usage = new WeakMap(), _YargsInstance_usageConfig = new WeakMap(), _YargsInstance_versionOpt = new WeakMap(), _YargsInstance_validation = new WeakMap(), kCopyDoubleDash)](argv) { - if (!argv._ || !argv['--']) - return argv; - argv._.push.apply(argv._, argv['--']); - try { - delete argv['--']; - } - catch (_err) { } - return argv; - } - [kCreateLogger]() { - return { - log: (...args) => { - if (!this[kHasParseCallback]()) - console.log(...args); - __classPrivateFieldSet(this, _YargsInstance_hasOutput, true, "f"); - if (__classPrivateFieldGet(this, _YargsInstance_output, "f").length) - __classPrivateFieldSet(this, _YargsInstance_output, __classPrivateFieldGet(this, _YargsInstance_output, "f") + '\n', "f"); - __classPrivateFieldSet(this, _YargsInstance_output, __classPrivateFieldGet(this, _YargsInstance_output, "f") + args.join(' '), "f"); - }, - error: (...args) => { - if (!this[kHasParseCallback]()) - console.error(...args); - __classPrivateFieldSet(this, _YargsInstance_hasOutput, true, "f"); - if (__classPrivateFieldGet(this, _YargsInstance_output, "f").length) - __classPrivateFieldSet(this, _YargsInstance_output, __classPrivateFieldGet(this, _YargsInstance_output, "f") + '\n', "f"); - __classPrivateFieldSet(this, _YargsInstance_output, __classPrivateFieldGet(this, _YargsInstance_output, "f") + args.join(' '), "f"); - }, - }; - } - [kDeleteFromParserHintObject](optionKey) { - objectKeys(__classPrivateFieldGet(this, _YargsInstance_options, "f")).forEach((hintKey) => { - if (((key) => key === 'configObjects')(hintKey)) - return; - const hint = __classPrivateFieldGet(this, _YargsInstance_options, "f")[hintKey]; - if (Array.isArray(hint)) { - if (hint.includes(optionKey)) - hint.splice(hint.indexOf(optionKey), 1); - } - else if (typeof hint === 'object') { - delete hint[optionKey]; - } - }); - delete __classPrivateFieldGet(this, _YargsInstance_usage, "f").getDescriptions()[optionKey]; - } - [kEmitWarning](warning, type, deduplicationId) { - if (!__classPrivateFieldGet(this, _YargsInstance_emittedWarnings, "f")[deduplicationId]) { - __classPrivateFieldGet(this, _YargsInstance_shim, "f").process.emitWarning(warning, type); - __classPrivateFieldGet(this, _YargsInstance_emittedWarnings, "f")[deduplicationId] = true; - } - } - [kFreeze]() { - __classPrivateFieldGet(this, _YargsInstance_frozens, "f").push({ - options: __classPrivateFieldGet(this, _YargsInstance_options, "f"), - configObjects: __classPrivateFieldGet(this, _YargsInstance_options, "f").configObjects.slice(0), - exitProcess: __classPrivateFieldGet(this, _YargsInstance_exitProcess, "f"), - groups: __classPrivateFieldGet(this, _YargsInstance_groups, "f"), - strict: __classPrivateFieldGet(this, _YargsInstance_strict, "f"), - strictCommands: __classPrivateFieldGet(this, _YargsInstance_strictCommands, "f"), - strictOptions: __classPrivateFieldGet(this, _YargsInstance_strictOptions, "f"), - completionCommand: __classPrivateFieldGet(this, _YargsInstance_completionCommand, "f"), - output: __classPrivateFieldGet(this, _YargsInstance_output, "f"), - exitError: __classPrivateFieldGet(this, _YargsInstance_exitError, "f"), - hasOutput: __classPrivateFieldGet(this, _YargsInstance_hasOutput, "f"), - parsed: this.parsed, - parseFn: __classPrivateFieldGet(this, _YargsInstance_parseFn, "f"), - parseContext: __classPrivateFieldGet(this, _YargsInstance_parseContext, "f"), - }); - __classPrivateFieldGet(this, _YargsInstance_usage, "f").freeze(); - __classPrivateFieldGet(this, _YargsInstance_validation, "f").freeze(); - __classPrivateFieldGet(this, _YargsInstance_command, "f").freeze(); - __classPrivateFieldGet(this, _YargsInstance_globalMiddleware, "f").freeze(); - } - [kGetDollarZero]() { - let $0 = ''; - let default$0; - if (/\b(node|iojs|electron)(\.exe)?$/.test(__classPrivateFieldGet(this, _YargsInstance_shim, "f").process.argv()[0])) { - default$0 = __classPrivateFieldGet(this, _YargsInstance_shim, "f").process.argv().slice(1, 2); - } - else { - default$0 = __classPrivateFieldGet(this, _YargsInstance_shim, "f").process.argv().slice(0, 1); - } - $0 = default$0 - .map(x => { - const b = this[kRebase](__classPrivateFieldGet(this, _YargsInstance_cwd, "f"), x); - return x.match(/^(\/|([a-zA-Z]:)?\\)/) && b.length < x.length ? b : x; - }) - .join(' ') - .trim(); - if (__classPrivateFieldGet(this, _YargsInstance_shim, "f").getEnv('_') && - __classPrivateFieldGet(this, _YargsInstance_shim, "f").getProcessArgvBin() === __classPrivateFieldGet(this, _YargsInstance_shim, "f").getEnv('_')) { - $0 = __classPrivateFieldGet(this, _YargsInstance_shim, "f") - .getEnv('_') - .replace(`${__classPrivateFieldGet(this, _YargsInstance_shim, "f").path.dirname(__classPrivateFieldGet(this, _YargsInstance_shim, "f").process.execPath())}/`, ''); - } - return $0; - } - [kGetParserConfiguration]() { - return __classPrivateFieldGet(this, _YargsInstance_parserConfig, "f"); - } - [kGetUsageConfiguration]() { - return __classPrivateFieldGet(this, _YargsInstance_usageConfig, "f"); - } - [kGuessLocale]() { - if (!__classPrivateFieldGet(this, _YargsInstance_detectLocale, "f")) - return; - const locale = __classPrivateFieldGet(this, _YargsInstance_shim, "f").getEnv('LC_ALL') || - __classPrivateFieldGet(this, _YargsInstance_shim, "f").getEnv('LC_MESSAGES') || - __classPrivateFieldGet(this, _YargsInstance_shim, "f").getEnv('LANG') || - __classPrivateFieldGet(this, _YargsInstance_shim, "f").getEnv('LANGUAGE') || - 'en_US'; - this.locale(locale.replace(/[.:].*/, '')); - } - [kGuessVersion]() { - const obj = this[kPkgUp](); - return obj.version || 'unknown'; - } - [kParsePositionalNumbers](argv) { - const args = argv['--'] ? argv['--'] : argv._; - for (let i = 0, arg; (arg = args[i]) !== undefined; i++) { - if (__classPrivateFieldGet(this, _YargsInstance_shim, "f").Parser.looksLikeNumber(arg) && - Number.isSafeInteger(Math.floor(parseFloat(`${arg}`)))) { - args[i] = Number(arg); - } - } - return argv; - } - [kPkgUp](rootPath) { - const npath = rootPath || '*'; - if (__classPrivateFieldGet(this, _YargsInstance_pkgs, "f")[npath]) - return __classPrivateFieldGet(this, _YargsInstance_pkgs, "f")[npath]; - let obj = {}; - try { - let startDir = rootPath || __classPrivateFieldGet(this, _YargsInstance_shim, "f").mainFilename; - if (!rootPath && __classPrivateFieldGet(this, _YargsInstance_shim, "f").path.extname(startDir)) { - startDir = __classPrivateFieldGet(this, _YargsInstance_shim, "f").path.dirname(startDir); - } - const pkgJsonPath = __classPrivateFieldGet(this, _YargsInstance_shim, "f").findUp(startDir, (dir, names) => { - if (names.includes('package.json')) { - return 'package.json'; - } - else { - return undefined; - } - }); - assertNotStrictEqual(pkgJsonPath, undefined, __classPrivateFieldGet(this, _YargsInstance_shim, "f")); - obj = JSON.parse(__classPrivateFieldGet(this, _YargsInstance_shim, "f").readFileSync(pkgJsonPath, 'utf8')); - } - catch (_noop) { } - __classPrivateFieldGet(this, _YargsInstance_pkgs, "f")[npath] = obj || {}; - return __classPrivateFieldGet(this, _YargsInstance_pkgs, "f")[npath]; - } - [kPopulateParserHintArray](type, keys) { - keys = [].concat(keys); - keys.forEach(key => { - key = this[kSanitizeKey](key); - __classPrivateFieldGet(this, _YargsInstance_options, "f")[type].push(key); - }); - } - [kPopulateParserHintSingleValueDictionary](builder, type, key, value) { - this[kPopulateParserHintDictionary](builder, type, key, value, (type, key, value) => { - __classPrivateFieldGet(this, _YargsInstance_options, "f")[type][key] = value; - }); - } - [kPopulateParserHintArrayDictionary](builder, type, key, value) { - this[kPopulateParserHintDictionary](builder, type, key, value, (type, key, value) => { - __classPrivateFieldGet(this, _YargsInstance_options, "f")[type][key] = (__classPrivateFieldGet(this, _YargsInstance_options, "f")[type][key] || []).concat(value); - }); - } - [kPopulateParserHintDictionary](builder, type, key, value, singleKeyHandler) { - if (Array.isArray(key)) { - key.forEach(k => { - builder(k, value); - }); - } - else if (((key) => typeof key === 'object')(key)) { - for (const k of objectKeys(key)) { - builder(k, key[k]); - } - } - else { - singleKeyHandler(type, this[kSanitizeKey](key), value); - } - } - [kSanitizeKey](key) { - if (key === '__proto__') - return '___proto___'; - return key; - } - [kSetKey](key, set) { - this[kPopulateParserHintSingleValueDictionary](this[kSetKey].bind(this), 'key', key, set); - return this; - } - [kUnfreeze]() { - var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m; - const frozen = __classPrivateFieldGet(this, _YargsInstance_frozens, "f").pop(); - assertNotStrictEqual(frozen, undefined, __classPrivateFieldGet(this, _YargsInstance_shim, "f")); - let configObjects; - (_a = this, _b = this, _c = this, _d = this, _e = this, _f = this, _g = this, _h = this, _j = this, _k = this, _l = this, _m = this, { - options: ({ set value(_o) { __classPrivateFieldSet(_a, _YargsInstance_options, _o, "f"); } }).value, - configObjects, - exitProcess: ({ set value(_o) { __classPrivateFieldSet(_b, _YargsInstance_exitProcess, _o, "f"); } }).value, - groups: ({ set value(_o) { __classPrivateFieldSet(_c, _YargsInstance_groups, _o, "f"); } }).value, - output: ({ set value(_o) { __classPrivateFieldSet(_d, _YargsInstance_output, _o, "f"); } }).value, - exitError: ({ set value(_o) { __classPrivateFieldSet(_e, _YargsInstance_exitError, _o, "f"); } }).value, - hasOutput: ({ set value(_o) { __classPrivateFieldSet(_f, _YargsInstance_hasOutput, _o, "f"); } }).value, - parsed: this.parsed, - strict: ({ set value(_o) { __classPrivateFieldSet(_g, _YargsInstance_strict, _o, "f"); } }).value, - strictCommands: ({ set value(_o) { __classPrivateFieldSet(_h, _YargsInstance_strictCommands, _o, "f"); } }).value, - strictOptions: ({ set value(_o) { __classPrivateFieldSet(_j, _YargsInstance_strictOptions, _o, "f"); } }).value, - completionCommand: ({ set value(_o) { __classPrivateFieldSet(_k, _YargsInstance_completionCommand, _o, "f"); } }).value, - parseFn: ({ set value(_o) { __classPrivateFieldSet(_l, _YargsInstance_parseFn, _o, "f"); } }).value, - parseContext: ({ set value(_o) { __classPrivateFieldSet(_m, _YargsInstance_parseContext, _o, "f"); } }).value, - } = frozen); - __classPrivateFieldGet(this, _YargsInstance_options, "f").configObjects = configObjects; - __classPrivateFieldGet(this, _YargsInstance_usage, "f").unfreeze(); - __classPrivateFieldGet(this, _YargsInstance_validation, "f").unfreeze(); - __classPrivateFieldGet(this, _YargsInstance_command, "f").unfreeze(); - __classPrivateFieldGet(this, _YargsInstance_globalMiddleware, "f").unfreeze(); - } - [kValidateAsync](validation, argv) { - return maybeAsyncResult(argv, result => { - validation(result); - return result; - }); - } - getInternalMethods() { - return { - getCommandInstance: this[kGetCommandInstance].bind(this), - getContext: this[kGetContext].bind(this), - getHasOutput: this[kGetHasOutput].bind(this), - getLoggerInstance: this[kGetLoggerInstance].bind(this), - getParseContext: this[kGetParseContext].bind(this), - getParserConfiguration: this[kGetParserConfiguration].bind(this), - getUsageConfiguration: this[kGetUsageConfiguration].bind(this), - getUsageInstance: this[kGetUsageInstance].bind(this), - getValidationInstance: this[kGetValidationInstance].bind(this), - hasParseCallback: this[kHasParseCallback].bind(this), - isGlobalContext: this[kIsGlobalContext].bind(this), - postProcess: this[kPostProcess].bind(this), - reset: this[kReset].bind(this), - runValidation: this[kRunValidation].bind(this), - runYargsParserAndExecuteCommands: this[kRunYargsParserAndExecuteCommands].bind(this), - setHasOutput: this[kSetHasOutput].bind(this), - }; - } - [kGetCommandInstance]() { - return __classPrivateFieldGet(this, _YargsInstance_command, "f"); - } - [kGetContext]() { - return __classPrivateFieldGet(this, _YargsInstance_context, "f"); - } - [kGetHasOutput]() { - return __classPrivateFieldGet(this, _YargsInstance_hasOutput, "f"); - } - [kGetLoggerInstance]() { - return __classPrivateFieldGet(this, _YargsInstance_logger, "f"); - } - [kGetParseContext]() { - return __classPrivateFieldGet(this, _YargsInstance_parseContext, "f") || {}; - } - [kGetUsageInstance]() { - return __classPrivateFieldGet(this, _YargsInstance_usage, "f"); - } - [kGetValidationInstance]() { - return __classPrivateFieldGet(this, _YargsInstance_validation, "f"); - } - [kHasParseCallback]() { - return !!__classPrivateFieldGet(this, _YargsInstance_parseFn, "f"); - } - [kIsGlobalContext]() { - return __classPrivateFieldGet(this, _YargsInstance_isGlobalContext, "f"); - } - [kPostProcess](argv, populateDoubleDash, calledFromCommand, runGlobalMiddleware) { - if (calledFromCommand) - return argv; - if (isPromise(argv)) - return argv; - if (!populateDoubleDash) { - argv = this[kCopyDoubleDash](argv); - } - const parsePositionalNumbers = this[kGetParserConfiguration]()['parse-positional-numbers'] || - this[kGetParserConfiguration]()['parse-positional-numbers'] === undefined; - if (parsePositionalNumbers) { - argv = this[kParsePositionalNumbers](argv); - } - if (runGlobalMiddleware) { - argv = applyMiddleware(argv, this, __classPrivateFieldGet(this, _YargsInstance_globalMiddleware, "f").getMiddleware(), false); - } - return argv; - } - [kReset](aliases = {}) { - __classPrivateFieldSet(this, _YargsInstance_options, __classPrivateFieldGet(this, _YargsInstance_options, "f") || {}, "f"); - const tmpOptions = {}; - tmpOptions.local = __classPrivateFieldGet(this, _YargsInstance_options, "f").local || []; - tmpOptions.configObjects = __classPrivateFieldGet(this, _YargsInstance_options, "f").configObjects || []; - const localLookup = {}; - tmpOptions.local.forEach(l => { - localLookup[l] = true; - (aliases[l] || []).forEach(a => { - localLookup[a] = true; - }); - }); - Object.assign(__classPrivateFieldGet(this, _YargsInstance_preservedGroups, "f"), Object.keys(__classPrivateFieldGet(this, _YargsInstance_groups, "f")).reduce((acc, groupName) => { - const keys = __classPrivateFieldGet(this, _YargsInstance_groups, "f")[groupName].filter(key => !(key in localLookup)); - if (keys.length > 0) { - acc[groupName] = keys; - } - return acc; - }, {})); - __classPrivateFieldSet(this, _YargsInstance_groups, {}, "f"); - const arrayOptions = [ - 'array', - 'boolean', - 'string', - 'skipValidation', - 'count', - 'normalize', - 'number', - 'hiddenOptions', - ]; - const objectOptions = [ - 'narg', - 'key', - 'alias', - 'default', - 'defaultDescription', - 'config', - 'choices', - 'demandedOptions', - 'demandedCommands', - 'deprecatedOptions', - ]; - arrayOptions.forEach(k => { - tmpOptions[k] = (__classPrivateFieldGet(this, _YargsInstance_options, "f")[k] || []).filter((k) => !localLookup[k]); - }); - objectOptions.forEach((k) => { - tmpOptions[k] = objFilter(__classPrivateFieldGet(this, _YargsInstance_options, "f")[k], k => !localLookup[k]); - }); - tmpOptions.envPrefix = __classPrivateFieldGet(this, _YargsInstance_options, "f").envPrefix; - __classPrivateFieldSet(this, _YargsInstance_options, tmpOptions, "f"); - __classPrivateFieldSet(this, _YargsInstance_usage, __classPrivateFieldGet(this, _YargsInstance_usage, "f") - ? __classPrivateFieldGet(this, _YargsInstance_usage, "f").reset(localLookup) - : Usage(this, __classPrivateFieldGet(this, _YargsInstance_shim, "f")), "f"); - __classPrivateFieldSet(this, _YargsInstance_validation, __classPrivateFieldGet(this, _YargsInstance_validation, "f") - ? __classPrivateFieldGet(this, _YargsInstance_validation, "f").reset(localLookup) - : Validation(this, __classPrivateFieldGet(this, _YargsInstance_usage, "f"), __classPrivateFieldGet(this, _YargsInstance_shim, "f")), "f"); - __classPrivateFieldSet(this, _YargsInstance_command, __classPrivateFieldGet(this, _YargsInstance_command, "f") - ? __classPrivateFieldGet(this, _YargsInstance_command, "f").reset() - : Command(__classPrivateFieldGet(this, _YargsInstance_usage, "f"), __classPrivateFieldGet(this, _YargsInstance_validation, "f"), __classPrivateFieldGet(this, _YargsInstance_globalMiddleware, "f"), __classPrivateFieldGet(this, _YargsInstance_shim, "f")), "f"); - if (!__classPrivateFieldGet(this, _YargsInstance_completion, "f")) - __classPrivateFieldSet(this, _YargsInstance_completion, Completion(this, __classPrivateFieldGet(this, _YargsInstance_usage, "f"), __classPrivateFieldGet(this, _YargsInstance_command, "f"), __classPrivateFieldGet(this, _YargsInstance_shim, "f")), "f"); - __classPrivateFieldGet(this, _YargsInstance_globalMiddleware, "f").reset(); - __classPrivateFieldSet(this, _YargsInstance_completionCommand, null, "f"); - __classPrivateFieldSet(this, _YargsInstance_output, '', "f"); - __classPrivateFieldSet(this, _YargsInstance_exitError, null, "f"); - __classPrivateFieldSet(this, _YargsInstance_hasOutput, false, "f"); - this.parsed = false; - return this; - } - [kRebase](base, dir) { - return __classPrivateFieldGet(this, _YargsInstance_shim, "f").path.relative(base, dir); - } - [kRunYargsParserAndExecuteCommands](args, shortCircuit, calledFromCommand, commandIndex = 0, helpOnly = false) { - let skipValidation = !!calledFromCommand || helpOnly; - args = args || __classPrivateFieldGet(this, _YargsInstance_processArgs, "f"); - __classPrivateFieldGet(this, _YargsInstance_options, "f").__ = __classPrivateFieldGet(this, _YargsInstance_shim, "f").y18n.__; - __classPrivateFieldGet(this, _YargsInstance_options, "f").configuration = this[kGetParserConfiguration](); - const populateDoubleDash = !!__classPrivateFieldGet(this, _YargsInstance_options, "f").configuration['populate--']; - const config = Object.assign({}, __classPrivateFieldGet(this, _YargsInstance_options, "f").configuration, { - 'populate--': true, - }); - const parsed = __classPrivateFieldGet(this, _YargsInstance_shim, "f").Parser.detailed(args, Object.assign({}, __classPrivateFieldGet(this, _YargsInstance_options, "f"), { - configuration: { 'parse-positional-numbers': false, ...config }, - })); - const argv = Object.assign(parsed.argv, __classPrivateFieldGet(this, _YargsInstance_parseContext, "f")); - let argvPromise = undefined; - const aliases = parsed.aliases; - let helpOptSet = false; - let versionOptSet = false; - Object.keys(argv).forEach(key => { - if (key === __classPrivateFieldGet(this, _YargsInstance_helpOpt, "f") && argv[key]) { - helpOptSet = true; - } - else if (key === __classPrivateFieldGet(this, _YargsInstance_versionOpt, "f") && argv[key]) { - versionOptSet = true; - } - }); - argv.$0 = this.$0; - this.parsed = parsed; - if (commandIndex === 0) { - __classPrivateFieldGet(this, _YargsInstance_usage, "f").clearCachedHelpMessage(); - } - try { - this[kGuessLocale](); - if (shortCircuit) { - return this[kPostProcess](argv, populateDoubleDash, !!calledFromCommand, false); - } - if (__classPrivateFieldGet(this, _YargsInstance_helpOpt, "f")) { - const helpCmds = [__classPrivateFieldGet(this, _YargsInstance_helpOpt, "f")] - .concat(aliases[__classPrivateFieldGet(this, _YargsInstance_helpOpt, "f")] || []) - .filter(k => k.length > 1); - if (helpCmds.includes('' + argv._[argv._.length - 1])) { - argv._.pop(); - helpOptSet = true; - } - } - __classPrivateFieldSet(this, _YargsInstance_isGlobalContext, false, "f"); - const handlerKeys = __classPrivateFieldGet(this, _YargsInstance_command, "f").getCommands(); - const requestCompletions = __classPrivateFieldGet(this, _YargsInstance_completion, "f").completionKey in argv; - const skipRecommendation = helpOptSet || requestCompletions || helpOnly; - if (argv._.length) { - if (handlerKeys.length) { - let firstUnknownCommand; - for (let i = commandIndex || 0, cmd; argv._[i] !== undefined; i++) { - cmd = String(argv._[i]); - if (handlerKeys.includes(cmd) && cmd !== __classPrivateFieldGet(this, _YargsInstance_completionCommand, "f")) { - const innerArgv = __classPrivateFieldGet(this, _YargsInstance_command, "f").runCommand(cmd, this, parsed, i + 1, helpOnly, helpOptSet || versionOptSet || helpOnly); - return this[kPostProcess](innerArgv, populateDoubleDash, !!calledFromCommand, false); - } - else if (!firstUnknownCommand && - cmd !== __classPrivateFieldGet(this, _YargsInstance_completionCommand, "f")) { - firstUnknownCommand = cmd; - break; - } - } - if (!__classPrivateFieldGet(this, _YargsInstance_command, "f").hasDefaultCommand() && - __classPrivateFieldGet(this, _YargsInstance_recommendCommands, "f") && - firstUnknownCommand && - !skipRecommendation) { - __classPrivateFieldGet(this, _YargsInstance_validation, "f").recommendCommands(firstUnknownCommand, handlerKeys); - } - } - if (__classPrivateFieldGet(this, _YargsInstance_completionCommand, "f") && - argv._.includes(__classPrivateFieldGet(this, _YargsInstance_completionCommand, "f")) && - !requestCompletions) { - if (__classPrivateFieldGet(this, _YargsInstance_exitProcess, "f")) - setBlocking(true); - this.showCompletionScript(); - this.exit(0); - } - } - if (__classPrivateFieldGet(this, _YargsInstance_command, "f").hasDefaultCommand() && !skipRecommendation) { - const innerArgv = __classPrivateFieldGet(this, _YargsInstance_command, "f").runCommand(null, this, parsed, 0, helpOnly, helpOptSet || versionOptSet || helpOnly); - return this[kPostProcess](innerArgv, populateDoubleDash, !!calledFromCommand, false); - } - if (requestCompletions) { - if (__classPrivateFieldGet(this, _YargsInstance_exitProcess, "f")) - setBlocking(true); - args = [].concat(args); - const completionArgs = args.slice(args.indexOf(`--${__classPrivateFieldGet(this, _YargsInstance_completion, "f").completionKey}`) + 1); - __classPrivateFieldGet(this, _YargsInstance_completion, "f").getCompletion(completionArgs, (err, completions) => { - if (err) - throw new YError(err.message); - (completions || []).forEach(completion => { - __classPrivateFieldGet(this, _YargsInstance_logger, "f").log(completion); - }); - this.exit(0); - }); - return this[kPostProcess](argv, !populateDoubleDash, !!calledFromCommand, false); - } - if (!__classPrivateFieldGet(this, _YargsInstance_hasOutput, "f")) { - if (helpOptSet) { - if (__classPrivateFieldGet(this, _YargsInstance_exitProcess, "f")) - setBlocking(true); - skipValidation = true; - this.showHelp('log'); - this.exit(0); - } - else if (versionOptSet) { - if (__classPrivateFieldGet(this, _YargsInstance_exitProcess, "f")) - setBlocking(true); - skipValidation = true; - __classPrivateFieldGet(this, _YargsInstance_usage, "f").showVersion('log'); - this.exit(0); - } - } - if (!skipValidation && __classPrivateFieldGet(this, _YargsInstance_options, "f").skipValidation.length > 0) { - skipValidation = Object.keys(argv).some(key => __classPrivateFieldGet(this, _YargsInstance_options, "f").skipValidation.indexOf(key) >= 0 && argv[key] === true); - } - if (!skipValidation) { - if (parsed.error) - throw new YError(parsed.error.message); - if (!requestCompletions) { - const validation = this[kRunValidation](aliases, {}, parsed.error); - if (!calledFromCommand) { - argvPromise = applyMiddleware(argv, this, __classPrivateFieldGet(this, _YargsInstance_globalMiddleware, "f").getMiddleware(), true); - } - argvPromise = this[kValidateAsync](validation, argvPromise !== null && argvPromise !== void 0 ? argvPromise : argv); - if (isPromise(argvPromise) && !calledFromCommand) { - argvPromise = argvPromise.then(() => { - return applyMiddleware(argv, this, __classPrivateFieldGet(this, _YargsInstance_globalMiddleware, "f").getMiddleware(), false); - }); - } - } - } - } - catch (err) { - if (err instanceof YError) - __classPrivateFieldGet(this, _YargsInstance_usage, "f").fail(err.message, err); - else - throw err; - } - return this[kPostProcess](argvPromise !== null && argvPromise !== void 0 ? argvPromise : argv, populateDoubleDash, !!calledFromCommand, true); - } - [kRunValidation](aliases, positionalMap, parseErrors, isDefaultCommand) { - const demandedOptions = { ...this.getDemandedOptions() }; - return (argv) => { - if (parseErrors) - throw new YError(parseErrors.message); - __classPrivateFieldGet(this, _YargsInstance_validation, "f").nonOptionCount(argv); - __classPrivateFieldGet(this, _YargsInstance_validation, "f").requiredArguments(argv, demandedOptions); - let failedStrictCommands = false; - if (__classPrivateFieldGet(this, _YargsInstance_strictCommands, "f")) { - failedStrictCommands = __classPrivateFieldGet(this, _YargsInstance_validation, "f").unknownCommands(argv); - } - if (__classPrivateFieldGet(this, _YargsInstance_strict, "f") && !failedStrictCommands) { - __classPrivateFieldGet(this, _YargsInstance_validation, "f").unknownArguments(argv, aliases, positionalMap, !!isDefaultCommand); - } - else if (__classPrivateFieldGet(this, _YargsInstance_strictOptions, "f")) { - __classPrivateFieldGet(this, _YargsInstance_validation, "f").unknownArguments(argv, aliases, {}, false, false); - } - __classPrivateFieldGet(this, _YargsInstance_validation, "f").limitedChoices(argv); - __classPrivateFieldGet(this, _YargsInstance_validation, "f").implications(argv); - __classPrivateFieldGet(this, _YargsInstance_validation, "f").conflicting(argv); - }; - } - [kSetHasOutput]() { - __classPrivateFieldSet(this, _YargsInstance_hasOutput, true, "f"); - } - [kTrackManuallySetKeys](keys) { - if (typeof keys === 'string') { - __classPrivateFieldGet(this, _YargsInstance_options, "f").key[keys] = true; - } - else { - for (const k of keys) { - __classPrivateFieldGet(this, _YargsInstance_options, "f").key[k] = true; - } - } - } -} -export function isYargsInstance(y) { - return !!y && typeof y.getInternalMethods === 'function'; -} diff --git a/node_modules/yargs/build/lib/yerror.js b/node_modules/yargs/build/lib/yerror.js deleted file mode 100644 index 7a36684..0000000 --- a/node_modules/yargs/build/lib/yerror.js +++ /dev/null @@ -1,9 +0,0 @@ -export class YError extends Error { - constructor(msg) { - super(msg || 'yargs error'); - this.name = 'YError'; - if (Error.captureStackTrace) { - Error.captureStackTrace(this, YError); - } - } -} diff --git a/node_modules/yargs/helpers/helpers.mjs b/node_modules/yargs/helpers/helpers.mjs deleted file mode 100644 index 3f96b3d..0000000 --- a/node_modules/yargs/helpers/helpers.mjs +++ /dev/null @@ -1,10 +0,0 @@ -import {applyExtends as _applyExtends} from '../build/lib/utils/apply-extends.js'; -import {hideBin} from '../build/lib/utils/process-argv.js'; -import Parser from 'yargs-parser'; -import shim from '../lib/platform-shims/esm.mjs'; - -const applyExtends = (config, cwd, mergeExtends) => { - return _applyExtends(config, cwd, mergeExtends, shim); -}; - -export {applyExtends, hideBin, Parser}; diff --git a/node_modules/yargs/helpers/index.js b/node_modules/yargs/helpers/index.js deleted file mode 100644 index 8ab79a3..0000000 --- a/node_modules/yargs/helpers/index.js +++ /dev/null @@ -1,14 +0,0 @@ -const { - applyExtends, - cjsPlatformShim, - Parser, - processArgv, -} = require('../build/index.cjs'); - -module.exports = { - applyExtends: (config, cwd, mergeExtends) => { - return applyExtends(config, cwd, mergeExtends, cjsPlatformShim); - }, - hideBin: processArgv.hideBin, - Parser, -}; diff --git a/node_modules/yargs/helpers/package.json b/node_modules/yargs/helpers/package.json deleted file mode 100644 index 5bbefff..0000000 --- a/node_modules/yargs/helpers/package.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "type": "commonjs" -} diff --git a/node_modules/yargs/index.cjs b/node_modules/yargs/index.cjs deleted file mode 100644 index d1eee82..0000000 --- a/node_modules/yargs/index.cjs +++ /dev/null @@ -1,53 +0,0 @@ -'use strict'; -// classic singleton yargs API, to use yargs -// without running as a singleton do: -// require('yargs/yargs')(process.argv.slice(2)) -const {Yargs, processArgv} = require('./build/index.cjs'); - -Argv(processArgv.hideBin(process.argv)); - -module.exports = Argv; - -function Argv(processArgs, cwd) { - const argv = Yargs(processArgs, cwd, require); - singletonify(argv); - // TODO(bcoe): warn if argv.parse() or argv.argv is used directly. - return argv; -} - -function defineGetter(obj, key, getter) { - Object.defineProperty(obj, key, { - configurable: true, - enumerable: true, - get: getter, - }); -} -function lookupGetter(obj, key) { - const desc = Object.getOwnPropertyDescriptor(obj, key); - if (typeof desc !== 'undefined') { - return desc.get; - } -} - -/* Hack an instance of Argv with process.argv into Argv - so people can do - require('yargs')(['--beeble=1','-z','zizzle']).argv - to parse a list of args and - require('yargs').argv - to get a parsed version of process.argv. -*/ -function singletonify(inst) { - [ - ...Object.keys(inst), - ...Object.getOwnPropertyNames(inst.constructor.prototype), - ].forEach(key => { - if (key === 'argv') { - defineGetter(Argv, key, lookupGetter(inst, key)); - } else if (typeof inst[key] === 'function') { - Argv[key] = inst[key].bind(inst); - } else { - defineGetter(Argv, '$0', () => inst.$0); - defineGetter(Argv, 'parsed', () => inst.parsed); - } - }); -} diff --git a/node_modules/yargs/index.mjs b/node_modules/yargs/index.mjs deleted file mode 100644 index c6440b9..0000000 --- a/node_modules/yargs/index.mjs +++ /dev/null @@ -1,8 +0,0 @@ -'use strict'; - -// Bootstraps yargs for ESM: -import esmPlatformShim from './lib/platform-shims/esm.mjs'; -import {YargsFactory} from './build/lib/yargs-factory.js'; - -const Yargs = YargsFactory(esmPlatformShim); -export default Yargs; diff --git a/node_modules/yargs/lib/platform-shims/browser.mjs b/node_modules/yargs/lib/platform-shims/browser.mjs deleted file mode 100644 index 5f8ec61..0000000 --- a/node_modules/yargs/lib/platform-shims/browser.mjs +++ /dev/null @@ -1,95 +0,0 @@ -/* eslint-disable no-unused-vars */ -'use strict'; - -import cliui from 'https://unpkg.com/cliui@7.0.1/index.mjs'; // eslint-disable-line -import Parser from 'https://unpkg.com/yargs-parser@19.0.0/browser.js'; // eslint-disable-line -import {getProcessArgvBin} from '../../build/lib/utils/process-argv.js'; -import {YError} from '../../build/lib/yerror.js'; - -const REQUIRE_ERROR = 'require is not supported in browser'; -const REQUIRE_DIRECTORY_ERROR = - 'loading a directory of commands is not supported in browser'; - -export default { - assert: { - notStrictEqual: (a, b) => { - // noop. - }, - strictEqual: (a, b) => { - // noop. - }, - }, - cliui, - findUp: () => undefined, - getEnv: key => { - // There is no environment in browser: - return undefined; - }, - inspect: console.log, - getCallerFile: () => { - throw new YError(REQUIRE_DIRECTORY_ERROR); - }, - getProcessArgvBin, - mainFilename: 'yargs', - Parser, - path: { - basename: str => str, - dirname: str => str, - extname: str => str, - relative: str => str, - }, - process: { - argv: () => [], - cwd: () => '', - emitWarning: (warning, name) => {}, - execPath: () => '', - // exit is noop browser: - exit: () => {}, - nextTick: cb => { - // eslint-disable-next-line no-undef - window.setTimeout(cb, 1); - }, - stdColumns: 80, - }, - readFileSync: () => { - return ''; - }, - require: () => { - throw new YError(REQUIRE_ERROR); - }, - requireDirectory: () => { - throw new YError(REQUIRE_DIRECTORY_ERROR); - }, - stringWidth: str => { - return [...str].length; - }, - // TODO: replace this with y18n once it's ported to ESM: - y18n: { - __: (...str) => { - if (str.length === 0) return ''; - const args = str.slice(1); - return sprintf(str[0], ...args); - }, - __n: (str1, str2, count, ...args) => { - if (count === 1) { - return sprintf(str1, ...args); - } else { - return sprintf(str2, ...args); - } - }, - getLocale: () => { - return 'en_US'; - }, - setLocale: () => {}, - updateLocale: () => {}, - }, -}; - -function sprintf(_str, ...args) { - let str = ''; - const split = _str.split('%s'); - split.forEach((token, i) => { - str += `${token}${split[i + 1] !== undefined && args[i] ? args[i] : ''}`; - }); - return str; -} diff --git a/node_modules/yargs/lib/platform-shims/esm.mjs b/node_modules/yargs/lib/platform-shims/esm.mjs deleted file mode 100644 index c25baa5..0000000 --- a/node_modules/yargs/lib/platform-shims/esm.mjs +++ /dev/null @@ -1,73 +0,0 @@ -'use strict' - -import { notStrictEqual, strictEqual } from 'assert' -import cliui from 'cliui' -import escalade from 'escalade/sync' -import { inspect } from 'util' -import { readFileSync } from 'fs' -import { fileURLToPath } from 'url'; -import Parser from 'yargs-parser' -import { basename, dirname, extname, relative, resolve } from 'path' -import { getProcessArgvBin } from '../../build/lib/utils/process-argv.js' -import { YError } from '../../build/lib/yerror.js' -import y18n from 'y18n' - -const REQUIRE_ERROR = 'require is not supported by ESM' -const REQUIRE_DIRECTORY_ERROR = 'loading a directory of commands is not supported yet for ESM' - -let __dirname; -try { - __dirname = fileURLToPath(import.meta.url); -} catch (e) { - __dirname = process.cwd(); -} -const mainFilename = __dirname.substring(0, __dirname.lastIndexOf('node_modules')); - -export default { - assert: { - notStrictEqual, - strictEqual - }, - cliui, - findUp: escalade, - getEnv: (key) => { - return process.env[key] - }, - inspect, - getCallerFile: () => { - throw new YError(REQUIRE_DIRECTORY_ERROR) - }, - getProcessArgvBin, - mainFilename: mainFilename || process.cwd(), - Parser, - path: { - basename, - dirname, - extname, - relative, - resolve - }, - process: { - argv: () => process.argv, - cwd: process.cwd, - emitWarning: (warning, type) => process.emitWarning(warning, type), - execPath: () => process.execPath, - exit: process.exit, - nextTick: process.nextTick, - stdColumns: typeof process.stdout.columns !== 'undefined' ? process.stdout.columns : null - }, - readFileSync, - require: () => { - throw new YError(REQUIRE_ERROR) - }, - requireDirectory: () => { - throw new YError(REQUIRE_DIRECTORY_ERROR) - }, - stringWidth: (str) => { - return [...str].length - }, - y18n: y18n({ - directory: resolve(__dirname, '../../../locales'), - updateFiles: false - }) -} diff --git a/node_modules/yargs/locales/be.json b/node_modules/yargs/locales/be.json deleted file mode 100644 index e28fa30..0000000 --- a/node_modules/yargs/locales/be.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "Commands:": "Каманды:", - "Options:": "Опцыі:", - "Examples:": "Прыклады:", - "boolean": "булевы тып", - "count": "падлік", - "string": "радковы тып", - "number": "лік", - "array": "масіў", - "required": "неабходна", - "default": "па змаўчанні", - "default:": "па змаўчанні:", - "choices:": "магчымасці:", - "aliases:": "аліасы:", - "generated-value": "згенераванае значэнне", - "Not enough non-option arguments: got %s, need at least %s": { - "one": "Недастаткова неапцыйных аргументаў: ёсць %s, трэба як мінімум %s", - "other": "Недастаткова неапцыйных аргументаў: ёсць %s, трэба як мінімум %s" - }, - "Too many non-option arguments: got %s, maximum of %s": { - "one": "Занадта шмат неапцыйных аргументаў: ёсць %s, максімум дапушчальна %s", - "other": "Занадта шмат неапцыйных аргументаў: ёсць %s, максімум дапушчальна %s" - }, - "Missing argument value: %s": { - "one": "Не хапае значэння аргументу: %s", - "other": "Не хапае значэнняў аргументаў: %s" - }, - "Missing required argument: %s": { - "one": "Не хапае неабходнага аргументу: %s", - "other": "Не хапае неабходных аргументаў: %s" - }, - "Unknown argument: %s": { - "one": "Невядомы аргумент: %s", - "other": "Невядомыя аргументы: %s" - }, - "Invalid values:": "Несапраўдныя значэння:", - "Argument: %s, Given: %s, Choices: %s": "Аргумент: %s, Дадзенае значэнне: %s, Магчымасці: %s", - "Argument check failed: %s": "Праверка аргументаў не ўдалася: %s", - "Implications failed:": "Дадзены аргумент патрабуе наступны дадатковы аргумент:", - "Not enough arguments following: %s": "Недастаткова наступных аргументаў: %s", - "Invalid JSON config file: %s": "Несапраўдны файл канфігурацыі JSON: %s", - "Path to JSON config file": "Шлях да файла канфігурацыі JSON", - "Show help": "Паказаць дапамогу", - "Show version number": "Паказаць нумар версіі", - "Did you mean %s?": "Вы мелі на ўвазе %s?" -} diff --git a/node_modules/yargs/locales/cs.json b/node_modules/yargs/locales/cs.json deleted file mode 100644 index 6394875..0000000 --- a/node_modules/yargs/locales/cs.json +++ /dev/null @@ -1,51 +0,0 @@ -{ - "Commands:": "Příkazy:", - "Options:": "Možnosti:", - "Examples:": "Příklady:", - "boolean": "logická hodnota", - "count": "počet", - "string": "řetězec", - "number": "číslo", - "array": "pole", - "required": "povinné", - "default": "výchozí", - "default:": "výchozí:", - "choices:": "volby:", - "aliases:": "aliasy:", - "generated-value": "generovaná-hodnota", - "Not enough non-option arguments: got %s, need at least %s": { - "one": "Nedostatek argumentů: zadáno %s, je potřeba alespoň %s", - "other": "Nedostatek argumentů: zadáno %s, je potřeba alespoň %s" - }, - "Too many non-option arguments: got %s, maximum of %s": { - "one": "Příliš mnoho argumentů: zadáno %s, maximálně %s", - "other": "Příliš mnoho argumentů: zadáno %s, maximálně %s" - }, - "Missing argument value: %s": { - "one": "Chybí hodnota argumentu: %s", - "other": "Chybí hodnoty argumentů: %s" - }, - "Missing required argument: %s": { - "one": "Chybí požadovaný argument: %s", - "other": "Chybí požadované argumenty: %s" - }, - "Unknown argument: %s": { - "one": "Neznámý argument: %s", - "other": "Neznámé argumenty: %s" - }, - "Invalid values:": "Neplatné hodnoty:", - "Argument: %s, Given: %s, Choices: %s": "Argument: %s, Zadáno: %s, Možnosti: %s", - "Argument check failed: %s": "Kontrola argumentů se nezdařila: %s", - "Implications failed:": "Chybí závislé argumenty:", - "Not enough arguments following: %s": "Následuje nedostatek argumentů: %s", - "Invalid JSON config file: %s": "Neplatný konfigurační soubor JSON: %s", - "Path to JSON config file": "Cesta ke konfiguračnímu souboru JSON", - "Show help": "Zobrazit nápovědu", - "Show version number": "Zobrazit číslo verze", - "Did you mean %s?": "Měl jste na mysli %s?", - "Arguments %s and %s are mutually exclusive" : "Argumenty %s a %s se vzájemně vylučují", - "Positionals:": "Poziční:", - "command": "příkaz", - "deprecated": "zastaralé", - "deprecated: %s": "zastaralé: %s" -} diff --git a/node_modules/yargs/locales/de.json b/node_modules/yargs/locales/de.json deleted file mode 100644 index dc73ec3..0000000 --- a/node_modules/yargs/locales/de.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "Commands:": "Kommandos:", - "Options:": "Optionen:", - "Examples:": "Beispiele:", - "boolean": "boolean", - "count": "Zähler", - "string": "string", - "number": "Zahl", - "array": "array", - "required": "erforderlich", - "default": "Standard", - "default:": "Standard:", - "choices:": "Möglichkeiten:", - "aliases:": "Aliase:", - "generated-value": "Generierter-Wert", - "Not enough non-option arguments: got %s, need at least %s": { - "one": "Nicht genügend Argumente ohne Optionen: %s vorhanden, mindestens %s benötigt", - "other": "Nicht genügend Argumente ohne Optionen: %s vorhanden, mindestens %s benötigt" - }, - "Too many non-option arguments: got %s, maximum of %s": { - "one": "Zu viele Argumente ohne Optionen: %s vorhanden, maximal %s erlaubt", - "other": "Zu viele Argumente ohne Optionen: %s vorhanden, maximal %s erlaubt" - }, - "Missing argument value: %s": { - "one": "Fehlender Argumentwert: %s", - "other": "Fehlende Argumentwerte: %s" - }, - "Missing required argument: %s": { - "one": "Fehlendes Argument: %s", - "other": "Fehlende Argumente: %s" - }, - "Unknown argument: %s": { - "one": "Unbekanntes Argument: %s", - "other": "Unbekannte Argumente: %s" - }, - "Invalid values:": "Unzulässige Werte:", - "Argument: %s, Given: %s, Choices: %s": "Argument: %s, Gegeben: %s, Möglichkeiten: %s", - "Argument check failed: %s": "Argumente-Check fehlgeschlagen: %s", - "Implications failed:": "Fehlende abhängige Argumente:", - "Not enough arguments following: %s": "Nicht genügend Argumente nach: %s", - "Invalid JSON config file: %s": "Fehlerhafte JSON-Config Datei: %s", - "Path to JSON config file": "Pfad zur JSON-Config Datei", - "Show help": "Hilfe anzeigen", - "Show version number": "Version anzeigen", - "Did you mean %s?": "Meintest du %s?" -} diff --git a/node_modules/yargs/locales/en.json b/node_modules/yargs/locales/en.json deleted file mode 100644 index af096a1..0000000 --- a/node_modules/yargs/locales/en.json +++ /dev/null @@ -1,55 +0,0 @@ -{ - "Commands:": "Commands:", - "Options:": "Options:", - "Examples:": "Examples:", - "boolean": "boolean", - "count": "count", - "string": "string", - "number": "number", - "array": "array", - "required": "required", - "default": "default", - "default:": "default:", - "choices:": "choices:", - "aliases:": "aliases:", - "generated-value": "generated-value", - "Not enough non-option arguments: got %s, need at least %s": { - "one": "Not enough non-option arguments: got %s, need at least %s", - "other": "Not enough non-option arguments: got %s, need at least %s" - }, - "Too many non-option arguments: got %s, maximum of %s": { - "one": "Too many non-option arguments: got %s, maximum of %s", - "other": "Too many non-option arguments: got %s, maximum of %s" - }, - "Missing argument value: %s": { - "one": "Missing argument value: %s", - "other": "Missing argument values: %s" - }, - "Missing required argument: %s": { - "one": "Missing required argument: %s", - "other": "Missing required arguments: %s" - }, - "Unknown argument: %s": { - "one": "Unknown argument: %s", - "other": "Unknown arguments: %s" - }, - "Unknown command: %s": { - "one": "Unknown command: %s", - "other": "Unknown commands: %s" - }, - "Invalid values:": "Invalid values:", - "Argument: %s, Given: %s, Choices: %s": "Argument: %s, Given: %s, Choices: %s", - "Argument check failed: %s": "Argument check failed: %s", - "Implications failed:": "Missing dependent arguments:", - "Not enough arguments following: %s": "Not enough arguments following: %s", - "Invalid JSON config file: %s": "Invalid JSON config file: %s", - "Path to JSON config file": "Path to JSON config file", - "Show help": "Show help", - "Show version number": "Show version number", - "Did you mean %s?": "Did you mean %s?", - "Arguments %s and %s are mutually exclusive" : "Arguments %s and %s are mutually exclusive", - "Positionals:": "Positionals:", - "command": "command", - "deprecated": "deprecated", - "deprecated: %s": "deprecated: %s" -} diff --git a/node_modules/yargs/locales/es.json b/node_modules/yargs/locales/es.json deleted file mode 100644 index d77b461..0000000 --- a/node_modules/yargs/locales/es.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "Commands:": "Comandos:", - "Options:": "Opciones:", - "Examples:": "Ejemplos:", - "boolean": "booleano", - "count": "cuenta", - "string": "cadena de caracteres", - "number": "número", - "array": "tabla", - "required": "requerido", - "default": "defecto", - "default:": "defecto:", - "choices:": "selección:", - "aliases:": "alias:", - "generated-value": "valor-generado", - "Not enough non-option arguments: got %s, need at least %s": { - "one": "Hacen falta argumentos no-opcionales: Número recibido %s, necesita por lo menos %s", - "other": "Hacen falta argumentos no-opcionales: Número recibido %s, necesita por lo menos %s" - }, - "Too many non-option arguments: got %s, maximum of %s": { - "one": "Demasiados argumentos no-opcionales: Número recibido %s, máximo es %s", - "other": "Demasiados argumentos no-opcionales: Número recibido %s, máximo es %s" - }, - "Missing argument value: %s": { - "one": "Falta argumento: %s", - "other": "Faltan argumentos: %s" - }, - "Missing required argument: %s": { - "one": "Falta argumento requerido: %s", - "other": "Faltan argumentos requeridos: %s" - }, - "Unknown argument: %s": { - "one": "Argumento desconocido: %s", - "other": "Argumentos desconocidos: %s" - }, - "Invalid values:": "Valores inválidos:", - "Argument: %s, Given: %s, Choices: %s": "Argumento: %s, Recibido: %s, Seleccionados: %s", - "Argument check failed: %s": "Verificación de argumento ha fallado: %s", - "Implications failed:": "Implicaciones fallidas:", - "Not enough arguments following: %s": "No hay suficientes argumentos después de: %s", - "Invalid JSON config file: %s": "Archivo de configuración JSON inválido: %s", - "Path to JSON config file": "Ruta al archivo de configuración JSON", - "Show help": "Muestra ayuda", - "Show version number": "Muestra número de versión", - "Did you mean %s?": "Quisiste decir %s?" -} diff --git a/node_modules/yargs/locales/fi.json b/node_modules/yargs/locales/fi.json deleted file mode 100644 index 481feb7..0000000 --- a/node_modules/yargs/locales/fi.json +++ /dev/null @@ -1,49 +0,0 @@ -{ - "Commands:": "Komennot:", - "Options:": "Valinnat:", - "Examples:": "Esimerkkejä:", - "boolean": "totuusarvo", - "count": "lukumäärä", - "string": "merkkijono", - "number": "numero", - "array": "taulukko", - "required": "pakollinen", - "default": "oletusarvo", - "default:": "oletusarvo:", - "choices:": "vaihtoehdot:", - "aliases:": "aliakset:", - "generated-value": "generoitu-arvo", - "Not enough non-option arguments: got %s, need at least %s": { - "one": "Liian vähän argumentteja, jotka eivät ole valintoja: annettu %s, vaaditaan vähintään %s", - "other": "Liian vähän argumentteja, jotka eivät ole valintoja: annettu %s, vaaditaan vähintään %s" - }, - "Too many non-option arguments: got %s, maximum of %s": { - "one": "Liikaa argumentteja, jotka eivät ole valintoja: annettu %s, sallitaan enintään %s", - "other": "Liikaa argumentteja, jotka eivät ole valintoja: annettu %s, sallitaan enintään %s" - }, - "Missing argument value: %s": { - "one": "Argumentin arvo puuttuu: %s", - "other": "Argumentin arvot puuttuvat: %s" - }, - "Missing required argument: %s": { - "one": "Pakollinen argumentti puuttuu: %s", - "other": "Pakollisia argumentteja puuttuu: %s" - }, - "Unknown argument: %s": { - "one": "Tuntematon argumentti: %s", - "other": "Tuntemattomia argumentteja: %s" - }, - "Invalid values:": "Virheelliset arvot:", - "Argument: %s, Given: %s, Choices: %s": "Argumentti: %s, Annettu: %s, Vaihtoehdot: %s", - "Argument check failed: %s": "Argumentin tarkistus epäonnistui: %s", - "Implications failed:": "Riippuvia argumentteja puuttuu:", - "Not enough arguments following: %s": "Argumentin perässä ei ole tarpeeksi argumentteja: %s", - "Invalid JSON config file: %s": "Epävalidi JSON-asetustiedosto: %s", - "Path to JSON config file": "JSON-asetustiedoston polku", - "Show help": "Näytä ohje", - "Show version number": "Näytä versionumero", - "Did you mean %s?": "Tarkoititko %s?", - "Arguments %s and %s are mutually exclusive" : "Argumentit %s ja %s eivät ole yhteensopivat", - "Positionals:": "Sijaintiparametrit:", - "command": "komento" -} diff --git a/node_modules/yargs/locales/fr.json b/node_modules/yargs/locales/fr.json deleted file mode 100644 index edd743f..0000000 --- a/node_modules/yargs/locales/fr.json +++ /dev/null @@ -1,53 +0,0 @@ -{ - "Commands:": "Commandes :", - "Options:": "Options :", - "Examples:": "Exemples :", - "boolean": "booléen", - "count": "compteur", - "string": "chaîne de caractères", - "number": "nombre", - "array": "tableau", - "required": "requis", - "default": "défaut", - "default:": "défaut :", - "choices:": "choix :", - "aliases:": "alias :", - "generated-value": "valeur générée", - "Not enough non-option arguments: got %s, need at least %s": { - "one": "Pas assez d'arguments (hors options) : reçu %s, besoin d'au moins %s", - "other": "Pas assez d'arguments (hors options) : reçus %s, besoin d'au moins %s" - }, - "Too many non-option arguments: got %s, maximum of %s": { - "one": "Trop d'arguments (hors options) : reçu %s, maximum de %s", - "other": "Trop d'arguments (hors options) : reçus %s, maximum de %s" - }, - "Missing argument value: %s": { - "one": "Argument manquant : %s", - "other": "Arguments manquants : %s" - }, - "Missing required argument: %s": { - "one": "Argument requis manquant : %s", - "other": "Arguments requis manquants : %s" - }, - "Unknown argument: %s": { - "one": "Argument inconnu : %s", - "other": "Arguments inconnus : %s" - }, - "Unknown command: %s": { - "one": "Commande inconnue : %s", - "other": "Commandes inconnues : %s" - }, - "Invalid values:": "Valeurs invalides :", - "Argument: %s, Given: %s, Choices: %s": "Argument : %s, donné : %s, choix : %s", - "Argument check failed: %s": "Echec de la vérification de l'argument : %s", - "Implications failed:": "Arguments dépendants manquants :", - "Not enough arguments following: %s": "Pas assez d'arguments après : %s", - "Invalid JSON config file: %s": "Fichier de configuration JSON invalide : %s", - "Path to JSON config file": "Chemin du fichier de configuration JSON", - "Show help": "Affiche l'aide", - "Show version number": "Affiche le numéro de version", - "Did you mean %s?": "Vouliez-vous dire %s ?", - "Arguments %s and %s are mutually exclusive" : "Les arguments %s et %s sont mutuellement exclusifs", - "Positionals:": "Arguments positionnels :", - "command": "commande" -} diff --git a/node_modules/yargs/locales/hi.json b/node_modules/yargs/locales/hi.json deleted file mode 100644 index a9de77c..0000000 --- a/node_modules/yargs/locales/hi.json +++ /dev/null @@ -1,49 +0,0 @@ -{ - "Commands:": "आदेश:", - "Options:": "विकल्प:", - "Examples:": "उदाहरण:", - "boolean": "सत्यता", - "count": "संख्या", - "string": "वर्णों का तार ", - "number": "अंक", - "array": "सरणी", - "required": "आवश्यक", - "default": "डिफॉल्ट", - "default:": "डिफॉल्ट:", - "choices:": "विकल्प:", - "aliases:": "उपनाम:", - "generated-value": "उत्पन्न-मूल्य", - "Not enough non-option arguments: got %s, need at least %s": { - "one": "पर्याप्त गैर-विकल्प तर्क प्राप्त नहीं: %s प्राप्त, कम से कम %s की आवश्यकता है", - "other": "पर्याप्त गैर-विकल्प तर्क प्राप्त नहीं: %s प्राप्त, कम से कम %s की आवश्यकता है" - }, - "Too many non-option arguments: got %s, maximum of %s": { - "one": "बहुत सारे गैर-विकल्प तर्क: %s प्राप्त, अधिकतम %s मान्य", - "other": "बहुत सारे गैर-विकल्प तर्क: %s प्राप्त, अधिकतम %s मान्य" - }, - "Missing argument value: %s": { - "one": "कुछ तर्को के मूल्य गुम हैं: %s", - "other": "कुछ तर्को के मूल्य गुम हैं: %s" - }, - "Missing required argument: %s": { - "one": "आवश्यक तर्क गुम हैं: %s", - "other": "आवश्यक तर्क गुम हैं: %s" - }, - "Unknown argument: %s": { - "one": "अज्ञात तर्क प्राप्त: %s", - "other": "अज्ञात तर्क प्राप्त: %s" - }, - "Invalid values:": "अमान्य मूल्य:", - "Argument: %s, Given: %s, Choices: %s": "तर्क: %s, प्राप्त: %s, विकल्प: %s", - "Argument check failed: %s": "तर्क जांच विफल: %s", - "Implications failed:": "दिए गए तर्क के लिए अतिरिक्त तर्क की अपेक्षा है:", - "Not enough arguments following: %s": "निम्नलिखित के बाद पर्याप्त तर्क नहीं प्राप्त: %s", - "Invalid JSON config file: %s": "अमान्य JSON config फाइल: %s", - "Path to JSON config file": "JSON config फाइल का पथ", - "Show help": "सहायता दिखाएँ", - "Show version number": "Version संख्या दिखाएँ", - "Did you mean %s?": "क्या आपका मतलब है %s?", - "Arguments %s and %s are mutually exclusive" : "तर्क %s और %s परस्पर अनन्य हैं", - "Positionals:": "स्थानीय:", - "command": "आदेश" -} diff --git a/node_modules/yargs/locales/hu.json b/node_modules/yargs/locales/hu.json deleted file mode 100644 index 21492d0..0000000 --- a/node_modules/yargs/locales/hu.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "Commands:": "Parancsok:", - "Options:": "Opciók:", - "Examples:": "Példák:", - "boolean": "boolean", - "count": "számláló", - "string": "szöveg", - "number": "szám", - "array": "tömb", - "required": "kötelező", - "default": "alapértelmezett", - "default:": "alapértelmezett:", - "choices:": "lehetőségek:", - "aliases:": "aliaszok:", - "generated-value": "generált-érték", - "Not enough non-option arguments: got %s, need at least %s": { - "one": "Nincs elég nem opcionális argumentum: %s van, legalább %s kell", - "other": "Nincs elég nem opcionális argumentum: %s van, legalább %s kell" - }, - "Too many non-option arguments: got %s, maximum of %s": { - "one": "Túl sok nem opciánlis argumentum van: %s van, maximum %s lehet", - "other": "Túl sok nem opciánlis argumentum van: %s van, maximum %s lehet" - }, - "Missing argument value: %s": { - "one": "Hiányzó argumentum érték: %s", - "other": "Hiányzó argumentum értékek: %s" - }, - "Missing required argument: %s": { - "one": "Hiányzó kötelező argumentum: %s", - "other": "Hiányzó kötelező argumentumok: %s" - }, - "Unknown argument: %s": { - "one": "Ismeretlen argumentum: %s", - "other": "Ismeretlen argumentumok: %s" - }, - "Invalid values:": "Érvénytelen érték:", - "Argument: %s, Given: %s, Choices: %s": "Argumentum: %s, Megadott: %s, Lehetőségek: %s", - "Argument check failed: %s": "Argumentum ellenőrzés sikertelen: %s", - "Implications failed:": "Implikációk sikertelenek:", - "Not enough arguments following: %s": "Nem elég argumentum követi: %s", - "Invalid JSON config file: %s": "Érvénytelen JSON konfigurációs file: %s", - "Path to JSON config file": "JSON konfigurációs file helye", - "Show help": "Súgo megjelenítése", - "Show version number": "Verziószám megjelenítése", - "Did you mean %s?": "Erre gondoltál %s?" -} diff --git a/node_modules/yargs/locales/id.json b/node_modules/yargs/locales/id.json deleted file mode 100644 index 125867c..0000000 --- a/node_modules/yargs/locales/id.json +++ /dev/null @@ -1,50 +0,0 @@ - -{ - "Commands:": "Perintah:", - "Options:": "Pilihan:", - "Examples:": "Contoh:", - "boolean": "boolean", - "count": "jumlah", - "number": "nomor", - "string": "string", - "array": "larik", - "required": "diperlukan", - "default": "bawaan", - "default:": "bawaan:", - "aliases:": "istilah lain:", - "choices:": "pilihan:", - "generated-value": "nilai-yang-dihasilkan", - "Not enough non-option arguments: got %s, need at least %s": { - "one": "Argumen wajib kurang: hanya %s, minimal %s", - "other": "Argumen wajib kurang: hanya %s, minimal %s" - }, - "Too many non-option arguments: got %s, maximum of %s": { - "one": "Terlalu banyak argumen wajib: ada %s, maksimal %s", - "other": "Terlalu banyak argumen wajib: ada %s, maksimal %s" - }, - "Missing argument value: %s": { - "one": "Kurang argumen: %s", - "other": "Kurang argumen: %s" - }, - "Missing required argument: %s": { - "one": "Kurang argumen wajib: %s", - "other": "Kurang argumen wajib: %s" - }, - "Unknown argument: %s": { - "one": "Argumen tak diketahui: %s", - "other": "Argumen tak diketahui: %s" - }, - "Invalid values:": "Nilai-nilai tidak valid:", - "Argument: %s, Given: %s, Choices: %s": "Argumen: %s, Diberikan: %s, Pilihan: %s", - "Argument check failed: %s": "Pemeriksaan argument gagal: %s", - "Implications failed:": "Implikasi gagal:", - "Not enough arguments following: %s": "Kurang argumen untuk: %s", - "Invalid JSON config file: %s": "Berkas konfigurasi JSON tidak valid: %s", - "Path to JSON config file": "Alamat berkas konfigurasi JSON", - "Show help": "Lihat bantuan", - "Show version number": "Lihat nomor versi", - "Did you mean %s?": "Maksud Anda: %s?", - "Arguments %s and %s are mutually exclusive" : "Argumen %s dan %s saling eksklusif", - "Positionals:": "Posisional-posisional:", - "command": "perintah" -} diff --git a/node_modules/yargs/locales/it.json b/node_modules/yargs/locales/it.json deleted file mode 100644 index fde5756..0000000 --- a/node_modules/yargs/locales/it.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "Commands:": "Comandi:", - "Options:": "Opzioni:", - "Examples:": "Esempi:", - "boolean": "booleano", - "count": "contatore", - "string": "stringa", - "number": "numero", - "array": "vettore", - "required": "richiesto", - "default": "predefinito", - "default:": "predefinito:", - "choices:": "scelte:", - "aliases:": "alias:", - "generated-value": "valore generato", - "Not enough non-option arguments: got %s, need at least %s": { - "one": "Numero insufficiente di argomenti non opzione: inseriti %s, richiesti almeno %s", - "other": "Numero insufficiente di argomenti non opzione: inseriti %s, richiesti almeno %s" - }, - "Too many non-option arguments: got %s, maximum of %s": { - "one": "Troppi argomenti non opzione: inseriti %s, massimo possibile %s", - "other": "Troppi argomenti non opzione: inseriti %s, massimo possibile %s" - }, - "Missing argument value: %s": { - "one": "Argomento mancante: %s", - "other": "Argomenti mancanti: %s" - }, - "Missing required argument: %s": { - "one": "Argomento richiesto mancante: %s", - "other": "Argomenti richiesti mancanti: %s" - }, - "Unknown argument: %s": { - "one": "Argomento sconosciuto: %s", - "other": "Argomenti sconosciuti: %s" - }, - "Invalid values:": "Valori non validi:", - "Argument: %s, Given: %s, Choices: %s": "Argomento: %s, Richiesto: %s, Scelte: %s", - "Argument check failed: %s": "Controllo dell'argomento fallito: %s", - "Implications failed:": "Argomenti dipendenti mancanti:", - "Not enough arguments following: %s": "Argomenti insufficienti dopo: %s", - "Invalid JSON config file: %s": "File di configurazione JSON non valido: %s", - "Path to JSON config file": "Percorso del file di configurazione JSON", - "Show help": "Mostra la schermata di aiuto", - "Show version number": "Mostra il numero di versione", - "Did you mean %s?": "Intendi forse %s?" -} diff --git a/node_modules/yargs/locales/ja.json b/node_modules/yargs/locales/ja.json deleted file mode 100644 index 3954ae6..0000000 --- a/node_modules/yargs/locales/ja.json +++ /dev/null @@ -1,51 +0,0 @@ -{ - "Commands:": "コマンド:", - "Options:": "オプション:", - "Examples:": "例:", - "boolean": "真偽", - "count": "カウント", - "string": "文字列", - "number": "数値", - "array": "配列", - "required": "必須", - "default": "デフォルト", - "default:": "デフォルト:", - "choices:": "選択してください:", - "aliases:": "エイリアス:", - "generated-value": "生成された値", - "Not enough non-option arguments: got %s, need at least %s": { - "one": "オプションではない引数が %s 個では不足しています。少なくとも %s 個の引数が必要です:", - "other": "オプションではない引数が %s 個では不足しています。少なくとも %s 個の引数が必要です:" - }, - "Too many non-option arguments: got %s, maximum of %s": { - "one": "オプションではない引数が %s 個では多すぎます。最大で %s 個までです:", - "other": "オプションではない引数が %s 個では多すぎます。最大で %s 個までです:" - }, - "Missing argument value: %s": { - "one": "引数の値が見つかりません: %s", - "other": "引数の値が見つかりません: %s" - }, - "Missing required argument: %s": { - "one": "必須の引数が見つかりません: %s", - "other": "必須の引数が見つかりません: %s" - }, - "Unknown argument: %s": { - "one": "未知の引数です: %s", - "other": "未知の引数です: %s" - }, - "Invalid values:": "不正な値です:", - "Argument: %s, Given: %s, Choices: %s": "引数は %s です。与えられた値: %s, 選択してください: %s", - "Argument check failed: %s": "引数のチェックに失敗しました: %s", - "Implications failed:": "オプションの組み合わせで不正が生じました:", - "Not enough arguments following: %s": "次の引数が不足しています。: %s", - "Invalid JSON config file: %s": "JSONの設定ファイルが不正です: %s", - "Path to JSON config file": "JSONの設定ファイルまでのpath", - "Show help": "ヘルプを表示", - "Show version number": "バージョンを表示", - "Did you mean %s?": "もしかして %s?", - "Arguments %s and %s are mutually exclusive" : "引数 %s と %s は同時に指定できません", - "Positionals:": "位置:", - "command": "コマンド", - "deprecated": "非推奨", - "deprecated: %s": "非推奨: %s" -} diff --git a/node_modules/yargs/locales/ko.json b/node_modules/yargs/locales/ko.json deleted file mode 100644 index 746bc89..0000000 --- a/node_modules/yargs/locales/ko.json +++ /dev/null @@ -1,49 +0,0 @@ -{ - "Commands:": "명령:", - "Options:": "옵션:", - "Examples:": "예시:", - "boolean": "불리언", - "count": "개수", - "string": "문자열", - "number": "숫자", - "array": "배열", - "required": "필수", - "default": "기본값", - "default:": "기본값:", - "choices:": "선택지:", - "aliases:": "별칭:", - "generated-value": "생성된 값", - "Not enough non-option arguments: got %s, need at least %s": { - "one": "옵션이 아닌 인수가 충분하지 않습니다: %s개 입력받음, 최소 %s개 입력 필요", - "other": "옵션이 아닌 인수가 충분하지 않습니다: %s개 입력받음, 최소 %s개 입력 필요" - }, - "Too many non-option arguments: got %s, maximum of %s": { - "one": "옵션이 아닌 인수가 너무 많습니다: %s개 입력받음, 최대 %s개 입력 가능", - "other": "옵션이 아닌 인수가 너무 많습니다: %s개 입력받음, 최대 %s개 입력 가능" - }, - "Missing argument value: %s": { - "one": "인수가 주어지지 않았습니다: %s", - "other": "인수가 주어지지 않았습니다: %s" - }, - "Missing required argument: %s": { - "one": "필수 인수가 주어지지 않았습니다: %s", - "other": "필수 인수가 주어지지 않았습니다: %s" - }, - "Unknown argument: %s": { - "one": "알 수 없는 인수입니다: %s", - "other": "알 수 없는 인수입니다: %s" - }, - "Invalid values:": "유효하지 않은 값:", - "Argument: %s, Given: %s, Choices: %s": "인수: %s, 주어진 값: %s, 선택지: %s", - "Argument check failed: %s": "인수 체크에 실패했습니다: %s", - "Implications failed:": "주어진 인수에 필요한 추가 인수가 주어지지 않았습니다:", - "Not enough arguments following: %s": "다음 인수가 주어지지 않았습니다: %s", - "Invalid JSON config file: %s": "유효하지 않은 JSON 설정 파일: %s", - "Path to JSON config file": "JSON 설정 파일 경로", - "Show help": "도움말 표시", - "Show version number": "버전 표시", - "Did you mean %s?": "%s을(를) 찾으시나요?", - "Arguments %s and %s are mutually exclusive" : "인수 %s과(와) %s은(는) 동시에 지정할 수 없습니다", - "Positionals:": "위치:", - "command": "명령" -} diff --git a/node_modules/yargs/locales/nb.json b/node_modules/yargs/locales/nb.json deleted file mode 100644 index 6f410ed..0000000 --- a/node_modules/yargs/locales/nb.json +++ /dev/null @@ -1,44 +0,0 @@ -{ - "Commands:": "Kommandoer:", - "Options:": "Alternativer:", - "Examples:": "Eksempler:", - "boolean": "boolsk", - "count": "antall", - "string": "streng", - "number": "nummer", - "array": "matrise", - "required": "obligatorisk", - "default": "standard", - "default:": "standard:", - "choices:": "valg:", - "generated-value": "generert-verdi", - "Not enough non-option arguments: got %s, need at least %s": { - "one": "Ikke nok ikke-alternativ argumenter: fikk %s, trenger minst %s", - "other": "Ikke nok ikke-alternativ argumenter: fikk %s, trenger minst %s" - }, - "Too many non-option arguments: got %s, maximum of %s": { - "one": "For mange ikke-alternativ argumenter: fikk %s, maksimum %s", - "other": "For mange ikke-alternativ argumenter: fikk %s, maksimum %s" - }, - "Missing argument value: %s": { - "one": "Mangler argument verdi: %s", - "other": "Mangler argument verdier: %s" - }, - "Missing required argument: %s": { - "one": "Mangler obligatorisk argument: %s", - "other": "Mangler obligatoriske argumenter: %s" - }, - "Unknown argument: %s": { - "one": "Ukjent argument: %s", - "other": "Ukjente argumenter: %s" - }, - "Invalid values:": "Ugyldige verdier:", - "Argument: %s, Given: %s, Choices: %s": "Argument: %s, Gitt: %s, Valg: %s", - "Argument check failed: %s": "Argumentsjekk mislyktes: %s", - "Implications failed:": "Konsekvensene mislyktes:", - "Not enough arguments following: %s": "Ikke nok følgende argumenter: %s", - "Invalid JSON config file: %s": "Ugyldig JSON konfigurasjonsfil: %s", - "Path to JSON config file": "Bane til JSON konfigurasjonsfil", - "Show help": "Vis hjelp", - "Show version number": "Vis versjonsnummer" -} diff --git a/node_modules/yargs/locales/nl.json b/node_modules/yargs/locales/nl.json deleted file mode 100644 index 9ff95c5..0000000 --- a/node_modules/yargs/locales/nl.json +++ /dev/null @@ -1,49 +0,0 @@ -{ - "Commands:": "Commando's:", - "Options:": "Opties:", - "Examples:": "Voorbeelden:", - "boolean": "booleaans", - "count": "aantal", - "string": "string", - "number": "getal", - "array": "lijst", - "required": "verplicht", - "default": "standaard", - "default:": "standaard:", - "choices:": "keuzes:", - "aliases:": "aliassen:", - "generated-value": "gegenereerde waarde", - "Not enough non-option arguments: got %s, need at least %s": { - "one": "Niet genoeg niet-optie-argumenten: %s gekregen, minstens %s nodig", - "other": "Niet genoeg niet-optie-argumenten: %s gekregen, minstens %s nodig" - }, - "Too many non-option arguments: got %s, maximum of %s": { - "one": "Te veel niet-optie-argumenten: %s gekregen, maximum is %s", - "other": "Te veel niet-optie-argumenten: %s gekregen, maximum is %s" - }, - "Missing argument value: %s": { - "one": "Missende argumentwaarde: %s", - "other": "Missende argumentwaarden: %s" - }, - "Missing required argument: %s": { - "one": "Missend verplicht argument: %s", - "other": "Missende verplichte argumenten: %s" - }, - "Unknown argument: %s": { - "one": "Onbekend argument: %s", - "other": "Onbekende argumenten: %s" - }, - "Invalid values:": "Ongeldige waarden:", - "Argument: %s, Given: %s, Choices: %s": "Argument: %s, Gegeven: %s, Keuzes: %s", - "Argument check failed: %s": "Argumentcontrole mislukt: %s", - "Implications failed:": "Ontbrekende afhankelijke argumenten:", - "Not enough arguments following: %s": "Niet genoeg argumenten na: %s", - "Invalid JSON config file: %s": "Ongeldig JSON-config-bestand: %s", - "Path to JSON config file": "Pad naar JSON-config-bestand", - "Show help": "Toon help", - "Show version number": "Toon versienummer", - "Did you mean %s?": "Bedoelde u misschien %s?", - "Arguments %s and %s are mutually exclusive": "Argumenten %s en %s kunnen niet tegelijk gebruikt worden", - "Positionals:": "Positie-afhankelijke argumenten", - "command": "commando" -} diff --git a/node_modules/yargs/locales/nn.json b/node_modules/yargs/locales/nn.json deleted file mode 100644 index 24479ac..0000000 --- a/node_modules/yargs/locales/nn.json +++ /dev/null @@ -1,44 +0,0 @@ -{ - "Commands:": "Kommandoar:", - "Options:": "Alternativ:", - "Examples:": "Døme:", - "boolean": "boolsk", - "count": "mengd", - "string": "streng", - "number": "nummer", - "array": "matrise", - "required": "obligatorisk", - "default": "standard", - "default:": "standard:", - "choices:": "val:", - "generated-value": "generert-verdi", - "Not enough non-option arguments: got %s, need at least %s": { - "one": "Ikkje nok ikkje-alternativ argument: fekk %s, treng minst %s", - "other": "Ikkje nok ikkje-alternativ argument: fekk %s, treng minst %s" - }, - "Too many non-option arguments: got %s, maximum of %s": { - "one": "For mange ikkje-alternativ argument: fekk %s, maksimum %s", - "other": "For mange ikkje-alternativ argument: fekk %s, maksimum %s" - }, - "Missing argument value: %s": { - "one": "Manglar argumentverdi: %s", - "other": "Manglar argumentverdiar: %s" - }, - "Missing required argument: %s": { - "one": "Manglar obligatorisk argument: %s", - "other": "Manglar obligatoriske argument: %s" - }, - "Unknown argument: %s": { - "one": "Ukjent argument: %s", - "other": "Ukjende argument: %s" - }, - "Invalid values:": "Ugyldige verdiar:", - "Argument: %s, Given: %s, Choices: %s": "Argument: %s, Gjeve: %s, Val: %s", - "Argument check failed: %s": "Argumentsjekk mislukkast: %s", - "Implications failed:": "Konsekvensane mislukkast:", - "Not enough arguments following: %s": "Ikkje nok fylgjande argument: %s", - "Invalid JSON config file: %s": "Ugyldig JSON konfigurasjonsfil: %s", - "Path to JSON config file": "Bane til JSON konfigurasjonsfil", - "Show help": "Vis hjelp", - "Show version number": "Vis versjonsnummer" -} diff --git a/node_modules/yargs/locales/pirate.json b/node_modules/yargs/locales/pirate.json deleted file mode 100644 index dcb5cb7..0000000 --- a/node_modules/yargs/locales/pirate.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "Commands:": "Choose yer command:", - "Options:": "Options for me hearties!", - "Examples:": "Ex. marks the spot:", - "required": "requi-yar-ed", - "Missing required argument: %s": { - "one": "Ye be havin' to set the followin' argument land lubber: %s", - "other": "Ye be havin' to set the followin' arguments land lubber: %s" - }, - "Show help": "Parlay this here code of conduct", - "Show version number": "'Tis the version ye be askin' fer", - "Arguments %s and %s are mutually exclusive" : "Yon scurvy dogs %s and %s be as bad as rum and a prudish wench" -} diff --git a/node_modules/yargs/locales/pl.json b/node_modules/yargs/locales/pl.json deleted file mode 100644 index a41d4bd..0000000 --- a/node_modules/yargs/locales/pl.json +++ /dev/null @@ -1,49 +0,0 @@ -{ - "Commands:": "Polecenia:", - "Options:": "Opcje:", - "Examples:": "Przykłady:", - "boolean": "boolean", - "count": "ilość", - "string": "ciąg znaków", - "number": "liczba", - "array": "tablica", - "required": "wymagany", - "default": "domyślny", - "default:": "domyślny:", - "choices:": "dostępne:", - "aliases:": "aliasy:", - "generated-value": "wygenerowana-wartość", - "Not enough non-option arguments: got %s, need at least %s": { - "one": "Niewystarczająca ilość argumentów: otrzymano %s, wymagane co najmniej %s", - "other": "Niewystarczająca ilość argumentów: otrzymano %s, wymagane co najmniej %s" - }, - "Too many non-option arguments: got %s, maximum of %s": { - "one": "Zbyt duża ilość argumentów: otrzymano %s, wymagane co najwyżej %s", - "other": "Zbyt duża ilość argumentów: otrzymano %s, wymagane co najwyżej %s" - }, - "Missing argument value: %s": { - "one": "Brak wartości dla argumentu: %s", - "other": "Brak wartości dla argumentów: %s" - }, - "Missing required argument: %s": { - "one": "Brak wymaganego argumentu: %s", - "other": "Brak wymaganych argumentów: %s" - }, - "Unknown argument: %s": { - "one": "Nieznany argument: %s", - "other": "Nieznane argumenty: %s" - }, - "Invalid values:": "Nieprawidłowe wartości:", - "Argument: %s, Given: %s, Choices: %s": "Argument: %s, Otrzymano: %s, Dostępne: %s", - "Argument check failed: %s": "Weryfikacja argumentów nie powiodła się: %s", - "Implications failed:": "Założenia nie zostały spełnione:", - "Not enough arguments following: %s": "Niewystarczająca ilość argumentów następujących po: %s", - "Invalid JSON config file: %s": "Nieprawidłowy plik konfiguracyjny JSON: %s", - "Path to JSON config file": "Ścieżka do pliku konfiguracyjnego JSON", - "Show help": "Pokaż pomoc", - "Show version number": "Pokaż numer wersji", - "Did you mean %s?": "Czy chodziło Ci o %s?", - "Arguments %s and %s are mutually exclusive": "Argumenty %s i %s wzajemnie się wykluczają", - "Positionals:": "Pozycyjne:", - "command": "polecenie" -} diff --git a/node_modules/yargs/locales/pt.json b/node_modules/yargs/locales/pt.json deleted file mode 100644 index 0c8ac99..0000000 --- a/node_modules/yargs/locales/pt.json +++ /dev/null @@ -1,45 +0,0 @@ -{ - "Commands:": "Comandos:", - "Options:": "Opções:", - "Examples:": "Exemplos:", - "boolean": "boolean", - "count": "contagem", - "string": "cadeia de caracteres", - "number": "número", - "array": "arranjo", - "required": "requerido", - "default": "padrão", - "default:": "padrão:", - "choices:": "escolhas:", - "generated-value": "valor-gerado", - "Not enough non-option arguments: got %s, need at least %s": { - "one": "Argumentos insuficientes não opcionais: Argumento %s, necessário pelo menos %s", - "other": "Argumentos insuficientes não opcionais: Argumento %s, necessário pelo menos %s" - }, - "Too many non-option arguments: got %s, maximum of %s": { - "one": "Excesso de argumentos não opcionais: recebido %s, máximo de %s", - "other": "Excesso de argumentos não opcionais: recebido %s, máximo de %s" - }, - "Missing argument value: %s": { - "one": "Falta valor de argumento: %s", - "other": "Falta valores de argumento: %s" - }, - "Missing required argument: %s": { - "one": "Falta argumento obrigatório: %s", - "other": "Faltando argumentos obrigatórios: %s" - }, - "Unknown argument: %s": { - "one": "Argumento desconhecido: %s", - "other": "Argumentos desconhecidos: %s" - }, - "Invalid values:": "Valores inválidos:", - "Argument: %s, Given: %s, Choices: %s": "Argumento: %s, Dado: %s, Escolhas: %s", - "Argument check failed: %s": "Verificação de argumento falhou: %s", - "Implications failed:": "Implicações falharam:", - "Not enough arguments following: %s": "Insuficientes argumentos a seguir: %s", - "Invalid JSON config file: %s": "Arquivo de configuração em JSON esta inválido: %s", - "Path to JSON config file": "Caminho para o arquivo de configuração em JSON", - "Show help": "Mostra ajuda", - "Show version number": "Mostra número de versão", - "Arguments %s and %s are mutually exclusive" : "Argumentos %s e %s são mutualmente exclusivos" -} diff --git a/node_modules/yargs/locales/pt_BR.json b/node_modules/yargs/locales/pt_BR.json deleted file mode 100644 index eae1ec6..0000000 --- a/node_modules/yargs/locales/pt_BR.json +++ /dev/null @@ -1,48 +0,0 @@ -{ - "Commands:": "Comandos:", - "Options:": "Opções:", - "Examples:": "Exemplos:", - "boolean": "booleano", - "count": "contagem", - "string": "string", - "number": "número", - "array": "array", - "required": "obrigatório", - "default:": "padrão:", - "choices:": "opções:", - "aliases:": "sinônimos:", - "generated-value": "valor-gerado", - "Not enough non-option arguments: got %s, need at least %s": { - "one": "Argumentos insuficientes: Argumento %s, necessário pelo menos %s", - "other": "Argumentos insuficientes: Argumento %s, necessário pelo menos %s" - }, - "Too many non-option arguments: got %s, maximum of %s": { - "one": "Excesso de argumentos: recebido %s, máximo de %s", - "other": "Excesso de argumentos: recebido %s, máximo de %s" - }, - "Missing argument value: %s": { - "one": "Falta valor de argumento: %s", - "other": "Falta valores de argumento: %s" - }, - "Missing required argument: %s": { - "one": "Falta argumento obrigatório: %s", - "other": "Faltando argumentos obrigatórios: %s" - }, - "Unknown argument: %s": { - "one": "Argumento desconhecido: %s", - "other": "Argumentos desconhecidos: %s" - }, - "Invalid values:": "Valores inválidos:", - "Argument: %s, Given: %s, Choices: %s": "Argumento: %s, Dado: %s, Opções: %s", - "Argument check failed: %s": "Verificação de argumento falhou: %s", - "Implications failed:": "Implicações falharam:", - "Not enough arguments following: %s": "Argumentos insuficientes a seguir: %s", - "Invalid JSON config file: %s": "Arquivo JSON de configuração inválido: %s", - "Path to JSON config file": "Caminho para o arquivo JSON de configuração", - "Show help": "Exibe ajuda", - "Show version number": "Exibe a versão", - "Did you mean %s?": "Você quis dizer %s?", - "Arguments %s and %s are mutually exclusive" : "Argumentos %s e %s são mutualmente exclusivos", - "Positionals:": "Posicionais:", - "command": "comando" -} diff --git a/node_modules/yargs/locales/ru.json b/node_modules/yargs/locales/ru.json deleted file mode 100644 index d5c9e32..0000000 --- a/node_modules/yargs/locales/ru.json +++ /dev/null @@ -1,51 +0,0 @@ -{ - "Commands:": "Команды:", - "Options:": "Опции:", - "Examples:": "Примеры:", - "boolean": "булевый тип", - "count": "подсчет", - "string": "строковой тип", - "number": "число", - "array": "массив", - "required": "необходимо", - "default": "по умолчанию", - "default:": "по умолчанию:", - "choices:": "возможности:", - "aliases:": "алиасы:", - "generated-value": "генерированное значение", - "Not enough non-option arguments: got %s, need at least %s": { - "one": "Недостаточно неопционных аргументов: есть %s, нужно как минимум %s", - "other": "Недостаточно неопционных аргументов: есть %s, нужно как минимум %s" - }, - "Too many non-option arguments: got %s, maximum of %s": { - "one": "Слишком много неопционных аргументов: есть %s, максимум допустимо %s", - "other": "Слишком много неопционных аргументов: есть %s, максимум допустимо %s" - }, - "Missing argument value: %s": { - "one": "Не хватает значения аргумента: %s", - "other": "Не хватает значений аргументов: %s" - }, - "Missing required argument: %s": { - "one": "Не хватает необходимого аргумента: %s", - "other": "Не хватает необходимых аргументов: %s" - }, - "Unknown argument: %s": { - "one": "Неизвестный аргумент: %s", - "other": "Неизвестные аргументы: %s" - }, - "Invalid values:": "Недействительные значения:", - "Argument: %s, Given: %s, Choices: %s": "Аргумент: %s, Данное значение: %s, Возможности: %s", - "Argument check failed: %s": "Проверка аргументов не удалась: %s", - "Implications failed:": "Данный аргумент требует следующий дополнительный аргумент:", - "Not enough arguments following: %s": "Недостаточно следующих аргументов: %s", - "Invalid JSON config file: %s": "Недействительный файл конфигурации JSON: %s", - "Path to JSON config file": "Путь к файлу конфигурации JSON", - "Show help": "Показать помощь", - "Show version number": "Показать номер версии", - "Did you mean %s?": "Вы имели в виду %s?", - "Arguments %s and %s are mutually exclusive": "Аргументы %s и %s являются взаимоисключающими", - "Positionals:": "Позиционные аргументы:", - "command": "команда", - "deprecated": "устар.", - "deprecated: %s": "устар.: %s" -} diff --git a/node_modules/yargs/locales/th.json b/node_modules/yargs/locales/th.json deleted file mode 100644 index 33b048e..0000000 --- a/node_modules/yargs/locales/th.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "Commands:": "คอมมาน", - "Options:": "ออฟชั่น", - "Examples:": "ตัวอย่าง", - "boolean": "บูลีน", - "count": "นับ", - "string": "สตริง", - "number": "ตัวเลข", - "array": "อาเรย์", - "required": "จำเป็น", - "default": "ค่าเริ่มต้", - "default:": "ค่าเริ่มต้น", - "choices:": "ตัวเลือก", - "aliases:": "เอเลียส", - "generated-value": "ค่าที่ถูกสร้างขึ้น", - "Not enough non-option arguments: got %s, need at least %s": { - "one": "ใส่อาร์กิวเมนต์ไม่ครบตามจำนวนที่กำหนด: ใส่ค่ามาจำนวน %s ค่า, แต่ต้องการอย่างน้อย %s ค่า", - "other": "ใส่อาร์กิวเมนต์ไม่ครบตามจำนวนที่กำหนด: ใส่ค่ามาจำนวน %s ค่า, แต่ต้องการอย่างน้อย %s ค่า" - }, - "Too many non-option arguments: got %s, maximum of %s": { - "one": "ใส่อาร์กิวเมนต์เกินจำนวนที่กำหนด: ใส่ค่ามาจำนวน %s ค่า, แต่ต้องการมากที่สุด %s ค่า", - "other": "ใส่อาร์กิวเมนต์เกินจำนวนที่กำหนด: ใส่ค่ามาจำนวน %s ค่า, แต่ต้องการมากที่สุด %s ค่า" - }, - "Missing argument value: %s": { - "one": "ค่าอาร์กิวเมนต์ที่ขาดไป: %s", - "other": "ค่าอาร์กิวเมนต์ที่ขาดไป: %s" - }, - "Missing required argument: %s": { - "one": "อาร์กิวเมนต์จำเป็นที่ขาดไป: %s", - "other": "อาร์กิวเมนต์จำเป็นที่ขาดไป: %s" - }, - "Unknown argument: %s": { - "one": "อาร์กิวเมนต์ที่ไม่รู้จัก: %s", - "other": "อาร์กิวเมนต์ที่ไม่รู้จัก: %s" - }, - "Invalid values:": "ค่าไม่ถูกต้อง:", - "Argument: %s, Given: %s, Choices: %s": "อาร์กิวเมนต์: %s, ได้รับ: %s, ตัวเลือก: %s", - "Argument check failed: %s": "ตรวจสอบพบอาร์กิวเมนต์ที่ไม่ถูกต้อง: %s", - "Implications failed:": "Implications ไม่สำเร็จ:", - "Not enough arguments following: %s": "ใส่อาร์กิวเมนต์ไม่ครบ: %s", - "Invalid JSON config file: %s": "ไฟล์คอนฟิค JSON ไม่ถูกต้อง: %s", - "Path to JSON config file": "พาทไฟล์คอนฟิค JSON", - "Show help": "ขอความช่วยเหลือ", - "Show version number": "แสดงตัวเลขเวอร์ชั่น", - "Did you mean %s?": "คุณหมายถึง %s?" -} diff --git a/node_modules/yargs/locales/tr.json b/node_modules/yargs/locales/tr.json deleted file mode 100644 index 0d0d2cc..0000000 --- a/node_modules/yargs/locales/tr.json +++ /dev/null @@ -1,48 +0,0 @@ -{ - "Commands:": "Komutlar:", - "Options:": "Seçenekler:", - "Examples:": "Örnekler:", - "boolean": "boolean", - "count": "sayı", - "string": "string", - "number": "numara", - "array": "array", - "required": "zorunlu", - "default": "varsayılan", - "default:": "varsayılan:", - "choices:": "seçimler:", - "aliases:": "takma adlar:", - "generated-value": "oluşturulan-değer", - "Not enough non-option arguments: got %s, need at least %s": { - "one": "Seçenek dışı argümanlar yetersiz: %s bulundu, %s gerekli", - "other": "Seçenek dışı argümanlar yetersiz: %s bulundu, %s gerekli" - }, - "Too many non-option arguments: got %s, maximum of %s": { - "one": "Seçenek dışı argümanlar gereğinden fazla: %s bulundu, azami %s", - "other": "Seçenek dışı argümanlar gereğinden fazla: %s bulundu, azami %s" - }, - "Missing argument value: %s": { - "one": "Eksik argüman değeri: %s", - "other": "Eksik argüman değerleri: %s" - }, - "Missing required argument: %s": { - "one": "Eksik zorunlu argüman: %s", - "other": "Eksik zorunlu argümanlar: %s" - }, - "Unknown argument: %s": { - "one": "Bilinmeyen argüman: %s", - "other": "Bilinmeyen argümanlar: %s" - }, - "Invalid values:": "Geçersiz değerler:", - "Argument: %s, Given: %s, Choices: %s": "Argüman: %s, Verilen: %s, Seçimler: %s", - "Argument check failed: %s": "Argüman kontrolü başarısız oldu: %s", - "Implications failed:": "Sonuçlar başarısız oldu:", - "Not enough arguments following: %s": "%s için yeterli argüman bulunamadı", - "Invalid JSON config file: %s": "Geçersiz JSON yapılandırma dosyası: %s", - "Path to JSON config file": "JSON yapılandırma dosya konumu", - "Show help": "Yardım detaylarını göster", - "Show version number": "Versiyon detaylarını göster", - "Did you mean %s?": "Bunu mu demek istediniz: %s?", - "Positionals:": "Sıralılar:", - "command": "komut" -} diff --git a/node_modules/yargs/locales/uk_UA.json b/node_modules/yargs/locales/uk_UA.json deleted file mode 100644 index 0af0e99..0000000 --- a/node_modules/yargs/locales/uk_UA.json +++ /dev/null @@ -1,51 +0,0 @@ -{ - "Commands:": "Команди:", - "Options:": "Опції:", - "Examples:": "Приклади:", - "boolean": "boolean", - "count": "кількість", - "string": "строка", - "number": "число", - "array": "масива", - "required": "обов'язково", - "default": "за замовчуванням", - "default:": "за замовчуванням:", - "choices:": "доступні варіанти:", - "aliases:": "псевдоніми:", - "generated-value": "згенероване значення", - "Not enough non-option arguments: got %s, need at least %s": { - "one": "Недостатньо аргументів: наразі %s, потрібно %s або більше", - "other": "Недостатньо аргументів: наразі %s, потрібно %s або більше" - }, - "Too many non-option arguments: got %s, maximum of %s": { - "one": "Забагато аргументів: наразі %s, максимум %s", - "other": "Too many non-option arguments: наразі %s, максимум of %s" - }, - "Missing argument value: %s": { - "one": "Відсутнє значення для аргументу: %s", - "other": "Відсутні значення для аргументу: %s" - }, - "Missing required argument: %s": { - "one": "Відсутній обов'язковий аргумент: %s", - "other": "Відсутні обов'язкові аргументи: %s" - }, - "Unknown argument: %s": { - "one": "Аргумент %s не підтримується", - "other": "Аргументи %s не підтримуються" - }, - "Invalid values:": "Некоректні значення:", - "Argument: %s, Given: %s, Choices: %s": "Аргумент: %s, Введено: %s, Доступні варіанти: %s", - "Argument check failed: %s": "Аргумент не пройшов перевірку: %s", - "Implications failed:": "Відсутні залежні аргументи:", - "Not enough arguments following: %s": "Не достатньо аргументів після: %s", - "Invalid JSON config file: %s": "Некоректний JSON-файл конфігурації: %s", - "Path to JSON config file": "Шлях до JSON-файлу конфігурації", - "Show help": "Показати довідку", - "Show version number": "Показати версію", - "Did you mean %s?": "Можливо, ви мали на увазі %s?", - "Arguments %s and %s are mutually exclusive" : "Аргументи %s та %s взаємовиключні", - "Positionals:": "Позиційні:", - "command": "команда", - "deprecated": "застарілий", - "deprecated: %s": "застарілий: %s" -} diff --git a/node_modules/yargs/locales/uz.json b/node_modules/yargs/locales/uz.json deleted file mode 100644 index 0d07168..0000000 --- a/node_modules/yargs/locales/uz.json +++ /dev/null @@ -1,52 +0,0 @@ -{ - "Commands:": "Buyruqlar:", - "Options:": "Imkoniyatlar:", - "Examples:": "Misollar:", - "boolean": "boolean", - "count": "sanoq", - "string": "satr", - "number": "raqam", - "array": "massiv", - "required": "majburiy", - "default": "boshlang'ich", - "default:": "boshlang'ich:", - "choices:": "tanlovlar:", - "aliases:": "taxalluslar:", - "generated-value": "yaratilgan-qiymat", - "Not enough non-option arguments: got %s, need at least %s": { - "one": "No-imkoniyat argumentlar yetarli emas: berilgan %s, minimum %s", - "other": "No-imkoniyat argumentlar yetarli emas: berilgan %s, minimum %s" - }, - "Too many non-option arguments: got %s, maximum of %s": { - "one": "No-imkoniyat argumentlar juda ko'p: berilgan %s, maksimum %s", - "other": "No-imkoniyat argumentlar juda ko'p: got %s, maksimum %s" - }, - "Missing argument value: %s": { - "one": "Argument qiymati berilmagan: %s", - "other": "Argument qiymatlari berilmagan: %s" - }, - "Missing required argument: %s": { - "one": "Majburiy argument berilmagan: %s", - "other": "Majburiy argumentlar berilmagan: %s" - }, - "Unknown argument: %s": { - "one": "Noma'lum argument berilmagan: %s", - "other": "Noma'lum argumentlar berilmagan: %s" - }, - "Invalid values:": "Nosoz qiymatlar:", - "Argument: %s, Given: %s, Choices: %s": "Argument: %s, Berilgan: %s, Tanlovlar: %s", - "Argument check failed: %s": "Muvaffaqiyatsiz argument tekshiruvi: %s", - "Implications failed:": "Bog'liq argumentlar berilmagan:", - "Not enough arguments following: %s": "Quyidagi argumentlar yetarli emas: %s", - "Invalid JSON config file: %s": "Nosoz JSON konfiguratsiya fayli: %s", - "Path to JSON config file": "JSON konfiguratsiya fayli joylashuvi", - "Show help": "Yordam ko'rsatish", - "Show version number": "Versiyani ko'rsatish", - "Did you mean %s?": "%s ni nazarda tutyapsizmi?", - "Arguments %s and %s are mutually exclusive" : "%s va %s argumentlari alohida", - "Positionals:": "Positsionallar:", - "command": "buyruq", - "deprecated": "eskirgan", - "deprecated: %s": "eskirgan: %s" - } - \ No newline at end of file diff --git a/node_modules/yargs/locales/zh_CN.json b/node_modules/yargs/locales/zh_CN.json deleted file mode 100644 index 257d26b..0000000 --- a/node_modules/yargs/locales/zh_CN.json +++ /dev/null @@ -1,48 +0,0 @@ -{ - "Commands:": "命令:", - "Options:": "选项:", - "Examples:": "示例:", - "boolean": "布尔", - "count": "计数", - "string": "字符串", - "number": "数字", - "array": "数组", - "required": "必需", - "default": "默认值", - "default:": "默认值:", - "choices:": "可选值:", - "generated-value": "生成的值", - "Not enough non-option arguments: got %s, need at least %s": { - "one": "缺少 non-option 参数:传入了 %s 个, 至少需要 %s 个", - "other": "缺少 non-option 参数:传入了 %s 个, 至少需要 %s 个" - }, - "Too many non-option arguments: got %s, maximum of %s": { - "one": "non-option 参数过多:传入了 %s 个, 最大允许 %s 个", - "other": "non-option 参数过多:传入了 %s 个, 最大允许 %s 个" - }, - "Missing argument value: %s": { - "one": "没有给此选项指定值:%s", - "other": "没有给这些选项指定值:%s" - }, - "Missing required argument: %s": { - "one": "缺少必须的选项:%s", - "other": "缺少这些必须的选项:%s" - }, - "Unknown argument: %s": { - "one": "无法识别的选项:%s", - "other": "无法识别这些选项:%s" - }, - "Invalid values:": "无效的选项值:", - "Argument: %s, Given: %s, Choices: %s": "选项名称: %s, 传入的值: %s, 可选的值:%s", - "Argument check failed: %s": "选项值验证失败:%s", - "Implications failed:": "缺少依赖的选项:", - "Not enough arguments following: %s": "没有提供足够的值给此选项:%s", - "Invalid JSON config file: %s": "无效的 JSON 配置文件:%s", - "Path to JSON config file": "JSON 配置文件的路径", - "Show help": "显示帮助信息", - "Show version number": "显示版本号", - "Did you mean %s?": "是指 %s?", - "Arguments %s and %s are mutually exclusive" : "选项 %s 和 %s 是互斥的", - "Positionals:": "位置:", - "command": "命令" -} diff --git a/node_modules/yargs/locales/zh_TW.json b/node_modules/yargs/locales/zh_TW.json deleted file mode 100644 index e38495d..0000000 --- a/node_modules/yargs/locales/zh_TW.json +++ /dev/null @@ -1,51 +0,0 @@ -{ - "Commands:": "命令:", - "Options:": "選項:", - "Examples:": "範例:", - "boolean": "布林", - "count": "次數", - "string": "字串", - "number": "數字", - "array": "陣列", - "required": "必填", - "default": "預設值", - "default:": "預設值:", - "choices:": "可選值:", - "aliases:": "別名:", - "generated-value": "生成的值", - "Not enough non-option arguments: got %s, need at least %s": { - "one": "non-option 引數不足:只傳入了 %s 個, 至少要 %s 個", - "other": "non-option 引數不足:只傳入了 %s 個, 至少要 %s 個" - }, - "Too many non-option arguments: got %s, maximum of %s": { - "one": "non-option 引數過多:傳入了 %s 個, 但最多 %s 個", - "other": "non-option 引數過多:傳入了 %s 個, 但最多 %s 個" - }, - "Missing argument value: %s": { - "one": "此引數無指定值:%s", - "other": "這些引數無指定值:%s" - }, - "Missing required argument: %s": { - "one": "缺少必須的引數:%s", - "other": "缺少這些必須的引數:%s" - }, - "Unknown argument: %s": { - "one": "未知的引數:%s", - "other": "未知的引數:%s" - }, - "Invalid values:": "無效的選項值:", - "Argument: %s, Given: %s, Choices: %s": "引數名稱: %s, 傳入的值: %s, 可選的值:%s", - "Argument check failed: %s": "引數驗證失敗:%s", - "Implications failed:": "缺少依賴引數:", - "Not enough arguments following: %s": "沒有提供足夠的值給此引數:%s", - "Invalid JSON config file: %s": "無效的 JSON 設置文件:%s", - "Path to JSON config file": "JSON 設置文件的路徑", - "Show help": "顯示說明", - "Show version number": "顯示版本", - "Did you mean %s?": "您是指 %s 嗎?", - "Arguments %s and %s are mutually exclusive" : "引數 %s 和 %s 互斥", - "Positionals:": "位置:", - "command": "命令", - "deprecated": "已淘汰", - "deprecated: %s": "已淘汰:%s" - } diff --git a/node_modules/yargs/node_modules/ansi-regex/index.d.ts b/node_modules/yargs/node_modules/ansi-regex/index.d.ts deleted file mode 100644 index 2dbf6af..0000000 --- a/node_modules/yargs/node_modules/ansi-regex/index.d.ts +++ /dev/null @@ -1,37 +0,0 @@ -declare namespace ansiRegex { - interface Options { - /** - Match only the first ANSI escape. - - @default false - */ - onlyFirst: boolean; - } -} - -/** -Regular expression for matching ANSI escape codes. - -@example -``` -import ansiRegex = require('ansi-regex'); - -ansiRegex().test('\u001B[4mcake\u001B[0m'); -//=> true - -ansiRegex().test('cake'); -//=> false - -'\u001B[4mcake\u001B[0m'.match(ansiRegex()); -//=> ['\u001B[4m', '\u001B[0m'] - -'\u001B[4mcake\u001B[0m'.match(ansiRegex({onlyFirst: true})); -//=> ['\u001B[4m'] - -'\u001B]8;;https://github.com\u0007click\u001B]8;;\u0007'.match(ansiRegex()); -//=> ['\u001B]8;;https://github.com\u0007', '\u001B]8;;\u0007'] -``` -*/ -declare function ansiRegex(options?: ansiRegex.Options): RegExp; - -export = ansiRegex; diff --git a/node_modules/yargs/node_modules/ansi-regex/index.js b/node_modules/yargs/node_modules/ansi-regex/index.js deleted file mode 100644 index 616ff83..0000000 --- a/node_modules/yargs/node_modules/ansi-regex/index.js +++ /dev/null @@ -1,10 +0,0 @@ -'use strict'; - -module.exports = ({onlyFirst = false} = {}) => { - const pattern = [ - '[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)', - '(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))' - ].join('|'); - - return new RegExp(pattern, onlyFirst ? undefined : 'g'); -}; diff --git a/node_modules/yargs/node_modules/ansi-regex/package.json b/node_modules/yargs/node_modules/ansi-regex/package.json deleted file mode 100644 index 017f531..0000000 --- a/node_modules/yargs/node_modules/ansi-regex/package.json +++ /dev/null @@ -1,55 +0,0 @@ -{ - "name": "ansi-regex", - "version": "5.0.1", - "description": "Regular expression for matching ANSI escape codes", - "license": "MIT", - "repository": "chalk/ansi-regex", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "engines": { - "node": ">=8" - }, - "scripts": { - "test": "xo && ava && tsd", - "view-supported": "node fixtures/view-codes.js" - }, - "files": [ - "index.js", - "index.d.ts" - ], - "keywords": [ - "ansi", - "styles", - "color", - "colour", - "colors", - "terminal", - "console", - "cli", - "string", - "tty", - "escape", - "formatting", - "rgb", - "256", - "shell", - "xterm", - "command-line", - "text", - "regex", - "regexp", - "re", - "match", - "test", - "find", - "pattern" - ], - "devDependencies": { - "ava": "^2.4.0", - "tsd": "^0.9.0", - "xo": "^0.25.3" - } -} diff --git a/node_modules/yargs/node_modules/emoji-regex/es2015/index.js b/node_modules/yargs/node_modules/emoji-regex/es2015/index.js deleted file mode 100644 index b4cf3dc..0000000 --- a/node_modules/yargs/node_modules/emoji-regex/es2015/index.js +++ /dev/null @@ -1,6 +0,0 @@ -"use strict"; - -module.exports = () => { - // https://mths.be/emoji - return /\u{1F3F4}\u{E0067}\u{E0062}(?:\u{E0065}\u{E006E}\u{E0067}|\u{E0073}\u{E0063}\u{E0074}|\u{E0077}\u{E006C}\u{E0073})\u{E007F}|\u{1F468}(?:\u{1F3FC}\u200D(?:\u{1F91D}\u200D\u{1F468}\u{1F3FB}|[\u{1F33E}\u{1F373}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}])|\u{1F3FF}\u200D(?:\u{1F91D}\u200D\u{1F468}[\u{1F3FB}-\u{1F3FE}]|[\u{1F33E}\u{1F373}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}])|\u{1F3FE}\u200D(?:\u{1F91D}\u200D\u{1F468}[\u{1F3FB}-\u{1F3FD}]|[\u{1F33E}\u{1F373}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}])|\u{1F3FD}\u200D(?:\u{1F91D}\u200D\u{1F468}[\u{1F3FB}\u{1F3FC}]|[\u{1F33E}\u{1F373}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}])|\u200D(?:\u2764\uFE0F\u200D(?:\u{1F48B}\u200D)?\u{1F468}|[\u{1F468}\u{1F469}]\u200D(?:\u{1F466}\u200D\u{1F466}|\u{1F467}\u200D[\u{1F466}\u{1F467}])|\u{1F466}\u200D\u{1F466}|\u{1F467}\u200D[\u{1F466}\u{1F467}]|[\u{1F468}\u{1F469}]\u200D[\u{1F466}\u{1F467}]|[\u2695\u2696\u2708]\uFE0F|[\u{1F466}\u{1F467}]|[\u{1F33E}\u{1F373}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}])|(?:\u{1F3FB}\u200D[\u2695\u2696\u2708]|\u{1F3FF}\u200D[\u2695\u2696\u2708]|\u{1F3FE}\u200D[\u2695\u2696\u2708]|\u{1F3FD}\u200D[\u2695\u2696\u2708]|\u{1F3FC}\u200D[\u2695\u2696\u2708])\uFE0F|\u{1F3FB}\u200D[\u{1F33E}\u{1F373}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}]|[\u{1F3FB}-\u{1F3FF}])|(?:\u{1F9D1}\u{1F3FB}\u200D\u{1F91D}\u200D\u{1F9D1}|\u{1F469}\u{1F3FC}\u200D\u{1F91D}\u200D\u{1F469})\u{1F3FB}|\u{1F9D1}(?:\u{1F3FF}\u200D\u{1F91D}\u200D\u{1F9D1}[\u{1F3FB}-\u{1F3FF}]|\u200D\u{1F91D}\u200D\u{1F9D1})|(?:\u{1F9D1}\u{1F3FE}\u200D\u{1F91D}\u200D\u{1F9D1}|\u{1F469}\u{1F3FF}\u200D\u{1F91D}\u200D[\u{1F468}\u{1F469}])[\u{1F3FB}-\u{1F3FE}]|(?:\u{1F9D1}\u{1F3FC}\u200D\u{1F91D}\u200D\u{1F9D1}|\u{1F469}\u{1F3FD}\u200D\u{1F91D}\u200D\u{1F469})[\u{1F3FB}\u{1F3FC}]|\u{1F469}(?:\u{1F3FE}\u200D(?:\u{1F91D}\u200D\u{1F468}[\u{1F3FB}-\u{1F3FD}\u{1F3FF}]|[\u{1F33E}\u{1F373}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}])|\u{1F3FC}\u200D(?:\u{1F91D}\u200D\u{1F468}[\u{1F3FB}\u{1F3FD}-\u{1F3FF}]|[\u{1F33E}\u{1F373}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}])|\u{1F3FB}\u200D(?:\u{1F91D}\u200D\u{1F468}[\u{1F3FC}-\u{1F3FF}]|[\u{1F33E}\u{1F373}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}])|\u{1F3FD}\u200D(?:\u{1F91D}\u200D\u{1F468}[\u{1F3FB}\u{1F3FC}\u{1F3FE}\u{1F3FF}]|[\u{1F33E}\u{1F373}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}])|\u200D(?:\u2764\uFE0F\u200D(?:\u{1F48B}\u200D[\u{1F468}\u{1F469}]|[\u{1F468}\u{1F469}])|[\u{1F33E}\u{1F373}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}])|\u{1F3FF}\u200D[\u{1F33E}\u{1F373}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}])|\u{1F469}\u200D\u{1F469}\u200D(?:\u{1F466}\u200D\u{1F466}|\u{1F467}\u200D[\u{1F466}\u{1F467}])|(?:\u{1F9D1}\u{1F3FD}\u200D\u{1F91D}\u200D\u{1F9D1}|\u{1F469}\u{1F3FE}\u200D\u{1F91D}\u200D\u{1F469})[\u{1F3FB}-\u{1F3FD}]|\u{1F469}\u200D\u{1F466}\u200D\u{1F466}|\u{1F469}\u200D\u{1F469}\u200D[\u{1F466}\u{1F467}]|(?:\u{1F441}\uFE0F\u200D\u{1F5E8}|\u{1F469}(?:\u{1F3FF}\u200D[\u2695\u2696\u2708]|\u{1F3FE}\u200D[\u2695\u2696\u2708]|\u{1F3FC}\u200D[\u2695\u2696\u2708]|\u{1F3FB}\u200D[\u2695\u2696\u2708]|\u{1F3FD}\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|(?:[\u26F9\u{1F3CB}\u{1F3CC}\u{1F575}]\uFE0F|[\u{1F46F}\u{1F93C}\u{1F9DE}\u{1F9DF}])\u200D[\u2640\u2642]|[\u26F9\u{1F3CB}\u{1F3CC}\u{1F575}][\u{1F3FB}-\u{1F3FF}]\u200D[\u2640\u2642]|[\u{1F3C3}\u{1F3C4}\u{1F3CA}\u{1F46E}\u{1F471}\u{1F473}\u{1F477}\u{1F481}\u{1F482}\u{1F486}\u{1F487}\u{1F645}-\u{1F647}\u{1F64B}\u{1F64D}\u{1F64E}\u{1F6A3}\u{1F6B4}-\u{1F6B6}\u{1F926}\u{1F937}-\u{1F939}\u{1F93D}\u{1F93E}\u{1F9B8}\u{1F9B9}\u{1F9CD}-\u{1F9CF}\u{1F9D6}-\u{1F9DD}](?:[\u{1F3FB}-\u{1F3FF}]\u200D[\u2640\u2642]|\u200D[\u2640\u2642])|\u{1F3F4}\u200D\u2620)\uFE0F|\u{1F469}\u200D\u{1F467}\u200D[\u{1F466}\u{1F467}]|\u{1F3F3}\uFE0F\u200D\u{1F308}|\u{1F415}\u200D\u{1F9BA}|\u{1F469}\u200D\u{1F466}|\u{1F469}\u200D\u{1F467}|\u{1F1FD}\u{1F1F0}|\u{1F1F4}\u{1F1F2}|\u{1F1F6}\u{1F1E6}|[#\*0-9]\uFE0F\u20E3|\u{1F1E7}[\u{1F1E6}\u{1F1E7}\u{1F1E9}-\u{1F1EF}\u{1F1F1}-\u{1F1F4}\u{1F1F6}-\u{1F1F9}\u{1F1FB}\u{1F1FC}\u{1F1FE}\u{1F1FF}]|\u{1F1F9}[\u{1F1E6}\u{1F1E8}\u{1F1E9}\u{1F1EB}-\u{1F1ED}\u{1F1EF}-\u{1F1F4}\u{1F1F7}\u{1F1F9}\u{1F1FB}\u{1F1FC}\u{1F1FF}]|\u{1F1EA}[\u{1F1E6}\u{1F1E8}\u{1F1E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{1F47C}\u{1F483}\u{1F485}\u{1F4AA}\u{1F574}\u{1F57A}\u{1F590}\u{1F595}\u{1F596}\u{1F64C}\u{1F64F}\u{1F6C0}\u{1F6CC}\u{1F90F}\u{1F918}-\u{1F91C}\u{1F91E}\u{1F91F}\u{1F930}-\u{1F936}\u{1F9B5}\u{1F9B6}\u{1F9BB}\u{1F9D2}-\u{1F9D5}][\u{1F3FB}-\u{1F3FF}]|[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55\u{1F004}\u{1F0CF}\u{1F18E}\u{1F191}-\u{1F19A}\u{1F1E6}-\u{1F1FF}\u{1F201}\u{1F21A}\u{1F22F}\u{1F232}-\u{1F236}\u{1F238}-\u{1F23A}\u{1F250}\u{1F251}\u{1F300}-\u{1F320}\u{1F32D}-\u{1F335}\u{1F337}-\u{1F37C}\u{1F37E}-\u{1F393}\u{1F3A0}-\u{1F3CA}\u{1F3CF}-\u{1F3D3}\u{1F3E0}-\u{1F3F0}\u{1F3F4}\u{1F3F8}-\u{1F43E}\u{1F440}\u{1F442}-\u{1F4FC}\u{1F4FF}-\u{1F53D}\u{1F54B}-\u{1F54E}\u{1F550}-\u{1F567}\u{1F57A}\u{1F595}\u{1F596}\u{1F5A4}\u{1F5FB}-\u{1F64F}\u{1F680}-\u{1F6C5}\u{1F6CC}\u{1F6D0}-\u{1F6D2}\u{1F6D5}\u{1F6EB}\u{1F6EC}\u{1F6F4}-\u{1F6FA}\u{1F7E0}-\u{1F7EB}\u{1F90D}-\u{1F93A}\u{1F93C}-\u{1F945}\u{1F947}-\u{1F971}\u{1F973}-\u{1F976}\u{1F97A}-\u{1F9A2}\u{1F9A5}-\u{1F9AA}\u{1F9AE}-\u{1F9CA}\u{1F9CD}-\u{1F9FF}\u{1FA70}-\u{1FA73}\u{1FA78}-\u{1FA7A}\u{1FA80}-\u{1FA82}\u{1FA90}-\u{1FA95}]|[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299\u{1F004}\u{1F0CF}\u{1F170}\u{1F171}\u{1F17E}\u{1F17F}\u{1F18E}\u{1F191}-\u{1F19A}\u{1F1E6}-\u{1F1FF}\u{1F201}\u{1F202}\u{1F21A}\u{1F22F}\u{1F232}-\u{1F23A}\u{1F250}\u{1F251}\u{1F300}-\u{1F321}\u{1F324}-\u{1F393}\u{1F396}\u{1F397}\u{1F399}-\u{1F39B}\u{1F39E}-\u{1F3F0}\u{1F3F3}-\u{1F3F5}\u{1F3F7}-\u{1F4FD}\u{1F4FF}-\u{1F53D}\u{1F549}-\u{1F54E}\u{1F550}-\u{1F567}\u{1F56F}\u{1F570}\u{1F573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9DD}]/gu; -}; diff --git a/node_modules/yargs/node_modules/emoji-regex/es2015/text.js b/node_modules/yargs/node_modules/emoji-regex/es2015/text.js deleted file mode 100644 index 780309d..0000000 --- a/node_modules/yargs/node_modules/emoji-regex/es2015/text.js +++ /dev/null @@ -1,6 +0,0 @@ -"use strict"; - -module.exports = () => { - // https://mths.be/emoji - return /\u{1F3F4}\u{E0067}\u{E0062}(?:\u{E0065}\u{E006E}\u{E0067}|\u{E0073}\u{E0063}\u{E0074}|\u{E0077}\u{E006C}\u{E0073})\u{E007F}|\u{1F468}(?:\u{1F3FC}\u200D(?:\u{1F91D}\u200D\u{1F468}\u{1F3FB}|[\u{1F33E}\u{1F373}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}])|\u{1F3FF}\u200D(?:\u{1F91D}\u200D\u{1F468}[\u{1F3FB}-\u{1F3FE}]|[\u{1F33E}\u{1F373}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}])|\u{1F3FE}\u200D(?:\u{1F91D}\u200D\u{1F468}[\u{1F3FB}-\u{1F3FD}]|[\u{1F33E}\u{1F373}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}])|\u{1F3FD}\u200D(?:\u{1F91D}\u200D\u{1F468}[\u{1F3FB}\u{1F3FC}]|[\u{1F33E}\u{1F373}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}])|\u200D(?:\u2764\uFE0F\u200D(?:\u{1F48B}\u200D)?\u{1F468}|[\u{1F468}\u{1F469}]\u200D(?:\u{1F466}\u200D\u{1F466}|\u{1F467}\u200D[\u{1F466}\u{1F467}])|\u{1F466}\u200D\u{1F466}|\u{1F467}\u200D[\u{1F466}\u{1F467}]|[\u{1F468}\u{1F469}]\u200D[\u{1F466}\u{1F467}]|[\u2695\u2696\u2708]\uFE0F|[\u{1F466}\u{1F467}]|[\u{1F33E}\u{1F373}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}])|(?:\u{1F3FB}\u200D[\u2695\u2696\u2708]|\u{1F3FF}\u200D[\u2695\u2696\u2708]|\u{1F3FE}\u200D[\u2695\u2696\u2708]|\u{1F3FD}\u200D[\u2695\u2696\u2708]|\u{1F3FC}\u200D[\u2695\u2696\u2708])\uFE0F|\u{1F3FB}\u200D[\u{1F33E}\u{1F373}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}]|[\u{1F3FB}-\u{1F3FF}])|(?:\u{1F9D1}\u{1F3FB}\u200D\u{1F91D}\u200D\u{1F9D1}|\u{1F469}\u{1F3FC}\u200D\u{1F91D}\u200D\u{1F469})\u{1F3FB}|\u{1F9D1}(?:\u{1F3FF}\u200D\u{1F91D}\u200D\u{1F9D1}[\u{1F3FB}-\u{1F3FF}]|\u200D\u{1F91D}\u200D\u{1F9D1})|(?:\u{1F9D1}\u{1F3FE}\u200D\u{1F91D}\u200D\u{1F9D1}|\u{1F469}\u{1F3FF}\u200D\u{1F91D}\u200D[\u{1F468}\u{1F469}])[\u{1F3FB}-\u{1F3FE}]|(?:\u{1F9D1}\u{1F3FC}\u200D\u{1F91D}\u200D\u{1F9D1}|\u{1F469}\u{1F3FD}\u200D\u{1F91D}\u200D\u{1F469})[\u{1F3FB}\u{1F3FC}]|\u{1F469}(?:\u{1F3FE}\u200D(?:\u{1F91D}\u200D\u{1F468}[\u{1F3FB}-\u{1F3FD}\u{1F3FF}]|[\u{1F33E}\u{1F373}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}])|\u{1F3FC}\u200D(?:\u{1F91D}\u200D\u{1F468}[\u{1F3FB}\u{1F3FD}-\u{1F3FF}]|[\u{1F33E}\u{1F373}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}])|\u{1F3FB}\u200D(?:\u{1F91D}\u200D\u{1F468}[\u{1F3FC}-\u{1F3FF}]|[\u{1F33E}\u{1F373}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}])|\u{1F3FD}\u200D(?:\u{1F91D}\u200D\u{1F468}[\u{1F3FB}\u{1F3FC}\u{1F3FE}\u{1F3FF}]|[\u{1F33E}\u{1F373}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}])|\u200D(?:\u2764\uFE0F\u200D(?:\u{1F48B}\u200D[\u{1F468}\u{1F469}]|[\u{1F468}\u{1F469}])|[\u{1F33E}\u{1F373}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}])|\u{1F3FF}\u200D[\u{1F33E}\u{1F373}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}])|\u{1F469}\u200D\u{1F469}\u200D(?:\u{1F466}\u200D\u{1F466}|\u{1F467}\u200D[\u{1F466}\u{1F467}])|(?:\u{1F9D1}\u{1F3FD}\u200D\u{1F91D}\u200D\u{1F9D1}|\u{1F469}\u{1F3FE}\u200D\u{1F91D}\u200D\u{1F469})[\u{1F3FB}-\u{1F3FD}]|\u{1F469}\u200D\u{1F466}\u200D\u{1F466}|\u{1F469}\u200D\u{1F469}\u200D[\u{1F466}\u{1F467}]|(?:\u{1F441}\uFE0F\u200D\u{1F5E8}|\u{1F469}(?:\u{1F3FF}\u200D[\u2695\u2696\u2708]|\u{1F3FE}\u200D[\u2695\u2696\u2708]|\u{1F3FC}\u200D[\u2695\u2696\u2708]|\u{1F3FB}\u200D[\u2695\u2696\u2708]|\u{1F3FD}\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|(?:[\u26F9\u{1F3CB}\u{1F3CC}\u{1F575}]\uFE0F|[\u{1F46F}\u{1F93C}\u{1F9DE}\u{1F9DF}])\u200D[\u2640\u2642]|[\u26F9\u{1F3CB}\u{1F3CC}\u{1F575}][\u{1F3FB}-\u{1F3FF}]\u200D[\u2640\u2642]|[\u{1F3C3}\u{1F3C4}\u{1F3CA}\u{1F46E}\u{1F471}\u{1F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}\u{1F1F0}\u{1F1F7}-\u{1F1FB}\u{1F1FE}]|\u{1F1FF}[\u{1F1E6}\u{1F1F2}\u{1F1FC}]|\u{1F1FC}[\u{1F1EB}\u{1F1F8}]|\u{1F1FA}[\u{1F1E6}\u{1F1EC}\u{1F1F2}\u{1F1F3}\u{1F1F8}\u{1F1FE}\u{1F1FF}]|\u{1F1EE}[\u{1F1E8}-\u{1F1EA}\u{1F1F1}-\u{1F1F4}\u{1F1F6}-\u{1F1F9}]|\u{1F1EF}[\u{1F1EA}\u{1F1F2}\u{1F1F4}\u{1F1F5}]|[\u{1F3C3}\u{1F3C4}\u{1F3CA}\u{1F46E}\u{1F471}\u{1F473}\u{1F477}\u{1F481}\u{1F482}\u{1F486}\u{1F487}\u{1F645}-\u{1F647}\u{1F64B}\u{1F64D}\u{1F64E}\u{1F6A3}\u{1F6B4}-\u{1F6B6}\u{1F926}\u{1F937}-\u{1F939}\u{1F93D}\u{1F93E}\u{1F9B8}\u{1F9B9}\u{1F9CD}-\u{1F9CF}\u{1F9D6}-\u{1F9DD}][\u{1F3FB}-\u{1F3FF}]|[\u26F9\u{1F3CB}\u{1F3CC}\u{1F575}][\u{1F3FB}-\u{1F3FF}]|[\u261D\u270A-\u270D\u{1F385}\u{1F3C2}\u{1F3C7}\u{1F442}\u{1F443}\u{1F446}-\u{1F450}\u{1F466}\u{1F467}\u{1F46B}-\u{1F46D}\u{1F470}\u{1F472}\u{1F474}-\u{1F476}\u{1F478}\u{1F47C}\u{1F483}\u{1F485}\u{1F4AA}\u{1F574}\u{1F57A}\u{1F590}\u{1F595}\u{1F596}\u{1F64C}\u{1F64F}\u{1F6C0}\u{1F6CC}\u{1F90F}\u{1F918}-\u{1F91C}\u{1F91E}\u{1F91F}\u{1F930}-\u{1F936}\u{1F9B5}\u{1F9B6}\u{1F9BB}\u{1F9D2}-\u{1F9D5}][\u{1F3FB}-\u{1F3FF}]|[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55\u{1F004}\u{1F0CF}\u{1F18E}\u{1F191}-\u{1F19A}\u{1F1E6}-\u{1F1FF}\u{1F201}\u{1F21A}\u{1F22F}\u{1F232}-\u{1F236}\u{1F238}-\u{1F23A}\u{1F250}\u{1F251}\u{1F300}-\u{1F320}\u{1F32D}-\u{1F335}\u{1F337}-\u{1F37C}\u{1F37E}-\u{1F393}\u{1F3A0}-\u{1F3CA}\u{1F3CF}-\u{1F3D3}\u{1F3E0}-\u{1F3F0}\u{1F3F4}\u{1F3F8}-\u{1F43E}\u{1F440}\u{1F442}-\u{1F4FC}\u{1F4FF}-\u{1F53D}\u{1F54B}-\u{1F54E}\u{1F550}-\u{1F567}\u{1F57A}\u{1F595}\u{1F596}\u{1F5A4}\u{1F5FB}-\u{1F64F}\u{1F680}-\u{1F6C5}\u{1F6CC}\u{1F6D0}-\u{1F6D2}\u{1F6D5}\u{1F6EB}\u{1F6EC}\u{1F6F4}-\u{1F6FA}\u{1F7E0}-\u{1F7EB}\u{1F90D}-\u{1F93A}\u{1F93C}-\u{1F945}\u{1F947}-\u{1F971}\u{1F973}-\u{1F976}\u{1F97A}-\u{1F9A2}\u{1F9A5}-\u{1F9AA}\u{1F9AE}-\u{1F9CA}\u{1F9CD}-\u{1F9FF}\u{1FA70}-\u{1FA73}\u{1FA78}-\u{1FA7A}\u{1FA80}-\u{1FA82}\u{1FA90}-\u{1FA95}]|[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299\u{1F004}\u{1F0CF}\u{1F170}\u{1F171}\u{1F17E}\u{1F17F}\u{1F18E}\u{1F191}-\u{1F19A}\u{1F1E6}-\u{1F1FF}\u{1F201}\u{1F202}\u{1F21A}\u{1F22F}\u{1F232}-\u{1F23A}\u{1F250}\u{1F251}\u{1F300}-\u{1F321}\u{1F324}-\u{1F393}\u{1F396}\u{1F397}\u{1F399}-\u{1F39B}\u{1F39E}-\u{1F3F0}\u{1F3F3}-\u{1F3F5}\u{1F3F7}-\u{1F4FD}\u{1F4FF}-\u{1F53D}\u{1F549}-\u{1F54E}\u{1F550}-\u{1F567}\u{1F56F}\u{1F570}\u{1F573}-\u{1F57A}\u{1F587}\u{1F58A}-\u{1F58D}\u{1F590}\u{1F595}\u{1F596}\u{1F5A4}\u{1F5A5}\u{1F5A8}\u{1F5B1}\u{1F5B2}\u{1F5BC}\u{1F5C2}-\u{1F5C4}\u{1F5D1}-\u{1F5D3}\u{1F5DC}-\u{1F5DE}\u{1F5E1}\u{1F5E3}\u{1F5E8}\u{1F5EF}\u{1F5F3}\u{1F5FA}-\u{1F64F}\u{1F680}-\u{1F6C5}\u{1F6CB}-\u{1F6D2}\u{1F6D5}\u{1F6E0}-\u{1F6E5}\u{1F6E9}\u{1F6EB}\u{1F6EC}\u{1F6F0}\u{1F6F3}-\u{1F6FA}\u{1F7E0}-\u{1F7EB}\u{1F90D}-\u{1F93A}\u{1F93C}-\u{1F945}\u{1F947}-\u{1F971}\u{1F973}-\u{1F976}\u{1F97A}-\u{1F9A2}\u{1F9A5}-\u{1F9AA}\u{1F9AE}-\u{1F9CA}\u{1F9CD}-\u{1F9FF}\u{1FA70}-\u{1FA73}\u{1FA78}-\u{1FA7A}\u{1FA80}-\u{1FA82}\u{1FA90}-\u{1FA95}]\uFE0F?|[\u261D\u26F9\u270A-\u270D\u{1F385}\u{1F3C2}-\u{1F3C4}\u{1F3C7}\u{1F3CA}-\u{1F3CC}\u{1F442}\u{1F443}\u{1F446}-\u{1F450}\u{1F466}-\u{1F478}\u{1F47C}\u{1F481}-\u{1F483}\u{1F485}-\u{1F487}\u{1F48F}\u{1F491}\u{1F4AA}\u{1F574}\u{1F575}\u{1F57A}\u{1F590}\u{1F595}\u{1F596}\u{1F645}-\u{1F647}\u{1F64B}-\u{1F64F}\u{1F6A3}\u{1F6B4}-\u{1F6B6}\u{1F6C0}\u{1F6CC}\u{1F90F}\u{1F918}-\u{1F91F}\u{1F926}\u{1F930}-\u{1F939}\u{1F93C}-\u{1F93E}\u{1F9B5}\u{1F9B6}\u{1F9B8}\u{1F9B9}\u{1F9BB}\u{1F9CD}-\u{1F9CF}\u{1F9D1}-\u{1F9DD}]/gu; -}; diff --git a/node_modules/yargs/node_modules/emoji-regex/index.d.ts b/node_modules/yargs/node_modules/emoji-regex/index.d.ts deleted file mode 100644 index 1955b47..0000000 --- a/node_modules/yargs/node_modules/emoji-regex/index.d.ts +++ /dev/null @@ -1,23 +0,0 @@ -declare module 'emoji-regex' { - function emojiRegex(): RegExp; - - export default emojiRegex; -} - -declare module 'emoji-regex/text' { - function emojiRegex(): RegExp; - - export default emojiRegex; -} - -declare module 'emoji-regex/es2015' { - function emojiRegex(): RegExp; - - export default emojiRegex; -} - -declare module 'emoji-regex/es2015/text' { - function emojiRegex(): RegExp; - - export default emojiRegex; -} diff --git a/node_modules/yargs/node_modules/emoji-regex/index.js b/node_modules/yargs/node_modules/emoji-regex/index.js deleted file mode 100644 index d993a3a..0000000 --- a/node_modules/yargs/node_modules/emoji-regex/index.js +++ /dev/null @@ -1,6 +0,0 @@ -"use strict"; - -module.exports = function () { - // https://mths.be/emoji - return /\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F|\uD83D\uDC68(?:\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68\uD83C\uDFFB|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|[\u2695\u2696\u2708]\uFE0F|\uD83D[\uDC66\uDC67]|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708])\uFE0F|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C[\uDFFB-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)\uD83C\uDFFB|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB\uDFFC])|\uD83D\uDC69(?:\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB-\uDFFD])|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|(?:(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)\uFE0F|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\u200D[\u2640\u2642])|\uD83C\uDFF4\u200D\u2620)\uFE0F|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF4\uD83C\uDDF2|\uD83C\uDDF6\uD83C\uDDE6|[#\*0-9]\uFE0F\u20E3|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83D\uDC69(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8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uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270A-\u270D]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC70\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDCAA\uDD74\uDD7A\uDD90\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD36\uDDB5\uDDB6\uDDBB\uDDD2-\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5\uDEEB\uDEEC\uDEF4-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\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DBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g; -}; diff --git a/node_modules/yargs/node_modules/emoji-regex/package.json b/node_modules/yargs/node_modules/emoji-regex/package.json deleted file mode 100644 index 6d32352..0000000 --- a/node_modules/yargs/node_modules/emoji-regex/package.json +++ /dev/null @@ -1,50 +0,0 @@ -{ - "name": "emoji-regex", - "version": "8.0.0", - "description": "A regular expression to match all Emoji-only symbols as per the Unicode Standard.", - "homepage": "https://mths.be/emoji-regex", - "main": "index.js", - "types": "index.d.ts", - "keywords": [ - "unicode", - "regex", - "regexp", - "regular expressions", - "code points", - "symbols", - "characters", - "emoji" - ], - "license": "MIT", - "author": { - "name": "Mathias Bynens", - "url": "https://mathiasbynens.be/" - }, - "repository": { - "type": "git", - "url": "https://github.com/mathiasbynens/emoji-regex.git" - }, - "bugs": "https://github.com/mathiasbynens/emoji-regex/issues", - "files": [ - "LICENSE-MIT.txt", - "index.js", - "index.d.ts", - "text.js", - "es2015/index.js", - "es2015/text.js" - ], - "scripts": { - "build": "rm -rf -- es2015; babel src -d .; NODE_ENV=es2015 babel src -d ./es2015; node script/inject-sequences.js", - "test": "mocha", - "test:watch": "npm run test -- --watch" - }, - "devDependencies": { - "@babel/cli": "^7.2.3", - "@babel/core": "^7.3.4", - "@babel/plugin-proposal-unicode-property-regex": "^7.2.0", - "@babel/preset-env": "^7.3.4", - "mocha": "^6.0.2", - "regexgen": "^1.3.0", - "unicode-12.0.0": "^0.7.9" - } -} diff --git a/node_modules/yargs/node_modules/emoji-regex/text.js b/node_modules/yargs/node_modules/emoji-regex/text.js deleted file mode 100644 index 0a55ce2..0000000 --- a/node_modules/yargs/node_modules/emoji-regex/text.js +++ /dev/null @@ -1,6 +0,0 @@ -"use strict"; - -module.exports = function () { - // https://mths.be/emoji - return /\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F|\uD83D\uDC68(?:\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68\uD83C\uDFFB|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|[\u2695\u2696\u2708]\uFE0F|\uD83D[\uDC66\uDC67]|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708])\uFE0F|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C[\uDFFB-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)\uD83C\uDFFB|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB\uDFFC])|\uD83D\uDC69(?:\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB-\uDFFD])|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|(?:(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)\uFE0F|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\u200D[\u2640\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uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270A-\u270D]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC70\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDCAA\uDD74\uDD7A\uDD90\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD36\uDDB5\uDDB6\uDDBB\uDDD2-\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5\uDEEB\uDEEC\uDEF4-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])\uFE0F?|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDC8F\uDC91\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g; -}; diff --git a/node_modules/yargs/node_modules/string-width/index.d.ts b/node_modules/yargs/node_modules/string-width/index.d.ts deleted file mode 100644 index 12b5309..0000000 --- a/node_modules/yargs/node_modules/string-width/index.d.ts +++ /dev/null @@ -1,29 +0,0 @@ -declare const stringWidth: { - /** - Get the visual width of a string - the number of columns required to display it. - - Some Unicode characters are [fullwidth](https://en.wikipedia.org/wiki/Halfwidth_and_fullwidth_forms) and use double the normal width. [ANSI escape codes](https://en.wikipedia.org/wiki/ANSI_escape_code) are stripped and doesn't affect the width. - - @example - ``` - import stringWidth = require('string-width'); - - stringWidth('a'); - //=> 1 - - stringWidth('古'); - //=> 2 - - stringWidth('\u001B[1m古\u001B[22m'); - //=> 2 - ``` - */ - (string: string): number; - - // TODO: remove this in the next major version, refactor the whole definition to: - // declare function stringWidth(string: string): number; - // export = stringWidth; - default: typeof stringWidth; -} - -export = stringWidth; diff --git a/node_modules/yargs/node_modules/string-width/index.js b/node_modules/yargs/node_modules/string-width/index.js deleted file mode 100644 index f4d261a..0000000 --- a/node_modules/yargs/node_modules/string-width/index.js +++ /dev/null @@ -1,47 +0,0 @@ -'use strict'; -const stripAnsi = require('strip-ansi'); -const isFullwidthCodePoint = require('is-fullwidth-code-point'); -const emojiRegex = require('emoji-regex'); - -const stringWidth = string => { - if (typeof string !== 'string' || string.length === 0) { - return 0; - } - - string = stripAnsi(string); - - if (string.length === 0) { - return 0; - } - - string = string.replace(emojiRegex(), ' '); - - let width = 0; - - for (let i = 0; i < string.length; i++) { - const code = string.codePointAt(i); - - // Ignore control characters - if (code <= 0x1F || (code >= 0x7F && code <= 0x9F)) { - continue; - } - - // Ignore combining characters - if (code >= 0x300 && code <= 0x36F) { - continue; - } - - // Surrogates - if (code > 0xFFFF) { - i++; - } - - width += isFullwidthCodePoint(code) ? 2 : 1; - } - - return width; -}; - -module.exports = stringWidth; -// TODO: remove this in the next major version -module.exports.default = stringWidth; diff --git a/node_modules/yargs/node_modules/string-width/package.json b/node_modules/yargs/node_modules/string-width/package.json deleted file mode 100644 index 28ba7b4..0000000 --- a/node_modules/yargs/node_modules/string-width/package.json +++ /dev/null @@ -1,56 +0,0 @@ -{ - "name": "string-width", - "version": "4.2.3", - "description": "Get the visual width of a string - the number of columns required to display it", - "license": "MIT", - "repository": "sindresorhus/string-width", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "engines": { - "node": ">=8" - }, - "scripts": { - "test": "xo && ava && tsd" - }, - "files": [ - "index.js", - "index.d.ts" - ], - "keywords": [ - "string", - "character", - "unicode", - "width", - "visual", - "column", - "columns", - "fullwidth", - "full-width", - "full", - "ansi", - "escape", - "codes", - "cli", - "command-line", - "terminal", - "console", - "cjk", - "chinese", - "japanese", - "korean", - "fixed-width" - ], - "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" - }, - "devDependencies": { - "ava": "^1.4.1", - "tsd": "^0.7.1", - "xo": "^0.24.0" - } -} diff --git a/node_modules/yargs/node_modules/strip-ansi/index.d.ts b/node_modules/yargs/node_modules/strip-ansi/index.d.ts deleted file mode 100644 index 907fccc..0000000 --- a/node_modules/yargs/node_modules/strip-ansi/index.d.ts +++ /dev/null @@ -1,17 +0,0 @@ -/** -Strip [ANSI escape codes](https://en.wikipedia.org/wiki/ANSI_escape_code) from a string. - -@example -``` -import stripAnsi = require('strip-ansi'); - -stripAnsi('\u001B[4mUnicorn\u001B[0m'); -//=> 'Unicorn' - -stripAnsi('\u001B]8;;https://github.com\u0007Click\u001B]8;;\u0007'); -//=> 'Click' -``` -*/ -declare function stripAnsi(string: string): string; - -export = stripAnsi; diff --git a/node_modules/yargs/node_modules/strip-ansi/index.js b/node_modules/yargs/node_modules/strip-ansi/index.js deleted file mode 100644 index 9a593df..0000000 --- a/node_modules/yargs/node_modules/strip-ansi/index.js +++ /dev/null @@ -1,4 +0,0 @@ -'use strict'; -const ansiRegex = require('ansi-regex'); - -module.exports = string => typeof string === 'string' ? string.replace(ansiRegex(), '') : string; diff --git a/node_modules/yargs/node_modules/strip-ansi/package.json b/node_modules/yargs/node_modules/strip-ansi/package.json deleted file mode 100644 index 1a41108..0000000 --- a/node_modules/yargs/node_modules/strip-ansi/package.json +++ /dev/null @@ -1,54 +0,0 @@ -{ - "name": "strip-ansi", - "version": "6.0.1", - "description": "Strip ANSI escape codes from a string", - "license": "MIT", - "repository": "chalk/strip-ansi", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "engines": { - "node": ">=8" - }, - "scripts": { - "test": "xo && ava && tsd" - }, - "files": [ - "index.js", - "index.d.ts" - ], - "keywords": [ - "strip", - "trim", - "remove", - "ansi", - "styles", - "color", - "colour", - "colors", - "terminal", - "console", - "string", - "tty", - "escape", - "formatting", - "rgb", - "256", - "shell", - "xterm", - "log", - "logging", - "command-line", - "text" - ], - "dependencies": { - "ansi-regex": "^5.0.1" - }, - "devDependencies": { - "ava": "^2.4.0", - "tsd": "^0.10.0", - "xo": "^0.25.3" - } -} diff --git a/node_modules/yargs/package.json b/node_modules/yargs/package.json deleted file mode 100644 index 389cc6b..0000000 --- a/node_modules/yargs/package.json +++ /dev/null @@ -1,123 +0,0 @@ -{ - "name": "yargs", - "version": "17.7.2", - "description": "yargs the modern, pirate-themed, successor to optimist.", - "main": "./index.cjs", - "exports": { - "./package.json": "./package.json", - ".": [ - { - "import": "./index.mjs", - "require": "./index.cjs" - }, - "./index.cjs" - ], - "./helpers": { - "import": "./helpers/helpers.mjs", - "require": "./helpers/index.js" - }, - "./browser": { - "import": "./browser.mjs", - "types": "./browser.d.ts" - }, - "./yargs": [ - { - "import": "./yargs.mjs", - "require": "./yargs" - }, - "./yargs" - ] - }, - "type": "module", - "module": "./index.mjs", - "contributors": [ - { - "name": "Yargs Contributors", - "url": "https://github.com/yargs/yargs/graphs/contributors" - } - ], - "files": [ - "browser.mjs", - "browser.d.ts", - "index.cjs", - "helpers/*.js", - "helpers/*", - "index.mjs", - "yargs", - "yargs.mjs", - "build", - "locales", - "LICENSE", - "lib/platform-shims/*.mjs", - "!*.d.ts", - "!**/*.d.ts" - ], - "dependencies": { - "cliui": "^8.0.1", - "escalade": "^3.1.1", - "get-caller-file": "^2.0.5", - "require-directory": "^2.1.1", - "string-width": "^4.2.3", - "y18n": "^5.0.5", - "yargs-parser": "^21.1.1" - }, - "devDependencies": { - "@types/chai": "^4.2.11", - "@types/mocha": "^9.0.0", - "@types/node": "^18.0.0", - "c8": "^7.7.0", - "chai": "^4.2.0", - "chalk": "^4.0.0", - "coveralls": "^3.0.9", - "cpr": "^3.0.1", - "cross-env": "^7.0.2", - "cross-spawn": "^7.0.0", - "eslint": "^7.23.0", - "gts": "^3.0.0", - "hashish": "0.0.4", - "mocha": "^9.0.0", - "rimraf": "^3.0.2", - "rollup": "^2.23.0", - "rollup-plugin-cleanup": "^3.1.1", - "rollup-plugin-terser": "^7.0.2", - "rollup-plugin-ts": "^2.0.4", - "typescript": "^4.0.2", - "which": "^2.0.0", - "yargs-test-extends": "^1.0.1" - }, - "scripts": { - "fix": "gts fix && npm run fix:js", - "fix:js": "eslint . --ext cjs --ext mjs --ext js --fix", - "posttest": "npm run check", - "test": "c8 mocha --enable-source-maps ./test/*.cjs --require ./test/before.cjs --timeout=12000 --check-leaks", - "test:esm": "c8 mocha --enable-source-maps ./test/esm/*.mjs --check-leaks", - "coverage": "c8 report --check-coverage", - "prepare": "npm run compile", - "pretest": "npm run compile -- -p tsconfig.test.json && cross-env NODE_ENV=test npm run build:cjs", - "compile": "rimraf build && tsc", - "postcompile": "npm run build:cjs", - "build:cjs": "rollup -c rollup.config.cjs", - "postbuild:cjs": "rimraf ./build/index.cjs.d.ts", - "check": "gts lint && npm run check:js", - "check:js": "eslint . --ext cjs --ext mjs --ext js", - "clean": "gts clean" - }, - "repository": { - "type": "git", - "url": "https://github.com/yargs/yargs.git" - }, - "homepage": "https://yargs.js.org/", - "keywords": [ - "argument", - "args", - "option", - "parser", - "parsing", - "cli", - "command" - ], - "license": "MIT", - "engines": { - "node": ">=12" - } -} diff --git a/node_modules/yargs/yargs b/node_modules/yargs/yargs deleted file mode 100644 index 8460d10..0000000 --- a/node_modules/yargs/yargs +++ /dev/null @@ -1,9 +0,0 @@ -// TODO: consolidate on using a helpers file at some point in the future, which -// is the approach currently used to export Parser and applyExtends for ESM: -const {applyExtends, cjsPlatformShim, Parser, Yargs, processArgv} = require('./build/index.cjs') -Yargs.applyExtends = (config, cwd, mergeExtends) => { - return applyExtends(config, cwd, mergeExtends, cjsPlatformShim) -} -Yargs.hideBin = processArgv.hideBin -Yargs.Parser = Parser -module.exports = Yargs diff --git a/node_modules/yargs/yargs.mjs b/node_modules/yargs/yargs.mjs deleted file mode 100644 index 6d9f390..0000000 --- a/node_modules/yargs/yargs.mjs +++ /dev/null @@ -1,10 +0,0 @@ -// TODO: consolidate on using a helpers file at some point in the future, which -// is the approach currently used to export Parser and applyExtends for ESM: -import pkg from './build/index.cjs'; -const {applyExtends, cjsPlatformShim, Parser, processArgv, Yargs} = pkg; -Yargs.applyExtends = (config, cwd, mergeExtends) => { - return applyExtends(config, cwd, mergeExtends, cjsPlatformShim); -}; -Yargs.hideBin = processArgv.hideBin; -Yargs.Parser = Parser; -export default Yargs; diff --git a/package-lock.json b/package-lock.json index a1f32ee..e52245d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -8,25 +8,15 @@ "name": "codtracker-js", "version": "1.0.0", "dependencies": { - "body-parser": "^1.20.2", - "cheerio": "^1.0.0", + "body-parser": "^2.2.0", "csso": "^5.0.5", - "express": "^4.18.2", + "express": "^4.21.2", "glob": "^11.0.1", "html-minifier": "^4.0.0", - "replace-in-file": "^6.3.5", - "terser": "^5.39.0" - }, - "devDependencies": { - "nodemon": "^3.0.1" - } - }, - "node_modules/@fastify/busboy": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/@fastify/busboy/-/busboy-2.1.1.tgz", - "integrity": "sha512-vBZP4NlzfOlerQTnba4aqZoMhE/a9HY7HRqoOPaETQcSQuWEIyZMHGfVu6w9wGtGK5fED5qRs2DteVCjOH60sA==", - "engines": { - "node": ">=14" + "serve-favicon": "^2.5.0", + "terser": "^5.39.0", + "tslib": "^2.8.1", + "undici": "^7.6.0" } }, "node_modules/@isaacs/cliui": { @@ -152,19 +142,6 @@ "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, - "node_modules/anymatch": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", - "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", - "dev": true, - "dependencies": { - "normalize-path": "^3.0.0", - "picomatch": "^2.0.4" - }, - "engines": { - "node": ">= 8" - } - }, "node_modules/array-flatten": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", @@ -175,66 +152,106 @@ "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==" }, - "node_modules/binary-extensions": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.3.0.tgz", - "integrity": "sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==", - "dev": true, + "node_modules/body-parser": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-2.2.0.tgz", + "integrity": "sha512-02qvAaxv8tp7fBa/mw1ga98OGm+eCbqzJOKoRt70sLmfEEi+jyBYVTDGfCL/k06/4EMk/z01gCe7HoCH/f2LTg==", + "license": "MIT", + "dependencies": { + "bytes": "^3.1.2", + "content-type": "^1.0.5", + "debug": "^4.4.0", + "http-errors": "^2.0.0", + "iconv-lite": "^0.6.3", + "on-finished": "^2.4.1", + "qs": "^6.14.0", + "raw-body": "^3.0.0", + "type-is": "^2.0.0" + }, "engines": { - "node": ">=8" + "node": ">=18" + } + }, + "node_modules/body-parser/node_modules/debug": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.0.tgz", + "integrity": "sha512-6WTZ/IxCY/T6BALoZHaE4ctp9xm+Z5kY/pzYaCHRFeyVhojxlrm+46y68HA6hr0TcwEssoxNiDEUJQjfPZ/RYA==", + "license": "MIT", + "dependencies": { + "ms": "^2.1.3" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/body-parser/node_modules/media-typer": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-1.1.0.tgz", + "integrity": "sha512-aisnrDP4GNe06UcKFnV5bfMNPBUw4jsLGaWwWfnH3v02GnBuXX2MCVn5RbrWo0j3pczUilYblq7fQ7Nw2t5XKw==", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/body-parser/node_modules/mime-db": { + "version": "1.54.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.54.0.tgz", + "integrity": "sha512-aU5EJuIN2WDemCcAp2vFBfp/m4EAhWJnUNSSw0ixs7/kXbd6Pg64EmwJkNdFhB8aWt1sH2CTXrLxo/iAGV3oPQ==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/body-parser/node_modules/mime-types": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-3.0.1.tgz", + "integrity": "sha512-xRc4oEhT6eaBpU1XF7AjpOFD+xQmXNB5OVKwp4tqCuBpHLS/ZbBDrc07mYTDqVMg6PfxUjjNp85O6Cd2Z/5HWA==", + "license": "MIT", + "dependencies": { + "mime-db": "^1.54.0" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/body-parser/node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "license": "MIT" + }, + "node_modules/body-parser/node_modules/qs": { + "version": "6.14.0", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.14.0.tgz", + "integrity": "sha512-YWWTjgABSKcvs/nWBi9PycY/JiPJqOD4JA6o9Sej2AtvSGarXxKC3OQSk4pAarbdQlKAh5D4FCQkJNkW+GAn3w==", + "license": "BSD-3-Clause", + "dependencies": { + "side-channel": "^1.1.0" + }, + "engines": { + "node": ">=0.6" }, "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/body-parser": { - "version": "1.20.3", - "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.3.tgz", - "integrity": "sha512-7rAxByjUMqQ3/bHJy7D6OGXvx/MMc4IqBn/X0fcM1QUcAItpZrBEYhWGem+tzXH90c+G01ypMcYJBO9Y30203g==", + "node_modules/body-parser/node_modules/type-is": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/type-is/-/type-is-2.0.1.tgz", + "integrity": "sha512-OZs6gsjF4vMp32qrCbiVSkrFmXtG/AZhY3t0iAMrMBiAZyV9oALtXO8hsrHbMXF9x6L3grlFuwW2oAz7cav+Gw==", + "license": "MIT", "dependencies": { - "bytes": "3.1.2", - "content-type": "~1.0.5", - "debug": "2.6.9", - "depd": "2.0.0", - "destroy": "1.2.0", - "http-errors": "2.0.0", - "iconv-lite": "0.4.24", - "on-finished": "2.4.1", - "qs": "6.13.0", - "raw-body": "2.5.2", - "type-is": "~1.6.18", - "unpipe": "1.0.0" + "content-type": "^1.0.5", + "media-typer": "^1.1.0", + "mime-types": "^3.0.0" }, "engines": { - "node": ">= 0.8", - "npm": "1.2.8000 || >= 1.4.16" - } - }, - "node_modules/boolbase": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/boolbase/-/boolbase-1.0.0.tgz", - "integrity": "sha512-JZOSA7Mo9sNGB8+UjSgzdLtokWAky1zbztM3WRLCbZ70/3cTANmQmOdR7y2g+J0e2WXywy1yS468tY+IruqEww==", - "license": "ISC" - }, - "node_modules/brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "node_modules/braces": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", - "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", - "dev": true, - "dependencies": { - "fill-range": "^7.1.1" - }, - "engines": { - "node": ">=8" + "node": ">= 0.6" } }, "node_modules/buffer-from": { @@ -247,6 +264,7 @@ "version": "3.1.2", "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz", "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==", + "license": "MIT", "engines": { "node": ">= 0.8" } @@ -288,133 +306,6 @@ "upper-case": "^1.1.1" } }, - "node_modules/chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "license": "MIT", - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "node_modules/chalk/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "license": "MIT", - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/chalk/node_modules/has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/chalk/node_modules/supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "license": "MIT", - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/cheerio": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/cheerio/-/cheerio-1.0.0.tgz", - "integrity": "sha512-quS9HgjQpdaXOvsZz82Oz7uxtXiy6UIsIQcpBj7HRw2M63Skasm9qlDocAM7jNuaxdhpPU7c4kJN+gA5MCu4ww==", - "license": "MIT", - "dependencies": { - "cheerio-select": "^2.1.0", - "dom-serializer": "^2.0.0", - "domhandler": "^5.0.3", - "domutils": "^3.1.0", - "encoding-sniffer": "^0.2.0", - "htmlparser2": "^9.1.0", - "parse5": "^7.1.2", - "parse5-htmlparser2-tree-adapter": "^7.0.0", - "parse5-parser-stream": "^7.1.2", - "undici": "^6.19.5", - "whatwg-mimetype": "^4.0.0" - }, - "engines": { - "node": ">=18.17" - }, - "funding": { - "url": "https://github.com/cheeriojs/cheerio?sponsor=1" - } - }, - "node_modules/cheerio-select": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/cheerio-select/-/cheerio-select-2.1.0.tgz", - "integrity": "sha512-9v9kG0LvzrlcungtnJtpGNxY+fzECQKhK4EGJX2vByejiMX84MFNQw4UxPJl3bFbTMw+Dfs37XaIkCwTZfLh4g==", - "license": "BSD-2-Clause", - "dependencies": { - "boolbase": "^1.0.0", - "css-select": "^5.1.0", - "css-what": "^6.1.0", - "domelementtype": "^2.3.0", - "domhandler": "^5.0.3", - "domutils": "^3.0.1" - }, - "funding": { - "url": "https://github.com/sponsors/fb55" - } - }, - "node_modules/cheerio/node_modules/undici": { - "version": "6.21.2", - "resolved": "https://registry.npmjs.org/undici/-/undici-6.21.2.tgz", - "integrity": "sha512-uROZWze0R0itiAKVPsYhFov9LxrPMHLMEQFszeI2gCN6bnIIZ8twzBCJcN2LJrBBLfrP0t1FW0g+JmKVl8Vk1g==", - "license": "MIT", - "engines": { - "node": ">=18.17" - } - }, - "node_modules/chokidar": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.6.0.tgz", - "integrity": "sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==", - "dev": true, - "dependencies": { - "anymatch": "~3.1.2", - "braces": "~3.0.2", - "glob-parent": "~5.1.2", - "is-binary-path": "~2.1.0", - "is-glob": "~4.0.1", - "normalize-path": "~3.0.0", - "readdirp": "~3.6.0" - }, - "engines": { - "node": ">= 8.10.0" - }, - "funding": { - "url": "https://paulmillr.com/funding/" - }, - "optionalDependencies": { - "fsevents": "~2.3.2" - } - }, "node_modules/clean-css": { "version": "4.2.4", "resolved": "https://registry.npmjs.org/clean-css/-/clean-css-4.2.4.tgz", @@ -427,93 +318,6 @@ "node": ">= 4.0" } }, - "node_modules/cliui": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", - "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", - "license": "ISC", - "dependencies": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.1", - "wrap-ansi": "^7.0.0" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/cliui/node_modules/ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/cliui/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "license": "MIT", - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/cliui/node_modules/emoji-regex": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", - "license": "MIT" - }, - "node_modules/cliui/node_modules/string-width": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", - "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", - "license": "MIT", - "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/cliui/node_modules/strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "license": "MIT", - "dependencies": { - "ansi-regex": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/cliui/node_modules/wrap-ansi": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", - "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", - "license": "MIT", - "dependencies": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/wrap-ansi?sponsor=1" - } - }, "node_modules/color-convert": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", @@ -538,11 +342,6 @@ "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", "license": "MIT" }, - "node_modules/concat-map": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==" - }, "node_modules/content-disposition": { "version": "0.5.4", "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.4.tgz", @@ -589,22 +388,6 @@ "node": ">= 8" } }, - "node_modules/css-select": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/css-select/-/css-select-5.1.0.tgz", - "integrity": "sha512-nwoRF1rvRRnnCqqY7updORDsuqKzqYJ28+oSMaJMMgOauh3fvwHqMS7EZpIPqK8GL+g9mKxF1vP/ZjSeNjEVHg==", - "license": "BSD-2-Clause", - "dependencies": { - "boolbase": "^1.0.0", - "css-what": "^6.1.0", - "domhandler": "^5.0.2", - "domutils": "^3.0.1", - "nth-check": "^2.0.1" - }, - "funding": { - "url": "https://github.com/sponsors/fb55" - } - }, "node_modules/css-tree": { "version": "2.2.1", "resolved": "https://registry.npmjs.org/css-tree/-/css-tree-2.2.1.tgz", @@ -619,18 +402,6 @@ "npm": ">=7.0.0" } }, - "node_modules/css-what": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/css-what/-/css-what-6.1.0.tgz", - "integrity": "sha512-HTUrgRJ7r4dsZKU6GjmpfRK1O76h97Z8MfS1G0FozR+oF2kG6Vfe8JE6zwrkbxigziPHinCJ+gCPjA9EaBDtRw==", - "license": "BSD-2-Clause", - "engines": { - "node": ">= 6" - }, - "funding": { - "url": "https://github.com/sponsors/fb55" - } - }, "node_modules/csso": { "version": "5.0.5", "resolved": "https://registry.npmjs.org/csso/-/csso-5.0.5.tgz", @@ -669,61 +440,6 @@ "npm": "1.2.8000 || >= 1.4.16" } }, - "node_modules/dom-serializer": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-2.0.0.tgz", - "integrity": "sha512-wIkAryiqt/nV5EQKqQpo3SToSOV9J0DnbJqwK7Wv/Trc92zIAYZ4FlMu+JPFW1DfGFt81ZTCGgDEabffXeLyJg==", - "license": "MIT", - "dependencies": { - "domelementtype": "^2.3.0", - "domhandler": "^5.0.2", - "entities": "^4.2.0" - }, - "funding": { - "url": "https://github.com/cheeriojs/dom-serializer?sponsor=1" - } - }, - "node_modules/domelementtype": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-2.3.0.tgz", - "integrity": "sha512-OLETBj6w0OsagBwdXnPdN0cnMfF9opN69co+7ZrbfPGrdpPVNBUj02spi6B1N7wChLQiPn4CSH/zJvXw56gmHw==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/fb55" - } - ], - "license": "BSD-2-Clause" - }, - "node_modules/domhandler": { - "version": "5.0.3", - "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-5.0.3.tgz", - "integrity": "sha512-cgwlv/1iFQiFnU96XXgROh8xTeetsnJiDsTc7TYCLFd9+/WNkIqPTxiM/8pSd8VIrhXGTf1Ny1q1hquVqDJB5w==", - "license": "BSD-2-Clause", - "dependencies": { - "domelementtype": "^2.3.0" - }, - "engines": { - "node": ">= 4" - }, - "funding": { - "url": "https://github.com/fb55/domhandler?sponsor=1" - } - }, - "node_modules/domutils": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/domutils/-/domutils-3.2.2.tgz", - "integrity": "sha512-6kZKyUajlDuqlHKVX1w7gyslj9MPIXzIFiz/rGu35uC1wMi+kMhQwGhl4lt9unC9Vb9INnY9Z3/ZA3+FhASLaw==", - "license": "BSD-2-Clause", - "dependencies": { - "dom-serializer": "^2.0.0", - "domelementtype": "^2.3.0", - "domhandler": "^5.0.3" - }, - "funding": { - "url": "https://github.com/fb55/domutils?sponsor=1" - } - }, "node_modules/dunder-proto": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.1.tgz", @@ -762,43 +478,6 @@ "node": ">= 0.8" } }, - "node_modules/encoding-sniffer": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/encoding-sniffer/-/encoding-sniffer-0.2.0.tgz", - "integrity": "sha512-ju7Wq1kg04I3HtiYIOrUrdfdDvkyO9s5XM8QAj/bN61Yo/Vb4vgJxy5vi4Yxk01gWHbrofpPtpxM8bKger9jhg==", - "license": "MIT", - "dependencies": { - "iconv-lite": "^0.6.3", - "whatwg-encoding": "^3.1.1" - }, - "funding": { - "url": "https://github.com/fb55/encoding-sniffer?sponsor=1" - } - }, - "node_modules/encoding-sniffer/node_modules/iconv-lite": { - "version": "0.6.3", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz", - "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==", - "license": "MIT", - "dependencies": { - "safer-buffer": ">= 2.1.2 < 3.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/entities": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/entities/-/entities-4.5.0.tgz", - "integrity": "sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==", - "license": "BSD-2-Clause", - "engines": { - "node": ">=0.12" - }, - "funding": { - "url": "https://github.com/fb55/entities?sponsor=1" - } - }, "node_modules/es-define-property": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.1.tgz", @@ -826,15 +505,6 @@ "node": ">= 0.4" } }, - "node_modules/escalade": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz", - "integrity": "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==", - "license": "MIT", - "engines": { - "node": ">=6" - } - }, "node_modules/escape-html": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", @@ -852,6 +522,7 @@ "version": "4.21.2", "resolved": "https://registry.npmjs.org/express/-/express-4.21.2.tgz", "integrity": "sha512-28HqgMZAmih1Czt9ny7qr6ek2qddF4FclbMzwhCREB6OFfH+rXAnuNCwo1/wFvrtbgsQDb4kSbX9de9lFbrXnA==", + "license": "MIT", "dependencies": { "accepts": "~1.3.8", "array-flatten": "1.1.1", @@ -893,16 +564,55 @@ "url": "https://opencollective.com/express" } }, - "node_modules/fill-range": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", - "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", - "dev": true, + "node_modules/express/node_modules/body-parser": { + "version": "1.20.3", + "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.3.tgz", + "integrity": "sha512-7rAxByjUMqQ3/bHJy7D6OGXvx/MMc4IqBn/X0fcM1QUcAItpZrBEYhWGem+tzXH90c+G01ypMcYJBO9Y30203g==", + "license": "MIT", "dependencies": { - "to-regex-range": "^5.0.1" + "bytes": "3.1.2", + "content-type": "~1.0.5", + "debug": "2.6.9", + "depd": "2.0.0", + "destroy": "1.2.0", + "http-errors": "2.0.0", + "iconv-lite": "0.4.24", + "on-finished": "2.4.1", + "qs": "6.13.0", + "raw-body": "2.5.2", + "type-is": "~1.6.18", + "unpipe": "1.0.0" }, "engines": { - "node": ">=8" + "node": ">= 0.8", + "npm": "1.2.8000 || >= 1.4.16" + } + }, + "node_modules/express/node_modules/iconv-lite": { + "version": "0.4.24", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", + "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", + "license": "MIT", + "dependencies": { + "safer-buffer": ">= 2.1.2 < 3" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/express/node_modules/raw-body": { + "version": "2.5.2", + "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.2.tgz", + "integrity": "sha512-8zGqypfENjCIqGhgXToC8aB2r7YrBX+AQAfIPs/Mlk+BtPTztOvTS01NRW/3Eh60J+a48lt8qsCzirQ6loCVfA==", + "license": "MIT", + "dependencies": { + "bytes": "3.1.2", + "http-errors": "2.0.0", + "iconv-lite": "0.4.24", + "unpipe": "1.0.0" + }, + "engines": { + "node": ">= 0.8" } }, "node_modules/finalhandler": { @@ -954,26 +664,6 @@ "node": ">= 0.6" } }, - "node_modules/fs.realpath": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", - "license": "ISC" - }, - "node_modules/fsevents": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", - "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", - "dev": true, - "hasInstallScript": true, - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": "^8.16.0 || ^10.6.0 || >=11.0.0" - } - }, "node_modules/function-bind": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", @@ -982,15 +672,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/get-caller-file": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", - "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", - "license": "ISC", - "engines": { - "node": "6.* || 8.* || >= 10.*" - } - }, "node_modules/get-intrinsic": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.3.0.tgz", @@ -1049,18 +730,6 @@ "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/glob-parent": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", - "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", - "dev": true, - "dependencies": { - "is-glob": "^4.0.1" - }, - "engines": { - "node": ">= 6" - } - }, "node_modules/glob/node_modules/brace-expansion": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", @@ -1096,15 +765,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", - "dev": true, - "engines": { - "node": ">=4" - } - }, "node_modules/has-symbols": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.1.0.tgz", @@ -1157,25 +817,6 @@ "node": ">=6" } }, - "node_modules/htmlparser2": { - "version": "9.1.0", - "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-9.1.0.tgz", - "integrity": "sha512-5zfg6mHUoaer/97TxnGpxmbR7zJtPwIYFMZ/H5ucTlPZhKvtum05yiPK3Mgai3a0DyVxv7qYqoweaEd2nrYQzQ==", - "funding": [ - "https://github.com/fb55/htmlparser2?sponsor=1", - { - "type": "github", - "url": "https://github.com/sponsors/fb55" - } - ], - "license": "MIT", - "dependencies": { - "domelementtype": "^2.3.0", - "domhandler": "^5.0.3", - "domutils": "^3.1.0", - "entities": "^4.5.0" - } - }, "node_modules/http-errors": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz", @@ -1192,33 +833,17 @@ } }, "node_modules/iconv-lite": { - "version": "0.4.24", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", - "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz", + "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==", + "license": "MIT", "dependencies": { - "safer-buffer": ">= 2.1.2 < 3" + "safer-buffer": ">= 2.1.2 < 3.0.0" }, "engines": { "node": ">=0.10.0" } }, - "node_modules/ignore-by-default": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/ignore-by-default/-/ignore-by-default-1.0.1.tgz", - "integrity": "sha512-Ius2VYcGNk7T90CppJqcIkS5ooHUZyIQK+ClZfMfMNFEF9VSE73Fq+906u/CWu92x4gzZMWOwfFYckPObzdEbA==", - "dev": true - }, - "node_modules/inflight": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", - "deprecated": "This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.", - "license": "ISC", - "dependencies": { - "once": "^1.3.0", - "wrappy": "1" - } - }, "node_modules/inherits": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", @@ -1232,27 +857,6 @@ "node": ">= 0.10" } }, - "node_modules/is-binary-path": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", - "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", - "dev": true, - "dependencies": { - "binary-extensions": "^2.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/is-extglob": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", - "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/is-fullwidth-code-point": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", @@ -1262,27 +866,6 @@ "node": ">=8" } }, - "node_modules/is-glob": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", - "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", - "dev": true, - "dependencies": { - "is-extglob": "^2.1.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-number": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", - "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", - "dev": true, - "engines": { - "node": ">=0.12.0" - } - }, "node_modules/isexe": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", @@ -1387,17 +970,6 @@ "node": ">= 0.6" } }, - "node_modules/minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, "node_modules/minipass": { "version": "7.1.2", "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.2.tgz", @@ -1429,78 +1001,6 @@ "lower-case": "^1.1.1" } }, - "node_modules/nodemon": { - "version": "3.1.9", - "resolved": "https://registry.npmjs.org/nodemon/-/nodemon-3.1.9.tgz", - "integrity": "sha512-hdr1oIb2p6ZSxu3PB2JWWYS7ZQ0qvaZsc3hK8DR8f02kRzc8rjYmxAIvdz+aYC+8F2IjNaB7HMcSDg8nQpJxyg==", - "dev": true, - "dependencies": { - "chokidar": "^3.5.2", - "debug": "^4", - "ignore-by-default": "^1.0.1", - "minimatch": "^3.1.2", - "pstree.remy": "^1.1.8", - "semver": "^7.5.3", - "simple-update-notifier": "^2.0.0", - "supports-color": "^5.5.0", - "touch": "^3.1.0", - "undefsafe": "^2.0.5" - }, - "bin": { - "nodemon": "bin/nodemon.js" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/nodemon" - } - }, - "node_modules/nodemon/node_modules/debug": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.0.tgz", - "integrity": "sha512-6WTZ/IxCY/T6BALoZHaE4ctp9xm+Z5kY/pzYaCHRFeyVhojxlrm+46y68HA6hr0TcwEssoxNiDEUJQjfPZ/RYA==", - "dev": true, - "dependencies": { - "ms": "^2.1.3" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, - "node_modules/nodemon/node_modules/ms": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", - "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", - "dev": true - }, - "node_modules/normalize-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", - "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/nth-check": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/nth-check/-/nth-check-2.1.1.tgz", - "integrity": "sha512-lqjrjmaOoAnWfMmBPL+XNnynZh2+swxiX3WUE0s4yEHI6m+AwrK2UZOimIRl3X/4QctVqS8AiZjFqyOGrMXb/w==", - "license": "BSD-2-Clause", - "dependencies": { - "boolbase": "^1.0.0" - }, - "funding": { - "url": "https://github.com/fb55/nth-check?sponsor=1" - } - }, "node_modules/object-inspect": { "version": "1.13.4", "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.4.tgz", @@ -1523,15 +1023,6 @@ "node": ">= 0.8" } }, - "node_modules/once": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", - "license": "ISC", - "dependencies": { - "wrappy": "1" - } - }, "node_modules/package-json-from-dist": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/package-json-from-dist/-/package-json-from-dist-1.0.1.tgz", @@ -1547,43 +1038,6 @@ "no-case": "^2.2.0" } }, - "node_modules/parse5": { - "version": "7.2.1", - "resolved": "https://registry.npmjs.org/parse5/-/parse5-7.2.1.tgz", - "integrity": "sha512-BuBYQYlv1ckiPdQi/ohiivi9Sagc9JG+Ozs0r7b/0iK3sKmrb0b9FdWdBbOdx6hBCM/F9Ir82ofnBhtZOjCRPQ==", - "license": "MIT", - "dependencies": { - "entities": "^4.5.0" - }, - "funding": { - "url": "https://github.com/inikulin/parse5?sponsor=1" - } - }, - "node_modules/parse5-htmlparser2-tree-adapter": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/parse5-htmlparser2-tree-adapter/-/parse5-htmlparser2-tree-adapter-7.1.0.tgz", - "integrity": "sha512-ruw5xyKs6lrpo9x9rCZqZZnIUntICjQAd0Wsmp396Ul9lN/h+ifgVV1x1gZHi8euej6wTfpqX8j+BFQxF0NS/g==", - "license": "MIT", - "dependencies": { - "domhandler": "^5.0.3", - "parse5": "^7.0.0" - }, - "funding": { - "url": "https://github.com/inikulin/parse5?sponsor=1" - } - }, - "node_modules/parse5-parser-stream": { - "version": "7.1.2", - "resolved": "https://registry.npmjs.org/parse5-parser-stream/-/parse5-parser-stream-7.1.2.tgz", - "integrity": "sha512-JyeQc9iwFLn5TbvvqACIF/VXG6abODeB3Fwmv/TGdLk2LfbWkaySGY72at4+Ty7EkPZj854u4CrICqNk2qIbow==", - "license": "MIT", - "dependencies": { - "parse5": "^7.0.0" - }, - "funding": { - "url": "https://github.com/inikulin/parse5?sponsor=1" - } - }, "node_modules/parseurl": { "version": "1.3.3", "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", @@ -1592,15 +1046,6 @@ "node": ">= 0.8" } }, - "node_modules/path-is-absolute": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/path-key": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", @@ -1631,18 +1076,6 @@ "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.12.tgz", "integrity": "sha512-RA1GjUVMnvYFxuqovrEqZoxxW5NUZqbwKtYz/Tt7nXerk0LbLblQmrsgdeOxV5SFHf0UDggjS/bSeOZwt1pmEQ==" }, - "node_modules/picomatch": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", - "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", - "dev": true, - "engines": { - "node": ">=8.6" - }, - "funding": { - "url": "https://github.com/sponsors/jonschlinkert" - } - }, "node_modules/proxy-addr": { "version": "2.0.7", "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz", @@ -1655,12 +1088,6 @@ "node": ">= 0.10" } }, - "node_modules/pstree.remy": { - "version": "1.1.8", - "resolved": "https://registry.npmjs.org/pstree.remy/-/pstree.remy-1.1.8.tgz", - "integrity": "sha512-77DZwxQmxKnu3aR542U+X8FypNzbfJ+C5XQDk3uWjWxn6151aIMGthWYRXTqT1E5oJvg+ljaa2OJi+VfvCOQ8w==", - "dev": true - }, "node_modules/qs": { "version": "6.13.0", "resolved": "https://registry.npmjs.org/qs/-/qs-6.13.0.tgz", @@ -1684,31 +1111,20 @@ } }, "node_modules/raw-body": { - "version": "2.5.2", - "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.2.tgz", - "integrity": "sha512-8zGqypfENjCIqGhgXToC8aB2r7YrBX+AQAfIPs/Mlk+BtPTztOvTS01NRW/3Eh60J+a48lt8qsCzirQ6loCVfA==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-3.0.0.tgz", + "integrity": "sha512-RmkhL8CAyCRPXCE28MMH0z2PNWQBNk2Q09ZdxM9IOOXwxwZbN+qbWaatPkdkWIKL2ZVDImrN/pK5HTRz2PcS4g==", + "license": "MIT", "dependencies": { "bytes": "3.1.2", "http-errors": "2.0.0", - "iconv-lite": "0.4.24", + "iconv-lite": "0.6.3", "unpipe": "1.0.0" }, "engines": { "node": ">= 0.8" } }, - "node_modules/readdirp": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", - "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", - "dev": true, - "dependencies": { - "picomatch": "^2.2.1" - }, - "engines": { - "node": ">=8.10.0" - } - }, "node_modules/relateurl": { "version": "0.2.7", "resolved": "https://registry.npmjs.org/relateurl/-/relateurl-0.2.7.tgz", @@ -1718,53 +1134,6 @@ "node": ">= 0.10" } }, - "node_modules/replace-in-file": { - "version": "6.3.5", - "resolved": "https://registry.npmjs.org/replace-in-file/-/replace-in-file-6.3.5.tgz", - "integrity": "sha512-arB9d3ENdKva2fxRnSjwBEXfK1npgyci7ZZuwysgAp7ORjHSyxz6oqIjTEv8R0Ydl4Ll7uOAZXL4vbkhGIizCg==", - "license": "MIT", - "dependencies": { - "chalk": "^4.1.2", - "glob": "^7.2.0", - "yargs": "^17.2.1" - }, - "bin": { - "replace-in-file": "bin/cli.js" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/replace-in-file/node_modules/glob": { - "version": "7.2.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", - "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", - "deprecated": "Glob versions prior to v9 are no longer supported", - "license": "ISC", - "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.1.1", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - }, - "engines": { - "node": "*" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/require-directory": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", - "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/safe-buffer": { "version": "5.2.1", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", @@ -1789,18 +1158,6 @@ "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" }, - "node_modules/semver": { - "version": "7.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.1.tgz", - "integrity": "sha512-hlq8tAfn0m/61p4BVRcPzIGr6LKiMwo4VM6dGi6pt4qcRkmNzTcWq6eCEjEh+qXjkMDvPlOFFSGwQjoEa6gyMA==", - "dev": true, - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/send": { "version": "0.19.0", "resolved": "https://registry.npmjs.org/send/-/send-0.19.0.tgz", @@ -1837,6 +1194,34 @@ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==" }, + "node_modules/serve-favicon": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/serve-favicon/-/serve-favicon-2.5.0.tgz", + "integrity": "sha512-FMW2RvqNr03x+C0WxTyu6sOv21oOjkq5j8tjquWccwa6ScNyGFOGJVpuS1NmTVGBAHS07xnSKotgf2ehQmf9iA==", + "license": "MIT", + "dependencies": { + "etag": "~1.8.1", + "fresh": "0.5.2", + "ms": "2.1.1", + "parseurl": "~1.3.2", + "safe-buffer": "5.1.1" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/serve-favicon/node_modules/ms": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", + "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==", + "license": "MIT" + }, + "node_modules/serve-favicon/node_modules/safe-buffer": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz", + "integrity": "sha512-kKvNJn6Mm93gAczWVJg7wH+wGYWNrDHdWvpUmHyEsgCtIwwo3bqPtV4tR5tuPaUhTOo/kvhVwd8XwwOllGYkbg==", + "license": "MIT" + }, "node_modules/serve-static": { "version": "1.16.2", "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.16.2.tgz", @@ -1957,18 +1342,6 @@ "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/simple-update-notifier": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/simple-update-notifier/-/simple-update-notifier-2.0.0.tgz", - "integrity": "sha512-a2B9Y0KlNXl9u/vsW6sTIu9vGEpfKu2wRV6l1H3XEas/0gUIzGzBoP/IouTcUQbm9JWZLH3COxyn03TYlFax6w==", - "dev": true, - "dependencies": { - "semver": "^7.5.3" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/source-map": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", @@ -2101,18 +1474,6 @@ "node": ">=8" } }, - "node_modules/supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dev": true, - "dependencies": { - "has-flag": "^3.0.0" - }, - "engines": { - "node": ">=4" - } - }, "node_modules/terser": { "version": "5.39.0", "resolved": "https://registry.npmjs.org/terser/-/terser-5.39.0.tgz", @@ -2131,18 +1492,6 @@ "node": ">=10" } }, - "node_modules/to-regex-range": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", - "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", - "dev": true, - "dependencies": { - "is-number": "^7.0.0" - }, - "engines": { - "node": ">=8.0" - } - }, "node_modules/toidentifier": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz", @@ -2151,19 +1500,11 @@ "node": ">=0.6" } }, - "node_modules/touch": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/touch/-/touch-3.1.1.tgz", - "integrity": "sha512-r0eojU4bI8MnHr8c5bNo7lJDdI2qXlWWJk6a9EAFG7vbhTjElYhBVS3/miuE0uOuoLdb8Mc/rVfsmm6eo5o9GA==", - "dev": true, - "bin": { - "nodetouch": "bin/nodetouch.js" - } - }, "node_modules/tslib": { "version": "2.8.1", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", - "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==" + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", + "license": "0BSD" }, "node_modules/type-is": { "version": "1.6.18", @@ -2189,21 +1530,13 @@ "node": ">=0.8.0" } }, - "node_modules/undefsafe": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/undefsafe/-/undefsafe-2.0.5.tgz", - "integrity": "sha512-WxONCrssBM8TSPRqN5EmsjVrsv4A8X12J4ArBiiayv3DyyG3ZlIg6yysuuSYdZsVz3TKcTg2fd//Ujd4CHV1iA==", - "dev": true - }, "node_modules/undici": { - "version": "5.28.5", - "resolved": "https://registry.npmjs.org/undici/-/undici-5.28.5.tgz", - "integrity": "sha512-zICwjrDrcrUE0pyyJc1I2QzBkLM8FINsgOrt6WjA+BgajVq9Nxu2PbFFXUrAggLfDXlZGZBVZYw7WNV5KiBiBA==", - "dependencies": { - "@fastify/busboy": "^2.0.0" - }, + "version": "7.6.0", + "resolved": "https://registry.npmjs.org/undici/-/undici-7.6.0.tgz", + "integrity": "sha512-gaFsbThjrDGvAaD670r81RZro/s6H2PVZF640Qn0p5kZK+/rim7/mmyfp2W7VB5vOMaFM8vuFBJUaMlaZTYHlA==", + "license": "MIT", "engines": { - "node": ">=14.0" + "node": ">=20.18.1" } }, "node_modules/unpipe": { @@ -2236,39 +1569,6 @@ "node": ">= 0.8" } }, - "node_modules/whatwg-encoding": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/whatwg-encoding/-/whatwg-encoding-3.1.1.tgz", - "integrity": "sha512-6qN4hJdMwfYBtE3YBTTHhoeuUrDBPZmbQaxWAqSALV/MeEnR5z1xd8UKud2RAkFoPkmB+hli1TZSnyi84xz1vQ==", - "license": "MIT", - "dependencies": { - "iconv-lite": "0.6.3" - }, - "engines": { - "node": ">=18" - } - }, - "node_modules/whatwg-encoding/node_modules/iconv-lite": { - "version": "0.6.3", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz", - "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==", - "license": "MIT", - "dependencies": { - "safer-buffer": ">= 2.1.2 < 3.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/whatwg-mimetype": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/whatwg-mimetype/-/whatwg-mimetype-4.0.0.tgz", - "integrity": "sha512-QaKxh0eNIi2mE9p2vEdzfagOKHCcj1pJ56EEHGQOVxp8r9/iszLUUV7v89x9O1p/T+NlTM5W7jW6+cz4Fq1YVg==", - "license": "MIT", - "engines": { - "node": ">=18" - } - }, "node_modules/which": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", @@ -2374,89 +1674,6 @@ "engines": { "node": ">=8" } - }, - "node_modules/wrappy": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", - "license": "ISC" - }, - "node_modules/y18n": { - "version": "5.0.8", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", - "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", - "license": "ISC", - "engines": { - "node": ">=10" - } - }, - "node_modules/yargs": { - "version": "17.7.2", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", - "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", - "license": "MIT", - "dependencies": { - "cliui": "^8.0.1", - "escalade": "^3.1.1", - "get-caller-file": "^2.0.5", - "require-directory": "^2.1.1", - "string-width": "^4.2.3", - "y18n": "^5.0.5", - "yargs-parser": "^21.1.1" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/yargs-parser": { - "version": "21.1.1", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", - "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", - "license": "ISC", - "engines": { - "node": ">=12" - } - }, - "node_modules/yargs/node_modules/ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/yargs/node_modules/emoji-regex": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", - "license": "MIT" - }, - "node_modules/yargs/node_modules/string-width": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", - "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", - "license": "MIT", - "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/yargs/node_modules/strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "license": "MIT", - "dependencies": { - "ansi-regex": "^5.0.1" - }, - "engines": { - "node": ">=8" - } } } } diff --git a/package.json b/package.json index ba468f9..89f822e 100644 --- a/package.json +++ b/package.json @@ -7,5 +7,16 @@ "build": "node ./src/js/build.js", "start": "node app.js", "dev": "nodemon app.js" + }, + "dependencies": { + "body-parser": "^2.2.0", + "csso": "^5.0.5", + "express": "^4.21.2", + "glob": "^11.0.1", + "html-minifier": "^4.0.0", + "serve-favicon": "^2.5.0", + "terser": "^5.39.0", + "tslib": "^2.8.1", + "undici": "^7.6.0" } }