# Third-party libraries (self-hosted)

Everything the converter needs is served from this folder, so the site makes **no requests to third-party servers**: no CDNs, no font services. Each library keeps its original license file next to it (`LICENSE.txt`); [licenses.html](../licenses.html) lists them all and is linked from the site footer.

| Folder | Library | Version | License | Used for |
| :--- | :--- | :--- | :--- | :--- |
| `jspdf/` | [jsPDF](https://github.com/parallax/jsPDF) | 2.5.1 | MIT | PDF generation |
| `jszip/` | [JSZip](https://stuk.github.io/jszip/) | 3.10.1 | MIT (dual MIT/GPLv3) | EPUB read/write |
| `pdfjs/` | [PDF.js](https://mozilla.github.io/pdf.js/) | 3.11.174 | Apache-2.0 | PDF text extraction |
| `inter/` | [Inter](https://rsms.me/inter/) | 3.19 | SIL OFL 1.1 | UI font |
| `jsquash/jpeg/` | [@jsquash/jpeg](https://github.com/jamsinclair/jSquash) (MozJPEG) | 1.6.0 | Apache-2.0 (codec: BSD-style IJG) | JPEG encoding |
| `jsquash/webp/` | @jsquash/webp (libwebp) | 1.5.0 | Apache-2.0 (codec: BSD) | WebP encoding |
| `jsquash/avif/` | @jsquash/avif (libavif + aom) | 2.1.1 | Apache-2.0 (codec: BSD) | AVIF encoding |
| `jsquash/oxipng/` | @jsquash/oxipng (OxiPNG) | 2.3.0 | Apache-2.0 (codec: MIT) | Lossless PNG optimisation |
| `wasm-feature-detect/` | [wasm-feature-detect](https://github.com/GoogleChromeLabs/wasm-feature-detect) | 1.9.0 | Apache-2.0 | WASM SIMD detection (WebP) |
| `mediabunny/` | [Mediabunny](https://mediabunny.dev) | 1.62.0 | MPL-2.0 | Video/audio conversion (WebCodecs) |
| `mediabunny/mediabunny-mp3-encoder.min.mjs` | [@mediabunny/mp3-encoder](https://github.com/Vanilagy/mediabunny) | 1.62.0 | MPL-2.0, embeds [LAME](https://lame.sourceforge.io/) (LGPL) | MP3 encoding |

Only the encoder parts of the jSquash packages are included (no decoders, no multi-threaded builds).

## Local patches

These are the only changes to the published files. They are needed because the files are loaded straight in the browser, without a bundler.

- `jsquash/webp/encode.js`: `import { simd } from 'wasm-feature-detect'` → `'../../wasm-feature-detect/index.js'`
- `jsquash/avif/encode.js`, `jsquash/oxipng/optimise.js`: the `wasm-feature-detect` import is replaced by `const threads = async () => false;`. The multi-threaded builds need cross-origin isolation (COOP/COEP headers), so the single-threaded build is always used and the `_mt` / `pkg-parallel` files are not shipped.
- `mediabunny/mediabunny-mp3-encoder.min.mjs`: `from "mediabunny"` → `from "./mediabunny.min.mjs"`

## Updating

Download the package tarball from the npm registry (`https://registry.npmjs.org/<name>/-/<name>-<version>.tgz`), copy the same files over, and re-apply the patches above.
