rahad-media-downloader 1.0.2
Sign up to get free protection for your applications and to get access to all the features.
- package/.cache/nix/binary-cache-v6.sqlite +0 -0
- package/.cache/nix/binary-cache-v6.sqlite-journal +0 -0
- package/.cache/replit/__replit_disk_meta.json +1 -0
- package/.cache/replit/modules/nodejs-20:v32-20240401-269b323.res +1 -0
- package/.cache/replit/modules/replit:v8-20240329-787bc7d.res +1 -0
- package/.cache/replit/modules.stamp +0 -0
- package/.cache/replit/nix/env.json +1 -0
- package/.cache/typescript/5.0/node_modules/.package-lock.json +12 -0
- package/.cache/typescript/5.0/node_modules/types-registry/README.md +2 -0
- package/.cache/typescript/5.0/node_modules/types-registry/index.json +1 -0
- package/.cache/typescript/5.0/node_modules/types-registry/package.json +20 -0
- package/.cache/typescript/5.0/package-lock.json +17 -0
- package/.cache/typescript/5.0/package.json +1 -0
- package/.cache/typescript/5.3/node_modules/.package-lock.json +181 -0
- package/.cache/typescript/5.3/node_modules/@types/caseless/LICENSE +21 -0
- package/.cache/typescript/5.3/node_modules/@types/caseless/README.md +48 -0
- package/.cache/typescript/5.3/node_modules/@types/caseless/index.d.ts +29 -0
- package/.cache/typescript/5.3/node_modules/@types/caseless/package.json +35 -0
- package/.cache/typescript/5.3/node_modules/@types/cheerio/LICENSE +21 -0
- package/.cache/typescript/5.3/node_modules/@types/cheerio/README.md +15 -0
- package/.cache/typescript/5.3/node_modules/@types/cheerio/index.d.ts +318 -0
- package/.cache/typescript/5.3/node_modules/@types/cheerio/package.json +71 -0
- package/.cache/typescript/5.3/node_modules/@types/jsdom/LICENSE +21 -0
- package/.cache/typescript/5.3/node_modules/@types/jsdom/README.md +15 -0
- package/.cache/typescript/5.3/node_modules/@types/jsdom/base.d.ts +456 -0
- package/.cache/typescript/5.3/node_modules/@types/jsdom/index.d.ts +18 -0
- package/.cache/typescript/5.3/node_modules/@types/jsdom/package.json +45 -0
- package/.cache/typescript/5.3/node_modules/@types/node/LICENSE +21 -0
- package/.cache/typescript/5.3/node_modules/@types/node/README.md +15 -0
- package/.cache/typescript/5.3/node_modules/@types/node/assert/strict.d.ts +8 -0
- package/.cache/typescript/5.3/node_modules/@types/node/assert.d.ts +996 -0
- package/.cache/typescript/5.3/node_modules/@types/node/async_hooks.d.ts +539 -0
- package/.cache/typescript/5.3/node_modules/@types/node/buffer.d.ts +2362 -0
- package/.cache/typescript/5.3/node_modules/@types/node/child_process.d.ts +1540 -0
- package/.cache/typescript/5.3/node_modules/@types/node/cluster.d.ts +432 -0
- package/.cache/typescript/5.3/node_modules/@types/node/console.d.ts +415 -0
- package/.cache/typescript/5.3/node_modules/@types/node/constants.d.ts +19 -0
- package/.cache/typescript/5.3/node_modules/@types/node/crypto.d.ts +4456 -0
- package/.cache/typescript/5.3/node_modules/@types/node/dgram.d.ts +586 -0
- package/.cache/typescript/5.3/node_modules/@types/node/diagnostics_channel.d.ts +191 -0
- package/.cache/typescript/5.3/node_modules/@types/node/dns/promises.d.ts +425 -0
- package/.cache/typescript/5.3/node_modules/@types/node/dns.d.ts +809 -0
- package/.cache/typescript/5.3/node_modules/@types/node/dom-events.d.ts +122 -0
- package/.cache/typescript/5.3/node_modules/@types/node/domain.d.ts +170 -0
- package/.cache/typescript/5.3/node_modules/@types/node/events.d.ts +879 -0
- package/.cache/typescript/5.3/node_modules/@types/node/fs/promises.d.ts +1239 -0
- package/.cache/typescript/5.3/node_modules/@types/node/fs.d.ts +4291 -0
- package/.cache/typescript/5.3/node_modules/@types/node/globals.d.ts +385 -0
- package/.cache/typescript/5.3/node_modules/@types/node/globals.global.d.ts +1 -0
- package/.cache/typescript/5.3/node_modules/@types/node/http.d.ts +1888 -0
- package/.cache/typescript/5.3/node_modules/@types/node/http2.d.ts +2382 -0
- package/.cache/typescript/5.3/node_modules/@types/node/https.d.ts +550 -0
- package/.cache/typescript/5.3/node_modules/@types/node/index.d.ts +88 -0
- package/.cache/typescript/5.3/node_modules/@types/node/inspector.d.ts +2747 -0
- package/.cache/typescript/5.3/node_modules/@types/node/module.d.ts +301 -0
- package/.cache/typescript/5.3/node_modules/@types/node/net.d.ts +949 -0
- package/.cache/typescript/5.3/node_modules/@types/node/os.d.ts +478 -0
- package/.cache/typescript/5.3/node_modules/@types/node/package.json +230 -0
- package/.cache/typescript/5.3/node_modules/@types/node/path.d.ts +191 -0
- package/.cache/typescript/5.3/node_modules/@types/node/perf_hooks.d.ts +639 -0
- package/.cache/typescript/5.3/node_modules/@types/node/process.d.ts +1539 -0
- package/.cache/typescript/5.3/node_modules/@types/node/punycode.d.ts +117 -0
- package/.cache/typescript/5.3/node_modules/@types/node/querystring.d.ts +141 -0
- package/.cache/typescript/5.3/node_modules/@types/node/readline/promises.d.ts +150 -0
- package/.cache/typescript/5.3/node_modules/@types/node/readline.d.ts +539 -0
- package/.cache/typescript/5.3/node_modules/@types/node/repl.d.ts +430 -0
- package/.cache/typescript/5.3/node_modules/@types/node/stream/consumers.d.ts +12 -0
- package/.cache/typescript/5.3/node_modules/@types/node/stream/promises.d.ts +83 -0
- package/.cache/typescript/5.3/node_modules/@types/node/stream/web.d.ts +350 -0
- package/.cache/typescript/5.3/node_modules/@types/node/stream.d.ts +1701 -0
- package/.cache/typescript/5.3/node_modules/@types/node/string_decoder.d.ts +67 -0
- package/.cache/typescript/5.3/node_modules/@types/node/test.d.ts +1382 -0
- package/.cache/typescript/5.3/node_modules/@types/node/timers/promises.d.ts +93 -0
- package/.cache/typescript/5.3/node_modules/@types/node/timers.d.ts +240 -0
- package/.cache/typescript/5.3/node_modules/@types/node/tls.d.ts +1210 -0
- package/.cache/typescript/5.3/node_modules/@types/node/trace_events.d.ts +182 -0
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/assert/strict.d.ts +8 -0
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/assert.d.ts +996 -0
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/async_hooks.d.ts +539 -0
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/buffer.d.ts +2362 -0
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/child_process.d.ts +1540 -0
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/cluster.d.ts +432 -0
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/console.d.ts +415 -0
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/constants.d.ts +19 -0
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/crypto.d.ts +4455 -0
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/dgram.d.ts +586 -0
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/diagnostics_channel.d.ts +191 -0
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/dns/promises.d.ts +425 -0
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/dns.d.ts +809 -0
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/dom-events.d.ts +122 -0
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/domain.d.ts +170 -0
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/events.d.ts +879 -0
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/fs/promises.d.ts +1239 -0
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/fs.d.ts +4291 -0
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/globals.d.ts +385 -0
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/globals.global.d.ts +1 -0
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/http.d.ts +1888 -0
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/http2.d.ts +2382 -0
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/https.d.ts +550 -0
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/index.d.ts +88 -0
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/inspector.d.ts +2747 -0
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/module.d.ts +301 -0
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/net.d.ts +949 -0
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/os.d.ts +478 -0
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/path.d.ts +191 -0
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/perf_hooks.d.ts +639 -0
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/process.d.ts +1539 -0
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/punycode.d.ts +117 -0
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/querystring.d.ts +141 -0
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/readline/promises.d.ts +150 -0
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/readline.d.ts +539 -0
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/repl.d.ts +430 -0
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/stream/consumers.d.ts +12 -0
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/stream/promises.d.ts +83 -0
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/stream/web.d.ts +350 -0
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/stream.d.ts +1701 -0
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/string_decoder.d.ts +67 -0
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/test.d.ts +1382 -0
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/timers/promises.d.ts +93 -0
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/timers.d.ts +240 -0
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/tls.d.ts +1210 -0
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/trace_events.d.ts +182 -0
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/tty.d.ts +208 -0
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/url.d.ts +927 -0
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/util.d.ts +2183 -0
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/v8.d.ts +635 -0
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/vm.d.ts +903 -0
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/wasi.d.ts +158 -0
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/worker_threads.d.ts +691 -0
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/zlib.d.ts +517 -0
- package/.cache/typescript/5.3/node_modules/@types/node/tty.d.ts +208 -0
- package/.cache/typescript/5.3/node_modules/@types/node/url.d.ts +927 -0
- package/.cache/typescript/5.3/node_modules/@types/node/util.d.ts +2183 -0
- package/.cache/typescript/5.3/node_modules/@types/node/v8.d.ts +635 -0
- package/.cache/typescript/5.3/node_modules/@types/node/vm.d.ts +903 -0
- package/.cache/typescript/5.3/node_modules/@types/node/wasi.d.ts +158 -0
- package/.cache/typescript/5.3/node_modules/@types/node/worker_threads.d.ts +691 -0
- package/.cache/typescript/5.3/node_modules/@types/node/zlib.d.ts +517 -0
- package/.cache/typescript/5.3/node_modules/@types/node-fetch/LICENSE +21 -0
- package/.cache/typescript/5.3/node_modules/@types/node-fetch/README.md +15 -0
- package/.cache/typescript/5.3/node_modules/@types/node-fetch/externals.d.ts +32 -0
- package/.cache/typescript/5.3/node_modules/@types/node-fetch/index.d.ts +214 -0
- package/.cache/typescript/5.3/node_modules/@types/node-fetch/package.json +83 -0
- package/.cache/typescript/5.3/node_modules/@types/request/LICENSE +21 -0
- package/.cache/typescript/5.3/node_modules/@types/request/README.md +15 -0
- package/.cache/typescript/5.3/node_modules/@types/request/index.d.ts +395 -0
- package/.cache/typescript/5.3/node_modules/@types/request/node_modules/form-data/License +19 -0
- package/.cache/typescript/5.3/node_modules/@types/request/node_modules/form-data/README.md +350 -0
- package/.cache/typescript/5.3/node_modules/@types/request/node_modules/form-data/README.md.bak +350 -0
- package/.cache/typescript/5.3/node_modules/@types/request/node_modules/form-data/index.d.ts +51 -0
- package/.cache/typescript/5.3/node_modules/@types/request/node_modules/form-data/lib/browser.js +2 -0
- package/.cache/typescript/5.3/node_modules/@types/request/node_modules/form-data/lib/form_data.js +483 -0
- package/.cache/typescript/5.3/node_modules/@types/request/node_modules/form-data/lib/populate.js +10 -0
- package/.cache/typescript/5.3/node_modules/@types/request/node_modules/form-data/package.json +68 -0
- package/.cache/typescript/5.3/node_modules/@types/request/package.json +70 -0
- package/.cache/typescript/5.3/node_modules/@types/tough-cookie/LICENSE +21 -0
- package/.cache/typescript/5.3/node_modules/@types/tough-cookie/README.md +15 -0
- package/.cache/typescript/5.3/node_modules/@types/tough-cookie/index.d.ts +321 -0
- package/.cache/typescript/5.3/node_modules/@types/tough-cookie/package.json +35 -0
- package/.cache/typescript/5.3/node_modules/asynckit/LICENSE +21 -0
- package/.cache/typescript/5.3/node_modules/asynckit/README.md +233 -0
- package/.cache/typescript/5.3/node_modules/asynckit/bench.js +76 -0
- package/.cache/typescript/5.3/node_modules/asynckit/index.js +6 -0
- package/.cache/typescript/5.3/node_modules/asynckit/lib/abort.js +29 -0
- package/.cache/typescript/5.3/node_modules/asynckit/lib/async.js +34 -0
- package/.cache/typescript/5.3/node_modules/asynckit/lib/defer.js +26 -0
- package/.cache/typescript/5.3/node_modules/asynckit/lib/iterate.js +75 -0
- package/.cache/typescript/5.3/node_modules/asynckit/lib/readable_asynckit.js +91 -0
- package/.cache/typescript/5.3/node_modules/asynckit/lib/readable_parallel.js +25 -0
- package/.cache/typescript/5.3/node_modules/asynckit/lib/readable_serial.js +25 -0
- package/.cache/typescript/5.3/node_modules/asynckit/lib/readable_serial_ordered.js +29 -0
- package/.cache/typescript/5.3/node_modules/asynckit/lib/state.js +37 -0
- package/.cache/typescript/5.3/node_modules/asynckit/lib/streamify.js +141 -0
- package/.cache/typescript/5.3/node_modules/asynckit/lib/terminator.js +29 -0
- package/.cache/typescript/5.3/node_modules/asynckit/package.json +63 -0
- package/.cache/typescript/5.3/node_modules/asynckit/parallel.js +43 -0
- package/.cache/typescript/5.3/node_modules/asynckit/serial.js +17 -0
- package/.cache/typescript/5.3/node_modules/asynckit/serialOrdered.js +75 -0
- package/.cache/typescript/5.3/node_modules/asynckit/stream.js +21 -0
- package/.cache/typescript/5.3/node_modules/combined-stream/License +19 -0
- package/.cache/typescript/5.3/node_modules/combined-stream/Readme.md +138 -0
- package/.cache/typescript/5.3/node_modules/combined-stream/lib/combined_stream.js +208 -0
- package/.cache/typescript/5.3/node_modules/combined-stream/package.json +25 -0
- package/.cache/typescript/5.3/node_modules/combined-stream/yarn.lock +17 -0
- package/.cache/typescript/5.3/node_modules/delayed-stream/License +19 -0
- package/.cache/typescript/5.3/node_modules/delayed-stream/Makefile +7 -0
- package/.cache/typescript/5.3/node_modules/delayed-stream/Readme.md +141 -0
- package/.cache/typescript/5.3/node_modules/delayed-stream/lib/delayed_stream.js +107 -0
- package/.cache/typescript/5.3/node_modules/delayed-stream/package.json +27 -0
- package/.cache/typescript/5.3/node_modules/entities/LICENSE +11 -0
- package/.cache/typescript/5.3/node_modules/entities/lib/decode.d.ts +211 -0
- package/.cache/typescript/5.3/node_modules/entities/lib/decode.d.ts.map +1 -0
- package/.cache/typescript/5.3/node_modules/entities/lib/decode.js +536 -0
- package/.cache/typescript/5.3/node_modules/entities/lib/decode.js.map +1 -0
- package/.cache/typescript/5.3/node_modules/entities/lib/decode_codepoint.d.ts +19 -0
- package/.cache/typescript/5.3/node_modules/entities/lib/decode_codepoint.d.ts.map +1 -0
- package/.cache/typescript/5.3/node_modules/entities/lib/decode_codepoint.js +76 -0
- package/.cache/typescript/5.3/node_modules/entities/lib/decode_codepoint.js.map +1 -0
- package/.cache/typescript/5.3/node_modules/entities/lib/encode.d.ts +22 -0
- package/.cache/typescript/5.3/node_modules/entities/lib/encode.d.ts.map +1 -0
- package/.cache/typescript/5.3/node_modules/entities/lib/encode.js +77 -0
- package/.cache/typescript/5.3/node_modules/entities/lib/encode.js.map +1 -0
- package/.cache/typescript/5.3/node_modules/entities/lib/escape.d.ts +43 -0
- package/.cache/typescript/5.3/node_modules/entities/lib/escape.d.ts.map +1 -0
- package/.cache/typescript/5.3/node_modules/entities/lib/escape.js +122 -0
- package/.cache/typescript/5.3/node_modules/entities/lib/escape.js.map +1 -0
- package/.cache/typescript/5.3/node_modules/entities/lib/esm/decode.d.ts +211 -0
- package/.cache/typescript/5.3/node_modules/entities/lib/esm/decode.d.ts.map +1 -0
- package/.cache/typescript/5.3/node_modules/entities/lib/esm/decode.js +496 -0
- package/.cache/typescript/5.3/node_modules/entities/lib/esm/decode.js.map +1 -0
- package/.cache/typescript/5.3/node_modules/entities/lib/esm/decode_codepoint.d.ts +19 -0
- package/.cache/typescript/5.3/node_modules/entities/lib/esm/decode_codepoint.d.ts.map +1 -0
- package/.cache/typescript/5.3/node_modules/entities/lib/esm/decode_codepoint.js +71 -0
- package/.cache/typescript/5.3/node_modules/entities/lib/esm/decode_codepoint.js.map +1 -0
- package/.cache/typescript/5.3/node_modules/entities/lib/esm/encode.d.ts +22 -0
- package/.cache/typescript/5.3/node_modules/entities/lib/esm/encode.d.ts.map +1 -0
- package/.cache/typescript/5.3/node_modules/entities/lib/esm/encode.js +69 -0
- package/.cache/typescript/5.3/node_modules/entities/lib/esm/encode.js.map +1 -0
- package/.cache/typescript/5.3/node_modules/entities/lib/esm/escape.d.ts +43 -0
- package/.cache/typescript/5.3/node_modules/entities/lib/esm/escape.d.ts.map +1 -0
- package/.cache/typescript/5.3/node_modules/entities/lib/esm/escape.js +116 -0
- package/.cache/typescript/5.3/node_modules/entities/lib/esm/escape.js.map +1 -0
- package/.cache/typescript/5.3/node_modules/entities/lib/esm/generated/decode-data-html.d.ts +3 -0
- package/.cache/typescript/5.3/node_modules/entities/lib/esm/generated/decode-data-html.d.ts.map +1 -0
- package/.cache/typescript/5.3/node_modules/entities/lib/esm/generated/decode-data-html.js +7 -0
- package/.cache/typescript/5.3/node_modules/entities/lib/esm/generated/decode-data-html.js.map +1 -0
- package/.cache/typescript/5.3/node_modules/entities/lib/esm/generated/decode-data-xml.d.ts +3 -0
- package/.cache/typescript/5.3/node_modules/entities/lib/esm/generated/decode-data-xml.d.ts.map +1 -0
- package/.cache/typescript/5.3/node_modules/entities/lib/esm/generated/decode-data-xml.js +7 -0
- package/.cache/typescript/5.3/node_modules/entities/lib/esm/generated/decode-data-xml.js.map +1 -0
- package/.cache/typescript/5.3/node_modules/entities/lib/esm/generated/encode-html.d.ts +8 -0
- package/.cache/typescript/5.3/node_modules/entities/lib/esm/generated/encode-html.d.ts.map +1 -0
- package/.cache/typescript/5.3/node_modules/entities/lib/esm/generated/encode-html.js +10 -0
- package/.cache/typescript/5.3/node_modules/entities/lib/esm/generated/encode-html.js.map +1 -0
- package/.cache/typescript/5.3/node_modules/entities/lib/esm/index.d.ts +96 -0
- package/.cache/typescript/5.3/node_modules/entities/lib/esm/index.d.ts.map +1 -0
- package/.cache/typescript/5.3/node_modules/entities/lib/esm/index.js +99 -0
- package/.cache/typescript/5.3/node_modules/entities/lib/esm/index.js.map +1 -0
- package/.cache/typescript/5.3/node_modules/entities/lib/esm/package.json +1 -0
- package/.cache/typescript/5.3/node_modules/entities/lib/generated/decode-data-html.d.ts +3 -0
- package/.cache/typescript/5.3/node_modules/entities/lib/generated/decode-data-html.d.ts.map +1 -0
- package/.cache/typescript/5.3/node_modules/entities/lib/generated/decode-data-html.js +9 -0
- package/.cache/typescript/5.3/node_modules/entities/lib/generated/decode-data-html.js.map +1 -0
- package/.cache/typescript/5.3/node_modules/entities/lib/generated/decode-data-xml.d.ts +3 -0
- package/.cache/typescript/5.3/node_modules/entities/lib/generated/decode-data-xml.d.ts.map +1 -0
- package/.cache/typescript/5.3/node_modules/entities/lib/generated/decode-data-xml.js +9 -0
- package/.cache/typescript/5.3/node_modules/entities/lib/generated/decode-data-xml.js.map +1 -0
- package/.cache/typescript/5.3/node_modules/entities/lib/generated/encode-html.d.ts +8 -0
- package/.cache/typescript/5.3/node_modules/entities/lib/generated/encode-html.d.ts.map +1 -0
- package/.cache/typescript/5.3/node_modules/entities/lib/generated/encode-html.js +12 -0
- package/.cache/typescript/5.3/node_modules/entities/lib/generated/encode-html.js.map +1 -0
- package/.cache/typescript/5.3/node_modules/entities/lib/index.d.ts +96 -0
- package/.cache/typescript/5.3/node_modules/entities/lib/index.d.ts.map +1 -0
- package/.cache/typescript/5.3/node_modules/entities/lib/index.js +126 -0
- package/.cache/typescript/5.3/node_modules/entities/lib/index.js.map +1 -0
- package/.cache/typescript/5.3/node_modules/entities/package.json +90 -0
- package/.cache/typescript/5.3/node_modules/entities/readme.md +122 -0
- package/.cache/typescript/5.3/node_modules/form-data/License +19 -0
- package/.cache/typescript/5.3/node_modules/form-data/README.md.bak +358 -0
- package/.cache/typescript/5.3/node_modules/form-data/Readme.md +358 -0
- package/.cache/typescript/5.3/node_modules/form-data/index.d.ts +62 -0
- package/.cache/typescript/5.3/node_modules/form-data/lib/browser.js +2 -0
- package/.cache/typescript/5.3/node_modules/form-data/lib/form_data.js +501 -0
- package/.cache/typescript/5.3/node_modules/form-data/lib/populate.js +10 -0
- package/.cache/typescript/5.3/node_modules/form-data/package.json +68 -0
- package/.cache/typescript/5.3/node_modules/mime-db/HISTORY.md +507 -0
- package/.cache/typescript/5.3/node_modules/mime-db/LICENSE +23 -0
- package/.cache/typescript/5.3/node_modules/mime-db/README.md +100 -0
- package/.cache/typescript/5.3/node_modules/mime-db/db.json +8519 -0
- package/.cache/typescript/5.3/node_modules/mime-db/index.js +12 -0
- package/.cache/typescript/5.3/node_modules/mime-db/package.json +60 -0
- package/.cache/typescript/5.3/node_modules/mime-types/HISTORY.md +397 -0
- package/.cache/typescript/5.3/node_modules/mime-types/LICENSE +23 -0
- package/.cache/typescript/5.3/node_modules/mime-types/README.md +113 -0
- package/.cache/typescript/5.3/node_modules/mime-types/index.js +188 -0
- package/.cache/typescript/5.3/node_modules/mime-types/package.json +44 -0
- package/.cache/typescript/5.3/node_modules/parse5/LICENSE +19 -0
- package/.cache/typescript/5.3/node_modules/parse5/README.md +38 -0
- package/.cache/typescript/5.3/node_modules/parse5/dist/cjs/common/doctype.d.ts +5 -0
- package/.cache/typescript/5.3/node_modules/parse5/dist/cjs/common/doctype.js +120 -0
- package/.cache/typescript/5.3/node_modules/parse5/dist/cjs/common/error-codes.d.ts +68 -0
- package/.cache/typescript/5.3/node_modules/parse5/dist/cjs/common/error-codes.js +67 -0
- package/.cache/typescript/5.3/node_modules/parse5/dist/cjs/common/foreign-content.d.ts +10 -0
- package/.cache/typescript/5.3/node_modules/parse5/dist/cjs/common/foreign-content.js +239 -0
- package/.cache/typescript/5.3/node_modules/parse5/dist/cjs/common/html.d.ts +288 -0
- package/.cache/typescript/5.3/node_modules/parse5/dist/cjs/common/html.js +529 -0
- package/.cache/typescript/5.3/node_modules/parse5/dist/cjs/common/token.d.ts +85 -0
- package/.cache/typescript/5.3/node_modules/parse5/dist/cjs/common/token.js +25 -0
- package/.cache/typescript/5.3/node_modules/parse5/dist/cjs/common/unicode.d.ts +49 -0
- package/.cache/typescript/5.3/node_modules/parse5/dist/cjs/common/unicode.js +77 -0
- package/.cache/typescript/5.3/node_modules/parse5/dist/cjs/index.d.ts +60 -0
- package/.cache/typescript/5.3/node_modules/parse5/dist/cjs/index.js +57 -0
- package/.cache/typescript/5.3/node_modules/parse5/dist/cjs/package.json +1 -0
- package/.cache/typescript/5.3/node_modules/parse5/dist/cjs/parser/formatting-element-list.d.ts +37 -0
- package/.cache/typescript/5.3/node_modules/parse5/dist/cjs/parser/formatting-element-list.js +115 -0
- package/.cache/typescript/5.3/node_modules/parse5/dist/cjs/parser/index.d.ts +157 -0
- package/.cache/typescript/5.3/node_modules/parse5/dist/cjs/parser/index.js +3163 -0
- package/.cache/typescript/5.3/node_modules/parse5/dist/cjs/parser/open-element-stack.d.ts +53 -0
- package/.cache/typescript/5.3/node_modules/parse5/dist/cjs/parser/open-element-stack.js +316 -0
- package/.cache/typescript/5.3/node_modules/parse5/dist/cjs/serializer/index.d.ts +61 -0
- package/.cache/typescript/5.3/node_modules/parse5/dist/cjs/serializer/index.js +173 -0
- package/.cache/typescript/5.3/node_modules/parse5/dist/cjs/tokenizer/index.d.ts +248 -0
- package/.cache/typescript/5.3/node_modules/parse5/dist/cjs/tokenizer/index.js +2908 -0
- package/.cache/typescript/5.3/node_modules/parse5/dist/cjs/tokenizer/preprocessor.d.ts +37 -0
- package/.cache/typescript/5.3/node_modules/parse5/dist/cjs/tokenizer/preprocessor.js +199 -0
- package/.cache/typescript/5.3/node_modules/parse5/dist/cjs/tree-adapters/default.d.ts +85 -0
- package/.cache/typescript/5.3/node_modules/parse5/dist/cjs/tree-adapters/default.js +177 -0
- package/.cache/typescript/5.3/node_modules/parse5/dist/cjs/tree-adapters/interface.d.ts +250 -0
- package/.cache/typescript/5.3/node_modules/parse5/dist/cjs/tree-adapters/interface.js +3 -0
- package/.cache/typescript/5.3/node_modules/parse5/dist/common/doctype.d.ts +5 -0
- package/.cache/typescript/5.3/node_modules/parse5/dist/common/doctype.js +115 -0
- package/.cache/typescript/5.3/node_modules/parse5/dist/common/error-codes.d.ts +68 -0
- package/.cache/typescript/5.3/node_modules/parse5/dist/common/error-codes.js +64 -0
- package/.cache/typescript/5.3/node_modules/parse5/dist/common/foreign-content.d.ts +10 -0
- package/.cache/typescript/5.3/node_modules/parse5/dist/common/foreign-content.js +230 -0
- package/.cache/typescript/5.3/node_modules/parse5/dist/common/html.d.ts +288 -0
- package/.cache/typescript/5.3/node_modules/parse5/dist/common/html.js +523 -0
- package/.cache/typescript/5.3/node_modules/parse5/dist/common/token.d.ts +85 -0
- package/.cache/typescript/5.3/node_modules/parse5/dist/common/token.js +21 -0
- package/.cache/typescript/5.3/node_modules/parse5/dist/common/unicode.d.ts +49 -0
- package/.cache/typescript/5.3/node_modules/parse5/dist/common/unicode.js +69 -0
- package/.cache/typescript/5.3/node_modules/parse5/dist/index.d.ts +60 -0
- package/.cache/typescript/5.3/node_modules/parse5/dist/index.js +45 -0
- package/.cache/typescript/5.3/node_modules/parse5/dist/parser/formatting-element-list.d.ts +37 -0
- package/.cache/typescript/5.3/node_modules/parse5/dist/parser/formatting-element-list.js +111 -0
- package/.cache/typescript/5.3/node_modules/parse5/dist/parser/index.d.ts +157 -0
- package/.cache/typescript/5.3/node_modules/parse5/dist/parser/index.js +3168 -0
- package/.cache/typescript/5.3/node_modules/parse5/dist/parser/open-element-stack.d.ts +53 -0
- package/.cache/typescript/5.3/node_modules/parse5/dist/parser/open-element-stack.js +312 -0
- package/.cache/typescript/5.3/node_modules/parse5/dist/serializer/index.d.ts +61 -0
- package/.cache/typescript/5.3/node_modules/parse5/dist/serializer/index.js +168 -0
- package/.cache/typescript/5.3/node_modules/parse5/dist/tokenizer/index.d.ts +248 -0
- package/.cache/typescript/5.3/node_modules/parse5/dist/tokenizer/index.js +2904 -0
- package/.cache/typescript/5.3/node_modules/parse5/dist/tokenizer/preprocessor.d.ts +37 -0
- package/.cache/typescript/5.3/node_modules/parse5/dist/tokenizer/preprocessor.js +195 -0
- package/.cache/typescript/5.3/node_modules/parse5/dist/tree-adapters/default.d.ts +85 -0
- package/.cache/typescript/5.3/node_modules/parse5/dist/tree-adapters/default.js +174 -0
- package/.cache/typescript/5.3/node_modules/parse5/dist/tree-adapters/interface.d.ts +250 -0
- package/.cache/typescript/5.3/node_modules/parse5/dist/tree-adapters/interface.js +2 -0
- package/.cache/typescript/5.3/node_modules/parse5/package.json +50 -0
- package/.cache/typescript/5.3/node_modules/types-registry/README.md +2 -0
- package/.cache/typescript/5.3/node_modules/types-registry/index.json +1 -0
- package/.cache/typescript/5.3/node_modules/types-registry/package.json +20 -0
- package/.cache/typescript/5.3/node_modules/undici-types/README.md +6 -0
- package/.cache/typescript/5.3/node_modules/undici-types/agent.d.ts +31 -0
- package/.cache/typescript/5.3/node_modules/undici-types/api.d.ts +43 -0
- package/.cache/typescript/5.3/node_modules/undici-types/balanced-pool.d.ts +18 -0
- package/.cache/typescript/5.3/node_modules/undici-types/cache.d.ts +36 -0
- package/.cache/typescript/5.3/node_modules/undici-types/client.d.ts +97 -0
- package/.cache/typescript/5.3/node_modules/undici-types/connector.d.ts +34 -0
- package/.cache/typescript/5.3/node_modules/undici-types/content-type.d.ts +21 -0
- package/.cache/typescript/5.3/node_modules/undici-types/cookies.d.ts +28 -0
- package/.cache/typescript/5.3/node_modules/undici-types/diagnostics-channel.d.ts +67 -0
- package/.cache/typescript/5.3/node_modules/undici-types/dispatcher.d.ts +241 -0
- package/.cache/typescript/5.3/node_modules/undici-types/errors.d.ts +128 -0
- package/.cache/typescript/5.3/node_modules/undici-types/fetch.d.ts +209 -0
- package/.cache/typescript/5.3/node_modules/undici-types/file.d.ts +39 -0
- package/.cache/typescript/5.3/node_modules/undici-types/filereader.d.ts +54 -0
- package/.cache/typescript/5.3/node_modules/undici-types/formdata.d.ts +108 -0
- package/.cache/typescript/5.3/node_modules/undici-types/global-dispatcher.d.ts +9 -0
- package/.cache/typescript/5.3/node_modules/undici-types/global-origin.d.ts +7 -0
- package/.cache/typescript/5.3/node_modules/undici-types/handlers.d.ts +9 -0
- package/.cache/typescript/5.3/node_modules/undici-types/header.d.ts +4 -0
- package/.cache/typescript/5.3/node_modules/undici-types/index.d.ts +63 -0
- package/.cache/typescript/5.3/node_modules/undici-types/interceptors.d.ts +5 -0
- package/.cache/typescript/5.3/node_modules/undici-types/mock-agent.d.ts +50 -0
- package/.cache/typescript/5.3/node_modules/undici-types/mock-client.d.ts +25 -0
- package/.cache/typescript/5.3/node_modules/undici-types/mock-errors.d.ts +12 -0
- package/.cache/typescript/5.3/node_modules/undici-types/mock-interceptor.d.ts +93 -0
- package/.cache/typescript/5.3/node_modules/undici-types/mock-pool.d.ts +25 -0
- package/.cache/typescript/5.3/node_modules/undici-types/package.json +55 -0
- package/.cache/typescript/5.3/node_modules/undici-types/patch.d.ts +71 -0
- package/.cache/typescript/5.3/node_modules/undici-types/pool-stats.d.ts +19 -0
- package/.cache/typescript/5.3/node_modules/undici-types/pool.d.ts +28 -0
- package/.cache/typescript/5.3/node_modules/undici-types/proxy-agent.d.ts +30 -0
- package/.cache/typescript/5.3/node_modules/undici-types/readable.d.ts +61 -0
- package/.cache/typescript/5.3/node_modules/undici-types/webidl.d.ts +220 -0
- package/.cache/typescript/5.3/node_modules/undici-types/websocket.d.ts +131 -0
- package/.cache/typescript/5.3/package-lock.json +192 -0
- package/.cache/typescript/5.3/package.json +1 -0
- package/.replit +17 -0
- package/README.md +130 -0
- package/index.js +1 -0
- package/package.json +28 -0
- package/replit.nix +3 -0
@@ -0,0 +1,37 @@
|
|
1
|
+
import { ERR, type ParserError, type ParserErrorHandler } from '../common/error-codes.js';
|
2
|
+
export declare class Preprocessor {
|
3
|
+
private handler;
|
4
|
+
html: string;
|
5
|
+
private pos;
|
6
|
+
private lastGapPos;
|
7
|
+
private gapStack;
|
8
|
+
private skipNextNewLine;
|
9
|
+
private lastChunkWritten;
|
10
|
+
endOfChunkHit: boolean;
|
11
|
+
bufferWaterline: number;
|
12
|
+
private isEol;
|
13
|
+
private lineStartPos;
|
14
|
+
droppedBufferSize: number;
|
15
|
+
line: number;
|
16
|
+
constructor(handler: {
|
17
|
+
onParseError?: ParserErrorHandler | null;
|
18
|
+
});
|
19
|
+
/** The column on the current line. If we just saw a gap (eg. a surrogate pair), return the index before. */
|
20
|
+
get col(): number;
|
21
|
+
get offset(): number;
|
22
|
+
getError(code: ERR): ParserError;
|
23
|
+
private lastErrOffset;
|
24
|
+
private _err;
|
25
|
+
private _addGap;
|
26
|
+
private _processSurrogate;
|
27
|
+
willDropParsedChunk(): boolean;
|
28
|
+
dropParsedChunk(): void;
|
29
|
+
write(chunk: string, isLastChunk: boolean): void;
|
30
|
+
insertHtmlAtCurrentPos(chunk: string): void;
|
31
|
+
startsWith(pattern: string, caseSensitive: boolean): boolean;
|
32
|
+
peek(offset: number): number;
|
33
|
+
advance(): number;
|
34
|
+
private _checkForProblematicCharacters;
|
35
|
+
retreat(count: number): void;
|
36
|
+
}
|
37
|
+
//# sourceMappingURL=preprocessor.d.ts.map
|
@@ -0,0 +1,195 @@
|
|
1
|
+
import { CODE_POINTS as $, getSurrogatePairCodePoint, isControlCodePoint, isSurrogate, isSurrogatePair, isUndefinedCodePoint, } from '../common/unicode.js';
|
2
|
+
import { ERR } from '../common/error-codes.js';
|
3
|
+
//Const
|
4
|
+
const DEFAULT_BUFFER_WATERLINE = 1 << 16;
|
5
|
+
//Preprocessor
|
6
|
+
//NOTE: HTML input preprocessing
|
7
|
+
//(see: http://www.whatwg.org/specs/web-apps/current-work/multipage/parsing.html#preprocessing-the-input-stream)
|
8
|
+
export class Preprocessor {
|
9
|
+
constructor(handler) {
|
10
|
+
this.handler = handler;
|
11
|
+
this.html = '';
|
12
|
+
this.pos = -1;
|
13
|
+
// NOTE: Initial `lastGapPos` is -2, to ensure `col` on initialisation is 0
|
14
|
+
this.lastGapPos = -2;
|
15
|
+
this.gapStack = [];
|
16
|
+
this.skipNextNewLine = false;
|
17
|
+
this.lastChunkWritten = false;
|
18
|
+
this.endOfChunkHit = false;
|
19
|
+
this.bufferWaterline = DEFAULT_BUFFER_WATERLINE;
|
20
|
+
this.isEol = false;
|
21
|
+
this.lineStartPos = 0;
|
22
|
+
this.droppedBufferSize = 0;
|
23
|
+
this.line = 1;
|
24
|
+
//NOTE: avoid reporting errors twice on advance/retreat
|
25
|
+
this.lastErrOffset = -1;
|
26
|
+
}
|
27
|
+
/** The column on the current line. If we just saw a gap (eg. a surrogate pair), return the index before. */
|
28
|
+
get col() {
|
29
|
+
return this.pos - this.lineStartPos + Number(this.lastGapPos !== this.pos);
|
30
|
+
}
|
31
|
+
get offset() {
|
32
|
+
return this.droppedBufferSize + this.pos;
|
33
|
+
}
|
34
|
+
getError(code) {
|
35
|
+
const { line, col, offset } = this;
|
36
|
+
return {
|
37
|
+
code,
|
38
|
+
startLine: line,
|
39
|
+
endLine: line,
|
40
|
+
startCol: col,
|
41
|
+
endCol: col,
|
42
|
+
startOffset: offset,
|
43
|
+
endOffset: offset,
|
44
|
+
};
|
45
|
+
}
|
46
|
+
_err(code) {
|
47
|
+
if (this.handler.onParseError && this.lastErrOffset !== this.offset) {
|
48
|
+
this.lastErrOffset = this.offset;
|
49
|
+
this.handler.onParseError(this.getError(code));
|
50
|
+
}
|
51
|
+
}
|
52
|
+
_addGap() {
|
53
|
+
this.gapStack.push(this.lastGapPos);
|
54
|
+
this.lastGapPos = this.pos;
|
55
|
+
}
|
56
|
+
_processSurrogate(cp) {
|
57
|
+
//NOTE: try to peek a surrogate pair
|
58
|
+
if (this.pos !== this.html.length - 1) {
|
59
|
+
const nextCp = this.html.charCodeAt(this.pos + 1);
|
60
|
+
if (isSurrogatePair(nextCp)) {
|
61
|
+
//NOTE: we have a surrogate pair. Peek pair character and recalculate code point.
|
62
|
+
this.pos++;
|
63
|
+
//NOTE: add a gap that should be avoided during retreat
|
64
|
+
this._addGap();
|
65
|
+
return getSurrogatePairCodePoint(cp, nextCp);
|
66
|
+
}
|
67
|
+
}
|
68
|
+
//NOTE: we are at the end of a chunk, therefore we can't infer the surrogate pair yet.
|
69
|
+
else if (!this.lastChunkWritten) {
|
70
|
+
this.endOfChunkHit = true;
|
71
|
+
return $.EOF;
|
72
|
+
}
|
73
|
+
//NOTE: isolated surrogate
|
74
|
+
this._err(ERR.surrogateInInputStream);
|
75
|
+
return cp;
|
76
|
+
}
|
77
|
+
willDropParsedChunk() {
|
78
|
+
return this.pos > this.bufferWaterline;
|
79
|
+
}
|
80
|
+
dropParsedChunk() {
|
81
|
+
if (this.willDropParsedChunk()) {
|
82
|
+
this.html = this.html.substring(this.pos);
|
83
|
+
this.lineStartPos -= this.pos;
|
84
|
+
this.droppedBufferSize += this.pos;
|
85
|
+
this.pos = 0;
|
86
|
+
this.lastGapPos = -2;
|
87
|
+
this.gapStack.length = 0;
|
88
|
+
}
|
89
|
+
}
|
90
|
+
write(chunk, isLastChunk) {
|
91
|
+
if (this.html.length > 0) {
|
92
|
+
this.html += chunk;
|
93
|
+
}
|
94
|
+
else {
|
95
|
+
this.html = chunk;
|
96
|
+
}
|
97
|
+
this.endOfChunkHit = false;
|
98
|
+
this.lastChunkWritten = isLastChunk;
|
99
|
+
}
|
100
|
+
insertHtmlAtCurrentPos(chunk) {
|
101
|
+
this.html = this.html.substring(0, this.pos + 1) + chunk + this.html.substring(this.pos + 1);
|
102
|
+
this.endOfChunkHit = false;
|
103
|
+
}
|
104
|
+
startsWith(pattern, caseSensitive) {
|
105
|
+
// Check if our buffer has enough characters
|
106
|
+
if (this.pos + pattern.length > this.html.length) {
|
107
|
+
this.endOfChunkHit = !this.lastChunkWritten;
|
108
|
+
return false;
|
109
|
+
}
|
110
|
+
if (caseSensitive) {
|
111
|
+
return this.html.startsWith(pattern, this.pos);
|
112
|
+
}
|
113
|
+
for (let i = 0; i < pattern.length; i++) {
|
114
|
+
const cp = this.html.charCodeAt(this.pos + i) | 0x20;
|
115
|
+
if (cp !== pattern.charCodeAt(i)) {
|
116
|
+
return false;
|
117
|
+
}
|
118
|
+
}
|
119
|
+
return true;
|
120
|
+
}
|
121
|
+
peek(offset) {
|
122
|
+
const pos = this.pos + offset;
|
123
|
+
if (pos >= this.html.length) {
|
124
|
+
this.endOfChunkHit = !this.lastChunkWritten;
|
125
|
+
return $.EOF;
|
126
|
+
}
|
127
|
+
const code = this.html.charCodeAt(pos);
|
128
|
+
return code === $.CARRIAGE_RETURN ? $.LINE_FEED : code;
|
129
|
+
}
|
130
|
+
advance() {
|
131
|
+
this.pos++;
|
132
|
+
//NOTE: LF should be in the last column of the line
|
133
|
+
if (this.isEol) {
|
134
|
+
this.isEol = false;
|
135
|
+
this.line++;
|
136
|
+
this.lineStartPos = this.pos;
|
137
|
+
}
|
138
|
+
if (this.pos >= this.html.length) {
|
139
|
+
this.endOfChunkHit = !this.lastChunkWritten;
|
140
|
+
return $.EOF;
|
141
|
+
}
|
142
|
+
let cp = this.html.charCodeAt(this.pos);
|
143
|
+
//NOTE: all U+000D CARRIAGE RETURN (CR) characters must be converted to U+000A LINE FEED (LF) characters
|
144
|
+
if (cp === $.CARRIAGE_RETURN) {
|
145
|
+
this.isEol = true;
|
146
|
+
this.skipNextNewLine = true;
|
147
|
+
return $.LINE_FEED;
|
148
|
+
}
|
149
|
+
//NOTE: any U+000A LINE FEED (LF) characters that immediately follow a U+000D CARRIAGE RETURN (CR) character
|
150
|
+
//must be ignored.
|
151
|
+
if (cp === $.LINE_FEED) {
|
152
|
+
this.isEol = true;
|
153
|
+
if (this.skipNextNewLine) {
|
154
|
+
// `line` will be bumped again in the recursive call.
|
155
|
+
this.line--;
|
156
|
+
this.skipNextNewLine = false;
|
157
|
+
this._addGap();
|
158
|
+
return this.advance();
|
159
|
+
}
|
160
|
+
}
|
161
|
+
this.skipNextNewLine = false;
|
162
|
+
if (isSurrogate(cp)) {
|
163
|
+
cp = this._processSurrogate(cp);
|
164
|
+
}
|
165
|
+
//OPTIMIZATION: first check if code point is in the common allowed
|
166
|
+
//range (ASCII alphanumeric, whitespaces, big chunk of BMP)
|
167
|
+
//before going into detailed performance cost validation.
|
168
|
+
const isCommonValidRange = this.handler.onParseError === null ||
|
169
|
+
(cp > 0x1f && cp < 0x7f) ||
|
170
|
+
cp === $.LINE_FEED ||
|
171
|
+
cp === $.CARRIAGE_RETURN ||
|
172
|
+
(cp > 0x9f && cp < 64976);
|
173
|
+
if (!isCommonValidRange) {
|
174
|
+
this._checkForProblematicCharacters(cp);
|
175
|
+
}
|
176
|
+
return cp;
|
177
|
+
}
|
178
|
+
_checkForProblematicCharacters(cp) {
|
179
|
+
if (isControlCodePoint(cp)) {
|
180
|
+
this._err(ERR.controlCharacterInInputStream);
|
181
|
+
}
|
182
|
+
else if (isUndefinedCodePoint(cp)) {
|
183
|
+
this._err(ERR.noncharacterInInputStream);
|
184
|
+
}
|
185
|
+
}
|
186
|
+
retreat(count) {
|
187
|
+
this.pos -= count;
|
188
|
+
while (this.pos < this.lastGapPos) {
|
189
|
+
this.lastGapPos = this.gapStack.pop();
|
190
|
+
this.pos--;
|
191
|
+
}
|
192
|
+
this.isEol = false;
|
193
|
+
}
|
194
|
+
}
|
195
|
+
//# sourceMappingURL=preprocessor.js.map
|
@@ -0,0 +1,85 @@
|
|
1
|
+
import { DOCUMENT_MODE, type NS } from '../common/html.js';
|
2
|
+
import type { Attribute, Location, ElementLocation } from '../common/token.js';
|
3
|
+
import type { TreeAdapter, TreeAdapterTypeMap } from './interface.js';
|
4
|
+
export interface Document {
|
5
|
+
/** The name of the node. */
|
6
|
+
nodeName: '#document';
|
7
|
+
/**
|
8
|
+
* Document mode.
|
9
|
+
*
|
10
|
+
* @see {@link DOCUMENT_MODE} */
|
11
|
+
mode: DOCUMENT_MODE;
|
12
|
+
/** The node's children. */
|
13
|
+
childNodes: ChildNode[];
|
14
|
+
/** Comment source code location info. Available if location info is enabled. */
|
15
|
+
sourceCodeLocation?: Location | null;
|
16
|
+
}
|
17
|
+
export interface DocumentFragment {
|
18
|
+
/** The name of the node. */
|
19
|
+
nodeName: '#document-fragment';
|
20
|
+
/** The node's children. */
|
21
|
+
childNodes: ChildNode[];
|
22
|
+
/** Comment source code location info. Available if location info is enabled. */
|
23
|
+
sourceCodeLocation?: Location | null;
|
24
|
+
}
|
25
|
+
export interface Element {
|
26
|
+
/** Element tag name. Same as {@link tagName}. */
|
27
|
+
nodeName: string;
|
28
|
+
/** Element tag name. Same as {@link nodeName}. */
|
29
|
+
tagName: string;
|
30
|
+
/** List of element attributes. */
|
31
|
+
attrs: Attribute[];
|
32
|
+
/** Element namespace. */
|
33
|
+
namespaceURI: NS;
|
34
|
+
/** Element source code location info, with attributes. Available if location info is enabled. */
|
35
|
+
sourceCodeLocation?: ElementLocation | null;
|
36
|
+
/** Parent node. */
|
37
|
+
parentNode: ParentNode | null;
|
38
|
+
/** The node's children. */
|
39
|
+
childNodes: ChildNode[];
|
40
|
+
}
|
41
|
+
export interface CommentNode {
|
42
|
+
/** The name of the node. */
|
43
|
+
nodeName: '#comment';
|
44
|
+
/** Parent node. */
|
45
|
+
parentNode: ParentNode | null;
|
46
|
+
/** Comment text. */
|
47
|
+
data: string;
|
48
|
+
/** Comment source code location info. Available if location info is enabled. */
|
49
|
+
sourceCodeLocation?: Location | null;
|
50
|
+
}
|
51
|
+
export interface TextNode {
|
52
|
+
nodeName: '#text';
|
53
|
+
/** Parent node. */
|
54
|
+
parentNode: ParentNode | null;
|
55
|
+
/** Text content. */
|
56
|
+
value: string;
|
57
|
+
/** Comment source code location info. Available if location info is enabled. */
|
58
|
+
sourceCodeLocation?: Location | null;
|
59
|
+
}
|
60
|
+
export interface Template extends Element {
|
61
|
+
nodeName: 'template';
|
62
|
+
tagName: 'template';
|
63
|
+
/** The content of a `template` tag. */
|
64
|
+
content: DocumentFragment;
|
65
|
+
}
|
66
|
+
export interface DocumentType {
|
67
|
+
/** The name of the node. */
|
68
|
+
nodeName: '#documentType';
|
69
|
+
/** Parent node. */
|
70
|
+
parentNode: ParentNode | null;
|
71
|
+
/** Document type name. */
|
72
|
+
name: string;
|
73
|
+
/** Document type public identifier. */
|
74
|
+
publicId: string;
|
75
|
+
/** Document type system identifier. */
|
76
|
+
systemId: string;
|
77
|
+
/** Comment source code location info. Available if location info is enabled. */
|
78
|
+
sourceCodeLocation?: Location | null;
|
79
|
+
}
|
80
|
+
export type ParentNode = Document | DocumentFragment | Element | Template;
|
81
|
+
export type ChildNode = Element | Template | CommentNode | TextNode | DocumentType;
|
82
|
+
export type Node = ParentNode | ChildNode;
|
83
|
+
export type DefaultTreeAdapterMap = TreeAdapterTypeMap<Node, ParentNode, ChildNode, Document, DocumentFragment, Element, CommentNode, TextNode, Template, DocumentType>;
|
84
|
+
export declare const defaultTreeAdapter: TreeAdapter<DefaultTreeAdapterMap>;
|
85
|
+
//# sourceMappingURL=default.d.ts.map
|
@@ -0,0 +1,174 @@
|
|
1
|
+
import { DOCUMENT_MODE } from '../common/html.js';
|
2
|
+
function createTextNode(value) {
|
3
|
+
return {
|
4
|
+
nodeName: '#text',
|
5
|
+
value,
|
6
|
+
parentNode: null,
|
7
|
+
};
|
8
|
+
}
|
9
|
+
export const defaultTreeAdapter = {
|
10
|
+
//Node construction
|
11
|
+
createDocument() {
|
12
|
+
return {
|
13
|
+
nodeName: '#document',
|
14
|
+
mode: DOCUMENT_MODE.NO_QUIRKS,
|
15
|
+
childNodes: [],
|
16
|
+
};
|
17
|
+
},
|
18
|
+
createDocumentFragment() {
|
19
|
+
return {
|
20
|
+
nodeName: '#document-fragment',
|
21
|
+
childNodes: [],
|
22
|
+
};
|
23
|
+
},
|
24
|
+
createElement(tagName, namespaceURI, attrs) {
|
25
|
+
return {
|
26
|
+
nodeName: tagName,
|
27
|
+
tagName,
|
28
|
+
attrs,
|
29
|
+
namespaceURI,
|
30
|
+
childNodes: [],
|
31
|
+
parentNode: null,
|
32
|
+
};
|
33
|
+
},
|
34
|
+
createCommentNode(data) {
|
35
|
+
return {
|
36
|
+
nodeName: '#comment',
|
37
|
+
data,
|
38
|
+
parentNode: null,
|
39
|
+
};
|
40
|
+
},
|
41
|
+
//Tree mutation
|
42
|
+
appendChild(parentNode, newNode) {
|
43
|
+
parentNode.childNodes.push(newNode);
|
44
|
+
newNode.parentNode = parentNode;
|
45
|
+
},
|
46
|
+
insertBefore(parentNode, newNode, referenceNode) {
|
47
|
+
const insertionIdx = parentNode.childNodes.indexOf(referenceNode);
|
48
|
+
parentNode.childNodes.splice(insertionIdx, 0, newNode);
|
49
|
+
newNode.parentNode = parentNode;
|
50
|
+
},
|
51
|
+
setTemplateContent(templateElement, contentElement) {
|
52
|
+
templateElement.content = contentElement;
|
53
|
+
},
|
54
|
+
getTemplateContent(templateElement) {
|
55
|
+
return templateElement.content;
|
56
|
+
},
|
57
|
+
setDocumentType(document, name, publicId, systemId) {
|
58
|
+
const doctypeNode = document.childNodes.find((node) => node.nodeName === '#documentType');
|
59
|
+
if (doctypeNode) {
|
60
|
+
doctypeNode.name = name;
|
61
|
+
doctypeNode.publicId = publicId;
|
62
|
+
doctypeNode.systemId = systemId;
|
63
|
+
}
|
64
|
+
else {
|
65
|
+
const node = {
|
66
|
+
nodeName: '#documentType',
|
67
|
+
name,
|
68
|
+
publicId,
|
69
|
+
systemId,
|
70
|
+
parentNode: null,
|
71
|
+
};
|
72
|
+
defaultTreeAdapter.appendChild(document, node);
|
73
|
+
}
|
74
|
+
},
|
75
|
+
setDocumentMode(document, mode) {
|
76
|
+
document.mode = mode;
|
77
|
+
},
|
78
|
+
getDocumentMode(document) {
|
79
|
+
return document.mode;
|
80
|
+
},
|
81
|
+
detachNode(node) {
|
82
|
+
if (node.parentNode) {
|
83
|
+
const idx = node.parentNode.childNodes.indexOf(node);
|
84
|
+
node.parentNode.childNodes.splice(idx, 1);
|
85
|
+
node.parentNode = null;
|
86
|
+
}
|
87
|
+
},
|
88
|
+
insertText(parentNode, text) {
|
89
|
+
if (parentNode.childNodes.length > 0) {
|
90
|
+
const prevNode = parentNode.childNodes[parentNode.childNodes.length - 1];
|
91
|
+
if (defaultTreeAdapter.isTextNode(prevNode)) {
|
92
|
+
prevNode.value += text;
|
93
|
+
return;
|
94
|
+
}
|
95
|
+
}
|
96
|
+
defaultTreeAdapter.appendChild(parentNode, createTextNode(text));
|
97
|
+
},
|
98
|
+
insertTextBefore(parentNode, text, referenceNode) {
|
99
|
+
const prevNode = parentNode.childNodes[parentNode.childNodes.indexOf(referenceNode) - 1];
|
100
|
+
if (prevNode && defaultTreeAdapter.isTextNode(prevNode)) {
|
101
|
+
prevNode.value += text;
|
102
|
+
}
|
103
|
+
else {
|
104
|
+
defaultTreeAdapter.insertBefore(parentNode, createTextNode(text), referenceNode);
|
105
|
+
}
|
106
|
+
},
|
107
|
+
adoptAttributes(recipient, attrs) {
|
108
|
+
const recipientAttrsMap = new Set(recipient.attrs.map((attr) => attr.name));
|
109
|
+
for (let j = 0; j < attrs.length; j++) {
|
110
|
+
if (!recipientAttrsMap.has(attrs[j].name)) {
|
111
|
+
recipient.attrs.push(attrs[j]);
|
112
|
+
}
|
113
|
+
}
|
114
|
+
},
|
115
|
+
//Tree traversing
|
116
|
+
getFirstChild(node) {
|
117
|
+
return node.childNodes[0];
|
118
|
+
},
|
119
|
+
getChildNodes(node) {
|
120
|
+
return node.childNodes;
|
121
|
+
},
|
122
|
+
getParentNode(node) {
|
123
|
+
return node.parentNode;
|
124
|
+
},
|
125
|
+
getAttrList(element) {
|
126
|
+
return element.attrs;
|
127
|
+
},
|
128
|
+
//Node data
|
129
|
+
getTagName(element) {
|
130
|
+
return element.tagName;
|
131
|
+
},
|
132
|
+
getNamespaceURI(element) {
|
133
|
+
return element.namespaceURI;
|
134
|
+
},
|
135
|
+
getTextNodeContent(textNode) {
|
136
|
+
return textNode.value;
|
137
|
+
},
|
138
|
+
getCommentNodeContent(commentNode) {
|
139
|
+
return commentNode.data;
|
140
|
+
},
|
141
|
+
getDocumentTypeNodeName(doctypeNode) {
|
142
|
+
return doctypeNode.name;
|
143
|
+
},
|
144
|
+
getDocumentTypeNodePublicId(doctypeNode) {
|
145
|
+
return doctypeNode.publicId;
|
146
|
+
},
|
147
|
+
getDocumentTypeNodeSystemId(doctypeNode) {
|
148
|
+
return doctypeNode.systemId;
|
149
|
+
},
|
150
|
+
//Node types
|
151
|
+
isTextNode(node) {
|
152
|
+
return node.nodeName === '#text';
|
153
|
+
},
|
154
|
+
isCommentNode(node) {
|
155
|
+
return node.nodeName === '#comment';
|
156
|
+
},
|
157
|
+
isDocumentTypeNode(node) {
|
158
|
+
return node.nodeName === '#documentType';
|
159
|
+
},
|
160
|
+
isElementNode(node) {
|
161
|
+
return Object.prototype.hasOwnProperty.call(node, 'tagName');
|
162
|
+
},
|
163
|
+
// Source code location
|
164
|
+
setNodeSourceCodeLocation(node, location) {
|
165
|
+
node.sourceCodeLocation = location;
|
166
|
+
},
|
167
|
+
getNodeSourceCodeLocation(node) {
|
168
|
+
return node.sourceCodeLocation;
|
169
|
+
},
|
170
|
+
updateNodeSourceCodeLocation(node, endLocation) {
|
171
|
+
node.sourceCodeLocation = { ...node.sourceCodeLocation, ...endLocation };
|
172
|
+
},
|
173
|
+
};
|
174
|
+
//# sourceMappingURL=default.js.map
|