pax_global_header00006660000000000000000000000064152017326350014516gustar00rootroot0000000000000052 comment=dcb3714a6c25db3a2748641019c5277413d09714 101arrowz-fflate-a661bab/000077500000000000000000000000001520173263500152075ustar00rootroot00000000000000101arrowz-fflate-a661bab/.browserslistrc000066400000000000000000000000051520173263500202720ustar00rootroot00000000000000IE 11101arrowz-fflate-a661bab/.github/000077500000000000000000000000001520173263500165475ustar00rootroot00000000000000101arrowz-fflate-a661bab/.github/ISSUE_TEMPLATE/000077500000000000000000000000001520173263500207325ustar00rootroot00000000000000101arrowz-fflate-a661bab/.github/ISSUE_TEMPLATE/bug.md000066400000000000000000000012151520173263500220300ustar00rootroot00000000000000--- name: Bug about: Report unexpected errors, corrupt files, and other bugs here title: '' labels: '' assignees: '' --- **How to reproduce** **The problem** 101arrowz-fflate-a661bab/.github/ISSUE_TEMPLATE/config.yml000066400000000000000000000005041520173263500227210ustar00rootroot00000000000000blank_issues_enabled: false contact_links: - name: Questions url: https://github.com/101arrowz/fflate/discussions about: Ask questions about how to use fflate here. - name: Email url: mailto:arjunbarrett@gmail.com about: Privately send me any feedback or bug reports (with files to reproduce them) here. 101arrowz-fflate-a661bab/.github/ISSUE_TEMPLATE/feature_request.md000066400000000000000000000016561520173263500244670ustar00rootroot00000000000000--- name: Feature request about: Suggest an improvement to functionality or documentation title: '' labels: '' assignees: '' --- **What can't you do right now?** **An optimal solution** **(How) is this done by other libraries?** 101arrowz-fflate-a661bab/.gitignore000066400000000000000000000002231520173263500171740ustar00rootroot00000000000000node_modules/ lib/ esm/ .DS_STORE # Rust version - available when ready rs/*/target/ rs/*/Cargo.lock .DS_STORE umd/ # for demo .parcel-cache dist/101arrowz-fflate-a661bab/.npmignore000066400000000000000000000001111520173263500171770ustar00rootroot00000000000000* !esm/** !lib/** !umd/** !package.json !README.md !CHANGELOG.md !LICENSE101arrowz-fflate-a661bab/.terserrc000066400000000000000000000000531520173263500170370ustar00rootroot00000000000000{ "format": { "comments": false } }101arrowz-fflate-a661bab/CHANGELOG.md000066400000000000000000000107201520173263500170200ustar00rootroot00000000000000## 0.8.3 - Fix buffer over-read for Zip64 extra fields - Support sync flushes (`Z_SYNC_FLUSH` in zlib) - Allows for immediate decompression of all pushed bytes - Enables DEFLATE stream concatenation - Fix `zip`/`zipSync` when using cross-realm `Uint8Array` - Improve Zip64 support for streamed or undersized archives - Update performance estimates in README - Fix typings for TypeScript v5.7+ - Reduce memory consumption after compression stream completion ## 0.8.2 - Fixed broken UMD build - Fixed edge-case causing skipped data during streaming compression - Fixed bug in GZIP streaming on member boundary - Improved streaming performance on inconsistent chunk sizes - Improved `unzip` performance on undercompressed archives - Added flushing support into streaming API - Added backpressure support into async streaming API - Use new `ondrain` handler and `queuedSize` ## 0.8.1 - Fixed reallocating on pre-supplied buffer in `inflateSync` and `unzlibSync` - Minor documentation fixes ## 0.8.0 - BREAKING: synchronous decompression functions now take an options object rather than an output buffer as a second parameter - `inflateSync(compressed, outBuf)` is now `inflateSync(compressed, { out: outBuf })` - Support dictionaries in compression and decompression - Support multi-member files in GZIP streaming decompression - Dramatically improved streaming performance - Fixed missing error on certain malformed GZIP files ## 0.7.3 - Fix folder creation for certain operating system - Create 0-length "files" for each directory specified with "object" syntax" - Support empty folders - Add options for folders - Fix minification in SWC - Remove instanceof, no-whitespace assumptions in async functions ## 0.7.2 - Fixed TypeScript typing for errors when using `strictNullChecks` - Fixed failure to compress files above 64kB with `{ level: 0 }` - Fixed AMD module definition in UMD build ## 0.7.1 - Removed requirement for `setTimeout` - Added support for unzip file filters (thanks to [@manucorporat](https://github.com/manucorporat): #67) - Fixed streaming gunzip and unzlib bug causing corruption ## 0.7.0 - Improved errors - Now errors are error objects instead of strings - Check the error code to apply custom logic based on error type - Made async operations always call callbacks asynchronously - Fixed bug that caused errors to not appear in asynchronous operations in browsers ## 0.6.10 - Fixed async operations on Node.js with native ESM ## 0.6.5 - Fixed streams not recognizing final chunk - Fixed streaming UTF-8 decoder bug ## 0.6.4 - Made streaming inflate consume all data possible - Optimized use of values near 32-bit boundary ## 0.6.3 - Patch exports of async functions - Fix streaming unzip ## 0.6.2 - Replace Adler-32 implementation (used in Zlib compression) with one more optimized for V8 - Advice from @SheetJSDev - Add support for extra fields, file comments in ZIP files - Work on Rust version ## 0.6.0 - Revamped streaming unzip for compatibility and performance improvements - Fixed streaming data bugs - Fixed inflation errors - Planned new tests ## 0.5.2 - General bugfixes ## 0.5.0 - Add streaming zip, unzip - Fix import issues with certain environments - If you had problems with `worker_threads` being included in your bundle, try updating! ## 0.4.8 - Support strict Content Security Policy - Remove `new Function` ## 0.4.7 - Fix data streaming bugs ## 0.4.5 - Zip64 support - Still not possible to have above 4GB files ## 0.4.4 - Files up to 4GB supported - Hey, that's better than even Node.js `zlib`! ## 0.4.1 - Fix ZIP failure bug - Make ZIP options work better - Improve docs - Fix async inflate failure - Work on Rust version ## 0.3.11 - Fix docs ## 0.3.9 - Fixed issue with unzipping ## 0.3.7 - Patched streaming compression bugs - Added demo page ## 0.3.6 - Allowed true ESM imports ## 0.3.4 - Fixed rare overflow bug causing corruption - Added async stream termination - Added UMD bundle ## 0.3.0 - Added support for asynchronous and synchronous streaming - Reduced bundle size by autogenerating worker code, even in minified environments - Error detection rather than hanging - Improved performance ## 0.2.3 - Improved Zlib autodetection ## 0.2.2 - Fixed Node Worker ## 0.2.1 - Fixed ZIP bug ## 0.2.0 - Added support for ZIP files (parallelized) - Added ability to terminate running asynchronous operations ## 0.1.0 - Rewrote API: added support for asynchronous (Worker) compression/decompression, fixed critical bug involving fixed Huffman trees ## 0.0.1 - Created, works on basic input101arrowz-fflate-a661bab/LICENSE000066400000000000000000000020551520173263500162160ustar00rootroot00000000000000MIT License Copyright (c) 2026 Arjun Barrett Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.101arrowz-fflate-a661bab/README.md000066400000000000000000000653421520173263500165000ustar00rootroot00000000000000# fflate High performance (de)compression in an 8kB package ## Why fflate? `fflate` (short for fast flate) is the **fastest, smallest, and most versatile** pure JavaScript compression and decompression library in existence, handily beating [`pako`](https://npmjs.com/package/pako), [`tiny-inflate`](https://npmjs.com/package/tiny-inflate), and [`UZIP.js`](https://github.com/photopea/UZIP.js) in performance benchmarks while being multiple times more lightweight. Its compression ratios are often better than even the original Zlib C library. It includes support for DEFLATE, GZIP, and Zlib data. Data compressed by `fflate` can be decompressed by other tools, and vice versa. In addition to the base decompression and compression APIs, `fflate` supports high-speed ZIP file archiving for an extra 3 kB. In fact, the compressor, in synchronous mode, compresses both more quickly and with a higher compression ratio than most compression software (even Info-ZIP, a C program), and in asynchronous mode it can utilize multiple threads to achieve over 3x the performance of virtually any other utility. | | `pako` | `tiny-inflate` | `UZIP.js` | `fflate` | |-----------------------------|--------|------------------------|-----------------------|--------------------------------| | Decompression performance | 1x | Up to 40% slower | **Up to 25% faster** | **Up to 25% faster** | | Compression performance | 1x | N/A | Up to 25% faster | **Up to 50% faster** | | Base bundle size (minified) | 45.6kB | **3kB (inflate only)** | 14.2kB | 8kB **(3kB for inflate only)** | | Decompression support | ✅ | ✅ | ✅ | ✅ | | Compression support | ✅ | � | ✅ | ✅ | | ZIP support | � | � | ✅ | ✅ | | Streaming support | ✅ | � | � | ✅ | | GZIP support | ✅ | � | � | ✅ | | Supports files up to 4GB | ✅ | � | � | ✅ | | Doesn't hang on error | ✅ | � | � | ✅ | | Dictionary support | ✅ | � | � | ✅ | | Multi-thread/Asynchronous | � | � | � | ✅ | | Streaming ZIP support | � | � | � | ✅ | | Uses ES Modules | � | � | � | ✅ | ## Demo If you'd like to try `fflate` for yourself without installing it, you can take a look at the [browser demo](https://101arrowz.github.io/fflate). Since `fflate` is a pure JavaScript library, it works in both the browser and Node.js (see [Browser support](https://github.com/101arrowz/fflate/#browser-support) for more info). ## Usage Install `fflate`: ```sh npm i fflate # or yarn add fflate, or pnpm add fflate ``` Import: ```js // I will assume that you use the following for the rest of this guide import * as fflate from 'fflate'; // However, you should import ONLY what you need to minimize bloat. // So, if you just need GZIP compression support: import { gzipSync } from 'fflate'; // Woo! You just saved 20 kB off your bundle with one line. ``` If your environment doesn't support ES Modules (e.g. Node.js): ```js // Try to avoid this when using fflate in the browser, as it will import // all of fflate's components, even those that you aren't using. const fflate = require('fflate'); ``` If you want to load from a CDN in the browser: ```html ``` If you are using Deno: ```js // Don't use the ?dts Skypack flag; it isn't necessary for Deno support // The @deno-types comment adds TypeScript typings // @deno-types="https://cdn.skypack.dev/fflate@0.8.3/lib/index.d.ts" import * as fflate from 'https://cdn.skypack.dev/fflate@0.8.3?min'; ``` If your environment doesn't support bundling: ```js // Again, try to import just what you need // For the browser: import * as fflate from 'fflate/esm/browser.js'; // If the standard ESM import fails on Node (i.e. older version): import * as fflate from 'fflate/esm'; ``` And use: ```js // This is an ArrayBuffer of data const massiveFileBuf = await fetch('/aMassiveFile').then( res => res.arrayBuffer() ); // To use fflate, you need a Uint8Array const massiveFile = new Uint8Array(massiveFileBuf); // Note that Node.js Buffers work just fine as well: // const massiveFile = require('fs').readFileSync('aMassiveFile.txt'); // Higher level means lower performance but better compression // The level ranges from 0 (no compression) to 9 (max compression) // The default level is 6 const notSoMassive = fflate.zlibSync(massiveFile, { level: 9 }); const massiveAgain = fflate.unzlibSync(notSoMassive); const gzipped = fflate.gzipSync(massiveFile, { // GZIP-specific: the filename to use when decompressed filename: 'aMassiveFile.txt', // GZIP-specific: the modification time. Can be a Date, date string, // or Unix timestamp mtime: '9/1/16 2:00 PM' }); ``` `fflate` can autodetect a compressed file's format as well: ```js const compressed = new Uint8Array( await fetch('/GZIPorZLIBorDEFLATE').then(res => res.arrayBuffer()) ); // Above example with Node.js Buffers: // Buffer.from('H4sIAAAAAAAAE8tIzcnJBwCGphA2BQAAAA==', 'base64'); const decompressed = fflate.decompressSync(compressed); ``` Using strings is easy with `fflate`'s string conversion API: ```js const buf = fflate.strToU8('Hello world!'); // The default compression method is gzip // Increasing mem may increase performance at the cost of memory // The mem ranges from 0 to 12, where 4 is the default const compressed = fflate.compressSync(buf, { level: 6, mem: 8 }); // When you need to decompress: const decompressed = fflate.decompressSync(compressed); const origText = fflate.strFromU8(decompressed); console.log(origText); // Hello world! ``` If you need to use an (albeit inefficient) binary string, you can set the second argument to `true`. ```js const buf = fflate.strToU8('Hello world!'); // The second argument, latin1, is a boolean that indicates that the data // is not Unicode but rather should be encoded and decoded as Latin-1. // This is useful for creating a string from binary data that isn't // necessarily valid UTF-8. However, binary strings are incredibly // inefficient and tend to double file size, so they're not recommended. const compressedString = fflate.strFromU8( fflate.compressSync(buf), true ); const decompressed = fflate.decompressSync( fflate.strToU8(compressedString, true) ); const origText = fflate.strFromU8(decompressed); console.log(origText); // Hello world! ``` You can use streams as well to incrementally add data to be compressed or decompressed: ```js // This example uses synchronous streams, but for the best experience // you'll definitely want to use asynchronous streams. let outStr = ''; const gzipStream = new fflate.Gzip({ level: 9 }, (chunk, isLast) => { // accumulate in an inefficient binary string (just an example) outStr += fflate.strFromU8(chunk, true); }); // You can also attach the data handler separately if you don't want to // do so in the constructor. gzipStream.ondata = (chunk, final) => { ... } // Since this is synchronous, all errors will be thrown by stream.push() gzipStream.push(chunk1); gzipStream.push(chunk2); ... // You should mark the last chunk by using true in the second argument // In addition to being necessary for the stream to work properly, this // will also set the isLast parameter in the handler to true. gzipStream.push(lastChunk, true); console.log(outStr); // The compressed binary string is now available // The options parameter for compression streams is optional; you can // provide one parameter (the handler) or none at all if you set // deflateStream.ondata later. const deflateStream = new fflate.Deflate((chunk, final) => { console.log(chunk, final); }); // If you want to create a stream from strings, use EncodeUTF8 const utfEncode = new fflate.EncodeUTF8((data, final) => { // Chaining streams together is done by pushing to the // next stream in the handler for the previous stream deflateStream.push(data, final); }); utfEncode.push('Hello'.repeat(1000)); utfEncode.push(' '.repeat(100)); utfEncode.push('world!'.repeat(10), true); // The deflateStream has logged the compressed data const inflateStream = new fflate.Inflate(); inflateStream.ondata = (decompressedChunk, final) => { ... }; let stringData = ''; // Streaming UTF-8 decode is available too const utfDecode = new fflate.DecodeUTF8((data, final) => { stringData += data; }); // Decompress streams auto-detect the compression method, as the // non-streaming decompress() method does. const dcmpStrm = new fflate.Decompress((chunk, final) => { console.log(chunk, 'was encoded with GZIP, Zlib, or DEFLATE'); utfDecode.push(chunk, final); }); dcmpStrm.push(zlibJSONData1); dcmpStrm.push(zlibJSONData2, true); // This succeeds; the UTF-8 decoder chained with the unknown compression format // stream to reach a string as a sink. console.log(JSON.parse(stringData)); ``` You can create multi-file ZIP archives easily as well. Note that by default, compression is enabled for all files, which is not useful when ZIPping many PNGs, JPEGs, PDFs, etc. because those formats are already compressed. You should either override the level on a per-file basis or globally to avoid wasting resources. ```js // Note that the asynchronous version (see below) runs in parallel and // is *much* (up to 3x) faster for larger archives. const zipped = fflate.zipSync({ // Directories can be nested structures, as in an actual filesystem 'dir1': { 'nested': { // You can use Unicode in filenames '你好.txt': fflate.strToU8('Hey there!') }, // You can also manually write out a directory path 'other/tmp.txt': new Uint8Array([97, 98, 99, 100]) }, // You can also provide compression options 'massiveImage.bmp': [aMassiveFile, { level: 9, mem: 12 }], // PNG is pre-compressed; no need to waste time 'superTinyFile.png': [aPNGFile, { level: 0 }], // Directories take options too 'exec': [{ 'hello.sh': [fflate.strToU8('echo hello world'), { // ZIP only: Set the operating system to Unix os: 3, // ZIP only: Make this file executable on Unix attrs: 0o755 << 16 }] }, { // ZIP and GZIP support mtime (defaults to current time) mtime: new Date('10/20/2020') }] }, { // These options are the defaults for all files, but file-specific // options take precedence. level: 1, // Obfuscate last modified time by default mtime: new Date('1/1/1980') }); // If you write the zipped data to myzip.zip and unzip, the folder // structure will be outputted as: // myzip.zip (original file) // dir1 // |-> nested // | |-> 你好.txt // |-> other // | |-> tmp.txt // massiveImage.bmp // superTinyFile.png // When decompressing, folders are not nested; all filepaths are fully // written out in the keys. For example, the return value may be: // { 'nested/directory/structure.txt': Uint8Array(2) [97, 97] } const decompressed = fflate.unzipSync(zipped, { // You may optionally supply a filter for files. By default, all files in a // ZIP archive are extracted, but a filter can save resources by telling // the library not to decompress certain files filter(file) { // Don't decompress the massive image or any files larger than 10 MiB return file.name != 'massiveImage.bmp' && file.originalSize <= 10_000_000; } }); ``` If you need extremely high performance or custom ZIP compression formats, you can use the highly-extensible ZIP streams. They take streams as both input and output. You can even use custom compression/decompression algorithms from other libraries, as long as they [are defined in the ZIP spec](https://pkware.cachefly.net/webdocs/casestudies/APPNOTE.TXT) (see section 4.4.5). If you'd like more info on using custom compressors, [feel free to ask](https://github.com/101arrowz/fflate/discussions). ```js // ZIP object // Can also specify zip.ondata outside of the constructor const zip = new fflate.Zip((err, dat, final) => { if (!err) { // output of the streams console.log(dat, final); } }); const helloTxt = new fflate.ZipDeflate('hello.txt', { level: 9 }); // Always add streams to ZIP archives before pushing to those streams zip.add(helloTxt); helloTxt.push(chunk1); // Last chunk helloTxt.push(chunk2, true); // ZipPassThrough is like ZipDeflate with level 0, but allows for tree shaking const nonStreamingFile = new fflate.ZipPassThrough('test.png'); zip.add(nonStreamingFile); // If you have data already loaded, just .push(data, true) nonStreamingFile.push(pngData, true); // You need to call .end() after finishing // This ensures the ZIP is valid zip.end(); // Unzip object const unzipper = new fflate.Unzip(); // This function will almost always have to be called. It is used to support // compression algorithms such as BZIP2 or LZMA in ZIP files if just DEFLATE // is not enough (though it almost always is). // If your ZIP files are not compressed, this line is not needed. unzipper.register(fflate.UnzipInflate); const neededFiles = ['file1.txt', 'example.json']; // Can specify handler in constructor too unzipper.onfile = file => { // file.name is a string, file is a stream if (neededFiles.includes(file.name)) { file.ondata = (err, dat, final) => { // Stream output here console.log(dat, final); }; console.log('Reading:', file.name); // File sizes are sometimes not set if the ZIP file did not encode // them, so you may want to check that file.size != undefined console.log('Compressed size', file.size); console.log('Decompressed size', file.originalSize); // You should only start the stream if you plan to use it to improve // performance. Only after starting the stream will ondata be called. // This method will throw if the compression method hasn't been registered file.start(); } }; // Try to keep under 5,000 files per chunk to avoid stack limit errors // For example, if all files are a few kB, multi-megabyte chunks are OK // If files are mostly under 100 bytes, 64kB chunks are the limit unzipper.push(zipChunk1); unzipper.push(zipChunk2); unzipper.push(zipChunk3, true); ``` As you may have guessed, there is an asynchronous version of every method as well. Unlike most libraries, this will cause the compression or decompression run in a separate thread entirely and automatically by using Web (or Node) Workers. This means that the processing will not block the main thread at all. Note that there is a significant initial overhead to using workers of about 50ms for each asynchronous function. For instance, if you call `unzip` ten times, the overhead only applies for the first call, but if you call `unzip` and `zlib`, they will each cause the 50ms delay. For small (under about 50kB) payloads, the asynchronous APIs will be much slower. However, if you're compressing larger files/multiple files at once, or if the synchronous API causes the main thread to hang for too long, the callback APIs are an order of magnitude better. ```js import { gzip, zlib, AsyncGzip, zip, unzip, strFromU8, Zip, AsyncZipDeflate, Unzip, AsyncUnzipInflate } from 'fflate'; // Workers will work in almost any browser (even IE11!) // All of the async APIs use a node-style callback as so: const terminate = gzip(aMassiveFile, (err, data) => { if (err) { // The compressed data was likely corrupt, so we have to handle // the error. return; } // Use data however you like console.log(data.length); }); if (needToCancel) { // The return value of any of the asynchronous APIs is a function that, // when called, will immediately cancel the operation. The callback // will not be called. terminate(); } // If you wish to provide options, use the second argument. // The consume option will render the data inside aMassiveFile unusable, // but can improve performance and dramatically reduce memory usage. zlib(aMassiveFile, { consume: true, level: 9 }, (err, data) => { // Use the data }); // Asynchronous streams are similar to synchronous streams, but the // handler has the error that occurred (if any) as the first parameter, // and they don't block the main thread. // Additionally, any buffers that are pushed in will be consumed and // rendered unusable; if you need to use a buffer you push in, you // should clone it first. const gzs = new AsyncGzip({ level: 9, mem: 12, filename: 'hello.txt' }); let wasCallbackCalled = false; gzs.ondata = (err, chunk, final) => { // Note the new err parameter if (err) { // Note that after this occurs, the stream becomes corrupt and must // be discarded. You can't continue pushing chunks and expect it to // work. console.error(err); return; } wasCallbackCalled = true; } gzs.push(chunk); // Since the stream is asynchronous, the callback will not be called // immediately. If such behavior is absolutely necessary (it shouldn't // be), use synchronous streams. console.log(wasCallbackCalled) // false // To terminate an asynchronous stream's internal worker, call // stream.terminate(). gzs.terminate(); // This is way faster than zipSync because the compression of multiple // files runs in parallel. In fact, the fact that it's parallelized // makes it faster than most standalone ZIP CLIs. The effect is most // significant for multiple large files; less so for many small ones. zip({ f1: aMassiveFile, 'f2.txt': anotherMassiveFile }, { // The options object is still optional, you can still do just // zip(archive, callback) level: 6 }, (err, data) => { // Save the ZIP file }); // unzip is the only async function without support for consume option // It is parallelized, so unzip is also often much faster than unzipSync unzip(aMassiveZIPFile, (err, unzipped) => { // If the archive has data.xml, log it here console.log(unzipped['data.xml']); // Conversion to string console.log(strFromU8(unzipped['data.xml'])) }); // Streaming ZIP archives can accept asynchronous streams. This automatically // uses multicore compression. const zip = new Zip(); zip.ondata = (err, chunk, final) => { ... }; // The JSON and BMP are compressed in parallel const exampleFile = new AsyncZipDeflate('example.json'); zip.add(exampleFile); exampleFile.push(JSON.stringify({ large: 'object' }), true); const exampleFile2 = new AsyncZipDeflate('example2.bmp', { level: 9 }); zip.add(exampleFile2); exampleFile2.push(ec2a); exampleFile2.push(ec2b); exampleFile2.push(ec2c); ... exampleFile2.push(ec2Final, true); zip.end(); // Streaming Unzip should register the asynchronous inflation algorithm // for parallel processing. const unzip = new Unzip(stream => { if (stream.name.endsWith('.json')) { stream.ondata = (err, chunk, final) => { ... }; stream.start(); if (needToCancel) { // To cancel these streams, call .terminate() stream.terminate(); } } }); unzip.register(AsyncUnzipInflate); unzip.push(data, true); ``` See the [documentation](https://github.com/101arrowz/fflate/blob/master/docs/README.md) for more detailed information about the API. ## Bundle size estimates The bundle size measurements for `fflate` on sites like Bundlephobia include every feature of the library and should be seen as an upper bound. As long as you are using tree shaking or dead code elimination, this table should give you a general idea of `fflate`'s bundle size for the features you need. The maximum bundle size that is possible with `fflate` is about 33kB (12.5kB gzipped) if you use every single feature, but feature parity with `pako` is only around 10kB (as opposed to 45kB from `pako`). If your bundle size increases dramatically after adding `fflate`, please [create an issue](https://github.com/101arrowz/fflate/issues/new). | Feature | Bundle size (minified) | Nearest competitor | |-------------------------|--------------------------------|-------------------------| | Decompression | 3kB | `tiny-inflate` | | Compression | 5kB | `UZIP.js`, 2.84x larger | | Async decompression | 4kB (1kB + raw decompression) | N/A | | Async compression | 6kB (1kB + raw compression) | N/A | | ZIP decompression | 5kB (2kB + raw decompression) | `UZIP.js`, 2.84x larger | | ZIP compression | 7kB (2kB + raw compression) | `UZIP.js`, 2.03x larger | | GZIP/Zlib decompression | 4kB (1kB + raw decompression) | `pako`, 11.4x larger | | GZIP/Zlib compression | 5kB (1kB + raw compression) | `pako`, 9.12x larger | | Streaming decompression | 4kB (1kB + raw decompression) | `pako`, 11.4x larger | | Streaming compression | 5kB (1kB + raw compression) | `pako`, 9.12x larger | ## What makes `fflate` so fast? Many JavaScript compression/decompression libraries exist. However, the most popular one, [`pako`](https://npmjs.com/package/pako), is merely a clone of Zlib rewritten nearly line-for-line in JavaScript. Although it is by no means poorly made, `pako` doesn't recognize the many differences between JavaScript and C, and therefore is suboptimal for performance. Moreover, even when minified, the library is 45 kB; it may not seem like much, but for anyone concerned with optimizing bundle size (especially library authors), it's more weight than necessary. Note that there exist some small libraries like [`tiny-inflate`](https://npmjs.com/package/tiny-inflate) for solely decompression, and with a minified size of 3 kB, it can be appealing; however, its performance is lackluster, typically 40% worse than `pako` in my tests. [`UZIP.js`](https://github.com/photopea/UZIP.js) is both faster (by up to 25%) and smaller (14 kB minified) than `pako`, and it contains a variety of innovations that make it excellent for both performance and compression ratio. However, the developer made a variety of tiny mistakes and inefficient design choices that make it imperfect. Moreover, it does not support GZIP or Zlib data directly; one must remove the headers manually to use `UZIP.js`. So what makes `fflate` different? It takes the brilliant innovations of `UZIP.js` and optimizes them while adding direct support for GZIP and Zlib data. And unlike all of the above libraries, it uses ES Modules to allow for partial builds through tree shaking, meaning that it can rival even `tiny-inflate` in size while maintaining excellent performance. The end result is a library that, in total, weighs 8kB minified for the core build (3kB for decompression only and 5kB for compression only), is about 25% faster than `UZIP.js` or up to 50% faster than `pako`, and achieves the same or better compression ratio than the rest. Before you decide that `fflate` is the end-all compression library, you should note that JavaScript simply cannot rival the performance of a native program. If you're only using Node.js, it's probably better to use the [native Zlib bindings](https://nodejs.org/api/zlib.html), which tend to offer the best performance. Though note that even against Zlib, `fflate` is only around 30% slower in decompression and 10% slower in compression, and can still achieve better compression ratios! ## What about `CompressionStream`? Like `fflate`, the [Compression Streams API](https://developer.mozilla.org/en-US/docs/Web/API/Compression_Streams_API) provides DEFLATE, GZIP, and Zlib compression and decompression support. It's a good option if you'd like to compress or decompress data without installing any third-party libraries, and it wraps native Zlib bindings to achieve better performance than what most JavaScript programs can achieve. However, browsers do not offer any native non-streaming compression API, and `CompressionStream` has surprisingly poor performance on data already loaded into memory; `fflate` tends to be faster even for files that are dozens of megabytes large. Similarly, `fflate` is much faster for files under a megabyte because it avoids marshalling overheads. Even when streaming hundreds of megabytes of data, the native API usually performs between 30% faster and 10% slower than `fflate`. And Compression Streams have many other disadvantages - no ability to control compression level, poor support for older browsers, no ZIP support, etc. If you'd still prefer to depend upon a native browser API but want to support older browsers, you can use an `fflate`-based [Compression Streams ponyfill](https://github.com/101arrowz/compression-streams-polyfill). ## Browser support `fflate` makes heavy use of typed arrays (`Uint8Array`, `Uint16Array`, etc.). Typed arrays can be polyfilled at the cost of performance, but the most recent browser that doesn't support them [is from 2011](https://caniuse.com/typedarrays), so I wouldn't bother. The asynchronous APIs also use `Worker`, which is not supported in a few browsers (however, the vast majority of browsers that support typed arrays support `Worker`). Other than that, `fflate` is completely ES3, meaning you probably won't even need a bundler to use it. ## Testing You can validate the performance of `fflate` with `npm test`. It validates that the module is working as expected, ensures the outputs are no more than 5% larger than competitors at max compression, and outputs performance metrics to `test/results`. Note that the time it takes for the CLI to show the completion of each test is not representative of the time each package took, so please check the JSON output if you want accurate measurements. ## License This software is [MIT Licensed](./LICENSE), with special exemptions for projects and organizations as noted below: - [SheetJS](https://github.com/SheetJS/) is exempt from MIT licensing and may license any source code from this software under the BSD Zero Clause License 101arrowz-fflate-a661bab/demo/000077500000000000000000000000001520173263500161335ustar00rootroot00000000000000101arrowz-fflate-a661bab/demo/App.tsx000066400000000000000000000076341520173263500174250ustar00rootroot00000000000000import React, { FC, useEffect, useRef, useState } from 'react'; import FilePicker from './components/file-picker'; import CodeBox from './components/code-box'; const App: FC = () => { const [err, setErr] = useState(null); const [files, setFiles] = useState([]); const cbRef = useRef(null); useEffect(() => { if (files && files.length) { cbRef.current!.scrollIntoView({ behavior: 'smooth' // Hopefully IE just ignores this value }); } }, [files]); return ( <>
fflate
a fast compression library by 101arrowz
You've found fflate, the fastest pure JavaScript compression library in existence.

You can both pack and expand Zlib, GZIP, DEFLATE, or ZIP files very quickly with just a few lines of code.

Weighing in at a measly 8kB for basic compression and decompression, you don't need to worry about your bundle size ballooning.

Despite utilizing multiple cores, supporting data streams, and being very memory efficient, fflate is compatible with both Node.js and browsers as old as IE11.

You can read more about fflate on GitHub. Try the demo below to see its performance for yourself. The code boxes are editable; try changing parameters or using a different compression format.

Disclaimer: I added a lot of sugar (around 4 hundred lines) to the UZIP and Pako APIs to make the demo clean and asynchronous, but the fflate API is unmodified.

{}}> {err &&
Error: {err.toString()}
}
{files ? ((files.length || 'No') + ' file' + (files.length == 1 ? '' : 's') + ' selected') : 'Loading...'}

{((!files || files.length) && ) || null}
); } export default App;101arrowz-fflate-a661bab/demo/augment.d.ts000066400000000000000000000010061520173263500203620ustar00rootroot00000000000000declare module 'uzip' { namespace UZIP { function deflateRaw(buf: Uint8Array, opts?: { level: number }): Uint8Array; function inflateRaw(buf: Uint8Array, out?: Uint8Array): Uint8Array; function deflate(buf: Uint8Array, opts?: { level: number }): Uint8Array; function inflate(buf: Uint8Array, out?: Uint8Array): Uint8Array; function encode(files: Record, noCmpr?: boolean): ArrayBuffer; function parse(buf: ArrayBuffer): Record; } export = UZIP; } 101arrowz-fflate-a661bab/demo/components/000077500000000000000000000000001520173263500203205ustar00rootroot00000000000000101arrowz-fflate-a661bab/demo/components/code-box/000077500000000000000000000000001520173263500220205ustar00rootroot00000000000000101arrowz-fflate-a661bab/demo/components/code-box/index.tsx000066400000000000000000000435551520173263500237030ustar00rootroot00000000000000import React, { FC, Ref, useEffect, useMemo, useRef, useState } from 'react'; import { Prism } from './prism'; import './prism'; import './prism.css'; import exec from './sandbox'; const canStream = 'stream' in File.prototype; const rn = 'Running...'; const wt = 'Waiting...'; const tm = typeof performance != 'undefined' ? () => performance.now() : () => Date.now(); type Preset = { fflate: string; uzip: string; pako: string; }; const presets: Record = { 'Basic GZIP compression': { fflate: `var left = files.length; var filesLengths = {}; // In a real app, use a list of file types to avoid compressing for better // performance var ALREADY_COMPRESSED = [ 'zip', 'gz', 'png', 'jpg', 'jpeg', 'pdf', 'doc', 'docx', 'ppt', 'pptx', 'xls', 'xlsx', 'heic', 'heif', '7z', 'bz2', 'rar', 'gif', 'webp', 'webm', 'mp4', 'mov', 'mp3', 'aifc' ]; // This function binds the variable "file" to the local scope, which makes // parallel processing possible. // If you use ES6, you can declare variables with "let" to automatically bind // the variable to the scope rather than using a separate function. var processFile = function(i) { var file = files[i]; fileToU8(file, function(buf) { fflate.gzip(buf, { // In a real app, instead of always compressing at a certain level, // you'll want to check if the file is already compressed. For fairness, // that's not done here. /* level: ALREADY_COMPRESSED.indexOf( file.name.slice(file.name.lastIndexOf('.') + 1).toLowerCase() ) == -1 ? 6 : 0 */ level: 6, // You can uncomment the below for a contest of pure algorithm speed. // In a real app, you'll probably not need to set the memory level // because fflate picks a reasonable level based on file size by default. // If fflate performs worse than UZIP, you're probably passing in // incompressible files; switching the level or the mem will fix it. /* mem: 4 */ // The following are optional, but fflate supports metadata if you want mtime: file.lastModified, filename: file.name }, function(err, data) { if (err) callback(err); else { filesLengths[file.name] = [data.length, file.size]; // If you want to download the file to check it for yourself: // download(data, 'myFile.gz'); // If everyone else has finished processing already... if (!--left) { // Then return. callback(prettySizes(filesLengths)); } } }); }); } for (var i = 0; i < files.length; ++i) { processFile(i); }`, uzip: `var left = files.length; var filesLengths = {}; var processFile = function(i) { var file = files[i]; fileToU8(file, function(buf) { // UZIP doesn't natively support GZIP, but I patched in support for it. // In other words, you're better off using fflate for GZIP. // Also, UZIP runs synchronously on the main thread. It relies on global // state, so you can't even run it in the background without causing bugs. // But just for the sake of a performance comparison, try it out. uzipWorker.gzip(buf, function(err, data) { if (err) callback(err); else { filesLengths[file.name] = [data.length, file.size]; if (!--left) callback(prettySizes(filesLengths)); } }); }); } for (var i = 0; i < files.length; ++i) { processFile(i); }`, pako: `var left = files.length; var filesLengths = {}; var processFile = function(i) { var file = files[i]; fileToU8(file, function(buf) { // Unlike UZIP, Pako natively supports GZIP, and it doesn't rely on global // state. However, it's still 46kB for this basic functionality as opposed // to fflate's 7kB, not to mention the fact that there's no easy way to use // it asynchronously. I had to add a worker proxy for this to work. pakoWorker.gzip(buf, function(err, data) { if (err) callback(err) else { filesLengths[file.name] = [data.length, file.size]; if (!--left) callback(prettySizes(filesLengths)); } }); }); } for (var i = 0; i < files.length; ++i) { processFile(i); }` }, 'ZIP archive creation': { fflate: `// fflate's ZIP API is asynchronous and parallelized (multithreaded) var left = files.length; var zipObj = {}; var ALREADY_COMPRESSED = [ 'zip', 'gz', 'png', 'jpg', 'jpeg', 'pdf', 'doc', 'docx', 'ppt', 'pptx', 'xls', 'xlsx', 'heic', 'heif', '7z', 'bz2', 'rar', 'gif', 'webp', 'webm', 'mp4', 'mov', 'mp3', 'aifc' ]; // Yet again, this is necessary for parallelization. var processFile = function(i) { var file = files[i]; var ext = file.name.slice(file.name.lastIndexOf('.') + 1).toLowerCase(); fileToU8(file, function(buf) { // With fflate, we can choose which files we want to compress zipObj[file.name] = [buf, { level: ALREADY_COMPRESSED.indexOf(ext) == -1 ? 6 : 0 }]; // If we didn't want to specify options: // zipObj[file.name] = buf; if (!--left) { fflate.zip(zipObj, { // If you want to control options for every file, you can do so here // They are merged with the per-file options (if they exist) // mem: 9 }, function(err, out) { if (err) callback(err); else { // You may want to try downloading to see that fflate actually works: // download(out, 'fflate-demo.zip'); callback('Length ' + out.length); } }); } }); } for (var i = 0; i < files.length; ++i) { processFile(i); }`, uzip: `var left = files.length; var processFile = function(i) { var file = files[i]; fileToU8(file, function(buf) { // With UZIP, you cannot control the compression level of a file // However, it skips compressing ZIP, JPEG, and PNG files out of the box. zipObj.add(file.name, buf); if (!--left) { zipObj.ondata = function(err, out) { if (err) callback(err); else callback('Length ' + out.length); } zipObj.end(); } }); } // Reminder that this is custom sugar var zipObj = uzipWorker.zip(); for (var i = 0; i < files.length; ++i) { processFile(i); }`, pako: `var left = files.length; // Internally, this uses JSZip. This library used to be unusuably slow but // has recently improved. Still, it's 2-3x slower than fflate as of v3.10.1, // offers a convoluted API, and is several times larger in bundle size while // providing no useful features unavailable in similar ZIP libraries. // If you need a performant ZIP library with a wider API than fflate, try // @zip.js/zip.js instead. You can even use it var zipObj = pakoWorker.zip(); var processFile = function(i) { var file = files[i]; fileToU8(file, function(buf) { // JSZip allows you to control per-file compression level. For this demo, // the list of non-compressed files is the same as for fflate. zipObj.add(file.name, buf); if (!--left) { zipObj.ondata = function(err, out) { if (err) callback(err); else callback('Length ' + out.length); } zipObj.end(); } }); } for (var i = 0; i < files.length; ++i) { processFile(i); }` } } if (canStream) { presets['Streaming GZIP compression'] = { fflate: `const { AsyncGzip } = fflate; // Theoretically, you could do this on every file, but I haven't done that here // for the sake of simplicity. const file = files[0]; const gzipStream = new AsyncGzip({ level: 6 }); // We can stream the file through GZIP to reduce memory usage const gzipped = file.stream().pipeThrough(toNativeStream(gzipStream)); let gzSize = 0; gzipped.pipeTo(new WritableStream({ write(chunk) { gzSize += chunk.length; }, close() { callback('Length ' + gzSize); } }));`, uzip: `// UZIP doesn't support streaming to any extent callback(new Error('unsupported'));`, pako: `// Hundreds of lines of code to make this run on a Worker... const file = files[0]; // In case this wasn't clear already, Pako doesn't actually support this, // you need to create a custom async stream. I suppose you could copy the // code used in this demo, which is on GitHub under the demo/ directory. const gzipStream = pakoWorker.createGzip(); const gzipped = file.stream().pipeThrough(toNativeStream(gzipStream)); let gzSize = 0; gzipped.pipeTo(new WritableStream({ write(chunk) { gzSize += chunk.length; }, close() { callback('Length ' + gzSize); } }));` }; } const availablePresets = Object.keys(presets); const CodeHighlight: FC<{ code: string; preset: string; onInput: (newCode: string) => void; }> = ({ code, preset, onInput }) => { const highlight = useMemo(() => ({ __html: Prism.highlight(code + '\n', Prism.languages.javascript, 'javascript') }), [code]); const pre = useRef(null); const ta = useRef(null); useEffect(() => { pre.current!.addEventListener('scroll', () => { ta.current!.scrollLeft = pre.current!.scrollLeft; ta.current!.style.left = pre.current!.scrollLeft + 'px'; }, { passive: true }); ta.current!.addEventListener('scroll', () => { pre.current!.scrollLeft = ta.current!.scrollLeft; }, { passive: true }); }, []); useEffect(() => { ta.current!.value = code; }, [preset]); return (
      
) }; const CodeBox: FC<{files: File[]; forwardRef: Ref}> = ({ files, forwardRef }) => { const [preset, setPreset] = useState('Basic GZIP compression'); const [{ fflate, uzip, pako }, setCodes] = useState(presets[preset]); const [ffl, setFFL] = useState(''); const [uz, setUZ] = useState(''); const [pk, setPK] = useState(''); useEffect(() => { if (!files) { setFFL(''); setUZ(''); setPK(''); } }, [files]); const onInput = (lib: 'fflate' | 'uzip' | 'pako', code: string) => { const codes: Preset = { fflate, uzip, pako }; codes[lib] = code; setCodes(codes); setPreset('Custom'); } const [hover, setHover] = useState(false); return (
fflate: onInput('fflate', t)} />
UZIP (shimmed): onInput('uzip', t)} />
Pako (shimmed): onInput('pako', t)} />
); } export default CodeBox;101arrowz-fflate-a661bab/demo/components/code-box/prism.css000066400000000000000000000035171520173263500236720ustar00rootroot00000000000000/* PrismJS 1.22.0 https://prismjs.com/download.html#themes=prism-tomorrow&languages=clike+javascript */ /** * prism.js tomorrow night eighties for JavaScript, CoffeeScript, CSS and HTML * Based on https://github.com/chriskempson/tomorrow-theme * @author Rose Pritchard */ code[class*="language-"], pre[class*="language-"] { color: #ccc; background: none; font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace; font-size: 1em; text-align: left; white-space: pre; word-spacing: normal; word-break: normal; word-wrap: normal; line-height: 1.5; -moz-tab-size: 4; -o-tab-size: 4; tab-size: 4; -webkit-hyphens: none; -moz-hyphens: none; -ms-hyphens: none; hyphens: none; } /* Code blocks */ pre[class*="language-"] { padding: 1em; margin: .5em 0; overflow: auto; } :not(pre) > code[class*="language-"], pre[class*="language-"] { background: #2d2d2d; } /* Inline code */ :not(pre) > code[class*="language-"] { padding: .1em; border-radius: .3em; white-space: normal; } .token.comment, .token.block-comment, .token.prolog, .token.doctype, .token.cdata { color: #999; } .token.punctuation { color: #ccc; } .token.tag, .token.attr-name, .token.namespace, .token.deleted { color: #e2777a; } .token.function-name { color: #6196cc; } .token.boolean, .token.number, .token.function { color: #f08d49; } .token.property, .token.class-name, .token.constant, .token.symbol { color: #f8c555; } .token.selector, .token.important, .token.atrule, .token.keyword, .token.builtin { color: #cc99cd; } .token.string, .token.char, .token.attr-value, .token.regex, .token.variable { color: #7ec699; } .token.operator, .token.entity, .token.url { color: #67cdcc; } .token.important, .token.bold { font-weight: bold; } .token.italic { font-style: italic; } .token.entity { cursor: help; } .token.inserted { color: green; } 101arrowz-fflate-a661bab/demo/components/code-box/prism.js000066400000000000000000000431661520173263500235220ustar00rootroot00000000000000/* PrismJS 1.22.0 https://prismjs.com/download.html#themes=prism-tomorrow&languages=clike+javascript */ var Prism = (function (u) { var c = /\blang(?:uage)?-([\w-]+)\b/i, n = 0, M = { manual: u.Prism && u.Prism.manual, disableWorkerMessageHandler: u.Prism && u.Prism.disableWorkerMessageHandler, util: { encode: function e(n) { return n instanceof W ? new W(n.type, e(n.content), n.alias) : Array.isArray(n) ? n.map(e) : n .replace(/&/g, "&") .replace(/= l.reach); k += y.value.length, y = y.next ) { var b = y.value; if (t.length > n.length) return; if (!(b instanceof W)) { var x = 1; if (h && y != t.tail.prev) { m.lastIndex = k; var w = m.exec(n); if (!w) break; var A = w.index + (f && w[1] ? w[1].length : 0), P = w.index + w[0].length, S = k; for (S += y.value.length; S <= A; ) (y = y.next), (S += y.value.length); if ( ((S -= y.value.length), (k = S), y.value instanceof W) ) continue; for ( var E = y; E !== t.tail && (S < P || "string" == typeof E.value); E = E.next ) x++, (S += E.value.length); x--, (b = n.slice(k, S)), (w.index -= k); } else { m.lastIndex = 0; var w = m.exec(b); } if (w) { f && (d = w[1] ? w[1].length : 0); var A = w.index + d, O = w[0].slice(d), P = A + O.length, L = b.slice(0, A), N = b.slice(P), j = k + b.length; l && j > l.reach && (l.reach = j); var C = y.prev; L && ((C = I(t, C, L)), (k += L.length)), z(t, C, x); var _ = new W(o, g ? M.tokenize(O, g) : O, v, O); (y = I(t, C, _)), N && I(t, y, N), 1 < x && e(n, t, r, y.prev, k, { cause: o + "," + u, reach: j, }); } } } } } })(e, a, n, a.head, 0), (function (e) { var n = [], t = e.head.next; for (; t !== e.tail; ) n.push(t.value), (t = t.next); return n; })(a) ); }, hooks: { all: {}, add: function (e, n) { var t = M.hooks.all; (t[e] = t[e] || []), t[e].push(n); }, run: function (e, n) { var t = M.hooks.all[e]; if (t && t.length) for (var r, a = 0; (r = t[a++]); ) r(n); }, }, Token: W, }; function W(e, n, t, r) { (this.type = e), (this.content = n), (this.alias = t), (this.length = 0 | (r || "").length); } function i() { var e = { value: null, prev: null, next: null }, n = { value: null, prev: e, next: null }; (e.next = n), (this.head = e), (this.tail = n), (this.length = 0); } function I(e, n, t) { var r = n.next, a = { value: t, prev: n, next: r }; return (n.next = a), (r.prev = a), e.length++, a; } function z(e, n, t) { for (var r = n.next, a = 0; a < t && r !== e.tail; a++) r = r.next; ((n.next = r).prev = n), (e.length -= a); } if ( ((u.Prism = M), (W.stringify = function n(e, t) { if ("string" == typeof e) return e; if (Array.isArray(e)) { var r = ""; return ( e.forEach(function (e) { r += n(e, t); }), r ); } var a = { type: e.type, content: n(e.content, t), tag: "span", classes: ["token", e.type], attributes: {}, language: t, }, i = e.alias; i && (Array.isArray(i) ? Array.prototype.push.apply(a.classes, i) : a.classes.push(i)), M.hooks.run("wrap", a); var l = ""; for (var o in a.attributes) l += " " + o + '="' + (a.attributes[o] || "").replace(/"/g, """) + '"'; return ( "<" + a.tag + ' class="' + a.classes.join(" ") + '"' + l + ">" + a.content + "" ); }), !u.document) ) return ( u.addEventListener && (M.disableWorkerMessageHandler || u.addEventListener( "message", function (e) { var n = JSON.parse(e.data), t = n.language, r = n.code, a = n.immediateClose; u.postMessage(M.highlight(r, M.languages[t], t)), a && u.close(); }, !1 )), M ); var e = M.util.currentScript(); function t() { M.manual || M.highlightAll(); } if ( (e && ((M.filename = e.src), e.hasAttribute("data-manual") && (M.manual = !0)), !M.manual) ) { var r = document.readyState; "loading" === r || ("interactive" === r && e && e.defer) ? document.addEventListener("DOMContentLoaded", t) : window.requestAnimationFrame ? window.requestAnimationFrame(t) : window.setTimeout(t, 16); } return M; })(module.exports); Prism.languages.clike = { comment: [ { pattern: /(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/, lookbehind: !0 }, { pattern: /(^|[^\\:])\/\/.*/, lookbehind: !0, greedy: !0 }, ], string: { pattern: /(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/, greedy: !0, }, "class-name": { pattern: /(\b(?:class|interface|extends|implements|trait|instanceof|new)\s+|\bcatch\s+\()[\w.\\]+/i, lookbehind: !0, inside: { punctuation: /[.\\]/ }, }, keyword: /\b(?:if|else|while|do|for|return|in|instanceof|function|new|try|throw|catch|finally|null|break|continue)\b/, boolean: /\b(?:true|false)\b/, function: /\w+(?=\()/, number: /\b0x[\da-f]+\b|(?:\b\d+\.?\d*|\B\.\d+)(?:e[+-]?\d+)?/i, operator: /[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/, punctuation: /[{}[\];(),.:]/, }; (Prism.languages.javascript = Prism.languages.extend("clike", { "class-name": [ Prism.languages.clike["class-name"], { pattern: /(^|[^$\w\xA0-\uFFFF])[_$A-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\.(?:prototype|constructor))/, lookbehind: !0, }, ], keyword: [ { pattern: /((?:^|})\s*)(?:catch|finally)\b/, lookbehind: !0 }, { pattern: /(^|[^.]|\.\.\.\s*)\b(?:as|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|for|from|function|(?:get|set)(?=\s*[\[$\w\xA0-\uFFFF])|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/, lookbehind: !0, }, ], number: /\b(?:(?:0[xX](?:[\dA-Fa-f](?:_[\dA-Fa-f])?)+|0[bB](?:[01](?:_[01])?)+|0[oO](?:[0-7](?:_[0-7])?)+)n?|(?:\d(?:_\d)?)+n|NaN|Infinity)\b|(?:\b(?:\d(?:_\d)?)+\.?(?:\d(?:_\d)?)*|\B\.(?:\d(?:_\d)?)+)(?:[Ee][+-]?(?:\d(?:_\d)?)+)?/, function: /#?[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/, operator: /--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/, })), (Prism.languages.javascript[ "class-name" ][0].pattern = /(\b(?:class|interface|extends|implements|instanceof|new)\s+)[\w.\\]+/), Prism.languages.insertBefore("javascript", "keyword", { regex: { pattern: /((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)\/(?:\[(?:[^\]\\\r\n]|\\.)*]|\\.|[^/\\\[\r\n])+\/[gimyus]{0,6}(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/, lookbehind: !0, greedy: !0, inside: { "regex-source": { pattern: /^(\/)[\s\S]+(?=\/[a-z]*$)/, lookbehind: !0, alias: "language-regex", inside: Prism.languages.regex, }, "regex-flags": /[a-z]+$/, "regex-delimiter": /^\/|\/$/, }, }, "function-variable": { pattern: /#?[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*)\s*=>))/, alias: "function", }, parameter: [ { pattern: /(function(?:\s+[_$A-Za-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*)?\s*\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\))/, lookbehind: !0, inside: Prism.languages.javascript, }, { pattern: /[_$a-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*=>)/i, inside: Prism.languages.javascript, }, { pattern: /(\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\)\s*=>)/, lookbehind: !0, inside: Prism.languages.javascript, }, { pattern: /((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:[_$A-Za-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\)\s*\{)/, lookbehind: !0, inside: Prism.languages.javascript, }, ], constant: /\b[A-Z](?:[A-Z_]|\dx?)*\b/, }), Prism.languages.insertBefore("javascript", "string", { "template-string": { pattern: /`(?:\\[\s\S]|\${(?:[^{}]|{(?:[^{}]|{[^}]*})*})+}|(?!\${)[^\\`])*`/, greedy: !0, inside: { "template-punctuation": { pattern: /^`|`$/, alias: "string" }, interpolation: { pattern: /((?:^|[^\\])(?:\\{2})*)\${(?:[^{}]|{(?:[^{}]|{[^}]*})*})+}/, lookbehind: !0, inside: { "interpolation-punctuation": { pattern: /^\${|}$/, alias: "punctuation", }, rest: Prism.languages.javascript, }, }, string: /[\s\S]+/, }, }, }), Prism.languages.markup && Prism.languages.markup.tag.addInlined("script", "javascript"), (Prism.languages.js = Prism.languages.javascript); module.exports.Prism = Prism;101arrowz-fflate-a661bab/demo/components/code-box/sandbox.ts000066400000000000000000000106741520173263500240360ustar00rootroot00000000000000import * as fflate from '../../..'; import toNativeStream from './stream-adapter'; type Callback = (...args: unknown[]) => void; type WorkerProxy = Record; const concat = (chunks: Uint8Array[]) => { const out = new Uint8Array( chunks.reduce((a, v) => v.length + a, 0) ); let loc = 0; for (const chunk of chunks) { out.set(chunk, loc); loc += chunk.length; } return out; } const createWorkerProxy = (lib: string, keys: string[]): WorkerProxy => { const p: WorkerProxy = {}; for (const k of keys) { const base = function(cb: (...args: unknown[]) => void) { const w = new Worker(new URL('../../util/workers.ts', import.meta.url), { type: 'module' }); w.postMessage([lib, k]); w.onmessage = function(msg) { const args = msg.data; args.unshift(null); cb.apply(null, args); } w.onerror = err => cb(err); return w; } if (k != 'zip' && k != 'unzip') { p[k] = function(dat, cb) { const chks: unknown[] = []; const w = base((err, dat, final) => { if (err) (cb as Callback)(err); else { if (final) { if (!chks.length) (cb as Callback)(null, dat); else (cb as Callback)(null, concat(chks as Uint8Array[])); } else chks.push(dat); } }); w.postMessage([dat, true], [(dat as Uint8Array).buffer]); } p['create' + k.slice(0, 1).toUpperCase() + k.slice(1)] = function() { let trueCb = arguments[0]; const w = base((err, dat, final) => { trueCb(err, dat, final); }); const out = { ondata: trueCb, push(v: Uint8Array, f: boolean) { if (!out.ondata) throw 'no callback'; trueCb = out.ondata; w.postMessage([v, f], [v.buffer]); }, terminate() { w.terminate(); } } return out; } } else { p[k] = function() { let trueCb = arguments[0]; const w = base((err, dat) => { trueCb(err, dat); }); const out = { ondata: trueCb, add(name: string, buf: Uint8Array) { buf = new Uint8Array(buf); w.postMessage([name, buf], [buf.buffer]); }, end() { if (!out.ondata) throw 'no callback'; trueCb = out.ondata; w.postMessage(null); } } return out; } } } return p; } const keys = ['zip', 'unzip', 'deflate', 'inflate', 'gzip', 'gunzip', 'zlib', 'unzlib']; const uzipWorker = createWorkerProxy('uzip', keys); const pakoWorker = createWorkerProxy('pako', keys); const fileToU8 = (file: File, cb: (out: Uint8Array) => void) => { const fr = new FileReader(); fr.onloadend = () => { cb(new Uint8Array(fr.result as ArrayBuffer)); } fr.readAsArrayBuffer(file); }; const download = (file: BlobPart, name?: string) => { const url = URL.createObjectURL(new Blob([file])); const dl = document.createElement('a'); dl.download = name || ('fflate-demo-' + Date.now() + '.dat'); dl.href = url; dl.click(); URL.revokeObjectURL(url); } const bts = ['B', ' kB', ' MB', ' GB']; const hrbt = (bt: number) => { let i = 0; for (; bt > 1023; ++i) bt /= 1024; return bt.toFixed((i != 0) as unknown as number) + bts[i]; } const prettySizes = (files: Record) => { let out = '\n\n'; let tot = 0; let totc = 0; let cnt = 0; for (const k in files) { ++cnt; out += '' + k + ' compressed from ' + hrbt(files[k][1]) + ' to ' + hrbt(files[k][0]) + '\n'; totc += files[k][0]; tot += files[k][1]; } return out + (cnt > 1 ? '\n\nIn total, all files originally ' + hrbt(tot) + ', compressed to ' + hrbt(totc) + '' : ''); } const exec = (code: string, files: File[], callback: Callback) => { const scope = { fflate, uzipWorker, pakoWorker, toNativeStream, callback, fileToU8, files, download, prettySizes }; try { new Function('"use strict";' + Object.keys(scope).map(k => 'var ' + k + ' = this["' + k + '"];').join('') + code).call(scope); } catch(e) { callback(e); } } export default exec;101arrowz-fflate-a661bab/demo/components/code-box/stream-adapter.ts000066400000000000000000000032101520173263500252750ustar00rootroot00000000000000import { AsyncDeflate } from '../../..'; export default (stream: AsyncDeflate, highWaterMark = 65536) => { // whether backpressure was observed on readable stream let backpressure = false; let resolveBackpressure: () => void = () => {}; // use WHATWG buffering primarily, fflate buffering only to help keep worker message channel fed const writable = new WritableStream({ async write(dat: Uint8Array) { stream.push(dat); const blockers: Promise[] = []; if (stream.queuedSize >= 32768) { blockers.push(new Promise(resolve => { stream.ondrain = () => { if (stream.queuedSize < 32768) resolve(); } })); } if (backpressure) { blockers.push(new Promise(resolve => { resolveBackpressure = resolve; })); } await Promise.all(blockers); }, close() { stream.push(new Uint8Array(0), true); } }, { highWaterMark, size: chunk => chunk.length }); const readable = new ReadableStream({ start(controller: ReadableStreamDefaultController) { stream.ondata = (err, chunk, final) => { if (err) writable.abort(err.message); controller.enqueue(chunk); if (controller.desiredSize != null && controller.desiredSize <= 0) { backpressure = true; } else { backpressure = false; resolveBackpressure(); } if (final) controller.close(); } }, pull() { backpressure = false; resolveBackpressure(); } }, { highWaterMark, size: chunk => chunk.length }); return { readable, writable }; }101arrowz-fflate-a661bab/demo/components/file-picker/000077500000000000000000000000001520173263500225125ustar00rootroot00000000000000101arrowz-fflate-a661bab/demo/components/file-picker/index.tsx000066400000000000000000000145061520173263500243670ustar00rootroot00000000000000import React, { CSSProperties, FC, HTMLAttributes, InputHTMLAttributes, useEffect, useRef, useState } from 'react'; const supportsInputDirs = 'webkitdirectory' in HTMLInputElement.prototype; const supportsRelativePath = 'webkitRelativePath' in File.prototype; const supportsDirs = typeof DataTransferItem != 'undefined' && 'webkitGetAsEntry' in DataTransferItem.prototype; const readRecurse = (dir: FileSystemDirectoryEntry, onComplete: (files: File[]) => void, onError: (err: Error) => void) => { let files: File[] = []; let total = 0; let errored = false; let reachedEnd = false; const onErr = (err: Error) => { if (!errored) { errored = true; onError(err); } }; const onDone = (f: File[]) => { files = files.concat(f); if (!--total && reachedEnd) onComplete(files); }; const reader = dir.createReader(); const onRead = (entries: FileSystemEntry[]) => { if (!entries.length && !errored) { if (!total) onComplete(files); else reachedEnd = true; } else reader.readEntries(onRead, onError); for (const entry of entries) { ++total; if (entry.isFile) (entry as FileSystemFileEntry).file(f => onDone([ new File([f], entry.fullPath.slice(1), f) ]), onErr); else readRecurse(entry as FileSystemDirectoryEntry, onDone, onErr); } }; reader.readEntries(onRead, onError); } const FilePicker: FC<{ onFiles(files: File[] | null): void; onDrag(on: boolean): void; onError(err: string | Error): void; allowDirs: boolean; } & Omit, 'onError'> > = ({ onFiles, onDrag, onError, style, allowDirs, children, ...props }) => { const inputRef = useRef(null); const dirInputRef = useRef(null); const dragRef = useRef(0); const [inputHover, setInputHover] = useState(false); const [dirInputHover, setDirInputHover] = useState(false); const [isHovering, setIsHovering] = useState(false); useEffect(() => { // only init'd when support dirs if (dirInputRef.current) { dirInputRef.current.setAttribute('webkitdirectory', ''); } }, []); const rootProps: HTMLAttributes = { onDrop(ev) { ev.preventDefault(); const tf = ev.dataTransfer; if (!tf.files.length) onError('Please drop some files in'); else { onFiles(null); if (supportsDirs && allowDirs) { let outFiles: File[] = []; let lft = tf.items.length; let errored = false; const onErr = (err: Error) => { if (!errored) { errored = true; onError(err); } } const onDone = (f: File[]) => { outFiles = outFiles.concat(f); if (!--lft && !errored) onFiles(outFiles); }; for (let i = 0; i < tf.items.length; ++i) { const entry = tf.items[i].webkitGetAsEntry()!; if (entry.isFile) (entry as FileSystemFileEntry).file(f => onDone([f]), onErr); else readRecurse(entry as FileSystemDirectoryEntry, onDone, onErr); } } else onFiles(Array.prototype.slice.call(tf.files)); } setIsHovering(false); }, onDragEnter() { ++dragRef.current; onDrag(true); setIsHovering(true); }, onDragOver(ev) { ev.preventDefault(); }, onDragLeave() { if (!--dragRef.current) { onDrag(false); setIsHovering(false); } }, style: { display: 'flex', flexDirection: 'column', alignItems: 'center', ...style } }; const inputProps: InputHTMLAttributes = { onInput(ev) { const t = ev.currentTarget, files = t.files!; if (supportsRelativePath) { const outFiles: File[] = Array(files.length); for (let i = 0; i < files.length; ++i) { const file = files[i]; outFiles[i] = new File([file], file.webkitRelativePath || file.name, file); } onFiles(outFiles); } else onFiles(Array.prototype.slice.call(files)); t.value = ''; }, style: { display: 'none' }, multiple: true }; const buttonStyles: CSSProperties = { cursor: 'default', minWidth: '8vw', height: '6vh', margin: '1vmin', padding: '1vmin', display: 'flex', alignItems: 'center', justifyContent: 'center', boxShadow: '0 1px 2px 1px rgba(0, 0, 0, 0.2), 0 2px 4px 2px rgba(0, 0, 0, 0.15), 0 4px 8px 4px rgba(0, 0, 0, 0.12)', border: '1px solid black', borderRadius: '6px', transition: 'background-color 300ms ease-in-out', WebkitTouchCallout: 'none', WebkitUserSelect: 'none', msUserSelect: 'none', MozUserSelect: 'none', userSelect: 'none' }; return (
{children}
Drag and Drop
OR
inputRef.current!.click()} onMouseOver={() => setInputHover(true)} onMouseOut={() => setInputHover(false)} style={{ ...buttonStyles, backgroundColor: inputHover ? 'rgba(0, 0, 0, 0.14)' : 'white' }}>Select Files
{supportsInputDirs && allowDirs && <>
dirInputRef.current!.click()} onMouseOver={() => setDirInputHover(true)} onMouseOut={() => setDirInputHover(false)} style={{ ...buttonStyles, marginLeft: '8vmin', backgroundColor: dirInputHover ? 'rgba(0, 0, 0, 0.14)' : 'white' }}>Select Folders
}
); } export default FilePicker;101arrowz-fflate-a661bab/demo/favicon.ico000066400000000000000000000124661520173263500202650ustar00rootroot00000000000000 h&  ¨Ž(  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿŸ<Ÿ<Ÿ<Ÿ<Ÿ<Ÿ<Ÿ<Ÿ<ƒÇŒÿÿÿÿ( @ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÃÿðÃÿðÃÿðÃÿðÃÿðÃÿðÃÿðÃÿðÃÿðÃÿðÃÿðÃÿð 0 0 0 0ÃÿðÃÿðÃÿðÃÿðÀ0À0ð?Àðð?Àðÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ101arrowz-fflate-a661bab/demo/global.d.ts000066400000000000000000000000271520173263500201640ustar00rootroot00000000000000declare module "*.css";101arrowz-fflate-a661bab/demo/index.css000066400000000000000000000002371520173263500177560ustar00rootroot00000000000000html, body { margin: 0; padding: 0; font-family: Arial, Helvetica, sans-serif; overflow-x: hidden; } #app { min-height: 100vh; overflow: hidden; }101arrowz-fflate-a661bab/demo/index.html000066400000000000000000000020751520173263500201340ustar00rootroot00000000000000 fflate demo
101arrowz-fflate-a661bab/demo/index.tsx000066400000000000000000000005261520173263500200050ustar00rootroot00000000000000import React from 'react'; import App from './App'; import { createRoot } from 'react-dom/client'; if (process.env.NODE_ENV == 'production') { if ('serviceWorker' in navigator) { navigator.serviceWorker.register(new URL('sw.ts', import.meta.url), { type: 'module' }); } } createRoot(document.getElementById('app')!).render();101arrowz-fflate-a661bab/demo/package.json000066400000000000000000000000331520173263500204150ustar00rootroot00000000000000{ "sideEffects": true }101arrowz-fflate-a661bab/demo/sw.ts000066400000000000000000000017141520173263500171370ustar00rootroot00000000000000/// import { manifest, version } from '@parcel/service-worker' const precacheVersion = version const precacheFiles = manifest.filter(u => !/\.(ico)$/.test(u)); const sw = self as unknown as ServiceWorkerGlobalScope const ch = () => caches.open(precacheVersion); sw.addEventListener('install', ev => { // Do not finish installing until every file in the app has been cached ev.waitUntil( ch().then( cache => cache.addAll(precacheFiles) ) ); }); sw.addEventListener('activate', ev => { ev.waitUntil( caches.keys().then(keys => Promise.all( keys.filter(k => k !== precacheVersion).map( k => caches.delete(k) ) )).then(() => sw.clients.claim()) ); }); sw.addEventListener('fetch', ev => { ev.respondWith( caches.match(ev.request).then(resp => resp || ch().then(c => fetch(ev.request).then(res => c.put(ev.request, res.clone()).then( () => res )) )) ) });101arrowz-fflate-a661bab/demo/util/000077500000000000000000000000001520173263500171105ustar00rootroot00000000000000101arrowz-fflate-a661bab/demo/util/workers.ts000066400000000000000000000115651520173263500211640ustar00rootroot00000000000000import pako from 'pako'; import * as UZIP from 'uzip'; import JSZip from 'jszip'; const wk = self as unknown as { postMessage(b: unknown, bufs: ArrayBuffer[]): void; }; const dcmp = ['inflate', 'gunzip', 'unzlib']; const concat = (chunks: Uint8Array[]) => { const out = new Uint8Array( chunks.reduce((a, v) => v.length + a, 0) ); let loc = 0; for (const chunk of chunks) { out.set(chunk, loc); loc += chunk.length; } return out; } // CRC32 table const crct = new Uint32Array(256); for (let i = 0; i < 256; ++i) { let c = i, k = 9; while (--k) c = ((c & 1) && 0xEDB88320) ^ (c >>> 1); crct[i] = c; } // CRC32 const crc = (d: Uint8Array) => { let c = 0xFFFFFFFF; for (let i = 0; i < d.length; ++i) c = crct[(c & 255) ^ d[i]] ^ (c >>> 8); return c ^ 0xFFFFFFFF; } const uzGzip = (d: Uint8Array) => { const raw = UZIP.deflateRaw(d); const head = new Uint8Array([31, 139, 8, 0, 0, 0, 0, 0, 0, 0]); const c = crc(d); const l = raw.length; const tail = new Uint8Array([ c & 255, (c >>> 8) & 255, (c >>> 16) & 255, (c >>> 32) & 255, l & 255, (l >>> 8) & 255, (l >>> 16) & 255, (l >>> 32) & 255, ]); return concat([head, raw, tail]); } const ALREADY_COMPRESSED = [ 'zip', 'gz', 'png', 'jpg', 'jpeg', 'pdf', 'doc', 'docx', 'ppt', 'pptx', 'xls', 'xlsx', 'heic', 'heif', '7z', 'bz2', 'rar', 'gif', 'webp', 'webm', 'mp4', 'mov', 'mp3', 'aifc' ] onmessage = (ev: MessageEvent<[string, string]>) => { const [lib, type] = ev.data; if (lib == 'pako') { if (type == 'zip') { const zip = new JSZip(); onmessage = (ev: MessageEvent) => { if (ev.data) { const ext = ev.data[0].slice(ev.data[0].lastIndexOf('.') + 1).toLowerCase() zip.file(ev.data[0], ev.data[1], { compression: ALREADY_COMPRESSED.includes(ext) ? 'STORE' : 'DEFLATE' }); } else zip.generateAsync({ type: 'uint8array', compressionOptions: { level: 6 } }).then(buf => { wk.postMessage([buf, true], [buf.buffer as ArrayBuffer]); }) }; } else if (type == 'unzip') { onmessage = (ev: MessageEvent) => { JSZip.loadAsync(ev.data).then(zip => { const out: Record = {}; const bufs: Promise[] = []; for (const k in zip.files) { const file = zip.files[k]; bufs.push(file.async('uint8array').then(v => { out[file.name] = v; return v.buffer as ArrayBuffer; })); } Promise.all(bufs).then(res => { wk.postMessage([out, true], res); }); }) } } else { const strm = dcmp.indexOf(type) == -1 ? new pako.Deflate(type == 'gzip' ? { gzip: true } : { raw: type == 'inflate' } ) : new pako.Inflate({ raw: type == 'deflate' }); let chk: Uint8Array; strm.onData = (chunk: Uint8Array) => { if (chk) wk.postMessage([chk, false], [chk.buffer as ArrayBuffer]); chk = chunk; }; onmessage = (ev: MessageEvent<[Uint8Array, boolean]>) => { strm.push(ev.data[0], ev.data[1]); if (ev.data[1]) wk.postMessage([chk, true], [chk.buffer as ArrayBuffer]); }; } } else if (lib == 'uzip') { if (type == 'zip') { const zip: Record = {}; onmessage = (ev: MessageEvent) => { if (ev.data) { zip[ev.data[0]] = ev.data[1]; } else { const buf = UZIP.encode(zip); wk.postMessage([new Uint8Array(buf), true], [buf]); } }; } else if (type == 'unzip') { onmessage = (ev: MessageEvent) => { const bufs = UZIP.parse(ev.data.buffer as ArrayBuffer) as Record; const ret: Record> = {}; const outBufs: ArrayBuffer[] = []; for (const k in bufs) { outBufs.push(bufs[k]); ret[k] = new Uint8Array(bufs[k]); } wk.postMessage([ret, true], outBufs); } } else { const chunks: Uint8Array[] = []; onmessage = (ev: MessageEvent<[Uint8Array, boolean]>) => { chunks.push(ev.data[0]); if (ev.data[1]) { const out = concat(chunks); const buf = type == 'inflate' ? UZIP.inflateRaw(out) : type == 'deflate' ? UZIP.deflateRaw(out) : type == 'zlib' ? UZIP.deflate(out) : type == 'unzlib' ? UZIP.inflate(out) : type == 'gzip' ? uzGzip(out) // we can pray that there's no special header : UZIP.inflateRaw(out.subarray(10, -8)); wk.postMessage([buf, true], [buf.buffer as ArrayBuffer]); } } } } }101arrowz-fflate-a661bab/docs/000077500000000000000000000000001520173263500161375ustar00rootroot00000000000000101arrowz-fflate-a661bab/docs/README.md000066400000000000000000000101371520173263500174200ustar00rootroot00000000000000**fflate** *** # fflate ## Classes - [AsyncDecompress](classes/AsyncDecompress.md) - [AsyncDeflate](classes/AsyncDeflate.md) - [AsyncGunzip](classes/AsyncGunzip.md) - [AsyncGzip](classes/AsyncGzip.md) - [AsyncInflate](classes/AsyncInflate.md) - [AsyncUnzipInflate](classes/AsyncUnzipInflate.md) - [AsyncUnzlib](classes/AsyncUnzlib.md) - [AsyncZipDeflate](classes/AsyncZipDeflate.md) - [AsyncZlib](classes/AsyncZlib.md) - [DecodeUTF8](classes/DecodeUTF8.md) - [Decompress](classes/Decompress.md) - [Deflate](classes/Deflate.md) - [EncodeUTF8](classes/EncodeUTF8.md) - [Gunzip](classes/Gunzip.md) - [Gzip](classes/Gzip.md) - [Inflate](classes/Inflate.md) - [Unzip](classes/Unzip.md) - [UnzipInflate](classes/UnzipInflate.md) - [UnzipPassThrough](classes/UnzipPassThrough.md) - [Unzlib](classes/Unzlib.md) - [Zip](classes/Zip.md) - [ZipDeflate](classes/ZipDeflate.md) - [ZipPassThrough](classes/ZipPassThrough.md) - [Zlib](classes/Zlib.md) ## Interfaces - [AsyncDeflateOptions](interfaces/AsyncDeflateOptions.md) - [AsyncGunzipOptions](interfaces/AsyncGunzipOptions.md) - [AsyncGzipOptions](interfaces/AsyncGzipOptions.md) - [AsyncInflateOptions](interfaces/AsyncInflateOptions.md) - [AsyncTerminable](interfaces/AsyncTerminable.md) - [AsyncUnzipOptions](interfaces/AsyncUnzipOptions.md) - [AsyncUnzlibOptions](interfaces/AsyncUnzlibOptions.md) - [AsyncZipOptions](interfaces/AsyncZipOptions.md) - [AsyncZippable](interfaces/AsyncZippable.md) - [AsyncZlibOptions](interfaces/AsyncZlibOptions.md) - [DeflateOptions](interfaces/DeflateOptions.md) - [FlateError](interfaces/FlateError.md) - [GunzipOptions](interfaces/GunzipOptions.md) - [GunzipStreamOptions](interfaces/GunzipStreamOptions.md) - [GzipOptions](interfaces/GzipOptions.md) - [InflateOptions](interfaces/InflateOptions.md) - [InflateStreamOptions](interfaces/InflateStreamOptions.md) - [UnzipDecoder](interfaces/UnzipDecoder.md) - [UnzipDecoderConstructor](interfaces/UnzipDecoderConstructor.md) - [UnzipFile](interfaces/UnzipFile.md) - [UnzipFileInfo](interfaces/UnzipFileInfo.md) - [UnzipOptions](interfaces/UnzipOptions.md) - [Unzipped](interfaces/Unzipped.md) - [UnzlibOptions](interfaces/UnzlibOptions.md) - [UnzlibStreamOptions](interfaces/UnzlibStreamOptions.md) - [ZipAttributes](interfaces/ZipAttributes.md) - [ZipInputFile](interfaces/ZipInputFile.md) - [ZipOptions](interfaces/ZipOptions.md) - [Zippable](interfaces/Zippable.md) - [ZlibOptions](interfaces/ZlibOptions.md) ## Type Aliases - [AsyncFlateDrainHandler](type-aliases/AsyncFlateDrainHandler.md) - [AsyncFlateStreamHandler](type-aliases/AsyncFlateStreamHandler.md) - [AsyncZippableFile](type-aliases/AsyncZippableFile.md) - [FlateCallback](type-aliases/FlateCallback.md) - [FlateStreamHandler](type-aliases/FlateStreamHandler.md) - [GunzipMemberHandler](type-aliases/GunzipMemberHandler.md) - [StringStreamHandler](type-aliases/StringStreamHandler.md) - [UnzipCallback](type-aliases/UnzipCallback.md) - [UnzipFileFilter](type-aliases/UnzipFileFilter.md) - [UnzipFileHandler](type-aliases/UnzipFileHandler.md) - [ZippableFile](type-aliases/ZippableFile.md) ## Variables - [FlateErrorCode](variables/FlateErrorCode.md) ## Functions - [decompress](functions/decompress.md) - [decompressSync](functions/decompressSync.md) - [deflate](functions/deflate.md) - [deflateSync](functions/deflateSync.md) - [gunzip](functions/gunzip.md) - [gunzipSync](functions/gunzipSync.md) - [gzip](functions/gzip.md) - [gzipSync](functions/gzipSync.md) - [inflate](functions/inflate.md) - [inflateSync](functions/inflateSync.md) - [strFromU8](functions/strFromU8.md) - [strToU8](functions/strToU8.md) - [unzip](functions/unzip.md) - [unzipSync](functions/unzipSync.md) - [unzlib](functions/unzlib.md) - [unzlibSync](functions/unzlibSync.md) - [zip](functions/zip.md) - [zipSync](functions/zipSync.md) - [zlib](functions/zlib.md) - [zlibSync](functions/zlibSync.md) ## References ### AsyncCompress Renames and re-exports [AsyncGzip](classes/AsyncGzip.md) *** ### compress Renames and re-exports [gzip](functions/gzip.md) *** ### Compress Renames and re-exports [Gzip](classes/Gzip.md) *** ### compressSync Renames and re-exports [gzipSync](functions/gzipSync.md) 101arrowz-fflate-a661bab/docs/classes/000077500000000000000000000000001520173263500175745ustar00rootroot00000000000000101arrowz-fflate-a661bab/docs/classes/AsyncDecompress.md000066400000000000000000000034171520173263500232250ustar00rootroot00000000000000[**fflate**](../README.md) *** # Class: AsyncDecompress Asynchronous streaming GZIP, Zlib, or raw DEFLATE decompression ## Constructors ### Constructor > **new AsyncDecompress**(`opts`: [`InflateStreamOptions`](../interfaces/InflateStreamOptions.md), `cb?`: [`AsyncFlateStreamHandler`](../type-aliases/AsyncFlateStreamHandler.md)): `AsyncDecompress` Creates an asynchronous decompression stream #### Parameters ##### opts [`InflateStreamOptions`](../interfaces/InflateStreamOptions.md) The decompression options ##### cb? [`AsyncFlateStreamHandler`](../type-aliases/AsyncFlateStreamHandler.md) The callback to call whenever data is decompressed #### Returns `AsyncDecompress` ### Constructor > **new AsyncDecompress**(`cb?`: [`AsyncFlateStreamHandler`](../type-aliases/AsyncFlateStreamHandler.md)): `AsyncDecompress` Creates an asynchronous decompression stream #### Parameters ##### cb? [`AsyncFlateStreamHandler`](../type-aliases/AsyncFlateStreamHandler.md) The callback to call whenever data is decompressed #### Returns `AsyncDecompress` ## Properties ### ondata > **ondata**: [`AsyncFlateStreamHandler`](../type-aliases/AsyncFlateStreamHandler.md) The handler to call whenever data is available *** ### ondrain? > `optional` **ondrain?**: [`AsyncFlateDrainHandler`](../type-aliases/AsyncFlateDrainHandler.md) The handler to call whenever buffered source data is processed (i.e. `queuedSize` updates) *** ### queuedSize > **queuedSize**: `number` The number of compressed bytes buffered in the stream ## Methods ### push() > **push**(`chunk`: `Uint8Array`, `final?`: `boolean`): `void` Pushes a chunk to be decompressed #### Parameters ##### chunk `Uint8Array` The chunk to push ##### final? `boolean` Whether this is the last chunk #### Returns `void` 101arrowz-fflate-a661bab/docs/classes/AsyncDeflate.md000066400000000000000000000045371520173263500224710ustar00rootroot00000000000000[**fflate**](../README.md) *** # Class: AsyncDeflate Asynchronous streaming DEFLATE compression ## Constructors ### Constructor > **new AsyncDeflate**(`opts`: [`DeflateOptions`](../interfaces/DeflateOptions.md), `cb?`: [`AsyncFlateStreamHandler`](../type-aliases/AsyncFlateStreamHandler.md)): `AsyncDeflate` Creates an asynchronous DEFLATE stream #### Parameters ##### opts [`DeflateOptions`](../interfaces/DeflateOptions.md) The compression options ##### cb? [`AsyncFlateStreamHandler`](../type-aliases/AsyncFlateStreamHandler.md) The callback to call whenever data is deflated #### Returns `AsyncDeflate` ### Constructor > **new AsyncDeflate**(`cb?`: [`AsyncFlateStreamHandler`](../type-aliases/AsyncFlateStreamHandler.md)): `AsyncDeflate` Creates an asynchronous DEFLATE stream #### Parameters ##### cb? [`AsyncFlateStreamHandler`](../type-aliases/AsyncFlateStreamHandler.md) The callback to call whenever data is deflated #### Returns `AsyncDeflate` ## Properties ### ondata > **ondata**: [`AsyncFlateStreamHandler`](../type-aliases/AsyncFlateStreamHandler.md) The handler to call whenever data is available *** ### ondrain? > `optional` **ondrain?**: [`AsyncFlateDrainHandler`](../type-aliases/AsyncFlateDrainHandler.md) The handler to call whenever buffered source data is processed (i.e. `queuedSize` updates) *** ### queuedSize > **queuedSize**: `number` The number of uncompressed bytes buffered in the stream *** ### terminate > **terminate**: [`AsyncTerminable`](../interfaces/AsyncTerminable.md) A method to terminate the stream's internal worker. Subsequent calls to push() will silently fail. ## Methods ### flush() > **flush**(`sync?`: `boolean`): `void` Flushes buffered uncompressed data. Useful to immediately retrieve the deflated output for small inputs. #### Parameters ##### sync? `boolean` Whether to flush to a byte boundary. A sync flush takes 4-5 extra bytes, but guarantees all pushed data is immediately decompressible. A separate DEFLATE stream may be concatenated with the current output after a sync flush. #### Returns `void` *** ### push() > **push**(`chunk`: `Uint8Array`, `final?`: `boolean`): `void` Pushes a chunk to be deflated #### Parameters ##### chunk `Uint8Array` The chunk to push ##### final? `boolean` Whether this is the last chunk #### Returns `void` 101arrowz-fflate-a661bab/docs/classes/AsyncGunzip.md000066400000000000000000000041011520173263500223640ustar00rootroot00000000000000[**fflate**](../README.md) *** # Class: AsyncGunzip Asynchronous streaming single or multi-member GZIP decompression ## Constructors ### Constructor > **new AsyncGunzip**(`opts`: [`GunzipStreamOptions`](../interfaces/GunzipStreamOptions.md), `cb?`: [`AsyncFlateStreamHandler`](../type-aliases/AsyncFlateStreamHandler.md)): `AsyncGunzip` Creates an asynchronous GUNZIP stream #### Parameters ##### opts [`GunzipStreamOptions`](../interfaces/GunzipStreamOptions.md) The decompression options ##### cb? [`AsyncFlateStreamHandler`](../type-aliases/AsyncFlateStreamHandler.md) The callback to call whenever data is inflated #### Returns `AsyncGunzip` ### Constructor > **new AsyncGunzip**(`cb?`: [`AsyncFlateStreamHandler`](../type-aliases/AsyncFlateStreamHandler.md)): `AsyncGunzip` Creates an asynchronous GUNZIP stream #### Parameters ##### cb? [`AsyncFlateStreamHandler`](../type-aliases/AsyncFlateStreamHandler.md) The callback to call whenever data is inflated #### Returns `AsyncGunzip` ## Properties ### ondata > **ondata**: [`AsyncFlateStreamHandler`](../type-aliases/AsyncFlateStreamHandler.md) The handler to call whenever data is available *** ### ondrain? > `optional` **ondrain?**: [`AsyncFlateDrainHandler`](../type-aliases/AsyncFlateDrainHandler.md) The handler to call whenever buffered source data is processed (i.e. `queuedSize` updates) *** ### onmember? > `optional` **onmember?**: [`GunzipMemberHandler`](../type-aliases/GunzipMemberHandler.md) The handler to call whenever a new GZIP member is found *** ### queuedSize > **queuedSize**: `number` The number of compressed bytes buffered in the stream *** ### terminate > **terminate**: [`AsyncTerminable`](../interfaces/AsyncTerminable.md) A method to terminate the stream's internal worker. Subsequent calls to push() will silently fail. ## Methods ### push() > **push**(`chunk`: `Uint8Array`, `final?`: `boolean`): `void` Pushes a chunk to be GUNZIPped #### Parameters ##### chunk `Uint8Array` The chunk to push ##### final? `boolean` Whether this is the last chunk #### Returns `void` 101arrowz-fflate-a661bab/docs/classes/AsyncGzip.md000066400000000000000000000043151520173263500220300ustar00rootroot00000000000000[**fflate**](../README.md) *** # Class: AsyncGzip Asynchronous streaming GZIP compression ## Constructors ### Constructor > **new AsyncGzip**(`opts`: [`GzipOptions`](../interfaces/GzipOptions.md), `cb?`: [`AsyncFlateStreamHandler`](../type-aliases/AsyncFlateStreamHandler.md)): `AsyncGzip` Creates an asynchronous GZIP stream #### Parameters ##### opts [`GzipOptions`](../interfaces/GzipOptions.md) The compression options ##### cb? [`AsyncFlateStreamHandler`](../type-aliases/AsyncFlateStreamHandler.md) The callback to call whenever data is deflated #### Returns `AsyncGzip` ### Constructor > **new AsyncGzip**(`cb?`: [`AsyncFlateStreamHandler`](../type-aliases/AsyncFlateStreamHandler.md)): `AsyncGzip` Creates an asynchronous GZIP stream #### Parameters ##### cb? [`AsyncFlateStreamHandler`](../type-aliases/AsyncFlateStreamHandler.md) The callback to call whenever data is deflated #### Returns `AsyncGzip` ## Properties ### ondata > **ondata**: [`AsyncFlateStreamHandler`](../type-aliases/AsyncFlateStreamHandler.md) The handler to call whenever data is available *** ### ondrain? > `optional` **ondrain?**: [`AsyncFlateDrainHandler`](../type-aliases/AsyncFlateDrainHandler.md) The handler to call whenever buffered source data is processed (i.e. `queuedSize` updates) *** ### queuedSize > **queuedSize**: `number` The number of uncompressed bytes buffered in the stream *** ### terminate > **terminate**: [`AsyncTerminable`](../interfaces/AsyncTerminable.md) A method to terminate the stream's internal worker. Subsequent calls to push() will silently fail. ## Methods ### flush() > **flush**(`sync?`: `boolean`): `void` Flushes buffered uncompressed data. Useful to immediately retrieve the GZIPped output for small inputs. #### Parameters ##### sync? `boolean` Whether to flush to a byte boundary. A sync flush takes 4-5 extra bytes, but guarantees all pushed data is immediately decompressible. #### Returns `void` *** ### push() > **push**(`chunk`: `Uint8Array`, `final?`: `boolean`): `void` Pushes a chunk to be GZIPped #### Parameters ##### chunk `Uint8Array` The chunk to push ##### final? `boolean` Whether this is the last chunk #### Returns `void` 101arrowz-fflate-a661bab/docs/classes/AsyncInflate.md000066400000000000000000000036531520173263500225050ustar00rootroot00000000000000[**fflate**](../README.md) *** # Class: AsyncInflate Asynchronous streaming DEFLATE decompression ## Constructors ### Constructor > **new AsyncInflate**(`opts`: [`InflateStreamOptions`](../interfaces/InflateStreamOptions.md), `cb?`: [`AsyncFlateStreamHandler`](../type-aliases/AsyncFlateStreamHandler.md)): `AsyncInflate` Creates an asynchronous DEFLATE decompression stream #### Parameters ##### opts [`InflateStreamOptions`](../interfaces/InflateStreamOptions.md) The decompression options ##### cb? [`AsyncFlateStreamHandler`](../type-aliases/AsyncFlateStreamHandler.md) The callback to call whenever data is inflated #### Returns `AsyncInflate` ### Constructor > **new AsyncInflate**(`cb?`: [`AsyncFlateStreamHandler`](../type-aliases/AsyncFlateStreamHandler.md)): `AsyncInflate` Creates an asynchronous DEFLATE decompression stream #### Parameters ##### cb? [`AsyncFlateStreamHandler`](../type-aliases/AsyncFlateStreamHandler.md) The callback to call whenever data is inflated #### Returns `AsyncInflate` ## Properties ### ondata > **ondata**: [`AsyncFlateStreamHandler`](../type-aliases/AsyncFlateStreamHandler.md) The handler to call whenever data is available *** ### ondrain? > `optional` **ondrain?**: [`AsyncFlateDrainHandler`](../type-aliases/AsyncFlateDrainHandler.md) The handler to call whenever buffered source data is processed (i.e. `queuedSize` updates) *** ### queuedSize > **queuedSize**: `number` The number of compressed bytes buffered in the stream *** ### terminate > **terminate**: [`AsyncTerminable`](../interfaces/AsyncTerminable.md) A method to terminate the stream's internal worker. Subsequent calls to push() will silently fail. ## Methods ### push() > **push**(`chunk`: `Uint8Array`, `final?`: `boolean`): `void` Pushes a chunk to be inflated #### Parameters ##### chunk `Uint8Array` The chunk to push ##### final? `boolean` Whether this is the last chunk #### Returns `void` 101arrowz-fflate-a661bab/docs/classes/AsyncUnzipInflate.md000066400000000000000000000030661520173263500235310ustar00rootroot00000000000000[**fflate**](../README.md) *** # Class: AsyncUnzipInflate Asynchronous streaming DEFLATE decompression for ZIP archives ## Implements - [`UnzipDecoder`](../interfaces/UnzipDecoder.md) ## Constructors ### Constructor > **new AsyncUnzipInflate**(`_`: `string`, `sz?`: `number`): `AsyncUnzipInflate` Creates a DEFLATE decompression that can be used in ZIP archives #### Parameters ##### \_ `string` ##### sz? `number` #### Returns `AsyncUnzipInflate` ## Properties ### ondata > **ondata**: [`AsyncFlateStreamHandler`](../type-aliases/AsyncFlateStreamHandler.md) The handler to call whenever data is available #### Implementation of [`UnzipDecoder`](../interfaces/UnzipDecoder.md).[`ondata`](../interfaces/UnzipDecoder.md#ondata) *** ### terminate > **terminate**: [`AsyncTerminable`](../interfaces/AsyncTerminable.md) A method to terminate any internal workers used by the stream. Subsequent calls to push() should silently fail. #### Implementation of [`UnzipDecoder`](../interfaces/UnzipDecoder.md).[`terminate`](../interfaces/UnzipDecoder.md#terminate) *** ### compression > `static` **compression**: `number` = `8` ## Methods ### push() > **push**(`chunk`: `Uint8Array`, `final`: `boolean`): `void` Pushes a chunk to be decompressed #### Parameters ##### chunk `Uint8Array` The data in this chunk. Do not consume (detach) this buffer. ##### final `boolean` Whether this is the last chunk in the data stream #### Returns `void` #### Implementation of [`UnzipDecoder`](../interfaces/UnzipDecoder.md).[`push`](../interfaces/UnzipDecoder.md#push) 101arrowz-fflate-a661bab/docs/classes/AsyncUnzlib.md000066400000000000000000000036451520173263500223670ustar00rootroot00000000000000[**fflate**](../README.md) *** # Class: AsyncUnzlib Asynchronous streaming Zlib decompression ## Constructors ### Constructor > **new AsyncUnzlib**(`opts`: [`UnzlibStreamOptions`](../interfaces/UnzlibStreamOptions.md), `cb?`: [`AsyncFlateStreamHandler`](../type-aliases/AsyncFlateStreamHandler.md)): `AsyncUnzlib` Creates an asynchronous Zlib decompression stream #### Parameters ##### opts [`UnzlibStreamOptions`](../interfaces/UnzlibStreamOptions.md) The decompression options ##### cb? [`AsyncFlateStreamHandler`](../type-aliases/AsyncFlateStreamHandler.md) The callback to call whenever data is inflated #### Returns `AsyncUnzlib` ### Constructor > **new AsyncUnzlib**(`cb?`: [`AsyncFlateStreamHandler`](../type-aliases/AsyncFlateStreamHandler.md)): `AsyncUnzlib` Creates an asynchronous Zlib decompression stream #### Parameters ##### cb? [`AsyncFlateStreamHandler`](../type-aliases/AsyncFlateStreamHandler.md) The callback to call whenever data is inflated #### Returns `AsyncUnzlib` ## Properties ### ondata > **ondata**: [`AsyncFlateStreamHandler`](../type-aliases/AsyncFlateStreamHandler.md) The handler to call whenever data is available *** ### ondrain? > `optional` **ondrain?**: [`AsyncFlateDrainHandler`](../type-aliases/AsyncFlateDrainHandler.md) The handler to call whenever buffered source data is processed (i.e. `queuedSize` updates) *** ### queuedSize > **queuedSize**: `number` The number of compressed bytes buffered in the stream *** ### terminate > **terminate**: [`AsyncTerminable`](../interfaces/AsyncTerminable.md) A method to terminate the stream's internal worker. Subsequent calls to push() will silently fail. ## Methods ### push() > **push**(`chunk`: `Uint8Array`, `final?`: `boolean`): `void` Pushes a chunk to be decompressed from Zlib #### Parameters ##### chunk `Uint8Array` The chunk to push ##### final? `boolean` Whether this is the last chunk #### Returns `void` 101arrowz-fflate-a661bab/docs/classes/AsyncZipDeflate.md000066400000000000000000000144341520173263500231510ustar00rootroot00000000000000[**fflate**](../README.md) *** # Class: AsyncZipDeflate Asynchronous streaming DEFLATE compression for ZIP archives ## Implements - [`ZipInputFile`](../interfaces/ZipInputFile.md) ## Constructors ### Constructor > **new AsyncZipDeflate**(`filename`: `string`, `opts?`: [`DeflateOptions`](../interfaces/DeflateOptions.md)): `AsyncZipDeflate` Creates an asynchronous DEFLATE stream that can be added to ZIP archives #### Parameters ##### filename `string` The filename to associate with this data stream ##### opts? [`DeflateOptions`](../interfaces/DeflateOptions.md) The compression options #### Returns `AsyncZipDeflate` ## Properties ### attrs? > `optional` **attrs?**: `number` The file's attributes. These are traditionally somewhat complicated and platform-dependent, so using them is scarcely necessary. However, here is a representation of what this is, bit by bit: `TTTTugtrwxrwxrwx0000000000ADVSHR` TTTT = file type (rarely useful) u = setuid, g = setgid, t = sticky rwx = user permissions, rwx = group permissions, rwx = other permissions 0000000000 = unused A = archive, D = directory, V = volume label, S = system file, H = hidden, R = read-only If you want to set the Unix permissions, for instance, just bit shift by 16, e.g. 0o644 << 16. Note that attributes usually only work in conjunction with the `os` setting: you must use `os` = 3 (Unix) if you want to set Unix permissions #### Implementation of [`ZipInputFile`](../interfaces/ZipInputFile.md).[`attrs`](../interfaces/ZipInputFile.md#attrs) *** ### comment? > `optional` **comment?**: `string` The comment to attach to the file. This field is defined by PKZIP's APPNOTE.txt, section 4.4.26. The comment must be at most 65,535 bytes long UTF-8 encoded. This field is not read by consumer software. #### Implementation of [`ZipInputFile`](../interfaces/ZipInputFile.md).[`comment`](../interfaces/ZipInputFile.md#comment) *** ### compression > **compression**: `number` The compression format for the data stream. This number is determined by the spec in PKZIP's APPNOTE.txt, section 4.4.5. For example, 0 = no compression, 8 = deflate, 14 = LZMA #### Implementation of [`ZipInputFile`](../interfaces/ZipInputFile.md).[`compression`](../interfaces/ZipInputFile.md#compression) *** ### crc > **crc**: `number` A CRC of the original file contents. This attribute may be invalid after the file is added to the ZIP archive; it must be correct only before the stream completes. If you don't want to have to generate this yourself, consider extending the ZipPassThrough class and overriding its process() method, or using one of ZipDeflate or AsyncZipDeflate. #### Implementation of [`ZipInputFile`](../interfaces/ZipInputFile.md).[`crc`](../interfaces/ZipInputFile.md#crc) *** ### extra? > `optional` **extra?**: `Record`\<`number`, `Uint8Array`\> Extra metadata to add to the file. This field is defined by PKZIP's APPNOTE.txt, section 4.4.28. At most 65,535 bytes may be used in each ID. The ID must be an integer between 0 and 65,535, inclusive. This field is incredibly rare and almost never needed except for compliance with proprietary standards and software. #### Implementation of [`ZipInputFile`](../interfaces/ZipInputFile.md).[`extra`](../interfaces/ZipInputFile.md#extra) *** ### filename > **filename**: `string` The filename to associate with the data provided to this stream. If you want a file in a subdirectory, use forward slashes as a separator (e.g. `directory/filename.ext`). This will still work on Windows. #### Implementation of [`ZipInputFile`](../interfaces/ZipInputFile.md).[`filename`](../interfaces/ZipInputFile.md#filename) *** ### flag > **flag**: `0` \| `1` \| `2` \| `3` Bits 1 and 2 of the general purpose bit flag, specified in PKZIP's APPNOTE.txt, section 4.4.4. Should be between 0 and 3. This is unlikely to be necessary. #### Implementation of [`ZipInputFile`](../interfaces/ZipInputFile.md).[`flag`](../interfaces/ZipInputFile.md#flag) *** ### mtime? > `optional` **mtime?**: `string` \| `number` \| `Date` When the file was last modified. Defaults to the current time. #### Implementation of [`ZipInputFile`](../interfaces/ZipInputFile.md).[`mtime`](../interfaces/ZipInputFile.md#mtime) *** ### ondata > **ondata**: [`AsyncFlateStreamHandler`](../type-aliases/AsyncFlateStreamHandler.md) The handler to be called when data is added. After passing this stream to the ZIP file object, this handler will always be defined. To call it: `stream.ondata(error, chunk, final)` error = any error that occurred (null if there was no error) chunk = a Uint8Array of the data that was added (null if there was an error) final = boolean, whether this is the final chunk in the stream #### Implementation of [`ZipInputFile`](../interfaces/ZipInputFile.md).[`ondata`](../interfaces/ZipInputFile.md#ondata) *** ### os? > `optional` **os?**: `number` The operating system of origin for this file. The value is defined by PKZIP's APPNOTE.txt, section 4.4.2.2. For example, 0 (the default) is MS/DOS, 3 is Unix, 19 is macOS. #### Implementation of [`ZipInputFile`](../interfaces/ZipInputFile.md).[`os`](../interfaces/ZipInputFile.md#os) *** ### size > **size**: `number` The size of the file in bytes. This attribute may be invalid after the file is added to the ZIP archive; it must be correct only before the stream completes. If you don't want to have to compute this yourself, consider extending the ZipPassThrough class and overriding its process() method, or using one of ZipDeflate or AsyncZipDeflate. #### Implementation of [`ZipInputFile`](../interfaces/ZipInputFile.md).[`size`](../interfaces/ZipInputFile.md#size) *** ### terminate > **terminate**: [`AsyncTerminable`](../interfaces/AsyncTerminable.md) A method called when the stream is no longer needed, for clean-up purposes. This will not always be called after the stream completes, so you may wish to call this.terminate() after the final chunk is processed if you have clean-up logic. #### Implementation of [`ZipInputFile`](../interfaces/ZipInputFile.md).[`terminate`](../interfaces/ZipInputFile.md#terminate) ## Methods ### push() > **push**(`chunk`: `Uint8Array`, `final?`: `boolean`): `void` Pushes a chunk to be deflated #### Parameters ##### chunk `Uint8Array` The chunk to push ##### final? `boolean` Whether this is the last chunk #### Returns `void` 101arrowz-fflate-a661bab/docs/classes/AsyncZlib.md000066400000000000000000000043161520173263500220200ustar00rootroot00000000000000[**fflate**](../README.md) *** # Class: AsyncZlib Asynchronous streaming Zlib compression ## Constructors ### Constructor > **new AsyncZlib**(`opts`: [`ZlibOptions`](../interfaces/ZlibOptions.md), `cb?`: [`AsyncFlateStreamHandler`](../type-aliases/AsyncFlateStreamHandler.md)): `AsyncZlib` Creates an asynchronous Zlib stream #### Parameters ##### opts [`ZlibOptions`](../interfaces/ZlibOptions.md) The compression options ##### cb? [`AsyncFlateStreamHandler`](../type-aliases/AsyncFlateStreamHandler.md) The callback to call whenever data is deflated #### Returns `AsyncZlib` ### Constructor > **new AsyncZlib**(`cb?`: [`AsyncFlateStreamHandler`](../type-aliases/AsyncFlateStreamHandler.md)): `AsyncZlib` Creates an asynchronous Zlib stream #### Parameters ##### cb? [`AsyncFlateStreamHandler`](../type-aliases/AsyncFlateStreamHandler.md) The callback to call whenever data is deflated #### Returns `AsyncZlib` ## Properties ### ondata > **ondata**: [`AsyncFlateStreamHandler`](../type-aliases/AsyncFlateStreamHandler.md) The handler to call whenever data is available *** ### ondrain? > `optional` **ondrain?**: [`AsyncFlateDrainHandler`](../type-aliases/AsyncFlateDrainHandler.md) The handler to call whenever buffered source data is processed (i.e. `queuedSize` updates) *** ### queuedSize > **queuedSize**: `number` The number of uncompressed bytes buffered in the stream *** ### terminate > **terminate**: [`AsyncTerminable`](../interfaces/AsyncTerminable.md) A method to terminate the stream's internal worker. Subsequent calls to push() will silently fail. ## Methods ### flush() > **flush**(`sync?`: `boolean`): `void` Flushes buffered uncompressed data. Useful to immediately retrieve the zlibbed output for small inputs. #### Parameters ##### sync? `boolean` Whether to flush to a byte boundary. A sync flush takes 4-5 extra bytes, but guarantees all pushed data is immediately decompressible. #### Returns `void` *** ### push() > **push**(`chunk`: `Uint8Array`, `final?`: `boolean`): `void` Pushes a chunk to be deflated #### Parameters ##### chunk `Uint8Array` The chunk to push ##### final? `boolean` Whether this is the last chunk #### Returns `void` 101arrowz-fflate-a661bab/docs/classes/DecodeUTF8.md000066400000000000000000000015261520173263500217540ustar00rootroot00000000000000[**fflate**](../README.md) *** # Class: DecodeUTF8 Streaming UTF-8 decoding ## Constructors ### Constructor > **new DecodeUTF8**(`cb?`: [`StringStreamHandler`](../type-aliases/StringStreamHandler.md)): `DecodeUTF8` Creates a UTF-8 decoding stream #### Parameters ##### cb? [`StringStreamHandler`](../type-aliases/StringStreamHandler.md) The callback to call whenever data is decoded #### Returns `DecodeUTF8` ## Properties ### ondata > **ondata**: [`StringStreamHandler`](../type-aliases/StringStreamHandler.md) The handler to call whenever data is available ## Methods ### push() > **push**(`chunk`: `Uint8Array`, `final?`: `boolean`): `void` Pushes a chunk to be decoded from UTF-8 binary #### Parameters ##### chunk `Uint8Array` The chunk to push ##### final? `boolean` Whether this is the last chunk #### Returns `void` 101arrowz-fflate-a661bab/docs/classes/Decompress.md000066400000000000000000000025301520173263500222220ustar00rootroot00000000000000[**fflate**](../README.md) *** # Class: Decompress Streaming GZIP, Zlib, or raw DEFLATE decompression ## Constructors ### Constructor > **new Decompress**(`opts`: [`InflateStreamOptions`](../interfaces/InflateStreamOptions.md), `cb?`: [`FlateStreamHandler`](../type-aliases/FlateStreamHandler.md)): `Decompress` Creates a decompression stream #### Parameters ##### opts [`InflateStreamOptions`](../interfaces/InflateStreamOptions.md) The decompression options ##### cb? [`FlateStreamHandler`](../type-aliases/FlateStreamHandler.md) The callback to call whenever data is decompressed #### Returns `Decompress` ### Constructor > **new Decompress**(`cb?`: [`FlateStreamHandler`](../type-aliases/FlateStreamHandler.md)): `Decompress` Creates a decompression stream #### Parameters ##### cb? [`FlateStreamHandler`](../type-aliases/FlateStreamHandler.md) The callback to call whenever data is decompressed #### Returns `Decompress` ## Properties ### ondata > **ondata**: [`FlateStreamHandler`](../type-aliases/FlateStreamHandler.md) The handler to call whenever data is available ## Methods ### push() > **push**(`chunk`: `Uint8Array`, `final?`: `boolean`): `void` Pushes a chunk to be decompressed #### Parameters ##### chunk `Uint8Array` The chunk to push ##### final? `boolean` Whether this is the last chunk #### Returns `void` 101arrowz-fflate-a661bab/docs/classes/Deflate.md000066400000000000000000000033461520173263500214700ustar00rootroot00000000000000[**fflate**](../README.md) *** # Class: Deflate Streaming DEFLATE compression ## Constructors ### Constructor > **new Deflate**(`opts`: [`DeflateOptions`](../interfaces/DeflateOptions.md), `cb?`: [`FlateStreamHandler`](../type-aliases/FlateStreamHandler.md)): `Deflate` Creates a DEFLATE stream #### Parameters ##### opts [`DeflateOptions`](../interfaces/DeflateOptions.md) The compression options ##### cb? [`FlateStreamHandler`](../type-aliases/FlateStreamHandler.md) The callback to call whenever data is deflated #### Returns `Deflate` ### Constructor > **new Deflate**(`cb?`: [`FlateStreamHandler`](../type-aliases/FlateStreamHandler.md)): `Deflate` Creates a DEFLATE stream #### Parameters ##### cb? [`FlateStreamHandler`](../type-aliases/FlateStreamHandler.md) The callback to call whenever data is deflated #### Returns `Deflate` ## Properties ### ondata > **ondata**: [`FlateStreamHandler`](../type-aliases/FlateStreamHandler.md) The handler to call whenever data is available ## Methods ### flush() > **flush**(`sync?`: `boolean`): `void` Flushes buffered uncompressed data. Useful to immediately retrieve the deflated output for small inputs. #### Parameters ##### sync? `boolean` Whether to flush to a byte boundary. A sync flush takes 4-5 extra bytes, but guarantees all pushed data is immediately decompressible. A separate DEFLATE stream may be concatenated with the current output after a sync flush. #### Returns `void` *** ### push() > **push**(`chunk`: `Uint8Array`, `final?`: `boolean`): `void` Pushes a chunk to be deflated #### Parameters ##### chunk `Uint8Array` The chunk to push ##### final? `boolean` Whether this is the last chunk #### Returns `void` 101arrowz-fflate-a661bab/docs/classes/EncodeUTF8.md000066400000000000000000000015051520173263500217630ustar00rootroot00000000000000[**fflate**](../README.md) *** # Class: EncodeUTF8 Streaming UTF-8 encoding ## Constructors ### Constructor > **new EncodeUTF8**(`cb?`: [`FlateStreamHandler`](../type-aliases/FlateStreamHandler.md)): `EncodeUTF8` Creates a UTF-8 decoding stream #### Parameters ##### cb? [`FlateStreamHandler`](../type-aliases/FlateStreamHandler.md) The callback to call whenever data is encoded #### Returns `EncodeUTF8` ## Properties ### ondata > **ondata**: [`FlateStreamHandler`](../type-aliases/FlateStreamHandler.md) The handler to call whenever data is available ## Methods ### push() > **push**(`chunk`: `string`, `final?`: `boolean`): `void` Pushes a chunk to be encoded to UTF-8 #### Parameters ##### chunk `string` The string data to push ##### final? `boolean` Whether this is the last chunk #### Returns `void` 101arrowz-fflate-a661bab/docs/classes/Gunzip.md000066400000000000000000000027121520173263500213740ustar00rootroot00000000000000[**fflate**](../README.md) *** # Class: Gunzip Streaming single or multi-member GZIP decompression ## Constructors ### Constructor > **new Gunzip**(`opts`: [`GunzipStreamOptions`](../interfaces/GunzipStreamOptions.md), `cb?`: [`FlateStreamHandler`](../type-aliases/FlateStreamHandler.md)): `Gunzip` Creates a GUNZIP stream #### Parameters ##### opts [`GunzipStreamOptions`](../interfaces/GunzipStreamOptions.md) The decompression options ##### cb? [`FlateStreamHandler`](../type-aliases/FlateStreamHandler.md) The callback to call whenever data is inflated #### Returns `Gunzip` ### Constructor > **new Gunzip**(`cb?`: [`FlateStreamHandler`](../type-aliases/FlateStreamHandler.md)): `Gunzip` Creates a GUNZIP stream #### Parameters ##### cb? [`FlateStreamHandler`](../type-aliases/FlateStreamHandler.md) The callback to call whenever data is inflated #### Returns `Gunzip` ## Properties ### ondata > **ondata**: [`FlateStreamHandler`](../type-aliases/FlateStreamHandler.md) The handler to call whenever data is available *** ### onmember? > `optional` **onmember?**: [`GunzipMemberHandler`](../type-aliases/GunzipMemberHandler.md) The handler to call whenever a new GZIP member is found ## Methods ### push() > **push**(`chunk`: `Uint8Array`, `final?`: `boolean`): `void` Pushes a chunk to be GUNZIPped #### Parameters ##### chunk `Uint8Array` The chunk to push ##### final? `boolean` Whether this is the last chunk #### Returns `void` 101arrowz-fflate-a661bab/docs/classes/Gzip.md000066400000000000000000000031241520173263500210270ustar00rootroot00000000000000[**fflate**](../README.md) *** # Class: Gzip Streaming GZIP compression ## Constructors ### Constructor > **new Gzip**(`opts`: [`GzipOptions`](../interfaces/GzipOptions.md), `cb?`: [`FlateStreamHandler`](../type-aliases/FlateStreamHandler.md)): `Gzip` Creates a GZIP stream #### Parameters ##### opts [`GzipOptions`](../interfaces/GzipOptions.md) The compression options ##### cb? [`FlateStreamHandler`](../type-aliases/FlateStreamHandler.md) The callback to call whenever data is deflated #### Returns `Gzip` ### Constructor > **new Gzip**(`cb?`: [`FlateStreamHandler`](../type-aliases/FlateStreamHandler.md)): `Gzip` Creates a GZIP stream #### Parameters ##### cb? [`FlateStreamHandler`](../type-aliases/FlateStreamHandler.md) The callback to call whenever data is deflated #### Returns `Gzip` ## Properties ### ondata > **ondata**: [`FlateStreamHandler`](../type-aliases/FlateStreamHandler.md) The handler to call whenever data is available ## Methods ### flush() > **flush**(`sync?`: `boolean`): `void` Flushes buffered uncompressed data. Useful to immediately retrieve the GZIPped output for small inputs. #### Parameters ##### sync? `boolean` Whether to flush to a byte boundary. A sync flush takes 4-5 extra bytes, but guarantees all pushed data is immediately decompressible. #### Returns `void` *** ### push() > **push**(`chunk`: `Uint8Array`, `final?`: `boolean`): `void` Pushes a chunk to be GZIPped #### Parameters ##### chunk `Uint8Array` The chunk to push ##### final? `boolean` Whether this is the last chunk #### Returns `void` 101arrowz-fflate-a661bab/docs/classes/Inflate.md000066400000000000000000000024651520173263500215070ustar00rootroot00000000000000[**fflate**](../README.md) *** # Class: Inflate Streaming DEFLATE decompression ## Constructors ### Constructor > **new Inflate**(`opts`: [`InflateStreamOptions`](../interfaces/InflateStreamOptions.md), `cb?`: [`FlateStreamHandler`](../type-aliases/FlateStreamHandler.md)): `Inflate` Creates a DEFLATE decompression stream #### Parameters ##### opts [`InflateStreamOptions`](../interfaces/InflateStreamOptions.md) The decompression options ##### cb? [`FlateStreamHandler`](../type-aliases/FlateStreamHandler.md) The callback to call whenever data is inflated #### Returns `Inflate` ### Constructor > **new Inflate**(`cb?`: [`FlateStreamHandler`](../type-aliases/FlateStreamHandler.md)): `Inflate` Creates a DEFLATE decompression stream #### Parameters ##### cb? [`FlateStreamHandler`](../type-aliases/FlateStreamHandler.md) The callback to call whenever data is inflated #### Returns `Inflate` ## Properties ### ondata > **ondata**: [`FlateStreamHandler`](../type-aliases/FlateStreamHandler.md) The handler to call whenever data is available ## Methods ### push() > **push**(`chunk`: `Uint8Array`, `final?`: `boolean`): `void` Pushes a chunk to be inflated #### Parameters ##### chunk `Uint8Array` The chunk to push ##### final? `boolean` Whether this is the final chunk #### Returns `void` 101arrowz-fflate-a661bab/docs/classes/Unzip.md000066400000000000000000000023771520173263500212340ustar00rootroot00000000000000[**fflate**](../README.md) *** # Class: Unzip A ZIP archive decompression stream that emits files as they are discovered ## Constructors ### Constructor > **new Unzip**(`cb?`: [`UnzipFileHandler`](../type-aliases/UnzipFileHandler.md)): `Unzip` Creates a ZIP decompression stream #### Parameters ##### cb? [`UnzipFileHandler`](../type-aliases/UnzipFileHandler.md) The callback to call whenever a file in the ZIP archive is found #### Returns `Unzip` ## Properties ### onfile > **onfile**: [`UnzipFileHandler`](../type-aliases/UnzipFileHandler.md) The handler to call whenever a file is discovered ## Methods ### push() > **push**(`chunk`: `Uint8Array`, `final?`: `boolean`): `void` Pushes a chunk to be unzipped #### Parameters ##### chunk `Uint8Array` The chunk to push ##### final? `boolean` Whether this is the last chunk #### Returns `void` *** ### register() > **register**(`decoder`: [`UnzipDecoderConstructor`](../interfaces/UnzipDecoderConstructor.md)): `void` Registers a decoder with the stream, allowing for files compressed with the compression type provided to be expanded correctly #### Parameters ##### decoder [`UnzipDecoderConstructor`](../interfaces/UnzipDecoderConstructor.md) The decoder constructor #### Returns `void` 101arrowz-fflate-a661bab/docs/classes/UnzipInflate.md000066400000000000000000000022401520173263500225240ustar00rootroot00000000000000[**fflate**](../README.md) *** # Class: UnzipInflate Streaming DEFLATE decompression for ZIP archives. Prefer AsyncZipInflate for better performance. ## Implements - [`UnzipDecoder`](../interfaces/UnzipDecoder.md) ## Constructors ### Constructor > **new UnzipInflate**(): `UnzipInflate` Creates a DEFLATE decompression that can be used in ZIP archives #### Returns `UnzipInflate` ## Properties ### ondata > **ondata**: [`AsyncFlateStreamHandler`](../type-aliases/AsyncFlateStreamHandler.md) The handler to call whenever data is available #### Implementation of [`UnzipDecoder`](../interfaces/UnzipDecoder.md).[`ondata`](../interfaces/UnzipDecoder.md#ondata) *** ### compression > `static` **compression**: `number` = `8` ## Methods ### push() > **push**(`chunk`: `Uint8Array`, `final`: `boolean`): `void` Pushes a chunk to be decompressed #### Parameters ##### chunk `Uint8Array` The data in this chunk. Do not consume (detach) this buffer. ##### final `boolean` Whether this is the last chunk in the data stream #### Returns `void` #### Implementation of [`UnzipDecoder`](../interfaces/UnzipDecoder.md).[`push`](../interfaces/UnzipDecoder.md#push) 101arrowz-fflate-a661bab/docs/classes/UnzipPassThrough.md000066400000000000000000000021031520173263500234070ustar00rootroot00000000000000[**fflate**](../README.md) *** # Class: UnzipPassThrough Streaming pass-through decompression for ZIP archives ## Implements - [`UnzipDecoder`](../interfaces/UnzipDecoder.md) ## Constructors ### Constructor > **new UnzipPassThrough**(): `UnzipPassThrough` #### Returns `UnzipPassThrough` ## Properties ### ondata > **ondata**: [`AsyncFlateStreamHandler`](../type-aliases/AsyncFlateStreamHandler.md) The handler to call whenever data is available #### Implementation of [`UnzipDecoder`](../interfaces/UnzipDecoder.md).[`ondata`](../interfaces/UnzipDecoder.md#ondata) *** ### compression > `static` **compression**: `number` = `0` ## Methods ### push() > **push**(`chunk`: `Uint8Array`, `final`: `boolean`): `void` Pushes a chunk to be decompressed #### Parameters ##### chunk `Uint8Array` The data in this chunk. Do not consume (detach) this buffer. ##### final `boolean` Whether this is the last chunk in the data stream #### Returns `void` #### Implementation of [`UnzipDecoder`](../interfaces/UnzipDecoder.md).[`push`](../interfaces/UnzipDecoder.md#push) 101arrowz-fflate-a661bab/docs/classes/Unzlib.md000066400000000000000000000024411520173263500213620ustar00rootroot00000000000000[**fflate**](../README.md) *** # Class: Unzlib Streaming Zlib decompression ## Constructors ### Constructor > **new Unzlib**(`opts`: [`UnzlibStreamOptions`](../interfaces/UnzlibStreamOptions.md), `cb?`: [`FlateStreamHandler`](../type-aliases/FlateStreamHandler.md)): `Unzlib` Creates a Zlib decompression stream #### Parameters ##### opts [`UnzlibStreamOptions`](../interfaces/UnzlibStreamOptions.md) The decompression options ##### cb? [`FlateStreamHandler`](../type-aliases/FlateStreamHandler.md) The callback to call whenever data is inflated #### Returns `Unzlib` ### Constructor > **new Unzlib**(`cb?`: [`FlateStreamHandler`](../type-aliases/FlateStreamHandler.md)): `Unzlib` Creates a Zlib decompression stream #### Parameters ##### cb? [`FlateStreamHandler`](../type-aliases/FlateStreamHandler.md) The callback to call whenever data is inflated #### Returns `Unzlib` ## Properties ### ondata > **ondata**: [`FlateStreamHandler`](../type-aliases/FlateStreamHandler.md) The handler to call whenever data is available ## Methods ### push() > **push**(`chunk`: `Uint8Array`, `final?`: `boolean`): `void` Pushes a chunk to be unzlibbed #### Parameters ##### chunk `Uint8Array` The chunk to push ##### final? `boolean` Whether this is the last chunk #### Returns `void` 101arrowz-fflate-a661bab/docs/classes/Zip.md000066400000000000000000000024641520173263500206660ustar00rootroot00000000000000[**fflate**](../README.md) *** # Class: Zip A zippable archive to which files can incrementally be added ## Constructors ### Constructor > **new Zip**(`cb?`: [`AsyncFlateStreamHandler`](../type-aliases/AsyncFlateStreamHandler.md)): `Zip` Creates an empty ZIP archive to which files can be added #### Parameters ##### cb? [`AsyncFlateStreamHandler`](../type-aliases/AsyncFlateStreamHandler.md) The callback to call whenever data for the generated ZIP archive is available #### Returns `Zip` ## Properties ### ondata > **ondata**: [`AsyncFlateStreamHandler`](../type-aliases/AsyncFlateStreamHandler.md) The handler to call whenever data is available ## Methods ### add() > **add**(`file`: [`ZipInputFile`](../interfaces/ZipInputFile.md)): `void` Adds a file to the ZIP archive #### Parameters ##### file [`ZipInputFile`](../interfaces/ZipInputFile.md) The file stream to add #### Returns `void` *** ### end() > **end**(): `void` Ends the process of adding files and prepares to emit the final chunks. This *must* be called after adding all desired files for the resulting ZIP file to work properly. #### Returns `void` *** ### terminate() > **terminate**(): `void` A method to terminate any internal workers used by the stream. Subsequent calls to add() will fail. #### Returns `void` 101arrowz-fflate-a661bab/docs/classes/ZipDeflate.md000066400000000000000000000135261520173263500221540ustar00rootroot00000000000000[**fflate**](../README.md) *** # Class: ZipDeflate Streaming DEFLATE compression for ZIP archives. Prefer using AsyncZipDeflate for better performance ## Implements - [`ZipInputFile`](../interfaces/ZipInputFile.md) ## Constructors ### Constructor > **new ZipDeflate**(`filename`: `string`, `opts?`: [`DeflateOptions`](../interfaces/DeflateOptions.md)): `ZipDeflate` Creates a DEFLATE stream that can be added to ZIP archives #### Parameters ##### filename `string` The filename to associate with this data stream ##### opts? [`DeflateOptions`](../interfaces/DeflateOptions.md) The compression options #### Returns `ZipDeflate` ## Properties ### attrs? > `optional` **attrs?**: `number` The file's attributes. These are traditionally somewhat complicated and platform-dependent, so using them is scarcely necessary. However, here is a representation of what this is, bit by bit: `TTTTugtrwxrwxrwx0000000000ADVSHR` TTTT = file type (rarely useful) u = setuid, g = setgid, t = sticky rwx = user permissions, rwx = group permissions, rwx = other permissions 0000000000 = unused A = archive, D = directory, V = volume label, S = system file, H = hidden, R = read-only If you want to set the Unix permissions, for instance, just bit shift by 16, e.g. 0o644 << 16. Note that attributes usually only work in conjunction with the `os` setting: you must use `os` = 3 (Unix) if you want to set Unix permissions #### Implementation of [`ZipInputFile`](../interfaces/ZipInputFile.md).[`attrs`](../interfaces/ZipInputFile.md#attrs) *** ### comment? > `optional` **comment?**: `string` The comment to attach to the file. This field is defined by PKZIP's APPNOTE.txt, section 4.4.26. The comment must be at most 65,535 bytes long UTF-8 encoded. This field is not read by consumer software. #### Implementation of [`ZipInputFile`](../interfaces/ZipInputFile.md).[`comment`](../interfaces/ZipInputFile.md#comment) *** ### compression > **compression**: `number` The compression format for the data stream. This number is determined by the spec in PKZIP's APPNOTE.txt, section 4.4.5. For example, 0 = no compression, 8 = deflate, 14 = LZMA #### Implementation of [`ZipInputFile`](../interfaces/ZipInputFile.md).[`compression`](../interfaces/ZipInputFile.md#compression) *** ### crc > **crc**: `number` A CRC of the original file contents. This attribute may be invalid after the file is added to the ZIP archive; it must be correct only before the stream completes. If you don't want to have to generate this yourself, consider extending the ZipPassThrough class and overriding its process() method, or using one of ZipDeflate or AsyncZipDeflate. #### Implementation of [`ZipInputFile`](../interfaces/ZipInputFile.md).[`crc`](../interfaces/ZipInputFile.md#crc) *** ### extra? > `optional` **extra?**: `Record`\<`number`, `Uint8Array`\> Extra metadata to add to the file. This field is defined by PKZIP's APPNOTE.txt, section 4.4.28. At most 65,535 bytes may be used in each ID. The ID must be an integer between 0 and 65,535, inclusive. This field is incredibly rare and almost never needed except for compliance with proprietary standards and software. #### Implementation of [`ZipInputFile`](../interfaces/ZipInputFile.md).[`extra`](../interfaces/ZipInputFile.md#extra) *** ### filename > **filename**: `string` The filename to associate with the data provided to this stream. If you want a file in a subdirectory, use forward slashes as a separator (e.g. `directory/filename.ext`). This will still work on Windows. #### Implementation of [`ZipInputFile`](../interfaces/ZipInputFile.md).[`filename`](../interfaces/ZipInputFile.md#filename) *** ### flag > **flag**: `0` \| `1` \| `2` \| `3` Bits 1 and 2 of the general purpose bit flag, specified in PKZIP's APPNOTE.txt, section 4.4.4. Should be between 0 and 3. This is unlikely to be necessary. #### Implementation of [`ZipInputFile`](../interfaces/ZipInputFile.md).[`flag`](../interfaces/ZipInputFile.md#flag) *** ### mtime? > `optional` **mtime?**: `string` \| `number` \| `Date` When the file was last modified. Defaults to the current time. #### Implementation of [`ZipInputFile`](../interfaces/ZipInputFile.md).[`mtime`](../interfaces/ZipInputFile.md#mtime) *** ### ondata > **ondata**: [`AsyncFlateStreamHandler`](../type-aliases/AsyncFlateStreamHandler.md) The handler to be called when data is added. After passing this stream to the ZIP file object, this handler will always be defined. To call it: `stream.ondata(error, chunk, final)` error = any error that occurred (null if there was no error) chunk = a Uint8Array of the data that was added (null if there was an error) final = boolean, whether this is the final chunk in the stream #### Implementation of [`ZipInputFile`](../interfaces/ZipInputFile.md).[`ondata`](../interfaces/ZipInputFile.md#ondata) *** ### os? > `optional` **os?**: `number` The operating system of origin for this file. The value is defined by PKZIP's APPNOTE.txt, section 4.4.2.2. For example, 0 (the default) is MS/DOS, 3 is Unix, 19 is macOS. #### Implementation of [`ZipInputFile`](../interfaces/ZipInputFile.md).[`os`](../interfaces/ZipInputFile.md#os) *** ### size > **size**: `number` The size of the file in bytes. This attribute may be invalid after the file is added to the ZIP archive; it must be correct only before the stream completes. If you don't want to have to compute this yourself, consider extending the ZipPassThrough class and overriding its process() method, or using one of ZipDeflate or AsyncZipDeflate. #### Implementation of [`ZipInputFile`](../interfaces/ZipInputFile.md).[`size`](../interfaces/ZipInputFile.md#size) ## Methods ### push() > **push**(`chunk`: `Uint8Array`, `final?`: `boolean`): `void` Pushes a chunk to be deflated #### Parameters ##### chunk `Uint8Array` The chunk to push ##### final? `boolean` Whether this is the last chunk #### Returns `void` 101arrowz-fflate-a661bab/docs/classes/ZipPassThrough.md000066400000000000000000000127601520173263500230560ustar00rootroot00000000000000[**fflate**](../README.md) *** # Class: ZipPassThrough A pass-through stream to keep data uncompressed in a ZIP archive. ## Implements - [`ZipInputFile`](../interfaces/ZipInputFile.md) ## Constructors ### Constructor > **new ZipPassThrough**(`filename`: `string`): `ZipPassThrough` Creates a pass-through stream that can be added to ZIP archives #### Parameters ##### filename `string` The filename to associate with this data stream #### Returns `ZipPassThrough` ## Properties ### attrs? > `optional` **attrs?**: `number` The file's attributes. These are traditionally somewhat complicated and platform-dependent, so using them is scarcely necessary. However, here is a representation of what this is, bit by bit: `TTTTugtrwxrwxrwx0000000000ADVSHR` TTTT = file type (rarely useful) u = setuid, g = setgid, t = sticky rwx = user permissions, rwx = group permissions, rwx = other permissions 0000000000 = unused A = archive, D = directory, V = volume label, S = system file, H = hidden, R = read-only If you want to set the Unix permissions, for instance, just bit shift by 16, e.g. 0o644 << 16. Note that attributes usually only work in conjunction with the `os` setting: you must use `os` = 3 (Unix) if you want to set Unix permissions #### Implementation of [`ZipInputFile`](../interfaces/ZipInputFile.md).[`attrs`](../interfaces/ZipInputFile.md#attrs) *** ### comment? > `optional` **comment?**: `string` The comment to attach to the file. This field is defined by PKZIP's APPNOTE.txt, section 4.4.26. The comment must be at most 65,535 bytes long UTF-8 encoded. This field is not read by consumer software. #### Implementation of [`ZipInputFile`](../interfaces/ZipInputFile.md).[`comment`](../interfaces/ZipInputFile.md#comment) *** ### compression > **compression**: `number` The compression format for the data stream. This number is determined by the spec in PKZIP's APPNOTE.txt, section 4.4.5. For example, 0 = no compression, 8 = deflate, 14 = LZMA #### Implementation of [`ZipInputFile`](../interfaces/ZipInputFile.md).[`compression`](../interfaces/ZipInputFile.md#compression) *** ### crc > **crc**: `number` A CRC of the original file contents. This attribute may be invalid after the file is added to the ZIP archive; it must be correct only before the stream completes. If you don't want to have to generate this yourself, consider extending the ZipPassThrough class and overriding its process() method, or using one of ZipDeflate or AsyncZipDeflate. #### Implementation of [`ZipInputFile`](../interfaces/ZipInputFile.md).[`crc`](../interfaces/ZipInputFile.md#crc) *** ### extra? > `optional` **extra?**: `Record`\<`number`, `Uint8Array`\> Extra metadata to add to the file. This field is defined by PKZIP's APPNOTE.txt, section 4.4.28. At most 65,535 bytes may be used in each ID. The ID must be an integer between 0 and 65,535, inclusive. This field is incredibly rare and almost never needed except for compliance with proprietary standards and software. #### Implementation of [`ZipInputFile`](../interfaces/ZipInputFile.md).[`extra`](../interfaces/ZipInputFile.md#extra) *** ### filename > **filename**: `string` The filename to associate with the data provided to this stream. If you want a file in a subdirectory, use forward slashes as a separator (e.g. `directory/filename.ext`). This will still work on Windows. #### Implementation of [`ZipInputFile`](../interfaces/ZipInputFile.md).[`filename`](../interfaces/ZipInputFile.md#filename) *** ### mtime? > `optional` **mtime?**: `string` \| `number` \| `Date` When the file was last modified. Defaults to the current time. #### Implementation of [`ZipInputFile`](../interfaces/ZipInputFile.md).[`mtime`](../interfaces/ZipInputFile.md#mtime) *** ### ondata > **ondata**: [`AsyncFlateStreamHandler`](../type-aliases/AsyncFlateStreamHandler.md) The handler to be called when data is added. After passing this stream to the ZIP file object, this handler will always be defined. To call it: `stream.ondata(error, chunk, final)` error = any error that occurred (null if there was no error) chunk = a Uint8Array of the data that was added (null if there was an error) final = boolean, whether this is the final chunk in the stream #### Implementation of [`ZipInputFile`](../interfaces/ZipInputFile.md).[`ondata`](../interfaces/ZipInputFile.md#ondata) *** ### os? > `optional` **os?**: `number` The operating system of origin for this file. The value is defined by PKZIP's APPNOTE.txt, section 4.4.2.2. For example, 0 (the default) is MS/DOS, 3 is Unix, 19 is macOS. #### Implementation of [`ZipInputFile`](../interfaces/ZipInputFile.md).[`os`](../interfaces/ZipInputFile.md#os) *** ### size > **size**: `number` The size of the file in bytes. This attribute may be invalid after the file is added to the ZIP archive; it must be correct only before the stream completes. If you don't want to have to compute this yourself, consider extending the ZipPassThrough class and overriding its process() method, or using one of ZipDeflate or AsyncZipDeflate. #### Implementation of [`ZipInputFile`](../interfaces/ZipInputFile.md).[`size`](../interfaces/ZipInputFile.md#size) ## Methods ### push() > **push**(`chunk`: `Uint8Array`, `final?`: `boolean`): `void` Pushes a chunk to be added. If you are subclassing this with a custom compression algorithm, note that you must push data from the source file only, pre-compression. #### Parameters ##### chunk `Uint8Array` The chunk to push ##### final? `boolean` Whether this is the last chunk #### Returns `void` 101arrowz-fflate-a661bab/docs/classes/Zlib.md000066400000000000000000000031241520173263500210160ustar00rootroot00000000000000[**fflate**](../README.md) *** # Class: Zlib Streaming Zlib compression ## Constructors ### Constructor > **new Zlib**(`opts`: [`ZlibOptions`](../interfaces/ZlibOptions.md), `cb?`: [`FlateStreamHandler`](../type-aliases/FlateStreamHandler.md)): `Zlib` Creates a Zlib stream #### Parameters ##### opts [`ZlibOptions`](../interfaces/ZlibOptions.md) The compression options ##### cb? [`FlateStreamHandler`](../type-aliases/FlateStreamHandler.md) The callback to call whenever data is deflated #### Returns `Zlib` ### Constructor > **new Zlib**(`cb?`: [`FlateStreamHandler`](../type-aliases/FlateStreamHandler.md)): `Zlib` Creates a Zlib stream #### Parameters ##### cb? [`FlateStreamHandler`](../type-aliases/FlateStreamHandler.md) The callback to call whenever data is deflated #### Returns `Zlib` ## Properties ### ondata > **ondata**: [`FlateStreamHandler`](../type-aliases/FlateStreamHandler.md) The handler to call whenever data is available ## Methods ### flush() > **flush**(`sync?`: `boolean`): `void` Flushes buffered uncompressed data. Useful to immediately retrieve the zlibbed output for small inputs. #### Parameters ##### sync? `boolean` Whether to flush to a byte boundary. A sync flush takes 4-5 extra bytes, but guarantees all pushed data is immediately decompressible. #### Returns `void` *** ### push() > **push**(`chunk`: `Uint8Array`, `final?`: `boolean`): `void` Pushes a chunk to be zlibbed #### Parameters ##### chunk `Uint8Array` The chunk to push ##### final? `boolean` Whether this is the last chunk #### Returns `void` 101arrowz-fflate-a661bab/docs/functions/000077500000000000000000000000001520173263500201475ustar00rootroot00000000000000101arrowz-fflate-a661bab/docs/functions/decompress.md000066400000000000000000000026321520173263500226400ustar00rootroot00000000000000[**fflate**](../README.md) *** # Function: decompress() ## Call Signature > **decompress**(`data`: `Uint8Array`, `opts`: [`AsyncInflateOptions`](../interfaces/AsyncInflateOptions.md), `cb`: [`FlateCallback`](../type-aliases/FlateCallback.md)): [`AsyncTerminable`](../interfaces/AsyncTerminable.md) Asynchrononously expands compressed GZIP, Zlib, or raw DEFLATE data, automatically detecting the format ### Parameters #### data `Uint8Array` The data to decompress #### opts [`AsyncInflateOptions`](../interfaces/AsyncInflateOptions.md) The decompression options #### cb [`FlateCallback`](../type-aliases/FlateCallback.md) The function to be called upon decompression completion ### Returns [`AsyncTerminable`](../interfaces/AsyncTerminable.md) A function that can be used to immediately terminate the decompression ## Call Signature > **decompress**(`data`: `Uint8Array`, `cb`: [`FlateCallback`](../type-aliases/FlateCallback.md)): [`AsyncTerminable`](../interfaces/AsyncTerminable.md) Asynchrononously expands compressed GZIP, Zlib, or raw DEFLATE data, automatically detecting the format ### Parameters #### data `Uint8Array` The data to decompress #### cb [`FlateCallback`](../type-aliases/FlateCallback.md) The function to be called upon decompression completion ### Returns [`AsyncTerminable`](../interfaces/AsyncTerminable.md) A function that can be used to immediately terminate the decompression 101arrowz-fflate-a661bab/docs/functions/decompressSync.md000066400000000000000000000010221520173263500234650ustar00rootroot00000000000000[**fflate**](../README.md) *** # Function: decompressSync() > **decompressSync**(`data`: `Uint8Array`, `opts?`: [`InflateOptions`](../interfaces/InflateOptions.md)): `Uint8Array`\<`ArrayBufferLike`\> Expands compressed GZIP, Zlib, or raw DEFLATE data, automatically detecting the format ## Parameters ### data `Uint8Array` The data to decompress ### opts? [`InflateOptions`](../interfaces/InflateOptions.md) The decompression options ## Returns `Uint8Array`\<`ArrayBufferLike`\> The decompressed version of the data 101arrowz-fflate-a661bab/docs/functions/deflate.md000066400000000000000000000023551520173263500221020ustar00rootroot00000000000000[**fflate**](../README.md) *** # Function: deflate() ## Call Signature > **deflate**(`data`: `Uint8Array`, `opts`: [`AsyncDeflateOptions`](../interfaces/AsyncDeflateOptions.md), `cb`: [`FlateCallback`](../type-aliases/FlateCallback.md)): [`AsyncTerminable`](../interfaces/AsyncTerminable.md) Asynchronously compresses data with DEFLATE without any wrapper ### Parameters #### data `Uint8Array` The data to compress #### opts [`AsyncDeflateOptions`](../interfaces/AsyncDeflateOptions.md) The compression options #### cb [`FlateCallback`](../type-aliases/FlateCallback.md) The function to be called upon compression completion ### Returns [`AsyncTerminable`](../interfaces/AsyncTerminable.md) A function that can be used to immediately terminate the compression ## Call Signature > **deflate**(`data`: `Uint8Array`, `cb`: [`FlateCallback`](../type-aliases/FlateCallback.md)): [`AsyncTerminable`](../interfaces/AsyncTerminable.md) Asynchronously compresses data with DEFLATE without any wrapper ### Parameters #### data `Uint8Array` The data to compress #### cb [`FlateCallback`](../type-aliases/FlateCallback.md) The function to be called upon compression completion ### Returns [`AsyncTerminable`](../interfaces/AsyncTerminable.md) 101arrowz-fflate-a661bab/docs/functions/deflateSync.md000066400000000000000000000007261520173263500227370ustar00rootroot00000000000000[**fflate**](../README.md) *** # Function: deflateSync() > **deflateSync**(`data`: `Uint8Array`, `opts?`: [`DeflateOptions`](../interfaces/DeflateOptions.md)): `Uint8Array`\<`ArrayBuffer`\> Compresses data with DEFLATE without any wrapper ## Parameters ### data `Uint8Array` The data to compress ### opts? [`DeflateOptions`](../interfaces/DeflateOptions.md) The compression options ## Returns `Uint8Array`\<`ArrayBuffer`\> The deflated version of the data 101arrowz-fflate-a661bab/docs/functions/gunzip.md000066400000000000000000000023741520173263500220130ustar00rootroot00000000000000[**fflate**](../README.md) *** # Function: gunzip() ## Call Signature > **gunzip**(`data`: `Uint8Array`, `opts`: [`AsyncGunzipOptions`](../interfaces/AsyncGunzipOptions.md), `cb`: [`FlateCallback`](../type-aliases/FlateCallback.md)): [`AsyncTerminable`](../interfaces/AsyncTerminable.md) Asynchronously expands GZIP data ### Parameters #### data `Uint8Array` The data to decompress #### opts [`AsyncGunzipOptions`](../interfaces/AsyncGunzipOptions.md) The decompression options #### cb [`FlateCallback`](../type-aliases/FlateCallback.md) The function to be called upon decompression completion ### Returns [`AsyncTerminable`](../interfaces/AsyncTerminable.md) A function that can be used to immediately terminate the decompression ## Call Signature > **gunzip**(`data`: `Uint8Array`, `cb`: [`FlateCallback`](../type-aliases/FlateCallback.md)): [`AsyncTerminable`](../interfaces/AsyncTerminable.md) Asynchronously expands GZIP data ### Parameters #### data `Uint8Array` The data to decompress #### cb [`FlateCallback`](../type-aliases/FlateCallback.md) The function to be called upon decompression completion ### Returns [`AsyncTerminable`](../interfaces/AsyncTerminable.md) A function that can be used to immediately terminate the decompression 101arrowz-fflate-a661bab/docs/functions/gunzipSync.md000066400000000000000000000015541520173263500226470ustar00rootroot00000000000000[**fflate**](../README.md) *** # Function: gunzipSync() ## Call Signature > **gunzipSync**(`data`: `Uint8Array`): `Uint8Array`\<`ArrayBuffer`\> Expands GZIP data ### Parameters #### data `Uint8Array` The data to decompress ### Returns `Uint8Array`\<`ArrayBuffer`\> The decompressed version of the data ## Call Signature > **gunzipSync**\<`TArrayBuffer`\>(`data`: `Uint8Array`, `opts?`: [`GunzipOptions`](../interfaces/GunzipOptions.md)\<`TArrayBuffer`\>): `Uint8Array`\<`TArrayBuffer`\> Expands GZIP data ### Type Parameters #### TArrayBuffer `TArrayBuffer` *extends* `ArrayBufferLike` = `ArrayBuffer` ### Parameters #### data `Uint8Array` The data to decompress #### opts? [`GunzipOptions`](../interfaces/GunzipOptions.md)\<`TArrayBuffer`\> The decompression options ### Returns `Uint8Array`\<`TArrayBuffer`\> The decompressed version of the data 101arrowz-fflate-a661bab/docs/functions/gzip.md000066400000000000000000000023621520173263500214450ustar00rootroot00000000000000[**fflate**](../README.md) *** # Function: gzip() ## Call Signature > **gzip**(`data`: `Uint8Array`, `opts`: [`AsyncGzipOptions`](../interfaces/AsyncGzipOptions.md), `cb`: [`FlateCallback`](../type-aliases/FlateCallback.md)): [`AsyncTerminable`](../interfaces/AsyncTerminable.md) Asynchronously compresses data with GZIP ### Parameters #### data `Uint8Array` The data to compress #### opts [`AsyncGzipOptions`](../interfaces/AsyncGzipOptions.md) The compression options #### cb [`FlateCallback`](../type-aliases/FlateCallback.md) The function to be called upon compression completion ### Returns [`AsyncTerminable`](../interfaces/AsyncTerminable.md) A function that can be used to immediately terminate the compression ## Call Signature > **gzip**(`data`: `Uint8Array`, `cb`: [`FlateCallback`](../type-aliases/FlateCallback.md)): [`AsyncTerminable`](../interfaces/AsyncTerminable.md) Asynchronously compresses data with GZIP ### Parameters #### data `Uint8Array` The data to compress #### cb [`FlateCallback`](../type-aliases/FlateCallback.md) The function to be called upon compression completion ### Returns [`AsyncTerminable`](../interfaces/AsyncTerminable.md) A function that can be used to immediately terminate the decompression 101arrowz-fflate-a661bab/docs/functions/gzipSync.md000066400000000000000000000006541520173263500223040ustar00rootroot00000000000000[**fflate**](../README.md) *** # Function: gzipSync() > **gzipSync**(`data`: `Uint8Array`, `opts?`: [`GzipOptions`](../interfaces/GzipOptions.md)): `Uint8Array`\<`ArrayBuffer`\> Compresses data with GZIP ## Parameters ### data `Uint8Array` The data to compress ### opts? [`GzipOptions`](../interfaces/GzipOptions.md) The compression options ## Returns `Uint8Array`\<`ArrayBuffer`\> The gzipped version of the data 101arrowz-fflate-a661bab/docs/functions/inflate.md000066400000000000000000000024511520173263500221150ustar00rootroot00000000000000[**fflate**](../README.md) *** # Function: inflate() ## Call Signature > **inflate**(`data`: `Uint8Array`, `opts`: [`AsyncInflateOptions`](../interfaces/AsyncInflateOptions.md), `cb`: [`FlateCallback`](../type-aliases/FlateCallback.md)): [`AsyncTerminable`](../interfaces/AsyncTerminable.md) Asynchronously expands DEFLATE data with no wrapper ### Parameters #### data `Uint8Array` The data to decompress #### opts [`AsyncInflateOptions`](../interfaces/AsyncInflateOptions.md) The decompression options #### cb [`FlateCallback`](../type-aliases/FlateCallback.md) The function to be called upon decompression completion ### Returns [`AsyncTerminable`](../interfaces/AsyncTerminable.md) A function that can be used to immediately terminate the decompression ## Call Signature > **inflate**(`data`: `Uint8Array`, `cb`: [`FlateCallback`](../type-aliases/FlateCallback.md)): [`AsyncTerminable`](../interfaces/AsyncTerminable.md) Asynchronously expands DEFLATE data with no wrapper ### Parameters #### data `Uint8Array` The data to decompress #### cb [`FlateCallback`](../type-aliases/FlateCallback.md) The function to be called upon decompression completion ### Returns [`AsyncTerminable`](../interfaces/AsyncTerminable.md) A function that can be used to immediately terminate the decompression 101arrowz-fflate-a661bab/docs/functions/inflateSync.md000066400000000000000000000016311520173263500227510ustar00rootroot00000000000000[**fflate**](../README.md) *** # Function: inflateSync() ## Call Signature > **inflateSync**(`data`: `Uint8Array`): `Uint8Array`\<`ArrayBuffer`\> Expands DEFLATE data with no wrapper ### Parameters #### data `Uint8Array` The data to decompress ### Returns `Uint8Array`\<`ArrayBuffer`\> The decompressed version of the data ## Call Signature > **inflateSync**\<`TArrayBuffer`\>(`data`: `Uint8Array`, `opts?`: [`InflateOptions`](../interfaces/InflateOptions.md)\<`TArrayBuffer`\>): `Uint8Array`\<`TArrayBuffer`\> Expands DEFLATE data with no wrapper ### Type Parameters #### TArrayBuffer `TArrayBuffer` *extends* `ArrayBufferLike` = `ArrayBuffer` ### Parameters #### data `Uint8Array` The data to decompress #### opts? [`InflateOptions`](../interfaces/InflateOptions.md)\<`TArrayBuffer`\> The decompression options ### Returns `Uint8Array`\<`TArrayBuffer`\> The decompressed version of the data 101arrowz-fflate-a661bab/docs/functions/strFromU8.md000066400000000000000000000006711520173263500223460ustar00rootroot00000000000000[**fflate**](../README.md) *** # Function: strFromU8() > **strFromU8**(`dat`: `Uint8Array`, `latin1?`: `boolean`): `string` Converts a Uint8Array to a string ## Parameters ### dat `Uint8Array` The data to decode to string ### latin1? `boolean` Whether or not to interpret the data as Latin-1. This should not need to be true unless encoding to binary string. ## Returns `string` The original UTF-8/Latin-1 string 101arrowz-fflate-a661bab/docs/functions/strToU8.md000066400000000000000000000010101520173263500220110ustar00rootroot00000000000000[**fflate**](../README.md) *** # Function: strToU8() > **strToU8**(`str`: `string`, `latin1?`: `boolean`): `Uint8Array`\<`ArrayBuffer`\> Converts a string into a Uint8Array for use with compression/decompression methods ## Parameters ### str `string` The string to encode ### latin1? `boolean` Whether or not to interpret the data as Latin-1. This should not need to be true unless decoding a binary string. ## Returns `Uint8Array`\<`ArrayBuffer`\> The string encoded in UTF-8/Latin-1 binary 101arrowz-fflate-a661bab/docs/functions/unzip.md000066400000000000000000000023741520173263500216440ustar00rootroot00000000000000[**fflate**](../README.md) *** # Function: unzip() ## Call Signature > **unzip**(`data`: `Uint8Array`, `opts`: [`AsyncUnzipOptions`](../interfaces/AsyncUnzipOptions.md), `cb`: [`UnzipCallback`](../type-aliases/UnzipCallback.md)): [`AsyncTerminable`](../interfaces/AsyncTerminable.md) Asynchronously decompresses a ZIP archive ### Parameters #### data `Uint8Array` The raw compressed ZIP file #### opts [`AsyncUnzipOptions`](../interfaces/AsyncUnzipOptions.md) The ZIP extraction options #### cb [`UnzipCallback`](../type-aliases/UnzipCallback.md) The callback to call with the decompressed files ### Returns [`AsyncTerminable`](../interfaces/AsyncTerminable.md) A function that can be used to immediately terminate the unzipping ## Call Signature > **unzip**(`data`: `Uint8Array`, `cb`: [`UnzipCallback`](../type-aliases/UnzipCallback.md)): [`AsyncTerminable`](../interfaces/AsyncTerminable.md) Asynchronously decompresses a ZIP archive ### Parameters #### data `Uint8Array` The raw compressed ZIP file #### cb [`UnzipCallback`](../type-aliases/UnzipCallback.md) The callback to call with the decompressed files ### Returns [`AsyncTerminable`](../interfaces/AsyncTerminable.md) A function that can be used to immediately terminate the unzipping 101arrowz-fflate-a661bab/docs/functions/unzipSync.md000066400000000000000000000010341520173263500224710ustar00rootroot00000000000000[**fflate**](../README.md) *** # Function: unzipSync() > **unzipSync**(`data`: `Uint8Array`, `opts?`: [`UnzipOptions`](../interfaces/UnzipOptions.md)): [`Unzipped`](../interfaces/Unzipped.md) Synchronously decompresses a ZIP archive. Prefer using `unzip` for better performance with more than one file. ## Parameters ### data `Uint8Array` The raw compressed ZIP file ### opts? [`UnzipOptions`](../interfaces/UnzipOptions.md) The ZIP extraction options ## Returns [`Unzipped`](../interfaces/Unzipped.md) The decompressed files 101arrowz-fflate-a661bab/docs/functions/unzlib.md000066400000000000000000000023741520173263500220020ustar00rootroot00000000000000[**fflate**](../README.md) *** # Function: unzlib() ## Call Signature > **unzlib**(`data`: `Uint8Array`, `opts`: [`AsyncUnzlibOptions`](../interfaces/AsyncUnzlibOptions.md), `cb`: [`FlateCallback`](../type-aliases/FlateCallback.md)): [`AsyncTerminable`](../interfaces/AsyncTerminable.md) Asynchronously expands Zlib data ### Parameters #### data `Uint8Array` The data to decompress #### opts [`AsyncUnzlibOptions`](../interfaces/AsyncUnzlibOptions.md) The decompression options #### cb [`FlateCallback`](../type-aliases/FlateCallback.md) The function to be called upon decompression completion ### Returns [`AsyncTerminable`](../interfaces/AsyncTerminable.md) A function that can be used to immediately terminate the decompression ## Call Signature > **unzlib**(`data`: `Uint8Array`, `cb`: [`FlateCallback`](../type-aliases/FlateCallback.md)): [`AsyncTerminable`](../interfaces/AsyncTerminable.md) Asynchronously expands Zlib data ### Parameters #### data `Uint8Array` The data to decompress #### cb [`FlateCallback`](../type-aliases/FlateCallback.md) The function to be called upon decompression completion ### Returns [`AsyncTerminable`](../interfaces/AsyncTerminable.md) A function that can be used to immediately terminate the decompression 101arrowz-fflate-a661bab/docs/functions/unzlibSync.md000066400000000000000000000015541520173263500226360ustar00rootroot00000000000000[**fflate**](../README.md) *** # Function: unzlibSync() ## Call Signature > **unzlibSync**(`data`: `Uint8Array`): `Uint8Array`\<`ArrayBuffer`\> Expands Zlib data ### Parameters #### data `Uint8Array` The data to decompress ### Returns `Uint8Array`\<`ArrayBuffer`\> The decompressed version of the data ## Call Signature > **unzlibSync**\<`TArrayBuffer`\>(`data`: `Uint8Array`, `opts?`: [`UnzlibOptions`](../interfaces/UnzlibOptions.md)\<`TArrayBuffer`\>): `Uint8Array`\<`TArrayBuffer`\> Expands Zlib data ### Type Parameters #### TArrayBuffer `TArrayBuffer` *extends* `ArrayBufferLike` = `ArrayBuffer` ### Parameters #### data `Uint8Array` The data to decompress #### opts? [`UnzlibOptions`](../interfaces/UnzlibOptions.md)\<`TArrayBuffer`\> The decompression options ### Returns `Uint8Array`\<`TArrayBuffer`\> The decompressed version of the data 101arrowz-fflate-a661bab/docs/functions/zip.md000066400000000000000000000026601520173263500212770ustar00rootroot00000000000000[**fflate**](../README.md) *** # Function: zip() ## Call Signature > **zip**(`data`: [`AsyncZippable`](../interfaces/AsyncZippable.md), `opts`: [`AsyncZipOptions`](../interfaces/AsyncZipOptions.md), `cb`: [`FlateCallback`](../type-aliases/FlateCallback.md)): [`AsyncTerminable`](../interfaces/AsyncTerminable.md) Asynchronously creates a ZIP file ### Parameters #### data [`AsyncZippable`](../interfaces/AsyncZippable.md) The directory structure for the ZIP archive #### opts [`AsyncZipOptions`](../interfaces/AsyncZipOptions.md) The main options, merged with per-file options #### cb [`FlateCallback`](../type-aliases/FlateCallback.md) The callback to call with the generated ZIP archive ### Returns [`AsyncTerminable`](../interfaces/AsyncTerminable.md) A function that can be used to immediately terminate the compression ## Call Signature > **zip**(`data`: [`AsyncZippable`](../interfaces/AsyncZippable.md), `cb`: [`FlateCallback`](../type-aliases/FlateCallback.md)): [`AsyncTerminable`](../interfaces/AsyncTerminable.md) Asynchronously creates a ZIP file ### Parameters #### data [`AsyncZippable`](../interfaces/AsyncZippable.md) The directory structure for the ZIP archive #### cb [`FlateCallback`](../type-aliases/FlateCallback.md) The callback to call with the generated ZIP archive ### Returns [`AsyncTerminable`](../interfaces/AsyncTerminable.md) A function that can be used to immediately terminate the compression 101arrowz-fflate-a661bab/docs/functions/zipSync.md000066400000000000000000000011171520173263500221300ustar00rootroot00000000000000[**fflate**](../README.md) *** # Function: zipSync() > **zipSync**(`data`: [`Zippable`](../interfaces/Zippable.md), `opts?`: [`ZipOptions`](../interfaces/ZipOptions.md)): `Uint8Array`\<`ArrayBuffer`\> Synchronously creates a ZIP file. Prefer using `zip` for better performance with more than one file. ## Parameters ### data [`Zippable`](../interfaces/Zippable.md) The directory structure for the ZIP archive ### opts? [`ZipOptions`](../interfaces/ZipOptions.md) The main options, merged with per-file options ## Returns `Uint8Array`\<`ArrayBuffer`\> The generated ZIP archive 101arrowz-fflate-a661bab/docs/functions/zlib.md000066400000000000000000000022521520173263500214320ustar00rootroot00000000000000[**fflate**](../README.md) *** # Function: zlib() ## Call Signature > **zlib**(`data`: `Uint8Array`, `opts`: [`AsyncZlibOptions`](../interfaces/AsyncZlibOptions.md), `cb`: [`FlateCallback`](../type-aliases/FlateCallback.md)): [`AsyncTerminable`](../interfaces/AsyncTerminable.md) Asynchronously compresses data with Zlib ### Parameters #### data `Uint8Array` The data to compress #### opts [`AsyncZlibOptions`](../interfaces/AsyncZlibOptions.md) The compression options #### cb [`FlateCallback`](../type-aliases/FlateCallback.md) The function to be called upon compression completion ### Returns [`AsyncTerminable`](../interfaces/AsyncTerminable.md) ## Call Signature > **zlib**(`data`: `Uint8Array`, `cb`: [`FlateCallback`](../type-aliases/FlateCallback.md)): [`AsyncTerminable`](../interfaces/AsyncTerminable.md) Asynchronously compresses data with Zlib ### Parameters #### data `Uint8Array` The data to compress #### cb [`FlateCallback`](../type-aliases/FlateCallback.md) The function to be called upon compression completion ### Returns [`AsyncTerminable`](../interfaces/AsyncTerminable.md) A function that can be used to immediately terminate the compression 101arrowz-fflate-a661bab/docs/functions/zlibSync.md000066400000000000000000000006621520173263500222720ustar00rootroot00000000000000[**fflate**](../README.md) *** # Function: zlibSync() > **zlibSync**(`data`: `Uint8Array`, `opts?`: [`ZlibOptions`](../interfaces/ZlibOptions.md)): `Uint8Array`\<`ArrayBuffer`\> Compress data with Zlib ## Parameters ### data `Uint8Array` The data to compress ### opts? [`ZlibOptions`](../interfaces/ZlibOptions.md) The compression options ## Returns `Uint8Array`\<`ArrayBuffer`\> The zlib-compressed version of the data 101arrowz-fflate-a661bab/docs/interfaces/000077500000000000000000000000001520173263500202625ustar00rootroot00000000000000101arrowz-fflate-a661bab/docs/interfaces/AsyncDeflateOptions.md000066400000000000000000000052551520173263500245310ustar00rootroot00000000000000[**fflate**](../README.md) *** # Interface: AsyncDeflateOptions Options for compressing data asynchronously into a DEFLATE format ## Extends - [`DeflateOptions`](DeflateOptions.md).`AsyncOptions` ## Extended by - [`AsyncZipOptions`](AsyncZipOptions.md) ## Properties ### consume? > `optional` **consume?**: `boolean` Whether or not to "consume" the source data. This will make the typed array/buffer you pass in unusable but will increase performance and reduce memory usage. #### Inherited from `AsyncOptions.consume` *** ### dictionary? > `optional` **dictionary?**: `Uint8Array` A buffer containing common byte sequences in the input data that can be used to significantly improve compression ratios. Dictionaries should be 32kB or smaller and include strings or byte sequences likely to appear in the input. The decompressor must supply the same dictionary as the compressor to extract the original data. Dictionaries only improve aggregate compression ratio when reused across multiple small inputs. They should typically not be used otherwise. Avoid using dictionaries with GZIP and ZIP to maximize software compatibility. #### Inherited from [`DeflateOptions`](DeflateOptions.md).[`dictionary`](DeflateOptions.md#dictionary) *** ### level? > `optional` **level?**: `0` \| `1` \| `2` \| `3` \| `4` \| `5` \| `6` \| `7` \| `8` \| `9` The level of compression to use, ranging from 0-9. 0 will store the data without compression. 1 is fastest but compresses the worst, 9 is slowest but compresses the best. The default level is 6. Typically, binary data benefits much more from higher values than text data. In both cases, higher values usually take disproportionately longer than the reduction in final size that results. For example, a 1 MB text file could: - become 1.01 MB with level 0 in 1ms - become 400 kB with level 1 in 10ms - become 320 kB with level 9 in 100ms #### Inherited from [`DeflateOptions`](DeflateOptions.md).[`level`](DeflateOptions.md#level) *** ### mem? > `optional` **mem?**: `0` \| `1` \| `2` \| `3` \| `4` \| `5` \| `6` \| `7` \| `8` \| `9` \| `10` \| `11` \| `12` The memory level to use, ranging from 0-12. Increasing this increases speed and compression ratio at the cost of memory. Note that this is exponential: while level 0 uses 8 kB, level 4 uses 128 kB, level 8 uses 2 MB, and level 12 uses 32 MB. It is recommended not to lower the value below 4, since that tends to hurt performance. In addition, values above 8 tend to help very little on most data and can even hurt performance. The default value is automatically determined based on the size of the input data. #### Inherited from [`DeflateOptions`](DeflateOptions.md).[`mem`](DeflateOptions.md#mem) 101arrowz-fflate-a661bab/docs/interfaces/AsyncGunzipOptions.md000066400000000000000000000016071520173263500244360ustar00rootroot00000000000000[**fflate**](../README.md) *** # Interface: AsyncGunzipOptions Options for decompressing GZIP data asynchronously ## Extends - `AsyncOptions`.[`InflateStreamOptions`](InflateStreamOptions.md) ## Properties ### consume? > `optional` **consume?**: `boolean` Whether or not to "consume" the source data. This will make the typed array/buffer you pass in unusable but will increase performance and reduce memory usage. #### Inherited from `AsyncOptions.consume` *** ### dictionary? > `optional` **dictionary?**: `Uint8Array` The dictionary used to compress the original data. If no dictionary was used during compression, this option has no effect. Supplying the wrong dictionary during decompression usually yields corrupt output or causes an invalid distance error. #### Inherited from [`InflateStreamOptions`](InflateStreamOptions.md).[`dictionary`](InflateStreamOptions.md#dictionary) 101arrowz-fflate-a661bab/docs/interfaces/AsyncGzipOptions.md000066400000000000000000000062441520173263500240750ustar00rootroot00000000000000[**fflate**](../README.md) *** # Interface: AsyncGzipOptions Options for compressing data asynchronously into a GZIP format ## Extends - [`GzipOptions`](GzipOptions.md).`AsyncOptions` ## Properties ### consume? > `optional` **consume?**: `boolean` Whether or not to "consume" the source data. This will make the typed array/buffer you pass in unusable but will increase performance and reduce memory usage. #### Inherited from `AsyncOptions.consume` *** ### dictionary? > `optional` **dictionary?**: `Uint8Array` A buffer containing common byte sequences in the input data that can be used to significantly improve compression ratios. Dictionaries should be 32kB or smaller and include strings or byte sequences likely to appear in the input. The decompressor must supply the same dictionary as the compressor to extract the original data. Dictionaries only improve aggregate compression ratio when reused across multiple small inputs. They should typically not be used otherwise. Avoid using dictionaries with GZIP and ZIP to maximize software compatibility. #### Inherited from [`GzipOptions`](GzipOptions.md).[`dictionary`](GzipOptions.md#dictionary) *** ### filename? > `optional` **filename?**: `string` The filename of the data. If the `gunzip` command is used to decompress the data, it will output a file with this name instead of the name of the compressed file. #### Inherited from [`GzipOptions`](GzipOptions.md).[`filename`](GzipOptions.md#filename) *** ### level? > `optional` **level?**: `0` \| `1` \| `2` \| `3` \| `4` \| `5` \| `6` \| `7` \| `8` \| `9` The level of compression to use, ranging from 0-9. 0 will store the data without compression. 1 is fastest but compresses the worst, 9 is slowest but compresses the best. The default level is 6. Typically, binary data benefits much more from higher values than text data. In both cases, higher values usually take disproportionately longer than the reduction in final size that results. For example, a 1 MB text file could: - become 1.01 MB with level 0 in 1ms - become 400 kB with level 1 in 10ms - become 320 kB with level 9 in 100ms #### Inherited from [`GzipOptions`](GzipOptions.md).[`level`](GzipOptions.md#level) *** ### mem? > `optional` **mem?**: `0` \| `1` \| `2` \| `3` \| `4` \| `5` \| `6` \| `7` \| `8` \| `9` \| `10` \| `11` \| `12` The memory level to use, ranging from 0-12. Increasing this increases speed and compression ratio at the cost of memory. Note that this is exponential: while level 0 uses 8 kB, level 4 uses 128 kB, level 8 uses 2 MB, and level 12 uses 32 MB. It is recommended not to lower the value below 4, since that tends to hurt performance. In addition, values above 8 tend to help very little on most data and can even hurt performance. The default value is automatically determined based on the size of the input data. #### Inherited from [`GzipOptions`](GzipOptions.md).[`mem`](GzipOptions.md#mem) *** ### mtime? > `optional` **mtime?**: `string` \| `number` \| `Date` When the file was last modified. Defaults to the current time. Set this to 0 to avoid revealing a modification date entirely. #### Inherited from [`GzipOptions`](GzipOptions.md).[`mtime`](GzipOptions.md#mtime) 101arrowz-fflate-a661bab/docs/interfaces/AsyncInflateOptions.md000066400000000000000000000023011520173263500245340ustar00rootroot00000000000000[**fflate**](../README.md) *** # Interface: AsyncInflateOptions Options for decompressing DEFLATE data asynchronously ## Extends - `AsyncOptions`.[`InflateStreamOptions`](InflateStreamOptions.md) ## Extended by - [`AsyncUnzlibOptions`](AsyncUnzlibOptions.md) ## Properties ### consume? > `optional` **consume?**: `boolean` Whether or not to "consume" the source data. This will make the typed array/buffer you pass in unusable but will increase performance and reduce memory usage. #### Inherited from `AsyncOptions.consume` *** ### dictionary? > `optional` **dictionary?**: `Uint8Array` The dictionary used to compress the original data. If no dictionary was used during compression, this option has no effect. Supplying the wrong dictionary during decompression usually yields corrupt output or causes an invalid distance error. #### Inherited from [`InflateStreamOptions`](InflateStreamOptions.md).[`dictionary`](InflateStreamOptions.md#dictionary) *** ### size? > `optional` **size?**: `number` The original size of the data. Currently, the asynchronous API disallows writing into a buffer you provide; the best you can do is provide the size in bytes and be given back a new typed array. 101arrowz-fflate-a661bab/docs/interfaces/AsyncTerminable.md000066400000000000000000000003611520173263500236640ustar00rootroot00000000000000[**fflate**](../README.md) *** # Interface: AsyncTerminable() A terminable compression/decompression process > **AsyncTerminable**(): `void` Terminates the worker thread immediately. The callback will not be called. ## Returns `void` 101arrowz-fflate-a661bab/docs/interfaces/AsyncUnzipOptions.md000066400000000000000000000006631520173263500242700ustar00rootroot00000000000000[**fflate**](../README.md) *** # Interface: AsyncUnzipOptions Options for asynchronously expanding a ZIP archive ## Extends - [`UnzipOptions`](UnzipOptions.md) ## Properties ### filter? > `optional` **filter?**: [`UnzipFileFilter`](../type-aliases/UnzipFileFilter.md) A filter function to extract only certain files from a ZIP archive #### Inherited from [`UnzipOptions`](UnzipOptions.md).[`filter`](UnzipOptions.md#filter) 101arrowz-fflate-a661bab/docs/interfaces/AsyncUnzlibOptions.md000066400000000000000000000024311520173263500244210ustar00rootroot00000000000000[**fflate**](../README.md) *** # Interface: AsyncUnzlibOptions Options for decompressing Zlib data asynchronously ## Extends - [`AsyncInflateOptions`](AsyncInflateOptions.md) ## Properties ### consume? > `optional` **consume?**: `boolean` Whether or not to "consume" the source data. This will make the typed array/buffer you pass in unusable but will increase performance and reduce memory usage. #### Inherited from [`AsyncInflateOptions`](AsyncInflateOptions.md).[`consume`](AsyncInflateOptions.md#consume) *** ### dictionary? > `optional` **dictionary?**: `Uint8Array` The dictionary used to compress the original data. If no dictionary was used during compression, this option has no effect. Supplying the wrong dictionary during decompression usually yields corrupt output or causes an invalid distance error. #### Inherited from [`AsyncInflateOptions`](AsyncInflateOptions.md).[`dictionary`](AsyncInflateOptions.md#dictionary) *** ### size? > `optional` **size?**: `number` The original size of the data. Currently, the asynchronous API disallows writing into a buffer you provide; the best you can do is provide the size in bytes and be given back a new typed array. #### Inherited from [`AsyncInflateOptions`](AsyncInflateOptions.md).[`size`](AsyncInflateOptions.md#size) 101arrowz-fflate-a661bab/docs/interfaces/AsyncZipOptions.md000066400000000000000000000116661520173263500237320ustar00rootroot00000000000000[**fflate**](../README.md) *** # Interface: AsyncZipOptions Options for asynchronously creating a ZIP archive ## Extends - [`AsyncDeflateOptions`](AsyncDeflateOptions.md).[`ZipAttributes`](ZipAttributes.md) ## Properties ### attrs? > `optional` **attrs?**: `number` The file's attributes. These are traditionally somewhat complicated and platform-dependent, so using them is scarcely necessary. However, here is a representation of what this is, bit by bit: `TTTTugtrwxrwxrwx0000000000ADVSHR` TTTT = file type (rarely useful) u = setuid, g = setgid, t = sticky rwx = user permissions, rwx = group permissions, rwx = other permissions 0000000000 = unused A = archive, D = directory, V = volume label, S = system file, H = hidden, R = read-only If you want to set the Unix permissions, for instance, just bit shift by 16, e.g. 0o644 << 16. Note that attributes usually only work in conjunction with the `os` setting: you must use `os` = 3 (Unix) if you want to set Unix permissions #### Inherited from [`ZipAttributes`](ZipAttributes.md).[`attrs`](ZipAttributes.md#attrs) *** ### comment? > `optional` **comment?**: `string` The comment to attach to the file. This field is defined by PKZIP's APPNOTE.txt, section 4.4.26. The comment must be at most 65,535 bytes long UTF-8 encoded. This field is not read by consumer software. #### Inherited from [`ZipAttributes`](ZipAttributes.md).[`comment`](ZipAttributes.md#comment) *** ### consume? > `optional` **consume?**: `boolean` Whether or not to "consume" the source data. This will make the typed array/buffer you pass in unusable but will increase performance and reduce memory usage. #### Inherited from [`AsyncDeflateOptions`](AsyncDeflateOptions.md).[`consume`](AsyncDeflateOptions.md#consume) *** ### dictionary? > `optional` **dictionary?**: `Uint8Array` A buffer containing common byte sequences in the input data that can be used to significantly improve compression ratios. Dictionaries should be 32kB or smaller and include strings or byte sequences likely to appear in the input. The decompressor must supply the same dictionary as the compressor to extract the original data. Dictionaries only improve aggregate compression ratio when reused across multiple small inputs. They should typically not be used otherwise. Avoid using dictionaries with GZIP and ZIP to maximize software compatibility. #### Inherited from [`AsyncDeflateOptions`](AsyncDeflateOptions.md).[`dictionary`](AsyncDeflateOptions.md#dictionary) *** ### extra? > `optional` **extra?**: `Record`\<`number`, `Uint8Array`\> Extra metadata to add to the file. This field is defined by PKZIP's APPNOTE.txt, section 4.4.28. At most 65,535 bytes may be used in each ID. The ID must be an integer between 0 and 65,535, inclusive. This field is incredibly rare and almost never needed except for compliance with proprietary standards and software. #### Inherited from [`ZipAttributes`](ZipAttributes.md).[`extra`](ZipAttributes.md#extra) *** ### level? > `optional` **level?**: `0` \| `1` \| `2` \| `3` \| `4` \| `5` \| `6` \| `7` \| `8` \| `9` The level of compression to use, ranging from 0-9. 0 will store the data without compression. 1 is fastest but compresses the worst, 9 is slowest but compresses the best. The default level is 6. Typically, binary data benefits much more from higher values than text data. In both cases, higher values usually take disproportionately longer than the reduction in final size that results. For example, a 1 MB text file could: - become 1.01 MB with level 0 in 1ms - become 400 kB with level 1 in 10ms - become 320 kB with level 9 in 100ms #### Inherited from [`AsyncDeflateOptions`](AsyncDeflateOptions.md).[`level`](AsyncDeflateOptions.md#level) *** ### mem? > `optional` **mem?**: `0` \| `1` \| `2` \| `3` \| `4` \| `5` \| `6` \| `7` \| `8` \| `9` \| `10` \| `11` \| `12` The memory level to use, ranging from 0-12. Increasing this increases speed and compression ratio at the cost of memory. Note that this is exponential: while level 0 uses 8 kB, level 4 uses 128 kB, level 8 uses 2 MB, and level 12 uses 32 MB. It is recommended not to lower the value below 4, since that tends to hurt performance. In addition, values above 8 tend to help very little on most data and can even hurt performance. The default value is automatically determined based on the size of the input data. #### Inherited from [`AsyncDeflateOptions`](AsyncDeflateOptions.md).[`mem`](AsyncDeflateOptions.md#mem) *** ### mtime? > `optional` **mtime?**: `string` \| `number` \| `Date` When the file was last modified. Defaults to the current time. #### Inherited from [`ZipAttributes`](ZipAttributes.md).[`mtime`](ZipAttributes.md#mtime) *** ### os? > `optional` **os?**: `number` The operating system of origin for this file. The value is defined by PKZIP's APPNOTE.txt, section 4.4.2.2. For example, 0 (the default) is MS/DOS, 3 is Unix, 19 is macOS. #### Inherited from [`ZipAttributes`](ZipAttributes.md).[`os`](ZipAttributes.md#os) 101arrowz-fflate-a661bab/docs/interfaces/AsyncZippable.md000066400000000000000000000003471520173263500233540ustar00rootroot00000000000000[**fflate**](../README.md) *** # Interface: AsyncZippable The complete directory structure of an asynchronously ZIPpable archive ## Indexable > \[`path`: `string`\]: [`AsyncZippableFile`](../type-aliases/AsyncZippableFile.md) 101arrowz-fflate-a661bab/docs/interfaces/AsyncZlibOptions.md000066400000000000000000000051131520173263500240560ustar00rootroot00000000000000[**fflate**](../README.md) *** # Interface: AsyncZlibOptions Options for compressing data asynchronously into a Zlib format ## Extends - [`ZlibOptions`](ZlibOptions.md).`AsyncOptions` ## Properties ### consume? > `optional` **consume?**: `boolean` Whether or not to "consume" the source data. This will make the typed array/buffer you pass in unusable but will increase performance and reduce memory usage. #### Inherited from `AsyncOptions.consume` *** ### dictionary? > `optional` **dictionary?**: `Uint8Array` A buffer containing common byte sequences in the input data that can be used to significantly improve compression ratios. Dictionaries should be 32kB or smaller and include strings or byte sequences likely to appear in the input. The decompressor must supply the same dictionary as the compressor to extract the original data. Dictionaries only improve aggregate compression ratio when reused across multiple small inputs. They should typically not be used otherwise. Avoid using dictionaries with GZIP and ZIP to maximize software compatibility. #### Inherited from [`ZlibOptions`](ZlibOptions.md).[`dictionary`](ZlibOptions.md#dictionary) *** ### level? > `optional` **level?**: `0` \| `1` \| `2` \| `3` \| `4` \| `5` \| `6` \| `7` \| `8` \| `9` The level of compression to use, ranging from 0-9. 0 will store the data without compression. 1 is fastest but compresses the worst, 9 is slowest but compresses the best. The default level is 6. Typically, binary data benefits much more from higher values than text data. In both cases, higher values usually take disproportionately longer than the reduction in final size that results. For example, a 1 MB text file could: - become 1.01 MB with level 0 in 1ms - become 400 kB with level 1 in 10ms - become 320 kB with level 9 in 100ms #### Inherited from [`ZlibOptions`](ZlibOptions.md).[`level`](ZlibOptions.md#level) *** ### mem? > `optional` **mem?**: `0` \| `1` \| `2` \| `3` \| `4` \| `5` \| `6` \| `7` \| `8` \| `9` \| `10` \| `11` \| `12` The memory level to use, ranging from 0-12. Increasing this increases speed and compression ratio at the cost of memory. Note that this is exponential: while level 0 uses 8 kB, level 4 uses 128 kB, level 8 uses 2 MB, and level 12 uses 32 MB. It is recommended not to lower the value below 4, since that tends to hurt performance. In addition, values above 8 tend to help very little on most data and can even hurt performance. The default value is automatically determined based on the size of the input data. #### Inherited from [`ZlibOptions`](ZlibOptions.md).[`mem`](ZlibOptions.md#mem) 101arrowz-fflate-a661bab/docs/interfaces/DeflateOptions.md000066400000000000000000000042301520173263500235230ustar00rootroot00000000000000[**fflate**](../README.md) *** # Interface: DeflateOptions Options for compressing data into a DEFLATE format ## Extended by - [`GzipOptions`](GzipOptions.md) - [`ZlibOptions`](ZlibOptions.md) - [`AsyncDeflateOptions`](AsyncDeflateOptions.md) - [`ZipOptions`](ZipOptions.md) ## Properties ### dictionary? > `optional` **dictionary?**: `Uint8Array` A buffer containing common byte sequences in the input data that can be used to significantly improve compression ratios. Dictionaries should be 32kB or smaller and include strings or byte sequences likely to appear in the input. The decompressor must supply the same dictionary as the compressor to extract the original data. Dictionaries only improve aggregate compression ratio when reused across multiple small inputs. They should typically not be used otherwise. Avoid using dictionaries with GZIP and ZIP to maximize software compatibility. *** ### level? > `optional` **level?**: `0` \| `1` \| `2` \| `3` \| `4` \| `5` \| `6` \| `7` \| `8` \| `9` The level of compression to use, ranging from 0-9. 0 will store the data without compression. 1 is fastest but compresses the worst, 9 is slowest but compresses the best. The default level is 6. Typically, binary data benefits much more from higher values than text data. In both cases, higher values usually take disproportionately longer than the reduction in final size that results. For example, a 1 MB text file could: - become 1.01 MB with level 0 in 1ms - become 400 kB with level 1 in 10ms - become 320 kB with level 9 in 100ms *** ### mem? > `optional` **mem?**: `0` \| `1` \| `2` \| `3` \| `4` \| `5` \| `6` \| `7` \| `8` \| `9` \| `10` \| `11` \| `12` The memory level to use, ranging from 0-12. Increasing this increases speed and compression ratio at the cost of memory. Note that this is exponential: while level 0 uses 8 kB, level 4 uses 128 kB, level 8 uses 2 MB, and level 12 uses 32 MB. It is recommended not to lower the value below 4, since that tends to hurt performance. In addition, values above 8 tend to help very little on most data and can even hurt performance. The default value is automatically determined based on the size of the input data. 101arrowz-fflate-a661bab/docs/interfaces/FlateError.md000066400000000000000000000006751520173263500226610ustar00rootroot00000000000000[**fflate**](../README.md) *** # Interface: FlateError An error generated within this library ## Extends - `Error` ## Properties ### code > **code**: `number` The code associated with this error *** ### message > **message**: `string` #### Inherited from `Error.message` *** ### name > **name**: `string` #### Inherited from `Error.name` *** ### stack? > `optional` **stack?**: `string` #### Inherited from `Error.stack` 101arrowz-fflate-a661bab/docs/interfaces/GunzipOptions.md000066400000000000000000000020121520173263500234270ustar00rootroot00000000000000[**fflate**](../README.md) *** # Interface: GunzipOptions\ Options for decompressing GZIP data ## Extends - [`InflateStreamOptions`](InflateStreamOptions.md) ## Type Parameters ### TArrayBuffer `TArrayBuffer` *extends* `ArrayBufferLike` = `ArrayBufferLike` ## Properties ### dictionary? > `optional` **dictionary?**: `Uint8Array` The dictionary used to compress the original data. If no dictionary was used during compression, this option has no effect. Supplying the wrong dictionary during decompression usually yields corrupt output or causes an invalid distance error. #### Inherited from [`InflateStreamOptions`](InflateStreamOptions.md).[`dictionary`](InflateStreamOptions.md#dictionary) *** ### out? > `optional` **out?**: `Uint8Array`\<`TArrayBuffer`\> The buffer into which to write the decompressed data. GZIP already encodes the output size, so providing this doesn't save memory. Note that if the decompression result is larger than the size of this buffer, it will be truncated to fit. 101arrowz-fflate-a661bab/docs/interfaces/GunzipStreamOptions.md000066400000000000000000000011501520173263500246050ustar00rootroot00000000000000[**fflate**](../README.md) *** # Interface: GunzipStreamOptions Options for decompressing a GZIP stream ## Extends - [`InflateStreamOptions`](InflateStreamOptions.md) ## Properties ### dictionary? > `optional` **dictionary?**: `Uint8Array` The dictionary used to compress the original data. If no dictionary was used during compression, this option has no effect. Supplying the wrong dictionary during decompression usually yields corrupt output or causes an invalid distance error. #### Inherited from [`InflateStreamOptions`](InflateStreamOptions.md).[`dictionary`](InflateStreamOptions.md#dictionary) 101arrowz-fflate-a661bab/docs/interfaces/GzipOptions.md000066400000000000000000000054471520173263500231030ustar00rootroot00000000000000[**fflate**](../README.md) *** # Interface: GzipOptions Options for compressing data into a GZIP format ## Extends - [`DeflateOptions`](DeflateOptions.md) ## Extended by - [`AsyncGzipOptions`](AsyncGzipOptions.md) ## Properties ### dictionary? > `optional` **dictionary?**: `Uint8Array` A buffer containing common byte sequences in the input data that can be used to significantly improve compression ratios. Dictionaries should be 32kB or smaller and include strings or byte sequences likely to appear in the input. The decompressor must supply the same dictionary as the compressor to extract the original data. Dictionaries only improve aggregate compression ratio when reused across multiple small inputs. They should typically not be used otherwise. Avoid using dictionaries with GZIP and ZIP to maximize software compatibility. #### Inherited from [`DeflateOptions`](DeflateOptions.md).[`dictionary`](DeflateOptions.md#dictionary) *** ### filename? > `optional` **filename?**: `string` The filename of the data. If the `gunzip` command is used to decompress the data, it will output a file with this name instead of the name of the compressed file. *** ### level? > `optional` **level?**: `0` \| `1` \| `2` \| `3` \| `4` \| `5` \| `6` \| `7` \| `8` \| `9` The level of compression to use, ranging from 0-9. 0 will store the data without compression. 1 is fastest but compresses the worst, 9 is slowest but compresses the best. The default level is 6. Typically, binary data benefits much more from higher values than text data. In both cases, higher values usually take disproportionately longer than the reduction in final size that results. For example, a 1 MB text file could: - become 1.01 MB with level 0 in 1ms - become 400 kB with level 1 in 10ms - become 320 kB with level 9 in 100ms #### Inherited from [`DeflateOptions`](DeflateOptions.md).[`level`](DeflateOptions.md#level) *** ### mem? > `optional` **mem?**: `0` \| `1` \| `2` \| `3` \| `4` \| `5` \| `6` \| `7` \| `8` \| `9` \| `10` \| `11` \| `12` The memory level to use, ranging from 0-12. Increasing this increases speed and compression ratio at the cost of memory. Note that this is exponential: while level 0 uses 8 kB, level 4 uses 128 kB, level 8 uses 2 MB, and level 12 uses 32 MB. It is recommended not to lower the value below 4, since that tends to hurt performance. In addition, values above 8 tend to help very little on most data and can even hurt performance. The default value is automatically determined based on the size of the input data. #### Inherited from [`DeflateOptions`](DeflateOptions.md).[`mem`](DeflateOptions.md#mem) *** ### mtime? > `optional` **mtime?**: `string` \| `number` \| `Date` When the file was last modified. Defaults to the current time. Set this to 0 to avoid revealing a modification date entirely. 101arrowz-fflate-a661bab/docs/interfaces/InflateOptions.md000066400000000000000000000020631520173263500235430ustar00rootroot00000000000000[**fflate**](../README.md) *** # Interface: InflateOptions\ Options for decompressing DEFLATE data ## Extends - [`InflateStreamOptions`](InflateStreamOptions.md) ## Extended by - [`UnzlibOptions`](UnzlibOptions.md) ## Type Parameters ### TArrayBuffer `TArrayBuffer` *extends* `ArrayBufferLike` = `ArrayBufferLike` ## Properties ### dictionary? > `optional` **dictionary?**: `Uint8Array` The dictionary used to compress the original data. If no dictionary was used during compression, this option has no effect. Supplying the wrong dictionary during decompression usually yields corrupt output or causes an invalid distance error. #### Inherited from [`InflateStreamOptions`](InflateStreamOptions.md).[`dictionary`](InflateStreamOptions.md#dictionary) *** ### out? > `optional` **out?**: `Uint8Array`\<`TArrayBuffer`\> The buffer into which to write the decompressed data. Saves memory if you know the decompressed size in advance. Note that if the decompression result is larger than the size of this buffer, it will be truncated to fit. 101arrowz-fflate-a661bab/docs/interfaces/InflateStreamOptions.md000066400000000000000000000013251520173263500247170ustar00rootroot00000000000000[**fflate**](../README.md) *** # Interface: InflateStreamOptions Options for decompressing a DEFLATE stream ## Extended by - [`InflateOptions`](InflateOptions.md) - [`GunzipStreamOptions`](GunzipStreamOptions.md) - [`GunzipOptions`](GunzipOptions.md) - [`UnzlibStreamOptions`](UnzlibStreamOptions.md) - [`AsyncInflateOptions`](AsyncInflateOptions.md) - [`AsyncGunzipOptions`](AsyncGunzipOptions.md) ## Properties ### dictionary? > `optional` **dictionary?**: `Uint8Array` The dictionary used to compress the original data. If no dictionary was used during compression, this option has no effect. Supplying the wrong dictionary during decompression usually yields corrupt output or causes an invalid distance error. 101arrowz-fflate-a661bab/docs/interfaces/UnzipDecoder.md000066400000000000000000000014221520173263500231760ustar00rootroot00000000000000[**fflate**](../README.md) *** # Interface: UnzipDecoder A decoder for files in ZIP streams ## Properties ### ondata > **ondata**: [`AsyncFlateStreamHandler`](../type-aliases/AsyncFlateStreamHandler.md) The handler to call whenever data is available *** ### terminate? > `optional` **terminate?**: [`AsyncTerminable`](AsyncTerminable.md) A method to terminate any internal workers used by the stream. Subsequent calls to push() should silently fail. ## Methods ### push() > **push**(`chunk`: `Uint8Array`, `final`: `boolean`): `void` Pushes a chunk to be decompressed #### Parameters ##### chunk `Uint8Array` The data in this chunk. Do not consume (detach) this buffer. ##### final `boolean` Whether this is the last chunk in the data stream #### Returns `void` 101arrowz-fflate-a661bab/docs/interfaces/UnzipDecoderConstructor.md000066400000000000000000000014341520173263500254470ustar00rootroot00000000000000[**fflate**](../README.md) *** # Interface: UnzipDecoderConstructor A constructor for a decoder for unzip streams ## Constructors ### Constructor > **new UnzipDecoderConstructor**(`filename`: `string`, `size?`: `number`, `originalSize?`: `number`): [`UnzipDecoder`](UnzipDecoder.md) Creates an instance of the decoder #### Parameters ##### filename `string` The name of the file ##### size? `number` The compressed size of the file ##### originalSize? `number` The original size of the file #### Returns [`UnzipDecoder`](UnzipDecoder.md) ## Properties ### compression > **compression**: `number` The compression format for the data stream. This number is determined by the spec in PKZIP's APPNOTE.txt, section 4.4.5. For example, 0 = no compression, 8 = deflate, 14 = LZMA 101arrowz-fflate-a661bab/docs/interfaces/UnzipFile.md000066400000000000000000000025471520173263500225210ustar00rootroot00000000000000[**fflate**](../README.md) *** # Interface: UnzipFile Streaming file extraction from ZIP archives ## Properties ### compression > **compression**: `number` The compression format for the data stream. This number is determined by the spec in PKZIP's APPNOTE.txt, section 4.4.5. For example, 0 = no compression, 8 = deflate, 14 = LZMA. If start() is called but there is no decompression stream available for this method, start() will throw. *** ### name > **name**: `string` The name of the file *** ### ondata > **ondata**: [`AsyncFlateStreamHandler`](../type-aliases/AsyncFlateStreamHandler.md) The handler to call whenever data is available *** ### originalSize? > `optional` **originalSize?**: `number` The original size of the file. Will not be present for archives created in a streaming fashion. *** ### size? > `optional` **size?**: `number` The compressed size of the file. Will not be present for archives created in a streaming fashion. *** ### terminate > **terminate**: [`AsyncTerminable`](AsyncTerminable.md) A method to terminate any internal workers used by the stream. ondata will not be called any further. ## Methods ### start() > **start**(): `void` Starts reading from the stream. Calling this function will always enable this stream, but ocassionally the stream will be enabled even without this being called. #### Returns `void` 101arrowz-fflate-a661bab/docs/interfaces/UnzipFileInfo.md000066400000000000000000000012321520173263500233230ustar00rootroot00000000000000[**fflate**](../README.md) *** # Interface: UnzipFileInfo Information about a file to be extracted from a ZIP archive ## Properties ### compression > **compression**: `number` The compression format for the data stream. This number is determined by the spec in PKZIP's APPNOTE.txt, section 4.4.5. For example, 0 = no compression, 8 = deflate, 14 = LZMA. If the filter function returns true but this value is not 8, the unzip function will throw. *** ### name > **name**: `string` The name of the file *** ### originalSize > **originalSize**: `number` The original size of the file *** ### size > **size**: `number` The compressed size of the file 101arrowz-fflate-a661bab/docs/interfaces/UnzipOptions.md000066400000000000000000000005221520173263500232640ustar00rootroot00000000000000[**fflate**](../README.md) *** # Interface: UnzipOptions Options for expanding a ZIP archive ## Extended by - [`AsyncUnzipOptions`](AsyncUnzipOptions.md) ## Properties ### filter? > `optional` **filter?**: [`UnzipFileFilter`](../type-aliases/UnzipFileFilter.md) A filter function to extract only certain files from a ZIP archive 101arrowz-fflate-a661bab/docs/interfaces/Unzipped.md000066400000000000000000000003331520173263500224010ustar00rootroot00000000000000[**fflate**](../README.md) *** # Interface: Unzipped An unzipped archive. The full path of each file is used as the key, and the file is the value ## Indexable > \[`path`: `string`\]: `Uint8Array`\<`ArrayBuffer`\> 101arrowz-fflate-a661bab/docs/interfaces/UnzlibOptions.md000066400000000000000000000021071520173263500234230ustar00rootroot00000000000000[**fflate**](../README.md) *** # Interface: UnzlibOptions\ Options for decompressing Zlib data ## Extends - [`InflateOptions`](InflateOptions.md)\<`TArrayBuffer`\> ## Type Parameters ### TArrayBuffer `TArrayBuffer` *extends* `ArrayBufferLike` = `ArrayBufferLike` ## Properties ### dictionary? > `optional` **dictionary?**: `Uint8Array` The dictionary used to compress the original data. If no dictionary was used during compression, this option has no effect. Supplying the wrong dictionary during decompression usually yields corrupt output or causes an invalid distance error. #### Inherited from [`InflateOptions`](InflateOptions.md).[`dictionary`](InflateOptions.md#dictionary) *** ### out? > `optional` **out?**: `Uint8Array`\<`TArrayBuffer`\> The buffer into which to write the decompressed data. Saves memory if you know the decompressed size in advance. Note that if the decompression result is larger than the size of this buffer, it will be truncated to fit. #### Inherited from [`InflateOptions`](InflateOptions.md).[`out`](InflateOptions.md#out) 101arrowz-fflate-a661bab/docs/interfaces/UnzlibStreamOptions.md000066400000000000000000000011501520173263500245740ustar00rootroot00000000000000[**fflate**](../README.md) *** # Interface: UnzlibStreamOptions Options for decompressing a Zlib stream ## Extends - [`InflateStreamOptions`](InflateStreamOptions.md) ## Properties ### dictionary? > `optional` **dictionary?**: `Uint8Array` The dictionary used to compress the original data. If no dictionary was used during compression, this option has no effect. Supplying the wrong dictionary during decompression usually yields corrupt output or causes an invalid distance error. #### Inherited from [`InflateStreamOptions`](InflateStreamOptions.md).[`dictionary`](InflateStreamOptions.md#dictionary) 101arrowz-fflate-a661bab/docs/interfaces/ZipAttributes.md000066400000000000000000000037661520173263500234310ustar00rootroot00000000000000[**fflate**](../README.md) *** # Interface: ZipAttributes Attributes for files added to a ZIP archive object ## Extended by - [`ZipOptions`](ZipOptions.md) - [`AsyncZipOptions`](AsyncZipOptions.md) - [`ZipInputFile`](ZipInputFile.md) ## Properties ### attrs? > `optional` **attrs?**: `number` The file's attributes. These are traditionally somewhat complicated and platform-dependent, so using them is scarcely necessary. However, here is a representation of what this is, bit by bit: `TTTTugtrwxrwxrwx0000000000ADVSHR` TTTT = file type (rarely useful) u = setuid, g = setgid, t = sticky rwx = user permissions, rwx = group permissions, rwx = other permissions 0000000000 = unused A = archive, D = directory, V = volume label, S = system file, H = hidden, R = read-only If you want to set the Unix permissions, for instance, just bit shift by 16, e.g. 0o644 << 16. Note that attributes usually only work in conjunction with the `os` setting: you must use `os` = 3 (Unix) if you want to set Unix permissions *** ### comment? > `optional` **comment?**: `string` The comment to attach to the file. This field is defined by PKZIP's APPNOTE.txt, section 4.4.26. The comment must be at most 65,535 bytes long UTF-8 encoded. This field is not read by consumer software. *** ### extra? > `optional` **extra?**: `Record`\<`number`, `Uint8Array`\> Extra metadata to add to the file. This field is defined by PKZIP's APPNOTE.txt, section 4.4.28. At most 65,535 bytes may be used in each ID. The ID must be an integer between 0 and 65,535, inclusive. This field is incredibly rare and almost never needed except for compliance with proprietary standards and software. *** ### mtime? > `optional` **mtime?**: `string` \| `number` \| `Date` When the file was last modified. Defaults to the current time. *** ### os? > `optional` **os?**: `number` The operating system of origin for this file. The value is defined by PKZIP's APPNOTE.txt, section 4.4.2.2. For example, 0 (the default) is MS/DOS, 3 is Unix, 19 is macOS. 101arrowz-fflate-a661bab/docs/interfaces/ZipInputFile.md000066400000000000000000000111441520173263500231670ustar00rootroot00000000000000[**fflate**](../README.md) *** # Interface: ZipInputFile A stream that can be used to create a file in a ZIP archive ## Extends - [`ZipAttributes`](ZipAttributes.md) ## Properties ### attrs? > `optional` **attrs?**: `number` The file's attributes. These are traditionally somewhat complicated and platform-dependent, so using them is scarcely necessary. However, here is a representation of what this is, bit by bit: `TTTTugtrwxrwxrwx0000000000ADVSHR` TTTT = file type (rarely useful) u = setuid, g = setgid, t = sticky rwx = user permissions, rwx = group permissions, rwx = other permissions 0000000000 = unused A = archive, D = directory, V = volume label, S = system file, H = hidden, R = read-only If you want to set the Unix permissions, for instance, just bit shift by 16, e.g. 0o644 << 16. Note that attributes usually only work in conjunction with the `os` setting: you must use `os` = 3 (Unix) if you want to set Unix permissions #### Inherited from [`ZipAttributes`](ZipAttributes.md).[`attrs`](ZipAttributes.md#attrs) *** ### comment? > `optional` **comment?**: `string` The comment to attach to the file. This field is defined by PKZIP's APPNOTE.txt, section 4.4.26. The comment must be at most 65,535 bytes long UTF-8 encoded. This field is not read by consumer software. #### Inherited from [`ZipAttributes`](ZipAttributes.md).[`comment`](ZipAttributes.md#comment) *** ### compression > **compression**: `number` The compression format for the data stream. This number is determined by the spec in PKZIP's APPNOTE.txt, section 4.4.5. For example, 0 = no compression, 8 = deflate, 14 = LZMA *** ### crc > **crc**: `number` A CRC of the original file contents. This attribute may be invalid after the file is added to the ZIP archive; it must be correct only before the stream completes. If you don't want to have to generate this yourself, consider extending the ZipPassThrough class and overriding its process() method, or using one of ZipDeflate or AsyncZipDeflate. *** ### extra? > `optional` **extra?**: `Record`\<`number`, `Uint8Array`\> Extra metadata to add to the file. This field is defined by PKZIP's APPNOTE.txt, section 4.4.28. At most 65,535 bytes may be used in each ID. The ID must be an integer between 0 and 65,535, inclusive. This field is incredibly rare and almost never needed except for compliance with proprietary standards and software. #### Inherited from [`ZipAttributes`](ZipAttributes.md).[`extra`](ZipAttributes.md#extra) *** ### filename > **filename**: `string` The filename to associate with the data provided to this stream. If you want a file in a subdirectory, use forward slashes as a separator (e.g. `directory/filename.ext`). This will still work on Windows. *** ### flag? > `optional` **flag?**: `number` Bits 1 and 2 of the general purpose bit flag, specified in PKZIP's APPNOTE.txt, section 4.4.4. Should be between 0 and 3. This is unlikely to be necessary. *** ### mtime? > `optional` **mtime?**: `string` \| `number` \| `Date` When the file was last modified. Defaults to the current time. #### Inherited from [`ZipAttributes`](ZipAttributes.md).[`mtime`](ZipAttributes.md#mtime) *** ### ondata? > `optional` **ondata?**: [`AsyncFlateStreamHandler`](../type-aliases/AsyncFlateStreamHandler.md) The handler to be called when data is added. After passing this stream to the ZIP file object, this handler will always be defined. To call it: `stream.ondata(error, chunk, final)` error = any error that occurred (null if there was no error) chunk = a Uint8Array of the data that was added (null if there was an error) final = boolean, whether this is the final chunk in the stream *** ### os? > `optional` **os?**: `number` The operating system of origin for this file. The value is defined by PKZIP's APPNOTE.txt, section 4.4.2.2. For example, 0 (the default) is MS/DOS, 3 is Unix, 19 is macOS. #### Inherited from [`ZipAttributes`](ZipAttributes.md).[`os`](ZipAttributes.md#os) *** ### size > **size**: `number` The size of the file in bytes. This attribute may be invalid after the file is added to the ZIP archive; it must be correct only before the stream completes. If you don't want to have to compute this yourself, consider extending the ZipPassThrough class and overriding its process() method, or using one of ZipDeflate or AsyncZipDeflate. *** ### terminate? > `optional` **terminate?**: [`AsyncTerminable`](AsyncTerminable.md) A method called when the stream is no longer needed, for clean-up purposes. This will not always be called after the stream completes, so you may wish to call this.terminate() after the final chunk is processed if you have clean-up logic. 101arrowz-fflate-a661bab/docs/interfaces/ZipOptions.md000066400000000000000000000110401520173263500227160ustar00rootroot00000000000000[**fflate**](../README.md) *** # Interface: ZipOptions Options for creating a ZIP archive ## Extends - [`DeflateOptions`](DeflateOptions.md).[`ZipAttributes`](ZipAttributes.md) ## Properties ### attrs? > `optional` **attrs?**: `number` The file's attributes. These are traditionally somewhat complicated and platform-dependent, so using them is scarcely necessary. However, here is a representation of what this is, bit by bit: `TTTTugtrwxrwxrwx0000000000ADVSHR` TTTT = file type (rarely useful) u = setuid, g = setgid, t = sticky rwx = user permissions, rwx = group permissions, rwx = other permissions 0000000000 = unused A = archive, D = directory, V = volume label, S = system file, H = hidden, R = read-only If you want to set the Unix permissions, for instance, just bit shift by 16, e.g. 0o644 << 16. Note that attributes usually only work in conjunction with the `os` setting: you must use `os` = 3 (Unix) if you want to set Unix permissions #### Inherited from [`ZipAttributes`](ZipAttributes.md).[`attrs`](ZipAttributes.md#attrs) *** ### comment? > `optional` **comment?**: `string` The comment to attach to the file. This field is defined by PKZIP's APPNOTE.txt, section 4.4.26. The comment must be at most 65,535 bytes long UTF-8 encoded. This field is not read by consumer software. #### Inherited from [`ZipAttributes`](ZipAttributes.md).[`comment`](ZipAttributes.md#comment) *** ### dictionary? > `optional` **dictionary?**: `Uint8Array` A buffer containing common byte sequences in the input data that can be used to significantly improve compression ratios. Dictionaries should be 32kB or smaller and include strings or byte sequences likely to appear in the input. The decompressor must supply the same dictionary as the compressor to extract the original data. Dictionaries only improve aggregate compression ratio when reused across multiple small inputs. They should typically not be used otherwise. Avoid using dictionaries with GZIP and ZIP to maximize software compatibility. #### Inherited from [`DeflateOptions`](DeflateOptions.md).[`dictionary`](DeflateOptions.md#dictionary) *** ### extra? > `optional` **extra?**: `Record`\<`number`, `Uint8Array`\> Extra metadata to add to the file. This field is defined by PKZIP's APPNOTE.txt, section 4.4.28. At most 65,535 bytes may be used in each ID. The ID must be an integer between 0 and 65,535, inclusive. This field is incredibly rare and almost never needed except for compliance with proprietary standards and software. #### Inherited from [`ZipAttributes`](ZipAttributes.md).[`extra`](ZipAttributes.md#extra) *** ### level? > `optional` **level?**: `0` \| `1` \| `2` \| `3` \| `4` \| `5` \| `6` \| `7` \| `8` \| `9` The level of compression to use, ranging from 0-9. 0 will store the data without compression. 1 is fastest but compresses the worst, 9 is slowest but compresses the best. The default level is 6. Typically, binary data benefits much more from higher values than text data. In both cases, higher values usually take disproportionately longer than the reduction in final size that results. For example, a 1 MB text file could: - become 1.01 MB with level 0 in 1ms - become 400 kB with level 1 in 10ms - become 320 kB with level 9 in 100ms #### Inherited from [`DeflateOptions`](DeflateOptions.md).[`level`](DeflateOptions.md#level) *** ### mem? > `optional` **mem?**: `0` \| `1` \| `2` \| `3` \| `4` \| `5` \| `6` \| `7` \| `8` \| `9` \| `10` \| `11` \| `12` The memory level to use, ranging from 0-12. Increasing this increases speed and compression ratio at the cost of memory. Note that this is exponential: while level 0 uses 8 kB, level 4 uses 128 kB, level 8 uses 2 MB, and level 12 uses 32 MB. It is recommended not to lower the value below 4, since that tends to hurt performance. In addition, values above 8 tend to help very little on most data and can even hurt performance. The default value is automatically determined based on the size of the input data. #### Inherited from [`DeflateOptions`](DeflateOptions.md).[`mem`](DeflateOptions.md#mem) *** ### mtime? > `optional` **mtime?**: `string` \| `number` \| `Date` When the file was last modified. Defaults to the current time. #### Inherited from [`ZipAttributes`](ZipAttributes.md).[`mtime`](ZipAttributes.md#mtime) *** ### os? > `optional` **os?**: `number` The operating system of origin for this file. The value is defined by PKZIP's APPNOTE.txt, section 4.4.2.2. For example, 0 (the default) is MS/DOS, 3 is Unix, 19 is macOS. #### Inherited from [`ZipAttributes`](ZipAttributes.md).[`os`](ZipAttributes.md#os) 101arrowz-fflate-a661bab/docs/interfaces/Zippable.md000066400000000000000000000003101520173263500223440ustar00rootroot00000000000000[**fflate**](../README.md) *** # Interface: Zippable The complete directory structure of a ZIPpable archive ## Indexable > \[`path`: `string`\]: [`ZippableFile`](../type-aliases/ZippableFile.md) 101arrowz-fflate-a661bab/docs/interfaces/ZlibOptions.md000066400000000000000000000046001520173263500230600ustar00rootroot00000000000000[**fflate**](../README.md) *** # Interface: ZlibOptions Options for compressing data into a Zlib format ## Extends - [`DeflateOptions`](DeflateOptions.md) ## Extended by - [`AsyncZlibOptions`](AsyncZlibOptions.md) ## Properties ### dictionary? > `optional` **dictionary?**: `Uint8Array` A buffer containing common byte sequences in the input data that can be used to significantly improve compression ratios. Dictionaries should be 32kB or smaller and include strings or byte sequences likely to appear in the input. The decompressor must supply the same dictionary as the compressor to extract the original data. Dictionaries only improve aggregate compression ratio when reused across multiple small inputs. They should typically not be used otherwise. Avoid using dictionaries with GZIP and ZIP to maximize software compatibility. #### Inherited from [`DeflateOptions`](DeflateOptions.md).[`dictionary`](DeflateOptions.md#dictionary) *** ### level? > `optional` **level?**: `0` \| `1` \| `2` \| `3` \| `4` \| `5` \| `6` \| `7` \| `8` \| `9` The level of compression to use, ranging from 0-9. 0 will store the data without compression. 1 is fastest but compresses the worst, 9 is slowest but compresses the best. The default level is 6. Typically, binary data benefits much more from higher values than text data. In both cases, higher values usually take disproportionately longer than the reduction in final size that results. For example, a 1 MB text file could: - become 1.01 MB with level 0 in 1ms - become 400 kB with level 1 in 10ms - become 320 kB with level 9 in 100ms #### Inherited from [`DeflateOptions`](DeflateOptions.md).[`level`](DeflateOptions.md#level) *** ### mem? > `optional` **mem?**: `0` \| `1` \| `2` \| `3` \| `4` \| `5` \| `6` \| `7` \| `8` \| `9` \| `10` \| `11` \| `12` The memory level to use, ranging from 0-12. Increasing this increases speed and compression ratio at the cost of memory. Note that this is exponential: while level 0 uses 8 kB, level 4 uses 128 kB, level 8 uses 2 MB, and level 12 uses 32 MB. It is recommended not to lower the value below 4, since that tends to hurt performance. In addition, values above 8 tend to help very little on most data and can even hurt performance. The default value is automatically determined based on the size of the input data. #### Inherited from [`DeflateOptions`](DeflateOptions.md).[`mem`](DeflateOptions.md#mem) 101arrowz-fflate-a661bab/docs/type-aliases/000077500000000000000000000000001520173263500205375ustar00rootroot00000000000000101arrowz-fflate-a661bab/docs/type-aliases/AsyncFlateDrainHandler.md000066400000000000000000000006471520173263500253750ustar00rootroot00000000000000[**fflate**](../README.md) *** # Type Alias: AsyncFlateDrainHandler > **AsyncFlateDrainHandler** = (`size`: `number`) => `void` Handler for the asynchronous completion of (de)compression for a data chunk ## Parameters ### size `number` The number of bytes that were processed. This is measured in terms of the input (i.e. compressed bytes for decompression, uncompressed bytes for compression.) ## Returns `void` 101arrowz-fflate-a661bab/docs/type-aliases/AsyncFlateStreamHandler.md000066400000000000000000000010521520173263500255620ustar00rootroot00000000000000[**fflate**](../README.md) *** # Type Alias: AsyncFlateStreamHandler > **AsyncFlateStreamHandler** = (`err`: [`FlateError`](../interfaces/FlateError.md) \| `null`, `data`: `Uint8Array`\<`ArrayBuffer`\>, `final`: `boolean`) => `void` Handler for asynchronous data (de)compression streams ## Parameters ### err [`FlateError`](../interfaces/FlateError.md) \| `null` Any error that occurred ### data `Uint8Array`\<`ArrayBuffer`\> The data output from the stream processor ### final `boolean` Whether this is the final block ## Returns `void` 101arrowz-fflate-a661bab/docs/type-aliases/AsyncZippableFile.md000066400000000000000000000005361520173263500244310ustar00rootroot00000000000000[**fflate**](../README.md) *** # Type Alias: AsyncZippableFile > **AsyncZippableFile** = `Uint8Array` \| [`AsyncZippable`](../interfaces/AsyncZippable.md) \| \[`Uint8Array` \| [`AsyncZippable`](../interfaces/AsyncZippable.md), [`AsyncZipOptions`](../interfaces/AsyncZipOptions.md)\] A file that can be used to asynchronously create a ZIP archive 101arrowz-fflate-a661bab/docs/type-aliases/FlateCallback.md000066400000000000000000000007171520173263500235360ustar00rootroot00000000000000[**fflate**](../README.md) *** # Type Alias: FlateCallback > **FlateCallback** = (`err`: [`FlateError`](../interfaces/FlateError.md) \| `null`, `data`: `Uint8Array`\<`ArrayBuffer`\>) => `void` Callback for asynchronous (de)compression methods ## Parameters ### err [`FlateError`](../interfaces/FlateError.md) \| `null` Any error that occurred ### data `Uint8Array`\<`ArrayBuffer`\> The resulting data. Only present if `err` is null ## Returns `void` 101arrowz-fflate-a661bab/docs/type-aliases/FlateStreamHandler.md000066400000000000000000000005741520173263500245740ustar00rootroot00000000000000[**fflate**](../README.md) *** # Type Alias: FlateStreamHandler > **FlateStreamHandler** = (`data`: `Uint8Array`\<`ArrayBuffer`\>, `final`: `boolean`) => `void` Handler for data (de)compression streams ## Parameters ### data `Uint8Array`\<`ArrayBuffer`\> The data output from the stream processor ### final `boolean` Whether this is the final block ## Returns `void` 101arrowz-fflate-a661bab/docs/type-aliases/GunzipMemberHandler.md000066400000000000000000000006131520173263500247630ustar00rootroot00000000000000[**fflate**](../README.md) *** # Type Alias: GunzipMemberHandler > **GunzipMemberHandler** = (`offset`: `number`) => `void` Handler for new GZIP members in concatenated GZIP streams. Useful for building indices used to perform random-access reads on compressed files. ## Parameters ### offset `number` The offset of the new member relative to the start of the stream ## Returns `void` 101arrowz-fflate-a661bab/docs/type-aliases/StringStreamHandler.md000066400000000000000000000005231520173263500250010ustar00rootroot00000000000000[**fflate**](../README.md) *** # Type Alias: StringStreamHandler > **StringStreamHandler** = (`data`: `string`, `final`: `boolean`) => `void` Handler for string generation streams ## Parameters ### data `string` The string output from the stream processor ### final `boolean` Whether this is the final block ## Returns `void` 101arrowz-fflate-a661bab/docs/type-aliases/UnzipCallback.md000066400000000000000000000007101520173263500236010ustar00rootroot00000000000000[**fflate**](../README.md) *** # Type Alias: UnzipCallback > **UnzipCallback** = (`err`: [`FlateError`](../interfaces/FlateError.md) \| `null`, `data`: [`Unzipped`](../interfaces/Unzipped.md)) => `void` Callback for asynchronous ZIP decompression ## Parameters ### err [`FlateError`](../interfaces/FlateError.md) \| `null` Any error that occurred ### data [`Unzipped`](../interfaces/Unzipped.md) The decompressed ZIP archive ## Returns `void` 101arrowz-fflate-a661bab/docs/type-aliases/UnzipFileFilter.md000066400000000000000000000006401520173263500241340ustar00rootroot00000000000000[**fflate**](../README.md) *** # Type Alias: UnzipFileFilter > **UnzipFileFilter** = (`file`: [`UnzipFileInfo`](../interfaces/UnzipFileInfo.md)) => `boolean` A filter for files to be extracted during the unzipping process ## Parameters ### file [`UnzipFileInfo`](../interfaces/UnzipFileInfo.md) The info for the current file being processed ## Returns `boolean` Whether or not to extract the current file 101arrowz-fflate-a661bab/docs/type-aliases/UnzipFileHandler.md000066400000000000000000000005011520173263500242600ustar00rootroot00000000000000[**fflate**](../README.md) *** # Type Alias: UnzipFileHandler > **UnzipFileHandler** = (`file`: [`UnzipFile`](../interfaces/UnzipFile.md)) => `void` Handler for streaming ZIP decompression ## Parameters ### file [`UnzipFile`](../interfaces/UnzipFile.md) The file that was found in the archive ## Returns `void` 101arrowz-fflate-a661bab/docs/type-aliases/ZippableFile.md000066400000000000000000000004471520173263500234340ustar00rootroot00000000000000[**fflate**](../README.md) *** # Type Alias: ZippableFile > **ZippableFile** = `Uint8Array` \| [`Zippable`](../interfaces/Zippable.md) \| \[`Uint8Array` \| [`Zippable`](../interfaces/Zippable.md), [`ZipOptions`](../interfaces/ZipOptions.md)\] A file that can be used to create a ZIP archive 101arrowz-fflate-a661bab/docs/variables/000077500000000000000000000000001520173263500201075ustar00rootroot00000000000000101arrowz-fflate-a661bab/docs/variables/FlateErrorCode.md000066400000000000000000000022151520173263500232710ustar00rootroot00000000000000[**fflate**](../README.md) *** # Variable: FlateErrorCode > `const` **FlateErrorCode**: `object` Codes for errors generated within this library ## Type Declaration ### ExtraFieldTooLong > `readonly` **ExtraFieldTooLong**: `9` = `9` ### FilenameTooLong > `readonly` **FilenameTooLong**: `11` = `11` ### InvalidBlockType > `readonly` **InvalidBlockType**: `1` = `1` ### InvalidDate > `readonly` **InvalidDate**: `10` = `10` ### InvalidDistance > `readonly` **InvalidDistance**: `3` = `3` ### InvalidHeader > `readonly` **InvalidHeader**: `6` = `6` ### InvalidLengthLiteral > `readonly` **InvalidLengthLiteral**: `2` = `2` ### InvalidUTF8 > `readonly` **InvalidUTF8**: `8` = `8` ### InvalidZipData > `readonly` **InvalidZipData**: `13` = `13` ### NoCallback > `readonly` **NoCallback**: `7` = `7` ### NoStreamHandler > `readonly` **NoStreamHandler**: `5` = `5` ### StreamFinished > `readonly` **StreamFinished**: `4` = `4` ### StreamFinishing > `readonly` **StreamFinishing**: `12` = `12` ### UnexpectedEOF > `readonly` **UnexpectedEOF**: `0` = `0` ### UnknownCompressionMethod > `readonly` **UnknownCompressionMethod**: `14` = `14` 101arrowz-fflate-a661bab/package-lock.json000066400000000000000000004460531520173263500204370ustar00rootroot00000000000000{ "name": "fflate", "version": "0.8.3", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "fflate", "version": "0.8.3", "license": "MIT", "devDependencies": { "@parcel/service-worker": "^2.9.3", "@types/node": "^25.8.0", "@types/pako": "*", "@types/react": "^18.2.21", "@types/react-dom": "^18.2.7", "jszip": "^3.10.1", "pako": "*", "parcel": "^2.9.3", "preact": "^10.17.1", "react": "^18.2.0", "react-dom": "^18.2.0", "simple-git": "^3.19.1", "terser": "^5.47.1", "tiny-inflate": "*", "ts-node": "^10.9.2", "typedoc": "^0.28.19", "typedoc-plugin-markdown": "^4.11.0", "typescript": "^6.0.3", "uvu": "^0.5.6", "uzip": "*" } }, "node_modules/@babel/code-frame": { "version": "7.22.13", "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.22.13.tgz", "integrity": "sha512-XktuhWlJ5g+3TJXc5upd9Ks1HutSArik6jf2eAjYFyIOf4ej3RN+184cZbzDvbPnuTJIUhPKKJE3cIsYTiAT3w==", "dev": true, "dependencies": { "@babel/highlight": "^7.22.13", "chalk": "^2.4.2" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/code-frame/node_modules/ansi-styles": { "version": "3.2.1", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", "dev": true, "dependencies": { "color-convert": "^1.9.0" }, "engines": { "node": ">=4" } }, "node_modules/@babel/code-frame/node_modules/chalk": { "version": "2.4.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", "dev": true, "dependencies": { "ansi-styles": "^3.2.1", "escape-string-regexp": "^1.0.5", "supports-color": "^5.3.0" }, "engines": { "node": ">=4" } }, "node_modules/@babel/code-frame/node_modules/color-convert": { "version": "1.9.3", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", "dev": true, "dependencies": { "color-name": "1.1.3" } }, "node_modules/@babel/code-frame/node_modules/color-name": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", "dev": true }, "node_modules/@babel/code-frame/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/@babel/code-frame/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/@babel/helper-validator-identifier": { "version": "7.22.5", "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.5.tgz", "integrity": "sha512-aJXu+6lErq8ltp+JhkJUfk1MTGyuA4v7f3pA+BJ5HLfNC6nAQ0Cpi9uOquUj8Hehg0aUiHzWQbOVJGao6ztBAQ==", "dev": true, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/highlight": { "version": "7.22.13", "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.22.13.tgz", "integrity": "sha512-C/BaXcnnvBCmHTpz/VGZ8jgtE2aYlW4hxDhseJAWZb7gqGM/qtCK6iZUb0TyKFf7BOUsBH7Q7fkRsDRhg1XklQ==", "dev": true, "dependencies": { "@babel/helper-validator-identifier": "^7.22.5", "chalk": "^2.4.2", "js-tokens": "^4.0.0" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/highlight/node_modules/ansi-styles": { "version": "3.2.1", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", "dev": true, "dependencies": { "color-convert": "^1.9.0" }, "engines": { "node": ">=4" } }, "node_modules/@babel/highlight/node_modules/chalk": { "version": "2.4.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", "dev": true, "dependencies": { "ansi-styles": "^3.2.1", "escape-string-regexp": "^1.0.5", "supports-color": "^5.3.0" }, "engines": { "node": ">=4" } }, "node_modules/@babel/highlight/node_modules/color-convert": { "version": "1.9.3", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", "dev": true, "dependencies": { "color-name": "1.1.3" } }, "node_modules/@babel/highlight/node_modules/color-name": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", "dev": true }, "node_modules/@babel/highlight/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/@babel/highlight/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/@cspotcode/source-map-support": { "version": "0.8.1", "resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz", "integrity": "sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==", "dev": true, "dependencies": { "@jridgewell/trace-mapping": "0.3.9" }, "engines": { "node": ">=12" } }, "node_modules/@cspotcode/source-map-support/node_modules/@jridgewell/trace-mapping": { "version": "0.3.9", "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz", "integrity": "sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==", "dev": true, "dependencies": { "@jridgewell/resolve-uri": "^3.0.3", "@jridgewell/sourcemap-codec": "^1.4.10" } }, "node_modules/@gerrit0/mini-shiki": { "version": "3.23.0", "resolved": "https://registry.npmjs.org/@gerrit0/mini-shiki/-/mini-shiki-3.23.0.tgz", "integrity": "sha512-bEMORlG0cqdjVyCEuU0cDQbORWX+kYCeo0kV1lbxF5bt4r7SID2l9bqsxJEM0zndaxpOUT7riCyIVEuqq/Ynxg==", "dev": true, "dependencies": { "@shikijs/engine-oniguruma": "^3.23.0", "@shikijs/langs": "^3.23.0", "@shikijs/themes": "^3.23.0", "@shikijs/types": "^3.23.0", "@shikijs/vscode-textmate": "^10.0.2" } }, "node_modules/@jridgewell/gen-mapping": { "version": "0.3.3", "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.3.tgz", "integrity": "sha512-HLhSWOLRi875zjjMG/r+Nv0oCW8umGb0BgEhyX3dDX3egwZtB8PqLnjz3yedt8R5StBrzcg4aBpnh8UA9D1BoQ==", "dev": true, "dependencies": { "@jridgewell/set-array": "^1.0.1", "@jridgewell/sourcemap-codec": "^1.4.10", "@jridgewell/trace-mapping": "^0.3.9" }, "engines": { "node": ">=6.0.0" } }, "node_modules/@jridgewell/resolve-uri": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.1.tgz", "integrity": "sha512-dSYZh7HhCDtCKm4QakX0xFpsRDqjjtZf/kjI/v3T3Nwt5r8/qz/M19F9ySyOqU94SXBmeG9ttTul+YnR4LOxFA==", "dev": true, "engines": { "node": ">=6.0.0" } }, "node_modules/@jridgewell/set-array": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.1.2.tgz", "integrity": "sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==", "dev": true, "engines": { "node": ">=6.0.0" } }, "node_modules/@jridgewell/source-map": { "version": "0.3.5", "resolved": "https://registry.npmjs.org/@jridgewell/source-map/-/source-map-0.3.5.tgz", "integrity": "sha512-UTYAUj/wviwdsMfzoSJspJxbkH5o1snzwX0//0ENX1u/55kkZZkcTZP6u9bwKGkv+dkk9at4m1Cpt0uY80kcpQ==", "dev": true, "dependencies": { "@jridgewell/gen-mapping": "^0.3.0", "@jridgewell/trace-mapping": "^0.3.9" } }, "node_modules/@jridgewell/sourcemap-codec": { "version": "1.4.15", "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz", "integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==", "dev": true }, "node_modules/@jridgewell/trace-mapping": { "version": "0.3.19", "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.19.tgz", "integrity": "sha512-kf37QtfW+Hwx/buWGMPcR60iF9ziHa6r/CZJIHbmcm4+0qrXiVdxegAH0F6yddEVQ7zdkjcGCgCzUu+BcbhQxw==", "dev": true, "dependencies": { "@jridgewell/resolve-uri": "^3.1.0", "@jridgewell/sourcemap-codec": "^1.4.14" } }, "node_modules/@kwsites/file-exists": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/@kwsites/file-exists/-/file-exists-1.1.1.tgz", "integrity": "sha512-m9/5YGR18lIwxSFDwfE3oA7bWuq9kdau6ugN4H2rJeyhFQZcG9AgSHkQtSD15a8WvTgfz9aikZMrKPHvbpqFiw==", "dev": true, "dependencies": { "debug": "^4.1.1" } }, "node_modules/@kwsites/promise-deferred": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/@kwsites/promise-deferred/-/promise-deferred-1.1.1.tgz", "integrity": "sha512-GaHYm+c0O9MjZRu0ongGBRbinu8gVAMd2UZjji6jVmqKtZluZnptXGWhz1E8j8D2HJ3f/yMxKAUC0b+57wncIw==", "dev": true }, "node_modules/@lezer/common": { "version": "0.15.12", "resolved": "https://registry.npmjs.org/@lezer/common/-/common-0.15.12.tgz", "integrity": "sha512-edfwCxNLnzq5pBA/yaIhwJ3U3Kz8VAUOTRg0hhxaizaI1N+qxV7EXDv/kLCkLeq2RzSFvxexlaj5Mzfn2kY0Ig==", "dev": true }, "node_modules/@lezer/lr": { "version": "0.15.8", "resolved": "https://registry.npmjs.org/@lezer/lr/-/lr-0.15.8.tgz", "integrity": "sha512-bM6oE6VQZ6hIFxDNKk8bKPa14hqFrV07J/vHGOeiAbJReIaQXmkVb6xQu4MR+JBTLa5arGRyAAjJe1qaQt3Uvg==", "dev": true, "dependencies": { "@lezer/common": "^0.15.0" } }, "node_modules/@lmdb/lmdb-darwin-arm64": { "version": "2.7.11", "resolved": "https://registry.npmjs.org/@lmdb/lmdb-darwin-arm64/-/lmdb-darwin-arm64-2.7.11.tgz", "integrity": "sha512-r6+vYq2vKzE+vgj/rNVRMwAevq0+ZR9IeMFIqcSga+wMtMdXQ27KqQ7uS99/yXASg29bos7yHP3yk4x6Iio0lw==", "cpu": [ "arm64" ], "dev": true, "optional": true, "os": [ "darwin" ] }, "node_modules/@lmdb/lmdb-darwin-x64": { "version": "2.7.11", "resolved": "https://registry.npmjs.org/@lmdb/lmdb-darwin-x64/-/lmdb-darwin-x64-2.7.11.tgz", "integrity": "sha512-jhj1aB4K8ycRL1HOQT5OtzlqOq70jxUQEWRN9Gqh3TIDN30dxXtiHi6EWF516tzw6v2+3QqhDMJh8O6DtTGG8Q==", "cpu": [ "x64" ], "dev": true, "optional": true, "os": [ "darwin" ] }, "node_modules/@lmdb/lmdb-linux-arm": { "version": "2.7.11", "resolved": "https://registry.npmjs.org/@lmdb/lmdb-linux-arm/-/lmdb-linux-arm-2.7.11.tgz", "integrity": "sha512-dHfLFVSrw/v5X5lkwp0Vl7+NFpEeEYKfMG2DpdFJnnG1RgHQZngZxCaBagFoaJGykRpd2DYF1AeuXBFrAUAXfw==", "cpu": [ "arm" ], "dev": true, "optional": true, "os": [ "linux" ] }, "node_modules/@lmdb/lmdb-linux-arm64": { "version": "2.7.11", "resolved": "https://registry.npmjs.org/@lmdb/lmdb-linux-arm64/-/lmdb-linux-arm64-2.7.11.tgz", "integrity": "sha512-7xGEfPPbmVJWcY2Nzqo11B9Nfxs+BAsiiaY/OcT4aaTDdykKeCjvKMQJA3KXCtZ1AtiC9ljyGLi+BfUwdulY5A==", "cpu": [ "arm64" ], "dev": true, "optional": true, "os": [ "linux" ] }, "node_modules/@lmdb/lmdb-linux-x64": { "version": "2.7.11", "resolved": "https://registry.npmjs.org/@lmdb/lmdb-linux-x64/-/lmdb-linux-x64-2.7.11.tgz", "integrity": "sha512-vUKI3JrREMQsXX8q0Eq5zX2FlYCKWMmLiCyyJNfZK0Uyf14RBg9VtB3ObQ41b4swYh2EWaltasWVe93Y8+KDng==", "cpu": [ "x64" ], "dev": true, "optional": true, "os": [ "linux" ] }, "node_modules/@lmdb/lmdb-win32-x64": { "version": "2.7.11", "resolved": "https://registry.npmjs.org/@lmdb/lmdb-win32-x64/-/lmdb-win32-x64-2.7.11.tgz", "integrity": "sha512-BJwkHlSUgtB+Ei52Ai32M1AOMerSlzyIGA/KC4dAGL+GGwVMdwG8HGCOA2TxP3KjhbgDPMYkv7bt/NmOmRIFng==", "cpu": [ "x64" ], "dev": true, "optional": true, "os": [ "win32" ] }, "node_modules/@mischnic/json-sourcemap": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/@mischnic/json-sourcemap/-/json-sourcemap-0.1.0.tgz", "integrity": "sha512-dQb3QnfNqmQNYA4nFSN/uLaByIic58gOXq4Y4XqLOWmOrw73KmJPt/HLyG0wvn1bnR6mBKs/Uwvkh+Hns1T0XA==", "dev": true, "dependencies": { "@lezer/common": "^0.15.7", "@lezer/lr": "^0.15.4", "json5": "^2.2.1" }, "engines": { "node": ">=12.0.0" } }, "node_modules/@msgpackr-extract/msgpackr-extract-darwin-arm64": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/@msgpackr-extract/msgpackr-extract-darwin-arm64/-/msgpackr-extract-darwin-arm64-3.0.2.tgz", "integrity": "sha512-9bfjwDxIDWmmOKusUcqdS4Rw+SETlp9Dy39Xui9BEGEk19dDwH0jhipwFzEff/pFg95NKymc6TOTbRKcWeRqyQ==", "cpu": [ "arm64" ], "dev": true, "optional": true, "os": [ "darwin" ] }, "node_modules/@msgpackr-extract/msgpackr-extract-darwin-x64": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/@msgpackr-extract/msgpackr-extract-darwin-x64/-/msgpackr-extract-darwin-x64-3.0.2.tgz", "integrity": "sha512-lwriRAHm1Yg4iDf23Oxm9n/t5Zpw1lVnxYU3HnJPTi2lJRkKTrps1KVgvL6m7WvmhYVt/FIsssWay+k45QHeuw==", "cpu": [ "x64" ], "dev": true, "optional": true, "os": [ "darwin" ] }, "node_modules/@msgpackr-extract/msgpackr-extract-linux-arm": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/@msgpackr-extract/msgpackr-extract-linux-arm/-/msgpackr-extract-linux-arm-3.0.2.tgz", "integrity": "sha512-MOI9Dlfrpi2Cuc7i5dXdxPbFIgbDBGgKR5F2yWEa6FVEtSWncfVNKW5AKjImAQ6CZlBK9tympdsZJ2xThBiWWA==", "cpu": [ "arm" ], "dev": true, "optional": true, "os": [ "linux" ] }, "node_modules/@msgpackr-extract/msgpackr-extract-linux-arm64": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/@msgpackr-extract/msgpackr-extract-linux-arm64/-/msgpackr-extract-linux-arm64-3.0.2.tgz", "integrity": "sha512-FU20Bo66/f7He9Fp9sP2zaJ1Q8L9uLPZQDub/WlUip78JlPeMbVL8546HbZfcW9LNciEXc8d+tThSJjSC+tmsg==", "cpu": [ "arm64" ], "dev": true, "optional": true, "os": [ "linux" ] }, "node_modules/@msgpackr-extract/msgpackr-extract-linux-x64": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/@msgpackr-extract/msgpackr-extract-linux-x64/-/msgpackr-extract-linux-x64-3.0.2.tgz", "integrity": "sha512-gsWNDCklNy7Ajk0vBBf9jEx04RUxuDQfBse918Ww+Qb9HCPoGzS+XJTLe96iN3BVK7grnLiYghP/M4L8VsaHeA==", "cpu": [ "x64" ], "dev": true, "optional": true, "os": [ "linux" ] }, "node_modules/@msgpackr-extract/msgpackr-extract-win32-x64": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/@msgpackr-extract/msgpackr-extract-win32-x64/-/msgpackr-extract-win32-x64-3.0.2.tgz", "integrity": "sha512-O+6Gs8UeDbyFpbSh2CPEz/UOrrdWPTBYNblZK5CxxLisYt4kGX3Sc+czffFonyjiGSq3jWLwJS/CCJc7tBr4sQ==", "cpu": [ "x64" ], "dev": true, "optional": true, "os": [ "win32" ] }, "node_modules/@parcel/bundler-default": { "version": "2.9.3", "resolved": "https://registry.npmjs.org/@parcel/bundler-default/-/bundler-default-2.9.3.tgz", "integrity": "sha512-JjJK8dq39/UO/MWI/4SCbB1t/qgpQRFnFDetAAAezQ8oN++b24u1fkMDa/xqQGjbuPmGeTds5zxGgYs7id7PYg==", "dev": true, "dependencies": { "@parcel/diagnostic": "2.9.3", "@parcel/graph": "2.9.3", "@parcel/hash": "2.9.3", "@parcel/plugin": "2.9.3", "@parcel/utils": "2.9.3", "nullthrows": "^1.1.1" }, "engines": { "node": ">= 12.0.0", "parcel": "^2.9.3" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/parcel" } }, "node_modules/@parcel/cache": { "version": "2.9.3", "resolved": "https://registry.npmjs.org/@parcel/cache/-/cache-2.9.3.tgz", "integrity": "sha512-Bj/H2uAJJSXtysG7E/x4EgTrE2hXmm7td/bc97K8M9N7+vQjxf7xb0ebgqe84ePVMkj4MVQSMEJkEucXVx4b0Q==", "dev": true, "dependencies": { "@parcel/fs": "2.9.3", "@parcel/logger": "2.9.3", "@parcel/utils": "2.9.3", "lmdb": "2.7.11" }, "engines": { "node": ">= 12.0.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/parcel" }, "peerDependencies": { "@parcel/core": "^2.9.3" } }, "node_modules/@parcel/codeframe": { "version": "2.9.3", "resolved": "https://registry.npmjs.org/@parcel/codeframe/-/codeframe-2.9.3.tgz", "integrity": "sha512-z7yTyD6h3dvduaFoHpNqur74/2yDWL++33rjQjIjCaXREBN6dKHoMGMizzo/i4vbiI1p9dDox2FIDEHCMQxqdA==", "dev": true, "dependencies": { "chalk": "^4.1.0" }, "engines": { "node": ">= 12.0.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/parcel" } }, "node_modules/@parcel/compressor-raw": { "version": "2.9.3", "resolved": "https://registry.npmjs.org/@parcel/compressor-raw/-/compressor-raw-2.9.3.tgz", "integrity": "sha512-jz3t4/ICMsHEqgiTmv5i1DJva2k5QRpZlBELVxfY+QElJTVe8edKJ0TiKcBxh2hx7sm4aUigGmp7JiqqHRRYmA==", "dev": true, "dependencies": { "@parcel/plugin": "2.9.3" }, "engines": { "node": ">= 12.0.0", "parcel": "^2.9.3" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/parcel" } }, "node_modules/@parcel/config-default": { "version": "2.9.3", "resolved": "https://registry.npmjs.org/@parcel/config-default/-/config-default-2.9.3.tgz", "integrity": "sha512-tqN5tF7QnVABDZAu76co5E6N8mA9n8bxiWdK4xYyINYFIEHgX172oRTqXTnhEMjlMrdmASxvnGlbaPBaVnrCTw==", "dev": true, "dependencies": { "@parcel/bundler-default": "2.9.3", "@parcel/compressor-raw": "2.9.3", "@parcel/namer-default": "2.9.3", "@parcel/optimizer-css": "2.9.3", "@parcel/optimizer-htmlnano": "2.9.3", "@parcel/optimizer-image": "2.9.3", "@parcel/optimizer-svgo": "2.9.3", "@parcel/optimizer-swc": "2.9.3", "@parcel/packager-css": "2.9.3", "@parcel/packager-html": "2.9.3", "@parcel/packager-js": "2.9.3", "@parcel/packager-raw": "2.9.3", "@parcel/packager-svg": "2.9.3", "@parcel/reporter-dev-server": "2.9.3", "@parcel/resolver-default": "2.9.3", "@parcel/runtime-browser-hmr": "2.9.3", "@parcel/runtime-js": "2.9.3", "@parcel/runtime-react-refresh": "2.9.3", "@parcel/runtime-service-worker": "2.9.3", "@parcel/transformer-babel": "2.9.3", "@parcel/transformer-css": "2.9.3", "@parcel/transformer-html": "2.9.3", "@parcel/transformer-image": "2.9.3", "@parcel/transformer-js": "2.9.3", "@parcel/transformer-json": "2.9.3", "@parcel/transformer-postcss": "2.9.3", "@parcel/transformer-posthtml": "2.9.3", "@parcel/transformer-raw": "2.9.3", "@parcel/transformer-react-refresh-wrap": "2.9.3", "@parcel/transformer-svg": "2.9.3" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/parcel" }, "peerDependencies": { "@parcel/core": "^2.9.3" } }, "node_modules/@parcel/core": { "version": "2.9.3", "resolved": "https://registry.npmjs.org/@parcel/core/-/core-2.9.3.tgz", "integrity": "sha512-4KlM1Zr/jpsqWuMXr2zmGsaOUs1zMMFh9vfCNKRZkptf+uk8I3sugHbNdo+F5B+4e2yMuOEb1zgAmvJLeuH6ww==", "dev": true, "dependencies": { "@mischnic/json-sourcemap": "^0.1.0", "@parcel/cache": "2.9.3", "@parcel/diagnostic": "2.9.3", "@parcel/events": "2.9.3", "@parcel/fs": "2.9.3", "@parcel/graph": "2.9.3", "@parcel/hash": "2.9.3", "@parcel/logger": "2.9.3", "@parcel/package-manager": "2.9.3", "@parcel/plugin": "2.9.3", "@parcel/profiler": "2.9.3", "@parcel/source-map": "^2.1.1", "@parcel/types": "2.9.3", "@parcel/utils": "2.9.3", "@parcel/workers": "2.9.3", "abortcontroller-polyfill": "^1.1.9", "base-x": "^3.0.8", "browserslist": "^4.6.6", "clone": "^2.1.1", "dotenv": "^7.0.0", "dotenv-expand": "^5.1.0", "json5": "^2.2.0", "msgpackr": "^1.5.4", "nullthrows": "^1.1.1", "semver": "^7.5.2" }, "engines": { "node": ">= 12.0.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/parcel" } }, "node_modules/@parcel/diagnostic": { "version": "2.9.3", "resolved": "https://registry.npmjs.org/@parcel/diagnostic/-/diagnostic-2.9.3.tgz", "integrity": "sha512-6jxBdyB3D7gP4iE66ghUGntWt2v64E6EbD4AetZk+hNJpgudOOPsKTovcMi/i7I4V0qD7WXSF4tvkZUoac0jwA==", "dev": true, "dependencies": { "@mischnic/json-sourcemap": "^0.1.0", "nullthrows": "^1.1.1" }, "engines": { "node": ">= 12.0.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/parcel" } }, "node_modules/@parcel/events": { "version": "2.9.3", "resolved": "https://registry.npmjs.org/@parcel/events/-/events-2.9.3.tgz", "integrity": "sha512-K0Scx+Bx9f9p1vuShMzNwIgiaZUkxEnexaKYHYemJrM7pMAqxIuIqhnvwurRCsZOVLUJPDDNJ626cWTc5vIq+A==", "dev": true, "engines": { "node": ">= 12.0.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/parcel" } }, "node_modules/@parcel/fs": { "version": "2.9.3", "resolved": "https://registry.npmjs.org/@parcel/fs/-/fs-2.9.3.tgz", "integrity": "sha512-/PrRKgCRw22G7rNPSpgN3Q+i2nIkZWuvIOAdMG4KWXC4XLp8C9jarNaWd5QEQ75amjhQSl3oUzABzkdCtkKrgg==", "dev": true, "dependencies": { "@parcel/fs-search": "2.9.3", "@parcel/types": "2.9.3", "@parcel/utils": "2.9.3", "@parcel/watcher": "^2.0.7", "@parcel/workers": "2.9.3" }, "engines": { "node": ">= 12.0.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/parcel" }, "peerDependencies": { "@parcel/core": "^2.9.3" } }, "node_modules/@parcel/fs-search": { "version": "2.9.3", "resolved": "https://registry.npmjs.org/@parcel/fs-search/-/fs-search-2.9.3.tgz", "integrity": "sha512-nsNz3bsOpwS+jphcd+XjZL3F3PDq9lik0O8HPm5f6LYkqKWT+u/kgQzA8OkAHCR3q96LGiHxUywHPEBc27vI4Q==", "dev": true, "engines": { "node": ">= 12.0.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/parcel" } }, "node_modules/@parcel/graph": { "version": "2.9.3", "resolved": "https://registry.npmjs.org/@parcel/graph/-/graph-2.9.3.tgz", "integrity": "sha512-3LmRJmF8+OprAr6zJT3X2s8WAhLKkrhi6RsFlMWHifGU5ED1PFcJWFbOwJvSjcAhMQJP0fErcFIK1Ludv3Vm3g==", "dev": true, "dependencies": { "nullthrows": "^1.1.1" }, "engines": { "node": ">= 12.0.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/parcel" } }, "node_modules/@parcel/hash": { "version": "2.9.3", "resolved": "https://registry.npmjs.org/@parcel/hash/-/hash-2.9.3.tgz", "integrity": "sha512-qlH5B85XLzVAeijgKPjm1gQu35LoRYX/8igsjnN8vOlbc3O8BYAUIutU58fbHbtE8MJPbxQQUw7tkTjeoujcQQ==", "dev": true, "dependencies": { "xxhash-wasm": "^0.4.2" }, "engines": { "node": ">= 12.0.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/parcel" } }, "node_modules/@parcel/logger": { "version": "2.9.3", "resolved": "https://registry.npmjs.org/@parcel/logger/-/logger-2.9.3.tgz", "integrity": "sha512-5FNBszcV6ilGFcijEOvoNVG6IUJGsnMiaEnGQs7Fvc1dktTjEddnoQbIYhcSZL63wEmzBZOgkT5yDMajJ/41jw==", "dev": true, "dependencies": { "@parcel/diagnostic": "2.9.3", "@parcel/events": "2.9.3" }, "engines": { "node": ">= 12.0.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/parcel" } }, "node_modules/@parcel/markdown-ansi": { "version": "2.9.3", "resolved": "https://registry.npmjs.org/@parcel/markdown-ansi/-/markdown-ansi-2.9.3.tgz", "integrity": "sha512-/Q4X8F2aN8UNjAJrQ5NfK2OmZf6shry9DqetUSEndQ0fHonk78WKt6LT0zSKEBEW/bB/bXk6mNMsCup6L8ibjQ==", "dev": true, "dependencies": { "chalk": "^4.1.0" }, "engines": { "node": ">= 12.0.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/parcel" } }, "node_modules/@parcel/namer-default": { "version": "2.9.3", "resolved": "https://registry.npmjs.org/@parcel/namer-default/-/namer-default-2.9.3.tgz", "integrity": "sha512-1ynFEcap48/Ngzwwn318eLYpLUwijuuZoXQPCsEQ21OOIOtfhFQJaPwXTsw6kRitshKq76P2aafE0BioGSqxcA==", "dev": true, "dependencies": { "@parcel/diagnostic": "2.9.3", "@parcel/plugin": "2.9.3", "nullthrows": "^1.1.1" }, "engines": { "node": ">= 12.0.0", "parcel": "^2.9.3" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/parcel" } }, "node_modules/@parcel/node-resolver-core": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/@parcel/node-resolver-core/-/node-resolver-core-3.0.3.tgz", "integrity": "sha512-AjxNcZVHHJoNT/A99PKIdFtwvoze8PAiC3yz8E/dRggrDIOboUEodeQYV5Aq++aK76uz/iOP0tST2T8A5rhb1A==", "dev": true, "dependencies": { "@mischnic/json-sourcemap": "^0.1.0", "@parcel/diagnostic": "2.9.3", "@parcel/fs": "2.9.3", "@parcel/utils": "2.9.3", "nullthrows": "^1.1.1", "semver": "^7.5.2" }, "engines": { "node": ">= 12.0.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/parcel" } }, "node_modules/@parcel/optimizer-css": { "version": "2.9.3", "resolved": "https://registry.npmjs.org/@parcel/optimizer-css/-/optimizer-css-2.9.3.tgz", "integrity": "sha512-RK1QwcSdWDNUsFvuLy0hgnYKtPQebzCb0vPPzqs6LhL+vqUu9utOyRycGaQffHCkHVQP6zGlN+KFssd7YtFGhA==", "dev": true, "dependencies": { "@parcel/diagnostic": "2.9.3", "@parcel/plugin": "2.9.3", "@parcel/source-map": "^2.1.1", "@parcel/utils": "2.9.3", "browserslist": "^4.6.6", "lightningcss": "^1.16.1", "nullthrows": "^1.1.1" }, "engines": { "node": ">= 12.0.0", "parcel": "^2.9.3" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/parcel" } }, "node_modules/@parcel/optimizer-htmlnano": { "version": "2.9.3", "resolved": "https://registry.npmjs.org/@parcel/optimizer-htmlnano/-/optimizer-htmlnano-2.9.3.tgz", "integrity": "sha512-9g/KBck3c6DokmJfvJ5zpHFBiCSolaGrcsTGx8C3YPdCTVTI9P1TDCwUxvAr4LjpcIRSa82wlLCI+nF6sSgxKA==", "dev": true, "dependencies": { "@parcel/plugin": "2.9.3", "htmlnano": "^2.0.0", "nullthrows": "^1.1.1", "posthtml": "^0.16.5", "svgo": "^2.4.0" }, "engines": { "node": ">= 12.0.0", "parcel": "^2.9.3" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/parcel" } }, "node_modules/@parcel/optimizer-htmlnano/node_modules/css-select": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/css-select/-/css-select-4.3.0.tgz", "integrity": "sha512-wPpOYtnsVontu2mODhA19JrqWxNsfdatRKd64kmpRbQgh1KtItko5sTnEpPdpSaJszTOhEMlF/RPz28qj4HqhQ==", "dev": true, "dependencies": { "boolbase": "^1.0.0", "css-what": "^6.0.1", "domhandler": "^4.3.1", "domutils": "^2.8.0", "nth-check": "^2.0.1" }, "funding": { "url": "https://github.com/sponsors/fb55" } }, "node_modules/@parcel/optimizer-htmlnano/node_modules/css-tree": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/css-tree/-/css-tree-1.1.3.tgz", "integrity": "sha512-tRpdppF7TRazZrjJ6v3stzv93qxRcSsFmW6cX0Zm2NVKpxE1WV1HblnghVv9TreireHkqI/VDEsfolRF1p6y7Q==", "dev": true, "dependencies": { "mdn-data": "2.0.14", "source-map": "^0.6.1" }, "engines": { "node": ">=8.0.0" } }, "node_modules/@parcel/optimizer-htmlnano/node_modules/csso": { "version": "4.2.0", "resolved": "https://registry.npmjs.org/csso/-/csso-4.2.0.tgz", "integrity": "sha512-wvlcdIbf6pwKEk7vHj8/Bkc0B4ylXZruLvOgs9doS5eOsOpuodOV2zJChSpkp+pRpYQLQMeF04nr3Z68Sta9jA==", "dev": true, "dependencies": { "css-tree": "^1.1.2" }, "engines": { "node": ">=8.0.0" } }, "node_modules/@parcel/optimizer-htmlnano/node_modules/mdn-data": { "version": "2.0.14", "resolved": "https://registry.npmjs.org/mdn-data/-/mdn-data-2.0.14.tgz", "integrity": "sha512-dn6wd0uw5GsdswPFfsgMp5NSB0/aDe6fK94YJV/AJDYXL6HVLWBsxeq7js7Ad+mU2K9LAlwpk6kN2D5mwCPVow==", "dev": true }, "node_modules/@parcel/optimizer-htmlnano/node_modules/svgo": { "version": "2.8.0", "resolved": "https://registry.npmjs.org/svgo/-/svgo-2.8.0.tgz", "integrity": "sha512-+N/Q9kV1+F+UeWYoSiULYo4xYSDQlTgb+ayMobAXPwMnLvop7oxKMo9OzIrX5x3eS4L4f2UHhc9axXwY8DpChg==", "dev": true, "dependencies": { "@trysound/sax": "0.2.0", "commander": "^7.2.0", "css-select": "^4.1.3", "css-tree": "^1.1.3", "csso": "^4.2.0", "picocolors": "^1.0.0", "stable": "^0.1.8" }, "bin": { "svgo": "bin/svgo" }, "engines": { "node": ">=10.13.0" } }, "node_modules/@parcel/optimizer-image": { "version": "2.9.3", "resolved": "https://registry.npmjs.org/@parcel/optimizer-image/-/optimizer-image-2.9.3.tgz", "integrity": "sha512-530YzthE7kmecnNhPbkAK+26yQNt69pfJrgE0Ev0BZaM1Wu2+33nki7o8qvkTkikhPrurEJLGIXt1qKmbKvCbA==", "dev": true, "dependencies": { "@parcel/diagnostic": "2.9.3", "@parcel/plugin": "2.9.3", "@parcel/utils": "2.9.3", "@parcel/workers": "2.9.3" }, "engines": { "node": ">= 12.0.0", "parcel": "^2.9.3" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/parcel" }, "peerDependencies": { "@parcel/core": "^2.9.3" } }, "node_modules/@parcel/optimizer-svgo": { "version": "2.9.3", "resolved": "https://registry.npmjs.org/@parcel/optimizer-svgo/-/optimizer-svgo-2.9.3.tgz", "integrity": "sha512-ytQS0wY5JJhWU4mL0wfhYDUuHcfuw+Gy2+JcnTm1t1AZXHlOTbU6EzRWNqBShsgXjvdrQQXizAe3B6GFFlFJVQ==", "dev": true, "dependencies": { "@parcel/diagnostic": "2.9.3", "@parcel/plugin": "2.9.3", "@parcel/utils": "2.9.3", "svgo": "^2.4.0" }, "engines": { "node": ">= 12.0.0", "parcel": "^2.9.3" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/parcel" } }, "node_modules/@parcel/optimizer-svgo/node_modules/css-select": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/css-select/-/css-select-4.3.0.tgz", "integrity": "sha512-wPpOYtnsVontu2mODhA19JrqWxNsfdatRKd64kmpRbQgh1KtItko5sTnEpPdpSaJszTOhEMlF/RPz28qj4HqhQ==", "dev": true, "dependencies": { "boolbase": "^1.0.0", "css-what": "^6.0.1", "domhandler": "^4.3.1", "domutils": "^2.8.0", "nth-check": "^2.0.1" }, "funding": { "url": "https://github.com/sponsors/fb55" } }, "node_modules/@parcel/optimizer-svgo/node_modules/css-tree": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/css-tree/-/css-tree-1.1.3.tgz", "integrity": "sha512-tRpdppF7TRazZrjJ6v3stzv93qxRcSsFmW6cX0Zm2NVKpxE1WV1HblnghVv9TreireHkqI/VDEsfolRF1p6y7Q==", "dev": true, "dependencies": { "mdn-data": "2.0.14", "source-map": "^0.6.1" }, "engines": { "node": ">=8.0.0" } }, "node_modules/@parcel/optimizer-svgo/node_modules/csso": { "version": "4.2.0", "resolved": "https://registry.npmjs.org/csso/-/csso-4.2.0.tgz", "integrity": "sha512-wvlcdIbf6pwKEk7vHj8/Bkc0B4ylXZruLvOgs9doS5eOsOpuodOV2zJChSpkp+pRpYQLQMeF04nr3Z68Sta9jA==", "dev": true, "dependencies": { "css-tree": "^1.1.2" }, "engines": { "node": ">=8.0.0" } }, "node_modules/@parcel/optimizer-svgo/node_modules/mdn-data": { "version": "2.0.14", "resolved": "https://registry.npmjs.org/mdn-data/-/mdn-data-2.0.14.tgz", "integrity": "sha512-dn6wd0uw5GsdswPFfsgMp5NSB0/aDe6fK94YJV/AJDYXL6HVLWBsxeq7js7Ad+mU2K9LAlwpk6kN2D5mwCPVow==", "dev": true }, "node_modules/@parcel/optimizer-svgo/node_modules/svgo": { "version": "2.8.0", "resolved": "https://registry.npmjs.org/svgo/-/svgo-2.8.0.tgz", "integrity": "sha512-+N/Q9kV1+F+UeWYoSiULYo4xYSDQlTgb+ayMobAXPwMnLvop7oxKMo9OzIrX5x3eS4L4f2UHhc9axXwY8DpChg==", "dev": true, "dependencies": { "@trysound/sax": "0.2.0", "commander": "^7.2.0", "css-select": "^4.1.3", "css-tree": "^1.1.3", "csso": "^4.2.0", "picocolors": "^1.0.0", "stable": "^0.1.8" }, "bin": { "svgo": "bin/svgo" }, "engines": { "node": ">=10.13.0" } }, "node_modules/@parcel/optimizer-swc": { "version": "2.9.3", "resolved": "https://registry.npmjs.org/@parcel/optimizer-swc/-/optimizer-swc-2.9.3.tgz", "integrity": "sha512-GQINNeqtdpL1ombq/Cpwi6IBk02wKJ/JJbYbyfHtk8lxlq13soenpwOlzJ5T9D2fdG+FUhai9NxpN5Ss4lNoAg==", "dev": true, "dependencies": { "@parcel/diagnostic": "2.9.3", "@parcel/plugin": "2.9.3", "@parcel/source-map": "^2.1.1", "@parcel/utils": "2.9.3", "@swc/core": "^1.3.36", "nullthrows": "^1.1.1" }, "engines": { "node": ">= 12.0.0", "parcel": "^2.9.3" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/parcel" } }, "node_modules/@parcel/package-manager": { "version": "2.9.3", "resolved": "https://registry.npmjs.org/@parcel/package-manager/-/package-manager-2.9.3.tgz", "integrity": "sha512-NH6omcNTEupDmW4Lm1e4NUYBjdqkURxgZ4CNESESInHJe6tblVhNB8Rpr1ar7zDar7cly9ILr8P6N3Ei7bTEjg==", "dev": true, "dependencies": { "@parcel/diagnostic": "2.9.3", "@parcel/fs": "2.9.3", "@parcel/logger": "2.9.3", "@parcel/node-resolver-core": "3.0.3", "@parcel/types": "2.9.3", "@parcel/utils": "2.9.3", "@parcel/workers": "2.9.3", "semver": "^7.5.2" }, "engines": { "node": ">= 12.0.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/parcel" }, "peerDependencies": { "@parcel/core": "^2.9.3" } }, "node_modules/@parcel/packager-css": { "version": "2.9.3", "resolved": "https://registry.npmjs.org/@parcel/packager-css/-/packager-css-2.9.3.tgz", "integrity": "sha512-mePiWiYZOULY6e1RdAIJyRoYqXqGci0srOaVZYaP7mnrzvJgA63kaZFFsDiEWghunQpMUuUjM2x/vQVHzxmhKQ==", "dev": true, "dependencies": { "@parcel/diagnostic": "2.9.3", "@parcel/plugin": "2.9.3", "@parcel/source-map": "^2.1.1", "@parcel/utils": "2.9.3", "nullthrows": "^1.1.1" }, "engines": { "node": ">= 12.0.0", "parcel": "^2.9.3" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/parcel" } }, "node_modules/@parcel/packager-html": { "version": "2.9.3", "resolved": "https://registry.npmjs.org/@parcel/packager-html/-/packager-html-2.9.3.tgz", "integrity": "sha512-0Ex+O0EaZf9APNERRNGgGto02hFJ6f5RQEvRWBK55WAV1rXeU+kpjC0c0qZvnUaUtXfpWMsEBkevJCwDkUMeMg==", "dev": true, "dependencies": { "@parcel/plugin": "2.9.3", "@parcel/types": "2.9.3", "@parcel/utils": "2.9.3", "nullthrows": "^1.1.1", "posthtml": "^0.16.5" }, "engines": { "node": ">= 12.0.0", "parcel": "^2.9.3" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/parcel" } }, "node_modules/@parcel/packager-js": { "version": "2.9.3", "resolved": "https://registry.npmjs.org/@parcel/packager-js/-/packager-js-2.9.3.tgz", "integrity": "sha512-V5xwkoE3zQ3R+WqAWhA1KGQ791FvJeW6KonOlMI1q76Djjgox68hhObqcLu66AmYNhR2R/wUpkP18hP2z8dSFw==", "dev": true, "dependencies": { "@parcel/diagnostic": "2.9.3", "@parcel/hash": "2.9.3", "@parcel/plugin": "2.9.3", "@parcel/source-map": "^2.1.1", "@parcel/utils": "2.9.3", "globals": "^13.2.0", "nullthrows": "^1.1.1" }, "engines": { "node": ">= 12.0.0", "parcel": "^2.9.3" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/parcel" } }, "node_modules/@parcel/packager-raw": { "version": "2.9.3", "resolved": "https://registry.npmjs.org/@parcel/packager-raw/-/packager-raw-2.9.3.tgz", "integrity": "sha512-oPQTNoYanQ2DdJyL61uPYK2py83rKOT8YVh2QWAx0zsSli6Kiy64U3+xOCYWgDVCrHw9+9NpQMuAdSiFg4cq8g==", "dev": true, "dependencies": { "@parcel/plugin": "2.9.3" }, "engines": { "node": ">= 12.0.0", "parcel": "^2.9.3" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/parcel" } }, "node_modules/@parcel/packager-svg": { "version": "2.9.3", "resolved": "https://registry.npmjs.org/@parcel/packager-svg/-/packager-svg-2.9.3.tgz", "integrity": "sha512-p/Ya6UO9DAkaCUFxfFGyeHZDp9YPAlpdnh1OChuwqSFOXFjjeXuoK4KLT+ZRalVBo2Jo8xF70oKMZw4MVvaL7Q==", "dev": true, "dependencies": { "@parcel/plugin": "2.9.3", "@parcel/types": "2.9.3", "@parcel/utils": "2.9.3", "posthtml": "^0.16.4" }, "engines": { "node": ">= 12.0.0", "parcel": "^2.9.3" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/parcel" } }, "node_modules/@parcel/plugin": { "version": "2.9.3", "resolved": "https://registry.npmjs.org/@parcel/plugin/-/plugin-2.9.3.tgz", "integrity": "sha512-qN85Gqr2GMuxX1dT1mnuO9hOcvlEv1lrYrCxn7CJN2nUhbwcfG+LEvcrCzCOJ6XtIHm+ZBV9h9p7FfoPLvpw+g==", "dev": true, "dependencies": { "@parcel/types": "2.9.3" }, "engines": { "node": ">= 12.0.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/parcel" } }, "node_modules/@parcel/profiler": { "version": "2.9.3", "resolved": "https://registry.npmjs.org/@parcel/profiler/-/profiler-2.9.3.tgz", "integrity": "sha512-pyHc9lw8VZDfgZoeZWZU9J0CVEv1Zw9O5+e0DJPDPHuXJYr72ZAOhbljtU3owWKAeW+++Q2AZWkbUGEOjI/e6g==", "dev": true, "dependencies": { "@parcel/diagnostic": "2.9.3", "@parcel/events": "2.9.3", "chrome-trace-event": "^1.0.2" }, "engines": { "node": ">= 12.0.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/parcel" } }, "node_modules/@parcel/reporter-cli": { "version": "2.9.3", "resolved": "https://registry.npmjs.org/@parcel/reporter-cli/-/reporter-cli-2.9.3.tgz", "integrity": "sha512-pZiEvQpuXFuQBafMHxkDmwH8CnnK9sWHwa3bSbsnt385aUahtE8dpY0LKt+K1zfB6degKoczN6aWVj9WycQuZQ==", "dev": true, "dependencies": { "@parcel/plugin": "2.9.3", "@parcel/types": "2.9.3", "@parcel/utils": "2.9.3", "chalk": "^4.1.0", "term-size": "^2.2.1" }, "engines": { "node": ">= 12.0.0", "parcel": "^2.9.3" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/parcel" } }, "node_modules/@parcel/reporter-dev-server": { "version": "2.9.3", "resolved": "https://registry.npmjs.org/@parcel/reporter-dev-server/-/reporter-dev-server-2.9.3.tgz", "integrity": "sha512-s6eboxdLEtRSvG52xi9IiNbcPKC0XMVmvTckieue2EqGDbDcaHQoHmmwkk0rNq0/Z/UxelGcQXoIYC/0xq3ykQ==", "dev": true, "dependencies": { "@parcel/plugin": "2.9.3", "@parcel/utils": "2.9.3" }, "engines": { "node": ">= 12.0.0", "parcel": "^2.9.3" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/parcel" } }, "node_modules/@parcel/reporter-tracer": { "version": "2.9.3", "resolved": "https://registry.npmjs.org/@parcel/reporter-tracer/-/reporter-tracer-2.9.3.tgz", "integrity": "sha512-9cXpKWk0m6d6d+4+TlAdOe8XIPaFEIKGWMWG+5SFAQE08u3olet4PSvd49F4+ZZo5ftRE7YI3j6xNbXvJT8KGw==", "dev": true, "dependencies": { "@parcel/plugin": "2.9.3", "@parcel/utils": "2.9.3", "chrome-trace-event": "^1.0.3", "nullthrows": "^1.1.1" }, "engines": { "node": ">= 12.0.0", "parcel": "^2.9.3" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/parcel" } }, "node_modules/@parcel/resolver-default": { "version": "2.9.3", "resolved": "https://registry.npmjs.org/@parcel/resolver-default/-/resolver-default-2.9.3.tgz", "integrity": "sha512-8ESJk1COKvDzkmOnppNXoDamNMlYVIvrKc2RuFPmp8nKVj47R6NwMgvwxEaatyPzvkmyTpq5RvG9I3HFc+r4Cw==", "dev": true, "dependencies": { "@parcel/node-resolver-core": "3.0.3", "@parcel/plugin": "2.9.3" }, "engines": { "node": ">= 12.0.0", "parcel": "^2.9.3" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/parcel" } }, "node_modules/@parcel/runtime-browser-hmr": { "version": "2.9.3", "resolved": "https://registry.npmjs.org/@parcel/runtime-browser-hmr/-/runtime-browser-hmr-2.9.3.tgz", "integrity": "sha512-EgiDIDrVAWpz7bOzWXqVinQkaFjLwT34wsonpXAbuI7f7r00d52vNAQC9AMu+pTijA3gyKoJ+Q4NWPMZf7ACDA==", "dev": true, "dependencies": { "@parcel/plugin": "2.9.3", "@parcel/utils": "2.9.3" }, "engines": { "node": ">= 12.0.0", "parcel": "^2.9.3" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/parcel" } }, "node_modules/@parcel/runtime-js": { "version": "2.9.3", "resolved": "https://registry.npmjs.org/@parcel/runtime-js/-/runtime-js-2.9.3.tgz", "integrity": "sha512-EvIy+qXcKnB5qxHhe96zmJpSAViNVXHfQI5RSdZ2a7CPwORwhTI+zPNT9sb7xb/WwFw/WuTTgzT40b41DceU6Q==", "dev": true, "dependencies": { "@parcel/diagnostic": "2.9.3", "@parcel/plugin": "2.9.3", "@parcel/utils": "2.9.3", "nullthrows": "^1.1.1" }, "engines": { "node": ">= 12.0.0", "parcel": "^2.9.3" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/parcel" } }, "node_modules/@parcel/runtime-react-refresh": { "version": "2.9.3", "resolved": "https://registry.npmjs.org/@parcel/runtime-react-refresh/-/runtime-react-refresh-2.9.3.tgz", "integrity": "sha512-XBgryZQIyCmi6JwEfMUCmINB3l1TpTp9a2iFxmYNpzHlqj4Ve0saKaqWOVRLvC945ZovWIBzcSW2IYqWKGtbAA==", "dev": true, "dependencies": { "@parcel/plugin": "2.9.3", "@parcel/utils": "2.9.3", "react-error-overlay": "6.0.9", "react-refresh": "^0.9.0" }, "engines": { "node": ">= 12.0.0", "parcel": "^2.9.3" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/parcel" } }, "node_modules/@parcel/runtime-service-worker": { "version": "2.9.3", "resolved": "https://registry.npmjs.org/@parcel/runtime-service-worker/-/runtime-service-worker-2.9.3.tgz", "integrity": "sha512-qLJLqv1mMdWL7gyh8aKBFFAuEiJkhUUgLKpdn6eSfH/R7kTtb76WnOwqUrhvEI9bZFUM/8Pa1bzJnPpqSOM+Sw==", "dev": true, "dependencies": { "@parcel/plugin": "2.9.3", "@parcel/utils": "2.9.3", "nullthrows": "^1.1.1" }, "engines": { "node": ">= 12.0.0", "parcel": "^2.9.3" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/parcel" } }, "node_modules/@parcel/service-worker": { "version": "2.9.3", "resolved": "https://registry.npmjs.org/@parcel/service-worker/-/service-worker-2.9.3.tgz", "integrity": "sha512-Qdcr937GAn7mAmSoE/4xdGOs4Rbe+FCvQpn+7j6+GZXOFdnecQrqvBv5j1kvqAmVmEmgo5x/+oaeGXUJrm+X/A==", "dev": true, "engines": { "node": ">= 12.0.0", "parcel": "^2.9.3" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/parcel" } }, "node_modules/@parcel/source-map": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/@parcel/source-map/-/source-map-2.1.1.tgz", "integrity": "sha512-Ejx1P/mj+kMjQb8/y5XxDUn4reGdr+WyKYloBljpppUy8gs42T+BNoEOuRYqDVdgPc6NxduzIDoJS9pOFfV5Ew==", "dev": true, "dependencies": { "detect-libc": "^1.0.3" }, "engines": { "node": "^12.18.3 || >=14" } }, "node_modules/@parcel/transformer-babel": { "version": "2.9.3", "resolved": "https://registry.npmjs.org/@parcel/transformer-babel/-/transformer-babel-2.9.3.tgz", "integrity": "sha512-pURtEsnsp3h6tOBDuzh9wRvVtw4PgIlqwAArIWdrG7iwqOUYv9D8ME4+ePWEu7MQWAp58hv9pTJtqWv4T+Sq8A==", "dev": true, "dependencies": { "@parcel/diagnostic": "2.9.3", "@parcel/plugin": "2.9.3", "@parcel/source-map": "^2.1.1", "@parcel/utils": "2.9.3", "browserslist": "^4.6.6", "json5": "^2.2.0", "nullthrows": "^1.1.1", "semver": "^7.5.2" }, "engines": { "node": ">= 12.0.0", "parcel": "^2.9.3" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/parcel" } }, "node_modules/@parcel/transformer-css": { "version": "2.9.3", "resolved": "https://registry.npmjs.org/@parcel/transformer-css/-/transformer-css-2.9.3.tgz", "integrity": "sha512-duWMdbEBBPjg3fQdXF16iWIdThetDZvCs2TpUD7xOlXH6kR0V5BJy8ONFT15u1RCqIV9hSNGaS3v3I9YRNY5zQ==", "dev": true, "dependencies": { "@parcel/diagnostic": "2.9.3", "@parcel/plugin": "2.9.3", "@parcel/source-map": "^2.1.1", "@parcel/utils": "2.9.3", "browserslist": "^4.6.6", "lightningcss": "^1.16.1", "nullthrows": "^1.1.1" }, "engines": { "node": ">= 12.0.0", "parcel": "^2.9.3" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/parcel" } }, "node_modules/@parcel/transformer-html": { "version": "2.9.3", "resolved": "https://registry.npmjs.org/@parcel/transformer-html/-/transformer-html-2.9.3.tgz", "integrity": "sha512-0NU4omcHzFXA1seqftAXA2KNZaMByoKaNdXnLgBgtCGDiYvOcL+6xGHgY6pw9LvOh5um10KI5TxSIMILoI7VtA==", "dev": true, "dependencies": { "@parcel/diagnostic": "2.9.3", "@parcel/hash": "2.9.3", "@parcel/plugin": "2.9.3", "nullthrows": "^1.1.1", "posthtml": "^0.16.5", "posthtml-parser": "^0.10.1", "posthtml-render": "^3.0.0", "semver": "^7.5.2", "srcset": "4" }, "engines": { "node": ">= 12.0.0", "parcel": "^2.9.3" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/parcel" } }, "node_modules/@parcel/transformer-html/node_modules/srcset": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/srcset/-/srcset-4.0.0.tgz", "integrity": "sha512-wvLeHgcVHKO8Sc/H/5lkGreJQVeYMm9rlmt8PuR1xE31rIuXhuzznUUqAt8MqLhB3MqJdFzlNAfpcWnxiFUcPw==", "dev": true, "engines": { "node": ">=12" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/@parcel/transformer-image": { "version": "2.9.3", "resolved": "https://registry.npmjs.org/@parcel/transformer-image/-/transformer-image-2.9.3.tgz", "integrity": "sha512-7CEe35RaPadQzLIuxzTtIxnItvOoy46hcbXtOdDt6lmVa4omuOygZYRIya2lsGIP4JHvAaALMb5nt99a1uTwJg==", "dev": true, "dependencies": { "@parcel/plugin": "2.9.3", "@parcel/utils": "2.9.3", "@parcel/workers": "2.9.3", "nullthrows": "^1.1.1" }, "engines": { "node": ">= 12.0.0", "parcel": "^2.9.3" }, "peerDependencies": { "@parcel/core": "^2.9.3" } }, "node_modules/@parcel/transformer-js": { "version": "2.9.3", "resolved": "https://registry.npmjs.org/@parcel/transformer-js/-/transformer-js-2.9.3.tgz", "integrity": "sha512-Z2MVVg5FYcPOfxlUwxqb5l9yjTMEqE3KI3zq2MBRUme6AV07KxLmCDF23b6glzZlHWQUE8MXzYCTAkOPCcPz+Q==", "dev": true, "dependencies": { "@parcel/diagnostic": "2.9.3", "@parcel/plugin": "2.9.3", "@parcel/source-map": "^2.1.1", "@parcel/utils": "2.9.3", "@parcel/workers": "2.9.3", "@swc/helpers": "^0.5.0", "browserslist": "^4.6.6", "nullthrows": "^1.1.1", "regenerator-runtime": "^0.13.7", "semver": "^7.5.2" }, "engines": { "node": ">= 12.0.0", "parcel": "^2.9.3" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/parcel" }, "peerDependencies": { "@parcel/core": "^2.9.3" } }, "node_modules/@parcel/transformer-json": { "version": "2.9.3", "resolved": "https://registry.npmjs.org/@parcel/transformer-json/-/transformer-json-2.9.3.tgz", "integrity": "sha512-yNL27dbOLhkkrjaQjiQ7Im9VOxmkfuuSNSmS0rA3gEjVcm07SLKRzWkAaPnyx44Lb6bzyOTWwVrb9aMmxgADpA==", "dev": true, "dependencies": { "@parcel/plugin": "2.9.3", "json5": "^2.2.0" }, "engines": { "node": ">= 12.0.0", "parcel": "^2.9.3" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/parcel" } }, "node_modules/@parcel/transformer-postcss": { "version": "2.9.3", "resolved": "https://registry.npmjs.org/@parcel/transformer-postcss/-/transformer-postcss-2.9.3.tgz", "integrity": "sha512-HoDvPqKzhpmvMmHqQhDnt8F1vH61m6plpGiYaYnYv2Om4HHi5ZIq9bO+9QLBnTKfaZ7ndYSefTKOxTYElg7wyw==", "dev": true, "dependencies": { "@parcel/diagnostic": "2.9.3", "@parcel/hash": "2.9.3", "@parcel/plugin": "2.9.3", "@parcel/utils": "2.9.3", "clone": "^2.1.1", "nullthrows": "^1.1.1", "postcss-value-parser": "^4.2.0", "semver": "^7.5.2" }, "engines": { "node": ">= 12.0.0", "parcel": "^2.9.3" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/parcel" } }, "node_modules/@parcel/transformer-posthtml": { "version": "2.9.3", "resolved": "https://registry.npmjs.org/@parcel/transformer-posthtml/-/transformer-posthtml-2.9.3.tgz", "integrity": "sha512-2fQGgrzRmaqbWf3y2/T6xhqrNjzqMMKksqJzvc8TMfK6f2kg3Ddjv158eaSW2JdkV39aY7tvAOn5f1uzo74BMA==", "dev": true, "dependencies": { "@parcel/plugin": "2.9.3", "@parcel/utils": "2.9.3", "nullthrows": "^1.1.1", "posthtml": "^0.16.5", "posthtml-parser": "^0.10.1", "posthtml-render": "^3.0.0", "semver": "^7.5.2" }, "engines": { "node": ">= 12.0.0", "parcel": "^2.9.3" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/parcel" } }, "node_modules/@parcel/transformer-raw": { "version": "2.9.3", "resolved": "https://registry.npmjs.org/@parcel/transformer-raw/-/transformer-raw-2.9.3.tgz", "integrity": "sha512-oqdPzMC9QzWRbY9J6TZEqltknjno+dY24QWqf8ondmdF2+W+/2mRDu59hhCzQrqUHgTq4FewowRZmSfpzHxwaQ==", "dev": true, "dependencies": { "@parcel/plugin": "2.9.3" }, "engines": { "node": ">= 12.0.0", "parcel": "^2.9.3" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/parcel" } }, "node_modules/@parcel/transformer-react-refresh-wrap": { "version": "2.9.3", "resolved": "https://registry.npmjs.org/@parcel/transformer-react-refresh-wrap/-/transformer-react-refresh-wrap-2.9.3.tgz", "integrity": "sha512-cb9NyU6oJlDblFIlzqIE8AkvRQVGl2IwJNKwD4PdE7Y6sq2okGEPG4hOw3k/Y9JVjM4/2pUORqvjSRhWwd9oVQ==", "dev": true, "dependencies": { "@parcel/plugin": "2.9.3", "@parcel/utils": "2.9.3", "react-refresh": "^0.9.0" }, "engines": { "node": ">= 12.0.0", "parcel": "^2.9.3" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/parcel" } }, "node_modules/@parcel/transformer-svg": { "version": "2.9.3", "resolved": "https://registry.npmjs.org/@parcel/transformer-svg/-/transformer-svg-2.9.3.tgz", "integrity": "sha512-ypmE+dzB09IMCdEAkOsSxq1dEIm2A3h67nAFz4qbfHbwNgXBUuy/jB3ZMwXN/cO0f7SBh/Ap8Jhq6vmGqB5tWw==", "dev": true, "dependencies": { "@parcel/diagnostic": "2.9.3", "@parcel/hash": "2.9.3", "@parcel/plugin": "2.9.3", "nullthrows": "^1.1.1", "posthtml": "^0.16.5", "posthtml-parser": "^0.10.1", "posthtml-render": "^3.0.0", "semver": "^7.5.2" }, "engines": { "node": ">= 12.0.0", "parcel": "^2.9.3" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/parcel" } }, "node_modules/@parcel/types": { "version": "2.9.3", "resolved": "https://registry.npmjs.org/@parcel/types/-/types-2.9.3.tgz", "integrity": "sha512-NSNY8sYtRhvF1SqhnIGgGvJocyWt1K8Tnw5cVepm0g38ywtX6mwkBvMkmeehXkII4mSUn+frD9wGsydTunezvA==", "dev": true, "dependencies": { "@parcel/cache": "2.9.3", "@parcel/diagnostic": "2.9.3", "@parcel/fs": "2.9.3", "@parcel/package-manager": "2.9.3", "@parcel/source-map": "^2.1.1", "@parcel/workers": "2.9.3", "utility-types": "^3.10.0" } }, "node_modules/@parcel/utils": { "version": "2.9.3", "resolved": "https://registry.npmjs.org/@parcel/utils/-/utils-2.9.3.tgz", "integrity": "sha512-cesanjtj/oLehW8Waq9JFPmAImhoiHX03ihc3JTWkrvJYSbD7wYKCDgPAM3JiRAqvh1LZ6P699uITrYWNoRLUg==", "dev": true, "dependencies": { "@parcel/codeframe": "2.9.3", "@parcel/diagnostic": "2.9.3", "@parcel/hash": "2.9.3", "@parcel/logger": "2.9.3", "@parcel/markdown-ansi": "2.9.3", "@parcel/source-map": "^2.1.1", "chalk": "^4.1.0", "nullthrows": "^1.1.1" }, "engines": { "node": ">= 12.0.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/parcel" } }, "node_modules/@parcel/watcher": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/@parcel/watcher/-/watcher-2.3.0.tgz", "integrity": "sha512-pW7QaFiL11O0BphO+bq3MgqeX/INAk9jgBldVDYjlQPO4VddoZnF22TcF9onMhnLVHuNqBJeRf+Fj7eezi/+rQ==", "dev": true, "hasInstallScript": true, "dependencies": { "detect-libc": "^1.0.3", "is-glob": "^4.0.3", "micromatch": "^4.0.5", "node-addon-api": "^7.0.0" }, "engines": { "node": ">= 10.0.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/parcel" }, "optionalDependencies": { "@parcel/watcher-android-arm64": "2.3.0", "@parcel/watcher-darwin-arm64": "2.3.0", "@parcel/watcher-darwin-x64": "2.3.0", "@parcel/watcher-freebsd-x64": "2.3.0", "@parcel/watcher-linux-arm-glibc": "2.3.0", "@parcel/watcher-linux-arm64-glibc": "2.3.0", "@parcel/watcher-linux-arm64-musl": "2.3.0", "@parcel/watcher-linux-x64-glibc": "2.3.0", "@parcel/watcher-linux-x64-musl": "2.3.0", "@parcel/watcher-win32-arm64": "2.3.0", "@parcel/watcher-win32-ia32": "2.3.0", "@parcel/watcher-win32-x64": "2.3.0" } }, "node_modules/@parcel/watcher-android-arm64": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/@parcel/watcher-android-arm64/-/watcher-android-arm64-2.3.0.tgz", "integrity": "sha512-f4o9eA3dgk0XRT3XhB0UWpWpLnKgrh1IwNJKJ7UJek7eTYccQ8LR7XUWFKqw6aEq5KUNlCcGvSzKqSX/vtWVVA==", "cpu": [ "arm64" ], "dev": true, "optional": true, "os": [ "android" ], "engines": { "node": ">= 10.0.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/parcel" } }, "node_modules/@parcel/watcher-darwin-arm64": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/@parcel/watcher-darwin-arm64/-/watcher-darwin-arm64-2.3.0.tgz", "integrity": "sha512-mKY+oijI4ahBMc/GygVGvEdOq0L4DxhYgwQqYAz/7yPzuGi79oXrZG52WdpGA1wLBPrYb0T8uBaGFo7I6rvSKw==", "cpu": [ "arm64" ], "dev": true, "optional": true, "os": [ "darwin" ], "engines": { "node": ">= 10.0.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/parcel" } }, "node_modules/@parcel/watcher-darwin-x64": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/@parcel/watcher-darwin-x64/-/watcher-darwin-x64-2.3.0.tgz", "integrity": "sha512-20oBj8LcEOnLE3mgpy6zuOq8AplPu9NcSSSfyVKgfOhNAc4eF4ob3ldj0xWjGGbOF7Dcy1Tvm6ytvgdjlfUeow==", "cpu": [ "x64" ], "dev": true, "optional": true, "os": [ "darwin" ], "engines": { "node": ">= 10.0.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/parcel" } }, "node_modules/@parcel/watcher-freebsd-x64": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/@parcel/watcher-freebsd-x64/-/watcher-freebsd-x64-2.3.0.tgz", "integrity": "sha512-7LftKlaHunueAEiojhCn+Ef2CTXWsLgTl4hq0pkhkTBFI3ssj2bJXmH2L67mKpiAD5dz66JYk4zS66qzdnIOgw==", "cpu": [ "x64" ], "dev": true, "optional": true, "os": [ "freebsd" ], "engines": { "node": ">= 10.0.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/parcel" } }, "node_modules/@parcel/watcher-linux-arm-glibc": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/@parcel/watcher-linux-arm-glibc/-/watcher-linux-arm-glibc-2.3.0.tgz", "integrity": "sha512-1apPw5cD2xBv1XIHPUlq0cO6iAaEUQ3BcY0ysSyD9Kuyw4MoWm1DV+W9mneWI+1g6OeP6dhikiFE6BlU+AToTQ==", "cpu": [ "arm" ], "dev": true, "optional": true, "os": [ "linux" ], "engines": { "node": ">= 10.0.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/parcel" } }, "node_modules/@parcel/watcher-linux-arm64-glibc": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/@parcel/watcher-linux-arm64-glibc/-/watcher-linux-arm64-glibc-2.3.0.tgz", "integrity": "sha512-mQ0gBSQEiq1k/MMkgcSB0Ic47UORZBmWoAWlMrTW6nbAGoLZP+h7AtUM7H3oDu34TBFFvjy4JCGP43JlylkTQA==", "cpu": [ "arm64" ], "dev": true, "optional": true, "os": [ "linux" ], "engines": { "node": ">= 10.0.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/parcel" } }, "node_modules/@parcel/watcher-linux-arm64-musl": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/@parcel/watcher-linux-arm64-musl/-/watcher-linux-arm64-musl-2.3.0.tgz", "integrity": "sha512-LXZAExpepJew0Gp8ZkJ+xDZaTQjLHv48h0p0Vw2VMFQ8A+RKrAvpFuPVCVwKJCr5SE+zvaG+Etg56qXvTDIedw==", "cpu": [ "arm64" ], "dev": true, "optional": true, "os": [ "linux" ], "engines": { "node": ">= 10.0.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/parcel" } }, "node_modules/@parcel/watcher-linux-x64-glibc": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/@parcel/watcher-linux-x64-glibc/-/watcher-linux-x64-glibc-2.3.0.tgz", "integrity": "sha512-P7Wo91lKSeSgMTtG7CnBS6WrA5otr1K7shhSjKHNePVmfBHDoAOHYRXgUmhiNfbcGk0uMCHVcdbfxtuiZCHVow==", "cpu": [ "x64" ], "dev": true, "optional": true, "os": [ "linux" ], "engines": { "node": ">= 10.0.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/parcel" } }, "node_modules/@parcel/watcher-linux-x64-musl": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/@parcel/watcher-linux-x64-musl/-/watcher-linux-x64-musl-2.3.0.tgz", "integrity": "sha512-+kiRE1JIq8QdxzwoYY+wzBs9YbJ34guBweTK8nlzLKimn5EQ2b2FSC+tAOpq302BuIMjyuUGvBiUhEcLIGMQ5g==", "cpu": [ "x64" ], "dev": true, "optional": true, "os": [ "linux" ], "engines": { "node": ">= 10.0.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/parcel" } }, "node_modules/@parcel/watcher-win32-arm64": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/@parcel/watcher-win32-arm64/-/watcher-win32-arm64-2.3.0.tgz", "integrity": "sha512-35gXCnaz1AqIXpG42evcoP2+sNL62gZTMZne3IackM+6QlfMcJLy3DrjuL6Iks7Czpd3j4xRBzez3ADCj1l7Aw==", "cpu": [ "arm64" ], "dev": true, "optional": true, "os": [ "win32" ], "engines": { "node": ">= 10.0.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/parcel" } }, "node_modules/@parcel/watcher-win32-ia32": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/@parcel/watcher-win32-ia32/-/watcher-win32-ia32-2.3.0.tgz", "integrity": "sha512-FJS/IBQHhRpZ6PiCjFt1UAcPr0YmCLHRbTc00IBTrelEjlmmgIVLeOx4MSXzx2HFEy5Jo5YdhGpxCuqCyDJ5ow==", "cpu": [ "ia32" ], "dev": true, "optional": true, "os": [ "win32" ], "engines": { "node": ">= 10.0.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/parcel" } }, "node_modules/@parcel/watcher-win32-x64": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/@parcel/watcher-win32-x64/-/watcher-win32-x64-2.3.0.tgz", "integrity": "sha512-dLx+0XRdMnVI62kU3wbXvbIRhLck4aE28bIGKbRGS7BJNt54IIj9+c/Dkqb+7DJEbHUZAX1bwaoM8PqVlHJmCA==", "cpu": [ "x64" ], "dev": true, "optional": true, "os": [ "win32" ], "engines": { "node": ">= 10.0.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/parcel" } }, "node_modules/@parcel/workers": { "version": "2.9.3", "resolved": "https://registry.npmjs.org/@parcel/workers/-/workers-2.9.3.tgz", "integrity": "sha512-zRrDuZJzTevrrwElYosFztgldhqW6G9q5zOeQXfVQFkkEJCNfg36ixeiofKRU8uu2x+j+T6216mhMNB6HiuY+w==", "dev": true, "dependencies": { "@parcel/diagnostic": "2.9.3", "@parcel/logger": "2.9.3", "@parcel/profiler": "2.9.3", "@parcel/types": "2.9.3", "@parcel/utils": "2.9.3", "nullthrows": "^1.1.1" }, "engines": { "node": ">= 12.0.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/parcel" }, "peerDependencies": { "@parcel/core": "^2.9.3" } }, "node_modules/@shikijs/engine-oniguruma": { "version": "3.23.0", "resolved": "https://registry.npmjs.org/@shikijs/engine-oniguruma/-/engine-oniguruma-3.23.0.tgz", "integrity": "sha512-1nWINwKXxKKLqPibT5f4pAFLej9oZzQTsby8942OTlsJzOBZ0MWKiwzMsd+jhzu8YPCHAswGnnN1YtQfirL35g==", "dev": true, "dependencies": { "@shikijs/types": "3.23.0", "@shikijs/vscode-textmate": "^10.0.2" } }, "node_modules/@shikijs/langs": { "version": "3.23.0", "resolved": "https://registry.npmjs.org/@shikijs/langs/-/langs-3.23.0.tgz", "integrity": "sha512-2Ep4W3Re5aB1/62RSYQInK9mM3HsLeB91cHqznAJMuylqjzNVAVCMnNWRHFtcNHXsoNRayP9z1qj4Sq3nMqYXg==", "dev": true, "dependencies": { "@shikijs/types": "3.23.0" } }, "node_modules/@shikijs/themes": { "version": "3.23.0", "resolved": "https://registry.npmjs.org/@shikijs/themes/-/themes-3.23.0.tgz", "integrity": "sha512-5qySYa1ZgAT18HR/ypENL9cUSGOeI2x+4IvYJu4JgVJdizn6kG4ia5Q1jDEOi7gTbN4RbuYtmHh0W3eccOrjMA==", "dev": true, "dependencies": { "@shikijs/types": "3.23.0" } }, "node_modules/@shikijs/types": { "version": "3.23.0", "resolved": "https://registry.npmjs.org/@shikijs/types/-/types-3.23.0.tgz", "integrity": "sha512-3JZ5HXOZfYjsYSk0yPwBrkupyYSLpAE26Qc0HLghhZNGTZg/SKxXIIgoxOpmmeQP0RRSDJTk1/vPfw9tbw+jSQ==", "dev": true, "dependencies": { "@shikijs/vscode-textmate": "^10.0.2", "@types/hast": "^3.0.4" } }, "node_modules/@shikijs/vscode-textmate": { "version": "10.0.2", "resolved": "https://registry.npmjs.org/@shikijs/vscode-textmate/-/vscode-textmate-10.0.2.tgz", "integrity": "sha512-83yeghZ2xxin3Nj8z1NMd/NCuca+gsYXswywDy5bHvwlWL8tpTQmzGeUuHd9FC3E/SBEMvzJRwWEOz5gGes9Qg==", "dev": true }, "node_modules/@swc/core": { "version": "1.3.82", "resolved": "https://registry.npmjs.org/@swc/core/-/core-1.3.82.tgz", "integrity": "sha512-jpC1a18HMH67018Ij2jh+hT7JBFu7ZKcQVfrZ8K6JuEY+kjXmbea07P9MbQUZbAe0FB+xi3CqEVCP73MebodJQ==", "dev": true, "hasInstallScript": true, "dependencies": { "@swc/types": "^0.1.4" }, "engines": { "node": ">=10" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/swc" }, "optionalDependencies": { "@swc/core-darwin-arm64": "1.3.82", "@swc/core-darwin-x64": "1.3.82", "@swc/core-linux-arm-gnueabihf": "1.3.82", "@swc/core-linux-arm64-gnu": "1.3.82", "@swc/core-linux-arm64-musl": "1.3.82", "@swc/core-linux-x64-gnu": "1.3.82", "@swc/core-linux-x64-musl": "1.3.82", "@swc/core-win32-arm64-msvc": "1.3.82", "@swc/core-win32-ia32-msvc": "1.3.82", "@swc/core-win32-x64-msvc": "1.3.82" }, "peerDependencies": { "@swc/helpers": "^0.5.0" }, "peerDependenciesMeta": { "@swc/helpers": { "optional": true } } }, "node_modules/@swc/core-darwin-arm64": { "version": "1.3.82", "resolved": "https://registry.npmjs.org/@swc/core-darwin-arm64/-/core-darwin-arm64-1.3.82.tgz", "integrity": "sha512-JfsyDW34gVKD3uE0OUpUqYvAD3yseEaicnFP6pB292THtLJb0IKBBnK50vV/RzEJtc1bR3g1kNfxo2PeurZTrA==", "cpu": [ "arm64" ], "dev": true, "optional": true, "os": [ "darwin" ], "engines": { "node": ">=10" } }, "node_modules/@swc/core-darwin-x64": { "version": "1.3.82", "resolved": "https://registry.npmjs.org/@swc/core-darwin-x64/-/core-darwin-x64-1.3.82.tgz", "integrity": "sha512-ogQWgNMq7qTpITjcP3dnzkFNj7bh6SwMr859GvtOTrE75H7L7jDWxESfH4f8foB/LGxBKiDNmxKhitCuAsZK4A==", "cpu": [ "x64" ], "dev": true, "optional": true, "os": [ "darwin" ], "engines": { "node": ">=10" } }, "node_modules/@swc/core-linux-arm-gnueabihf": { "version": "1.3.82", "resolved": "https://registry.npmjs.org/@swc/core-linux-arm-gnueabihf/-/core-linux-arm-gnueabihf-1.3.82.tgz", "integrity": "sha512-7TMXG1lXlNhD0kUiEqs+YlGV4irAdBa2quuy+XI3oJf2fBK6dQfEq4xBy65B3khrorzQS3O0oDGQ+cmdpHExHA==", "cpu": [ "arm" ], "dev": true, "optional": true, "os": [ "linux" ], "engines": { "node": ">=10" } }, "node_modules/@swc/core-linux-arm64-gnu": { "version": "1.3.82", "resolved": "https://registry.npmjs.org/@swc/core-linux-arm64-gnu/-/core-linux-arm64-gnu-1.3.82.tgz", "integrity": "sha512-26JkOujbzcItPAmIbD5vHJxQVy5ihcSu3YHTKwope1h28sApZdtE7S3e2G3gsZRTIdsCQkXUtAQeqHxGWWR3pw==", "cpu": [ "arm64" ], "dev": true, "optional": true, "os": [ "linux" ], "engines": { "node": ">=10" } }, "node_modules/@swc/core-linux-arm64-musl": { "version": "1.3.82", "resolved": "https://registry.npmjs.org/@swc/core-linux-arm64-musl/-/core-linux-arm64-musl-1.3.82.tgz", "integrity": "sha512-8Izj9tuuMpoc3cqiPBRtwqpO1BZ/+sfZVsEhLxrbOFlcSb8LnKyMle1g3JMMUwI4EU75RGVIzZMn8A6GOKdJbA==", "cpu": [ "arm64" ], "dev": true, "optional": true, "os": [ "linux" ], "engines": { "node": ">=10" } }, "node_modules/@swc/core-linux-x64-gnu": { "version": "1.3.82", "resolved": "https://registry.npmjs.org/@swc/core-linux-x64-gnu/-/core-linux-x64-gnu-1.3.82.tgz", "integrity": "sha512-0GSrIBScQwTaPv46T2qB7XnDYxndRCpwH4HMjh6FN+I+lfPUhTSJKW8AonqrqT1TbpFIgvzQs7EnTsD7AnSCow==", "cpu": [ "x64" ], "dev": true, "optional": true, "os": [ "linux" ], "engines": { "node": ">=10" } }, "node_modules/@swc/core-linux-x64-musl": { "version": "1.3.82", "resolved": "https://registry.npmjs.org/@swc/core-linux-x64-musl/-/core-linux-x64-musl-1.3.82.tgz", "integrity": "sha512-KJUnaaepDKNzrEbwz4jv0iC3/t9x0NSoe06fnkAlhh2+NFKWKKJhVCOBTrpds8n7eylBDIXUlK34XQafjVMUdg==", "cpu": [ "x64" ], "dev": true, "optional": true, "os": [ "linux" ], "engines": { "node": ">=10" } }, "node_modules/@swc/core-win32-arm64-msvc": { "version": "1.3.82", "resolved": "https://registry.npmjs.org/@swc/core-win32-arm64-msvc/-/core-win32-arm64-msvc-1.3.82.tgz", "integrity": "sha512-TR3MHKhDYIyGyFcyl2d/p1ftceXcubAhX5wRSOdtOyr5+K/v3jbyCCqN7bbqO5o43wQVCwwR/drHleYyDZvg8Q==", "cpu": [ "arm64" ], "dev": true, "optional": true, "os": [ "win32" ], "engines": { "node": ">=10" } }, "node_modules/@swc/core-win32-ia32-msvc": { "version": "1.3.82", "resolved": "https://registry.npmjs.org/@swc/core-win32-ia32-msvc/-/core-win32-ia32-msvc-1.3.82.tgz", "integrity": "sha512-ZX4HzVVt6hs84YUg70UvyBJnBOIspmQQM0iXSzBvOikk3zRoN7BnDwQH4GScvevCEBuou60+i4I6d5kHLOfh8Q==", "cpu": [ "ia32" ], "dev": true, "optional": true, "os": [ "win32" ], "engines": { "node": ">=10" } }, "node_modules/@swc/core-win32-x64-msvc": { "version": "1.3.82", "resolved": "https://registry.npmjs.org/@swc/core-win32-x64-msvc/-/core-win32-x64-msvc-1.3.82.tgz", "integrity": "sha512-4mJMnex21kbQoaHeAmHnVwQN9/XAfPszJ6n9HI7SVH+aAHnbBIR0M59/b50/CJMjTj5niUGk7EwQ3nhVNOG32g==", "cpu": [ "x64" ], "dev": true, "optional": true, "os": [ "win32" ], "engines": { "node": ">=10" } }, "node_modules/@swc/helpers": { "version": "0.5.1", "resolved": "https://registry.npmjs.org/@swc/helpers/-/helpers-0.5.1.tgz", "integrity": "sha512-sJ902EfIzn1Fa+qYmjdQqh8tPsoxyBz+8yBKC2HKUxyezKJFwPGOn7pv4WY6QuQW//ySQi5lJjA/ZT9sNWWNTg==", "dev": true, "dependencies": { "tslib": "^2.4.0" } }, "node_modules/@swc/types": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/@swc/types/-/types-0.1.4.tgz", "integrity": "sha512-z/G02d+59gyyUb7KYhKi9jOhicek6QD2oMaotUyG+lUkybpXoV49dY9bj7Ah5Q+y7knK2jU67UTX9FyfGzaxQg==", "dev": true }, "node_modules/@trysound/sax": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/@trysound/sax/-/sax-0.2.0.tgz", "integrity": "sha512-L7z9BgrNEcYyUYtF+HaEfiS5ebkh9jXqbszz7pC0hRBPaatV0XjSD3+eHrpqFemQfgwiFF0QPIarnIihIDn7OA==", "dev": true, "engines": { "node": ">=10.13.0" } }, "node_modules/@tsconfig/node10": { "version": "1.0.9", "resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.9.tgz", "integrity": "sha512-jNsYVVxU8v5g43Erja32laIDHXeoNvFEpX33OK4d6hljo3jDhCBDhx5dhCCTMWUojscpAagGiRkBKxpdl9fxqA==", "dev": true }, "node_modules/@tsconfig/node12": { "version": "1.0.11", "resolved": "https://registry.npmjs.org/@tsconfig/node12/-/node12-1.0.11.tgz", "integrity": "sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag==", "dev": true }, "node_modules/@tsconfig/node14": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/@tsconfig/node14/-/node14-1.0.3.tgz", "integrity": "sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow==", "dev": true }, "node_modules/@tsconfig/node16": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/@tsconfig/node16/-/node16-1.0.4.tgz", "integrity": "sha512-vxhUy4J8lyeyinH7Azl1pdd43GJhZH/tP2weN8TntQblOY+A0XbT8DJk1/oCPuOOyg/Ja757rG0CgHcWC8OfMA==", "dev": true }, "node_modules/@types/hast": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/@types/hast/-/hast-3.0.4.tgz", "integrity": "sha512-WPs+bbQw5aCj+x6laNGWLH3wviHtoCv/P3+otBhbOhJgG8qtpdAMlTCxLtsTWA7LH1Oh/bFCHsBn0TPS5m30EQ==", "dev": true, "dependencies": { "@types/unist": "*" } }, "node_modules/@types/node": { "version": "25.8.0", "resolved": "https://registry.npmjs.org/@types/node/-/node-25.8.0.tgz", "integrity": "sha512-TCFSk8IZh+iLX1xtksoBVtdmgL+1IX0fC9BeU4QqFSuNdN/K+HUlhqOzEmSYYpZUVsLYcPqc9KX+60iDuninSQ==", "dev": true, "dependencies": { "undici-types": ">=7.24.0 <7.24.7" } }, "node_modules/@types/pako": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/@types/pako/-/pako-2.0.0.tgz", "integrity": "sha512-10+iaz93qR5WYxTo+PMifD5TSxiOtdRaxBf7INGGXMQgTCu8Z/7GYWYFUOS3q/G0nE5boj1r4FEB+WSy7s5gbA==", "dev": true }, "node_modules/@types/parse-json": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/@types/parse-json/-/parse-json-4.0.0.tgz", "integrity": "sha512-//oorEZjL6sbPcKUaCdIGlIUeH26mgzimjBB77G6XRgnDl/L5wOnpyBGRe/Mmf5CVW3PwEBE1NjiMZ/ssFh4wA==", "dev": true }, "node_modules/@types/prop-types": { "version": "15.7.5", "resolved": "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.5.tgz", "integrity": "sha512-JCB8C6SnDoQf0cNycqd/35A7MjcnK+ZTqE7judS6o7utxUCg6imJg3QK2qzHKszlTjcj2cn+NwMB2i96ubpj7w==", "dev": true }, "node_modules/@types/react": { "version": "18.2.21", "resolved": "https://registry.npmjs.org/@types/react/-/react-18.2.21.tgz", "integrity": "sha512-neFKG/sBAwGxHgXiIxnbm3/AAVQ/cMRS93hvBpg8xYRbeQSPVABp9U2bRnPf0iI4+Ucdv3plSxKK+3CW2ENJxA==", "dev": true, "dependencies": { "@types/prop-types": "*", "@types/scheduler": "*", "csstype": "^3.0.2" } }, "node_modules/@types/react-dom": { "version": "18.2.7", "resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-18.2.7.tgz", "integrity": "sha512-GRaAEriuT4zp9N4p1i8BDBYmEyfo+xQ3yHjJU4eiK5NDa1RmUZG+unZABUTK4/Ox/M+GaHwb6Ow8rUITrtjszA==", "dev": true, "dependencies": { "@types/react": "*" } }, "node_modules/@types/scheduler": { "version": "0.16.3", "resolved": "https://registry.npmjs.org/@types/scheduler/-/scheduler-0.16.3.tgz", "integrity": "sha512-5cJ8CB4yAx7BH1oMvdU0Jh9lrEXyPkar6F9G/ERswkCuvP4KQZfZkSjcMbAICCpQTN4OuZn8tz0HiKv9TGZgrQ==", "dev": true }, "node_modules/@types/unist": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/@types/unist/-/unist-3.0.3.tgz", "integrity": "sha512-ko/gIFJRv177XgZsZcBwnqJN5x/Gien8qNOn0D5bQU/zAzVf9Zt3BlcUiLqhV9y4ARk0GbT3tnUiPNgnTXzc/Q==", "dev": true }, "node_modules/abortcontroller-polyfill": { "version": "1.7.5", "resolved": "https://registry.npmjs.org/abortcontroller-polyfill/-/abortcontroller-polyfill-1.7.5.tgz", "integrity": "sha512-JMJ5soJWP18htbbxJjG7bG6yuI6pRhgJ0scHHTfkUjf6wjP912xZWvM+A4sJK3gqd9E8fcPbDnOefbA9Th/FIQ==", "dev": true }, "node_modules/acorn": { "version": "8.16.0", "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.16.0.tgz", "integrity": "sha512-UVJyE9MttOsBQIDKw1skb9nAwQuR5wuGD3+82K6JgJlm/Y+KI92oNsMNGZCYdDsVtRHSak0pcV5Dno5+4jh9sw==", "dev": true, "license": "MIT", "bin": { "acorn": "bin/acorn" }, "engines": { "node": ">=0.4.0" } }, "node_modules/acorn-walk": { "version": "8.2.0", "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.2.0.tgz", "integrity": "sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA==", "dev": true, "engines": { "node": ">=0.4.0" } }, "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==", "dev": true, "dependencies": { "color-convert": "^2.0.1" }, "engines": { "node": ">=8" }, "funding": { "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, "node_modules/arg": { "version": "4.1.3", "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz", "integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==", "dev": true }, "node_modules/argparse": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", "dev": true }, "node_modules/balanced-match": { "version": "4.0.4", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-4.0.4.tgz", "integrity": "sha512-BLrgEcRTwX2o6gGxGOCNyMvGSp35YofuYzw9h1IMTRmKqttAZZVU67bdb9Pr2vUHA8+j3i2tJfjO6C6+4myGTA==", "dev": true, "engines": { "node": "18 || 20 || >=22" } }, "node_modules/base-x": { "version": "3.0.9", "resolved": "https://registry.npmjs.org/base-x/-/base-x-3.0.9.tgz", "integrity": "sha512-H7JU6iBHTal1gp56aKoaa//YUxEaAOUiydvrV/pILqIHXTtqxSkATOnDA2u+jZ/61sD+L/412+7kzXRtWukhpQ==", "dev": true, "dependencies": { "safe-buffer": "^5.0.1" } }, "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==", "dev": true }, "node_modules/brace-expansion": { "version": "5.0.6", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.6.tgz", "integrity": "sha512-kLpxurY4Z4r9sgMsyG0Z9uzsBlgiU/EFKhj/h91/8yHu0edo7XuixOIH3VcJ8kkxs6/jPzoI6U9Vj3WqbMQ94g==", "dev": true, "dependencies": { "balanced-match": "^4.0.2" }, "engines": { "node": "18 || 20 || >=22" } }, "node_modules/braces": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", "dev": true, "dependencies": { "fill-range": "^7.0.1" }, "engines": { "node": ">=8" } }, "node_modules/browserslist": { "version": "4.21.10", "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.21.10.tgz", "integrity": "sha512-bipEBdZfVH5/pwrvqc+Ub0kUPVfGUhlKxbvfD+z1BDnPEO/X98ruXGA1WP5ASpAFKan7Qr6j736IacbZQuAlKQ==", "dev": true, "funding": [ { "type": "opencollective", "url": "https://opencollective.com/browserslist" }, { "type": "tidelift", "url": "https://tidelift.com/funding/github/npm/browserslist" }, { "type": "github", "url": "https://github.com/sponsors/ai" } ], "dependencies": { "caniuse-lite": "^1.0.30001517", "electron-to-chromium": "^1.4.477", "node-releases": "^2.0.13", "update-browserslist-db": "^1.0.11" }, "bin": { "browserslist": "cli.js" }, "engines": { "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" } }, "node_modules/buffer-from": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", "dev": true }, "node_modules/callsites": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", "dev": true, "engines": { "node": ">=6" } }, "node_modules/caniuse-lite": { "version": "1.0.30001792", "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001792.tgz", "integrity": "sha512-hVLMUZFgR4JJ6ACt1uEESvQN1/dBVqPAKY0hgrV70eN3391K6juAfTjKZLKvOMsx8PxA7gsY1/tLMMTcfFLLpw==", "dev": true, "funding": [ { "type": "opencollective", "url": "https://opencollective.com/browserslist" }, { "type": "tidelift", "url": "https://tidelift.com/funding/github/npm/caniuse-lite" }, { "type": "github", "url": "https://github.com/sponsors/ai" } ], "license": "CC-BY-4.0" }, "node_modules/chalk": { "version": "4.1.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", "dev": true, "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/chrome-trace-event": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/chrome-trace-event/-/chrome-trace-event-1.0.3.tgz", "integrity": "sha512-p3KULyQg4S7NIHixdwbGX+nFHkoBiA4YQmyWtjb8XngSKV124nJmRysgAeujbUVb15vh+RvFUfCPqU7rXk+hZg==", "dev": true, "engines": { "node": ">=6.0" } }, "node_modules/clone": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/clone/-/clone-2.1.2.tgz", "integrity": "sha512-3Pe/CF1Nn94hyhIYpjtiLhdCoEoz0DqQ+988E9gmeEdQZlojxnOb74wctFyuwWQHzqyf9X7C7MG8juUpqBJT8w==", "dev": true, "engines": { "node": ">=0.8" } }, "node_modules/color-convert": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", "dev": true, "dependencies": { "color-name": "~1.1.4" }, "engines": { "node": ">=7.0.0" } }, "node_modules/color-name": { "version": "1.1.4", "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", "dev": true }, "node_modules/commander": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/commander/-/commander-7.2.0.tgz", "integrity": "sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw==", "dev": true, "engines": { "node": ">= 10" } }, "node_modules/core-util-is": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz", "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==", "dev": true }, "node_modules/cosmiconfig": { "version": "7.1.0", "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-7.1.0.tgz", "integrity": "sha512-AdmX6xUzdNASswsFtmwSt7Vj8po9IuqXm0UXz7QKPuEUmPB4XyjGfaAr2PSuELMwkRMVH1EpIkX5bTZGRB3eCA==", "dev": true, "dependencies": { "@types/parse-json": "^4.0.0", "import-fresh": "^3.2.1", "parse-json": "^5.0.0", "path-type": "^4.0.0", "yaml": "^1.10.0" }, "engines": { "node": ">=10" } }, "node_modules/create-require": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz", "integrity": "sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==", "dev": true }, "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==", "dev": true, "engines": { "node": ">= 6" }, "funding": { "url": "https://github.com/sponsors/fb55" } }, "node_modules/csstype": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.1.2.tgz", "integrity": "sha512-I7K1Uu0MBPzaFKg4nI5Q7Vs2t+3gWWW648spaF+Rg7pI9ds18Ugn+lvg4SHczUdKlHI5LWBXyqfS8+DufyBsgQ==", "dev": true }, "node_modules/debug": { "version": "4.3.4", "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", "dev": true, "dependencies": { "ms": "2.1.2" }, "engines": { "node": ">=6.0" }, "peerDependenciesMeta": { "supports-color": { "optional": true } } }, "node_modules/dequal": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/dequal/-/dequal-2.0.3.tgz", "integrity": "sha512-0je+qPKHEMohvfRTCEo3CrPG6cAzAYgmzKyxRiYSSDkS6eGJdyVJm7WaYA5ECaAD9wLB2T4EEeymA5aFVcYXCA==", "dev": true, "engines": { "node": ">=6" } }, "node_modules/detect-libc": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-1.0.3.tgz", "integrity": "sha512-pGjwhsmsp4kL2RTz08wcOlGN83otlqHeD/Z5T8GXZB+/YcpQ/dgo+lbU8ZsGxV0HIvqqxo9l7mqYwyYMD9bKDg==", "dev": true, "bin": { "detect-libc": "bin/detect-libc.js" }, "engines": { "node": ">=0.10" } }, "node_modules/diff": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", "dev": true, "engines": { "node": ">=0.3.1" } }, "node_modules/dom-serializer": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-1.4.1.tgz", "integrity": "sha512-VHwB3KfrcOOkelEG2ZOfxqLZdfkil8PtJi4P8N2MMXucZq2yLp75ClViUlOVwyoHEDjYU433Aq+5zWP61+RGag==", "dev": true, "dependencies": { "domelementtype": "^2.0.1", "domhandler": "^4.2.0", "entities": "^2.0.0" }, "funding": { "url": "https://github.com/cheeriojs/dom-serializer?sponsor=1" } }, "node_modules/dom-serializer/node_modules/entities": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/entities/-/entities-2.2.0.tgz", "integrity": "sha512-p92if5Nz619I0w+akJrLZH0MX0Pb5DX39XOwQTtXSdQQOaYH03S1uIQp4mhOZtAXrxq4ViO67YTiLBo2638o9A==", "dev": true, "funding": { "url": "https://github.com/fb55/entities?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==", "dev": true, "funding": [ { "type": "github", "url": "https://github.com/sponsors/fb55" } ] }, "node_modules/domhandler": { "version": "4.3.1", "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-4.3.1.tgz", "integrity": "sha512-GrwoxYN+uWlzO8uhUXRl0P+kHE4GtVPfYzVLcUxPL7KNdHKj66vvlhiweIHqYYXWlw+T8iLMp42Lm67ghw4WMQ==", "dev": true, "dependencies": { "domelementtype": "^2.2.0" }, "engines": { "node": ">= 4" }, "funding": { "url": "https://github.com/fb55/domhandler?sponsor=1" } }, "node_modules/domutils": { "version": "2.8.0", "resolved": "https://registry.npmjs.org/domutils/-/domutils-2.8.0.tgz", "integrity": "sha512-w96Cjofp72M5IIhpjgobBimYEfoPjx1Vx0BSX9P30WBdZW2WIKU0T1Bd0kz2eNZ9ikjKgHbEyKx8BB6H1L3h3A==", "dev": true, "dependencies": { "dom-serializer": "^1.0.1", "domelementtype": "^2.2.0", "domhandler": "^4.2.0" }, "funding": { "url": "https://github.com/fb55/domutils?sponsor=1" } }, "node_modules/dotenv": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-7.0.0.tgz", "integrity": "sha512-M3NhsLbV1i6HuGzBUH8vXrtxOk+tWmzWKDMbAVSUp3Zsjm7ywFeuwrUXhmhQyRK1q5B5GGy7hcXPbj3bnfZg2g==", "dev": true, "engines": { "node": ">=6" } }, "node_modules/dotenv-expand": { "version": "5.1.0", "resolved": "https://registry.npmjs.org/dotenv-expand/-/dotenv-expand-5.1.0.tgz", "integrity": "sha512-YXQl1DSa4/PQyRfgrv6aoNjhasp/p4qs9FjJ4q4cQk+8m4r6k4ZSiEyytKG8f8W9gi8WsQtIObNmKd+tMzNTmA==", "dev": true }, "node_modules/electron-to-chromium": { "version": "1.4.508", "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.508.tgz", "integrity": "sha512-FFa8QKjQK/A5QuFr2167myhMesGrhlOBD+3cYNxO9/S4XzHEXesyTD/1/xF644gC8buFPz3ca6G1LOQD0tZrrg==", "dev": true }, "node_modules/entities": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/entities/-/entities-3.0.1.tgz", "integrity": "sha512-WiyBqoomrwMdFG1e0kqvASYfnlb0lp8M5o5Fw2OFq1hNZxxcNk8Ik0Xm7LxzBhuidnZB/UtBqVCgUz3kBOP51Q==", "dev": true, "engines": { "node": ">=0.12" }, "funding": { "url": "https://github.com/fb55/entities?sponsor=1" } }, "node_modules/error-ex": { "version": "1.3.2", "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", "dev": true, "dependencies": { "is-arrayish": "^0.2.1" } }, "node_modules/escalade": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", "dev": true, "engines": { "node": ">=6" } }, "node_modules/escape-string-regexp": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", "dev": true, "engines": { "node": ">=0.8.0" } }, "node_modules/fill-range": { "version": "7.0.1", "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", "dev": true, "dependencies": { "to-regex-range": "^5.0.1" }, "engines": { "node": ">=8" } }, "node_modules/get-port": { "version": "4.2.0", "resolved": "https://registry.npmjs.org/get-port/-/get-port-4.2.0.tgz", "integrity": "sha512-/b3jarXkH8KJoOMQc3uVGHASwGLPq3gSFJ7tgJm2diza+bydJPTGOibin2steecKeOylE8oY2JERlVWkAJO6yw==", "dev": true, "engines": { "node": ">=6" } }, "node_modules/globals": { "version": "13.21.0", "resolved": "https://registry.npmjs.org/globals/-/globals-13.21.0.tgz", "integrity": "sha512-ybyme3s4yy/t/3s35bewwXKOf7cvzfreG2lH0lZl0JB7I4GxRP2ghxOK/Nb9EkRXdbBXZLfq/p/0W2JUONB/Gg==", "dev": true, "dependencies": { "type-fest": "^0.20.2" }, "engines": { "node": ">=8" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/has-flag": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true, "engines": { "node": ">=8" } }, "node_modules/htmlnano": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/htmlnano/-/htmlnano-2.0.3.tgz", "integrity": "sha512-S4PGGj9RbdgW8LhbILNK7W9JhmYP8zmDY7KDV/8eCiJBQJlbmltp5I0gv8c5ntLljfdxxfmJ+UJVSqyH4mb41A==", "dev": true, "dependencies": { "cosmiconfig": "^7.0.1", "posthtml": "^0.16.5", "timsort": "^0.3.0" }, "peerDependencies": { "cssnano": "^5.0.11", "postcss": "^8.3.11", "purgecss": "^5.0.0", "relateurl": "^0.2.7", "srcset": "4.0.0", "svgo": "^2.8.0", "terser": "^5.10.0", "uncss": "^0.17.3" }, "peerDependenciesMeta": { "cssnano": { "optional": true }, "postcss": { "optional": true }, "purgecss": { "optional": true }, "relateurl": { "optional": true }, "srcset": { "optional": true }, "svgo": { "optional": true }, "terser": { "optional": true }, "uncss": { "optional": true } } }, "node_modules/htmlparser2": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-7.2.0.tgz", "integrity": "sha512-H7MImA4MS6cw7nbyURtLPO1Tms7C5H602LRETv95z1MxO/7CP7rDVROehUYeYBUYEON94NXXDEPmZuq+hX4sog==", "dev": true, "funding": [ "https://github.com/fb55/htmlparser2?sponsor=1", { "type": "github", "url": "https://github.com/sponsors/fb55" } ], "dependencies": { "domelementtype": "^2.0.1", "domhandler": "^4.2.2", "domutils": "^2.8.0", "entities": "^3.0.1" } }, "node_modules/immediate": { "version": "3.0.6", "resolved": "https://registry.npmjs.org/immediate/-/immediate-3.0.6.tgz", "integrity": "sha512-XXOFtyqDjNDAQxVfYxuF7g9Il/IbWmmlQg2MYKOH8ExIT1qg6xc4zyS3HaEEATgs1btfzxq15ciUiY7gjSXRGQ==", "dev": true }, "node_modules/import-fresh": { "version": "3.3.0", "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", "dev": true, "dependencies": { "parent-module": "^1.0.0", "resolve-from": "^4.0.0" }, "engines": { "node": ">=6" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/inherits": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", "dev": true }, "node_modules/is-arrayish": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", "integrity": "sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==", "dev": true }, "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-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-json": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/is-json/-/is-json-2.0.1.tgz", "integrity": "sha512-6BEnpVn1rcf3ngfmViLM6vjUjGErbdrL4rwlv+u1NO1XO8kqT4YGL8+19Q+Z/bas8tY90BTWMk2+fW1g6hQjbA==", "dev": true }, "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/isarray": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==", "dev": true }, "node_modules/js-tokens": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", "dev": true }, "node_modules/json-parse-even-better-errors": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==", "dev": true }, "node_modules/json5": { "version": "2.2.3", "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==", "dev": true, "bin": { "json5": "lib/cli.js" }, "engines": { "node": ">=6" } }, "node_modules/jszip": { "version": "3.10.1", "resolved": "https://registry.npmjs.org/jszip/-/jszip-3.10.1.tgz", "integrity": "sha512-xXDvecyTpGLrqFrvkrUSoxxfJI5AH7U8zxxtVclpsUtMCq4JQ290LY8AW5c7Ggnr/Y/oK+bQMbqK2qmtk3pN4g==", "dev": true, "license": "(MIT OR GPL-3.0-or-later)", "dependencies": { "lie": "~3.3.0", "pako": "~1.0.2", "readable-stream": "~2.3.6", "setimmediate": "^1.0.5" } }, "node_modules/jszip/node_modules/pako": { "version": "1.0.11", "resolved": "https://registry.npmjs.org/pako/-/pako-1.0.11.tgz", "integrity": "sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw==", "dev": true }, "node_modules/kleur": { "version": "4.1.5", "resolved": "https://registry.npmjs.org/kleur/-/kleur-4.1.5.tgz", "integrity": "sha512-o+NO+8WrRiQEE4/7nwRJhN1HWpVmJm511pBHUxPLtp0BUISzlBplORYSmTclCnJvQq2tKu/sgl3xVpkc7ZWuQQ==", "dev": true, "engines": { "node": ">=6" } }, "node_modules/lie": { "version": "3.3.0", "resolved": "https://registry.npmjs.org/lie/-/lie-3.3.0.tgz", "integrity": "sha512-UaiMJzeWRlEujzAuw5LokY1L5ecNQYZKfmyZ9L7wDHb/p5etKaxXhohBcrw0EYby+G/NA52vRSN4N39dxHAIwQ==", "dev": true, "dependencies": { "immediate": "~3.0.5" } }, "node_modules/lightningcss": { "version": "1.21.7", "resolved": "https://registry.npmjs.org/lightningcss/-/lightningcss-1.21.7.tgz", "integrity": "sha512-xITZyh5sLFwRPYUSw15T00Rm7gcQ1qOPuQwNOcvHsTm6nLWTQ723w7zl42wrC5t+xtdg6FPmnXHml1nZxxvp1w==", "dev": true, "dependencies": { "detect-libc": "^1.0.3" }, "engines": { "node": ">= 12.0.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/parcel" }, "optionalDependencies": { "lightningcss-darwin-arm64": "1.21.7", "lightningcss-darwin-x64": "1.21.7", "lightningcss-freebsd-x64": "1.21.7", "lightningcss-linux-arm-gnueabihf": "1.21.7", "lightningcss-linux-arm64-gnu": "1.21.7", "lightningcss-linux-arm64-musl": "1.21.7", "lightningcss-linux-x64-gnu": "1.21.7", "lightningcss-linux-x64-musl": "1.21.7", "lightningcss-win32-x64-msvc": "1.21.7" } }, "node_modules/lightningcss-darwin-arm64": { "version": "1.21.7", "resolved": "https://registry.npmjs.org/lightningcss-darwin-arm64/-/lightningcss-darwin-arm64-1.21.7.tgz", "integrity": "sha512-tt7hIsFio9jZofTVHtCACz6rB6c9RyABMXfA9A/VcKOjS3sq+koX/QkRJWY06utwOImbJIXBC5hbg9t3RkPUAQ==", "cpu": [ "arm64" ], "dev": true, "optional": true, "os": [ "darwin" ], "engines": { "node": ">= 12.0.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/parcel" } }, "node_modules/lightningcss-darwin-x64": { "version": "1.21.7", "resolved": "https://registry.npmjs.org/lightningcss-darwin-x64/-/lightningcss-darwin-x64-1.21.7.tgz", "integrity": "sha512-F4gS4bf7eWekfPT+TxJNm/pF+QRgZiTrTkQH6cw4/UWfdeZISfuhD5El2dm16giFnY0K5ylIwO+ZusgYNkGSXA==", "cpu": [ "x64" ], "dev": true, "optional": true, "os": [ "darwin" ], "engines": { "node": ">= 12.0.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/parcel" } }, "node_modules/lightningcss-freebsd-x64": { "version": "1.21.7", "resolved": "https://registry.npmjs.org/lightningcss-freebsd-x64/-/lightningcss-freebsd-x64-1.21.7.tgz", "integrity": "sha512-RMfNzJWXCSfPnL55fcLWEAadcY6QUFT0S8NceNKYzp1KiCZtkJIy6RQ5SaVxPzRqd3iMsahUf5sfnG8N1UQSNQ==", "cpu": [ "x64" ], "dev": true, "optional": true, "os": [ "freebsd" ], "engines": { "node": ">= 12.0.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/parcel" } }, "node_modules/lightningcss-linux-arm-gnueabihf": { "version": "1.21.7", "resolved": "https://registry.npmjs.org/lightningcss-linux-arm-gnueabihf/-/lightningcss-linux-arm-gnueabihf-1.21.7.tgz", "integrity": "sha512-biSRUDZNx7vubWP1jArw/qqfZKPGpkV/qzunasZzxmqijbZ43sW9faDQYxWNcxPWljJJdF/qs6qcurYFovWtrQ==", "cpu": [ "arm" ], "dev": true, "optional": true, "os": [ "linux" ], "engines": { "node": ">= 12.0.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/parcel" } }, "node_modules/lightningcss-linux-arm64-gnu": { "version": "1.21.7", "resolved": "https://registry.npmjs.org/lightningcss-linux-arm64-gnu/-/lightningcss-linux-arm64-gnu-1.21.7.tgz", "integrity": "sha512-PENY8QekqL9TG3AY/A7rkUBb5ymefGxea7Oe7+x7Hbw4Bz4Hpj5cec5OoMypMqFbURPmpi0fTWx4vSWUPzpDcA==", "cpu": [ "arm64" ], "dev": true, "optional": true, "os": [ "linux" ], "engines": { "node": ">= 12.0.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/parcel" } }, "node_modules/lightningcss-linux-arm64-musl": { "version": "1.21.7", "resolved": "https://registry.npmjs.org/lightningcss-linux-arm64-musl/-/lightningcss-linux-arm64-musl-1.21.7.tgz", "integrity": "sha512-pfOipKvA/0X1OjRaZt3870vnV9UGBSjayIqHh0fGx/+aRz3O0MVFHE/60P2UWXpM3YGJEw/hMWtNkrFwqOge8A==", "cpu": [ "arm64" ], "dev": true, "optional": true, "os": [ "linux" ], "engines": { "node": ">= 12.0.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/parcel" } }, "node_modules/lightningcss-linux-x64-gnu": { "version": "1.21.7", "resolved": "https://registry.npmjs.org/lightningcss-linux-x64-gnu/-/lightningcss-linux-x64-gnu-1.21.7.tgz", "integrity": "sha512-dgcsis4TAA7s0ia4f31QHX+G4PWPwxk+wJaEQLaV0NdJs09O5hHoA8DpLEr8nrvc/tsRTyVNBP1rDtgzySjpXg==", "cpu": [ "x64" ], "dev": true, "optional": true, "os": [ "linux" ], "engines": { "node": ">= 12.0.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/parcel" } }, "node_modules/lightningcss-linux-x64-musl": { "version": "1.21.7", "resolved": "https://registry.npmjs.org/lightningcss-linux-x64-musl/-/lightningcss-linux-x64-musl-1.21.7.tgz", "integrity": "sha512-A+9dXpxld3p4Cd6fxev2eqEvaauYtrgNpXV3t7ioCJy30Oj9nYiNGwiGusM+4MJVcEpUPGUGiuAqY4sWilRDwA==", "cpu": [ "x64" ], "dev": true, "optional": true, "os": [ "linux" ], "engines": { "node": ">= 12.0.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/parcel" } }, "node_modules/lightningcss-win32-x64-msvc": { "version": "1.21.7", "resolved": "https://registry.npmjs.org/lightningcss-win32-x64-msvc/-/lightningcss-win32-x64-msvc-1.21.7.tgz", "integrity": "sha512-07/8vogEq+C/mF99pdMhh/f19/xreq8N9Ca6AWeVHZIdODyF/pt6KdKSCWDZWIn+3CUxI8gCJWuUWyOc3xymvw==", "cpu": [ "x64" ], "dev": true, "optional": true, "os": [ "win32" ], "engines": { "node": ">= 12.0.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/parcel" } }, "node_modules/lines-and-columns": { "version": "1.2.4", "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz", "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==", "dev": true }, "node_modules/linkify-it": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/linkify-it/-/linkify-it-5.0.0.tgz", "integrity": "sha512-5aHCbzQRADcdP+ATqnDuhhJ/MRIqDkZX5pyjFHRRysS8vZ5AbqGEoFIb6pYHPZ+L/OC2Lc+xT8uHVVR5CAK/wQ==", "dev": true, "dependencies": { "uc.micro": "^2.0.0" } }, "node_modules/lmdb": { "version": "2.7.11", "resolved": "https://registry.npmjs.org/lmdb/-/lmdb-2.7.11.tgz", "integrity": "sha512-x9bD4hVp7PFLUoELL8RglbNXhAMt5CYhkmss+CEau9KlNoilsTzNi9QDsPZb3KMpOGZXG6jmXhW3bBxE2XVztw==", "dev": true, "hasInstallScript": true, "dependencies": { "msgpackr": "1.8.5", "node-addon-api": "^4.3.0", "node-gyp-build-optional-packages": "5.0.6", "ordered-binary": "^1.4.0", "weak-lru-cache": "^1.2.2" }, "bin": { "download-lmdb-prebuilds": "bin/download-prebuilds.js" }, "optionalDependencies": { "@lmdb/lmdb-darwin-arm64": "2.7.11", "@lmdb/lmdb-darwin-x64": "2.7.11", "@lmdb/lmdb-linux-arm": "2.7.11", "@lmdb/lmdb-linux-arm64": "2.7.11", "@lmdb/lmdb-linux-x64": "2.7.11", "@lmdb/lmdb-win32-x64": "2.7.11" } }, "node_modules/lmdb/node_modules/msgpackr": { "version": "1.8.5", "resolved": "https://registry.npmjs.org/msgpackr/-/msgpackr-1.8.5.tgz", "integrity": "sha512-mpPs3qqTug6ahbblkThoUY2DQdNXcm4IapwOS3Vm/87vmpzLVelvp9h3It1y9l1VPpiFLV11vfOXnmeEwiIXwg==", "dev": true, "optionalDependencies": { "msgpackr-extract": "^3.0.1" } }, "node_modules/lmdb/node_modules/node-addon-api": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-4.3.0.tgz", "integrity": "sha512-73sE9+3UaLYYFmDsFZnqCInzPyh3MqIwZO9cw58yIqAZhONrrabrYyYe3TuIqtIiOuTXVhsGau8hcrhhwSsDIQ==", "dev": true }, "node_modules/loose-envify": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==", "dev": true, "dependencies": { "js-tokens": "^3.0.0 || ^4.0.0" }, "bin": { "loose-envify": "cli.js" } }, "node_modules/lru-cache": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", "dev": true, "dependencies": { "yallist": "^4.0.0" }, "engines": { "node": ">=10" } }, "node_modules/lunr": { "version": "2.3.9", "resolved": "https://registry.npmjs.org/lunr/-/lunr-2.3.9.tgz", "integrity": "sha512-zTU3DaZaF3Rt9rhN3uBMGQD3dD2/vFQqnvZCDv4dl5iOzq2IZQqTxu90r4E5J+nP70J3ilqVCrbho2eWaeW8Ow==", "dev": true }, "node_modules/make-error": { "version": "1.3.6", "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==", "dev": true }, "node_modules/markdown-it": { "version": "14.1.1", "resolved": "https://registry.npmjs.org/markdown-it/-/markdown-it-14.1.1.tgz", "integrity": "sha512-BuU2qnTti9YKgK5N+IeMubp14ZUKUUw7yeJbkjtosvHiP0AZ5c8IAgEMk79D0eC8F23r4Ac/q8cAIFdm2FtyoA==", "dev": true, "dependencies": { "argparse": "^2.0.1", "entities": "^4.4.0", "linkify-it": "^5.0.0", "mdurl": "^2.0.0", "punycode.js": "^2.3.1", "uc.micro": "^2.1.0" }, "bin": { "markdown-it": "bin/markdown-it.mjs" } }, "node_modules/markdown-it/node_modules/entities": { "version": "4.5.0", "resolved": "https://registry.npmjs.org/entities/-/entities-4.5.0.tgz", "integrity": "sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==", "dev": true, "engines": { "node": ">=0.12" }, "funding": { "url": "https://github.com/fb55/entities?sponsor=1" } }, "node_modules/mdurl": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/mdurl/-/mdurl-2.0.0.tgz", "integrity": "sha512-Lf+9+2r+Tdp5wXDXC4PcIBjTDtq4UKjCPMQhKIuzpJNW0b96kVqSwW0bT7FhRSfmAiFYgP+SCRvdrDozfh0U5w==", "dev": true }, "node_modules/micromatch": { "version": "4.0.5", "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz", "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", "dev": true, "dependencies": { "braces": "^3.0.2", "picomatch": "^2.3.1" }, "engines": { "node": ">=8.6" } }, "node_modules/minimatch": { "version": "10.2.5", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.2.5.tgz", "integrity": "sha512-MULkVLfKGYDFYejP07QOurDLLQpcjk7Fw+7jXS2R2czRQzR56yHRveU5NDJEOviH+hETZKSkIk5c+T23GjFUMg==", "dev": true, "dependencies": { "brace-expansion": "^5.0.5" }, "engines": { "node": "18 || 20 || >=22" }, "funding": { "url": "https://github.com/sponsors/isaacs" } }, "node_modules/mri": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/mri/-/mri-1.2.0.tgz", "integrity": "sha512-tzzskb3bG8LvYGFF/mDTpq3jpI6Q9wc3LEmBaghu+DdCssd1FakN7Bc0hVNmEyGq1bq3RgfkCb3cmQLpNPOroA==", "dev": true, "engines": { "node": ">=4" } }, "node_modules/ms": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", "dev": true }, "node_modules/msgpackr": { "version": "1.9.7", "resolved": "https://registry.npmjs.org/msgpackr/-/msgpackr-1.9.7.tgz", "integrity": "sha512-baUNaLvKQvVhzfWTNO07njwbZK1Lxjtb0P1JL6/EhXdLTHzR57/mZqqJC39TtQKvOmkJA4pcejS4dbk7BDgLLA==", "dev": true, "optionalDependencies": { "msgpackr-extract": "^3.0.2" } }, "node_modules/msgpackr-extract": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/msgpackr-extract/-/msgpackr-extract-3.0.2.tgz", "integrity": "sha512-SdzXp4kD/Qf8agZ9+iTu6eql0m3kWm1A2y1hkpTeVNENutaB0BwHlSvAIaMxwntmRUAUjon2V4L8Z/njd0Ct8A==", "dev": true, "hasInstallScript": true, "optional": true, "dependencies": { "node-gyp-build-optional-packages": "5.0.7" }, "bin": { "download-msgpackr-prebuilds": "bin/download-prebuilds.js" }, "optionalDependencies": { "@msgpackr-extract/msgpackr-extract-darwin-arm64": "3.0.2", "@msgpackr-extract/msgpackr-extract-darwin-x64": "3.0.2", "@msgpackr-extract/msgpackr-extract-linux-arm": "3.0.2", "@msgpackr-extract/msgpackr-extract-linux-arm64": "3.0.2", "@msgpackr-extract/msgpackr-extract-linux-x64": "3.0.2", "@msgpackr-extract/msgpackr-extract-win32-x64": "3.0.2" } }, "node_modules/msgpackr-extract/node_modules/node-gyp-build-optional-packages": { "version": "5.0.7", "resolved": "https://registry.npmjs.org/node-gyp-build-optional-packages/-/node-gyp-build-optional-packages-5.0.7.tgz", "integrity": "sha512-YlCCc6Wffkx0kHkmam79GKvDQ6x+QZkMjFGrIMxgFNILFvGSbCp2fCBC55pGTT9gVaz8Na5CLmxt/urtzRv36w==", "dev": true, "optional": true, "bin": { "node-gyp-build-optional-packages": "bin.js", "node-gyp-build-optional-packages-optional": "optional.js", "node-gyp-build-optional-packages-test": "build-test.js" } }, "node_modules/node-addon-api": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-7.0.0.tgz", "integrity": "sha512-vgbBJTS4m5/KkE16t5Ly0WW9hz46swAstv0hYYwMtbG7AznRhNyfLRe8HZAiWIpcHzoO7HxhLuBQj9rJ/Ho0ZA==", "dev": true }, "node_modules/node-gyp-build-optional-packages": { "version": "5.0.6", "resolved": "https://registry.npmjs.org/node-gyp-build-optional-packages/-/node-gyp-build-optional-packages-5.0.6.tgz", "integrity": "sha512-2ZJErHG4du9G3/8IWl/l9Bp5BBFy63rno5GVmjQijvTuUZKsl6g8RB4KH/x3NLcV5ZBb4GsXmAuTYr6dRml3Gw==", "dev": true, "bin": { "node-gyp-build-optional-packages": "bin.js", "node-gyp-build-optional-packages-optional": "optional.js", "node-gyp-build-optional-packages-test": "build-test.js" } }, "node_modules/node-releases": { "version": "2.0.13", "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.13.tgz", "integrity": "sha512-uYr7J37ae/ORWdZeQ1xxMJe3NtdmqMC/JZK+geofDrkLUApKRHPd18/TxtBOJ4A0/+uUIliorNrfYV6s1b02eQ==", "dev": true }, "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==", "dev": true, "dependencies": { "boolbase": "^1.0.0" }, "funding": { "url": "https://github.com/fb55/nth-check?sponsor=1" } }, "node_modules/nullthrows": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/nullthrows/-/nullthrows-1.1.1.tgz", "integrity": "sha512-2vPPEi+Z7WqML2jZYddDIfy5Dqb0r2fze2zTxNNknZaFpVHU3mFB3R+DWeJWGVx0ecvttSGlJTI+WG+8Z4cDWw==", "dev": true }, "node_modules/ordered-binary": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/ordered-binary/-/ordered-binary-1.4.1.tgz", "integrity": "sha512-9LtiGlPy982CsgxZvJGNNp2/NnrgEr6EAyN3iIEP3/8vd3YLgAZQHbQ75ZrkfBRGrNg37Dk3U6tuVb+B4Xfslg==", "dev": true }, "node_modules/pako": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/pako/-/pako-2.1.0.tgz", "integrity": "sha512-w+eufiZ1WuJYgPXbV/PO3NCMEc3xqylkKHzp8bxp1uW4qaSNQUkwmLLEc3kKsfz8lpV1F8Ht3U1Cm+9Srog2ug==", "dev": true }, "node_modules/parcel": { "version": "2.9.3", "resolved": "https://registry.npmjs.org/parcel/-/parcel-2.9.3.tgz", "integrity": "sha512-2GTVocFkwblV/TIg9AmT7TI2fO4xdWkyN8aFUEVtiVNWt96GTR3FgQyHFValfCbcj1k9Xf962Ws2hYXYUr9k1Q==", "dev": true, "dependencies": { "@parcel/config-default": "2.9.3", "@parcel/core": "2.9.3", "@parcel/diagnostic": "2.9.3", "@parcel/events": "2.9.3", "@parcel/fs": "2.9.3", "@parcel/logger": "2.9.3", "@parcel/package-manager": "2.9.3", "@parcel/reporter-cli": "2.9.3", "@parcel/reporter-dev-server": "2.9.3", "@parcel/reporter-tracer": "2.9.3", "@parcel/utils": "2.9.3", "chalk": "^4.1.0", "commander": "^7.0.0", "get-port": "^4.2.0" }, "bin": { "parcel": "lib/bin.js" }, "engines": { "node": ">= 12.0.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/parcel" } }, "node_modules/parent-module": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", "dev": true, "dependencies": { "callsites": "^3.0.0" }, "engines": { "node": ">=6" } }, "node_modules/parse-json": { "version": "5.2.0", "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz", "integrity": "sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==", "dev": true, "dependencies": { "@babel/code-frame": "^7.0.0", "error-ex": "^1.3.1", "json-parse-even-better-errors": "^2.3.0", "lines-and-columns": "^1.1.6" }, "engines": { "node": ">=8" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/path-type": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", "dev": true, "engines": { "node": ">=8" } }, "node_modules/picocolors": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==", "dev": true }, "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/postcss-value-parser": { "version": "4.2.0", "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-4.2.0.tgz", "integrity": "sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==", "dev": true }, "node_modules/posthtml": { "version": "0.16.6", "resolved": "https://registry.npmjs.org/posthtml/-/posthtml-0.16.6.tgz", "integrity": "sha512-JcEmHlyLK/o0uGAlj65vgg+7LIms0xKXe60lcDOTU7oVX/3LuEuLwrQpW3VJ7de5TaFKiW4kWkaIpJL42FEgxQ==", "dev": true, "dependencies": { "posthtml-parser": "^0.11.0", "posthtml-render": "^3.0.0" }, "engines": { "node": ">=12.0.0" } }, "node_modules/posthtml-parser": { "version": "0.10.2", "resolved": "https://registry.npmjs.org/posthtml-parser/-/posthtml-parser-0.10.2.tgz", "integrity": "sha512-PId6zZ/2lyJi9LiKfe+i2xv57oEjJgWbsHGGANwos5AvdQp98i6AtamAl8gzSVFGfQ43Glb5D614cvZf012VKg==", "dev": true, "dependencies": { "htmlparser2": "^7.1.1" }, "engines": { "node": ">=12" } }, "node_modules/posthtml-render": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/posthtml-render/-/posthtml-render-3.0.0.tgz", "integrity": "sha512-z+16RoxK3fUPgwaIgH9NGnK1HKY9XIDpydky5eQGgAFVXTCSezalv9U2jQuNV+Z9qV1fDWNzldcw4eK0SSbqKA==", "dev": true, "dependencies": { "is-json": "^2.0.1" }, "engines": { "node": ">=12" } }, "node_modules/posthtml/node_modules/posthtml-parser": { "version": "0.11.0", "resolved": "https://registry.npmjs.org/posthtml-parser/-/posthtml-parser-0.11.0.tgz", "integrity": "sha512-QecJtfLekJbWVo/dMAA+OSwY79wpRmbqS5TeXvXSX+f0c6pW4/SE6inzZ2qkU7oAMCPqIDkZDvd/bQsSFUnKyw==", "dev": true, "dependencies": { "htmlparser2": "^7.1.1" }, "engines": { "node": ">=12" } }, "node_modules/preact": { "version": "10.17.1", "resolved": "https://registry.npmjs.org/preact/-/preact-10.17.1.tgz", "integrity": "sha512-X9BODrvQ4Ekwv9GURm9AKAGaomqXmip7NQTZgY7gcNmr7XE83adOMJvd3N42id1tMFU7ojiynRsYnY6/BRFxLA==", "dev": true, "funding": { "type": "opencollective", "url": "https://opencollective.com/preact" } }, "node_modules/process-nextick-args": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==", "dev": true }, "node_modules/punycode.js": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/punycode.js/-/punycode.js-2.3.1.tgz", "integrity": "sha512-uxFIHU0YlHYhDQtV4R9J6a52SLx28BCjT+4ieh7IGbgwVJWO+km431c4yRlREUAsAmt/uMjQUyQHNEPf0M39CA==", "dev": true, "engines": { "node": ">=6" } }, "node_modules/react": { "version": "18.2.0", "resolved": "https://registry.npmjs.org/react/-/react-18.2.0.tgz", "integrity": "sha512-/3IjMdb2L9QbBdWiW5e3P2/npwMBaU9mHCSCUzNln0ZCYbcfTsGbTJrU/kGemdH2IWmB2ioZ+zkxtmq6g09fGQ==", "dev": true, "dependencies": { "loose-envify": "^1.1.0" }, "engines": { "node": ">=0.10.0" } }, "node_modules/react-dom": { "version": "18.2.0", "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-18.2.0.tgz", "integrity": "sha512-6IMTriUmvsjHUjNtEDudZfuDQUoWXVxKHhlEGSk81n4YFS+r/Kl99wXiwlVXtPBtJenozv2P+hxDsw9eA7Xo6g==", "dev": true, "dependencies": { "loose-envify": "^1.1.0", "scheduler": "^0.23.0" }, "peerDependencies": { "react": "^18.2.0" } }, "node_modules/react-error-overlay": { "version": "6.0.9", "resolved": "https://registry.npmjs.org/react-error-overlay/-/react-error-overlay-6.0.9.tgz", "integrity": "sha512-nQTTcUu+ATDbrSD1BZHr5kgSD4oF8OFjxun8uAaL8RwPBacGBNPf/yAuVVdx17N8XNzRDMrZ9XcKZHCjPW+9ew==", "dev": true }, "node_modules/react-refresh": { "version": "0.9.0", "resolved": "https://registry.npmjs.org/react-refresh/-/react-refresh-0.9.0.tgz", "integrity": "sha512-Gvzk7OZpiqKSkxsQvO/mbTN1poglhmAV7gR/DdIrRrSMXraRQQlfikRJOr3Nb9GTMPC5kof948Zy6jJZIFtDvQ==", "dev": true, "engines": { "node": ">=0.10.0" } }, "node_modules/readable-stream": { "version": "2.3.8", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.8.tgz", "integrity": "sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==", "dev": true, "dependencies": { "core-util-is": "~1.0.0", "inherits": "~2.0.3", "isarray": "~1.0.0", "process-nextick-args": "~2.0.0", "safe-buffer": "~5.1.1", "string_decoder": "~1.1.1", "util-deprecate": "~1.0.1" } }, "node_modules/readable-stream/node_modules/safe-buffer": { "version": "5.1.2", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", "dev": true }, "node_modules/regenerator-runtime": { "version": "0.13.11", "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.11.tgz", "integrity": "sha512-kY1AZVr2Ra+t+piVaJ4gxaFaReZVH40AKNo7UCX6W+dEwBo/2oZJzqfuN1qLq1oL45o56cPaTXELwrTh8Fpggg==", "dev": true }, "node_modules/resolve-from": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", "dev": true, "engines": { "node": ">=4" } }, "node_modules/sade": { "version": "1.8.1", "resolved": "https://registry.npmjs.org/sade/-/sade-1.8.1.tgz", "integrity": "sha512-xal3CZX1Xlo/k4ApwCFrHVACi9fBqJ7V+mwhBsuf/1IOKbBy098Fex+Wa/5QMubw09pSZ/u8EY8PWgevJsXp1A==", "dev": true, "dependencies": { "mri": "^1.1.0" }, "engines": { "node": ">=6" } }, "node_modules/safe-buffer": { "version": "5.2.1", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", "dev": true, "funding": [ { "type": "github", "url": "https://github.com/sponsors/feross" }, { "type": "patreon", "url": "https://www.patreon.com/feross" }, { "type": "consulting", "url": "https://feross.org/support" } ] }, "node_modules/scheduler": { "version": "0.23.0", "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.23.0.tgz", "integrity": "sha512-CtuThmgHNg7zIZWAXi3AsyIzA3n4xx7aNyjwC2VJldO2LMVDhFK+63xGqq6CsJH4rTAt6/M+N4GhZiDYPx9eUw==", "dev": true, "dependencies": { "loose-envify": "^1.1.0" } }, "node_modules/semver": { "version": "7.5.4", "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", "dev": true, "dependencies": { "lru-cache": "^6.0.0" }, "bin": { "semver": "bin/semver.js" }, "engines": { "node": ">=10" } }, "node_modules/setimmediate": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz", "integrity": "sha512-MATJdZp8sLqDl/68LfQmbP8zKPLQNV6BIZoIgrscFDQ+RsvK/BxeDQOgyxKKoh0y/8h3BqVFnCqQ/gd+reiIXA==", "dev": true }, "node_modules/simple-git": { "version": "3.19.1", "resolved": "https://registry.npmjs.org/simple-git/-/simple-git-3.19.1.tgz", "integrity": "sha512-Ck+rcjVaE1HotraRAS8u/+xgTvToTuoMkT9/l9lvuP5jftwnYUp6DwuJzsKErHgfyRk8IB8pqGHWEbM3tLgV1w==", "dev": true, "dependencies": { "@kwsites/file-exists": "^1.1.1", "@kwsites/promise-deferred": "^1.1.1", "debug": "^4.3.4" }, "funding": { "type": "github", "url": "https://github.com/steveukx/git-js?sponsor=1" } }, "node_modules/source-map": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", "dev": true, "engines": { "node": ">=0.10.0" } }, "node_modules/source-map-support": { "version": "0.5.21", "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz", "integrity": "sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==", "dev": true, "dependencies": { "buffer-from": "^1.0.0", "source-map": "^0.6.0" } }, "node_modules/stable": { "version": "0.1.8", "resolved": "https://registry.npmjs.org/stable/-/stable-0.1.8.tgz", "integrity": "sha512-ji9qxRnOVfcuLDySj9qzhGSEFVobyt1kIOSkj1qZzYLzq7Tos/oUUWvotUPQLlrsidqsK6tBH89Bc9kL5zHA6w==", "deprecated": "Modern JS already guarantees Array#sort() is a stable sort, so this library is deprecated. See the compatibility table on MDN: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort#browser_compatibility", "dev": true }, "node_modules/string_decoder": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", "dev": true, "dependencies": { "safe-buffer": "~5.1.0" } }, "node_modules/string_decoder/node_modules/safe-buffer": { "version": "5.1.2", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", "dev": true }, "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==", "dev": true, "dependencies": { "has-flag": "^4.0.0" }, "engines": { "node": ">=8" } }, "node_modules/term-size": { "version": "2.2.1", "resolved": "https://registry.npmjs.org/term-size/-/term-size-2.2.1.tgz", "integrity": "sha512-wK0Ri4fOGjv/XPy8SBHZChl8CM7uMc5VML7SqiQ0zG7+J5Vr+RMQDoHa2CNT6KHUnTGIXH34UDMkPzAUyapBZg==", "dev": true, "engines": { "node": ">=8" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/terser": { "version": "5.47.1", "resolved": "https://registry.npmjs.org/terser/-/terser-5.47.1.tgz", "integrity": "sha512-tPbLXTI6ohPASb/1YViL428oEHu6/qv1OxqYnfaonVCFHqx4+wCd95pHrQWsL5X4pl90CTyW9piSAsS2L0VoMw==", "dev": true, "license": "BSD-2-Clause", "dependencies": { "@jridgewell/source-map": "^0.3.3", "acorn": "^8.15.0", "commander": "^2.20.0", "source-map-support": "~0.5.20" }, "bin": { "terser": "bin/terser" }, "engines": { "node": ">=10" } }, "node_modules/terser/node_modules/commander": { "version": "2.20.3", "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", "dev": true }, "node_modules/timsort": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/timsort/-/timsort-0.3.0.tgz", "integrity": "sha512-qsdtZH+vMoCARQtyod4imc2nIJwg9Cc7lPRrw9CzF8ZKR0khdr8+2nX80PBhET3tcyTtJDxAffGh2rXH4tyU8A==", "dev": true }, "node_modules/tiny-inflate": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/tiny-inflate/-/tiny-inflate-1.0.3.tgz", "integrity": "sha512-pkY1fj1cKHb2seWDy0B16HeWyczlJA9/WW3u3c4z/NiWDsO3DOU5D7nhTLE9CF0yXv/QZFY7sEJmj24dK+Rrqw==", "dev": true }, "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/ts-node": { "version": "10.9.2", "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.2.tgz", "integrity": "sha512-f0FFpIdcHgn8zcPSbf1dRevwt047YMnaiJM3u2w2RewrB+fob/zePZcrOyQoLMMO7aBIddLcQIEK5dYjkLnGrQ==", "dev": true, "dependencies": { "@cspotcode/source-map-support": "^0.8.0", "@tsconfig/node10": "^1.0.7", "@tsconfig/node12": "^1.0.7", "@tsconfig/node14": "^1.0.0", "@tsconfig/node16": "^1.0.2", "acorn": "^8.4.1", "acorn-walk": "^8.1.1", "arg": "^4.1.0", "create-require": "^1.1.0", "diff": "^4.0.1", "make-error": "^1.1.1", "v8-compile-cache-lib": "^3.0.1", "yn": "3.1.1" }, "bin": { "ts-node": "dist/bin.js", "ts-node-cwd": "dist/bin-cwd.js", "ts-node-esm": "dist/bin-esm.js", "ts-node-script": "dist/bin-script.js", "ts-node-transpile-only": "dist/bin-transpile.js", "ts-script": "dist/bin-script-deprecated.js" }, "peerDependencies": { "@swc/core": ">=1.2.50", "@swc/wasm": ">=1.2.50", "@types/node": "*", "typescript": ">=2.7" }, "peerDependenciesMeta": { "@swc/core": { "optional": true }, "@swc/wasm": { "optional": true } } }, "node_modules/tslib": { "version": "2.6.2", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==", "dev": true }, "node_modules/type-fest": { "version": "0.20.2", "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", "dev": true, "engines": { "node": ">=10" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/typedoc": { "version": "0.28.19", "resolved": "https://registry.npmjs.org/typedoc/-/typedoc-0.28.19.tgz", "integrity": "sha512-wKh+lhdmMFivMlc6vRRcMGXeGEHGU2g8a2CkPTJjJlwRf1iXbimWIPcFolCqe4E0d/FRtGszpIrsp3WLpDB8Pw==", "dev": true, "license": "Apache-2.0", "dependencies": { "@gerrit0/mini-shiki": "^3.23.0", "lunr": "^2.3.9", "markdown-it": "^14.1.1", "minimatch": "^10.2.5", "yaml": "^2.8.3" }, "bin": { "typedoc": "bin/typedoc" }, "engines": { "node": ">= 18", "pnpm": ">= 10" }, "peerDependencies": { "typescript": "5.0.x || 5.1.x || 5.2.x || 5.3.x || 5.4.x || 5.5.x || 5.6.x || 5.7.x || 5.8.x || 5.9.x || 6.0.x" } }, "node_modules/typedoc-plugin-markdown": { "version": "4.11.0", "resolved": "https://registry.npmjs.org/typedoc-plugin-markdown/-/typedoc-plugin-markdown-4.11.0.tgz", "integrity": "sha512-2iunh2ALyfyh204OF7h2u0kuQ84xB3jFZtFyUr01nThJkLvR8oGGSSDlyt2gyO4kXhvUxDcVbO0y43+qX+wFbw==", "dev": true, "license": "MIT", "engines": { "node": ">= 18" }, "peerDependencies": { "typedoc": "0.28.x" } }, "node_modules/typedoc/node_modules/yaml": { "version": "2.9.0", "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.9.0.tgz", "integrity": "sha512-2AvhNX3mb8zd6Zy7INTtSpl1F15HW6Wnqj0srWlkKLcpYl/gMIMJiyuGq2KeI2YFxUPjdlB+3Lc10seMLtL4cA==", "dev": true, "bin": { "yaml": "bin.mjs" }, "engines": { "node": ">= 14.6" }, "funding": { "url": "https://github.com/sponsors/eemeli" } }, "node_modules/typescript": { "version": "6.0.3", "resolved": "https://registry.npmjs.org/typescript/-/typescript-6.0.3.tgz", "integrity": "sha512-y2TvuxSZPDyQakkFRPZHKFm+KKVqIisdg9/CZwm9ftvKXLP8NRWj38/ODjNbr43SsoXqNuAisEf1GdCxqWcdBw==", "dev": true, "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" }, "engines": { "node": ">=14.17" } }, "node_modules/uc.micro": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/uc.micro/-/uc.micro-2.1.0.tgz", "integrity": "sha512-ARDJmphmdvUk6Glw7y9DQ2bFkKBHwQHLi2lsaH6PPmz/Ka9sFOBsBluozhDltWmnv9u/cF6Rt87znRTPV+yp/A==", "dev": true }, "node_modules/undici-types": { "version": "7.24.6", "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.24.6.tgz", "integrity": "sha512-WRNW+sJgj5OBN4/0JpHFqtqzhpbnV0GuB+OozA9gCL7a993SmU+1JBZCzLNxYsbMfIeDL+lTsphD5jN5N+n0zg==", "dev": true }, "node_modules/update-browserslist-db": { "version": "1.0.11", "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.11.tgz", "integrity": "sha512-dCwEFf0/oT85M1fHBg4F0jtLwJrutGoHSQXCh7u4o2t1drG+c0a9Flnqww6XUKSfQMPpJBRjU8d4RXB09qtvaA==", "dev": true, "funding": [ { "type": "opencollective", "url": "https://opencollective.com/browserslist" }, { "type": "tidelift", "url": "https://tidelift.com/funding/github/npm/browserslist" }, { "type": "github", "url": "https://github.com/sponsors/ai" } ], "dependencies": { "escalade": "^3.1.1", "picocolors": "^1.0.0" }, "bin": { "update-browserslist-db": "cli.js" }, "peerDependencies": { "browserslist": ">= 4.21.0" } }, "node_modules/util-deprecate": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", "dev": true }, "node_modules/utility-types": { "version": "3.10.0", "resolved": "https://registry.npmjs.org/utility-types/-/utility-types-3.10.0.tgz", "integrity": "sha512-O11mqxmi7wMKCo6HKFt5AhO4BwY3VV68YU07tgxfz8zJTIxr4BpsezN49Ffwy9j3ZpwwJp4fkRwjRzq3uWE6Rg==", "dev": true, "engines": { "node": ">= 4" } }, "node_modules/uvu": { "version": "0.5.6", "resolved": "https://registry.npmjs.org/uvu/-/uvu-0.5.6.tgz", "integrity": "sha512-+g8ENReyr8YsOc6fv/NVJs2vFdHBnBNdfE49rshrTzDWOlUx4Gq7KOS2GD8eqhy2j+Ejq29+SbKH8yjkAqXqoA==", "dev": true, "license": "MIT", "dependencies": { "dequal": "^2.0.0", "diff": "^5.0.0", "kleur": "^4.0.3", "sade": "^1.7.3" }, "bin": { "uvu": "bin.js" }, "engines": { "node": ">=8" } }, "node_modules/uvu/node_modules/diff": { "version": "5.2.2", "resolved": "https://registry.npmjs.org/diff/-/diff-5.2.2.tgz", "integrity": "sha512-vtcDfH3TOjP8UekytvnHH1o1P4FcUdt4eQ1Y+Abap1tk/OB2MWQvcwS2ClCd1zuIhc3JKOx6p3kod8Vfys3E+A==", "dev": true, "license": "BSD-3-Clause", "engines": { "node": ">=0.3.1" } }, "node_modules/uzip": { "version": "0.20201231.0", "resolved": "https://registry.npmjs.org/uzip/-/uzip-0.20201231.0.tgz", "integrity": "sha512-OZeJfZP+R0z9D6TmBgLq2LHzSSptGMGDGigGiEe0pr8UBe/7fdflgHlHBNDASTXB5jnFuxHpNaJywSg8YFeGng==", "dev": true }, "node_modules/v8-compile-cache-lib": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz", "integrity": "sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==", "dev": true }, "node_modules/weak-lru-cache": { "version": "1.2.2", "resolved": "https://registry.npmjs.org/weak-lru-cache/-/weak-lru-cache-1.2.2.tgz", "integrity": "sha512-DEAoo25RfSYMuTGc9vPJzZcZullwIqRDSI9LOy+fkCJPi6hykCnfKaXTuPBDuXAUcqHXyOgFtHNp/kB2FjYHbw==", "dev": true }, "node_modules/xxhash-wasm": { "version": "0.4.2", "resolved": "https://registry.npmjs.org/xxhash-wasm/-/xxhash-wasm-0.4.2.tgz", "integrity": "sha512-/eyHVRJQCirEkSZ1agRSCwriMhwlyUcFkXD5TPVSLP+IPzjsqMVzZwdoczLp1SoQU0R3dxz1RpIK+4YNQbCVOA==", "dev": true }, "node_modules/yallist": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", "dev": true }, "node_modules/yaml": { "version": "1.10.2", "resolved": "https://registry.npmjs.org/yaml/-/yaml-1.10.2.tgz", "integrity": "sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg==", "dev": true, "engines": { "node": ">= 6" } }, "node_modules/yn": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz", "integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==", "dev": true, "engines": { "node": ">=6" } } } } 101arrowz-fflate-a661bab/package.json000066400000000000000000000067271520173263500175110ustar00rootroot00000000000000{ "name": "fflate", "version": "0.8.3", "description": "High performance (de)compression in an 8kB package", "main": "./lib/index.cjs", "module": "./esm/browser.js", "types": "./lib/index.d.ts", "unpkg": "./umd/index.js", "jsdelivr": "./umd/index.js", "browser": { "./lib/node-worker.cjs": "./lib/worker.cjs" }, "exports": { ".": { "node": { "import": { "types": "./esm/index.d.mts", "default": "./esm/index.mjs" }, "require": { "types": "./lib/node.d.cts", "default": "./lib/node.cjs" } }, "import": { "types": "./esm/browser.d.ts", "default": "./esm/browser.js" }, "require": { "types": "./lib/browser.d.cts", "default": "./lib/browser.cjs" } }, "./node": { "import": { "types": "./esm/index.d.mts", "default": "./esm/index.mjs" }, "require": { "types": "./lib/node.d.cts", "default": "./lib/node.cjs" } }, "./browser": { "import": { "types": "./esm/browser.d.ts", "default": "./esm/browser.js" }, "require": { "types": "./lib/browser.d.cts", "default": "./lib/browser.cjs" } }, "./package.json": "./package.json" }, "targets": { "main": false, "module": false, "browser": false, "types": false }, "sideEffects": false, "homepage": "https://101arrowz.github.io/fflate", "repository": "https://github.com/101arrowz/fflate", "bugs": { "email": "arjunbarrett@gmail.com", "url": "https://github.com/101arrowz/fflate/issues" }, "author": "Arjun Barrett ", "license": "MIT", "keywords": [ "gzip", "gunzip", "deflate", "inflate", "compression", "decompression", "zlib", "pako", "jszip", "browser", "node.js", "tiny", "fast", "zip", "unzip", "non-blocking" ], "scripts": { "build": "npm run build:lib && npm run build:docs && npm run build:demo", "script": "node -r ts-node/register scripts/$SC.ts", "build:lib": "tsc && tsc --project tsconfig.esm.json && npm run build:rewrite && npm run build:umd", "build:umd": "SC=buildUMD npm run script", "build:rewrite": "SC=rewriteBuilds npm run script", "build:demo": "tsc --project tsconfig.demo.json && parcel build demo/index.html --no-cache --public-url \"./\" && SC=cpGHPages npm run script", "build:docs": "typedoc --plugin typedoc-plugin-markdown --hideBreadcrumbs --readme none --disableSources --excludePrivate --excludeProtected --expandParameters --githubPages false --out docs/ src/index.ts", "test": "TS_NODE_PROJECT=test/tsconfig.json uvu -b -r ts-node/register test", "prepack": "npm run build && npm run test" }, "devDependencies": { "@parcel/service-worker": "^2.9.3", "@types/node": "^25.8.0", "@types/pako": "*", "@types/react": "^18.2.21", "@types/react-dom": "^18.2.7", "jszip": "^3.10.1", "pako": "*", "parcel": "^2.9.3", "preact": "^10.17.1", "react": "^18.2.0", "react-dom": "^18.2.0", "simple-git": "^3.19.1", "terser": "^5.47.1", "tiny-inflate": "*", "ts-node": "^10.9.2", "typedoc": "^0.28.19", "typedoc-plugin-markdown": "^4.11.0", "typescript": "^6.0.3", "uvu": "^0.5.6", "uzip": "*" }, "alias": { "react": "preact/compat", "react-dom": "preact/compat", "buffer": false, "process": false } } 101arrowz-fflate-a661bab/scripts/000077500000000000000000000000001520173263500166765ustar00rootroot00000000000000101arrowz-fflate-a661bab/scripts/buildUMD.ts000066400000000000000000000026721520173263500207220ustar00rootroot00000000000000import { existsSync, mkdirSync, readFileSync, writeFileSync } from 'fs'; import { minify, MinifyOptions } from 'terser'; import { join } from 'path'; const p = (...fns: string[]) => join(__dirname, '..', ...fns); const src = readFileSync(p('lib', 'index.cjs'), 'utf8'); const worker = readFileSync(p('lib', 'worker.cjs'), 'utf8'); const nodeWorker = readFileSync(p('lib', 'node-worker.cjs'), 'utf8'); const opts: MinifyOptions = { mangle: { toplevel: true, }, compress: { passes: 5, unsafe: true, pure_getters: true }, sourceMap: false }; minify(src, opts).then(async out => { const wkrOut = (await minify(worker, opts)).code!.replace( /exports.__esModule=!0;/, '' ).replace(/exports\./g, '_f.'); const nodeWkrOut = (await minify(nodeWorker, opts)).code!.replace( /exports.__esModule=!0;/, '' ); const res = "!function(f){typeof module!='undefined'&&typeof exports=='object'?module.exports=f():typeof define!='undefined'&&define.amd?define(f):(typeof self!='undefined'?self:this).fflate=f()}(function(){var _e={};" + out.code!.replace(/exports\.(.*) = void 0;\n/, '').replace(/exports\./g, '_e.').replace(/require\("\.\/node-worker\.cjs"\)/, "(typeof module!='undefined'&&typeof exports=='object'?function(_f){" + nodeWkrOut + 'return _f}:function(_f){' + wkrOut + 'return _f})({})' ) + 'return _e});'; if (!existsSync(p('umd'))) mkdirSync(p('umd')); writeFileSync(p('umd', 'index.js'), res); });101arrowz-fflate-a661bab/scripts/cpGHPages.ts000066400000000000000000000013411520173263500210460ustar00rootroot00000000000000import { simpleGit } from 'simple-git'; import { resolve, join } from 'path'; import { copyFileSync, readdirSync, statSync, unlinkSync } from 'fs'; const baseDir = resolve(__dirname, '..'); const to = (...paths: string[]) => join(baseDir, ...paths); const git = simpleGit(); git.log({ from: 'HEAD~1', to: 'HEAD' }).then(async log => { const hash = log.latest!.hash.slice(0, 7); await git.checkout('gh-pages'); for (const f of readdirSync(to('.'))) { if (statSync(f).isFile()) unlinkSync(to(f)); } const files = readdirSync(to('dist')) for (const f of files) { copyFileSync(to('dist', f), to(f)); } await git.add(files); await git.commit('Build demo from ' + hash); await git.checkout('master'); });101arrowz-fflate-a661bab/scripts/rewriteBuilds.ts000066400000000000000000000055261520173263500221020ustar00rootroot00000000000000import { readFileSync, writeFileSync, unlinkSync } from 'fs'; import { join } from 'path'; const atClass = /\/\*\* \@class \*\//g, pure = '/*#__PURE__*/'; const esModule = /(exports\.__esModule = true;|Object\.defineProperty\(exports, "__esModule", { value: true }\);)\n/; const libDir = join(__dirname, '..', 'lib'); const libIndex = join(libDir, 'index.js'); const lib = readFileSync(libIndex, 'utf-8') .replace(atClass, pure) .replace(esModule, '') .replace(/exports\.(.*) = void 0;\n/, ''); const libTypes = readFileSync(join(libDir, 'index.d.ts'), 'utf-8'); writeFileSync(libIndex, lib); const esmDir = join(__dirname, '..', 'esm'); const esmIndex = join(esmDir, 'index.js'), esmWK = join(esmDir, 'worker.js'), esmNWK = join(esmDir, 'node-worker.js'), libWK = join(libDir, 'worker.js'), libNWK = join(libDir, 'node-worker.js'); const esm = readFileSync(esmIndex, 'utf-8').replace(atClass, pure); const wk = readFileSync(esmWK, 'utf-8'), nwk = readFileSync(esmNWK, 'utf-8'); writeFileSync(join(libDir, 'worker.cjs'), readFileSync(join(libDir, 'worker.js'), 'utf-8').replace(esModule, '')); writeFileSync(join(libDir, 'node-worker.cjs'), readFileSync(join(libDir, 'node-worker.js'), 'utf-8').replace(esModule, '')); unlinkSync(esmIndex), unlinkSync(esmWK), unlinkSync(esmNWK), unlinkSync(libIndex), unlinkSync(libWK), unlinkSync(libNWK); unlinkSync(join(libDir, 'index.d.ts')), unlinkSync(join(libDir, 'worker.d.ts')), unlinkSync(join(libDir, 'node-worker.d.ts')); const workerImport = /import (.*?) from '\.\/node-worker';/; const workerRequire = /var (.*?) = require\("\.\/node-worker"\);/; const defaultExport = /export default/; writeFileSync(join(esmDir, 'index.mjs'), "import { createRequire } from 'module';\nvar require = createRequire('/');\n" + esm.replace(workerImport, name => nwk.replace(defaultExport, `var ${name.slice(7, name.indexOf(' ', 8))} =`))); writeFileSync(join(esmDir, 'index.d.mts'), libTypes); writeFileSync(join(esmDir, 'browser.js'), esm.replace(workerImport, name => wk.replace(defaultExport, `var ${name.slice(7, name.indexOf(' ', 8))} =`))); writeFileSync(join(esmDir, 'browser.d.ts'), libTypes); writeFileSync(join(libDir, 'node.cjs'), lib.replace(workerRequire, name => { name = name.slice(4, name.indexOf(' ', 5)); return nwk.replace(defaultExport, `var ${name} = {};\n${name}["default"] =`) })); writeFileSync(join(libDir, 'node.d.cts'), libTypes); writeFileSync(join(libDir, 'browser.cjs'), lib.replace(workerRequire, name => { name = name.slice(4, name.indexOf(' ', 5)); return wk.replace(defaultExport, `var ${name} = {};\n${name}["default"] =`) })); writeFileSync(join(libDir, 'browser.d.cts'), libTypes); writeFileSync(join(libDir, 'index.cjs'), lib.replace(workerRequire, name => `var ${name.slice(4, name.indexOf(' ', 5))} = require("./node-worker.cjs");`)); writeFileSync(join(libDir, 'index.d.ts'), libTypes);101arrowz-fflate-a661bab/src/000077500000000000000000000000001520173263500157765ustar00rootroot00000000000000101arrowz-fflate-a661bab/src/index.ts000066400000000000000000003543451520173263500174730ustar00rootroot00000000000000// DEFLATE is a complex format; to read this code, you should probably check the RFC first: // https://tools.ietf.org/html/rfc1951 // You may also wish to take a look at the guide I made about this program: // https://gist.github.com/101arrowz/253f31eb5abc3d9275ab943003ffecad // Some of the following code is similar to that of UZIP.js: // https://github.com/photopea/UZIP.js // However, the vast majority of the codebase has diverged from UZIP.js to increase performance and reduce bundle size. // Sometimes 0 will appear where -1 would be more appropriate. This is because using a uint // is better for memory in most engines (I *think*). import wk from './node-worker'; // aliases for shorter compressed code (most minifers don't do this) const u8 = Uint8Array, u16 = Uint16Array, i32 = Int32Array; // fixed length extra bits const fleb = new u8([0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0, /* unused */ 0, 0, /* impossible */ 0]); // fixed distance extra bits const fdeb = new u8([0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13, /* unused */ 0, 0]); // code length index map const clim = new u8([16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15]); // get base, reverse index map from extra bits const freb = (eb: Uint8Array, start: number) => { const b = new u16(31); for (let i = 0; i < 31; ++i) { b[i] = start += 1 << eb[i - 1]; } // numbers here are at max 18 bits const r = new i32(b[30]); for (let i = 1; i < 30; ++i) { for (let j = b[i]; j < b[i + 1]; ++j) { r[j] = ((j - b[i]) << 5) | i; } } return { b, r }; } const { b: fl, r: revfl } = freb(fleb, 2); // we can ignore the fact that the other numbers are wrong; they never happen anyway fl[28] = 258, revfl[258] = 28; const { b: fd, r: revfd } = freb(fdeb, 0); // map of value to reverse (assuming 16 bits) const rev = new u16(32768); for (let i = 0; i < 32768; ++i) { // reverse table algorithm from SO let x = ((i & 0xAAAA) >> 1) | ((i & 0x5555) << 1); x = ((x & 0xCCCC) >> 2) | ((x & 0x3333) << 2); x = ((x & 0xF0F0) >> 4) | ((x & 0x0F0F) << 4); rev[i] = (((x & 0xFF00) >> 8) | ((x & 0x00FF) << 8)) >> 1; } // create huffman tree from u8 "map": index -> code length for code index // mb (max bits) must be at most 15 // TODO: optimize/split up? const hMap = ((cd: Uint8Array, mb: number, r: 0 | 1) => { const s = cd.length; // index let i = 0; // u16 "map": index -> # of codes with bit length = index const l = new u16(mb); // length of cd must be 288 (total # of codes) for (; i < s; ++i) { if (cd[i]) ++l[cd[i] - 1]; } // u16 "map": index -> minimum code for bit length = index const le = new u16(mb); for (i = 1; i < mb; ++i) { le[i] = (le[i - 1] + l[i - 1]) << 1; } let co: Uint16Array; if (r) { // u16 "map": index -> number of actual bits, symbol for code co = new u16(1 << mb); // bits to remove for reverser const rvb = 15 - mb; for (i = 0; i < s; ++i) { // ignore 0 lengths if (cd[i]) { // num encoding both symbol and bits read const sv = (i << 4) | cd[i]; // free bits const r = mb - cd[i]; // start value let v = le[cd[i] - 1]++ << r; // m is end value for (const m = v | ((1 << r) - 1); v <= m; ++v) { // every 16 bit value starting with the code yields the same result co[rev[v] >> rvb] = sv; } } } } else { co = new u16(s); for (i = 0; i < s; ++i) { if (cd[i]) { co[i] = rev[le[cd[i] - 1]++] >> (15 - cd[i]); } } } return co; }); // fixed length tree const flt = new u8(288); for (let i = 0; i < 144; ++i) flt[i] = 8; for (let i = 144; i < 256; ++i) flt[i] = 9; for (let i = 256; i < 280; ++i) flt[i] = 7; for (let i = 280; i < 288; ++i) flt[i] = 8; // fixed distance tree const fdt = new u8(32); for (let i = 0; i < 32; ++i) fdt[i] = 5; // fixed length map const flm = /*#__PURE__*/ hMap(flt, 9, 0), flrm = /*#__PURE__*/ hMap(flt, 9, 1); // fixed distance map const fdm = /*#__PURE__*/ hMap(fdt, 5, 0), fdrm = /*#__PURE__*/ hMap(fdt, 5, 1); // find max of array const max = (a: Uint8Array | number[]) => { let m = a[0]; for (let i = 1; i < a.length; ++i) { if (a[i] > m) m = a[i]; } return m; }; // read d, starting at bit p and mask with m const bits = (d: Uint8Array, p: number, m: number) => { const o = (p / 8) | 0; return ((d[o] | (d[o + 1] << 8)) >> (p & 7)) & m; } // read d, starting at bit p continuing for at least 16 bits const bits16 = (d: Uint8Array, p: number) => { const o = (p / 8) | 0; return ((d[o] | (d[o + 1] << 8) | (d[o + 2] << 16)) >> (p & 7)); } // get end of byte const shft = (p: number) => ((p + 7) / 8) | 0; // typed array slice - allows garbage collector to free original reference, // while being more compatible than .slice const slc = (v: Uint8Array, s: number, e?: number) => { if (s == null || s < 0) s = 0; if (e == null || e > v.length) e = v.length; // can't use .constructor in case user-supplied return new u8(v.subarray(s, e)); } // inflate state type InflateState = { // lmap l?: Uint16Array; // dmap d?: Uint16Array; // lbits m?: number; // dbits n?: number; // final f?: number; // pos p?: number; // byte b?: number; // lstchk i: number; }; /** * Codes for errors generated within this library */ export const FlateErrorCode = { UnexpectedEOF: 0, InvalidBlockType: 1, InvalidLengthLiteral: 2, InvalidDistance: 3, StreamFinished: 4, NoStreamHandler: 5, InvalidHeader: 6, NoCallback: 7, InvalidUTF8: 8, ExtraFieldTooLong: 9, InvalidDate: 10, FilenameTooLong: 11, StreamFinishing: 12, InvalidZipData: 13, UnknownCompressionMethod: 14 } as const; // error codes const ec = [ 'unexpected EOF', 'invalid block type', 'invalid length/literal', 'invalid distance', 'stream finished', 'no stream handler', , // determined by compression function 'no callback', 'invalid UTF-8 data', 'extra field too long', 'date not in range 1980-2099', 'filename too long', 'stream finishing', 'invalid zip data' // determined by unknown compression method ]; /** * An error generated within this library */ export interface FlateError extends Error { /** * The code associated with this error */ code: number; }; const err = (ind: number, msg?: string | 0, nt?: 1) => { const e: Partial = new Error(msg || ec[ind]); e.code = ind; if (Error.captureStackTrace) Error.captureStackTrace(e, err); if (!nt) throw e; return e as FlateError; } // expands raw DEFLATE data const inflt = (dat: Uint8Array, st: InflateState, buf?: Uint8Array, dict?: Uint8Array) => { // source length dict length const sl = dat.length, dl = dict ? dict.length : 0; if (!sl || st.f && !st.l) return buf || new u8(0); const noBuf = !buf; // have to estimate size const resize = noBuf || st.i != 2; // no state const noSt = st.i; // Assumes roughly 33% compression ratio average if (noBuf) buf = new u8(sl * 3); // ensure buffer can fit at least l elements const cbuf = (l: number) => { let bl = buf.length; // need to increase size to fit if (l > bl) { // Double or set to necessary, whichever is greater const nbuf = new u8(Math.max(bl * 2, l)); nbuf.set(buf); buf = nbuf; } }; // last chunk bitpos bytes let final = st.f || 0, pos = st.p || 0, bt = st.b || 0, lm = st.l, dm = st.d, lbt = st.m, dbt = st.n; // total bits const tbts = sl * 8; do { if (!lm) { // BFINAL - this is only 1 when last chunk is next final = bits(dat, pos, 1); // type: 0 = no compression, 1 = fixed huffman, 2 = dynamic huffman const type = bits(dat, pos + 1, 3); pos += 3; if (!type) { // go to end of byte boundary const s = shft(pos) + 4, l = dat[s - 4] | (dat[s - 3] << 8), t = s + l; if (t > sl) { if (noSt) err(0); break; } // ensure size if (resize) cbuf(bt + l); // Copy over uncompressed data buf.set(dat.subarray(s, t), bt); // Get new bitpos, update byte count st.b = bt += l, st.p = pos = t * 8, st.f = final; continue; } else if (type == 1) lm = flrm, dm = fdrm, lbt = 9, dbt = 5; else if (type == 2) { // literal lengths const hLit = bits(dat, pos, 31) + 257, hcLen = bits(dat, pos + 10, 15) + 4; const tl = hLit + bits(dat, pos + 5, 31) + 1; pos += 14; // length+distance tree const ldt = new u8(tl); // code length tree const clt = new u8(19); for (let i = 0; i < hcLen; ++i) { // use index map to get real code clt[clim[i]] = bits(dat, pos + i * 3, 7); } pos += hcLen * 3; // code lengths bits const clb = max(clt), clbmsk = (1 << clb) - 1; // code lengths map const clm = hMap(clt, clb, 1); for (let i = 0; i < tl;) { const r = clm[bits(dat, pos, clbmsk)]; // bits read pos += r & 15; // symbol const s = r >> 4; // code length to copy if (s < 16) { ldt[i++] = s; } else { // copy count let c = 0, n = 0; if (s == 16) n = 3 + bits(dat, pos, 3), pos += 2, c = ldt[i - 1]; else if (s == 17) n = 3 + bits(dat, pos, 7), pos += 3; else if (s == 18) n = 11 + bits(dat, pos, 127), pos += 7; while (n--) ldt[i++] = c; } } // length tree distance tree const lt = ldt.subarray(0, hLit), dt = ldt.subarray(hLit); // max length bits lbt = max(lt) // max dist bits dbt = max(dt); lm = hMap(lt, lbt, 1); dm = hMap(dt, dbt, 1); } else err(1); if (pos > tbts) { if (noSt) err(0); break; } } // Make sure the buffer can hold this + the largest possible addition // Maximum chunk size (practically, theoretically infinite) is 2^17 if (resize) cbuf(bt + 131072); const lms = (1 << lbt) - 1, dms = (1 << dbt) - 1; let lpos = pos; for (;; lpos = pos) { // bits read, code const c = lm[bits16(dat, pos) & lms], sym = c >> 4; pos += c & 15; if (pos > tbts) { if (noSt) err(0); break; } if (!c) err(2); if (sym < 256) buf[bt++] = sym; else if (sym == 256) { lpos = pos, lm = null; break; } else { let add = sym - 254; // no extra bits needed if less if (sym > 264) { // index const i = sym - 257, b = fleb[i]; add = bits(dat, pos, (1 << b) - 1) + fl[i]; pos += b; } // dist const d = dm[bits16(dat, pos) & dms], dsym = d >> 4; if (!d) err(3); pos += d & 15; let dt = fd[dsym]; if (dsym > 3) { const b = fdeb[dsym]; dt += bits16(dat, pos) & (1 << b) - 1, pos += b; } if (pos > tbts) { if (noSt) err(0); break; } if (resize) cbuf(bt + 131072); const end = bt + add; if (bt < dt) { const shift = dl - dt, dend = Math.min(dt, end); if (shift + bt < 0) err(3); for (; bt < dend; ++bt) buf[bt] = dict[shift + bt]; } for (; bt < end; ++bt) buf[bt] = buf[bt - dt]; } } st.l = lm, st.p = lpos, st.b = bt, st.f = final; if (lm) final = 1, st.m = lbt, st.d = dm, st.n = dbt; } while (!final) // don't reallocate for streams or user buffers return bt != buf.length && noBuf ? slc(buf, 0, bt) : buf.subarray(0, bt); } // starting at p, write the minimum number of bits that can hold v to d const wbits = (d: Uint8Array, p: number, v: number) => { v <<= p & 7; const o = (p / 8) | 0; d[o] |= v; d[o + 1] |= v >> 8; } // starting at p, write the minimum number of bits (>8) that can hold v to d const wbits16 = (d: Uint8Array, p: number, v: number) => { v <<= p & 7; const o = (p / 8) | 0; d[o] |= v; d[o + 1] |= v >> 8; d[o + 2] |= v >> 16; } type HuffNode = { // symbol s: number; // frequency f: number; // left child l?: HuffNode; // right child r?: HuffNode; }; // creates code lengths from a frequency table const hTree = (d: Uint16Array, mb: number) => { // Need extra info to make a tree const t: HuffNode[] = []; for (let i = 0; i < d.length; ++i) { if (d[i]) t.push({ s: i, f: d[i] }); } const s = t.length; const t2 = t.slice(); if (!s) return { t: et, l: 0 }; if (s == 1) { const v = new u8(t[0].s + 1); v[t[0].s] = 1; return { t: v, l: 1 }; } t.sort((a, b) => a.f - b.f); // after i2 reaches last ind, will be stopped // freq must be greater than largest possible number of symbols t.push({ s: -1, f: 25001 }); let l = t[0], r = t[1], i0 = 0, i1 = 1, i2 = 2; t[0] = { s: -1, f: l.f + r.f, l, r }; // efficient algorithm from UZIP.js // i0 is lookbehind, i2 is lookahead - after processing two low-freq // symbols that combined have high freq, will start processing i2 (high-freq, // non-composite) symbols instead // see https://reddit.com/r/photopea/comments/ikekht/uzipjs_questions/ while (i1 != s - 1) { l = t[t[i0].f < t[i2].f ? i0++ : i2++]; r = t[i0 != i1 && t[i0].f < t[i2].f ? i0++ : i2++]; t[i1++] = { s: -1, f: l.f + r.f, l, r }; } let maxSym = t2[0].s; for (let i = 1; i < s; ++i) { if (t2[i].s > maxSym) maxSym = t2[i].s; } // code lengths const tr = new u16(maxSym + 1); // max bits in tree let mbt = ln(t[i1 - 1], tr, 0); if (mbt > mb) { // more algorithms from UZIP.js // TODO: find out how this code works (debt) // ind debt let i = 0, dt = 0; // left cost const lft = mbt - mb, cst = 1 << lft; t2.sort((a, b) => tr[b.s] - tr[a.s] || a.f - b.f); for (; i < s; ++i) { const i2 = t2[i].s; if (tr[i2] > mb) { dt += cst - (1 << (mbt - tr[i2])); tr[i2] = mb; } else break; } dt >>= lft; while (dt > 0) { const i2 = t2[i].s; if (tr[i2] < mb) dt -= 1 << (mb - tr[i2]++ - 1); else ++i; } for (; i >= 0 && dt; --i) { const i2 = t2[i].s; if (tr[i2] == mb) { --tr[i2]; ++dt; } } mbt = mb; } return { t: new u8(tr), l: mbt }; } // get the max length and assign length codes const ln = (n: HuffNode, l: Uint16Array, d: number): number => { return n.s == -1 ? Math.max(ln(n.l, l, d + 1), ln(n.r, l, d + 1)) : (l[n.s] = d); } // length codes generation const lc = (c: Uint8Array) => { let s = c.length; // Note that the semicolon was intentional while (s && !c[--s]); const cl = new u16(++s); // ind num streak let cli = 0, cln = c[0], cls = 1; const w = (v: number) => { cl[cli++] = v; } for (let i = 1; i <= s; ++i) { if (c[i] == cln && i != s) ++cls; else { if (!cln && cls > 2) { for (; cls > 138; cls -= 138) w(32754); if (cls > 2) { w(cls > 10 ? ((cls - 11) << 5) | 28690 : ((cls - 3) << 5) | 12305); cls = 0; } } else if (cls > 3) { w(cln), --cls; for (; cls > 6; cls -= 6) w(8304); if (cls > 2) w(((cls - 3) << 5) | 8208), cls = 0; } while (cls--) w(cln); cls = 1; cln = c[i]; } } return { c: cl.subarray(0, cli), n: s }; } // calculate the length of output from tree, code lengths const clen = (cf: Uint16Array, cl: Uint8Array) => { let l = 0; for (let i = 0; i < cl.length; ++i) l += cf[i] * cl[i]; return l; } // writes a fixed block // returns the new bit pos const wfblk = (out: Uint8Array, pos: number, dat: Uint8Array) => { // no need to write 00 as type: TypedArray defaults to 0 const s = dat.length; const o = shft(pos + 2); out[o] = s & 255; out[o + 1] = s >> 8; out[o + 2] = out[o] ^ 255; out[o + 3] = out[o + 1] ^ 255; for (let i = 0; i < s; ++i) out[o + i + 4] = dat[i]; return (o + 4 + s) * 8; } // writes a block const wblk = (dat: Uint8Array, out: Uint8Array, final: number, syms: Int32Array, lf: Uint16Array, df: Uint16Array, eb: number, li: number, bs: number, bl: number, p: number) => { wbits(out, p++, final); ++lf[256]; const { t: dlt, l: mlb } = hTree(lf, 15); const { t: ddt, l: mdb } = hTree(df, 15); const { c: lclt, n: nlc } = lc(dlt); const { c: lcdt, n: ndc } = lc(ddt); const lcfreq = new u16(19); for (let i = 0; i < lclt.length; ++i) ++lcfreq[lclt[i] & 31]; for (let i = 0; i < lcdt.length; ++i) ++lcfreq[lcdt[i] & 31]; const { t: lct, l: mlcb } = hTree(lcfreq, 7); let nlcc = 19; for (; nlcc > 4 && !lct[clim[nlcc - 1]]; --nlcc); const flen = (bl + 5) << 3; const ftlen = clen(lf, flt) + clen(df, fdt) + eb; const dtlen = clen(lf, dlt) + clen(df, ddt) + eb + 14 + 3 * nlcc + clen(lcfreq, lct) + 2 * lcfreq[16] + 3 * lcfreq[17] + 7 * lcfreq[18]; if (bs >= 0 && flen <= ftlen && flen <= dtlen) return wfblk(out, p, dat.subarray(bs, bs + bl)); let lm: Uint16Array, ll: Uint8Array, dm: Uint16Array, dl: Uint8Array; wbits(out, p, 1 + (dtlen < ftlen as unknown as number)), p += 2; if (dtlen < ftlen) { lm = hMap(dlt, mlb, 0), ll = dlt, dm = hMap(ddt, mdb, 0), dl = ddt; const llm = hMap(lct, mlcb, 0); wbits(out, p, nlc - 257); wbits(out, p + 5, ndc - 1); wbits(out, p + 10, nlcc - 4); p += 14; for (let i = 0; i < nlcc; ++i) wbits(out, p + 3 * i, lct[clim[i]]); p += 3 * nlcc; const lcts = [lclt, lcdt]; for (let it = 0; it < 2; ++it) { const clct = lcts[it]; for (let i = 0; i < clct.length; ++i) { const len = clct[i] & 31; wbits(out, p, llm[len]), p += lct[len]; if (len > 15) wbits(out, p, (clct[i] >> 5) & 127), p += clct[i] >> 12; } } } else { lm = flm, ll = flt, dm = fdm, dl = fdt; } for (let i = 0; i < li; ++i) { const sym = syms[i]; if (sym > 255) { const len = (sym >> 18) & 31; wbits16(out, p, lm[len + 257]), p += ll[len + 257]; if (len > 7) wbits(out, p, (sym >> 23) & 31), p += fleb[len]; const dst = sym & 31; wbits16(out, p, dm[dst]), p += dl[dst]; if (dst > 3) wbits16(out, p, (sym >> 5) & 8191), p += fdeb[dst]; } else { wbits16(out, p, lm[sym]), p += ll[sym]; } } wbits16(out, p, lm[256]); return p + ll[256]; } // deflate options (nice << 13) | chain const deo = /*#__PURE__*/ new i32([65540, 131080, 131088, 131104, 262176, 1048704, 1048832, 2114560, 2117632]); // empty const et = /*#__PURE__*/new u8(0); type DeflateState = { // head h?: Uint16Array; // prev p?: Uint16Array; // index i?: number; // end index z?: number; // wait index w?: number; // remainder byte info r?: number; // last chunk l: number; }; // compresses data into a raw DEFLATE buffer const dflt = (dat: Uint8Array, lvl: number, plvl: number, pre: number, post: number, st: DeflateState) => { const s = st.z || dat.length; const o = new u8(pre + s + 5 * (1 + Math.ceil(s / 7000)) + post); // writing to this writes to the output buffer const w = o.subarray(pre, o.length - post); const lst = st.l; let pos = (st.r || 0) & 7; if (lvl) { if (pos) w[0] = st.r >> 3; const opt = deo[lvl - 1]; const n = opt >> 13, c = opt & 8191; const msk = (1 << plvl) - 1; // prev 2-byte val map curr 2-byte val map const prev = st.p || new u16(32768), head = st.h || new u16(msk + 1); const bs1 = Math.ceil(plvl / 3), bs2 = 2 * bs1; const hsh = (i: number) => (dat[i] ^ (dat[i + 1] << bs1) ^ (dat[i + 2] << bs2)) & msk; // 24576 is an arbitrary number of maximum symbols per block // 424 buffer for last block const syms = new i32(25000); // length/literal freq distance freq const lf = new u16(288), df = new u16(32); // l/lcnt exbits index l/lind waitdx blkpos let lc = 0, eb = 0, i = st.i || 0, li = 0, wi = st.w || 0, bs = 0; for (; i + 2 < s; ++i) { // hash value const hv = hsh(i); // index mod 32768 previous index mod let imod = i & 32767, pimod = head[hv]; prev[imod] = pimod; head[hv] = imod; // We always should modify head and prev, but only add symbols if // this data is not yet processed ("wait" for wait index) if (wi <= i) { // bytes remaining const rem = s - i; if ((lc > 7000 || li > 24576) && (rem > 423 || !lst)) { pos = wblk(dat, w, 0, syms, lf, df, eb, li, bs, i - bs, pos); li = lc = eb = 0, bs = i; for (let j = 0; j < 286; ++j) lf[j] = 0; for (let j = 0; j < 30; ++j) df[j] = 0; } // len dist chain let l = 2, d = 0, ch = c, dif = imod - pimod & 32767; if (rem > 2 && hv == hsh(i - dif)) { const maxn = Math.min(n, rem) - 1; const maxd = Math.min(32767, i); // max possible length // not capped at dif because decompressors implement "rolling" index population const ml = Math.min(258, rem); while (dif <= maxd && --ch && imod != pimod) { if (dat[i + l] == dat[i + l - dif]) { let nl = 0; for (; nl < ml && dat[i + nl] == dat[i + nl - dif]; ++nl); if (nl > l) { l = nl, d = dif; // break out early when we reach "nice" (we are satisfied enough) if (nl > maxn) break; // now, find the rarest 2-byte sequence within this // length of literals and search for that instead. // Much faster than just using the start const mmd = Math.min(dif, nl - 2); let md = 0; for (let j = 0; j < mmd; ++j) { const ti = i - dif + j & 32767; const pti = prev[ti]; const cd = ti - pti & 32767; if (cd > md) md = cd, pimod = ti; } } } // check the previous match imod = pimod, pimod = prev[imod]; dif += imod - pimod & 32767; } } // d will be nonzero only when a match was found if (d) { // store both dist and len data in one int32 // Make sure this is recognized as a len/dist with 28th bit (2^28) syms[li++] = 268435456 | (revfl[l] << 18) | revfd[d]; const lin = revfl[l] & 31, din = revfd[d] & 31; eb += fleb[lin] + fdeb[din]; ++lf[257 + lin]; ++df[din]; wi = i + l; ++lc; } else { syms[li++] = dat[i]; ++lf[dat[i]]; } } } for (i = Math.max(i, wi); i < s; ++i) { syms[li++] = dat[i]; ++lf[dat[i]]; } pos = wblk(dat, w, lst, syms, lf, df, eb, li, bs, i - bs, pos); if (!lst) { st.r = (pos & 7) | w[(pos / 8) | 0] << 3; // shft(pos) now 1 less if pos & 7 != 0 pos -= 7; st.h = head, st.p = prev, st.i = i, st.w = wi; } } else { for (let i = st.w || 0; i < s + lst; i += 65535) { // end let e = i + 65535; if (e >= s) { // write final block w[(pos / 8) | 0] = lst; e = s; } pos = wfblk(w, pos + 1, dat.subarray(i, e)); } st.i = s; } return slc(o, 0, pre + shft(pos) + post); } // crc check type CRCV = { p(d: Uint8Array): void; d(): number; }; // CRC32 table const crct = /*#__PURE__*/ (() => { const t = new Int32Array(256); for (let i = 0; i < 256; ++i) { let c = i, k = 9; while (--k) c = ((c & 1) && -306674912) ^ (c >>> 1); t[i] = c; } return t; })(); // CRC32 const crc = (): CRCV => { let c = -1; return { p(d) { // closures have awful performance let cr = c; for (let i = 0; i < d.length; ++i) cr = crct[(cr & 255) ^ d[i]] ^ (cr >>> 8); c = cr; }, d() { return ~c; } } } // Adler32 const adler = (): CRCV => { let a = 1, b = 0; return { p(d) { // closures have awful performance let n = a, m = b; const l = d.length | 0; for (let i = 0; i != l;) { const e = Math.min(i + 2655, l); for (; i < e; ++i) m += n += d[i]; n = (n & 65535) + 15 * (n >> 16), m = (m & 65535) + 15 * (m >> 16); } a = n, b = m; }, d() { a %= 65521, b %= 65521; return (a & 255) << 24 | (a & 0xFF00) << 8 | (b & 255) << 8 | (b >> 8); } } } /** * Options for decompressing a DEFLATE stream */ export interface InflateStreamOptions { /** * The dictionary used to compress the original data. If no dictionary was used during compression, this option has no effect. * * Supplying the wrong dictionary during decompression usually yields corrupt output or causes an invalid distance error. */ dictionary?: Uint8Array; } /** * Options for decompressing DEFLATE data */ export interface InflateOptions extends InflateStreamOptions { /** * The buffer into which to write the decompressed data. Saves memory if you know the decompressed size in advance. * * Note that if the decompression result is larger than the size of this buffer, it will be truncated to fit. */ out?: Uint8Array; } /** * Options for decompressing a GZIP stream */ export interface GunzipStreamOptions extends InflateStreamOptions {} /** * Options for decompressing GZIP data */ export interface GunzipOptions extends InflateStreamOptions { /** * The buffer into which to write the decompressed data. GZIP already encodes the output size, so providing this doesn't save memory. * * Note that if the decompression result is larger than the size of this buffer, it will be truncated to fit. */ out?: Uint8Array; } /** * Options for decompressing a Zlib stream */ export interface UnzlibStreamOptions extends InflateStreamOptions {} /** * Options for decompressing Zlib data */ export interface UnzlibOptions extends InflateOptions {} /** * Options for compressing data into a DEFLATE format */ export interface DeflateOptions { /** * The level of compression to use, ranging from 0-9. * * 0 will store the data without compression. * 1 is fastest but compresses the worst, 9 is slowest but compresses the best. * The default level is 6. * * Typically, binary data benefits much more from higher values than text data. * In both cases, higher values usually take disproportionately longer than the reduction in final size that results. * * For example, a 1 MB text file could: * - become 1.01 MB with level 0 in 1ms * - become 400 kB with level 1 in 10ms * - become 320 kB with level 9 in 100ms */ level?: 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9; /** * The memory level to use, ranging from 0-12. Increasing this increases speed and compression ratio at the cost of memory. * * Note that this is exponential: while level 0 uses 8 kB, level 4 uses 128 kB, level 8 uses 2 MB, and level 12 uses 32 MB. * It is recommended not to lower the value below 4, since that tends to hurt performance. * In addition, values above 8 tend to help very little on most data and can even hurt performance. * * The default value is automatically determined based on the size of the input data. */ mem?: 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12; /** * A buffer containing common byte sequences in the input data that can be used to significantly improve compression ratios. * * Dictionaries should be 32kB or smaller and include strings or byte sequences likely to appear in the input. * The decompressor must supply the same dictionary as the compressor to extract the original data. * * Dictionaries only improve aggregate compression ratio when reused across multiple small inputs. They should typically not be used otherwise. * * Avoid using dictionaries with GZIP and ZIP to maximize software compatibility. */ dictionary?: Uint8Array; }; /** * Options for compressing data into a GZIP format */ export interface GzipOptions extends DeflateOptions { /** * When the file was last modified. Defaults to the current time. * Set this to 0 to avoid revealing a modification date entirely. */ mtime?: Date | string | number; /** * The filename of the data. If the `gunzip` command is used to decompress the data, it will output a file * with this name instead of the name of the compressed file. */ filename?: string; } /** * Options for compressing data into a Zlib format */ export interface ZlibOptions extends DeflateOptions {} /** * Handler for data (de)compression streams * @param data The data output from the stream processor * @param final Whether this is the final block */ export type FlateStreamHandler = (data: Uint8Array, final: boolean) => void; /** * Handler for asynchronous data (de)compression streams * @param err Any error that occurred * @param data The data output from the stream processor * @param final Whether this is the final block */ export type AsyncFlateStreamHandler = (err: FlateError | null, data: Uint8Array, final: boolean) => void; /** * Handler for the asynchronous completion of (de)compression for a data chunk * @param size The number of bytes that were processed. This is measured in terms of the input * (i.e. compressed bytes for decompression, uncompressed bytes for compression.) */ export type AsyncFlateDrainHandler = (size: number) => void; /** * Callback for asynchronous (de)compression methods * @param err Any error that occurred * @param data The resulting data. Only present if `err` is null */ export type FlateCallback = (err: FlateError | null, data: Uint8Array) => void; // async callback-based compression interface AsyncOptions { /** * Whether or not to "consume" the source data. This will make the typed array/buffer you pass in * unusable but will increase performance and reduce memory usage. */ consume?: boolean; } /** * Options for compressing data asynchronously into a DEFLATE format */ export interface AsyncDeflateOptions extends DeflateOptions, AsyncOptions {} /** * Options for decompressing DEFLATE data asynchronously */ export interface AsyncInflateOptions extends AsyncOptions, InflateStreamOptions { /** * The original size of the data. Currently, the asynchronous API disallows * writing into a buffer you provide; the best you can do is provide the * size in bytes and be given back a new typed array. */ size?: number; } /** * Options for compressing data asynchronously into a GZIP format */ export interface AsyncGzipOptions extends GzipOptions, AsyncOptions {} /** * Options for decompressing GZIP data asynchronously */ export interface AsyncGunzipOptions extends AsyncOptions, InflateStreamOptions {} /** * Options for compressing data asynchronously into a Zlib format */ export interface AsyncZlibOptions extends ZlibOptions, AsyncOptions {} /** * Options for decompressing Zlib data asynchronously */ export interface AsyncUnzlibOptions extends AsyncInflateOptions {} /** * A terminable compression/decompression process */ export interface AsyncTerminable { /** * Terminates the worker thread immediately. The callback will not be called. */ (): void; } // deflate with opts const dopt = (dat: Uint8Array, opt: DeflateOptions, pre: number, post: number, st?: DeflateState) => { if (!st) { st = { l: 1 }; if (opt.dictionary) { const dict = opt.dictionary.subarray(-32768); const newDat = new u8(dict.length + dat.length); newDat.set(dict); newDat.set(dat, dict.length); dat = newDat; st.w = dict.length; } } return dflt(dat, opt.level == null ? 6 : opt.level, opt.mem == null ? (st.l ? Math.ceil(Math.max(8, Math.min(13, Math.log(dat.length))) * 1.5) : 20) : (12 + opt.mem), pre, post, st); } // Walmart object spread const mrg = (a: A, b: B) => { const o = {} as Record; for (const k in a) o[k] = a[k]; for (const k in b) o[k] = b[k]; return o as A & B; } // worker clone // This is possibly the craziest part of the entire codebase, despite how simple it may seem. // The only parameter to this function is a closure that returns an array of variables outside of the function scope. // We're going to try to figure out the variable names used in the closure as strings because that is crucial for workerization. // We will return an object mapping of true variable name to value (basically, the current scope as a JS object). // The reason we can't just use the original variable names is minifiers mangling the toplevel scope. // This took me three weeks to figure out how to do. const wcln = (fn: () => unknown[], fnStr: string, td: Record) => { const dt = fn(); const st = fn.toString(); const ks = st.slice(st.indexOf('[') + 1, st.lastIndexOf(']')).replace(/\s+/g, '').split(','); for (let i = 0; i < dt.length; ++i) { let v = dt[i], k = ks[i]; if (typeof v == 'function') { fnStr += ';' + k + '='; const st = v.toString(); if (v.prototype) { // for global objects if (st.indexOf('[native code]') != -1) { const spInd = st.indexOf(' ', 8) + 1; fnStr += st.slice(spInd, st.indexOf('(', spInd)); } else { fnStr += st; for (const t in v.prototype) fnStr += ';' + k + '.prototype.' + t + '=' + v.prototype[t].toString(); } } else fnStr += st; } else td[k] = v; } return fnStr; } type CachedWorker = { // code c: string; // extra e: Record }; const ch: CachedWorker[] = []; // clone bufs const cbfs = (v: Record) => { const tl: ArrayBuffer[] = []; for (const k in v) { if ((v[k] as Uint8Array).buffer) { tl.push((v[k] = new (v[k].constructor as typeof u8)(v[k] as Uint8Array)).buffer); } } return tl; } // use a worker to execute code const wrkr = (fns: (() => unknown[])[], init: (ev: MessageEvent) => void, id: number, cb: (err: FlateError, msg: R) => void) => { if (!ch[id]) { let fnStr = '', td: Record = {}, m = fns.length - 1; for (let i = 0; i < m; ++i) fnStr = wcln(fns[i], fnStr, td); ch[id] = { c: wcln(fns[m], fnStr, td), e: td }; } const td = mrg({}, ch[id].e); return wk(ch[id].c + ';onmessage=function(e){for(var k in e.data)self[k]=e.data[k];onmessage=' + init.toString() + '}', id, td, cbfs(td), cb); } // base async inflate fn const bInflt = () => [u8, u16, i32, fleb, fdeb, clim, fl, fd, flrm, fdrm, rev, ec, hMap, max, bits, bits16, shft, slc, err, inflt, inflateSync, pbf, gopt]; const bDflt = () => [u8, u16, i32, fleb, fdeb, clim, revfl, revfd, flm, flt, fdm, fdt, rev, deo, et, hMap, wbits, wbits16, hTree, ln, lc, clen, wfblk, wblk, shft, slc, dflt, dopt, deflateSync, pbf]; // gzip extra const gze = () => [gzh, gzhl, wbytes, crc, crct]; // gunzip extra const guze = () => [gzs, gzl]; // zlib extra const zle = () => [zlh, wbytes, adler]; // unzlib extra const zule = () => [zls]; // post buf const pbf = (msg: Uint8Array) => (postMessage as Worker['postMessage'])(msg, [msg.buffer]); // get opts const gopt = (o?: AsyncInflateOptions) => o && { out: o.size && new u8(o.size), dictionary: o.dictionary }; // async helper const cbify = (dat: Uint8Array, opts: T, fns: (() => unknown[])[], init: (ev: MessageEvent<[Uint8Array, T]>) => void, id: number, cb: FlateCallback) => { const w = wrkr<[Uint8Array, T], Uint8Array>( fns, init, id, (err, dat) => { w.terminate(); cb(err, dat); } ); w.postMessage([dat, opts], opts.consume ? [dat.buffer as ArrayBuffer] : []); return () => { w.terminate(); }; } type CmpDecmpStrm = Inflate | Deflate | Gzip | Gunzip | Zlib | Unzlib; // auto stream const astrm = (strm: CmpDecmpStrm) => { strm.ondata = (dat, final) => (postMessage as Worker['postMessage'])([dat, final], [dat.buffer]); return (ev: MessageEvent<[Uint8Array, boolean] | [0, boolean | undefined]>) => { if (ev.data[0]) { strm.push(ev.data[0], ev.data[1]); (postMessage as Worker['postMessage'])([ev.data[0].length]); } else (strm as Deflate | Gzip | Zlib).flush(ev.data[1]) } } type Astrm = { ondata: AsyncFlateStreamHandler; push: (d: Uint8Array, f?: boolean) => void; terminate: AsyncTerminable; flush?: (sync?: boolean) => void; ondrain?: AsyncFlateDrainHandler; queuedSize: number; }; // async stream attach const astrmify = (fns: (() => unknown[])[], strm: Astrm, opts: T | 0, init: (ev: MessageEvent) => void, id: number, flush: 0 | 1, ext?: (msg: unknown) => unknown) => { let t: boolean; const w = wrkr( fns, init, id, (err, dat) => { if (err) w.terminate(), strm.ondata.call(strm, err); else if (!Array.isArray(dat)) ext(dat); else if (dat.length == 1) { strm.queuedSize -= dat[0]; if (strm.ondrain) strm.ondrain(dat[0]); } else { if (dat[1]) w.terminate(); strm.ondata.call(strm, err, dat[0], dat[1]); } } ) w.postMessage(opts); strm.queuedSize = 0; strm.push = (d, f) => { if (!strm.ondata) err(5); if (t) strm.ondata(err(4, 0, 1), null, !!f); strm.queuedSize += d.length; // can fail for cross-realm Uint8Array, but ok - only a small performance penalty w.postMessage([d, t = f], d.buffer instanceof ArrayBuffer ? [d.buffer] : []); }; strm.terminate = () => { w.terminate(); }; if (flush) { strm.flush = sync => { w.postMessage([0, sync]); }; } } // read 2 bytes const b2 = (d: Uint8Array, b: number) => d[b] | (d[b + 1] << 8); // read 4 bytes const b4 = (d: Uint8Array, b: number) => (d[b] | (d[b + 1] << 8) | (d[b + 2] << 16) | (d[b + 3] << 24)) >>> 0; // read 8 bytes const b8 = (d: Uint8Array, b: number) => b4(d, b) + (b4(d, b + 4) * 4294967296); // write bytes const wbytes = (d: Uint8Array, b: number, v: number) => { for (; v; ++b) d[b] = v, v >>>= 8; } // gzip header const gzh = (c: Uint8Array, o: GzipOptions) => { const fn = o.filename; c[0] = 31, c[1] = 139, c[2] = 8, c[8] = o.level < 2 ? 4 : o.level == 9 ? 2 : 0, c[9] = 3; // assume Unix if (o.mtime != 0) wbytes(c, 4, Math.floor((new Date(o.mtime as (string | number) || Date.now()) as unknown as number) / 1000)); if (fn) { c[3] = 8; for (let i = 0; i <= fn.length; ++i) c[i + 10] = fn.charCodeAt(i); } } // gzip footer: -8 to -4 = CRC, -4 to -0 is length // gzip start const gzs = (d: Uint8Array) => { if (d[0] != 31 || d[1] != 139 || d[2] != 8) err(6, 'invalid gzip data'); const flg = d[3]; let st = 10; if (flg & 4) st += (d[10] | d[11] << 8) + 2; for (let zs = (flg >> 3 & 1) + (flg >> 4 & 1); zs > 0; zs -= !d[st++] as unknown as number); return st + (flg & 2); } // gzip length const gzl = (d: Uint8Array) => { const l = d.length; return (d[l - 4] | d[l - 3] << 8 | d[l - 2] << 16 | d[l - 1] << 24) >>> 0; } // gzip header length const gzhl = (o: GzipOptions) => 10 + (o.filename ? o.filename.length + 1 : 0); // zlib header const zlh = (c: Uint8Array, o: ZlibOptions) => { const lv = o.level, fl = lv == 0 ? 0 : lv < 6 ? 1 : lv == 9 ? 3 : 2; c[0] = 120, c[1] = (fl << 6) | (o.dictionary && 32); c[1] |= 31 - ((c[0] << 8) | c[1]) % 31; if (o.dictionary) { const h = adler(); h.p(o.dictionary); wbytes(c, 2, h.d()); } } // zlib start const zls = (d: Uint8Array, dict?: unknown) => { if ((d[0] & 15) != 8 || (d[0] >> 4) > 7 || ((d[0] << 8 | d[1]) % 31)) err(6, 'invalid zlib data'); if ((d[1] >> 5 & 1) == +!dict) err(6, 'invalid zlib data: ' + (d[1] & 32 ? 'need' : 'unexpected') + ' dictionary'); return (d[1] >> 3 & 4) + 2; } // stream options and callback function StrmOpt(opts: T, cb?: H): T; function StrmOpt(cb?: H): T; function StrmOpt(opts?: T | H, cb?: H): T { if (typeof opts == 'function') cb = opts as H, opts = {} as T; this.ondata = cb as H; return opts as T; } /** * Streaming DEFLATE compression */ export class Deflate { /** * Creates a DEFLATE stream * @param opts The compression options * @param cb The callback to call whenever data is deflated */ constructor(opts: DeflateOptions, cb?: FlateStreamHandler); /** * Creates a DEFLATE stream * @param cb The callback to call whenever data is deflated */ constructor(cb?: FlateStreamHandler); constructor(opts?: DeflateOptions | FlateStreamHandler, cb?: FlateStreamHandler) { if (typeof opts == 'function') cb = opts as FlateStreamHandler, opts = {}; this.ondata = cb; this.o = (opts as DeflateOptions) || {}; this.s = { l: 0, i: 32768, w: 32768, z: 32768 }; // Buffer length must always be 0 mod 32768 for index calculations to be correct when modifying head and prev // 98304 = 32768 (lookback) + 65536 (common chunk size) this.b = new u8(98304); if (this.o.dictionary) { const dict = this.o.dictionary.subarray(-32768); this.b.set(dict, 32768 - dict.length); this.s.i = 32768 - dict.length; } } private b: Uint8Array; private s: DeflateState; private o: DeflateOptions; /** * The handler to call whenever data is available */ ondata: FlateStreamHandler; private p(c: Uint8Array, f: boolean) { this.ondata(dopt(c, this.o, 0, 0, this.s), f); } /** * Pushes a chunk to be deflated * @param chunk The chunk to push * @param final Whether this is the last chunk */ push(chunk: Uint8Array, final?: boolean) { if (!this.ondata) err(5); if (this.s.l) err(4); const endLen = chunk.length + this.s.z; if (endLen > this.b.length) { if (endLen > 2 * this.b.length - 32768) { const newBuf = new u8(endLen & -32768); newBuf.set(this.b.subarray(0, this.s.z)); this.b = newBuf; } const split = this.b.length - this.s.z; this.b.set(chunk.subarray(0, split), this.s.z); this.s.z = this.b.length; this.p(this.b, false); this.b.set(this.b.subarray(-32768)); this.b.set(chunk.subarray(split), 32768); this.s.z = chunk.length - split + 32768; this.s.i = 32766, this.s.w = 32768; } else { this.b.set(chunk, this.s.z); this.s.z += chunk.length; } this.s.l = (final as unknown as number) & 1; if (this.s.z > this.s.w + 8191 || final) { this.p(this.b, final || false); this.s.w = this.s.i, this.s.i -= 2; } if (final) { // cleanup unneeded buffers/state to reduce memory usage this.s = this.o = {} as DeflateState & DeflateOptions; this.b = et; } } /** * Flushes buffered uncompressed data. Useful to immediately retrieve the * deflated output for small inputs. * @param sync Whether to flush to a byte boundary. A sync flush takes 4-5 * extra bytes, but guarantees all pushed data is immediately * decompressible. A separate DEFLATE stream may be concatenated * with the current output after a sync flush. */ flush(sync?: boolean) { if (!this.ondata) err(5); if (this.s.l) err(4); this.p(this.b, false); this.s.w = this.s.i, this.s.i -= 2; // could technically skip writing the type-0 block for (this.s.r & 7) == 0, // but the deterministic trailer (00 00 FF FF) is useful in some situations if (sync) { const c = new u8(6); c[0] = this.s.r >> 3; // write empty, non-final type-0 block const ep = wfblk(c, this.s.r, et); this.s.r = 0; this.ondata(c.subarray(0, ep >> 3), false); } } } /** * Asynchronous streaming DEFLATE compression */ export class AsyncDeflate { /** * The handler to call whenever data is available */ ondata: AsyncFlateStreamHandler; /** * The handler to call whenever buffered source data is processed (i.e. `queuedSize` updates) */ ondrain?: AsyncFlateDrainHandler; /** * The number of uncompressed bytes buffered in the stream */ queuedSize: number; /** * Creates an asynchronous DEFLATE stream * @param opts The compression options * @param cb The callback to call whenever data is deflated */ constructor(opts: DeflateOptions, cb?: AsyncFlateStreamHandler); /** * Creates an asynchronous DEFLATE stream * @param cb The callback to call whenever data is deflated */ constructor(cb?: AsyncFlateStreamHandler); constructor(opts?: DeflateOptions | AsyncFlateStreamHandler, cb?: AsyncFlateStreamHandler) { astrmify([ bDflt, () => [astrm, Deflate] ], this as unknown as Astrm, StrmOpt.call(this, opts, cb), ev => { const strm = new Deflate(ev.data); onmessage = astrm(strm); }, 6, 1); } /** * Pushes a chunk to be deflated * @param chunk The chunk to push * @param final Whether this is the last chunk */ // @ts-ignore push(chunk: Uint8Array, final?: boolean): void; /** * Flushes buffered uncompressed data. Useful to immediately retrieve the * deflated output for small inputs. * @param sync Whether to flush to a byte boundary. A sync flush takes 4-5 * extra bytes, but guarantees all pushed data is immediately * decompressible. A separate DEFLATE stream may be concatenated * with the current output after a sync flush. */ // @ts-ignore flush(sync?: boolean): void; /** * A method to terminate the stream's internal worker. Subsequent calls to * push() will silently fail. */ terminate: AsyncTerminable; } /** * Asynchronously compresses data with DEFLATE without any wrapper * @param data The data to compress * @param opts The compression options * @param cb The function to be called upon compression completion * @returns A function that can be used to immediately terminate the compression */ export function deflate(data: Uint8Array, opts: AsyncDeflateOptions, cb: FlateCallback): AsyncTerminable; /** * Asynchronously compresses data with DEFLATE without any wrapper * @param data The data to compress * @param cb The function to be called upon compression completion */ export function deflate(data: Uint8Array, cb: FlateCallback): AsyncTerminable; export function deflate(data: Uint8Array, opts: AsyncDeflateOptions | FlateCallback, cb?: FlateCallback) { if (!cb) cb = opts as FlateCallback, opts = {}; if (typeof cb != 'function') err(7); return cbify(data, opts as AsyncDeflateOptions, [ bDflt, ], ev => pbf(deflateSync(ev.data[0], ev.data[1])), 0, cb); } /** * Compresses data with DEFLATE without any wrapper * @param data The data to compress * @param opts The compression options * @returns The deflated version of the data */ export function deflateSync(data: Uint8Array, opts?: DeflateOptions) { return dopt(data, opts || {}, 0, 0); } /** * Streaming DEFLATE decompression */ export class Inflate { private s: InflateState; private o: Uint8Array; private p: Uint8Array; private d: boolean; /** * The handler to call whenever data is available */ ondata: FlateStreamHandler; /** * Creates a DEFLATE decompression stream * @param opts The decompression options * @param cb The callback to call whenever data is inflated */ constructor(opts: InflateStreamOptions, cb?: FlateStreamHandler); /** * Creates a DEFLATE decompression stream * @param cb The callback to call whenever data is inflated */ constructor(cb?: FlateStreamHandler); constructor(opts?: InflateStreamOptions | FlateStreamHandler, cb?: FlateStreamHandler) { // no StrmOpt here to avoid adding to workerizer if (typeof opts == 'function') cb = opts as FlateStreamHandler, opts = {}; this.ondata = cb; const dict = opts && (opts as InflateStreamOptions).dictionary && (opts as InflateStreamOptions).dictionary.subarray(-32768); this.s = { i: 0, b: dict ? dict.length : 0 }; this.o = new u8(32768); this.p = new u8(0); if (dict) this.o.set(dict); } private e(c: Uint8Array) { if (!this.ondata) err(5); if (this.d) err(4); if (!this.p.length) this.p = c; else if (c.length) { const n = new u8(this.p.length + c.length); n.set(this.p), n.set(c, this.p.length), this.p = n; } } private c(final: boolean) { this.s.i = +(this.d = final || false); const bts = this.s.b; const dt = inflt(this.p, this.s, this.o); this.ondata(slc(dt, bts, this.s.b), this.d); this.o = slc(dt, this.s.b - 32768), this.s.b = this.o.length; this.p = slc(this.p, (this.s.p / 8) | 0), this.s.p &= 7; } /** * Pushes a chunk to be inflated * @param chunk The chunk to push * @param final Whether this is the final chunk */ push(chunk: Uint8Array, final?: boolean) { this.e(chunk), this.c(final); } } /** * Asynchronous streaming DEFLATE decompression */ export class AsyncInflate { /** * The handler to call whenever data is available */ ondata: AsyncFlateStreamHandler; /** * The handler to call whenever buffered source data is processed (i.e. `queuedSize` updates) */ ondrain?: AsyncFlateDrainHandler; /** * The number of compressed bytes buffered in the stream */ queuedSize: number; /** * Creates an asynchronous DEFLATE decompression stream * @param opts The decompression options * @param cb The callback to call whenever data is inflated */ constructor(opts: InflateStreamOptions, cb?: AsyncFlateStreamHandler); /** * Creates an asynchronous DEFLATE decompression stream * @param cb The callback to call whenever data is inflated */ constructor(cb?: AsyncFlateStreamHandler); constructor(opts?: InflateStreamOptions | AsyncFlateStreamHandler, cb?: AsyncFlateStreamHandler) { astrmify([ bInflt, () => [astrm, Inflate] ], this as unknown as Astrm, StrmOpt.call(this, opts, cb), ev => { const strm = new Inflate(ev.data); onmessage = astrm(strm); }, 7, 0); } /** * Pushes a chunk to be inflated * @param chunk The chunk to push * @param final Whether this is the last chunk */ // @ts-ignore push(chunk: Uint8Array, final?: boolean): void; /** * A method to terminate the stream's internal worker. Subsequent calls to * push() will silently fail. */ terminate: AsyncTerminable; } /** * Asynchronously expands DEFLATE data with no wrapper * @param data The data to decompress * @param opts The decompression options * @param cb The function to be called upon decompression completion * @returns A function that can be used to immediately terminate the decompression */ export function inflate(data: Uint8Array, opts: AsyncInflateOptions, cb: FlateCallback): AsyncTerminable; /** * Asynchronously expands DEFLATE data with no wrapper * @param data The data to decompress * @param cb The function to be called upon decompression completion * @returns A function that can be used to immediately terminate the decompression */ export function inflate(data: Uint8Array, cb: FlateCallback): AsyncTerminable; export function inflate(data: Uint8Array, opts: AsyncInflateOptions | FlateCallback, cb?: FlateCallback) { if (!cb) cb = opts as FlateCallback, opts = {}; if (typeof cb != 'function') err(7); return cbify(data, opts as AsyncInflateOptions, [ bInflt ], ev => pbf(inflateSync(ev.data[0], gopt(ev.data[1]))), 1, cb); } /** * Expands DEFLATE data with no wrapper * @param data The data to decompress * @returns The decompressed version of the data */ export function inflateSync(data: Uint8Array): Uint8Array; /** * Expands DEFLATE data with no wrapper * @param data The data to decompress * @param opts The decompression options * @returns The decompressed version of the data */ export function inflateSync(data: Uint8Array, opts?: InflateOptions): Uint8Array; export function inflateSync(data: Uint8Array, opts?: InflateOptions) { return inflt(data, { i: 2 }, opts && opts.out, opts && opts.dictionary); } // before you yell at me for not just using extends, my reason is that TS inheritance is hard to workerize. /** * Streaming GZIP compression */ export class Gzip { private c = crc(); private l = 0; private v = 1; private o: GzipOptions; private s: DeflateState; /** * The handler to call whenever data is available */ ondata: FlateStreamHandler; /** * Creates a GZIP stream * @param opts The compression options * @param cb The callback to call whenever data is deflated */ constructor(opts: GzipOptions, cb?: FlateStreamHandler); /** * Creates a GZIP stream * @param cb The callback to call whenever data is deflated */ constructor(cb?: FlateStreamHandler); constructor(opts?: GzipOptions | FlateStreamHandler, cb?: FlateStreamHandler) { Deflate.call(this, opts, cb); } /** * Pushes a chunk to be GZIPped * @param chunk The chunk to push * @param final Whether this is the last chunk */ push(chunk: Uint8Array, final?: boolean) { this.c.p(chunk); this.l += chunk.length; Deflate.prototype.push.call(this, chunk, final); } private p(c: Uint8Array, f: boolean) { const raw = dopt(c, this.o, this.v && gzhl(this.o), f && 8, this.s); if (this.v) gzh(raw, this.o), this.v = 0; if (f) wbytes(raw, raw.length - 8, this.c.d()), wbytes(raw, raw.length - 4, this.l); this.ondata(raw, f); } /** * Flushes buffered uncompressed data. Useful to immediately retrieve the * GZIPped output for small inputs. * @param sync Whether to flush to a byte boundary. A sync flush takes 4-5 * extra bytes, but guarantees all pushed data is immediately * decompressible. */ flush(sync?: boolean) { Deflate.prototype.flush.call(this, sync); } } /** * Asynchronous streaming GZIP compression */ export class AsyncGzip { /** * The handler to call whenever data is available */ ondata: AsyncFlateStreamHandler; /** * The handler to call whenever buffered source data is processed (i.e. `queuedSize` updates) */ ondrain?: AsyncFlateDrainHandler; /** * The number of uncompressed bytes buffered in the stream */ queuedSize: number; /** * Creates an asynchronous GZIP stream * @param opts The compression options * @param cb The callback to call whenever data is deflated */ constructor(opts: GzipOptions, cb?: AsyncFlateStreamHandler); /** * Creates an asynchronous GZIP stream * @param cb The callback to call whenever data is deflated */ constructor(cb?: AsyncFlateStreamHandler); constructor(opts?: GzipOptions | AsyncFlateStreamHandler, cb?: AsyncFlateStreamHandler) { astrmify([ bDflt, gze, () => [astrm, Deflate, Gzip] ], this as unknown as Astrm, StrmOpt.call(this, opts, cb), ev => { const strm = new Gzip(ev.data); onmessage = astrm(strm); }, 8, 1); } /** * Pushes a chunk to be GZIPped * @param chunk The chunk to push * @param final Whether this is the last chunk */ // @ts-ignore push(chunk: Uint8Array, final?: boolean): void; /** * Flushes buffered uncompressed data. Useful to immediately retrieve the * GZIPped output for small inputs. * @param sync Whether to flush to a byte boundary. A sync flush takes 4-5 * extra bytes, but guarantees all pushed data is immediately * decompressible. */ // @ts-ignore flush(sync?: boolean): void; /** * A method to terminate the stream's internal worker. Subsequent calls to * push() will silently fail. */ terminate: AsyncTerminable; } /** * Asynchronously compresses data with GZIP * @param data The data to compress * @param opts The compression options * @param cb The function to be called upon compression completion * @returns A function that can be used to immediately terminate the compression */ export function gzip(data: Uint8Array, opts: AsyncGzipOptions, cb: FlateCallback): AsyncTerminable; /** * Asynchronously compresses data with GZIP * @param data The data to compress * @param cb The function to be called upon compression completion * @returns A function that can be used to immediately terminate the decompression */ export function gzip(data: Uint8Array, cb: FlateCallback): AsyncTerminable; export function gzip(data: Uint8Array, opts: AsyncGzipOptions | FlateCallback, cb?: FlateCallback) { if (!cb) cb = opts as FlateCallback, opts = {}; if (typeof cb != 'function') err(7); return cbify(data, opts as AsyncGzipOptions, [ bDflt, gze, () => [gzipSync] ], ev => pbf(gzipSync(ev.data[0], ev.data[1])), 2, cb); } /** * Compresses data with GZIP * @param data The data to compress * @param opts The compression options * @returns The gzipped version of the data */ export function gzipSync(data: Uint8Array, opts?: GzipOptions) { if (!opts) opts = {}; const c = crc(), l = data.length; c.p(data); const d = dopt(data, opts, gzhl(opts), 8), s = d.length; return gzh(d, opts), wbytes(d, s - 8, c.d()), wbytes(d, s - 4, l), d; } /** * Handler for new GZIP members in concatenated GZIP streams. Useful for building indices used to perform random-access reads on compressed files. * @param offset The offset of the new member relative to the start of the stream */ export type GunzipMemberHandler = (offset: number) => void; /** * Streaming single or multi-member GZIP decompression */ export class Gunzip { private v = 1; private r = 0; private o: Uint8Array; private p: Uint8Array; private s: InflateState; /** * The handler to call whenever data is available */ ondata: FlateStreamHandler; /** * The handler to call whenever a new GZIP member is found */ onmember?: GunzipMemberHandler; /** * Creates a GUNZIP stream * @param opts The decompression options * @param cb The callback to call whenever data is inflated */ constructor(opts: GunzipStreamOptions, cb?: FlateStreamHandler); /** * Creates a GUNZIP stream * @param cb The callback to call whenever data is inflated */ constructor(cb?: FlateStreamHandler); constructor(opts?: GunzipStreamOptions | FlateStreamHandler, cb?: FlateStreamHandler) { Inflate.call(this, opts, cb); } /** * Pushes a chunk to be GUNZIPped * @param chunk The chunk to push * @param final Whether this is the last chunk */ push(chunk: Uint8Array, final?: boolean) { (Inflate.prototype as unknown as { e: typeof Inflate.prototype['e'] }).e.call(this, chunk); this.r += chunk.length; if (this.v) { const p = this.p.subarray(this.v - 1); const s = p.length > 3 ? gzs(p) : 4; if (s > p.length) { if (!final) return; } else if (this.v > 1 && this.onmember) { this.onmember(this.r - p.length); } this.p = p.subarray(s), this.v = 0; } // necessary to prevent TS from using the closure value // This allows for workerization to function correctly (Inflate.prototype as unknown as { c: typeof Inflate.prototype['c'] }).c.call(this, 0); // process concatenated GZIP if (this.s.f && !this.s.l) { this.v = shft(this.s.p) + 9; this.s = { i: 0 }; this.o = new u8(0); this.push(new u8(0), final); } else if (final) { (Inflate.prototype as unknown as { c: typeof Inflate.prototype['c'] }).c.call(this, final); } } } /** * Asynchronous streaming single or multi-member GZIP decompression */ export class AsyncGunzip { /** * The handler to call whenever data is available */ ondata: AsyncFlateStreamHandler; /** * The handler to call whenever buffered source data is processed (i.e. `queuedSize` updates) */ ondrain?: AsyncFlateDrainHandler; /** * The number of compressed bytes buffered in the stream */ queuedSize: number; /** * The handler to call whenever a new GZIP member is found */ onmember?: GunzipMemberHandler; /** * Creates an asynchronous GUNZIP stream * @param opts The decompression options * @param cb The callback to call whenever data is inflated */ constructor(opts: GunzipStreamOptions, cb?: AsyncFlateStreamHandler); /** * Creates an asynchronous GUNZIP stream * @param cb The callback to call whenever data is inflated */ constructor(cb?: AsyncFlateStreamHandler); constructor(opts?: GunzipStreamOptions | AsyncFlateStreamHandler, cb?: AsyncFlateStreamHandler) { astrmify([ bInflt, guze, () => [astrm, Inflate, Gunzip] ], this as unknown as Astrm, StrmOpt.call(this, opts, cb), ev => { const strm = new Gunzip(ev.data); strm.onmember = (offset) => (postMessage as Worker['postMessage'])(offset); onmessage = astrm(strm); }, 9, 0, offset => this.onmember && this.onmember(offset as number)); } /** * Pushes a chunk to be GUNZIPped * @param chunk The chunk to push * @param final Whether this is the last chunk */ // @ts-ignore push(chunk: Uint8Array, final?: boolean): void; /** * A method to terminate the stream's internal worker. Subsequent calls to * push() will silently fail. */ terminate: AsyncTerminable; } /** * Asynchronously expands GZIP data * @param data The data to decompress * @param opts The decompression options * @param cb The function to be called upon decompression completion * @returns A function that can be used to immediately terminate the decompression */ export function gunzip(data: Uint8Array, opts: AsyncGunzipOptions, cb: FlateCallback): AsyncTerminable; /** * Asynchronously expands GZIP data * @param data The data to decompress * @param cb The function to be called upon decompression completion * @returns A function that can be used to immediately terminate the decompression */ export function gunzip(data: Uint8Array, cb: FlateCallback): AsyncTerminable; export function gunzip(data: Uint8Array, opts: AsyncGunzipOptions | FlateCallback, cb?: FlateCallback) { if (!cb) cb = opts as FlateCallback, opts = {}; if (typeof cb != 'function') err(7); return cbify(data, opts as AsyncGunzipOptions, [ bInflt, guze, () => [gunzipSync] ], ev => pbf(gunzipSync(ev.data[0], ev.data[1])), 3, cb); } /** * Expands GZIP data * @param data The data to decompress * @returns The decompressed version of the data */ export function gunzipSync(data: Uint8Array): Uint8Array; /** * Expands GZIP data * @param data The data to decompress * @param opts The decompression options * @returns The decompressed version of the data */ export function gunzipSync(data: Uint8Array, opts?: GunzipOptions): Uint8Array; export function gunzipSync(data: Uint8Array, opts?: GunzipOptions) { const st = gzs(data); if (st + 8 > data.length) err(6, 'invalid gzip data'); return inflt(data.subarray(st, -8), { i: 2 }, opts && opts.out || new u8(gzl(data)), opts && opts.dictionary); } /** * Streaming Zlib compression */ export class Zlib { private c = adler(); private v = 1; private o: ZlibOptions; private s: DeflateState; /** * The handler to call whenever data is available */ ondata: FlateStreamHandler; /** * Creates a Zlib stream * @param opts The compression options * @param cb The callback to call whenever data is deflated */ constructor(opts: ZlibOptions, cb?: FlateStreamHandler); /** * Creates a Zlib stream * @param cb The callback to call whenever data is deflated */ constructor(cb?: FlateStreamHandler); constructor(opts?: ZlibOptions | FlateStreamHandler, cb?: FlateStreamHandler) { Deflate.call(this, opts, cb); } /** * Pushes a chunk to be zlibbed * @param chunk The chunk to push * @param final Whether this is the last chunk */ push(chunk: Uint8Array, final?: boolean) { this.c.p(chunk); Deflate.prototype.push.call(this, chunk, final); } private p(c: Uint8Array, f: boolean) { const raw = dopt(c, this.o, this.v && (this.o.dictionary ? 6 : 2), f && 4, this.s); if (this.v) zlh(raw, this.o), this.v = 0; if (f) wbytes(raw, raw.length - 4, this.c.d()); this.ondata(raw, f); } /** * Flushes buffered uncompressed data. Useful to immediately retrieve the * zlibbed output for small inputs. * @param sync Whether to flush to a byte boundary. A sync flush takes 4-5 * extra bytes, but guarantees all pushed data is immediately * decompressible. */ flush(sync?: boolean) { Deflate.prototype.flush.call(this, sync); } } /** * Asynchronous streaming Zlib compression */ export class AsyncZlib { /** * The handler to call whenever data is available */ ondata: AsyncFlateStreamHandler; /** * The handler to call whenever buffered source data is processed (i.e. `queuedSize` updates) */ ondrain?: AsyncFlateDrainHandler; /** * The number of uncompressed bytes buffered in the stream */ queuedSize: number; /** * Creates an asynchronous Zlib stream * @param opts The compression options * @param cb The callback to call whenever data is deflated */ constructor(opts: ZlibOptions, cb?: AsyncFlateStreamHandler); /** * Creates an asynchronous Zlib stream * @param cb The callback to call whenever data is deflated */ constructor(cb?: AsyncFlateStreamHandler); constructor(opts?: ZlibOptions | AsyncFlateStreamHandler, cb?: AsyncFlateStreamHandler) { astrmify([ bDflt, zle, () => [astrm, Deflate, Zlib] ], this as unknown as Astrm, StrmOpt.call(this, opts, cb), ev => { const strm = new Zlib(ev.data); onmessage = astrm(strm); }, 10, 1); } /** * Pushes a chunk to be deflated * @param chunk The chunk to push * @param final Whether this is the last chunk */ // @ts-ignore push(chunk: Uint8Array, final?: boolean): void; /** * Flushes buffered uncompressed data. Useful to immediately retrieve the * zlibbed output for small inputs. * @param sync Whether to flush to a byte boundary. A sync flush takes 4-5 * extra bytes, but guarantees all pushed data is immediately * decompressible. */ // @ts-ignore flush(sync?: boolean): void; /** * A method to terminate the stream's internal worker. Subsequent calls to * push() will silently fail. */ terminate: AsyncTerminable; } /** * Asynchronously compresses data with Zlib * @param data The data to compress * @param opts The compression options * @param cb The function to be called upon compression completion */ export function zlib(data: Uint8Array, opts: AsyncZlibOptions, cb: FlateCallback): AsyncTerminable; /** * Asynchronously compresses data with Zlib * @param data The data to compress * @param cb The function to be called upon compression completion * @returns A function that can be used to immediately terminate the compression */ export function zlib(data: Uint8Array, cb: FlateCallback): AsyncTerminable; export function zlib(data: Uint8Array, opts: AsyncZlibOptions | FlateCallback, cb?: FlateCallback) { if (!cb) cb = opts as FlateCallback, opts = {}; if (typeof cb != 'function') err(7); return cbify(data, opts as AsyncZlibOptions, [ bDflt, zle, () => [zlibSync] ], ev => pbf(zlibSync(ev.data[0], ev.data[1])), 4, cb); } /** * Compress data with Zlib * @param data The data to compress * @param opts The compression options * @returns The zlib-compressed version of the data */ export function zlibSync(data: Uint8Array, opts?: ZlibOptions) { if (!opts) opts = {}; const a = adler(); a.p(data); const d = dopt(data, opts, opts.dictionary ? 6 : 2, 4); return zlh(d, opts), wbytes(d, d.length - 4, a.d()), d; } /** * Streaming Zlib decompression */ export class Unzlib { private v: number; private p: Uint8Array; /** * The handler to call whenever data is available */ ondata: FlateStreamHandler; /** * Creates a Zlib decompression stream * @param opts The decompression options * @param cb The callback to call whenever data is inflated */ constructor(opts: UnzlibStreamOptions, cb?: FlateStreamHandler); /** * Creates a Zlib decompression stream * @param cb The callback to call whenever data is inflated */ constructor(cb?: FlateStreamHandler); constructor(opts?: UnzlibStreamOptions | FlateStreamHandler, cb?: FlateStreamHandler) { Inflate.call(this, opts, cb); this.v = opts && (opts as UnzlibStreamOptions).dictionary ? 2 : 1; } /** * Pushes a chunk to be unzlibbed * @param chunk The chunk to push * @param final Whether this is the last chunk */ push(chunk: Uint8Array, final?: boolean) { (Inflate.prototype as unknown as { e: typeof Inflate.prototype['e'] }).e.call(this, chunk); if (this.v) { if (this.p.length < 6 && !final) return; this.p = this.p.subarray(zls(this.p, this.v - 1)), this.v = 0; } if (final) { if (this.p.length < 4) err(6, 'invalid zlib data'); this.p = this.p.subarray(0, -4); } // necessary to prevent TS from using the closure value // This allows for workerization to function correctly (Inflate.prototype as unknown as { c: typeof Inflate.prototype['c'] }).c.call(this, final); } } /** * Asynchronous streaming Zlib decompression */ export class AsyncUnzlib { /** * The handler to call whenever data is available */ ondata: AsyncFlateStreamHandler; /** * The handler to call whenever buffered source data is processed (i.e. `queuedSize` updates) */ ondrain?: AsyncFlateDrainHandler; /** * The number of compressed bytes buffered in the stream */ queuedSize: number; /** * Creates an asynchronous Zlib decompression stream * @param opts The decompression options * @param cb The callback to call whenever data is inflated */ constructor(opts: UnzlibStreamOptions, cb?: AsyncFlateStreamHandler); /** * Creates an asynchronous Zlib decompression stream * @param cb The callback to call whenever data is inflated */ constructor(cb?: AsyncFlateStreamHandler); constructor(opts?: UnzlibStreamOptions | AsyncFlateStreamHandler, cb?: AsyncFlateStreamHandler) { astrmify([ bInflt, zule, () => [astrm, Inflate, Unzlib] ], this as unknown as Astrm, StrmOpt.call(this, opts, cb), ev => { const strm = new Unzlib(ev.data); onmessage = astrm(strm); }, 11, 0); } /** * Pushes a chunk to be decompressed from Zlib * @param chunk The chunk to push * @param final Whether this is the last chunk */ // @ts-ignore push(chunk: Uint8Array, final?: boolean): void; /** * A method to terminate the stream's internal worker. Subsequent calls to * push() will silently fail. */ terminate: AsyncTerminable; } /** * Asynchronously expands Zlib data * @param data The data to decompress * @param opts The decompression options * @param cb The function to be called upon decompression completion * @returns A function that can be used to immediately terminate the decompression */ export function unzlib(data: Uint8Array, opts: AsyncUnzlibOptions, cb: FlateCallback): AsyncTerminable; /** * Asynchronously expands Zlib data * @param data The data to decompress * @param cb The function to be called upon decompression completion * @returns A function that can be used to immediately terminate the decompression */ export function unzlib(data: Uint8Array, cb: FlateCallback): AsyncTerminable; export function unzlib(data: Uint8Array, opts: AsyncUnzlibOptions | FlateCallback, cb?: FlateCallback) { if (!cb) cb = opts as FlateCallback, opts = {}; if (typeof cb != 'function') err(7); return cbify(data, opts as AsyncUnzlibOptions, [ bInflt, zule, () => [unzlibSync] ], ev => pbf(unzlibSync(ev.data[0], gopt(ev.data[1]))), 5, cb); } /** * Expands Zlib data * @param data The data to decompress * @returns The decompressed version of the data */ export function unzlibSync(data: Uint8Array): Uint8Array; /** * Expands Zlib data * @param data The data to decompress * @param opts The decompression options * @returns The decompressed version of the data */ export function unzlibSync(data: Uint8Array, opts?: UnzlibOptions): Uint8Array; export function unzlibSync(data: Uint8Array, opts?: UnzlibOptions) { return inflt(data.subarray(zls(data, opts && opts.dictionary), -4), { i: 2 }, opts && opts.out, opts && opts.dictionary); } // Default algorithm for compression (used because having a known output size allows faster decompression) export { gzip as compress, AsyncGzip as AsyncCompress } export { gzipSync as compressSync, Gzip as Compress } /** * Streaming GZIP, Zlib, or raw DEFLATE decompression */ export class Decompress { private G: typeof Gunzip; private I: typeof Inflate; private Z: typeof Unzlib; private o: InflateOptions; private s: Inflate | Gunzip | Unzlib; private p: Uint8Array; /** * The handler to call whenever data is available */ ondata: FlateStreamHandler; /** * Creates a decompression stream * @param opts The decompression options * @param cb The callback to call whenever data is decompressed */ constructor(opts: InflateStreamOptions, cb?: FlateStreamHandler); /** * Creates a decompression stream * @param cb The callback to call whenever data is decompressed */ constructor(cb?: FlateStreamHandler); constructor(opts?: InflateStreamOptions | FlateStreamHandler, cb?: FlateStreamHandler) { this.o = StrmOpt.call(this, opts, cb) || {}; this.G = Gunzip; this.I = Inflate; this.Z = Unzlib; } // init substream // overriden by AsyncDecompress private i() { this.s.ondata = (dat, final) => { this.ondata(dat, final); } } /** * Pushes a chunk to be decompressed * @param chunk The chunk to push * @param final Whether this is the last chunk */ push(chunk: Uint8Array, final?: boolean) { if (!this.ondata) err(5); if (!this.s) { if (this.p && this.p.length) { const n = new u8(this.p.length + chunk.length); n.set(this.p), n.set(chunk, this.p.length); } else this.p = chunk; if (this.p.length > 2) { this.s = (this.p[0] == 31 && this.p[1] == 139 && this.p[2] == 8) ? new this.G(this.o) : ((this.p[0] & 15) != 8 || (this.p[0] >> 4) > 7 || ((this.p[0] << 8 | this.p[1]) % 31)) ? new this.I(this.o) : new this.Z(this.o); this.i(); this.s.push(this.p, final); this.p = null; } } else this.s.push(chunk, final); } } /** * Asynchronous streaming GZIP, Zlib, or raw DEFLATE decompression */ export class AsyncDecompress { private G: typeof AsyncGunzip; private I: typeof AsyncInflate; private Z: typeof AsyncUnzlib; /** * The handler to call whenever data is available */ ondata: AsyncFlateStreamHandler; /** * The handler to call whenever buffered source data is processed (i.e. `queuedSize` updates) */ ondrain?: AsyncFlateDrainHandler; /** * The number of compressed bytes buffered in the stream */ queuedSize: number; /** * Creates an asynchronous decompression stream * @param opts The decompression options * @param cb The callback to call whenever data is decompressed */ constructor(opts: InflateStreamOptions, cb?: AsyncFlateStreamHandler); /** * Creates an asynchronous decompression stream * @param cb The callback to call whenever data is decompressed */ constructor(cb?: AsyncFlateStreamHandler); constructor(opts?: InflateStreamOptions | AsyncFlateStreamHandler, cb?: AsyncFlateStreamHandler) { Decompress.call(this, opts, cb); this.queuedSize = 0; this.G = AsyncGunzip; this.I = AsyncInflate; this.Z = AsyncUnzlib; } private i() { (this as unknown as { s: AsyncInflate }).s.ondata = (err, dat, final) => { this.ondata(err, dat, final); } (this as unknown as { s: AsyncInflate }).s.ondrain = size => { this.queuedSize -= size; if (this.ondrain) this.ondrain(size); } } /** * Pushes a chunk to be decompressed * @param chunk The chunk to push * @param final Whether this is the last chunk */ push(chunk: Uint8Array, final?: boolean) { this.queuedSize += chunk.length; Decompress.prototype.push.call(this, chunk, final); } } /** * Asynchrononously expands compressed GZIP, Zlib, or raw DEFLATE data, automatically detecting the format * @param data The data to decompress * @param opts The decompression options * @param cb The function to be called upon decompression completion * @returns A function that can be used to immediately terminate the decompression */ export function decompress(data: Uint8Array, opts: AsyncInflateOptions, cb: FlateCallback): AsyncTerminable; /** * Asynchrononously expands compressed GZIP, Zlib, or raw DEFLATE data, automatically detecting the format * @param data The data to decompress * @param cb The function to be called upon decompression completion * @returns A function that can be used to immediately terminate the decompression */ export function decompress(data: Uint8Array, cb: FlateCallback): AsyncTerminable; export function decompress(data: Uint8Array, opts: AsyncInflateOptions | FlateCallback, cb?: FlateCallback) { if (!cb) cb = opts as FlateCallback, opts = {}; if (typeof cb != 'function') err(7); return (data[0] == 31 && data[1] == 139 && data[2] == 8) ? gunzip(data, opts as AsyncInflateOptions, cb) : ((data[0] & 15) != 8 || (data[0] >> 4) > 7 || ((data[0] << 8 | data[1]) % 31)) ? inflate(data, opts as AsyncInflateOptions, cb) : unzlib(data, opts as AsyncInflateOptions, cb); } /** * Expands compressed GZIP, Zlib, or raw DEFLATE data, automatically detecting the format * @param data The data to decompress * @param opts The decompression options * @returns The decompressed version of the data */ export function decompressSync(data: Uint8Array, opts?: InflateOptions) { return (data[0] == 31 && data[1] == 139 && data[2] == 8) ? gunzipSync(data, opts) : ((data[0] & 15) != 8 || (data[0] >> 4) > 7 || ((data[0] << 8 | data[1]) % 31)) ? inflateSync(data, opts) : unzlibSync(data, opts); } /** * Attributes for files added to a ZIP archive object */ export interface ZipAttributes { /** * The operating system of origin for this file. The value is defined * by PKZIP's APPNOTE.txt, section 4.4.2.2. For example, 0 (the default) * is MS/DOS, 3 is Unix, 19 is macOS. */ os?: number; /** * The file's attributes. These are traditionally somewhat complicated * and platform-dependent, so using them is scarcely necessary. However, * here is a representation of what this is, bit by bit: * * `TTTTugtrwxrwxrwx0000000000ADVSHR` * * TTTT = file type (rarely useful) * * u = setuid, g = setgid, t = sticky * * rwx = user permissions, rwx = group permissions, rwx = other permissions * * 0000000000 = unused * * A = archive, D = directory, V = volume label, S = system file, H = hidden, R = read-only * * If you want to set the Unix permissions, for instance, just bit shift by 16, e.g. 0o644 << 16. * Note that attributes usually only work in conjunction with the `os` setting: you must use * `os` = 3 (Unix) if you want to set Unix permissions */ attrs?: number; /** * Extra metadata to add to the file. This field is defined by PKZIP's APPNOTE.txt, * section 4.4.28. At most 65,535 bytes may be used in each ID. The ID must be an * integer between 0 and 65,535, inclusive. * * This field is incredibly rare and almost never needed except for compliance with * proprietary standards and software. */ extra?: Record; /** * The comment to attach to the file. This field is defined by PKZIP's APPNOTE.txt, * section 4.4.26. The comment must be at most 65,535 bytes long UTF-8 encoded. This * field is not read by consumer software. */ comment?: string; /** * When the file was last modified. Defaults to the current time. */ mtime?: GzipOptions['mtime']; } /** * Options for creating a ZIP archive */ export interface ZipOptions extends DeflateOptions, ZipAttributes {} /** * Options for expanding a ZIP archive */ export interface UnzipOptions { /** * A filter function to extract only certain files from a ZIP archive */ filter?: UnzipFileFilter; } /** * Options for asynchronously creating a ZIP archive */ export interface AsyncZipOptions extends AsyncDeflateOptions, ZipAttributes {} /** * Options for asynchronously expanding a ZIP archive */ export interface AsyncUnzipOptions extends UnzipOptions {} /** * A file that can be used to create a ZIP archive */ export type ZippableFile = Uint8Array | Zippable | [Uint8Array | Zippable, ZipOptions]; /** * A file that can be used to asynchronously create a ZIP archive */ export type AsyncZippableFile = Uint8Array | AsyncZippable | [Uint8Array | AsyncZippable, AsyncZipOptions] /** * The complete directory structure of a ZIPpable archive */ export interface Zippable { [path: string]: ZippableFile; } /** * The complete directory structure of an asynchronously ZIPpable archive */ export interface AsyncZippable { [path: string]: AsyncZippableFile; } /** * An unzipped archive. The full path of each file is used as the key, * and the file is the value */ export interface Unzipped { [path: string]: Uint8Array; } /** * Handler for string generation streams * @param data The string output from the stream processor * @param final Whether this is the final block */ export type StringStreamHandler = (data: string, final: boolean) => void; /** * Callback for asynchronous ZIP decompression * @param err Any error that occurred * @param data The decompressed ZIP archive */ export type UnzipCallback = (err: FlateError | null, data: Unzipped) => void; /** * Handler for streaming ZIP decompression * @param file The file that was found in the archive */ export type UnzipFileHandler = (file: UnzipFile) => void; // flattened Zippable type FlatZippable = Record; // flatten a directory structure const fltn = (d: D, p: string, t: FlatZippable, o: ZipOptions) => { for (const k in d) { let val = d[k], n = p + k, op = o; if (Array.isArray(val)) op = mrg(o, val[1]), val = val[0] as unknown as D[Extract]; if (ArrayBuffer.isView(val)) t[n] = [val, op] as unknown as FlatZippable[string]; else { t[n += '/'] = [new u8(0), op] as unknown as FlatZippable[string]; fltn(val as unknown as (A extends true ? AsyncZippable : Zippable), n, t, o); } } } // text encoder const te = typeof TextEncoder != 'undefined' && /*#__PURE__*/ new TextEncoder(); // text decoder const td = typeof TextDecoder != 'undefined' && /*#__PURE__*/ new TextDecoder(); // text decoder stream let tds = 0; try { td.decode(et, { stream: true }); tds = 1; } catch(e) {} // decode UTF8 const dutf8 = (d: Uint8Array) => { for (let r = '', i = 0;;) { let c = d[i++]; const eb = ((c > 127) as unknown as number) + ((c > 223) as unknown as number) + ((c > 239) as unknown as number); if (i + eb > d.length) return { s: r, r: slc(d, i - 1) }; if (!eb) r += String.fromCharCode(c) else if (eb == 3) { c = ((c & 15) << 18 | (d[i++] & 63) << 12 | (d[i++] & 63) << 6 | (d[i++] & 63)) - 65536, r += String.fromCharCode(55296 | (c >> 10), 56320 | (c & 1023)); } else if (eb & 1) r += String.fromCharCode((c & 31) << 6 | (d[i++] & 63)); else r += String.fromCharCode((c & 15) << 12 | (d[i++] & 63) << 6 | (d[i++] & 63)); } } /** * Streaming UTF-8 decoding */ export class DecodeUTF8 { private p: Uint8Array; private t: TextDecoder; /** * Creates a UTF-8 decoding stream * @param cb The callback to call whenever data is decoded */ constructor(cb?: StringStreamHandler) { this.ondata = cb; if (tds) this.t = new TextDecoder(); else this.p = et; } /** * Pushes a chunk to be decoded from UTF-8 binary * @param chunk The chunk to push * @param final Whether this is the last chunk */ push(chunk: Uint8Array, final?: boolean) { if (!this.ondata) err(5); final = !!final; if (this.t) { this.ondata(this.t.decode(chunk, { stream: true }), final); if (final) { if (this.t.decode().length) err(8); this.t = null; } return; } if (!this.p) err(4); const dat = new u8(this.p.length + chunk.length); dat.set(this.p); dat.set(chunk, this.p.length); const { s, r } = dutf8(dat); if (final) { if (r.length) err(8); this.p = null; } else this.p = r; this.ondata(s, final); } /** * The handler to call whenever data is available */ ondata: StringStreamHandler; } /** * Streaming UTF-8 encoding */ export class EncodeUTF8 { private d: boolean; /** * Creates a UTF-8 decoding stream * @param cb The callback to call whenever data is encoded */ constructor(cb?: FlateStreamHandler) { this.ondata = cb; } /** * Pushes a chunk to be encoded to UTF-8 * @param chunk The string data to push * @param final Whether this is the last chunk */ push(chunk: string, final?: boolean) { if (!this.ondata) err(5); if (this.d) err(4); this.ondata(strToU8(chunk), this.d = final || false); } /** * The handler to call whenever data is available */ ondata: FlateStreamHandler; } /** * Converts a string into a Uint8Array for use with compression/decompression methods * @param str The string to encode * @param latin1 Whether or not to interpret the data as Latin-1. This should * not need to be true unless decoding a binary string. * @returns The string encoded in UTF-8/Latin-1 binary */ export function strToU8(str: string, latin1?: boolean) { if (latin1) { const ar = new u8(str.length); for (let i = 0; i < str.length; ++i) ar[i] = str.charCodeAt(i); return ar; } if (te) return te.encode(str); const l = str.length; let ar = new u8(str.length + (str.length >> 1)); let ai = 0; const w = (v: number) => { ar[ai++] = v; }; for (let i = 0; i < l; ++i) { if (ai + 5 > ar.length) { const n = new u8(ai + 8 + ((l - i) << 1)); n.set(ar); ar = n; } let c = str.charCodeAt(i); if (c < 128 || latin1) w(c); else if (c < 2048) w(192 | (c >> 6)), w(128 | (c & 63)); else if (c > 55295 && c < 57344) c = 65536 + (c & 1023 << 10) | (str.charCodeAt(++i) & 1023), w(240 | (c >> 18)), w(128 | ((c >> 12) & 63)), w(128 | ((c >> 6) & 63)), w(128 | (c & 63)); else w(224 | (c >> 12)), w(128 | ((c >> 6) & 63)), w(128 | (c & 63)); } return slc(ar, 0, ai); } /** * Converts a Uint8Array to a string * @param dat The data to decode to string * @param latin1 Whether or not to interpret the data as Latin-1. This should * not need to be true unless encoding to binary string. * @returns The original UTF-8/Latin-1 string */ export function strFromU8(dat: Uint8Array, latin1?: boolean) { if (latin1) { let r = ''; for (let i = 0; i < dat.length; i += 16384) r += String.fromCharCode.apply(null, dat.subarray(i, i + 16384)); return r; } else if (td) { return td.decode(dat) } else { const { s, r } = dutf8(dat); if (r.length) err(8); return s; } }; // deflate bit flag const dbf = (l: number) => l == 1 ? 3 : l < 6 ? 2 : l == 9 ? 1 : 0; // skip local zip header const slzh = (d: Uint8Array, b: number) => b + 30 + b2(d, b + 26) + b2(d, b + 28); // read zip header const zh = (d: Uint8Array, b: number, z: boolean) => { const fnl = b2(d, b + 28), efl = b2(d, b + 30), fn = strFromU8(d.subarray(b + 46, b + 46 + fnl), !(b2(d, b + 8) & 2048)), es = b + 46 + fnl; const [sc, su, off] = z64hs(d, es, efl, z, b4(d, b + 20), b4(d, b + 24), b4(d, b + 42)); return [b2(d, b + 10), sc, su, fn, es + efl + b2(d, b + 32), off] as const; } // read zip64 header sizes const z64hs = (d: Uint8Array, b: number, l: number, z: boolean | number, sc: number, su: number, off: number) => { const nsc = sc == 4294967295, nsu = su == 4294967295, noff = off == 4294967295, e = b + l; const nf = (nsc as unknown as number) + (nsu as unknown as number) + (noff as unknown as number); if (z && nf) { for (; b + 4 < e; b += 4 + b2(d, b + 2)) { if (b2(d, b) == 1) { return [ nsc ? b8(d, b + 4 + 8 * (nsu as unknown as number)) : sc, nsu ? b8(d, b + 4) : su, noff ? b8(d, b + 4 + 8 * ((nsu as unknown as number) + (nsc as unknown as number))) : off, 1 ] as const; } } // z == 2 for unknown whether or not zip64 if (z as unknown as number < 2) err(13); } return [sc, su, off, 0] as const; } // zip header file type ZHF = Omit; // extra field length const exfl = (ex?: ZHF['extra']) => { let le = 0; if (ex) { for (const k in ex) { const l = ex[k].length; if (l > 65535) err(9); le += l + 4; } } return le; } // write zip header const wzh = (d: Uint8Array, b: number, f: ZHF, fn: Uint8Array, u: boolean, c: number, ce?: number, co?: Uint8Array) => { const fl = fn.length, ex = f.extra, col = co && co.length; let exl = exfl(ex); wbytes(d, b, ce != null ? 0x2014B50 : 0x4034B50), b += 4; if (ce != null) d[b++] = 20, d[b++] = f.os; d[b] = 20, b += 2; // spec compliance? what's that? d[b++] = (f.flag << 1) | (c < 0 && 8), d[b++] = u && 8; d[b++] = f.compression & 255, d[b++] = f.compression >> 8; const dt = new Date(f.mtime == null ? Date.now() : f.mtime), y = dt.getFullYear() - 1980; if (y < 0 || y > 119) err(10); wbytes(d, b, (y << 25) | ((dt.getMonth() + 1) << 21) | (dt.getDate() << 16) | (dt.getHours() << 11) | (dt.getMinutes() << 5) | (dt.getSeconds() >> 1)), b += 4; if (c != -1) { wbytes(d, b, f.crc); wbytes(d, b + 4, c < 0 ? -c - 2 : c); wbytes(d, b + 8, f.size); } wbytes(d, b + 12, fl); wbytes(d, b + 14, exl), b += 16; if (ce != null) { wbytes(d, b, col); wbytes(d, b + 6, f.attrs); wbytes(d, b + 10, ce), b += 14; } d.set(fn, b); b += fl; if (exl) { for (const k in ex) { const exf = ex[k], l = exf.length; wbytes(d, b, +k); wbytes(d, b + 2, l); d.set(exf, b + 4), b += 4 + l; } } if (col) d.set(co, b), b += col; return b; } // write zip footer (end of central directory) const wzf = (o: Uint8Array, b: number, c: number, d: number, e: number) => { wbytes(o, b, 0x6054B50); // skip disk wbytes(o, b + 8, c); wbytes(o, b + 10, c); wbytes(o, b + 12, d); wbytes(o, b + 16, e); } /** * A stream that can be used to create a file in a ZIP archive */ export interface ZipInputFile extends ZipAttributes { /** * The filename to associate with the data provided to this stream. If you * want a file in a subdirectory, use forward slashes as a separator (e.g. * `directory/filename.ext`). This will still work on Windows. */ filename: string; /** * The size of the file in bytes. This attribute may be invalid after * the file is added to the ZIP archive; it must be correct only before the * stream completes. * * If you don't want to have to compute this yourself, consider extending the * ZipPassThrough class and overriding its process() method, or using one of * ZipDeflate or AsyncZipDeflate. */ size: number; /** * A CRC of the original file contents. This attribute may be invalid after * the file is added to the ZIP archive; it must be correct only before the * stream completes. * * If you don't want to have to generate this yourself, consider extending the * ZipPassThrough class and overriding its process() method, or using one of * ZipDeflate or AsyncZipDeflate. */ crc: number; /** * The compression format for the data stream. This number is determined by * the spec in PKZIP's APPNOTE.txt, section 4.4.5. For example, 0 = no * compression, 8 = deflate, 14 = LZMA */ compression: number; /** * Bits 1 and 2 of the general purpose bit flag, specified in PKZIP's * APPNOTE.txt, section 4.4.4. Should be between 0 and 3. This is unlikely * to be necessary. */ flag?: number; /** * The handler to be called when data is added. After passing this stream to * the ZIP file object, this handler will always be defined. To call it: * * `stream.ondata(error, chunk, final)` * * error = any error that occurred (null if there was no error) * * chunk = a Uint8Array of the data that was added (null if there was an * error) * * final = boolean, whether this is the final chunk in the stream */ ondata?: AsyncFlateStreamHandler; /** * A method called when the stream is no longer needed, for clean-up * purposes. This will not always be called after the stream completes, * so you may wish to call this.terminate() after the final chunk is * processed if you have clean-up logic. */ terminate?: AsyncTerminable; } type AsyncZipDat = ZHF & { // compressed data c: Uint8Array; // filename f: Uint8Array; // comment m?: Uint8Array; // unicode u: boolean; }; type ZipDat = AsyncZipDat & { // offset o: number; } /** * A pass-through stream to keep data uncompressed in a ZIP archive. */ export class ZipPassThrough implements ZipInputFile { filename: string; crc: number; size: number; compression: number; os?: number; attrs?: number; comment?: string; extra?: Record; mtime?: GzipOptions['mtime']; ondata: AsyncFlateStreamHandler; private c: CRCV; /** * Creates a pass-through stream that can be added to ZIP archives * @param filename The filename to associate with this data stream */ constructor(filename: string) { this.filename = filename; this.c = crc(); this.size = 0; this.compression = 0; } /** * Processes a chunk and pushes to the output stream. You can override this * method in a subclass for custom behavior, but by default this passes * the data through. You must call this.ondata(err, chunk, final) at some * point in this method. * @param chunk The chunk to process * @param final Whether this is the last chunk */ protected process(chunk: Uint8Array, final: boolean) { this.ondata(null, chunk, final); } /** * Pushes a chunk to be added. If you are subclassing this with a custom * compression algorithm, note that you must push data from the source * file only, pre-compression. * @param chunk The chunk to push * @param final Whether this is the last chunk */ push(chunk: Uint8Array, final?: boolean) { if (!this.ondata) err(5); this.c.p(chunk); this.size += chunk.length; if (final) this.crc = this.c.d(); // we shouldn't really do this cast, but properly handling ArrayBufferLike // makes the API unergonomic with Buffer this.process(chunk as Uint8Array, final || false); } } // I don't extend because TypeScript extension adds 1kB of runtime bloat /** * Streaming DEFLATE compression for ZIP archives. Prefer using AsyncZipDeflate * for better performance */ export class ZipDeflate implements ZipInputFile { filename: string; crc: number; size: number; compression: number; flag: 0 | 1 | 2 | 3; os?: number; attrs?: number; comment?: string; extra?: Record; mtime?: GzipOptions['mtime']; ondata: AsyncFlateStreamHandler; private d: Deflate; /** * Creates a DEFLATE stream that can be added to ZIP archives * @param filename The filename to associate with this data stream * @param opts The compression options */ constructor(filename: string, opts?: DeflateOptions) { if (!opts) opts = {}; ZipPassThrough.call(this, filename); this.d = new Deflate(opts, (dat, final) => { this.ondata(null, dat, final); }); this.compression = 8; this.flag = dbf(opts.level); } private process(chunk: Uint8Array, final: boolean) { try { this.d.push(chunk, final); } catch(e) { this.ondata(e, null, final); } } /** * Pushes a chunk to be deflated * @param chunk The chunk to push * @param final Whether this is the last chunk */ push(chunk: Uint8Array, final?: boolean) { ZipPassThrough.prototype.push.call(this, chunk, final); } } /** * Asynchronous streaming DEFLATE compression for ZIP archives */ export class AsyncZipDeflate implements ZipInputFile { filename: string; crc: number; size: number; compression: number; flag: 0 | 1 | 2 | 3; os?: number; attrs?: number; comment?: string; extra?: Record; mtime?: GzipOptions['mtime']; ondata: AsyncFlateStreamHandler; private d: AsyncDeflate; terminate: AsyncTerminable; /** * Creates an asynchronous DEFLATE stream that can be added to ZIP archives * @param filename The filename to associate with this data stream * @param opts The compression options */ constructor(filename: string, opts?: DeflateOptions) { if (!opts) opts = {}; ZipPassThrough.call(this, filename); this.d = new AsyncDeflate(opts, (err, dat, final) => { this.ondata(err, dat, final); }); this.compression = 8; this.flag = dbf(opts.level); this.terminate = this.d.terminate; } private process(chunk: Uint8Array, final: boolean) { this.d.push(chunk, final); } /** * Pushes a chunk to be deflated * @param chunk The chunk to push * @param final Whether this is the last chunk */ push(chunk: Uint8Array, final?: boolean) { ZipPassThrough.prototype.push.call(this, chunk, final); } } type ZIFE = { // compressed size c: number; // filename f: Uint8Array; // comment o?: Uint8Array; // unicode u: boolean; // byte offset b: number; // header offset h: number; // terminator t: () => void; // turn r: () => void; }; type ZipInternalFile = ZHF & ZIFE; // TODO: Better tree shaking /** * A zippable archive to which files can incrementally be added */ export class Zip { private u: ZipInternalFile[]; private d: number; /** * Creates an empty ZIP archive to which files can be added * @param cb The callback to call whenever data for the generated ZIP archive * is available */ constructor(cb?: AsyncFlateStreamHandler) { this.ondata = cb; this.u = []; this.d = 1; } /** * Adds a file to the ZIP archive * @param file The file stream to add */ add(file: ZipInputFile) { if (!this.ondata) err(5); // finishing or finished if (this.d & 2) this.ondata(err(4 + (this.d & 1) * 8, 0, 1), null, false); else { const f = strToU8(file.filename), fl = f.length; const com = file.comment, o = com && strToU8(com); const u = fl != file.filename.length || (o && (com.length != o.length)); const hl = fl + exfl(file.extra) + 30; if (fl > 65535) this.ondata(err(11, 0, 1), null, false); const header = new u8(hl); wzh(header, 0, file, f, u, -1); let chks: Uint8Array[] = [header]; const pAll = () => { for (const chk of chks) this.ondata(null, chk, false); chks = []; }; let tr = this.d; this.d = 0; const ind = this.u.length; const uf = mrg(file, { f, u, o, t: () => { if (file.terminate) file.terminate(); }, r: () => { pAll(); if (tr) { const nxt = this.u[ind + 1]; if (nxt) nxt.r(); else this.d = 1; } tr = 1; } } as ZIFE); let cl = 0; file.ondata = (err, dat, final) => { if (err) { this.ondata(err, dat, final); this.terminate(); } else { cl += dat.length; chks.push(dat); if (final) { const dd = new u8(16); wbytes(dd, 0, 0x8074B50) wbytes(dd, 4, file.crc); wbytes(dd, 8, cl); wbytes(dd, 12, file.size); chks.push(dd); uf.c = cl, uf.b = hl + cl + 16, uf.crc = file.crc, uf.size = file.size; if (tr) uf.r(); tr = 1; } else if (tr) pAll(); } } this.u.push(uf); } } /** * Ends the process of adding files and prepares to emit the final chunks. * This *must* be called after adding all desired files for the resulting * ZIP file to work properly. */ end() { if (this.d & 2) { this.ondata(err(4 + (this.d & 1) * 8, 0, 1), null, true); return; } if (this.d) this.e(); else this.u.push({ r: () => { if (!(this.d & 1)) return; this.u.splice(-1, 1); this.e(); }, t: () => {} } as unknown as ZipInternalFile); this.d = 3; } private e() { let bt = 0, l = 0, tl = 0; for (const f of this.u) tl += 46 + f.f.length + exfl(f.extra) + (f.o ? f.o.length : 0); const out = new u8(tl + 22); for (const f of this.u) { wzh(out, bt, f, f.f, f.u, -f.c - 2, l, f.o); bt += 46 + f.f.length + exfl(f.extra) + (f.o ? f.o.length : 0), l += f.b; } wzf(out, bt, this.u.length, tl, l) this.ondata(null, out, true); this.d = 2; } /** * A method to terminate any internal workers used by the stream. Subsequent * calls to add() will fail. */ terminate() { for (const f of this.u) f.t(); this.d = 2; } /** * The handler to call whenever data is available */ ondata: AsyncFlateStreamHandler; } /** * Asynchronously creates a ZIP file * @param data The directory structure for the ZIP archive * @param opts The main options, merged with per-file options * @param cb The callback to call with the generated ZIP archive * @returns A function that can be used to immediately terminate the compression */ export function zip(data: AsyncZippable, opts: AsyncZipOptions, cb: FlateCallback): AsyncTerminable; /** * Asynchronously creates a ZIP file * @param data The directory structure for the ZIP archive * @param cb The callback to call with the generated ZIP archive * @returns A function that can be used to immediately terminate the compression */ export function zip(data: AsyncZippable, cb: FlateCallback): AsyncTerminable; export function zip(data: AsyncZippable, opts: AsyncZipOptions | FlateCallback, cb?: FlateCallback) { if (!cb) cb = opts as FlateCallback, opts = {}; if (typeof cb != 'function') err(7); const r: FlatZippable = {}; fltn(data, '', r, opts as AsyncZipOptions); const k = Object.keys(r); let lft = k.length, o = 0, tot = 0; const slft = lft, files = new Array(lft); const term: AsyncTerminable[] = []; const tAll = () => { for (let i = 0; i < term.length; ++i) term[i](); } let cbd: FlateCallback = (a, b) => { mt(() => { cb(a, b); }); } mt(() => { cbd = cb; }); const cbf = () => { const out = new u8(tot + 22), oe = o, cdl = tot - o; tot = 0; for (let i = 0; i < slft; ++i) { const f = files[i]; try { const l = f.c.length; wzh(out, tot, f, f.f, f.u, l); const badd = 30 + f.f.length + exfl(f.extra); const loc = tot + badd; out.set(f.c, loc); wzh(out, o, f, f.f, f.u, l, tot, f.m), o += 16 + badd + (f.m ? f.m.length : 0), tot = loc + l; } catch(e) { return cbd(e, null); } } wzf(out, o, files.length, cdl, oe); cbd(null, out); } if (!lft) cbf(); // Cannot use lft because it can decrease for (let i = 0; i < slft; ++i) { const fn = k[i]; const [file, p] = r[fn]; const c = crc(), size = file.length; c.p(file); const f = strToU8(fn), s = f.length; const com = p.comment, m = com && strToU8(com), ms = m && m.length; const exl = exfl(p.extra); const compression = p.level == 0 ? 0 : 8; const cbl = (e: FlateError, d: Uint8Array) => { if (e) { tAll(); cbd(e, null); } else { const l = d.length; files[i] = mrg(p, { size, crc: c.d(), c: d, f, m, u: s != fn.length || (m && (com.length != ms)), compression }); o += 30 + s + exl + l; tot += 76 + 2 * (s + exl) + (ms || 0) + l; if (!--lft) cbf(); } } if (s > 65535) cbl(err(11, 0, 1), null); if (!compression) cbl(null, file); else if (size < 160000) { try { cbl(null, deflateSync(file, p)); } catch(e) { cbl(e, null); } } else term.push(deflate(file, p, cbl)); } return tAll; } /** * Synchronously creates a ZIP file. Prefer using `zip` for better performance * with more than one file. * @param data The directory structure for the ZIP archive * @param opts The main options, merged with per-file options * @returns The generated ZIP archive */ export function zipSync(data: Zippable, opts?: ZipOptions) { if (!opts) opts = {}; const r: FlatZippable = {}; const files: ZipDat[] = []; fltn(data, '', r, opts); let o = 0; let tot = 0; for (const fn in r) { const [file, p] = r[fn]; const compression = p.level == 0 ? 0 : 8; const f = strToU8(fn), s = f.length; const com = p.comment, m = com && strToU8(com), ms = m && m.length; const exl = exfl(p.extra); if (s > 65535) err(11); const d = compression ? deflateSync(file, p) : file, l = d.length; const c = crc(); c.p(file); files.push(mrg(p, { size: file.length, crc: c.d(), c: d, f, m, u: s != fn.length || (m && (com.length != ms)), o, compression })); o += 30 + s + exl + l; tot += 76 + 2 * (s + exl) + (ms || 0) + l; } const out = new u8(tot + 22), oe = o, cdl = tot - o; for (let i = 0; i < files.length; ++i) { const f = files[i]; wzh(out, f.o, f, f.f, f.u, f.c.length); const badd = 30 + f.f.length + exfl(f.extra); out.set(f.c, f.o + badd); wzh(out, o, f, f.f, f.u, f.c.length, f.o, f.m), o += 16 + badd + (f.m ? f.m.length : 0); } wzf(out, o, files.length, cdl, oe); return out; } /** * A decoder for files in ZIP streams */ export interface UnzipDecoder { /** * The handler to call whenever data is available */ ondata: AsyncFlateStreamHandler; /** * Pushes a chunk to be decompressed * @param chunk The data in this chunk. Do not consume (detach) this buffer. * @param final Whether this is the last chunk in the data stream */ push(chunk: Uint8Array, final: boolean): void; /** * A method to terminate any internal workers used by the stream. Subsequent * calls to push() should silently fail. */ terminate?: AsyncTerminable } /** * A constructor for a decoder for unzip streams */ export interface UnzipDecoderConstructor { /** * Creates an instance of the decoder * @param filename The name of the file * @param size The compressed size of the file * @param originalSize The original size of the file */ new(filename: string, size?: number, originalSize?: number): UnzipDecoder; /** * The compression format for the data stream. This number is determined by * the spec in PKZIP's APPNOTE.txt, section 4.4.5. For example, 0 = no * compression, 8 = deflate, 14 = LZMA */ compression: number; } /** * Information about a file to be extracted from a ZIP archive */ export interface UnzipFileInfo { /** * The name of the file */ name: string; /** * The compressed size of the file */ size: number; /** * The original size of the file */ originalSize: number; /** * The compression format for the data stream. This number is determined by * the spec in PKZIP's APPNOTE.txt, section 4.4.5. For example, 0 = no * compression, 8 = deflate, 14 = LZMA. If the filter function returns true * but this value is not 8, the unzip function will throw. */ compression: number; } /** * A filter for files to be extracted during the unzipping process * @param file The info for the current file being processed * @returns Whether or not to extract the current file */ export type UnzipFileFilter = (file: UnzipFileInfo) => boolean; /** * Streaming file extraction from ZIP archives */ export interface UnzipFile { /** * The handler to call whenever data is available */ ondata: AsyncFlateStreamHandler; /** * The name of the file */ name: string; /** * The compression format for the data stream. This number is determined by * the spec in PKZIP's APPNOTE.txt, section 4.4.5. For example, 0 = no * compression, 8 = deflate, 14 = LZMA. If start() is called but there is no * decompression stream available for this method, start() will throw. */ compression: number; /** * The compressed size of the file. Will not be present for archives created * in a streaming fashion. */ size?: number; /** * The original size of the file. Will not be present for archives created * in a streaming fashion. */ originalSize?: number; /** * Starts reading from the stream. Calling this function will always enable * this stream, but ocassionally the stream will be enabled even without * this being called. */ start(): void; /** * A method to terminate any internal workers used by the stream. ondata * will not be called any further. */ terminate: AsyncTerminable } /** * Streaming pass-through decompression for ZIP archives */ export class UnzipPassThrough implements UnzipDecoder { static compression = 0; ondata: AsyncFlateStreamHandler; push(chunk: Uint8Array, final: boolean) { // same as ZipPassThrough: cast to retain Buffer ergonomics this.ondata(null, chunk as Uint8Array, final); } } /** * Streaming DEFLATE decompression for ZIP archives. Prefer AsyncZipInflate for * better performance. */ export class UnzipInflate implements UnzipDecoder { static compression = 8; private i: Inflate; ondata: AsyncFlateStreamHandler; /** * Creates a DEFLATE decompression that can be used in ZIP archives */ constructor() { this.i = new Inflate((dat, final) => { this.ondata(null, dat, final); }); } push(chunk: Uint8Array, final: boolean) { try { this.i.push(chunk, final); } catch(e) { this.ondata(e, null, final); } } } /** * Asynchronous streaming DEFLATE decompression for ZIP archives */ export class AsyncUnzipInflate implements UnzipDecoder { static compression = 8; private i: AsyncInflate | Inflate; ondata: AsyncFlateStreamHandler; terminate: AsyncTerminable; /** * Creates a DEFLATE decompression that can be used in ZIP archives */ constructor(_: string, sz?: number) { if (sz < 320000) { this.i = new Inflate((dat, final) => { this.ondata(null, dat, final); }); } else { this.i = new AsyncInflate((err, dat, final) => { this.ondata(err, dat, final); }); this.terminate = this.i.terminate; } } push(chunk: Uint8Array, final: boolean) { if ((this.i as AsyncInflate).terminate) chunk = slc(chunk, 0); this.i.push(chunk, final); } } /** * A ZIP archive decompression stream that emits files as they are discovered */ export class Unzip { private d: UnzipDecoder; private c: number; private p: Uint8Array; private k: Uint8Array[][]; private o: Record; /** * Creates a ZIP decompression stream * @param cb The callback to call whenever a file in the ZIP archive is found */ constructor(cb?: UnzipFileHandler) { this.onfile = cb; this.k = []; this.o = { 0: UnzipPassThrough }; this.p = et; } /** * Pushes a chunk to be unzipped * @param chunk The chunk to push * @param final Whether this is the last chunk */ push(chunk: Uint8Array, final?: boolean): void { if (!this.onfile) err(5); if (!this.p) err(4); if (this.c > 0) { const len = Math.min(this.c, chunk.length); const toAdd = chunk.subarray(0, len); this.c -= len; if (this.d) this.d.push(toAdd, !this.c); else this.k[0].push(toAdd); chunk = chunk.subarray(len); if (chunk.length) return this.push(chunk, final); } else { let f = 0, i = 0, is: number, buf: Uint8Array; if (!this.p.length) buf = chunk; else if (!chunk.length) buf = this.p; else { buf = new u8(this.p.length + chunk.length) buf.set(this.p), buf.set(chunk, this.p.length); } const l = buf.length, oc = this.c, add = oc && this.d; for (; i < l - 4; ++i) { const sig = b4(buf, i); if (sig == 0x4034B50) { f = 1, is = i; this.d = null; this.c = 0; const bf = b2(buf, i + 6), cmp = b2(buf, i + 8), u = bf & 2048, dd = bf & 8, fnl = b2(buf, i + 26), es = b2(buf, i + 28); if (l > i + 30 + fnl + es) { const chks: Uint8Array[] = []; this.k.unshift(chks); f = 2; let lsc = b4(buf, i + 18), lsu = b4(buf, i + 22); const fn = strFromU8(buf.subarray(i + 30, i += 30 + fnl), !u); let [sc, su,, z64] = z64hs(buf, i, es, 2, lsc, lsu, 0); if (dd) sc = -1 - z64; i += es; this.c = sc; let d: UnzipDecoder; const file = { name: fn, compression: cmp, start: () => { if (!file.ondata) err(5); if (!sc) file.ondata(null, et, true); else { const ctr = this.o[cmp]; if (!ctr) file.ondata(err(14, 'unknown compression type ' + cmp, 1), null, false); d = sc < 0 ? new ctr(fn) : new ctr(fn, sc, su); d.ondata = (err, dat, final) => { file.ondata(err, dat, final); } for (const dat of chks) d.push(dat, false); if (this.k[0] == chks && this.c) this.d = d; else d.push(et, true); } }, terminate: () => { if (d && d.terminate) d.terminate(); } } as UnzipFile; if (sc >= 0) file.size = sc, file.originalSize = su; this.onfile(file); } break; } else if (oc) { if (sig == 0x8074B50) { is = i += 12 + (oc == -2 && 8), f = 3, this.c = 0; break; } else if (sig == 0x2014B50) { is = i -= 4, f = 3, this.c = 0; break; } } } this.p = et if (oc < 0) { const dat = f ? buf.subarray(0, is - 12 - (oc == -2 && 8) - (b4(buf, is - 16) == 0x8074B50 && 4)) : buf.subarray(0, i); if (add) add.push(dat, !!f); else this.k[+(f == 2)].push(dat); } if (f & 2) return this.push(buf.subarray(i), final); this.p = buf.subarray(i); } if (final) { if (this.c) err(13); this.p = null; } } /** * Registers a decoder with the stream, allowing for files compressed with * the compression type provided to be expanded correctly * @param decoder The decoder constructor */ register(decoder: UnzipDecoderConstructor) { this.o[decoder.compression] = decoder; } /** * The handler to call whenever a file is discovered */ onfile: UnzipFileHandler; } const mt = typeof queueMicrotask == 'function' ? queueMicrotask : typeof setTimeout == 'function' ? setTimeout : (fn: Function) => { fn(); }; /** * Asynchronously decompresses a ZIP archive * @param data The raw compressed ZIP file * @param opts The ZIP extraction options * @param cb The callback to call with the decompressed files * @returns A function that can be used to immediately terminate the unzipping */ export function unzip(data: Uint8Array, opts: AsyncUnzipOptions, cb: UnzipCallback): AsyncTerminable; /** * Asynchronously decompresses a ZIP archive * @param data The raw compressed ZIP file * @param cb The callback to call with the decompressed files * @returns A function that can be used to immediately terminate the unzipping */ export function unzip(data: Uint8Array, cb: UnzipCallback): AsyncTerminable; export function unzip(data: Uint8Array, opts: AsyncUnzipOptions | UnzipCallback, cb?: UnzipCallback): AsyncTerminable { if (!cb) cb = opts as UnzipCallback, opts = {}; if (typeof cb != 'function') err(7); const term: AsyncTerminable[] = []; const tAll = () => { for (let i = 0; i < term.length; ++i) term[i](); } const files: Unzipped = {}; let cbd: UnzipCallback = (a, b) => { mt(() => { cb(a, b); }); } mt(() => { cbd = cb; }); let e = data.length - 22; for (; b4(data, e) != 0x6054B50; --e) { if (!e || data.length - e > 65558) { cbd(err(13, 0, 1), null); return tAll; } }; let lft = b2(data, e + 8); if (lft) { let c = lft; let o = b4(data, e + 16); let z = b4(data, e - 20) == 0x7064B50; if (z) { let ze = b4(data, e - 12); z = b4(data, ze) == 0x6064B50; if (z) { c = lft = b4(data, ze + 32); o = b4(data, ze + 48); } } const fltr = opts && (opts as AsyncUnzipOptions).filter; for (let i = 0; i < c; ++i) { const [c, sc, su, fn, no, off] = zh(data, o, z), b = slzh(data, off); o = no const cbl: FlateCallback = (e, d) => { if (e) { tAll(); cbd(e, null); } else { if (d) files[fn] = d; if (!--lft) cbd(null, files); } } if (!fltr || fltr({ name: fn, size: sc, originalSize: su, compression: c })) { if (!c) cbl(null, slc(data, b, b + sc)) else if (c == 8) { const infl = data.subarray(b, b + sc); // Synchronously decompress under 512KB, or barely-compressed data if (su < 524288 || sc > 0.8 * su) { try { cbl(null, inflateSync(infl, { out: new u8(su) })); } catch(e) { cbl(e, null); } } else term.push(inflate(infl, { size: su }, cbl)); } else cbl(err(14, 'unknown compression type ' + c, 1), null); } else cbl(null, null); } } else cbd(null, {}); return tAll; } /** * Synchronously decompresses a ZIP archive. Prefer using `unzip` for better * performance with more than one file. * @param data The raw compressed ZIP file * @param opts The ZIP extraction options * @returns The decompressed files */ export function unzipSync(data: Uint8Array, opts?: UnzipOptions) { const files: Unzipped = {}; let e = data.length - 22; for (; b4(data, e) != 0x6054B50; --e) { if (!e || data.length - e > 65558) err(13); }; let c = b2(data, e + 8); if (!c) return {}; let o = b4(data, e + 16); let z = b4(data, e - 20) == 0x7064B50; if (z) { let ze = b4(data, e - 12); z = b4(data, ze) == 0x6064B50; if (z) { c = b4(data, ze + 32); o = b4(data, ze + 48); } } const fltr = opts && opts.filter; for (let i = 0; i < c; ++i) { const [c, sc, su, fn, no, off] = zh(data, o, z), b = slzh(data, off); o = no; if (!fltr || fltr({ name: fn, size: sc, originalSize: su, compression: c })) { if (!c) files[fn] = slc(data, b, b + sc); else if (c == 8) files[fn] = inflateSync(data.subarray(b, b + sc), { out: new u8(su) }); else err(14, 'unknown compression type ' + c); } } return files; } 101arrowz-fflate-a661bab/src/node-worker.ts000066400000000000000000000026571520173263500206140ustar00rootroot00000000000000// Mediocre shim let Worker: typeof import('worker_threads').Worker; let isMarkedAsUntransferable: typeof import('worker_threads').isMarkedAsUntransferable; const workerAdd = ";var __w=require('worker_threads');__w.parentPort.on('message',function(m){onmessage({data:m})}),postMessage=function(m,t){__w.parentPort.postMessage(m,t)},close=process.exit;self=global"; try { ({ Worker, isMarkedAsUntransferable } = require('worker_threads')); } catch(e) { } export default Worker ? (c: string, _: number, msg: unknown, transfer: ArrayBuffer[], cb: (err: Error, msg: T) => void) => { let done = false; const w = new Worker(c + workerAdd, { eval: true }) .on('error', e => cb(e as Error, null)) .on('message', m => cb(null, m)) .on('exit', c => { if (c && !done) cb(new Error('exited with code ' + c), null); }); if (isMarkedAsUntransferable) transfer = transfer.filter(t => !isMarkedAsUntransferable(t)); w.postMessage(msg, transfer); w.terminate = () => { done = true; return Worker.prototype.terminate.call(w); } return w; } : (_: string, __: number, ___: unknown, ____: ArrayBuffer[], cb: (err: Error, msg: null) => void) => { setImmediate(() => cb(new Error('async operations unsupported - update to Node 12+ (or Node 10-11 with the --experimental-worker CLI flag)'), null)); const NOP = () => {}; return { terminate: NOP, postMessage: NOP } as unknown as import('worker_threads').Worker; }101arrowz-fflate-a661bab/src/worker.ts000066400000000000000000000012271520173263500176610ustar00rootroot00000000000000const ch2: Record = {}; export default (c: string, id: number, msg: unknown, transfer: ArrayBuffer[], cb: (err: Error, msg: T) => void) => { const w = new Worker(ch2[id] ||= URL.createObjectURL( new Blob([ c + ';addEventListener("error",function(e){e=e.error;postMessage({$e$:[e.message,e.code,e.stack]})})' ], { type: 'text/javascript' }) )); w.onmessage = e => { const d = e.data, ed = d.$e$; if (ed) { const err = new Error(ed[0]) as Error & { code: number }; err['code'] = ed[1]; err.stack = ed[2]; cb(err, null); } else cb(null, d); } w.postMessage(msg, transfer); return w; }101arrowz-fflate-a661bab/test/000077500000000000000000000000001520173263500161665ustar00rootroot00000000000000101arrowz-fflate-a661bab/test/0-valid.ts000066400000000000000000000014731520173263500177770ustar00rootroot00000000000000import { testSuites, workers, bClone } from './util'; import * as assert from 'uvu/assert'; // Name is to ensure that this runs first // Note that workers are not used here to optimize performance but rather // to prevent infinite loops from hanging the process. testSuites({ async compression(file) { const fileClone = bClone(file); const cProm = workers.fflate.deflate(fileClone, [fileClone.buffer]); cProm.timeout(10000); const buf = await cProm; assert.ok(file.equals(await workers.zlib.inflate(buf, [buf.buffer]))); }, async decompression(file) { const fileClone = bClone(file); const data = await workers.zlib.deflate(fileClone, [fileClone.buffer]); const dProm = workers.fflate.inflate(data, [data.buffer]); dProm.timeout(5000); assert.ok(file.equals(await dProm)); } });101arrowz-fflate-a661bab/test/1-size.ts000066400000000000000000000016351520173263500176530ustar00rootroot00000000000000import { testSuites, workers, bClone } from './util'; import { writeFileSync } from 'fs'; import { join } from 'path'; import { performance } from 'perf_hooks'; import * as assert from 'uvu/assert'; const sizePerf: Record> = {}; testSuites({ async main(file, name) { sizePerf[name] = {}; for (const lib of (['fflate', 'pako', 'uzip', 'zlib'] as const)) { const clone = bClone(file); const ts = performance.now(); sizePerf[name][lib] = [(await workers[lib].deflate([clone, { level: 9 }], [clone.buffer])).length, performance.now() - ts]; } for (const lib of ['pako', 'uzip', 'zlib']) { // Less than 5% larger assert.ok(((sizePerf[name].fflate[0] - sizePerf[name][lib][0]) / sizePerf[name][lib][0]) < 0.05); } } }).then(() => { writeFileSync(join(__dirname, 'results', 'longTimings.json'), JSON.stringify(sizePerf, null, 2)); })101arrowz-fflate-a661bab/test/2-perf.ts000066400000000000000000000026461520173263500176410ustar00rootroot00000000000000import { testSuites, workers, bClone, TestHandler } from './util'; import { writeFileSync } from 'fs'; import { join } from 'path'; const preprocessors = { inflate: workers.zlib.deflate, gunzip: workers.zlib.gzip, unzlib: workers.zlib.zlib }; const cache: Record> = { deflate: {}, inflate: {}, gzip: {}, gunzip: {}, zlib: {}, unzlib: {} }; const flattenedWorkers: Record = {}; for (const k in workers) { for (const l in workers[k as keyof typeof workers]) { if (l == 'zip' || l == 'unzip') continue; flattenedWorkers[k + '.' + l] = async (file, name, resetTimer) => { const fileClone = bClone(file); let buf = fileClone; if (preprocessors[l as keyof typeof preprocessors]) { buf = bClone(cache[l][name] ||= Buffer.from( await preprocessors[l as keyof typeof preprocessors](buf, [buf.buffer]) )); resetTimer(); } const opt2 = preprocessors[l as keyof typeof preprocessors] ? k === 'tinyInflate' ? new Uint8Array(file.length) : null : { level: 1 }; await workers[k as keyof typeof workers][l as 'inflate']([buf, opt2], opt2 instanceof Uint8Array ? [buf.buffer, opt2.buffer] : [buf.buffer]); } } } testSuites(flattenedWorkers).then(perf => { writeFileSync(join(__dirname, 'results', 'timings.json'), JSON.stringify(perf, null, 2)); });101arrowz-fflate-a661bab/test/3-zip.ts000066400000000000000000000000211520173263500174710ustar00rootroot00000000000000// TODO: test ZIP101arrowz-fflate-a661bab/test/4-streams.ts000066400000000000000000000000511520173263500203510ustar00rootroot00000000000000// TODO: test all streams (including ZIP)101arrowz-fflate-a661bab/test/5-async.ts000066400000000000000000000000761520173263500200200ustar00rootroot00000000000000// TODO: test all async operations (including streams and ZIP)101arrowz-fflate-a661bab/test/data/000077500000000000000000000000001520173263500170775ustar00rootroot00000000000000101arrowz-fflate-a661bab/test/data/.gitignore000066400000000000000000000000151520173263500210630ustar00rootroot00000000000000* !.gitignore101arrowz-fflate-a661bab/test/results/000077500000000000000000000000001520173263500176675ustar00rootroot00000000000000101arrowz-fflate-a661bab/test/results/.gitignore000066400000000000000000000000151520173263500216530ustar00rootroot00000000000000* !.gitignore101arrowz-fflate-a661bab/test/tsconfig.json000066400000000000000000000003171520173263500206760ustar00rootroot00000000000000{ "compilerOptions": { "noEmit": true, "module": "nodenext", "moduleResolution": "nodenext", "types": ["node"], "strict": false, "noImplicitAny": true }, "include": ["./*.ts"] }101arrowz-fflate-a661bab/test/util.ts000066400000000000000000000145601520173263500175210ustar00rootroot00000000000000import { existsSync, readFile, writeFile } from 'fs'; import { resolve } from 'path'; import { get } from 'https'; import { suite } from 'uvu'; import { performance } from 'perf_hooks'; import { Worker } from 'worker_threads'; const testFiles = { basic: Buffer.from('Hello world!'), text: 'https://www.gutenberg.org/files/2701/old/moby10b.txt', smallImage: 'https://hlevkin.com/hlevkin/TestImages/new/Rainier.bmp', image: 'https://www.hlevkin.com/hlevkin/TestImages/new/Maltese.bmp', largeImage: 'https://www.hlevkin.com/hlevkin/TestImages/new/Sunrise.bmp' }; const testZipFiles = { model3D: 'https://raw.githubusercontent.com/mrdoob/three.js/dev/examples/models/kmz/Box.kmz', largeModel3D: 'https://raw.githubusercontent.com/mrdoob/three.js/dev/examples/models/3mf/truck.3mf' }; const dlCached = async >(files: T) => { let res = {} as Record; for (const name in files) { let data: string | Buffer = files[name]; if (typeof data == 'string') { const fn = resolve(__dirname, 'data', name); if (!existsSync(fn)) { console.log('\nDownloading ' + data + '...'); data = await new Promise((r, re) => get(data as string, res => { const len = +res.headers['content-length']; const buf = Buffer.allocUnsafe(len); let i = 0; res.on('data', chunk => { buf.set(chunk, i); console.log((100 * (i += chunk.length) / len).toFixed(1) + '%\x1B[1A'); }); res.on('error', re); res.on('end', () => { console.log('Complete'); writeFile(fn, buf, () => r(buf)); }); })); } else { data = await new Promise((res, rej) => readFile(fn, (err, buf) => err ? rej(err) : res(buf)) ); } } res[name as keyof T] = data as Buffer; } return res; } const testFilesPromise = dlCached(testFiles); const testZipFilesPromise = dlCached(testZipFiles); export type TestHandler = (file: Buffer, name: string, resetTimer: () => void) => unknown | Promise; export const testSuites = async , D extends 'zip' | 'default' = 'default'>(suites: T, type?: D) => { type DK = keyof (D extends 'zip' ? typeof testZipFiles : typeof testFiles); const tf = type == 'zip' ? testZipFiles : testFiles; const tfp = type == 'zip' ? testZipFilesPromise : testFilesPromise; const perf = {} as Record>>; for (const k in suites) { perf[k] = new Promise(async setPerf => { const ste = suite(k); let localTestFiles: Record; ste.before(async () => { localTestFiles = (await tfp) as unknown as Record; }); const localPerf = {} as Record; for (const name in tf) { ste(name, async () => { let ts = performance.now(); await suites[k](localTestFiles[name as keyof typeof localTestFiles], name, () => { ts = performance.now(); }); localPerf[name as keyof typeof localPerf] = performance.now() - ts; }); } ste.after(() => { setPerf(localPerf); }); ste.run(); }) } const resolvedPerf = {} as Record>; for (const k in suites) resolvedPerf[k] = await perf[k]; return resolvedPerf; }; export const stream = (src: Uint8Array, dst: { push(dat: Uint8Array, final: boolean): void; }) => { for (let i = 0; i < src.length;) { const off = Math.floor(Math.random() * Math.min(131072, src.length >>> 3)); dst.push(src.slice(i, i + off), (i += off) >= src.length); } } // create worker string const cws = (pkg: string, method: string = '_cjsDefault') => ` const ${method == '_cjsDefault' ? method : `{ ${method} }`} = require('${pkg}'); const { Worker, workerData, parentPort } = require('worker_threads'); try { const buf = ${method}(...(Array.isArray(workerData) ? workerData : [workerData])); parentPort.postMessage(buf, [buf.buffer]); } catch (err) { parentPort.postMessage({ err }); } `; export type Workerized = (workerData: Uint8Array | [Uint8Array, {}], transferable?: ArrayBuffer[]) => WorkerizedResult; export interface WorkerizedResult extends PromiseLike> { timeout(ms: number): void; }; // Worker creator const wc = (pkg: string, method?: string): Workerized => { const str = cws(pkg, method); return (workerData, transferable) => { const worker = new Worker(str, { eval: true, workerData, transferList: transferable }); let terminated = false; return { timeout(ms: number) { const tm = setTimeout(() => { worker.terminate(); terminated = true; }, ms); worker.once('message', () => clearTimeout(tm)); }, then(res, rej) { return new Promise((res, rej) => { worker .once('message', msg => { if (msg.err) rej(msg.err); res(msg); }) .once('error', rej) .once('exit', code => { if (terminated) rej(new Error('Timed out')); else if (code !== 0) rej(new Error('Exited with status code ' + code)); }); }).then(res, rej); } }; } } const fflate = resolve(__dirname, '..'); export const workers = { fflate: { deflate: wc(fflate, 'deflateSync'), inflate: wc(fflate, 'inflateSync'), gzip: wc(fflate, 'gzipSync'), gunzip: wc(fflate, 'gunzipSync'), zlib: wc(fflate, 'zlibSync'), unzlib: wc(fflate, 'unzlibSync'), zip: wc(fflate, 'zipSync'), unzip: wc(fflate, 'unzipSync') }, pako: { deflate: wc('pako', 'deflateRaw'), inflate: wc('pako', 'inflateRaw'), gzip: wc('pako', 'gzip'), gunzip: wc('pako', 'ungzip'), zlib: wc('pako', 'deflate'), unzlib: wc('pako', 'inflate') }, uzip: { deflate: wc('uzip', 'deflateRaw'), inflate: wc('uzip', 'inflateRaw') }, tinyInflate: { inflate: wc('tiny-inflate') }, zlib: { deflate: wc('zlib', 'deflateRawSync'), inflate: wc('zlib', 'inflateRawSync'), gzip: wc('zlib', 'gzipSync'), gunzip: wc('zlib', 'gunzipSync'), zlib: wc('zlib', 'deflateSync'), unzlib: wc('zlib', 'inflateSync') } }; export const bClone = (buf: Buffer) => { const clone = Buffer.allocUnsafeSlow(buf.length); clone.set(buf); return clone; }101arrowz-fflate-a661bab/tsconfig.demo.json000066400000000000000000000004311520173263500206370ustar00rootroot00000000000000{ "compilerOptions": { "noEmit": true, "target": "ESNext", "module": "ESNext", "jsx": "preserve", "allowSyntheticDefaultImports": true, "strict": false }, "include": ["demo/**/*.ts", "demo/**/*.tsx", "demo/augment.d.ts"], "exclude": ["demo/sw.ts"] }101arrowz-fflate-a661bab/tsconfig.esm.json000066400000000000000000000002061520173263500204770ustar00rootroot00000000000000{ "extends": "./tsconfig.json", "compilerOptions": { "declaration": false, "module": "preserve", "outDir": "esm" } }101arrowz-fflate-a661bab/tsconfig.json000066400000000000000000000005261520173263500177210ustar00rootroot00000000000000{ "compilerOptions": { "declaration": true, "moduleResolution": "bundler", "module": "commonjs", "target": "es5", "rootDir": "src/", "outDir": "lib/", "types": ["node"], "strict": false, "noImplicitAny": true, "esModuleInterop": false, "ignoreDeprecations": "6.0" }, "include": ["src/*.ts"] }